summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Step10/MathFunctions/MathFunctions.h
diff options
context:
space:
mode:
Diffstat (limited to 'Help/guide/tutorial/Step10/MathFunctions/MathFunctions.h')
0 files changed, 0 insertions, 0 deletions
ild-scripts/pidgin-configure | 1 - contrib/build-scripts/platform-id-linux.sh | 16 - contrib/build-scripts/platform-id-mac.sh | 19 - contrib/cmake/BinaryExists.cmake | 1 - contrib/cmake/CPackUSCXML.cmake | 423 - contrib/cmake/CrossCompile-Android.cmake | 1776 - contrib/cmake/CrossCompile-iOS-Sim.cmake | 95 - contrib/cmake/CrossCompile-iOS.cmake | 104 - contrib/cmake/FindArabica.cmake | 39 - contrib/cmake/FindEV.cmake | 20 - contrib/cmake/FindEVENT.cmake | 83 - contrib/cmake/FindExpect.cmake | 48 - contrib/cmake/FindFFMPEG.cmake | 172 - contrib/cmake/FindGLIB2.cmake | 237 - contrib/cmake/FindGLOG.cmake | 35 - contrib/cmake/FindGMP.cmake | 42 - contrib/cmake/FindGObject.cmake | 52 - contrib/cmake/FindICONV.cmake | 58 - contrib/cmake/FindICU.cmake | 317 - contrib/cmake/FindLIBICAL.cmake | 52 - contrib/cmake/FindLIBSNDFILE.cmake | 45 - contrib/cmake/FindLibJingle.cmake | 150 - contrib/cmake/FindLibPurple.cmake | 98 - contrib/cmake/FindLua.cmake | 171 - contrib/cmake/FindMILES.cmake | 182 - contrib/cmake/FindOpenALKCAT.cmake | 31 - contrib/cmake/FindPHP5.cmake | 58 - contrib/cmake/FindSWI.cmake | 249 - contrib/cmake/FindSpiderMonkey.cmake | 25 - contrib/cmake/FindSqlite3.cmake | 21 - contrib/cmake/FindUMUNDO.cmake | 132 - contrib/cmake/FunctionExists.cmake | 2 - contrib/cmake/HeaderExists.cmake | 8 - contrib/cmake/TryCompile.cmake | 23 - contrib/cmake/USCXMLMacros.cmake | 31 + contrib/cmake/cotire.cmake | 3239 -- contrib/ctest/README.md | 2 - contrib/ctest/run-tests.cron | 6 - contrib/ctest/run-tests.vbs | 15 - contrib/dom/idl/Attr.idl | 9 - contrib/dom/idl/CDATASection.idl | 2 - contrib/dom/idl/CharacterData.idl | 22 - contrib/dom/idl/Comment.idl | 2 - contrib/dom/idl/DOMException.idl | 27 - contrib/dom/idl/DOMImplementation.idl | 14 - contrib/dom/idl/Document.idl | 51 - contrib/dom/idl/DocumentFragment.idl | 2 - contrib/dom/idl/DocumentType.idl | 11 - contrib/dom/idl/Element.idl | 41 - contrib/dom/idl/Entity.idl | 5 - contrib/dom/idl/EntityReference.idl | 2 - contrib/dom/idl/NamedNodeMap.idl | 19 - contrib/dom/idl/Node.idl | 59 - contrib/dom/idl/NodeList.idl | 6 - contrib/dom/idl/NodeSet.idl | 7 - contrib/dom/idl/Notation.idl | 4 - contrib/dom/idl/ProcessingInstruction.idl | 6 - contrib/dom/idl/SCXMLEvent.idl | 18 - contrib/dom/idl/Storage.idl | 8 - contrib/dom/idl/Text.idl | 4 - contrib/dom/idl/TypedArray.idl | 307 - contrib/dom/idl/XPathNSResolver.idl.deact | 24 - contrib/dom/idl/XPathResult.idl | 43 - contrib/dom/scripts/CodeGenerator.pm | 752 - contrib/dom/scripts/CodeGeneratorArabicaJSC.pm | 1154 - contrib/dom/scripts/CodeGeneratorArabicaV8.pm | 1023 - .../dom/scripts/CodeGeneratorArabicaV8.post3.14.pm | 1021 - contrib/dom/scripts/IDLAttributes.txt | 126 - contrib/dom/scripts/IDLParser.pm | 2456 -- contrib/dom/scripts/InFilesCompiler.pm | 296 - contrib/dom/scripts/InFilesParser.pm | 154 - contrib/dom/scripts/generate-bindings.pl | 217 - contrib/dom/scripts/make_jsc.sh | 3 - contrib/dom/scripts/make_v8.sh | 3 - contrib/dom/scripts/preprocessor.pm | 89 - contrib/iwyu-g++ | 8 - contrib/iwyu-gcc | 5 - contrib/java/build-java.xml | 91 - contrib/local/annotate-xml-lineno.pl | 43 - contrib/local/bcp-boost.sh | 11 +- contrib/local/beautifyCode.sh | 7 - contrib/local/build-linux.expect | 36 - contrib/local/build-windows.expect | 202 - contrib/local/compress_and_upload_deps.sh | 99 - contrib/local/create-random-scxml.pl | 217 - contrib/local/make-dist.sh | 145 - contrib/local/make-installer-html-table.pl | 245 - contrib/local/package-linux.expect | 33 - contrib/local/package-windows.expect | 77 - contrib/local/prune_promela.pl | 42 - contrib/local/remove-dsstore-files.sh | 9 - contrib/local/test-include-linux.sh | 32 - contrib/local/test-include-macosx.sh | 36 - contrib/local/validate-installers.expect | 317 - contrib/local/virtualbox.sh | 9 - contrib/proto/mmi/LifeCycleEvents.proto | 217 - contrib/proto/mmi/StringDataExtension.proto | 129 - contrib/src/Pluma/Config.hpp | 141 + contrib/src/Pluma/Connector.hpp | 86 + contrib/src/Pluma/DLibrary.cpp | 106 + contrib/src/Pluma/DLibrary.hpp | 123 + contrib/src/Pluma/Dir.cpp | 103 + contrib/src/Pluma/Dir.hpp | 64 + contrib/src/Pluma/Host.cpp | 179 + contrib/src/Pluma/Host.hpp | 212 + contrib/src/Pluma/PluginManager.cpp | 201 + contrib/src/Pluma/PluginManager.hpp | 245 + contrib/src/Pluma/Pluma.hpp | 171 + contrib/src/Pluma/Pluma.inl | 52 + contrib/src/Pluma/Provider.cpp | 52 + contrib/src/Pluma/Provider.hpp | 204 + contrib/src/Pluma/uce-dirent.h | 679 + contrib/src/boost/algorithm/string.hpp | 31 + contrib/src/boost/algorithm/string/case_conv.hpp | 176 + .../src/boost/algorithm/string/classification.hpp | 312 + contrib/src/boost/algorithm/string/compare.hpp | 199 + contrib/src/boost/algorithm/string/concept.hpp | 83 + contrib/src/boost/algorithm/string/config.hpp | 28 + contrib/src/boost/algorithm/string/constants.hpp | 36 + .../boost/algorithm/string/detail/case_conv.hpp | 123 + .../algorithm/string/detail/classification.hpp | 353 + .../boost/algorithm/string/detail/find_format.hpp | 204 + .../algorithm/string/detail/find_format_all.hpp | 273 + .../algorithm/string/detail/find_format_store.hpp | 89 + .../algorithm/string/detail/find_iterator.hpp | 87 + .../src/boost/algorithm/string/detail/finder.hpp | 639 + .../boost/algorithm/string/detail/formatter.hpp | 119 + .../boost/algorithm/string/detail/predicate.hpp | 77 + .../algorithm/string/detail/replace_storage.hpp | 159 + .../src/boost/algorithm/string/detail/sequence.hpp | 200 + contrib/src/boost/algorithm/string/detail/trim.hpp | 95 + contrib/src/boost/algorithm/string/detail/util.hpp | 106 + contrib/src/boost/algorithm/string/erase.hpp | 844 + contrib/src/boost/algorithm/string/find.hpp | 334 + contrib/src/boost/algorithm/string/find_format.hpp | 287 + .../src/boost/algorithm/string/find_iterator.hpp | 388 + contrib/src/boost/algorithm/string/finder.hpp | 270 + contrib/src/boost/algorithm/string/formatter.hpp | 120 + contrib/src/boost/algorithm/string/iter_find.hpp | 193 + contrib/src/boost/algorithm/string/join.hpp | 145 + contrib/src/boost/algorithm/string/predicate.hpp | 475 + .../boost/algorithm/string/predicate_facade.hpp | 42 + contrib/src/boost/algorithm/string/replace.hpp | 928 + .../src/boost/algorithm/string/sequence_traits.hpp | 120 + contrib/src/boost/algorithm/string/split.hpp | 163 + .../src/boost/algorithm/string/std/list_traits.hpp | 68 + .../boost/algorithm/string/std/slist_traits.hpp | 69 + .../boost/algorithm/string/std/string_traits.hpp | 44 + .../algorithm/string/std_containers_traits.hpp | 26 + contrib/src/boost/algorithm/string/trim.hpp | 398 + contrib/src/boost/algorithm/string/yes_no_type.hpp | 33 + contrib/src/boost/assert.hpp | 85 + contrib/src/boost/bind/mem_fn.hpp | 389 + contrib/src/boost/bind/mem_fn_cc.hpp | 103 + contrib/src/boost/bind/mem_fn_template.hpp | 1047 + contrib/src/boost/bind/mem_fn_vw.hpp | 130 + contrib/src/boost/checked_delete.hpp | 17 + contrib/src/boost/concept/assert.hpp | 45 + .../concept/detail/backward_compatibility.hpp | 16 + contrib/src/boost/concept/detail/borland.hpp | 30 + contrib/src/boost/concept/detail/concept_def.hpp | 34 + contrib/src/boost/concept/detail/concept_undef.hpp | 5 + contrib/src/boost/concept/detail/general.hpp | 77 + .../src/boost/concept/detail/has_constraints.hpp | 50 + contrib/src/boost/concept/detail/msvc.hpp | 123 + contrib/src/boost/concept/usage.hpp | 36 + contrib/src/boost/concept_check.hpp | 1082 + contrib/src/boost/config.hpp | 67 + contrib/src/boost/config/abi/borland_prefix.hpp | 27 + contrib/src/boost/config/abi/borland_suffix.hpp | 12 + contrib/src/boost/config/abi/msvc_prefix.hpp | 22 + contrib/src/boost/config/abi/msvc_suffix.hpp | 8 + contrib/src/boost/config/abi_prefix.hpp | 25 + contrib/src/boost/config/abi_suffix.hpp | 27 + contrib/src/boost/config/auto_link.hpp | 439 + contrib/src/boost/config/compiler/borland.hpp | 318 + contrib/src/boost/config/compiler/clang.hpp | 279 + contrib/src/boost/config/compiler/codegear.hpp | 220 + contrib/src/boost/config/compiler/comeau.hpp | 59 + contrib/src/boost/config/compiler/common_edg.hpp | 143 + contrib/src/boost/config/compiler/compaq_cxx.hpp | 19 + contrib/src/boost/config/compiler/cray.hpp | 92 + contrib/src/boost/config/compiler/digitalmars.hpp | 124 + contrib/src/boost/config/compiler/gcc.hpp | 314 + contrib/src/boost/config/compiler/gcc_xml.hpp | 95 + contrib/src/boost/config/compiler/greenhills.hpp | 28 + contrib/src/boost/config/compiler/hp_acc.hpp | 145 + contrib/src/boost/config/compiler/intel.hpp | 535 + contrib/src/boost/config/compiler/kai.hpp | 33 + contrib/src/boost/config/compiler/metrowerks.hpp | 179 + contrib/src/boost/config/compiler/mpw.hpp | 121 + contrib/src/boost/config/compiler/nvcc.hpp | 16 + contrib/src/boost/config/compiler/pathscale.hpp | 114 + contrib/src/boost/config/compiler/pgi.hpp | 155 + contrib/src/boost/config/compiler/sgi_mipspro.hpp | 29 + contrib/src/boost/config/compiler/sunpro_cc.hpp | 190 + contrib/src/boost/config/compiler/vacpp.hpp | 162 + contrib/src/boost/config/compiler/visualc.hpp | 298 + contrib/src/boost/config/compiler/xlcpp.hpp | 258 + contrib/src/boost/config/no_tr1/cmath.hpp | 28 + contrib/src/boost/config/no_tr1/complex.hpp | 28 + contrib/src/boost/config/no_tr1/functional.hpp | 28 + contrib/src/boost/config/no_tr1/memory.hpp | 28 + contrib/src/boost/config/no_tr1/utility.hpp | 28 + contrib/src/boost/config/platform/aix.hpp | 33 + contrib/src/boost/config/platform/amigaos.hpp | 15 + contrib/src/boost/config/platform/beos.hpp | 26 + contrib/src/boost/config/platform/bsd.hpp | 86 + contrib/src/boost/config/platform/cloudabi.hpp | 18 + contrib/src/boost/config/platform/cray.hpp | 18 + contrib/src/boost/config/platform/cygwin.hpp | 58 + contrib/src/boost/config/platform/haiku.hpp | 31 + contrib/src/boost/config/platform/hpux.hpp | 87 + contrib/src/boost/config/platform/irix.hpp | 31 + contrib/src/boost/config/platform/linux.hpp | 105 + contrib/src/boost/config/platform/macos.hpp | 87 + contrib/src/boost/config/platform/qnxnto.hpp | 31 + contrib/src/boost/config/platform/solaris.hpp | 31 + contrib/src/boost/config/platform/symbian.hpp | 97 + contrib/src/boost/config/platform/vms.hpp | 25 + contrib/src/boost/config/platform/vxworks.hpp | 369 + contrib/src/boost/config/platform/win32.hpp | 90 + contrib/src/boost/config/posix_features.hpp | 95 + contrib/src/boost/config/requires_threads.hpp | 92 + .../src/boost/config/select_compiler_config.hpp | 148 + .../src/boost/config/select_platform_config.hpp | 137 + contrib/src/boost/config/select_stdlib_config.hpp | 105 + contrib/src/boost/config/stdlib/dinkumware.hpp | 198 + contrib/src/boost/config/stdlib/libcomo.hpp | 83 + contrib/src/boost/config/stdlib/libcpp.hpp | 80 + contrib/src/boost/config/stdlib/libstdcpp3.hpp | 281 + contrib/src/boost/config/stdlib/modena.hpp | 69 + contrib/src/boost/config/stdlib/msl.hpp | 88 + contrib/src/boost/config/stdlib/roguewave.hpp | 198 + contrib/src/boost/config/stdlib/sgi.hpp | 158 + contrib/src/boost/config/stdlib/stlport.hpp | 248 + contrib/src/boost/config/stdlib/vacpp.hpp | 64 + contrib/src/boost/config/suffix.hpp | 1007 + contrib/src/boost/config/user.hpp | 133 + contrib/src/boost/config/warning_disable.hpp | 47 + contrib/src/boost/core/addressof.hpp | 162 + contrib/src/boost/core/checked_delete.hpp | 69 + contrib/src/boost/core/demangle.hpp | 128 + contrib/src/boost/core/enable_if.hpp | 128 + contrib/src/boost/core/no_exceptions_support.hpp | 44 + contrib/src/boost/core/noncopyable.hpp | 48 + contrib/src/boost/core/ref.hpp | 301 + contrib/src/boost/core/typeinfo.hpp | 151 + contrib/src/boost/cstdint.hpp | 546 + contrib/src/boost/current_function.hpp | 71 + contrib/src/boost/detail/dynamic_bitset.hpp | 241 + contrib/src/boost/detail/indirect_traits.hpp | 204 + contrib/src/boost/detail/iterator.hpp | 26 + contrib/src/boost/detail/lightweight_mutex.hpp | 22 + contrib/src/boost/detail/no_exceptions_support.hpp | 17 + contrib/src/boost/detail/sp_typeinfo.hpp | 36 + .../src/boost/detail/winapi/GetCurrentProcess.hpp | 34 + .../src/boost/detail/winapi/GetCurrentThread.hpp | 34 + contrib/src/boost/detail/winapi/basic_types.hpp | 225 + contrib/src/boost/detail/winapi/config.hpp | 72 + contrib/src/boost/detail/winapi/crypt.hpp | 193 + .../src/boost/detail/winapi/detail/cast_ptr.hpp | 40 + contrib/src/boost/detail/winapi/process.hpp | 34 + contrib/src/boost/detail/winapi/thread.hpp | 46 + contrib/src/boost/detail/winapi/timers.hpp | 48 + contrib/src/boost/detail/workaround.hpp | 267 + contrib/src/boost/dynamic_bitset.hpp | 17 + contrib/src/boost/dynamic_bitset/config.hpp | 72 + .../src/boost/dynamic_bitset/dynamic_bitset.hpp | 1867 ++ contrib/src/boost/dynamic_bitset_fwd.hpp | 25 + contrib/src/boost/exception/exception.hpp | 499 + contrib/src/boost/function.hpp | 66 + .../src/boost/function/detail/function_iterate.hpp | 16 + .../src/boost/function/detail/gen_maybe_include.pl | 37 + .../src/boost/function/detail/maybe_include.hpp | 267 + contrib/src/boost/function/detail/prologue.hpp | 26 + contrib/src/boost/function/function0.hpp | 12 + contrib/src/boost/function/function1.hpp | 12 + contrib/src/boost/function/function10.hpp | 12 + contrib/src/boost/function/function2.hpp | 12 + contrib/src/boost/function/function3.hpp | 12 + contrib/src/boost/function/function4.hpp | 12 + contrib/src/boost/function/function5.hpp | 12 + contrib/src/boost/function/function6.hpp | 12 + contrib/src/boost/function/function7.hpp | 12 + contrib/src/boost/function/function8.hpp | 12 + contrib/src/boost/function/function9.hpp | 12 + contrib/src/boost/function/function_base.hpp | 892 + contrib/src/boost/function/function_fwd.hpp | 69 + contrib/src/boost/function/function_template.hpp | 1190 + contrib/src/boost/function_equal.hpp | 28 + contrib/src/boost/get_pointer.hpp | 76 + contrib/src/boost/integer.hpp | 262 + contrib/src/boost/integer/integer_log2.hpp | 112 + contrib/src/boost/integer/integer_mask.hpp | 126 + contrib/src/boost/integer/static_log2.hpp | 127 + contrib/src/boost/integer_fwd.hpp | 187 + contrib/src/boost/integer_traits.hpp | 256 + contrib/src/boost/io/ios_state.hpp | 439 + contrib/src/boost/io_fwd.hpp | 67 + contrib/src/boost/iterator.hpp | 20 + contrib/src/boost/iterator/detail/config_def.hpp | 128 + contrib/src/boost/iterator/detail/config_undef.hpp | 24 + contrib/src/boost/iterator/detail/enable_if.hpp | 83 + .../iterator/detail/facade_iterator_category.hpp | 193 + contrib/src/boost/iterator/interoperable.hpp | 54 + contrib/src/boost/iterator/iterator_adaptor.hpp | 360 + contrib/src/boost/iterator/iterator_categories.hpp | 215 + contrib/src/boost/iterator/iterator_concepts.hpp | 275 + contrib/src/boost/iterator/iterator_facade.hpp | 980 + contrib/src/boost/iterator/iterator_traits.hpp | 60 + contrib/src/boost/iterator/reverse_iterator.hpp | 74 + contrib/src/boost/iterator/transform_iterator.hpp | 171 + contrib/src/boost/limits.hpp | 146 + contrib/src/boost/mem_fn.hpp | 24 + contrib/src/boost/move/algorithm.hpp | 282 + contrib/src/boost/move/core.hpp | 501 + contrib/src/boost/move/detail/config_begin.hpp | 19 + contrib/src/boost/move/detail/config_end.hpp | 12 + contrib/src/boost/move/detail/iterator_traits.hpp | 73 + contrib/src/boost/move/detail/meta_utils.hpp | 564 + contrib/src/boost/move/detail/meta_utils_core.hpp | 120 + contrib/src/boost/move/detail/std_ns_begin.hpp | 30 + contrib/src/boost/move/detail/std_ns_end.hpp | 14 + contrib/src/boost/move/detail/type_traits.hpp | 1078 + contrib/src/boost/move/detail/workaround.hpp | 55 + contrib/src/boost/move/iterator.hpp | 312 + contrib/src/boost/move/move.hpp | 35 + contrib/src/boost/move/traits.hpp | 77 + contrib/src/boost/move/utility.hpp | 149 + contrib/src/boost/move/utility_core.hpp | 317 + contrib/src/boost/mpl/always.hpp | 38 + contrib/src/boost/mpl/and.hpp | 60 + contrib/src/boost/mpl/apply.hpp | 229 + contrib/src/boost/mpl/apply_fwd.hpp | 107 + contrib/src/boost/mpl/apply_wrap.hpp | 234 + contrib/src/boost/mpl/arg.hpp | 131 + contrib/src/boost/mpl/arg_fwd.hpp | 28 + contrib/src/boost/mpl/assert.hpp | 439 + contrib/src/boost/mpl/aux_/adl_barrier.hpp | 48 + contrib/src/boost/mpl/aux_/arg_typedef.hpp | 31 + contrib/src/boost/mpl/aux_/arity.hpp | 39 + contrib/src/boost/mpl/aux_/arity_spec.hpp | 67 + contrib/src/boost/mpl/aux_/common_name_wknd.hpp | 34 + contrib/src/boost/mpl/aux_/config/adl.hpp | 40 + contrib/src/boost/mpl/aux_/config/arrays.hpp | 30 + contrib/src/boost/mpl/aux_/config/bcc.hpp | 28 + contrib/src/boost/mpl/aux_/config/bind.hpp | 33 + contrib/src/boost/mpl/aux_/config/compiler.hpp | 66 + contrib/src/boost/mpl/aux_/config/ctps.hpp | 30 + .../boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp | 27 + contrib/src/boost/mpl/aux_/config/dtp.hpp | 46 + contrib/src/boost/mpl/aux_/config/eti.hpp | 47 + contrib/src/boost/mpl/aux_/config/gcc.hpp | 23 + contrib/src/boost/mpl/aux_/config/gpu.hpp | 35 + contrib/src/boost/mpl/aux_/config/has_apply.hpp | 32 + contrib/src/boost/mpl/aux_/config/has_xxx.hpp | 34 + contrib/src/boost/mpl/aux_/config/integral.hpp | 38 + contrib/src/boost/mpl/aux_/config/intel.hpp | 21 + contrib/src/boost/mpl/aux_/config/lambda.hpp | 32 + contrib/src/boost/mpl/aux_/config/msvc.hpp | 21 + .../src/boost/mpl/aux_/config/msvc_typename.hpp | 26 + contrib/src/boost/mpl/aux_/config/nttp.hpp | 41 + .../boost/mpl/aux_/config/overload_resolution.hpp | 29 + contrib/src/boost/mpl/aux_/config/pp_counter.hpp | 26 + contrib/src/boost/mpl/aux_/config/preprocessor.hpp | 39 + .../src/boost/mpl/aux_/config/static_constant.hpp | 25 + contrib/src/boost/mpl/aux_/config/ttp.hpp | 41 + .../src/boost/mpl/aux_/config/use_preprocessed.hpp | 19 + contrib/src/boost/mpl/aux_/config/workaround.hpp | 19 + contrib/src/boost/mpl/aux_/count_args.hpp | 105 + contrib/src/boost/mpl/aux_/full_lambda.hpp | 354 + contrib/src/boost/mpl/aux_/has_apply.hpp | 32 + contrib/src/boost/mpl/aux_/has_rebind.hpp | 99 + contrib/src/boost/mpl/aux_/has_type.hpp | 23 + .../src/boost/mpl/aux_/include_preprocessed.hpp | 42 + contrib/src/boost/mpl/aux_/integral_wrapper.hpp | 93 + contrib/src/boost/mpl/aux_/lambda_arity_param.hpp | 25 + contrib/src/boost/mpl/aux_/lambda_no_ctps.hpp | 193 + contrib/src/boost/mpl/aux_/lambda_support.hpp | 169 + contrib/src/boost/mpl/aux_/logical_op.hpp | 165 + contrib/src/boost/mpl/aux_/msvc_dtw.hpp | 68 + contrib/src/boost/mpl/aux_/msvc_is_class.hpp | 58 + contrib/src/boost/mpl/aux_/msvc_never_true.hpp | 34 + contrib/src/boost/mpl/aux_/na.hpp | 95 + contrib/src/boost/mpl/aux_/na_assert.hpp | 34 + contrib/src/boost/mpl/aux_/na_fwd.hpp | 31 + contrib/src/boost/mpl/aux_/na_spec.hpp | 175 + contrib/src/boost/mpl/aux_/nested_type_wknd.hpp | 48 + contrib/src/boost/mpl/aux_/nttp_decl.hpp | 35 + .../mpl/aux_/preprocessed/bcc/advance_backward.hpp | 97 + .../mpl/aux_/preprocessed/bcc/advance_forward.hpp | 97 + .../src/boost/mpl/aux_/preprocessed/bcc/and.hpp | 69 + .../src/boost/mpl/aux_/preprocessed/bcc/apply.hpp | 169 + .../boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp | 52 + .../boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp | 461 + .../src/boost/mpl/aux_/preprocessed/bcc/arg.hpp | 117 + .../boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp | 300 + .../src/boost/mpl/aux_/preprocessed/bcc/bind.hpp | 397 + .../boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp | 46 + .../src/boost/mpl/aux_/preprocessed/bcc/bitand.hpp | 147 + .../src/boost/mpl/aux_/preprocessed/bcc/bitor.hpp | 147 + .../src/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp | 147 + .../src/boost/mpl/aux_/preprocessed/bcc/deque.hpp | 323 + .../boost/mpl/aux_/preprocessed/bcc/divides.hpp | 146 + .../boost/mpl/aux_/preprocessed/bcc/equal_to.hpp | 94 + .../boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/bcc/full_lambda.hpp | 558 + .../boost/mpl/aux_/preprocessed/bcc/greater.hpp | 94 + .../mpl/aux_/preprocessed/bcc/greater_equal.hpp | 94 + .../boost/mpl/aux_/preprocessed/bcc/inherit.hpp | 139 + .../aux_/preprocessed/bcc/iter_fold_if_impl.hpp | 133 + .../mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp | 229 + .../src/boost/mpl/aux_/preprocessed/bcc/less.hpp | 94 + .../boost/mpl/aux_/preprocessed/bcc/less_equal.hpp | 94 + .../src/boost/mpl/aux_/preprocessed/bcc/list.hpp | 323 + .../src/boost/mpl/aux_/preprocessed/bcc/list_c.hpp | 328 + .../src/boost/mpl/aux_/preprocessed/bcc/map.hpp | 323 + .../src/boost/mpl/aux_/preprocessed/bcc/minus.hpp | 146 + .../boost/mpl/aux_/preprocessed/bcc/modulus.hpp | 101 + .../mpl/aux_/preprocessed/bcc/not_equal_to.hpp | 94 + contrib/src/boost/mpl/aux_/preprocessed/bcc/or.hpp | 69 + .../mpl/aux_/preprocessed/bcc/placeholders.hpp | 105 + .../src/boost/mpl/aux_/preprocessed/bcc/plus.hpp | 146 + .../src/boost/mpl/aux_/preprocessed/bcc/quote.hpp | 119 + .../aux_/preprocessed/bcc/reverse_fold_impl.hpp | 295 + .../preprocessed/bcc/reverse_iter_fold_impl.hpp | 295 + .../src/boost/mpl/aux_/preprocessed/bcc/set.hpp | 323 + .../src/boost/mpl/aux_/preprocessed/bcc/set_c.hpp | 328 + .../boost/mpl/aux_/preprocessed/bcc/shift_left.hpp | 99 + .../mpl/aux_/preprocessed/bcc/shift_right.hpp | 99 + .../mpl/aux_/preprocessed/bcc/template_arity.hpp | 40 + .../src/boost/mpl/aux_/preprocessed/bcc/times.hpp | 146 + .../mpl/aux_/preprocessed/bcc/unpack_args.hpp | 97 + .../src/boost/mpl/aux_/preprocessed/bcc/vector.hpp | 323 + .../boost/mpl/aux_/preprocessed/bcc/vector_c.hpp | 309 + .../aux_/preprocessed/bcc551/advance_backward.hpp | 97 + .../aux_/preprocessed/bcc551/advance_forward.hpp | 97 + .../src/boost/mpl/aux_/preprocessed/bcc551/and.hpp | 69 + .../boost/mpl/aux_/preprocessed/bcc551/apply.hpp | 169 + .../mpl/aux_/preprocessed/bcc551/apply_fwd.hpp | 52 + .../mpl/aux_/preprocessed/bcc551/apply_wrap.hpp | 456 + .../src/boost/mpl/aux_/preprocessed/bcc551/arg.hpp | 123 + .../mpl/aux_/preprocessed/bcc551/basic_bind.hpp | 306 + .../boost/mpl/aux_/preprocessed/bcc551/bind.hpp | 403 + .../mpl/aux_/preprocessed/bcc551/bind_fwd.hpp | 46 + .../boost/mpl/aux_/preprocessed/bcc551/bitand.hpp | 147 + .../boost/mpl/aux_/preprocessed/bcc551/bitor.hpp | 147 + .../boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp | 147 + .../boost/mpl/aux_/preprocessed/bcc551/deque.hpp | 323 + .../boost/mpl/aux_/preprocessed/bcc551/divides.hpp | 146 + .../mpl/aux_/preprocessed/bcc551/equal_to.hpp | 94 + .../mpl/aux_/preprocessed/bcc551/fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/bcc551/full_lambda.hpp | 558 + .../boost/mpl/aux_/preprocessed/bcc551/greater.hpp | 94 + .../mpl/aux_/preprocessed/bcc551/greater_equal.hpp | 94 + .../boost/mpl/aux_/preprocessed/bcc551/inherit.hpp | 141 + .../aux_/preprocessed/bcc551/iter_fold_if_impl.hpp | 133 + .../aux_/preprocessed/bcc551/iter_fold_impl.hpp | 180 + .../aux_/preprocessed/bcc551/lambda_no_ctps.hpp | 229 + .../boost/mpl/aux_/preprocessed/bcc551/less.hpp | 94 + .../mpl/aux_/preprocessed/bcc551/less_equal.hpp | 94 + .../boost/mpl/aux_/preprocessed/bcc551/list.hpp | 323 + .../boost/mpl/aux_/preprocessed/bcc551/list_c.hpp | 328 + .../src/boost/mpl/aux_/preprocessed/bcc551/map.hpp | 323 + .../boost/mpl/aux_/preprocessed/bcc551/minus.hpp | 146 + .../boost/mpl/aux_/preprocessed/bcc551/modulus.hpp | 101 + .../mpl/aux_/preprocessed/bcc551/not_equal_to.hpp | 94 + .../src/boost/mpl/aux_/preprocessed/bcc551/or.hpp | 69 + .../mpl/aux_/preprocessed/bcc551/placeholders.hpp | 105 + .../boost/mpl/aux_/preprocessed/bcc551/plus.hpp | 146 + .../boost/mpl/aux_/preprocessed/bcc551/quote.hpp | 11 + .../aux_/preprocessed/bcc551/reverse_fold_impl.hpp | 295 + .../preprocessed/bcc551/reverse_iter_fold_impl.hpp | 295 + .../src/boost/mpl/aux_/preprocessed/bcc551/set.hpp | 323 + .../boost/mpl/aux_/preprocessed/bcc551/set_c.hpp | 328 + .../mpl/aux_/preprocessed/bcc551/shift_left.hpp | 99 + .../mpl/aux_/preprocessed/bcc551/shift_right.hpp | 99 + .../aux_/preprocessed/bcc551/template_arity.hpp | 40 + .../boost/mpl/aux_/preprocessed/bcc551/times.hpp | 146 + .../mpl/aux_/preprocessed/bcc551/unpack_args.hpp | 97 + .../boost/mpl/aux_/preprocessed/bcc551/vector.hpp | 323 + .../mpl/aux_/preprocessed/bcc551/vector_c.hpp | 309 + .../preprocessed/bcc_pre590/advance_backward.hpp | 97 + .../preprocessed/bcc_pre590/advance_forward.hpp | 97 + .../boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp | 69 + .../mpl/aux_/preprocessed/bcc_pre590/apply.hpp | 169 + .../mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp | 52 + .../aux_/preprocessed/bcc_pre590/apply_wrap.hpp | 456 + .../boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp | 117 + .../aux_/preprocessed/bcc_pre590/basic_bind.hpp | 300 + .../mpl/aux_/preprocessed/bcc_pre590/bind.hpp | 397 + .../mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp | 46 + .../mpl/aux_/preprocessed/bcc_pre590/bitand.hpp | 147 + .../mpl/aux_/preprocessed/bcc_pre590/bitor.hpp | 147 + .../mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp | 147 + .../mpl/aux_/preprocessed/bcc_pre590/deque.hpp | 323 + .../mpl/aux_/preprocessed/bcc_pre590/divides.hpp | 146 + .../mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp | 94 + .../mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp | 180 + .../aux_/preprocessed/bcc_pre590/full_lambda.hpp | 558 + .../mpl/aux_/preprocessed/bcc_pre590/greater.hpp | 94 + .../aux_/preprocessed/bcc_pre590/greater_equal.hpp | 94 + .../mpl/aux_/preprocessed/bcc_pre590/inherit.hpp | 139 + .../preprocessed/bcc_pre590/iter_fold_if_impl.hpp | 133 + .../preprocessed/bcc_pre590/iter_fold_impl.hpp | 180 + .../preprocessed/bcc_pre590/lambda_no_ctps.hpp | 229 + .../mpl/aux_/preprocessed/bcc_pre590/less.hpp | 94 + .../aux_/preprocessed/bcc_pre590/less_equal.hpp | 94 + .../mpl/aux_/preprocessed/bcc_pre590/list.hpp | 323 + .../mpl/aux_/preprocessed/bcc_pre590/list_c.hpp | 328 + .../boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp | 323 + .../mpl/aux_/preprocessed/bcc_pre590/minus.hpp | 146 + .../mpl/aux_/preprocessed/bcc_pre590/modulus.hpp | 101 + .../aux_/preprocessed/bcc_pre590/not_equal_to.hpp | 94 + .../boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp | 69 + .../aux_/preprocessed/bcc_pre590/placeholders.hpp | 105 + .../mpl/aux_/preprocessed/bcc_pre590/plus.hpp | 146 + .../mpl/aux_/preprocessed/bcc_pre590/quote.hpp | 11 + .../preprocessed/bcc_pre590/reverse_fold_impl.hpp | 295 + .../bcc_pre590/reverse_iter_fold_impl.hpp | 295 + .../boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp | 323 + .../mpl/aux_/preprocessed/bcc_pre590/set_c.hpp | 328 + .../aux_/preprocessed/bcc_pre590/shift_left.hpp | 99 + .../aux_/preprocessed/bcc_pre590/shift_right.hpp | 99 + .../preprocessed/bcc_pre590/template_arity.hpp | 40 + .../mpl/aux_/preprocessed/bcc_pre590/times.hpp | 146 + .../aux_/preprocessed/bcc_pre590/unpack_args.hpp | 97 + .../mpl/aux_/preprocessed/bcc_pre590/vector.hpp | 323 + .../mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp | 309 + .../mpl/aux_/preprocessed/dmc/advance_backward.hpp | 97 + .../mpl/aux_/preprocessed/dmc/advance_forward.hpp | 97 + .../src/boost/mpl/aux_/preprocessed/dmc/and.hpp | 69 + .../src/boost/mpl/aux_/preprocessed/dmc/apply.hpp | 169 + .../boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp | 52 + .../boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp | 84 + .../src/boost/mpl/aux_/preprocessed/dmc/arg.hpp | 123 + .../boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp | 406 + .../src/boost/mpl/aux_/preprocessed/dmc/bind.hpp | 515 + .../boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp | 53 + .../src/boost/mpl/aux_/preprocessed/dmc/bitand.hpp | 147 + .../src/boost/mpl/aux_/preprocessed/dmc/bitor.hpp | 147 + .../src/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp | 147 + .../src/boost/mpl/aux_/preprocessed/dmc/deque.hpp | 323 + .../boost/mpl/aux_/preprocessed/dmc/divides.hpp | 146 + .../boost/mpl/aux_/preprocessed/dmc/equal_to.hpp | 94 + .../boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/dmc/full_lambda.hpp | 536 + .../boost/mpl/aux_/preprocessed/dmc/greater.hpp | 94 + .../mpl/aux_/preprocessed/dmc/greater_equal.hpp | 94 + .../boost/mpl/aux_/preprocessed/dmc/inherit.hpp | 141 + .../aux_/preprocessed/dmc/iter_fold_if_impl.hpp | 133 + .../mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp | 229 + .../src/boost/mpl/aux_/preprocessed/dmc/less.hpp | 94 + .../boost/mpl/aux_/preprocessed/dmc/less_equal.hpp | 94 + .../src/boost/mpl/aux_/preprocessed/dmc/list.hpp | 323 + .../src/boost/mpl/aux_/preprocessed/dmc/list_c.hpp | 328 + .../src/boost/mpl/aux_/preprocessed/dmc/map.hpp | 323 + .../src/boost/mpl/aux_/preprocessed/dmc/minus.hpp | 146 + .../boost/mpl/aux_/preprocessed/dmc/modulus.hpp | 101 + .../mpl/aux_/preprocessed/dmc/not_equal_to.hpp | 94 + contrib/src/boost/mpl/aux_/preprocessed/dmc/or.hpp | 69 + .../mpl/aux_/preprocessed/dmc/placeholders.hpp | 105 + .../src/boost/mpl/aux_/preprocessed/dmc/plus.hpp | 146 + .../src/boost/mpl/aux_/preprocessed/dmc/quote.hpp | 123 + .../aux_/preprocessed/dmc/reverse_fold_impl.hpp | 231 + .../preprocessed/dmc/reverse_iter_fold_impl.hpp | 231 + .../src/boost/mpl/aux_/preprocessed/dmc/set.hpp | 323 + .../src/boost/mpl/aux_/preprocessed/dmc/set_c.hpp | 328 + .../boost/mpl/aux_/preprocessed/dmc/shift_left.hpp | 99 + .../mpl/aux_/preprocessed/dmc/shift_right.hpp | 99 + .../mpl/aux_/preprocessed/dmc/template_arity.hpp | 11 + .../src/boost/mpl/aux_/preprocessed/dmc/times.hpp | 146 + .../mpl/aux_/preprocessed/dmc/unpack_args.hpp | 94 + .../src/boost/mpl/aux_/preprocessed/dmc/vector.hpp | 323 + .../boost/mpl/aux_/preprocessed/dmc/vector_c.hpp | 309 + .../mpl/aux_/preprocessed/gcc/advance_backward.hpp | 97 + .../mpl/aux_/preprocessed/gcc/advance_forward.hpp | 97 + .../src/boost/mpl/aux_/preprocessed/gcc/and.hpp | 69 + .../src/boost/mpl/aux_/preprocessed/gcc/apply.hpp | 169 + .../boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp | 52 + .../boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp | 84 + .../src/boost/mpl/aux_/preprocessed/gcc/arg.hpp | 123 + .../boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp | 440 + .../src/boost/mpl/aux_/preprocessed/gcc/bind.hpp | 561 + .../boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp | 52 + .../src/boost/mpl/aux_/preprocessed/gcc/bitand.hpp | 147 + .../src/boost/mpl/aux_/preprocessed/gcc/bitor.hpp | 147 + .../src/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp | 147 + .../src/boost/mpl/aux_/preprocessed/gcc/deque.hpp | 323 + .../boost/mpl/aux_/preprocessed/gcc/divides.hpp | 146 + .../boost/mpl/aux_/preprocessed/gcc/equal_to.hpp | 94 + .../boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/gcc/full_lambda.hpp | 558 + .../boost/mpl/aux_/preprocessed/gcc/greater.hpp | 94 + .../mpl/aux_/preprocessed/gcc/greater_equal.hpp | 94 + .../boost/mpl/aux_/preprocessed/gcc/inherit.hpp | 141 + .../aux_/preprocessed/gcc/iter_fold_if_impl.hpp | 133 + .../mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp | 229 + .../src/boost/mpl/aux_/preprocessed/gcc/less.hpp | 94 + .../boost/mpl/aux_/preprocessed/gcc/less_equal.hpp | 94 + .../src/boost/mpl/aux_/preprocessed/gcc/list.hpp | 323 + .../src/boost/mpl/aux_/preprocessed/gcc/list_c.hpp | 328 + .../src/boost/mpl/aux_/preprocessed/gcc/map.hpp | 323 + .../src/boost/mpl/aux_/preprocessed/gcc/minus.hpp | 146 + .../boost/mpl/aux_/preprocessed/gcc/modulus.hpp | 101 + .../mpl/aux_/preprocessed/gcc/not_equal_to.hpp | 94 + contrib/src/boost/mpl/aux_/preprocessed/gcc/or.hpp | 69 + .../mpl/aux_/preprocessed/gcc/placeholders.hpp | 105 + .../src/boost/mpl/aux_/preprocessed/gcc/plus.hpp | 146 + .../src/boost/mpl/aux_/preprocessed/gcc/quote.hpp | 123 + .../aux_/preprocessed/gcc/reverse_fold_impl.hpp | 231 + .../preprocessed/gcc/reverse_iter_fold_impl.hpp | 231 + .../src/boost/mpl/aux_/preprocessed/gcc/set.hpp | 323 + .../src/boost/mpl/aux_/preprocessed/gcc/set_c.hpp | 328 + .../boost/mpl/aux_/preprocessed/gcc/shift_left.hpp | 99 + .../mpl/aux_/preprocessed/gcc/shift_right.hpp | 99 + .../mpl/aux_/preprocessed/gcc/template_arity.hpp | 97 + .../src/boost/mpl/aux_/preprocessed/gcc/times.hpp | 146 + .../mpl/aux_/preprocessed/gcc/unpack_args.hpp | 94 + .../src/boost/mpl/aux_/preprocessed/gcc/vector.hpp | 323 + .../boost/mpl/aux_/preprocessed/gcc/vector_c.hpp | 309 + .../aux_/preprocessed/msvc60/advance_backward.hpp | 132 + .../aux_/preprocessed/msvc60/advance_forward.hpp | 132 + .../src/boost/mpl/aux_/preprocessed/msvc60/and.hpp | 73 + .../boost/mpl/aux_/preprocessed/msvc60/apply.hpp | 166 + .../mpl/aux_/preprocessed/msvc60/apply_fwd.hpp | 46 + .../mpl/aux_/preprocessed/msvc60/apply_wrap.hpp | 247 + .../src/boost/mpl/aux_/preprocessed/msvc60/arg.hpp | 123 + .../mpl/aux_/preprocessed/msvc60/basic_bind.hpp | 328 + .../boost/mpl/aux_/preprocessed/msvc60/bind.hpp | 432 + .../mpl/aux_/preprocessed/msvc60/bind_fwd.hpp | 46 + .../boost/mpl/aux_/preprocessed/msvc60/bitand.hpp | 149 + .../boost/mpl/aux_/preprocessed/msvc60/bitor.hpp | 149 + .../boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp | 149 + .../boost/mpl/aux_/preprocessed/msvc60/deque.hpp | 556 + .../boost/mpl/aux_/preprocessed/msvc60/divides.hpp | 148 + .../mpl/aux_/preprocessed/msvc60/equal_to.hpp | 102 + .../mpl/aux_/preprocessed/msvc60/fold_impl.hpp | 293 + .../mpl/aux_/preprocessed/msvc60/full_lambda.hpp | 554 + .../boost/mpl/aux_/preprocessed/msvc60/greater.hpp | 102 + .../mpl/aux_/preprocessed/msvc60/greater_equal.hpp | 102 + .../boost/mpl/aux_/preprocessed/msvc60/inherit.hpp | 166 + .../aux_/preprocessed/msvc60/iter_fold_if_impl.hpp | 133 + .../aux_/preprocessed/msvc60/iter_fold_impl.hpp | 293 + .../aux_/preprocessed/msvc60/lambda_no_ctps.hpp | 229 + .../boost/mpl/aux_/preprocessed/msvc60/less.hpp | 102 + .../mpl/aux_/preprocessed/msvc60/less_equal.hpp | 102 + .../boost/mpl/aux_/preprocessed/msvc60/list.hpp | 556 + .../boost/mpl/aux_/preprocessed/msvc60/list_c.hpp | 534 + .../src/boost/mpl/aux_/preprocessed/msvc60/map.hpp | 556 + .../boost/mpl/aux_/preprocessed/msvc60/minus.hpp | 148 + .../boost/mpl/aux_/preprocessed/msvc60/modulus.hpp | 115 + .../mpl/aux_/preprocessed/msvc60/not_equal_to.hpp | 102 + .../src/boost/mpl/aux_/preprocessed/msvc60/or.hpp | 73 + .../mpl/aux_/preprocessed/msvc60/placeholders.hpp | 105 + .../boost/mpl/aux_/preprocessed/msvc60/plus.hpp | 148 + .../boost/mpl/aux_/preprocessed/msvc60/quote.hpp | 11 + .../aux_/preprocessed/msvc60/reverse_fold_impl.hpp | 343 + .../preprocessed/msvc60/reverse_iter_fold_impl.hpp | 343 + .../src/boost/mpl/aux_/preprocessed/msvc60/set.hpp | 556 + .../boost/mpl/aux_/preprocessed/msvc60/set_c.hpp | 534 + .../mpl/aux_/preprocessed/msvc60/shift_left.hpp | 114 + .../mpl/aux_/preprocessed/msvc60/shift_right.hpp | 114 + .../aux_/preprocessed/msvc60/template_arity.hpp | 46 + .../boost/mpl/aux_/preprocessed/msvc60/times.hpp | 148 + .../mpl/aux_/preprocessed/msvc60/unpack_args.hpp | 109 + .../boost/mpl/aux_/preprocessed/msvc60/vector.hpp | 556 + .../mpl/aux_/preprocessed/msvc60/vector_c.hpp | 534 + .../aux_/preprocessed/msvc70/advance_backward.hpp | 97 + .../aux_/preprocessed/msvc70/advance_forward.hpp | 97 + .../src/boost/mpl/aux_/preprocessed/msvc70/and.hpp | 71 + .../boost/mpl/aux_/preprocessed/msvc70/apply.hpp | 160 + .../mpl/aux_/preprocessed/msvc70/apply_fwd.hpp | 46 + .../mpl/aux_/preprocessed/msvc70/apply_wrap.hpp | 138 + .../src/boost/mpl/aux_/preprocessed/msvc70/arg.hpp | 123 + .../mpl/aux_/preprocessed/msvc70/basic_bind.hpp | 328 + .../boost/mpl/aux_/preprocessed/msvc70/bind.hpp | 432 + .../mpl/aux_/preprocessed/msvc70/bind_fwd.hpp | 46 + .../boost/mpl/aux_/preprocessed/msvc70/bitand.hpp | 151 + .../boost/mpl/aux_/preprocessed/msvc70/bitor.hpp | 151 + .../boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp | 151 + .../boost/mpl/aux_/preprocessed/msvc70/deque.hpp | 556 + .../boost/mpl/aux_/preprocessed/msvc70/divides.hpp | 150 + .../mpl/aux_/preprocessed/msvc70/equal_to.hpp | 102 + .../mpl/aux_/preprocessed/msvc70/fold_impl.hpp | 245 + .../mpl/aux_/preprocessed/msvc70/full_lambda.hpp | 554 + .../boost/mpl/aux_/preprocessed/msvc70/greater.hpp | 102 + .../mpl/aux_/preprocessed/msvc70/greater_equal.hpp | 102 + .../boost/mpl/aux_/preprocessed/msvc70/inherit.hpp | 166 + .../aux_/preprocessed/msvc70/iter_fold_if_impl.hpp | 133 + .../aux_/preprocessed/msvc70/iter_fold_impl.hpp | 245 + .../aux_/preprocessed/msvc70/lambda_no_ctps.hpp | 229 + .../boost/mpl/aux_/preprocessed/msvc70/less.hpp | 102 + .../mpl/aux_/preprocessed/msvc70/less_equal.hpp | 102 + .../boost/mpl/aux_/preprocessed/msvc70/list.hpp | 556 + .../boost/mpl/aux_/preprocessed/msvc70/list_c.hpp | 534 + .../src/boost/mpl/aux_/preprocessed/msvc70/map.hpp | 556 + .../boost/mpl/aux_/preprocessed/msvc70/minus.hpp | 150 + .../boost/mpl/aux_/preprocessed/msvc70/modulus.hpp | 115 + .../mpl/aux_/preprocessed/msvc70/not_equal_to.hpp | 102 + .../src/boost/mpl/aux_/preprocessed/msvc70/or.hpp | 71 + .../mpl/aux_/preprocessed/msvc70/placeholders.hpp | 105 + .../boost/mpl/aux_/preprocessed/msvc70/plus.hpp | 150 + .../boost/mpl/aux_/preprocessed/msvc70/quote.hpp | 116 + .../aux_/preprocessed/msvc70/reverse_fold_impl.hpp | 295 + .../preprocessed/msvc70/reverse_iter_fold_impl.hpp | 295 + .../src/boost/mpl/aux_/preprocessed/msvc70/set.hpp | 556 + .../boost/mpl/aux_/preprocessed/msvc70/set_c.hpp | 534 + .../mpl/aux_/preprocessed/msvc70/shift_left.hpp | 114 + .../mpl/aux_/preprocessed/msvc70/shift_right.hpp | 114 + .../aux_/preprocessed/msvc70/template_arity.hpp | 46 + .../boost/mpl/aux_/preprocessed/msvc70/times.hpp | 150 + .../mpl/aux_/preprocessed/msvc70/unpack_args.hpp | 109 + .../boost/mpl/aux_/preprocessed/msvc70/vector.hpp | 556 + .../mpl/aux_/preprocessed/msvc70/vector_c.hpp | 534 + .../aux_/preprocessed/mwcw/advance_backward.hpp | 97 + .../mpl/aux_/preprocessed/mwcw/advance_forward.hpp | 97 + .../src/boost/mpl/aux_/preprocessed/mwcw/and.hpp | 69 + .../src/boost/mpl/aux_/preprocessed/mwcw/apply.hpp | 169 + .../boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp | 52 + .../mpl/aux_/preprocessed/mwcw/apply_wrap.hpp | 456 + .../src/boost/mpl/aux_/preprocessed/mwcw/arg.hpp | 123 + .../mpl/aux_/preprocessed/mwcw/basic_bind.hpp | 440 + .../src/boost/mpl/aux_/preprocessed/mwcw/bind.hpp | 561 + .../boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp | 52 + .../boost/mpl/aux_/preprocessed/mwcw/bitand.hpp | 147 + .../src/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp | 147 + .../boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp | 147 + .../src/boost/mpl/aux_/preprocessed/mwcw/deque.hpp | 323 + .../boost/mpl/aux_/preprocessed/mwcw/divides.hpp | 146 + .../boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp | 94 + .../boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/mwcw/full_lambda.hpp | 554 + .../boost/mpl/aux_/preprocessed/mwcw/greater.hpp | 94 + .../mpl/aux_/preprocessed/mwcw/greater_equal.hpp | 94 + .../boost/mpl/aux_/preprocessed/mwcw/inherit.hpp | 141 + .../aux_/preprocessed/mwcw/iter_fold_if_impl.hpp | 133 + .../mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp | 229 + .../src/boost/mpl/aux_/preprocessed/mwcw/less.hpp | 94 + .../mpl/aux_/preprocessed/mwcw/less_equal.hpp | 94 + .../src/boost/mpl/aux_/preprocessed/mwcw/list.hpp | 323 + .../boost/mpl/aux_/preprocessed/mwcw/list_c.hpp | 328 + .../src/boost/mpl/aux_/preprocessed/mwcw/map.hpp | 323 + .../src/boost/mpl/aux_/preprocessed/mwcw/minus.hpp | 146 + .../boost/mpl/aux_/preprocessed/mwcw/modulus.hpp | 101 + .../mpl/aux_/preprocessed/mwcw/not_equal_to.hpp | 94 + .../src/boost/mpl/aux_/preprocessed/mwcw/or.hpp | 69 + .../mpl/aux_/preprocessed/mwcw/placeholders.hpp | 105 + .../src/boost/mpl/aux_/preprocessed/mwcw/plus.hpp | 146 + .../src/boost/mpl/aux_/preprocessed/mwcw/quote.hpp | 123 + .../aux_/preprocessed/mwcw/reverse_fold_impl.hpp | 231 + .../preprocessed/mwcw/reverse_iter_fold_impl.hpp | 231 + .../src/boost/mpl/aux_/preprocessed/mwcw/set.hpp | 323 + .../src/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp | 328 + .../mpl/aux_/preprocessed/mwcw/shift_left.hpp | 99 + .../mpl/aux_/preprocessed/mwcw/shift_right.hpp | 99 + .../mpl/aux_/preprocessed/mwcw/template_arity.hpp | 11 + .../src/boost/mpl/aux_/preprocessed/mwcw/times.hpp | 146 + .../mpl/aux_/preprocessed/mwcw/unpack_args.hpp | 94 + .../boost/mpl/aux_/preprocessed/mwcw/vector.hpp | 323 + .../boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp | 309 + .../aux_/preprocessed/no_ctps/advance_backward.hpp | 97 + .../aux_/preprocessed/no_ctps/advance_forward.hpp | 97 + .../boost/mpl/aux_/preprocessed/no_ctps/and.hpp | 73 + .../boost/mpl/aux_/preprocessed/no_ctps/apply.hpp | 268 + .../mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp | 50 + .../mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp | 78 + .../boost/mpl/aux_/preprocessed/no_ctps/arg.hpp | 123 + .../mpl/aux_/preprocessed/no_ctps/basic_bind.hpp | 486 + .../boost/mpl/aux_/preprocessed/no_ctps/bind.hpp | 590 + .../mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp | 52 + .../boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp | 134 + .../boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp | 134 + .../boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp | 134 + .../boost/mpl/aux_/preprocessed/no_ctps/deque.hpp | 556 + .../mpl/aux_/preprocessed/no_ctps/divides.hpp | 133 + .../mpl/aux_/preprocessed/no_ctps/equal_to.hpp | 94 + .../mpl/aux_/preprocessed/no_ctps/fold_impl.hpp | 245 + .../mpl/aux_/preprocessed/no_ctps/full_lambda.hpp | 554 + .../mpl/aux_/preprocessed/no_ctps/greater.hpp | 94 + .../aux_/preprocessed/no_ctps/greater_equal.hpp | 94 + .../mpl/aux_/preprocessed/no_ctps/inherit.hpp | 166 + .../preprocessed/no_ctps/iter_fold_if_impl.hpp | 133 + .../aux_/preprocessed/no_ctps/iter_fold_impl.hpp | 245 + .../aux_/preprocessed/no_ctps/lambda_no_ctps.hpp | 229 + .../boost/mpl/aux_/preprocessed/no_ctps/less.hpp | 94 + .../mpl/aux_/preprocessed/no_ctps/less_equal.hpp | 94 + .../boost/mpl/aux_/preprocessed/no_ctps/list.hpp | 556 + .../boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp | 534 + .../boost/mpl/aux_/preprocessed/no_ctps/map.hpp | 556 + .../boost/mpl/aux_/preprocessed/no_ctps/minus.hpp | 133 + .../mpl/aux_/preprocessed/no_ctps/modulus.hpp | 101 + .../mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp | 94 + .../src/boost/mpl/aux_/preprocessed/no_ctps/or.hpp | 73 + .../mpl/aux_/preprocessed/no_ctps/placeholders.hpp | 105 + .../boost/mpl/aux_/preprocessed/no_ctps/plus.hpp | 133 + .../boost/mpl/aux_/preprocessed/no_ctps/quote.hpp | 116 + .../preprocessed/no_ctps/reverse_fold_impl.hpp | 295 + .../no_ctps/reverse_iter_fold_impl.hpp | 295 + .../boost/mpl/aux_/preprocessed/no_ctps/set.hpp | 556 + .../boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp | 534 + .../mpl/aux_/preprocessed/no_ctps/shift_left.hpp | 99 + .../mpl/aux_/preprocessed/no_ctps/shift_right.hpp | 99 + .../aux_/preprocessed/no_ctps/template_arity.hpp | 40 + .../boost/mpl/aux_/preprocessed/no_ctps/times.hpp | 133 + .../mpl/aux_/preprocessed/no_ctps/unpack_args.hpp | 109 + .../boost/mpl/aux_/preprocessed/no_ctps/vector.hpp | 556 + .../mpl/aux_/preprocessed/no_ctps/vector_c.hpp | 534 + .../aux_/preprocessed/no_ttp/advance_backward.hpp | 97 + .../aux_/preprocessed/no_ttp/advance_forward.hpp | 97 + .../src/boost/mpl/aux_/preprocessed/no_ttp/and.hpp | 69 + .../boost/mpl/aux_/preprocessed/no_ttp/apply.hpp | 169 + .../mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp | 52 + .../mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp | 84 + .../src/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp | 123 + .../mpl/aux_/preprocessed/no_ttp/basic_bind.hpp | 369 + .../boost/mpl/aux_/preprocessed/no_ttp/bind.hpp | 466 + .../mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp | 52 + .../boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp | 157 + .../boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp | 157 + .../boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp | 157 + .../boost/mpl/aux_/preprocessed/no_ttp/deque.hpp | 323 + .../boost/mpl/aux_/preprocessed/no_ttp/divides.hpp | 156 + .../mpl/aux_/preprocessed/no_ttp/equal_to.hpp | 98 + .../mpl/aux_/preprocessed/no_ttp/fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/no_ttp/full_lambda.hpp | 554 + .../boost/mpl/aux_/preprocessed/no_ttp/greater.hpp | 98 + .../mpl/aux_/preprocessed/no_ttp/greater_equal.hpp | 98 + .../boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp | 141 + .../aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp | 133 + .../aux_/preprocessed/no_ttp/iter_fold_impl.hpp | 180 + .../aux_/preprocessed/no_ttp/lambda_no_ctps.hpp | 229 + .../boost/mpl/aux_/preprocessed/no_ttp/less.hpp | 98 + .../mpl/aux_/preprocessed/no_ttp/less_equal.hpp | 98 + .../boost/mpl/aux_/preprocessed/no_ttp/list.hpp | 323 + .../boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp | 328 + .../src/boost/mpl/aux_/preprocessed/no_ttp/map.hpp | 323 + .../boost/mpl/aux_/preprocessed/no_ttp/minus.hpp | 156 + .../boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp | 111 + .../mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp | 98 + .../src/boost/mpl/aux_/preprocessed/no_ttp/or.hpp | 69 + .../mpl/aux_/preprocessed/no_ttp/placeholders.hpp | 105 + .../boost/mpl/aux_/preprocessed/no_ttp/plus.hpp | 156 + .../boost/mpl/aux_/preprocessed/no_ttp/quote.hpp | 11 + .../aux_/preprocessed/no_ttp/reverse_fold_impl.hpp | 231 + .../preprocessed/no_ttp/reverse_iter_fold_impl.hpp | 231 + .../src/boost/mpl/aux_/preprocessed/no_ttp/set.hpp | 323 + .../boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp | 328 + .../mpl/aux_/preprocessed/no_ttp/shift_left.hpp | 110 + .../mpl/aux_/preprocessed/no_ttp/shift_right.hpp | 110 + .../aux_/preprocessed/no_ttp/template_arity.hpp | 40 + .../boost/mpl/aux_/preprocessed/no_ttp/times.hpp | 156 + .../mpl/aux_/preprocessed/no_ttp/unpack_args.hpp | 94 + .../boost/mpl/aux_/preprocessed/no_ttp/vector.hpp | 323 + .../mpl/aux_/preprocessed/no_ttp/vector_c.hpp | 309 + .../aux_/preprocessed/plain/advance_backward.hpp | 97 + .../aux_/preprocessed/plain/advance_forward.hpp | 97 + .../src/boost/mpl/aux_/preprocessed/plain/and.hpp | 64 + .../boost/mpl/aux_/preprocessed/plain/apply.hpp | 139 + .../mpl/aux_/preprocessed/plain/apply_fwd.hpp | 52 + .../mpl/aux_/preprocessed/plain/apply_wrap.hpp | 84 + .../src/boost/mpl/aux_/preprocessed/plain/arg.hpp | 123 + .../mpl/aux_/preprocessed/plain/basic_bind.hpp | 440 + .../src/boost/mpl/aux_/preprocessed/plain/bind.hpp | 561 + .../boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp | 52 + .../boost/mpl/aux_/preprocessed/plain/bitand.hpp | 142 + .../boost/mpl/aux_/preprocessed/plain/bitor.hpp | 142 + .../boost/mpl/aux_/preprocessed/plain/bitxor.hpp | 142 + .../boost/mpl/aux_/preprocessed/plain/deque.hpp | 323 + .../boost/mpl/aux_/preprocessed/plain/divides.hpp | 141 + .../boost/mpl/aux_/preprocessed/plain/equal_to.hpp | 92 + .../mpl/aux_/preprocessed/plain/fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/plain/full_lambda.hpp | 554 + .../boost/mpl/aux_/preprocessed/plain/greater.hpp | 92 + .../mpl/aux_/preprocessed/plain/greater_equal.hpp | 92 + .../boost/mpl/aux_/preprocessed/plain/inherit.hpp | 125 + .../aux_/preprocessed/plain/iter_fold_if_impl.hpp | 133 + .../mpl/aux_/preprocessed/plain/iter_fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp | 228 + .../src/boost/mpl/aux_/preprocessed/plain/less.hpp | 92 + .../mpl/aux_/preprocessed/plain/less_equal.hpp | 92 + .../src/boost/mpl/aux_/preprocessed/plain/list.hpp | 323 + .../boost/mpl/aux_/preprocessed/plain/list_c.hpp | 328 + .../src/boost/mpl/aux_/preprocessed/plain/map.hpp | 323 + .../boost/mpl/aux_/preprocessed/plain/minus.hpp | 141 + .../boost/mpl/aux_/preprocessed/plain/modulus.hpp | 99 + .../mpl/aux_/preprocessed/plain/not_equal_to.hpp | 92 + .../src/boost/mpl/aux_/preprocessed/plain/or.hpp | 64 + .../mpl/aux_/preprocessed/plain/placeholders.hpp | 105 + .../src/boost/mpl/aux_/preprocessed/plain/plus.hpp | 141 + .../boost/mpl/aux_/preprocessed/plain/quote.hpp | 123 + .../aux_/preprocessed/plain/reverse_fold_impl.hpp | 231 + .../preprocessed/plain/reverse_iter_fold_impl.hpp | 231 + .../src/boost/mpl/aux_/preprocessed/plain/set.hpp | 323 + .../boost/mpl/aux_/preprocessed/plain/set_c.hpp | 328 + .../mpl/aux_/preprocessed/plain/shift_left.hpp | 97 + .../mpl/aux_/preprocessed/plain/shift_right.hpp | 97 + .../mpl/aux_/preprocessed/plain/template_arity.hpp | 11 + .../boost/mpl/aux_/preprocessed/plain/times.hpp | 141 + .../mpl/aux_/preprocessed/plain/unpack_args.hpp | 94 + .../boost/mpl/aux_/preprocessed/plain/vector.hpp | 323 + .../boost/mpl/aux_/preprocessed/plain/vector_c.hpp | 309 + contrib/src/boost/mpl/aux_/preprocessor/add.hpp | 65 + .../mpl/aux_/preprocessor/def_params_tail.hpp | 105 + .../boost/mpl/aux_/preprocessor/default_params.hpp | 67 + contrib/src/boost/mpl/aux_/preprocessor/enum.hpp | 62 + .../src/boost/mpl/aux_/preprocessor/ext_params.hpp | 78 + .../boost/mpl/aux_/preprocessor/filter_params.hpp | 28 + contrib/src/boost/mpl/aux_/preprocessor/params.hpp | 65 + .../mpl/aux_/preprocessor/partial_spec_params.hpp | 32 + contrib/src/boost/mpl/aux_/preprocessor/range.hpp | 30 + contrib/src/boost/mpl/aux_/preprocessor/repeat.hpp | 51 + contrib/src/boost/mpl/aux_/preprocessor/sub.hpp | 65 + contrib/src/boost/mpl/aux_/preprocessor/tuple.hpp | 29 + contrib/src/boost/mpl/aux_/static_cast.hpp | 27 + contrib/src/boost/mpl/aux_/template_arity.hpp | 189 + contrib/src/boost/mpl/aux_/template_arity_fwd.hpp | 23 + contrib/src/boost/mpl/aux_/type_wrapper.hpp | 47 + contrib/src/boost/mpl/aux_/value_wknd.hpp | 89 + contrib/src/boost/mpl/aux_/yes_no.hpp | 58 + contrib/src/boost/mpl/bind.hpp | 551 + contrib/src/boost/mpl/bind_fwd.hpp | 99 + contrib/src/boost/mpl/bool.hpp | 39 + contrib/src/boost/mpl/bool_fwd.hpp | 33 + contrib/src/boost/mpl/eval_if.hpp | 71 + contrib/src/boost/mpl/has_xxx.hpp | 647 + contrib/src/boost/mpl/identity.hpp | 45 + contrib/src/boost/mpl/if.hpp | 135 + contrib/src/boost/mpl/int.hpp | 22 + contrib/src/boost/mpl/int_fwd.hpp | 27 + contrib/src/boost/mpl/integral_c_tag.hpp | 26 + contrib/src/boost/mpl/is_placeholder.hpp | 67 + contrib/src/boost/mpl/lambda.hpp | 29 + contrib/src/boost/mpl/lambda_fwd.hpp | 57 + contrib/src/boost/mpl/limits/arity.hpp | 21 + contrib/src/boost/mpl/logical.hpp | 21 + contrib/src/boost/mpl/next.hpp | 19 + contrib/src/boost/mpl/next_prior.hpp | 49 + contrib/src/boost/mpl/not.hpp | 51 + contrib/src/boost/mpl/or.hpp | 61 + contrib/src/boost/mpl/placeholders.hpp | 100 + contrib/src/boost/mpl/protect.hpp | 55 + contrib/src/boost/mpl/quote.hpp | 151 + contrib/src/boost/mpl/void.hpp | 76 + contrib/src/boost/mpl/void_fwd.hpp | 26 + contrib/src/boost/next_prior.hpp | 165 + contrib/src/boost/noncopyable.hpp | 17 + contrib/src/boost/pending/integer_log2.hpp | 9 + contrib/src/boost/pending/lowest_bit.hpp | 39 + contrib/src/boost/predef.h | 24 + contrib/src/boost/predef/architecture.h | 32 + contrib/src/boost/predef/architecture/alpha.h | 59 + contrib/src/boost/predef/architecture/arm.h | 70 + contrib/src/boost/predef/architecture/blackfin.h | 46 + contrib/src/boost/predef/architecture/convex.h | 65 + contrib/src/boost/predef/architecture/ia64.h | 49 + contrib/src/boost/predef/architecture/m68k.h | 82 + contrib/src/boost/predef/architecture/mips.h | 73 + contrib/src/boost/predef/architecture/parisc.h | 64 + contrib/src/boost/predef/architecture/ppc.h | 72 + contrib/src/boost/predef/architecture/pyramid.h | 42 + contrib/src/boost/predef/architecture/rs6k.h | 56 + contrib/src/boost/predef/architecture/sparc.h | 54 + contrib/src/boost/predef/architecture/superh.h | 67 + contrib/src/boost/predef/architecture/sys370.h | 43 + contrib/src/boost/predef/architecture/sys390.h | 43 + contrib/src/boost/predef/architecture/x86.h | 38 + contrib/src/boost/predef/architecture/x86/32.h | 87 + contrib/src/boost/predef/architecture/x86/64.h | 50 + contrib/src/boost/predef/architecture/z.h | 42 + contrib/src/boost/predef/compiler.h | 43 + contrib/src/boost/predef/compiler/borland.h | 63 + contrib/src/boost/predef/compiler/clang.h | 56 + contrib/src/boost/predef/compiler/comeau.h | 61 + contrib/src/boost/predef/compiler/compaq.h | 66 + contrib/src/boost/predef/compiler/diab.h | 56 + contrib/src/boost/predef/compiler/digitalmars.h | 56 + contrib/src/boost/predef/compiler/dignus.h | 56 + contrib/src/boost/predef/compiler/edg.h | 56 + contrib/src/boost/predef/compiler/ekopath.h | 57 + contrib/src/boost/predef/compiler/gcc.h | 68 + contrib/src/boost/predef/compiler/gcc_xml.h | 53 + contrib/src/boost/predef/compiler/greenhills.h | 66 + contrib/src/boost/predef/compiler/hp_acc.h | 61 + contrib/src/boost/predef/compiler/iar.h | 56 + contrib/src/boost/predef/compiler/ibm.h | 72 + contrib/src/boost/predef/compiler/intel.h | 65 + contrib/src/boost/predef/compiler/kai.h | 56 + contrib/src/boost/predef/compiler/llvm.h | 57 + contrib/src/boost/predef/compiler/metaware.h | 53 + contrib/src/boost/predef/compiler/metrowerks.h | 77 + contrib/src/boost/predef/compiler/microtec.h | 53 + contrib/src/boost/predef/compiler/mpw.h | 63 + contrib/src/boost/predef/compiler/palm.h | 56 + contrib/src/boost/predef/compiler/pgi.h | 60 + contrib/src/boost/predef/compiler/sgi_mipspro.h | 66 + contrib/src/boost/predef/compiler/sunpro.h | 76 + contrib/src/boost/predef/compiler/tendra.h | 53 + contrib/src/boost/predef/compiler/visualc.h | 91 + contrib/src/boost/predef/compiler/watcom.h | 56 + contrib/src/boost/predef/detail/_cassert.h | 17 + contrib/src/boost/predef/detail/_exception.h | 15 + contrib/src/boost/predef/detail/comp_detected.h | 10 + contrib/src/boost/predef/detail/os_detected.h | 10 + .../src/boost/predef/detail/platform_detected.h | 10 + contrib/src/boost/predef/detail/test.h | 17 + contrib/src/boost/predef/hardware.h | 16 + contrib/src/boost/predef/hardware/simd.h | 107 + contrib/src/boost/predef/hardware/simd/arm.h | 57 + .../src/boost/predef/hardware/simd/arm/versions.h | 32 + contrib/src/boost/predef/hardware/simd/ppc.h | 69 + .../src/boost/predef/hardware/simd/ppc/versions.h | 51 + contrib/src/boost/predef/hardware/simd/x86.h | 123 + .../src/boost/predef/hardware/simd/x86/versions.h | 129 + contrib/src/boost/predef/hardware/simd/x86_amd.h | 87 + .../boost/predef/hardware/simd/x86_amd/versions.h | 51 + contrib/src/boost/predef/language.h | 17 + contrib/src/boost/predef/language/objc.h | 42 + contrib/src/boost/predef/language/stdc.h | 53 + contrib/src/boost/predef/language/stdcpp.h | 121 + contrib/src/boost/predef/library.h | 16 + contrib/src/boost/predef/library/c.h | 20 + contrib/src/boost/predef/library/c/_prefix.h | 13 + contrib/src/boost/predef/library/c/gnu.h | 61 + contrib/src/boost/predef/library/c/uc.h | 47 + contrib/src/boost/predef/library/c/vms.h | 47 + contrib/src/boost/predef/library/c/zos.h | 56 + contrib/src/boost/predef/library/std.h | 25 + contrib/src/boost/predef/library/std/_prefix.h | 23 + contrib/src/boost/predef/library/std/cxx.h | 46 + contrib/src/boost/predef/library/std/dinkumware.h | 52 + contrib/src/boost/predef/library/std/libcomo.h | 47 + contrib/src/boost/predef/library/std/modena.h | 45 + contrib/src/boost/predef/library/std/msl.h | 53 + contrib/src/boost/predef/library/std/roguewave.h | 56 + contrib/src/boost/predef/library/std/sgi.h | 51 + contrib/src/boost/predef/library/std/stdcpp3.h | 53 + contrib/src/boost/predef/library/std/stlport.h | 59 + contrib/src/boost/predef/library/std/vacpp.h | 44 + contrib/src/boost/predef/make.h | 89 + contrib/src/boost/predef/os.h | 33 + contrib/src/boost/predef/os/aix.h | 66 + contrib/src/boost/predef/os/amigaos.h | 46 + contrib/src/boost/predef/os/android.h | 45 + contrib/src/boost/predef/os/beos.h | 45 + contrib/src/boost/predef/os/bsd.h | 103 + contrib/src/boost/predef/os/bsd/bsdi.h | 48 + contrib/src/boost/predef/os/bsd/dragonfly.h | 50 + contrib/src/boost/predef/os/bsd/free.h | 60 + contrib/src/boost/predef/os/bsd/net.h | 84 + contrib/src/boost/predef/os/bsd/open.h | 171 + contrib/src/boost/predef/os/cygwin.h | 45 + contrib/src/boost/predef/os/haiku.h | 46 + contrib/src/boost/predef/os/hpux.h | 47 + contrib/src/boost/predef/os/ios.h | 51 + contrib/src/boost/predef/os/irix.h | 46 + contrib/src/boost/predef/os/linux.h | 46 + contrib/src/boost/predef/os/macos.h | 65 + contrib/src/boost/predef/os/os400.h | 45 + contrib/src/boost/predef/os/qnxnto.h | 59 + contrib/src/boost/predef/os/solaris.h | 46 + contrib/src/boost/predef/os/unix.h | 76 + contrib/src/boost/predef/os/vms.h | 52 + contrib/src/boost/predef/os/windows.h | 51 + contrib/src/boost/predef/other.h | 16 + contrib/src/boost/predef/other/endian.h | 204 + contrib/src/boost/predef/platform.h | 21 + contrib/src/boost/predef/platform/mingw.h | 69 + .../src/boost/predef/platform/windows_desktop.h | 45 + contrib/src/boost/predef/platform/windows_phone.h | 43 + .../src/boost/predef/platform/windows_runtime.h | 45 + contrib/src/boost/predef/platform/windows_store.h | 43 + contrib/src/boost/predef/version.h | 15 + contrib/src/boost/predef/version_number.h | 53 + contrib/src/boost/preprocessor/arithmetic/add.hpp | 51 + contrib/src/boost/preprocessor/arithmetic/dec.hpp | 289 + .../preprocessor/arithmetic/detail/div_base.hpp | 61 + contrib/src/boost/preprocessor/arithmetic/inc.hpp | 288 + contrib/src/boost/preprocessor/arithmetic/mod.hpp | 39 + contrib/src/boost/preprocessor/arithmetic/sub.hpp | 50 + contrib/src/boost/preprocessor/array/data.hpp | 28 + contrib/src/boost/preprocessor/array/elem.hpp | 29 + contrib/src/boost/preprocessor/array/size.hpp | 28 + contrib/src/boost/preprocessor/cat.hpp | 35 + contrib/src/boost/preprocessor/comma_if.hpp | 17 + .../boost/preprocessor/comparison/less_equal.hpp | 39 + .../boost/preprocessor/comparison/not_equal.hpp | 814 + contrib/src/boost/preprocessor/config/config.hpp | 104 + .../src/boost/preprocessor/control/deduce_d.hpp | 22 + .../preprocessor/control/detail/dmc/while.hpp | 536 + .../preprocessor/control/detail/edg/while.hpp | 534 + .../preprocessor/control/detail/msvc/while.hpp | 277 + .../boost/preprocessor/control/detail/while.hpp | 536 + contrib/src/boost/preprocessor/control/expr_if.hpp | 30 + .../src/boost/preprocessor/control/expr_iif.hpp | 31 + contrib/src/boost/preprocessor/control/if.hpp | 30 + contrib/src/boost/preprocessor/control/iif.hpp | 34 + contrib/src/boost/preprocessor/control/while.hpp | 312 + contrib/src/boost/preprocessor/debug/error.hpp | 33 + contrib/src/boost/preprocessor/dec.hpp | 17 + contrib/src/boost/preprocessor/detail/auto_rec.hpp | 293 + contrib/src/boost/preprocessor/detail/check.hpp | 48 + .../src/boost/preprocessor/detail/dmc/auto_rec.hpp | 286 + .../src/boost/preprocessor/detail/is_binary.hpp | 30 + contrib/src/boost/preprocessor/detail/split.hpp | 35 + contrib/src/boost/preprocessor/empty.hpp | 17 + contrib/src/boost/preprocessor/enum.hpp | 17 + contrib/src/boost/preprocessor/enum_params.hpp | 17 + .../src/boost/preprocessor/enum_shifted_params.hpp | 17 + contrib/src/boost/preprocessor/expr_if.hpp | 17 + .../preprocessor/facilities/detail/is_empty.hpp | 55 + .../src/boost/preprocessor/facilities/empty.hpp | 23 + .../src/boost/preprocessor/facilities/expand.hpp | 28 + .../src/boost/preprocessor/facilities/identity.hpp | 27 + .../boost/preprocessor/facilities/intercept.hpp | 277 + contrib/src/boost/preprocessor/facilities/is_1.hpp | 23 + .../src/boost/preprocessor/facilities/is_empty.hpp | 56 + .../preprocessor/facilities/is_empty_variadic.hpp | 57 + .../src/boost/preprocessor/facilities/overload.hpp | 25 + contrib/src/boost/preprocessor/identity.hpp | 17 + contrib/src/boost/preprocessor/inc.hpp | 17 + contrib/src/boost/preprocessor/iterate.hpp | 17 + .../iteration/detail/bounds/lower1.hpp | 99 + .../iteration/detail/bounds/lower2.hpp | 99 + .../iteration/detail/bounds/lower3.hpp | 99 + .../iteration/detail/bounds/lower4.hpp | 99 + .../iteration/detail/bounds/lower5.hpp | 99 + .../iteration/detail/bounds/upper1.hpp | 99 + .../iteration/detail/bounds/upper2.hpp | 99 + .../iteration/detail/bounds/upper3.hpp | 99 + .../iteration/detail/bounds/upper4.hpp | 99 + .../iteration/detail/bounds/upper5.hpp | 99 + .../boost/preprocessor/iteration/detail/finish.hpp | 99 + .../iteration/detail/iter/forward1.hpp | 1342 + .../iteration/detail/iter/forward2.hpp | 1338 + .../iteration/detail/iter/forward3.hpp | 1338 + .../iteration/detail/iter/forward4.hpp | 1338 + .../iteration/detail/iter/forward5.hpp | 1338 + .../iteration/detail/iter/reverse1.hpp | 1296 + .../iteration/detail/iter/reverse2.hpp | 1296 + .../iteration/detail/iter/reverse3.hpp | 1296 + .../iteration/detail/iter/reverse4.hpp | 1296 + .../iteration/detail/iter/reverse5.hpp | 1296 + .../boost/preprocessor/iteration/detail/local.hpp | 812 + .../boost/preprocessor/iteration/detail/rlocal.hpp | 782 + .../boost/preprocessor/iteration/detail/self.hpp | 21 + .../boost/preprocessor/iteration/detail/start.hpp | 99 + .../src/boost/preprocessor/iteration/iterate.hpp | 82 + contrib/src/boost/preprocessor/iteration/local.hpp | 26 + contrib/src/boost/preprocessor/iteration/self.hpp | 19 + contrib/src/boost/preprocessor/list/adt.hpp | 73 + .../preprocessor/list/detail/dmc/fold_left.hpp | 279 + .../preprocessor/list/detail/edg/fold_left.hpp | 536 + .../preprocessor/list/detail/edg/fold_right.hpp | 794 + .../boost/preprocessor/list/detail/fold_left.hpp | 279 + .../boost/preprocessor/list/detail/fold_right.hpp | 277 + contrib/src/boost/preprocessor/list/fold_left.hpp | 303 + contrib/src/boost/preprocessor/list/fold_right.hpp | 40 + contrib/src/boost/preprocessor/list/for_each_i.hpp | 65 + contrib/src/boost/preprocessor/list/reverse.hpp | 40 + contrib/src/boost/preprocessor/logical/and.hpp | 30 + contrib/src/boost/preprocessor/logical/bitand.hpp | 38 + contrib/src/boost/preprocessor/logical/bool.hpp | 288 + contrib/src/boost/preprocessor/logical/compl.hpp | 36 + contrib/src/boost/preprocessor/logical/not.hpp | 30 + .../src/boost/preprocessor/punctuation/comma.hpp | 21 + .../boost/preprocessor/punctuation/comma_if.hpp | 31 + .../punctuation/detail/is_begin_parens.hpp | 48 + .../preprocessor/punctuation/is_begin_parens.hpp | 51 + contrib/src/boost/preprocessor/repeat.hpp | 17 + .../preprocessor/repetition/detail/dmc/for.hpp | 536 + .../preprocessor/repetition/detail/edg/for.hpp | 534 + .../boost/preprocessor/repetition/detail/for.hpp | 536 + .../preprocessor/repetition/detail/msvc/for.hpp | 277 + contrib/src/boost/preprocessor/repetition/enum.hpp | 66 + .../preprocessor/repetition/enum_binary_params.hpp | 54 + .../boost/preprocessor/repetition/enum_params.hpp | 41 + .../repetition/enum_shifted_params.hpp | 44 + .../repetition/enum_trailing_params.hpp | 38 + contrib/src/boost/preprocessor/repetition/for.hpp | 324 + .../src/boost/preprocessor/repetition/repeat.hpp | 825 + .../preprocessor/repetition/repeat_from_to.hpp | 87 + contrib/src/boost/preprocessor/seq/cat.hpp | 49 + .../src/boost/preprocessor/seq/detail/is_empty.hpp | 49 + .../src/boost/preprocessor/seq/detail/split.hpp | 284 + contrib/src/boost/preprocessor/seq/elem.hpp | 304 + contrib/src/boost/preprocessor/seq/enum.hpp | 288 + contrib/src/boost/preprocessor/seq/first_n.hpp | 30 + contrib/src/boost/preprocessor/seq/fold_left.hpp | 1070 + contrib/src/boost/preprocessor/seq/for_each_i.hpp | 109 + contrib/src/boost/preprocessor/seq/rest_n.hpp | 46 + contrib/src/boost/preprocessor/seq/seq.hpp | 44 + contrib/src/boost/preprocessor/seq/size.hpp | 548 + contrib/src/boost/preprocessor/seq/subseq.hpp | 28 + contrib/src/boost/preprocessor/seq/transform.hpp | 48 + .../src/boost/preprocessor/slot/detail/counter.hpp | 269 + contrib/src/boost/preprocessor/slot/detail/def.hpp | 49 + .../src/boost/preprocessor/slot/detail/shared.hpp | 247 + .../src/boost/preprocessor/slot/detail/slot1.hpp | 267 + .../src/boost/preprocessor/slot/detail/slot2.hpp | 267 + .../src/boost/preprocessor/slot/detail/slot3.hpp | 267 + .../src/boost/preprocessor/slot/detail/slot4.hpp | 267 + .../src/boost/preprocessor/slot/detail/slot5.hpp | 267 + contrib/src/boost/preprocessor/slot/slot.hpp | 32 + contrib/src/boost/preprocessor/stringize.hpp | 33 + .../preprocessor/tuple/detail/is_single_return.hpp | 28 + contrib/src/boost/preprocessor/tuple/eat.hpp | 115 + contrib/src/boost/preprocessor/tuple/elem.hpp | 201 + contrib/src/boost/preprocessor/tuple/rem.hpp | 149 + contrib/src/boost/preprocessor/tuple/size.hpp | 28 + contrib/src/boost/preprocessor/tuple/to_list.hpp | 118 + contrib/src/boost/preprocessor/variadic/elem.hpp | 94 + contrib/src/boost/preprocessor/variadic/size.hpp | 30 + contrib/src/boost/random/detail/config.hpp | 18 + contrib/src/boost/random/detail/const_mod.hpp | 216 + .../src/boost/random/detail/disable_warnings.hpp | 29 + .../src/boost/random/detail/enable_warnings.hpp | 22 + contrib/src/boost/random/detail/generator_bits.hpp | 36 + .../src/boost/random/detail/generator_seed_seq.hpp | 40 + contrib/src/boost/random/detail/integer_log2.hpp | 84 + .../src/boost/random/detail/large_arithmetic.hpp | 122 + contrib/src/boost/random/detail/operators.hpp | 84 + contrib/src/boost/random/detail/polynomial.hpp | 384 + contrib/src/boost/random/detail/ptr_helper.hpp | 67 + contrib/src/boost/random/detail/seed.hpp | 115 + contrib/src/boost/random/detail/seed_impl.hpp | 398 + .../boost/random/detail/signed_unsigned_tools.hpp | 89 + .../src/boost/random/detail/uniform_int_float.hpp | 76 + contrib/src/boost/random/mersenne_twister.hpp | 682 + contrib/src/boost/random/traits.hpp | 107 + contrib/src/boost/random/uniform_int.hpp | 99 + .../src/boost/random/uniform_int_distribution.hpp | 419 + contrib/src/boost/random/variate_generator.hpp | 122 + contrib/src/boost/range/algorithm/equal.hpp | 200 + contrib/src/boost/range/as_literal.hpp | 127 + contrib/src/boost/range/begin.hpp | 135 + contrib/src/boost/range/concepts.hpp | 386 + contrib/src/boost/range/config.hpp | 56 + contrib/src/boost/range/const_iterator.hpp | 76 + contrib/src/boost/range/detail/as_literal.hpp | 33 + contrib/src/boost/range/detail/begin.hpp | 83 + contrib/src/boost/range/detail/common.hpp | 118 + contrib/src/boost/range/detail/detail_str.hpp | 376 + contrib/src/boost/range/detail/end.hpp | 86 + .../boost/range/detail/extract_optional_type.hpp | 48 + contrib/src/boost/range/detail/has_member_size.hpp | 66 + .../src/boost/range/detail/implementation_help.hpp | 114 + contrib/src/boost/range/detail/misc_concept.hpp | 33 + .../range/detail/msvc_has_iterator_workaround.hpp | 132 + contrib/src/boost/range/detail/remove_extent.hpp | 157 + contrib/src/boost/range/detail/safe_bool.hpp | 72 + contrib/src/boost/range/detail/sfinae.hpp | 77 + contrib/src/boost/range/detail/size_type.hpp | 55 + contrib/src/boost/range/detail/str_types.hpp | 38 + contrib/src/boost/range/detail/value_type.hpp | 72 + contrib/src/boost/range/difference_type.hpp | 47 + contrib/src/boost/range/distance.hpp | 34 + contrib/src/boost/range/empty.hpp | 34 + contrib/src/boost/range/end.hpp | 128 + contrib/src/boost/range/functions.hpp | 27 + contrib/src/boost/range/has_range_iterator.hpp | 83 + contrib/src/boost/range/iterator.hpp | 74 + contrib/src/boost/range/iterator_range.hpp | 16 + contrib/src/boost/range/iterator_range_core.hpp | 883 + contrib/src/boost/range/iterator_range_io.hpp | 93 + contrib/src/boost/range/mutable_iterator.hpp | 79 + contrib/src/boost/range/range_fwd.hpp | 63 + contrib/src/boost/range/rbegin.hpp | 65 + contrib/src/boost/range/rend.hpp | 65 + contrib/src/boost/range/reverse_iterator.hpp | 42 + contrib/src/boost/range/size.hpp | 76 + contrib/src/boost/range/size_type.hpp | 95 + contrib/src/boost/range/value_type.hpp | 30 + contrib/src/boost/ref.hpp | 17 + contrib/src/boost/shared_ptr.hpp | 19 + contrib/src/boost/smart_ptr/bad_weak_ptr.hpp | 59 + .../boost/smart_ptr/detail/lightweight_mutex.hpp | 42 + contrib/src/boost/smart_ptr/detail/lwm_nop.hpp | 37 + .../src/boost/smart_ptr/detail/lwm_pthreads.hpp | 87 + .../src/boost/smart_ptr/detail/lwm_win32_cs.hpp | 119 + .../src/boost/smart_ptr/detail/operator_bool.hpp | 64 + .../src/boost/smart_ptr/detail/quick_allocator.hpp | 199 + .../src/boost/smart_ptr/detail/shared_count.hpp | 709 + .../src/boost/smart_ptr/detail/sp_convertible.hpp | 92 + .../src/boost/smart_ptr/detail/sp_counted_base.hpp | 93 + .../smart_ptr/detail/sp_counted_base_acc_ia64.hpp | 151 + .../boost/smart_ptr/detail/sp_counted_base_aix.hpp | 143 + .../smart_ptr/detail/sp_counted_base_clang.hpp | 140 + .../smart_ptr/detail/sp_counted_base_cw_ppc.hpp | 171 + .../smart_ptr/detail/sp_counted_base_gcc_ia64.hpp | 158 + .../smart_ptr/detail/sp_counted_base_gcc_mips.hpp | 182 + .../smart_ptr/detail/sp_counted_base_gcc_ppc.hpp | 182 + .../smart_ptr/detail/sp_counted_base_gcc_sparc.hpp | 167 + .../smart_ptr/detail/sp_counted_base_gcc_x86.hpp | 174 + .../boost/smart_ptr/detail/sp_counted_base_nt.hpp | 108 + .../boost/smart_ptr/detail/sp_counted_base_pt.hpp | 137 + .../smart_ptr/detail/sp_counted_base_snc_ps3.hpp | 162 + .../smart_ptr/detail/sp_counted_base_spin.hpp | 132 + .../detail/sp_counted_base_std_atomic.hpp | 137 + .../smart_ptr/detail/sp_counted_base_sync.hpp | 156 + .../smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp | 151 + .../boost/smart_ptr/detail/sp_counted_base_w32.hpp | 131 + .../src/boost/smart_ptr/detail/sp_counted_impl.hpp | 271 + .../smart_ptr/detail/sp_disable_deprecated.hpp | 40 + contrib/src/boost/smart_ptr/detail/sp_has_sync.hpp | 69 + .../src/boost/smart_ptr/detail/sp_interlocked.hpp | 163 + .../src/boost/smart_ptr/detail/sp_nullptr_t.hpp | 45 + contrib/src/boost/smart_ptr/detail/spinlock.hpp | 65 + .../boost/smart_ptr/detail/spinlock_gcc_arm.hpp | 121 + contrib/src/boost/smart_ptr/detail/spinlock_nt.hpp | 89 + .../src/boost/smart_ptr/detail/spinlock_pool.hpp | 91 + contrib/src/boost/smart_ptr/detail/spinlock_pt.hpp | 79 + .../boost/smart_ptr/detail/spinlock_std_atomic.hpp | 83 + .../src/boost/smart_ptr/detail/spinlock_sync.hpp | 87 + .../src/boost/smart_ptr/detail/spinlock_w32.hpp | 113 + contrib/src/boost/smart_ptr/detail/yield_k.hpp | 177 + contrib/src/boost/smart_ptr/shared_ptr.hpp | 1077 + contrib/src/boost/static_assert.hpp | 180 + contrib/src/boost/throw_exception.hpp | 102 + contrib/src/boost/type_traits/add_const.hpp | 46 + .../src/boost/type_traits/add_lvalue_reference.hpp | 27 + contrib/src/boost/type_traits/add_pointer.hpp | 61 + contrib/src/boost/type_traits/add_reference.hpp | 59 + .../src/boost/type_traits/add_rvalue_reference.hpp | 64 + contrib/src/boost/type_traits/add_volatile.hpp | 40 + contrib/src/boost/type_traits/alignment_of.hpp | 119 + contrib/src/boost/type_traits/composite_traits.hpp | 29 + contrib/src/boost/type_traits/conditional.hpp | 20 + .../src/boost/type_traits/conversion_traits.hpp | 17 + contrib/src/boost/type_traits/declval.hpp | 44 + contrib/src/boost/type_traits/detail/config.hpp | 72 + .../type_traits/detail/has_binary_operator.hpp | 222 + .../type_traits/detail/is_function_ptr_helper.hpp | 176 + .../type_traits/detail/is_function_ptr_tester.hpp | 449 + .../type_traits/detail/is_mem_fun_pointer_impl.hpp | 723 + .../detail/is_mem_fun_pointer_tester.hpp | 1800 + .../src/boost/type_traits/detail/yes_no_type.hpp | 26 + contrib/src/boost/type_traits/function_traits.hpp | 174 + contrib/src/boost/type_traits/has_minus.hpp | 60 + contrib/src/boost/type_traits/has_minus_assign.hpp | 65 + contrib/src/boost/type_traits/has_plus.hpp | 54 + contrib/src/boost/type_traits/has_plus_assign.hpp | 66 + contrib/src/boost/type_traits/has_trivial_copy.hpp | 62 + .../boost/type_traits/has_trivial_destructor.hpp | 48 + .../src/boost/type_traits/integral_constant.hpp | 106 + .../src/boost/type_traits/integral_promotion.hpp | 181 + contrib/src/boost/type_traits/intrinsics.hpp | 380 + contrib/src/boost/type_traits/is_abstract.hpp | 149 + contrib/src/boost/type_traits/is_arithmetic.hpp | 22 + contrib/src/boost/type_traits/is_array.hpp | 43 + .../src/boost/type_traits/is_base_and_derived.hpp | 244 + contrib/src/boost/type_traits/is_base_of.hpp | 39 + contrib/src/boost/type_traits/is_class.hpp | 114 + contrib/src/boost/type_traits/is_const.hpp | 46 + contrib/src/boost/type_traits/is_constructible.hpp | 80 + contrib/src/boost/type_traits/is_convertible.hpp | 488 + .../boost/type_traits/is_copy_constructible.hpp | 187 + .../boost/type_traits/is_default_constructible.hpp | 64 + contrib/src/boost/type_traits/is_destructible.hpp | 60 + contrib/src/boost/type_traits/is_enum.hpp | 166 + .../src/boost/type_traits/is_floating_point.hpp | 30 + contrib/src/boost/type_traits/is_function.hpp | 102 + contrib/src/boost/type_traits/is_fundamental.hpp | 26 + contrib/src/boost/type_traits/is_integral.hpp | 89 + .../src/boost/type_traits/is_lvalue_reference.hpp | 50 + .../type_traits/is_member_function_pointer.hpp | 120 + .../src/boost/type_traits/is_member_pointer.hpp | 45 + contrib/src/boost/type_traits/is_pod.hpp | 58 + contrib/src/boost/type_traits/is_pointer.hpp | 47 + contrib/src/boost/type_traits/is_polymorphic.hpp | 122 + contrib/src/boost/type_traits/is_reference.hpp | 30 + .../src/boost/type_traits/is_rvalue_reference.hpp | 25 + contrib/src/boost/type_traits/is_same.hpp | 41 + contrib/src/boost/type_traits/is_scalar.hpp | 27 + contrib/src/boost/type_traits/is_signed.hpp | 163 + contrib/src/boost/type_traits/is_union.hpp | 31 + contrib/src/boost/type_traits/is_unsigned.hpp | 163 + contrib/src/boost/type_traits/is_void.hpp | 26 + contrib/src/boost/type_traits/is_volatile.hpp | 45 + contrib/src/boost/type_traits/make_signed.hpp | 131 + contrib/src/boost/type_traits/make_unsigned.hpp | 130 + contrib/src/boost/type_traits/remove_const.hpp | 33 + contrib/src/boost/type_traits/remove_cv.hpp | 40 + contrib/src/boost/type_traits/remove_pointer.hpp | 77 + contrib/src/boost/type_traits/remove_reference.hpp | 54 + .../src/boost/type_traits/type_with_alignment.hpp | 261 + contrib/src/boost/utility.hpp | 21 + contrib/src/boost/utility/addressof.hpp | 17 + contrib/src/boost/utility/base_from_member.hpp | 171 + contrib/src/boost/utility/binary.hpp | 708 + contrib/src/boost/utility/declval.hpp | 13 + .../src/boost/utility/detail/result_of_iterate.hpp | 221 + contrib/src/boost/utility/enable_if.hpp | 17 + contrib/src/boost/utility/identity_type.hpp | 46 + contrib/src/boost/utility/result_of.hpp | 210 + contrib/src/boost/uuid/detail/config.hpp | 74 + contrib/src/boost/uuid/detail/uuid_generic.hpp | 51 + contrib/src/boost/uuid/detail/uuid_x86.hpp | 135 + contrib/src/boost/uuid/name_generator.hpp | 125 + contrib/src/boost/uuid/nil_generator.hpp | 34 + contrib/src/boost/uuid/random_generator.hpp | 119 + contrib/src/boost/uuid/seed_rng.hpp | 317 + contrib/src/boost/uuid/sha1.hpp | 231 + contrib/src/boost/uuid/string_generator.hpp | 185 + contrib/src/boost/uuid/uuid.hpp | 212 + contrib/src/boost/uuid/uuid_generators.hpp | 19 + contrib/src/boost/uuid/uuid_io.hpp | 198 + contrib/src/boost/version.hpp | 32 + contrib/src/easylogging++.h | 6667 ++++ contrib/src/inttypes/inttypes.h | 305 - contrib/src/inttypes/stdint.h | 247 - contrib/src/jsmn/jsmn_test.c | 364 - contrib/src/swi-pl/SWI-cpp.h | 1099 - docs/BUILDING.md | 467 - docs/COMPARISON.md | 89 - docs/CentOS.txt | 47 - docs/EXTENSIONS.md | 185 - docs/GETTING_STARTED.md | 132 - docs/ISSUES.md | 62 - docs/NATIVE_CODE.md | 204 - docs/OVERVIEW.md | 48 - docs/PUBLICATIONS.md | 83 - docs/Performance_Microstep.png | Bin 115802 -> 0 bytes docs/Ubuntu-LTS.txt | 55 - embedding/csharp/uSCXMLEmbedding.sln | 20 - embedding/csharp/uSCXMLEmbedding.suo | Bin 38912 -> 0 bytes embedding/csharp/uSCXMLEmbedding/Examples.csproj | 66 - .../uSCXMLEmbedding/Extensions/CustomDataModel.cs | 93 - .../Extensions/CustomExecutableContent.cs | 35 - .../uSCXMLEmbedding/Extensions/CustomIOProc.cs | 65 - .../Extensions/CustomInterpreterMonitor.cs | 31 - .../uSCXMLEmbedding/Extensions/CustomInvoker.cs | 69 - .../uSCXMLEmbedding/Properties/AssemblyInfo.cs | 36 - embedding/csharp/uSCXMLEmbedding/RunTests.cs | 314 - embedding/java/.classpath | 8 - embedding/java/.gitignore | 1 - embedding/java/.project | 17 - embedding/java/lib/js.jar | Bin 1134765 -> 0 bytes .../org/uscxml/datamodel/ecmascript/ECMAData.java | 110 - .../org/uscxml/datamodel/ecmascript/ECMAEvent.java | 125 - .../datamodel/ecmascript/ECMAScriptDataModel.java | 394 - embedding/java/src/org/uscxml/tests/TestData.java | 84 - .../java/src/org/uscxml/tests/TestExceptions.java | 36 - .../java/src/org/uscxml/tests/TestLifecycle.java | 124 - .../java/src/org/uscxml/tests/TestValidation.java | 33 - .../src/org/uscxml/tests/datamodel/TestData.json | 10 - .../src/org/uscxml/tests/datamodel/TestData.xml | 7 - .../tests/datamodel/TestDataModelAccess.java | 89 - .../tests/datamodel/TestJavaScriptDataModel.java | 27 - .../tests/datamodel/TestPlatformExtensions.java | 59 - .../org/uscxml/tests/datamodel/TestW3CECMA.java | 41 - .../tests/execContent/TestCustomExecContent.java | 81 - .../tests/invoker/adhoc/TestAdhocInvoker.java | 86 - .../tests/invoker/factory/TestCustomInvoker.java | 92 - .../invoker/factory/vxml/TestVoiceXMLInvoker.java | 22 - .../tests/ioprocessor/adhoc/TestAdhocIOProc.java | 142 - .../ioprocessor/adhoc/console/ConsoleFrame.java | 79 - .../ioprocessor/adhoc/console/ConsoleIOProc.java | 84 - .../ioprocessor/factory/TestCustomIOProc.java | 143 - .../uscxml/tests/monitor/TestCustomMonitor.java | 51 - installer/description.txt | 7 - installer/license.txt | 36 - installer/nsis/uscxml-logo.bmp | Bin 25818 -> 0 bytes installer/packageMaker/readme.txt | 2 - installer/packageMaker/welcome.txt | 3 - src/bindings/CMakeLists.txt | 46 - src/bindings/swig/csharp/CMakeLists.txt | 88 - .../swig/csharp/org/uscxml/InterpreterException.cs | 7 - src/bindings/swig/csharp/uscxml.i | 429 - src/bindings/swig/java/CMakeLists.txt | 78 - .../swig/java/org/uscxml/InterpreterException.java | 9 - src/bindings/swig/java/uscxml.i | 448 - src/bindings/swig/msvc/inttypes.h | 304 - src/bindings/swig/php/CMakeLists.txt | 100 - src/bindings/swig/php/test.php | 85 - src/bindings/swig/php/uscxml.i | 406 - src/bindings/swig/php/uscxmlNativePHP.php | 3121 -- src/bindings/swig/stl_list.i | 49 - src/bindings/swig/stl_set.i | 73 - src/bindings/swig/uscxml_beautify.i | 153 - src/bindings/swig/uscxml_ignores.i | 228 - src/bindings/swig/wrapped/WrappedDataModel.cpp | 30 - src/bindings/swig/wrapped/WrappedDataModel.h | 193 - .../swig/wrapped/WrappedExecutableContent.cpp | 27 - .../swig/wrapped/WrappedExecutableContent.h | 87 - src/bindings/swig/wrapped/WrappedIOProcessor.cpp | 27 - src/bindings/swig/wrapped/WrappedIOProcessor.h | 71 - .../swig/wrapped/WrappedInterpreterMonitor.cpp | 27 - .../swig/wrapped/WrappedInterpreterMonitor.h | 226 - src/bindings/swig/wrapped/WrappedInvoker.cpp | 27 - src/bindings/swig/wrapped/WrappedInvoker.h | 75 - src/uscxml.h | 25 - src/uscxml/CMakeLists.txt | 134 +- src/uscxml/Common.h | 55 +- src/uscxml/Convenience.cpp | 177 - src/uscxml/Convenience.h | 230 - src/uscxml/Factory.cpp | 756 - src/uscxml/Factory.h | 104 - src/uscxml/Interpreter.cpp | 3673 +- src/uscxml/Interpreter.h | 877 +- src/uscxml/InterpreterInfo.h | 103 - src/uscxml/Message.h | 30 - src/uscxml/URL.cpp | 917 - src/uscxml/URL.h | 336 - src/uscxml/URL.mm | 49 - src/uscxml/UUID.cpp | 70 - src/uscxml/UUID.h | 39 - src/uscxml/concurrency/BlockingQueue.h | 79 - src/uscxml/concurrency/DelayedEventQueue.cpp | 166 - src/uscxml/concurrency/DelayedEventQueue.h | 86 - src/uscxml/concurrency/EventBase.cpp | 74 - src/uscxml/concurrency/EventBase.h | 61 - src/uscxml/concurrency/Timer.cpp | 115 - src/uscxml/concurrency/Timer.h | 74 - src/uscxml/concurrency/tinythread.cpp | 335 - src/uscxml/concurrency/tinythread.h | 726 - src/uscxml/debug/Breakpoint.cpp | 266 - src/uscxml/debug/Breakpoint.h | 95 - src/uscxml/debug/Complexity.cpp | 206 - src/uscxml/debug/Complexity.h | 78 - src/uscxml/debug/DebugSession.cpp | 378 - src/uscxml/debug/DebugSession.h | 99 - src/uscxml/debug/Debugger.cpp | 256 - src/uscxml/debug/Debugger.h | 105 - src/uscxml/debug/DebuggerServlet.cpp | 262 - src/uscxml/debug/DebuggerServlet.h | 106 - src/uscxml/debug/InterpreterIssue.cpp | 601 +- src/uscxml/debug/InterpreterIssue.h | 8 +- src/uscxml/debug/SCXMLDotWriter.cpp | 888 - src/uscxml/debug/SCXMLDotWriter.h | 201 - src/uscxml/dom/DOMUtils.cpp | 288 - src/uscxml/dom/DOMUtils.h | 111 - src/uscxml/dom/NameSpacingParser.cpp | 71 - src/uscxml/dom/NameSpacingParser.h | 67 - src/uscxml/interpreter/ContentExecutorImpl.cpp | 649 + src/uscxml/interpreter/ContentExecutorImpl.h | 143 + src/uscxml/interpreter/EventQueueImpl.cpp | 189 + src/uscxml/interpreter/EventQueueImpl.h | 125 + src/uscxml/interpreter/InterpreterDraft6.cpp | 573 - src/uscxml/interpreter/InterpreterDraft6.h | 56 - src/uscxml/interpreter/InterpreterFast.cpp | 42 - src/uscxml/interpreter/InterpreterFast.h | 47 - src/uscxml/interpreter/InterpreterImpl.cpp | 361 + src/uscxml/interpreter/InterpreterImpl.h | 290 + src/uscxml/interpreter/InterpreterMonitor.h | 95 + src/uscxml/interpreter/InterpreterRC.cpp | 661 - src/uscxml/interpreter/InterpreterRC.h | 68 - src/uscxml/interpreter/MicroStepFast.cpp | 1149 + src/uscxml/interpreter/MicroStepFast.h | 127 + src/uscxml/interpreter/MicroStepImpl.h | 127 + src/uscxml/messages/Blob.h | 33 +- src/uscxml/messages/Data.cpp | 115 +- src/uscxml/messages/Data.h | 88 +- src/uscxml/messages/Event.cpp | 107 +- src/uscxml/messages/Event.h | 145 +- src/uscxml/messages/InvokeRequest.cpp | 93 - src/uscxml/messages/InvokeRequest.h | 73 - src/uscxml/messages/MMIMessages.cpp | 549 - src/uscxml/messages/MMIMessages.h | 414 - src/uscxml/messages/SendRequest.cpp | 135 - src/uscxml/messages/SendRequest.h | 73 - src/uscxml/pch.h | 33 - src/uscxml/plugins/DataModel.h | 107 +- src/uscxml/plugins/EventHandler.h | 76 +- src/uscxml/plugins/ExecutableContent.h | 18 +- src/uscxml/plugins/Factory.cpp | 476 + src/uscxml/plugins/Factory.h | 102 + src/uscxml/plugins/IOProcessor.h | 39 +- src/uscxml/plugins/Invoker.h | 67 +- src/uscxml/plugins/Plugins.cpp | 31 - src/uscxml/plugins/Plugins.h | 37 - src/uscxml/plugins/Pluma/Config.hpp | 141 - src/uscxml/plugins/Pluma/Connector.hpp | 86 - src/uscxml/plugins/Pluma/DLibrary.cpp | 105 - src/uscxml/plugins/Pluma/DLibrary.hpp | 123 - src/uscxml/plugins/Pluma/Dir.cpp | 103 - src/uscxml/plugins/Pluma/Dir.hpp | 64 - src/uscxml/plugins/Pluma/Host.cpp | 179 - src/uscxml/plugins/Pluma/Host.hpp | 212 - src/uscxml/plugins/Pluma/PluginManager.cpp | 201 - src/uscxml/plugins/Pluma/PluginManager.hpp | 245 - src/uscxml/plugins/Pluma/Pluma.hpp | 171 - src/uscxml/plugins/Pluma/Pluma.inl | 52 - src/uscxml/plugins/Pluma/Provider.cpp | 52 - src/uscxml/plugins/Pluma/Provider.hpp | 204 - src/uscxml/plugins/Pluma/uce-dirent.h | 671 - src/uscxml/plugins/datamodel/CMakeLists.txt | 274 +- .../datamodel/common/bindings/dom/defines.i | 247 + .../plugins/datamodel/common/bindings/dom/dom.i | 125 + .../plugins/datamodel/common/bindings/dom/ignore.i | 392 + .../common/bindings/dom/typemaps-general.i | 169 + .../plugins/datamodel/common/bindings/event.i | 22 + .../datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp | 42 - .../ecmascript/JavaScriptCore/JSCDOM.cpp.inc | 9576 ++++++ .../datamodel/ecmascript/JavaScriptCore/JSCDOM.h | 60 - .../ecmascript/JavaScriptCore/JSCDataModel.cpp | 477 +- .../ecmascript/JavaScriptCore/JSCDataModel.h | 30 +- .../datamodel/ecmascript/JavaScriptCore/bindings.i | 46 + .../JavaScriptCore/dom/JSCArrayBuffer.cpp | 209 - .../ecmascript/JavaScriptCore/dom/JSCArrayBuffer.h | 77 - .../JavaScriptCore/dom/JSCArrayBufferView.cpp | 71 - .../JavaScriptCore/dom/JSCArrayBufferView.h | 71 - .../ecmascript/JavaScriptCore/dom/JSCAttr.cpp | 101 - .../ecmascript/JavaScriptCore/dom/JSCAttr.h | 74 - .../JavaScriptCore/dom/JSCCDATASection.cpp | 37 - .../JavaScriptCore/dom/JSCCDATASection.h | 69 - .../JavaScriptCore/dom/JSCCharacterData.cpp | 214 - .../JavaScriptCore/dom/JSCCharacterData.h | 77 - .../ecmascript/JavaScriptCore/dom/JSCComment.cpp | 37 - .../ecmascript/JavaScriptCore/dom/JSCComment.h | 69 - .../JavaScriptCore/dom/JSCDOMImplementation.cpp | 177 - .../JavaScriptCore/dom/JSCDOMImplementation.h | 70 - .../ecmascript/JavaScriptCore/dom/JSCDataView.cpp | 583 - .../ecmascript/JavaScriptCore/dom/JSCDataView.h | 88 - .../ecmascript/JavaScriptCore/dom/JSCDocument.cpp | 542 - .../ecmascript/JavaScriptCore/dom/JSCDocument.h | 88 - .../JavaScriptCore/dom/JSCDocumentCustom.cpp | 248 - .../JavaScriptCore/dom/JSCDocumentFragment.cpp | 37 - .../JavaScriptCore/dom/JSCDocumentFragment.h | 69 - .../JavaScriptCore/dom/JSCDocumentType.cpp | 118 - .../JavaScriptCore/dom/JSCDocumentType.h | 75 - .../ecmascript/JavaScriptCore/dom/JSCElement.cpp | 589 - .../ecmascript/JavaScriptCore/dom/JSCElement.h | 85 - .../ecmascript/JavaScriptCore/dom/JSCEntity.cpp | 70 - .../ecmascript/JavaScriptCore/dom/JSCEntity.h | 72 - .../JavaScriptCore/dom/JSCEntityReference.cpp | 37 - .../JavaScriptCore/dom/JSCEntityReference.h | 69 - .../JavaScriptCore/dom/JSCFloat32Array.cpp | 275 - .../JavaScriptCore/dom/JSCFloat32Array.h | 83 - .../JavaScriptCore/dom/JSCFloat64Array.cpp | 275 - .../JavaScriptCore/dom/JSCFloat64Array.h | 83 - .../JavaScriptCore/dom/JSCInt16Array.cpp | 275 - .../ecmascript/JavaScriptCore/dom/JSCInt16Array.h | 83 - .../JavaScriptCore/dom/JSCInt32Array.cpp | 275 - .../ecmascript/JavaScriptCore/dom/JSCInt32Array.h | 83 - .../ecmascript/JavaScriptCore/dom/JSCInt8Array.cpp | 275 - .../ecmascript/JavaScriptCore/dom/JSCInt8Array.h | 83 - .../JavaScriptCore/dom/JSCNamedNodeMap.cpp | 294 - .../JavaScriptCore/dom/JSCNamedNodeMap.h | 75 - .../ecmascript/JavaScriptCore/dom/JSCNode.cpp | 565 - .../ecmascript/JavaScriptCore/dom/JSCNode.h | 104 - .../JavaScriptCore/dom/JSCNodeCustom.cpp | 48 - .../ecmascript/JavaScriptCore/dom/JSCNodeList.cpp | 74 - .../ecmascript/JavaScriptCore/dom/JSCNodeList.h | 73 - .../JavaScriptCore/dom/JSCNodeListCustom.cpp | 99 - .../ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp | 72 - .../ecmascript/JavaScriptCore/dom/JSCNodeSet.h | 74 - .../JavaScriptCore/dom/JSCNodeSetCustom.cpp | 100 - .../ecmascript/JavaScriptCore/dom/JSCNotation.cpp | 59 - .../ecmascript/JavaScriptCore/dom/JSCNotation.h | 71 - .../dom/JSCProcessingInstruction.cpp | 74 - .../JavaScriptCore/dom/JSCProcessingInstruction.h | 72 - .../JavaScriptCore/dom/JSCSCXMLEvent.cpp | 135 - .../ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.h | 78 - .../JavaScriptCore/dom/JSCSCXMLEventCustom.cpp | 64 - .../ecmascript/JavaScriptCore/dom/JSCStorage.cpp | 186 - .../ecmascript/JavaScriptCore/dom/JSCStorage.h | 73 - .../ecmascript/JavaScriptCore/dom/JSCText.cpp | 66 - .../ecmascript/JavaScriptCore/dom/JSCText.h | 70 - .../JavaScriptCore/dom/JSCTypedArrayCustom.cpp | 250 - .../JavaScriptCore/dom/JSCUint16Array.cpp | 275 - .../ecmascript/JavaScriptCore/dom/JSCUint16Array.h | 83 - .../JavaScriptCore/dom/JSCUint32Array.cpp | 275 - .../ecmascript/JavaScriptCore/dom/JSCUint32Array.h | 83 - .../JavaScriptCore/dom/JSCUint8Array.cpp | 275 - .../ecmascript/JavaScriptCore/dom/JSCUint8Array.h | 83 - .../JavaScriptCore/dom/JSCUint8ClampedArray.cpp | 275 - .../JavaScriptCore/dom/JSCUint8ClampedArray.h | 83 - .../JavaScriptCore/dom/JSCXPathResult.cpp | 154 - .../ecmascript/JavaScriptCore/dom/JSCXPathResult.h | 75 - .../JavaScriptCore/dom/JSCXPathResultCustom.cpp | 46 - .../SpiderMonkey/SpiderMonkeyDataModel.cpp | 227 - .../SpiderMonkey/SpiderMonkeyDataModel.h | 105 - .../plugins/datamodel/ecmascript/Storage.cpp | 95 - src/uscxml/plugins/datamodel/ecmascript/Storage.h | 47 - .../plugins/datamodel/ecmascript/TypedArray.cpp | 283 - .../plugins/datamodel/ecmascript/TypedArray.h | 463 - .../plugins/datamodel/ecmascript/v8/V8DOM.cpp | 41 - .../plugins/datamodel/ecmascript/v8/V8DOM.cpp.inc | 9365 ++++++ src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h | 106 - .../datamodel/ecmascript/v8/V8DataModel.cpp | 797 +- .../plugins/datamodel/ecmascript/v8/V8DataModel.h | 95 +- .../plugins/datamodel/ecmascript/v8/bindings.i | 45 + .../datamodel/ecmascript/v8/dom/V8ArrayBuffer.cpp | 176 - .../datamodel/ecmascript/v8/dom/V8ArrayBuffer.h | 102 - .../ecmascript/v8/dom/V8ArrayBufferView.cpp | 66 - .../ecmascript/v8/dom/V8ArrayBufferView.h | 82 - .../plugins/datamodel/ecmascript/v8/dom/V8Attr.cpp | 81 - .../plugins/datamodel/ecmascript/v8/dom/V8Attr.h | 87 - .../datamodel/ecmascript/v8/dom/V8CDATASection.cpp | 32 - .../datamodel/ecmascript/v8/dom/V8CDATASection.h | 74 - .../ecmascript/v8/dom/V8CharacterData.cpp | 148 - .../datamodel/ecmascript/v8/dom/V8CharacterData.h | 96 - .../datamodel/ecmascript/v8/dom/V8Comment.cpp | 32 - .../datamodel/ecmascript/v8/dom/V8Comment.h | 74 - .../ecmascript/v8/dom/V8DOMImplementation.cpp | 114 - .../ecmascript/v8/dom/V8DOMImplementation.h | 81 - .../datamodel/ecmascript/v8/dom/V8DataView.cpp | 490 - .../datamodel/ecmascript/v8/dom/V8DataView.h | 133 - .../datamodel/ecmascript/v8/dom/V8Document.cpp | 431 - .../datamodel/ecmascript/v8/dom/V8Document.h | 131 - .../ecmascript/v8/dom/V8DocumentCustom.cpp | 152 - .../ecmascript/v8/dom/V8DocumentFragment.cpp | 32 - .../ecmascript/v8/dom/V8DocumentFragment.h | 74 - .../datamodel/ecmascript/v8/dom/V8DocumentType.cpp | 101 - .../datamodel/ecmascript/v8/dom/V8DocumentType.h | 92 - .../datamodel/ecmascript/v8/dom/V8Element.cpp | 382 - .../datamodel/ecmascript/v8/dom/V8Element.h | 122 - .../datamodel/ecmascript/v8/dom/V8Entity.cpp | 53 - .../plugins/datamodel/ecmascript/v8/dom/V8Entity.h | 83 - .../ecmascript/v8/dom/V8EntityReference.cpp | 32 - .../ecmascript/v8/dom/V8EntityReference.h | 74 - .../datamodel/ecmascript/v8/dom/V8Float32Array.cpp | 233 - .../datamodel/ecmascript/v8/dom/V8Float32Array.h | 102 - .../datamodel/ecmascript/v8/dom/V8Float64Array.cpp | 233 - .../datamodel/ecmascript/v8/dom/V8Float64Array.h | 102 - .../datamodel/ecmascript/v8/dom/V8Int16Array.cpp | 233 - .../datamodel/ecmascript/v8/dom/V8Int16Array.h | 102 - .../datamodel/ecmascript/v8/dom/V8Int32Array.cpp | 233 - .../datamodel/ecmascript/v8/dom/V8Int32Array.h | 102 - .../datamodel/ecmascript/v8/dom/V8Int8Array.cpp | 233 - .../datamodel/ecmascript/v8/dom/V8Int8Array.h | 102 - .../datamodel/ecmascript/v8/dom/V8NamedNodeMap.cpp | 232 - .../datamodel/ecmascript/v8/dom/V8NamedNodeMap.h | 96 - .../plugins/datamodel/ecmascript/v8/dom/V8Node.cpp | 432 - .../plugins/datamodel/ecmascript/v8/dom/V8Node.h | 167 - .../datamodel/ecmascript/v8/dom/V8NodeCustom.cpp | 50 - .../datamodel/ecmascript/v8/dom/V8NodeList.cpp | 66 - .../datamodel/ecmascript/v8/dom/V8NodeList.h | 80 - .../ecmascript/v8/dom/V8NodeListCustom.cpp | 71 - .../datamodel/ecmascript/v8/dom/V8NodeSet.cpp | 60 - .../datamodel/ecmascript/v8/dom/V8NodeSet.h | 83 - .../ecmascript/v8/dom/V8NodeSetCustom.cpp | 71 - .../datamodel/ecmascript/v8/dom/V8Notation.cpp | 46 - .../datamodel/ecmascript/v8/dom/V8Notation.h | 80 - .../ecmascript/v8/dom/V8ProcessingInstruction.cpp | 53 - .../ecmascript/v8/dom/V8ProcessingInstruction.h | 81 - .../datamodel/ecmascript/v8/dom/V8SCXMLEvent.cpp | 95 - .../datamodel/ecmascript/v8/dom/V8SCXMLEvent.h | 102 - .../ecmascript/v8/dom/V8SCXMLEventCustom.cpp | 55 - .../datamodel/ecmascript/v8/dom/V8Storage.cpp | 123 - .../datamodel/ecmascript/v8/dom/V8Storage.h | 90 - .../plugins/datamodel/ecmascript/v8/dom/V8Text.cpp | 59 - .../plugins/datamodel/ecmascript/v8/dom/V8Text.h | 77 - .../ecmascript/v8/dom/V8TypedArrayCustom.cpp | 145 - .../datamodel/ecmascript/v8/dom/V8Uint16Array.cpp | 233 - .../datamodel/ecmascript/v8/dom/V8Uint16Array.h | 102 - .../datamodel/ecmascript/v8/dom/V8Uint32Array.cpp | 233 - .../datamodel/ecmascript/v8/dom/V8Uint32Array.h | 102 - .../datamodel/ecmascript/v8/dom/V8Uint8Array.cpp | 233 - .../datamodel/ecmascript/v8/dom/V8Uint8Array.h | 102 - .../ecmascript/v8/dom/V8Uint8ClampedArray.cpp | 233 - .../ecmascript/v8/dom/V8Uint8ClampedArray.h | 102 - .../datamodel/ecmascript/v8/dom/V8XPathResult.cpp | 123 - .../datamodel/ecmascript/v8/dom/V8XPathResult.h | 96 - .../ecmascript/v8/dom/V8XPathResultCustom.cpp | 46 - src/uscxml/plugins/datamodel/lua/LuaDOM.cpp.inc | 8969 +++++ src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp | 441 +- src/uscxml/plugins/datamodel/lua/LuaDataModel.h | 47 +- src/uscxml/plugins/datamodel/lua/bindings.i | 38 + .../plugins/datamodel/null/NULLDataModel.cpp | 60 +- src/uscxml/plugins/datamodel/null/NULLDataModel.h | 65 +- .../plugins/datamodel/prolog/swi/SWIConfig.h.in | 4 - .../plugins/datamodel/prolog/swi/SWIDataModel.cpp | 891 - .../plugins/datamodel/prolog/swi/SWIDataModel.h | 137 - .../plugins/datamodel/prolog/swi/SWIDataModel.new | 962 - .../plugins/datamodel/promela/PromelaDataModel.cpp | 814 - .../plugins/datamodel/promela/PromelaDataModel.h | 119 - .../plugins/datamodel/promela/PromelaParser.cpp | 298 - .../plugins/datamodel/promela/PromelaParser.h | 104 - .../plugins/datamodel/promela/parser/promela.l | 117 - .../datamodel/promela/parser/promela.lex.yy.cpp | 2598 -- .../datamodel/promela/parser/promela.tab.cpp | 2634 -- .../datamodel/promela/parser/promela.tab.hpp | 180 - .../plugins/datamodel/promela/parser/promela.ypp | 254 - .../plugins/datamodel/xpath/XPathDataModel.cpp | 876 - .../plugins/datamodel/xpath/XPathDataModel.h | 185 - src/uscxml/plugins/element/CMakeLists.txt | 114 - src/uscxml/plugins/element/fetch/FetchElement.cpp | 130 - src/uscxml/plugins/element/fetch/FetchElement.h | 67 - src/uscxml/plugins/element/file/FileElement.cpp | 259 - src/uscxml/plugins/element/file/FileElement.h | 84 - src/uscxml/plugins/element/mmi/MMIEvents.cpp | 61 - src/uscxml/plugins/element/mmi/MMIEvents.h | 77 - .../plugins/element/postpone/PostponeElement.cpp | 169 - .../plugins/element/postpone/PostponeElement.h | 90 - .../plugins/element/respond/RespondElement.cpp | 202 - .../plugins/element/respond/RespondElement.h | 61 - src/uscxml/plugins/invoker/CMakeLists.txt | 565 - src/uscxml/plugins/invoker/audio/AudioToolbox.h | 51 - src/uscxml/plugins/invoker/audio/AudioToolbox.mm | 185 - src/uscxml/plugins/invoker/audio/LibSoundFile.cpp | 69 - src/uscxml/plugins/invoker/audio/LibSoundFile.h | 46 - src/uscxml/plugins/invoker/audio/OpenALInvoker.cpp | 421 - src/uscxml/plugins/invoker/audio/OpenALInvoker.h | 111 - src/uscxml/plugins/invoker/audio/OpenALPlayer.cpp | 541 - src/uscxml/plugins/invoker/audio/OpenALPlayer.h | 125 - src/uscxml/plugins/invoker/audio/PCMConverter.h | 49 - .../plugins/invoker/calendar/CalendarInvoker.cpp | 651 - .../plugins/invoker/calendar/CalendarInvoker.h | 99 - .../plugins/invoker/expect/ExpectInvoker.cpp | 360 - src/uscxml/plugins/invoker/expect/ExpectInvoker.h | 79 - .../plugins/invoker/ffmpeg/FFMPEGInvoker.cpp | 463 - src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h | 115 - .../invoker/filesystem/dirmon/DirMonInvoker.cpp | 443 - .../invoker/filesystem/dirmon/DirMonInvoker.h | 139 - .../graphics/openscenegraph/CompositeDisplay.cpp | 147 - .../graphics/openscenegraph/CompositeDisplay.h | 70 - .../invoker/graphics/openscenegraph/OSGInvoker.cpp | 722 - .../invoker/graphics/openscenegraph/OSGInvoker.h | 148 - .../openscenegraph/converter/OSGConverter.cpp | 611 - .../openscenegraph/converter/OSGConverter.h | 89 - .../plugins/invoker/heartbeat/HeartbeatInvoker.cpp | 115 - .../plugins/invoker/heartbeat/HeartbeatInvoker.h | 72 - .../plugins/invoker/http/HTTPServletInvoker.cpp | 137 - .../plugins/invoker/http/HTTPServletInvoker.h | 74 - src/uscxml/plugins/invoker/im/IMConfig.h.in | 4 - src/uscxml/plugins/invoker/im/IMInvoker.cpp | 1409 - src/uscxml/plugins/invoker/im/IMInvoker.h | 377 - src/uscxml/plugins/invoker/imap/IMAPInvoker.cpp | 495 - src/uscxml/plugins/invoker/imap/IMAPInvoker.h | 171 - .../plugins/invoker/miles/MilesSessionInvoker.cpp | 1097 - .../plugins/invoker/miles/MilesSessionInvoker.h | 174 - .../plugins/invoker/sample/SampleInvoker.cpp | 62 - src/uscxml/plugins/invoker/sample/SampleInvoker.h | 59 - src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp | 180 +- src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h | 41 +- src/uscxml/plugins/invoker/smtp/SMTPInvoker.cpp | 362 - src/uscxml/plugins/invoker/smtp/SMTPInvoker.h | 78 - .../plugins/invoker/sqlite3/Sqlite3Invoker.cpp | 63 - .../plugins/invoker/sqlite3/Sqlite3Invoker.h | 59 - .../plugins/invoker/system/SystemInvoker.cpp | 63 - src/uscxml/plugins/invoker/system/SystemInvoker.h | 59 - src/uscxml/plugins/invoker/umundo/JSON.pb.cc | 462 - src/uscxml/plugins/invoker/umundo/JSON.pb.h | 361 - .../plugins/invoker/umundo/UmundoInvoker.cpp | 655 - src/uscxml/plugins/invoker/umundo/UmundoInvoker.h | 94 - .../plugins/invoker/vxml/VoiceXMLInvoker.cpp | 269 - src/uscxml/plugins/invoker/vxml/VoiceXMLInvoker.h | 94 - .../plugins/invoker/webrtc/WebRTCInvoker.cpp | 64 - src/uscxml/plugins/invoker/webrtc/WebRTCInvoker.h | 59 - src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp | 290 - src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h | 75 - .../invoker/xhtml/template/xhtml-invoker.html | 246 - .../invoker/xhtml/template/xhtml-invoker.inc.h | 691 - src/uscxml/plugins/ioprocessor/CMakeLists.txt | 126 +- .../ioprocessor/basichttp/BasicHTTPIOProcessor.cpp | 142 +- .../ioprocessor/basichttp/BasicHTTPIOProcessor.h | 16 +- .../plugins/ioprocessor/comet/CometIOProcessor.cpp | 115 - .../plugins/ioprocessor/comet/CometIOProcessor.h | 72 - .../plugins/ioprocessor/dom/DOMIOProcessor.cpp | 19 - .../plugins/ioprocessor/dom/DOMIOProcessor.h | 19 - .../ioprocessor/modality/MMIHTTPIOProcessor.cpp | 210 - .../ioprocessor/modality/MMIHTTPIOProcessor.h | 72 - .../ioprocessor/modality/MMIProtoBridge.cpp | 132 - .../plugins/ioprocessor/modality/MMIProtoBridge.h | 53 - .../ioprocessor/sample/SampleIOProcessor.cpp | 59 - .../plugins/ioprocessor/sample/SampleIOProcessor.h | 66 - .../plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp | 155 +- .../plugins/ioprocessor/scxml/SCXMLIOProcessor.h | 15 +- src/uscxml/server/HTTPServer.cpp | 67 +- src/uscxml/server/HTTPServer.h | 35 +- src/uscxml/server/InterpreterServlet.cpp | 215 - src/uscxml/server/InterpreterServlet.h | 135 - src/uscxml/server/Socket.cpp | 389 - src/uscxml/server/Socket.h | 139 - src/uscxml/transform/ChartAnnotator.cpp | 24 - src/uscxml/transform/ChartAnnotator.h | 27 - src/uscxml/transform/ChartToC.cpp | 712 +- src/uscxml/transform/ChartToC.h | 21 +- src/uscxml/transform/ChartToFSM.cpp | 2035 -- src/uscxml/transform/ChartToFSM.cpp.new | 1482 - src/uscxml/transform/ChartToFSM.h | 350 - src/uscxml/transform/ChartToFSM.h.new | 303 - src/uscxml/transform/ChartToFlatSCXML.cpp | 440 - src/uscxml/transform/ChartToFlatSCXML.h | 56 - src/uscxml/transform/ChartToMinimalSCXML.cpp | 284 - src/uscxml/transform/ChartToMinimalSCXML.h | 88 - src/uscxml/transform/ChartToPromela.cpp | 3578 -- src/uscxml/transform/ChartToPromela.h | 447 - src/uscxml/transform/ChartToTex.cpp | 291 - src/uscxml/transform/ChartToTex.h | 61 - src/uscxml/transform/ChartToVHDL.cpp | 13 +- src/uscxml/transform/ChartToVHDL.h | 15 +- src/uscxml/transform/FlatStateIdentifier.h | 287 - src/uscxml/transform/Transformer.h | 20 +- src/uscxml/transform/Trie.cpp | 173 + src/uscxml/transform/Trie.h | 64 + src/uscxml/util/Convenience.cpp | 177 + src/uscxml/util/Convenience.h | 83 + src/uscxml/util/DOM.cpp | 402 + src/uscxml/util/DOM.h | 224 + src/uscxml/util/Predicates.cpp | 468 + src/uscxml/util/Predicates.h | 61 + src/uscxml/util/Trie.cpp | 173 - src/uscxml/util/Trie.h | 64 - src/uscxml/util/URL.cpp | 773 + src/uscxml/util/URL.h | 333 + src/uscxml/util/UUID.cpp | 70 + src/uscxml/util/UUID.h | 39 + test/CMakeLists.txt | 328 +- test/ctest/CTestCustom.ctest.in | 382 +- test/issues/test-issue56.scxml | 35 + test/issues/test-issue62.scxml | 35 + test/issues/test-issue63.scxml | 30 + test/issues/test-issue64.scxml | 24 + test/issues/test-issue67.scxml | 37 + test/issues/test-issue68.scxml | 31 + test/issues/test-issue69.scxml | 57 + test/src/issues/test-issue56.cpp | 66 - test/src/issues/test-issue62.cpp | 72 - test/src/issues/test-issue63.cpp | 48 - test/src/issues/test-issue64.scxml | 16 - test/src/issues/test-issue67.scxml | 36 - test/src/issues/test-issue68.scxml | 29 - test/src/test-arabica-events.cpp | 70 - test/src/test-arabica-namespaces.cpp | 215 - test/src/test-arabica-parsing.cpp | 50 - test/src/test-arabica-xpath.cpp | 212 - test/src/test-base64.cpp | 18 - test/src/test-c-inline.c | 191 - test/src/test-c-inline.c.scxml.c | 1112 - test/src/test-c-machine.cpp | 981 - test/src/test-c-machine.scxml.c | 702 +- test/src/test-cmdline-parsing.cpp | 101 - test/src/test-datamodel.cpp | 527 - test/src/test-dirmon.cpp | 83 - test/src/test-doneevent.cpp | 66 - test/src/test-eventdelay.cpp | 40 - test/src/test-expect.cpp | 58 - test/src/test-ffmpeg.cpp | 365 - test/src/test-flat-stateid.cpp | 86 - test/src/test-gen-c.cpp | 959 + test/src/test-instant-messaging.cpp | 286 - test/src/test-issue-reporting.cpp | 820 - test/src/test-lifecycle.cpp | 229 +- test/src/test-misc.cpp | 24 - test/src/test-mmi.cpp | 775 - test/src/test-predicates.cpp | 140 - test/src/test-promela-parser.cpp | 316 - test/src/test-sockets.cpp | 164 - test/src/test-state-pass.cpp | 89 + test/src/test-stress.cpp | 196 - test/src/test-trie.cpp | 92 - test/src/test-url.cpp | 80 +- test/src/test-validating.cpp | 816 + test/src/test-vxml-mmi-http.cpp | 179 - test/src/test-vxml-mmi-socket.cpp | 164 - test/src/test-w3c.cpp | 272 - test/uscxml/applications/SpatialMapTicker.java | 153 - test/uscxml/applications/click.wav | Bin 5058 -> 0 bytes test/uscxml/applications/spoken-map-ticker.scxml | 78 - test/uscxml/applications/spoken-map-ticker.xhtml | 240 - test/uscxml/arabica/test-arabica-events.xml | 10 - test/uscxml/arabica/test-arabica-parsing.xml | 6 - test/uscxml/audio/click.wav | Bin 5058 -> 0 bytes test/uscxml/automated/ecma/deep-histories.scxml | 40 - test/uscxml/automated/ecma/deep-histories2.scxml | 31 - test/uscxml/automated/ecma/deep-initial.scxml | 18 - .../chartToFSM/test-event-desc-merging.scxml | 17 - .../chartToFSM/test-event-set-conflict.scxml | 19 - test/uscxml/chartToFSM/test-flattening.scxml | 35 - test/uscxml/dom/TestData.json | 10 - test/uscxml/dom/TestData.xml | 7 - test/uscxml/dom/test-xml-access.scxml | 26 - test/uscxml/history-stacks/history-compounds.scxml | 53 - .../history-stacks/history-invokers.item.scxml | 30 - .../history-stacks/history-invokers.main.scxml | 24 - test/uscxml/java/test-ecmascript-datamodel.scxml | 106 - test/uscxml/java/test-java-datamodel.scxml | 106 - test/uscxml/java/test-java-invoker.scxml | 40 - test/uscxml/prolog/likes.pl | 38 - test/uscxml/promela/test-complete.scxml | 154 - test/uscxml/promela/test-event-source-auto.scxml | 45 - test/uscxml/promela/test-event-source.scxml | 39 - test/uscxml/promela/test-history.scxml | 16 - test/uscxml/promela/test-ltl.scxml | 16 - test/uscxml/promela/test-non-progress.scxml | 17 - test/uscxml/promela/test-progress-label.scxml | 20 - test/uscxml/promela/test-simple.scxml | 15 - test/uscxml/promela/test-syntax.scxml | 132 - test/uscxml/proto/3DViewer/CameraPos.proto | 9 - .../proto/3DViewer/DirectoryListingService.proto | 48 - test/uscxml/proto/3DViewer/LinearAlgebra.proto | 18 - test/uscxml/proto/3DViewer/ModelInfo.proto | 10 - test/uscxml/proto/3DViewer/Pose.proto | 22 - test/uscxml/proto/3DViewer/SceneSetup.proto | 8 - test/uscxml/proto/3DViewer/SceneShotService.proto | 24 - test/uscxml/proto/Dependee.proto | 3 - test/uscxml/proto/Depender.proto | 5 - test/uscxml/proto/JSON.proto | 6 - test/uscxml/proto/Test.proto | 37 - test/uscxml/proto/TestServices.proto | 23 - test/uscxml/scenegraph/HARD_MP_VAL_000.wrl | 33435 ------------------- test/uscxml/scripts/GreatCircle.js | 46 - test/uscxml/scripts/test-simple-ecmascript.scxml | 12 - test/uscxml/scxml-gui-test.scxml | 13 - test/uscxml/templates/mc-html.html | 348 - test/uscxml/templates/xhtml-invoker.html | 233 - test/uscxml/test-calendar.scxml | 93 - test/uscxml/test-communication.scxml | 65 - test/uscxml/test-custom-executable-content.scxml | 19 - test/uscxml/test-dirmon.scxml | 16 - test/uscxml/test-dom.scxml | 19 - test/uscxml/test-donedata.scxml | 37 - test/uscxml/test-ecmascript.scxml | 110 - test/uscxml/test-execution.scxml | 60 - test/uscxml/test-expect.scxml | 64 - test/uscxml/test-ffmpeg.scxml | 5 - test/uscxml/test-file-element.scxml | 17 - test/uscxml/test-http-servlet.scxml | 41 - test/uscxml/test-imap.scxml | 42 - test/uscxml/test-initial-configuration.scxml | 41 - test/uscxml/test-instant-messaging.scxml | 54 - .../uscxml/test-invoke-communication-invoker.scxml | 118 - test/uscxml/test-invoke-communication.scxml | 104 - test/uscxml/test-invoked.scxml | 29 - test/uscxml/test-jvoicexml.scxml | 116 - test/uscxml/test-lua.scxml | 17 - test/uscxml/test-markup-passing.scxml | 54 - test/uscxml/test-markup.xml | 6 - test/uscxml/test-mmi-events.scxml | 88 - test/uscxml/test-mmi-im.scxml | 76 - test/uscxml/test-mmi-mc.scxml | 83 - test/uscxml/test-openal.scxml | 125 - test/uscxml/test-osgconvert.scxml | 40 - test/uscxml/test-performance-events.scxml | 28 - test/uscxml/test-performance.scxml | 16 - test/uscxml/test-postpone-element.scxml | 41 - test/uscxml/test-prolog.scxml | 89 - test/uscxml/test-response-element.scxml | 14 - test/uscxml/test-scenegraph.scxml | 70 - test/uscxml/test-simplest.scxml | 3 - test/uscxml/test-smtp.scxml | 52 - test/uscxml/test-spatial-audio.scxml | 75 - test/uscxml/test-startup-time.scxml | 4 - test/uscxml/test-umundo-map-demo.scxml | 71 - test/uscxml/test-umundo-pingpong.scxml | 21 - test/uscxml/test-umundo-rpc.scxml | 60 - test/uscxml/test-umundo-s11n-chat.scxml | 16 - test/uscxml/test-umundo-s11n.scxml | 58 - test/uscxml/test-xhtml-invoker.scxml | 147 - test/uscxml/transition-selection/test1.scxml | 12 - test/uscxml/transition-selection/test2.scxml | 20 - .../baseuri/test-xinclude-baseuri1.include | 6 - .../baseuri/test-xinclude-baseuri2.include | 1 - .../xinclude/baseuri/test-xinclude-script.include | 1 - test/uscxml/xinclude/test-fail-namespace1.include | 3 - test/uscxml/xinclude/test-fail-namespace1.scxml | 16 - test/uscxml/xinclude/test-fail-namespace2.include | 3 - test/uscxml/xinclude/test-fail-namespace2.scxml | 16 - test/uscxml/xinclude/test-fail-namespace3.include | 3 - test/uscxml/xinclude/test-fail-namespace3.scxml | 16 - test/uscxml/xinclude/test-fail-namespace4.include | 3 - test/uscxml/xinclude/test-fail-namespace4.scxml | 15 - .../uscxml/xinclude/test-recursive-include.include | 5 - test/uscxml/xinclude/test-recursive-include.scxml | 15 - test/uscxml/xinclude/test-xinclude-baseuri.scxml | 13 - test/uscxml/xinclude/test-xinclude-simple.scxml | 25 - test/uscxml/xinclude/text-xinclude-simple.included | 3 - test/vhdltest/automation.tcl | 50 - test/vhdltest/debug.do | 53 - test/vhdltest/green_write_dut.sh | 66 - test/vhdltest/tmp_write_dut.sh | 66 - test/vhdltest/write_dut.sh | 65 - test/w3c/TEST-MATRIX.md | 2453 ++ test/w3c/compound/test-ecma-all.scxml | 1081 +- test/w3c/confEcma.xsl | 6 +- test/w3c/confLua.xsl | 785 + test/w3c/confNamespace.xsl | 18 + test/w3c/confXPath.xsl | 4 +- test/w3c/convert-tests.sh | 68 +- test/w3c/create-test-table.pl | 180 + test/w3c/ecma/robots.txt | 9 +- test/w3c/ecma/test252.scxml | 4 +- test/w3c/ecma/test330.scxml | 6 +- test/w3c/lua/robots.txt | 103 + test/w3c/lua/test144.scxml | 16 +- test/w3c/lua/test147.scxml | 26 +- test/w3c/lua/test148.scxml | 26 +- test/w3c/lua/test149.scxml | 24 +- test/w3c/lua/test150.scxml | 30 +- test/w3c/lua/test151.scxml | 30 +- test/w3c/lua/test152.scxml | 38 +- test/w3c/lua/test153.scxml | 36 +- test/w3c/lua/test155.scxml | 30 +- test/w3c/lua/test156.scxml | 32 +- test/w3c/lua/test158.scxml | 18 +- test/w3c/lua/test159.scxml | 24 +- test/w3c/lua/test172.scxml | 22 +- test/w3c/lua/test173.scxml | 22 +- test/w3c/lua/test174.scxml | 22 +- test/w3c/lua/test175.scxml | 24 +- test/w3c/lua/test176.scxml | 32 +- test/w3c/lua/test178.scxml | 20 +- test/w3c/lua/test179.scxml | 16 +- test/w3c/lua/test183.scxml | 22 +- test/w3c/lua/test185.scxml | 18 +- test/w3c/lua/test186.scxml | 30 +- test/w3c/lua/test187.scxml | 20 +- test/w3c/lua/test189.scxml | 16 +- test/w3c/lua/test190.scxml | 24 +- test/w3c/lua/test191.scxml | 18 +- test/w3c/lua/test192.scxml | 20 +- test/w3c/lua/test193.scxml | 18 +- test/w3c/lua/test194.scxml | 18 +- test/w3c/lua/test198.scxml | 18 +- test/w3c/lua/test199.scxml | 18 +- test/w3c/lua/test200.scxml | 16 +- test/w3c/lua/test201.scxml | 18 +- test/w3c/lua/test205.scxml | 22 +- test/w3c/lua/test207.scxml | 22 +- test/w3c/lua/test208.scxml | 20 +- test/w3c/lua/test210.scxml | 26 +- test/w3c/lua/test215.scxml | 26 +- test/w3c/lua/test216.scxml | 24 +- test/w3c/lua/test216sub1.scxml | 4 +- test/w3c/lua/test220.scxml | 18 +- test/w3c/lua/test223.scxml | 24 +- test/w3c/lua/test224.scxml | 26 +- test/w3c/lua/test225.scxml | 28 +- test/w3c/lua/test226.scxml | 20 +- test/w3c/lua/test226sub1.scxml | 8 +- test/w3c/lua/test228.scxml | 24 +- test/w3c/lua/test229.scxml | 20 +- test/w3c/lua/test230.scxml | 14 +- test/w3c/lua/test232.scxml | 18 +- test/w3c/lua/test233.scxml | 24 +- test/w3c/lua/test234.scxml | 32 +- test/w3c/lua/test235.scxml | 18 +- test/w3c/lua/test236.scxml | 18 +- test/w3c/lua/test237.scxml | 22 +- test/w3c/lua/test239.scxml | 18 +- test/w3c/lua/test239sub1.scxml | 4 +- test/w3c/lua/test240.scxml | 34 +- test/w3c/lua/test241.scxml | 38 +- test/w3c/lua/test242.scxml | 22 +- test/w3c/lua/test242sub1.scxml | 4 +- test/w3c/lua/test243.scxml | 24 +- test/w3c/lua/test244.scxml | 26 +- test/w3c/lua/test245.scxml | 24 +- test/w3c/lua/test247.scxml | 18 +- test/w3c/lua/test250.scxml | 6 +- test/w3c/lua/test252.scxml | 20 +- test/w3c/lua/test253.scxml | 34 +- test/w3c/lua/test276.scxml | 18 +- test/w3c/lua/test276sub1.scxml | 8 +- test/w3c/lua/test277.scxml | 24 +- test/w3c/lua/test278.scxml | 20 +- test/w3c/lua/test279.scxml | 20 +- test/w3c/lua/test280.scxml | 26 +- test/w3c/lua/test286.scxml | 18 +- test/w3c/lua/test287.scxml | 22 +- test/w3c/lua/test288.scxml | 4 +- test/w3c/lua/test294.scxml | 24 +- test/w3c/lua/test298.scxml | 22 +- test/w3c/lua/test301.scxml | 18 +- test/w3c/lua/test302.scxml | 20 +- test/w3c/lua/test303.scxml | 24 +- test/w3c/lua/test304.scxml | 20 +- test/w3c/lua/test307.scxml | 10 +- test/w3c/lua/test309.scxml | 18 +- test/w3c/lua/test310.scxml | 16 +- test/w3c/lua/test311.scxml | 20 +- test/w3c/lua/test312.scxml | 20 +- test/w3c/lua/test313.scxml | 20 +- test/w3c/lua/test314.scxml | 20 +- test/w3c/lua/test318.scxml | 22 +- test/w3c/lua/test319.scxml | 16 +- test/w3c/lua/test321.scxml | 20 +- test/w3c/lua/test322.scxml | 24 +- test/w3c/lua/test323.scxml | 20 +- test/w3c/lua/test324.scxml | 22 +- test/w3c/lua/test325.scxml | 20 +- test/w3c/lua/test326.scxml | 28 +- test/w3c/lua/test329.scxml | 48 +- test/w3c/lua/test330.scxml | 20 +- test/w3c/lua/test331.scxml | 32 +- test/w3c/lua/test332.scxml | 26 +- test/w3c/lua/test333.scxml | 18 +- test/w3c/lua/test335.scxml | 18 +- test/w3c/lua/test336.scxml | 18 +- test/w3c/lua/test337.scxml | 18 +- test/w3c/lua/test338.scxml | 30 +- test/w3c/lua/test339.scxml | 18 +- test/w3c/lua/test342.scxml | 26 +- test/w3c/lua/test343.scxml | 18 +- test/w3c/lua/test344.scxml | 18 +- test/w3c/lua/test346.scxml | 24 +- test/w3c/lua/test347.scxml | 20 +- test/w3c/lua/test348.scxml | 16 +- test/w3c/lua/test349.scxml | 22 +- test/w3c/lua/test350.scxml | 26 +- test/w3c/lua/test351.scxml | 32 +- test/w3c/lua/test352.scxml | 24 +- test/w3c/lua/test354.scxml | 40 +- test/w3c/lua/test355.scxml | 16 +- test/w3c/lua/test364.scxml | 18 +- test/w3c/lua/test372.scxml | 26 +- test/w3c/lua/test375.scxml | 16 +- test/w3c/lua/test376.scxml | 24 +- test/w3c/lua/test377.scxml | 16 +- test/w3c/lua/test378.scxml | 24 +- test/w3c/lua/test387.scxml | 18 +- test/w3c/lua/test388.scxml | 32 +- test/w3c/lua/test396.scxml | 16 +- test/w3c/lua/test399.scxml | 18 +- test/w3c/lua/test401.scxml | 18 +- test/w3c/lua/test402.scxml | 20 +- test/w3c/lua/test403a.scxml | 18 +- test/w3c/lua/test403b.scxml | 24 +- test/w3c/lua/test403c.scxml | 24 +- test/w3c/lua/test404.scxml | 16 +- test/w3c/lua/test405.scxml | 18 +- test/w3c/lua/test406.scxml | 18 +- test/w3c/lua/test407.scxml | 22 +- test/w3c/lua/test409.scxml | 18 +- test/w3c/lua/test411.scxml | 18 +- test/w3c/lua/test412.scxml | 18 +- test/w3c/lua/test413.scxml | 16 +- test/w3c/lua/test415.scxml | 4 +- test/w3c/lua/test416.scxml | 18 +- test/w3c/lua/test417.scxml | 18 +- test/w3c/lua/test419.scxml | 16 +- test/w3c/lua/test421.scxml | 16 +- test/w3c/lua/test422.scxml | 24 +- test/w3c/lua/test423.scxml | 18 +- test/w3c/lua/test444.scxml | 14 - test/w3c/lua/test445.scxml | 13 - test/w3c/lua/test446.scxml | 19 - test/w3c/lua/test448.scxml | 30 - test/w3c/lua/test449.scxml | 10 - test/w3c/lua/test451.scxml | 13 - test/w3c/lua/test452.scxml | 25 - test/w3c/lua/test453.scxml | 19 - test/w3c/lua/test456.scxml | 19 - test/w3c/lua/test457.scxml | 61 - test/w3c/lua/test459.scxml | 43 - test/w3c/lua/test460.scxml | 30 - test/w3c/lua/test487.scxml | 19 +- test/w3c/lua/test488.scxml | 18 +- test/w3c/lua/test495.scxml | 16 +- test/w3c/lua/test496.scxml | 16 +- test/w3c/lua/test500.scxml | 20 +- test/w3c/lua/test501.scxml | 22 +- test/w3c/lua/test503.scxml | 28 +- test/w3c/lua/test504.scxml | 46 +- test/w3c/lua/test505.scxml | 34 +- test/w3c/lua/test506.scxml | 34 +- test/w3c/lua/test509.scxml | 22 +- test/w3c/lua/test510.scxml | 20 +- test/w3c/lua/test518.scxml | 24 +- test/w3c/lua/test519.scxml | 22 +- test/w3c/lua/test520.scxml | 24 +- test/w3c/lua/test521.scxml | 18 +- test/w3c/lua/test522.scxml | 18 +- test/w3c/lua/test525.scxml | 30 +- test/w3c/lua/test527.scxml | 16 +- test/w3c/lua/test528.scxml | 18 +- test/w3c/lua/test529.scxml | 16 +- test/w3c/lua/test530.scxml | 24 +- test/w3c/lua/test531.scxml | 20 +- test/w3c/lua/test532.scxml | 20 +- test/w3c/lua/test533.scxml | 40 +- test/w3c/lua/test534.scxml | 22 +- test/w3c/lua/test550.scxml | 20 +- test/w3c/lua/test551.scxml | 22 +- test/w3c/lua/test552.scxml | 20 +- test/w3c/lua/test553.scxml | 20 +- test/w3c/lua/test554.scxml | 20 +- test/w3c/lua/test557.scxml | 24 - test/w3c/lua/test558.scxml | 22 - test/w3c/lua/test560.scxml | 16 - test/w3c/lua/test561.scxml | 21 - test/w3c/lua/test562.scxml | 19 - test/w3c/lua/test567.scxml | 26 +- test/w3c/lua/test567.scxml.old | 37 + test/w3c/lua/test569.scxml | 12 - test/w3c/lua/test570.scxml | 24 +- test/w3c/lua/test576.scxml | 18 +- test/w3c/lua/test577.scxml | 16 +- test/w3c/lua/test578.scxml | 16 - test/w3c/lua/test579.scxml | 26 +- test/w3c/lua/test580.scxml | 26 +- test/w3c/namespace/robots.txt | 103 + test/w3c/namespace/test144.scxml | 27 + test/w3c/namespace/test147.scxml | 35 + test/w3c/namespace/test148.scxml | 36 + test/w3c/namespace/test149.scxml | 31 + test/w3c/namespace/test150.scxml | 45 + test/w3c/namespace/test151.scxml | 45 + test/w3c/namespace/test152.scxml | 51 + test/w3c/namespace/test153.scxml | 42 + test/w3c/namespace/test155.scxml | 31 + test/w3c/namespace/test156.scxml | 33 + test/w3c/namespace/test158.scxml | 29 + test/w3c/namespace/test159.scxml | 26 + test/w3c/namespace/test172.scxml | 25 + test/w3c/namespace/test173.scxml | 26 + test/w3c/namespace/test174.scxml | 26 + test/w3c/namespace/test175.scxml | 32 + test/w3c/namespace/test176.scxml | 35 + test/w3c/namespace/test178.scxml | 27 + test/w3c/namespace/test179.scxml | 23 + test/w3c/namespace/test183.scxml | 25 + test/w3c/namespace/test185.scxml | 27 + test/w3c/namespace/test186.scxml | 36 + test/w3c/namespace/test187.scxml | 38 + test/w3c/namespace/test189.scxml | 27 + test/w3c/namespace/test190.scxml | 40 + test/w3c/namespace/test191.scxml | 37 + test/w3c/namespace/test192.scxml | 52 + test/w3c/namespace/test193.scxml | 29 + test/w3c/namespace/test194.scxml | 26 + test/w3c/namespace/test198.scxml | 23 + test/w3c/namespace/test199.scxml | 22 + test/w3c/namespace/test200.scxml | 22 + test/w3c/namespace/test201.scxml | 23 + test/w3c/namespace/test205.scxml | 34 + test/w3c/namespace/test207.scxml | 55 + test/w3c/namespace/test208.scxml | 24 + test/w3c/namespace/test210.scxml | 28 + test/w3c/namespace/test215.scxml | 35 + test/w3c/namespace/test216.scxml | 28 + test/w3c/namespace/test216sub1.scxml | 5 + test/w3c/namespace/test220.scxml | 29 + test/w3c/namespace/test223.scxml | 35 + test/w3c/namespace/test224.scxml | 36 + test/w3c/namespace/test225.scxml | 42 + test/w3c/namespace/test226.scxml | 26 + test/w3c/namespace/test226sub1.scxml | 14 + test/w3c/namespace/test228.scxml | 37 + test/w3c/namespace/test229.scxml | 46 + test/w3c/namespace/test230.scxml | 60 + test/w3c/namespace/test232.scxml | 41 + test/w3c/namespace/test233.scxml | 42 + test/w3c/namespace/test234.scxml | 69 + test/w3c/namespace/test235.scxml | 29 + test/w3c/namespace/test236.scxml | 43 + test/w3c/namespace/test237.scxml | 45 + test/w3c/namespace/test239.scxml | 35 + test/w3c/namespace/test239sub1.scxml | 5 + test/w3c/namespace/test240.scxml | 71 + test/w3c/namespace/test241.scxml | 96 + test/w3c/namespace/test242.scxml | 56 + test/w3c/namespace/test242sub1.scxml | 5 + test/w3c/namespace/test243.scxml | 41 + test/w3c/namespace/test244.scxml | 45 + test/w3c/namespace/test245.scxml | 40 + test/w3c/namespace/test247.scxml | 28 + test/w3c/namespace/test250.scxml | 39 + test/w3c/namespace/test252.scxml | 48 + test/w3c/namespace/test253.scxml | 75 + test/w3c/namespace/test276.scxml | 22 + test/w3c/namespace/test276sub1.scxml | 16 + test/w3c/namespace/test277.scxml | 32 + test/w3c/namespace/test278.scxml | 23 + test/w3c/namespace/test279.scxml | 24 + test/w3c/namespace/test280.scxml | 33 + test/w3c/namespace/test286.scxml | 23 + test/w3c/namespace/test287.scxml | 24 + test/w3c/namespace/test288.scxml | 25 + test/w3c/namespace/test294.scxml | 46 + test/w3c/namespace/test298.scxml | 32 + test/w3c/namespace/test301.scxml | 19 + test/w3c/namespace/test302.scxml | 21 + test/w3c/namespace/test303.scxml | 26 + test/w3c/namespace/test304.scxml | 19 + test/w3c/namespace/test307.scxml | 35 + test/w3c/namespace/test309.scxml | 18 + test/w3c/namespace/test310.scxml | 21 + test/w3c/namespace/test311.scxml | 22 + test/w3c/namespace/test312.scxml | 25 + test/w3c/namespace/test313.scxml | 26 + test/w3c/namespace/test314.scxml | 35 + test/w3c/namespace/test318.scxml | 32 + test/w3c/namespace/test319.scxml | 25 + test/w3c/namespace/test321.scxml | 21 + test/w3c/namespace/test322.scxml | 34 + test/w3c/namespace/test323.scxml | 21 + test/w3c/namespace/test324.scxml | 25 + test/w3c/namespace/test325.scxml | 23 + test/w3c/namespace/test326.scxml | 37 + test/w3c/namespace/test329.scxml | 54 + test/w3c/namespace/test330.scxml | 28 + test/w3c/namespace/test331.scxml | 59 + test/w3c/namespace/test332.scxml | 34 + test/w3c/namespace/test333.scxml | 21 + test/w3c/namespace/test335.scxml | 21 + test/w3c/namespace/test336.scxml | 31 + test/w3c/namespace/test337.scxml | 21 + test/w3c/namespace/test338.scxml | 43 + test/w3c/namespace/test339.scxml | 21 + test/w3c/namespace/test342.scxml | 31 + test/w3c/namespace/test343.scxml | 35 + test/w3c/namespace/test344.scxml | 28 + test/w3c/namespace/test346.scxml | 54 + test/w3c/namespace/test347.scxml | 44 + test/w3c/namespace/test348.scxml | 21 + test/w3c/namespace/test349.scxml | 33 + test/w3c/namespace/test350.scxml | 28 + test/w3c/namespace/test351.scxml | 47 + test/w3c/namespace/test352.scxml | 32 + test/w3c/namespace/test354.scxml | 52 + test/w3c/namespace/test355.scxml | 20 + test/w3c/namespace/test364.scxml | 79 + test/w3c/namespace/test372.scxml | 33 + test/w3c/namespace/test375.scxml | 28 + test/w3c/namespace/test376.scxml | 28 + test/w3c/namespace/test377.scxml | 31 + test/w3c/namespace/test378.scxml | 31 + test/w3c/namespace/test387.scxml | 93 + test/w3c/namespace/test388.scxml | 74 + test/w3c/namespace/test396.scxml | 21 + test/w3c/namespace/test399.scxml | 65 + test/w3c/namespace/test401.scxml | 25 + test/w3c/namespace/test402.scxml | 42 + test/w3c/namespace/test403a.scxml | 46 + test/w3c/namespace/test403b.scxml | 40 + test/w3c/namespace/test403c.scxml | 53 + test/w3c/namespace/test404.scxml | 56 + test/w3c/namespace/test405.scxml | 66 + test/w3c/namespace/test406.scxml | 60 + test/w3c/namespace/test407.scxml | 27 + test/w3c/namespace/test409.scxml | 36 + test/w3c/namespace/test411.scxml | 36 + test/w3c/namespace/test412.scxml | 52 + test/w3c/namespace/test413.scxml | 44 + test/w3c/namespace/test415.scxml | 13 + test/w3c/namespace/test416.scxml | 27 + test/w3c/namespace/test417.scxml | 36 + test/w3c/namespace/test419.scxml | 22 + test/w3c/namespace/test421.scxml | 31 + test/w3c/namespace/test422.scxml | 81 + test/w3c/namespace/test423.scxml | 29 + test/w3c/namespace/test444.scxml | 22 + test/w3c/namespace/test445.scxml | 21 + test/w3c/namespace/test446.scxml | 27 + test/w3c/namespace/test446.txt | 1 + test/w3c/namespace/test448.scxml | 38 + test/w3c/namespace/test449.scxml | 18 + test/w3c/namespace/test451.scxml | 21 + test/w3c/namespace/test452.scxml | 33 + test/w3c/namespace/test453.scxml | 27 + test/w3c/namespace/test456.scxml | 27 + test/w3c/namespace/test457.scxml | 61 + test/w3c/namespace/test459.scxml | 43 + test/w3c/namespace/test460.scxml | 30 + test/w3c/namespace/test487.scxml | 25 + test/w3c/namespace/test488.scxml | 35 + test/w3c/namespace/test495.scxml | 28 + test/w3c/namespace/test496.scxml | 21 + test/w3c/namespace/test500.scxml | 21 + test/w3c/namespace/test501.scxml | 25 + test/w3c/namespace/test503.scxml | 43 + test/w3c/namespace/test504.scxml | 79 + test/w3c/namespace/test505.scxml | 52 + test/w3c/namespace/test506.scxml | 56 + test/w3c/namespace/test509.scxml | 24 + test/w3c/namespace/test510.scxml | 29 + test/w3c/namespace/test513.txt | 16 + test/w3c/namespace/test518.scxml | 25 + test/w3c/namespace/test519.scxml | 25 + test/w3c/namespace/test520.scxml | 27 + test/w3c/namespace/test521.scxml | 27 + test/w3c/namespace/test522.scxml | 27 + test/w3c/namespace/test525.scxml | 32 + test/w3c/namespace/test527.scxml | 28 + test/w3c/namespace/test528.scxml | 33 + test/w3c/namespace/test529.scxml | 28 + test/w3c/namespace/test530.scxml | 34 + test/w3c/namespace/test531.scxml | 26 + test/w3c/namespace/test532.scxml | 26 + test/w3c/namespace/test533.scxml | 67 + test/w3c/namespace/test534.scxml | 24 + test/w3c/namespace/test539.txt | 4 + test/w3c/namespace/test540.txt | 3 + test/w3c/namespace/test550.scxml | 23 + test/w3c/namespace/test551.scxml | 25 + test/w3c/namespace/test552.scxml | 22 + test/w3c/namespace/test552.txt | 1 + test/w3c/namespace/test553.scxml | 27 + test/w3c/namespace/test554.scxml | 31 + test/w3c/namespace/test557.scxml | 32 + test/w3c/namespace/test557.txt | 4 + test/w3c/namespace/test558.scxml | 30 + test/w3c/namespace/test558.txt | 3 + test/w3c/namespace/test560.scxml | 24 + test/w3c/namespace/test561.scxml | 29 + test/w3c/namespace/test562.scxml | 27 + test/w3c/namespace/test567.scxml | 37 + test/w3c/namespace/test569.scxml | 20 + test/w3c/namespace/test570.scxml | 48 + test/w3c/namespace/test576.scxml | 43 + test/w3c/namespace/test577.scxml | 25 + test/w3c/namespace/test578.scxml | 24 + test/w3c/namespace/test579.scxml | 60 + test/w3c/namespace/test580.scxml | 45 + test/w3c/prolog/robots.txt | 96 - test/w3c/prolog/test144.scxml | 27 - test/w3c/prolog/test147.scxml | 35 - test/w3c/prolog/test148.scxml | 36 - test/w3c/prolog/test149.scxml | 31 - test/w3c/prolog/test150.scxml | 45 - test/w3c/prolog/test151.scxml | 45 - test/w3c/prolog/test152.scxml | 51 - test/w3c/prolog/test153.scxml | 42 - test/w3c/prolog/test155.scxml | 31 - test/w3c/prolog/test156.scxml | 33 - test/w3c/prolog/test158.scxml | 29 - test/w3c/prolog/test159.scxml | 26 - test/w3c/prolog/test172.scxml | 25 - test/w3c/prolog/test173.scxml | 26 - test/w3c/prolog/test174.scxml | 26 - test/w3c/prolog/test175.scxml | 32 - test/w3c/prolog/test176.scxml | 35 - test/w3c/prolog/test178.scxml | 27 - test/w3c/prolog/test179.scxml | 23 - test/w3c/prolog/test183.scxml | 25 - test/w3c/prolog/test185.scxml | 27 - test/w3c/prolog/test186.scxml | 36 - test/w3c/prolog/test187.scxml | 38 - test/w3c/prolog/test189.scxml | 27 - test/w3c/prolog/test190.scxml | 40 - test/w3c/prolog/test191.scxml | 37 - test/w3c/prolog/test192.scxml | 52 - test/w3c/prolog/test193.scxml | 29 - test/w3c/prolog/test194.scxml | 26 - test/w3c/prolog/test198.scxml | 23 - test/w3c/prolog/test199.scxml | 22 - test/w3c/prolog/test200.scxml | 22 - test/w3c/prolog/test201.scxml | 23 - test/w3c/prolog/test205.scxml | 34 - test/w3c/prolog/test207.scxml | 55 - test/w3c/prolog/test208.scxml | 24 - test/w3c/prolog/test210.scxml | 28 - test/w3c/prolog/test215.scxml | 35 - test/w3c/prolog/test216.scxml | 28 - test/w3c/prolog/test216sub1.scxml | 5 - test/w3c/prolog/test220.scxml | 29 - test/w3c/prolog/test223.scxml | 35 - test/w3c/prolog/test224.scxml | 36 - test/w3c/prolog/test225.scxml | 42 - test/w3c/prolog/test226.scxml | 26 - test/w3c/prolog/test226sub1.scxml | 14 - test/w3c/prolog/test228.scxml | 37 - test/w3c/prolog/test229.scxml | 46 - test/w3c/prolog/test230.scxml | 60 - test/w3c/prolog/test232.scxml | 41 - test/w3c/prolog/test233.scxml | 42 - test/w3c/prolog/test234.scxml | 69 - test/w3c/prolog/test235.scxml | 29 - test/w3c/prolog/test236.scxml | 43 - test/w3c/prolog/test237.scxml | 45 - test/w3c/prolog/test239.scxml | 35 - test/w3c/prolog/test239sub1.scxml | 5 - test/w3c/prolog/test240.scxml | 71 - test/w3c/prolog/test241.scxml | 96 - test/w3c/prolog/test242.scxml | 56 - test/w3c/prolog/test242sub1.scxml | 5 - test/w3c/prolog/test243.scxml | 41 - test/w3c/prolog/test244.scxml | 45 - test/w3c/prolog/test245.scxml | 40 - test/w3c/prolog/test247.scxml | 28 - test/w3c/prolog/test250.scxml | 39 - test/w3c/prolog/test252.scxml | 48 - test/w3c/prolog/test253.scxml | 75 - test/w3c/prolog/test276.scxml | 22 - test/w3c/prolog/test276sub1.scxml | 16 - test/w3c/prolog/test277.scxml | 32 - test/w3c/prolog/test279.scxml | 24 - test/w3c/prolog/test280.scxml | 33 - test/w3c/prolog/test286.scxml | 23 - test/w3c/prolog/test287.scxml | 24 - test/w3c/prolog/test288.scxml | 25 - test/w3c/prolog/test294.scxml | 46 - test/w3c/prolog/test298.scxml | 32 - test/w3c/prolog/test301.scxml | 19 - test/w3c/prolog/test302.scxml | 21 - test/w3c/prolog/test303.scxml | 26 - test/w3c/prolog/test304.scxml | 19 - test/w3c/prolog/test307.scxml | 35 - test/w3c/prolog/test309.scxml | 18 - test/w3c/prolog/test310.scxml | 21 - test/w3c/prolog/test311.scxml | 22 - test/w3c/prolog/test312.scxml | 25 - test/w3c/prolog/test313.scxml | 26 - test/w3c/prolog/test314.scxml | 35 - test/w3c/prolog/test318.scxml | 32 - test/w3c/prolog/test319.scxml | 25 - test/w3c/prolog/test321.scxml | 21 - test/w3c/prolog/test322.scxml | 34 - test/w3c/prolog/test323.scxml | 21 - test/w3c/prolog/test324.scxml | 25 - test/w3c/prolog/test325.scxml | 23 - test/w3c/prolog/test326.scxml | 37 - test/w3c/prolog/test329.scxml | 54 - test/w3c/prolog/test330.scxml | 28 - test/w3c/prolog/test331.scxml | 59 - test/w3c/prolog/test332.scxml | 34 - test/w3c/prolog/test333.scxml | 21 - test/w3c/prolog/test335.scxml | 21 - test/w3c/prolog/test336.scxml | 31 - test/w3c/prolog/test337.scxml | 21 - test/w3c/prolog/test338.scxml | 43 - test/w3c/prolog/test339.scxml | 21 - test/w3c/prolog/test342.scxml | 31 - test/w3c/prolog/test343.scxml | 35 - test/w3c/prolog/test344.scxml | 28 - test/w3c/prolog/test346.scxml | 54 - test/w3c/prolog/test347.scxml | 44 - test/w3c/prolog/test348.scxml | 21 - test/w3c/prolog/test349.scxml | 33 - test/w3c/prolog/test350.scxml | 28 - test/w3c/prolog/test351.scxml | 47 - test/w3c/prolog/test352.scxml | 32 - test/w3c/prolog/test354.scxml | 52 - test/w3c/prolog/test355.scxml | 20 - test/w3c/prolog/test364.scxml | 79 - test/w3c/prolog/test372.scxml | 33 - test/w3c/prolog/test375.scxml | 28 - test/w3c/prolog/test376.scxml | 28 - test/w3c/prolog/test377.scxml | 31 - test/w3c/prolog/test378.scxml | 31 - test/w3c/prolog/test387.scxml | 93 - test/w3c/prolog/test388.scxml | 74 - test/w3c/prolog/test396.scxml | 21 - test/w3c/prolog/test399.scxml | 65 - test/w3c/prolog/test401.scxml | 25 - test/w3c/prolog/test402.scxml | 42 - test/w3c/prolog/test403a.scxml | 46 - test/w3c/prolog/test403b.scxml | 40 - test/w3c/prolog/test403c.scxml | 53 - test/w3c/prolog/test404.scxml | 56 - test/w3c/prolog/test405.scxml | 66 - test/w3c/prolog/test406.scxml | 60 - test/w3c/prolog/test407.scxml | 27 - test/w3c/prolog/test409.scxml | 36 - test/w3c/prolog/test411.scxml | 36 - test/w3c/prolog/test412.scxml | 52 - test/w3c/prolog/test413.scxml | 44 - test/w3c/prolog/test415.scxml | 13 - test/w3c/prolog/test416.scxml | 27 - test/w3c/prolog/test417.scxml | 36 - test/w3c/prolog/test419.scxml | 22 - test/w3c/prolog/test421.scxml | 31 - test/w3c/prolog/test422.scxml | 81 - test/w3c/prolog/test423.scxml | 29 - test/w3c/prolog/test446.txt | 1 - test/w3c/prolog/test487.scxml | 25 - test/w3c/prolog/test488.scxml | 35 - test/w3c/prolog/test495.scxml | 28 - test/w3c/prolog/test496.scxml | 21 - test/w3c/prolog/test500.scxml | 21 - test/w3c/prolog/test501.scxml | 25 - test/w3c/prolog/test503.scxml | 43 - test/w3c/prolog/test504.scxml | 79 - test/w3c/prolog/test505.scxml | 52 - test/w3c/prolog/test506.scxml | 56 - test/w3c/prolog/test509.scxml | 24 - test/w3c/prolog/test510.scxml | 29 - test/w3c/prolog/test513.txt | 16 - test/w3c/prolog/test518.scxml | 25 - test/w3c/prolog/test519.scxml | 25 - test/w3c/prolog/test520.scxml | 27 - test/w3c/prolog/test521.scxml | 27 - test/w3c/prolog/test522.scxml | 27 - test/w3c/prolog/test525.scxml | 32 - test/w3c/prolog/test527.scxml | 28 - test/w3c/prolog/test528.scxml | 33 - test/w3c/prolog/test529.scxml | 28 - test/w3c/prolog/test530.scxml | 34 - test/w3c/prolog/test531.scxml | 26 - test/w3c/prolog/test532.scxml | 26 - test/w3c/prolog/test533.scxml | 67 - test/w3c/prolog/test534.scxml | 24 - test/w3c/prolog/test539.txt | 4 - test/w3c/prolog/test540.txt | 3 - test/w3c/prolog/test550.scxml | 23 - test/w3c/prolog/test551.scxml | 25 - test/w3c/prolog/test552.scxml | 22 - test/w3c/prolog/test552.txt | 1 - test/w3c/prolog/test553.scxml | 27 - test/w3c/prolog/test554.scxml | 31 - test/w3c/prolog/test557.txt | 4 - test/w3c/prolog/test558.txt | 3 - test/w3c/prolog/test567.scxml | 37 - test/w3c/prolog/test570.scxml | 48 - test/w3c/prolog/test576.scxml | 43 - test/w3c/prolog/test577.scxml | 25 - test/w3c/prolog/test579.scxml | 60 - test/w3c/prolog/test580.scxml | 45 - test/w3c/promela/robots.txt | 96 - test/w3c/promela/test144.scxml | 27 - test/w3c/promela/test147.scxml | 35 - test/w3c/promela/test148.scxml | 36 - test/w3c/promela/test149.scxml | 31 - test/w3c/promela/test150.scxml | 45 - test/w3c/promela/test151.scxml | 45 - test/w3c/promela/test152.scxml | 51 - test/w3c/promela/test153.scxml | 42 - test/w3c/promela/test155.scxml | 31 - test/w3c/promela/test156.scxml | 33 - test/w3c/promela/test158.scxml | 29 - test/w3c/promela/test159.scxml | 26 - test/w3c/promela/test172.scxml | 25 - test/w3c/promela/test173.scxml | 26 - test/w3c/promela/test174.scxml | 26 - test/w3c/promela/test175.scxml | 32 - test/w3c/promela/test176.scxml | 35 - test/w3c/promela/test178.scxml | 27 - test/w3c/promela/test179.scxml | 23 - test/w3c/promela/test183.scxml | 25 - test/w3c/promela/test185.scxml | 27 - test/w3c/promela/test186.scxml | 36 - test/w3c/promela/test187.scxml | 38 - test/w3c/promela/test189.scxml | 27 - test/w3c/promela/test190.scxml | 40 - test/w3c/promela/test191.scxml | 37 - test/w3c/promela/test192.scxml | 52 - test/w3c/promela/test193.scxml | 29 - test/w3c/promela/test194.scxml | 26 - test/w3c/promela/test198.scxml | 23 - test/w3c/promela/test199.scxml | 22 - test/w3c/promela/test200.scxml | 22 - test/w3c/promela/test201.scxml | 23 - test/w3c/promela/test205.scxml | 34 - test/w3c/promela/test207.scxml | 55 - test/w3c/promela/test208.scxml | 24 - test/w3c/promela/test210.scxml | 28 - test/w3c/promela/test215.scxml | 35 - test/w3c/promela/test216.scxml | 28 - test/w3c/promela/test216sub1.scxml | 5 - test/w3c/promela/test220.scxml | 29 - test/w3c/promela/test223.scxml | 35 - test/w3c/promela/test224.scxml | 36 - test/w3c/promela/test225.scxml | 42 - test/w3c/promela/test226.scxml | 26 - test/w3c/promela/test226sub1.scxml | 14 - test/w3c/promela/test228.scxml | 37 - test/w3c/promela/test229.scxml | 46 - test/w3c/promela/test230.scxml | 60 - test/w3c/promela/test232.scxml | 41 - test/w3c/promela/test233.scxml | 42 - test/w3c/promela/test234.scxml | 69 - test/w3c/promela/test235.scxml | 29 - test/w3c/promela/test236.scxml | 43 - test/w3c/promela/test237.scxml | 45 - test/w3c/promela/test239.scxml | 35 - test/w3c/promela/test239sub1.scxml | 5 - test/w3c/promela/test240.scxml | 71 - test/w3c/promela/test241.scxml | 96 - test/w3c/promela/test242.scxml | 56 - test/w3c/promela/test242sub1.scxml | 5 - test/w3c/promela/test243.scxml | 41 - test/w3c/promela/test244.scxml | 45 - test/w3c/promela/test245.scxml | 40 - test/w3c/promela/test247.scxml | 28 - test/w3c/promela/test250.scxml | 39 - test/w3c/promela/test252.scxml | 48 - test/w3c/promela/test253.scxml | 75 - test/w3c/promela/test276.scxml | 22 - test/w3c/promela/test276sub1.scxml | 16 - test/w3c/promela/test277.scxml | 32 - test/w3c/promela/test279.scxml | 24 - test/w3c/promela/test280.scxml | 33 - test/w3c/promela/test286.scxml | 23 - test/w3c/promela/test287.scxml | 24 - test/w3c/promela/test288.scxml | 25 - test/w3c/promela/test294.scxml | 46 - test/w3c/promela/test298.scxml | 32 - test/w3c/promela/test301.scxml | 19 - test/w3c/promela/test302.scxml | 21 - test/w3c/promela/test303.scxml | 26 - test/w3c/promela/test304.scxml | 19 - test/w3c/promela/test307.scxml | 35 - test/w3c/promela/test309.scxml | 18 - test/w3c/promela/test310.scxml | 21 - test/w3c/promela/test311.scxml | 22 - test/w3c/promela/test312.scxml | 25 - test/w3c/promela/test313.scxml | 26 - test/w3c/promela/test314.scxml | 35 - test/w3c/promela/test318.scxml | 32 - test/w3c/promela/test319.scxml | 25 - test/w3c/promela/test321.scxml | 21 - test/w3c/promela/test322.scxml | 34 - test/w3c/promela/test323.scxml | 21 - test/w3c/promela/test324.scxml | 25 - test/w3c/promela/test325.scxml | 23 - test/w3c/promela/test326.scxml | 37 - test/w3c/promela/test329.scxml | 54 - test/w3c/promela/test330.scxml | 28 - test/w3c/promela/test331.scxml | 59 - test/w3c/promela/test332.scxml | 34 - test/w3c/promela/test333.scxml | 21 - test/w3c/promela/test335.scxml | 21 - test/w3c/promela/test336.scxml | 31 - test/w3c/promela/test337.scxml | 21 - test/w3c/promela/test338.scxml | 43 - test/w3c/promela/test339.scxml | 21 - test/w3c/promela/test342.scxml | 31 - test/w3c/promela/test343.scxml | 35 - test/w3c/promela/test344.scxml | 28 - test/w3c/promela/test346.scxml | 54 - test/w3c/promela/test347.scxml | 44 - test/w3c/promela/test348.scxml | 21 - test/w3c/promela/test349.scxml | 33 - test/w3c/promela/test350.scxml | 28 - test/w3c/promela/test351.scxml | 47 - test/w3c/promela/test352.scxml | 32 - test/w3c/promela/test354.scxml | 52 - test/w3c/promela/test355.scxml | 20 - test/w3c/promela/test364.scxml | 79 - test/w3c/promela/test372.scxml | 33 - test/w3c/promela/test375.scxml | 28 - test/w3c/promela/test376.scxml | 28 - test/w3c/promela/test377.scxml | 31 - test/w3c/promela/test378.scxml | 31 - test/w3c/promela/test387.scxml | 93 - test/w3c/promela/test388.scxml | 74 - test/w3c/promela/test396.scxml | 21 - test/w3c/promela/test399.scxml | 65 - test/w3c/promela/test401.scxml | 25 - test/w3c/promela/test402.scxml | 42 - test/w3c/promela/test403a.scxml | 46 - test/w3c/promela/test403b.scxml | 40 - test/w3c/promela/test403c.scxml | 53 - test/w3c/promela/test404.scxml | 56 - test/w3c/promela/test405.scxml | 66 - test/w3c/promela/test406.scxml | 60 - test/w3c/promela/test407.scxml | 27 - test/w3c/promela/test409.scxml | 36 - test/w3c/promela/test411.scxml | 36 - test/w3c/promela/test412.scxml | 52 - test/w3c/promela/test413.scxml | 44 - test/w3c/promela/test415.scxml | 13 - test/w3c/promela/test416.scxml | 27 - test/w3c/promela/test417.scxml | 36 - test/w3c/promela/test419.scxml | 22 - test/w3c/promela/test421.scxml | 31 - test/w3c/promela/test422.scxml | 81 - test/w3c/promela/test423.scxml | 29 - test/w3c/promela/test446.txt | 1 - test/w3c/promela/test487.scxml | 25 - test/w3c/promela/test488.scxml | 35 - test/w3c/promela/test495.scxml | 28 - test/w3c/promela/test496.scxml | 21 - test/w3c/promela/test500.scxml | 21 - test/w3c/promela/test501.scxml | 25 - test/w3c/promela/test503.scxml | 43 - test/w3c/promela/test504.scxml | 79 - test/w3c/promela/test505.scxml | 52 - test/w3c/promela/test506.scxml | 56 - test/w3c/promela/test509.scxml | 24 - test/w3c/promela/test510.scxml | 29 - test/w3c/promela/test513.txt | 16 - test/w3c/promela/test518.scxml | 25 - test/w3c/promela/test519.scxml | 25 - test/w3c/promela/test520.scxml | 27 - test/w3c/promela/test521.scxml | 27 - test/w3c/promela/test522.scxml | 27 - test/w3c/promela/test525.scxml | 32 - test/w3c/promela/test527.scxml | 28 - test/w3c/promela/test528.scxml | 33 - test/w3c/promela/test529.scxml | 28 - test/w3c/promela/test530.scxml | 34 - test/w3c/promela/test531.scxml | 26 - test/w3c/promela/test532.scxml | 26 - test/w3c/promela/test533.scxml | 67 - test/w3c/promela/test534.scxml | 24 - test/w3c/promela/test539.txt | 4 - test/w3c/promela/test540.txt | 3 - test/w3c/promela/test550.scxml | 23 - test/w3c/promela/test551.scxml | 25 - test/w3c/promela/test552.scxml | 22 - test/w3c/promela/test552.txt | 1 - test/w3c/promela/test553.scxml | 27 - test/w3c/promela/test554.scxml | 31 - test/w3c/promela/test557.txt | 4 - test/w3c/promela/test558.txt | 3 - test/w3c/promela/test567.scxml | 37 - test/w3c/promela/test570.scxml | 48 - test/w3c/promela/test576.scxml | 43 - test/w3c/promela/test577.scxml | 25 - test/w3c/promela/test579.scxml | 60 - test/w3c/promela/test580.scxml | 45 - test/w3c/run_generated_test.cmake | 106 - test/w3c/run_minimized_flat_test.cmake | 21 - test/w3c/run_minimized_test.cmake | 16 - test/w3c/run_promela_test.cmake | 38 - test/w3c/schema/scxml-attribs.xsd | 57 - test/w3c/schema/scxml-contentmodels.xsd | 35 - test/w3c/schema/scxml-copyright.xsd | 26 - test/w3c/schema/scxml-core-strict.xsd | 425 - test/w3c/schema/scxml-data-strict.xsd | 157 - test/w3c/schema/scxml-datatypes.xsd | 203 - test/w3c/schema/scxml-external-strict.xsd | 168 - test/w3c/schema/scxml-message.xsd | 122 - test/w3c/schema/scxml-messages.xsd | 49 - test/w3c/schema/scxml-module-anchor.xsd | 67 - test/w3c/schema/scxml-module-core.xsd | 405 - test/w3c/schema/scxml-module-data.xsd | 151 - test/w3c/schema/scxml-module-external.xsd | 152 - test/w3c/schema/scxml-module-script.xsd | 51 - test/w3c/schema/scxml-profile-basic.xsd | 96 - test/w3c/schema/scxml-profile-ecma.xsd | 159 - test/w3c/schema/scxml-profile-minimum.xsd | 74 - test/w3c/schema/scxml-profile-xpath.xsd | 163 - test/w3c/schema/scxml-strict.xsd | 88 - test/w3c/schema/scxml.xsd | 88 - test/w3c/schema/xml.xsd | 117 - test/w3c/txml/robots.txt | 9 +- test/w3c/txml/test240.txml | 2 +- test/w3c/txml/test252.txml | 4 +- test/w3c/txml/test278.txml | 2 +- test/w3c/txml/test330.txml | 2 +- test/w3c/txml/test579.txml | 4 +- test/w3c/txml/test580.txml | 4 +- test/w3c/update-txml.sh | 7 +- test/w3c/xpath/robots.txt | 96 - test/w3c/xpath/test144.scxml | 27 - test/w3c/xpath/test147.scxml | 35 - test/w3c/xpath/test148.scxml | 36 - test/w3c/xpath/test149.scxml | 31 - test/w3c/xpath/test150.scxml | 47 - test/w3c/xpath/test151.scxml | 47 - test/w3c/xpath/test152.scxml | 53 - test/w3c/xpath/test153.scxml | 44 - test/w3c/xpath/test155.scxml | 33 - test/w3c/xpath/test156.scxml | 35 - test/w3c/xpath/test158.scxml | 29 - test/w3c/xpath/test159.scxml | 26 - test/w3c/xpath/test172.scxml | 25 - test/w3c/xpath/test173.scxml | 26 - test/w3c/xpath/test174.scxml | 26 - test/w3c/xpath/test175.scxml | 32 - test/w3c/xpath/test176.scxml | 35 - test/w3c/xpath/test178.scxml | 27 - test/w3c/xpath/test179.scxml | 23 - test/w3c/xpath/test183.scxml | 25 - test/w3c/xpath/test185.scxml | 27 - test/w3c/xpath/test186.scxml | 36 - test/w3c/xpath/test187.scxml | 38 - test/w3c/xpath/test189.scxml | 27 - test/w3c/xpath/test190.scxml | 40 - test/w3c/xpath/test191.scxml | 37 - test/w3c/xpath/test192.scxml | 52 - test/w3c/xpath/test193.scxml | 29 - test/w3c/xpath/test194.scxml | 26 - test/w3c/xpath/test198.scxml | 23 - test/w3c/xpath/test199.scxml | 22 - test/w3c/xpath/test200.scxml | 22 - test/w3c/xpath/test201.scxml | 23 - test/w3c/xpath/test205.scxml | 34 - test/w3c/xpath/test207.scxml | 55 - test/w3c/xpath/test208.scxml | 24 - test/w3c/xpath/test210.scxml | 28 - test/w3c/xpath/test215.scxml | 35 - test/w3c/xpath/test216.scxml | 28 - test/w3c/xpath/test216sub1.scxml | 5 - test/w3c/xpath/test220.scxml | 29 - test/w3c/xpath/test223.scxml | 35 - test/w3c/xpath/test224.scxml | 36 - test/w3c/xpath/test225.scxml | 42 - test/w3c/xpath/test226.scxml | 26 - test/w3c/xpath/test226sub1.scxml | 14 - test/w3c/xpath/test228.scxml | 37 - test/w3c/xpath/test229.scxml | 46 - test/w3c/xpath/test230.scxml | 60 - test/w3c/xpath/test232.scxml | 41 - test/w3c/xpath/test233.scxml | 42 - test/w3c/xpath/test234.scxml | 69 - test/w3c/xpath/test235.scxml | 29 - test/w3c/xpath/test236.scxml | 43 - test/w3c/xpath/test237.scxml | 45 - test/w3c/xpath/test239.scxml | 35 - test/w3c/xpath/test239sub1.scxml | 5 - test/w3c/xpath/test240.scxml | 71 - test/w3c/xpath/test241.scxml | 96 - test/w3c/xpath/test242.scxml | 56 - test/w3c/xpath/test242sub1.scxml | 5 - test/w3c/xpath/test243.scxml | 41 - test/w3c/xpath/test244.scxml | 45 - test/w3c/xpath/test245.scxml | 40 - test/w3c/xpath/test247.scxml | 28 - test/w3c/xpath/test250.scxml | 39 - test/w3c/xpath/test252.scxml | 48 - test/w3c/xpath/test253.scxml | 75 - test/w3c/xpath/test276.scxml | 22 - test/w3c/xpath/test276sub1.scxml | 16 - test/w3c/xpath/test277.scxml | 32 - test/w3c/xpath/test279.scxml | 24 - test/w3c/xpath/test280.scxml | 33 - test/w3c/xpath/test286.scxml | 23 - test/w3c/xpath/test287.scxml | 24 - test/w3c/xpath/test288.scxml | 25 - test/w3c/xpath/test294.scxml | 46 - test/w3c/xpath/test298.scxml | 32 - test/w3c/xpath/test301.scxml | 19 - test/w3c/xpath/test302.scxml | 21 - test/w3c/xpath/test303.scxml | 26 - test/w3c/xpath/test304.scxml | 19 - test/w3c/xpath/test307.scxml | 35 - test/w3c/xpath/test309.scxml | 18 - test/w3c/xpath/test310.scxml | 21 - test/w3c/xpath/test311.scxml | 22 - test/w3c/xpath/test312.scxml | 25 - test/w3c/xpath/test313.scxml | 26 - test/w3c/xpath/test314.scxml | 35 - test/w3c/xpath/test318.scxml | 32 - test/w3c/xpath/test319.scxml | 25 - test/w3c/xpath/test321.scxml | 21 - test/w3c/xpath/test322.scxml | 34 - test/w3c/xpath/test323.scxml | 21 - test/w3c/xpath/test324.scxml | 25 - test/w3c/xpath/test325.scxml | 23 - test/w3c/xpath/test326.scxml | 37 - test/w3c/xpath/test329.scxml | 54 - test/w3c/xpath/test330.scxml | 28 - test/w3c/xpath/test331.scxml | 59 - test/w3c/xpath/test332.scxml | 34 - test/w3c/xpath/test333.scxml | 21 - test/w3c/xpath/test335.scxml | 21 - test/w3c/xpath/test336.scxml | 31 - test/w3c/xpath/test337.scxml | 21 - test/w3c/xpath/test338.scxml | 43 - test/w3c/xpath/test339.scxml | 21 - test/w3c/xpath/test342.scxml | 31 - test/w3c/xpath/test343.scxml | 35 - test/w3c/xpath/test344.scxml | 28 - test/w3c/xpath/test346.scxml | 54 - test/w3c/xpath/test347.scxml | 44 - test/w3c/xpath/test348.scxml | 21 - test/w3c/xpath/test349.scxml | 33 - test/w3c/xpath/test350.scxml | 28 - test/w3c/xpath/test351.scxml | 47 - test/w3c/xpath/test352.scxml | 32 - test/w3c/xpath/test354.scxml | 52 - test/w3c/xpath/test355.scxml | 20 - test/w3c/xpath/test364.scxml | 79 - test/w3c/xpath/test372.scxml | 33 - test/w3c/xpath/test375.scxml | 28 - test/w3c/xpath/test376.scxml | 28 - test/w3c/xpath/test377.scxml | 31 - test/w3c/xpath/test378.scxml | 31 - test/w3c/xpath/test387.scxml | 93 - test/w3c/xpath/test388.scxml | 74 - test/w3c/xpath/test396.scxml | 21 - test/w3c/xpath/test399.scxml | 65 - test/w3c/xpath/test401.scxml | 25 - test/w3c/xpath/test402.scxml | 42 - test/w3c/xpath/test403a.scxml | 46 - test/w3c/xpath/test403b.scxml | 40 - test/w3c/xpath/test403c.scxml | 53 - test/w3c/xpath/test404.scxml | 56 - test/w3c/xpath/test405.scxml | 66 - test/w3c/xpath/test406.scxml | 60 - test/w3c/xpath/test407.scxml | 27 - test/w3c/xpath/test409.scxml | 36 - test/w3c/xpath/test411.scxml | 36 - test/w3c/xpath/test412.scxml | 52 - test/w3c/xpath/test413.scxml | 44 - test/w3c/xpath/test415.scxml | 13 - test/w3c/xpath/test416.scxml | 27 - test/w3c/xpath/test417.scxml | 36 - test/w3c/xpath/test419.scxml | 22 - test/w3c/xpath/test421.scxml | 31 - test/w3c/xpath/test422.scxml | 81 - test/w3c/xpath/test423.scxml | 29 - test/w3c/xpath/test446.txt | 1 - test/w3c/xpath/test463.scxml | 22 - test/w3c/xpath/test464.scxml | 21 - test/w3c/xpath/test465.scxml | 27 - test/w3c/xpath/test466.scxml | 21 - test/w3c/xpath/test467.scxml | 18 - test/w3c/xpath/test468.scxml | 30 - test/w3c/xpath/test469.scxml | 31 - test/w3c/xpath/test470.scxml | 30 - test/w3c/xpath/test473.scxml | 44 - test/w3c/xpath/test474.scxml | 43 - test/w3c/xpath/test475.scxml | 43 - test/w3c/xpath/test476.scxml | 43 - test/w3c/xpath/test477.scxml | 43 - test/w3c/xpath/test478.scxml | 42 - test/w3c/xpath/test479.scxml | 42 - test/w3c/xpath/test480.scxml | 38 - test/w3c/xpath/test481.scxml | 43 - test/w3c/xpath/test482.scxml | 22 - test/w3c/xpath/test483.scxml | 33 - test/w3c/xpath/test487.scxml | 25 - test/w3c/xpath/test488.scxml | 35 - test/w3c/xpath/test495.scxml | 28 - test/w3c/xpath/test496.scxml | 21 - test/w3c/xpath/test500.scxml | 21 - test/w3c/xpath/test501.scxml | 25 - test/w3c/xpath/test503.scxml | 43 - test/w3c/xpath/test504.scxml | 79 - test/w3c/xpath/test505.scxml | 52 - test/w3c/xpath/test506.scxml | 56 - test/w3c/xpath/test509.scxml | 24 - test/w3c/xpath/test510.scxml | 29 - test/w3c/xpath/test513.txt | 16 - test/w3c/xpath/test518.scxml | 25 - test/w3c/xpath/test519.scxml | 25 - test/w3c/xpath/test520.scxml | 27 - test/w3c/xpath/test521.scxml | 27 - test/w3c/xpath/test522.scxml | 27 - test/w3c/xpath/test525.scxml | 34 - test/w3c/xpath/test527.scxml | 28 - test/w3c/xpath/test528.scxml | 33 - test/w3c/xpath/test529.scxml | 28 - test/w3c/xpath/test530.scxml | 34 - test/w3c/xpath/test531.scxml | 26 - test/w3c/xpath/test532.scxml | 26 - test/w3c/xpath/test533.scxml | 67 - test/w3c/xpath/test534.scxml | 24 - test/w3c/xpath/test537.scxml | 22 - test/w3c/xpath/test539.scxml | 32 - test/w3c/xpath/test539.txt | 4 - test/w3c/xpath/test540.scxml | 28 - test/w3c/xpath/test540.txt | 3 - test/w3c/xpath/test542.scxml | 40 - test/w3c/xpath/test543.scxml | 24 - test/w3c/xpath/test544.scxml | 23 - test/w3c/xpath/test545.scxml | 27 - test/w3c/xpath/test546.scxml | 23 - test/w3c/xpath/test547.scxml | 39 - test/w3c/xpath/test550.scxml | 23 - test/w3c/xpath/test551.scxml | 27 - test/w3c/xpath/test552.scxml | 22 - test/w3c/xpath/test552.txt | 1 - test/w3c/xpath/test553.scxml | 27 - test/w3c/xpath/test554.scxml | 31 - test/w3c/xpath/test555.scxml | 32 - test/w3c/xpath/test557.txt | 4 - test/w3c/xpath/test558.txt | 3 - test/w3c/xpath/test567.scxml | 37 - test/w3c/xpath/test568.scxml | 20 - test/w3c/xpath/test570.scxml | 48 - test/w3c/xpath/test576.scxml | 43 - test/w3c/xpath/test577.scxml | 25 - test/w3c/xpath/test579.scxml | 60 - test/w3c/xpath/test580.scxml | 45 - 3232 files changed, 278555 insertions(+), 199460 deletions(-) delete mode 100644 CTestConfig.cmake create mode 100644 TODO.txt delete mode 100644 apps/restart-on-term.sh delete mode 100644 apps/samples/http2im/http2im.scxml delete mode 100644 apps/samples/map/SpatialMapTicker.java delete mode 100644 apps/samples/map/click.wav delete mode 100644 apps/samples/map/spoken-map-ticker.scxml delete mode 100644 apps/samples/map/spoken-map-ticker.xhtml delete mode 100755 apps/samples/miles/emptyface.jpg delete mode 100644 apps/samples/miles/miles.html delete mode 100644 apps/samples/miles/miles.js delete mode 100644 apps/samples/miles/miles.scxml delete mode 100644 apps/samples/miles/test1.jpeg delete mode 100644 apps/samples/miles/test2.jpeg delete mode 100644 apps/samples/miles/test3.jpeg delete mode 100644 apps/samples/miles/test4.jpeg delete mode 100644 apps/samples/put-that-there/put-that-there.scxml delete mode 100644 apps/samples/server-push/server-push.scxml delete mode 100644 apps/samples/vrml/README.md delete mode 100644 apps/samples/vrml/annotations.js delete mode 100644 apps/samples/vrml/ffmpeg-server.invoked.scxml delete mode 100644 apps/samples/vrml/img/Tutorial.png delete mode 100644 apps/samples/vrml/img/Tutorial.pxm delete mode 100644 apps/samples/vrml/img/close.png delete mode 100644 apps/samples/vrml/img/drag.png delete mode 100644 apps/samples/vrml/img/drag2.png delete mode 100644 apps/samples/vrml/img/drag3.png delete mode 100644 apps/samples/vrml/img/pitchRoll-handle.png delete mode 100644 apps/samples/vrml/img/pitchRoll.png delete mode 100644 apps/samples/vrml/img/pitchRoll.pxm delete mode 100644 apps/samples/vrml/img/pitchRoll3.png delete mode 100644 apps/samples/vrml/img/xy-handle.png delete mode 100644 apps/samples/vrml/img/xy.png delete mode 100644 apps/samples/vrml/img/xy.pxm delete mode 100644 apps/samples/vrml/img/xy2.png delete mode 100644 apps/samples/vrml/img/yawZoom-handle.png delete mode 100644 apps/samples/vrml/img/yawZoom.png delete mode 100644 apps/samples/vrml/img/yawZoom.pxm delete mode 100755 apps/samples/vrml/stress-vrml-server.pl delete mode 100644 apps/samples/vrml/viewer-webgl-setpose.js delete mode 100644 apps/samples/vrml/viewer-webgl.js delete mode 100644 apps/samples/vrml/viewer.css delete mode 100644 apps/samples/vrml/viewer.html delete mode 100644 apps/samples/vrml/viewer.js delete mode 100644 apps/samples/vrml/vrml-server.caching.scxml delete mode 100644 apps/samples/vrml/vrml-server.pre-osgjs.scxml delete mode 100644 apps/samples/vrml/vrml-server.scxml delete mode 100644 apps/samples/websockets/websockets.html delete mode 100644 apps/samples/websockets/websockets.scxml delete mode 100644 apps/uscxml-analyze.cpp delete mode 100644 apps/uscxml-browser.vbs delete mode 100644 apps/uscxml-debugger.html delete mode 100644 apps/uscxml-dot.cpp delete mode 100644 apps/w3c-mmi/MMIEventServlet.cpp delete mode 100644 apps/w3c-mmi/MMIEventServlet.h delete mode 100644 apps/w3c-mmi/im/MMISessionManager.cpp delete mode 100644 apps/w3c-mmi/im/MMISessionManager.h delete mode 100644 apps/w3c-mmi/im/uscxml-interaction-manager.cpp delete mode 100644 apps/w3c-mmi/mc/uscxml-modality-component.cpp delete mode 100755 contrib/build-scripts/build-arabica-ios.sh delete mode 100755 contrib/build-scripts/build-arabica-linux.sh delete mode 100755 contrib/build-scripts/build-arabica-macosx.sh delete mode 100644 contrib/build-scripts/build-arabica-windows.bat delete mode 100755 contrib/build-scripts/build-curl-ios.sh delete mode 100755 contrib/build-scripts/build-ffmpeg-linux.sh delete mode 100755 contrib/build-scripts/build-glog-ios.sh delete mode 100755 contrib/build-scripts/build-glog-linux.sh delete mode 100755 contrib/build-scripts/build-glog-macosx.sh delete mode 100644 contrib/build-scripts/build-glog-windows.bat delete mode 100755 contrib/build-scripts/build-libevent-ios.sh delete mode 100755 contrib/build-scripts/build-libevent-linux.sh delete mode 100755 contrib/build-scripts/build-libevent-macosx.sh delete mode 100644 contrib/build-scripts/build-libevent-windows.bat delete mode 100755 contrib/build-scripts/build-swi-linux.sh delete mode 100755 contrib/build-scripts/build-swi-macosx.sh delete mode 100755 contrib/build-scripts/build-uscxml-android.sh delete mode 100755 contrib/build-scripts/build-uscxml-ios.sh delete mode 100755 contrib/build-scripts/build-v8-linux.sh delete mode 100755 contrib/build-scripts/build-v8-macosx.sh delete mode 100644 contrib/build-scripts/build-v8-windows.bat delete mode 100644 contrib/build-scripts/pidgin-configure delete mode 100755 contrib/build-scripts/platform-id-linux.sh delete mode 100755 contrib/build-scripts/platform-id-mac.sh delete mode 100644 contrib/cmake/BinaryExists.cmake delete mode 100644 contrib/cmake/CPackUSCXML.cmake delete mode 100644 contrib/cmake/CrossCompile-Android.cmake delete mode 100644 contrib/cmake/CrossCompile-iOS-Sim.cmake delete mode 100644 contrib/cmake/CrossCompile-iOS.cmake delete mode 100644 contrib/cmake/FindArabica.cmake delete mode 100644 contrib/cmake/FindEV.cmake delete mode 100644 contrib/cmake/FindEVENT.cmake delete mode 100644 contrib/cmake/FindExpect.cmake delete mode 100644 contrib/cmake/FindFFMPEG.cmake delete mode 100644 contrib/cmake/FindGLIB2.cmake delete mode 100644 contrib/cmake/FindGLOG.cmake delete mode 100644 contrib/cmake/FindGMP.cmake delete mode 100644 contrib/cmake/FindGObject.cmake delete mode 100644 contrib/cmake/FindICONV.cmake delete mode 100644 contrib/cmake/FindICU.cmake delete mode 100644 contrib/cmake/FindLIBICAL.cmake delete mode 100644 contrib/cmake/FindLIBSNDFILE.cmake delete mode 100644 contrib/cmake/FindLibJingle.cmake delete mode 100644 contrib/cmake/FindLibPurple.cmake delete mode 100644 contrib/cmake/FindLua.cmake delete mode 100644 contrib/cmake/FindMILES.cmake delete mode 100644 contrib/cmake/FindOpenALKCAT.cmake delete mode 100644 contrib/cmake/FindPHP5.cmake delete mode 100644 contrib/cmake/FindSWI.cmake delete mode 100644 contrib/cmake/FindSpiderMonkey.cmake delete mode 100644 contrib/cmake/FindSqlite3.cmake delete mode 100644 contrib/cmake/FindUMUNDO.cmake delete mode 100644 contrib/cmake/FunctionExists.cmake delete mode 100644 contrib/cmake/HeaderExists.cmake delete mode 100644 contrib/cmake/TryCompile.cmake delete mode 100644 contrib/cmake/cotire.cmake delete mode 100644 contrib/ctest/README.md delete mode 100755 contrib/ctest/run-tests.cron delete mode 100644 contrib/ctest/run-tests.vbs delete mode 100644 contrib/dom/idl/Attr.idl delete mode 100644 contrib/dom/idl/CDATASection.idl delete mode 100644 contrib/dom/idl/CharacterData.idl delete mode 100644 contrib/dom/idl/Comment.idl delete mode 100644 contrib/dom/idl/DOMException.idl delete mode 100644 contrib/dom/idl/DOMImplementation.idl delete mode 100644 contrib/dom/idl/Document.idl delete mode 100644 contrib/dom/idl/DocumentFragment.idl delete mode 100644 contrib/dom/idl/DocumentType.idl delete mode 100644 contrib/dom/idl/Element.idl delete mode 100644 contrib/dom/idl/Entity.idl delete mode 100644 contrib/dom/idl/EntityReference.idl delete mode 100644 contrib/dom/idl/NamedNodeMap.idl delete mode 100644 contrib/dom/idl/Node.idl delete mode 100644 contrib/dom/idl/NodeList.idl delete mode 100644 contrib/dom/idl/NodeSet.idl delete mode 100644 contrib/dom/idl/Notation.idl delete mode 100644 contrib/dom/idl/ProcessingInstruction.idl delete mode 100644 contrib/dom/idl/SCXMLEvent.idl delete mode 100644 contrib/dom/idl/Storage.idl delete mode 100644 contrib/dom/idl/Text.idl delete mode 100644 contrib/dom/idl/TypedArray.idl delete mode 100644 contrib/dom/idl/XPathNSResolver.idl.deact delete mode 100644 contrib/dom/idl/XPathResult.idl delete mode 100644 contrib/dom/scripts/CodeGenerator.pm delete mode 100644 contrib/dom/scripts/CodeGeneratorArabicaJSC.pm delete mode 100644 contrib/dom/scripts/CodeGeneratorArabicaV8.pm delete mode 100644 contrib/dom/scripts/CodeGeneratorArabicaV8.post3.14.pm delete mode 100644 contrib/dom/scripts/IDLAttributes.txt delete mode 100644 contrib/dom/scripts/IDLParser.pm delete mode 100644 contrib/dom/scripts/InFilesCompiler.pm delete mode 100644 contrib/dom/scripts/InFilesParser.pm delete mode 100755 contrib/dom/scripts/generate-bindings.pl delete mode 100755 contrib/dom/scripts/make_jsc.sh delete mode 100755 contrib/dom/scripts/make_v8.sh delete mode 100644 contrib/dom/scripts/preprocessor.pm delete mode 100755 contrib/iwyu-g++ delete mode 100755 contrib/iwyu-gcc delete mode 100644 contrib/java/build-java.xml delete mode 100755 contrib/local/annotate-xml-lineno.pl delete mode 100755 contrib/local/build-linux.expect delete mode 100755 contrib/local/build-windows.expect delete mode 100755 contrib/local/compress_and_upload_deps.sh delete mode 100755 contrib/local/create-random-scxml.pl delete mode 100755 contrib/local/make-dist.sh delete mode 100755 contrib/local/make-installer-html-table.pl delete mode 100755 contrib/local/package-linux.expect delete mode 100755 contrib/local/package-windows.expect delete mode 100755 contrib/local/prune_promela.pl delete mode 100755 contrib/local/remove-dsstore-files.sh delete mode 100755 contrib/local/test-include-linux.sh delete mode 100755 contrib/local/test-include-macosx.sh delete mode 100755 contrib/local/validate-installers.expect delete mode 100755 contrib/local/virtualbox.sh delete mode 100644 contrib/proto/mmi/LifeCycleEvents.proto delete mode 100644 contrib/proto/mmi/StringDataExtension.proto create mode 100755 contrib/src/Pluma/Config.hpp create mode 100755 contrib/src/Pluma/Connector.hpp create mode 100755 contrib/src/Pluma/DLibrary.cpp create mode 100755 contrib/src/Pluma/DLibrary.hpp create mode 100755 contrib/src/Pluma/Dir.cpp create mode 100755 contrib/src/Pluma/Dir.hpp create mode 100755 contrib/src/Pluma/Host.cpp create mode 100755 contrib/src/Pluma/Host.hpp create mode 100755 contrib/src/Pluma/PluginManager.cpp create mode 100755 contrib/src/Pluma/PluginManager.hpp create mode 100755 contrib/src/Pluma/Pluma.hpp create mode 100755 contrib/src/Pluma/Pluma.inl create mode 100755 contrib/src/Pluma/Provider.cpp create mode 100755 contrib/src/Pluma/Provider.hpp create mode 100755 contrib/src/Pluma/uce-dirent.h create mode 100644 contrib/src/boost/algorithm/string.hpp create mode 100644 contrib/src/boost/algorithm/string/case_conv.hpp create mode 100644 contrib/src/boost/algorithm/string/classification.hpp create mode 100644 contrib/src/boost/algorithm/string/compare.hpp create mode 100644 contrib/src/boost/algorithm/string/concept.hpp create mode 100644 contrib/src/boost/algorithm/string/config.hpp create mode 100644 contrib/src/boost/algorithm/string/constants.hpp create mode 100644 contrib/src/boost/algorithm/string/detail/case_conv.hpp create mode 100644 contrib/src/boost/algorithm/string/detail/classification.hpp create mode 100644 contrib/src/boost/algorithm/string/detail/find_format.hpp create mode 100644 contrib/src/boost/algorithm/string/detail/find_format_all.hpp create mode 100644 contrib/src/boost/algorithm/string/detail/find_format_store.hpp create mode 100644 contrib/src/boost/algorithm/string/detail/find_iterator.hpp create mode 100644 contrib/src/boost/algorithm/string/detail/finder.hpp create mode 100644 contrib/src/boost/algorithm/string/detail/formatter.hpp create mode 100644 contrib/src/boost/algorithm/string/detail/predicate.hpp create mode 100644 contrib/src/boost/algorithm/string/detail/replace_storage.hpp create mode 100644 contrib/src/boost/algorithm/string/detail/sequence.hpp create mode 100644 contrib/src/boost/algorithm/string/detail/trim.hpp create mode 100644 contrib/src/boost/algorithm/string/detail/util.hpp create mode 100644 contrib/src/boost/algorithm/string/erase.hpp create mode 100644 contrib/src/boost/algorithm/string/find.hpp create mode 100644 contrib/src/boost/algorithm/string/find_format.hpp create mode 100644 contrib/src/boost/algorithm/string/find_iterator.hpp create mode 100644 contrib/src/boost/algorithm/string/finder.hpp create mode 100644 contrib/src/boost/algorithm/string/formatter.hpp create mode 100644 contrib/src/boost/algorithm/string/iter_find.hpp create mode 100644 contrib/src/boost/algorithm/string/join.hpp create mode 100644 contrib/src/boost/algorithm/string/predicate.hpp create mode 100644 contrib/src/boost/algorithm/string/predicate_facade.hpp create mode 100644 contrib/src/boost/algorithm/string/replace.hpp create mode 100644 contrib/src/boost/algorithm/string/sequence_traits.hpp create mode 100644 contrib/src/boost/algorithm/string/split.hpp create mode 100644 contrib/src/boost/algorithm/string/std/list_traits.hpp create mode 100644 contrib/src/boost/algorithm/string/std/slist_traits.hpp create mode 100644 contrib/src/boost/algorithm/string/std/string_traits.hpp create mode 100644 contrib/src/boost/algorithm/string/std_containers_traits.hpp create mode 100644 contrib/src/boost/algorithm/string/trim.hpp create mode 100644 contrib/src/boost/algorithm/string/yes_no_type.hpp create mode 100644 contrib/src/boost/assert.hpp create mode 100644 contrib/src/boost/bind/mem_fn.hpp create mode 100644 contrib/src/boost/bind/mem_fn_cc.hpp create mode 100644 contrib/src/boost/bind/mem_fn_template.hpp create mode 100644 contrib/src/boost/bind/mem_fn_vw.hpp create mode 100644 contrib/src/boost/checked_delete.hpp create mode 100644 contrib/src/boost/concept/assert.hpp create mode 100644 contrib/src/boost/concept/detail/backward_compatibility.hpp create mode 100644 contrib/src/boost/concept/detail/borland.hpp create mode 100644 contrib/src/boost/concept/detail/concept_def.hpp create mode 100644 contrib/src/boost/concept/detail/concept_undef.hpp create mode 100644 contrib/src/boost/concept/detail/general.hpp create mode 100644 contrib/src/boost/concept/detail/has_constraints.hpp create mode 100644 contrib/src/boost/concept/detail/msvc.hpp create mode 100644 contrib/src/boost/concept/usage.hpp create mode 100644 contrib/src/boost/concept_check.hpp create mode 100644 contrib/src/boost/config.hpp create mode 100644 contrib/src/boost/config/abi/borland_prefix.hpp create mode 100644 contrib/src/boost/config/abi/borland_suffix.hpp create mode 100644 contrib/src/boost/config/abi/msvc_prefix.hpp create mode 100644 contrib/src/boost/config/abi/msvc_suffix.hpp create mode 100644 contrib/src/boost/config/abi_prefix.hpp create mode 100644 contrib/src/boost/config/abi_suffix.hpp create mode 100644 contrib/src/boost/config/auto_link.hpp create mode 100644 contrib/src/boost/config/compiler/borland.hpp create mode 100644 contrib/src/boost/config/compiler/clang.hpp create mode 100644 contrib/src/boost/config/compiler/codegear.hpp create mode 100644 contrib/src/boost/config/compiler/comeau.hpp create mode 100644 contrib/src/boost/config/compiler/common_edg.hpp create mode 100644 contrib/src/boost/config/compiler/compaq_cxx.hpp create mode 100644 contrib/src/boost/config/compiler/cray.hpp create mode 100644 contrib/src/boost/config/compiler/digitalmars.hpp create mode 100644 contrib/src/boost/config/compiler/gcc.hpp create mode 100644 contrib/src/boost/config/compiler/gcc_xml.hpp create mode 100644 contrib/src/boost/config/compiler/greenhills.hpp create mode 100644 contrib/src/boost/config/compiler/hp_acc.hpp create mode 100644 contrib/src/boost/config/compiler/intel.hpp create mode 100644 contrib/src/boost/config/compiler/kai.hpp create mode 100644 contrib/src/boost/config/compiler/metrowerks.hpp create mode 100644 contrib/src/boost/config/compiler/mpw.hpp create mode 100644 contrib/src/boost/config/compiler/nvcc.hpp create mode 100644 contrib/src/boost/config/compiler/pathscale.hpp create mode 100644 contrib/src/boost/config/compiler/pgi.hpp create mode 100644 contrib/src/boost/config/compiler/sgi_mipspro.hpp create mode 100644 contrib/src/boost/config/compiler/sunpro_cc.hpp create mode 100644 contrib/src/boost/config/compiler/vacpp.hpp create mode 100644 contrib/src/boost/config/compiler/visualc.hpp create mode 100644 contrib/src/boost/config/compiler/xlcpp.hpp create mode 100644 contrib/src/boost/config/no_tr1/cmath.hpp create mode 100644 contrib/src/boost/config/no_tr1/complex.hpp create mode 100644 contrib/src/boost/config/no_tr1/functional.hpp create mode 100644 contrib/src/boost/config/no_tr1/memory.hpp create mode 100644 contrib/src/boost/config/no_tr1/utility.hpp create mode 100644 contrib/src/boost/config/platform/aix.hpp create mode 100644 contrib/src/boost/config/platform/amigaos.hpp create mode 100644 contrib/src/boost/config/platform/beos.hpp create mode 100644 contrib/src/boost/config/platform/bsd.hpp create mode 100644 contrib/src/boost/config/platform/cloudabi.hpp create mode 100644 contrib/src/boost/config/platform/cray.hpp create mode 100644 contrib/src/boost/config/platform/cygwin.hpp create mode 100644 contrib/src/boost/config/platform/haiku.hpp create mode 100644 contrib/src/boost/config/platform/hpux.hpp create mode 100644 contrib/src/boost/config/platform/irix.hpp create mode 100644 contrib/src/boost/config/platform/linux.hpp create mode 100644 contrib/src/boost/config/platform/macos.hpp create mode 100644 contrib/src/boost/config/platform/qnxnto.hpp create mode 100644 contrib/src/boost/config/platform/solaris.hpp create mode 100644 contrib/src/boost/config/platform/symbian.hpp create mode 100644 contrib/src/boost/config/platform/vms.hpp create mode 100644 contrib/src/boost/config/platform/vxworks.hpp create mode 100644 contrib/src/boost/config/platform/win32.hpp create mode 100644 contrib/src/boost/config/posix_features.hpp create mode 100644 contrib/src/boost/config/requires_threads.hpp create mode 100644 contrib/src/boost/config/select_compiler_config.hpp create mode 100644 contrib/src/boost/config/select_platform_config.hpp create mode 100644 contrib/src/boost/config/select_stdlib_config.hpp create mode 100644 contrib/src/boost/config/stdlib/dinkumware.hpp create mode 100644 contrib/src/boost/config/stdlib/libcomo.hpp create mode 100644 contrib/src/boost/config/stdlib/libcpp.hpp create mode 100644 contrib/src/boost/config/stdlib/libstdcpp3.hpp create mode 100644 contrib/src/boost/config/stdlib/modena.hpp create mode 100644 contrib/src/boost/config/stdlib/msl.hpp create mode 100644 contrib/src/boost/config/stdlib/roguewave.hpp create mode 100644 contrib/src/boost/config/stdlib/sgi.hpp create mode 100644 contrib/src/boost/config/stdlib/stlport.hpp create mode 100644 contrib/src/boost/config/stdlib/vacpp.hpp create mode 100644 contrib/src/boost/config/suffix.hpp create mode 100644 contrib/src/boost/config/user.hpp create mode 100644 contrib/src/boost/config/warning_disable.hpp create mode 100644 contrib/src/boost/core/addressof.hpp create mode 100644 contrib/src/boost/core/checked_delete.hpp create mode 100644 contrib/src/boost/core/demangle.hpp create mode 100644 contrib/src/boost/core/enable_if.hpp create mode 100644 contrib/src/boost/core/no_exceptions_support.hpp create mode 100644 contrib/src/boost/core/noncopyable.hpp create mode 100644 contrib/src/boost/core/ref.hpp create mode 100644 contrib/src/boost/core/typeinfo.hpp create mode 100644 contrib/src/boost/cstdint.hpp create mode 100644 contrib/src/boost/current_function.hpp create mode 100644 contrib/src/boost/detail/dynamic_bitset.hpp create mode 100644 contrib/src/boost/detail/indirect_traits.hpp create mode 100644 contrib/src/boost/detail/iterator.hpp create mode 100644 contrib/src/boost/detail/lightweight_mutex.hpp create mode 100644 contrib/src/boost/detail/no_exceptions_support.hpp create mode 100644 contrib/src/boost/detail/sp_typeinfo.hpp create mode 100644 contrib/src/boost/detail/winapi/GetCurrentProcess.hpp create mode 100644 contrib/src/boost/detail/winapi/GetCurrentThread.hpp create mode 100644 contrib/src/boost/detail/winapi/basic_types.hpp create mode 100644 contrib/src/boost/detail/winapi/config.hpp create mode 100644 contrib/src/boost/detail/winapi/crypt.hpp create mode 100644 contrib/src/boost/detail/winapi/detail/cast_ptr.hpp create mode 100644 contrib/src/boost/detail/winapi/process.hpp create mode 100644 contrib/src/boost/detail/winapi/thread.hpp create mode 100644 contrib/src/boost/detail/winapi/timers.hpp create mode 100644 contrib/src/boost/detail/workaround.hpp create mode 100644 contrib/src/boost/dynamic_bitset.hpp create mode 100644 contrib/src/boost/dynamic_bitset/config.hpp create mode 100644 contrib/src/boost/dynamic_bitset/dynamic_bitset.hpp create mode 100644 contrib/src/boost/dynamic_bitset_fwd.hpp create mode 100644 contrib/src/boost/exception/exception.hpp create mode 100644 contrib/src/boost/function.hpp create mode 100644 contrib/src/boost/function/detail/function_iterate.hpp create mode 100644 contrib/src/boost/function/detail/gen_maybe_include.pl create mode 100644 contrib/src/boost/function/detail/maybe_include.hpp create mode 100644 contrib/src/boost/function/detail/prologue.hpp create mode 100644 contrib/src/boost/function/function0.hpp create mode 100644 contrib/src/boost/function/function1.hpp create mode 100644 contrib/src/boost/function/function10.hpp create mode 100644 contrib/src/boost/function/function2.hpp create mode 100644 contrib/src/boost/function/function3.hpp create mode 100644 contrib/src/boost/function/function4.hpp create mode 100644 contrib/src/boost/function/function5.hpp create mode 100644 contrib/src/boost/function/function6.hpp create mode 100644 contrib/src/boost/function/function7.hpp create mode 100644 contrib/src/boost/function/function8.hpp create mode 100644 contrib/src/boost/function/function9.hpp create mode 100644 contrib/src/boost/function/function_base.hpp create mode 100644 contrib/src/boost/function/function_fwd.hpp create mode 100644 contrib/src/boost/function/function_template.hpp create mode 100644 contrib/src/boost/function_equal.hpp create mode 100644 contrib/src/boost/get_pointer.hpp create mode 100644 contrib/src/boost/integer.hpp create mode 100644 contrib/src/boost/integer/integer_log2.hpp create mode 100644 contrib/src/boost/integer/integer_mask.hpp create mode 100644 contrib/src/boost/integer/static_log2.hpp create mode 100644 contrib/src/boost/integer_fwd.hpp create mode 100644 contrib/src/boost/integer_traits.hpp create mode 100644 contrib/src/boost/io/ios_state.hpp create mode 100644 contrib/src/boost/io_fwd.hpp create mode 100644 contrib/src/boost/iterator.hpp create mode 100644 contrib/src/boost/iterator/detail/config_def.hpp create mode 100644 contrib/src/boost/iterator/detail/config_undef.hpp create mode 100644 contrib/src/boost/iterator/detail/enable_if.hpp create mode 100644 contrib/src/boost/iterator/detail/facade_iterator_category.hpp create mode 100644 contrib/src/boost/iterator/interoperable.hpp create mode 100644 contrib/src/boost/iterator/iterator_adaptor.hpp create mode 100644 contrib/src/boost/iterator/iterator_categories.hpp create mode 100644 contrib/src/boost/iterator/iterator_concepts.hpp create mode 100644 contrib/src/boost/iterator/iterator_facade.hpp create mode 100644 contrib/src/boost/iterator/iterator_traits.hpp create mode 100644 contrib/src/boost/iterator/reverse_iterator.hpp create mode 100644 contrib/src/boost/iterator/transform_iterator.hpp create mode 100644 contrib/src/boost/limits.hpp create mode 100644 contrib/src/boost/mem_fn.hpp create mode 100644 contrib/src/boost/move/algorithm.hpp create mode 100644 contrib/src/boost/move/core.hpp create mode 100644 contrib/src/boost/move/detail/config_begin.hpp create mode 100644 contrib/src/boost/move/detail/config_end.hpp create mode 100644 contrib/src/boost/move/detail/iterator_traits.hpp create mode 100644 contrib/src/boost/move/detail/meta_utils.hpp create mode 100644 contrib/src/boost/move/detail/meta_utils_core.hpp create mode 100644 contrib/src/boost/move/detail/std_ns_begin.hpp create mode 100644 contrib/src/boost/move/detail/std_ns_end.hpp create mode 100644 contrib/src/boost/move/detail/type_traits.hpp create mode 100644 contrib/src/boost/move/detail/workaround.hpp create mode 100644 contrib/src/boost/move/iterator.hpp create mode 100644 contrib/src/boost/move/move.hpp create mode 100644 contrib/src/boost/move/traits.hpp create mode 100644 contrib/src/boost/move/utility.hpp create mode 100644 contrib/src/boost/move/utility_core.hpp create mode 100644 contrib/src/boost/mpl/always.hpp create mode 100644 contrib/src/boost/mpl/and.hpp create mode 100644 contrib/src/boost/mpl/apply.hpp create mode 100644 contrib/src/boost/mpl/apply_fwd.hpp create mode 100644 contrib/src/boost/mpl/apply_wrap.hpp create mode 100644 contrib/src/boost/mpl/arg.hpp create mode 100644 contrib/src/boost/mpl/arg_fwd.hpp create mode 100644 contrib/src/boost/mpl/assert.hpp create mode 100644 contrib/src/boost/mpl/aux_/adl_barrier.hpp create mode 100644 contrib/src/boost/mpl/aux_/arg_typedef.hpp create mode 100644 contrib/src/boost/mpl/aux_/arity.hpp create mode 100644 contrib/src/boost/mpl/aux_/arity_spec.hpp create mode 100644 contrib/src/boost/mpl/aux_/common_name_wknd.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/adl.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/arrays.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/bcc.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/compiler.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/dtp.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/eti.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/gcc.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/gpu.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/has_apply.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/has_xxx.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/integral.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/intel.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/lambda.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/msvc.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/msvc_typename.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/nttp.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/overload_resolution.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/pp_counter.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/preprocessor.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/static_constant.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/ttp.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/use_preprocessed.hpp create mode 100644 contrib/src/boost/mpl/aux_/config/workaround.hpp create mode 100644 contrib/src/boost/mpl/aux_/count_args.hpp create mode 100644 contrib/src/boost/mpl/aux_/full_lambda.hpp create mode 100644 contrib/src/boost/mpl/aux_/has_apply.hpp create mode 100644 contrib/src/boost/mpl/aux_/has_rebind.hpp create mode 100644 contrib/src/boost/mpl/aux_/has_type.hpp create mode 100644 contrib/src/boost/mpl/aux_/include_preprocessed.hpp create mode 100644 contrib/src/boost/mpl/aux_/integral_wrapper.hpp create mode 100644 contrib/src/boost/mpl/aux_/lambda_arity_param.hpp create mode 100644 contrib/src/boost/mpl/aux_/lambda_no_ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/lambda_support.hpp create mode 100644 contrib/src/boost/mpl/aux_/logical_op.hpp create mode 100644 contrib/src/boost/mpl/aux_/msvc_dtw.hpp create mode 100644 contrib/src/boost/mpl/aux_/msvc_is_class.hpp create mode 100644 contrib/src/boost/mpl/aux_/msvc_never_true.hpp create mode 100644 contrib/src/boost/mpl/aux_/na.hpp create mode 100644 contrib/src/boost/mpl/aux_/na_assert.hpp create mode 100644 contrib/src/boost/mpl/aux_/na_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/na_spec.hpp create mode 100644 contrib/src/boost/mpl/aux_/nested_type_wknd.hpp create mode 100644 contrib/src/boost/mpl/aux_/nttp_decl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/and.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/apply.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/arg.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/bitand.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/bitor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/deque.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/divides.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/greater.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/inherit.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/less.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/list.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/list_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/map.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/minus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/modulus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/or.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/plus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/quote.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/set.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/set_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/times.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/vector.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/and.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/apply.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/arg.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/deque.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/divides.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/greater.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/less.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/list.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/map.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/minus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/or.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/plus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/quote.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/set.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/times.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/vector.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/and.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/apply.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/arg.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/bitand.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/bitor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/deque.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/divides.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/greater.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/inherit.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/less.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/list.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/list_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/map.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/minus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/modulus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/or.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/plus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/quote.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/set.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/set_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/times.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/vector.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/and.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/apply.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/arg.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/bitand.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/bitor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/deque.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/divides.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/greater.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/inherit.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/less.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/list.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/list_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/map.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/minus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/modulus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/or.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/plus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/quote.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/set.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/set_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/times.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/vector.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/and.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/apply.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/arg.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/deque.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/divides.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/greater.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/less.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/list.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/map.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/minus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/or.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/plus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/quote.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/set.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/times.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/vector.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/and.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/apply.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/arg.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/deque.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/divides.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/greater.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/less.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/list.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/map.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/minus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/or.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/plus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/quote.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/set.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/times.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/vector.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/and.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/apply.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/arg.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/deque.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/divides.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/greater.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/less.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/list.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/map.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/minus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/or.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/plus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/quote.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/set.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/times.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/vector.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/and.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/less.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/list.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/map.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/or.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/set.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/times.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/and.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/less.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/list.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/map.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/or.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/set.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/times.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/and.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/apply.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/arg.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/bind.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/bitand.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/bitor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/bitxor.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/deque.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/divides.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/greater.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/inherit.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/less.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/less_equal.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/list.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/list_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/map.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/minus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/modulus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/or.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/placeholders.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/plus.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/quote.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/set.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/set_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/shift_left.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/shift_right.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/template_arity.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/times.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/vector.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessed/plain/vector_c.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessor/add.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessor/def_params_tail.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessor/default_params.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessor/enum.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessor/ext_params.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessor/filter_params.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessor/params.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessor/partial_spec_params.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessor/range.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessor/repeat.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessor/sub.hpp create mode 100644 contrib/src/boost/mpl/aux_/preprocessor/tuple.hpp create mode 100644 contrib/src/boost/mpl/aux_/static_cast.hpp create mode 100644 contrib/src/boost/mpl/aux_/template_arity.hpp create mode 100644 contrib/src/boost/mpl/aux_/template_arity_fwd.hpp create mode 100644 contrib/src/boost/mpl/aux_/type_wrapper.hpp create mode 100644 contrib/src/boost/mpl/aux_/value_wknd.hpp create mode 100644 contrib/src/boost/mpl/aux_/yes_no.hpp create mode 100644 contrib/src/boost/mpl/bind.hpp create mode 100644 contrib/src/boost/mpl/bind_fwd.hpp create mode 100644 contrib/src/boost/mpl/bool.hpp create mode 100644 contrib/src/boost/mpl/bool_fwd.hpp create mode 100644 contrib/src/boost/mpl/eval_if.hpp create mode 100644 contrib/src/boost/mpl/has_xxx.hpp create mode 100644 contrib/src/boost/mpl/identity.hpp create mode 100644 contrib/src/boost/mpl/if.hpp create mode 100644 contrib/src/boost/mpl/int.hpp create mode 100644 contrib/src/boost/mpl/int_fwd.hpp create mode 100644 contrib/src/boost/mpl/integral_c_tag.hpp create mode 100644 contrib/src/boost/mpl/is_placeholder.hpp create mode 100644 contrib/src/boost/mpl/lambda.hpp create mode 100644 contrib/src/boost/mpl/lambda_fwd.hpp create mode 100644 contrib/src/boost/mpl/limits/arity.hpp create mode 100644 contrib/src/boost/mpl/logical.hpp create mode 100644 contrib/src/boost/mpl/next.hpp create mode 100644 contrib/src/boost/mpl/next_prior.hpp create mode 100644 contrib/src/boost/mpl/not.hpp create mode 100644 contrib/src/boost/mpl/or.hpp create mode 100644 contrib/src/boost/mpl/placeholders.hpp create mode 100644 contrib/src/boost/mpl/protect.hpp create mode 100644 contrib/src/boost/mpl/quote.hpp create mode 100644 contrib/src/boost/mpl/void.hpp create mode 100644 contrib/src/boost/mpl/void_fwd.hpp create mode 100644 contrib/src/boost/next_prior.hpp create mode 100644 contrib/src/boost/noncopyable.hpp create mode 100644 contrib/src/boost/pending/integer_log2.hpp create mode 100644 contrib/src/boost/pending/lowest_bit.hpp create mode 100644 contrib/src/boost/predef.h create mode 100644 contrib/src/boost/predef/architecture.h create mode 100644 contrib/src/boost/predef/architecture/alpha.h create mode 100644 contrib/src/boost/predef/architecture/arm.h create mode 100644 contrib/src/boost/predef/architecture/blackfin.h create mode 100644 contrib/src/boost/predef/architecture/convex.h create mode 100644 contrib/src/boost/predef/architecture/ia64.h create mode 100644 contrib/src/boost/predef/architecture/m68k.h create mode 100644 contrib/src/boost/predef/architecture/mips.h create mode 100644 contrib/src/boost/predef/architecture/parisc.h create mode 100644 contrib/src/boost/predef/architecture/ppc.h create mode 100644 contrib/src/boost/predef/architecture/pyramid.h create mode 100644 contrib/src/boost/predef/architecture/rs6k.h create mode 100644 contrib/src/boost/predef/architecture/sparc.h create mode 100644 contrib/src/boost/predef/architecture/superh.h create mode 100644 contrib/src/boost/predef/architecture/sys370.h create mode 100644 contrib/src/boost/predef/architecture/sys390.h create mode 100644 contrib/src/boost/predef/architecture/x86.h create mode 100644 contrib/src/boost/predef/architecture/x86/32.h create mode 100644 contrib/src/boost/predef/architecture/x86/64.h create mode 100644 contrib/src/boost/predef/architecture/z.h create mode 100644 contrib/src/boost/predef/compiler.h create mode 100644 contrib/src/boost/predef/compiler/borland.h create mode 100644 contrib/src/boost/predef/compiler/clang.h create mode 100644 contrib/src/boost/predef/compiler/comeau.h create mode 100644 contrib/src/boost/predef/compiler/compaq.h create mode 100644 contrib/src/boost/predef/compiler/diab.h create mode 100644 contrib/src/boost/predef/compiler/digitalmars.h create mode 100644 contrib/src/boost/predef/compiler/dignus.h create mode 100644 contrib/src/boost/predef/compiler/edg.h create mode 100644 contrib/src/boost/predef/compiler/ekopath.h create mode 100644 contrib/src/boost/predef/compiler/gcc.h create mode 100644 contrib/src/boost/predef/compiler/gcc_xml.h create mode 100644 contrib/src/boost/predef/compiler/greenhills.h create mode 100644 contrib/src/boost/predef/compiler/hp_acc.h create mode 100644 contrib/src/boost/predef/compiler/iar.h create mode 100644 contrib/src/boost/predef/compiler/ibm.h create mode 100644 contrib/src/boost/predef/compiler/intel.h create mode 100644 contrib/src/boost/predef/compiler/kai.h create mode 100644 contrib/src/boost/predef/compiler/llvm.h create mode 100644 contrib/src/boost/predef/compiler/metaware.h create mode 100644 contrib/src/boost/predef/compiler/metrowerks.h create mode 100644 contrib/src/boost/predef/compiler/microtec.h create mode 100644 contrib/src/boost/predef/compiler/mpw.h create mode 100644 contrib/src/boost/predef/compiler/palm.h create mode 100644 contrib/src/boost/predef/compiler/pgi.h create mode 100644 contrib/src/boost/predef/compiler/sgi_mipspro.h create mode 100644 contrib/src/boost/predef/compiler/sunpro.h create mode 100644 contrib/src/boost/predef/compiler/tendra.h create mode 100644 contrib/src/boost/predef/compiler/visualc.h create mode 100644 contrib/src/boost/predef/compiler/watcom.h create mode 100644 contrib/src/boost/predef/detail/_cassert.h create mode 100644 contrib/src/boost/predef/detail/_exception.h create mode 100644 contrib/src/boost/predef/detail/comp_detected.h create mode 100644 contrib/src/boost/predef/detail/os_detected.h create mode 100644 contrib/src/boost/predef/detail/platform_detected.h create mode 100644 contrib/src/boost/predef/detail/test.h create mode 100644 contrib/src/boost/predef/hardware.h create mode 100644 contrib/src/boost/predef/hardware/simd.h create mode 100644 contrib/src/boost/predef/hardware/simd/arm.h create mode 100644 contrib/src/boost/predef/hardware/simd/arm/versions.h create mode 100644 contrib/src/boost/predef/hardware/simd/ppc.h create mode 100644 contrib/src/boost/predef/hardware/simd/ppc/versions.h create mode 100644 contrib/src/boost/predef/hardware/simd/x86.h create mode 100644 contrib/src/boost/predef/hardware/simd/x86/versions.h create mode 100644 contrib/src/boost/predef/hardware/simd/x86_amd.h create mode 100644 contrib/src/boost/predef/hardware/simd/x86_amd/versions.h create mode 100644 contrib/src/boost/predef/language.h create mode 100644 contrib/src/boost/predef/language/objc.h create mode 100644 contrib/src/boost/predef/language/stdc.h create mode 100644 contrib/src/boost/predef/language/stdcpp.h create mode 100644 contrib/src/boost/predef/library.h create mode 100644 contrib/src/boost/predef/library/c.h create mode 100644 contrib/src/boost/predef/library/c/_prefix.h create mode 100644 contrib/src/boost/predef/library/c/gnu.h create mode 100644 contrib/src/boost/predef/library/c/uc.h create mode 100644 contrib/src/boost/predef/library/c/vms.h create mode 100644 contrib/src/boost/predef/library/c/zos.h create mode 100644 contrib/src/boost/predef/library/std.h create mode 100644 contrib/src/boost/predef/library/std/_prefix.h create mode 100644 contrib/src/boost/predef/library/std/cxx.h create mode 100644 contrib/src/boost/predef/library/std/dinkumware.h create mode 100644 contrib/src/boost/predef/library/std/libcomo.h create mode 100644 contrib/src/boost/predef/library/std/modena.h create mode 100644 contrib/src/boost/predef/library/std/msl.h create mode 100644 contrib/src/boost/predef/library/std/roguewave.h create mode 100644 contrib/src/boost/predef/library/std/sgi.h create mode 100644 contrib/src/boost/predef/library/std/stdcpp3.h create mode 100644 contrib/src/boost/predef/library/std/stlport.h create mode 100644 contrib/src/boost/predef/library/std/vacpp.h create mode 100644 contrib/src/boost/predef/make.h create mode 100644 contrib/src/boost/predef/os.h create mode 100644 contrib/src/boost/predef/os/aix.h create mode 100644 contrib/src/boost/predef/os/amigaos.h create mode 100644 contrib/src/boost/predef/os/android.h create mode 100644 contrib/src/boost/predef/os/beos.h create mode 100644 contrib/src/boost/predef/os/bsd.h create mode 100644 contrib/src/boost/predef/os/bsd/bsdi.h create mode 100644 contrib/src/boost/predef/os/bsd/dragonfly.h create mode 100644 contrib/src/boost/predef/os/bsd/free.h create mode 100644 contrib/src/boost/predef/os/bsd/net.h create mode 100644 contrib/src/boost/predef/os/bsd/open.h create mode 100644 contrib/src/boost/predef/os/cygwin.h create mode 100644 contrib/src/boost/predef/os/haiku.h create mode 100644 contrib/src/boost/predef/os/hpux.h create mode 100644 contrib/src/boost/predef/os/ios.h create mode 100644 contrib/src/boost/predef/os/irix.h create mode 100644 contrib/src/boost/predef/os/linux.h create mode 100644 contrib/src/boost/predef/os/macos.h create mode 100644 contrib/src/boost/predef/os/os400.h create mode 100644 contrib/src/boost/predef/os/qnxnto.h create mode 100644 contrib/src/boost/predef/os/solaris.h create mode 100644 contrib/src/boost/predef/os/unix.h create mode 100644 contrib/src/boost/predef/os/vms.h create mode 100644 contrib/src/boost/predef/os/windows.h create mode 100644 contrib/src/boost/predef/other.h create mode 100644 contrib/src/boost/predef/other/endian.h create mode 100644 contrib/src/boost/predef/platform.h create mode 100644 contrib/src/boost/predef/platform/mingw.h create mode 100644 contrib/src/boost/predef/platform/windows_desktop.h create mode 100644 contrib/src/boost/predef/platform/windows_phone.h create mode 100644 contrib/src/boost/predef/platform/windows_runtime.h create mode 100644 contrib/src/boost/predef/platform/windows_store.h create mode 100644 contrib/src/boost/predef/version.h create mode 100644 contrib/src/boost/predef/version_number.h create mode 100644 contrib/src/boost/preprocessor/arithmetic/add.hpp create mode 100644 contrib/src/boost/preprocessor/arithmetic/dec.hpp create mode 100644 contrib/src/boost/preprocessor/arithmetic/detail/div_base.hpp create mode 100644 contrib/src/boost/preprocessor/arithmetic/inc.hpp create mode 100644 contrib/src/boost/preprocessor/arithmetic/mod.hpp create mode 100644 contrib/src/boost/preprocessor/arithmetic/sub.hpp create mode 100644 contrib/src/boost/preprocessor/array/data.hpp create mode 100644 contrib/src/boost/preprocessor/array/elem.hpp create mode 100644 contrib/src/boost/preprocessor/array/size.hpp create mode 100644 contrib/src/boost/preprocessor/cat.hpp create mode 100644 contrib/src/boost/preprocessor/comma_if.hpp create mode 100644 contrib/src/boost/preprocessor/comparison/less_equal.hpp create mode 100644 contrib/src/boost/preprocessor/comparison/not_equal.hpp create mode 100644 contrib/src/boost/preprocessor/config/config.hpp create mode 100644 contrib/src/boost/preprocessor/control/deduce_d.hpp create mode 100644 contrib/src/boost/preprocessor/control/detail/dmc/while.hpp create mode 100644 contrib/src/boost/preprocessor/control/detail/edg/while.hpp create mode 100644 contrib/src/boost/preprocessor/control/detail/msvc/while.hpp create mode 100644 contrib/src/boost/preprocessor/control/detail/while.hpp create mode 100644 contrib/src/boost/preprocessor/control/expr_if.hpp create mode 100644 contrib/src/boost/preprocessor/control/expr_iif.hpp create mode 100644 contrib/src/boost/preprocessor/control/if.hpp create mode 100644 contrib/src/boost/preprocessor/control/iif.hpp create mode 100644 contrib/src/boost/preprocessor/control/while.hpp create mode 100644 contrib/src/boost/preprocessor/debug/error.hpp create mode 100644 contrib/src/boost/preprocessor/dec.hpp create mode 100644 contrib/src/boost/preprocessor/detail/auto_rec.hpp create mode 100644 contrib/src/boost/preprocessor/detail/check.hpp create mode 100644 contrib/src/boost/preprocessor/detail/dmc/auto_rec.hpp create mode 100644 contrib/src/boost/preprocessor/detail/is_binary.hpp create mode 100644 contrib/src/boost/preprocessor/detail/split.hpp create mode 100644 contrib/src/boost/preprocessor/empty.hpp create mode 100644 contrib/src/boost/preprocessor/enum.hpp create mode 100644 contrib/src/boost/preprocessor/enum_params.hpp create mode 100644 contrib/src/boost/preprocessor/enum_shifted_params.hpp create mode 100644 contrib/src/boost/preprocessor/expr_if.hpp create mode 100644 contrib/src/boost/preprocessor/facilities/detail/is_empty.hpp create mode 100644 contrib/src/boost/preprocessor/facilities/empty.hpp create mode 100644 contrib/src/boost/preprocessor/facilities/expand.hpp create mode 100644 contrib/src/boost/preprocessor/facilities/identity.hpp create mode 100644 contrib/src/boost/preprocessor/facilities/intercept.hpp create mode 100644 contrib/src/boost/preprocessor/facilities/is_1.hpp create mode 100644 contrib/src/boost/preprocessor/facilities/is_empty.hpp create mode 100644 contrib/src/boost/preprocessor/facilities/is_empty_variadic.hpp create mode 100644 contrib/src/boost/preprocessor/facilities/overload.hpp create mode 100644 contrib/src/boost/preprocessor/identity.hpp create mode 100644 contrib/src/boost/preprocessor/inc.hpp create mode 100644 contrib/src/boost/preprocessor/iterate.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/bounds/lower1.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/bounds/lower2.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/bounds/lower3.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/bounds/lower4.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/bounds/lower5.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/bounds/upper1.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/bounds/upper2.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/bounds/upper3.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/bounds/upper4.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/bounds/upper5.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/finish.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/iter/forward1.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/iter/forward2.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/iter/forward3.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/iter/forward4.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/iter/forward5.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/iter/reverse1.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/iter/reverse2.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/iter/reverse3.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/iter/reverse4.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/iter/reverse5.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/local.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/rlocal.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/self.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/detail/start.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/iterate.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/local.hpp create mode 100644 contrib/src/boost/preprocessor/iteration/self.hpp create mode 100644 contrib/src/boost/preprocessor/list/adt.hpp create mode 100644 contrib/src/boost/preprocessor/list/detail/dmc/fold_left.hpp create mode 100644 contrib/src/boost/preprocessor/list/detail/edg/fold_left.hpp create mode 100644 contrib/src/boost/preprocessor/list/detail/edg/fold_right.hpp create mode 100644 contrib/src/boost/preprocessor/list/detail/fold_left.hpp create mode 100644 contrib/src/boost/preprocessor/list/detail/fold_right.hpp create mode 100644 contrib/src/boost/preprocessor/list/fold_left.hpp create mode 100644 contrib/src/boost/preprocessor/list/fold_right.hpp create mode 100644 contrib/src/boost/preprocessor/list/for_each_i.hpp create mode 100644 contrib/src/boost/preprocessor/list/reverse.hpp create mode 100644 contrib/src/boost/preprocessor/logical/and.hpp create mode 100644 contrib/src/boost/preprocessor/logical/bitand.hpp create mode 100644 contrib/src/boost/preprocessor/logical/bool.hpp create mode 100644 contrib/src/boost/preprocessor/logical/compl.hpp create mode 100644 contrib/src/boost/preprocessor/logical/not.hpp create mode 100644 contrib/src/boost/preprocessor/punctuation/comma.hpp create mode 100644 contrib/src/boost/preprocessor/punctuation/comma_if.hpp create mode 100644 contrib/src/boost/preprocessor/punctuation/detail/is_begin_parens.hpp create mode 100644 contrib/src/boost/preprocessor/punctuation/is_begin_parens.hpp create mode 100644 contrib/src/boost/preprocessor/repeat.hpp create mode 100644 contrib/src/boost/preprocessor/repetition/detail/dmc/for.hpp create mode 100644 contrib/src/boost/preprocessor/repetition/detail/edg/for.hpp create mode 100644 contrib/src/boost/preprocessor/repetition/detail/for.hpp create mode 100644 contrib/src/boost/preprocessor/repetition/detail/msvc/for.hpp create mode 100644 contrib/src/boost/preprocessor/repetition/enum.hpp create mode 100644 contrib/src/boost/preprocessor/repetition/enum_binary_params.hpp create mode 100644 contrib/src/boost/preprocessor/repetition/enum_params.hpp create mode 100644 contrib/src/boost/preprocessor/repetition/enum_shifted_params.hpp create mode 100644 contrib/src/boost/preprocessor/repetition/enum_trailing_params.hpp create mode 100644 contrib/src/boost/preprocessor/repetition/for.hpp create mode 100644 contrib/src/boost/preprocessor/repetition/repeat.hpp create mode 100644 contrib/src/boost/preprocessor/repetition/repeat_from_to.hpp create mode 100644 contrib/src/boost/preprocessor/seq/cat.hpp create mode 100644 contrib/src/boost/preprocessor/seq/detail/is_empty.hpp create mode 100644 contrib/src/boost/preprocessor/seq/detail/split.hpp create mode 100644 contrib/src/boost/preprocessor/seq/elem.hpp create mode 100644 contrib/src/boost/preprocessor/seq/enum.hpp create mode 100644 contrib/src/boost/preprocessor/seq/first_n.hpp create mode 100644 contrib/src/boost/preprocessor/seq/fold_left.hpp create mode 100644 contrib/src/boost/preprocessor/seq/for_each_i.hpp create mode 100644 contrib/src/boost/preprocessor/seq/rest_n.hpp create mode 100644 contrib/src/boost/preprocessor/seq/seq.hpp create mode 100644 contrib/src/boost/preprocessor/seq/size.hpp create mode 100644 contrib/src/boost/preprocessor/seq/subseq.hpp create mode 100644 contrib/src/boost/preprocessor/seq/transform.hpp create mode 100644 contrib/src/boost/preprocessor/slot/detail/counter.hpp create mode 100644 contrib/src/boost/preprocessor/slot/detail/def.hpp create mode 100644 contrib/src/boost/preprocessor/slot/detail/shared.hpp create mode 100644 contrib/src/boost/preprocessor/slot/detail/slot1.hpp create mode 100644 contrib/src/boost/preprocessor/slot/detail/slot2.hpp create mode 100644 contrib/src/boost/preprocessor/slot/detail/slot3.hpp create mode 100644 contrib/src/boost/preprocessor/slot/detail/slot4.hpp create mode 100644 contrib/src/boost/preprocessor/slot/detail/slot5.hpp create mode 100644 contrib/src/boost/preprocessor/slot/slot.hpp create mode 100644 contrib/src/boost/preprocessor/stringize.hpp create mode 100644 contrib/src/boost/preprocessor/tuple/detail/is_single_return.hpp create mode 100644 contrib/src/boost/preprocessor/tuple/eat.hpp create mode 100644 contrib/src/boost/preprocessor/tuple/elem.hpp create mode 100644 contrib/src/boost/preprocessor/tuple/rem.hpp create mode 100644 contrib/src/boost/preprocessor/tuple/size.hpp create mode 100644 contrib/src/boost/preprocessor/tuple/to_list.hpp create mode 100644 contrib/src/boost/preprocessor/variadic/elem.hpp create mode 100644 contrib/src/boost/preprocessor/variadic/size.hpp create mode 100644 contrib/src/boost/random/detail/config.hpp create mode 100644 contrib/src/boost/random/detail/const_mod.hpp create mode 100644 contrib/src/boost/random/detail/disable_warnings.hpp create mode 100644 contrib/src/boost/random/detail/enable_warnings.hpp create mode 100644 contrib/src/boost/random/detail/generator_bits.hpp create mode 100644 contrib/src/boost/random/detail/generator_seed_seq.hpp create mode 100644 contrib/src/boost/random/detail/integer_log2.hpp create mode 100644 contrib/src/boost/random/detail/large_arithmetic.hpp create mode 100644 contrib/src/boost/random/detail/operators.hpp create mode 100644 contrib/src/boost/random/detail/polynomial.hpp create mode 100644 contrib/src/boost/random/detail/ptr_helper.hpp create mode 100644 contrib/src/boost/random/detail/seed.hpp create mode 100644 contrib/src/boost/random/detail/seed_impl.hpp create mode 100644 contrib/src/boost/random/detail/signed_unsigned_tools.hpp create mode 100644 contrib/src/boost/random/detail/uniform_int_float.hpp create mode 100644 contrib/src/boost/random/mersenne_twister.hpp create mode 100644 contrib/src/boost/random/traits.hpp create mode 100644 contrib/src/boost/random/uniform_int.hpp create mode 100644 contrib/src/boost/random/uniform_int_distribution.hpp create mode 100644 contrib/src/boost/random/variate_generator.hpp create mode 100644 contrib/src/boost/range/algorithm/equal.hpp create mode 100644 contrib/src/boost/range/as_literal.hpp create mode 100644 contrib/src/boost/range/begin.hpp create mode 100644 contrib/src/boost/range/concepts.hpp create mode 100644 contrib/src/boost/range/config.hpp create mode 100644 contrib/src/boost/range/const_iterator.hpp create mode 100644 contrib/src/boost/range/detail/as_literal.hpp create mode 100644 contrib/src/boost/range/detail/begin.hpp create mode 100644 contrib/src/boost/range/detail/common.hpp create mode 100644 contrib/src/boost/range/detail/detail_str.hpp create mode 100644 contrib/src/boost/range/detail/end.hpp create mode 100644 contrib/src/boost/range/detail/extract_optional_type.hpp create mode 100644 contrib/src/boost/range/detail/has_member_size.hpp create mode 100644 contrib/src/boost/range/detail/implementation_help.hpp create mode 100644 contrib/src/boost/range/detail/misc_concept.hpp create mode 100644 contrib/src/boost/range/detail/msvc_has_iterator_workaround.hpp create mode 100644 contrib/src/boost/range/detail/remove_extent.hpp create mode 100644 contrib/src/boost/range/detail/safe_bool.hpp create mode 100644 contrib/src/boost/range/detail/sfinae.hpp create mode 100644 contrib/src/boost/range/detail/size_type.hpp create mode 100644 contrib/src/boost/range/detail/str_types.hpp create mode 100644 contrib/src/boost/range/detail/value_type.hpp create mode 100644 contrib/src/boost/range/difference_type.hpp create mode 100644 contrib/src/boost/range/distance.hpp create mode 100644 contrib/src/boost/range/empty.hpp create mode 100644 contrib/src/boost/range/end.hpp create mode 100644 contrib/src/boost/range/functions.hpp create mode 100644 contrib/src/boost/range/has_range_iterator.hpp create mode 100644 contrib/src/boost/range/iterator.hpp create mode 100644 contrib/src/boost/range/iterator_range.hpp create mode 100644 contrib/src/boost/range/iterator_range_core.hpp create mode 100644 contrib/src/boost/range/iterator_range_io.hpp create mode 100644 contrib/src/boost/range/mutable_iterator.hpp create mode 100644 contrib/src/boost/range/range_fwd.hpp create mode 100644 contrib/src/boost/range/rbegin.hpp create mode 100644 contrib/src/boost/range/rend.hpp create mode 100644 contrib/src/boost/range/reverse_iterator.hpp create mode 100644 contrib/src/boost/range/size.hpp create mode 100644 contrib/src/boost/range/size_type.hpp create mode 100644 contrib/src/boost/range/value_type.hpp create mode 100644 contrib/src/boost/ref.hpp create mode 100644 contrib/src/boost/shared_ptr.hpp create mode 100644 contrib/src/boost/smart_ptr/bad_weak_ptr.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/lightweight_mutex.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/lwm_nop.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/lwm_pthreads.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/lwm_win32_cs.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/operator_bool.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/quick_allocator.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/shared_count.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_convertible.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_aix.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_clang.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_nt.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_pt.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_spin.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_sync.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_base_w32.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_counted_impl.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_disable_deprecated.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_has_sync.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_interlocked.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/sp_nullptr_t.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/spinlock.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/spinlock_gcc_arm.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/spinlock_nt.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/spinlock_pool.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/spinlock_pt.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/spinlock_std_atomic.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/spinlock_sync.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/spinlock_w32.hpp create mode 100644 contrib/src/boost/smart_ptr/detail/yield_k.hpp create mode 100644 contrib/src/boost/smart_ptr/shared_ptr.hpp create mode 100644 contrib/src/boost/static_assert.hpp create mode 100644 contrib/src/boost/throw_exception.hpp create mode 100644 contrib/src/boost/type_traits/add_const.hpp create mode 100644 contrib/src/boost/type_traits/add_lvalue_reference.hpp create mode 100644 contrib/src/boost/type_traits/add_pointer.hpp create mode 100644 contrib/src/boost/type_traits/add_reference.hpp create mode 100644 contrib/src/boost/type_traits/add_rvalue_reference.hpp create mode 100644 contrib/src/boost/type_traits/add_volatile.hpp create mode 100644 contrib/src/boost/type_traits/alignment_of.hpp create mode 100644 contrib/src/boost/type_traits/composite_traits.hpp create mode 100644 contrib/src/boost/type_traits/conditional.hpp create mode 100644 contrib/src/boost/type_traits/conversion_traits.hpp create mode 100644 contrib/src/boost/type_traits/declval.hpp create mode 100644 contrib/src/boost/type_traits/detail/config.hpp create mode 100644 contrib/src/boost/type_traits/detail/has_binary_operator.hpp create mode 100644 contrib/src/boost/type_traits/detail/is_function_ptr_helper.hpp create mode 100644 contrib/src/boost/type_traits/detail/is_function_ptr_tester.hpp create mode 100644 contrib/src/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp create mode 100644 contrib/src/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp create mode 100644 contrib/src/boost/type_traits/detail/yes_no_type.hpp create mode 100644 contrib/src/boost/type_traits/function_traits.hpp create mode 100644 contrib/src/boost/type_traits/has_minus.hpp create mode 100644 contrib/src/boost/type_traits/has_minus_assign.hpp create mode 100644 contrib/src/boost/type_traits/has_plus.hpp create mode 100644 contrib/src/boost/type_traits/has_plus_assign.hpp create mode 100644 contrib/src/boost/type_traits/has_trivial_copy.hpp create mode 100644 contrib/src/boost/type_traits/has_trivial_destructor.hpp create mode 100644 contrib/src/boost/type_traits/integral_constant.hpp create mode 100644 contrib/src/boost/type_traits/integral_promotion.hpp create mode 100644 contrib/src/boost/type_traits/intrinsics.hpp create mode 100644 contrib/src/boost/type_traits/is_abstract.hpp create mode 100644 contrib/src/boost/type_traits/is_arithmetic.hpp create mode 100644 contrib/src/boost/type_traits/is_array.hpp create mode 100644 contrib/src/boost/type_traits/is_base_and_derived.hpp create mode 100644 contrib/src/boost/type_traits/is_base_of.hpp create mode 100644 contrib/src/boost/type_traits/is_class.hpp create mode 100644 contrib/src/boost/type_traits/is_const.hpp create mode 100644 contrib/src/boost/type_traits/is_constructible.hpp create mode 100644 contrib/src/boost/type_traits/is_convertible.hpp create mode 100644 contrib/src/boost/type_traits/is_copy_constructible.hpp create mode 100644 contrib/src/boost/type_traits/is_default_constructible.hpp create mode 100644 contrib/src/boost/type_traits/is_destructible.hpp create mode 100644 contrib/src/boost/type_traits/is_enum.hpp create mode 100644 contrib/src/boost/type_traits/is_floating_point.hpp create mode 100644 contrib/src/boost/type_traits/is_function.hpp create mode 100644 contrib/src/boost/type_traits/is_fundamental.hpp create mode 100644 contrib/src/boost/type_traits/is_integral.hpp create mode 100644 contrib/src/boost/type_traits/is_lvalue_reference.hpp create mode 100644 contrib/src/boost/type_traits/is_member_function_pointer.hpp create mode 100644 contrib/src/boost/type_traits/is_member_pointer.hpp create mode 100644 contrib/src/boost/type_traits/is_pod.hpp create mode 100644 contrib/src/boost/type_traits/is_pointer.hpp create mode 100644 contrib/src/boost/type_traits/is_polymorphic.hpp create mode 100644 contrib/src/boost/type_traits/is_reference.hpp create mode 100644 contrib/src/boost/type_traits/is_rvalue_reference.hpp create mode 100644 contrib/src/boost/type_traits/is_same.hpp create mode 100644 contrib/src/boost/type_traits/is_scalar.hpp create mode 100644 contrib/src/boost/type_traits/is_signed.hpp create mode 100644 contrib/src/boost/type_traits/is_union.hpp create mode 100644 contrib/src/boost/type_traits/is_unsigned.hpp create mode 100644 contrib/src/boost/type_traits/is_void.hpp create mode 100644 contrib/src/boost/type_traits/is_volatile.hpp create mode 100644 contrib/src/boost/type_traits/make_signed.hpp create mode 100644 contrib/src/boost/type_traits/make_unsigned.hpp create mode 100644 contrib/src/boost/type_traits/remove_const.hpp create mode 100644 contrib/src/boost/type_traits/remove_cv.hpp create mode 100644 contrib/src/boost/type_traits/remove_pointer.hpp create mode 100644 contrib/src/boost/type_traits/remove_reference.hpp create mode 100644 contrib/src/boost/type_traits/type_with_alignment.hpp create mode 100644 contrib/src/boost/utility.hpp create mode 100644 contrib/src/boost/utility/addressof.hpp create mode 100644 contrib/src/boost/utility/base_from_member.hpp create mode 100644 contrib/src/boost/utility/binary.hpp create mode 100644 contrib/src/boost/utility/declval.hpp create mode 100644 contrib/src/boost/utility/detail/result_of_iterate.hpp create mode 100644 contrib/src/boost/utility/enable_if.hpp create mode 100644 contrib/src/boost/utility/identity_type.hpp create mode 100644 contrib/src/boost/utility/result_of.hpp create mode 100644 contrib/src/boost/uuid/detail/config.hpp create mode 100644 contrib/src/boost/uuid/detail/uuid_generic.hpp create mode 100644 contrib/src/boost/uuid/detail/uuid_x86.hpp create mode 100644 contrib/src/boost/uuid/name_generator.hpp create mode 100644 contrib/src/boost/uuid/nil_generator.hpp create mode 100644 contrib/src/boost/uuid/random_generator.hpp create mode 100644 contrib/src/boost/uuid/seed_rng.hpp create mode 100644 contrib/src/boost/uuid/sha1.hpp create mode 100644 contrib/src/boost/uuid/string_generator.hpp create mode 100644 contrib/src/boost/uuid/uuid.hpp create mode 100644 contrib/src/boost/uuid/uuid_generators.hpp create mode 100644 contrib/src/boost/uuid/uuid_io.hpp create mode 100644 contrib/src/boost/version.hpp create mode 100644 contrib/src/easylogging++.h delete mode 100755 contrib/src/inttypes/inttypes.h delete mode 100755 contrib/src/inttypes/stdint.h delete mode 100644 contrib/src/jsmn/jsmn_test.c delete mode 100644 contrib/src/swi-pl/SWI-cpp.h delete mode 100644 docs/BUILDING.md delete mode 100644 docs/COMPARISON.md delete mode 100644 docs/CentOS.txt delete mode 100644 docs/EXTENSIONS.md delete mode 100644 docs/GETTING_STARTED.md delete mode 100644 docs/ISSUES.md delete mode 100644 docs/NATIVE_CODE.md delete mode 100644 docs/OVERVIEW.md delete mode 100644 docs/PUBLICATIONS.md delete mode 100644 docs/Performance_Microstep.png delete mode 100644 docs/Ubuntu-LTS.txt delete mode 100644 embedding/csharp/uSCXMLEmbedding.sln delete mode 100644 embedding/csharp/uSCXMLEmbedding.suo delete mode 100644 embedding/csharp/uSCXMLEmbedding/Examples.csproj delete mode 100644 embedding/csharp/uSCXMLEmbedding/Extensions/CustomDataModel.cs delete mode 100644 embedding/csharp/uSCXMLEmbedding/Extensions/CustomExecutableContent.cs delete mode 100644 embedding/csharp/uSCXMLEmbedding/Extensions/CustomIOProc.cs delete mode 100644 embedding/csharp/uSCXMLEmbedding/Extensions/CustomInterpreterMonitor.cs delete mode 100644 embedding/csharp/uSCXMLEmbedding/Extensions/CustomInvoker.cs delete mode 100644 embedding/csharp/uSCXMLEmbedding/Properties/AssemblyInfo.cs delete mode 100644 embedding/csharp/uSCXMLEmbedding/RunTests.cs delete mode 100644 embedding/java/.classpath delete mode 100644 embedding/java/.gitignore delete mode 100644 embedding/java/.project delete mode 100644 embedding/java/lib/js.jar delete mode 100644 embedding/java/src/org/uscxml/datamodel/ecmascript/ECMAData.java delete mode 100644 embedding/java/src/org/uscxml/datamodel/ecmascript/ECMAEvent.java delete mode 100644 embedding/java/src/org/uscxml/datamodel/ecmascript/ECMAScriptDataModel.java delete mode 100644 embedding/java/src/org/uscxml/tests/TestData.java delete mode 100644 embedding/java/src/org/uscxml/tests/TestExceptions.java delete mode 100644 embedding/java/src/org/uscxml/tests/TestLifecycle.java delete mode 100644 embedding/java/src/org/uscxml/tests/TestValidation.java delete mode 100644 embedding/java/src/org/uscxml/tests/datamodel/TestData.json delete mode 100644 embedding/java/src/org/uscxml/tests/datamodel/TestData.xml delete mode 100644 embedding/java/src/org/uscxml/tests/datamodel/TestDataModelAccess.java delete mode 100644 embedding/java/src/org/uscxml/tests/datamodel/TestJavaScriptDataModel.java delete mode 100644 embedding/java/src/org/uscxml/tests/datamodel/TestPlatformExtensions.java delete mode 100644 embedding/java/src/org/uscxml/tests/datamodel/TestW3CECMA.java delete mode 100644 embedding/java/src/org/uscxml/tests/execContent/TestCustomExecContent.java delete mode 100644 embedding/java/src/org/uscxml/tests/invoker/adhoc/TestAdhocInvoker.java delete mode 100644 embedding/java/src/org/uscxml/tests/invoker/factory/TestCustomInvoker.java delete mode 100644 embedding/java/src/org/uscxml/tests/invoker/factory/vxml/TestVoiceXMLInvoker.java delete mode 100644 embedding/java/src/org/uscxml/tests/ioprocessor/adhoc/TestAdhocIOProc.java delete mode 100644 embedding/java/src/org/uscxml/tests/ioprocessor/adhoc/console/ConsoleFrame.java delete mode 100644 embedding/java/src/org/uscxml/tests/ioprocessor/adhoc/console/ConsoleIOProc.java delete mode 100644 embedding/java/src/org/uscxml/tests/ioprocessor/factory/TestCustomIOProc.java delete mode 100644 embedding/java/src/org/uscxml/tests/monitor/TestCustomMonitor.java delete mode 100644 installer/description.txt delete mode 100644 installer/license.txt delete mode 100644 installer/nsis/uscxml-logo.bmp delete mode 100644 installer/packageMaker/readme.txt delete mode 100644 installer/packageMaker/welcome.txt delete mode 100644 src/bindings/CMakeLists.txt delete mode 100644 src/bindings/swig/csharp/CMakeLists.txt delete mode 100644 src/bindings/swig/csharp/org/uscxml/InterpreterException.cs delete mode 100644 src/bindings/swig/csharp/uscxml.i delete mode 100644 src/bindings/swig/java/CMakeLists.txt delete mode 100644 src/bindings/swig/java/org/uscxml/InterpreterException.java delete mode 100644 src/bindings/swig/java/uscxml.i delete mode 100644 src/bindings/swig/msvc/inttypes.h delete mode 100644 src/bindings/swig/php/CMakeLists.txt delete mode 100644 src/bindings/swig/php/test.php delete mode 100644 src/bindings/swig/php/uscxml.i delete mode 100644 src/bindings/swig/php/uscxmlNativePHP.php delete mode 100644 src/bindings/swig/stl_list.i delete mode 100644 src/bindings/swig/stl_set.i delete mode 100644 src/bindings/swig/uscxml_beautify.i delete mode 100644 src/bindings/swig/uscxml_ignores.i delete mode 100644 src/bindings/swig/wrapped/WrappedDataModel.cpp delete mode 100644 src/bindings/swig/wrapped/WrappedDataModel.h delete mode 100644 src/bindings/swig/wrapped/WrappedExecutableContent.cpp delete mode 100644 src/bindings/swig/wrapped/WrappedExecutableContent.h delete mode 100644 src/bindings/swig/wrapped/WrappedIOProcessor.cpp delete mode 100644 src/bindings/swig/wrapped/WrappedIOProcessor.h delete mode 100644 src/bindings/swig/wrapped/WrappedInterpreterMonitor.cpp delete mode 100644 src/bindings/swig/wrapped/WrappedInterpreterMonitor.h delete mode 100644 src/bindings/swig/wrapped/WrappedInvoker.cpp delete mode 100644 src/bindings/swig/wrapped/WrappedInvoker.h delete mode 100644 src/uscxml.h delete mode 100644 src/uscxml/Convenience.cpp delete mode 100644 src/uscxml/Convenience.h delete mode 100644 src/uscxml/Factory.cpp delete mode 100644 src/uscxml/Factory.h delete mode 100644 src/uscxml/InterpreterInfo.h delete mode 100644 src/uscxml/Message.h delete mode 100644 src/uscxml/URL.cpp delete mode 100644 src/uscxml/URL.h delete mode 100644 src/uscxml/URL.mm delete mode 100644 src/uscxml/UUID.cpp delete mode 100644 src/uscxml/UUID.h delete mode 100644 src/uscxml/concurrency/BlockingQueue.h delete mode 100644 src/uscxml/concurrency/DelayedEventQueue.cpp delete mode 100644 src/uscxml/concurrency/DelayedEventQueue.h delete mode 100644 src/uscxml/concurrency/EventBase.cpp delete mode 100644 src/uscxml/concurrency/EventBase.h delete mode 100644 src/uscxml/concurrency/Timer.cpp delete mode 100644 src/uscxml/concurrency/Timer.h delete mode 100644 src/uscxml/concurrency/tinythread.cpp delete mode 100644 src/uscxml/concurrency/tinythread.h delete mode 100644 src/uscxml/debug/Breakpoint.cpp delete mode 100644 src/uscxml/debug/Breakpoint.h delete mode 100644 src/uscxml/debug/Complexity.cpp delete mode 100644 src/uscxml/debug/Complexity.h delete mode 100644 src/uscxml/debug/DebugSession.cpp delete mode 100644 src/uscxml/debug/DebugSession.h delete mode 100644 src/uscxml/debug/Debugger.cpp delete mode 100644 src/uscxml/debug/Debugger.h delete mode 100644 src/uscxml/debug/DebuggerServlet.cpp delete mode 100644 src/uscxml/debug/DebuggerServlet.h delete mode 100644 src/uscxml/debug/SCXMLDotWriter.cpp delete mode 100644 src/uscxml/debug/SCXMLDotWriter.h delete mode 100644 src/uscxml/dom/DOMUtils.cpp delete mode 100644 src/uscxml/dom/DOMUtils.h delete mode 100644 src/uscxml/dom/NameSpacingParser.cpp delete mode 100644 src/uscxml/dom/NameSpacingParser.h create mode 100644 src/uscxml/interpreter/ContentExecutorImpl.cpp create mode 100644 src/uscxml/interpreter/ContentExecutorImpl.h create mode 100644 src/uscxml/interpreter/EventQueueImpl.cpp create mode 100644 src/uscxml/interpreter/EventQueueImpl.h delete mode 100644 src/uscxml/interpreter/InterpreterDraft6.cpp delete mode 100644 src/uscxml/interpreter/InterpreterDraft6.h delete mode 100644 src/uscxml/interpreter/InterpreterFast.cpp delete mode 100644 src/uscxml/interpreter/InterpreterFast.h create mode 100644 src/uscxml/interpreter/InterpreterImpl.cpp create mode 100644 src/uscxml/interpreter/InterpreterImpl.h create mode 100644 src/uscxml/interpreter/InterpreterMonitor.h delete mode 100644 src/uscxml/interpreter/InterpreterRC.cpp delete mode 100644 src/uscxml/interpreter/InterpreterRC.h create mode 100644 src/uscxml/interpreter/MicroStepFast.cpp create mode 100644 src/uscxml/interpreter/MicroStepFast.h create mode 100644 src/uscxml/interpreter/MicroStepImpl.h delete mode 100644 src/uscxml/messages/InvokeRequest.cpp delete mode 100644 src/uscxml/messages/InvokeRequest.h delete mode 100644 src/uscxml/messages/MMIMessages.cpp delete mode 100644 src/uscxml/messages/MMIMessages.h delete mode 100644 src/uscxml/messages/SendRequest.cpp delete mode 100644 src/uscxml/messages/SendRequest.h delete mode 100644 src/uscxml/pch.h create mode 100644 src/uscxml/plugins/Factory.cpp create mode 100644 src/uscxml/plugins/Factory.h delete mode 100644 src/uscxml/plugins/Plugins.cpp delete mode 100644 src/uscxml/plugins/Plugins.h delete mode 100755 src/uscxml/plugins/Pluma/Config.hpp delete mode 100755 src/uscxml/plugins/Pluma/Connector.hpp delete mode 100644 src/uscxml/plugins/Pluma/DLibrary.cpp delete mode 100755 src/uscxml/plugins/Pluma/DLibrary.hpp delete mode 100644 src/uscxml/plugins/Pluma/Dir.cpp delete mode 100755 src/uscxml/plugins/Pluma/Dir.hpp delete mode 100644 src/uscxml/plugins/Pluma/Host.cpp delete mode 100755 src/uscxml/plugins/Pluma/Host.hpp delete mode 100644 src/uscxml/plugins/Pluma/PluginManager.cpp delete mode 100755 src/uscxml/plugins/Pluma/PluginManager.hpp delete mode 100755 src/uscxml/plugins/Pluma/Pluma.hpp delete mode 100755 src/uscxml/plugins/Pluma/Pluma.inl delete mode 100644 src/uscxml/plugins/Pluma/Provider.cpp delete mode 100755 src/uscxml/plugins/Pluma/Provider.hpp delete mode 100644 src/uscxml/plugins/Pluma/uce-dirent.h create mode 100644 src/uscxml/plugins/datamodel/common/bindings/dom/defines.i create mode 100644 src/uscxml/plugins/datamodel/common/bindings/dom/dom.i create mode 100644 src/uscxml/plugins/datamodel/common/bindings/dom/ignore.i create mode 100644 src/uscxml/plugins/datamodel/common/bindings/dom/typemaps-general.i create mode 100644 src/uscxml/plugins/datamodel/common/bindings/event.i delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp create mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp.inc delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h create mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/bindings.i delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentCustom.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeCustom.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeListCustom.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSetCustom.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEventCustom.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCTypedArrayCustom.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResultCustom.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/SpiderMonkey/SpiderMonkeyDataModel.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/SpiderMonkey/SpiderMonkeyDataModel.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/Storage.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/Storage.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/TypedArray.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/TypedArray.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.cpp create mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.cpp.inc delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h create mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/bindings.i delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBuffer.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBuffer.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBufferView.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBufferView.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CDATASection.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CDATASection.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Comment.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Comment.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DataView.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DataView.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentFragment.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentFragment.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8EntityReference.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8EntityReference.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float32Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float32Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float64Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float64Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int16Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int16Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int32Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int32Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int8Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int8Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeCustom.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeListCustom.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSetCustom.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEventCustom.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Storage.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Storage.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8TypedArrayCustom.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint16Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint16Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint32Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint32Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8Array.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8Array.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8ClampedArray.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8ClampedArray.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.cpp delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.h delete mode 100644 src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResultCustom.cpp create mode 100644 src/uscxml/plugins/datamodel/lua/LuaDOM.cpp.inc create mode 100644 src/uscxml/plugins/datamodel/lua/bindings.i delete mode 100644 src/uscxml/plugins/datamodel/prolog/swi/SWIConfig.h.in delete mode 100644 src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp delete mode 100644 src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h delete mode 100644 src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.new delete mode 100644 src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp delete mode 100644 src/uscxml/plugins/datamodel/promela/PromelaDataModel.h delete mode 100644 src/uscxml/plugins/datamodel/promela/PromelaParser.cpp delete mode 100644 src/uscxml/plugins/datamodel/promela/PromelaParser.h delete mode 100644 src/uscxml/plugins/datamodel/promela/parser/promela.l delete mode 100644 src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp delete mode 100644 src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp delete mode 100644 src/uscxml/plugins/datamodel/promela/parser/promela.tab.hpp delete mode 100644 src/uscxml/plugins/datamodel/promela/parser/promela.ypp delete mode 100644 src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp delete mode 100644 src/uscxml/plugins/datamodel/xpath/XPathDataModel.h delete mode 100644 src/uscxml/plugins/element/CMakeLists.txt delete mode 100644 src/uscxml/plugins/element/fetch/FetchElement.cpp delete mode 100644 src/uscxml/plugins/element/fetch/FetchElement.h delete mode 100644 src/uscxml/plugins/element/file/FileElement.cpp delete mode 100644 src/uscxml/plugins/element/file/FileElement.h delete mode 100644 src/uscxml/plugins/element/mmi/MMIEvents.cpp delete mode 100644 src/uscxml/plugins/element/mmi/MMIEvents.h delete mode 100644 src/uscxml/plugins/element/postpone/PostponeElement.cpp delete mode 100644 src/uscxml/plugins/element/postpone/PostponeElement.h delete mode 100644 src/uscxml/plugins/element/respond/RespondElement.cpp delete mode 100644 src/uscxml/plugins/element/respond/RespondElement.h delete mode 100644 src/uscxml/plugins/invoker/audio/AudioToolbox.h delete mode 100644 src/uscxml/plugins/invoker/audio/AudioToolbox.mm delete mode 100644 src/uscxml/plugins/invoker/audio/LibSoundFile.cpp delete mode 100644 src/uscxml/plugins/invoker/audio/LibSoundFile.h delete mode 100644 src/uscxml/plugins/invoker/audio/OpenALInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/audio/OpenALInvoker.h delete mode 100644 src/uscxml/plugins/invoker/audio/OpenALPlayer.cpp delete mode 100644 src/uscxml/plugins/invoker/audio/OpenALPlayer.h delete mode 100644 src/uscxml/plugins/invoker/audio/PCMConverter.h delete mode 100644 src/uscxml/plugins/invoker/calendar/CalendarInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/calendar/CalendarInvoker.h delete mode 100644 src/uscxml/plugins/invoker/expect/ExpectInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/expect/ExpectInvoker.h delete mode 100644 src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h delete mode 100644 src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.h delete mode 100644 src/uscxml/plugins/invoker/graphics/openscenegraph/CompositeDisplay.cpp delete mode 100644 src/uscxml/plugins/invoker/graphics/openscenegraph/CompositeDisplay.h delete mode 100644 src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h delete mode 100644 src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp delete mode 100644 src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.h delete mode 100644 src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h delete mode 100644 src/uscxml/plugins/invoker/http/HTTPServletInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/http/HTTPServletInvoker.h delete mode 100644 src/uscxml/plugins/invoker/im/IMConfig.h.in delete mode 100644 src/uscxml/plugins/invoker/im/IMInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/im/IMInvoker.h delete mode 100644 src/uscxml/plugins/invoker/imap/IMAPInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/imap/IMAPInvoker.h delete mode 100644 src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/miles/MilesSessionInvoker.h delete mode 100644 src/uscxml/plugins/invoker/sample/SampleInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/sample/SampleInvoker.h delete mode 100644 src/uscxml/plugins/invoker/smtp/SMTPInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/smtp/SMTPInvoker.h delete mode 100644 src/uscxml/plugins/invoker/sqlite3/Sqlite3Invoker.cpp delete mode 100644 src/uscxml/plugins/invoker/sqlite3/Sqlite3Invoker.h delete mode 100644 src/uscxml/plugins/invoker/system/SystemInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/system/SystemInvoker.h delete mode 100644 src/uscxml/plugins/invoker/umundo/JSON.pb.cc delete mode 100644 src/uscxml/plugins/invoker/umundo/JSON.pb.h delete mode 100644 src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/umundo/UmundoInvoker.h delete mode 100644 src/uscxml/plugins/invoker/vxml/VoiceXMLInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/vxml/VoiceXMLInvoker.h delete mode 100644 src/uscxml/plugins/invoker/webrtc/WebRTCInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/webrtc/WebRTCInvoker.h delete mode 100644 src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp delete mode 100644 src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h delete mode 100644 src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.html delete mode 100644 src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.inc.h delete mode 100644 src/uscxml/plugins/ioprocessor/comet/CometIOProcessor.cpp delete mode 100644 src/uscxml/plugins/ioprocessor/comet/CometIOProcessor.h delete mode 100644 src/uscxml/plugins/ioprocessor/dom/DOMIOProcessor.cpp delete mode 100644 src/uscxml/plugins/ioprocessor/dom/DOMIOProcessor.h delete mode 100644 src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.cpp delete mode 100644 src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.h delete mode 100644 src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.cpp delete mode 100644 src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.h delete mode 100644 src/uscxml/plugins/ioprocessor/sample/SampleIOProcessor.cpp delete mode 100644 src/uscxml/plugins/ioprocessor/sample/SampleIOProcessor.h delete mode 100644 src/uscxml/server/InterpreterServlet.cpp delete mode 100644 src/uscxml/server/InterpreterServlet.h delete mode 100644 src/uscxml/server/Socket.cpp delete mode 100644 src/uscxml/server/Socket.h delete mode 100644 src/uscxml/transform/ChartAnnotator.cpp delete mode 100644 src/uscxml/transform/ChartAnnotator.h delete mode 100644 src/uscxml/transform/ChartToFSM.cpp delete mode 100644 src/uscxml/transform/ChartToFSM.cpp.new delete mode 100644 src/uscxml/transform/ChartToFSM.h delete mode 100644 src/uscxml/transform/ChartToFSM.h.new delete mode 100644 src/uscxml/transform/ChartToFlatSCXML.cpp delete mode 100644 src/uscxml/transform/ChartToFlatSCXML.h delete mode 100644 src/uscxml/transform/ChartToMinimalSCXML.cpp delete mode 100644 src/uscxml/transform/ChartToMinimalSCXML.h delete mode 100644 src/uscxml/transform/ChartToPromela.cpp delete mode 100644 src/uscxml/transform/ChartToPromela.h delete mode 100644 src/uscxml/transform/ChartToTex.cpp delete mode 100644 src/uscxml/transform/ChartToTex.h delete mode 100644 src/uscxml/transform/FlatStateIdentifier.h create mode 100644 src/uscxml/transform/Trie.cpp create mode 100644 src/uscxml/transform/Trie.h create mode 100644 src/uscxml/util/Convenience.cpp create mode 100644 src/uscxml/util/Convenience.h create mode 100644 src/uscxml/util/DOM.cpp create mode 100644 src/uscxml/util/DOM.h create mode 100644 src/uscxml/util/Predicates.cpp create mode 100644 src/uscxml/util/Predicates.h delete mode 100644 src/uscxml/util/Trie.cpp delete mode 100644 src/uscxml/util/Trie.h create mode 100644 src/uscxml/util/URL.cpp create mode 100644 src/uscxml/util/URL.h create mode 100644 src/uscxml/util/UUID.cpp create mode 100644 src/uscxml/util/UUID.h create mode 100644 test/issues/test-issue56.scxml create mode 100644 test/issues/test-issue62.scxml create mode 100644 test/issues/test-issue63.scxml create mode 100644 test/issues/test-issue64.scxml create mode 100644 test/issues/test-issue67.scxml create mode 100644 test/issues/test-issue68.scxml create mode 100644 test/issues/test-issue69.scxml delete mode 100644 test/src/issues/test-issue56.cpp delete mode 100644 test/src/issues/test-issue62.cpp delete mode 100644 test/src/issues/test-issue63.cpp delete mode 100644 test/src/issues/test-issue64.scxml delete mode 100644 test/src/issues/test-issue67.scxml delete mode 100644 test/src/issues/test-issue68.scxml delete mode 100644 test/src/test-arabica-events.cpp delete mode 100644 test/src/test-arabica-namespaces.cpp delete mode 100644 test/src/test-arabica-parsing.cpp delete mode 100644 test/src/test-arabica-xpath.cpp delete mode 100644 test/src/test-base64.cpp delete mode 100644 test/src/test-c-inline.c delete mode 100644 test/src/test-c-inline.c.scxml.c delete mode 100644 test/src/test-c-machine.cpp delete mode 100644 test/src/test-cmdline-parsing.cpp delete mode 100644 test/src/test-datamodel.cpp delete mode 100644 test/src/test-dirmon.cpp delete mode 100644 test/src/test-doneevent.cpp delete mode 100644 test/src/test-eventdelay.cpp delete mode 100644 test/src/test-expect.cpp delete mode 100644 test/src/test-ffmpeg.cpp delete mode 100644 test/src/test-flat-stateid.cpp create mode 100644 test/src/test-gen-c.cpp delete mode 100644 test/src/test-instant-messaging.cpp delete mode 100644 test/src/test-issue-reporting.cpp delete mode 100644 test/src/test-misc.cpp delete mode 100644 test/src/test-mmi.cpp delete mode 100644 test/src/test-predicates.cpp delete mode 100644 test/src/test-promela-parser.cpp delete mode 100644 test/src/test-sockets.cpp create mode 100644 test/src/test-state-pass.cpp delete mode 100644 test/src/test-stress.cpp delete mode 100644 test/src/test-trie.cpp create mode 100644 test/src/test-validating.cpp delete mode 100644 test/src/test-vxml-mmi-http.cpp delete mode 100644 test/src/test-vxml-mmi-socket.cpp delete mode 100644 test/src/test-w3c.cpp delete mode 100644 test/uscxml/applications/SpatialMapTicker.java delete mode 100644 test/uscxml/applications/click.wav delete mode 100644 test/uscxml/applications/spoken-map-ticker.scxml delete mode 100644 test/uscxml/applications/spoken-map-ticker.xhtml delete mode 100644 test/uscxml/arabica/test-arabica-events.xml delete mode 100644 test/uscxml/arabica/test-arabica-parsing.xml delete mode 100644 test/uscxml/audio/click.wav delete mode 100644 test/uscxml/automated/ecma/deep-histories.scxml delete mode 100644 test/uscxml/automated/ecma/deep-histories2.scxml delete mode 100644 test/uscxml/automated/ecma/deep-initial.scxml delete mode 100644 test/uscxml/chartToFSM/test-event-desc-merging.scxml delete mode 100644 test/uscxml/chartToFSM/test-event-set-conflict.scxml delete mode 100644 test/uscxml/chartToFSM/test-flattening.scxml delete mode 100644 test/uscxml/dom/TestData.json delete mode 100644 test/uscxml/dom/TestData.xml delete mode 100644 test/uscxml/dom/test-xml-access.scxml delete mode 100644 test/uscxml/history-stacks/history-compounds.scxml delete mode 100644 test/uscxml/history-stacks/history-invokers.item.scxml delete mode 100644 test/uscxml/history-stacks/history-invokers.main.scxml delete mode 100644 test/uscxml/java/test-ecmascript-datamodel.scxml delete mode 100644 test/uscxml/java/test-java-datamodel.scxml delete mode 100644 test/uscxml/java/test-java-invoker.scxml delete mode 100644 test/uscxml/prolog/likes.pl delete mode 100644 test/uscxml/promela/test-complete.scxml delete mode 100644 test/uscxml/promela/test-event-source-auto.scxml delete mode 100644 test/uscxml/promela/test-event-source.scxml delete mode 100644 test/uscxml/promela/test-history.scxml delete mode 100644 test/uscxml/promela/test-ltl.scxml delete mode 100644 test/uscxml/promela/test-non-progress.scxml delete mode 100644 test/uscxml/promela/test-progress-label.scxml delete mode 100644 test/uscxml/promela/test-simple.scxml delete mode 100644 test/uscxml/promela/test-syntax.scxml delete mode 100644 test/uscxml/proto/3DViewer/CameraPos.proto delete mode 100644 test/uscxml/proto/3DViewer/DirectoryListingService.proto delete mode 100644 test/uscxml/proto/3DViewer/LinearAlgebra.proto delete mode 100644 test/uscxml/proto/3DViewer/ModelInfo.proto delete mode 100644 test/uscxml/proto/3DViewer/Pose.proto delete mode 100644 test/uscxml/proto/3DViewer/SceneSetup.proto delete mode 100644 test/uscxml/proto/3DViewer/SceneShotService.proto delete mode 100644 test/uscxml/proto/Dependee.proto delete mode 100644 test/uscxml/proto/Depender.proto delete mode 100644 test/uscxml/proto/JSON.proto delete mode 100644 test/uscxml/proto/Test.proto delete mode 100644 test/uscxml/proto/TestServices.proto delete mode 100644 test/uscxml/scenegraph/HARD_MP_VAL_000.wrl delete mode 100644 test/uscxml/scripts/GreatCircle.js delete mode 100644 test/uscxml/scripts/test-simple-ecmascript.scxml delete mode 100644 test/uscxml/scxml-gui-test.scxml delete mode 100644 test/uscxml/templates/mc-html.html delete mode 100644 test/uscxml/templates/xhtml-invoker.html delete mode 100644 test/uscxml/test-calendar.scxml delete mode 100644 test/uscxml/test-communication.scxml delete mode 100644 test/uscxml/test-custom-executable-content.scxml delete mode 100644 test/uscxml/test-dirmon.scxml delete mode 100644 test/uscxml/test-dom.scxml delete mode 100644 test/uscxml/test-donedata.scxml delete mode 100644 test/uscxml/test-ecmascript.scxml delete mode 100644 test/uscxml/test-execution.scxml delete mode 100644 test/uscxml/test-expect.scxml delete mode 100644 test/uscxml/test-ffmpeg.scxml delete mode 100644 test/uscxml/test-file-element.scxml delete mode 100644 test/uscxml/test-http-servlet.scxml delete mode 100644 test/uscxml/test-imap.scxml delete mode 100644 test/uscxml/test-initial-configuration.scxml delete mode 100644 test/uscxml/test-instant-messaging.scxml delete mode 100644 test/uscxml/test-invoke-communication-invoker.scxml delete mode 100644 test/uscxml/test-invoke-communication.scxml delete mode 100644 test/uscxml/test-invoked.scxml delete mode 100644 test/uscxml/test-jvoicexml.scxml delete mode 100644 test/uscxml/test-lua.scxml delete mode 100644 test/uscxml/test-markup-passing.scxml delete mode 100644 test/uscxml/test-markup.xml delete mode 100644 test/uscxml/test-mmi-events.scxml delete mode 100644 test/uscxml/test-mmi-im.scxml delete mode 100644 test/uscxml/test-mmi-mc.scxml delete mode 100644 test/uscxml/test-openal.scxml delete mode 100644 test/uscxml/test-osgconvert.scxml delete mode 100644 test/uscxml/test-performance-events.scxml delete mode 100644 test/uscxml/test-performance.scxml delete mode 100644 test/uscxml/test-postpone-element.scxml delete mode 100644 test/uscxml/test-prolog.scxml delete mode 100644 test/uscxml/test-response-element.scxml delete mode 100644 test/uscxml/test-scenegraph.scxml delete mode 100644 test/uscxml/test-simplest.scxml delete mode 100644 test/uscxml/test-smtp.scxml delete mode 100644 test/uscxml/test-spatial-audio.scxml delete mode 100644 test/uscxml/test-startup-time.scxml delete mode 100644 test/uscxml/test-umundo-map-demo.scxml delete mode 100644 test/uscxml/test-umundo-pingpong.scxml delete mode 100644 test/uscxml/test-umundo-rpc.scxml delete mode 100644 test/uscxml/test-umundo-s11n-chat.scxml delete mode 100644 test/uscxml/test-umundo-s11n.scxml delete mode 100644 test/uscxml/test-xhtml-invoker.scxml delete mode 100644 test/uscxml/transition-selection/test1.scxml delete mode 100644 test/uscxml/transition-selection/test2.scxml delete mode 100644 test/uscxml/xinclude/baseuri/test-xinclude-baseuri1.include delete mode 100644 test/uscxml/xinclude/baseuri/test-xinclude-baseuri2.include delete mode 100644 test/uscxml/xinclude/baseuri/test-xinclude-script.include delete mode 100644 test/uscxml/xinclude/test-fail-namespace1.include delete mode 100644 test/uscxml/xinclude/test-fail-namespace1.scxml delete mode 100644 test/uscxml/xinclude/test-fail-namespace2.include delete mode 100644 test/uscxml/xinclude/test-fail-namespace2.scxml delete mode 100644 test/uscxml/xinclude/test-fail-namespace3.include delete mode 100644 test/uscxml/xinclude/test-fail-namespace3.scxml delete mode 100644 test/uscxml/xinclude/test-fail-namespace4.include delete mode 100644 test/uscxml/xinclude/test-fail-namespace4.scxml delete mode 100644 test/uscxml/xinclude/test-recursive-include.include delete mode 100644 test/uscxml/xinclude/test-recursive-include.scxml delete mode 100644 test/uscxml/xinclude/test-xinclude-baseuri.scxml delete mode 100644 test/uscxml/xinclude/test-xinclude-simple.scxml delete mode 100644 test/uscxml/xinclude/text-xinclude-simple.included delete mode 100644 test/vhdltest/automation.tcl delete mode 100644 test/vhdltest/debug.do delete mode 100755 test/vhdltest/green_write_dut.sh delete mode 100755 test/vhdltest/tmp_write_dut.sh delete mode 100755 test/vhdltest/write_dut.sh create mode 100644 test/w3c/TEST-MATRIX.md create mode 100644 test/w3c/confLua.xsl create mode 100644 test/w3c/confNamespace.xsl create mode 100755 test/w3c/create-test-table.pl create mode 100644 test/w3c/lua/robots.txt delete mode 100644 test/w3c/lua/test444.scxml delete mode 100644 test/w3c/lua/test445.scxml delete mode 100644 test/w3c/lua/test446.scxml delete mode 100644 test/w3c/lua/test448.scxml delete mode 100644 test/w3c/lua/test449.scxml delete mode 100644 test/w3c/lua/test451.scxml delete mode 100644 test/w3c/lua/test452.scxml delete mode 100644 test/w3c/lua/test453.scxml delete mode 100644 test/w3c/lua/test456.scxml delete mode 100644 test/w3c/lua/test457.scxml delete mode 100644 test/w3c/lua/test459.scxml delete mode 100644 test/w3c/lua/test460.scxml delete mode 100644 test/w3c/lua/test557.scxml delete mode 100644 test/w3c/lua/test558.scxml delete mode 100644 test/w3c/lua/test560.scxml delete mode 100644 test/w3c/lua/test561.scxml delete mode 100644 test/w3c/lua/test562.scxml create mode 100644 test/w3c/lua/test567.scxml.old delete mode 100644 test/w3c/lua/test569.scxml delete mode 100644 test/w3c/lua/test578.scxml create mode 100644 test/w3c/namespace/robots.txt create mode 100644 test/w3c/namespace/test144.scxml create mode 100644 test/w3c/namespace/test147.scxml create mode 100644 test/w3c/namespace/test148.scxml create mode 100644 test/w3c/namespace/test149.scxml create mode 100644 test/w3c/namespace/test150.scxml create mode 100644 test/w3c/namespace/test151.scxml create mode 100644 test/w3c/namespace/test152.scxml create mode 100644 test/w3c/namespace/test153.scxml create mode 100644 test/w3c/namespace/test155.scxml create mode 100644 test/w3c/namespace/test156.scxml create mode 100644 test/w3c/namespace/test158.scxml create mode 100644 test/w3c/namespace/test159.scxml create mode 100644 test/w3c/namespace/test172.scxml create mode 100644 test/w3c/namespace/test173.scxml create mode 100644 test/w3c/namespace/test174.scxml create mode 100644 test/w3c/namespace/test175.scxml create mode 100644 test/w3c/namespace/test176.scxml create mode 100644 test/w3c/namespace/test178.scxml create mode 100644 test/w3c/namespace/test179.scxml create mode 100644 test/w3c/namespace/test183.scxml create mode 100644 test/w3c/namespace/test185.scxml create mode 100644 test/w3c/namespace/test186.scxml create mode 100644 test/w3c/namespace/test187.scxml create mode 100644 test/w3c/namespace/test189.scxml create mode 100644 test/w3c/namespace/test190.scxml create mode 100644 test/w3c/namespace/test191.scxml create mode 100644 test/w3c/namespace/test192.scxml create mode 100644 test/w3c/namespace/test193.scxml create mode 100644 test/w3c/namespace/test194.scxml create mode 100644 test/w3c/namespace/test198.scxml create mode 100644 test/w3c/namespace/test199.scxml create mode 100644 test/w3c/namespace/test200.scxml create mode 100644 test/w3c/namespace/test201.scxml create mode 100644 test/w3c/namespace/test205.scxml create mode 100644 test/w3c/namespace/test207.scxml create mode 100644 test/w3c/namespace/test208.scxml create mode 100644 test/w3c/namespace/test210.scxml create mode 100644 test/w3c/namespace/test215.scxml create mode 100644 test/w3c/namespace/test216.scxml create mode 100644 test/w3c/namespace/test216sub1.scxml create mode 100644 test/w3c/namespace/test220.scxml create mode 100644 test/w3c/namespace/test223.scxml create mode 100644 test/w3c/namespace/test224.scxml create mode 100644 test/w3c/namespace/test225.scxml create mode 100644 test/w3c/namespace/test226.scxml create mode 100644 test/w3c/namespace/test226sub1.scxml create mode 100644 test/w3c/namespace/test228.scxml create mode 100644 test/w3c/namespace/test229.scxml create mode 100644 test/w3c/namespace/test230.scxml create mode 100644 test/w3c/namespace/test232.scxml create mode 100644 test/w3c/namespace/test233.scxml create mode 100644 test/w3c/namespace/test234.scxml create mode 100644 test/w3c/namespace/test235.scxml create mode 100644 test/w3c/namespace/test236.scxml create mode 100644 test/w3c/namespace/test237.scxml create mode 100644 test/w3c/namespace/test239.scxml create mode 100644 test/w3c/namespace/test239sub1.scxml create mode 100644 test/w3c/namespace/test240.scxml create mode 100644 test/w3c/namespace/test241.scxml create mode 100644 test/w3c/namespace/test242.scxml create mode 100644 test/w3c/namespace/test242sub1.scxml create mode 100644 test/w3c/namespace/test243.scxml create mode 100644 test/w3c/namespace/test244.scxml create mode 100644 test/w3c/namespace/test245.scxml create mode 100644 test/w3c/namespace/test247.scxml create mode 100644 test/w3c/namespace/test250.scxml create mode 100644 test/w3c/namespace/test252.scxml create mode 100644 test/w3c/namespace/test253.scxml create mode 100644 test/w3c/namespace/test276.scxml create mode 100644 test/w3c/namespace/test276sub1.scxml create mode 100644 test/w3c/namespace/test277.scxml create mode 100644 test/w3c/namespace/test278.scxml create mode 100644 test/w3c/namespace/test279.scxml create mode 100644 test/w3c/namespace/test280.scxml create mode 100644 test/w3c/namespace/test286.scxml create mode 100644 test/w3c/namespace/test287.scxml create mode 100644 test/w3c/namespace/test288.scxml create mode 100644 test/w3c/namespace/test294.scxml create mode 100644 test/w3c/namespace/test298.scxml create mode 100644 test/w3c/namespace/test301.scxml create mode 100644 test/w3c/namespace/test302.scxml create mode 100644 test/w3c/namespace/test303.scxml create mode 100644 test/w3c/namespace/test304.scxml create mode 100644 test/w3c/namespace/test307.scxml create mode 100644 test/w3c/namespace/test309.scxml create mode 100644 test/w3c/namespace/test310.scxml create mode 100644 test/w3c/namespace/test311.scxml create mode 100644 test/w3c/namespace/test312.scxml create mode 100644 test/w3c/namespace/test313.scxml create mode 100644 test/w3c/namespace/test314.scxml create mode 100644 test/w3c/namespace/test318.scxml create mode 100644 test/w3c/namespace/test319.scxml create mode 100644 test/w3c/namespace/test321.scxml create mode 100644 test/w3c/namespace/test322.scxml create mode 100644 test/w3c/namespace/test323.scxml create mode 100644 test/w3c/namespace/test324.scxml create mode 100644 test/w3c/namespace/test325.scxml create mode 100644 test/w3c/namespace/test326.scxml create mode 100644 test/w3c/namespace/test329.scxml create mode 100644 test/w3c/namespace/test330.scxml create mode 100644 test/w3c/namespace/test331.scxml create mode 100644 test/w3c/namespace/test332.scxml create mode 100644 test/w3c/namespace/test333.scxml create mode 100644 test/w3c/namespace/test335.scxml create mode 100644 test/w3c/namespace/test336.scxml create mode 100644 test/w3c/namespace/test337.scxml create mode 100644 test/w3c/namespace/test338.scxml create mode 100644 test/w3c/namespace/test339.scxml create mode 100644 test/w3c/namespace/test342.scxml create mode 100644 test/w3c/namespace/test343.scxml create mode 100644 test/w3c/namespace/test344.scxml create mode 100644 test/w3c/namespace/test346.scxml create mode 100644 test/w3c/namespace/test347.scxml create mode 100644 test/w3c/namespace/test348.scxml create mode 100644 test/w3c/namespace/test349.scxml create mode 100644 test/w3c/namespace/test350.scxml create mode 100644 test/w3c/namespace/test351.scxml create mode 100644 test/w3c/namespace/test352.scxml create mode 100644 test/w3c/namespace/test354.scxml create mode 100644 test/w3c/namespace/test355.scxml create mode 100644 test/w3c/namespace/test364.scxml create mode 100644 test/w3c/namespace/test372.scxml create mode 100644 test/w3c/namespace/test375.scxml create mode 100644 test/w3c/namespace/test376.scxml create mode 100644 test/w3c/namespace/test377.scxml create mode 100644 test/w3c/namespace/test378.scxml create mode 100644 test/w3c/namespace/test387.scxml create mode 100644 test/w3c/namespace/test388.scxml create mode 100644 test/w3c/namespace/test396.scxml create mode 100644 test/w3c/namespace/test399.scxml create mode 100644 test/w3c/namespace/test401.scxml create mode 100644 test/w3c/namespace/test402.scxml create mode 100644 test/w3c/namespace/test403a.scxml create mode 100644 test/w3c/namespace/test403b.scxml create mode 100644 test/w3c/namespace/test403c.scxml create mode 100644 test/w3c/namespace/test404.scxml create mode 100644 test/w3c/namespace/test405.scxml create mode 100644 test/w3c/namespace/test406.scxml create mode 100644 test/w3c/namespace/test407.scxml create mode 100644 test/w3c/namespace/test409.scxml create mode 100644 test/w3c/namespace/test411.scxml create mode 100644 test/w3c/namespace/test412.scxml create mode 100644 test/w3c/namespace/test413.scxml create mode 100644 test/w3c/namespace/test415.scxml create mode 100644 test/w3c/namespace/test416.scxml create mode 100644 test/w3c/namespace/test417.scxml create mode 100644 test/w3c/namespace/test419.scxml create mode 100644 test/w3c/namespace/test421.scxml create mode 100644 test/w3c/namespace/test422.scxml create mode 100644 test/w3c/namespace/test423.scxml create mode 100644 test/w3c/namespace/test444.scxml create mode 100644 test/w3c/namespace/test445.scxml create mode 100644 test/w3c/namespace/test446.scxml create mode 100644 test/w3c/namespace/test446.txt create mode 100644 test/w3c/namespace/test448.scxml create mode 100644 test/w3c/namespace/test449.scxml create mode 100644 test/w3c/namespace/test451.scxml create mode 100644 test/w3c/namespace/test452.scxml create mode 100644 test/w3c/namespace/test453.scxml create mode 100644 test/w3c/namespace/test456.scxml create mode 100644 test/w3c/namespace/test457.scxml create mode 100644 test/w3c/namespace/test459.scxml create mode 100644 test/w3c/namespace/test460.scxml create mode 100644 test/w3c/namespace/test487.scxml create mode 100644 test/w3c/namespace/test488.scxml create mode 100644 test/w3c/namespace/test495.scxml create mode 100644 test/w3c/namespace/test496.scxml create mode 100644 test/w3c/namespace/test500.scxml create mode 100644 test/w3c/namespace/test501.scxml create mode 100644 test/w3c/namespace/test503.scxml create mode 100644 test/w3c/namespace/test504.scxml create mode 100644 test/w3c/namespace/test505.scxml create mode 100644 test/w3c/namespace/test506.scxml create mode 100644 test/w3c/namespace/test509.scxml create mode 100644 test/w3c/namespace/test510.scxml create mode 100644 test/w3c/namespace/test513.txt create mode 100644 test/w3c/namespace/test518.scxml create mode 100644 test/w3c/namespace/test519.scxml create mode 100644 test/w3c/namespace/test520.scxml create mode 100644 test/w3c/namespace/test521.scxml create mode 100644 test/w3c/namespace/test522.scxml create mode 100644 test/w3c/namespace/test525.scxml create mode 100644 test/w3c/namespace/test527.scxml create mode 100644 test/w3c/namespace/test528.scxml create mode 100644 test/w3c/namespace/test529.scxml create mode 100644 test/w3c/namespace/test530.scxml create mode 100644 test/w3c/namespace/test531.scxml create mode 100644 test/w3c/namespace/test532.scxml create mode 100644 test/w3c/namespace/test533.scxml create mode 100644 test/w3c/namespace/test534.scxml create mode 100644 test/w3c/namespace/test539.txt create mode 100644 test/w3c/namespace/test540.txt create mode 100644 test/w3c/namespace/test550.scxml create mode 100644 test/w3c/namespace/test551.scxml create mode 100644 test/w3c/namespace/test552.scxml create mode 100644 test/w3c/namespace/test552.txt create mode 100644 test/w3c/namespace/test553.scxml create mode 100644 test/w3c/namespace/test554.scxml create mode 100644 test/w3c/namespace/test557.scxml create mode 100644 test/w3c/namespace/test557.txt create mode 100644 test/w3c/namespace/test558.scxml create mode 100644 test/w3c/namespace/test558.txt create mode 100644 test/w3c/namespace/test560.scxml create mode 100644 test/w3c/namespace/test561.scxml create mode 100644 test/w3c/namespace/test562.scxml create mode 100644 test/w3c/namespace/test567.scxml create mode 100644 test/w3c/namespace/test569.scxml create mode 100644 test/w3c/namespace/test570.scxml create mode 100644 test/w3c/namespace/test576.scxml create mode 100644 test/w3c/namespace/test577.scxml create mode 100644 test/w3c/namespace/test578.scxml create mode 100644 test/w3c/namespace/test579.scxml create mode 100644 test/w3c/namespace/test580.scxml delete mode 100644 test/w3c/prolog/robots.txt delete mode 100644 test/w3c/prolog/test144.scxml delete mode 100644 test/w3c/prolog/test147.scxml delete mode 100644 test/w3c/prolog/test148.scxml delete mode 100644 test/w3c/prolog/test149.scxml delete mode 100644 test/w3c/prolog/test150.scxml delete mode 100644 test/w3c/prolog/test151.scxml delete mode 100644 test/w3c/prolog/test152.scxml delete mode 100644 test/w3c/prolog/test153.scxml delete mode 100644 test/w3c/prolog/test155.scxml delete mode 100644 test/w3c/prolog/test156.scxml delete mode 100644 test/w3c/prolog/test158.scxml delete mode 100644 test/w3c/prolog/test159.scxml delete mode 100644 test/w3c/prolog/test172.scxml delete mode 100644 test/w3c/prolog/test173.scxml delete mode 100644 test/w3c/prolog/test174.scxml delete mode 100644 test/w3c/prolog/test175.scxml delete mode 100644 test/w3c/prolog/test176.scxml delete mode 100644 test/w3c/prolog/test178.scxml delete mode 100644 test/w3c/prolog/test179.scxml delete mode 100644 test/w3c/prolog/test183.scxml delete mode 100644 test/w3c/prolog/test185.scxml delete mode 100644 test/w3c/prolog/test186.scxml delete mode 100644 test/w3c/prolog/test187.scxml delete mode 100644 test/w3c/prolog/test189.scxml delete mode 100644 test/w3c/prolog/test190.scxml delete mode 100644 test/w3c/prolog/test191.scxml delete mode 100644 test/w3c/prolog/test192.scxml delete mode 100644 test/w3c/prolog/test193.scxml delete mode 100644 test/w3c/prolog/test194.scxml delete mode 100644 test/w3c/prolog/test198.scxml delete mode 100644 test/w3c/prolog/test199.scxml delete mode 100644 test/w3c/prolog/test200.scxml delete mode 100644 test/w3c/prolog/test201.scxml delete mode 100644 test/w3c/prolog/test205.scxml delete mode 100644 test/w3c/prolog/test207.scxml delete mode 100644 test/w3c/prolog/test208.scxml delete mode 100644 test/w3c/prolog/test210.scxml delete mode 100644 test/w3c/prolog/test215.scxml delete mode 100644 test/w3c/prolog/test216.scxml delete mode 100644 test/w3c/prolog/test216sub1.scxml delete mode 100644 test/w3c/prolog/test220.scxml delete mode 100644 test/w3c/prolog/test223.scxml delete mode 100644 test/w3c/prolog/test224.scxml delete mode 100644 test/w3c/prolog/test225.scxml delete mode 100644 test/w3c/prolog/test226.scxml delete mode 100644 test/w3c/prolog/test226sub1.scxml delete mode 100644 test/w3c/prolog/test228.scxml delete mode 100644 test/w3c/prolog/test229.scxml delete mode 100644 test/w3c/prolog/test230.scxml delete mode 100644 test/w3c/prolog/test232.scxml delete mode 100644 test/w3c/prolog/test233.scxml delete mode 100644 test/w3c/prolog/test234.scxml delete mode 100644 test/w3c/prolog/test235.scxml delete mode 100644 test/w3c/prolog/test236.scxml delete mode 100644 test/w3c/prolog/test237.scxml delete mode 100644 test/w3c/prolog/test239.scxml delete mode 100644 test/w3c/prolog/test239sub1.scxml delete mode 100644 test/w3c/prolog/test240.scxml delete mode 100644 test/w3c/prolog/test241.scxml delete mode 100644 test/w3c/prolog/test242.scxml delete mode 100644 test/w3c/prolog/test242sub1.scxml delete mode 100644 test/w3c/prolog/test243.scxml delete mode 100644 test/w3c/prolog/test244.scxml delete mode 100644 test/w3c/prolog/test245.scxml delete mode 100644 test/w3c/prolog/test247.scxml delete mode 100644 test/w3c/prolog/test250.scxml delete mode 100644 test/w3c/prolog/test252.scxml delete mode 100644 test/w3c/prolog/test253.scxml delete mode 100644 test/w3c/prolog/test276.scxml delete mode 100644 test/w3c/prolog/test276sub1.scxml delete mode 100644 test/w3c/prolog/test277.scxml delete mode 100644 test/w3c/prolog/test279.scxml delete mode 100644 test/w3c/prolog/test280.scxml delete mode 100644 test/w3c/prolog/test286.scxml delete mode 100644 test/w3c/prolog/test287.scxml delete mode 100644 test/w3c/prolog/test288.scxml delete mode 100644 test/w3c/prolog/test294.scxml delete mode 100644 test/w3c/prolog/test298.scxml delete mode 100644 test/w3c/prolog/test301.scxml delete mode 100644 test/w3c/prolog/test302.scxml delete mode 100644 test/w3c/prolog/test303.scxml delete mode 100644 test/w3c/prolog/test304.scxml delete mode 100644 test/w3c/prolog/test307.scxml delete mode 100644 test/w3c/prolog/test309.scxml delete mode 100644 test/w3c/prolog/test310.scxml delete mode 100644 test/w3c/prolog/test311.scxml delete mode 100644 test/w3c/prolog/test312.scxml delete mode 100644 test/w3c/prolog/test313.scxml delete mode 100644 test/w3c/prolog/test314.scxml delete mode 100644 test/w3c/prolog/test318.scxml delete mode 100644 test/w3c/prolog/test319.scxml delete mode 100644 test/w3c/prolog/test321.scxml delete mode 100644 test/w3c/prolog/test322.scxml delete mode 100644 test/w3c/prolog/test323.scxml delete mode 100644 test/w3c/prolog/test324.scxml delete mode 100644 test/w3c/prolog/test325.scxml delete mode 100644 test/w3c/prolog/test326.scxml delete mode 100644 test/w3c/prolog/test329.scxml delete mode 100644 test/w3c/prolog/test330.scxml delete mode 100644 test/w3c/prolog/test331.scxml delete mode 100644 test/w3c/prolog/test332.scxml delete mode 100644 test/w3c/prolog/test333.scxml delete mode 100644 test/w3c/prolog/test335.scxml delete mode 100644 test/w3c/prolog/test336.scxml delete mode 100644 test/w3c/prolog/test337.scxml delete mode 100644 test/w3c/prolog/test338.scxml delete mode 100644 test/w3c/prolog/test339.scxml delete mode 100644 test/w3c/prolog/test342.scxml delete mode 100644 test/w3c/prolog/test343.scxml delete mode 100644 test/w3c/prolog/test344.scxml delete mode 100644 test/w3c/prolog/test346.scxml delete mode 100644 test/w3c/prolog/test347.scxml delete mode 100644 test/w3c/prolog/test348.scxml delete mode 100644 test/w3c/prolog/test349.scxml delete mode 100644 test/w3c/prolog/test350.scxml delete mode 100644 test/w3c/prolog/test351.scxml delete mode 100644 test/w3c/prolog/test352.scxml delete mode 100644 test/w3c/prolog/test354.scxml delete mode 100644 test/w3c/prolog/test355.scxml delete mode 100644 test/w3c/prolog/test364.scxml delete mode 100644 test/w3c/prolog/test372.scxml delete mode 100644 test/w3c/prolog/test375.scxml delete mode 100644 test/w3c/prolog/test376.scxml delete mode 100644 test/w3c/prolog/test377.scxml delete mode 100644 test/w3c/prolog/test378.scxml delete mode 100644 test/w3c/prolog/test387.scxml delete mode 100644 test/w3c/prolog/test388.scxml delete mode 100644 test/w3c/prolog/test396.scxml delete mode 100644 test/w3c/prolog/test399.scxml delete mode 100644 test/w3c/prolog/test401.scxml delete mode 100644 test/w3c/prolog/test402.scxml delete mode 100644 test/w3c/prolog/test403a.scxml delete mode 100644 test/w3c/prolog/test403b.scxml delete mode 100644 test/w3c/prolog/test403c.scxml delete mode 100644 test/w3c/prolog/test404.scxml delete mode 100644 test/w3c/prolog/test405.scxml delete mode 100644 test/w3c/prolog/test406.scxml delete mode 100644 test/w3c/prolog/test407.scxml delete mode 100644 test/w3c/prolog/test409.scxml delete mode 100644 test/w3c/prolog/test411.scxml delete mode 100644 test/w3c/prolog/test412.scxml delete mode 100644 test/w3c/prolog/test413.scxml delete mode 100644 test/w3c/prolog/test415.scxml delete mode 100644 test/w3c/prolog/test416.scxml delete mode 100644 test/w3c/prolog/test417.scxml delete mode 100644 test/w3c/prolog/test419.scxml delete mode 100644 test/w3c/prolog/test421.scxml delete mode 100644 test/w3c/prolog/test422.scxml delete mode 100644 test/w3c/prolog/test423.scxml delete mode 100644 test/w3c/prolog/test446.txt delete mode 100644 test/w3c/prolog/test487.scxml delete mode 100644 test/w3c/prolog/test488.scxml delete mode 100644 test/w3c/prolog/test495.scxml delete mode 100644 test/w3c/prolog/test496.scxml delete mode 100644 test/w3c/prolog/test500.scxml delete mode 100644 test/w3c/prolog/test501.scxml delete mode 100644 test/w3c/prolog/test503.scxml delete mode 100644 test/w3c/prolog/test504.scxml delete mode 100644 test/w3c/prolog/test505.scxml delete mode 100644 test/w3c/prolog/test506.scxml delete mode 100644 test/w3c/prolog/test509.scxml delete mode 100644 test/w3c/prolog/test510.scxml delete mode 100644 test/w3c/prolog/test513.txt delete mode 100644 test/w3c/prolog/test518.scxml delete mode 100644 test/w3c/prolog/test519.scxml delete mode 100644 test/w3c/prolog/test520.scxml delete mode 100644 test/w3c/prolog/test521.scxml delete mode 100644 test/w3c/prolog/test522.scxml delete mode 100644 test/w3c/prolog/test525.scxml delete mode 100644 test/w3c/prolog/test527.scxml delete mode 100644 test/w3c/prolog/test528.scxml delete mode 100644 test/w3c/prolog/test529.scxml delete mode 100644 test/w3c/prolog/test530.scxml delete mode 100644 test/w3c/prolog/test531.scxml delete mode 100644 test/w3c/prolog/test532.scxml delete mode 100644 test/w3c/prolog/test533.scxml delete mode 100644 test/w3c/prolog/test534.scxml delete mode 100644 test/w3c/prolog/test539.txt delete mode 100644 test/w3c/prolog/test540.txt delete mode 100644 test/w3c/prolog/test550.scxml delete mode 100644 test/w3c/prolog/test551.scxml delete mode 100644 test/w3c/prolog/test552.scxml delete mode 100644 test/w3c/prolog/test552.txt delete mode 100644 test/w3c/prolog/test553.scxml delete mode 100644 test/w3c/prolog/test554.scxml delete mode 100644 test/w3c/prolog/test557.txt delete mode 100644 test/w3c/prolog/test558.txt delete mode 100644 test/w3c/prolog/test567.scxml delete mode 100644 test/w3c/prolog/test570.scxml delete mode 100644 test/w3c/prolog/test576.scxml delete mode 100644 test/w3c/prolog/test577.scxml delete mode 100644 test/w3c/prolog/test579.scxml delete mode 100644 test/w3c/prolog/test580.scxml delete mode 100644 test/w3c/promela/robots.txt delete mode 100644 test/w3c/promela/test144.scxml delete mode 100644 test/w3c/promela/test147.scxml delete mode 100644 test/w3c/promela/test148.scxml delete mode 100644 test/w3c/promela/test149.scxml delete mode 100644 test/w3c/promela/test150.scxml delete mode 100644 test/w3c/promela/test151.scxml delete mode 100644 test/w3c/promela/test152.scxml delete mode 100644 test/w3c/promela/test153.scxml delete mode 100644 test/w3c/promela/test155.scxml delete mode 100644 test/w3c/promela/test156.scxml delete mode 100644 test/w3c/promela/test158.scxml delete mode 100644 test/w3c/promela/test159.scxml delete mode 100644 test/w3c/promela/test172.scxml delete mode 100644 test/w3c/promela/test173.scxml delete mode 100644 test/w3c/promela/test174.scxml delete mode 100644 test/w3c/promela/test175.scxml delete mode 100644 test/w3c/promela/test176.scxml delete mode 100644 test/w3c/promela/test178.scxml delete mode 100644 test/w3c/promela/test179.scxml delete mode 100644 test/w3c/promela/test183.scxml delete mode 100644 test/w3c/promela/test185.scxml delete mode 100644 test/w3c/promela/test186.scxml delete mode 100644 test/w3c/promela/test187.scxml delete mode 100644 test/w3c/promela/test189.scxml delete mode 100644 test/w3c/promela/test190.scxml delete mode 100644 test/w3c/promela/test191.scxml delete mode 100644 test/w3c/promela/test192.scxml delete mode 100644 test/w3c/promela/test193.scxml delete mode 100644 test/w3c/promela/test194.scxml delete mode 100644 test/w3c/promela/test198.scxml delete mode 100644 test/w3c/promela/test199.scxml delete mode 100644 test/w3c/promela/test200.scxml delete mode 100644 test/w3c/promela/test201.scxml delete mode 100644 test/w3c/promela/test205.scxml delete mode 100644 test/w3c/promela/test207.scxml delete mode 100644 test/w3c/promela/test208.scxml delete mode 100644 test/w3c/promela/test210.scxml delete mode 100644 test/w3c/promela/test215.scxml delete mode 100644 test/w3c/promela/test216.scxml delete mode 100644 test/w3c/promela/test216sub1.scxml delete mode 100644 test/w3c/promela/test220.scxml delete mode 100644 test/w3c/promela/test223.scxml delete mode 100644 test/w3c/promela/test224.scxml delete mode 100644 test/w3c/promela/test225.scxml delete mode 100644 test/w3c/promela/test226.scxml delete mode 100644 test/w3c/promela/test226sub1.scxml delete mode 100644 test/w3c/promela/test228.scxml delete mode 100644 test/w3c/promela/test229.scxml delete mode 100644 test/w3c/promela/test230.scxml delete mode 100644 test/w3c/promela/test232.scxml delete mode 100644 test/w3c/promela/test233.scxml delete mode 100644 test/w3c/promela/test234.scxml delete mode 100644 test/w3c/promela/test235.scxml delete mode 100644 test/w3c/promela/test236.scxml delete mode 100644 test/w3c/promela/test237.scxml delete mode 100644 test/w3c/promela/test239.scxml delete mode 100644 test/w3c/promela/test239sub1.scxml delete mode 100644 test/w3c/promela/test240.scxml delete mode 100644 test/w3c/promela/test241.scxml delete mode 100644 test/w3c/promela/test242.scxml delete mode 100644 test/w3c/promela/test242sub1.scxml delete mode 100644 test/w3c/promela/test243.scxml delete mode 100644 test/w3c/promela/test244.scxml delete mode 100644 test/w3c/promela/test245.scxml delete mode 100644 test/w3c/promela/test247.scxml delete mode 100644 test/w3c/promela/test250.scxml delete mode 100644 test/w3c/promela/test252.scxml delete mode 100644 test/w3c/promela/test253.scxml delete mode 100644 test/w3c/promela/test276.scxml delete mode 100644 test/w3c/promela/test276sub1.scxml delete mode 100644 test/w3c/promela/test277.scxml delete mode 100644 test/w3c/promela/test279.scxml delete mode 100644 test/w3c/promela/test280.scxml delete mode 100644 test/w3c/promela/test286.scxml delete mode 100644 test/w3c/promela/test287.scxml delete mode 100644 test/w3c/promela/test288.scxml delete mode 100644 test/w3c/promela/test294.scxml delete mode 100644 test/w3c/promela/test298.scxml delete mode 100644 test/w3c/promela/test301.scxml delete mode 100644 test/w3c/promela/test302.scxml delete mode 100644 test/w3c/promela/test303.scxml delete mode 100644 test/w3c/promela/test304.scxml delete mode 100644 test/w3c/promela/test307.scxml delete mode 100644 test/w3c/promela/test309.scxml delete mode 100644 test/w3c/promela/test310.scxml delete mode 100644 test/w3c/promela/test311.scxml delete mode 100644 test/w3c/promela/test312.scxml delete mode 100644 test/w3c/promela/test313.scxml delete mode 100644 test/w3c/promela/test314.scxml delete mode 100644 test/w3c/promela/test318.scxml delete mode 100644 test/w3c/promela/test319.scxml delete mode 100644 test/w3c/promela/test321.scxml delete mode 100644 test/w3c/promela/test322.scxml delete mode 100644 test/w3c/promela/test323.scxml delete mode 100644 test/w3c/promela/test324.scxml delete mode 100644 test/w3c/promela/test325.scxml delete mode 100644 test/w3c/promela/test326.scxml delete mode 100644 test/w3c/promela/test329.scxml delete mode 100644 test/w3c/promela/test330.scxml delete mode 100644 test/w3c/promela/test331.scxml delete mode 100644 test/w3c/promela/test332.scxml delete mode 100644 test/w3c/promela/test333.scxml delete mode 100644 test/w3c/promela/test335.scxml delete mode 100644 test/w3c/promela/test336.scxml delete mode 100644 test/w3c/promela/test337.scxml delete mode 100644 test/w3c/promela/test338.scxml delete mode 100644 test/w3c/promela/test339.scxml delete mode 100644 test/w3c/promela/test342.scxml delete mode 100644 test/w3c/promela/test343.scxml delete mode 100644 test/w3c/promela/test344.scxml delete mode 100644 test/w3c/promela/test346.scxml delete mode 100644 test/w3c/promela/test347.scxml delete mode 100644 test/w3c/promela/test348.scxml delete mode 100644 test/w3c/promela/test349.scxml delete mode 100644 test/w3c/promela/test350.scxml delete mode 100644 test/w3c/promela/test351.scxml delete mode 100644 test/w3c/promela/test352.scxml delete mode 100644 test/w3c/promela/test354.scxml delete mode 100644 test/w3c/promela/test355.scxml delete mode 100644 test/w3c/promela/test364.scxml delete mode 100644 test/w3c/promela/test372.scxml delete mode 100644 test/w3c/promela/test375.scxml delete mode 100644 test/w3c/promela/test376.scxml delete mode 100644 test/w3c/promela/test377.scxml delete mode 100644 test/w3c/promela/test378.scxml delete mode 100644 test/w3c/promela/test387.scxml delete mode 100644 test/w3c/promela/test388.scxml delete mode 100644 test/w3c/promela/test396.scxml delete mode 100644 test/w3c/promela/test399.scxml delete mode 100644 test/w3c/promela/test401.scxml delete mode 100644 test/w3c/promela/test402.scxml delete mode 100644 test/w3c/promela/test403a.scxml delete mode 100644 test/w3c/promela/test403b.scxml delete mode 100644 test/w3c/promela/test403c.scxml delete mode 100644 test/w3c/promela/test404.scxml delete mode 100644 test/w3c/promela/test405.scxml delete mode 100644 test/w3c/promela/test406.scxml delete mode 100644 test/w3c/promela/test407.scxml delete mode 100644 test/w3c/promela/test409.scxml delete mode 100644 test/w3c/promela/test411.scxml delete mode 100644 test/w3c/promela/test412.scxml delete mode 100644 test/w3c/promela/test413.scxml delete mode 100644 test/w3c/promela/test415.scxml delete mode 100644 test/w3c/promela/test416.scxml delete mode 100644 test/w3c/promela/test417.scxml delete mode 100644 test/w3c/promela/test419.scxml delete mode 100644 test/w3c/promela/test421.scxml delete mode 100644 test/w3c/promela/test422.scxml delete mode 100644 test/w3c/promela/test423.scxml delete mode 100644 test/w3c/promela/test446.txt delete mode 100644 test/w3c/promela/test487.scxml delete mode 100644 test/w3c/promela/test488.scxml delete mode 100644 test/w3c/promela/test495.scxml delete mode 100644 test/w3c/promela/test496.scxml delete mode 100644 test/w3c/promela/test500.scxml delete mode 100644 test/w3c/promela/test501.scxml delete mode 100644 test/w3c/promela/test503.scxml delete mode 100644 test/w3c/promela/test504.scxml delete mode 100644 test/w3c/promela/test505.scxml delete mode 100644 test/w3c/promela/test506.scxml delete mode 100644 test/w3c/promela/test509.scxml delete mode 100644 test/w3c/promela/test510.scxml delete mode 100644 test/w3c/promela/test513.txt delete mode 100644 test/w3c/promela/test518.scxml delete mode 100644 test/w3c/promela/test519.scxml delete mode 100644 test/w3c/promela/test520.scxml delete mode 100644 test/w3c/promela/test521.scxml delete mode 100644 test/w3c/promela/test522.scxml delete mode 100644 test/w3c/promela/test525.scxml delete mode 100644 test/w3c/promela/test527.scxml delete mode 100644 test/w3c/promela/test528.scxml delete mode 100644 test/w3c/promela/test529.scxml delete mode 100644 test/w3c/promela/test530.scxml delete mode 100644 test/w3c/promela/test531.scxml delete mode 100644 test/w3c/promela/test532.scxml delete mode 100644 test/w3c/promela/test533.scxml delete mode 100644 test/w3c/promela/test534.scxml delete mode 100644 test/w3c/promela/test539.txt delete mode 100644 test/w3c/promela/test540.txt delete mode 100644 test/w3c/promela/test550.scxml delete mode 100644 test/w3c/promela/test551.scxml delete mode 100644 test/w3c/promela/test552.scxml delete mode 100644 test/w3c/promela/test552.txt delete mode 100644 test/w3c/promela/test553.scxml delete mode 100644 test/w3c/promela/test554.scxml delete mode 100644 test/w3c/promela/test557.txt delete mode 100644 test/w3c/promela/test558.txt delete mode 100644 test/w3c/promela/test567.scxml delete mode 100644 test/w3c/promela/test570.scxml delete mode 100644 test/w3c/promela/test576.scxml delete mode 100644 test/w3c/promela/test577.scxml delete mode 100644 test/w3c/promela/test579.scxml delete mode 100644 test/w3c/promela/test580.scxml delete mode 100644 test/w3c/run_generated_test.cmake delete mode 100644 test/w3c/run_minimized_flat_test.cmake delete mode 100644 test/w3c/run_minimized_test.cmake delete mode 100644 test/w3c/run_promela_test.cmake delete mode 100644 test/w3c/schema/scxml-attribs.xsd delete mode 100644 test/w3c/schema/scxml-contentmodels.xsd delete mode 100644 test/w3c/schema/scxml-copyright.xsd delete mode 100644 test/w3c/schema/scxml-core-strict.xsd delete mode 100644 test/w3c/schema/scxml-data-strict.xsd delete mode 100644 test/w3c/schema/scxml-datatypes.xsd delete mode 100644 test/w3c/schema/scxml-external-strict.xsd delete mode 100644 test/w3c/schema/scxml-message.xsd delete mode 100644 test/w3c/schema/scxml-messages.xsd delete mode 100644 test/w3c/schema/scxml-module-anchor.xsd delete mode 100644 test/w3c/schema/scxml-module-core.xsd delete mode 100644 test/w3c/schema/scxml-module-data.xsd delete mode 100644 test/w3c/schema/scxml-module-external.xsd delete mode 100644 test/w3c/schema/scxml-module-script.xsd delete mode 100644 test/w3c/schema/scxml-profile-basic.xsd delete mode 100644 test/w3c/schema/scxml-profile-ecma.xsd delete mode 100644 test/w3c/schema/scxml-profile-minimum.xsd delete mode 100644 test/w3c/schema/scxml-profile-xpath.xsd delete mode 100644 test/w3c/schema/scxml-strict.xsd delete mode 100644 test/w3c/schema/scxml.xsd delete mode 100644 test/w3c/schema/xml.xsd delete mode 100644 test/w3c/xpath/robots.txt delete mode 100644 test/w3c/xpath/test144.scxml delete mode 100644 test/w3c/xpath/test147.scxml delete mode 100644 test/w3c/xpath/test148.scxml delete mode 100644 test/w3c/xpath/test149.scxml delete mode 100644 test/w3c/xpath/test150.scxml delete mode 100644 test/w3c/xpath/test151.scxml delete mode 100644 test/w3c/xpath/test152.scxml delete mode 100644 test/w3c/xpath/test153.scxml delete mode 100644 test/w3c/xpath/test155.scxml delete mode 100644 test/w3c/xpath/test156.scxml delete mode 100644 test/w3c/xpath/test158.scxml delete mode 100644 test/w3c/xpath/test159.scxml delete mode 100644 test/w3c/xpath/test172.scxml delete mode 100644 test/w3c/xpath/test173.scxml delete mode 100644 test/w3c/xpath/test174.scxml delete mode 100644 test/w3c/xpath/test175.scxml delete mode 100644 test/w3c/xpath/test176.scxml delete mode 100644 test/w3c/xpath/test178.scxml delete mode 100644 test/w3c/xpath/test179.scxml delete mode 100644 test/w3c/xpath/test183.scxml delete mode 100644 test/w3c/xpath/test185.scxml delete mode 100644 test/w3c/xpath/test186.scxml delete mode 100644 test/w3c/xpath/test187.scxml delete mode 100644 test/w3c/xpath/test189.scxml delete mode 100644 test/w3c/xpath/test190.scxml delete mode 100644 test/w3c/xpath/test191.scxml delete mode 100644 test/w3c/xpath/test192.scxml delete mode 100644 test/w3c/xpath/test193.scxml delete mode 100644 test/w3c/xpath/test194.scxml delete mode 100644 test/w3c/xpath/test198.scxml delete mode 100644 test/w3c/xpath/test199.scxml delete mode 100644 test/w3c/xpath/test200.scxml delete mode 100644 test/w3c/xpath/test201.scxml delete mode 100644 test/w3c/xpath/test205.scxml delete mode 100644 test/w3c/xpath/test207.scxml delete mode 100644 test/w3c/xpath/test208.scxml delete mode 100644 test/w3c/xpath/test210.scxml delete mode 100644 test/w3c/xpath/test215.scxml delete mode 100644 test/w3c/xpath/test216.scxml delete mode 100644 test/w3c/xpath/test216sub1.scxml delete mode 100644 test/w3c/xpath/test220.scxml delete mode 100644 test/w3c/xpath/test223.scxml delete mode 100644 test/w3c/xpath/test224.scxml delete mode 100644 test/w3c/xpath/test225.scxml delete mode 100644 test/w3c/xpath/test226.scxml delete mode 100644 test/w3c/xpath/test226sub1.scxml delete mode 100644 test/w3c/xpath/test228.scxml delete mode 100644 test/w3c/xpath/test229.scxml delete mode 100644 test/w3c/xpath/test230.scxml delete mode 100644 test/w3c/xpath/test232.scxml delete mode 100644 test/w3c/xpath/test233.scxml delete mode 100644 test/w3c/xpath/test234.scxml delete mode 100644 test/w3c/xpath/test235.scxml delete mode 100644 test/w3c/xpath/test236.scxml delete mode 100644 test/w3c/xpath/test237.scxml delete mode 100644 test/w3c/xpath/test239.scxml delete mode 100644 test/w3c/xpath/test239sub1.scxml delete mode 100644 test/w3c/xpath/test240.scxml delete mode 100644 test/w3c/xpath/test241.scxml delete mode 100644 test/w3c/xpath/test242.scxml delete mode 100644 test/w3c/xpath/test242sub1.scxml delete mode 100644 test/w3c/xpath/test243.scxml delete mode 100644 test/w3c/xpath/test244.scxml delete mode 100644 test/w3c/xpath/test245.scxml delete mode 100644 test/w3c/xpath/test247.scxml delete mode 100644 test/w3c/xpath/test250.scxml delete mode 100644 test/w3c/xpath/test252.scxml delete mode 100644 test/w3c/xpath/test253.scxml delete mode 100644 test/w3c/xpath/test276.scxml delete mode 100644 test/w3c/xpath/test276sub1.scxml delete mode 100644 test/w3c/xpath/test277.scxml delete mode 100644 test/w3c/xpath/test279.scxml delete mode 100644 test/w3c/xpath/test280.scxml delete mode 100644 test/w3c/xpath/test286.scxml delete mode 100644 test/w3c/xpath/test287.scxml delete mode 100644 test/w3c/xpath/test288.scxml delete mode 100644 test/w3c/xpath/test294.scxml delete mode 100644 test/w3c/xpath/test298.scxml delete mode 100644 test/w3c/xpath/test301.scxml delete mode 100644 test/w3c/xpath/test302.scxml delete mode 100644 test/w3c/xpath/test303.scxml delete mode 100644 test/w3c/xpath/test304.scxml delete mode 100644 test/w3c/xpath/test307.scxml delete mode 100644 test/w3c/xpath/test309.scxml delete mode 100644 test/w3c/xpath/test310.scxml delete mode 100644 test/w3c/xpath/test311.scxml delete mode 100644 test/w3c/xpath/test312.scxml delete mode 100644 test/w3c/xpath/test313.scxml delete mode 100644 test/w3c/xpath/test314.scxml delete mode 100644 test/w3c/xpath/test318.scxml delete mode 100644 test/w3c/xpath/test319.scxml delete mode 100644 test/w3c/xpath/test321.scxml delete mode 100644 test/w3c/xpath/test322.scxml delete mode 100644 test/w3c/xpath/test323.scxml delete mode 100644 test/w3c/xpath/test324.scxml delete mode 100644 test/w3c/xpath/test325.scxml delete mode 100644 test/w3c/xpath/test326.scxml delete mode 100644 test/w3c/xpath/test329.scxml delete mode 100644 test/w3c/xpath/test330.scxml delete mode 100644 test/w3c/xpath/test331.scxml delete mode 100644 test/w3c/xpath/test332.scxml delete mode 100644 test/w3c/xpath/test333.scxml delete mode 100644 test/w3c/xpath/test335.scxml delete mode 100644 test/w3c/xpath/test336.scxml delete mode 100644 test/w3c/xpath/test337.scxml delete mode 100644 test/w3c/xpath/test338.scxml delete mode 100644 test/w3c/xpath/test339.scxml delete mode 100644 test/w3c/xpath/test342.scxml delete mode 100644 test/w3c/xpath/test343.scxml delete mode 100644 test/w3c/xpath/test344.scxml delete mode 100644 test/w3c/xpath/test346.scxml delete mode 100644 test/w3c/xpath/test347.scxml delete mode 100644 test/w3c/xpath/test348.scxml delete mode 100644 test/w3c/xpath/test349.scxml delete mode 100644 test/w3c/xpath/test350.scxml delete mode 100644 test/w3c/xpath/test351.scxml delete mode 100644 test/w3c/xpath/test352.scxml delete mode 100644 test/w3c/xpath/test354.scxml delete mode 100644 test/w3c/xpath/test355.scxml delete mode 100644 test/w3c/xpath/test364.scxml delete mode 100644 test/w3c/xpath/test372.scxml delete mode 100644 test/w3c/xpath/test375.scxml delete mode 100644 test/w3c/xpath/test376.scxml delete mode 100644 test/w3c/xpath/test377.scxml delete mode 100644 test/w3c/xpath/test378.scxml delete mode 100644 test/w3c/xpath/test387.scxml delete mode 100644 test/w3c/xpath/test388.scxml delete mode 100644 test/w3c/xpath/test396.scxml delete mode 100644 test/w3c/xpath/test399.scxml delete mode 100644 test/w3c/xpath/test401.scxml delete mode 100644 test/w3c/xpath/test402.scxml delete mode 100644 test/w3c/xpath/test403a.scxml delete mode 100644 test/w3c/xpath/test403b.scxml delete mode 100644 test/w3c/xpath/test403c.scxml delete mode 100644 test/w3c/xpath/test404.scxml delete mode 100644 test/w3c/xpath/test405.scxml delete mode 100644 test/w3c/xpath/test406.scxml delete mode 100644 test/w3c/xpath/test407.scxml delete mode 100644 test/w3c/xpath/test409.scxml delete mode 100644 test/w3c/xpath/test411.scxml delete mode 100644 test/w3c/xpath/test412.scxml delete mode 100644 test/w3c/xpath/test413.scxml delete mode 100644 test/w3c/xpath/test415.scxml delete mode 100644 test/w3c/xpath/test416.scxml delete mode 100644 test/w3c/xpath/test417.scxml delete mode 100644 test/w3c/xpath/test419.scxml delete mode 100644 test/w3c/xpath/test421.scxml delete mode 100644 test/w3c/xpath/test422.scxml delete mode 100644 test/w3c/xpath/test423.scxml delete mode 100644 test/w3c/xpath/test446.txt delete mode 100644 test/w3c/xpath/test463.scxml delete mode 100644 test/w3c/xpath/test464.scxml delete mode 100644 test/w3c/xpath/test465.scxml delete mode 100644 test/w3c/xpath/test466.scxml delete mode 100644 test/w3c/xpath/test467.scxml delete mode 100644 test/w3c/xpath/test468.scxml delete mode 100644 test/w3c/xpath/test469.scxml delete mode 100644 test/w3c/xpath/test470.scxml delete mode 100644 test/w3c/xpath/test473.scxml delete mode 100644 test/w3c/xpath/test474.scxml delete mode 100644 test/w3c/xpath/test475.scxml delete mode 100644 test/w3c/xpath/test476.scxml delete mode 100644 test/w3c/xpath/test477.scxml delete mode 100644 test/w3c/xpath/test478.scxml delete mode 100644 test/w3c/xpath/test479.scxml delete mode 100644 test/w3c/xpath/test480.scxml delete mode 100644 test/w3c/xpath/test481.scxml delete mode 100644 test/w3c/xpath/test482.scxml delete mode 100644 test/w3c/xpath/test483.scxml delete mode 100644 test/w3c/xpath/test487.scxml delete mode 100644 test/w3c/xpath/test488.scxml delete mode 100644 test/w3c/xpath/test495.scxml delete mode 100644 test/w3c/xpath/test496.scxml delete mode 100644 test/w3c/xpath/test500.scxml delete mode 100644 test/w3c/xpath/test501.scxml delete mode 100644 test/w3c/xpath/test503.scxml delete mode 100644 test/w3c/xpath/test504.scxml delete mode 100644 test/w3c/xpath/test505.scxml delete mode 100644 test/w3c/xpath/test506.scxml delete mode 100644 test/w3c/xpath/test509.scxml delete mode 100644 test/w3c/xpath/test510.scxml delete mode 100644 test/w3c/xpath/test513.txt delete mode 100644 test/w3c/xpath/test518.scxml delete mode 100644 test/w3c/xpath/test519.scxml delete mode 100644 test/w3c/xpath/test520.scxml delete mode 100644 test/w3c/xpath/test521.scxml delete mode 100644 test/w3c/xpath/test522.scxml delete mode 100644 test/w3c/xpath/test525.scxml delete mode 100644 test/w3c/xpath/test527.scxml delete mode 100644 test/w3c/xpath/test528.scxml delete mode 100644 test/w3c/xpath/test529.scxml delete mode 100644 test/w3c/xpath/test530.scxml delete mode 100644 test/w3c/xpath/test531.scxml delete mode 100644 test/w3c/xpath/test532.scxml delete mode 100644 test/w3c/xpath/test533.scxml delete mode 100644 test/w3c/xpath/test534.scxml delete mode 100644 test/w3c/xpath/test537.scxml delete mode 100644 test/w3c/xpath/test539.scxml delete mode 100644 test/w3c/xpath/test539.txt delete mode 100644 test/w3c/xpath/test540.scxml delete mode 100644 test/w3c/xpath/test540.txt delete mode 100644 test/w3c/xpath/test542.scxml delete mode 100644 test/w3c/xpath/test543.scxml delete mode 100644 test/w3c/xpath/test544.scxml delete mode 100644 test/w3c/xpath/test545.scxml delete mode 100644 test/w3c/xpath/test546.scxml delete mode 100644 test/w3c/xpath/test547.scxml delete mode 100644 test/w3c/xpath/test550.scxml delete mode 100644 test/w3c/xpath/test551.scxml delete mode 100644 test/w3c/xpath/test552.scxml delete mode 100644 test/w3c/xpath/test552.txt delete mode 100644 test/w3c/xpath/test553.scxml delete mode 100644 test/w3c/xpath/test554.scxml delete mode 100644 test/w3c/xpath/test555.scxml delete mode 100644 test/w3c/xpath/test557.txt delete mode 100644 test/w3c/xpath/test558.txt delete mode 100644 test/w3c/xpath/test567.scxml delete mode 100644 test/w3c/xpath/test568.scxml delete mode 100644 test/w3c/xpath/test570.scxml delete mode 100644 test/w3c/xpath/test576.scxml delete mode 100644 test/w3c/xpath/test577.scxml delete mode 100644 test/w3c/xpath/test579.scxml delete mode 100644 test/w3c/xpath/test580.scxml diff --git a/CMakeLists.txt b/CMakeLists.txt index 707e991..224d729 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,37 +1,4 @@ -cmake_minimum_required(VERSION 2.8.4) - -# TODO: -# - Have a look at PGO: -# https://mailman.videolan.org/pipermail/x265-devel/2015-April/007399.html - -cmake_policy(PUSH) -if(POLICY CMP0042) - # new behavior defaults to ON for MACOSX_RPATH - cmake_policy(SET CMP0042 NEW) -endif() -if(POLICY CMP0045) - # Error on non-existent target in get_target_property, - # set to old as we actually use it to check for specific targets - cmake_policy(SET CMP0045 OLD) -endif() -if(POLICY CMP0046) - # Error on non-existent dependency in add_dependencies - cmake_policy(SET CMP0046 NEW) -endif() -if(POLICY CMP0054) - # Escape variables in if - cmake_policy(SET CMP0054 OLD) -endif() -if(POLICY CMP0059) - # Don't treat ``DEFINITIONS`` as a built-in directory property - required for cotire - cmake_policy(SET CMP0059 OLD) -endif() - -# specify USCXML version -SET(USCXML_VERSION_MAJOR "0") -SET(USCXML_VERSION_MINOR "4") -SET(USCXML_VERSION_PATCH "0") -SET(USCXML_VERSION ${USCXML_VERSION_MAJOR}.${USCXML_VERSION_MINOR}.${USCXML_VERSION_PATCH}) +cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) # build type has to be set before the project definition SET(BUILD_TYPE_HELP "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug, Release, RelWithDebInfo, MinSizeRel.") @@ -41,1353 +8,297 @@ ELSE() SET(CMAKE_BUILD_TYPE Release CACHE STRING ${BUILD_TYPE_HELP}) ENDIF() -project(uscxml) - -# where to find the cmake modules we distribute -set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/contrib/cmake) -include("${CMAKE_MODULE_PATH}/USCXMLMacros.cmake") -include("${CMAKE_MODULE_PATH}/FunctionExists.cmake") -include("${CMAKE_MODULE_PATH}/HeaderExists.cmake") -include("${CMAKE_MODULE_PATH}/BinaryExists.cmake") -include("${CMAKE_MODULE_PATH}/TryCompile.cmake") - -# CMake 2.8.11 reports AMD64 for Windows 64Bit, where earlier versions reported x86 -# we resolve it with a 64bit check later -if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64") - set(CMAKE_SYSTEM_PROCESSOR "x86") -endif() -if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386") - set(CMAKE_SYSTEM_PROCESSOR "x86") -endif() -if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") - set(CMAKE_SYSTEM_PROCESSOR "x86") -endif() - -# use folders in the IDEs for the various targets (e.g. Library, Testing, Tools ..) -set_property(GLOBAL PROPERTY USE_FOLDERS ON) - -# lower case version of system name and compiler for library paths -string(TOLOWER ${CMAKE_SYSTEM_NAME} CMAKE_SYSTEM_NAME_LC) -string(TOLOWER ${CMAKE_CXX_COMPILER_ID} CMAKE_CXX_COMPILER_ID_LC) - -if (WIN32) - set(CMAKE_CXX_COMPILER_ID_LC ${CMAKE_CXX_COMPILER_ID_LC}${MSVC_VERSION}) -endif() - -############################################################ -# Search paths for cross compiling and prebuilds -############################################################ - -# this happens when we ssh into windows to build there, see also: -# http://publib.boulder.ibm.com/infocenter/wxdinfo/v6r1/index.jsp?topic=/com.ibm.websphere.ops.doc/info/odoe_task/tcimgr_sshwin.html -if (NOT CMAKE_SYSTEM_PROCESSOR) - set(CMAKE_SYSTEM_PROCESSOR x86) -endif() - -# is this a 64Bit host? -if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(64BIT_HOST ON) - set(64BIT_LIB_POSTFIX 64) - set(64BIT_SUFFIX "_64") - # additional library paths to be searched - set(FIND_LIBRARY_USE_LIB64_PATHS ON) -# LIST(APPEND CMAKE_FIND_ROOT_PATH "/usr/local/lib64") -# LIST(APPEND CMAKE_FIND_ROOT_PATH "/usr/lib64") -endif() - -if (APPLE) - set(LIBCPP_NAME "libstdc++") # before mavericks - # get MacOSX version - execute_process(COMMAND /usr/bin/sw_vers -productVersion - OUTPUT_VARIABLE MACOSX_VERSION - ERROR_VARIABLE MACOSX_VERSION_errors - RESULT_VARIABLE MACOSX_VERSION_result - OUTPUT_STRIP_TRAILING_WHITESPACE) - if (MACOSX_VERSION) - THREE_PART_VERSION_TO_VARS( - ${MACOSX_VERSION} - MACOSX_VERSION_MAJOR - MACOSX_VERSION_MINOR - MACOSX_VERSION_PATCH) - endif() - if (MACOSX_VERSION VERSION_GREATER "10.8.99") - set(LIBCPP_NAME "libc++") # mavericks - # LIST(APPEND CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT}) - # make sure that we find libxml2 here first - set(CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT} ${CMAKE_FIND_ROOT_PATH}) - endif() -endif() - -if (NOT $ENV{MACOSX_DEPLOYMENT_TARGET} STREQUAL "" - AND ENV{MACOSX_DEPLOYMENT_TARGET} VERSION_LESS "10.9" - AND MACOSX_VERSION VERSION_GREATER "10.8.99") - message(WARNING "\nMACOSX_DEPLOYMENT_TARGET is set to $ENV{MACOSX_DEPLOYMENT_TARGET} implying libstdc++ instead of libc++ - linking against prebuilts from 10.8") - set(MACOSX_VERSION_MINOR 8) -endif() - -# We use the toolchain file from http://code.google.com/p/android-cmake/ -if (CMAKE_CROSSCOMPILING AND ANDROID_ABI) - set(ANDROID ON) - set(CMAKE_CROSSCOMPILING_TARGET android) - set(CMAKE_SYSTEM_VERSION ${ANDROID_NATIVE_API_LEVEL}) -endif() - -if (CMAKE_CROSSCOMPILING) - if (IOS) - add_definitions(-DTARGET_OS_IPHONE) - elseif(IOSSIM) - add_definitions(-DTARGET_IPHONE_SIMULATOR) - endif() -endif() - -# -# Setting the CMAKE_FIND_ROOT_PATH to a list of directories will cause all CMake modules -# to look in these directories in addition to the system search paths: -# http://www.vtk.org/Wiki/CMake_Cross_Compiling#Searching_and_finding_external_software -# - - -# -# determine platform id -# -SET(USCXML_PLATFORM_ID) -if (CMAKE_SYSTEM_NAME_LC) - set(USCXML_PLATFORM_ID ${CMAKE_SYSTEM_NAME_LC}) -else() - set(USCXML_PLATFORM_ID "unknown") -endif() - -if (CMAKE_SYSTEM_PROCESSOR) - set(USCXML_PLATFORM_ID "${USCXML_PLATFORM_ID}-${CMAKE_SYSTEM_PROCESSOR}${64BIT_SUFFIX}") -else() - set(USCXML_PLATFORM_ID "unknown") -endif() - -if (CMAKE_CXX_COMPILER_ID_LC) - set(USCXML_PLATFORM_ID "${USCXML_PLATFORM_ID}-${CMAKE_CXX_COMPILER_ID_LC}") -endif() - -if (LIBCPP_NAME) - set(USCXML_PLATFORM_ID "${USCXML_PLATFORM_ID}-${LIBCPP_NAME}") -endif() - -# handle cross compiles -if (CMAKE_CROSSCOMPILING) - if (IOS) - SET(USCXML_PLATFORM_ID "ios-arm-clang") - SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY "ONLY") - elseif (ANDROID) - # handle mips, x86 and arm - SET(USCXML_PLATFORM_ID "android-${ANDROID_ABI}") - - SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY "ONLY") # we need both to find jni - we don't? - SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM "BOTH") - SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE "BOTH") - - LIST(APPEND CMAKE_PREFIX_PATH "/usr/local/bin") # this is needed to find swig - LIST(APPEND CMAKE_PREFIX_PATH "/opt/local/bin") # this is needed to find protoc - endif() -endif() - -SET(USCXML_PREBUILT_LIBRARY_PATH) -SET(USCXML_PREBUILT_HEADER_PATH "${PROJECT_SOURCE_DIR}/contrib/prebuilt") -SET(USCXML_PREBUILT_LIBRARY_PATH "${PROJECT_SOURCE_DIR}/contrib/prebuilt/${USCXML_PLATFORM_ID}") - -SET(USCXML_LIBRARY_HOST_URL_PREFIX "http://uscxml.tk.informatik.tu-darmstadt.de/prebuilt" CACHE STRING "The root path of an URL where to look for prebuilt libraries." FORCE) -SET(USCXML_LIBRARY_ARCHIVE_NAME "uscxml-prebuilt-${USCXML_PLATFORM_ID}.tgz") - -# -# Download platform independent headers -# - -# delete if too old or unversioned -if (EXISTS "${PROJECT_SOURCE_DIR}/contrib/prebuilt/include/VERSION.txt") - file (STRINGS "${PROJECT_SOURCE_DIR}/contrib/prebuilt/include/VERSION.txt" PREBUILT_INCUDES_VERSION) -endif() -if (NOT "${USCXML_VERSION}" VERSION_EQUAL "${PREBUILT_INCUDES_VERSION}") - message(STATUS "Prebuilt headers unversioned, too old or non-existent - deleting and downloading again") - execute_process( - COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/contrib/prebuilt/include - ) -endif() - -# download if not existing -if (NOT EXISTS ${PROJECT_SOURCE_DIR}/contrib/prebuilt/include) - message(STATUS "Downloading ${USCXML_LIBRARY_HOST_URL_PREFIX}/${USCXML_VERSION}/include.tgz") - - file( - DOWNLOAD - ${USCXML_LIBRARY_HOST_URL_PREFIX}/${USCXML_VERSION}/include.tgz - ${PROJECT_SOURCE_DIR}/contrib/prebuilt/include.tgz - INACTIVITY_TIMEOUT 60 - STATUS DOWNLOAD_STATUS - SHOW_PROGRESS) - - list(GET DOWNLOAD_STATUS 0 STATUS_CODE) - list(GET DOWNLOAD_STATUS 1 STATUS_STRING) - if(STATUS_CODE EQUAL 0) - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${PROJECT_SOURCE_DIR}/contrib/prebuilt/include.tgz - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/contrib/prebuilt/ - ) - execute_process( - COMMAND ${CMAKE_COMMAND} -E remove ${PROJECT_SOURCE_DIR}/contrib/prebuilt/include.tgz - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/contrib/prebuilt/ - ) - file(WRITE ${PROJECT_SOURCE_DIR}/contrib/prebuilt/include/VERSION.txt "${USCXML_VERSION}") - else() - message(FATAL_ERROR "\nDownloading header files\nFAILED with ${STATUS_STRING} (${STATUS_CODE}) \nThis should not happen, retry?") - endif() -endif() - -# -# Download platform dependent headers and libraries -# - -# only delete if too old -if (EXISTS "${PROJECT_SOURCE_DIR}/contrib/prebuilt/${USCXML_PLATFORM_ID}/VERSION.txt") - file (STRINGS "${PROJECT_SOURCE_DIR}/contrib/prebuilt/${USCXML_PLATFORM_ID}/VERSION.txt" PREBUILT_LIBRARIES_VERSION) - if (NOT "${USCXML_VERSION}" VERSION_EQUAL "${PREBUILT_LIBRARIES_VERSION}") - message(STATUS "Prebuilt libraries unversioned, too old or non-existent - deleting and downloading again") - execute_process( - COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/contrib/prebuilt/${USCXML_PLATFORM_ID} - ) - endif() -endif() - - -if (NOT EXISTS ${USCXML_PREBUILT_LIBRARY_PATH}) - message(STATUS "Cannot find prebuilt libraries in ${USCXML_PREBUILT_LIBRARY_PATH}") - message(STATUS "Trying to download ${USCXML_LIBRARY_HOST_URL_PREFIX}/${USCXML_VERSION}/${USCXML_LIBRARY_ARCHIVE_NAME}") - file( - DOWNLOAD - ${USCXML_LIBRARY_HOST_URL_PREFIX}/${USCXML_VERSION}/${USCXML_LIBRARY_ARCHIVE_NAME} - ${PROJECT_SOURCE_DIR}/contrib/prebuilt/${USCXML_LIBRARY_ARCHIVE_NAME} - INACTIVITY_TIMEOUT 60 - STATUS DOWNLOAD_STATUS - SHOW_PROGRESS) - - list(GET DOWNLOAD_STATUS 0 STATUS_CODE) - list(GET DOWNLOAD_STATUS 1 STATUS_STRING) - if(STATUS_CODE EQUAL 0) - # everything worked out fine! - create dir, unpack and delete - file(MAKE_DIRECTORY ${PROJECT_SOURCE_DIR}/contrib/prebuilt/${USCXML_PLATFORM_ID}) - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${PROJECT_SOURCE_DIR}/contrib/prebuilt/${USCXML_LIBRARY_ARCHIVE_NAME} - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/contrib/prebuilt/${USCXML_PLATFORM_ID} - ) - execute_process( - COMMAND ${CMAKE_COMMAND} -E remove ${PROJECT_SOURCE_DIR}/contrib/prebuilt/${USCXML_LIBRARY_ARCHIVE_NAME} - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/contrib/prebuilt/ - ) - file(WRITE ${PROJECT_SOURCE_DIR}/contrib/prebuilt/${USCXML_PLATFORM_ID}/VERSION.txt "${USCXML_VERSION}") - elseif( - NOT STATUS_CODE EQUAL 19 AND # FTP: Invalid file / file not found - NOT STATUS_CODE EQUAL 22) # HTTP: HTTP response code - # server was unreachable, do not create dir to retry - message(FATAL_ERROR "\nDownloading prebuilt libraries\nFAILED with ${STATUS_STRING} (${STATUS_CODE}) \nThis should not happen, retry?") - else() - # we did not know the file, create dir for manual libs - file(MAKE_DIRECTORY ${PROJECT_SOURCE_DIR}/contrib/prebuilt/${USCXML_PLATFORM_ID}) - execute_process( - COMMAND ${CMAKE_COMMAND} -E remove ${PROJECT_SOURCE_DIR}/contrib/prebuilt/${USCXML_LIBRARY_ARCHIVE_NAME} - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/contrib/prebuilt/ - ) - message(FATAL_ERROR "\nPlatform is not supported!\nProvide headers and libraries in\n${PROJECT_SOURCE_DIR}/contrib/prebuilt/${USCXML_PLATFORM_ID}/") - endif() -endif() +PROJECT(uscxml) -if (CMAKE_CROSSCOMPILING) - OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF) - OPTION(ENABLE_COTIRE "Enable compile time reduction techniques" OFF) -else() - OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON) -endif() +################################################# +# General Setup +################################################# -if (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC") - OPTION(ENABLE_COTIRE "Enable compile time reduction techniques" OFF) -else() - OPTION(ENABLE_COTIRE "Enable compile time reduction techniques" ON) -endif() +# specify USCXML version +SET(USCXML_VERSION_MAJOR "2") +SET(USCXML_VERSION_MINOR "0") +SET(USCXML_VERSION_PATCH "0") +SET(USCXML_VERSION ${USCXML_VERSION_MAJOR}.${USCXML_VERSION_MINOR}.${USCXML_VERSION_PATCH}) -if (NOT BUILD_SHARED_LIBS) - add_definitions("-DUSCXML_STATIC") -endif() +# where do libraries and binaries go +set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) -# -# BUILD_PREFER_PREBUILT_LIBS: -# Do we want to search system paths or contrib/prebuilt first? -# -if (CMAKE_CROSSCOMPILING) - # always prefer prebuilt libraries for cross-compiling - OPTION(BUILD_PREFER_PREBUILT_LIBS "Search libraries in contrib/prebuilt first" ON) - SET(CMAKE_PREFIX_PATH "${USCXML_PREBUILT_LIBRARY_PATH};${USCXML_PREBUILT_HEADER_PATH};${CMAKE_PREFIX_PATH}") -else() - OPTION(BUILD_PREFER_PREBUILT_LIBS "Search libraries in contrib/prebuilt first" ON) - if (BUILD_PREFER_PREBUILT_LIBS) - # for everything, we start our search in contrib/prebuilt - SET(CMAKE_PREFIX_PATH "${USCXML_PREBUILT_LIBRARY_PATH};${USCXML_PREBUILT_HEADER_PATH};${CMAKE_PREFIX_PATH}") - else() - # using this trick, we search paths from find_* before CMAKE_FIND_ROOT_PATH as '/' is prepended first - SET(CMAKE_PREFIX_PATH "/;${CMAKE_PREFIX_PATH};${USCXML_PREBUILT_LIBRARY_PATH};${USCXML_PREBUILT_HEADER_PATH}") - endif() -endif() -include_directories(${USCXML_PREBUILT_LIBRARY_PATH}/include) - -if (CMAKE_CROSSCOMPILING) - set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${CMAKE_PREFIX_PATH}) -endif() -# message(STATUS "CMAKE_FIND_ROOT_PATH: ${CMAKE_FIND_ROOT_PATH}") -# message(STATUS "CMAKE_PREFIX_PATH : ${CMAKE_PREFIX_PATH}") -# message(FATAL_ERROR "") +# where to find more cmake scripts +set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/contrib/cmake) +include("${CMAKE_MODULE_PATH}/USCXMLMacros.cmake") +# setup header include paths +include_directories(src) +include_directories(contrib/src) +include_directories(${CMAKE_BINARY_DIR}) +include_directories(${PROJECT_SOURCE_DIR}/contrib/src/jsmn) +include_directories(${PROJECT_SOURCE_DIR}/contrib/src/evws) if (WIN32) - set(BUILD_SHARED_LIBS OFF) include_directories(${PROJECT_SOURCE_DIR}/contrib/src/getopt) include_directories(${PROJECT_SOURCE_DIR}/contrib/src/inttypes) endif() -include_directories(${PROJECT_SOURCE_DIR}/contrib/src/jsmn) -include_directories(${PROJECT_SOURCE_DIR}/contrib/src/evws) -#include_directories(${PROJECT_SOURCE_DIR}/contrib/src/google-url) -############################################################ -# General setup -############################################################ - -# enable testing and actual output with tests -if (CMAKE_CROSSCOMPILING) - OPTION(BUILD_TESTS "Build USCXML tests" OFF) -else() - OPTION(BUILD_TESTS "Build USCXML tests" ON) - OPTION(BUILD_TESTS_W3C_ECMA "Create W3C ECMAScript tests" ON) - OPTION(BUILD_TESTS_W3C_XPATH "Create W3C XPath tests" ON) - OPTION(BUILD_TESTS_W3C_LUA "Create W3C Lua tests" ON) - OPTION(BUILD_TESTS_W3C_PROLOG "Create W3C Prolog tests" ON) - OPTION(BUILD_TESTS_W3C_PROMELA "Create W3C Promela tests" ON) - - OPTION(BUILD_TESTS_FSM "Build FSM converted W3C tests" OFF) - OPTION(BUILD_TESTS_FSM_ECMA "Create FSM converted W3C ECMAScript tests" ON) - OPTION(BUILD_TESTS_FSM_XPATH "Create FSM converted W3C XPath tests" ON) - OPTION(BUILD_TESTS_FSM_LUA "Create FSM converted W3C Lua tests" ON) - OPTION(BUILD_TESTS_FSM_PROLOG "Create FSM converted W3C Prolog tests" ON) - OPTION(BUILD_TESTS_FSM_PROMELA "Create FSM converted W3C Promela tests" ON) - OPTION(BUILD_TESTS_GENERATED_C "Create tests for generated C machines" ON) - -endif() -OPTION(ENABLE_GCOV "Compile with gcov support" OFF) - -OPTION(BUILD_PROFILING "Build with profiling information" OFF) -OPTION(BUILD_MINIMAL "Build only features mandated by specification" OFF) +# various options +# OPTION(BUILD_MINIMAL "Build only features mandated by specification" OFF) OPTION(BUILD_DM_ECMA "Build with ECMAScript datamodel" ON) -OPTION(BUILD_DM_XPATH "Build with XPath datamodel" ON) -OPTION(BUILD_DM_PROLOG "Build with Prolog datamodel" ON) -OPTION(BUILD_DM_PROMELA "Build with Promela datamodel" ON) -OPTION(BUILD_DM_LUA "Build with Lua datamodel" ON) - -OPTION(BUILD_BINDING_JAVA "Build language bindings for Java" ON) -OPTION(BUILD_BINDING_CSHARP "Build language bindings for CSharp" ON) -OPTION(BUILD_BINDING_PHP "Build language bindings for PHP" OFF) +# OPTION(BUILD_DM_XPATH "Build with XPath datamodel" OFF) +# OPTION(BUILD_DM_PROLOG "Build with Prolog datamodel" OFF) +# OPTION(BUILD_DM_PROMELA "Build with Promela datamodel" OFF) +# OPTION(BUILD_DM_LUA "Build with Lua datamodel" OFF) -# ccache: -# http://stackoverflow.com/questions/1815688/how-to-use-ccache-with-cmake -# -# see also: -# http://blogs.s-osg.org/a-conclusion-to-accelerating-your-build-with-clang/ -find_program(CCACHE_FOUND ccache) -if(CCACHE_FOUND) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) -endif(CCACHE_FOUND) +################################ +# Compiler Features and Flags +# Check for C++11 support +# message("Your C++ compiler supports these C++ features:") +# foreach(i ${CMAKE_CXX_COMPILE_FEATURES}) +# message("${i}") +# endforeach() -# a dummy target to depend on the targets needed for tests, see: -# http://stackoverflow.com/questions/733475/cmake-ctest-make-test-doesnt-build-tests -add_custom_target(ALL_TESTS COMMENT "Building all tests when BUILD_TESTS is enabled") -if (BUILD_TESTS) - enable_testing() - SET(ENV{CTEST_OUTPUT_ON_FAILURE} ON) +# http://stackoverflow.com/a/25836953/990120 +include(CheckCXXCompilerFlag) +CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11_FLAG) +CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X_FLAG) +if(COMPILER_SUPPORTS_CXX11_FLAG) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +elseif(COMPILER_SUPPORTS_CXX0X_FLAG) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") endif() -OPTION(DIST_PREPARE "Put libraries into the lib folder of the source tree" OFF) - -# we need USCXML_CORE_LIBS here for -lgcov -set(USCXML_CORE_LIBS) -set(USCXML_OPT_LIBS) -set(USCXML_FILES) -set(USCXML_TRANSFORM_FILES) -set(USCXML_INCLUDE_DIRS) +if(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU) -# some compiler flags -#message("CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}") - -if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") - execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) - - # best practices from scott meyers - # add_definitions(-Weffc++) - - # order of arguments of gcc matters again -# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") - add_definitions(-fPIC) - #add_definitions(-Wunreachable-code) - - if (CMAKE_BUILD_TYPE MATCHES ".*Deb.*" AND ENABLE_GCOV) # when not building for debug - # coverage information - add_definitions(-fprofile-arcs) - add_definitions(-ftest-coverage) - list (APPEND USCXML_CORE_LIBS "gcov") - endif() - - # all warnings - add_definitions(-Wall) -# add_definitions(-Wno-parentheses-equality) - add_definitions(-Wno-attributes) - add_definitions(-Wno-unused-variable) - - # we cannot tread warning as error with the "narrowing problem" - # add_definitions(-Werror) - - if(GCC_VERSION VERSION_EQUAL 4.7 OR GCC_VERSION VERSION_GREATER 4.7) - # when compiling as C++11, narrowing is a warning but older compilers complain about the option - add_definitions(-Wno-narrowing) - endif() - - if(GCC_VERSION VERSION_EQUAL 4.8 OR GCC_VERSION VERSION_GREATER 4.8) - add_definitions(-Wno-unused-local-typedefs) - endif() - - # swig will throw a warning with optimization otherwise - add_definitions(-fno-strict-aliasing) - add_definitions("-Wno-unused-value -Wno-sign-compare") -# add_definitions(-Wno-unused-function) - if (NOT CMAKE_BUILD_TYPE MATCHES ".*Deb.*") # when not building for debug - # add_definitions("-s") - #set(CMAKE_CXX_FLAGS "-s") ## Strip binary for everything but debug builds - # set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections") - # add_definitions("-mpreferred-stack-boundary=4") - # add_definitions("-fmerge-constants") - # add_definitions("-fno-rtti -DBOOST_NO_TYPEID") - # add_definitions("-fno-exceptions") - # add_definitions("-fno-inline") - # add_definitions("-ffunction-sections -fdata-sections") - else() - add_definitions(-rdynamic) - endif() -elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC") - add_definitions("-DZMQ_STATIC") - add_definitions("-DPCRE_STATIC") - add_definitions("-DUMUNDO_STATIC") +elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang) + +elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) add_definitions("-D_SCL_SECURE_NO_WARNINGS") add_definitions("-D_CRT_SECURE_NO_WARNINGS") - add_definitions("/bigobj") - - # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GL") # /LTCG is implied with /GL. - - # be very clear about linking debug / non-debug C++ runtimes - foreach(FLAGS CMAKE_EXE_LINKER_FLAGS_RELEASE CMAKE_SHARED_LINKER_FLAGS_RELEASE CMAKE_MODULE_LINKER_FLAGS_RELEASE) - set(${FLAGS} "${${FLAGS}} /ignore:4099 /NODEFAULTLIB:MSVCRTD") - endforeach() - - # use static MSVCRT - # if (NOT BUILD_AS_PLUGINS) - # foreach(FLAGS - # CMAKE_C_FLAGS - # CMAKE_CXX_FLAGS - # CMAKE_C_FLAGS_DEBUG - # CMAKE_C_FLAGS_MINSIZEREL - # CMAKE_C_FLAGS_RELEASE - # CMAKE_C_FLAGS_RELWITHDEBINFO - # CMAKE_CXX_FLAGS_DEBUG - # CMAKE_CXX_FLAGS_MINSIZEREL - # CMAKE_CXX_FLAGS_RELEASE - # CMAKE_CXX_FLAGS_RELWITHDEBINFO) - # if(${FLAGS} MATCHES "/MD") - # string(REGEX REPLACE "/MD" "/MT" ${FLAGS} "${${FLAGS}}") - # endif() - # endforeach() - # endif() - -elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-parentheses-equality") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-string-plus-int") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-non-literal-null-conversion") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-null-conversion") - - # clang throws these for boost all over the place! - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs") - - #SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libstdc++") - - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") - # set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -read_only_relocs suppress") - # set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -read_only_relocs suppress") - - # not too sure when this happened, 'void' has to be qualified as 'std::type_info' on __cxa_throw - if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.3) - set(CXA_THROW_TYPEINFO_SIGNATURE ON) - endif() - else() - message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}") + message(STATUS "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}") endif() - set(CMAKE_COMPILER_STRING "${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}") -if (APPLE) -# set(CMAKE_OSX_ARCHITECTURES "i386;x86_64") -endif() - -# see http://www.mail-archive.com/cmake@cmake.org/msg23240.html -if (APPLE) - if (MACOSX_VERSION VERSION_LESS "10.9") - # figure out what to do with Mavericks (10.9) later - # add_definitions("-D_DARWIN_UNLIMITED_SELECT") - # support leopard and above - set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6) - foreach(FLAGS CMAKE_C_FLAGS CMAKE_CXX_FLAGS CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS) - set(${FLAGS} "${${FLAGS}} -stdlib=libstdc++ -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}") - endforeach() - else() - set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7) - foreach(FLAGS CMAKE_C_FLAGS CMAKE_CXX_FLAGS CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS) - set(${FLAGS} "${${FLAGS}} -stdlib=libc++ -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}") - endforeach() - endif() -endif() - -# if (APPLE AND MACOSX_VERSION VERSION_GREATER "10.9.99") -# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10) # ? -# foreach(FLAGS CMAKE_C_FLAGS CMAKE_CXX_FLAGS CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS) -# set(${FLAGS} "${${FLAGS}} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch x86_64") -# # we get "Illegal Instruction: 4" errors without on yosemite?! -# # set(${FLAGS} "${${FLAGS}} -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk") -# endforeach() -# endif() - -if (IOS) - if (${CMAKE_GENERATOR} STREQUAL "Xcode") - else() - set(CMAKE_OSX_DEPLOYMENT_TARGET 4.3) - foreach(FLAGS CMAKE_C_FLAGS CMAKE_CXX_FLAGS CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS) - set(${FLAGS} "${${FLAGS}} -miphoneos-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}") - endforeach() - endif() -endif() - -############################################################ -# postfixes for all built targets depending on build type -############################################################ - -SET(CMAKE_DEBUG_POSTFIX "${64BIT_LIB_POSTFIX}_d") -SET(CMAKE_RELEASE_POSTFIX "${64BIT_LIB_POSTFIX}") -SET(CMAKE_RELWITHDEBINFO_POSTFIX "${64BIT_LIB_POSTFIX}_rd") -SET(CMAKE_MINSIZEREL_POSTFIX "${64BIT_LIB_POSTFIX}_s") - -SET(CMAKE_LIBRARY_POSTFIX ${CMAKE_${BUILD_TYPE}_POSTFIX}) - -if (UNIX) - add_definitions(-DHAVE_SYS_SOCKET_H) -endif() - -############################################################ -# Library location, type and linking -############################################################ - -# built shared or static libraries? -if(BUILD_SHARED_LIBS) - add_definitions("-DUSCXML_EXPORT") -else() - add_definitions("-DUSCXML_STATIC") -endif() - -# file(GLOB -# GURL_SOURCE ${PROJECT_SOURCE_DIR}/contrib/src/google-url/googleurl/src/*.cc -# GURL_SOURCE ${PROJECT_SOURCE_DIR}/contrib/src/google-url/googleurl/src/*.h) -# list(APPEND USCXML_FILES ${GURL_SOURCE}) -# list(APPEND USCXML_FILES ${PROJECT_SOURCE_DIR}/contrib/src/google-url/base/string16.cc) - - -# library suffix order -if (IOS) - LIST(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dylib") -endif() -set(CMAKE_FIND_LIBRARY_SUFFIXES_SHARED ${CMAKE_FIND_LIBRARY_SUFFIXES}) -set(CMAKE_FIND_LIBRARY_SUFFIXES_STATIC .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) - -if(BUILD_PREFER_STATIC_LIBRARIES) - SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_STATIC}) -endif() -SET(CMAKE_FIND_LIBRARY_SUFFIXES_ORIG ${CMAKE_FIND_LIBRARY_SUFFIXES}) - -# where should libraries end up? -if (DIST_PREPARE) - if (CMAKE_CROSSCOMPILING) - string(TOLOWER ${CMAKE_CROSSCOMPILING_TARGET} CMAKE_CROSSCOMPILING_TARGET_LC) - set(OUTPUT_DIR - ${PROJECT_SOURCE_DIR}/package/cross-compiled/${CMAKE_CROSSCOMPILING_TARGET_LC}-${CMAKE_SYSTEM_VERSION}/${CMAKE_SYSTEM_PROCESSOR}) - else() - set(OUTPUT_DIR - ${PROJECT_SOURCE_DIR}/package/${USCXML_PLATFORM_ID}/${CMAKE_CXX_COMPILER_ID_LC}) - endif() -else() - set(OUTPUT_DIR ${PROJECT_BINARY_DIR}) -endif() - -set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/bin" ) -set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib" ) -set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib" ) -# do not override configuration specific outputs -# foreach( OUTPUT_CONFIG ${CMAKE_CONFIGURATION_TYPES} ) -# string( TOUPPER ${OUTPUT_CONFIG} OUTPUT_CONFIG ) -# set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUT_CONFIG} "${OUTPUT_DIR}/bin" ) -# set( CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUT_CONFIG} "${OUTPUT_DIR}/lib" ) -# set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUT_CONFIG} "${OUTPUT_DIR}/lib" ) -# endforeach() - -OPTION(BUILD_AS_PLUGINS "Build invokers, ioprocessors and datamodels as plugins" OFF) - -if (BUILD_AS_PLUGINS) - add_definitions("-DBUILD_AS_PLUGINS") - include_directories("src/uscxml/plugins") -# list(APPEND USCXML_FILES "src/uscxml/plugins/Plugins.cpp") -endif() - -# this is where the config.h ends up -include_directories(${CMAKE_CURRENT_BINARY_DIR}) -include_directories(src) - -############################################################ -# Dependent libraries -############################################################ - -if (NOT WIN32) - # libxml2 - set(CMAKE_FIND_FRAMEWORK "LAST") - - # message("CMAKE_FIND_LIBRARY_SUFFIXES: ${CMAKE_FIND_LIBRARY_SUFFIXES}") - # message("CMAKE_SYSTEM_PREFIX_PATH: ${CMAKE_SYSTEM_PREFIX_PATH}") - # message("CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") - # message("CMAKE_SYSTEM_INCLUDE_PATH: ${CMAKE_SYSTEM_INCLUDE_PATH}") - # message("CMAKE_SYSTEM_LIBRARY_PATH: ${CMAKE_SYSTEM_LIBRARY_PATH}") - # message("CMAKE_SYSTEM_PROGRAM_PATH: ${CMAKE_SYSTEM_PROGRAM_PATH}") - # message("CMAKE_FIND_ROOT_PATH: ${CMAKE_FIND_ROOT_PATH}") - - # MacOSX Mavericks moved libxml2 into SDK - if (APPLE AND "${MACOSX_VERSION}" VERSION_LESS "10.9.0") - set(PC_LIBXML_INCLUDEDIR "/usr/include/libxml2/") - endif() +# https://cmake.org/Bug/view.php?id=15361 +set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_CXX11_STANDARD_COMPILE_OPTION}) - find_package(LibXml2 REQUIRED) - include_directories(${LIBXML2_INCLUDE_DIR}) - list (APPEND USCXML_CORE_LIBS ${LIBXML2_LIBRARIES}) - set(XML_LIBRARIES ${LIBXML2_LIBRARIES}) - list (APPEND USCXML_CORE_LIBS "dl") - list (APPEND USCXML_CORE_LIBS "pthread") - if (APPLE) - find_library(CORELOCATION_LIBRARY CoreLocation) - if (CORELOCATION_LIBRARY AND OFF) - list (APPEND USCXML_OPT_LIBS ${CORELOCATION_LIBRARY}/CoreLocation) - set(CORELOCATION_FOUND ON) - endif() - endif() - if (IOS) - find_library(COREFOUNDATION_LIBRARY CoreFoundation) - list (APPEND USCXML_CORE_LIBS ${COREFOUNDATION_LIBRARY}/CoreFoundation) - find_library(SECURITY_LIBRARY Security) - list (APPEND USCXML_CORE_LIBS ${SECURITY_LIBRARY}/Security) - list (APPEND USCXML_CORE_LIBS "z") - elseif(APPLE) - find_library(APP_SERVICES_LIBRARY ApplicationServices) - find_library(COREFOUNDATION_LIBRARY CoreFoundation) - find_library(FOUNDATION_LIBRARY Foundation) - list (APPEND USCXML_CORE_LIBS ${APP_SERVICES_LIBRARY}) - list (APPEND USCXML_CORE_LIBS ${COREFOUNDATION_LIBRARY}) - list (APPEND USCXML_CORE_LIBS ${FOUNDATION_LIBRARY}) - endif() -elseif(WIN32) - list (APPEND XML_LIBRARIES "Ws2_32") - list (APPEND XML_LIBRARIES "Winmm") - list (APPEND XML_LIBRARIES "Iphlpapi") - list (APPEND XML_LIBRARIES "Netapi32") - list (APPEND USCXML_CORE_LIBS ${XML_LIBRARIES}) -endif() - -# ICU -# find_package(ICU REQUIRED) -# include_directories(${ICU_INCLUDE_DIRS}) -# list (APPEND USCXML_CORE_LIBS ${ICU_LIBRARIES}) - -# CURL -find_package(CURL REQUIRED) -include_directories(${CURL_INCLUDE_DIRS}) -list (APPEND USCXML_CORE_LIBS ${CURL_LIBRARIES}) -if (WIN32) - add_definitions("-DCURL_STATICLIB") -endif() include(CheckCXXSourceCompiles) - -set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS}) -set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBRARIES}) - check_cxx_source_compiles(" - #include - int main(){return CURLOPT_MAIL_RCPT; } -" CURL_HAS_SMTP) - -set(CMAKE_REQUIRED_INCLUDES) -set(CMAKE_REQUIRED_LIBRARIES) - -# GLOG -# set(ENV{GLOG_SRC} ${CMAKE_SOURCE_DIR}/../glog) -find_package(GLOG REQUIRED) -include_directories(${GLOG_INCLUDE_DIR}) -list (APPEND USCXML_CORE_LIBS ${GLOG_LIBRARY}) -add_definitions(-DGLOG_NO_ABBREVIATED_SEVERITIES) + #include + int main(){ return 0; } +" CXX_HAS_THREADS) +check_cxx_source_compiles(" + #include + int main(){ std::shared_ptr foo(NULL); return 0; } +" CXX_HAS_SHARED_PTR) +check_cxx_source_compiles(" + int main(){ int foo[10]; auto i = foo[0]; } +" CXX_HAS_AUTOTYPE) +check_cxx_source_compiles(" + int main(){ []{}(); } +" CXX_HAS_LAMBDAS) -# ARABICA -# set($ENV{ARABICA_SRC} ${PROJECT_SOURCE_DIR}/../arabica) -find_package(Arabica REQUIRED) -include_directories(${ARABICA_INCLUDE_DIR}) -list (APPEND USCXML_CORE_LIBS ${ARABICA_LIBRARY}) -if (WIN32) - add_definitions("-DUSE_MSXML") +set(CXX_MISSING_FEATURES "") +if (NOT CXX_HAS_LAMBDAS) + set(CXX_MISSING_FEATURES "${CXX_MISSING_FEATURES} lambdas") endif() - -# BOOST - header only -FIND_PATH(Boost_INCLUDE_DIR boost/version.hpp) -include_directories(${Boost_INCLUDE_DIR}) - -# LIBEVENT -#set(ENV{EVENT_SRC} ${CMAKE_SOURCE_DIR}/../libevent) -find_package(EVENT REQUIRED) -include_directories(${EVENT_INCLUDE_DIR}) -list (APPEND USCXML_CORE_LIBS ${EVENT_LIBRARY}) -#set(EVENT_SSL_FOUND OFF) # deactivate for now - -################################################# -# Optional libraries - -OPTION(DISABLE_ALL "Ignore all optional libraries" OFF) -if (BUILD_MINIMAL) - SET(DISABLE_ALL ON) +if(NOT CXX_HAS_THREADS) + set(CXX_MISSING_FEATURES "${CXX_MISSING_FEATURES} threads") endif() - -if (APPLE OR IOS) - OPTION(DISABLE_AUDIOTOOLBOX "Ignore AudioToolbox" OFF) - if (NOT DISABLE_AUDIOTOOLBOX AND NOT DISABLE_ALL) - find_library(AUDIOTOOLBOX AudioToolbox REQUIRED) - if (MACOSX_VERSION VERSION_GREATER "10.10.99") - # header files were moved it seems - list (APPEND USCXML_OPT_LIBS ${AUDIOTOOLBOX}) - else() - list (APPEND USCXML_OPT_LIBS ${AUDIOTOOLBOX}/AudioToolbox) - endif() - set(AUDIOTOOLBOX_FOUND ON) - else() - set(AUDIOTOOLBOX_FOUND OFF) - endif() - find_library(FOUNDATION_LIBRARY Foundation) - if (MACOSX_VERSION VERSION_GREATER "10.10.99") - list (APPEND USCXML_OPT_LIBS ${FOUNDATION_LIBRARY}) - else() - list (APPEND USCXML_OPT_LIBS ${FOUNDATION_LIBRARY}/Foundation) - endif() - - if (IOS) - find_library(WTF_LIBRARY WTF) - find_library(ICU_LIBRARY icucore REQUIRED) - list (APPEND USCXML_OPT_LIBS ${WTF_LIBRARY}) - list (APPEND USCXML_OPT_LIBS ${ICU_LIBRARY}) - endif() - +if(NOT CXX_HAS_AUTOTYPE) + set(CXX_MISSING_FEATURES "${CXX_MISSING_FEATURES} autotype") endif() - -OPTION(DISABLE_JSC "Ignore JavaScriptCore" OFF) -if (NOT DISABLE_JSC AND NOT DISABLE_ALL AND NOT ECMA_FOUND) - find_package(JSC) - if (JSC_FOUND) - set(ECMA_FOUND ON) - if (NOT APPLE) - include_directories(${JSC_INCLUDE_DIR}) - endif() - list (APPEND USCXML_OPT_LIBS ${JSC_LIBRARY}) - endif() -else() - set(JSC_FOUND OFF) +if(NOT CXX_HAS_SHARED_PTR) + set(CXX_MISSING_FEATURES "${CXX_MISSING_FEATURES} shared_ptr") endif() -OPTION(DISABLE_V8 "Ignore Google's v8" OFF) -if (NOT DISABLE_V8 AND NOT DISABLE_ALL AND NOT ECMA_FOUND) - find_package(V8) - if (V8_FOUND) - set(ECMA_FOUND ON) - include_directories(${V8_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${V8_LIBRARY}) - endif() -else() - set(V8_FOUND OFF) +if (CXX_MISSING_FEATURES) + message(FATAL_ERROR "Compiler is missing required C++11 features: ${CXX_MISSING_FEATURES}") endif() -OPTION(DISABLE_SPIDERMONKEY "Ignore SpiderMonkey" ON) -if (NOT DISABLE_SPIDERMONKEY AND NOT DISABLE_ALL AND NOT ECMA_FOUND) - find_package(SpiderMonkey) - if (SPIDERMONKEY_FOUND) - set(ECMA_FOUND ON) - include_directories(${SPIDERMONKEY_INCLUDE_DIR}) - if (UNIX) - add_definitions(-DXP_UNIX) - endif() - list (APPEND USCXML_OPT_LIBS ${SPIDERMONKEY_LIBRARY}) - endif() +if (CMAKE_CROSSCOMPILING OR WIN32) + OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF) else() - set(SPIDERMONKEY_FOUND OFF) + OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON) endif() - -OPTION(DISABLE_LUA "Ignore Lua" OFF) -if (NOT DISABLE_LUA AND NOT DISABLE_ALL) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SHARED}) - find_package(Lua) - if (LUA_FOUND) - include_directories (${LUA_INCLUDE_DIR}) - include_directories(${PROJECT_SOURCE_DIR}/contrib/src/LuaBridge) - list (APPEND USCXML_OPT_LIBS ${LUA_LIBRARIES}) - endif() - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_ORIG}) +# built shared or static libraries? +if(BUILD_SHARED_LIBS) + add_definitions("-DUSCXML_EXPORT") else() - set(LUA_FOUND OFF) + add_definitions("-DUSCXML_STATIC") endif() -OPTION(DISABLE_SSL "Ignore OpenSSL" OFF) -if (NOT DISABLE_SSL AND NOT DISABLE_ALL) - find_package(OpenSSL) - if (OPENSSL_FOUND) - set(OPENSSL_HAS_ELIPTIC_CURVES OFF) - include_directories(${OPENSSL_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${OPENSSL_LIBRARIES}) - if (EXISTS ${OPENSSL_INCLUDE_DIR}/openssl/ec.h) - set(OPENSSL_HAS_ELIPTIC_CURVES ON) - endif() - endif() -else() - set(OPENSSL_FOUND OFF) -endif() -if (EVENT_SSL_FOUND AND OPENSSL_FOUND) - list (APPEND USCXML_CORE_LIBS ${OPENSSL_LIBRARIES}) -endif() +################################################# +# Dependent Libraries +################################################# -OPTION(DISABLE_SWI "Ignore SWI Prolog" OFF) -if (NOT DISABLE_SWI AND NOT DISABLE_ALL) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SHARED}) - find_package(SWI) - if (SWI_FOUND) - if (SWI_CPP_INCLUDE_DIR) - include_directories(${SWI_CPP_INCLUDE_DIR}) - else() - include_directories(${PROJECT_SOURCE_DIR}/contrib/src/swi-pl) - endif() - include_directories(${SWI_INCLUDE_DIR}) - if (BUILD_PREFER_STATIC_LIBRARIES) - find_package(GMP) - find_package(Curses) - if (GMP_FOUND AND CURSES_FOUND) - list (APPEND USCXML_OPT_LIBS ${SWI_LIBRARY} ${GMP_LIBRARY} ${CURSES_LIBRARIES}) - else() - message("Not building datamodel with static SWI without NCurses and GMP") - set(SWI_FOUND OFF) - endif() - else() - list (APPEND USCXML_OPT_LIBS ${SWI_LIBRARY}) - endif() - endif() - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_ORIG}) -else() - set(SWI_FOUND OFF) -endif() +################################ +# Required -OPTION(DISABLE_SQLITE "Ignore Sqlite3" OFF) -if (NOT DISABLE_SQLITE AND NOT DISABLE_ALL) - find_package(Sqlite3) - if (SQLITE3_FOUND) - endif() -else() - set(SQLITE3_FOUND OFF) -endif() -OPTION(DISABLE_FFMPEG "Ignore FFMpeg" OFF) -if (NOT DISABLE_FFMPEG AND NOT DISABLE_ALL) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SHARED}) - find_package(FFMPEG) - if (FFMPEG_FOUND) - include_directories (${FFMPEG_INCLUDE_DIRS}) - list (APPEND USCXML_OPT_LIBS ${FFMPEG_LIBRARIES}) - # required with static ffmpeg builds - # set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic") - endif() - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_ORIG}) +# CURL +find_package(CURL) +if (CURL_FOUND) + include_directories(${CURL_INCLUDE_DIRS}) + list (APPEND USCXML_CORE_LIBS ${CURL_LIBRARIES}) + + include(CheckCXXSourceCompiles) + set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBRARIES}) + check_cxx_source_compiles(" + #include + int main(){ return CURLOPT_MAIL_RCPT; } + " CURL_HAS_SMTP) else() - set(FFMPEG_FOUND OFF) -endif() - -OPTION(DISABLE_ICAL "Ignore iCal" OFF) -if (NOT DISABLE_ICAL AND NOT DISABLE_ALL) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SHARED}) - find_package(LIBICAL) - if (LIBICAL_FOUND) - include_directories (${LIBICAL_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${LIBICAL_LIBRARIES}) + message(STATUS "--> will download and compile") + include("${CMAKE_MODULE_PATH}/BuildLibCURL.cmake") + if (LIBCURL_BUILT) + include_directories(${LIBCURL_INCLUDE_DIR}) + list (APPEND USCXML_CORE_LIBS ${LIBCURL_LIBRARY}) + set(CURL_HAS_SMTP ON) + else() + message(FATAL_ERROR "Could neither find nor build CURL") endif() - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_ORIG}) - -else() - set(LIBICAL_FOUND OFF) endif() -OPTION(DISABLE_WEBRTC "Ignore libjingle (WebRTC)" OFF) -if (NOT DISABLE_WEBRTC AND NOT DISABLE_ALL) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SHARED}) - if (NOT DEFINED ENV{LIBJINGLE_ROOT_DIR}) - set(ENV{LIBJINGLE_ROOT_DIR} "/Users/sradomski/Documents/TK/Code/webrtc-work/trunk") - endif() - find_package(LibJingle) - if (LIBJINGLE_FOUND) - include_directories (${LIBJINGLE_INCLUDE_DIRS}) - list (APPEND USCXML_OPT_LIBS ${LIBJINGLE_LIBRARIES}) - endif() - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_ORIG}) -else() - set(LIBJINGLE_FOUND OFF) -endif() -OPTION(DISABLE_EXPECT "Ignore TCL/Expect" OFF) -if (NOT DISABLE_EXPECT AND NOT DISABLE_ALL) - find_package(Expect) - find_package(TCL) - if (EXPECT_FOUND AND TCL_FOUND) - include_directories (${EXPECT_INCLUDE_DIR}) - include_directories (${TCL_INCLUDE_PATH}) - list (APPEND USCXML_OPT_LIBS ${EXPECT_LIBRARY}) - list (APPEND USCXML_OPT_LIBS ${TCL_LIBRARY}) - endif() +# XercesC +CheckHasModule(XercesC) +if (HAS_MODULE_XercesC) + find_package(XercesC) else() - set(EXPECT_FOUND OFF) - set(TCL_FOUND OFF) + message(STATUS "Could NOT find XercesC (your CMake distribution does not include the FindXercesC module)") endif() - -OPTION(DISABLE_LIBPURPLE "Ignore libpurple (instant messaging)" OFF) -if (NOT DISABLE_LIBPURPLE AND NOT DISABLE_ALL) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SHARED}) - find_package(LibPurple) - if (LIBPURPLE_FOUND) - find_package(ICONV) - find_package(GLIB2) - find_package(GObject) - if (GLIB2_FOUND AND ICONV_FOUND AND GOBJECT_FOUND) - include_directories (${LIBPURPLE_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${LIBPURPLE_LIBRARY}) - include_directories (${GLIB2_INCLUDE_DIRS}) - list (APPEND USCXML_OPT_LIBS ${GLIB2_LIBRARIES}) - include_directories (${ICONV_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${ICONV_LIBRARIES}) - include_directories (${GOBJECT_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${GOBJECT_LIBRARIES}) - else() - set(LIBPURPLE_FOUND OFF) - endif() - endif() - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_ORIG}) +if (XercesC_FOUND) + include_directories(${XercesC_INCLUDE_DIRS}) + list (APPEND USCXML_CORE_LIBS ${XercesC_LIBRARIES}) else() - set(LIBPURPLE_FOUND OFF) -endif() - -OPTION(DISABLE_UMUNDO "Ignore uMundo" OFF) -if (NOT DISABLE_UMUNDO AND NOT DISABLE_ALL) - if (WIN32) - find_package(UMUNDO COMPONENTS convenience) + message(STATUS "--> will download and compile") + include("${CMAKE_MODULE_PATH}/BuildXercesC.cmake") + if (XercesC_BUILT) + include_directories(${XercesC_INCLUDE_DIRS}) + list (APPEND USCXML_CORE_LIBS ${XercesC_LIBRARIES}) else() - find_package(UMUNDO COMPONENTS rpc serial core) - # find_package(UMUNDO COMPONENTS convenience) + message(FATAL_ERROR "Could neither find nor build XercesC") endif() - if (UMUNDO_FOUND) - include_directories (${UMUNDO_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${UMUNDO_LIBRARIES}) - # add_definitions("-DUMUNDO_STATIC") - endif() -else() - set(UMUNDO_FOUND OFF) endif() -OPTION(DISABLE_OSG "Ignore OpenSceneGraph" OFF) -if (NOT DISABLE_OSG AND NOT DISABLE_ALL) - if (UNIX) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SHARED}) # link dynamically! - elseif(WIN32) - if (ENV{OSG_ROOT} STREQUAL "") - set(ENV{OSG_ROOT} "C:/Program Files/OpenSceneGraph-3.0.1") - endif() - endif() - find_package(OpenSceneGraph COMPONENTS osgViewer osgGA osgText osgFX osgManipulator osgDB osgUtil OpenThreads) - find_package(OpenGL) - if (OPENSCENEGRAPH_FOUND AND OPENGL_FOUND) - include_directories (${OPENSCENEGRAPH_INCLUDE_DIRS}) - include_directories (${OPENGL_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${OPENSCENEGRAPH_LIBRARIES} ${OPENGL_LIBRARIES}) - endif() - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_ORIG}) +# LibEvent +find_package(LibEvent) +if (LIBEVENT_FOUND) + include_directories(${LIBEVENT_INCLUDE_DIR}) + list (APPEND USCXML_CORE_LIBS ${LIBEVENT_LIBRARIES}) else() - set(OPENSCENEGRAPH_FOUND OFF) - set(OPENGL_FOUND OFF) -endif() - -OPTION(DISABLE_OPENAL "Ignore OpenAL" OFF) -if (NOT DISABLE_OPENAL AND NOT DISABLE_ALL) - set(CMAKE_FIND_FRAMEWORK "FIRST") - find_package(OpenAL) - if (OPENAL_FOUND) - list (APPEND USCXML_INCLUDE_DIRS ${OPENAL_INCLUDE_DIR}) - if (APPLE OR IOS) - if (MACOSX_VERSION VERSION_GREATER "10.10.99") - list (APPEND USCXML_OPT_LIBS ${OPENAL_LIBRARY}) - else() - list (APPEND USCXML_OPT_LIBS ${OPENAL_LIBRARY}/OpenAL) - endif() - else() - list (APPEND USCXML_OPT_LIBS ${OPENAL_LIBRARY}) - endif() + message(STATUS "--> will download and compile") + include("${CMAKE_MODULE_PATH}/BuildLibEvent.cmake") + if (LIBEVENT_BUILT) + include_directories(${LIBEVENT_INCLUDE_DIR}) + list (APPEND USCXML_CORE_LIBS ${LIBEVENT_LIBRARIES}) else() - find_package(OpenALKCAT) - if (OPENAL_FOUND) - list (APPEND USCXML_INCLUDE_DIRS ${OPENAL_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${OPENAL_LIBRARY}) - endif() + message(FATAL_ERROR "Could neither find nor build libevent") endif() - set(CMAKE_FIND_FRAMEWORK "LAST") -else() - set(OPENAL_FOUND OFF) endif() -if (NOT AUDIOTOOLBOX_FOUND) - OPTION(DISABLE_LIBSNDFILE "Ignore libsndfile" OFF) - if (NOT DISABLE_LIBSNDFILE AND NOT DISABLE_ALL) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SHARED}) - find_package(LIBSNDFILE) - if (LIBSNDFILE_FOUND) - list (APPEND USCXML_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${LIBSNDFILE_LIBRARY}) - endif() - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_ORIG}) - else() - set(LIBSNDFILE_FOUND OFF) - endif() -endif() - -OPTION(DISABLE_MILES "Ignore miles" OFF) -if (NOT DISABLE_MILES AND NOT DISABLE_ALL) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SHARED}) - find_package(MILES) - #set(JPEG_ROOT_PATH "" CACHE STRING "Where to find libjpeg") - if (MILES_FOUND) - if (NOT WIN32) - # openal is only needed for miles - find_package(OpenAL) - find_package(JPEG) - find_package(ICONV) - - if (OPENAL_FOUND AND ICONV_FOUND AND JPEG_FOUND) - include_directories (${MILES_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${MILES_LIBRARIES}) - include_directories (${ICONV_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${ICONV_LIBRARIES}) - include_directories (${JPEG_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${JPEG_LIBRARIES}) - include_directories (${OPENAL_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${OPENAL_LIBRARY}) - else() - set(MILES_FOUND OFF) - endif() - else() - include_directories (${MILES_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${MILES_LIBRARIES}) - endif() - endif() - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_ORIG}) -else() - set(MILES_FOUND OFF) +if (UNIX) + list (APPEND USCXML_CORE_LIBS "pthread") endif() -OPTION(DISABLE_PROTOBUF "Ignore protobuf" OFF) -if (NOT DISABLE_PROTOBUF AND NOT DISABLE_ALL) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SHARED}) - find_package(Protobuf) - if (PROTOBUF_FOUND) - include_directories(${PROTOBUF_INCLUDE_DIRS}) - LIST(APPEND USCXML_OPT_LIBS optimized ${PROTOBUF_LIBRARY}) - LIST(APPEND USCXML_OPT_LIBS debug ${PROTOBUF_LIBRARY_DEBUG}) - endif() - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_ORIG}) +# uriparser +include("${CMAKE_MODULE_PATH}/BuildURIParser.cmake") +message(STATUS "Did not look for UriParser") +message(STATUS "--> will download and compile") +if (URIPARSER_BUILT) + include_directories(${URIPARSER_INCLUDE_DIR}) + list (APPEND USCXML_CORE_LIBS ${URIPARSER_LIBRARY}) else() - set(PROTOBUF_FOUND OFF) + message(FATAL_ERROR "Could not build uriparser") endif() -################################################# -# Gather source files -################################################# - -# we use include instead of add_subdirectory because -# source groups do not work otherwise. -SET(USCXML_INVOKERS) -SET(USCXML_IOPROCESSORS) -SET(USCXML_ELEMENTS) -SET(USCXML_DATAMODELS) -SET(USCXML_LANGUAGE_BINDINGS) +################################ +# Optional -include_directories(${USCXML_INCLUDE_DIRS}) -add_subdirectory(src/uscxml) -if (WIN32) - list(APPEND USCXML_FILES "${PROJECT_SOURCE_DIR}/contrib/src/getopt/getopt.c") -# SET_SOURCE_FILES_PROPERTIES( ${PROJECT_SOURCE_DIR}/contrib/src/getopt/getopt.c PROPERTIES LANGUAGE CXX ) +# JavaScriptCore +find_package(JSC) +if (JSC_FOUND) + set(ECMA_FOUND ON) + if (NOT APPLE) + include_directories(${JSC_INCLUDE_DIR}) + endif() + list (APPEND USCXML_OPT_LIBS ${JSC_LIBRARY}) endif() -if (UNIX AND NOT APPLE) - list (APPEND USCXML_CORE_LIBS "rt") +find_package(V8) +if (V8_FOUND) + set(ECMA_FOUND ON) + include_directories(${V8_INCLUDE_DIR}) + list (APPEND USCXML_OPT_LIBS ${V8_LIBRARY}) endif() -############################################################ -# Binaries and tests -############################################################ - -set(ALL_SOURCE_FILES ${USCXML_FILES} ${USCXML_TRANSFORM_FILES}) -list(SORT USCXML_FILES) -list(SORT USCXML_TRANSFORM_FILES) -# we cannot define source groups in sub directories! -foreach( FILE ${ALL_SOURCE_FILES} ) - get_filename_component(PATH ${FILE} PATH) - get_filename_component(NAME ${FILE} NAME) - - # if (${NAME} MATCHES "Factory.cpp") - # set_property(SOURCE ${FILE} PROPERTY COMPILE_FLAGS -std=c++11) - # endif() - # if (${PATH} MATCHES ".*datamodel\\/ecmascript\\/v8\\/*") - # set_property(SOURCE ${FILE} PROPERTY COMPILE_FLAGS -std=c++11) - # # message(${FILE}) - # endif() - - if (${PATH} MATCHES ".*datamodel\\/ecmascript.*") - STRING(REGEX MATCH "[^\\/]*$" COMP_NAME ${PATH}) - if (COMP_NAME STREQUAL "ecmascript") - source_group("Datamodel\\EcmaScript" FILES ${FILE}) - else() - source_group("Datamodel\\EcmaScript\\${COMP_NAME}" FILES ${FILE}) - endif() - elseif (${PATH} MATCHES ".*datamodel\\/prolog.*") - STRING(REGEX MATCH "[^\\/]*$" COMP_NAME ${PATH}) - source_group("Datamodel\\Prolog\\${COMP_NAME}" FILES ${FILE}) - elseif (${PATH} MATCHES ".*datamodel\\/promela.*") - source_group("Datamodel\\Promela" FILES ${FILE}) - elseif (${PATH} MATCHES ".*datamodel\\/xpath.*") - source_group("Datamodel\\XPath" FILES ${FILE}) - elseif (${PATH} MATCHES ".*datamodel\\/lua.*") - source_group("Datamodel\\Lua" FILES ${FILE}) - elseif (${PATH} MATCHES ".*datamodel\\/null.*") - source_group("Datamodel\\NULL" FILES ${FILE}) - - elseif (${PATH} MATCHES ".*\\/invoker\\/.*") - STRING(REGEX MATCH "[^\\/]*$" COMP_NAME ${PATH}) - source_group("Invoker\\${COMP_NAME}" FILES ${FILE}) - - elseif (${PATH} MATCHES ".*\\/element\\/.*") - STRING(REGEX MATCH "[^\\/]*$" COMP_NAME ${PATH}) - source_group("Element\\${COMP_NAME}" FILES ${FILE}) - - elseif (${PATH} MATCHES ".*\\/ioprocessor\\/.*") - STRING(REGEX MATCH "[^\\/]*$" COMP_NAME ${PATH}) - source_group("IOProcessor\\${COMP_NAME}" FILES ${FILE}) - - # elseif (${PATH} MATCHES ".*\\/google-url\\/.*") - # STRING(REGEX MATCH "[^\\/]*$" COMP_NAME ${PATH}) - # source_group("Interpreter\\URL" FILES ${FILE}) - - elseif (${FILE} MATCHES ".*\\/debug\\/.*") - source_group("Interpreter\\debug" FILES ${FILE}) - elseif (${FILE} MATCHES ".*\\/plugins\\/.*") - source_group("Interpreter\\plugins" FILES ${FILE}) - elseif (${FILE} MATCHES ".*\\/transform\\/.*") - # source_group("Interpreter\\transform" FILES ${FILE}) - elseif (${FILE} MATCHES ".*\\/util\\/.*") - source_group("Interpreter\\util" FILES ${FILE}) - elseif (${FILE} MATCHES ".*\\/concurrency\\/.*") - source_group("Interpreter\\concurrency" FILES ${FILE}) - elseif (${FILE} MATCHES ".*\\/server\\/.*") - source_group("Interpreter\\server" FILES ${FILE}) - elseif (${FILE} MATCHES ".*\\/messages\\/.*") - source_group("Interpreter\\messages" FILES ${FILE}) +find_package(Lua) +if (LUA_FOUND) + include_directories (${LUA_INCLUDE_DIR}) + include_directories(${PROJECT_SOURCE_DIR}/contrib/src/LuaBridge) + list (APPEND USCXML_OPT_LIBS ${LUA_LIBRARIES}) +endif() - else () - source_group(Interpreter FILES ${FILE}) - endif() -endforeach() -# if (V8_FOUND AND BUILD_DM_ECMA) -# set_property(SOURCE ${ALL_SOURCE_FILES} PROPERTY COMPILE_FLAGS -Wno-c++11-extensions) +# if(APPLE) +# find_library(APP_SERVICES_LIBRARY ApplicationServices) +# find_library(COREFOUNDATION_LIBRARY CoreFoundation) +# find_library(FOUNDATION_LIBRARY Foundation) +# list (APPEND USCXML_CORE_LIBS ${APP_SERVICES_LIBRARY}) +# list (APPEND USCXML_CORE_LIBS ${COREFOUNDATION_LIBRARY}) +# list (APPEND USCXML_CORE_LIBS ${FOUNDATION_LIBRARY}) # endif() -# add compile time reducer -# see https://github.com/sakra/cotire -if (ENABLE_COTIRE) - include(cotire) -endif() - -# -# We cannot do this in subdirs?! -# +add_subdirectory(src/uscxml) -if (NOT BUILD_MINIMAL) - # include html template in source file - find_program(XXD_BINARY xxd) - if (XXD_BINARY) - add_custom_command( - OUTPUT ${CMAKE_SOURCE_DIR}/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.inc.h - COMMAND ${XXD_BINARY} -i template/xhtml-invoker.html template/xhtml-invoker.inc.h - DEPENDS ${CMAKE_SOURCE_DIR}/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.html - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/uscxml/plugins/invoker/xhtml - COMMENT "Running xxd on uscxml/plugins/invoker/xhtml/template/xhtml-invoker.html" - ) - LIST(APPEND USCXML_FILES ${CMAKE_SOURCE_DIR}/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.inc.h) - endif() -endif() +add_library(uscxml ${USCXML_FILES}) +set_property(TARGET uscxml PROPERTY CXX_STANDARD 11) +set_property(TARGET uscxml PROPERTY CXX_STANDARD_REQUIRED ON) +set_property(TARGET uscxml PROPERTY SOVERSION ${USCXML_VERSION}) -# build library -if (BUILD_AS_PLUGINS) - add_library(uscxml ${USCXML_FILES}) - target_link_libraries(uscxml ${USCXML_CORE_LIBS}) - set_target_properties(uscxml PROPERTIES COMPILE_FLAGS "-DUSCXML_EXPORT") -# set_target_properties(uscxml PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - add_definitions(-DPLUMA_EXPORTS) -else() - add_library(uscxml ${USCXML_FILES}) - target_link_libraries(uscxml ${USCXML_OPT_LIBS} ${USCXML_CORE_LIBS}) -endif() -INSTALL_LIBRARY(TARGETS uscxml COMPONENT library) +add_dependencies(uscxml libevent xerces-c) +target_link_libraries(uscxml ${USCXML_OPT_LIBS} ${USCXML_CORE_LIBS}) add_library(uscxml_transform ${USCXML_TRANSFORM_FILES}) +set_property(TARGET uscxml_transform PROPERTY CXX_STANDARD 11) +set_property(TARGET uscxml_transform PROPERTY CXX_STANDARD_REQUIRED ON) +set_property(TARGET uscxml_transform PROPERTY SOVERSION ${USCXML_VERSION}) target_link_libraries(uscxml_transform uscxml) -set_target_properties(uscxml_transform PROPERTIES PROJECT_LABEL "transform" FOLDER "uscxml") - -INSTALL_LIBRARY(TARGETS uscxml_transform COMPONENT library) if (NOT CMAKE_CROSSCOMPILING) - if (ENABLE_COTIRE) - set_target_properties(uscxml PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "src/uscxml/pch.h") - set_target_properties(uscxml PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) - cotire(uscxml) - endif() + enable_testing() + add_subdirectory(test) endif() -if (NOT CMAKE_CROSSCOMPILING) - if (WIN32) - add_executable(uscxml-browser apps/uscxml-browser.cpp ${PROJECT_SOURCE_DIR}/contrib/src/getopt/getopt.c) - else() - add_executable(uscxml-browser apps/uscxml-browser.cpp) - endif() - target_link_libraries(uscxml-browser uscxml) - - - if (NOT CMAKE_CROSSCOMPILING) - if (ENABLE_COTIRE) - set_target_properties(uscxml-browser PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) - endif() -# cotire(uscxml-browser) - endif() - set_target_properties(uscxml-browser PROPERTIES FOLDER "Apps") - install_executable(TARGETS uscxml-browser COMPONENT tools) - - if (NOT BUILD_MINIMAL) - if (WIN32) - add_executable(uscxml-transform apps/uscxml-transform.cpp ${PROJECT_SOURCE_DIR}/contrib/src/getopt/getopt.c) - else() - add_executable(uscxml-transform apps/uscxml-transform.cpp) - endif() - target_link_libraries(uscxml-transform uscxml uscxml_transform) - if (NOT CMAKE_CROSSCOMPILING) - if (ENABLE_COTIRE) - set_target_properties(uscxml-transform PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) - endif() - endif() - set_target_properties(uscxml-transform PROPERTIES FOLDER "Apps") - install_executable(TARGETS uscxml-transform COMPONENT tools) - - if (WIN32) - add_executable(uscxml-analyze apps/uscxml-analyze.cpp ${PROJECT_SOURCE_DIR}/contrib/src/getopt/getopt.c) - else() - add_executable(uscxml-analyze apps/uscxml-analyze.cpp) - endif() - target_link_libraries(uscxml-analyze uscxml uscxml_transform) - if (NOT CMAKE_CROSSCOMPILING) - if (ENABLE_COTIRE) - set_target_properties(uscxml-analyze PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) - endif() - endif() - set_target_properties(uscxml-analyze PROPERTIES FOLDER "Apps") - install_executable(TARGETS uscxml-analyze COMPONENT tools) - - if (WIN32) - add_executable(uscxml-dot apps/uscxml-dot.cpp ${PROJECT_SOURCE_DIR}/contrib/src/getopt/getopt.c) - else() - add_executable(uscxml-dot apps/uscxml-dot.cpp) - endif() - target_link_libraries(uscxml-dot uscxml) - if (NOT CMAKE_CROSSCOMPILING) - if (ENABLE_COTIRE) - set_target_properties(uscxml-dot PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) - endif() - endif() - set_target_properties(uscxml-dot PROPERTIES FOLDER "Apps") - install_executable(TARGETS uscxml-dot COMPONENT tools) - endif() - - if (PROTOBUF_FOUND AND OFF) - file(GLOB W3C-MMI-COMMON ${PROJECT_SOURCE_DIR}/apps/w3c-mmi/*.cpp ${PROJECT_SOURCE_DIR}/apps/w3c-mmi/*.h) - - file(GLOB_RECURSE W3C-MMI-IM ${PROJECT_SOURCE_DIR}/apps/w3c-mmi/im/*.cpp ${PROJECT_SOURCE_DIR}/apps/w3c-mmi/im/*.h) - add_executable(uscxml-interaction-manager ${W3C-MMI-IM} ${W3C-MMI-COMMON}) - target_link_libraries(uscxml-interaction-manager uscxml) - set_target_properties(uscxml-interaction-manager PROPERTIES FOLDER "Apps") - install_executable(TARGETS uscxml-interaction-manager COMPONENT tools) - - file(GLOB_RECURSE W3C-MMI-MC ${PROJECT_SOURCE_DIR}/apps/w3c-mmi/mc/*.cpp ${PROJECT_SOURCE_DIR}/apps/w3c-mmi/mc/*.h) - add_executable(uscxml-modality-component ${W3C-MMI-MC} ${W3C-MMI-COMMON}) - target_link_libraries(uscxml-modality-component uscxml) - set_target_properties(uscxml-modality-component PROPERTIES FOLDER "Apps") - install_executable(TARGETS uscxml-modality-component COMPONENT tools) - endif() - - if (BUILD_TESTS) - add_subdirectory(test) - endif() - - add_subdirectory(src/bindings) +if (WIN32) + add_executable(uscxml-browser apps/uscxml-browser.cpp ${PROJECT_SOURCE_DIR}/contrib/src/getopt/getopt.c) + add_executable(uscxml-transform apps/uscxml-transform.cpp ${PROJECT_SOURCE_DIR}/contrib/src/getopt/getopt.c) +else() + add_executable(uscxml-browser apps/uscxml-browser.cpp) + add_executable(uscxml-transform apps/uscxml-transform.cpp) endif() +set_property(TARGET uscxml-browser PROPERTY CXX_STANDARD 11) +set_property(TARGET uscxml-browser PROPERTY CXX_STANDARD_REQUIRED ON) +set_property(TARGET uscxml-transform PROPERTY CXX_STANDARD 11) +set_property(TARGET uscxml-transform PROPERTY CXX_STANDARD_REQUIRED ON) -############################################################ -# Header Files -############################################################ +target_link_libraries(uscxml-browser uscxml) +target_link_libraries(uscxml-transform uscxml uscxml_transform) -file(GLOB_RECURSE USCXML_HEADERS - ${PROJECT_SOURCE_DIR}/src/*.h - ${PROJECT_SOURCE_DIR}/src/*.hpp - ${CMAKE_BINARY_DIR}/*.h) -INSTALL_HEADERS(HEADERS ${USCXML_HEADERS} COMPONENT headers) ############################################################ # Create config.h ############################################################ -# determine path seperator to shorten filenames in Debug.cpp +# determine path seperator if (WIN32) SET(PATH_SEPERATOR "\\\\") else() @@ -1400,103 +311,11 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") set(CMAKE_BUILD_TYPE_DEBUG ON) endif() - - # enable config.h style compile time options and add as "uscxml/config.h" configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/uscxml/config.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test/ctest/CTestCustom.ctest.in ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.ctest) -############################################################ -# Some concluding remarks -############################################################ - -message(STATUS "Linking against external (check if you need to export in LD_LIBRARY_PATH or PATH):") -set(SKIP_NEXT OFF) -foreach(LIBRARY ${USCXML_OPT_LIBS}) - if (LIBRARY MATCHES "debug") - if(CMAKE_BUILD_TYPE STREQUAL "Release") - set(SKIP_NEXT ON) - endif() - elseif (LIBRARY MATCHES "optimized") - if(CMAKE_BUILD_TYPE STREQUAL "Debug") - set(SKIP_NEXT ON) - endif() - elseif (LIBRARY MATCHES "uscxml.*") - elseif (LIBRARY MATCHES ".*\\.framework.*") - elseif (LIBRARY MATCHES "mmi_proto.*") - else() - if (NOT SKIP_NEXT) - message(STATUS " ${LIBRARY}") - else() - set(SKIP_NEXT OFF) - endif() - endif() -endforeach() - -message(STATUS "Targets:") -message(STATUS " Available datamodels ........... : ${USCXML_DATAMODELS}") -message(STATUS " Available invokers ............. : ${USCXML_INVOKERS}") -message(STATUS " Available ioprocessors ......... : ${USCXML_IOPROCESSORS}") -message(STATUS " Available custom elements ...... : ${USCXML_ELEMENTS}") -message(STATUS " Available language bindings .... : ${USCXML_LANGUAGE_BINDINGS}") -if (BUILD_SHARED_LIBS AND BUILD_BINDINGS) - message(STATUS "") - message(STATUS " Warning: Building language bindings BUILD_SHARED_LIBS=ON") - message(STATUS " introduces runtime dependency to libuscxml") - message(STATUS "") -endif() - -message(STATUS "General information:") -message(STATUS " Build type ..................... : ${CMAKE_BUILD_TYPE} for ${USCXML_PLATFORM_ID}") -if (BUILD_SHARED_LIBS) - if (BUILD_AS_PLUGINS) - message(STATUS " Building library as ............ : SHARED with plugins") - else() - message(STATUS " Building library as ............ : SHARED without plugins") - endif() -else() - if (BUILD_AS_PLUGINS) - message(STATUS " Building library as ............ : STATIC with plugins") - else() - message(STATUS " Building library as ............ : STATIC without plugins") - endif() -endif() - -if (BUILD_PREFER_STATIC_LIBRARIES) - message(STATUS " Preferring dependent libraries . : STATIC ") -else() - message(STATUS " Preferring dependent libraries . : SHARED") -endif() - -if (BUILD_PREFER_PREBUILT_LIBS) - STRING(REGEX REPLACE "${PROJECT_SOURCE_DIR}/" "" REL_USCXML_PREBUILT_LIBRARY_PATH ${USCXML_PREBUILT_LIBRARY_PATH}) - message(STATUS " Preferring dependent libraries . : from ${REL_USCXML_PREBUILT_LIBRARY_PATH}") -else() - message(STATUS " Preferring dependent libraries . : installed on system") -endif() - -string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UC) -message(STATUS " CXX Flags : " ${CMAKE_CXX_FLAGS} " " ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UC}}) -message(STATUS " C Flags : " ${CMAKE_C_FLAGS} " " ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UC}}) - -STRING(REGEX REPLACE "${CMAKE_BINARY_DIR}" "BUILD_DIR" REL_CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) -STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}" "SOURCE_DIR" REL_CMAKE_LIBRARY_OUTPUT_DIRECTORY ${REL_CMAKE_LIBRARY_OUTPUT_DIRECTORY}) - -STRING(REGEX REPLACE "${CMAKE_BINARY_DIR}" "BUILD_DIR" REL_CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) -STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}" "SOURCE_DIR" REL_CMAKE_RUNTIME_OUTPUT_DIRECTORY ${REL_CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - -message(STATUS " Libraries will end up in ....... : " ${REL_CMAKE_LIBRARY_OUTPUT_DIRECTORY}) -message(STATUS " Binaries will end up in ........ : " ${REL_CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - - -############################################################ -# Installation / Provide package target -############################################################ - -# see contrib/cmake/CPackUSCXML.cmake -include(contrib/cmake/CPackUSCXML.cmake) - -cmake_policy(POP) - -# This must always be last! -include(CPack) +# get_cmake_property(_variableNames VARIABLES) +# foreach (_variableName ${_variableNames}) +# message(STATUS "${_variableName}=${${_variableName}}") +# endforeach() diff --git a/CTestConfig.cmake b/CTestConfig.cmake deleted file mode 100644 index 77b3480..0000000 --- a/CTestConfig.cmake +++ /dev/null @@ -1,14 +0,0 @@ -# Dashboard is opened for submissions for a 24 hour period starting at -# the specified NIGHLY_START_TIME. Time is specified in 24 hour format. -# -# run as: ctest -D Experimental -# -#SET (CTEST_NIGHTLY_START_TIME "23:00:00 EDT") - -set(CTEST_PROJECT_NAME "uscxml") -set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") - -set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "uscxml.tk.informatik.tu-darmstadt.de") -set(CTEST_DROP_LOCATION "/cdash/submit.php?project=uscxml") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/README.md b/README.md index 35ef803..c53c097 100644 --- a/README.md +++ b/README.md @@ -1,125 +1,35 @@ -# uSCXML ReadMe +# Major update! -[![Build Status](https://travis-ci.org/tklab-tud/uscxml.png?branch=master)](https://travis-ci.org/tklab-tud/uscxml) +We deprecated the [old uscxml interperter](https://github.com/tklab-tud/uscxml/tree/legacy-1.0) and rewrote large parts with the lessons learned from the old version. The new implementation is not yet fully done and there is some functionality that has not (yet) made it to the new version. -#### Related Documents +I will update the documentation once I finished up on some polishing and remaining issues. -- [Building from Source](docs/BUILDING.md) -- [Open Issues](docs/ISSUES.md) -- [Getting Started](docs/GETTING_STARTED.md) -- [Publications](docs/PUBLICATIONS.md) +##What's new -## General +### Working -uSCXML is a SCXML interpreter and transformer written in C/C++. It is -[standards compliant](#test-reports) and [easily extended](#extending-uscxml) -even in C# and Java. The *interpreter* itself runs on Linux, -Windows, Raspberry Pi and Mac OSX, each 32- as well as -64Bits as well as iOS. The *generated native code* transformed from an -SCXML document runs on virtually any platform. + * All W3C IRP tests are passed + * Lua datamodel + * ECMAScript datamodel + * Transformer for ANSI-C -### Interpreter +### Important Changes -The implementation of the SCXML **runtime interpreter** is available in the -libuscxml library with the uscxml-browser binary as a -frontend. It implements the following features: + * Replaced Arabica DOM implementation with Xerces-C + * New micro-step implementation + * Removed unsupported Invokers + * Data-model DOM bindings now generated by SWIG + * Dependencies are compiled at configure-time + +### Still Missing -* Data Models - * Full [ECMAScript data model](https://github.com/tklab-tud/uscxml/tree/master/src/uscxml/plugins/datamodel/ecmascript) using Google's v8 (and JavaScriptCore on MacOSX and iOS) - * Simplified support for [Web Storage](http://www.w3.org/TR/2013/REC-webstorage-20130730/) in document.localStorage - * Support for binary data via [TypedArrays](https://www.khronos.org/registry/typedarray/specs/latest/) (will not throw exceptions yet) - * Full [NULL data model](https://github.com/tklab-tud/uscxml/tree/master/src/uscxml/plugins/datamodel/null) with required In predicate - * [Prolog data model](https://github.com/tklab-tud/uscxml/tree/master/src/uscxml/plugins/datamodel/prolog/swi) using SWI prolog - * Experimental [Promela data model](https://github.com/tklab-tud/uscxml/tree/master/src/uscxml/plugins/datamodel/promela) for use - with the [SPIN](http://spinroot.com/spin/whatispin.html) model-checker - * Early support for a [Lua data model](https://github.com/tklab-tud/uscxml/tree/master/src/uscxml/plugins/datamodel/lua) - * Rudimentary support for [XPath data model](https://github.com/tklab-tud/uscxml/tree/master/src/uscxml/plugins/datamodel/xpath) -* Invokers - * scxml: Invoke a nested scxml interpreter - * dirmon: Watches a directory for changes to files - * scenegraph: Simplified 3D scenegraphs with custom markup - * heartbeat: Periodically sends events - * umundo: Subscribe to channels and publish events - * [Many others](https://github.com/tklab-tud/uscxml/tree/master/src/uscxml/plugins/invoker) -* DOM - * DOM Core Level 2 + XPath extensions available for ecmascript data model - * Namespace aware to embed custom markup for special invokers -* Communication - * Features the standard basichttp I/O processor - * Features the required SCXML I/O processor - * No DOM I/O processor - * Early support for [WebSockets](http://datatracker.ietf.org/doc/rfc6455/) - * Can actually respond to HTTP requests with data via <response> -* Language Bindings - * Java bindings - * C# bindings - * PHP module for apache and cli interpreter (discontinued) -* Interactive Debugger - * Accessible via a [web-frontend](http://htmlpreview.github.io/?apps/uscxml-debugger.html) - * Complete with user-defined breakpoints, data model inspection and stepping + * Language Bindings + * Respond element + * Plugin-Architecture + * ArrayBuffers for binary data in data-model -### Transformer +### Dropped -The **transformer** is implemented in the libuscxml_transform library and -made available via the uscxml-transform binary. It is a general tool -for SCXML documents and currently implements the following features: - -* Transformations onto - * [Flattened SCXML documents](src/uscxml/transform/ChartToFlatSCXML.cpp) in which only a single state is ever active - * Resulting documents require slight adaptations to a compliant interpreter for donedata, the In predicate and invokers. - * Semantic equivalence is shown via IRP tests. - * [ANSI C native code](src/uscxml/transform/ChartToC.cpp) for easy embedding of SCXML state-charts in C and C++ programs - * No custom I/O processors implemented in scaffolding just yet. - * To get started with transforming and embedding ANSI C code, read the [inline SCXML document](docs/NATIVE_CODE.md). - * [PROMELA programs](src/uscxml/transform/ChartToPromela.cpp) for model-checking via linear temporal logic with the SPIN model-checker. - * Only defined for the promela and null datamodel. - * [Minimized SCXML documents](src/uscxml/transform/ChartToMinimalSCXML.cpp) with dead states and executable content removed - * Minimization is performed dynamically by marking elements as visited and removing unvisited elements. -* Annotations of the transitions exit set entry set, priority, conflicts, domain - -Currently, we support a transformation from SCXML onto ANSI C. - -### Test Reports - -* We continuously run the [W3C IRP tests](http://www.w3.org/Voice/2013/scxml-irp/) for SCXML. -* Some tests are [excluded](test/ctest/CTestCustom.ctest.in). - -To run the tests yourself, you need to generate the build environment and pass -DBUILD_TESTS=ON via CMake: - - $ cmake -DBUILD_TESTS=ON && make - -Afterwards, you can run the various tests. There are more than 3500 tests in total, -so maybe restrict yourself to some subset. - -| | ECMAScript | XPath | PROMELA | Lua | Invoke as | -|---------------|------------------|------------------|------------------|------------------|------------------| -| Plain IRP | 196/196 | 107/211 | 147/181 | 165/201 | $ ctest -L "^[datamodel]/test" | -| Flattened IRP | 196/196 | 107/211 | 147/181 | 165/201 | $ ctest -L "^fsm/[datamodel]/test" | -| Generated C | 180/196 | 73/211 | 144/181 | 143/201 | $ ctest -L "^gen/c/[datamodel]/test" -| Verification | | | 130/181 | | $ ctest -L "^spin/promela/test" - - -### License - -uSCXML itself is distributed under the Simplified BSD license as in, do not sue us and do -not misrepresent authorship. Please have a look at the licenses of the [libraries we depend -upon](docs/BUILDING.md#build-dependencies) as well. - -## Performance - -We did some performance measurements in the scope of the C transformation. As -you can see in the figure below, for most IRP tests we average to a duration of -5-20us per microstep on an early 2015 MacBook Pro 13" with 3.1GHz in the case -of [generated/compiled C](test/src/test-c-machine.machine.c). For interpretation at runtime, we average at around 70-130us per -microstep. The generated C is rather optimized while the focus of the -interpreter is more on correctness, feature completeness and extensibility. -However, there are some lessons learned that are yet to be applied for the -interpreter. - - - -For the tests, we took the -[highest precision timer](src/uscxml/concurrency/Timer.cpp) -we could attain and measured how long the execution of a given SCXML IRP test -took while subtracting initialization, tear-down and the time spent in the -data-model's routines. Time is averaged over 1.000 iterations. + * XPath data-model + * DOM Events + * Many of the old invokers that were no longer supported \ No newline at end of file diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 0000000..47a9a47 --- /dev/null +++ b/TODO.txt @@ -0,0 +1,7 @@ +Doxygen +C# / Java Bindings +Plugins +Transformers +HTTPS +respond element +Arraybuffers \ No newline at end of file diff --git a/apps/restart-on-term.sh b/apps/restart-on-term.sh deleted file mode 100644 index 37bb4fa..0000000 --- a/apps/restart-on-term.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# see http://superuser.com/questions/223449/auto-restart-process-on-crash -PROGRAM=$1 - -RC=1 -while [ $RC -ne 0 ]; do - ./${PROGRAM} - RC=$? -done diff --git a/apps/samples/http2im/http2im.scxml b/apps/samples/http2im/http2im.scxml deleted file mode 100644 index 369c6a6..0000000 --- a/apps/samples/http2im/http2im.scxml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - here]]> - - - - - \ No newline at end of file diff --git a/apps/samples/map/SpatialMapTicker.java b/apps/samples/map/SpatialMapTicker.java deleted file mode 100644 index 9947ffb..0000000 --- a/apps/samples/map/SpatialMapTicker.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Compile as: - * $ javac -cp .:/usr/local/share/umundo/java/umundo.jar SpatialMapTicker.java - * - * Run as: - * $ java -cp .:/usr/local/share/umundo/java/umundo.jar SpatialMapTicker - */ -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.LinkedList; -import java.util.Random; - -import org.umundo.core.Greeter; -import org.umundo.core.Message; -import org.umundo.core.Node; -import org.umundo.core.Publisher; - -public class SpatialMapTicker { - - Node node; - Publisher pub; - Greeter greeter; - ArrayList sensors = new ArrayList(); - static ArrayList messages = new ArrayList(); - static Random random = new Random(System.currentTimeMillis()); - - public class SensorMessage { - public String message; - public int severity; - public SensorMessage(String message, int severity) { - this.message = message; - this.severity = severity; - } - public SensorMessage(String message) { - this.message = message; - this.severity = 3; - } - } - - public class Sensor { - @Override - public String toString() { - return "Sensor [id=" + id + ", lat=" + lat + ", lon=" + lon - + ", html=" + getHTML() + "]"; - } - public String id = ""; - public Double lat = new Double(0); - public Double lon = new Double(0); - LinkedList messages = new LinkedList(); - - public void addMessage(SensorMessage message) { - if (messages.size() > 15) - messages.removeLast(); - messages.addFirst(message); - } - - public String getHTML() { - StringBuilder sb = new StringBuilder(); - for (SensorMessage message : messages) { - sb.append(message.severity); - sb.append(": "); - sb.append(message.message); - sb.append("
"); - } - return sb.toString(); - } - } - - public class SensorGreeter extends Greeter { - public void welcome(Publisher publisher, String nodeId, String subId) { - // send all sensors to new subscribers - for (Sensor sensor : sensors) { - Message msg = new Message(); //Message.toSubscriber(subId); - msg.putMeta("id", sensor.id); - msg.putMeta("lat", sensor.lat.toString()); - msg.putMeta("lon", sensor.lon.toString()); - msg.putMeta("html", sensor.getHTML()); - pub.send(msg); - } - } - - @Override - public void farewell(Publisher arg0, String nodeId, String subId) { - } - - } - - public SpatialMapTicker() { - node = new Node(); - pub = new Publisher("map/tick"); - greeter = new SensorGreeter(); - pub.setGreeter(greeter); - node.addPublisher(pub); - - double latCenter = 59.32; - double lonCenter = 18.08; - - int nrSensors = 15; //(int) (Math.random() * 20); - for (int i = 0; i < nrSensors; i++) { - Sensor sensor = new Sensor(); - double latOffset = (Math.random() - 0.5) * 0.3; - double lonOffset = (Math.random() - 0.5) * 0.3; - - sensor.id = "Sensor #" + i; - sensor.lat = latCenter + latOffset; - sensor.lon = lonCenter + lonOffset; - sensors.add(sensor); - } - } - - public static void main(String[] args) { - SpatialMapTicker ticker = new SpatialMapTicker(); - ticker.run(); - } - - private void run() { - messages.add(new SensorMessage("Oil pressure threshold exceeded")); - messages.add(new SensorMessage("Equipment is on fire")); - messages.add(new SensorMessage("Error #32 in diagnostics unit")); - messages.add(new SensorMessage("Unauthorized startup")); - messages.add(new SensorMessage("Tire pressure too low")); - messages.add(new SensorMessage("Error #145 in diagnostics unit")); - messages.add(new SensorMessage("Unit was moved out of construction site area")); - messages.add(new SensorMessage("Hydraulic pressure exceeding safety limits")); - messages.add(new SensorMessage("Drivers seat belts are not fastened!")); - messages.add(new SensorMessage("Battery recharge cycles exceeded")); - messages.add(new SensorMessage("Unit operated outside recommended paramters")); - - while (true) { - try { - Thread.sleep((long) (Math.random() * 300) + 100); - } catch (InterruptedException e) { - e.printStackTrace(); - } - - Sensor sensor = sensors.get(random.nextInt(sensors.size())); - SensorMessage fault = messages.get(random.nextInt(messages.size())); - - Date now = new Date(); - SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss z"); - String nowString = sdf.format(now); - sensor.addMessage(fault); - -// System.out.println("Publishing " + sensor); - - Message msg = new Message(); - msg.putMeta("id", sensor.id); - msg.putMeta("lat", sensor.lat.toString()); - msg.putMeta("lon", sensor.lon.toString()); - msg.putMeta("html", sensor.getHTML()); - msg.putMeta("time", nowString); - msg.putMeta("timeStamp", Long.toString(now.getTime())); - msg.putMeta("message", sensor.messages.getFirst().message); - msg.putMeta("severity", Integer.toString(random.nextInt(10))); - pub.send(msg); - } - } - -} diff --git a/apps/samples/map/click.wav b/apps/samples/map/click.wav deleted file mode 100644 index e11b0b7..0000000 Binary files a/apps/samples/map/click.wav and /dev/null differ diff --git a/apps/samples/map/spoken-map-ticker.scxml b/apps/samples/map/spoken-map-ticker.scxml deleted file mode 100644 index 3955715..0000000 --- a/apps/samples/map/spoken-map-ticker.scxml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - -
- - \ No newline at end of file diff --git a/apps/samples/miles/emptyface.jpg b/apps/samples/miles/emptyface.jpg deleted file mode 100755 index a1b2f32..0000000 Binary files a/apps/samples/miles/emptyface.jpg and /dev/null differ diff --git a/apps/samples/miles/miles.html b/apps/samples/miles/miles.html deleted file mode 100644 index c6891a2..0000000 --- a/apps/samples/miles/miles.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
-
-
-
-
- - diff --git a/apps/samples/miles/miles.js b/apps/samples/miles/miles.js deleted file mode 100644 index 01bb134..0000000 --- a/apps/samples/miles/miles.js +++ /dev/null @@ -1,630 +0,0 @@ -function Miles(element, params) { - // private attributes - var self = this; - - // private instanceId - if (!Miles.instances) - Miles.instances = 0; - this.instanceId = Miles.instances++; - - // public attributes defaults - this.imageIteration = 0; - this.resRoot = ""; - this.reflectorIp = "88.131.107.12"; - this.email = "user@smartvortex.eu"; - this.problemName = "webconfero"; - this.remoteEmail = "other@smartvortex.eu"; - this.scxmlURL = "localhost:8080" - - this.width = 320; - this.height = 240; - - this.showVideo = true; - this.enableAudio = true; - this.activateCamera = true; - this.openMicrophone = true; - this.videoFramerate = 25; - this.videoHeight = this.height; - this.videoWidth = this.width; - - // copy over values from constructor arguments - if (params) { - for (var param in params) { - if (self.hasOwnProperty(param)) - self[param] = params[param]; - } - } - - // private attributes - var connected = false; - - var participants = []; // empty array - var videoCompressions = [ - { value: 'jpeg', label: "JPEG" }, - { value: 'h263', label: "H.263" }, - { value: 'h264', label: "H.264" }, - ]; - var videoCompression = ""; - - var audioEncodings = [ - { value: 'pcm', label: "PCM" }, - { value: 'ulaw', label: "uLaw" }, - { value: 'ogg', label: "Ogg Theora" }, - ]; - var audioEncoding = ""; - - var repollInterval = { - image: 20, - chat: 500, - participants: 1000 - }; - - var surpressPublication = false; // do not publish changes performed from subscriptions - var stopChatScrolling = false; - - // called when dojo loaded all requirements below - this.connect = function() { - var query = ""; - query += "?reflector=" + encodeURIComponent(self.reflectorIp); - query += "&userid=" + encodeURIComponent(self.email); - query += "&session=" + encodeURIComponent(self.problemName); - - //self.messageElem.innerHTML += "Connecting to http://" + self.scxmlURL + "/miles/start" + query + "
"; - self.xhr.get({ - // The URL to request - url: "http://" + self.scxmlURL + "/miles/start" + query, - // handleAs:"text", - error: function(err) { - console.log(err); - }, - load: function(result) { - connected = true; - // toggle connect button to disconnect - self.connectDropDown.dropDown.onCancel(true); - self.controlElem.replaceChild(self.controlDropDown.domNode, self.connectDropDown.domNode); - - showChat(); - - // trigger continuous updates - refreshImage(); - getChatText(); - getParticipants(); - } - }); - } - - this.disconnect = function() { - var query = ""; - query += "?reflector=" + encodeURIComponent(self.reflectorIp); - query += "&userid=" + encodeURIComponent(self.email); - query += "&session=" + encodeURIComponent(self.problemName); - - self.xhr.get({ - // The URL to request - url: "http://" + self.scxmlURL + "/miles/stop" + query, - // handleAs:"text", - error: function(err) { - console.log(err); - }, - load: function(result) { - connected = false; - hideChat(); - self.controlDropDown.dropDown.onCancel(true); - self.controlElem.replaceChild(self.connectDropDown.domNode, self.controlDropDown.domNode); - } - }); - } - - var hideChat = function() { - // hide chat elements until connected - for(var key in self.chatElems) { - if (self.chatElems.hasOwnProperty(key) && "style" in self.chatElems[key]) - self.chatElems[key].style.display = "none"; - } - } - - var showChat = function() { - for(var key in self.chatElems) { - if (self.chatElems.hasOwnProperty(key) && "style" in self.chatElems[key]) - self.chatElems[key].style.display = ""; - } - } - - var getParticipants = function() { - if (!connected) - return; - - var query = ""; - self.xhr.get({ - // The URL to request - url: "http://" + self.scxmlURL + "/miles/participants" + query, - handleAs:"json", - error: function(err) { - console.log(err); - setTimeout(getParticipants, repollInterval.participants); - }, - load: function(result) { - if (result.participants) { - participants = result.participants; - } - setTimeout(getParticipants, repollInterval.participants); - } - }); - } - - // fetch a base64 encoded image and set it as the src attribute - var refreshImage = function() { - if (!connected) - return; - - var query = ""; - query += "?userid=" + encodeURIComponent(self.remoteEmail); - self.xhr.get({ - // The URL to request - url: "http://" + self.scxmlURL + "/miles/thumbnail" + query, - handleAs:"text", - headers:{ - "X-Content-Encoding": "base64" - }, - error: function(err) { - console.log(err); - setTimeout(refreshImage, repollInterval.image); - }, - load: function(result) { - self.pictureElem.src = "data:image/jpeg;base64," + result; - //self.messageElem.innerHTML = self.imageIteration++; - setTimeout(refreshImage, repollInterval.image); - } - }); - }; - - var getChatText = function() { - if (!connected) - return; - - self.xhr.get({ - // The URL to request - url: "http://" + self.scxmlURL + "/miles/gettext", - handleAs:"json", - error: function(err) { - console.log(err); - setTimeout(getChatText, repollInterval.chat); - }, - load: function(result) { - if (result.message) { - self.chatOutputElem.innerHTML += result.message + '
'; - if (!stopChatScrolling) - self.chatOutputElem.scrollTop = self.chatOutputElem.scrollHeight; - } - setTimeout(getChatText, repollInterval.chat); - } - }); - }; - - - require(["dojo/dom-construct", - "dojo/_base/xhr", - "dojo/dom", - "dojo/on", - "dojo/topic", - "dojo/_base/unload", - "dijit/form/DropDownButton", - "dijit/TooltipDialog", - "dijit/form/TextBox", - "dijit/form/Button", - "dijit/form/CheckBox", - "dijit/form/Select", - "dijit/form/NumberSpinner", - "dojo/ready"], - function(domConst, - xhr, - dom, - on, - topic, - baseUnload, - DropDownButton, - TooltipDialog, - TextBox, - Button, - CheckBox, - Select, - NumberSpinner, - ready) { - ready(function() { - self.xhr = xhr; - - // if we were passed an id, resolve to dom node - if (typeof(element) === 'string') { - element = dom.byId(element); - } - element.style.width = self.width + "px"; - - baseUnload.addOnWindowUnload(function(){ - self.disconnect(); - }); - - // dynamically assemble the DOM we need - element.appendChild(domConst.toDom('\ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ -
\ -
\ - \ -
\ - \ - \ -
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ - ')); - - // from the above DOM, fetch some nodes to put dojo widgets in - self.pictureElem = dojo.query("img.picture", element)[0]; - self.pictureElem.width = self.width; - self.pictureElem.height = self.height; - self.controlElem = dojo.query("td.control", element)[0]; - self.messageElem = dojo.query("div.messages", element)[0]; - self.chatOutputElem = dojo.query("div.chatOutput", element)[0]; - self.chatOutputElem.style.fontSize = "0.8em"; - self.chatElems = dojo.query(".chat", element); - - console.log(self.controlElem); - - hideChat(); - - on(self.chatOutputElem, "mouseover", function(evt) { - stopChatScrolling = true; - }); - on(self.chatOutputElem, "mouseout", function(evt) { - stopChatScrolling = false; - }); - - self.chatInputElem = dojo.query("div.chatInput", element)[0]; - - self.chatSendButton = new Button({ - label: "Send", - onClick: function(){ - self.xhr.post({ - // The URL to request - url: "http://" + self.scxmlURL + "/miles/text", - contentType: 'application/json', - postData: dojo.toJson({ - message: self.chatInput.get('value'), - userid: self.email - }), - error: function(err) { - console.log(err); - }, - load: function(result) { - self.chatInput.set('value', ''); - } - }); - - } - - }, dojo.query("div.chatSendButton", element)[0]); - - // the chat interface - self.chatInput = new TextBox({ - name: "chatInput", - style: "width: 100%", - onKeyDown: function(e) { - var code = e.keyCode || e.which; - if( code === 13 ) { - e.preventDefault(); - self.chatInput.get('value'); // send button reads empty string otherwise?! - self.chatSendButton.onClick(); - return false; - } - }, - }, self.chatInputElem); - - - // the connect dropdown button - self.connectDropDownContent = domConst.toDom('\ -
\ - \ - \ - \ - \ - \ - \ - \ - \ - '); - self.connectToolTip = new TooltipDialog({ content:self.connectDropDownContent, style:"max-height:320px"}); - self.connectDropDown = new DropDownButton({ label: "Connect", dropDown: self.connectToolTip }); - - // Connect parameters - self.problemNameBox = new TextBox({ - name: "problemName", - value: self.problemName, - style: "width: 100%", - onChange: function(){ - self.problemName = self.problemNameBox.get('value'); - } - - }); - dojo.query("div.problemName", self.connectToolTip.domNode)[0].appendChild(self.problemNameBox.domNode); - - self.emailBox = new TextBox({ - name: "email", - value: self.email, - style: "width: 100%", - onChange: function(){ - self.email = self.emailBox.get('value'); - } - }); - dojo.query("div.email", self.connectToolTip.domNode)[0].appendChild(self.emailBox.domNode); - - self.remoteEmailBox = new TextBox({ - name: "remoteEmail", - value: self.remoteEmail, - style: "width: 100%", - onChange: function(){ - self.remoteEmail = self.remoteEmailBox.get('value'); - } - }); - dojo.query("div.remoteEmail", self.connectToolTip.domNode)[0].appendChild(self.remoteEmailBox.domNode); - - self.reflectorIpBox = new TextBox({ - name: "self.reflectorIp", - value: self.reflectorIp, - style: "width: 100%", - onChange: function(){ - self.reflectorIp = self.reflectorIpBox.get('value'); - } - }); - dojo.query("div.reflectorIp", self.connectToolTip.domNode)[0].appendChild(self.reflectorIpBox.domNode); - - self.scxmlURLBox = new TextBox({ - name: "scxmlURL", - value: self.scxmlURL, - style: "width: 100%", - onChange: function(){ - self.scxmlURL = self.scxmlURLBox.get('value'); - } - }); - dojo.query("div.scxmlURL", self.connectToolTip.domNode)[0].appendChild(self.scxmlURLBox.domNode); - - self.connectButton = new Button({ - label: "Connect", - onClick: function(){ - self.connect(); - } - }); - dojo.query("div.connectButton", self.connectToolTip.domNode)[0].appendChild(self.connectButton.domNode); - - // Control parameters - self.controlDropDownContent = domConst.toDom('\ -
\ -
\ - Global Options\ -
Problem Name:
Your Email:
Other Email:
Reflector Host:
Video Server:
\ - \ - \ - \ - \ - \ - \ - \ -
Activate Camera:
Compression:
Framerate:
Width:
Height:
Open Microphone:
Encoding:
\ - \ -
\ - Session Options\ - \ - \ - \ - \ -
Enable Audio:
Show Video:
\ -
\ -
\ - '); - self.controlToolTip = new TooltipDialog({ content:self.controlDropDownContent, style:"max-height:320px"}); - self.controlDropDown = new DropDownButton({ label: "Session", dropDown: self.controlToolTip }); - - // Control parameters - - // global camera - topic.subscribe("miles/activateCamera", function(data) { - surpressPublication = true; - self.activateCameraCheckbox.set('value', data.activateCamera); - self.videoCompressionSelect.set('value', data.videoCompression); - self.videoFramerateSpinner.set('value', data.videoFramerate); - self.videoWidthSpinner.set('value', data.videoWidth); - self.videoHeightSpinner.set('value', data.videoHeight); - surpressPublication = false; - }); - - var publishCameraParameters = function() { - topic.publish("miles/activateCamera", { - "activateCamera": self.activateCamera, - "videoCompression": self.videoCompression, - "videoFramerate": self.videoFramerate, - "videoWidth": self.videoWidth, - "videoHeight": self.videoHeight - }); - // tell the server - if (activateCamera) { - var query = ""; - query += "?width=" + encodeURIComponent(self.videoWidth); - query += "&height=" + encodeURIComponent(self.videoHeight); - query += "&framerate=" + encodeURIComponent(self.videoFramerate); - query += "&compression=" + encodeURIComponent(self.videoCompression); - self.xhr.get({ - url: "http://" + self.scxmlURL + "/miles/sendvideo" + query, - error: function(err) { - console.log(err); - } - }); - } else { - self.xhr.get({ - url: "http://" + self.scxmlURL + "/miles/sendvideooff", - error: function(err) { - console.log(err); - } - }); - } - }; - - self.activateCameraCheckbox = new CheckBox({ - name: "activateCamera", - checked: self.activateCamera, - onChange: function() { - self.activateCamera = self.activateCameraCheckbox.get('value'); - if (!surpressPublication) - publishCameraParameters(); - } - }); - dojo.query("div.activateCamera", self.controlToolTip.domNode)[0].appendChild(self.activateCameraCheckbox.domNode); - - self.videoCompressionSelect = new Select({ - name: "videoCompression", - options: self.videoCompressions, - onChange: function() { - self.videoCompression = self.videoCompressionSelect.get('value'); - if (!surpressPublication) - publishCameraParameters(); - } - }); - dojo.query("div.videoCompression", self.controlToolTip.domNode)[0].appendChild(self.videoCompressionSelect.domNode); - - self.videoFramerateSpinner = new NumberSpinner({ - name: "videoFramerate", - value: self.videoFramerate, - style: "width: 50px", - onChange: function() { - self.videoFramerate = self.videoFramerateSpinner.get('value'); - if (!surpressPublication) - publishCameraParameters(); - } - }); - dojo.query("div.videoFramerate", self.controlToolTip.domNode)[0].appendChild(self.videoFramerateSpinner.domNode); - - self.videoWidthSpinner = new NumberSpinner({ - name: "videoWidth", - value: self.videoWidth, - style: "width: 50px", - onChange: function() { - self.videoWidth = self.videoWidthSpinner.get('value'); - if (!surpressPublication) - publishCameraParameters(); - } - }); - dojo.query("div.videoWidth", self.controlToolTip.domNode)[0].appendChild(self.videoWidthSpinner.domNode); - - self.videoHeightSpinner = new NumberSpinner({ - name: "videoHeight", - value: self.videoHeight, - style: "width: 50px", - onChange: function() { - self.videoHeight = self.videoHeightSpinner.get('value'); - if (!surpressPublication) - publishCameraParameters(); - } - }); - dojo.query("div.videoHeight", self.controlToolTip.domNode)[0].appendChild(self.videoHeightSpinner.domNode); - - // global microphone - topic.subscribe("miles/openMicrophone", function(data) { - surpressPublication = true; - self.openMicrophoneCheckbox.set('value', data.openMicrophone); - self.audioEncodingSelect.set('value', data.audioEncoding); - surpressPublication = false; - }); - - var publishMicrophoneParameters = function() { - topic.publish("miles/openMicrophone", { - "openMicrophone": openMicrophone, - "audioEncoding": audioEncoding - }); - // tell the server - if (openMicrophone) { - var query = ""; - query += "?encoding=" + encodeURIComponent(self.audioEncoding); - self.xhr.get({ - url: "http://" + self.scxmlURL + "/miles/sendaudio" + query, - error: function(err) { - console.log(err); - } - }); - } else { - self.xhr.get({ - url: "http://" + self.scxmlURL + "/miles/sendaudiooff", - error: function(err) { - console.log(err); - } - }); - } - } - - self.openMicrophoneCheckbox = new CheckBox({ - name: "openMicrophone", - value: self.openMicrophone, - checked: self.openMicrophone, - onChange: function() { - self.openMicrophone = self.openMicrophoneCheckbox.get('value'); - if (!surpressPublication) - publishMicrophoneParameters(); - } - }); - dojo.query("div.openMicrophone", self.controlToolTip.domNode)[0].appendChild(self.openMicrophoneCheckbox.domNode); - - self.audioEncodingSelect = new Select({ - name: "audioEncoding", - options: self.audioEncodings, - onChange: function() { - self.audioEncoding = self.audioEncodingSelect.get('value'); - if (!surpressPublication) - publishMicrophoneParameters(); - } - }); - dojo.query("div.audioEncoding", self.controlToolTip.domNode)[0].appendChild(self.audioEncodingSelect.domNode); - - - // session scoped parameters - self.enableAudioCheckbox = new CheckBox({ - name: "enableAudio", - value: self.enableAudio, - checked: self.enableAudio, - }); - dojo.query("div.enableAudio", self.controlToolTip.domNode)[0].appendChild(self.enableAudioCheckbox.domNode); - - self.showVideo = new CheckBox({ - name: "showVideo", - value: self.showVideo, - checked: self.showVideo, - }); - dojo.query("div.showVideo", self.controlToolTip.domNode)[0].appendChild(self.showVideo.domNode); - - self.disconnectButton = new Button({ - label: "Disconnect", - onClick: function(){ - self.disconnect(); - } - }); - dojo.query("div.disconnectButton", self.controlToolTip.domNode)[0].appendChild(self.disconnectButton.domNode); - - // intially append the connect dropdown - self.controlElem.appendChild(self.connectDropDown.domNode); - - }) - }); -} diff --git a/apps/samples/miles/miles.scxml b/apps/samples/miles/miles.scxml deleted file mode 100644 index 8281e9f..0000000 --- a/apps/samples/miles/miles.scxml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - -
-
-
-
- - - - -
-
- -
- - - - - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/samples/miles/test1.jpeg b/apps/samples/miles/test1.jpeg deleted file mode 100644 index 18c9517..0000000 Binary files a/apps/samples/miles/test1.jpeg and /dev/null differ diff --git a/apps/samples/miles/test2.jpeg b/apps/samples/miles/test2.jpeg deleted file mode 100644 index 7fb9cc0..0000000 Binary files a/apps/samples/miles/test2.jpeg and /dev/null differ diff --git a/apps/samples/miles/test3.jpeg b/apps/samples/miles/test3.jpeg deleted file mode 100644 index 6ed85b0..0000000 Binary files a/apps/samples/miles/test3.jpeg and /dev/null differ diff --git a/apps/samples/miles/test4.jpeg b/apps/samples/miles/test4.jpeg deleted file mode 100644 index 8a623f0..0000000 Binary files a/apps/samples/miles/test4.jpeg and /dev/null differ diff --git a/apps/samples/put-that-there/put-that-there.scxml b/apps/samples/put-that-there/put-that-there.scxml deleted file mode 100644 index 00865c4..0000000 --- a/apps/samples/put-that-there/put-that-there.scxml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/samples/server-push/server-push.scxml b/apps/samples/server-push/server-push.scxml deleted file mode 100644 index c0f0a21..0000000 --- a/apps/samples/server-push/server-push.scxml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - -
-
-
- - - - - - - - This is awesome! - - - - - - - - - - - - - - - - - - - -
- - -]]> -
-
-
- - - - \ No newline at end of file diff --git a/apps/samples/vrml/README.md b/apps/samples/vrml/README.md deleted file mode 100644 index 2a019da..0000000 --- a/apps/samples/vrml/README.md +++ /dev/null @@ -1,150 +0,0 @@ -# VRML Server - -The VRML Server allows clients to retrieve sceneshots of 3D models on the filesystem in a variety of formats. - -## General Mode of Operation - -The VRML server will monitor its vrml directory recursively for vrml and wrl -files. Whenever such a file is found, it is converted into a native, binary representation and -saved in the tmp directory. Clients can now access sceneshots of this model by specifying the -desired pose and format. - -## Accessing Sceneshots - -In the simplest case, a sceneshot is retrieved by simply requested its respective URL on the VRML server: - -http://host/vrml/HARD_MP_VAL_000.png - -All paths start with vrml and then reflect the vrml directory structure as it is being monitored. When a directory -foo was added (either by creation or linking) in the vrml directory, its 3D models will be available at: - -http://host/vrml/foo/FANCY_MODEL_000.png - -When you do not pass any parameters, you will get a sceneshot of the model with its largest, axis aligned surface area -facing the camera. That is, the model will be rotated by multiples of 90deg to show the side of the bounding box which -has the largest surface area. The implied assumption is that this side is suited to identify the model and its eventual -problems the quickest. - -If you do not like the standard sceneshot, you can pass a couple of parameters to adapt most aspects of the scene: - - - - - - - - - - - - - -
NameRangeDescription
pitch[0 .. 2π] radRotation along the x-axis
roll[0 .. 2π] radRotation along the z-axis
yaw[0 .. 2π] radRotation along the y-axis
zoom[0 .. ∞] bounding-sphere unitsDistance of camera to model center
x[-∞ .. ∞] OpenGL unitsTranslation on x-axis
y[-∞ .. ∞] OpenGL unitsTranslation on y-axis
z[-∞ .. ∞] OpenGL unitsTranslation on z-axis (consider using zoom instead)
width[0 .. BIG] pixelsThe width of the image (limited by your GPU)
height[0 .. BIG] pixelsThe height of the image
autorotate[on | off]Whether or not to autorotate first
- -http://host/vrml/HARD_MP_VAL_000.png?pitch=0.3&width=2560&height=1600 - -There are some caveats: -
    -
  • With euler angles such as pitch/roll/yaw, a gimbal lock can occur. -
  • Choosing zoom, x, y or z to big will move the model off the clipping distance. -
  • width and height have no upper limit, this might be a potential DoS. -
  • When observing series of models with autorotating on, not every model is guaranteed to start with the same pose. -
  • The OpenGL units really ought to be expressed in multiples of bounding-sphere units. -
- -## REST API - -The main purpose of the REST API is to provide clients with a list of available model files. - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeReturn ValueExample
/vrmlGET - A JSON structure identifying all known models in the hierarchy as found on the filesystem.
- - The entries are organized in a tree, reflecting the original locations relative to the vrml - directory. The suffix of png is just one example, supported extensions are ultimately - defined by the available OSG writer plugins, but limited for - now to gif, jpg, png, tif and bmp. -
-
-{
-  "models": {
-    "HARD_MP_VAL_000": {
-      "path": "/HARD_MP_VAL_000.png", 
-      "url": "http://host/vrml/HARD_MP_VAL_000.png"
-    }, 
-    "HARD_MP_VAL_001": {
-      "path": "/HARD_MP_VAL_001.png", 
-      "url": "http://host/vrml/HARD_MP_VAL_001.png"
-    }, 
-    "data": {
-      "SOFT_MP_VAL_000": {
-        "path": "/data/SOFT_MP_VAL_000.png", 
-        "url": "http://host/vrml/data/SOFT_MP_VAL_000.png"
-      }, 
-  ...
-
-
/vrml/models, /vrml/wrlsGET - A JSON structure with information about the available binary model files in the tmp directory or the wrl - files in the vrml directory respectively.
- - The entries correspond to the tree at /vrml but all paths are flattened using the path delimiter - (':' per default). -
-
-{
-  "HARD_MP_VAL_000": {
-    "atime":        1363002503, 
-    "ctime":        1362521747, 
-    "dir":          "/tmp", 
-    "extension":    "osgb", 
-    "group":        "/", 
-    "mtime":        "1362521747", 
-    "name":         "HARD_MP_VAL_000.osgb", 
-    "path":         "/tmp/HARD_MP_VAL_000.osgb", 
-    "relDir":       "/", 
-    "relPath":      "/HARD_MP_VAL_000.osgb", 
-    "size":         "580201", 
-    "strippedName": "HARD_MP_VAL_000"
-  }, 
-...
-
-
/vrml/processedGET - A JSON structure with information about the sceneshots that were requested recently and are still on disc.
- - The individual entries within a model key encode the request parameters seperated by underscores, that is:
- The euler angles pitch, roll, yaw, zoom, translation in x, translation - in y, translation in z, width, height, and whether or not to autorotate. -
-
-{
-  "HARD_MP_VAL_000": {
-    "0.94_0_0_1_0_0_0_640_480_on.png": {
-      "atime":        1363002687, 
-      "ctime":        1363002687, 
-      "dir":          "/tmp", 
-...
-	
-
diff --git a/apps/samples/vrml/annotations.js b/apps/samples/vrml/annotations.js deleted file mode 100644 index b91ccfa..0000000 --- a/apps/samples/vrml/annotations.js +++ /dev/null @@ -1,70 +0,0 @@ -function Annotations(element, params) { - - // private attributes - var self = this; - var dojo = require("dojo"); - var domConst = dojo.require('dojo/dom-construct'); - var xhr = dojo.require("dojo/_base/xhr"); - - if (typeof(element) === 'string') { - element = dojo.byId(element); - } - - // private instanceId - if (!Annotations.instances) - Annotations.instances = 0; - var instanceId = Annotations.instances++; - - // public attributes - this.annotations = []; - this.vrmlViewer = params.viewer; - - // establish our dom - element.appendChild(domConst.toDom('\ -
\ -
\ - ')); - - this.annotationTextElem = dojo.query("div.annotation", element)[0]; - this.annotateButtonElem = dojo.query("button.annotate", element)[0]; - this.messagesElem = dojo.query("div.messages", element)[0]; - - // privileged public methods - this.annotate = function(text) { - var pose = dojo.clone(self.vrmlViewer.pose); - var imageURL = self.vrmlViewer.imageURL; - var annoLink = document.createElement("a"); - var annoText = document.createTextNode(text + "\n"); - annoLink.setAttribute("href", "#"); - annoLink.appendChild(annoText); - annoLink.onclick = function() { - self.vrmlViewer.setPose(imageURL, pose); - } - this.messagesElem.appendChild(annoLink); - } - - require(["dijit/form/TextBox"], function(TextBox) { - self.annotationBox = new TextBox({ - name: "Annotation", - style: "width: 70%", - onKeyDown: function(e) { - var code = e.keyCode || e.which; - if( code === 13 ) { - e.preventDefault(); - self.annotate(this.get("value")); - return false; - } - }, - }, self.annotationTextElem); - }); - - require(["dijit/form/Button"], function(Button) { - self.resetButton = new Button({ - label: "Annotate", - onClick: function(){ - self.annotate(self.annotationBox.get("value")); - } - }, self.annotateButtonElem); - }); - -} diff --git a/apps/samples/vrml/ffmpeg-server.invoked.scxml b/apps/samples/vrml/ffmpeg-server.invoked.scxml deleted file mode 100644 index 0c6449f..0000000 --- a/apps/samples/vrml/ffmpeg-server.invoked.scxml +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - {} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/apps/samples/vrml/img/Tutorial.png b/apps/samples/vrml/img/Tutorial.png deleted file mode 100644 index 7f5a041..0000000 Binary files a/apps/samples/vrml/img/Tutorial.png and /dev/null differ diff --git a/apps/samples/vrml/img/Tutorial.pxm b/apps/samples/vrml/img/Tutorial.pxm deleted file mode 100644 index 682a00c..0000000 Binary files a/apps/samples/vrml/img/Tutorial.pxm and /dev/null differ diff --git a/apps/samples/vrml/img/close.png b/apps/samples/vrml/img/close.png deleted file mode 100644 index 7233cbe..0000000 Binary files a/apps/samples/vrml/img/close.png and /dev/null differ diff --git a/apps/samples/vrml/img/drag.png b/apps/samples/vrml/img/drag.png deleted file mode 100644 index b398a3f..0000000 Binary files a/apps/samples/vrml/img/drag.png and /dev/null differ diff --git a/apps/samples/vrml/img/drag2.png b/apps/samples/vrml/img/drag2.png deleted file mode 100644 index 4dfb651..0000000 Binary files a/apps/samples/vrml/img/drag2.png and /dev/null differ diff --git a/apps/samples/vrml/img/drag3.png b/apps/samples/vrml/img/drag3.png deleted file mode 100644 index 467ba6e..0000000 Binary files a/apps/samples/vrml/img/drag3.png and /dev/null differ diff --git a/apps/samples/vrml/img/pitchRoll-handle.png b/apps/samples/vrml/img/pitchRoll-handle.png deleted file mode 100644 index fcff0dd..0000000 Binary files a/apps/samples/vrml/img/pitchRoll-handle.png and /dev/null differ diff --git a/apps/samples/vrml/img/pitchRoll.png b/apps/samples/vrml/img/pitchRoll.png deleted file mode 100644 index 4f73745..0000000 Binary files a/apps/samples/vrml/img/pitchRoll.png and /dev/null differ diff --git a/apps/samples/vrml/img/pitchRoll.pxm b/apps/samples/vrml/img/pitchRoll.pxm deleted file mode 100644 index 1dbc3e2..0000000 Binary files a/apps/samples/vrml/img/pitchRoll.pxm and /dev/null differ diff --git a/apps/samples/vrml/img/pitchRoll3.png b/apps/samples/vrml/img/pitchRoll3.png deleted file mode 100644 index ede9247..0000000 Binary files a/apps/samples/vrml/img/pitchRoll3.png and /dev/null differ diff --git a/apps/samples/vrml/img/xy-handle.png b/apps/samples/vrml/img/xy-handle.png deleted file mode 100644 index 0edb8cc..0000000 Binary files a/apps/samples/vrml/img/xy-handle.png and /dev/null differ diff --git a/apps/samples/vrml/img/xy.png b/apps/samples/vrml/img/xy.png deleted file mode 100644 index fe081ee..0000000 Binary files a/apps/samples/vrml/img/xy.png and /dev/null differ diff --git a/apps/samples/vrml/img/xy.pxm b/apps/samples/vrml/img/xy.pxm deleted file mode 100644 index 5e077ef..0000000 Binary files a/apps/samples/vrml/img/xy.pxm and /dev/null differ diff --git a/apps/samples/vrml/img/xy2.png b/apps/samples/vrml/img/xy2.png deleted file mode 100644 index 2cc3f15..0000000 Binary files a/apps/samples/vrml/img/xy2.png and /dev/null differ diff --git a/apps/samples/vrml/img/yawZoom-handle.png b/apps/samples/vrml/img/yawZoom-handle.png deleted file mode 100644 index f6a54ee..0000000 Binary files a/apps/samples/vrml/img/yawZoom-handle.png and /dev/null differ diff --git a/apps/samples/vrml/img/yawZoom.png b/apps/samples/vrml/img/yawZoom.png deleted file mode 100644 index a256b3b..0000000 Binary files a/apps/samples/vrml/img/yawZoom.png and /dev/null differ diff --git a/apps/samples/vrml/img/yawZoom.pxm b/apps/samples/vrml/img/yawZoom.pxm deleted file mode 100644 index ec00b18..0000000 Binary files a/apps/samples/vrml/img/yawZoom.pxm and /dev/null differ diff --git a/apps/samples/vrml/stress-vrml-server.pl b/apps/samples/vrml/stress-vrml-server.pl deleted file mode 100755 index 4145f29..0000000 --- a/apps/samples/vrml/stress-vrml-server.pl +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/perl -w - -use Math::Round; - -my $pi = 3.14159; - -# make one thousand requests with random parameters -for (my $i = 0; $i < 1000; $i++) { - my $pitch = rand(2*$pi); - my $roll = rand(2*$pi); - my $yaw = rand(2*$pi); - my $width = rand(400) + 200; - my $height = rand(400) + 200; - my $url = "http://epikur.local:8080/vrml/HARD_MP_VAL_002.png". - "?pitch=".sprintf("%.3f",$pitch). - "&roll=".sprintf("%.3f",$roll). - "&yaw=".sprintf("%.3f",$yaw). - "&width=".sprintf("%.0f",$width). - "&height=".sprintf("%.0f",$height); - print $url."\n"; - `wget '$url'`; -} - -# for (my $pitch = 0; $pitch < 2*$pi; $pitch += 0.01) { -# for (my $roll = 0; $roll < 2*$pi; $roll += 0.01) { -# for (my $yaw = 0; $yaw < 2*$pi; $yaw += 0.01) { -# my $url = "http://epikur.local:8081/vrml/HARD_MP_VAL_002.png". -# "?pitch=".sprintf("%.3f",$pitch). -# "&roll=".sprintf("%.3f",$roll). -# "&yaw=".sprintf("%.3f",$yaw); -# print $url."\n"; -# `wget '$url'`; -# } -# } -# } \ No newline at end of file diff --git a/apps/samples/vrml/viewer-webgl-setpose.js b/apps/samples/vrml/viewer-webgl-setpose.js deleted file mode 100644 index e2d3c6c..0000000 --- a/apps/samples/vrml/viewer-webgl-setpose.js +++ /dev/null @@ -1,1353 +0,0 @@ -// Define the namespace -// var eu_smartvorex_femkit_ui_modelviewer = eu_smartvorex_femkit_ui_modelviewer || {}; - -// eu_smartvorex_femkit_ui_modelviewer.VRMLViewer = function (element, params) { -VRMLViewer = function (element, params) { - element.innerHTML = "
"; - - this.updatePose = function(pose) { - console.log("Updating pose."); - console.log("Pose = " + JSON.stringify(pose, null, 4)); - if (!pose.width) pose.width = self.pose.width; - if (!pose.height) pose.height = self.pose.height; - // this.setScene(this.imagePath, this.imageFormat, pose, this.serverURL); - }; - - // private attributes - var self = this; - var batchChanges = false; - var webGLManipulatorsSetup = false; - var currWebGLModel = ""; - - // private instanceId - // if (!eu_smartvorex_femkit_ui_modelviewer.VRMLViewer.instances) - // eu_smartvorex_femkit_ui_modelviewer.VRMLViewer.instances = 0; - // this.instanceId = eu_smartvorex_femkit_ui_modelviewer.VRMLViewer.instances++; - - if (!VRMLViewer.instances) - VRMLViewer.instances = 0; - this.instanceId = VRMLViewer.instances++; - - // public attribute defaults - this.width = 450; - this.height = 350; - - { - var pose = { - pitch: 0, - roll: 0, - yaw: 0, - zoom: 1, - x: 0, - y: 0, - z: 0, - autorotate: false, - }; - this.pose = pose; - } - - this.enableMovies = false; - this.enableDND = true; - this.enableWebGL = true; - this.enableSceneshots = false; - this.enableDraggables = false; - this.treeNavigationStyle = true; - this.listNavigationStyle = true; - this.listDirectory = ""; - - this.serverURL = "localhost:8080"; - this.imagePath = ""; - this.imageFormat = ".png"; - this.resRoot = ""; - - osg.setNotifyLevel(osg.ERROR); - - // copy over values from constructor arguments - if (params) { - for (var param in params) { - if (self.hasOwnProperty(param)) { - self[param] = params[param]; - } else { - console.log("Unknown paramter " + param); - } - } - } - - if (!self.pose.width) - self.pose.width = self.width; - if (!self.pose.height) - self.pose.height = self.height; - - var hasWebGL = function() { - try { - if (!window.WebGLRenderingContext) { - return false; - } - var canvas = document.createElement("canvas"); - var names = ["webgl", "experimental-webgl", "moz-webgl", "webkit-3d"]; - for (var i = 0; i < 4; i++) { - var gl = canvas.getContext(names[i]); - if (gl) { - return true; - } - } - } catch(e) { - return false; - } - return false; - }; - - if (self.enableWebGL && !hasWebGL()) { - console.log("Your browser does no support WebGL, falling back to sceneshots"); - self.enableWebGL = false; - self.enableSceneshots = true; - } - - /** - * normalize given parameters - */ - var normalizeParams = function() { - // make sure server url begins with protocol and does *not* ends in / - if (!self.serverURL.substring(0, 7) == "http://" && - !self.serverURL.substring(0, 8) == "https://") - self.serverURL = "http://" + self.serverURL; - if (!self.serverURL.lastIndexOf("/") === self.serverURL.length) - self.serverURL += self.serverURL.substring(0, self.serverURL - 1); - - // make sure we have a listDirectory with navigation style list ending in / - if (self.modelNavigationStyle === "list" && !self.listDirectory && self.imagePath) - self.listDirectory = self.imagePath.substring(0, self.imagePath.lastIndexOf("/")); - if (!self.listDirectory.indexOf("/", self.listDirectory.length - 1) !== -1) - self.listDirectory += "/"; - - // use latest image if none given - if (!self.imagePath) - self.imagePath = self.listDirectory + "latest"; - - if (!self.imageFormat.substring(0, 1) !== ".") - self.imageFormat = "." + self.imageFormat; - }; - normalizeParams(); - - /** - * Fetch a remote WebGL model and return a future for it - */ - var getWebGLModel = function(url) { - console.log("Loading " + url); - if (self.webGLStandby) { self.webGLStandby.show(); } - var defer = osgDB.Promise.defer(); - var node = new osg.MatrixTransform(); - // node.setMatrix(osg.Matrix.makeRotate(-Math.PI/2, 1,0,0, [])); - var loadModel = function(url) { - osg.log("loading " + url); - var req = new XMLHttpRequest(); - req.open('GET', url, true); - req.onreadystatechange = function(aEvt) { - if (req.readyState == 4) { - if(req.status == 200) { - osgDB.Promise.when(osgDB.parseSceneGraph(JSON.parse(req.responseText))).then(function(child) { - - console.log("Loaded " + url); - - var rotate = []; - osg.Matrix.makeIdentity(rotate); - // osg.Matrix.preMult(rotate, osg.Matrix.makeRotate(Math.PI/2.0, 1,0,0,[])); - // osg.Matrix.preMult(rotate, osg.Matrix.makeRotate(Math.PI, 0,1,0,[])); - - node.setMatrix(rotate); - node.addChild(child); - defer.resolve(node); - osg.log("success " + url); - - }); - if (self.webGLStandby) { self.webGLStandby.hide(); } - } else { - osg.log("error " + url); - if (self.webGLStandby) { self.webGLStandby.hide(); } - } - } - }; - req.send(null); - }; - loadModel(url); - return defer.promise; - }; - - /** - * Concatenate pose as query string - */ - var urlSuffixForPose = function(pose) { - var queryString = - '?width=' + pose.width + - '&height=' + pose.height + - '&pitch=' + pose.pitch + - '&roll=' + pose.roll + - '&yaw=' + pose.yaw + - '&x=' + pose.x + - '&y=' + pose.y + - '&z=' + pose.z + - '&zoom=' + pose.zoom + - '&autorotate=' + (pose.autorotate ? '1' : '0'); - return queryString; - }; - - /** - * Get relative position of two elements - */ - var moverRelativeTo = function(mover, container) { - // see http://stackoverflow.com/questions/288699/get-the-position-of-a-div-span-tag - var absolutePosition = function(el) { - for (var lx=0, ly=0; el != null; lx += el.offsetLeft, ly += el.offsetTop, el = el.offsetParent); - return {x: lx,y: ly}; - }; - - var containerPos = absolutePosition(container); - return { - x: mover.x - containerPos.x, - y: mover.y - containerPos.y - }; - }; - - var eulerToMatrix = function(pitch, roll, yaw) { - // see http://www.flipcode.com/documents/matrfaq.html#Q36 - var m = osg.Matrix.makeIdentity([]); - - var A = Math.cos(pitch); - var B = Math.sin(pitch); - var C = Math.cos(roll); - var D = Math.sin(roll); - var E = Math.cos(yaw); - var F = Math.sin(yaw); - var AD = A * D; - var BD = B * D; - - osg.Matrix.setRow(m, 0, (C * E), (-C * F), (-D), 0); - osg.Matrix.setRow(m, 1, (-BD * E + A * F), (BD * F + A * E), (-B * C), 0); - osg.Matrix.setRow(m, 2, (AD * E + B * F), (-AD * F + B * E), (A * C), 0); - osg.Matrix.setRow(m, 3, 0, 0, 0, 1); - - return m; - } - - var matrixToEuler = function(m) { - // see: http://www.flipcode.com/documents/matrfaq.html#Q37 - var angleX = 0; - var angleZ = 0; - var D = -1 * Math.asin(osg.Matrix.get(m,0,2)); /* Calculate Y-axis angle */ - var angleY = D; - var C = Math.cos(angleY); - - /* Gimbal lock? */ - if (Math.abs(C) > 0.005) { - var tr_x = osg.Matrix.get(m,2,2) / C; /* No, so get X-axis angle */ - var tr_y = -1 * osg.Matrix.get(m,1,2) / C; - angleX = Math.atan2( tr_y, tr_x ); - tr_x = osg.Matrix.get(m,0,0) / C; /* Get Z-axis angle */ - tr_y = -1 * osg.Matrix.get(m,0,1) / C; - angleZ = Math.atan2( tr_y, tr_x ); - } else { - /* Gimball lock has occurred */ - angleX = 0; /* Set X-axis angle to zero */ - var tr_x = osg.Matrix.get(m,1,1); /* And calculate Z-axis angle */ - var tr_y = osg.Matrix.get(m,1,0); - angleZ = Math.atan2( tr_y, tr_x ); - } - - /* Clamp all angles to range */ - return { - pitch: angleX % (2 * 3.14159), - roll: angleY % (2 * 3.14159), - yaw: angleZ % (2 * 3.14159) - }; - } - - // get list of supported ffmpeg codecs from server - this.populateMovieCodecs = function(server, selectElem) { - self.xhr.get({ - // The URL to request - url: server, - handleAs:"json", - headers:{"X-Requested-With":null}, - load: function(result) { - for (var codec in result.video) { - if (codec !== "mpeg1video" && - codec !== "mpeg2video" && - codec !== "mpeg4" && - codec !== "h264" && - codec !== "ayuv" && - codec !== "flashsv" && - codec !== "flashsv2" && - codec !== "flv" && - codec !== "rv40" && - codec !== "theora" && - codec !== "v210" && - codec !== "v308" && - codec !== "v408" && - codec !== "v410" && - codec !== "wmv3" && - codec !== "y41p" && - codec !== "yuv4") - continue; - // console.log(codec); - selectElem.options.push({ label: result.video[codec].longName, value: codec }); - if (codec === "mpeg4") - selectElem.options[selectElem.options.length - 1].selected = true; - } - } - }); - }; - - // update list of vrml files from server - this.refreshServer = function(server, params) { - if (!self.listNavigationStyle && !self.treeNavigationStyle) - return; - - self.serverURL = server; - if (!params) - params = {}; - if (self.fileStandby) { self.fileStandby.show(); } - - self.xhr.get({ - // The URL to request - url: server, - handleAs:"json", - headers:{"X-Requested-With":null}, - error: function(result) { - - if (self.browseButton) { self.browseButton.setAttribute('label', 'Browse'); } - if (self.fileStandby) { self.fileStandby.hide(); } - - if (!params.skipTree) { - if (self.fileTreeStore) { - var allItems = self.fileTreeStore.query(); - for (var i = 0; i < allItems.total; i++) { - self.fileTreeStore.remove(allItems[i].id); - } - } - } - if (!params.skipList) { - if (self.fileListStore) { - var allItems = self.fileListStore.query(); - for (var i = 0; i < allItems.total; i++) { - self.fileListStore.remove(allItems[i].id); - } - } - } - }, - load: function(result) { -// self.localStorage.put("vrmlServer", self.serverURL, null); - if (self.browseButton) { self.browseButton.setAttribute('label', 'Refresh'); } - if (self.fileStandby) { self.fileStandby.hide(); } - - if (self.treeNavigationStyle && !params.skipTree) { - // empty store - var allItems = self.fileTreeStore.query(); - for (var i = 0; i < allItems.total; i++) { - self.fileTreeStore.remove(allItems[i].id); - } - - // parse result as tree - (function fillstore(tree, parentId) { - // todo: respect navigation style - for (key in tree) { - if ('url' in tree[key]) { - self.fileTreeStore.add({id:parentId+key, name:key, url:tree[key].path, parent:parentId}); - } else { - self.fileTreeStore.add({id:parentId+key, name:key, parent:parentId}); - fillstore(tree[key], parentId+key); - } - } - } (result.models, "root", "")); - } - if (self.listNavigationStyle && !params.skipList) { - - // empty store - var allItems = self.fileListStore.query(); - for (var i = 0; i < allItems.total; i++) { - self.fileListStore.remove(allItems[i].id); - } - - // parse result as list - if (!self.listDirectory) - console.log("Requested modelNavigationStyle === list but provided no listDirectory"); - var dirs = self.listDirectory.split("/"); - var models = result.models; - for (var dir in dirs) { - if (!dirs[dir].length) - continue; - if (dirs[dir] in models) { - models = models[dirs[dir]]; - } else { - console.log("No " + dirs[dir] + " in " + models); - } - } - for (var key in models) { - var url = self.serverURL + models[key].path; - self.fileListStore.add({id:key, value:models[key].path, label:key, name:key, url:url}); - } - self.fileListSelect.startup(); - } - // self.updateScene(); - } - }); - }; - - this.getPose = function() { - if (self.webGLViewer && self.webGLViewer.getSceneData()) { - var rotate = []; - osg.Matrix.makeIdentity(rotate); - - osg.Matrix.preMult(rotate, osg.Matrix.makeRotate(Math.PI/2.0, 1,0,0,[])); - osg.Matrix.preMult(rotate, osg.Matrix.makeRotate(Math.PI, 0,1,0,[])); - osg.Matrix.postMult(self.webGLViewer.getSceneData().getMatrix(), rotate); - - var pose = matrixToEuler(rotate); - return pose; - } else { - return { - pitch: self.pose.pitch, - roll: self.pose.roll, - yaw: self.pose.yaw, - } - } - } - - this.setPose = function(pose) { - this.setScene(self.imagePath, self.imageFormat, pose, self.serverURL); - } - - this.setScene = function(imagePath, imageFormat, pose, serverURL) { - - if (serverURL && serverURL != self.serverURL) { - self.refreshServer(serverURL); - } - - self.imagePath = imagePath; - self.imageFormat = imageFormat; - - for (var key in pose) { - self.pose[key] = pose[key]; - } - - self.pose.pitch = (2 * 3.14159 + self.pose.pitch) % (2 * 3.14159); - self.pose.roll = (2 * 3.14159 + self.pose.roll) % (2 * 3.14159); - self.pose.yaw = (2 * 3.14159 + self.pose.yaw) % (2 * 3.14159); - - var pitch = (self.pose.pitch / (2 * 3.14159) + 0.5) * 100; - var roll = (self.pose.roll / (2 * 3.14159) + 0.5) * 100; - var yaw = (self.pose.yaw / (2 * 3.14159) + 0.5) * 100; - var x = ((self.pose.x / 100) + 0.5) * 100; - var y = ((self.pose.y / 100) + 0.5) * 100; - var zoom = (((self.pose.zoom - 1) / 3) + 0.5) * 100; - - // console.log("pitch: " + pitch); - - if (self.pitchRollHandlerElem) self.pitchRollHandlerElem.parentNode.style.right = pitch + "%"; - if (self.pitchRollHandlerElem) self.pitchRollHandlerElem.parentNode.style.top = roll + "%"; - if (self.yawZoomHandlerElem) self.yawZoomHandlerElem.parentNode.style.right = yaw + "%"; - if (self.yawZoomHandlerElem) self.yawZoomHandlerElem.parentNode.style.top = zoom + "%"; - if (self.xyHandlerElem) self.xyHandlerElem.parentNode.style.right = x + "%"; - if (self.xyHandlerElem) self.xyHandlerElem.parentNode.style.top = y + "%"; - - self.updateScene(); - }; - - // update the scene - this.updateScene = function() { - if (self.serverURL && self.imagePath && !self.batchChanges) { - // console.log(self.serverURL + self.imagePath + self.imageFormat + urlSuffixForPose(self.pose)); - - if (self.enableWebGL) { - var setWebGLPose = function() { - - // reset camera controls - self.webGLViewer.getManipulator().reset(); - self.webGLViewer.getManipulator().computeHomePosition(); - - var bs = self.webGLViewer.getSceneData().getBound(); - var zoom = 1; //self.pose.zoom || 10; - var eye = [0, 0, bs.radius() * (1.9 * zoom)]; - // var center = bs.center(); - // var up = [1,1,0]; - - self.webGLViewer.getManipulator().setEyePosition(eye); - - // var poseMatrix = eulerToMatrix(self.pose.pitch, self.pose.yaw, -1 * self.pose.roll); - var poseMatrix = eulerToMatrix(self.pose.pitch * -1, self.pose.roll * -1, self.pose.yaw); - - var rotate = []; - osg.Matrix.makeIdentity(rotate); - // osg.Matrix.preMult(rotate, osg.Matrix.makeRotate(Math.PI/2.0, 1,0,0,[])); - // osg.Matrix.preMult(rotate, osg.Matrix.makeRotate(Math.PI, 0,1,0,[])); - osg.Matrix.postMult(poseMatrix, rotate); - - // osg.Matrix.preMult(rotate, poseMatrix); - self.webGLViewer.getSceneData().setMatrix(rotate); - - } - - if (self.imagePath != currWebGLModel) { - currWebGLModel = self.imagePath; - osgDB.Promise.when(getWebGLModel(self.serverURL + self.imagePath + '.osgjs')).then(function(model) { - self.webGLViewer.setSceneData(model); - if (!webGLManipulatorsSetup) { - self.webGLViewer.setupManipulator(new osgGA.OrbitManipulator(), false); - self.webGLViewer.getManipulator().computeHomePosition(); - } - webGLManipulatorsSetup = true; - setWebGLPose(); - }); - } - if (self.webGLViewer && currWebGLModel == self.imagePath && self.webGLViewer.getSceneData()) { - setWebGLPose(); - } - } - if (self.enableSceneshots) { - self.imgElem.src = self.serverURL + self.imagePath + self.imageFormat + urlSuffixForPose(self.pose); - if (self.enableMovies && self.movieAddButton) { - // we are showing an image, activate movie controls - self.movieAddButton.domNode.style.display = ""; - self.movieDropDown.domNode.style.display = ""; - } - } - } - }; - - require(["dojo/dom-construct", - "dojo/_base/xhr", - "dojo/dom", - "dojo/on", - "dojo/_base/array", - "dojox/storage", - "dojo/store/Memory", - "dojo/store/Observable", - "dijit/tree/ObjectStoreModel", - "dojo/data/ObjectStore", - "dijit/Tree", - "dijit/form/TextBox", - "dijit/form/Button", - "dojox/widget/Standby", - "dijit/form/DropDownButton", - "dijit/TooltipDialog", - "dojo/dnd/Moveable", - "dojo/ready", - "dojo/dnd/Source", - "dijit/form/HorizontalSlider", - "dijit/form/Select", - "dijit/form/NumberSpinner"], - function(domConst, - xhr, - dom, - on, - array, - storage, - Memory, - Observable, - ObjectStoreModel, - ObjectStore, - Tree, - TextBox, - Button, - Standby, - DropDownButton, - TooltipDialog, - Moveable, - ready, - Source, - HorizontalSlider, - Selector, - NumberSpinner) { - - ready(function() { - - if (typeof(element) === 'string') { - element = dom.byId(element); - } - element.style.height = self.pose.height; - element.style.width = self.pose.width; - - self.element = element; - self.xhr = xhr; - - // establish our dom - element.appendChild(domConst.toDom('\ - \ - \ - \ - \ - \ - \ - \ - \ -
\ -
\ -
\ - \ -
\ -
\ - \ -
\ -
\ -
\ -
\ -
\ - \ - \ - \ - \ - \ -
\ -
\ - \ -
\ -
\ -
\ -
\ -
\ -
\ -
\ - \ - \ - \ - \ - \ -
\ -
\ -
\ -
\ -
\ -
\ - \ - \ - \ - \ - \ -
\ -
\ -
\ -
\ -
\ -
\ - \ - \ - \ - \ - \ -
\ -
\ -
\ -
\ - \ - \ - \ - \ -
\ -
\ -
\ -
\ -
\ - ')); - - // fetch special dom nodes for content - self.messageBox = dojo.query("div.messages", element)[0]; - self.imgElem = dojo.query("img.screenShot", element)[0]; - - /** - * === WebGL ==================== - */ - var activateWebGL = function(enable) { - if (enable) { - self.canvasElem = dojo.query("canvas.webGL", element)[0]; - self.canvasElem.style.width = self.width; - self.canvasElem.style.height = self.height; - self.canvasElem.width = self.width; - self.canvasElem.height = self.height; - - if (self.webGLViewer === undefined) { - self.webGLViewer = new osgViewer.Viewer(self.canvasElem, {antialias : true, alpha: true }); - self.webGLViewer.init(); - self.webGLViewer.getCamera().setClearColor([0.0, 0.0, 0.0, 0.0]); - self.webGLViewer.setupManipulator(); - self.webGLViewer.run(); - - self.webGLStandby = new Standby({target: self.element }); - self.element.appendChild(self.webGLStandby.domNode); - } - - // show elements - array.forEach(dojo.query(".webGL", element), function(entry, i) { - entry.style.display = "inline"; - }); - } else { - if (self.webGLViewer) { - self.webGLViewer.stop(); - } - // hide elements - array.forEach(dojo.query(".webGL", element), function(entry, i) { - entry.style.display = "none"; - }); - } - }; - activateWebGL(self.enableWebGL); - - var activateScreenshot = function(enable) { - if (enable) { - array.forEach(dojo.query(".screenShot", element), function(entry, i) { - entry.style.display = "inline"; - }); - } else { - array.forEach(dojo.query(".screenShot", element), function(entry, i) { - entry.style.display = "none"; - }); - } - }; - activateScreenshot(self.enableSceneshots); - - - /** - * === POSE MANIPULATION AND RESET ==================== - */ - self.resetButtonElem = dojo.query("button.resetButton", element)[0]; - self.resetButton = new Button({ - label: "Reset", - onClick: function() { - if (self.webGLViewer) { - self.webGLViewer.setupManipulator(); - self.webGLViewer.getManipulator().computeHomePosition(); - } - self.pose.x = 0; - self.pose.y = 0; - self.pose.pitch = 0; - self.pose.roll = 0; - self.pose.yaw = 0; - self.pose.zoom = 1; - - if (self.xyHandler) self.xyHandler.node.style.left = 0; - if (self.xyHandler) self.xyHandler.node.style.top = 0; - if (self.pitchRollHandler) self.pitchRollHandler.node.style.left = 0; - if (self.pitchRollHandler) self.pitchRollHandler.node.style.top = 0; - if (self.yawZoomHandler) self.yawZoomHandler.node.style.left = 0; - if (self.yawZoomHandler) self.yawZoomHandler.node.style.top = 0; - - self.updateScene(); - } - }, self.resetButtonElem); - - var activateDraggables = function(enable) { - if (enable) { - if (self.pitchRollHandler == undefined) { - self.progressElem = dojo.query("div.progress", element)[0]; - - self.pitchRollHandlerElem = dojo.query(".pitchRollHandler", element)[0]; - self.yawZoomHandlerElem = dojo.query(".yawZoomHandler", element)[0]; - self.xyHandlerElem = dojo.query(".xyHandler", element)[0]; - - self.pitchRollHandler = new Moveable(self.pitchRollHandlerElem); - self.pitchRollHandler.onMoveStop = function(mover) { - var handlerImg = dojo.query("img.pitchRollHandlerImg", mover.node)[0]; - var pitchLabel = dojo.query("div.pitchLabel", mover.node)[0]; - var rollLabel = dojo.query("div.rollLabel", mover.node)[0]; - pitchLabel.innerHTML = ''; - rollLabel.innerHTML = ''; - self.updateScene(); - }; - self.pitchRollHandler.onMoving = function(mover) { - var handlerImg = dojo.query(".pitchRollHandlerImg", mover.node)[0]; - var pitchLabel = dojo.query(".pitchLabel", mover.node)[0]; - var rollLabel = dojo.query(".rollLabel", mover.node)[0]; - var offset = moverRelativeTo(handlerImg, self.element); - - offset.x += 30; - offset.y += 20; - - self.xyHandlerElem.style.zIndex = 1; - self.yawZoomHandlerElem.style.zIndex = 1; - self.pitchRollHandlerElem.style.zIndex = 2; - - self.pose.roll = offset.x / self.pose.width - 0.5; - self.pose.pitch = offset.y / self.pose.height - 0.5; - self.pose.pitch *= -1; - self.pose.roll *= 2 * 3.14159; - self.pose.pitch *= 2 * 3.14159; - self.pose.roll = Math.ceil((self.pose.roll) * 10) / 10; - self.pose.pitch = Math.ceil((self.pose.pitch) * 10) / 10; - pitchLabel.innerHTML = 'Pitch:' + self.pose.pitch; - rollLabel.innerHTML = 'Roll:' + self.pose.roll; - }; - - self.yawZoomHandler = new Moveable(self.yawZoomHandlerElem); - self.yawZoomHandler.onMoveStop = function(mover) { - var handlerImg = dojo.query("img.yawZoomHandlerImg", mover.node)[0]; - var yawLabel = dojo.query("div.yawLabel", mover.node)[0]; - var zoomLabel = dojo.query("div.zoomLabel", mover.node)[0]; - yawLabel.innerHTML = ''; - zoomLabel.innerHTML = ''; - self.updateScene(); - }; - self.yawZoomHandler.onMoving = function(mover) { - var handlerImg = dojo.query("img.yawZoomHandlerImg", mover.node)[0]; - var yawLabel = dojo.query("div.yawLabel", mover.node)[0]; - var zoomLabel = dojo.query("div.zoomLabel", mover.node)[0]; - var offset = moverRelativeTo(handlerImg, self.element); - - offset.x += 7; - offset.y += 9; - - self.xyHandlerElem.style.zIndex = 1; - self.yawZoomHandlerElem.style.zIndex = 2; - self.pitchRollHandlerElem.style.zIndex = 1; - - // self.pose.pitch = self.pose.pitch % (2 * 3.14159); - // self.pose.roll = self.pose.roll % (2 * 3.14159); - self.pose.yaw = (self.pose.width - offset.x) / self.pose.width - 0.5; - self.pose.zoom = offset.y / self.pose.height - 0.5; - self.pose.yaw *= 2 * 3.14159; - self.pose.zoom = self.pose.zoom * 3 + 1; - self.pose.zoom = Math.ceil((self.pose.zoom) * 10) / 10; - self.pose.yaw = Math.ceil((self.pose.yaw) * 10) / 10; - yawLabel.innerHTML = 'Yaw:' + self.pose.yaw; - zoomLabel.innerHTML = 'Zoom:' + self.pose.zoom; - }; - - self.xyHandler = new Moveable(self.xyHandlerElem); - self.xyHandler.onMoveStop = function(mover) { - var handlerImg = dojo.query("img.xyHandlerImg", mover.node)[0]; - var xLabel = dojo.query("div.xLabel", mover.node)[0]; - var yLabel = dojo.query("div.yLabel", mover.node)[0]; - - xLabel.innerHTML = ''; - yLabel.innerHTML = ''; - - self.updateScene(); - }; - self.xyHandler.onMoving = function(mover) { - var handlerImg = dojo.query("img.xyHandlerImg", mover.node)[0]; - var xLabel = dojo.query("div.xLabel", mover.node)[0]; - var yLabel = dojo.query("div.yLabel", mover.node)[0]; - var offset = moverRelativeTo(handlerImg, self.element); - - offset.x += 3; - offset.y += 13; - - self.xyHandlerElem.style.zIndex = 2; - self.yawZoomHandlerElem.style.zIndex = 1; - self.pitchRollHandlerElem.style.zIndex = 1; - - self.pose.x = offset.x / self.pose.width - 0.5; - self.pose.y = offset.y / self.pose.height - 0.5; - self.pose.x *= 100; - self.pose.y *= 100; - self.pose.y = Math.ceil((self.pose.y) * 10) / 10; - self.pose.x = Math.ceil((self.pose.x) * 10) / 10; - xLabel.innerHTML = 'X:' + self.pose.x; - yLabel.innerHTML = 'Y:' + self.pose.y; - }; - } - - // show all draggables - array.forEach(dojo.query(".draggable", element), function(entry, i) { - entry.style.display = "inline"; - }); - - } else { - // show all draggables - array.forEach(dojo.query(".draggable", element), function(entry, i) { - entry.style.display = "none"; - }); - } - }; - activateDraggables(self.enableDraggables); - - /** - * === DRAG HANDLER ==================== - */ - var activateDND = function(enable) { - if (enable) { - self.createAvatar = function(item, mode) { - if (mode == 'avatar') { - // create your avatar if you want - var avatar = dojo.create( 'div', { innerHTML: item.data }); - var avatarPose = dojo.clone(self.pose); - avatarPose.width=60; - avatarPose.height=60; - var avatarImgUrl = urlSuffixForPose(avatarPose); - avatar.innerHTML = ' '; - item.srcEcc = "VRMLViewer"; - item.iconPoseUrl = self.serverURL + self.imagePath + self.imageFormat + avatarImgUrl; - item.imagePath = self.imagePath; - item.imageFormat = self.imageFormat; - item.serverURL = self.serverURL; - item.pose = avatarPose; - return {node: avatar, data: item, type: item.type}; - } - var handler = dojo.create( 'div', { innerHTML: '' }); - return {node: handler, data: item, type: item.type}; - }; - - self.dndHandler = new Source(dojo.query("td.dndHandler", element)[0], {copyOnly: true, creator: self.createAvatar}); - self.dndHandler.insertNodes(false, [ { } ]); - - array.forEach(dojo.query(".dndHandler", element), function(entry, i) { - entry.style.display = "inline"; - }); - - } else { - array.forEach(dojo.query(".dndHandler", element), function(entry, i) { - entry.style.display = "none"; - }); - - } - }; - - activateDND(self.enableDND); - - /** - * === FILE NAVIGATION ==================== - */ - - var activateListNavigation = function(enable) { - if (enable) { - array.forEach(dojo.query(".listNavigation", element), function(entry, i) { - entry.style.display = "inline"; - }); - - if (!self.fileListStore) { - // setup fileStore - self.fileListStore = new Observable(new Memory({ - data: [], - })); - - self.prevButtonElem = dojo.query("button.prevButton", element)[0]; - self.nextButtonElem = dojo.query("button.nextButton", element)[0]; - self.fileListElem = dojo.query("div.fileList", element)[0]; - - self.fileListSelect = new Selector({ - store: new ObjectStore({ objectStore: self.fileListStore }), - onChange: function(name) { - var item = self.fileListStore.query({ id: name })[0]; - self.imagePath = self.listDirectory + item.name; - self.updateScene(); - } - }, self.fileListElem); - - self.prevButton = new Button({ - label: "<", - onClick: function() { - var allItems = self.fileListStore.query(); - var foundAt = 0; - for (var i = 0; i < allItems.total; i++) { - console.log(self.serverURL + self.imagePath + " === " + allItems[i].url); - if (self.serverURL + self.imagePath === allItems[i].url) { - foundAt = i; - break; - } - } - - if (foundAt > 0) { - self.imagePath = self.listDirectory + allItems[foundAt - 1].name; - self.fileListSelect.attr( 'value', allItems[foundAt - 1].id ); - if (self.serverURL + self.imagePath !== allItems[foundAt - 1].url) - console.log(self.serverURL + self.imagePath + " !== " + allItems[foundAt - 1].url); - self.updateScene(); - } - } - }, self.prevButtonElem); - - self.nextButton = new Button({ - label: ">", - onClick: function() { - var allItems = self.fileListStore.query(); - var foundAt = 0; - for (var i = 0; i < allItems.total; i++) { - // console.log(self.serverURL + self.imagePath + " === " + allItems[i].url); - if (self.serverURL + self.imagePath === allItems[i].url) { - foundAt = i; - break; - } - } - if (foundAt + 1 < allItems.total) { - self.imagePath = self.listDirectory + allItems[foundAt + 1].name + ".png"; - self.fileListSelect.attr( 'value', allItems[foundAt + 1].id ); - if (self.serverURL + self.imagePath !== allItems[foundAt + 1].url) - console.log(self.serverURL + self.imagePath + " !== " + allItems[foundAt + 1].url); - self.updateScene(); - } - } - }, self.nextButtonElem); - } - } else { - array.forEach(dojo.query(".listNavigation", element), function(entry, i) { - entry.style.display = "none"; - }); - } - }; - activateListNavigation(self.listNavigationStyle); - - var activateTreeNavigation = function(enable) { - if (enable) { - - array.forEach(dojo.query(".treeNavigation", element), function(entry, i) { - entry.style.display = ""; - }); - - if (!self.fileTreeStore) { - // setup fileStore - self.fileTreeStore = new Observable(new Memory({ - data: [ { id: 'root', name:'3D Models'} ], - getChildren: function(object){ - return this.query({parent: object.id}); - } - })); - - self.fileTreeModel = new ObjectStoreModel({ - store: self.fileTreeStore, - query: { id: "root" } - }); - - // setup actual tree dijit - self.fileTree = new dijit.Tree({ - id: "fileTree" + self.instanceId, - model: self.fileTreeModel, - persist: false, - showRoot: false, - style: "height: 300px;", - onClick: function(item){ - if ('url' in item) { - self.imagePath = item.url; - var newListDir = self.imagePath.substring(0, self.imagePath.lastIndexOf("/")); - if (newListDir.length > 0) - newListDir += '/'; - if (newListDir !== self.listDirectory) { - self.listDirectory = newListDir; - self.refreshServer(self.serverURL, { skipTree: true }); - } - self.updateScene(); - } - }, - getIconClass: function(item, opened) { - return (!item || !('url' in item)) ? (opened ? "dijitFolderOpened" : "dijitFolderClosed") : "dijitLeaf"; - }, - getIconStyle: function(item, opened){ - if('url' in item) { - return { backgroundImage: "url('" + self.serverURL + item.url + self.imageFormat + "?width=16&height=16')"}; - } - } - }); - - self.filesDropDownElem = dojo.query("td.filesDropDown", element)[0]; - - self.serverBox = new TextBox({ - name: "Server", - value: self.serverURL, - style: "width: 65%", - - onKeyUp: function(e) { - if (self.browseButton) { - if (this.get("value") !== self.serverURL) { - self.browseButton.setAttribute('label', 'Browse'); - } else { - self.browseButton.setAttribute('label', 'Refresh'); - } - } - }, - - onKeyDown: function(e) { - var code = e.keyCode || e.which; - if( code === 13 ) { - e.preventDefault(); - self.refreshServer(this.get("value")); - return false; - } - }, - }); - - self.browseButton = new Button({ - label: "Browse", - onClick: function(){ - self.refreshServer(self.serverBox.get("value")); - } - }); - - self.filesDropDownContent = domConst.toDom('
'); - self.filesDropDownContent.appendChild(self.serverBox.domNode); - self.filesDropDownContent.appendChild(self.browseButton.domNode); - self.filesDropDownContent.appendChild(self.fileTree.domNode); - - self.filesToolTip = new TooltipDialog({ content:self.filesDropDownContent, style:"max-height:320px"}); - self.filesDropDown = new DropDownButton({ label: "Files", dropDown: self.filesToolTip }); - self.filesDropDownElem.appendChild(self.filesDropDown.domNode); - - self.fileStandby = new Standby({target: self.filesDropDownContent }); - self.filesDropDownContent.appendChild(self.fileStandby.domNode); - } - } else { - array.forEach(dojo.query(".treeNavigation", element), function(entry, i) { - entry.style.display = "none"; - }); - } - }; - - activateTreeNavigation(self.treeNavigationStyle); - - /** - * === MOVIE DROPDOWN ==================== - */ - - var activateMovies = function(enable) { - if (enable) { - self.movieDropDownElem = dojo.query("div.movieDropDown", element)[0]; - self.movieAddButtonElem = dojo.query("button.movieAddButton", element)[0]; - - self.movieDropDownContent = domConst.toDom( - '
\ -
\ -
\ -
' - ); - - self.movieFormatLengthRowElem = dojo.query("tr.movieFormatLengthRow", self.movieDropDownContent)[0]; - self.movieWidthHeightLengthRowElem = dojo.query("tr.movieWidthHeightLengthRow", self.movieDropDownContent)[0]; - self.movieDnDArea = dojo.query("div.dndArea", self.movieDropDownContent)[0]; - - self.createMovieThumb = function(item, mode) { - if (mode == 'avatar') { - // when dragged - var avatar = dojo.create( 'div', { innerHTML: item.data }); - var avatarPose = dojo.clone(self.pose); - avatarPose.width = 60; - avatarPose.height = 60; - var avatarImgUrl = urlSuffixForPose(avatarPose); - avatar.innerHTML = ' '; - item.srcEcc = "VRMLViewer"; - item.iconPoseUrl = self.imagePath + avatarImgUrl; - item.imagePath = self.imagePath; - item.serverURL = self.serverURL; - item.pose = avatarPose; - return {node: avatar, data: item, type: item.type}; - } else { - - // when added to list - var thumb = domConst.toDom("\ -
\ -
\ - \ - \ - \ - \ - \ - \ - \ - \ -
Frame:
Transition:
\ -
\ -
\ - "); - thumb = dojo.query("div", thumb)[0]; - - var thumbImgElem = dojo.query("img.movieThumb", thumb)[0]; - var removeImgElem = dojo.query("img.removeThumb", thumb)[0]; - var relFrameLengthElem = dojo.query("div.relFrameLength", thumb)[0]; - var relTransitionLengthElem = dojo.query("div.relTransitionLength", thumb)[0]; - var fillInSeriesElem = dojo.query("div.fillInSeries", thumb)[0]; - - item.getThisAndNeighborsFromDnD = function() { - var thisAndNeighbors = {}; - self.addToMovieHandler.forInItems(function(obj, key, ctx) { - if (obj.data === item) { - thisAndNeighbors.this = { key: key, obj: obj }; - } else { - thisAndNeighbors.before = { key: key, obj: obj }; - } - if (thisAndNeighbors.this) { - thisAndNeighbors.after = { key: key, obj: obj }; - return thisAndNeighbors; - } - }); - return thisAndNeighbors; - }; - - item.relFrameLengthSlider = new HorizontalSlider({ - value: 50, - title: "Relative Duration of Frame", - style: "width:150px;" - }, relFrameLengthElem); - - item.relTransitionLengthSlider = new HorizontalSlider({ - value: 100, - title: "Relative Duration of Transition", - style: "width:150px;" - }, relTransitionLengthElem); - - removeImgElem.onclick = function() { - var thisItem = item.getThisAndNeighborsFromDnD(); - if (thisItem.this) { - // haha - what a mess! - self.addToMovieHandler.selectNone(); - self.addToMovieHandler.selection[thisItem.this.key] = thisItem.this.obj; - self.addToMovieHandler.deleteSelectedNodes(); - } - // disable create button if this was the last one - if (!thisItem.after || !thisItem.before) { - self.movieCreateButton.setAttribute('disabled', true); - } - } - - item.fillInSeriesButton = new Button({ - label: "Insert Series", - style: "display: none;", - onClick: function(){ - alert("foo"); - } - }, fillInSeriesElem); - - removeImgElem.src = self.resRoot + "img/close.png"; - - var thumbPose = dojo.clone(self.pose); - thumbPose.width = self.pose.width / 10; - thumbPose.height = self.pose.height / 10; - var thumbImgUrl = urlSuffixForPose(thumbPose); - - thumbImgElem.src = self.serverURL + self.imagePath + self.imageFormat + thumbImgUrl; - // removeImgElem.src = self.resRoot + 'img/close.png'; - - item.srcEcc = "VRMLViewer"; - item.iconPoseUrl = self.imagePath + thumbImgUrl; - item.imagePath = self.imagePath; - item.serverURL = self.serverURL; - item.pose = thumbPose; - - return {node: thumb, data: item, type: item.type}; - } - }; - - self.addToMovieHandler = new Source(self.movieDnDArea, {copyOnly: true, creator: self.createMovieThumb}); - - self.movieFormatSelection = new Selector({ - name: "movieFormat", - style: "width: 320px", - options: [] - }); - self.populateMovieCodecs(self.serverURL + '/movie/codecs', self.movieFormatSelection); - - self.movieFormatLengthRowElem.appendChild(dojo.create('td', { innerHTML: 'Format:'} )); - self.movieFormatLengthRowElem.appendChild(dojo.create('td', { colspan: "2"})); - self.movieFormatLengthRowElem.lastChild.appendChild(self.movieFormatSelection.domNode); - - self.movieHeightSpinner = new NumberSpinner({ - value: 400, - smallDelta: 1, - style: "width: 60px", - constraints: { min:40, places:0 }, - }); - - self.movieWidthSpinner = new NumberSpinner({ - value: 600, - smallDelta: 1, - style: "width: 60px", - constraints: { min:40, places:0 }, - }); - - self.movieCreateButton = new Button({ - label: "Create", - disabled: true, - onClick: function(){ - - var form = document.createElement("form"); - - form.setAttribute("method", "post"); - form.setAttribute("action", self.serverURL + "/movie"); - - var submitData = {}; - submitData.frames = []; - submitData.movieLength = self.movieDurationSpinner.value; - submitData.format = self.movieFormatSelection.value; - submitData.width = self.movieWidthSpinner.value; - submitData.height = self.movieHeightSpinner.value; - - self.addToMovieHandler.forInItems(function(obj, key, ctx) { - var jsonData = { - iconPoseUrl: obj.data.iconPoseUrl, - imagePath: obj.data.imagePath, - serverURL: obj.data.serverURL, - pose: obj.data.pose, - relFrameLength: obj.data.relFrameLengthSlider.value, - relTransitionLength: obj.data.relTransitionLengthSlider.value, - } - submitData.frames.push(jsonData); - }); - - var hiddenField = document.createElement("input"); - hiddenField.setAttribute("type", "hidden"); - hiddenField.setAttribute("name", "data"); - hiddenField.setAttribute("value", JSON.stringify(submitData)); - - form.appendChild(hiddenField); - - document.body.appendChild(form); - form.submit(); - document.body.removeChild(form); - } - }); - - self.movieDurationSpinner = new NumberSpinner({ - value: 10, - smallDelta: 1, - style: "width: 40px", - constraints: { min:0, places:0 }, - }); - - // append format duration cell - self.movieWidthHeightLengthRowElem.appendChild(dojo.create('td', { innerHTML: 'Size:'} )); - var movieDimensionCell = dojo.create('td'); - movieDimensionCell.appendChild(self.movieWidthSpinner.domNode); - movieDimensionCell.appendChild(dojo.create('span', { innerHTML: "x"} )); - movieDimensionCell.appendChild(self.movieHeightSpinner.domNode); - movieDimensionCell.appendChild(self.movieDurationSpinner.domNode); - movieDimensionCell.appendChild(dojo.create('span', { innerHTML: "sec"} )); - self.movieWidthHeightLengthRowElem.appendChild(movieDimensionCell); - - self.movieWidthHeightLengthRowElem.appendChild(dojo.create('td', { align: "right"})); - self.movieWidthHeightLengthRowElem.lastChild.appendChild(self.movieCreateButton.domNode); - - - self.movieToolTip = new TooltipDialog({ content:self.movieDropDownContent }); - self.movieDropDown = new DropDownButton({ - label: "Movie", - style: "display: none;", - dropDown: self.movieToolTip }); - self.movieDropDownElem.appendChild(self.movieDropDown.domNode); - - self.movieAddButton = new Button({ - label: "+", - style: "margin-left: -10px; display: none;", - onClick: function(){ - if (self.movieFormatSelection.options.length == 0) { - self.populateMovieCodecs(self.serverURL + '/movie/codecs', self.movieFormatSelection); - } - // we could pass item.data here to creator - self.addToMovieHandler.insertNodes(false, [ { } ]); - self.movieCreateButton.setAttribute('disabled', false); - - } - }, self.movieAddButtonElem); - } else { - // remove movie controls - var movieControls = dojo.query("td.movieControls", element)[0]; - movieControls.parentNode.removeChild(movieControls); - } - } - activateMovies(self.enableMovies); - - // do we have parameters for the initial pose? - if(self.params && self.params.pose) - self.setScene(self.params.imagePath, self.params.pose, self.params.serverURL); - - if (self.serverURL) { - self.refreshServer(self.serverURL); - self.updateScene(); - } - - }); - }); - -}; diff --git a/apps/samples/vrml/viewer-webgl.js b/apps/samples/vrml/viewer-webgl.js deleted file mode 100644 index 19a589f..0000000 --- a/apps/samples/vrml/viewer-webgl.js +++ /dev/null @@ -1,1290 +0,0 @@ -// Define the namespace -var eu_smartvorex_femkit_ui_modelviewer = eu_smartvorex_femkit_ui_modelviewer || {}; - -eu_smartvorex_femkit_ui_modelviewer.VRMLViewer = function (element, params) { - - console.log(params); - - // private attributes - var self = this; - var batchChanges = false; - var webGLManipulatorsSetup = false; - - // private instanceId - // if (!VRMLViewer.instances) - // VRMLViewer.instances = 0; - // this.instanceId = VRMLViewer.instances++; - - // private instanceId - if (!eu_smartvorex_femkit_ui_modelviewer.VRMLViewer.instances) - eu_smartvorex_femkit_ui_modelviewer.VRMLViewer.instances = 0; - this.instanceId = eu_smartvorex_femkit_ui_modelviewer.VRMLViewer.instances++; - - // public attribute defaults - this.width = 450; - this.height = 350; - - { - var pose = { - pitch: 0, - roll: 0, - yaw: 0, - zoom: 1, - x: 0, - y: 0, - z: 0, - width: false, - height: false, - autorotate: false, - } - this.pose = pose; - } - - this.enableMovies = false; - this.enableDND = true; - this.enableWebGL = true; - this.enableSceneshots = false; - this.enableDraggables = false; - this.enablePosePublishing = true; - this.treeNavigationStyle = true; - this.listNavigationStyle = true; - this.listDirectory = ""; - - this.serverURL = "localhost:8082"; - this.webSocketURL = "localhost:8083"; - this.imagePath = ""; - this.imageFormat = ".png"; - this.resRoot = ""; - - // copy over values from constructor arguments - if (params) { - for (var param in params) { - if (self.hasOwnProperty(param)) { - self[param] = params[param]; - } else { - console.log("Unknown paramter " + param); - } - } - } - - if (!self.pose.width) - self.pose.width = self.width; - if (!self.pose.height) - self.pose.height = self.height; - - this.hasWebSockets = ("WebSocket" in window); - - if (self.enablePosePublishing && !self.hasWebSockets) { - console.log("Your browser does not support WebSockets, deactivating pose publishing"); - self.enablePosePublishing = false; - } - - var hasWebGL = function() { - try { - if (!window.WebGLRenderingContext) { - return false; - } - var canvas = document.createElement("canvas"); - var names = ["webgl", "experimental-webgl", "moz-webgl", "webkit-3d"]; - for (var i = 0; i < 4; i++) { - var gl = canvas.getContext(names[i]); - if (gl) { - return true; - } - } - } catch(e) { - return false; - } - return false; - } - self.hasWebGL = hasWebGL(); - - if (self.enableWebGL && !hasWebGL()) { - console.log("Your browser does not support WebGL, falling back to sceneshots"); - self.enableWebGL = false; - self.enableSceneshots = true; - } - - // see http://stackoverflow.com/questions/4810841/how-can-i-pretty-print-json-using-javascript - function syntaxHighlight(json) { - if (typeof json != 'string') { - json = JSON.stringify(json, undefined, 2); - } - json = json.replace(/&/g, '&').replace(//g, '>'); - return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) { - var cls = 'number'; - if (/^"/.test(match)) { - if (/:$/.test(match)) { - cls = 'key'; - } else { - cls = 'string'; - } - } else if (/true|false/.test(match)) { - cls = 'boolean'; - } else if (/null/.test(match)) { - cls = 'null'; - } - return '' + match + ''; - }); - } - - // normalize parameters - var normalizeParams = function() { - // make sure server url begins with protocol and does *not* ends in / - if (!self.serverURL.substring(0, 7) == "http://" && - !self.serverURL.substring(0, 8) == "https://") - self.serverURL = "http://" + self.serverURL; - if (!self.serverURL.lastIndexOf("/") === self.serverURL.length) - self.serverURL += self.serverURL.substring(0, self.serverURL - 1); - - // make sure we have a listDirectory with navigation style list ending in / - if (self.modelNavigationStyle === "list" && !self.listDirectory && self.imagePath) - self.listDirectory = self.imagePath.substring(0, self.imagePath.lastIndexOf("/")); - if (!self.listDirectory.indexOf("/", self.listDirectory.length - 1) !== -1) - self.listDirectory += "/"; - - // use latest image if none given - if (!self.imagePath) - self.imagePath = self.listDirectory + "latest"; - - if (!self.imageFormat.substring(0, 1) !== ".") - self.imageFormat = "." + self.imageFormat; - } - normalizeParams(); - - var getWebGLModel = function(url) { - if (self.webGLStandby) { self.webGLStandby.show(); } - var defer = osgDB.Promise.defer(); - var node = new osg.MatrixTransform(); - //node.setMatrix(osg.Matrix.makeRotate(-Math.PI/2, 1,0,0, [])); - var loadModel = function(url) { - osg.log("loading " + url); - var req = new XMLHttpRequest(); - req.open('GET', url, true); - req.onreadystatechange = function(aEvt) { - if (req.readyState == 4) { - if(req.status == 200) { - osgDB.Promise.when(osgDB.parseSceneGraph(JSON.parse(req.responseText))).then(function(child) { - node.setMatrix(osg.Matrix.makeRotate(Math.PI/2.0, 1,0,0,[])); - node.addChild(child); - defer.resolve(node); - osg.log("success " + url); - }); - } else { - osg.log("error " + url); - } - if (self.webGLStandby) { self.webGLStandby.hide(); } - } - }; - req.send(null); - }; - loadModel(url); - return defer.promise; - } - - var urlSuffixForPose = function(pose) { - var queryString = - '?width=' + pose.width + - '&height=' + pose.height + - '&pitch=' + pose.pitch + - '&roll=' + pose.roll + - '&yaw=' + pose.yaw + - '&x=' + pose.x + - '&y=' + pose.y + - '&z=' + pose.z + - '&zoom=' + pose.zoom + - '&autorotate=' + (pose.autorotate ? '1' : '0'); - return queryString; - }; - - var moverRelativeTo = function(mover, container) { - var containerPos = absolutePosition(container); - return { - x: mover.x - containerPos.x, - y: mover.y - containerPos.y - }; - }; - - // see http://stackoverflow.com/questions/288699/get-the-position-of-a-div-span-tag - var absolutePosition = function(el) { - for (var lx=0, ly=0; el != null; lx += el.offsetLeft, ly += el.offsetTop, el = el.offsetParent); - return {x: lx,y: ly}; - }; - - // update the scene - this.updateScene = function() { - if (self.serverURL && self.imagePath && !self.batchChanges) { - console.log(self.serverURL + self.imagePath + self.imageFormat + urlSuffixForPose(self.pose)); - if (self.enableWebGL) { - osgDB.Promise.when(getWebGLModel(self.serverURL + self.imagePath + '.osgjs')).then(function(model) { - self.webGLViewer.setSceneData(model); - if (!webGLManipulatorsSetup) { - self.webGLViewer.setupManipulator(new osgGA.OrbitManipulator(), false); - self.webGLViewer.getManipulator().computeHomePosition(); - } - webGLManipulatorsSetup = true; - }); - } - if (self.enableSceneshots) { - self.imgElem.src = self.serverURL + self.imagePath + self.imageFormat + urlSuffixForPose(self.pose); - if (self.enableMovies && self.movieAddButton) { - // we are showing an image, activate movie controls - self.movieAddButton.domNode.style.display = ""; - self.movieDropDown.domNode.style.display = ""; - } - } - } - }; - - // get list of supported ffmpeg codecs from server - this.populateMovieCodecs = function(server, selectElem) { - self.xhr.get({ - // The URL to request - url: server, - handleAs:"json", - headers:{"X-Requested-With":null}, - load: function(result) { - for (var codec in result.video) { - if (codec !== "mpeg1video" && - codec !== "mpeg2video" && - codec !== "mpeg4" && - codec !== "h264" && - codec !== "ayuv" && - codec !== "flashsv" && - codec !== "flashsv2" && - codec !== "flv" && - codec !== "rv40" && - codec !== "theora" && - codec !== "v210" && - codec !== "v308" && - codec !== "v408" && - codec !== "v410" && - codec !== "wmv3" && - codec !== "y41p" && - codec !== "yuv4") - continue; - //console.log(codec); - selectElem.options.push({ label: result.video[codec].longName, value: codec }); - if (codec === "mpeg4") - selectElem.options[selectElem.options.length - 1].selected = true; - } - } - }); - } - - // update list of vrml files from server - this.refreshServer = function(server, params) { - self.serverURL = server; - if (!params) - params = {}; - if (self.fileStandby) { self.fileStandby.show(); } - - self.xhr.get({ - // The URL to request - url: server, - handleAs:"json", - headers:{"X-Requested-With":null}, - error: function(result) { - - if (self.browseButton) { self.browseButton.setAttribute('label', 'Browse'); } - if (self.fileStandby) { self.fileStandby.hide(); } - - if (!params.skipTree) { - if (self.fileTreeStore) { - var allItems = self.fileTreeStore.query(); - for (var i = 0; i < allItems.total; i++) { - self.fileTreeStore.remove(allItems[i].id); - } - } - } - if (!params.skipList) { - if (self.fileListStore) { - var allItems = self.fileListStore.query(); - for (var i = 0; i < allItems.total; i++) { - self.fileListStore.remove(allItems[i].id); - } - } - } - }, - load: function(result) { -// self.localStorage.put("vrmlServer", self.serverURL, null); - if (self.browseButton) { self.browseButton.setAttribute('label', 'Refresh'); } - if (self.fileStandby) { self.fileStandby.hide(); } - - if (self.treeNavigationStyle && !params.skipTree) { - // empty store - var allItems = self.fileTreeStore.query(); - for (var i = 0; i < allItems.total; i++) { - self.fileTreeStore.remove(allItems[i].id); - } - - // parse result as tree - (function fillstore(tree, parentId) { - // todo: respect navigation style - for (key in tree) { - if ('url' in tree[key]) { - self.fileTreeStore.add({id:parentId+key, name:key, url:tree[key].path, parent:parentId}); - } else { - self.fileTreeStore.add({id:parentId+key, name:key, parent:parentId}); - fillstore(tree[key], parentId+key); - } - } - } (result.models, "root", "")); - } - if (self.listNavigationStyle && !params.skipList) { - - // empty store - var allItems = self.fileListStore.query(); - for (var i = 0; i < allItems.total; i++) { - self.fileListStore.remove(allItems[i].id); - } - - // parse result as list - if (!self.listDirectory) - console.log("Requested modelNavigationStyle === list but provided no listDirectory"); - var dirs = self.listDirectory.split("/"); - var models = result.models; - for (var dir in dirs) { - if (!dirs[dir].length) - continue; - if (dirs[dir] in models) { - models = models[dirs[dir]]; - } else { - console.log("No " + dirs[dir] + " in " + models); - } - } - for (var key in models) { - var url = self.serverURL + models[key].path; - self.fileListStore.add({id:key, value:models[key].path, label:key, name:key, url:url}); - } - self.fileListSelect.startup(); - } - //self.updateScene(); - } - }); - }; - - this.setPose = function(imagePath, imageFormat, pose, serverURL) { - if (serverURL && serverURL != self.serverURL) { - self.refreshServer(serverURL); - } - self.imagePath = imagePath; - self.imageFormat = imageFormat; - self.pose = pose; - - var pitch = (pose.pitch % (2 * 3.14159) + 0.5) * 100; - var roll = (pose.roll % (2 * 3.14159) + 0.5) * 100; - var yaw = (pose.yaw % (2 * 3.14159) + 0.5) * 100; - - var x = ((pose.x / 100) + 0.5) * 100; - var y = ((pose.y / 100) + 0.5) * 100; - - var zoom = (((pose.zoom - 1) / 3) + 0.5) * 100; - - self.pitchRollHandlerElem.parentNode.style.right = pitch + "%"; - self.pitchRollHandlerElem.parentNode.style.top = roll + "%"; - self.yawZoomHandlerElem.parentNode.style.right = yaw + "%"; - self.yawZoomHandlerElem.parentNode.style.top = zoom + "%"; - self.xyHandlerElem.parentNode.style.right = x + "%"; - self.xyHandlerElem.parentNode.style.top = y + "%"; - - self.updateScene(); - }; - - require(["dojo/dom-construct", - "dojo/_base/xhr", - "dojo/dom", - "dojo/on", - "dojo/_base/array", - "dojox/storage", - "dojo/store/Memory", - "dojo/store/Observable", - "dijit/tree/ObjectStoreModel", - "dojo/data/ObjectStore", - "dijit/Tree", - "dijit/form/TextBox", - "dijit/form/Button", - "dojox/widget/Standby", - "dijit/form/DropDownButton", - "dijit/TooltipDialog", - "dojo/dnd/Moveable", - "dojo/ready", - "dojo/dnd/Source", - "dijit/form/HorizontalSlider", - "dijit/form/Select", - "dijit/form/NumberSpinner"], - function(domConst, - xhr, - dom, - on, - array, - storage, - Memory, - Observable, - ObjectStoreModel, - ObjectStore, - Tree, - TextBox, - Button, - Standby, - DropDownButton, - TooltipDialog, - Moveable, - ready, - Source, - HorizontalSlider, - Selector, - NumberSpinner) { - - ready(function() { - - if (typeof(element) === 'string') { - element = dom.byId(element); - } - element.style.height = self.pose.height; - element.style.width = self.pose.width; - - self.element = element; - self.xhr = xhr; - - // establish our dom - element.appendChild(domConst.toDom('\ - \ - \ - \ - \ - \ - \ - \ - \ -
\ -
\ -
\ - \ -
\ -
\ - \ -
\ -
\ -
\ -
\ -
\ - \ - \ - \ - \ - \ -
\ -
\ - \ -
\ -
\ -
\ -
\ -
\ -
\ -
\ - \ - \ - \ - \ - \ -
\ -
\ -
\ -
\ -
\ -
\ - \ - \ - \ - \ - \ -
\ -
\ -
\ -
\ -
\ -
\ - \ - \ - \ - \ - \ -
\ -
\ -
\ -
\ - \ - \ - \ - \ -
\ -
\ -
\ -
\ -
\ - ')); - - // fetch special dom nodes for content - self.messageBox = dojo.query("div.messages", element)[0]; - self.imgElem = dojo.query("img.screenShot", element)[0]; - - /** - * === WebGL ==================== - */ - var activateWebGL = function(enable) { - if (enable) { - self.canvasElem = dojo.query("canvas.webGL", element)[0]; - self.canvasElem.style.width = self.width; - self.canvasElem.style.height = self.height; - self.canvasElem.width = self.width; - self.canvasElem.height = self.height; - - // osgDB.Promise.when(getWebGLModel('http://localhost:8081/vrml/cranehook/cranehook_bad_convergence/HARD_MP_VAL_013.osgjs')).then(function(model) { - // self.webGLViewer = new osgViewer.Viewer(self.canvasElem, {antialias : true, alpha: true }); - // self.webGLViewer.init(); - // self.webGLViewer.getCamera().setClearColor([0.0, 0.0, 0.0, 0.0]); - // self.webGLViewer.setSceneData(model); - // self.webGLViewer.setupManipulator(); - // self.webGLViewer.getManipulator().computeHomePosition(); - // self.webGLViewer.run(); - // }); - - if (self.webGLViewer === undefined) { - self.webGLViewer = new osgViewer.Viewer(self.canvasElem, {antialias : true, alpha: true }); - self.webGLViewer.init(); - self.webGLViewer.getCamera().setClearColor([0.0, 0.0, 0.0, 0.0]); - self.webGLViewer.setupManipulator(); - self.webGLViewer.run(); - - self.webGLStandby = new Standby({target: self.element }); - self.element.appendChild(self.webGLStandby.domNode); - } - - // show elements - array.forEach(dojo.query(".webGL", element), function(entry, i) { - entry.style.display = "inline"; - }) - } else { - if (self.webGLViewer) { - self.webGLViewer.stop(); - } - // hide elements - array.forEach(dojo.query(".webGL", element), function(entry, i) { - entry.style.display = "none"; - }) - } - } - activateWebGL(self.enableWebGL); - - var activateScreenshot = function(enable) { - if (enable) { - array.forEach(dojo.query(".screenShot", element), function(entry, i) { - entry.style.display = "inline"; - }); - } else { - array.forEach(dojo.query(".screenShot", element), function(entry, i) { - entry.style.display = "none"; - }); - } - } - activateScreenshot(self.enableSceneshots); - - /** - * === POSE MANIPULATION AND RESET ==================== - */ - - self.resetButtonElem = dojo.query("button.resetButton", element)[0]; - self.resetButton = new Button({ - label: "Reset", - onClick: function() { - if (self.webGLViewer) { - self.webGLViewer.setupManipulator(); - self.webGLViewer.getManipulator().computeHomePosition(); - } - self.pose.x = 0; - self.pose.y = 0; - self.pose.pitch = 0; - self.pose.roll = 0; - self.pose.yaw = 0; - self.pose.zoom = 1; - - self.xyHandler.node.style.left = 0; - self.xyHandler.node.style.top = 0; - self.pitchRollHandler.node.style.left = 0; - self.pitchRollHandler.node.style.top = 0; - self.yawZoomHandler.node.style.left = 0; - self.yawZoomHandler.node.style.top = 0; - - self.updateScene(); - } - }, self.resetButtonElem); - - var activateDraggables = function(enable) { - if (enable) { - if (self.pitchRollHandler == undefined) { - self.progressElem = dojo.query("div.progress", element)[0]; - - self.pitchRollHandlerElem = dojo.query(".pitchRollHandler", element)[0]; - self.yawZoomHandlerElem = dojo.query(".yawZoomHandler", element)[0]; - self.xyHandlerElem = dojo.query(".xyHandler", element)[0]; - - self.pitchRollHandler = new Moveable(self.pitchRollHandlerElem); - self.pitchRollHandler.onMoveStop = function(mover) { - var handlerImg = dojo.query("img.pitchRollHandlerImg", mover.node)[0]; - var pitchLabel = dojo.query("div.pitchLabel", mover.node)[0]; - var rollLabel = dojo.query("div.rollLabel", mover.node)[0]; - pitchLabel.innerHTML = ''; - rollLabel.innerHTML = ''; - self.updateScene(); - }; - self.pitchRollHandler.onMoving = function(mover) { - var handlerImg = dojo.query(".pitchRollHandlerImg", mover.node)[0]; - var pitchLabel = dojo.query(".pitchLabel", mover.node)[0]; - var rollLabel = dojo.query(".rollLabel", mover.node)[0]; - var offset = moverRelativeTo(handlerImg, self.element); - - offset.x += 30; - offset.y += 20; - - self.xyHandlerElem.style.zIndex = 1; - self.yawZoomHandlerElem.style.zIndex = 1; - self.pitchRollHandlerElem.style.zIndex = 2; - - self.pose.roll = offset.x / self.pose.width - 0.5; - self.pose.pitch = offset.y / self.pose.height - 0.5; - self.pose.pitch *= -1; - self.pose.roll *= 2 * 3.14159; - self.pose.pitch *= 2 * 3.14159; - self.pose.roll = Math.ceil((self.pose.roll) * 10) / 10; - self.pose.pitch = Math.ceil((self.pose.pitch) * 10) / 10; - pitchLabel.innerHTML = 'Pitch:' + self.pose.pitch; - rollLabel.innerHTML = 'Roll:' + self.pose.roll; - }; - - self.yawZoomHandler = new Moveable(self.yawZoomHandlerElem); - self.yawZoomHandler.onMoveStop = function(mover) { - var handlerImg = dojo.query("img.yawZoomHandlerImg", mover.node)[0]; - var yawLabel = dojo.query("div.yawLabel", mover.node)[0]; - var zoomLabel = dojo.query("div.zoomLabel", mover.node)[0]; - yawLabel.innerHTML = ''; - zoomLabel.innerHTML = ''; - self.updateScene(); - }; - self.yawZoomHandler.onMoving = function(mover) { - var handlerImg = dojo.query("img.yawZoomHandlerImg", mover.node)[0]; - var yawLabel = dojo.query("div.yawLabel", mover.node)[0]; - var zoomLabel = dojo.query("div.zoomLabel", mover.node)[0]; - var offset = moverRelativeTo(handlerImg, self.element); - - offset.x += 7; - offset.y += 9; - - self.xyHandlerElem.style.zIndex = 1; - self.yawZoomHandlerElem.style.zIndex = 2; - self.pitchRollHandlerElem.style.zIndex = 1; - - // self.pose.pitch = self.pose.pitch % (2 * 3.14159); - // self.pose.roll = self.pose.roll % (2 * 3.14159); - self.pose.yaw = (self.pose.width - offset.x) / self.pose.width - 0.5; - self.pose.zoom = offset.y / self.pose.height - 0.5; - self.pose.yaw *= 2 * 3.14159; - self.pose.zoom = self.pose.zoom * 3 + 1; - self.pose.zoom = Math.ceil((self.pose.zoom) * 10) / 10; - self.pose.yaw = Math.ceil((self.pose.yaw) * 10) / 10; - yawLabel.innerHTML = 'Yaw:' + self.pose.yaw; - zoomLabel.innerHTML = 'Zoom:' + self.pose.zoom; - }; - - self.xyHandler = new Moveable(self.xyHandlerElem); - self.xyHandler.onMoveStop = function(mover) { - var handlerImg = dojo.query("img.xyHandlerImg", mover.node)[0]; - var xLabel = dojo.query("div.xLabel", mover.node)[0]; - var yLabel = dojo.query("div.yLabel", mover.node)[0]; - - xLabel.innerHTML = ''; - yLabel.innerHTML = ''; - - self.updateScene(); - }; - self.xyHandler.onMoving = function(mover) { - var handlerImg = dojo.query("img.xyHandlerImg", mover.node)[0]; - var xLabel = dojo.query("div.xLabel", mover.node)[0]; - var yLabel = dojo.query("div.yLabel", mover.node)[0]; - var offset = moverRelativeTo(handlerImg, self.element); - - offset.x += 3; - offset.y += 13; - - self.xyHandlerElem.style.zIndex = 2; - self.yawZoomHandlerElem.style.zIndex = 1; - self.pitchRollHandlerElem.style.zIndex = 1; - - self.pose.x = offset.x / self.pose.width - 0.5; - self.pose.y = offset.y / self.pose.height - 0.5; - self.pose.x *= 100; - self.pose.y *= 100; - self.pose.y = Math.ceil((self.pose.y) * 10) / 10; - self.pose.x = Math.ceil((self.pose.x) * 10) / 10; - xLabel.innerHTML = 'X:' + self.pose.x; - yLabel.innerHTML = 'Y:' + self.pose.y; - }; - } - - // show all draggables - array.forEach(dojo.query(".draggable", element), function(entry, i) { - entry.style.display = "inline"; - }) - - } else { - // show all draggables - array.forEach(dojo.query(".draggable", element), function(entry, i) { - entry.style.display = "none"; - }) - } - } - activateDraggables(self.enableDraggables); - - /** - * === DRAG HANDLER ==================== - */ - var activateDND = function(enable) { - if (enable) { - self.createAvatar = function(item, mode) { - if (mode == 'avatar') { - // create your avatar if you want - var avatar = dojo.create( 'div', { innerHTML: item.data }); - var avatarPose = dojo.clone(self.pose); - avatarPose.width=60; - avatarPose.height=60; - var avatarImgUrl = urlSuffixForPose(avatarPose); - avatar.innerHTML = ' '; - item.srcEcc = "VRMLViewer"; - item.iconPoseUrl = self.serverURL + self.imagePath + self.imageFormat + avatarImgUrl; - item.imagePath = self.imagePath; - item.imageFormat = self.imageFormat; - item.serverURL = self.serverURL; - item.pose = avatarPose; - return {node: avatar, data: item, type: item.type}; - } - var handler = dojo.create( 'div', { innerHTML: '' }); - return {node: handler, data: item, type: item.type}; - }; - - self.dndHandler = new Source(dojo.query("td.dndHandler", element)[0], {copyOnly: true, creator: self.createAvatar}); - self.dndHandler.insertNodes(false, [ { } ]); - - array.forEach(dojo.query(".dndHandler", element), function(entry, i) { - entry.style.display = "inline"; - }) - - } else { - array.forEach(dojo.query(".dndHandler", element), function(entry, i) { - entry.style.display = "none"; - }) - - } - } - activateDND(self.enableDND); - - /** - * === FILE NAVIGATION ==================== - */ - - var activateListNavigation = function(enable) { - if (enable) { - array.forEach(dojo.query(".listNavigation", element), function(entry, i) { - entry.style.display = "inline"; - }); - - if (!self.fileListStore) { - // setup fileStore - self.fileListStore = new Observable(new Memory({ - data: [], - })); - - self.prevButtonElem = dojo.query("button.prevButton", element)[0]; - self.nextButtonElem = dojo.query("button.nextButton", element)[0]; - self.fileListElem = dojo.query("div.fileList", element)[0]; - - self.fileListSelect = new Selector({ - store: new ObjectStore({ objectStore: self.fileListStore }), - onChange: function(name) { - var item = self.fileListStore.query({ id: name })[0]; - self.imagePath = self.listDirectory + item.name; - self.updateScene(); - } - }, self.fileListElem); - - self.prevButton = new Button({ - label: "<", - onClick: function() { - var allItems = self.fileListStore.query(); - var foundAt = 0; - for (var i = 0; i < allItems.total; i++) { - console.log(self.serverURL + self.imagePath + " === " + allItems[i].url); - if (self.serverURL + self.imagePath === allItems[i].url) { - foundAt = i; - break; - } - } - - if (foundAt > 0) { - self.imagePath = self.listDirectory + allItems[foundAt - 1].name; - self.fileListSelect.attr( 'value', allItems[foundAt - 1].id ); - if (self.serverURL + self.imagePath !== allItems[foundAt - 1].url) - console.log(self.serverURL + self.imagePath + " !== " + allItems[foundAt - 1].url); - self.updateScene(); - } - } - }, self.prevButtonElem); - - self.nextButton = new Button({ - label: ">", - onClick: function() { - var allItems = self.fileListStore.query(); - var foundAt = 0; - for (var i = 0; i < allItems.total; i++) { - //console.log(self.serverURL + self.imagePath + " === " + allItems[i].url); - if (self.serverURL + self.imagePath === allItems[i].url) { - foundAt = i; - break - } - } - if (foundAt + 1 < allItems.total) { - self.imagePath = self.listDirectory + allItems[foundAt + 1].name + ".png"; - self.fileListSelect.attr( 'value', allItems[foundAt + 1].id ); - if (self.serverURL + self.imagePath !== allItems[foundAt + 1].url) - console.log(self.serverURL + self.imagePath + " !== " + allItems[foundAt + 1].url); - self.updateScene(); - } - } - }, self.nextButtonElem); - } - } else { - array.forEach(dojo.query(".listNavigation", element), function(entry, i) { - entry.style.display = "none"; - }); - } - } - activateListNavigation(self.listNavigationStyle); - - var activateTreeNavigation = function(enable) { - if (enable) { - - array.forEach(dojo.query(".treeNavigation", element), function(entry, i) { - entry.style.display = ""; - }); - - if (!self.fileTreeStore) { - // setup fileStore - self.fileTreeStore = new Observable(new Memory({ - data: [ { id: 'root', name:'3D Models'} ], - getChildren: function(object){ - return this.query({parent: object.id}); - } - })); - - self.fileTreeModel = new ObjectStoreModel({ - store: self.fileTreeStore, - query: { id: "root" } - }); - - // setup actual tree dijit - self.fileTree = new dijit.Tree({ - id: "fileTree" + self.instanceId, - model: self.fileTreeModel, - persist: false, - showRoot: false, - style: "height: 300px;", - onClick: function(item){ - if ('url' in item) { - self.imagePath = item.url; - var newListDir = self.imagePath.substring(0, self.imagePath.lastIndexOf("/")); - if (newListDir.length > 0) - newListDir += '/'; - if (newListDir !== self.listDirectory) { - self.listDirectory = newListDir; - self.refreshServer(self.serverURL, { skipTree: true }); - } - self.updateScene(); - } - }, - getIconClass: function(item, opened) { - return (!item || !('url' in item)) ? (opened ? "dijitFolderOpened" : "dijitFolderClosed") : "dijitLeaf"; - }, - getIconStyle: function(item, opened){ - if('url' in item) { - return { backgroundImage: "url('" + self.serverURL + item.url + self.imageFormat + "?width=16&height=16')"}; - } - } - //return {backgroundImage: "url('" + item.url + "?width=16&height=16')"}; - }); - - self.filesDropDownElem = dojo.query("td.filesDropDown", element)[0]; - - self.serverBox = new TextBox({ - name: "Server", - value: self.serverURL, - style: "width: 65%", - - onKeyUp: function(e) { - if (self.browseButton) { - if (this.get("value") !== self.serverURL) { - self.browseButton.setAttribute('label', 'Browse'); - } else { - self.browseButton.setAttribute('label', 'Refresh'); - } - } - }, - - onKeyDown: function(e) { - var code = e.keyCode || e.which; - if( code === 13 ) { - e.preventDefault(); - self.refreshServer(this.get("value")); - return false; - } - }, - }); - - self.browseButton = new Button({ - label: "Browse", - onClick: function(){ - self.refreshServer(self.serverBox.get("value")); - } - }); - - self.filesDropDownContent = domConst.toDom('
'); - self.filesDropDownContent.appendChild(self.serverBox.domNode); - self.filesDropDownContent.appendChild(self.browseButton.domNode); - self.filesDropDownContent.appendChild(self.fileTree.domNode); - - self.filesToolTip = new TooltipDialog({ content:self.filesDropDownContent, style:"max-height:320px"}); - self.filesDropDown = new DropDownButton({ label: "Files", dropDown: self.filesToolTip }); - self.filesDropDownElem.appendChild(self.filesDropDown.domNode); - - self.fileStandby = new Standby({target: self.filesDropDownContent }); - self.filesDropDownContent.appendChild(self.fileStandby.domNode); - } - } else { - array.forEach(dojo.query(".treeNavigation", element), function(entry, i) { - entry.style.display = "none"; - }); - } - } - activateTreeNavigation(self.treeNavigationStyle); - - if (self.serverURL) { - self.refreshServer(self.serverURL); - self.updateScene(); - } - - - /** - * === Pose Publishing ==================== - */ - - var activatePosePublishing = function(enable) { - if (enable && self.hasWebSockets) { - self.poseWebSocket = new WebSocket(self.webSocketURL); - - self.poseWebSocket.onopen = function(evt) { - foo = 0; - function publishPose() { - foo++; - var viewMatrix = self.webGLViewer.getCamera().getViewMatrix(); - var roundMatrix = []; - for (var i = 0; i < 16; i++) { - roundMatrix[i] = viewMatrix[i].toFixed(5); - if (roundMatrix[i] == -0.0) roundMatrix[i] = 0.0; - } - self.poseWebSocket.send(JSON.stringify(roundMatrix)); - self.messageBox.innerHTML = "
SEND" + syntaxHighlight(roundMatrix) + "
"; - // self.poseWebSocket.send(foo); - // self.messageBox.innerHTML = "
SEND" + foo + "
"; - if (self.enablePosePublishing) { - setTimeout(publishPose, 200); - } - } - self.messageBox.innerHTML = "
Starting
"; - publishPose(); - }; - self.poseWebSocket.onclose = function(evt) { - }; - self.poseWebSocket.onmessage = function(evt) { - var result = JSON.parse(evt.data); - self.messageBox.innerHTML = "
RCVD" + syntaxHighlight(JSON.parse(result.data.content)) + "
"; - }; - self.poseWebSocket.onerror = function(evt) { - }; - } else { - - } - } - activatePosePublishing(self.enablePosePublishing); - - /** - * === MOVIE DROPDOWN ==================== - */ - - if (self.enableMovies) { - self.movieDropDownElem = dojo.query("div.movieDropDown", element)[0]; - self.movieAddButtonElem = dojo.query("button.movieAddButton", element)[0]; - - self.movieDropDownContent = domConst.toDom( - '
\ -
\ -
\ -
' - ); - - self.movieFormatLengthRowElem = dojo.query("tr.movieFormatLengthRow", self.movieDropDownContent)[0]; - self.movieWidthHeightLengthRowElem = dojo.query("tr.movieWidthHeightLengthRow", self.movieDropDownContent)[0]; - self.movieDnDArea = dojo.query("div.dndArea", self.movieDropDownContent)[0]; - - self.createMovieThumb = function(item, mode) { - if (mode == 'avatar') { - // when dragged - var avatar = dojo.create( 'div', { innerHTML: item.data }); - var avatarPose = dojo.clone(self.pose); - avatarPose.width = 60; - avatarPose.height = 60; - var avatarImgUrl = urlSuffixForPose(avatarPose); - avatar.innerHTML = ' '; - item.srcEcc = "VRMLViewer"; - item.iconPoseUrl = self.imagePath + avatarImgUrl; - item.imagePath = self.imagePath; - item.serverURL = self.serverURL; - item.pose = avatarPose; - return {node: avatar, data: item, type: item.type}; - } else { - - // when added to list - var thumb = domConst.toDom("\ -
\ -
\ - \ - \ - \ - \ - \ - \ - \ - \ -
Frame:
Transition:
\ -
\ -
\ - "); - thumb = dojo.query("div", thumb)[0]; - - var thumbImgElem = dojo.query("img.movieThumb", thumb)[0]; - var removeImgElem = dojo.query("img.removeThumb", thumb)[0]; - var relFrameLengthElem = dojo.query("div.relFrameLength", thumb)[0]; - var relTransitionLengthElem = dojo.query("div.relTransitionLength", thumb)[0]; - var fillInSeriesElem = dojo.query("div.fillInSeries", thumb)[0]; - - item.getThisAndNeighborsFromDnD = function() { - var thisAndNeighbors = {}; - self.addToMovieHandler.forInItems(function(obj, key, ctx) { - if (obj.data === item) { - thisAndNeighbors.this = { key: key, obj: obj }; - } else { - thisAndNeighbors.before = { key: key, obj: obj }; - } - if (thisAndNeighbors.this) { - thisAndNeighbors.after = { key: key, obj: obj }; - return thisAndNeighbors; - } - }); - return thisAndNeighbors; - }; - - item.relFrameLengthSlider = new HorizontalSlider({ - value: 50, - title: "Relative Duration of Frame", - style: "width:150px;" - }, relFrameLengthElem); - - item.relTransitionLengthSlider = new HorizontalSlider({ - value: 100, - title: "Relative Duration of Transition", - style: "width:150px;" - }, relTransitionLengthElem); - - removeImgElem.onclick = function() { - var thisItem = item.getThisAndNeighborsFromDnD(); - if (thisItem.this) { - // haha - what a mess! - self.addToMovieHandler.selectNone(); - self.addToMovieHandler.selection[thisItem.this.key] = thisItem.this.obj; - self.addToMovieHandler.deleteSelectedNodes(); - } - // disable create button if this was the last one - if (!thisItem.after || !thisItem.before) { - self.movieCreateButton.setAttribute('disabled', true); - } - } - - item.fillInSeriesButton = new Button({ - label: "Insert Series", - style: "display: none;", - onClick: function(){ - alert("foo"); - } - }, fillInSeriesElem); - - removeImgElem.src = self.resRoot + "img/close.png"; - - var thumbPose = dojo.clone(self.pose); - thumbPose.width = self.pose.width / 10; - thumbPose.height = self.pose.height / 10; - var thumbImgUrl = urlSuffixForPose(thumbPose); - - thumbImgElem.src = self.serverURL + self.imagePath + self.imageFormat + thumbImgUrl; - // removeImgElem.src = self.resRoot + 'img/close.png'; - - item.srcEcc = "VRMLViewer"; - item.iconPoseUrl = self.imagePath + thumbImgUrl; - item.imagePath = self.imagePath; - item.serverURL = self.serverURL; - item.pose = thumbPose; - - return {node: thumb, data: item, type: item.type}; - } - }; - - self.addToMovieHandler = new Source(self.movieDnDArea, {copyOnly: true, creator: self.createMovieThumb}); - - self.movieFormatSelection = new Selector({ - name: "movieFormat", - style: "width: 320px", - options: [] - }); - self.populateMovieCodecs(self.serverURL + '/movie/codecs', self.movieFormatSelection); - - self.movieFormatLengthRowElem.appendChild(dojo.create('td', { innerHTML: 'Format:'} )); - self.movieFormatLengthRowElem.appendChild(dojo.create('td', { colspan: "2"})); - self.movieFormatLengthRowElem.lastChild.appendChild(self.movieFormatSelection.domNode); - - self.movieHeightSpinner = new NumberSpinner({ - value: 400, - smallDelta: 1, - style: "width: 60px", - constraints: { min:40, places:0 }, - }); - - self.movieWidthSpinner = new NumberSpinner({ - value: 600, - smallDelta: 1, - style: "width: 60px", - constraints: { min:40, places:0 }, - }); - - self.movieCreateButton = new Button({ - label: "Create", - disabled: true, - onClick: function(){ - - var form = document.createElement("form"); - - form.setAttribute("method", "post"); - form.setAttribute("action", self.serverURL + "/movie"); - - var submitData = {}; - submitData.frames = []; - submitData.movieLength = self.movieDurationSpinner.value; - submitData.format = self.movieFormatSelection.value; - submitData.width = self.movieWidthSpinner.value; - submitData.height = self.movieHeightSpinner.value; - - self.addToMovieHandler.forInItems(function(obj, key, ctx) { - var jsonData = { - iconPoseUrl: obj.data.iconPoseUrl, - imagePath: obj.data.imagePath, - serverURL: obj.data.serverURL, - pose: obj.data.pose, - relFrameLength: obj.data.relFrameLengthSlider.value, - relTransitionLength: obj.data.relTransitionLengthSlider.value, - } - submitData.frames.push(jsonData); - }); - - var hiddenField = document.createElement("input"); - hiddenField.setAttribute("type", "hidden"); - hiddenField.setAttribute("name", "data"); - hiddenField.setAttribute("value", JSON.stringify(submitData)); - - form.appendChild(hiddenField); - - // this will not save the returned binary file - // self.xhr.post({ - // form: form, - // load: function(data){ - // alert("asd"); - // } - // }); - - document.body.appendChild(form); - form.submit(); - document.body.removeChild(form); - } - }); - - self.movieDurationSpinner = new NumberSpinner({ - value: 10, - smallDelta: 1, - style: "width: 40px", - constraints: { min:0, places:0 }, - }); - - // append format duration cell - self.movieWidthHeightLengthRowElem.appendChild(dojo.create('td', { innerHTML: 'Size:'} )); - var movieDimensionCell = dojo.create('td'); - movieDimensionCell.appendChild(self.movieWidthSpinner.domNode); - movieDimensionCell.appendChild(dojo.create('span', { innerHTML: "x"} )); - movieDimensionCell.appendChild(self.movieHeightSpinner.domNode); - movieDimensionCell.appendChild(self.movieDurationSpinner.domNode); - movieDimensionCell.appendChild(dojo.create('span', { innerHTML: "sec"} )); - self.movieWidthHeightLengthRowElem.appendChild(movieDimensionCell); - - self.movieWidthHeightLengthRowElem.appendChild(dojo.create('td', { align: "right"})); - self.movieWidthHeightLengthRowElem.lastChild.appendChild(self.movieCreateButton.domNode); - - - self.movieToolTip = new TooltipDialog({ content:self.movieDropDownContent }); - self.movieDropDown = new DropDownButton({ - label: "Movie", - style: "display: none;", - dropDown: self.movieToolTip }); - self.movieDropDownElem.appendChild(self.movieDropDown.domNode); - - self.movieAddButton = new Button({ - label: "+", - style: "margin-left: -10px; display: none;", - onClick: function(){ - if (self.movieFormatSelection.options.length == 0) { - self.populateMovieCodecs(self.serverURL + '/movie/codecs', self.movieFormatSelection); - } - // we could pass item.data here to creator - self.addToMovieHandler.insertNodes(false, [ { } ]); - self.movieCreateButton.setAttribute('disabled', false); - - } - }, self.movieAddButtonElem); - } else { - // remove movie controls - var movieControls = dojo.query("td.movieControls", element)[0]; - movieControls.parentNode.removeChild(movieControls); - } - - // do we have parameters for the initial pose? - if(self.params && self.params.pose) - self.setPose(self.params.imagePath, self.params.pose, self.params.serverURL); - - }); - }); - - -} \ No newline at end of file diff --git a/apps/samples/vrml/viewer.css b/apps/samples/vrml/viewer.css deleted file mode 100644 index 089d29a..0000000 --- a/apps/samples/vrml/viewer.css +++ /dev/null @@ -1,157 +0,0 @@ -/* Progress Indicator */ -.mblProgressIndicator { - position: relative; - top: 0px; -} -.mblHeading .mblProgressIndicator { - margin: 5px; - float: left; -} -.mblProgContainer { - position: absolute; - width: 100%; - height: 100%; -} -.mblProgressIndicatorCenter { - position: absolute; - top: 180px; - left: 50%; -} -.mblProgressIndicatorCenter .mblProgContainer { - left: -50%; - -webkit-transform-origin: 50% 0; - -moz-transform-origin: 50% 0; -} -.mblProg { - position: absolute; - left: 2px; - top: 0px; - width: 11px; - font-size: 1px; - height: 4px; - overflow: hidden; - -webkit-transform-origin: 0 2px; - -moz-transform-origin: 0 2px; - background-color: #c0c0c0; - border-radius: 2px; -} -.mblProg0 { - -webkit-transform: translate(18px, 10px) rotate(-90.1deg); - -moz-transform: translate(18px, 10px) rotate(-90.1deg); -} -.mblProg1 { - -webkit-transform: translate(22px, 11px) rotate(-60deg); - -moz-transform: translate(22px, 11px) rotate(-60deg); -} -.mblProg2 { - -webkit-transform: translate(25px, 14px) rotate(-30deg); - -moz-transform: translate(25px, 14px) rotate(-30deg); -} -.mblProg3 { - -webkit-transform: translate(26px, 18px) rotate(0deg); - -moz-transform: translate(26px, 18px) rotate(0deg); -} -.mblProg4 { - -webkit-transform: translate(25px, 22px) rotate(30deg); - -moz-transform: translate(25px, 22px) rotate(30deg); -} -.mblProg5 { - -webkit-transform: translate(22px, 25px) rotate(60deg); - -moz-transform: translate(22px, 25px) rotate(60deg); -} -.mblProg6 { - -webkit-transform: translate(18px, 26px) rotate(90.1deg); - -moz-transform: translate(18px, 26px) rotate(90.1deg); -} -.mblProg7 { - -webkit-transform: translate(14px, 25px) rotate(120deg); - -moz-transform: translate(14px, 25px) rotate(120deg); -} -.mblProg8 { - -webkit-transform: translate(11px, 22px) rotate(150deg); - -moz-transform: translate(11px, 22px) rotate(150deg); -} -.mblProg9 { - -webkit-transform: translate(10px, 18px) rotate(180deg); - -moz-transform: translate(10px, 18px) rotate(180deg); -} -.mblProg10 { - -webkit-transform: translate(11px, 14px) rotate(210deg); - -moz-transform: translate(11px, 14px) rotate(210deg); -} -.mblProg11 { - -webkit-transform: translate(14px, 11px) rotate(240deg); - -moz-transform: translate(14px, 11px) rotate(240deg); -} -.mblProg0Color { - background-color: #c0c0c0; -} -.mblProg1Color { - background-color: #c0c0c0; -} -.mblProg2Color { - background-color: #c0c0c0; -} -.mblProg3Color { - background-color: #c0c0c0; -} -.mblProg4Color { - background-color: #c0c0c0; -} -.mblProg5Color { - background-color: #c0c0c0; -} -.mblProg6Color { - background-color: #b8b9b8; -} -.mblProg7Color { - background-color: #aeafae; -} -.mblProg8Color { - background-color: #a4a5a4; -} -.mblProg9Color { - background-color: #9a9a9a; -} -.mblProg10Color { - background-color: #8e8e8e; -} -.mblProg11Color { - background-color: #838383; -} -.mblProgWhite .mblProg0Color { - background-color: #adb9c9; -} -.mblProgWhite .mblProg1Color { - background-color: #adb9c9; -} -.mblProgWhite .mblProg2Color { - background-color: #adb9c9; -} -.mblProgWhite .mblProg3Color { - background-color: #adb9c9; -} -.mblProgWhite .mblProg4Color { - background-color: #adb9c9; -} -.mblProgWhite .mblProg5Color { - background-color: #adb9c9; -} -.mblProgWhite .mblProg6Color { - background-color: #acb9cb; -} -.mblProgWhite .mblProg7Color { - background-color: #b7c2d2; -} -.mblProgWhite .mblProg8Color { - background-color: #c4cdda; -} -.mblProgWhite .mblProg9Color { - background-color: #d1d8e2; -} -.mblProgWhite .mblProg10Color { - background-color: #dee3ea; -} -.mblProgWhite .mblProg11Color { - background-color: #eceff3; -} diff --git a/apps/samples/vrml/viewer.html b/apps/samples/vrml/viewer.html deleted file mode 100644 index c585aaa..0000000 --- a/apps/samples/vrml/viewer.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -






-
-






-
-
-
-
- - diff --git a/apps/samples/vrml/viewer.js b/apps/samples/vrml/viewer.js deleted file mode 100644 index 4b59a8c..0000000 --- a/apps/samples/vrml/viewer.js +++ /dev/null @@ -1,984 +0,0 @@ -function VRMLViewer(element, params) { - - // private attributes - var self = this; - var batchChanges = false; - - // private instanceId - if (!VRMLViewer.instances) - VRMLViewer.instances = 0; - this.instanceId = VRMLViewer.instances++; - - // public attribute defaults - this.width = 450; - this.height = 350; - - { - var pose = { - pitch: 0, - roll: 0, - yaw: 0, - zoom: 1, - x: 0, - y: 0, - z: 0, - width: this.width, - height: this.height, - autorotate: false, - } - this.pose = pose; - } - - this.enableMovies = true; - this.enableDND = true; - this.modelNavigationStyle = "tree"; // tree, list, none - this.poseNavigationStyle = "draggables"; // draggables, sliders - this.listDirectory = ""; - this.serverURL = "localhost:8080"; - this.imagePath = ""; - this.resRoot = ""; - - // copy over values from constructor arguments - if (params) { - for (var param in params) { - if (self.hasOwnProperty(param)) - self[param] = params[param]; - } - } - - // normalize parameters - - // make sure server url begins with protocol and does *not* ends in / - if (!self.serverURL.substring(0, 7) == "http://" && - !self.serverURL.substring(0, 8) == "https://") - self.serverURL = "http://" + self.serverURL; - if (!self.serverURL.lastIndexOf("/") === self.serverURL.length) - self.serverURL += self.serverURL.substring(0, self.serverURL - 1); - - // make sure we have a listDirectory with navigation style list ending in / - if (self.modelNavigationStyle === "list" && !self.listDirectory && self.imagePath) - self.listDirectory = self.imagePath.substring(0, self.imagePath.lastIndexOf("/")); - if (!self.listDirectory.indexOf("/", self.listDirectory.length - 1) !== -1) - self.listDirectory += "/"; - - // use latest image if none given - if (!self.imagePath) - self.imagePath = self.listDirectory + "latest.png"; - - // privileged public methods - this.updateScene = function() { - if (self.serverURL && self.imagePath && !self.batchChanges) { - self.imgElem.src = self.serverURL + self.imagePath + urlSuffixForPose(self.pose); - if (self.enableMovies) { - // we are showing an image, activate movie controls - self.movieAddButton.domNode.style.display = ""; - self.movieDropDown.domNode.style.display = ""; - } - } - }; - - var urlSuffixForPose = function(pose) { - var queryString = - '?width=' + pose.width + - '&height=' + pose.height + - '&pitch=' + pose.pitch + - '&roll=' + pose.roll + - '&yaw=' + pose.yaw + - '&x=' + pose.x + - '&y=' + pose.y + - '&z=' + pose.z + - '&zoom=' + pose.zoom + - '&autorotate=' + (pose.autorotate ? '1' : '0'); - return queryString; - }; - - var moverRelativeTo = function(mover, container) { - var containerPos = absolutePosition(container); - return { - x: mover.x - containerPos.x, - y: mover.y - containerPos.y - }; - }; - - // see http://stackoverflow.com/questions/288699/get-the-position-of-a-div-span-tag - var absolutePosition = function(el) { - for (var lx=0, ly=0; el != null; lx += el.offsetLeft, ly += el.offsetTop, el = el.offsetParent); - return {x: lx,y: ly}; - }; - - this.populateMovieCodecs = function(server, selectElem) { - self.xhr.get({ - // The URL to request - url: server, - handleAs:"json", - headers:{"X-Requested-With":null}, - load: function(result) { - for (var codec in result.video) { - if (codec !== "mpeg1video" && - codec !== "mpeg2video" && - codec !== "mpeg4" && - codec !== "h264" && - codec !== "ayuv" && - codec !== "flashsv" && - codec !== "flashsv2" && - codec !== "flv" && - codec !== "rv40" && - codec !== "theora" && - codec !== "v210" && - codec !== "v308" && - codec !== "v408" && - codec !== "v410" && - codec !== "wmv3" && - codec !== "y41p" && - codec !== "yuv4") - continue; - //console.log(codec); - selectElem.options.push({ label: result.video[codec].longName, value: codec }); - if (codec === "mpeg4") - selectElem.options[selectElem.options.length - 1].selected = true; - } - } - }); - } - - this.setServer = function(serverURL) { - if (!serverURL || serverURL == self.serverURL) { - // nothing to do - return; - } - - self.serverURL = serverURL; - if (self.fileStandby) { self.fileStandby.show(); } - - self.xhr.get({ - // The URL to request - url: serverURL, - handleAs:"json", - headers:{"X-Requested-With":null}, - error: function(result) { - - if (self.browseButton) { self.browseButton.setAttribute('label', 'Browse'); } - if (self.fileStandby) { self.fileStandby.hide(); } - var allItems = self.fileStore.query(); - for (var i = 0; i < allItems.total; i++) { - self.fileStore.remove(allItems[i].id); - } - }, - load: function(result) { - self.localStorage.put("vrmlServer", self.serverURL, null); - if (self.browseButton) { self.browseButton.setAttribute('label', 'Refresh'); } - if (self.fileStandby) { self.fileStandby.hide(); } - - // empty store - var allItems = self.fileStore.query(); - for (var i = 0; i < allItems.total; i++) { - self.fileStore.remove(allItems[i].id); - } - - if (self.modelNavigationStyle === "tree") { - - // parse result as tree - (function fillstore(tree, parentId) { - // todo: respect navigation style - for (key in tree) { - if ('url' in tree[key]) { - self.fileStore.add({id:parentId+key, name:key, url:self.serverURL + tree[key].path, parent:parentId}); - } else { - self.fileStore.add({id:parentId+key, name:key, parent:parentId}); - fillstore(tree[key], parentId+key); - } - } - } (result.models, "root", "")); - } else if (self.modelNavigationStyle === "list") { - - // parse result as list - if (!self.listDirectory) - console.log("Requested modelNavigationStyle === list but provided no listDirectory"); - var dirs = self.listDirectory.split("/"); - var models = result.models; - for (var dir in dirs) { - if (!dirs[dir].length) - continue; - if (dirs[dir] in models) { - models = models[dirs[dir]]; - } else { - console.log("No " + dirs[dir] + " in " + models); - } - } - for (var key in models) { - var url = self.serverURL + models[key].path; - self.fileStore.add({id:key, value:url, label:key, name:key, url:url}); - } - self.fileListSelect.startup(); - } - - self.updateScene(); - } - }); - }; - - this.setModel = function(imagePath) { - self.imagePath = imagePath; - } - - this.setPose = function(imagePath, pose, serverURL) { - if (serverURL && serverURL != self.serverURL) { - self.refreshServer(serverURL); - } - self.imagePath = imagePath; - self.pose = pose; - - var pitch = (pose.pitch % (2 * 3.14159) + 0.5) * 100; - var roll = (pose.roll % (2 * 3.14159) + 0.5) * 100; - var yaw = (pose.yaw % (2 * 3.14159) + 0.5) * 100; - - var x = ((pose.x / 100) + 0.5) * 100; - var y = ((pose.y / 100) + 0.5) * 100; - - var zoom = (((pose.zoom - 1) / 3) + 0.5) * 100; - - self.pitchRollHandlerElem.parentNode.style.right = pitch + "%"; - self.pitchRollHandlerElem.parentNode.style.top = roll + "%"; - self.yawZoomHandlerElem.parentNode.style.right = yaw + "%"; - self.yawZoomHandlerElem.parentNode.style.top = zoom + "%"; - self.xyHandlerElem.parentNode.style.right = x + "%"; - self.xyHandlerElem.parentNode.style.top = y + "%"; - - self.updateScene(); - }; - - require(["dojo/dom-construct", - "dojo/_base/xhr", - "dojo/dom", - "dojo/on", - "dojox/storage", - "dojo/store/Memory", - "dojo/store/Observable", - "dijit/tree/ObjectStoreModel", - "dojo/data/ObjectStore", - "dijit/Tree", - "dijit/form/TextBox", - "dijit/form/Button", - "dojox/widget/Standby", - "dijit/form/DropDownButton", - "dijit/TooltipDialog", - "dojo/dnd/Moveable", - "dojo/ready", - "dojo/dnd/Source", - "dijit/form/HorizontalSlider", - "dijit/form/Select", - "dijit/form/NumberSpinner"], - function(domConst, - xhr, - dom, - on, - storage, - Memory, - Observable, - ObjectStoreModel, - ObjectStore, - Tree, - TextBox, - Button, - Standby, - DropDownButton, - TooltipDialog, - Moveable, - ready, - Source, - HorizontalSlider, - Selector, - NumberSpinner) { - - ready(function() { - - if (typeof(element) === 'string') { - element = dom.byId(element); - } - element.style.height = self.pose.height; - element.style.width = self.pose.width; - - self.element = element; - self.xhr = xhr; - self.localStorage = dojox.storage.manager.getProvider(); - self.localStorage.initialize(); - - // establish our dom - element.appendChild(domConst.toDom('\ - \ - \ - \ - \ - \ - \ - \ - \ -
\ -
\ - \ -
\ -
\ -
\ -
\ - \ - \ - \ - \ - \ -
\ -
\ - \ -
\ -
\ -
\ -
\ -
\ -
\ -
\ - \ - \ - \ - \ - \ -
\ -
\ -
\ -
\ -
\ -
\ - \ - \ - \ - \ - \ -
\ -
\ -
\ -
\ -
\ -
\ - \ - \ - \ - \ - \ -
\ -
\ -
\ -
\ - \ - \ - \ - \ -
\ -
\ -
\ -
\ -
\ - ')); - - // fetch special dom nodes for content - self.messageBox = dojo.query("div.messages", element)[0]; - self.imgElem = dojo.query("img.model", element)[0]; - - /** - * === POSE MANIPULATION AND RESET ==================== - */ - - self.resetButtonElem = dojo.query("button.resetButton", element)[0]; - self.progressElem = dojo.query("div.progress", element)[0]; - - self.pitchRollHandlerElem = dojo.query(".pitchRollHandler", element)[0]; - self.yawZoomHandlerElem = dojo.query(".yawZoomHandler", element)[0]; - self.xyHandlerElem = dojo.query(".xyHandler", element)[0]; - - self.pitchRollHandler = new Moveable(self.pitchRollHandlerElem); - self.pitchRollHandler.onMoveStop = function(mover) { - var handlerImg = dojo.query("img.pitchRollHandlerImg", mover.node)[0]; - var pitchLabel = dojo.query("div.pitchLabel", mover.node)[0]; - var rollLabel = dojo.query("div.rollLabel", mover.node)[0]; - - pitchLabel.innerHTML = ''; - rollLabel.innerHTML = ''; - - self.updateScene(); - }; - self.pitchRollHandler.onMoving = function(mover) { - // mover.node.style.backgroundColor = "rgba(255,255,255,0.5)"; - // mover.node.style.borderRadius = "5px"; - // mover.node.style.mozBorderRadius = "5px"; - // mover.node.style.webkitBorderRadius = "5px"; - var handlerImg = dojo.query(".pitchRollHandlerImg", mover.node)[0]; - var pitchLabel = dojo.query(".pitchLabel", mover.node)[0]; - var rollLabel = dojo.query(".rollLabel", mover.node)[0]; - var offset = moverRelativeTo(handlerImg, self.element); - - offset.x += 30; - offset.y += 20; - - self.xyHandlerElem.style.zIndex = 1; - self.yawZoomHandlerElem.style.zIndex = 1; - self.pitchRollHandlerElem.style.zIndex = 2; - - // self.pose.pitch = self.pose.pitch % (2 * 3.14159); - // self.pose.roll = self.pose.roll % (2 * 3.14159); - self.pose.roll = offset.x / self.pose.width - 0.5; - self.pose.pitch = offset.y / self.pose.height - 0.5; - self.pose.pitch *= -1; - self.pose.roll *= 2 * 3.14159; - self.pose.pitch *= 2 * 3.14159; - self.pose.roll = Math.ceil((self.pose.roll) * 10) / 10; - self.pose.pitch = Math.ceil((self.pose.pitch) * 10) / 10; - pitchLabel.innerHTML = 'Pitch:' + self.pose.pitch; - rollLabel.innerHTML = 'Roll:' + self.pose.roll; - }; - - self.yawZoomHandler = new Moveable(self.yawZoomHandlerElem); - self.yawZoomHandler.onMoveStop = function(mover) { - var handlerImg = dojo.query("img.yawZoomHandlerImg", mover.node)[0]; - var yawLabel = dojo.query("div.yawLabel", mover.node)[0]; - var zoomLabel = dojo.query("div.zoomLabel", mover.node)[0]; - - yawLabel.innerHTML = ''; - zoomLabel.innerHTML = ''; - - self.updateScene(); - }; - self.yawZoomHandler.onMoving = function(mover) { - var handlerImg = dojo.query("img.yawZoomHandlerImg", mover.node)[0]; - var yawLabel = dojo.query("div.yawLabel", mover.node)[0]; - var zoomLabel = dojo.query("div.zoomLabel", mover.node)[0]; - var offset = moverRelativeTo(handlerImg, self.element); - - offset.x += 7; - offset.y += 9; - - self.xyHandlerElem.style.zIndex = 1; - self.yawZoomHandlerElem.style.zIndex = 2; - self.pitchRollHandlerElem.style.zIndex = 1; - - // self.pose.pitch = self.pose.pitch % (2 * 3.14159); - // self.pose.roll = self.pose.roll % (2 * 3.14159); - self.pose.yaw = (self.pose.width - offset.x) / self.pose.width - 0.5; - self.pose.zoom = offset.y / self.pose.height - 0.5; - self.pose.yaw *= 2 * 3.14159; - self.pose.zoom = self.pose.zoom * 3 + 1; - self.pose.zoom = Math.ceil((self.pose.zoom) * 10) / 10; - self.pose.yaw = Math.ceil((self.pose.yaw) * 10) / 10; - yawLabel.innerHTML = 'Yaw:' + self.pose.yaw; - zoomLabel.innerHTML = 'Zoom:' + self.pose.zoom; - }; - - self.xyHandler = new Moveable(self.xyHandlerElem); - self.xyHandler.onMoveStop = function(mover) { - var handlerImg = dojo.query("img.xyHandlerImg", mover.node)[0]; - var xLabel = dojo.query("div.xLabel", mover.node)[0]; - var yLabel = dojo.query("div.yLabel", mover.node)[0]; - - xLabel.innerHTML = ''; - yLabel.innerHTML = ''; - - self.updateScene(); - }; - self.xyHandler.onMoving = function(mover) { - var handlerImg = dojo.query("img.xyHandlerImg", mover.node)[0]; - var xLabel = dojo.query("div.xLabel", mover.node)[0]; - var yLabel = dojo.query("div.yLabel", mover.node)[0]; - var offset = moverRelativeTo(handlerImg, self.element); - - offset.x += 3; - offset.y += 13; - - self.xyHandlerElem.style.zIndex = 2; - self.yawZoomHandlerElem.style.zIndex = 1; - self.pitchRollHandlerElem.style.zIndex = 1; - - self.pose.x = offset.x / self.pose.width - 0.5; - self.pose.y = offset.y / self.pose.height - 0.5; - self.pose.x *= 100; - self.pose.y *= 100; - self.pose.y = Math.ceil((self.pose.y) * 10) / 10; - self.pose.x = Math.ceil((self.pose.x) * 10) / 10; - xLabel.innerHTML = 'X:' + self.pose.x; - yLabel.innerHTML = 'Y:' + self.pose.y; - }; - - - /** - * === DRAG HANDLER ==================== - */ - if (self.enableDND) { - self.createAvatar = function(item, mode) { - if (mode == 'avatar') { - // create your avatar if you want - var avatar = dojo.create( 'div', { innerHTML: item.data }); - var avatarPose = dojo.clone(self.pose); - avatarPose.width=60; - avatarPose.height=60; - var avatarImgUrl = urlSuffixForPose(avatarPose); - avatar.innerHTML = ' '; - item.srcEcc = "VRMLViewer"; - item.iconPoseUrl = self.imagePath + avatarImgUrl; - item.imagePath = self.imagePath; - item.serverURL = self.serverURL; - item.pose = avatarPose; - return {node: avatar, data: item, type: item.type}; - } - var handler = dojo.create( 'div', { innerHTML: '' }); - return {node: handler, data: item, type: item.type}; - }; - - self.dragHandler = new Source(dojo.query("td.dragHandler", element)[0], {copyOnly: true, creator: self.createAvatar}); - self.dragHandler.insertNodes(false, [ { } ]); - } - - /** - * === FILE NAVIGATION ==================== - */ - - if (self.modelNavigationStyle !== 'none') { - if (self.modelNavigationStyle === 'list') { - - // setup fileStore - self.fileStore = new Observable(new Memory({ - data: [], - })); - - self.prevButtonElem = dojo.query("button.prevButton", element)[0]; - self.nextButtonElem = dojo.query("button.nextButton", element)[0]; - self.fileListElem = dojo.query("div.fileList", element)[0]; - - var os = new ObjectStore({ objectStore: self.fileStore }); - - self.fileListSelect = new Selector({ - store: os, - onChange: function(name) { - var item = self.fileStore.query({ id: name })[0]; - self.imagePath = self.listDirectory + item.name + ".png"; - self.updateScene(); - } - }, self.fileListElem); - - self.prevButton = new Button({ - label: "<", - onClick: function() { - var allItems = self.fileStore.query(); - var foundAt = 0; - for (var i = 0; i < allItems.total; i++) { - //console.log(self.serverURL + self.imagePath + " === " + allItems[i].url); - if (self.serverURL + self.imagePath === allItems[i].url) { - foundAt = i; - break; - } - } - - if (foundAt > 0) { - self.imagePath = self.listDirectory + allItems[foundAt - 1].name + ".png"; - self.fileListSelect.attr( 'value', allItems[foundAt - 1].id ); - if (self.serverURL + self.imagePath !== allItems[foundAt - 1].url) - console.log(self.serverURL + self.imagePath + " !== " + allItems[foundAt - 1].url); - self.updateScene(); - } - } - }, self.prevButtonElem); - - self.nextButton = new Button({ - label: ">", - onClick: function() { - var allItems = self.fileStore.query(); - var foundAt = 0; - for (var i = 0; i < allItems.total; i++) { - //console.log(self.serverURL + self.imagePath + " === " + allItems[i].url); - if (self.serverURL + self.imagePath === allItems[i].url) { - foundAt = i; - break - } - } - if (foundAt + 1 < allItems.total) { - self.imagePath = self.listDirectory + allItems[foundAt + 1].name + ".png"; - self.fileListSelect.attr( 'value', allItems[foundAt + 1].id ); - if (self.serverURL + self.imagePath !== allItems[foundAt + 1].url) - console.log(self.serverURL + self.imagePath + " !== " + allItems[foundAt + 1].url); - self.updateScene(); - } - } - }, self.nextButtonElem); - - } else { - - // setup fileStore - self.fileStore = new Observable(new Memory({ - data: [ { id: 'root', name:'3D Models'} ], - getChildren: function(object){ - return this.query({parent: object.id}); - } - })); - - self.fileTreeModel = new ObjectStoreModel({ - store: self.fileStore, - query: { id: "root" } - }); - - // setup actual tree dijit - self.fileList = new dijit.Tree({ - id: "fileList" + self.instanceId, - model: self.fileTreeModel, - persist: false, - showRoot: false, - style: "height: 300px;", - onClick: function(item){ - if ('url' in item) { - self.imagePath = item.url; - self.updateScene(); - } - }, - getIconClass: function(item, opened) { - return (!item || !('url' in item)) ? (opened ? "dijitFolderOpened" : "dijitFolderClosed") : "dijitLeaf"; - }, - getIconStyle: function(item, opened){ - if('url' in item) { - return { backgroundImage: "url('" + item.url + "?width=16&height=16')"}; - } - } - //return {backgroundImage: "url('" + item.url + "?width=16&height=16')"}; - }); - - self.filesDropDownElem = dojo.query("td.filesDropDown", element)[0]; - - self.serverBox = new TextBox({ - name: "Server", - value: self.serverURL, - style: "width: 65%", - - onKeyUp: function(e) { - if (self.browseButton) { - if (this.get("value") !== self.serverURL) { - self.browseButton.setAttribute('label', 'Browse'); - } else { - self.browseButton.setAttribute('label', 'Refresh'); - } - } - }, - - onKeyDown: function(e) { - var code = e.keyCode || e.which; - if( code === 13 ) { - e.preventDefault(); - self.refreshServer(this.get("value")); - return false; - } - }, - }); - - self.browseButton = new Button({ - label: "Browse", - onClick: function(){ - self.refreshServer(self.serverBox.get("value")); - } - }); - - self.filesDropDownContent = domConst.toDom('
'); - self.filesDropDownContent.appendChild(self.serverBox.domNode); - self.filesDropDownContent.appendChild(self.browseButton.domNode); - self.filesDropDownContent.appendChild(self.fileList.domNode); - - self.filesToolTip = new TooltipDialog({ content:self.filesDropDownContent, style:"max-height:320px"}); - self.filesDropDown = new DropDownButton({ label: "Files", dropDown: self.filesToolTip }); - self.filesDropDownElem.appendChild(self.filesDropDown.domNode); - - self.fileStandby = new Standby({target: self.filesDropDownContent }); - self.filesDropDownContent.appendChild(self.fileStandby.domNode); - } - } - - var savedServerURL = self.localStorage.get("vrmlServer"); - if (savedServerURL && !self.serverURL) { - self.serverURL = savedServerURL; - } - if (self.serverURL) { - self.refreshServer(self.serverURL); - } - /** - * === MOVIE DROPDOWN ==================== - */ - - if (self.enableMovies) { - self.movieDropDownElem = dojo.query("div.movieDropDown", element)[0]; - self.movieAddButtonElem = dojo.query("button.movieAddButton", element)[0]; - - self.movieDropDownContent = domConst.toDom( - '
\ -
\ -
\ -
' - ); - - self.movieFormatLengthRowElem = dojo.query("tr.movieFormatLengthRow", self.movieDropDownContent)[0]; - self.movieWidthHeightLengthRowElem = dojo.query("tr.movieWidthHeightLengthRow", self.movieDropDownContent)[0]; - self.movieDnDArea = dojo.query("div.dndArea", self.movieDropDownContent)[0]; - - self.createMovieThumb = function(item, mode) { - if (mode == 'avatar') { - // when dragged - var avatar = dojo.create( 'div', { innerHTML: item.data }); - var avatarPose = dojo.clone(self.pose); - avatarPose.width = 60; - avatarPose.height = 60; - var avatarImgUrl = urlSuffixForPose(avatarPose); - avatar.innerHTML = ' '; - item.srcEcc = "VRMLViewer"; - item.iconPoseUrl = self.imagePath + avatarImgUrl; - item.imagePath = self.imagePath; - item.serverURL = self.serverURL; - item.pose = avatarPose; - return {node: avatar, data: item, type: item.type}; - } else { - - // when added to list - var thumb = domConst.toDom("\ -
\ -
\ - \ - \ - \ - \ - \ - \ - \ - \ -
Frame:
Transition:
\ -
\ -
\ - "); - thumb = dojo.query("div", thumb)[0]; - - var thumbImgElem = dojo.query("img.movieThumb", thumb)[0]; - var removeImgElem = dojo.query("img.removeThumb", thumb)[0]; - var relFrameLengthElem = dojo.query("div.relFrameLength", thumb)[0]; - var relTransitionLengthElem = dojo.query("div.relTransitionLength", thumb)[0]; - var fillInSeriesElem = dojo.query("div.fillInSeries", thumb)[0]; - - item.getThisAndNeighborsFromDnD = function() { - var thisAndNeighbors = {}; - self.addToMovieHandler.forInItems(function(obj, key, ctx) { - if (obj.data === item) { - thisAndNeighbors.this = { key: key, obj: obj }; - } else { - thisAndNeighbors.before = { key: key, obj: obj }; - } - if (thisAndNeighbors.this) { - thisAndNeighbors.after = { key: key, obj: obj }; - return thisAndNeighbors; - } - }); - return thisAndNeighbors; - }; - - item.relFrameLengthSlider = new HorizontalSlider({ - value: 50, - title: "Relative Duration of Frame", - style: "width:150px;" - }, relFrameLengthElem); - - item.relTransitionLengthSlider = new HorizontalSlider({ - value: 100, - title: "Relative Duration of Transition", - style: "width:150px;" - }, relTransitionLengthElem); - - removeImgElem.onclick = function() { - var thisItem = item.getThisAndNeighborsFromDnD(); - if (thisItem.this) { - // haha - what a mess! - self.addToMovieHandler.selectNone(); - self.addToMovieHandler.selection[thisItem.this.key] = thisItem.this.obj; - self.addToMovieHandler.deleteSelectedNodes(); - } - // disable create button if this was the last one - if (!thisItem.after || !thisItem.before) { - self.movieCreateButton.setAttribute('disabled', true); - } - } - - item.fillInSeriesButton = new Button({ - label: "Insert Series", - style: "display: none;", - onClick: function(){ - alert("foo"); - } - }, fillInSeriesElem); - - removeImgElem.src = self.resRoot + "img/close.png"; - - var thumbPose = dojo.clone(self.pose); - thumbPose.width = self.pose.width / 10; - thumbPose.height = self.pose.height / 10; - var thumbImgUrl = urlSuffixForPose(thumbPose); - - thumbImgElem.src = self.imagePath + thumbImgUrl; - // removeImgElem.src = self.resRoot + 'img/close.png'; - - item.srcEcc = "VRMLViewer"; - item.iconPoseUrl = self.imagePath + thumbImgUrl; - item.imagePath = self.imagePath; - item.serverURL = self.serverURL; - item.pose = thumbPose; - - return {node: thumb, data: item, type: item.type}; - } - }; - - self.addToMovieHandler = new Source(self.movieDnDArea, {copyOnly: true, creator: self.createMovieThumb}); - - self.movieFormatSelection = new Selector({ - name: "movieFormat", - style: "width: 320px", - options: [] - }); - self.populateMovieCodecs("http://" + self.serverURL + '/movie/codecs', self.movieFormatSelection); - - self.movieFormatLengthRowElem.appendChild(dojo.create('td', { innerHTML: 'Format:'} )); - self.movieFormatLengthRowElem.appendChild(dojo.create('td', { colspan: "2"})); - self.movieFormatLengthRowElem.lastChild.appendChild(self.movieFormatSelection.domNode); - - self.movieHeightSpinner = new NumberSpinner({ - value: 400, - smallDelta: 1, - style: "width: 60px", - constraints: { min:40, places:0 }, - }); - - self.movieWidthSpinner = new NumberSpinner({ - value: 600, - smallDelta: 1, - style: "width: 60px", - constraints: { min:40, places:0 }, - }); - - self.movieCreateButton = new Button({ - label: "Create", - disabled: true, - onClick: function(){ - - var form = document.createElement("form"); - - form.setAttribute("method", "post"); - form.setAttribute("action", self.serverURL + "/movie"); - - var submitData = {}; - submitData.frames = []; - submitData.movieLength = self.movieDurationSpinner.value; - submitData.format = self.movieFormatSelection.value; - submitData.width = self.movieWidthSpinner.value; - submitData.height = self.movieHeightSpinner.value; - - self.addToMovieHandler.forInItems(function(obj, key, ctx) { - var jsonData = { - iconPoseUrl: obj.data.iconPoseUrl, - imagePath: obj.data.imagePath, - serverURL: obj.data.serverURL, - pose: obj.data.pose, - relFrameLength: obj.data.relFrameLengthSlider.value, - relTransitionLength: obj.data.relTransitionLengthSlider.value, - } - submitData.frames.push(jsonData); - }); - - var hiddenField = document.createElement("input"); - hiddenField.setAttribute("type", "hidden"); - hiddenField.setAttribute("name", "data"); - hiddenField.setAttribute("value", JSON.stringify(submitData)); - - form.appendChild(hiddenField); - - // this will not save the returned binary file - // self.xhr.post({ - // form: form, - // load: function(data){ - // alert("asd"); - // } - // }); - - document.body.appendChild(form); - form.submit(); - document.body.removeChild(form); - } - }); - - self.movieDurationSpinner = new NumberSpinner({ - value: 10, - smallDelta: 1, - style: "width: 40px", - constraints: { min:0, places:0 }, - }); - - // append format duration cell - self.movieWidthHeightLengthRowElem.appendChild(dojo.create('td', { innerHTML: 'Size:'} )); - var movieDimensionCell = dojo.create('td'); - movieDimensionCell.appendChild(self.movieWidthSpinner.domNode); - movieDimensionCell.appendChild(dojo.create('span', { innerHTML: "x"} )); - movieDimensionCell.appendChild(self.movieHeightSpinner.domNode); - movieDimensionCell.appendChild(self.movieDurationSpinner.domNode); - movieDimensionCell.appendChild(dojo.create('span', { innerHTML: "sec"} )); - self.movieWidthHeightLengthRowElem.appendChild(movieDimensionCell); - - self.movieWidthHeightLengthRowElem.appendChild(dojo.create('td', { align: "right"})); - self.movieWidthHeightLengthRowElem.lastChild.appendChild(self.movieCreateButton.domNode); - - - self.movieToolTip = new TooltipDialog({ content:self.movieDropDownContent }); - self.movieDropDown = new DropDownButton({ - label: "Movie", - style: "display: none;", - dropDown: self.movieToolTip }); - self.movieDropDownElem.appendChild(self.movieDropDown.domNode); - - self.movieAddButton = new Button({ - label: "+", - style: "margin-left: -10px; display: none;", - onClick: function(){ - if (self.movieFormatSelection.options.length == 0) { - self.populateMovieCodecs(self.serverURL + '/movie/codecs', self.movieFormatSelection); - } - // we could pass item.data here to creator - self.addToMovieHandler.insertNodes(false, [ { } ]); - self.movieCreateButton.setAttribute('disabled', false); - - } - }, self.movieAddButtonElem); - } else { - // remove movie controls - var movieControls = dojo.query("td.movieControls", element)[0]; - movieControls.parentNode.removeChild(movieControls); - } - - self.resetButton = new Button({ - label: "Reset", - onClick: function(){ - self.pose.x = 0; - self.pose.y = 0; - self.pose.pitch = 0; - self.pose.roll = 0; - self.pose.yaw = 0; - self.pose.zoom = 1; - - self.xyHandler.node.style.left = 0; - self.xyHandler.node.style.top = 0; - self.pitchRollHandler.node.style.left = 0; - self.pitchRollHandler.node.style.top = 0; - self.yawZoomHandler.node.style.left = 0; - self.yawZoomHandler.node.style.top = 0; - - self.updateScene(); - } - }, self.resetButtonElem); - - // do we have parameters for the initial pose? - if(self.params && self.params.pose) - self.setPose(self.params.imagePath, self.params.pose, self.params.serverURL); - - }); - }); - - -} diff --git a/apps/samples/vrml/vrml-server.caching.scxml b/apps/samples/vrml/vrml-server.caching.scxml deleted file mode 100644 index 2d935cd..0000000 --- a/apps/samples/vrml/vrml-server.caching.scxml +++ /dev/null @@ -1,416 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - -
-
-
- - - - - - - -
-
-
- - - - - - - -
-
-
- - - - - - - - -
-
-
- - - - - - - - -
-
-
- - - - - - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/apps/samples/vrml/vrml-server.pre-osgjs.scxml b/apps/samples/vrml/vrml-server.pre-osgjs.scxml deleted file mode 100644 index a51c5f3..0000000 --- a/apps/samples/vrml/vrml-server.pre-osgjs.scxml +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - -
-
-
- - - - - - - -
-
-
- - - - - - - - -
-
-
- - - - - - - - -
-
-
- - - - - - -
-
-
- - - - - - - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/apps/samples/vrml/vrml-server.scxml b/apps/samples/vrml/vrml-server.scxml deleted file mode 100644 index 529a469..0000000 --- a/apps/samples/vrml/vrml-server.scxml +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - - - - - -
-
-
- - - - - - - - -
-
-
- - - - - - - - -
-
-
- - - - - - - - - - - - - -
-
-
- - - - - - - -
-
- - - - - - - - diff --git a/apps/samples/websockets/websockets.html b/apps/samples/websockets/websockets.html deleted file mode 100644 index 88e4def..0000000 --- a/apps/samples/websockets/websockets.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - WebSocket Test - - - - -

- WebSocket Test -

-
- - diff --git a/apps/samples/websockets/websockets.scxml b/apps/samples/websockets/websockets.scxml deleted file mode 100644 index 25fdb7a..0000000 --- a/apps/samples/websockets/websockets.scxml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -
- \ No newline at end of file diff --git a/apps/uscxml-analyze.cpp b/apps/uscxml-analyze.cpp deleted file mode 100644 index 33a536a..0000000 --- a/apps/uscxml-analyze.cpp +++ /dev/null @@ -1,239 +0,0 @@ -#include "uscxml/config.h" -#include "uscxml/Interpreter.h" -#include "uscxml/debug/Complexity.h" -#include "uscxml/transform/ChartToFSM.h" -#include "uscxml/dom/DOMUtils.h" -#include -#include -#include - -#include "uscxml/Factory.h" -#include "uscxml/server/HTTPServer.h" -#include "getopt.h" - -#ifdef HAS_SIGNAL_H -#include -#endif - -#ifdef HAS_EXECINFO_H -#include -#endif - -#ifdef HAS_DLFCN_H -#include -#endif - -#define ANNOTATE(envKey, annotationParam) \ -envVarIsTrue(envKey) || std::find(annotations.begin(), annotations.end(), annotationParam) != annotations.end() - -void printUsageAndExit(const char* progName) { - // remove path from program name - std::string progStr(progName); - if (progStr.find_last_of(PATH_SEPERATOR) != std::string::npos) { - progStr = progStr.substr(progStr.find_last_of(PATH_SEPERATOR) + 1, progStr.length() - (progStr.find_last_of(PATH_SEPERATOR) + 1)); - } - - printf("%s version " USCXML_VERSION " (" CMAKE_BUILD_TYPE " build - " CMAKE_COMPILER_STRING ")\n", progStr.c_str()); - printf("Usage\n"); - printf("\t%s", progStr.c_str()); - printf(" [-a {ASPECTS}] [-lN]"); -#ifdef BUILD_AS_PLUGINS - printf(" [-p pluginPath]"); -#endif - printf(" [URL]"); - printf("\n"); - printf("Options\n"); - printf("\t-a {ASPECTS} : analyze with regard to comma seperated aspects\n"); - printf("\t 'issues' - find common pitfalls and syntactical errors\n"); - printf("\t 'metrics' - print metrics about the state-chart's complexity\n"); - printf("\t-lN : Set loglevel to N\n"); - printf("\n"); - exit(1); -} - -int main(int argc, char** argv) { - using namespace uscxml; - - std::string pluginPath; - std::string inputFile; - std::list aspects; - -#if defined(HAS_SIGNAL_H) && !defined(WIN32) - signal(SIGPIPE, SIG_IGN); -#endif - - // setup logging - google::LogToStderr(); - google::InitGoogleLogging(argv[0]); - - optind = 0; - opterr = 0; - - struct option longOptions[] = { - {"help", required_argument, 0, 'p'}, - {"plugin-path", required_argument, 0, 'p'}, - {"aspect", optional_argument, 0, 'a'}, - {"loglevel", required_argument, 0, 'l'}, - {0, 0, 0, 0} - }; - - // parse global options - int optionInd = 0; - int option; - for (;;) { - option = getopt_long_only(argc, argv, "a:p:l:h", longOptions, &optionInd); - if (option == -1) { - break; - } - switch(option) { - // cases without short option - case 0: { - break; - } - // cases with short-hand options - case 'p': - pluginPath = optarg; - break; - case 'a': - aspects = tokenize(optarg, ','); - break; - case 'l': - break; - case 'h': - case '?': { - printUsageAndExit(argv[0]); - break; - } - default: - break; - } - } - - if (optind < argc) { - inputFile = argv[optind]; - } - - // register plugins - if (pluginPath.length() > 0) { - Factory::setDefaultPluginPath(pluginPath); - } - - // start HTTP server - HTTPServer::getInstance(31444, 31445, NULL); - - Interpreter interpreter; - try { - if (inputFile.size() == 0 || inputFile == "-") { - LOG(INFO) << "Reading SCXML from STDIN"; - std::stringstream ss; - std::string line; - while (std::getline(std::cin, line)) { - ss << line; - } - URL tmp("anonymous.scxml"); - tmp.toAbsoluteCwd(); - interpreter = Interpreter::fromXML(ss.str(), tmp); - } else { - interpreter = Interpreter::fromURL(inputFile); - } - if (!interpreter) { - LOG(ERROR) << "Cannot create interpreter from " << inputFile; - exit(EXIT_FAILURE); - } - - // analyze here - if (aspects.size() == 0 || std::find(aspects.begin(), aspects.end(), "issues") != aspects.end()) { - std::list issues = interpreter.validate(); - for (std::list::iterator issueIter = issues.begin(); issueIter != issues.end(); issueIter++) { - std::cout << *issueIter << std::endl; - } - } - - if (aspects.size() == 0 || std::find(aspects.begin(), aspects.end(), "metrics") != aspects.end()) { - - Arabica::XPath::NodeSet states = interpreter.getNodeSetForXPath("//" + interpreter.getNameSpaceInfo().xpathPrefix + "state"); - Arabica::XPath::NodeSet final = interpreter.getNodeSetForXPath("//" + interpreter.getNameSpaceInfo().xpathPrefix + "final"); - Arabica::XPath::NodeSet parallels = interpreter.getNodeSetForXPath("//" + interpreter.getNameSpaceInfo().xpathPrefix + "parallel"); - Arabica::XPath::NodeSet shallowHistories = interpreter.getNodeSetForXPath("//" + interpreter.getNameSpaceInfo().xpathPrefix + "history[@type='shallow']"); - shallowHistories.push_back(interpreter.getNodeSetForXPath("//" + interpreter.getNameSpaceInfo().xpathPrefix + "history[not(@type)]")); - Arabica::XPath::NodeSet deepHistories = interpreter.getNodeSetForXPath("//" + interpreter.getNameSpaceInfo().xpathPrefix + "history[@type='deep']"); - Arabica::XPath::NodeSet transitions = interpreter.getNodeSetForXPath("//" + interpreter.getNameSpaceInfo().xpathPrefix + "transition"); - - std::cout << "### Number of XML elements" << std::endl; - std::cout << "# + + + " << std::endl; - std::cout << "nr_states: " << (states.size() + final.size() + parallels.size() + shallowHistories.size() + deepHistories.size()) << std::endl; - std::cout << "# " << std::endl; - std::cout << "nr_parallel: " << parallels.size() << std::endl; - std::cout << "# " << std::endl; - std::cout << "nr_hist_flat: " << shallowHistories.size() << std::endl; - std::cout << "# " << std::endl; - std::cout << "nr_hist_deep: " << deepHistories.size() << std::endl; - std::cout << "# " << std::endl; - std::cout << "nr_trans: " << transitions.size() << std::endl; - std::cout << "#" << std::endl; - - - std::cout << "### Transition Histogram: number of transitions, number of active configurations" << std::endl; - - size_t numberOfLegalConfs = 0; - size_t lastBin = 0; - std::cout << "th: "; - std::string seperator = ""; - std::map histogram = Complexity::getTransitionHistogramm(interpreter.getDocument().getDocumentElement()); - for (std::map::iterator binIter = histogram.begin(); binIter != histogram.end(); binIter++) { - while (binIter->first > lastBin) { - lastBin++; - std::cout << seperator << "0"; - seperator = ", "; - } - std::cout << seperator << binIter->second; - seperator = ", "; - numberOfLegalConfs += binIter->second; - lastBin = binIter->first + 1; - } - std::cout << std::endl << "#" << std::endl; - - - std::stringstream transPowerSetSS; - std::string transPowerSetSeperator = ""; - for (std::map::reverse_iterator binIter = histogram.rbegin(); binIter != histogram.rend(); binIter++) { - transPowerSetSS << transPowerSetSeperator << binIter->second << " * " << "2**" << binIter->first; - transPowerSetSeperator = " + "; - } - std::cout << "# Sum of Powersets:" << std::endl; - std::cout << "ps_sum: " << transPowerSetSS.str() << std::endl; - std::cout << "#" << std::endl; - - std::cout << "### Upper bounds:" << std::endl; - std::cout << "# \tActive configurations: " << std::endl; - std::cout << "up_ac: " << numberOfLegalConfs << std::endl; - std::cout << "# \tGlobal configurations: " << std::endl; - std::cout << "up_gc: " << Complexity::stateMachineComplexity(interpreter) << std::endl; - - std::cout << "# \tGlobal configurations (no history): " << std::endl; - std::cout << "up_gcnh: " << Complexity::stateMachineComplexity(interpreter, uscxml::Complexity::IGNORE_HISTORY) << std::endl; - - std::cout << "# \tGlobal configurations (no nested data): " << std::endl; - std::cout << "up_gcnd: " << Complexity::stateMachineComplexity(interpreter, uscxml::Complexity::IGNORE_NESTED_DATA) << std::endl; - - std::cout << "# \tGlobal configurations (no unreachable): " << std::endl; - std::cout << "up_gcnu: " << Complexity::stateMachineComplexity(interpreter, uscxml::Complexity::IGNORE_UNREACHABLE) << std::endl; - - std::cout << "# \tGlobal configurations (no nested data, no history): " << std::endl; - std::cout << "up_gcnhd: " << Complexity::stateMachineComplexity(interpreter, uscxml::Complexity::IGNORE_HISTORY | uscxml::Complexity::IGNORE_NESTED_DATA) << std::endl; - - std::cout << "# \tGlobal configurations (no history, no unreachable): " << std::endl; - std::cout << "up_gcnhu: " << Complexity::stateMachineComplexity(interpreter, uscxml::Complexity::IGNORE_HISTORY | uscxml::Complexity::IGNORE_UNREACHABLE) << std::endl; - - std::cout << "# \tGlobal configurations (no nested data, no unreachable): " << std::endl; - std::cout << "up_gcndu: " << Complexity::stateMachineComplexity(interpreter, uscxml::Complexity::IGNORE_NESTED_DATA | uscxml::Complexity::IGNORE_UNREACHABLE) << std::endl; - - std::cout << "# \tGlobal configurations (no nested data, no history, no unreachable): " << std::endl; - std::cout << "up_gcnhdu: " << Complexity::stateMachineComplexity(interpreter, uscxml::Complexity::IGNORE_HISTORY | uscxml::Complexity::IGNORE_NESTED_DATA | uscxml::Complexity::IGNORE_UNREACHABLE) << std::endl; - } - } catch (Event e) { - std::cout << e << std::endl; - } - - return EXIT_SUCCESS; -} \ No newline at end of file diff --git a/apps/uscxml-browser.cpp b/apps/uscxml-browser.cpp index f223cef..cf666c9 100644 --- a/apps/uscxml-browser.cpp +++ b/apps/uscxml-browser.cpp @@ -1,94 +1,12 @@ #include "uscxml/config.h" #include "uscxml/Interpreter.h" -#include "uscxml/dom/DOMUtils.h" +#include "uscxml/util/DOM.h" -#ifndef BUILD_MINIMAL -# include "uscxml/debug/DebuggerServlet.h" -#endif -#include +#include -#include "uscxml/Factory.h" +#include "uscxml/plugins/Factory.h" #include "uscxml/server/HTTPServer.h" -#ifdef HAS_SIGNAL_H -#include -#endif - -#ifdef HAS_EXECINFO_H -#include -#endif - -#ifdef HAS_DLFCN_H -#include -#endif - -#ifdef CMAKE_BUILD_TYPE_DEBUG - -#ifdef HAS_EXECINFO_H -void printBacktrace(void** array, int size) { - char** messages = backtrace_symbols(array, size); - for (size_t i = 0; i < size && messages != NULL; ++i) { - std::cerr << "\t" << messages[i] << std::endl; - } - std::cerr << std::endl; - free(messages); -} - -#ifdef HAS_DLFCN_H -// see https://gist.github.com/nkuln/2020860 -typedef void (*cxa_throw_type)(void *, void *, void (*) (void *)); -cxa_throw_type orig_cxa_throw = 0; - -void load_orig_throw_code() { - orig_cxa_throw = (cxa_throw_type) dlsym(RTLD_NEXT, "__cxa_throw"); -} - -extern "C" -CXA_THROW_SIGNATURE { - std::cerr << __FUNCTION__ << " will throw exception from " << std::endl; - if (orig_cxa_throw == 0) - load_orig_throw_code(); - - void *array[50]; - size_t size = backtrace(array, 50); - printBacktrace(array, size); - orig_cxa_throw(thrown_exception, pvtinfo, dest); -} -#endif -#endif - - -// see http://stackoverflow.com/questions/2443135/how-do-i-find-where-an-exception-was-thrown-in-c -void customTerminate() { - static bool tried_throw = false; - try { - // try once to re-throw currently active exception - if (!tried_throw) { - tried_throw = true; - throw; - } else { - tried_throw = false; - } - } catch (const std::exception &e) { - std::cerr << __FUNCTION__ << " caught unhandled exception. what(): " - << e.what() << std::endl; - } catch (const uscxml::Event &e) { - std::cerr << __FUNCTION__ << " caught unhandled exception. Event: " - << e << std::endl; - } catch (...) { - std::cerr << __FUNCTION__ << " caught unknown/unhandled exception." - << std::endl; - } - -#ifdef HAS_EXECINFO_H - void * array[50]; - int size = backtrace(array, 50); - - printBacktrace(array, size); -#endif - abort(); -} -#endif int main(int argc, char** argv) { using namespace uscxml; @@ -97,16 +15,8 @@ int main(int argc, char** argv) { signal(SIGPIPE, SIG_IGN); #endif -#ifdef CMAKE_BUILD_TYPE_DEBUG - std::set_terminate(customTerminate); -#endif - InterpreterOptions options = InterpreterOptions::fromCmdLine(argc, argv); - // setup logging - google::LogToStderr(); - google::InitGoogleLogging(argv[0]); - if (options.pluginPath.length() > 0) { Factory::setDefaultPluginPath(options.pluginPath); } @@ -135,15 +45,6 @@ int main(int argc, char** argv) { } HTTPServer::getInstance(options.httpPort, options.wsPort, sslConf); -#ifndef BUILD_MINIMAL - DebuggerServlet* debugger; - if (options.withDebugger) { - debugger = new DebuggerServlet(); - debugger->copyToInvokers(true); - HTTPServer::getInstance()->registerServlet("/debug", debugger); - } -#endif - // instantiate and configure interpreters std::list interpreters; for(int i = 0; i < options.interpreters.size(); i++) { @@ -157,7 +58,7 @@ int main(int argc, char** argv) { Interpreter interpreter = Interpreter::fromURL(documentURL); if (interpreter) { - if (options.checking) { + if (options.validate) { std::list issues = interpreter.validate(); for (std::list::iterator issueIter = issues.begin(); issueIter != issues.end(); issueIter++) { std::cout << *issueIter << std::endl; @@ -168,22 +69,12 @@ int main(int argc, char** argv) { } - interpreter.setCmdLineOptions(options.additionalParameters); - interpreter.setCmdLineOptions(currOptions->additionalParameters); - interpreter.setCapabilities(options.getCapabilities()); - if (options.verbose) { - StateTransitionMonitor* vm = new StateTransitionMonitor(); + StateTransitionMonitor* vm = new StateTransitionMonitor(interpreter); vm->copyToInvokers(true); - interpreter.addMonitor(vm); + interpreter.setMonitor(vm); } -#ifndef BUILD_MINIMAL - if (options.withDebugger) { - interpreter.addMonitor(debugger); - } -#endif - interpreters.push_back(interpreter); } else { @@ -194,35 +85,19 @@ int main(int argc, char** argv) { } } - // start interpreters + // run interpreters try { std::list::iterator interpreterIter = interpreters.begin(); - while(interpreterIter != interpreters.end()) { - interpreterIter->start(); - interpreterIter++; - } - - bool stillRunning = true; - // call from main thread for UI events - while(interpreters.size() > 0) { - interpreterIter = interpreters.begin(); - while(interpreterIter != interpreters.end()) { - stillRunning = interpreterIter->runOnMainThread(25); - if (!stillRunning) { - interpreters.erase(interpreterIter++); - } else { - interpreterIter++; - } - } - } - -#ifndef BUILD_MINIMAL - if (options.withDebugger) { - // idle and wait for CTRL+C or debugging events - while(true) - tthread::this_thread::sleep_for(tthread::chrono::seconds(1)); - } -#endif + while (interpreters.size() > 0) { + while(interpreterIter != interpreters.end()) { + InterpreterState state = interpreterIter->step(); + if (state == USCXML_FINISHED) { + interpreterIter = interpreters.erase(interpreterIter); + } else { + interpreterIter++; + } + } + } } catch (Event e) { std::cout << e << std::endl; } diff --git a/apps/uscxml-browser.vbs b/apps/uscxml-browser.vbs deleted file mode 100644 index fc8ea9a..0000000 --- a/apps/uscxml-browser.vbs +++ /dev/null @@ -1,177 +0,0 @@ -' -' Description: VBScript/VBS open file dialog -' Compatible with most Windows platforms -' Author: wangye -' Website: http://wangye.org -' -' dir is the initial directory; if no directory is -' specified "Desktop" is used. -' filter is the file type filter; format "File type description|*.ext" -' -Public Function GetOpenFileName(dir, filter) - Const msoFileDialogFilePicker = 3 - - If VarType(dir) <> vbString Or dir="" Then - dir = CreateObject( "WScript.Shell" ).SpecialFolders( "Desktop" ) - End If - - If VarType(filter) <> vbString Or filter="" Then - filter = "All files|*.*" - End If - - Dim i,j, objDialog, TryObjectNames - TryObjectNames = Array( _ - "UserAccounts.CommonDialog", _ - "MSComDlg.CommonDialog", _ - "MSComDlg.CommonDialog.1", _ - "Word.Application", _ - "SAFRCFileDlg.FileOpen", _ - "InternetExplorer.Application" _ - ) - - On Error Resume Next - Err.Clear - - For i=0 To UBound(TryObjectNames) - Set objDialog = WSH.CreateObject(TryObjectNames(i)) - If Err.Number<>0 Then - Err.Clear - Else - Exit For - End If - Next - - Select Case i - Case 0,1,2 - ' 0. UserAccounts.CommonDialog XP Only. - ' 1.2. MSComDlg.CommonDialog MSCOMDLG32.OCX must registered. - If i=0 Then - objDialog.InitialDir = dir - Else - objDialog.InitDir = dir - End If - objDialog.Filter = filter - If objDialog.ShowOpen Then - GetOpenFileName = objDialog.FileName - End If - Case 3 - ' 3. Word.Application Microsoft Office must installed. - objDialog.Visible = False - Dim objOpenDialog, filtersInArray - filtersInArray = Split(filter, "|") - Set objOpenDialog = _ - objDialog.Application.FileDialog( _ - msoFileDialogFilePicker) - With objOpenDialog - .Title = "Open File(s):" - .AllowMultiSelect = False - .InitialFileName = dir - .Filters.Clear - For j=0 To UBound(filtersInArray) Step 2 - .Filters.Add filtersInArray(j), _ - filtersInArray(j+1), 1 - Next - If .Show And .SelectedItems.Count>0 Then - GetOpenFileName = .SelectedItems(1) - End If - End With - objDialog.Visible = True - objDialog.Quit - Set objOpenDialog = Nothing - Case 4 - ' 4. SAFRCFileDlg.FileOpen xp 2003 only - ' See http://www.robvanderwoude.com/vbstech_ui_fileopen.php - If objDialog.OpenFileOpenDlg Then - GetOpenFileName = objDialog.FileName - End If - Case 5 - - Dim IEVersion,IEMajorVersion, hasCompleted - hasCompleted = False - Dim shell - Set shell = CreateObject("WScript.Shell") - ' 下面获取IE版本 - IEVersion = shell.RegRead( _ - "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version") - If InStr(IEVersion,".")>0 Then - ' 获取主版本号 - IEMajorVersion = CInt(Left(IEVersion, InStr(IEVersion,".")-1)) - If IEMajorVersion>7 Then - ' 如果版本号大于7,也就是大于IE7,则采取MSHTA方案 - ' Bypasses c:\fakepath\file.txt problem - ' http://pastebin.com/txVgnLBV - Dim fso - Set fso = CreateObject("Scripting.FileSystemObject") - - Dim tempFolder : Set tempFolder = fso.GetSpecialFolder(2) - Dim tempName : tempName = fso.GetTempName() - Dim tempFile : Set tempFile = tempFolder.CreateTextFile(tempName & ".hta") - Dim tempBaseName - tempBaseName = tempFolder & "\" & tempName - tempFile.Write _ - "" & _ - " " & _ - " Browse" & _ - " " & _ - " " & _ - " " & _ - " " & _ - " " & _ - "" - tempFile.Close - Set tempFile = Nothing - Set tempFolder = Nothing - shell.Run tempBaseName & ".hta", 1, True - Set tempFile = fso.OpenTextFile(tempBaseName & ".txt", 1) - GetOpenFileName = tempFile.ReadLine - tempFile.Close - fso.DeleteFile tempBaseName & ".hta" - fso.DeleteFile tempBaseName & ".txt" - Set tempFile = Nothing - Set fso = Nothing - hasCompleted = True ' 标记为已完成 - End If - End If - If Not hasCompleted Then - ' 5. InternetExplorer.Application IE must installed - objDialog.Navigate "about:blank" - Dim objBody, objFileDialog - Set objBody = _ - objDialog.document.getElementsByTagName("body")(0) - objBody.innerHTML = "" - while objDialog.Busy Or objDialog.ReadyState <> 4 - WScript.sleep 10 - Wend - Set objFileDialog = objDialog.document.all.fileDialog - objFileDialog.click - GetOpenFileName = objFileDialog.value - End If - objDialog.Quit - Set objFileDialog = Nothing - Set objBody = Nothing - Set shell = Nothing - Case Else - ' Sorry I cannot do that! - End Select - - Set objDialog = Nothing -End Function - -scxmlFile = GetOpenFileName(CreateObject("WScript.Shell").SpecialFolders("MyDocuments"), "All Files|*.*|SCXML Files|*.scxml") - -if scxmlFile <> "" then - set wshShell = WScript.CreateObject("WScript.Shell") - set objFs = WScript.CreateObject("Scripting.FileSystemObject") - wshShell.CurrentDirectory = objFs.GetParentFolderName(Wscript.ScriptFullName) -' WScript.Echo scxmlFile - wshShell.Run("mmi-browser.exe """ & scxmlFile & """") -end if \ No newline at end of file diff --git a/apps/uscxml-debugger.html b/apps/uscxml-debugger.html deleted file mode 100644 index 3aece02..0000000 --- a/apps/uscxml-debugger.html +++ /dev/null @@ -1,2836 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - diff --git a/apps/uscxml-dot.cpp b/apps/uscxml-dot.cpp deleted file mode 100644 index 0fcd548..0000000 --- a/apps/uscxml-dot.cpp +++ /dev/null @@ -1,135 +0,0 @@ -#include "uscxml/config.h" -#include "uscxml/Interpreter.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/debug/SCXMLDotWriter.h" -#include -#include "getopt.h" - -#include "uscxml/Factory.h" -#include - - -using namespace uscxml; - -void printUsageAndExit(const char* progName) { - // remove path from program name - std::string progStr(progName); - if (progStr.find_last_of(PATH_SEPERATOR) != std::string::npos) { - progStr = progStr.substr(progStr.find_last_of(PATH_SEPERATOR) + 1, progStr.length() - (progStr.find_last_of(PATH_SEPERATOR) + 1)); - } - - printf("%s version " USCXML_VERSION " (" CMAKE_BUILD_TYPE " build - " CMAKE_COMPILER_STRING ")\n", progStr.c_str()); - printf("Usage\n"); - printf("\t%s", progStr.c_str()); - printf(" [-eTYPE] [-dN] [-tN] URL"); - printf(" [[-dN] [-tN] [-eTYPE] state_id1] .. [[-dN] [-tN] [-eTYPE] state_idM]"); - printf("\n"); - printf("Options\n"); - printf("\tURL : URL of SCXML document\n"); - printf("\t-e TYPE : type of edges to use:\n"); - printf("\t 'target' - aggregate per target node (default)\n"); - printf("\t 'event' - aggregate per event name\n"); - printf("\t 'transition' no aggregation, display each transition\n"); - printf("\t-d : depth below anchor node (INF per default)\n"); - printf("\t-t : transition depth below anchor (INF per default)\n"); - printf("\tstate_id : anchor node state id (topmost scxml element per default)\n"); - printf("\n"); - exit(1); -} - -int currOpt = 1; - -int main(int argc, char** argv) { - - // setup logging - google::LogToStderr(); - google::InitGoogleLogging(argv[0]); - - - if (argc < 2) - printUsageAndExit(argv[0]); - - std::list stateAnchors; - SCXMLDotWriter::StateAnchor rootAnchor; - SCXMLDotWriter::StateAnchor currAnchor; - - int option; - while ((option = getopt(argc, argv, "d:t:e:")) != -1) { - switch(option) { - case 'd': - rootAnchor.childDepth = strTo(optarg); - break; - case 't': - rootAnchor.transDepth = strTo(optarg); - break; - case 'e': { - std::string edgeType(optarg); - if (edgeType == "target") { - rootAnchor.type = SCXMLDotWriter::PORT_TARGET; - } else if (edgeType == "event") { - rootAnchor.type = SCXMLDotWriter::PORT_EVENT; - } else if (edgeType == "transition") { - rootAnchor.type = SCXMLDotWriter::PORT_TRANSITION; - } else { - printUsageAndExit(argv[0]); - } - break; - } - default: - break; - } - } - - if (rootAnchor) - stateAnchors.push_back(rootAnchor); - - try { - // current option has to be the interpreter's name - URL inputFile(argv[optind]); - Interpreter interpreter = Interpreter::fromURL(inputFile.asString()); - optind++; - - while(optind < argc) { - // are - while ((option = getopt(argc, argv, "d:t:")) != -1) { - switch(option) { - case 'd': - currAnchor.childDepth = strTo(optarg); - break; - case 't': - currAnchor.transDepth = strTo(optarg); - break; - default: - break; - } - } - if (argc > optind) { - std::string expr(argv[optind++]); - currAnchor.element = interpreter.getImpl()->getState(expr); - } else { - printUsageAndExit(argv[0]); - } - - if (currAnchor) { - currAnchor.type = rootAnchor.type; - stateAnchors.push_back(currAnchor); - } - - currAnchor = SCXMLDotWriter::StateAnchor(); - } - - std::string outName; - if (boost::starts_with("file", inputFile.scheme())) { - outName = inputFile.path() + ".dot"; - } else { - outName = inputFile.file() + ".dot"; - } - - SCXMLDotWriter::toDot(outName, interpreter, stateAnchors); - - } catch(Event e) { - std::cerr << e << std::cout; - } - - return EXIT_SUCCESS; -} diff --git a/apps/uscxml-transform.cpp b/apps/uscxml-transform.cpp index 2dc4d74..6fd1bf7 100644 --- a/apps/uscxml-transform.cpp +++ b/apps/uscxml-transform.cpp @@ -1,63 +1,24 @@ #include "uscxml/config.h" #include "uscxml/Interpreter.h" -#include "uscxml/transform/ChartToFlatSCXML.h" +#include "uscxml/util/String.h" #include "uscxml/transform/ChartToC.h" #include "uscxml/transform/ChartToVHDL.h" -#include "uscxml/transform/ChartToTex.h" -#include "uscxml/transform/ChartToMinimalSCXML.h" -#include "uscxml/transform/ChartToPromela.h" -#include "uscxml/dom/DOMUtils.h" -#include #include #include #include #include -#include "uscxml/Factory.h" +#include "uscxml/plugins/Factory.h" #include "uscxml/server/HTTPServer.h" #include "getopt.h" -#ifdef HAS_SIGNAL_H -#include -#endif - -#ifdef HAS_EXECINFO_H -#include -#endif - -#ifdef HAS_DLFCN_H -#include -#endif +#include #define ANNOTATE(envKey, annotationParam) \ envVarIsTrue(envKey) || std::find(options.begin(), options.end(), annotationParam) != options.end() -class VerboseMonitor : public uscxml::InterpreterMonitor { - void onStableConfiguration(uscxml::Interpreter interpreter) { - printConfig(interpreter.getConfiguration()); - } - - void beforeProcessingEvent(uscxml::Interpreter interpreter, const uscxml::Event& event) { - std::cerr << "Event: " << event.name << std::endl; - } - - void beforeCompletion(uscxml::Interpreter interpreter) { - printConfig(interpreter.getConfiguration()); - } - - void printConfig(const Arabica::XPath::NodeSet& config) { - std::string seperator; - std::cerr << "Config: {"; - for (size_t i = 0; i < config.size(); i++) { - std::cerr << seperator << ATTR_CAST(config[i], "id"); - seperator = ", "; - } - std::cerr << "}" << std::endl; - } -}; - void printUsageAndExit(const char* progName) { // remove path from program name std::string progStr(progName); @@ -119,10 +80,6 @@ int main(int argc, char** argv) { signal(SIGPIPE, SIG_IGN); #endif - // setup logging - google::LogToStderr(); - google::InitGoogleLogging(argv[0]); - optind = 0; opterr = 0; @@ -270,7 +227,7 @@ int main(int argc, char** argv) { ss << line; } URL tmp("anonymous.scxml"); - tmp.toAbsoluteCwd(); + tmp = URL::resolveWithCWD(tmp); interpreter = Interpreter::fromXML(ss.str(), tmp); } else { interpreter = Interpreter::fromURL(inputFile); @@ -283,18 +240,17 @@ int main(int argc, char** argv) { if (!interpreter) { URL tmp(inputFile); - tmp.toAbsoluteCwd(); - std::stringstream contentSS; - contentSS << tmp; + tmp = URL::resolveWithCWD(tmp); + std::string content = tmp.getInContent(); std::string inlineBeginMarker = "INLINE SCXML BEGIN\n"; std::string inlineEndMarker = "\nINLINE SCXML END"; - size_t inlineSCXMLBegin = contentSS.str().find(inlineBeginMarker); + size_t inlineSCXMLBegin = content.find(inlineBeginMarker); if (inlineSCXMLBegin != std::string::npos) { inlineSCXMLBegin += inlineBeginMarker.size(); - size_t inlineSCXMLEnd = contentSS.str().find(inlineEndMarker); - std::string inlineSCXMLContent = contentSS.str().substr(inlineSCXMLBegin, inlineSCXMLEnd - inlineSCXMLBegin); + size_t inlineSCXMLEnd = content.find(inlineEndMarker); + std::string inlineSCXMLContent = content.substr(inlineSCXMLBegin, inlineSCXMLEnd - inlineSCXMLBegin); try { interpreter = Interpreter::fromXML(inlineSCXMLContent, tmp); } catch (Event e) { @@ -335,68 +291,68 @@ int main(int argc, char** argv) { exit(EXIT_SUCCESS); } - if (outType == "vhdl") { - if (outputFile.size() == 0 || outputFile == "-") { - ChartToVHDL::transform(interpreter).writeTo(std::cout); - } else { - std::ofstream outStream; - outStream.open(outputFile.c_str()); - ChartToVHDL::transform(interpreter).writeTo(outStream); - outStream.close(); - } - exit(EXIT_SUCCESS); - } +// if (outType == "vhdl") { +// if (outputFile.size() == 0 || outputFile == "-") { +// ChartToVHDL::transform(interpreter).writeTo(std::cout); +// } else { +// std::ofstream outStream; +// outStream.open(outputFile.c_str()); +// ChartToVHDL::transform(interpreter).writeTo(outStream); +// outStream.close(); +// } +// exit(EXIT_SUCCESS); +// } - if (outType == "pml") { - if (outputFile.size() == 0 || outputFile == "-") { - ChartToPromela::transform(interpreter).writeTo(std::cout); - } else { - std::ofstream outStream; - outStream.open(outputFile.c_str()); - ChartToPromela::transform(interpreter).writeTo(outStream); - outStream.close(); - } - exit(EXIT_SUCCESS); - } +// if (outType == "pml") { +// if (outputFile.size() == 0 || outputFile == "-") { +// ChartToPromela::transform(interpreter).writeTo(std::cout); +// } else { +// std::ofstream outStream; +// outStream.open(outputFile.c_str()); +// ChartToPromela::transform(interpreter).writeTo(outStream); +// outStream.close(); +// } +// exit(EXIT_SUCCESS); +// } - if (outType == "tex") { - if (outputFile.size() == 0 || outputFile == "-") { - ChartToTex::transform(interpreter).writeTo(std::cout); - } else { - std::ofstream outStream; - outStream.open(outputFile.c_str()); - ChartToTex::transform(interpreter).writeTo(outStream); - outStream.close(); - } - exit(EXIT_SUCCESS); - } +// if (outType == "tex") { +// if (outputFile.size() == 0 || outputFile == "-") { +// ChartToTex::transform(interpreter).writeTo(std::cout); +// } else { +// std::ofstream outStream; +// outStream.open(outputFile.c_str()); +// ChartToTex::transform(interpreter).writeTo(outStream); +// outStream.close(); +// } +// exit(EXIT_SUCCESS); +// } - if (outType == "flat") { - if (outputFile.size() == 0 || outputFile == "-") { - ChartToFlatSCXML::transform(interpreter).writeTo(std::cout); - } else { - std::ofstream outStream; - outStream.open(outputFile.c_str()); - ChartToFlatSCXML::transform(interpreter).writeTo(outStream); - outStream.close(); - } - exit(EXIT_SUCCESS); - } +// if (outType == "flat") { +// if (outputFile.size() == 0 || outputFile == "-") { +// ChartToFlatSCXML::transform(interpreter).writeTo(std::cout); +// } else { +// std::ofstream outStream; +// outStream.open(outputFile.c_str()); +// ChartToFlatSCXML::transform(interpreter).writeTo(outStream); +// outStream.close(); +// } +// exit(EXIT_SUCCESS); +// } - if (outType == "min") { - if (outputFile.size() == 0 || outputFile == "-") { - ChartToMinimalSCXML::transform(interpreter).writeTo(std::cout); - } else { - std::ofstream outStream; - outStream.open(outputFile.c_str()); - ChartToMinimalSCXML::transform(interpreter).writeTo(outStream); - outStream.close(); - } - exit(EXIT_SUCCESS); - } +// if (outType == "min") { +// if (outputFile.size() == 0 || outputFile == "-") { +// ChartToMinimalSCXML::transform(interpreter).writeTo(std::cout); +// } else { +// std::ofstream outStream; +// outStream.open(outputFile.c_str()); +// ChartToMinimalSCXML::transform(interpreter).writeTo(outStream); +// outStream.close(); +// } +// exit(EXIT_SUCCESS); +// } -#if 1 +#if 0 if (options.size() > 0) { ChartToFSM annotater(interpreter); if (std::find(options.begin(), options.end(), "priority") != options.end()) diff --git a/apps/w3c-mmi/MMIEventServlet.cpp b/apps/w3c-mmi/MMIEventServlet.cpp deleted file mode 100644 index 2d88f1b..0000000 --- a/apps/w3c-mmi/MMIEventServlet.cpp +++ /dev/null @@ -1,211 +0,0 @@ -#include "MMIEventServlet.h" -#include - -#ifdef _WIN32 -#define NOMINMAX -#include -#include -#endif - -#include "uscxml/Message.h" -#include -#include -#include -#include - -#include - -#include -#include - -#ifndef _WIN32 -#include -#include -#endif - -#define MMI_HTTP_EVENT_CASE(type) \ -else if (boost::iequals(mmiEvent.getLocalName(), #type)) { \ - monIter = _monitors.begin(); \ - while(monIter != _monitors.end()) { \ - (*monIter)->received(type::fromXML(mmiDoc)); \ - monIter++; \ - } \ -} - -namespace uscxml { - -using namespace Arabica::DOM; - -MMIEventServlet::MMIEventServlet(const std::string& path) : _path(path) { - // register at http server - bool success = HTTPServer::registerServlet(_path, this); - assert(success); -} - -MMIEventServlet::~MMIEventServlet() { - HTTPServer* httpServer = HTTPServer::getInstance(); - httpServer->unregisterServlet(this); -} - -void MMIEventServlet::send(const MMIEvent& mmiEvent) { - URL url(mmiEvent.target); - url.addMonitor(this); - - std::stringstream content; - content << mmiEvent.toXML(); - url.setOutContent(content.str()); - url.download(); - -} - -bool MMIEventServlet::httpRecvRequest(const HTTPServer::Request& req) { - - // is this a request from a HTML browser? - - - Document mmiDoc = NameSpacingParser::fromXML(req.data.compound.at("content").atom).getDocument(); - if (!mmiDoc) { - evhttp_send_error(req.curlReq, 402, NULL); - return true; - } - -// std::cout << mmiDoc.getNamespaceURI() << std::endl; - Node mmiEvent = mmiDoc.getFirstChild(); - // get the first element - while (mmiEvent && mmiEvent.getNodeType() != Node_base::ELEMENT_NODE) { - mmiEvent = mmiEvent.getNextSibling(); - } - // get the contained message - if (boost::iequals(mmiEvent.getLocalName(), "mmi")) { - mmiEvent = mmiEvent.getFirstChild(); - while (mmiEvent && mmiEvent.getNodeType() != Node_base::ELEMENT_NODE) { - mmiEvent = mmiEvent.getNextSibling(); - } - } -// std::cout << mmiEvent << std::endl; - - if (!mmiEvent) { - evhttp_send_error(req.curlReq, 402, NULL); - return true; - } - - std::set::iterator monIter; - if (false) {} - MMI_HTTP_EVENT_CASE(NewContextRequest) - MMI_HTTP_EVENT_CASE(NewContextResponse) - MMI_HTTP_EVENT_CASE(PrepareRequest) - MMI_HTTP_EVENT_CASE(PrepareResponse) - MMI_HTTP_EVENT_CASE(StartRequest) - MMI_HTTP_EVENT_CASE(StartResponse) - MMI_HTTP_EVENT_CASE(DoneNotification) - MMI_HTTP_EVENT_CASE(CancelRequest) - MMI_HTTP_EVENT_CASE(CancelResponse) - MMI_HTTP_EVENT_CASE(PauseRequest) - MMI_HTTP_EVENT_CASE(PauseResponse) - MMI_HTTP_EVENT_CASE(ResumeRequest) - MMI_HTTP_EVENT_CASE(ResumeResponse) - MMI_HTTP_EVENT_CASE(ExtensionNotification) - MMI_HTTP_EVENT_CASE(ClearContextRequest) - MMI_HTTP_EVENT_CASE(ClearContextResponse) - MMI_HTTP_EVENT_CASE(StatusRequest) - MMI_HTTP_EVENT_CASE(StatusResponse) - else { - LOG(ERROR) << "Unknown MMI Event"; - evhttp_send_error(req.curlReq, 402, NULL); - return true; - } - - evhttp_send_reply(req.curlReq, 204, NULL, NULL); - -#if 0 - Event reqEvent = req; - reqEvent.type = Event::EXTERNAL; - bool scxmlStructFound = false; - - if (reqEvent.data.compound["header"].compound.find("Content-Type") != reqEvent.data.compound["header"].compound.end() && - boost::iequals(reqEvent.data.compound["header"].compound["Content-Type"].atom, "application/x-www-form-urlencoded")) { - std::stringstream ss(reqEvent.data.compound["content"].atom); - std::string term; - while(std::getline(ss, term, '&')) { - size_t split = term.find_first_of("="); - if (split != std::string::npos) { - std::string key = evhttp_decode_uri(term.substr(0, split).c_str()); - std::string value = evhttp_decode_uri(term.substr(split + 1).c_str()); - if (boost::iequals(key, "_scxmleventname")) { - reqEvent.name = value; - } else if (boost::iequals(key, "content")) { - reqEvent.initContent(value); - } else { - reqEvent.data.compound[key] = value; - reqEvent.params.insert(std::make_pair(key, value)); - } - } else { - // this is most likely wrong - reqEvent.content = evhttp_decode_uri(term.c_str()); - } - } - } else { - if (reqEvent.data.compound["header"].compound.find("_scxmleventstruct") != reqEvent.data.compound["header"].compound.end()) { - // TODO: this looses all other information - reqEvent = Event::fromXML(evhttp_decode_uri(reqEvent.data.compound["header"].compound["_scxmleventstruct"].atom.c_str())); - scxmlStructFound = true; - } - if (reqEvent.data.compound["header"].compound.find("_scxmleventname") != reqEvent.data.compound["header"].compound.end()) { - reqEvent.name = evhttp_decode_uri(reqEvent.data.compound["header"].compound["_scxmleventname"].atom.c_str()); - } - } - std::map::iterator headerIter = reqEvent.data.compound["header"].compound.begin(); - while(headerIter != reqEvent.data.compound["header"].compound.end()) { - reqEvent.data.compound[headerIter->first] = Data(evhttp_decode_uri(headerIter->second.atom.c_str()), Data::VERBATIM); - headerIter++; - } - - - /// test532 - if (reqEvent.name.length() == 0) - reqEvent.name = "http." + req.data.compound.at("type").atom; - - if (!scxmlStructFound) { - // get content into event - reqEvent.data.compound["content"] = Data(req.content, Data::VERBATIM); - } - - evhttp_send_reply(req.curlReq, 200, "OK", NULL); -#endif - return true; -} - -void MMIEventServlet::downloadStarted(const URL& url) {} - -void MMIEventServlet::downloadCompleted(const URL& url) { - std::map >::iterator reqIter = _sendRequests.begin(); - while(reqIter != _sendRequests.end()) { - if (reqIter->second.first == url) { - _sendRequests.erase(reqIter); - return; - } - reqIter++; - } - assert(false); -} - -void MMIEventServlet::downloadFailed(const URL& url, int errorCode) { - - std::map >::iterator reqIter = _sendRequests.begin(); - while(reqIter != _sendRequests.end()) { - if (reqIter->second.first == url) { - Event failEvent; - failEvent.name = "error.communication"; -// returnEvent(failEvent); - - _sendRequests.erase(reqIter); - return; - } - reqIter++; - } - assert(false); - -} - - -} \ No newline at end of file diff --git a/apps/w3c-mmi/MMIEventServlet.h b/apps/w3c-mmi/MMIEventServlet.h deleted file mode 100644 index d760149..0000000 --- a/apps/w3c-mmi/MMIEventServlet.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef MMIEVENTSERVLET_H_92WSR1SU -#define MMIEVENTSERVLET_H_92WSR1SU - - -#include "uscxml/concurrency/eventqueue/DelayedEventQueue.h" -#include "uscxml/server/HTTPServer.h" -#include "uscxml/Interpreter.h" -#include "uscxml/Factory.h" -#ifndef _WIN32 -#include -#endif - -#include -#include - -#include - -namespace uscxml { - - class MMIEventServlet : public HTTPServlet, public URLMonitor, public MMIEventSender { - public: - MMIEventServlet(const std::string& path); - virtual ~MMIEventServlet(); - - void addMonitor(MMIEventReceiver* mmiMonitor) { - _monitors.insert(mmiMonitor); - } - void removeMonitor(MMIEventReceiver* mmiMonitor) { - _monitors.erase(mmiMonitor); - } - - /// HTTPServlet - bool httpRecvRequest(const HTTPServer::Request& req); - void setURL(const std::string& url) { - _url = url; - } - std::string getURL() { return _url; } - - bool canAdaptPath() { - return false; - } - - // URLMonitor - void downloadStarted(const URL& url); - void downloadCompleted(const URL& url); - void downloadFailed(const URL& url, int errorCode); - - // MMIEventSender - virtual void send(const MMIEvent& mmiEvent); - - protected: - std::string _url; - std::string _path; - std::map > _sendRequests; - std::set _monitors; - }; -} - -#endif /* end of include guard: MMIEVENTSERVLET_H_92WSR1SU */ diff --git a/apps/w3c-mmi/im/MMISessionManager.cpp b/apps/w3c-mmi/im/MMISessionManager.cpp deleted file mode 100644 index 2e68ff4..0000000 --- a/apps/w3c-mmi/im/MMISessionManager.cpp +++ /dev/null @@ -1,297 +0,0 @@ -#include "MMISessionManager.h" -#include -#include -#include - -#include -#include - -namespace uscxml { - -using namespace Arabica::DOM; - -MMISessionManager::MMISessionManager(Interpreter interpreter) : _protoInterpreter(interpreter) { - bool success = HTTPServer::registerServlet(interpreter.getName(), this); - assert(success); - _factory = new Factory(Factory::getInstance()); - _factory->registerIOProcessor(new MMIIOProcessor(this)); -} - -MMISessionManager::~MMISessionManager() { - HTTPServer* httpServer = HTTPServer::getInstance(); - httpServer->unregisterServlet(this); -} - -void MMISessionManager::setupHTMLClient(const HTTPServer::Request& req) { - // open template file - HTTPServer::Reply reply(req); - URL templateURL(_protoInterpreter.getBaseURI().asString() + "/templates/mc-html.html"); - templateURL.download(true); - std::string templateContent = templateURL.getInContent(); - boost::replace_all(templateContent, "${im.url}", _url); - reply.content = templateContent; - HTTPServer::reply(reply); -} - -bool MMISessionManager::httpRecvRequest(const HTTPServer::Request& req) { - // is this an initial request from an HTML MC? - if (!req.data["query"]["token"] && // no token in query - !req.data["query"]["context"] && // no context in query - boost::iequals(req.data["type"].atom, "get") && // request type is GET - boost::icontains(req.data["header"]["Accept"].atom, "text/html") && // accepts html - req.content.length() == 0) { // no content - setupHTMLClient(req); - return true; - } - - // is this a comet longpolling request? - if (boost::iequals(req.data["type"].atom, "get") && - (req.data["query"]["token"] || req.data["query"]["context"])) { - std::string token = req.data["query"]["token"].atom; - if (req.data["query"]["token"]) { - std::string token = req.data["query"]["token"].atom; - if (_tokens.find(token) != _tokens.end()) { - MMISessionManager::CometMMISession* comet = static_cast(_tokens[token]); - comet->longPoll(req); - return true; - } else { - LOG(ERROR) << "No session for given token"; - } - } else if (req.data["query"]["context"]) { - std::string context = req.data["query"]["context"].atom; - if (_sessions.find(context) != _sessions.end()) { - MMISessionManager::CometMMISession* comet = static_cast(_sessions[context]); - comet->longPoll(req); - return true; - } else { - LOG(ERROR) << "No session for given context"; - } - } - } - - // assume that there is an mmi event inside - Document mmiDoc = NameSpacingParser::fromXML(req.data.compound.at("content").atom).getDocument(); - - if (!mmiDoc) { - evhttp_send_error(req.curlReq, 204, NULL); - return true; - } - - Node mmiEvent = MMIEvent::getEventNode(mmiDoc); - if (!mmiEvent) { - evhttp_send_error(req.curlReq, 204, NULL); - return true; - } - - switch(MMIEvent::getType(mmiEvent)) { - case MMIEvent::NEWCONTEXTREQUEST: { - received(NewContextRequest::fromXML(mmiEvent), req.data["query"]["token"].atom); - evhttp_send_error(req.curlReq, 204, NULL); - break; - } - case MMIEvent::EXTENSIONNOTIFICATION: { - received(ExtensionNotification::fromXML(mmiEvent)); - evhttp_send_error(req.curlReq, 204, NULL); - break; - } - case MMIEvent::DONENOTIFICATION: { - received(DoneNotification::fromXML(mmiEvent)); - evhttp_send_error(req.curlReq, 204, NULL); - break; - } - case MMIEvent::STARTRESPONSE: { - evhttp_send_error(req.curlReq, 204, NULL); - break; - } - default: { - LOG(ERROR) << "Unknown MMI Event: " << ATTR(mmiEvent, "localName"); - evhttp_send_error(req.curlReq, 204, NULL); - break; - } - } - return true; -} - -void MMISessionManager::received(const ExtensionNotification& mmiEvent) { - if(_sessions.find(mmiEvent.context) != _sessions.end()) { - _sessions[mmiEvent.context]->_interpreter.receive(mmiEvent); - } else { - LOG(ERROR) << "No session for given context"; - } -} - -void MMISessionManager::received(const DoneNotification& mmiEvent) { - if(_sessions.find(mmiEvent.context) != _sessions.end()) { - _sessions[mmiEvent.context]->_interpreter.receive(mmiEvent); - } else { - LOG(ERROR) << "No session for given context"; - } -} - -void MMISessionManager::received(const NewContextRequest& mmiEvent, const std::string& token) { - - // copy DOM from prototype instance - Arabica::DOM::DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - Arabica::DOM::Document newDOM = domFactory.createDocument("", "", 0); - newDOM.appendChild(newDOM.importNode(_protoInterpreter.getDocument().getDocumentElement(), true)); - - // instantiate new interpreter and name it after the context - std::string contextId = UUID::getUUID(); - Interpreter interpreter = Interpreter::fromDOM(newDOM); - interpreter.setFactory(_factory); - interpreter.setName(contextId); - interpreter.setNameSpaceInfo(_protoInterpreter.getNameSpaceInfo()); - interpreter.setBaseURI(_protoInterpreter.getBaseURI().asString()); - - MMISession* session; - - if (token.length() > 0) { - session = new MMISessionManager::CometMMISession(); - static_cast(session)->_token = token; - _tokens[token] = session; - } else { - // todo handle other cases - session = new MMISessionManager::CometMMISession(); - } - session->_interpreter = interpreter; - - // save interpreter - _sessions[contextId] = session; - - interpreter.start(); - interpreter.receive(mmiEvent); - -} - -void MMISessionManager::received(const NewContextResponse& mmiEvent, const std::string& token) { - if (_tokens.find(token) != _tokens.end()) { - _tokens.erase(token); - } -} - -void MMISessionManager::send(const std::string& name, const SendRequest& req) { - assert(_sessions.find(name) != _sessions.end()); - _sessions[name]->send(req); -} - -void MMISessionManager::CometMMISession::send(const SendRequest& req) { - tthread::lock_guard lock(_mutex); - if (!_longPollingReq) { - _outQueue.push_back(req); - return; - } - - if (req.dom) { - std::stringstream ss; - Node mmiEvent = MMIEvent::getEventNode(req.dom); - HTTPServer::Reply reply(_longPollingReq); - - switch (MMIEvent::getType(mmiEvent)) { - case MMIEvent::NEWCONTEXTRESPONSE: { - NewContextResponse response = NewContextResponse::fromXML(mmiEvent); - ss << response.toXML(); - reply.content = ss.str(); - break; - } - case MMIEvent::STARTREQUEST: { - StartRequest request = StartRequest::fromXML(mmiEvent); - ss << request.toXML(); - reply.content = ss.str(); - break; - } - default: - break; - } - reply.headers["Content-Type"] = "application/xml"; - HTTPServer::reply(reply); - _longPollingReq = HTTPServer::Request(); - } -} - -void MMISessionManager::CometMMISession::receive(const Arabica::DOM::Node& msg) { - -} - -void MMISessionManager::CometMMISession::longPoll(const HTTPServer::Request& req) { - tthread::lock_guard lock(_mutex); - if (_longPollingReq) - evhttp_send_error(_longPollingReq.curlReq, 204, NULL); - _longPollingReq = req; - if (!_outQueue.empty()) { - send(_outQueue.front()); - _outQueue.pop_front(); - } -} - -boost::shared_ptr MMISessionManager::MMIIOProcessor::create(InterpreterImpl* interpreter) { - boost::shared_ptr ioProc = boost::shared_ptr(new MMISessionManager::MMIIOProcessor(_sessionManager)); - return ioProc; -} - -Data MMISessionManager::MMIIOProcessor::getDataModelVariables() { - Data data; - return data; -} - -void MMISessionManager::MMIIOProcessor::send(const SendRequest& req) { - SendRequest reqCopy(req); - - if (req.dom) { - Arabica::DOM::Node mmiEvent = MMIEvent::getEventNode(req.dom); - if (!mmiEvent || !mmiEvent.getNodeType() == Node_base::ELEMENT_NODE) - return; - - Arabica::DOM::Element mmiElem = Arabica::DOM::Element(mmiEvent); - switch (MMIEvent::getType(mmiEvent)) { - case MMIEvent::STARTRESPONSE: - case MMIEvent::PREPARERESPONSE: - case MMIEvent::PAUSERESPONSE: - case MMIEvent::RESUMERESPONSE: - case MMIEvent::CANCELRESPONSE: - case MMIEvent::DONENOTIFICATION: - case MMIEvent::NEWCONTEXTRESPONSE: - case MMIEvent::CLEARCONTEXTRESPONSE: - case MMIEvent::STATUSRESPONSE: { - // all of the above have a status - if (!mmiElem.hasAttributeNS(MMIEvent::nameSpace, "Status")) { - mmiElem.setAttributeNS(MMIEvent::nameSpace, "Status", "Success"); - } - } - case MMIEvent::PAUSEREQUEST: - case MMIEvent::RESUMEREQUEST: - case MMIEvent::CANCELREQUEST: - case MMIEvent::CLEARCONTEXTREQUEST: - case MMIEvent::STATUSREQUEST: { - // all of the above have a context - if (!mmiElem.hasAttributeNS(MMIEvent::nameSpace, "Context")) { - mmiElem.setAttributeNS(MMIEvent::nameSpace, "Context", _interpreter->getName()); - } - } - default: { - if (!mmiElem.hasAttributeNS(MMIEvent::nameSpace, "Source")) { - mmiElem.setAttributeNS(MMIEvent::nameSpace, "Source", _sessionManager->getURL()); - } - if (!mmiElem.hasAttributeNS(MMIEvent::nameSpace, "Target")) { - if (boost::starts_with(_interpreter->getCurrentEvent().name, "mmi.")) { - mmiElem.setAttributeNS(MMIEvent::nameSpace, "Target", _interpreter->getCurrentEvent().origin); - } - } - if (!mmiElem.hasAttributeNS(MMIEvent::nameSpace, "RequestID")) { - if (boost::starts_with(_interpreter->getCurrentEvent().name, "mmi.")) { - mmiElem.setAttributeNS(MMIEvent::nameSpace, "RequestID", _interpreter->getCurrentEvent().sendid); - } - } - } - } - - if (MMIEvent::getType(mmiEvent) == MMIEvent::EXTENSIONNOTIFICATION && !mmiElem.hasAttribute("Name") && req.name.length() > 0) { - mmiElem.setAttribute("Name", req.name); - } - // use session mgr to dispatch to session - - _sessionManager->send(_interpreter->getName(), reqCopy); - } - -} - -} \ No newline at end of file diff --git a/apps/w3c-mmi/im/MMISessionManager.h b/apps/w3c-mmi/im/MMISessionManager.h deleted file mode 100644 index 222bf34..0000000 --- a/apps/w3c-mmi/im/MMISessionManager.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef MMISESSIONMANAGER_H_IHDWUAKD -#define MMISESSIONMANAGER_H_IHDWUAKD - -#include -#include -#include "../MMIEventServlet.h" - -namespace uscxml { - class MMISessionManager : public HTTPServlet { - public: - MMISessionManager(Interpreter interpreter); - ~MMISessionManager(); - - class MMISession { - public: - Interpreter _interpreter; - tthread::recursive_mutex _mutex; - virtual void send(const SendRequest& req) = 0; - virtual void receive(const Arabica::DOM::Node& msg) = 0; - }; - - class CometMMISession : public MMISession { - public: - std::deque _outQueue; - HTTPServer::Request _longPollingReq; - std::string _token; - - void send(const SendRequest& req); - void receive(const Arabica::DOM::Node& msg); - void longPoll(const HTTPServer::Request& req); - }; - - class MMIIOProcessor : public IOProcessorImpl { - public: - MMIIOProcessor(MMISessionManager* sessionManager) : _sessionManager(sessionManager) {} - - // IOProcessorImpl - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - virtual std::list getNames() { - std::list names; - names.push_back("mmi.event"); - return names; - } - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - protected: - MMISessionManager* _sessionManager; - }; - - void send(const std::string& name, const SendRequest& req); - - /// HTTPServlet - bool httpRecvRequest(const HTTPServer::Request& req); - void setURL(const std::string& url) { - _url = url; - } - std::string getURL() { return _url; } - - bool canAdaptPath() { - return false; - } - - protected: - void received(const NewContextRequest& mmiEvent, const std::string& token = ""); - void received(const NewContextResponse& mmiEvent, const std::string& token = ""); - void received(const ExtensionNotification& mmiEvent); - void received(const DoneNotification& mmiEvent); - - void setupHTMLClient(const HTTPServer::Request& req); - - Interpreter _protoInterpreter; - Factory* _factory; - DelayedEventQueue _eventQueue; - std::map _sessions; - std::map _tokens; - std::string _url; - }; -} - - -#endif /* end of include guard: MMISESSIONMANAGER_H_IHDWUAKD */ diff --git a/apps/w3c-mmi/im/uscxml-interaction-manager.cpp b/apps/w3c-mmi/im/uscxml-interaction-manager.cpp deleted file mode 100644 index b6b75f6..0000000 --- a/apps/w3c-mmi/im/uscxml-interaction-manager.cpp +++ /dev/null @@ -1,183 +0,0 @@ -#include "uscxml/config.h" -#include "uscxml/Interpreter.h" -#include -#include "uscxml/concurrency/tinythread.h" - -#include "MMISessionManager.h" - -#ifdef HAS_SIGNAL_H -#include -#endif - -#ifdef HAS_EXECINFO_H -#include -#endif - -#ifdef HAS_DLFCN_H -#include -#endif - -#ifdef _WIN32 -#include "XGetopt.h" -#endif - -class VerboseMonitor : public uscxml::InterpreterMonitor { - void onStableConfiguration(uscxml::Interpreter interpreter) { - printConfig(interpreter.getConfiguration()); - } - - void beforeCompletion(uscxml::Interpreter interpreter) { - printConfig(interpreter.getConfiguration()); - } - - void printConfig(const Arabica::XPath::NodeSet& config) { - std::string seperator; - std::cout << "Config: {"; - for (int i = 0; i < config.size(); i++) { - std::cout << seperator << ATTR(config[i], "id"); - seperator = ", "; - } - std::cout << "}" << std::endl; - } -}; - - -#ifdef HAS_EXECINFO_H -void printBacktrace(void** array, int size) { - char** messages = backtrace_symbols(array, size); - for (int i = 0; i < size && messages != NULL; ++i) { - std::cerr << "\t" << messages[i] << std::endl; - } - std::cerr << std::endl; - free(messages); -} - -#ifdef HAS_DLFCN_H -// see https://gist.github.com/nkuln/2020860 -typedef void (*cxa_throw_type)(void *, void *, void (*) (void *)); -cxa_throw_type orig_cxa_throw = 0; - -void load_orig_throw_code() { - orig_cxa_throw = (cxa_throw_type) dlsym(RTLD_NEXT, "__cxa_throw"); -} - -extern "C" -CXA_THROW_SIGNATURE { - std::cerr << __FUNCTION__ << " will throw exception from " << std::endl; - if (orig_cxa_throw == 0) - load_orig_throw_code(); - - void *array[50]; - size_t size = backtrace(array, 50); - printBacktrace(array, size); - orig_cxa_throw(thrown_exception, pvtinfo, dest); -} -#endif -#endif - - -// see http://stackoverflow.com/questions/2443135/how-do-i-find-where-an-exception-was-thrown-in-c -void customTerminate() { - static bool tried_throw = false; - try { - // try once to re-throw currently active exception - if (!tried_throw) { - throw; - tried_throw = true; - } else { - tried_throw = false; - }; - } catch (const std::exception &e) { - std::cerr << __FUNCTION__ << " caught unhandled exception. what(): " - << e.what() << std::endl; - } catch (const uscxml::Event &e) { - std::cerr << __FUNCTION__ << " caught unhandled exception. Event: " - << e << std::endl; - } catch (...) { - std::cerr << __FUNCTION__ << " caught unknown/unhandled exception." - << std::endl; - } - -#ifdef HAS_EXECINFO_H - void * array[50]; - int size = backtrace(array, 50); - - printBacktrace(array, size); -#endif - abort(); -} - -void printUsageAndExit() { - printf("uscxml-browser version " USCXML_VERSION " (" CMAKE_BUILD_TYPE " build - " CMAKE_COMPILER_STRING ")\n"); - printf("Usage\n"); - printf("\tuscxml-browser"); -#ifdef BUILD_AS_PLUGINS - printf(" [-d pluginPath]"); -#endif - printf(" URL\n"); - printf("\n"); - printf("Options\n"); - printf("\t-v : be verbose\n"); - printf("\t-pN : port for HTTP server\n"); - printf("\n"); - exit(1); -} - -int main(int argc, char** argv) { - using namespace uscxml; - - std::set_terminate(customTerminate); - -#if defined(HAS_SIGNAL_H) && !defined(WIN32) - signal(SIGPIPE, SIG_IGN); -#endif - - if (argc < 2) { - printUsageAndExit(); - } - - bool verbose = false; - size_t port = 8080; - google::InitGoogleLogging(argv[0]); - google::LogToStderr(); - -#ifndef _WIN32 - opterr = 0; -#endif - int option; - while ((option = getopt(argc, argv, "vl:d:p:")) != -1) { - switch(option) { - case 'l': - google::InitGoogleLogging(optarg); - break; - case 'd': - uscxml::Factory::pluginPath = optarg; - break; - case 'p': - port = strTo(optarg); - break; - case 'v': - verbose = true; - break; - case '?': - break; - default: - printUsageAndExit(); - break; - } - } - - (void)verbose; - // intialize http server on given port - HTTPServer::getInstance(port); - - LOG(INFO) << "Processing " << argv[optind]; - Interpreter protoInterpreter = Interpreter::fromURI(argv[optind]); - if (protoInterpreter) { - MMISessionManager mmiSessionManager(protoInterpreter); - while(true) - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(1000)); - } - - return EXIT_SUCCESS; -} \ No newline at end of file diff --git a/apps/w3c-mmi/mc/uscxml-modality-component.cpp b/apps/w3c-mmi/mc/uscxml-modality-component.cpp deleted file mode 100644 index 4901dbd..0000000 --- a/apps/w3c-mmi/mc/uscxml-modality-component.cpp +++ /dev/null @@ -1,191 +0,0 @@ -#include "uscxml/config.h" -#include "uscxml/Interpreter.h" -#include - -#ifdef HAS_SIGNAL_H -#include -#endif - -#ifdef HAS_EXECINFO_H -#include -#endif - -#ifdef HAS_DLFCN_H -#include -#endif - -#ifdef _WIN32 -#include "XGetopt.h" -#endif - -class VerboseMonitor : public uscxml::InterpreterMonitor { - void onStableConfiguration(uscxml::Interpreter interpreter) { - printConfig(interpreter.getConfiguration()); - } - - void beforeCompletion(uscxml::Interpreter interpreter) { - printConfig(interpreter.getConfiguration()); - } - - void printConfig(const Arabica::XPath::NodeSet& config) { - std::string seperator; - std::cout << "Config: {"; - for (int i = 0; i < config.size(); i++) { - std::cout << seperator << ATTR(config[i], "id"); - seperator = ", "; - } - std::cout << "}" << std::endl; - } -}; - - -#ifdef HAS_EXECINFO_H -void printBacktrace(void** array, int size) { - char** messages = backtrace_symbols(array, size); - for (int i = 0; i < size && messages != NULL; ++i) { - std::cerr << "\t" << messages[i] << std::endl; - } - std::cerr << std::endl; - free(messages); -} - -#ifdef HAS_DLFCN_H -// see https://gist.github.com/nkuln/2020860 -typedef void (*cxa_throw_type)(void *, void *, void (*) (void *)); -cxa_throw_type orig_cxa_throw = 0; - -void load_orig_throw_code() { - orig_cxa_throw = (cxa_throw_type) dlsym(RTLD_NEXT, "__cxa_throw"); -} - -extern "C" -CXA_THROW_SIGNATURE { - std::cerr << __FUNCTION__ << " will throw exception from " << std::endl; - if (orig_cxa_throw == 0) - load_orig_throw_code(); - - void *array[50]; - size_t size = backtrace(array, 50); - printBacktrace(array, size); - orig_cxa_throw(thrown_exception, pvtinfo, dest); -} -#endif -#endif - - -// see http://stackoverflow.com/questions/2443135/how-do-i-find-where-an-exception-was-thrown-in-c -void customTerminate() { - static bool tried_throw = false; - try { - // try once to re-throw currently active exception - if (!tried_throw) { - throw; - tried_throw = true; - } else { - tried_throw = false; - }; - } catch (const std::exception &e) { - std::cerr << __FUNCTION__ << " caught unhandled exception. what(): " - << e.what() << std::endl; - } catch (const uscxml::Event &e) { - std::cerr << __FUNCTION__ << " caught unhandled exception. Event: " - << e << std::endl; - } catch (...) { - std::cerr << __FUNCTION__ << " caught unknown/unhandled exception." - << std::endl; - } - -#ifdef HAS_EXECINFO_H - void * array[50]; - int size = backtrace(array, 50); - - printBacktrace(array, size); -#endif - abort(); -} - -void printUsageAndExit() { - printf("uscxml-browser version " USCXML_VERSION " (" CMAKE_BUILD_TYPE " build - " CMAKE_COMPILER_STRING ")\n"); - printf("Usage\n"); - printf("\tuscxml-browser"); -#ifdef BUILD_AS_PLUGINS - printf(" [-d pluginPath]"); -#endif - printf(" URL\n"); - printf("\n"); - printf("Options\n"); - printf("\t-v : be verbose\n"); - printf("\t-pN : port for HTTP server\n"); - printf("\n"); - exit(1); -} - -int main(int argc, char** argv) { - using namespace uscxml; - - std::set_terminate(customTerminate); - -#if defined(HAS_SIGNAL_H) && !defined(WIN32) - signal(SIGPIPE, SIG_IGN); -#endif - - if (argc < 2) { - printUsageAndExit(); - } - - bool verbose = false; - size_t port = 8080; - google::InitGoogleLogging(argv[0]); - google::LogToStderr(); - -#ifndef _WIN32 - opterr = 0; -#endif - int option; - while ((option = getopt(argc, argv, "vl:d:p:")) != -1) { - switch(option) { - case 'l': - google::InitGoogleLogging(optarg); - break; - case 'd': - uscxml::Factory::pluginPath = optarg; - break; - case 'p': - port = strTo(optarg); - break; - case 'v': - verbose = true; - break; - case '?': - break; - default: - printUsageAndExit(); - break; - } - } - -// for (int i = 0; i < argc; i++) -// std::cout << argv[i] << std::endl; -// std::cout << optind << std::endl; - - // intialize http server on given port - HTTPServer::getInstance(port); - - LOG(INFO) << "Processing " << argv[optind]; - Interpreter interpreter = Interpreter::fromURI(argv[optind]); - if (interpreter) { -// interpreter.setCmdLineOptions(argc, argv); -// interpreter->setCapabilities(Interpreter::CAN_NOTHING); -// interpreter->setCapabilities(Interpreter::CAN_BASIC_HTTP | Interpreter::CAN_GENERIC_HTTP); - - if (verbose) { - VerboseMonitor* vm = new VerboseMonitor(); - interpreter.addMonitor(vm); - } - - interpreter.start(); - while(interpreter.runOnMainThread(25)); - } - - return EXIT_SUCCESS; -} \ No newline at end of file diff --git a/contrib/build-scripts/build-arabica-ios.sh b/contrib/build-scripts/build-arabica-ios.sh deleted file mode 100755 index c88133c..0000000 --- a/contrib/build-scripts/build-arabica-ios.sh +++ /dev/null @@ -1,171 +0,0 @@ -#!/bin/bash - -# -# build Arabica for iOS and iOS simulator -# - -# make sure this is not set -unset MACOSX_DEPLOYMENT_TARGET - -# be ridiculously conservative with regard to ios features -export IPHONEOS_DEPLOYMENT_TARGET="1.0" - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -SDK_VER="6.1" -#SDK_VER="5.1" -DEST_DIR="${DIR}/../prebuilt/ios/${SDK_VER}-arabica-build" - -if [ ! -f src/arabica.cpp ]; then - echo - echo "Cannot find src/arabica.cpp" - echo "Run script from within arabica directory:" - echo "arabica $ ../../${ME}" - echo - exit -fi - -mkdir -p ${DEST_DIR} &> /dev/null - -# see http://stackoverflow.com/questions/2424770/floating-point-comparison-in-shell-script -if [ $(bc <<< "$SDK_VER >= 6.1") -eq 1 ]; then - DEV_ARCHS="-arch armv7 -arch armv7s" -elif [ $(bc <<< "$SDK_VER >= 5.1") -eq 1 ]; then - DEV_ARCHS="-arch armv6 -arch armv7" -else - echo - echo "Building for SDK < 5.1 not supported" - exit -fi - -# -# Build for Device -# -if [ ! -d ${DEST_DIR}/device ]; then - - TOOLCHAIN_ROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer" - SYSROOT="${TOOLCHAIN_ROOT}/SDKs/iPhoneOS${SDK_VER}.sdk" - - if [ ! -d ${SYSROOT} ]; then - echo - echo "Cannot find iOS developer tools at ${SYSROOT}." - echo - exit - fi - - if [ -f Makefile ]; then - make clean - fi - - mkdir -p ${DEST_DIR}/device &> /dev/null - - ./configure \ - CPP="cpp" \ - CXXCPP="cpp" \ - CXX=${TOOLCHAIN_ROOT}/usr/bin/g++ \ - CC=${TOOLCHAIN_ROOT}/usr/bin/gcc \ - LD=${TOOLCHAIN_ROOT}/usr/bin/ld\ -r \ - CFLAGS="-g -O -isysroot ${SYSROOT} ${DEV_ARCHS}" \ - CXXFLAGS="-g -O -isysroot ${SYSROOT} ${DEV_ARCHS}" \ - --with-libxml2=${SYSROOT}/usr \ - --with-parser=libxml2 \ - --with-tests=no \ - --with-boost=/opt/local/include \ - --host=arm-apple-darwin10 \ - --target=arm-apple-darwin10 \ - --disable-shared \ - --disable-dependency-tracking \ - LDFLAGS="-isysroot ${SYSROOT} ${DEV_ARCHS}" \ - AR=${TOOLCHAIN_ROOT}/usr/bin/ar \ - AS=${TOOLCHAIN_ROOT}/usr/bin/as \ - LIBTOOL=${TOOLCHAIN_ROOT}/usr/bin/libtool \ - STRIP=${TOOLCHAIN_ROOT}/usr/bin/strip \ - RANLIB=${TOOLCHAIN_ROOT}/usr/bin/ranlib \ - --prefix=${DEST_DIR}/device - - make -j2 install -else - echo - echo "${DEST_DIR}/device already exists - not rebuilding." - echo -fi - -# -# Simulator -# -if [ ! -d ${DEST_DIR}/simulator ]; then - - TOOLCHAIN_ROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer" - SYSROOT="${TOOLCHAIN_ROOT}/SDKs/iPhoneSimulator${SDK_VER}.sdk" - - if [ ! -d ${SYSROOT} ]; then - echo - echo "Cannot find iOS developer tools at ${SYSROOT}." - echo - exit - fi - - if [ -f Makefile ]; then - make clean - fi - - mkdir -p ${DEST_DIR}/simulator &> /dev/null - - ./configure \ - CXX=${TOOLCHAIN_ROOT}/usr/bin/llvm-g++ \ - CC=${TOOLCHAIN_ROOT}/usr/bin/llvm-gcc \ - LD=${TOOLCHAIN_ROOT}/usr/bin/ld\ -r \ - CFLAGS="-g -O -isysroot ${SYSROOT} -arch i386" \ - CXXFLAGS="-g -O -isysroot ${SYSROOT} -arch i386" \ - --with-libxml2=${SYSROOT}/usr \ - --with-parser=libxml2 \ - --with-tests=no \ - --with-boost=/opt/local/include \ - --disable-shared \ - --disable-dependency-tracking \ - LDFLAGS="-isysroot ${SYSROOT} -arch i386" \ - AR=${TOOLCHAIN_ROOT}/usr/bin/ar \ - AS=${TOOLCHAIN_ROOT}/usr/bin/as \ - LIBTOOL=${TOOLCHAIN_ROOT}/usr/bin/libtool \ - STRIP=${TOOLCHAIN_ROOT}/usr/bin/strip \ - RANLIB=${TOOLCHAIN_ROOT}/usr/bin/ranlib \ - --prefix=${DEST_DIR}/simulator - - make -j2 install -else - echo - echo "${DEST_DIR}/device already exists - not rebuilding." - echo -fi - -echo -echo "- Creating universal binaries --------------------------------------" -echo - -LIBS=`find ${DIR}/../prebuilt/ios/*arabica-build* -name *.a` -set +e -for LIB in ${LIBS}; do - LIB_BASE=`basename $LIB .a` - ARCHS=`lipo -info $LIB` - ARCHS=`expr "$ARCHS" : '.*:\(.*\)$'` - for ARCH in ${ARCHS}; do - mkdir -p ${DIR}/../prebuilt/ios/arch/${ARCH} > /dev/null - lipo -extract $ARCH $LIB -output ${DIR}/../prebuilt/ios/arch/${ARCH}/${LIB_BASE}.a \ - || cp $LIB ${DIR}/../prebuilt/ios/arch/${ARCH}/${LIB_BASE}.a - UNIQUE_LIBS=`ls ${DIR}/../prebuilt/ios/arch/${ARCH}` - done -done - -mkdir -p ${DIR}/../prebuilt/ios/lib -for LIB in ${UNIQUE_LIBS}; do - FILELIST="" - for ARCH in `ls ${DIR}/../prebuilt/ios/arch/`; do - FILELIST="${FILELIST} ${DIR}/../prebuilt/ios/arch/${ARCH}/${LIB}" - done - lipo -create ${FILELIST} -output ${DIR}/../prebuilt/ios/lib/${LIB} -done - -rm -rf ${DIR}/../prebuilt/ios/arch/ diff --git a/contrib/build-scripts/build-arabica-linux.sh b/contrib/build-scripts/build-arabica-linux.sh deleted file mode 100755 index 712aec4..0000000 --- a/contrib/build-scripts/build-arabica-linux.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -# -# build arabica for Linux -# - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -CPUARCH=`uname -m` -PLATFORM_ID=`${DIR}/platform-id-linux.sh` -DEST_DIR="${DIR}/../prebuilt/${PLATFORM_ID}" - -if [ ! -f src/arabica.cpp ]; then - echo - echo "Cannot find src/arabica.cpp" - echo "Run script from within arabica directory:" - echo "arabica $ ../../${ME}" - echo - exit -fi - -if [ -f Makefile ]; then - make clean -fi - -./configure \ -CFLAGS="-g" \ -CXXFLAGS="-g" \ -LDFLAGS="-g" \ ---with-parser=libxml2 \ ---with-tests=no \ ---disable-shared \ ---disable-dependency-tracking \ ---with-pic \ ---prefix=${DEST_DIR} - -make -cp ./src/.libs/libarabica.a ./libarabica_d.a -make install # once for headers -rm ${DEST_DIR}/lib/libarabica* -make clean - -./configure \ ---with-parser=libxml2 \ ---with-tests=no \ ---disable-shared \ ---disable-dependency-tracking \ ---with-pic - -make -cp ./src/.libs/libarabica.a ./libarabica.a -make clean - -cp ./libarabica.a ${DEST_DIR}/lib -cp ./libarabica_d.a ${DEST_DIR}/lib \ No newline at end of file diff --git a/contrib/build-scripts/build-arabica-macosx.sh b/contrib/build-scripts/build-arabica-macosx.sh deleted file mode 100755 index c79cc2e..0000000 --- a/contrib/build-scripts/build-arabica-macosx.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/bash - -# -# build arabica for MacOSX -# -# ./configure --with-boost=/opt/local/include/ --with-libxml2=`xcrun --show-sdk-path`/usr --with-parser=libxml2 - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -MACOSX_VER=`/usr/bin/sw_vers -productVersion` -MACOSX_COMP=(`echo $MACOSX_VER | tr '.' ' '`) -PLATFORM_ID=`${DIR}/platform-id-mac.sh` -DEST_DIR="${DIR}/../prebuilt/${PLATFORM_ID}" -SYSROOT=`xcrun --show-sdk-path` - -if [ ! -f src/arabica.cpp ]; then - echo - echo "Cannot find src/arabica.cpp" - echo "Run script from within arabica directory:" - echo "arabica $ ../../${ME}" - echo - exit -fi - -if [ -f Makefile ]; then - make clean -fi - -if [ ${MACOSX_COMP[1]} -lt 9 ]; then - MACOSX_VERSION_MIN="-mmacosx-version-min=10.6" -fi - -./configure \ -CFLAGS="-g ${MACOSX_VERSION_MIN} -arch x86_64" \ -CXXFLAGS="-g ${MACOSX_VERSION_MIN} -arch x86_64" \ -LDFLAGS="-g ${MACOSX_VERSION_MIN} -arch x86_64" \ ---with-libxml2=${SYSROOT}/usr \ ---with-parser=libxml2 \ ---with-tests=no \ ---with-boost=/opt/local/include \ ---disable-shared \ ---disable-dependency-tracking \ ---with-pic \ ---prefix=${DEST_DIR} - - -make -cp ./src/.libs/libarabica.a ./libarabica_d.x86_64.a -make install # once for headers -rm ${DEST_DIR}/lib/libarabica* -make clean - - -./configure \ -CFLAGS="${MACOSX_VERSION_MIN} -arch x86_64" \ -CXXFLAGS="${MACOSX_VERSION_MIN} -arch x86_64" \ -LDFLAGS="${MACOSX_VERSION_MIN} -arch x86_64" \ ---with-libxml2=${SYSROOT}/usr \ ---with-parser=libxml2 \ ---with-tests=no \ ---with-boost=/opt/local/include \ ---disable-shared \ ---disable-dependency-tracking \ ---with-pic - - -make -cp ./src/.libs/libarabica.a ./libarabica.x86_64.a -make clean - - -./configure \ -CFLAGS="-g ${MACOSX_VERSION_MIN} -arch i386" \ -CXXFLAGS="-g ${MACOSX_VERSION_MIN} -arch i386" \ -LDFLAGS="-g ${MACOSX_VERSION_MIN} -arch i386" \ ---with-libxml2=${SYSROOT}/usr \ ---with-parser=libxml2 \ ---with-tests=no \ ---with-boost=/opt/local/include \ ---disable-shared \ ---disable-dependency-tracking \ ---with-pic - -make -cp ./src/.libs/libarabica.a ./libarabica_d.i386.a -make clean - -./configure \ -CFLAGS="${MACOSX_VERSION_MIN} -arch i386" \ -CXXFLAGS="${MACOSX_VERSION_MIN} -arch i386" \ -LDFLAGS="${MACOSX_VERSION_MIN} -arch i386" \ ---with-libxml2=${SYSROOT}/usr \ ---with-parser=libxml2 \ ---with-tests=no \ ---with-boost=/opt/local/include \ ---disable-shared \ ---disable-dependency-tracking \ ---with-pic - -make -cp ./src/.libs/libarabica.a ./libarabica.i386.a -make clean - -lipo -create ./libarabica.i386.a ./libarabica.x86_64.a -output ${DEST_DIR}/lib/libarabica.a -lipo -create ./libarabica_d.i386.a ./libarabica_d.x86_64.a -output ${DEST_DIR}/lib/libarabica_d.a diff --git a/contrib/build-scripts/build-arabica-windows.bat b/contrib/build-scripts/build-arabica-windows.bat deleted file mode 100644 index 2e8647c..0000000 --- a/contrib/build-scripts/build-arabica-windows.bat +++ /dev/null @@ -1,64 +0,0 @@ -@ECHO off - -set ME=%0 -set DIR=%~dp0 - -if "%VSINSTALLDIR%" == "" ( - echo. - echo %VSINSTALLDIR is not defined, run from within Visual Studio Command Prompt. - echo. - goto :DONE -) - -echo %LIB% |find "LIB\amd64;" > nul -if %errorlevel% == 0 ( - set DEST_DIR="%DIR%..\prebuilt\windows-x86_64/msvc" - set CPU_ARCH=x86_64 - goto :ARCH_FOUND -) - -echo %LIB% |find "LIB;" > nul -if %errorlevel% == 0 ( - set DEST_DIR="%DIR%..\prebuilt\windows-x86/msvc" - set CPU_ARCH=x86 - goto :ARCH_FOUND -) - -:ARCH_FOUND - -if "%DEST_DIR%" == "" ( - echo. - echo Unknown Platform %Platform%. - echo. - goto :DONE -) - -IF NOT EXIST "src\arabica.cpp" ( - echo. - echo Cannot find src\arabica.cpp - echo Run script from within arabica directory: - echo arabica $ ..\%ME% - echo. - goto :DONE -) - -devenv /upgrade vs10/Arabica.sln - -if "%CPU_ARCH%" == "x86_64" ( - devenv /build "debug|x64" vs10/Arabica.sln /project ArabicaLib - devenv /build "release|x64" vs10/Arabica.sln /project ArabicaLib -) - -if "%CPU_ARCH%" == "x86" ( - devenv /build "debug|Win32" vs10/Arabica.sln /project ArabicaLib - devenv /build "release|Win32" vs10/Arabica.sln /project ArabicaLib -) - -copy lib\Arabica-debug.lib %DEST_DIR%\lib\Arabica_d.lib -copy lib\Arabica.lib %DEST_DIR%\lib\Arabica.lib -mkdir %DEST_DIR%\include\arabica -xcopy include\*.hpp %DEST_DIR%\include\arabica /s /e - - -:DONE -pause \ No newline at end of file diff --git a/contrib/build-scripts/build-curl-ios.sh b/contrib/build-scripts/build-curl-ios.sh deleted file mode 100755 index 25c3077..0000000 --- a/contrib/build-scripts/build-curl-ios.sh +++ /dev/null @@ -1,167 +0,0 @@ -#!/bin/bash - -# -# build Curl for iOS and iOS simulator -# - -# make sure this is not set -unset MACOSX_DEPLOYMENT_TARGET - -# be ridiculously conservative with regard to ios features -export IPHONEOS_DEPLOYMENT_TARGET="1.0" - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -#SDK_VER="6.1" -SDK_VER="5.1" -DEST_DIR="${DIR}/../prebuilt/ios/${SDK_VER}-curl-build" - -if [ ! -f lib/cookie.c ]; then - echo - echo "Cannot find lib/cookie.c" - echo "Run script from within curl directory:" - echo "curl $ ../../${ME}" - echo - exit -fi - -mkdir -p ${DEST_DIR} &> /dev/null - -# see http://stackoverflow.com/questions/2424770/floating-point-comparison-in-shell-script -if [ $(bc <<< "$SDK_VER >= 6.1") -eq 1 ]; then - DEV_ARCHS="-arch armv7 -arch armv7s" -elif [ $(bc <<< "$SDK_VER >= 5.1") -eq 1 ]; then - DEV_ARCHS="-arch armv6 -arch armv7" -else - echo - echo "Building for SDK < 5.1 not supported" - exit -fi - -# -# Build for Device -# -if [ ! -d ${DEST_DIR}/device ]; then - - TOOLCHAIN_ROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer" - SYSROOT="${TOOLCHAIN_ROOT}/SDKs/iPhoneOS${SDK_VER}.sdk" - - if [ ! -d ${SYSROOT} ]; then - echo - echo "Cannot find iOS developer tools at ${SYSROOT}." - echo - exit - fi - - if [ -f Makefile ]; then - make clean - fi - - mkdir -p ${DEST_DIR}/device &> /dev/null - - ./configure \ - CPP="cpp" \ - CXXCPP="cpp" \ - CXX=${TOOLCHAIN_ROOT}/usr/bin/g++ \ - CC=${TOOLCHAIN_ROOT}/usr/bin/gcc \ - LD=${TOOLCHAIN_ROOT}/usr/bin/ld\ -r \ - CFLAGS="-O -isysroot ${SYSROOT} ${DEV_ARCHS}" \ - CXXFLAGS="-O -isysroot ${SYSROOT} ${DEV_ARCHS}" \ - --enable-ipv6 \ - --with-darwinssl \ - --host=arm-apple-darwin10 \ - --target=arm-apple-darwin10 \ - --disable-shared \ - --disable-dependency-tracking \ - LDFLAGS="-isysroot ${SYSROOT} ${DEV_ARCHS}" \ - AR=${TOOLCHAIN_ROOT}/usr/bin/ar \ - AS=${TOOLCHAIN_ROOT}/usr/bin/as \ - LIBTOOL=${TOOLCHAIN_ROOT}/usr/bin/libtool \ - STRIP=${TOOLCHAIN_ROOT}/usr/bin/strip \ - RANLIB=${TOOLCHAIN_ROOT}/usr/bin/ranlib \ - --prefix=${DEST_DIR}/device - - make -j2 install -else - echo - echo "${DEST_DIR}/device already exists - not rebuilding." - echo -fi - -# -# Simulator -# -if [ ! -d ${DEST_DIR}/simulator ]; then - - TOOLCHAIN_ROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer" - SYSROOT="${TOOLCHAIN_ROOT}/SDKs/iPhoneSimulator${SDK_VER}.sdk" - - if [ ! -d ${SYSROOT} ]; then - echo - echo "Cannot find iOS developer tools at ${SYSROOT}." - echo - exit - fi - - if [ -f Makefile ]; then - make clean - fi - - mkdir -p ${DEST_DIR}/simulator &> /dev/null - - ./configure \ - CXX=${TOOLCHAIN_ROOT}/usr/bin/llvm-g++ \ - CC=${TOOLCHAIN_ROOT}/usr/bin/llvm-gcc \ - LD=${TOOLCHAIN_ROOT}/usr/bin/ld\ -r \ - CFLAGS="-O -isysroot ${SYSROOT} -arch i386" \ - CXXFLAGS="-O -isysroot ${SYSROOT} -arch i386" \ - --enable-ipv6 \ - --with-darwinssl \ - --disable-shared \ - --disable-dependency-tracking \ - LDFLAGS="-isysroot ${SYSROOT} -arch i386" \ - AR=${TOOLCHAIN_ROOT}/usr/bin/ar \ - AS=${TOOLCHAIN_ROOT}/usr/bin/as \ - LIBTOOL=${TOOLCHAIN_ROOT}/usr/bin/libtool \ - STRIP=${TOOLCHAIN_ROOT}/usr/bin/strip \ - RANLIB=${TOOLCHAIN_ROOT}/usr/bin/ranlib \ - --prefix=${DEST_DIR}/simulator - - make -j2 install -else - echo - echo "${DEST_DIR}/device already exists - not rebuilding." - echo -fi - -echo -echo "- Creating universal binaries --------------------------------------" -echo - -LIBS=`find ${DIR}/../prebuilt/ios/*curl-build* -name *.a` -set +e -for LIB in ${LIBS}; do - LIB_BASE=`basename $LIB .a` - ARCHS=`lipo -info $LIB` - ARCHS=`expr "$ARCHS" : '.*:\(.*\)$'` - for ARCH in ${ARCHS}; do - mkdir -p ${DIR}/../prebuilt/ios/arch/${ARCH} > /dev/null - lipo -extract $ARCH $LIB -output ${DIR}/../prebuilt/ios/arch/${ARCH}/${LIB_BASE}.a \ - || cp $LIB ${DIR}/../prebuilt/ios/arch/${ARCH}/${LIB_BASE}.a - UNIQUE_LIBS=`ls ${DIR}/../prebuilt/ios/arch/${ARCH}` - done -done - -mkdir -p ${DIR}/../prebuilt/ios/lib -for LIB in ${UNIQUE_LIBS}; do - FILELIST="" - for ARCH in `ls ${DIR}/../prebuilt/ios/arch/`; do - FILELIST="${FILELIST} ${DIR}/../prebuilt/ios/arch/${ARCH}/${LIB}" - done - lipo -create ${FILELIST} -output ${DIR}/../prebuilt/ios/lib/${LIB} -done - -rm -rf ${DIR}/../prebuilt/ios/arch/ diff --git a/contrib/build-scripts/build-ffmpeg-linux.sh b/contrib/build-scripts/build-ffmpeg-linux.sh deleted file mode 100755 index b10482e..0000000 --- a/contrib/build-scripts/build-ffmpeg-linux.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -# -# build ffmpeg for Linux (Debian and Ubuntu) -# - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -CPUARCH=`uname -m` -PLATFORM_ID=`${DIR}/platform-id-linux.sh` -DEST_DIR="${DIR}/../prebuilt/${PLATFORM_ID}" - -if [ -d /tmp/build-ffmpeg ]; then - rm -rf /tmp/build-ffmpeg -fi -mkdir -p /tmp/build-ffmpeg -cd /tmp/build-ffmpeg - -wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz -tar xzvf yasm-1.2.0.tar.gz -cd yasm-1.2.0 -./configure --prefix="${DEST_DIR}" --bindir="${DEST_DIR}/bin" -make -make install -cd .. - -export PATH=${PATH}:${DEST_DIR}/bin - -git clone --depth 1 git://git.videolan.org/x264.git -cd x264 -./configure --prefix="${DEST_DIR}" --bindir="${DEST_DIR}/bin" --enable-shared --enable-pic -make -make install -cd .. - -git clone --depth 1 git://git.code.sf.net/p/opencore-amr/fdk-aac -cd fdk-aac -autoreconf -fiv -./configure --prefix="${DEST_DIR}" --enable-shared --with-pic -make -make install -cd .. - -wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz -tar xzvf opus-1.0.3.tar.gz -cd opus-1.0.3 -./configure --prefix="${DEST_DIR}" --enable-shared --with-pic -make -make install -cd .. - -git clone --depth 1 http://git.chromium.org/webm/libvpx.git -cd libvpx -./configure --prefix="${DEST_DIR}" --disable-examples --enable-shared --enable-pic -make -make install -cd .. - -git clone --depth 1 git://source.ffmpeg.org/ffmpeg -cd ffmpeg -PKG_CONFIG_PATH="${DEST_DIR}/lib/pkgconfig" -export PKG_CONFIG_PATH -./configure --prefix="${DEST_DIR}" \ - --extra-cflags="-I${DEST_DIR}/include" --extra-ldflags="-L${DEST_DIR}/lib" \ - --bindir="${DEST_DIR}/bin" --extra-libs="-ldl" --enable-gpl --enable-nonfree \ - --enable-pic --disable-programs --disable-doc --enable-shared -make -make install -cd .. - diff --git a/contrib/build-scripts/build-glog-ios.sh b/contrib/build-scripts/build-glog-ios.sh deleted file mode 100755 index bb1b1fd..0000000 --- a/contrib/build-scripts/build-glog-ios.sh +++ /dev/null @@ -1,163 +0,0 @@ -#!/bin/bash - -# -# build glog for iOS and iOS simulator -# - -# make sure this is not set -unset MACOSX_DEPLOYMENT_TARGET - -# be ridiculously conservative with regard to ios features -export IPHONEOS_DEPLOYMENT_TARGET="1.0" - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -#SDK_VER="6.1" -SDK_VER="5.1" -DEST_DIR="${DIR}/../prebuilt/ios/${SDK_VER}-glog-build" - -if [ ! -f src/glog/logging.h ]; then - echo - echo "Cannot find src/glog/logging.h" - echo "Run script from within glog directory:" - echo "glog $ ../../${ME}" - echo - exit -fi - -mkdir -p ${DEST_DIR} &> /dev/null - -# see http://stackoverflow.com/questions/2424770/floating-point-comparison-in-shell-script -if [ $(bc <<< "$SDK_VER >= 6.1") -eq 1 ]; then - DEV_ARCHS="-arch armv7 -arch armv7s" -elif [ $(bc <<< "$SDK_VER >= 5.1") -eq 1 ]; then - DEV_ARCHS="-arch armv6 -arch armv7" -else - echo - echo "Building for SDK < 5.1 not supported" - exit -fi - -# -# Build for Device -# -if [ ! -d ${DEST_DIR}/device ]; then - - TOOLCHAIN_ROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer" - SYSROOT="${TOOLCHAIN_ROOT}/SDKs/iPhoneOS${SDK_VER}.sdk" - - if [ ! -d ${SYSROOT} ]; then - echo - echo "Cannot find iOS developer tools at ${SYSROOT}." - echo - exit - fi - - if [ -f Makefile ]; then - make clean - fi - - mkdir -p ${DEST_DIR}/device &> /dev/null - - ./configure \ - CPP="cpp" \ - CXXCPP="cpp" \ - CXX=${TOOLCHAIN_ROOT}/usr/bin/g++ \ - CC=${TOOLCHAIN_ROOT}/usr/bin/gcc \ - LD=${TOOLCHAIN_ROOT}/usr/bin/ld\ -r \ - CFLAGS="-O -isysroot ${SYSROOT} ${DEV_ARCHS}" \ - CXXFLAGS="-O -isysroot ${SYSROOT} ${DEV_ARCHS}" \ - --host=arm-apple-darwin10 \ - --target=arm-apple-darwin10 \ - --disable-shared \ - --disable-dependency-tracking \ - LDFLAGS="-isysroot ${SYSROOT} ${DEV_ARCHS}" \ - AR=${TOOLCHAIN_ROOT}/usr/bin/ar \ - AS=${TOOLCHAIN_ROOT}/usr/bin/as \ - LIBTOOL=${TOOLCHAIN_ROOT}/usr/bin/libtool \ - STRIP=${TOOLCHAIN_ROOT}/usr/bin/strip \ - RANLIB=${TOOLCHAIN_ROOT}/usr/bin/ranlib \ - --prefix=${DEST_DIR}/device - - make -j2 install -else - echo - echo "${DEST_DIR}/device already exists - not rebuilding." - echo -fi - -# -# Simulator -# -if [ ! -d ${DEST_DIR}/simulator ]; then - - TOOLCHAIN_ROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer" - SYSROOT="${TOOLCHAIN_ROOT}/SDKs/iPhoneSimulator${SDK_VER}.sdk" - - if [ ! -d ${SYSROOT} ]; then - echo - echo "Cannot find iOS developer tools at ${SYSROOT}." - echo - exit - fi - - if [ -f Makefile ]; then - make clean - fi - - mkdir -p ${DEST_DIR}/simulator &> /dev/null - - ./configure \ - CXX=${TOOLCHAIN_ROOT}/usr/bin/llvm-g++ \ - CC=${TOOLCHAIN_ROOT}/usr/bin/llvm-gcc \ - LD=${TOOLCHAIN_ROOT}/usr/bin/ld\ -r \ - CFLAGS="-O -isysroot ${SYSROOT} -arch i386" \ - CXXFLAGS="-O -isysroot ${SYSROOT} -arch i386" \ - --disable-shared \ - --disable-dependency-tracking \ - LDFLAGS="-isysroot ${SYSROOT} -arch i386" \ - AR=${TOOLCHAIN_ROOT}/usr/bin/ar \ - AS=${TOOLCHAIN_ROOT}/usr/bin/as \ - LIBTOOL=${TOOLCHAIN_ROOT}/usr/bin/libtool \ - STRIP=${TOOLCHAIN_ROOT}/usr/bin/strip \ - RANLIB=${TOOLCHAIN_ROOT}/usr/bin/ranlib \ - --prefix=${DEST_DIR}/simulator - - make -j2 install -else - echo - echo "${DEST_DIR}/device already exists - not rebuilding." - echo -fi - -echo -echo "- Creating universal binaries --------------------------------------" -echo - -LIBS=`find ${DIR}/../prebuilt/ios/*glog-build* -name *.a` -set +e -for LIB in ${LIBS}; do - LIB_BASE=`basename $LIB .a` - ARCHS=`lipo -info $LIB` - ARCHS=`expr "$ARCHS" : '.*:\(.*\)$'` - for ARCH in ${ARCHS}; do - mkdir -p ${DIR}/../prebuilt/ios/arch/${ARCH} > /dev/null - lipo -extract $ARCH $LIB -output ${DIR}/../prebuilt/ios/arch/${ARCH}/${LIB_BASE}.a \ - || cp $LIB ${DIR}/../prebuilt/ios/arch/${ARCH}/${LIB_BASE}.a - UNIQUE_LIBS=`ls ${DIR}/../prebuilt/ios/arch/${ARCH}` - done -done - -mkdir -p ${DIR}/../prebuilt/ios/lib -for LIB in ${UNIQUE_LIBS}; do - FILELIST="" - for ARCH in `ls ${DIR}/../prebuilt/ios/arch/`; do - FILELIST="${FILELIST} ${DIR}/../prebuilt/ios/arch/${ARCH}/${LIB}" - done - lipo -create ${FILELIST} -output ${DIR}/../prebuilt/ios/lib/${LIB} -done - -rm -rf ${DIR}/../prebuilt/ios/arch/ diff --git a/contrib/build-scripts/build-glog-linux.sh b/contrib/build-scripts/build-glog-linux.sh deleted file mode 100755 index 6fa5d78..0000000 --- a/contrib/build-scripts/build-glog-linux.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -# -# build libevent for linux -# - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -CPUARCH=`uname -m` -PLATFORM_ID=`${DIR}/platform-id-linux.sh` -DEST_DIR="${DIR}/../prebuilt/${PLATFORM_ID}" - -if [ ! -f src/glog/log_severity.h ]; then - echo - echo "Cannot find src/glog/log_severity.h" - echo "Run script from within glog directory" - echo - exit -fi - -if [ -f Makefile ]; then - make clean -fi - -./configure \ -CFLAGS="-g" \ -CXXFLAGS="-g" \ -LDFLAGS="-g" \ ---disable-rtti \ ---enable-static \ ---with-pic \ ---prefix=${DEST_DIR} - -make -make install # once for headers -rm ${DEST_DIR}/lib/libglog* -cp ./.libs/libglog.a ${DEST_DIR}/lib/libglog_d.a -make clean - -./configure \ -CFLAGS="-g" \ -CXXFLAGS="-g" \ -LDFLAGS="-g" \ ---disable-rtti \ ---enable-static \ ---with-pic - -make -cp ./.libs/libglog.a ${DEST_DIR}/lib/libglog.a diff --git a/contrib/build-scripts/build-glog-macosx.sh b/contrib/build-scripts/build-glog-macosx.sh deleted file mode 100755 index a1d6cd4..0000000 --- a/contrib/build-scripts/build-glog-macosx.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash - -# -# build libevent for MacOSX -# - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -MACOSX_VER=`/usr/bin/sw_vers -productVersion` -MACOSX_COMP=(`echo $MACOSX_VER | tr '.' ' '`) -PLATFORM_ID=`${DIR}/platform-id-mac.sh` -DEST_DIR="${DIR}/../prebuilt/${PLATFORM_ID}" - -if [ ! -f src/glog/log_severity.h ]; then - echo - echo "Cannot find src/glog/log_severity.h" - echo "Run script from within glog directory" - echo - exit -fi - -if [ -f Makefile ]; then - make clean -fi - -if [ ${MACOSX_COMP[1]} -lt 9 ]; then - MACOSX_VERSION_MIN="-mmacosx-version-min=10.6" -fi - -./configure \ -CFLAGS="-g ${MACOSX_VERSION_MIN} -arch x86_64" \ -CXXFLAGS="-g ${MACOSX_VERSION_MIN} -arch x86_64" \ -LDFLAGS="-g ${MACOSX_VERSION_MIN} -arch x86_64" \ ---disable-rtti \ ---enable-static \ ---with-pic \ ---prefix=${DEST_DIR} - -make -cp ./.libs/libglog.a ./libglog_d.x86_64.a -make install # once for headers -rm ${DEST_DIR}/lib/libglog* -make clean - - -./configure \ -CFLAGS="${MACOSX_VERSION_MIN} -arch x86_64" \ -CXXFLAGS="${MACOSX_VERSION_MIN} -arch x86_64" \ -LDFLAGS="${MACOSX_VERSION_MIN} -arch x86_64" \ ---disable-rtti \ ---enable-static \ ---with-pic - -make -cp ./.libs/libglog.a ./libglog.x86_64.a -make clean - - -./configure \ -CFLAGS="-g ${MACOSX_VERSION_MIN} -arch i386" \ -CXXFLAGS="-g ${MACOSX_VERSION_MIN} -arch i386" \ -LDFLAGS="-g ${MACOSX_VERSION_MIN} -arch i386" \ ---disable-rtti \ ---enable-static \ ---with-pic - -make -cp ./.libs/libglog.a ./libglog_d.i386.a -make clean - - -./configure \ -CFLAGS="${MACOSX_VERSION_MIN} -arch i386" \ -CXXFLAGS="${MACOSX_VERSION_MIN} -arch i386" \ -LDFLAGS="${MACOSX_VERSION_MIN} -arch i386" \ ---disable-rtti \ ---enable-static \ ---with-pic - -make -cp ./.libs/libglog.a ./libglog.i386.a -make clean - -lipo -create ./libglog.i386.a ./libglog.x86_64.a -output ${DEST_DIR}/lib/libglog.a -lipo -create ./libglog_d.i386.a ./libglog_d.x86_64.a -output ${DEST_DIR}/lib/libglog_d.a diff --git a/contrib/build-scripts/build-glog-windows.bat b/contrib/build-scripts/build-glog-windows.bat deleted file mode 100644 index f5b97e9..0000000 --- a/contrib/build-scripts/build-glog-windows.bat +++ /dev/null @@ -1,69 +0,0 @@ -@ECHO off - -set ME=%0 -set DIR=%~dp0 - -if "%VSINSTALLDIR%" == "" ( - echo. - echo %VSINSTALLDIR is not defined, run from within Visual Studio Command Prompt. - echo. - goto :DONE -) - -echo %LIB% |find "LIB\amd64;" > nul -if %errorlevel% == 0 ( - set DEST_DIR="%DIR%..\prebuilt\windows-x86_64/msvc" - set CPU_ARCH=x86_64 - goto :ARCH_FOUND -) - -echo %LIB% |find "LIB;" > nul -if %errorlevel% == 0 ( - set DEST_DIR="%DIR%..\prebuilt\windows-x86/msvc" - set CPU_ARCH=x86 - goto :ARCH_FOUND -) - -:ARCH_FOUND - -if "%DEST_DIR%" == "" ( - echo. - echo Unknown Platform %Platform%. - echo. - goto :DONE -) - -IF NOT EXIST "src\glog\log_severity.h" ( - echo. - echo Cannot find src\glog\log_severity.h - echo Run script from within glog directory: - echo glog $ ..\%ME% - echo. - goto :DONE -) - -devenv /upgrade google-glog.sln - -if "%CPU_ARCH%" == "x86_64" ( - devenv /rebuild "debug|x64" google-glog.sln /project libglog_static - devenv /rebuild "release|x64" google-glog.sln /project libglog_static -) - -if "%CPU_ARCH%" == "x86" ( -devenv /rebuild "debug|Win32" google-glog.sln /project libglog_static -devenv /rebuild "release|Win32" google-glog.sln /project libglog_static -) - - -echo. -echo If this failed, just add "typedef size_t ssize_t;" in logging.cc -echo. - -copy Debug\libglog_static.lib %DEST_DIR%\lib\libglog_static_d.lib -copy Release\libglog_static.lib %DEST_DIR%\lib\libglog_static.lib -mkdir %DEST_DIR%\include\glog -xcopy src\windows\glog %DEST_DIR%\include /s /e - - -:DONE -pause \ No newline at end of file diff --git a/contrib/build-scripts/build-libevent-ios.sh b/contrib/build-scripts/build-libevent-ios.sh deleted file mode 100755 index 1060f12..0000000 --- a/contrib/build-scripts/build-libevent-ios.sh +++ /dev/null @@ -1,169 +0,0 @@ -#!/bin/bash - -# -# build libevent for iOS and iOS simulator -# - -# make sure this is not set -unset MACOSX_DEPLOYMENT_TARGET - -# be ridiculously conservative with regard to ios features -export IPHONEOS_DEPLOYMENT_TARGET="1.0" - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -#SDK_VER="6.1" -SDK_VER="5.1" -DEST_DIR="${DIR}/../prebuilt/ios/${SDK_VER}-libevent-build" - -if [ ! -f event.c ]; then - echo - echo "Cannot find event.c" - echo "Run script from within libevent directory:" - echo "libevent $ ../../${ME}" - echo - exit -fi - -mkdir -p ${DEST_DIR} &> /dev/null - -# see http://stackoverflow.com/questions/2424770/floating-point-comparison-in-shell-script -if [ $(bc <<< "$SDK_VER >= 6.1") -eq 1 ]; then - DEV_ARCHS="-arch armv7 -arch armv7s" -elif [ $(bc <<< "$SDK_VER >= 5.1") -eq 1 ]; then - DEV_ARCHS="-arch armv6 -arch armv7" -else - echo - echo "Building for SDK < 5.1 not supported" - exit -fi - -# -# Build for Device -# -if [ ! -d ${DEST_DIR}/device ]; then - - TOOLCHAIN_ROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer" - SYSROOT="${TOOLCHAIN_ROOT}/SDKs/iPhoneOS${SDK_VER}.sdk" - - if [ ! -d ${SYSROOT} ]; then - echo - echo "Cannot find iOS developer tools at ${SYSROOT}." - echo - exit - fi - - if [ -f Makefile ]; then - make clean - fi - - mkdir -p ${DEST_DIR}/device &> /dev/null - - ./configure \ - CPP="cpp" \ - CXXCPP="cpp" \ - CXX=${TOOLCHAIN_ROOT}/usr/bin/g++ \ - CC=${TOOLCHAIN_ROOT}/usr/bin/gcc \ - LD=${TOOLCHAIN_ROOT}/usr/bin/ld\ -r \ - CFLAGS="-O -isysroot ${SYSROOT} ${DEV_ARCHS}" \ - CXXFLAGS="-O -isysroot ${SYSROOT} ${DEV_ARCHS}" \ - --disable-debug-mode \ - --disable-libevent-regress \ - --disable-openssl \ - --host=arm-apple-darwin10 \ - --target=arm-apple-darwin10 \ - --disable-shared \ - --disable-dependency-tracking \ - LDFLAGS="-isysroot ${SYSROOT} ${DEV_ARCHS}" \ - AR=${TOOLCHAIN_ROOT}/usr/bin/ar \ - AS=${TOOLCHAIN_ROOT}/usr/bin/as \ - LIBTOOL=${TOOLCHAIN_ROOT}/usr/bin/libtool \ - STRIP=${TOOLCHAIN_ROOT}/usr/bin/strip \ - RANLIB=${TOOLCHAIN_ROOT}/usr/bin/ranlib \ - --prefix=${DEST_DIR}/device - - make -j2 install -else - echo - echo "${DEST_DIR}/device already exists - not rebuilding." - echo -fi - -# -# Simulator -# -if [ ! -d ${DEST_DIR}/simulator ]; then - - TOOLCHAIN_ROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer" - SYSROOT="${TOOLCHAIN_ROOT}/SDKs/iPhoneSimulator${SDK_VER}.sdk" - - if [ ! -d ${SYSROOT} ]; then - echo - echo "Cannot find iOS developer tools at ${SYSROOT}." - echo - exit - fi - - if [ -f Makefile ]; then - make clean - fi - - mkdir -p ${DEST_DIR}/simulator &> /dev/null - - ./configure \ - CXX=${TOOLCHAIN_ROOT}/usr/bin/llvm-g++ \ - CC=${TOOLCHAIN_ROOT}/usr/bin/llvm-gcc \ - LD=${TOOLCHAIN_ROOT}/usr/bin/ld\ -r \ - CFLAGS="-O -isysroot ${SYSROOT} -arch i386" \ - CXXFLAGS="-O -isysroot ${SYSROOT} -arch i386" \ - --disable-debug-mode \ - --disable-libevent-regress \ - --disable-openssl \ - --disable-shared \ - --disable-dependency-tracking \ - LDFLAGS="-isysroot ${SYSROOT} -arch i386" \ - AR=${TOOLCHAIN_ROOT}/usr/bin/ar \ - AS=${TOOLCHAIN_ROOT}/usr/bin/as \ - LIBTOOL=${TOOLCHAIN_ROOT}/usr/bin/libtool \ - STRIP=${TOOLCHAIN_ROOT}/usr/bin/strip \ - RANLIB=${TOOLCHAIN_ROOT}/usr/bin/ranlib \ - --prefix=${DEST_DIR}/simulator - - make -j2 install -else - echo - echo "${DEST_DIR}/device already exists - not rebuilding." - echo -fi - -echo -echo "- Creating universal binaries --------------------------------------" -echo - -LIBS=`find ${DIR}/../prebuilt/ios/*libevent-build* -name *.a` -set +e -for LIB in ${LIBS}; do - LIB_BASE=`basename $LIB .a` - ARCHS=`lipo -info $LIB` - ARCHS=`expr "$ARCHS" : '.*:\(.*\)$'` - for ARCH in ${ARCHS}; do - mkdir -p ${DIR}/../prebuilt/ios/arch/${ARCH} > /dev/null - lipo -extract $ARCH $LIB -output ${DIR}/../prebuilt/ios/arch/${ARCH}/${LIB_BASE}.a \ - || cp $LIB ${DIR}/../prebuilt/ios/arch/${ARCH}/${LIB_BASE}.a - UNIQUE_LIBS=`ls ${DIR}/../prebuilt/ios/arch/${ARCH}` - done -done - -mkdir -p ${DIR}/../prebuilt/ios/lib -for LIB in ${UNIQUE_LIBS}; do - FILELIST="" - for ARCH in `ls ${DIR}/../prebuilt/ios/arch/`; do - FILELIST="${FILELIST} ${DIR}/../prebuilt/ios/arch/${ARCH}/${LIB}" - done - lipo -create ${FILELIST} -output ${DIR}/../prebuilt/ios/lib/${LIB} -done - -rm -rf ${DIR}/../prebuilt/ios/arch/ diff --git a/contrib/build-scripts/build-libevent-linux.sh b/contrib/build-scripts/build-libevent-linux.sh deleted file mode 100755 index 401e16d..0000000 --- a/contrib/build-scripts/build-libevent-linux.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# -# build libevent for linux -# - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -CPUARCH=`uname -m` -PLATFORM_ID=`${DIR}/platform-id-linux.sh` -DEST_DIR="${DIR}/../prebuilt/${PLATFORM_ID}" - -if [ ! -f event.c ]; then - echo - echo "Cannot find event.c" - echo "Run script from within libevent directory" - echo - exit -fi - -#rm lib*.a - -if [ -f Makefile ]; then - make clean -fi - -./configure \ -CFLAGS="-g" \ -CXXFLAGS="-g" \ -LDFLAGS="-g" \ ---enable-gcc-hardening \ ---with-pic \ ---prefix=${DEST_DIR} - -make -cp ./.libs/libevent.a ./libevent_d.a -cp ./.libs/libevent_core.a ./libevent_core_d.a -cp ./.libs/libevent_extra.a ./libevent_extra_d.a -cp ./.libs/libevent_openssl.a ./libevent_openssl_d.a -cp ./.libs/libevent_pthreads.a ./libevent_pthreads_d.a -make install # once for headers -rm ${DEST_DIR}/lib/libevent* -make clean - - -./configure \ ---enable-gcc-hardening \ ---with-pic \ ---disable-debug-mode \ ---disable-libevent-install - -make -cp ./.libs/libevent.a ./libevent.a -cp ./.libs/libevent_core.a ./libevent_core.a -cp ./.libs/libevent_extra.a ./libevent_extra.a -cp ./.libs/libevent_openssl.a ./libevent_openssl.a -cp ./.libs/libevent_pthreads.a ./libevent_pthreads.a -make clean - -cp ./*.a ${DEST_DIR}/lib diff --git a/contrib/build-scripts/build-libevent-macosx.sh b/contrib/build-scripts/build-libevent-macosx.sh deleted file mode 100755 index 5423992..0000000 --- a/contrib/build-scripts/build-libevent-macosx.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/bash - -# -# build libevent for MacOSX -# - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -MACOSX_VER=`/usr/bin/sw_vers -productVersion` -MACOSX_COMP=(`echo $MACOSX_VER | tr '.' ' '`) -PLATFORM_ID=`${DIR}/platform-id-mac.sh` -DEST_DIR="${DIR}/../prebuilt/${PLATFORM_ID}" - -if [ ! -f event.c ]; then - echo - echo "Cannot find event.c" - echo "Run script from within libevent directory" - echo - exit -fi - -if [ -f Makefile ]; then - make clean -fi - -if [ ${MACOSX_COMP[1]} -lt 9 ]; then - MACOSX_VERSION_MIN="-mmacosx-version-min=10.6" -fi - -./configure \ -CFLAGS="-g ${MACOSX_VERSION_MIN} -arch x86_64" \ -CXXFLAGS="-g ${MACOSX_VERSION_MIN} -arch x86_64" \ -LDFLAGS="-g ${MACOSX_VERSION_MIN} -arch x86_64" \ ---enable-gcc-hardening \ ---with-pic \ ---prefix=${DEST_DIR} - -# not available on 10.6 -sed -iold s/define\ HAVE_ARC4RANDOM_BUF\ 1/undef\ HAVE_ARC4RANDOM_BUF/ config.h - -make -cp ./.libs/libevent.a ./libevent_d.x86_64.a -cp ./.libs/libevent_core.a ./libevent_core_d.x86_64.a -cp ./.libs/libevent_extra.a ./libevent_extra_d.x86_64.a -cp ./.libs/libevent_openssl.a ./libevent_openssl_d.x86_64.a -cp ./.libs/libevent_pthreads.a ./libevent_pthreads_d.x86_64.a -make install # once for headers -rm ${DEST_DIR}/lib/libevent* -make clean - -./configure \ -CFLAGS="${MACOSX_VERSION_MIN} -arch x86_64" \ -CXXFLAGS="${MACOSX_VERSION_MIN} -arch x86_64" \ -LDFLAGS="${MACOSX_VERSION_MIN} -arch x86_64" \ ---enable-gcc-hardening \ ---with-pic \ ---disable-debug-mode \ ---disable-libevent-install - -sed -iold s/define\ HAVE_ARC4RANDOM_BUF\ 1/undef\ HAVE_ARC4RANDOM_BUF/ config.h - -make -cp ./.libs/libevent.a ./libevent.x86_64.a -cp ./.libs/libevent_core.a ./libevent_core.x86_64.a -cp ./.libs/libevent_extra.a ./libevent_extra.x86_64.a -cp ./.libs/libevent_openssl.a ./libevent_openssl.x86_64.a -cp ./.libs/libevent_pthreads.a ./libevent_pthreads.x86_64.a -make clean - - -./configure \ -CFLAGS="-g ${MACOSX_VERSION_MIN} -arch i386" \ -CXXFLAGS="-g ${MACOSX_VERSION_MIN} -arch i386" \ -LDFLAGS="-g ${MACOSX_VERSION_MIN} -arch i386" \ ---enable-gcc-hardening \ ---with-pic \ ---disable-libevent-install - -sed -iold s/define\ HAVE_ARC4RANDOM_BUF\ 1/undef\ HAVE_ARC4RANDOM_BUF/ config.h - -make -cp ./.libs/libevent.a ./libevent_d.i386.a -cp ./.libs/libevent_core.a ./libevent_core_d.i386.a -cp ./.libs/libevent_extra.a ./libevent_extra_d.i386.a -cp ./.libs/libevent_openssl.a ./libevent_openssl_d.i386.a -cp ./.libs/libevent_pthreads.a ./libevent_pthreads_d.i386.a -make clean - -./configure \ -CFLAGS="${MACOSX_VERSION_MIN} -arch i386" \ -CXXFLAGS="${MACOSX_VERSION_MIN} -arch i386" \ -LDFLAGS="${MACOSX_VERSION_MIN} -arch i386" \ ---enable-gcc-hardening \ ---with-pic \ ---disable-debug-mode \ ---disable-libevent-install - -sed -iold s/define\ HAVE_ARC4RANDOM_BUF\ 1/undef\ HAVE_ARC4RANDOM_BUF/ config.h - -make -cp ./.libs/libevent.a ./libevent.i386.a -cp ./.libs/libevent_core.a ./libevent_core.i386.a -cp ./.libs/libevent_extra.a ./libevent_extra.i386.a -cp ./.libs/libevent_openssl.a ./libevent_openssl.i386.a -cp ./.libs/libevent_pthreads.a ./libevent_pthreads.i386.a -make clean - -lipo -create ./libevent.i386.a ./libevent.x86_64.a -output ${DEST_DIR}/lib/libevent.a -lipo -create ./libevent_core.i386.a ./libevent_core.x86_64.a -output ${DEST_DIR}/lib/libevent_core.a -lipo -create ./libevent_extra.i386.a ./libevent_extra.x86_64.a -output ${DEST_DIR}/lib/libevent_extra.a -lipo -create ./libevent_openssl.i386.a ./libevent_openssl.x86_64.a -output ${DEST_DIR}/lib/libevent_openssl.a -lipo -create ./libevent_pthreads.i386.a ./libevent_pthreads.x86_64.a -output ${DEST_DIR}/lib/libevent_pthreads.a - -lipo -create ./libevent_d.i386.a ./libevent_d.x86_64.a -output ${DEST_DIR}/lib/libevent_d.a -lipo -create ./libevent_core_d.i386.a ./libevent_core_d.x86_64.a -output ${DEST_DIR}/lib/libevent_core_d.a -lipo -create ./libevent_extra_d.i386.a ./libevent_extra_d.x86_64.a -output ${DEST_DIR}/lib/libevent_extra_d.a -lipo -create ./libevent_openssl_d.i386.a ./libevent_openssl_d.x86_64.a -output ${DEST_DIR}/lib/libevent_openssl_d.a -lipo -create ./libevent_pthreads_d.i386.a ./libevent_pthreads_d.x86_64.a -output ${DEST_DIR}/lib/libevent_pthreads_d.a diff --git a/contrib/build-scripts/build-libevent-windows.bat b/contrib/build-scripts/build-libevent-windows.bat deleted file mode 100644 index 1f619b5..0000000 --- a/contrib/build-scripts/build-libevent-windows.bat +++ /dev/null @@ -1,51 +0,0 @@ -@ECHO off - -set ME=%0 -set DIR=%~dp0 - -if "%VSINSTALLDIR%" == "" ( - echo. - echo %VSINSTALLDIR is not defined, run from within Visual Studio Command Prompt. - echo. - goto :DONE -) - -echo %LIB% |find "LIB\amd64;" > nul -if %errorlevel% == 0 ( - set DEST_DIR="%DIR%..\prebuilt\windows-x86_64/msvc" - goto :ARCH_FOUND -) - -echo %LIB% |find "LIB;" > nul -if %errorlevel% == 0 ( - set DEST_DIR="%DIR%..\prebuilt\windows-x86/msvc" - goto :ARCH_FOUND -) - -:ARCH_FOUND - -if "%DEST_DIR%" == "" ( - echo. - echo Unknown Platform %Platform%. - echo. - goto :DONE -) - -IF NOT EXIST "event.c" ( - echo. - echo Cannot find event.c - echo Run script from within libevent directory: - echo libevent $ ..\%ME% - echo. - goto :DONE -) - -nmake -f Makefile.nmake clean -nmake -f Makefile.nmake - -copy libevent_core.lib %DEST_DIR%\lib -copy libevent_extras.lib %DEST_DIR%\lib -copy libevent.lib %DEST_DIR%\lib - -:DONE -pause \ No newline at end of file diff --git a/contrib/build-scripts/build-swi-linux.sh b/contrib/build-scripts/build-swi-linux.sh deleted file mode 100755 index 239d292..0000000 --- a/contrib/build-scripts/build-swi-linux.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# -# build SWI Prolog for Linux -# - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -CPUARCH=`uname -m` -#DEST_DIR="${DIR}/../prebuilt/linux-${CPUARCH}/gnu" -PLATFORM_ID=`${DIR}/platform-id-linux.sh` -DEST_DIR="${DIR}/../prebuilt/${PLATFORM_ID}" -VERSION=`cat VERSION` - -if [ ! -f src/pl-main.c ]; then - echo - echo "Cannot find src/pl-main.c" - echo "Run script from within SWI prolog directory:" - echo "pl-devel$ ../../${ME}" - echo - exit -fi - -./prepare -cd src -if [ -f Makefile ]; then - make clean -fi - -#CPPFLAGS="-DHAVE_CURSES_H=0 -DHAVE_TGETENT=0 -DHAVE_TCSETATTR=0 -DHAVE_TERM_H=0 -DHAVE_LIBNCURSES=0" \ - -./configure \ -CFLAGS="" \ -CXXFLAGS="" \ -LDFLAGS="" \ ---disable-gmp --disable-readline \ ---prefix=${DEST_DIR} - -sed -ie 's/define HAVE_CURSES_H 1/undef HAVE_CURSES_H/' config.h -sed -ie 's/define HAVE_TGETENT 1/undef HAVE_TGETENT/' config.h -sed -ie 's/define HAVE_TCSETATTR 1/undef HAVE_TCSETATTR/' config.h -sed -ie 's/define HAVE_TERM_H 1/undef HAVE_TERM_H/' config.h -sed -ie 's/define HAVE_LIBNCURSES 1/undef HAVE_LIBNCURSES/' config.h - -make -j2 -make install -make clean - -cd ../packages/cpp -# ./configure --prefix=${DEST_DIR} -# make install - -cp SWI-cpp.h ${DEST_DIR}/lib/swipl-${VERSION}/include - -# export PATH=$PATH:${DEST_DIR}/lib/swipl-6.3.5/bin/x86_64-darwin12.2.0/ - - -rm -rf ${DEST_DIR}/bin -rm -rf ${DEST_DIR}/share -rm -rf ${DEST_DIR}/lib/pkgconfig \ No newline at end of file diff --git a/contrib/build-scripts/build-swi-macosx.sh b/contrib/build-scripts/build-swi-macosx.sh deleted file mode 100755 index 289327d..0000000 --- a/contrib/build-scripts/build-swi-macosx.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -# -# build SWI Prolog for MacOSX -# - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -MACOSX_VER=`/usr/bin/sw_vers -productVersion` -MACOSX_COMP=(`echo $MACOSX_VER | tr '.' ' '`) -PLATFORM_ID=`${DIR}/platform-id-mac.sh` -DEST_DIR="${DIR}/../prebuilt/${PLATFORM_ID}" -VERSION=`cat VERSION` - -if [ ! -f src/pl-main.c ]; then - echo - echo "Cannot find src/pl-main.c" - echo "Run script from within SWI prolog directory:" - echo "pl-devel$ ../../${ME}" - echo - exit -fi - -./prepare -cd src -if [ -f Makefile ]; then - make clean -fi - -if [ ${MACOSX_COMP[1]} -lt 9 ]; then - export CXXFLAGS="-g -mmacosx-version-min=10.6 -stdlib=libstdc++ -arch x86_64 -arch i386" - export CFLAGS="-g -mmacosx-version-min=10.6 -arch x86_64 -arch i386" - export LDFLAGS="-stdlib=libstdc++" -else - export CXXFLAGS="-g -mmacosx-version-min=10.7 -stdlib=libc++ -arch x86_64 -arch i386" - export CFLAGS="-g -mmacosx-version-min=10.7 -stdlib=libc++ -arch x86_64 -arch i386" - export LDFLAGS="-stdlib=libc++" -fi - -#CPPFLAGS="-DHAVE_CURSES_H=0 -DHAVE_TGETENT=0 -DHAVE_TCSETATTR=0 -DHAVE_TERM_H=0 -DHAVE_LIBNCURSES=0" \ - -./configure \ ---disable-gmp --disable-readline \ ---without-jpl \ ---prefix=${DEST_DIR} - -sed -ie 's/define HAVE_CURSES_H 1/undef HAVE_CURSES_H/' config.h -sed -ie 's/define HAVE_TGETENT 1/undef HAVE_TGETENT/' config.h -sed -ie 's/define HAVE_TCSETATTR 1/undef HAVE_TCSETATTR/' config.h -sed -ie 's/define HAVE_TERM_H 1/undef HAVE_TERM_H/' config.h -sed -ie 's/define HAVE_LIBNCURSES 1/undef HAVE_LIBNCURSES/' config.h - -make -j2 -make install -make clean - -cd ../packages/cpp -# ./configure --prefix=${DEST_DIR} -# make install - -cp SWI-cpp.h ${DEST_DIR}/lib/swipl-${VERSION}/include - -# export PATH=$PATH:${DEST_DIR}/lib/swipl-6.3.5/bin/x86_64-darwin12.2.0/ - - -rm -rf ${DEST_DIR}/bin -rm -rf ${DEST_DIR}/share -rm -rf ${DEST_DIR}/lib/pkgconfig \ No newline at end of file diff --git a/contrib/build-scripts/build-uscxml-android.sh b/contrib/build-scripts/build-uscxml-android.sh deleted file mode 100755 index 9cda4af..0000000 --- a/contrib/build-scripts/build-uscxml-android.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash - -# -# build all of uscxml for android -# - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -CWD=`pwd` -BUILD_DIR="/tmp/build-uscxml-android" - -rm -rf ${BUILD_DIR} && mkdir -p ${BUILD_DIR} &> /dev/null -cd ${BUILD_DIR} - - -if [ ! -d "${ANDROID_NDK}" ]; then - echo - echo No Android NDK at ${ANDROID_NDK} - echo export ANDROID_NDK as the NDK root - echo - exit -fi -echo -echo Using Android NDK at ${ANDROID_NDK} -echo - -#. ${DIR}/find-android-ndk.sh - -# ANDROID_ABI=armeabi-v7a - specifies the target Application Binary -# Interface (ABI). This option nearly matches to the APP_ABI variable -# used by ndk-build tool from Android NDK. -# -# Possible targets are: -# "armeabi" - matches to the NDK ABI with the same name. -# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. -# "armeabi-v7a" - matches to the NDK ABI with the same name. -# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. -# "armeabi-v7a with NEON" - same as armeabi-v7a, but -# sets NEON as floating-point unit -# "armeabi-v7a with VFPV3" - same as armeabi-v7a, but -# sets VFPV3 as floating-point unit (has 32 registers instead of 16). -# "armeabi-v6 with VFP" - tuned for ARMv6 processors having VFP. -# "x86" - matches to the NDK ABI with the same name. -# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. -# "mips" - matches to the NDK ABI with the same name -# (not testes on real devices) - -mkdir -p ${BUILD_DIR} &> /dev/null -cd ${BUILD_DIR} - -rm -rf * -cmake ${DIR}/../../ \ --DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-Android.cmake \ --DBUILD_SHARED_LIBS=OFF \ --DANDROID_ABI="armeabi" \ --DCMAKE_BUILD_TYPE=Debug -make -j2 -make -j2 java - -rm -rf * -cmake ${DIR}/../../ \ --DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-Android.cmake \ --DBUILD_SHARED_LIBS=OFF \ --DANDROID_ABI="armeabi" \ --DCMAKE_BUILD_TYPE=Release -make -j2 -make -j2 java - -rm -rf * -cmake ${DIR}/../../ \ --DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-Android.cmake \ --DBUILD_SHARED_LIBS=OFF \ --DANDROID_ABI="x86" \ --DCMAKE_BUILD_TYPE=Debug -make -j2 -make -j2 java - -rm -rf * -cmake ${DIR}/../../ \ --DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-Android.cmake \ --DBUILD_SHARED_LIBS=OFF \ --DANDROID_ABI="x86" \ --DCMAKE_BUILD_TYPE=Release -make -j2 -make -j2 java - diff --git a/contrib/build-scripts/build-uscxml-ios.sh b/contrib/build-scripts/build-uscxml-ios.sh deleted file mode 100755 index f2fbee7..0000000 --- a/contrib/build-scripts/build-uscxml-ios.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash - -# -# build all of uscxml for iOS and iOS simulator -# - -# make sure this is not set -unset MACOSX_DEPLOYMENT_TARGET - -# be ridiculously conservative with regard to ios features - -if [ -z "${IPHONEOS_DEPLOYMENT_TARGET+xxx}" ]; then - export IPHONEOS_DEPLOYMENT_TARGET="1.0" -fi - -if [ -z "${IOS_SDK_VERSION+xxx}" ]; then - export IOS_SDK_VERSION=7.1 -fi - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -CWD=`pwd` -BUILD_DIR="/tmp/build-uscxml-ios" - -#rm -rf ${BUILD_DIR} && mkdir -p ${BUILD_DIR} &> /dev/null - -# -# Build device with older SDK for old architectures -# -# export IOS_SDK_VERSION=5.1 -# -# mkdir -p ${BUILD_DIR}/device-${IOS_SDK_VERSION}-debug &> /dev/null -# cd ${BUILD_DIR}/device-${IOS_SDK_VERSION}-debug -# cmake ${DIR}/../../ -DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-iOS.cmake -DDIST_PREPARE=ON -DCMAKE_BUILD_TYPE=Debug -# make -j4 -# -# mkdir -p ${BUILD_DIR}/device-${IOS_SDK_VERSION}-release &> /dev/null -# cd ${BUILD_DIR}/device-${IOS_SDK_VERSION}-release -# cmake ${DIR}/../../ -DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-iOS.cmake -DDIST_PREPARE=ON -DCMAKE_BUILD_TYPE=Release -# make -j4 - -# -# Build device and sim with current SDK -# - -mkdir -p ${BUILD_DIR}/device-${IOS_SDK_VERSION}-debug &> /dev/null -cd ${BUILD_DIR}/device-${IOS_SDK_VERSION}-debug -cmake ${DIR}/../../ -DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-iOS.cmake -DDIST_PREPARE=ON -DCMAKE_BUILD_TYPE=Debug -make -j4 - -mkdir -p ${BUILD_DIR}/simulator-${IOS_SDK_VERSION}-debug &> /dev/null -cd ${BUILD_DIR}/simulator-${IOS_SDK_VERSION}-debug -cmake ${DIR}/../../ -DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-iOS-Sim.cmake -DDIST_PREPARE=ON -DCMAKE_BUILD_TYPE=Debug -make -j4 - -mkdir -p ${BUILD_DIR}/device-${IOS_SDK_VERSION}-release &> /dev/null -cd ${BUILD_DIR}/device-${IOS_SDK_VERSION}-release -cmake ${DIR}/../../ -DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-iOS.cmake -DDIST_PREPARE=ON -DCMAKE_BUILD_TYPE=Release -make -j4 - -mkdir -p ${BUILD_DIR}/simulator-${IOS_SDK_VERSION}-release &> /dev/null -cd ${BUILD_DIR}/simulator-${IOS_SDK_VERSION}-release -cmake ${DIR}/../../ -DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-iOS-Sim.cmake -DDIST_PREPARE=ON -DCMAKE_BUILD_TYPE=Release -make -j4 - -# -# Create universal binary -# - -LIBS=`find ${DIR}/../../package/cross-compiled/ios-* -name *.a` -set +e -for LIB in ${LIBS}; do - LIB_BASE=`basename $LIB .a` - ARCHS=`lipo -info $LIB` - ARCHS=`expr "$ARCHS" : '.*:\(.*\)$'` - for ARCH in ${ARCHS}; do - mkdir -p ${DIR}/../../package/cross-compiled/ios/arch/${ARCH} > /dev/null - lipo -extract $ARCH $LIB -output ${DIR}/../../package/cross-compiled/ios/arch/${ARCH}/${LIB_BASE}.a \ - || cp $LIB ${DIR}/../../package/cross-compiled/ios/arch/${ARCH}/${LIB_BASE}.a - UNIQUE_LIBS=`ls ${DIR}/../../package/cross-compiled/ios/arch/${ARCH}` - done -done - -mkdir -p ${DIR}/../../package/cross-compiled/ios/lib &> /dev/null - -for LIB in ${UNIQUE_LIBS}; do - FILELIST="" - for ARCH in `ls ${DIR}/../../package/cross-compiled/ios/arch/`; do - FILELIST="${FILELIST} ${DIR}/../../package/cross-compiled/ios/arch/${ARCH}/${LIB}" - done - lipo -create ${FILELIST} -output ${DIR}/../../package/cross-compiled/ios/lib/${LIB} -done - -# rm -rf ${DIR}/../../package/cross-compiled/ios/arch -# rm -rf ${DIR}/../../package/cross-compiled/ios-*/ diff --git a/contrib/build-scripts/build-v8-linux.sh b/contrib/build-scripts/build-v8-linux.sh deleted file mode 100755 index 07aac94..0000000 --- a/contrib/build-scripts/build-v8-linux.sh +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/bash - -# -# build libevent for linux -# - -# exit on error -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -CPUARCH=`uname -m` -PLATFORM_ID=`${DIR}/platform-id-linux.sh` -DEST_DIR="${DIR}/../prebuilt/${PLATFORM_ID}" -PWD=`pwd` - -if [ "${CPUARCH}" = "i686" ]; then - echo - echo "v8 will no longer compile on 32bit" - echo "Start from a 64bit host and we will cross-compile" - echo - exit -fi - -if [ ! -f src/v8.h ]; then - echo - echo "Cannot find src/v8.h" - echo "Run script from within v8 directory" - echo - exit -fi - -if [ ! -f ../depot_tools/update_depot_tools ]; then - echo - echo "Cannot find ../depot_tools/update_depot_tools" - echo "Checkout depot_tools as a sibling directory" - echo "svn co http://src.chromium.org/svn/trunk/tools/depot_tools" - echo - exit -fi - -# export CXX="`which clang++` -fPIC" -export CFLAGS="-fPIC" -export CXXFLAGS="-fPIC" -export GYPFLAGS="-Dv8_use_external_startup_data=0" - -DEPOT_PATH="${PWD}/../depot_tools" -export PATH="${DEPOT_PATH}:${PATH}" - -PLATFORM_ID=`${DIR}/platform-id-linux.sh x86_64` -DEST_DIR="${DIR}/../prebuilt/${PLATFORM_ID}" - -cp include/*.h ${DEST_DIR}/include - -make V=1 x64.debug -make V=1 x64.release - -# libv8_external_snapshot.a -# libv8_libplatform.a -# libv8_base.a -# libv8_libbase.a -# libv8_nosnapshot.a - - -cp ./out/x64.debug/obj.target/tools/gyp/libv8_external_snapshot.a ${DEST_DIR}/lib/libv8_external_snapshot_d.a -cp ./out/x64.debug/obj.target/tools/gyp/libv8_libplatform.a ${DEST_DIR}/lib/libv8_libplatform_d.a -cp ./out/x64.debug/obj.target/tools/gyp/libv8_base.a ${DEST_DIR}/lib/libv8_base_d.a -cp ./out/x64.debug/obj.target/tools/gyp/libv8_libbase.a ${DEST_DIR}/lib/libv8_libbase_d.a -cp ./out/x64.debug/obj.target/tools/gyp/libv8_nosnapshot.a ${DEST_DIR}/lib/libv8_nosnapshot_d.a -cp ./out/x64.debug/obj.target/third_party/icu/libicuuc.a ${DEST_DIR}/lib/libicuuc_d.a -cp ./out/x64.debug/obj.target/third_party/icu/libicui18n.a ${DEST_DIR}/lib/libicui18n_d.a -cp ./out/x64.debug/obj.target/third_party/icu/libicudata.a ${DEST_DIR}/lib/libicudata_d.a - - -cp ./out/x64.release/obj.target/tools/gyp/libv8_external_snapshot.a ${DEST_DIR}/lib/libv8_external_snapshot.a -cp ./out/x64.release/obj.target/tools/gyp/libv8_libplatform.a ${DEST_DIR}/lib/libv8_libplatform.a -cp ./out/x64.release/obj.target/tools/gyp/libv8_base.a ${DEST_DIR}/lib/libv8_base.a -cp ./out/x64.release/obj.target/tools/gyp/libv8_libbase.a ${DEST_DIR}/lib/libv8_libbase.a -cp ./out/x64.release/obj.target/tools/gyp/libv8_nosnapshot.a ${DEST_DIR}/lib/libv8_nosnapshot.a -cp ./out/x64.release/obj.target/third_party/icu/libicuuc.a ${DEST_DIR}/lib/libicuuc.a -cp ./out/x64.release/obj.target/third_party/icu/libicui18n.a ${DEST_DIR}/lib/libicui18n.a -cp ./out/x64.release/obj.target/third_party/icu/libicudata.a ${DEST_DIR}/lib/libicudata.a - - -PLATFORM_ID=`${DIR}/platform-id-linux.sh i686` -DEST_DIR="${DIR}/../prebuilt/${PLATFORM_ID}" - -cp include/*.h ${DEST_DIR}/include - -make V=1 ia32.debug -make V=1 ia32.release - -cp ./out/ia32.debug/obj.target/tools/gyp/libv8_external_snapshot.a ${DEST_DIR}/lib/libv8_external_snapshot_d.a -cp ./out/ia32.debug/obj.target/tools/gyp/libv8_libplatform.a ${DEST_DIR}/lib/libv8_libplatform_d.a -cp ./out/ia32.debug/obj.target/tools/gyp/libv8_base.a ${DEST_DIR}/lib/libv8_base_d.a -cp ./out/ia32.debug/obj.target/tools/gyp/libv8_libbase.a ${DEST_DIR}/lib/libv8_libbase_d.a -cp ./out/ia32.debug/obj.target/tools/gyp/libv8_nosnapshot.a ${DEST_DIR}/lib/libv8_nosnapshot_d.a -cp ./out/ia32.debug/obj.target/third_party/icu/libicuuc.a ${DEST_DIR}/lib/libicuuc_d.a -cp ./out/ia32.debug/obj.target/third_party/icu/libicui18n.a ${DEST_DIR}/lib/libicui18n_d.a -cp ./out/ia32.debug/obj.target/third_party/icu/libicudata.a ${DEST_DIR}/lib/libicudata_d.a - -cp ./out/ia32.release/obj.target/tools/gyp/libv8_external_snapshot.a ${DEST_DIR}/lib/libv8_external_snapshot.a -cp ./out/ia32.release/obj.target/tools/gyp/libv8_libplatform.a ${DEST_DIR}/lib/libv8_libplatform.a -cp ./out/ia32.release/obj.target/tools/gyp/libv8_base.a ${DEST_DIR}/lib/libv8_base.a -cp ./out/ia32.release/obj.target/tools/gyp/libv8_libbase.a ${DEST_DIR}/lib/libv8_libbase.a -cp ./out/ia32.release/obj.target/tools/gyp/libv8_nosnapshot.a ${DEST_DIR}/lib/libv8_nosnapshot.a -cp ./out/ia32.release/obj.target/third_party/icu/libicuuc.a ${DEST_DIR}/lib/libicuuc.a -cp ./out/ia32.release/obj.target/third_party/icu/libicui18n.a ${DEST_DIR}/lib/libicui18n.a -cp ./out/ia32.release/obj.target/third_party/icu/libicudata.a ${DEST_DIR}/lib/libicudata.a - -# if [ "${CPUARCH}" = "x86_64" ]; then -# make x64.debug -# make x64.release -# -# # cp ./out/x64.debug/obj.target/tools/gyp/libv8_base.x64.a ${DEST_DIR}/lib/libv8_base_d.a -# # cp ./out/x64.debug/obj.target/tools/gyp/libv8_snapshot.a ${DEST_DIR}/lib/libv8_snapshot_d.a -# # cp ./out/x64.release/obj.target/tools/gyp/libv8_base.x64.a ${DEST_DIR}/lib/libv8_base.a -# # cp ./out/x64.release/obj.target/tools/gyp/libv8_snapshot.a ${DEST_DIR}/lib/libv8_snapshot.a -# -# fi -# -# if [ "${CPUARCH}" = "i686" ]; then -# make ia32.debug -# make ia32.release -# -# # cp ./out/ia32.debug/obj.target/tools/gyp/libv8_base.ia32.a ${DEST_DIR}/lib/libv8_base_d.a -# # cp ./out/ia32.debug/obj.target/tools/gyp/libv8_snapshot.a ${DEST_DIR}/lib/libv8_snapshot_d.a -# # cp ./out/ia32.release/obj.target/tools/gyp/libv8_base.ia32.a ${DEST_DIR}/lib/libv8_base.a -# # cp ./out/ia32.release/obj.target/tools/gyp/libv8_snapshot.a ${DEST_DIR}/lib/libv8_snapshot.a -# -# fi -# diff --git a/contrib/build-scripts/build-v8-macosx.sh b/contrib/build-scripts/build-v8-macosx.sh deleted file mode 100755 index 1992324..0000000 --- a/contrib/build-scripts/build-v8-macosx.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/bash - -# -# build v8 for MacOSX -# http://code.google.com/p/v8/wiki/BuildingWithGYP -# - -# exit on error -# set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -MACOSX_VER=`/usr/bin/sw_vers -productVersion` -MACOSX_COMP=(`echo $MACOSX_VER | tr '.' ' '`) -PLATFORM_ID=`${DIR}/platform-id-mac.sh` -DEST_DIR="${DIR}/../prebuilt/${PLATFORM_ID}" -PWD=`pwd` - - -if [ ! -f src/v8.h ]; then - echo - echo "Cannot find src/v8.h" - echo "Run script from within v8 directory" - echo - exit -fi - -if [ ! -f ../depot_tools/update_depot_tools ]; then - echo - echo "Cannot find ../depot_tools/update_depot_tools" - echo "Checkout depot_tools as a sibling directory" - echo "svn co http://src.chromium.org/svn/trunk/tools/depot_tools" - echo - exit -fi - -DEPOT_PATH="${PWD}/../depot_tools" -export PATH="${DEPOT_PATH}:${PATH}" - -if [ ${MACOSX_COMP[1]} -lt 9 ]; then - export MACOSX_DEPLOYMENT_TARGET=10.6 - export GYP_DEFINES="clang=1 mac_deployment_target=10.6" - export CXX="`which clang++` -mmacosx-version-min=10.6 -stdlib=libstdc++" - export LINK="`which clang++` -stdlib=libstdc++" - # export CXXFLAGS="-mmacosx-version-min=10.6 -stdlib=libstdc++" - # export LDFLAGS="-stdlib=libstdc++" -else - export MACOSX_DEPLOYMENT_TARGET=10.7 - export GYP_DEFINES="clang=1 mac_deployment_target=10.7" - export CXX="`which clang++` -mmacosx-version-min=10.7 -stdlib=libc++" - export LINK="`which clang++` -stdlib=libc++" - # export CXXFLAGS="-mmacosx-version-min=10.7 -stdlib=libc++" - # export LDFLAGS="-stdlib=libc++" -fi - -# make dependencies - -make snapshot=off ia32.release -make snapshot=off ia32.debug - -make snapshot=off x64.release -make snapshot=off x64.debug - -cp include/*.h ${DEST_DIR}/include - -#release -lipo -create \ - ./out/x64.release/libv8_base.a \ - ./out/ia32.release/libv8_base.a \ - -output ${DEST_DIR}/lib/libv8_base.a - -lipo -create \ - ./out/x64.release/libv8_libbase.a \ - ./out/ia32.release/libv8_libbase.a \ - -output ${DEST_DIR}/lib/libv8_libbase.a - -lipo -create \ - ./out/x64.release/libv8_libplatform.a \ - ./out/ia32.release/libv8_libplatform.a \ - -output ${DEST_DIR}/lib/libv8_libplatform.a - -lipo -create \ - ./out/x64.release/libv8_external_snapshot.a \ - ./out/ia32.release/libv8_external_snapshot.a \ - -output ${DEST_DIR}/lib/libv8_external_snapshot.a - -lipo -create \ - ./out/x64.release/libicuuc.a \ - ./out/ia32.release/libicuuc.a \ - -output ${DEST_DIR}/lib/libicuuc.a - -lipo -create \ - ./out/x64.release/libicui18n.a \ - ./out/ia32.release/libicui18n.a \ - -output ${DEST_DIR}/lib/libicui18n.a - -lipo -create \ - ./out/x64.release/libicudata.a \ - ./out/ia32.release/libicudata.a \ - -output ${DEST_DIR}/lib/libicudata.a - -#debug -lipo -create \ - ./out/x64.debug/libv8_base.a \ - ./out/ia32.debug/libv8_base.a \ - -output ${DEST_DIR}/lib/libv8_base_d.a - -lipo -create \ - ./out/x64.debug/libv8_libbase.a \ - ./out/ia32.debug/libv8_libbase.a \ - -output ${DEST_DIR}/lib/libv8_libbase_d.a - -lipo -create \ - ./out/x64.debug/libv8_libplatform.a \ - ./out/ia32.debug/libv8_libplatform.a \ - -output ${DEST_DIR}/lib/libv8_libplatform_d.a - -lipo -create \ - ./out/x64.debug/libv8_external_snapshot.a \ - ./out/ia32.debug/libv8_external_snapshot.a \ - -output ${DEST_DIR}/lib/libv8_external_snapshot_d.a - - -lipo -create \ - ./out/x64.debug/libicuuc.a \ - ./out/ia32.debug/libicuuc.a \ - -output ${DEST_DIR}/lib/libicuuc_d.a - -lipo -create \ - ./out/x64.debug/libicui18n.a \ - ./out/ia32.debug/libicui18n.a \ - -output ${DEST_DIR}/lib/libicui18n_d.a - -lipo -create \ - ./out/x64.debug/libicudata.a \ - ./out/ia32.debug/libicudata.a \ - -output ${DEST_DIR}/lib/libicudata_d.a diff --git a/contrib/build-scripts/build-v8-windows.bat b/contrib/build-scripts/build-v8-windows.bat deleted file mode 100644 index 21e33dc..0000000 --- a/contrib/build-scripts/build-v8-windows.bat +++ /dev/null @@ -1,87 +0,0 @@ -@ECHO off - -set ME=%0 -set DIR=%~dp0 -set MSVC_VER="" -set DEPOT_TOOLS_WIN_TOOLCHAIN=0 - -if "%VSINSTALLDIR%" == "" ( - echo. - echo %VSINSTALLDIR is not defined, run from within Visual Studio Command Prompt. - echo. - goto :DONE -) - -cl.exe 2>&1 |findstr "Version\ 19.00" > nul -if %errorlevel% == 0 ( - set MSVC_VER=1900 - set GYP_MSVS_VERSION=2015 -) - -cl.exe 2>&1 |findstr "Version\ 18.00" > nul -if %errorlevel% == 0 ( - set MSVC_VER=1800 - set GYP_MSVS_VERSION=2013 -) - -cl.exe 2>&1 |findstr "Version\ 16.00" > nul -if %errorlevel% == 0 ( - set MSVC_VER=1600 - set GYP_MSVS_VERSION=2010 -) - -if [%MSVC_VER%] == [""] ( - echo. - echo Unknown MSVC_VER %MSVC_VER%. - echo. - goto :DONE -) - -echo %LIB% |find "LIB\amd64;" > nul -if %errorlevel% == 0 ( - set DEST_DIR="%DIR%..\prebuilt\windows-x86_64-msvc%MSVC_VER%" - set CPU_ARCH=x86_64 - goto :ARCH_FOUND -) - -echo %LIB% |find "LIB;" > nul -if %errorlevel% == 0 ( - set DEST_DIR="%DIR%..\prebuilt\windows-x86-msvc%MSVC_VER%" - set CPU_ARCH=x86 - goto :ARCH_FOUND -) - -:ARCH_FOUND - -if "%DEST_DIR%" == "" ( - echo. - echo Unknown Platform %Platform%. - echo. - goto :DONE -) - -IF NOT EXIST "src/v8.h" ( - echo. - echo Cannot find src/v8.h - echo Run script from within v8 directory: - echo v8 $ %ME% - echo. - goto :DONE -) - -echo. -echo Building with MCVC ver %MSVC_VER% for %CPU_ARCH% into %DEST_DIR% -echo. - -if "%CPU_ARCH%" == "x86_64" ( - python build\gyp_v8 -Dtarget_arch=x64 - devenv /build Release build\All.sln - -) - -if "%CPU_ARCH%" == "x86" ( - python build\gyp_v8 -) - -:DONE -pause \ No newline at end of file diff --git a/contrib/build-scripts/pidgin-configure b/contrib/build-scripts/pidgin-configure deleted file mode 100644 index 016cf0f..0000000 --- a/contrib/build-scripts/pidgin-configure +++ /dev/null @@ -1 +0,0 @@ -LIBS="-lz" ./configure --disable-nls --disable-gtkui --disable-consoleui --disable-gstreamer --disable-vv --disable-meanwhile --disable-avahi --disable-dbus --disable-gnome-keyring --disable-kwallet --disable-nss --disable-gnutls --disable-tcl --disable-perl --disable-tk --enable-static --with-pic \ No newline at end of file diff --git a/contrib/build-scripts/platform-id-linux.sh b/contrib/build-scripts/platform-id-linux.sh deleted file mode 100755 index b0e4688..0000000 --- a/contrib/build-scripts/platform-id-linux.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -function version { - echo "$@" | awk -F. '{ printf("%03d%03d%03d\n", $1,$2,$3); }'; -} - -CMAKE_INFO=`cmake --system-information 2> /dev/null` - -CMAKE_CXX_COMPILER_ID=`echo "$CMAKE_INFO" |grep 'CMAKE_CXX_COMPILER_ID ' | awk '{print tolower($2)}' |sed 's/\"//g'` -CPU=`uname -m` - -if (( $# > 0 )); then - CPU=$1 -fi - -echo "linux-${CPU}-${CMAKE_CXX_COMPILER_ID}" diff --git a/contrib/build-scripts/platform-id-mac.sh b/contrib/build-scripts/platform-id-mac.sh deleted file mode 100755 index b105be3..0000000 --- a/contrib/build-scripts/platform-id-mac.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -function version { - echo "$@" | awk -F. '{ printf("%03d%03d%03d\n", $1,$2,$3); }'; -} - -CMAKE_INFO=`cmake --system-information 2> /dev/null` - -CURRENT_OSX_VERSION=`echo "$CMAKE_INFO" |grep CURRENT_OSX_VERSION |grep -v _CURRENT_OSX_VERSION | awk '{print $2}' |sed 's/\"//g'` -CMAKE_CXX_COMPILER_ID=`echo "$CMAKE_INFO" |grep 'CMAKE_CXX_COMPILER_ID ' | awk '{print tolower($2)}' |sed 's/\"//g' | sed 's/apple//g'` -CPU=`uname -m` - -CPP_LIB="libc++" -if [ "$(version "10.9.0")" -gt "$(version "$CURRENT_OSX_VERSION")" ]; then - # pre-mavericks - CPP_LIB="libstdc++" -fi - -echo "darwin-${CPU}-${CMAKE_CXX_COMPILER_ID}-${CPP_LIB}" diff --git a/contrib/cmake/BinaryExists.cmake b/contrib/cmake/BinaryExists.cmake deleted file mode 100644 index 0300f98..0000000 --- a/contrib/cmake/BinaryExists.cmake +++ /dev/null @@ -1 +0,0 @@ -find_program(HAS_XDG_OPEN "xdg-open") \ No newline at end of file diff --git a/contrib/cmake/CPackUSCXML.cmake b/contrib/cmake/CPackUSCXML.cmake deleted file mode 100644 index aa9960b..0000000 --- a/contrib/cmake/CPackUSCXML.cmake +++ /dev/null @@ -1,423 +0,0 @@ -# see: http://www.vtk.org/Wiki/CMake:CPackConfiguration - -######################################################################################## -# gather host-native libraries -################################################################################ - -# these are all the host-native libraries plus -file(GLOB_RECURSE PLATFORM_LIBS - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.a - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.so - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.lib - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.dylib - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.jnilib - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.dll - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.pdb -# ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.exp -) - -# sort host-native libraries into installation components -foreach(PLATFORM_LIB ${PLATFORM_LIBS}) -# message("PLATFORM_LIB: ${PLATFORM_LIB}") - if (PLATFORM_LIB MATCHES ".*Native.*") - install(FILES ${PLATFORM_LIB} DESTINATION lib COMPONENT librarySwig) - list (APPEND USCXML_CPACK_COMPONENTS "librarySwig") - elseif (PLATFORM_LIB MATCHES ".*uscxmlCSharp.*") - install(FILES ${PLATFORM_LIB} DESTINATION share/uscxml/lib COMPONENT librarySwig) - list (APPEND USCXML_CPACK_COMPONENTS "library") - elseif (PLATFORM_LIB MATCHES ".*uscxml.*") - install(FILES ${PLATFORM_LIB} DESTINATION lib COMPONENT library) - list (APPEND USCXML_CPACK_COMPONENTS "library") - # else() - # message(STATUS "PACKAGE RELEASE UNK ${PLATFORM_LIB} - not packaging") - endif() -endforeach() - -######################################## -# Pre-built libraries for host platform -######################################## - -# do follow symlinks with GLOB_RECURSE -#cmake_policy(SET CMP0009 OLD) - -file(GLOB_RECURSE PREBUILT_LIBS FOLLOW_SYMLINKS - ${USCXML_PREBUILT_LIBRARY_PATH}/lib/*.a - ${USCXML_PREBUILT_LIBRARY_PATH}/lib/*.so - ${USCXML_PREBUILT_LIBRARY_PATH}/lib/*.dylib - ${USCXML_PREBUILT_LIBRARY_PATH}/lib/*.lib - ${USCXML_PREBUILT_LIBRARY_PATH}/lib/*.dll - ${USCXML_PREBUILT_LIBRARY_PATH}/lib/*.pdb -) - -#message("USCXML_PREBUILT_LIBRARY_PATH: ${USCXML_PREBUILT_LIBRARY_PATH}") - -foreach(PREBUILT_LIB ${PREBUILT_LIBS}) -# message("PREBUILT_LIB: ${PREBUILT_LIB}") - # string(REGEX MATCH "prebuilt/[^//]+/[^//]+" CURR_PLATFORM ${PREBUILT_LIB}) - # message("CURR_PLATFORM: ${CURR_PLATFORM}") - # install(FILES ${PREBUILT_LIB} DESTINATION share/uscxml/${CURR_PLATFORM} COMPONENT libraryPrebuilt) - install(FILES ${PREBUILT_LIB} DESTINATION share/uscxml/deps COMPONENT libraryPrebuilt) - list (APPEND USCXML_CPACK_COMPONENTS "libraryPrebuilt") -endforeach() - - -######################################## -# VBS wrappers -######################################## - -if (WIN32) - install( - FILES ${PROJECT_SOURCE_DIR}/apps/mmi-browser.vbs - DESTINATION bin - COMPONENT tools - PERMISSIONS WORLD_EXECUTE OWNER_EXECUTE GROUP_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ # 755 - ) -endif() - -######################################## -# Include documentation -######################################## - -# file(GLOB_RECURSE HTML_DOCS ${PROJECT_SOURCE_DIR}/docs/html/*) -# foreach(HTML_DOC ${HTML_DOCS}) -# STRING(REGEX REPLACE "${PROJECT_SOURCE_DIR}/" "" HTML_PATH ${HTML_DOC}) -# STRING(REGEX MATCH "(.*)[/\\]" HTML_PATH ${HTML_PATH}) -# install(FILES ${HTML_DOC} DESTINATION share/uscxml/${HTML_PATH} COMPONENT docs) -# list (APPEND USCXML_CPACK_COMPONENTS "docs") -# # message(STATUS ${HTML_PATH}) -# endforeach() - -######################################## -# CMake Modules for clients -######################################## - -# install(FILES ${PROJECT_SOURCE_DIR}/contrib/cmake/FindUSCXML.cmake DESTINATION share/uscxml/cmake COMPONENT library) -# install(FILES ${PROJECT_SOURCE_DIR}/contrib/cmake/UseUSCXML.cmake DESTINATION share/uscxml/cmake COMPONENT library) - -######################################## -# Target languages -######################################## - -GET_TARGET_PROPERTY(USCXMLNATIVEJAVA_LOCATION USCXMLNativeJava LOCATION) -if (USCXMLNATIVEJAVA_LOCATION) - if (DIST_PREPARE) - if (EXISTS "${PROJECT_SOURCE_DIR}/package/uscxml.jar") - install(FILES ${PROJECT_SOURCE_DIR}/package/uscxml.jar DESTINATION share/uscxml/java COMPONENT librarySwig) - endif() - else() - if (EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/uscxml.jar") - install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/uscxml.jar DESTINATION share/uscxml/java COMPONENT librarySwig) - endif() - endif() - list (APPEND USCXML_CPACK_COMPONENTS "librarySwig") -endif() - -# The CSharp bindings are already picked up as a host-native dll above -GET_TARGET_PROPERTY(USCXMLNATIVECSHARP_LOCATION USCXMLNativeCSharp LOCATION) -# if (USCXMLNATIVECSHARP_LOCATION) -# install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/uscxmlCSharp.dll DESTINATION share/uscxml/lib COMPONENT librarySwig) -# list (APPEND USCXML_CPACK_COMPONENTS "librarySwig") -# endif() - - -################################################################################ -# Cross Compiled binaries -################################################################################ - -######################################## -# Android -######################################## - -file(GLOB_RECURSE ANDROID_LIBS ${PROJECT_SOURCE_DIR}/package/cross-compiled/android*/*) -foreach(ANDROID_LIB ${ANDROID_LIBS}) - # do not pack static libraries -# if (NOT ANDROID_LIB MATCHES ".*\\.a" AND NOT ANDROID_LIB MATCHES "\\..*") - if (NOT ANDROID_LIB MATCHES ".*\\.a") - # remove weird double slashes - STRING(REGEX REPLACE "//" "/" ANDROID_LIB ${ANDROID_LIB}) - # take relative path - STRING(REGEX REPLACE "${PROJECT_SOURCE_DIR}/package/cross-compiled/" "" ANDROID_PATH ${ANDROID_LIB}) - # only take first two path elements - STRING(REGEX MATCH "[^/]*/[^/]*" ANDROID_PATH ${ANDROID_PATH}) - # but remove USCXML.jar from path in any case - STRING(REGEX REPLACE "/uscxml.jar" "" ANDROID_PATH ${ANDROID_PATH}) - # message(STATUS "ANDROID_PATH: ${ANDROID_PATH}") - # message(STATUS "ANDROID_LIB: ${ANDROID_LIB}") - install(FILES ${ANDROID_LIB} DESTINATION share/uscxml/${ANDROID_PATH} COMPONENT libraryAndroid) - list (APPEND USCXML_CPACK_COMPONENTS "libraryAndroid") - endif() -endforeach() - -# list(FIND USCXML_CPACK_COMPONENTS "libraryAndroid" FOUND_ITEM) -# if (FOUND_ITEM GREATER -1) -# file(GLOB_RECURSE ANDROID_PREBUILT_LIBS ${PROJECT_SOURCE_DIR}/contrib/prebuilt/android*/*) -# foreach(ANDROID_PREBUILT_LIB ${ANDROID_PREBUILT_LIBS}) -# STRING(REGEX REPLACE "//" "/" ANDROID_PREBUILT_LIB ${ANDROID_PREBUILT_LIB}) -# STRING(REGEX MATCH "prebuilt/[^//]+/[^//]+" ANDROID_PLATFORM ${ANDROID_PREBUILT_LIB}) -# message("ANDROID_PREBUILT_LIB: ${ANDROID_PREBUILT_LIB}") -# message("ANDROID_PLATFORM: ${ANDROID_PLATFORM}") -# install(FILES ${ANDROID_PREBUILT_LIB} DESTINATION share/uscxml/${ANDROID_PLATFORM} COMPONENT libraryPrebuilt) -# endforeach() -# endif() - -######################################## -# iOS -######################################## -if (APPLE) - file(GLOB_RECURSE IOS_LIBS ${PROJECT_SOURCE_DIR}/package/cross-compiled/ios*/*.ios*) - foreach(IOS_LIB ${IOS_LIBS}) - # match ios-5.0 - STRING(REGEX REPLACE "//" "/" IOS_LIB ${IOS_LIB}) - STRING(REGEX REPLACE "${PROJECT_SOURCE_DIR}/package/cross-compiled/" "" IOS_PATH ${IOS_LIB}) - STRING(REGEX MATCH "[^/]*" IOS_PATH ${IOS_PATH}) - # message(STATUS "IOS_LIB: ${IOS_LIB}") - # message(STATUS "IOS_PATH: ${IOS_PATH}") - install(FILES ${IOS_LIB} DESTINATION share/uscxml/${IOS_PATH} COMPONENT libraryIOS) - list (APPEND USCXML_CPACK_COMPONENTS "libraryIOS") - endforeach() - - list(FIND USCXML_CPACK_COMPONENTS "libraryIOS" FOUND_ITEM) - if (FOUND_ITEM GREATER -1) - file(GLOB_RECURSE IOS_PREBUILT_LIBS ${PROJECT_SOURCE_DIR}/contrib/prebuilt/ios*/*.a) - foreach(IOS_PREBUILT_LIB ${IOS_PREBUILT_LIBS}) - if(NOT EXISTS "${IOS_PREBUILT_LIB}/") - STRING(REGEX REPLACE "//" "/" IOS_PREBUILT_LIB ${IOS_PREBUILT_LIB}) - STRING(REGEX MATCH "ios/[^//]+" IOS_PLATFORM ${IOS_PREBUILT_LIB}) - # message("IOS_PLATFORM: ${IOS_PLATFORM}") - # message("IOS_PREBUILT_LIB: ${IOS_PREBUILT_LIB}") - install(FILES ${IOS_PREBUILT_LIB} DESTINATION share/uscxml/deps/${IOS_PLATFORM} COMPONENT libraryPrebuilt) - endif() - endforeach() - endif() -endif() - -################################################################################ -# Sample projects -################################################################################ - -# USCXML-pingpong: XCode for iOS -if (APPLE) - file(GLOB_RECURSE IOS_PINGPONG_SAMPLE ${PROJECT_SOURCE_DIR}/examples/ios/uscxml-pingpong*/*) - foreach(IOS_PINGPONG_SAMPLE_FILE ${IOS_PINGPONG_SAMPLE}) - # strip root - STRING(REGEX REPLACE "${PROJECT_SOURCE_DIR}/examples" "" REL_PATH ${IOS_PINGPONG_SAMPLE_FILE}) - get_filename_component(REL_PATH ${REL_PATH} PATH) -# message("Installing ${IOS_PINGPONG_SAMPLE_FILE} in share/uscxml/samples/${REL_PATH}") - install(FILES ${IOS_PINGPONG_SAMPLE_FILE} DESTINATION share/uscxml/samples/${REL_PATH} COMPONENT samples) - endforeach() - list (APPEND USCXML_CPACK_COMPONENTS "samples") -endif() - -# USCXML-pingpong: Eclipse for Android -file(GLOB_RECURSE ANDROID_PINGPONG_SAMPLE ${PROJECT_SOURCE_DIR}/examples/android/*) -foreach(ANDROID_PINGPONG_SAMPLE_FILE ${ANDROID_PINGPONG_SAMPLE}) -# message("ANDROID_PINGPONG_SAMPLE_FILE: ${ANDROID_PINGPONG_SAMPLE_FILE}") - STRING(REGEX REPLACE "${PROJECT_SOURCE_DIR}/examples" "" REL_PATH ${ANDROID_PINGPONG_SAMPLE_FILE}) - get_filename_component(REL_PATH ${REL_PATH} PATH) - install(FILES ${ANDROID_PINGPONG_SAMPLE_FILE} DESTINATION share/uscxml/samples/${REL_PATH} COMPONENT samples) -endforeach() -list (APPEND USCXML_CPACK_COMPONENTS "samples") - -# USCXML-pingpong: Visual Studio for CSharp -if (WIN32) - file(GLOB_RECURSE CSHARP_PINGPONG_SAMPLE ${PROJECT_SOURCE_DIR}/examples/csharp/*) - foreach(CSHARP_PINGPONG_SAMPLE_FILE ${CSHARP_PINGPONG_SAMPLE}) -# message("CSHARP_PINGPONG_SAMPLE_FILE: ${CSHARP_PINGPONG_SAMPLE_FILE}") - STRING(REGEX REPLACE "${PROJECT_SOURCE_DIR}/examples" "" REL_PATH ${CSHARP_PINGPONG_SAMPLE_FILE}) - get_filename_component(REL_PATH ${REL_PATH} PATH) - install(FILES ${CSHARP_PINGPONG_SAMPLE_FILE} DESTINATION share/uscxml/samples/${REL_PATH} COMPONENT samples) - endforeach() - list (APPEND USCXML_CPACK_COMPONENTS "samples") -endif() - -# All the java samples -file(GLOB_RECURSE JAVA_SAMPLES ${PROJECT_SOURCE_DIR}/examples/java/*) -foreach(JAVA_SAMPLES_FILE ${JAVA_SAMPLES}) - STRING(REGEX REPLACE "${PROJECT_SOURCE_DIR}/examples" "" REL_PATH ${JAVA_SAMPLES_FILE}) - get_filename_component(REL_PATH ${REL_PATH} PATH) - install(FILES ${JAVA_SAMPLES_FILE} DESTINATION share/uscxml/samples/${REL_PATH} COMPONENT samples) -endforeach() - -# All the cpp samples -file(GLOB_RECURSE CPP_SAMPLES ${PROJECT_SOURCE_DIR}/examples/cpp/*) -foreach(CPP_SAMPLES_FILE ${CPP_SAMPLES}) - STRING(REGEX REPLACE "${PROJECT_SOURCE_DIR}/examples" "" REL_PATH ${CPP_SAMPLES_FILE}) - get_filename_component(REL_PATH ${REL_PATH} PATH) - install(FILES ${CPP_SAMPLES_FILE} DESTINATION share/uscxml/samples/${REL_PATH} COMPONENT samples) -endforeach() - -list (APPEND USCXML_CPACK_COMPONENTS "samples") - -######################################## -# Sample SCXML Files -######################################## - -file(GLOB_RECURSE SCXML_SAMPLES ${PROJECT_SOURCE_DIR}/test/samples/*) -foreach(SCXML_SAMPLE_FILE ${SCXML_SAMPLES}) - STRING(REGEX REPLACE "${PROJECT_SOURCE_DIR}/test/samples/" "" REL_PATH ${SCXML_SAMPLE_FILE}) - get_filename_component(REL_PATH ${REL_PATH} PATH) -# message("Installing sample: share/uscxml/samples/${REL_PATH}") - install(FILES ${SCXML_SAMPLE_FILE} DESTINATION share/uscxml/samples/${REL_PATH} COMPONENT samples) -endforeach() - - -######################################## -# House keeping -######################################## - -list (APPEND USCXML_CPACK_COMPONENTS "headers") - -if (NOT CMAKE_CROSS_COMPILING) - list (APPEND USCXML_CPACK_COMPONENTS "tools") -endif() -list (REMOVE_DUPLICATES USCXML_CPACK_COMPONENTS) -#message("USCXML_CPACK_COMPONENTS: ${USCXML_CPACK_COMPONENTS}") - -######################################## -# Configure packagers -######################################## - -if (UNIX) - if (APPLE) - set(CPACK_GENERATOR "PackageMaker;TGZ") - else() - set(CPACK_GENERATOR "DEB;RPM;TGZ") - endif() - set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local") -endif() -if (WIN32) - set(CPACK_GENERATOR "NSIS;ZIP") - set(CPACK_PACKAGE_INSTALL_DIRECTORY "uscxml") - # pairs of executables and labels for start menu - set(CPACK_NSIS_MENU_LINKS - " ;USCXML SDK" - "bin\\\\mmi-browser.vbs;MMI Browser") - -endif() - -set(CPACK_PACKAGE_NAME "USCXML") -set(CPACK_PACKAGE_VENDOR "Telecooperation Group - TU Darmstadt") -set(CPACK_PACKAGE_CONTACT "radomski@tk.informatik.tu-darmstadt.de") -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "USCXML - publish/subscribe since 2012") -set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/installer/description.txt") -set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/installer/license.txt") - -set(CPACK_PACKAGE_VERSION "${USCXML_VERSION_MAJOR}.${USCXML_VERSION_MINOR}.${USCXML_VERSION_PATCH}") -set(CPACK_PACKAGE_VERSION_MAJOR ${USCXML_VERSION_MAJOR}) -set(CPACK_PACKAGE_VERSION_MINOR ${USCXML_VERSION_MINOR}) -set(CPACK_PACKAGE_VERSION_PATCH ${USCXML_VERSION_PATCH}) - -if (64BIT_HOST AND WIN32) - set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CMAKE_SYSTEM_NAME_LC}-${CMAKE_SYSTEM_PROCESSOR}_64-${CPACK_PACKAGE_VERSION}") -else() - set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CMAKE_SYSTEM_NAME_LC}-${CMAKE_SYSTEM_PROCESSOR}-${CPACK_PACKAGE_VERSION}") -endif() - -### -# Configuration for NSIS installer on Win32 -# -# pairs of executables and labels for start menu -#CPACK_PACKAGE_EXECUTABLES -set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "uscxml.telecooperation.tu-darmstadt") -if (WIN32) - set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}\\\\installer\\\\nsis\\\\uscxml-logo.bmp") -else() - set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/installer/nsis/uscxml-logo.bmp") -endif() - -### -# Configuration for PackageMaker on MacOSX -# -set(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/installer/packageMaker/readme.txt") -set(CPACK_RESOURCE_FILE_WELCOME "${PROJECT_SOURCE_DIR}/installer/packageMaker/welcome.txt") - -### -# Configuration for debian packages -# -set(CPACK_DEBIAN_PACKAGE_NAME "uscxml") -set(CPACK_DEBIAN_PACKAGE_DEPENDS "libavahi-client3, libxml2") -set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "swig2.0, protobuf-compiler") - -### -# Configuration for RPM packages -# -set(CPACK_RPM_PACKAGE_NAME "uscxml") -set(CPACK_RPM_PACKAGE_LICENSE "Simplified BSD") - - -######################################## -# Describe layout of package -######################################## - -set(CPACK_COMPONENTS_ALL - ${USCXML_CPACK_COMPONENTS} -) - -### -# Description of components -# - -list(FIND USCXML_CPACK_COMPONENTS "tools" FOUND_ITEM) -if (FOUND_ITEM GREATER -1) - set(CPACK_COMPONENT_TOOLS_DISPLAY_NAME "Command-line Tools") - set(CPACK_COMPONENT_TOOLS_DESCRIPTION "Command-line tools to debug and monitor a USCXML network.") -endif() - -list(FIND USCXML_CPACK_COMPONENTS "samples" FOUND_ITEM) -if (FOUND_ITEM GREATER -1) - set(CPACK_COMPONENT_SAMPLES_DISPLAY_NAME "IDE Templates and sample programs") - set(CPACK_COMPONENT_SAMPLES_DESCRIPTION - "Templates for Xcode, Visual Studio and Eclipse with sample programs.") -endif() - -list(FIND USCXML_CPACK_COMPONENTS "docs" FOUND_ITEM) -if (FOUND_ITEM GREATER -1) - set(CPACK_COMPONENT_DOCS_DISPLAY_NAME "Documentation") - set(CPACK_COMPONENT_DOCS_DESCRIPTION "Auto-generated documentation.") -endif() - -list(FIND USCXML_CPACK_COMPONENTS "librarySwig" FOUND_ITEM) -if (FOUND_ITEM GREATER -1) - set(CPACK_COMPONENT_LIBRARYSWIG_DISPLAY_NAME "Java interface") - set(CPACK_COMPONENT_LIBRARYSWIG_DESCRIPTION "USCXML.core library wrapped for Java per native interfaces. This will install the actual library and the JAR archive.") - set(CPACK_COMPONENT_LIBRARYSWIG_GROUP "Development") -endif() - -list(FIND USCXML_CPACK_COMPONENTS "libraryPrebuilt" FOUND_ITEM) -if (FOUND_ITEM GREATER -1) - set(CPACK_COMPONENT_LIBRARYPREBUILT_DISPLAY_NAME "C++ dependent libraries") - set(CPACK_COMPONENT_LIBRARYPREBUILT_DESCRIPTION "Prebuilt libraries for this host and the cross-compile targets") - set(CPACK_COMPONENT_LIBRARYPREBUILT_GROUP "Development") -endif() - -list(FIND USCXML_CPACK_COMPONENTS "libraryAndroid" FOUND_ITEM) -if (FOUND_ITEM GREATER -1) - set(CPACK_COMPONENT_LIBRARYANDROID_DISPLAY_NAME "Android libraries") - set(CPACK_COMPONENT_LIBRARYANDROID_DESCRIPTION "USCXML.core cross compiled for Android devices.") - set(CPACK_COMPONENT_LIBRARYANDROID_GROUP "Development") -endif() - -list(FIND USCXML_CPACK_COMPONENTS "libraryIOS" FOUND_ITEM) -if (FOUND_ITEM GREATER -1) - set(CPACK_COMPONENT_LIBRARYIOS_DISPLAY_NAME "iOS libraries") - set(CPACK_COMPONENT_LIBRARYIOS_DESCRIPTION "USCXML.core cross compiled for iOS devices (universal libraries).") - set(CPACK_COMPONENT_LIBRARYIOS_GROUP "Development") - set(CPACK_COMPONENT_LIBRARYIOS_DEPENDS headers) - set(CPACK_COMPONENT_LIBRARYIOS_DEPENDS libraryPrebuilt) -endif() - -list(FIND USCXML_CPACK_COMPONENTS "library" FOUND_ITEM) -if (FOUND_ITEM GREATER -1) - # define header description here as well - set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers ") - set(CPACK_COMPONENT_HEADERS_DESCRIPTION "C++ header files for USCXML and all its components.") - set(CPACK_COMPONENT_HEADERS_GROUP "Development") - - set(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "C++ USCXML libraries") - set(CPACK_COMPONENT_LIBRARY_DESCRIPTION "Static libraries of the USCXML components for C++ development.") - set(CPACK_COMPONENT_LIBRARY_GROUP "Development") - set(CPACK_COMPONENT_LIBRARY_DEPENDS headers) - set(CPACK_COMPONENT_LIBRARY_DEPENDS libraryPrebuilt) -endif() - -set(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "Libraries and Headers for USCXML.") diff --git a/contrib/cmake/CrossCompile-Android.cmake b/contrib/cmake/CrossCompile-Android.cmake deleted file mode 100644 index fabc2a3..0000000 --- a/contrib/cmake/CrossCompile-Android.cmake +++ /dev/null @@ -1,1776 +0,0 @@ -# Copyright (c) 2010-2011, Ethan Rublee -# Copyright (c) 2011-2014, Andrey Kamaev -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# 3. Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from this -# software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# ------------------------------------------------------------------------------ -# Android CMake toolchain file, for use with the Android NDK r5-r9 -# Requires cmake 2.6.3 or newer (2.8.5 or newer is recommended). -# See home page: https://github.com/taka-no-me/android-cmake -# -# The file is mantained by the OpenCV project. The latest version can be get at -# http://code.opencv.org/projects/opencv/repository/revisions/master/changes/android/android.toolchain.cmake -# -# Usage Linux: -# $ export ANDROID_NDK=/absolute/path/to/the/android-ndk -# $ mkdir build && cd build -# $ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/the/android.toolchain.cmake .. -# $ make -j8 -# -# Usage Linux (using standalone toolchain): -# $ export ANDROID_STANDALONE_TOOLCHAIN=/absolute/path/to/android-toolchain -# $ mkdir build && cd build -# $ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/the/android.toolchain.cmake .. -# $ make -j8 -# -# Usage Windows: -# You need native port of make to build your project. -# Android NDK r7 (or newer) already has make.exe on board. -# For older NDK you have to install it separately. -# For example, this one: http://gnuwin32.sourceforge.net/packages/make.htm -# -# $ SET ANDROID_NDK=C:\absolute\path\to\the\android-ndk -# $ mkdir build && cd build -# $ cmake.exe -G"MinGW Makefiles" -# -DCMAKE_TOOLCHAIN_FILE=path\to\the\android.toolchain.cmake -# -DCMAKE_MAKE_PROGRAM="%ANDROID_NDK%\prebuilt\windows\bin\make.exe" .. -# $ cmake.exe --build . -# -# -# Options (can be set as cmake parameters: -D=): -# ANDROID_NDK=/opt/android-ndk - path to the NDK root. -# Can be set as environment variable. Can be set only at first cmake run. -# -# ANDROID_STANDALONE_TOOLCHAIN=/opt/android-toolchain - path to the -# standalone toolchain. This option is not used if full NDK is found -# (ignored if ANDROID_NDK is set). -# Can be set as environment variable. Can be set only at first cmake run. -# -# ANDROID_ABI=armeabi-v7a - specifies the target Application Binary -# Interface (ABI). This option nearly matches to the APP_ABI variable -# used by ndk-build tool from Android NDK. -# -# Possible targets are: -# "armeabi" - matches to the NDK ABI with the same name. -# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. -# "armeabi-v7a" - matches to the NDK ABI with the same name. -# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. -# "armeabi-v7a with NEON" - same as armeabi-v7a, but -# sets NEON as floating-point unit -# "armeabi-v7a with VFPV3" - same as armeabi-v7a, but -# sets VFPV3 as floating-point unit (has 32 registers instead of 16). -# "armeabi-v6 with VFP" - tuned for ARMv6 processors having VFP. -# "x86" - matches to the NDK ABI with the same name. -# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. -# "mips" - matches to the NDK ABI with the same name. -# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. -# -# ANDROID_NATIVE_API_LEVEL=android-8 - level of Android API compile for. -# Option is read-only when standalone toolchain is used. -# -# ANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.6 - the name of compiler -# toolchain to be used. The list of possible values depends on the NDK -# version. For NDK r8c the possible values are: -# -# * arm-linux-androideabi-4.4.3 -# * arm-linux-androideabi-4.6 -# * arm-linux-androideabi-clang3.1 -# * mipsel-linux-android-4.4.3 -# * mipsel-linux-android-4.6 -# * mipsel-linux-android-clang3.1 -# * x86-4.4.3 -# * x86-4.6 -# * x86-clang3.1 -# -# ANDROID_FORCE_ARM_BUILD=OFF - set ON to generate 32-bit ARM instructions -# instead of Thumb. Is not available for "x86" (inapplicable) and -# "armeabi-v6 with VFP" (is forced to be ON) ABIs. -# -# ANDROID_NO_UNDEFINED=ON - set ON to show all undefined symbols as linker -# errors even if they are not used. -# -# ANDROID_SO_UNDEFINED=OFF - set ON to allow undefined symbols in shared -# libraries. Automatically turned for NDK r5x and r6x due to GLESv2 -# problems. -# -# LIBRARY_OUTPUT_PATH_ROOT=${CMAKE_SOURCE_DIR} - where to output binary -# files. See additional details below. -# -# ANDROID_SET_OBSOLETE_VARIABLES=ON - if set, then toolchain defines some -# obsolete variables which were used by previous versions of this file for -# backward compatibility. -# -# ANDROID_STL=gnustl_static - specify the runtime to use. -# -# Possible values are: -# none -> Do not configure the runtime. -# system -> Use the default minimal system C++ runtime library. -# Implies -fno-rtti -fno-exceptions. -# Is not available for standalone toolchain. -# system_re -> Use the default minimal system C++ runtime library. -# Implies -frtti -fexceptions. -# Is not available for standalone toolchain. -# gabi++_static -> Use the GAbi++ runtime as a static library. -# Implies -frtti -fno-exceptions. -# Available for NDK r7 and newer. -# Is not available for standalone toolchain. -# gabi++_shared -> Use the GAbi++ runtime as a shared library. -# Implies -frtti -fno-exceptions. -# Available for NDK r7 and newer. -# Is not available for standalone toolchain. -# stlport_static -> Use the STLport runtime as a static library. -# Implies -fno-rtti -fno-exceptions for NDK before r7. -# Implies -frtti -fno-exceptions for NDK r7 and newer. -# Is not available for standalone toolchain. -# stlport_shared -> Use the STLport runtime as a shared library. -# Implies -fno-rtti -fno-exceptions for NDK before r7. -# Implies -frtti -fno-exceptions for NDK r7 and newer. -# Is not available for standalone toolchain. -# gnustl_static -> Use the GNU STL as a static library. -# Implies -frtti -fexceptions. -# gnustl_shared -> Use the GNU STL as a shared library. -# Implies -frtti -fno-exceptions. -# Available for NDK r7b and newer. -# Silently degrades to gnustl_static if not available. -# -# ANDROID_STL_FORCE_FEATURES=ON - turn rtti and exceptions support based on -# chosen runtime. If disabled, then the user is responsible for settings -# these options. -# -# What?: -# android-cmake toolchain searches for NDK/toolchain in the following order: -# ANDROID_NDK - cmake parameter -# ANDROID_NDK - environment variable -# ANDROID_STANDALONE_TOOLCHAIN - cmake parameter -# ANDROID_STANDALONE_TOOLCHAIN - environment variable -# ANDROID_NDK - default locations -# ANDROID_STANDALONE_TOOLCHAIN - default locations -# -# Make sure to do the following in your scripts: -# SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${my_cxx_flags}" ) -# SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${my_cxx_flags}" ) -# The flags will be prepopulated with critical flags, so don't loose them. -# Also be aware that toolchain also sets configuration-specific compiler -# flags and linker flags. -# -# ANDROID and BUILD_ANDROID will be set to true, you may test any of these -# variables to make necessary Android-specific configuration changes. -# -# Also ARMEABI or ARMEABI_V7A or X86 or MIPS will be set true, mutually -# exclusive. NEON option will be set true if VFP is set to NEON. -# -# LIBRARY_OUTPUT_PATH_ROOT should be set in cache to determine where Android -# libraries will be installed. -# Default is ${CMAKE_SOURCE_DIR}, and the android libs will always be -# under the ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME} -# (depending on the target ABI). This is convenient for Android packaging. -# -# Change Log: -# - initial version December 2010 -# - April 2011 -# [+] added possibility to build with NDK (without standalone toolchain) -# [+] support cross-compilation on Windows (native, no cygwin support) -# [+] added compiler option to force "char" type to be signed -# [+] added toolchain option to compile to 32-bit ARM instructions -# [+] added toolchain option to disable SWIG search -# [+] added platform "armeabi-v7a with VFPV3" -# [~] ARM_TARGETS renamed to ARM_TARGET -# [+] EXECUTABLE_OUTPUT_PATH is set by toolchain (required on Windows) -# [~] Fixed bug with ANDROID_API_LEVEL variable -# [~] turn off SWIG search if it is not found first time -# - May 2011 -# [~] ANDROID_LEVEL is renamed to ANDROID_API_LEVEL -# [+] ANDROID_API_LEVEL is detected by toolchain if not specified -# [~] added guard to prevent changing of output directories on the first -# cmake pass -# [~] toolchain exits with error if ARM_TARGET is not recognized -# - June 2011 -# [~] default NDK path is updated for version r5c -# [+] variable CMAKE_SYSTEM_PROCESSOR is set based on ARM_TARGET -# [~] toolchain install directory is added to linker paths -# [-] removed SWIG-related stuff from toolchain -# [+] added macro find_host_package, find_host_program to search -# packages/programs on the host system -# [~] fixed path to STL library -# - July 2011 -# [~] fixed options caching -# [~] search for all supported NDK versions -# [~] allowed spaces in NDK path -# - September 2011 -# [~] updated for NDK r6b -# - November 2011 -# [*] rewritten for NDK r7 -# [+] x86 toolchain support (experimental) -# [+] added "armeabi-v6 with VFP" ABI for ARMv6 processors. -# [~] improved compiler and linker flags management -# [+] support different build flags for Release and Debug configurations -# [~] by default compiler flags the same as used by ndk-build (but only -# where reasonable) -# [~] ANDROID_NDK_TOOLCHAIN_ROOT is splitted to ANDROID_STANDALONE_TOOLCHAIN -# and ANDROID_TOOLCHAIN_ROOT -# [~] ARM_TARGET is renamed to ANDROID_ABI -# [~] ARMEABI_NDK_NAME is renamed to ANDROID_NDK_ABI_NAME -# [~] ANDROID_API_LEVEL is renamed to ANDROID_NATIVE_API_LEVEL -# - January 2012 -# [+] added stlport_static support (experimental) -# [+] added special check for cygwin -# [+] filtered out hidden files (starting with .) while globbing inside NDK -# [+] automatically applied GLESv2 linkage fix for NDK revisions 5-6 -# [+] added ANDROID_GET_ABI_RAWNAME to get NDK ABI names by CMake flags -# - February 2012 -# [+] updated for NDK r7b -# [~] fixed cmake try_compile() command -# [~] Fix for missing install_name_tool on OS X -# - March 2012 -# [~] fixed incorrect C compiler flags -# [~] fixed CMAKE_SYSTEM_PROCESSOR change on ANDROID_ABI change -# [+] improved toolchain loading speed -# [+] added assembler language support (.S) -# [+] allowed preset search paths and extra search suffixes -# - April 2012 -# [+] updated for NDK r7c -# [~] fixed most of problems with compiler/linker flags and caching -# [+] added option ANDROID_FUNCTION_LEVEL_LINKING -# - May 2012 -# [+] updated for NDK r8 -# [+] added mips architecture support -# - August 2012 -# [+] updated for NDK r8b -# [~] all intermediate files generated by toolchain are moved to CMakeFiles -# [~] libstdc++ and libsupc are removed from explicit link libraries -# [+] added CCache support (via NDK_CCACHE environment or cmake variable) -# [+] added gold linker support for NDK r8b -# [~] fixed mips linker flags for NDK r8b -# - September 2012 -# [+] added NDK release name detection (see ANDROID_NDK_RELEASE) -# [+] added support for all C++ runtimes from NDK -# (system, gabi++, stlport, gnustl) -# [+] improved warnings on known issues of NDKs -# [~] use gold linker as default if available (NDK r8b) -# [~] globally turned off rpath -# [~] compiler options are aligned with NDK r8b -# - October 2012 -# [~] fixed C++ linking: explicitly link with math library (OpenCV #2426) -# - November 2012 -# [+] updated for NDK r8c -# [+] added support for clang compiler -# - December 2012 -# [+] suppress warning about unused CMAKE_TOOLCHAIN_FILE variable -# [+] adjust API level to closest compatible as NDK does -# [~] fixed ccache full path search -# [+] updated for NDK r8d -# [~] compiler options are aligned with NDK r8d -# - March 2013 -# [+] updated for NDK r8e (x86 version) -# [+] support x86_64 version of NDK -# - April 2013 -# [+] support non-release NDK layouts (from Linaro git and Android git) -# [~] automatically detect if explicit link to crtbegin_*.o is needed -# - June 2013 -# [~] fixed stl include path for standalone toolchain made by NDK >= r8c -# - July 2013 -# [+] updated for NDK r9 -# - November 2013 -# [+] updated for NDK r9b -# - December 2013 -# [+] updated for NDK r9c -# - January 2014 -# [~] fix copying of shared STL -# ------------------------------------------------------------------------------ - -cmake_minimum_required( VERSION 2.6.3 ) - -if( DEFINED CMAKE_CROSSCOMPILING ) - # subsequent toolchain loading is not really needed - return() -endif() - -if( CMAKE_TOOLCHAIN_FILE ) - # touch toolchain variable only to suppress "unused variable" warning -endif() - -get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) -if( _CMAKE_IN_TRY_COMPILE ) - include( "${CMAKE_CURRENT_SOURCE_DIR}/../android.toolchain.config.cmake" OPTIONAL ) -endif() - -# this one is important -set( CMAKE_SYSTEM_NAME Linux ) -# this one not so much -set( CMAKE_SYSTEM_VERSION 1 ) - -# rpath makes low sence for Android -set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." ) - -set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" ) -if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS) - if( CMAKE_HOST_WIN32 ) - file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS ) - set( ANDROID_NDK_SEARCH_PATHS "${ANDROID_NDK_SEARCH_PATHS}/android-ndk" "$ENV{SystemDrive}/NVPACK/android-ndk" ) - else() - file( TO_CMAKE_PATH "$ENV{HOME}" ANDROID_NDK_SEARCH_PATHS ) - set( ANDROID_NDK_SEARCH_PATHS /opt/android-ndk "${ANDROID_NDK_SEARCH_PATHS}/NVPACK/android-ndk" ) - endif() -endif() -if(NOT DEFINED ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH) - set( ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH /opt/android-toolchain ) -endif() - -set( ANDROID_SUPPORTED_ABIS_arm "armeabi-v7a;armeabi;armeabi-v7a with NEON;armeabi-v7a with VFPV3;armeabi-v6 with VFP" ) -set( ANDROID_SUPPORTED_ABIS_x86 "x86" ) -set( ANDROID_SUPPORTED_ABIS_mipsel "mips" ) - -set( ANDROID_DEFAULT_NDK_API_LEVEL 8 ) -set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 ) -set( ANDROID_DEFAULT_NDK_API_LEVEL_mips 9 ) - - -macro( __LIST_FILTER listvar regex ) - if( ${listvar} ) - foreach( __val ${${listvar}} ) - if( __val MATCHES "${regex}" ) - list( REMOVE_ITEM ${listvar} "${__val}" ) - endif() - endforeach() - endif() -endmacro() - -macro( __INIT_VARIABLE var_name ) - set( __test_path 0 ) - foreach( __var ${ARGN} ) - if( __var STREQUAL "PATH" ) - set( __test_path 1 ) - break() - endif() - endforeach() - if( __test_path AND NOT EXISTS "${${var_name}}" ) - unset( ${var_name} CACHE ) - endif() - if( "${${var_name}}" STREQUAL "" ) - set( __values 0 ) - foreach( __var ${ARGN} ) - if( __var STREQUAL "VALUES" ) - set( __values 1 ) - elseif( NOT __var STREQUAL "PATH" ) - set( __obsolete 0 ) - if( __var MATCHES "^OBSOLETE_.*$" ) - string( REPLACE "OBSOLETE_" "" __var "${__var}" ) - set( __obsolete 1 ) - endif() - if( __var MATCHES "^ENV_.*$" ) - string( REPLACE "ENV_" "" __var "${__var}" ) - set( __value "$ENV{${__var}}" ) - elseif( DEFINED ${__var} ) - set( __value "${${__var}}" ) - else() - if( __values ) - set( __value "${__var}" ) - else() - set( __value "" ) - endif() - endif() - if( NOT "${__value}" STREQUAL "" ) - if( __test_path ) - if( EXISTS "${__value}" ) - file( TO_CMAKE_PATH "${__value}" ${var_name} ) - if( __obsolete AND NOT _CMAKE_IN_TRY_COMPILE ) - message( WARNING "Using value of obsolete variable ${__var} as initial value for ${var_name}. Please note, that ${__var} can be completely removed in future versions of the toolchain." ) - endif() - break() - endif() - else() - set( ${var_name} "${__value}" ) - if( __obsolete AND NOT _CMAKE_IN_TRY_COMPILE ) - message( WARNING "Using value of obsolete variable ${__var} as initial value for ${var_name}. Please note, that ${__var} can be completely removed in future versions of the toolchain." ) - endif() - break() - endif() - endif() - endif() - endforeach() - unset( __value ) - unset( __values ) - unset( __obsolete ) - elseif( __test_path ) - file( TO_CMAKE_PATH "${${var_name}}" ${var_name} ) - endif() - unset( __test_path ) -endmacro() - -macro( __DETECT_NATIVE_API_LEVEL _var _path ) - SET( __ndkApiLevelRegex "^[\t ]*#define[\t ]+__ANDROID_API__[\t ]+([0-9]+)[\t ]*$" ) - FILE( STRINGS ${_path} __apiFileContent REGEX "${__ndkApiLevelRegex}" ) - if( NOT __apiFileContent ) - message( SEND_ERROR "Could not get Android native API level. Probably you have specified invalid level value, or your copy of NDK/toolchain is broken." ) - endif() - string( REGEX REPLACE "${__ndkApiLevelRegex}" "\\1" ${_var} "${__apiFileContent}" ) - unset( __apiFileContent ) - unset( __ndkApiLevelRegex ) -endmacro() - -macro( __DETECT_TOOLCHAIN_MACHINE_NAME _var _root ) - if( EXISTS "${_root}" ) - file( GLOB __gccExePath RELATIVE "${_root}/bin/" "${_root}/bin/*-gcc${TOOL_OS_SUFFIX}" ) - __LIST_FILTER( __gccExePath "^[.].*" ) - list( LENGTH __gccExePath __gccExePathsCount ) - if( NOT __gccExePathsCount EQUAL 1 AND NOT _CMAKE_IN_TRY_COMPILE ) - message( WARNING "Could not determine machine name for compiler from ${_root}" ) - set( ${_var} "" ) - else() - get_filename_component( __gccExeName "${__gccExePath}" NAME_WE ) - string( REPLACE "-gcc" "" ${_var} "${__gccExeName}" ) - endif() - unset( __gccExePath ) - unset( __gccExePathsCount ) - unset( __gccExeName ) - else() - set( ${_var} "" ) - endif() -endmacro() - - -# fight against cygwin -set( ANDROID_FORBID_SYGWIN TRUE CACHE BOOL "Prevent cmake from working under cygwin and using cygwin tools") -mark_as_advanced( ANDROID_FORBID_SYGWIN ) -if( ANDROID_FORBID_SYGWIN ) - if( CYGWIN ) - message( FATAL_ERROR "Android NDK and android-cmake toolchain are not welcome Cygwin. It is unlikely that this cmake toolchain will work under cygwin. But if you want to try then you can set cmake variable ANDROID_FORBID_SYGWIN to FALSE and rerun cmake." ) - endif() - - if( CMAKE_HOST_WIN32 ) - # remove cygwin from PATH - set( __new_path "$ENV{PATH}") - __LIST_FILTER( __new_path "cygwin" ) - set(ENV{PATH} "${__new_path}") - unset(__new_path) - endif() -endif() - - -# detect current host platform -if( NOT DEFINED ANDROID_NDK_HOST_X64 AND (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64" OR CMAKE_HOST_APPLE) ) - set( ANDROID_NDK_HOST_X64 1 CACHE BOOL "Try to use 64-bit compiler toolchain" ) - mark_as_advanced( ANDROID_NDK_HOST_X64 ) -endif() - -set( TOOL_OS_SUFFIX "" ) -if( CMAKE_HOST_APPLE ) - set( ANDROID_NDK_HOST_SYSTEM_NAME "darwin-x86_64" ) - set( ANDROID_NDK_HOST_SYSTEM_NAME2 "darwin-x86" ) -elseif( CMAKE_HOST_WIN32 ) - set( ANDROID_NDK_HOST_SYSTEM_NAME "windows-x86_64" ) - set( ANDROID_NDK_HOST_SYSTEM_NAME2 "windows" ) - set( TOOL_OS_SUFFIX ".exe" ) -elseif( CMAKE_HOST_UNIX ) - set( ANDROID_NDK_HOST_SYSTEM_NAME "linux-x86_64" ) - set( ANDROID_NDK_HOST_SYSTEM_NAME2 "linux-x86" ) -else() - message( FATAL_ERROR "Cross-compilation on your platform is not supported by this cmake toolchain" ) -endif() - -if( NOT ANDROID_NDK_HOST_X64 ) - set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} ) -endif() - -# see if we have path to Android NDK -__INIT_VARIABLE( ANDROID_NDK PATH ENV_ANDROID_NDK ) -if( NOT ANDROID_NDK ) - # see if we have path to Android standalone toolchain - __INIT_VARIABLE( ANDROID_STANDALONE_TOOLCHAIN PATH ENV_ANDROID_STANDALONE_TOOLCHAIN OBSOLETE_ANDROID_NDK_TOOLCHAIN_ROOT OBSOLETE_ENV_ANDROID_NDK_TOOLCHAIN_ROOT ) - - if( NOT ANDROID_STANDALONE_TOOLCHAIN ) - #try to find Android NDK in one of the the default locations - set( __ndkSearchPaths ) - foreach( __ndkSearchPath ${ANDROID_NDK_SEARCH_PATHS} ) - foreach( suffix ${ANDROID_SUPPORTED_NDK_VERSIONS} ) - list( APPEND __ndkSearchPaths "${__ndkSearchPath}${suffix}" ) - endforeach() - endforeach() - __INIT_VARIABLE( ANDROID_NDK PATH VALUES ${__ndkSearchPaths} ) - unset( __ndkSearchPaths ) - - if( ANDROID_NDK ) - message( STATUS "Using default path for Android NDK: ${ANDROID_NDK}" ) - message( STATUS " If you prefer to use a different location, please define a cmake or environment variable: ANDROID_NDK" ) - else() - #try to find Android standalone toolchain in one of the the default locations - __INIT_VARIABLE( ANDROID_STANDALONE_TOOLCHAIN PATH ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH ) - - if( ANDROID_STANDALONE_TOOLCHAIN ) - message( STATUS "Using default path for standalone toolchain ${ANDROID_STANDALONE_TOOLCHAIN}" ) - message( STATUS " If you prefer to use a different location, please define the variable: ANDROID_STANDALONE_TOOLCHAIN" ) - endif( ANDROID_STANDALONE_TOOLCHAIN ) - endif( ANDROID_NDK ) - endif( NOT ANDROID_STANDALONE_TOOLCHAIN ) -endif( NOT ANDROID_NDK ) - -# remember found paths -if( ANDROID_NDK ) - get_filename_component( ANDROID_NDK "${ANDROID_NDK}" ABSOLUTE ) - set( ANDROID_NDK "${ANDROID_NDK}" CACHE INTERNAL "Path of the Android NDK" FORCE ) - set( BUILD_WITH_ANDROID_NDK True ) - if( EXISTS "${ANDROID_NDK}/RELEASE.TXT" ) - file( STRINGS "${ANDROID_NDK}/RELEASE.TXT" ANDROID_NDK_RELEASE_FULL LIMIT_COUNT 1 REGEX r[0-9]+[a-z]? ) - string( REGEX MATCH r[0-9]+[a-z]? ANDROID_NDK_RELEASE "${ANDROID_NDK_RELEASE_FULL}" ) - else() - set( ANDROID_NDK_RELEASE "r1x" ) - set( ANDROID_NDK_RELEASE_FULL "unreleased" ) - endif() -elseif( ANDROID_STANDALONE_TOOLCHAIN ) - get_filename_component( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" ABSOLUTE ) - # try to detect change - if( CMAKE_AR ) - string( LENGTH "${ANDROID_STANDALONE_TOOLCHAIN}" __length ) - string( SUBSTRING "${CMAKE_AR}" 0 ${__length} __androidStandaloneToolchainPreviousPath ) - if( NOT __androidStandaloneToolchainPreviousPath STREQUAL ANDROID_STANDALONE_TOOLCHAIN ) - message( FATAL_ERROR "It is not possible to change path to the Android standalone toolchain on subsequent run." ) - endif() - unset( __androidStandaloneToolchainPreviousPath ) - unset( __length ) - endif() - set( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" CACHE INTERNAL "Path of the Android standalone toolchain" FORCE ) - set( BUILD_WITH_STANDALONE_TOOLCHAIN True ) -else() - list(GET ANDROID_NDK_SEARCH_PATHS 0 ANDROID_NDK_SEARCH_PATH) - message( FATAL_ERROR "Could not find neither Android NDK nor Android standalone toolchain. - You should either set an environment variable: - export ANDROID_NDK=~/my-android-ndk - or - export ANDROID_STANDALONE_TOOLCHAIN=~/my-android-toolchain - or put the toolchain or NDK in the default path: - sudo ln -s ~/my-android-ndk ${ANDROID_NDK_SEARCH_PATH} - sudo ln -s ~/my-android-toolchain ${ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH}" ) -endif() - -# android NDK layout -if( BUILD_WITH_ANDROID_NDK ) - if( NOT DEFINED ANDROID_NDK_LAYOUT ) - # try to automatically detect the layout - if( EXISTS "${ANDROID_NDK}/RELEASE.TXT") - set( ANDROID_NDK_LAYOUT "RELEASE" ) - elseif( EXISTS "${ANDROID_NDK}/../../linux-x86/toolchain/" ) - set( ANDROID_NDK_LAYOUT "LINARO" ) - elseif( EXISTS "${ANDROID_NDK}/../../gcc/" ) - set( ANDROID_NDK_LAYOUT "ANDROID" ) - endif() - endif() - set( ANDROID_NDK_LAYOUT "${ANDROID_NDK_LAYOUT}" CACHE STRING "The inner layout of NDK" ) - mark_as_advanced( ANDROID_NDK_LAYOUT ) - if( ANDROID_NDK_LAYOUT STREQUAL "LINARO" ) - set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} ) # only 32-bit at the moment - set( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK}/../../${ANDROID_NDK_HOST_SYSTEM_NAME}/toolchain" ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH "" ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH2 "" ) - elseif( ANDROID_NDK_LAYOUT STREQUAL "ANDROID" ) - set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} ) # only 32-bit at the moment - set( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK}/../../gcc/${ANDROID_NDK_HOST_SYSTEM_NAME}/arm" ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH "" ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH2 "" ) - else() # ANDROID_NDK_LAYOUT STREQUAL "RELEASE" - set( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK}/toolchains" ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH "/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}" ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH2 "/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME2}" ) - endif() - get_filename_component( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK_TOOLCHAINS_PATH}" ABSOLUTE ) - - # try to detect change of NDK - if( CMAKE_AR ) - string( LENGTH "${ANDROID_NDK_TOOLCHAINS_PATH}" __length ) - string( SUBSTRING "${CMAKE_AR}" 0 ${__length} __androidNdkPreviousPath ) - if( NOT __androidNdkPreviousPath STREQUAL ANDROID_NDK_TOOLCHAINS_PATH ) - message( FATAL_ERROR "It is not possible to change the path to the NDK on subsequent CMake run. You must remove all generated files from your build folder first. - " ) - endif() - unset( __androidNdkPreviousPath ) - unset( __length ) - endif() -endif() - - -# get all the details about standalone toolchain -if( BUILD_WITH_STANDALONE_TOOLCHAIN ) - __DETECT_NATIVE_API_LEVEL( ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_STANDALONE_TOOLCHAIN}/sysroot/usr/include/android/api-level.h" ) - set( ANDROID_STANDALONE_TOOLCHAIN_API_LEVEL ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} ) - set( __availableToolchains "standalone" ) - __DETECT_TOOLCHAIN_MACHINE_NAME( __availableToolchainMachines "${ANDROID_STANDALONE_TOOLCHAIN}" ) - if( NOT __availableToolchainMachines ) - message( FATAL_ERROR "Could not determine machine name of your toolchain. Probably your Android standalone toolchain is broken." ) - endif() - if( __availableToolchainMachines MATCHES i686 ) - set( __availableToolchainArchs "x86" ) - elseif( __availableToolchainMachines MATCHES arm ) - set( __availableToolchainArchs "arm" ) - elseif( __availableToolchainMachines MATCHES mipsel ) - set( __availableToolchainArchs "mipsel" ) - endif() - execute_process( COMMAND "${ANDROID_STANDALONE_TOOLCHAIN}/bin/${__availableToolchainMachines}-gcc${TOOL_OS_SUFFIX}" -dumpversion - OUTPUT_VARIABLE __availableToolchainCompilerVersions OUTPUT_STRIP_TRAILING_WHITESPACE ) - string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9]+)?" __availableToolchainCompilerVersions "${__availableToolchainCompilerVersions}" ) - if( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/bin/clang${TOOL_OS_SUFFIX}" ) - list( APPEND __availableToolchains "standalone-clang" ) - list( APPEND __availableToolchainMachines ${__availableToolchainMachines} ) - list( APPEND __availableToolchainArchs ${__availableToolchainArchs} ) - list( APPEND __availableToolchainCompilerVersions ${__availableToolchainCompilerVersions} ) - endif() -endif() - -macro( __GLOB_NDK_TOOLCHAINS __availableToolchainsVar __availableToolchainsLst __toolchain_subpath ) - foreach( __toolchain ${${__availableToolchainsLst}} ) - if( "${__toolchain}" MATCHES "-clang3[.][0-9]$" AND NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}${__toolchain_subpath}" ) - string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" ) - else() - set( __gcc_toolchain "${__toolchain}" ) - endif() - __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK_TOOLCHAINS_PATH}/${__gcc_toolchain}${__toolchain_subpath}" ) - if( __machine ) - string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" ) - if( __machine MATCHES i686 ) - set( __arch "x86" ) - elseif( __machine MATCHES arm ) - set( __arch "arm" ) - elseif( __machine MATCHES mipsel ) - set( __arch "mipsel" ) - endif() - list( APPEND __availableToolchainMachines "${__machine}" ) - list( APPEND __availableToolchainArchs "${__arch}" ) - list( APPEND __availableToolchainCompilerVersions "${__version}" ) - list( APPEND ${__availableToolchainsVar} "${__toolchain}" ) - endif() - unset( __gcc_toolchain ) - endforeach() -endmacro() - -# get all the details about NDK -if( BUILD_WITH_ANDROID_NDK ) - file( GLOB ANDROID_SUPPORTED_NATIVE_API_LEVELS RELATIVE "${ANDROID_NDK}/platforms" "${ANDROID_NDK}/platforms/android-*" ) - string( REPLACE "android-" "" ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_SUPPORTED_NATIVE_API_LEVELS}" ) - set( __availableToolchains "" ) - set( __availableToolchainMachines "" ) - set( __availableToolchainArchs "" ) - set( __availableToolchainCompilerVersions "" ) - if( ANDROID_TOOLCHAIN_NAME AND EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_TOOLCHAIN_NAME}/" ) - # do not go through all toolchains if we know the name - set( __availableToolchainsLst "${ANDROID_TOOLCHAIN_NAME}" ) - __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH}" ) - if( NOT __availableToolchains AND NOT ANDROID_NDK_TOOLCHAINS_SUBPATH STREQUAL ANDROID_NDK_TOOLCHAINS_SUBPATH2 ) - __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH2}" ) - if( __availableToolchains ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH ${ANDROID_NDK_TOOLCHAINS_SUBPATH2} ) - endif() - endif() - endif() - if( NOT __availableToolchains ) - file( GLOB __availableToolchainsLst RELATIVE "${ANDROID_NDK_TOOLCHAINS_PATH}" "${ANDROID_NDK_TOOLCHAINS_PATH}/*" ) - if( __availableToolchains ) - list(SORT __availableToolchainsLst) # we need clang to go after gcc - endif() - __LIST_FILTER( __availableToolchainsLst "^[.]" ) - __LIST_FILTER( __availableToolchainsLst "llvm" ) - __LIST_FILTER( __availableToolchainsLst "renderscript" ) - __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH}" ) - if( NOT __availableToolchains AND NOT ANDROID_NDK_TOOLCHAINS_SUBPATH STREQUAL ANDROID_NDK_TOOLCHAINS_SUBPATH2 ) - __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH2}" ) - if( __availableToolchains ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH ${ANDROID_NDK_TOOLCHAINS_SUBPATH2} ) - endif() - endif() - endif() - if( NOT __availableToolchains ) - message( FATAL_ERROR "Could not find any working toolchain in the NDK. Probably your Android NDK is broken." ) - endif() -endif() - -# build list of available ABIs -set( ANDROID_SUPPORTED_ABIS "" ) -set( __uniqToolchainArchNames ${__availableToolchainArchs} ) -list( REMOVE_DUPLICATES __uniqToolchainArchNames ) -list( SORT __uniqToolchainArchNames ) -foreach( __arch ${__uniqToolchainArchNames} ) - list( APPEND ANDROID_SUPPORTED_ABIS ${ANDROID_SUPPORTED_ABIS_${__arch}} ) -endforeach() -unset( __uniqToolchainArchNames ) -if( NOT ANDROID_SUPPORTED_ABIS ) - message( FATAL_ERROR "No one of known Android ABIs is supported by this cmake toolchain." ) -endif() - -# choose target ABI -__INIT_VARIABLE( ANDROID_ABI OBSOLETE_ARM_TARGET OBSOLETE_ARM_TARGETS VALUES ${ANDROID_SUPPORTED_ABIS} ) -# verify that target ABI is supported -list( FIND ANDROID_SUPPORTED_ABIS "${ANDROID_ABI}" __androidAbiIdx ) -if( __androidAbiIdx EQUAL -1 ) - string( REPLACE ";" "\", \"" PRINTABLE_ANDROID_SUPPORTED_ABIS "${ANDROID_SUPPORTED_ABIS}" ) - message( FATAL_ERROR "Specified ANDROID_ABI = \"${ANDROID_ABI}\" is not supported by this cmake toolchain or your NDK/toolchain. - Supported values are: \"${PRINTABLE_ANDROID_SUPPORTED_ABIS}\" - " ) -endif() -unset( __androidAbiIdx ) - -# set target ABI options -if( ANDROID_ABI STREQUAL "x86" ) - set( X86 true ) - set( ANDROID_NDK_ABI_NAME "x86" ) - set( ANDROID_ARCH_NAME "x86" ) - set( ANDROID_ARCH_FULLNAME "x86" ) - set( ANDROID_LLVM_TRIPLE "i686-none-linux-android" ) - set( CMAKE_SYSTEM_PROCESSOR "i686" ) -elseif( ANDROID_ABI STREQUAL "mips" ) - set( MIPS true ) - set( ANDROID_NDK_ABI_NAME "mips" ) - set( ANDROID_ARCH_NAME "mips" ) - set( ANDROID_ARCH_FULLNAME "mipsel" ) - set( ANDROID_LLVM_TRIPLE "mipsel-none-linux-android" ) - set( CMAKE_SYSTEM_PROCESSOR "mips" ) -elseif( ANDROID_ABI STREQUAL "armeabi" ) - set( ARMEABI true ) - set( ANDROID_NDK_ABI_NAME "armeabi" ) - set( ANDROID_ARCH_NAME "arm" ) - set( ANDROID_ARCH_FULLNAME "arm" ) - set( ANDROID_LLVM_TRIPLE "armv5te-none-linux-androideabi" ) - set( CMAKE_SYSTEM_PROCESSOR "armv5te" ) -elseif( ANDROID_ABI STREQUAL "armeabi-v6 with VFP" ) - set( ARMEABI_V6 true ) - set( ANDROID_NDK_ABI_NAME "armeabi" ) - set( ANDROID_ARCH_NAME "arm" ) - set( ANDROID_ARCH_FULLNAME "arm" ) - set( ANDROID_LLVM_TRIPLE "armv5te-none-linux-androideabi" ) - set( CMAKE_SYSTEM_PROCESSOR "armv6" ) - # need always fallback to older platform - set( ARMEABI true ) -elseif( ANDROID_ABI STREQUAL "armeabi-v7a") - set( ARMEABI_V7A true ) - set( ANDROID_NDK_ABI_NAME "armeabi-v7a" ) - set( ANDROID_ARCH_NAME "arm" ) - set( ANDROID_ARCH_FULLNAME "arm" ) - set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" ) - set( CMAKE_SYSTEM_PROCESSOR "armv7-a" ) -elseif( ANDROID_ABI STREQUAL "armeabi-v7a with VFPV3" ) - set( ARMEABI_V7A true ) - set( ANDROID_NDK_ABI_NAME "armeabi-v7a" ) - set( ANDROID_ARCH_NAME "arm" ) - set( ANDROID_ARCH_FULLNAME "arm" ) - set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" ) - set( CMAKE_SYSTEM_PROCESSOR "armv7-a" ) - set( VFPV3 true ) -elseif( ANDROID_ABI STREQUAL "armeabi-v7a with NEON" ) - set( ARMEABI_V7A true ) - set( ANDROID_NDK_ABI_NAME "armeabi-v7a" ) - set( ANDROID_ARCH_NAME "arm" ) - set( ANDROID_ARCH_FULLNAME "arm" ) - set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" ) - set( CMAKE_SYSTEM_PROCESSOR "armv7-a" ) - set( VFPV3 true ) - set( NEON true ) -else() - message( SEND_ERROR "Unknown ANDROID_ABI=\"${ANDROID_ABI}\" is specified." ) -endif() - -if( CMAKE_BINARY_DIR AND EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake" ) - # really dirty hack - # it is not possible to change CMAKE_SYSTEM_PROCESSOR after the first run... - file( APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake" "SET(CMAKE_SYSTEM_PROCESSOR \"${CMAKE_SYSTEM_PROCESSOR}\")\n" ) -endif() - -if( ANDROID_ARCH_NAME STREQUAL "arm" AND NOT ARMEABI_V6 ) - __INIT_VARIABLE( ANDROID_FORCE_ARM_BUILD OBSOLETE_FORCE_ARM VALUES OFF ) - set( ANDROID_FORCE_ARM_BUILD ${ANDROID_FORCE_ARM_BUILD} CACHE BOOL "Use 32-bit ARM instructions instead of Thumb-1" FORCE ) - mark_as_advanced( ANDROID_FORCE_ARM_BUILD ) -else() - unset( ANDROID_FORCE_ARM_BUILD CACHE ) -endif() - -# choose toolchain -if( ANDROID_TOOLCHAIN_NAME ) - list( FIND __availableToolchains "${ANDROID_TOOLCHAIN_NAME}" __toolchainIdx ) - if( __toolchainIdx EQUAL -1 ) - list( SORT __availableToolchains ) - string( REPLACE ";" "\n * " toolchains_list "${__availableToolchains}" ) - set( toolchains_list " * ${toolchains_list}") - message( FATAL_ERROR "Specified toolchain \"${ANDROID_TOOLCHAIN_NAME}\" is missing in your NDK or broken. Please verify that your NDK is working or select another compiler toolchain. -To configure the toolchain set CMake variable ANDROID_TOOLCHAIN_NAME to one of the following values:\n${toolchains_list}\n" ) - endif() - list( GET __availableToolchainArchs ${__toolchainIdx} __toolchainArch ) - if( NOT __toolchainArch STREQUAL ANDROID_ARCH_FULLNAME ) - message( SEND_ERROR "Selected toolchain \"${ANDROID_TOOLCHAIN_NAME}\" is not able to compile binaries for the \"${ANDROID_ARCH_NAME}\" platform." ) - endif() -else() - set( __toolchainIdx -1 ) - set( __applicableToolchains "" ) - set( __toolchainMaxVersion "0.0.0" ) - list( LENGTH __availableToolchains __availableToolchainsCount ) - math( EXPR __availableToolchainsCount "${__availableToolchainsCount}-1" ) - foreach( __idx RANGE ${__availableToolchainsCount} ) - list( GET __availableToolchainArchs ${__idx} __toolchainArch ) - if( __toolchainArch STREQUAL ANDROID_ARCH_FULLNAME ) - list( GET __availableToolchainCompilerVersions ${__idx} __toolchainVersion ) - string( REPLACE "x" "99" __toolchainVersion "${__toolchainVersion}") - if( __toolchainVersion VERSION_GREATER __toolchainMaxVersion ) - set( __toolchainMaxVersion "${__toolchainVersion}" ) - set( __toolchainIdx ${__idx} ) - endif() - endif() - endforeach() - unset( __availableToolchainsCount ) - unset( __toolchainMaxVersion ) - unset( __toolchainVersion ) -endif() -unset( __toolchainArch ) -if( __toolchainIdx EQUAL -1 ) - message( FATAL_ERROR "No one of available compiler toolchains is able to compile for ${ANDROID_ARCH_NAME} platform." ) -endif() -list( GET __availableToolchains ${__toolchainIdx} ANDROID_TOOLCHAIN_NAME ) -list( GET __availableToolchainMachines ${__toolchainIdx} ANDROID_TOOLCHAIN_MACHINE_NAME ) -list( GET __availableToolchainCompilerVersions ${__toolchainIdx} ANDROID_COMPILER_VERSION ) - -unset( __toolchainIdx ) -unset( __availableToolchains ) -unset( __availableToolchainMachines ) -unset( __availableToolchainArchs ) -unset( __availableToolchainCompilerVersions ) - -# choose native API level -__INIT_VARIABLE( ANDROID_NATIVE_API_LEVEL ENV_ANDROID_NATIVE_API_LEVEL ANDROID_API_LEVEL ENV_ANDROID_API_LEVEL ANDROID_STANDALONE_TOOLCHAIN_API_LEVEL ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME} ANDROID_DEFAULT_NDK_API_LEVEL ) -string( REGEX MATCH "[0-9]+" ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" ) -# adjust API level -set( __real_api_level ${ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME}} ) -foreach( __level ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} ) - if( NOT __level GREATER ANDROID_NATIVE_API_LEVEL AND NOT __level LESS __real_api_level ) - set( __real_api_level ${__level} ) - endif() -endforeach() -if( __real_api_level AND NOT ANDROID_NATIVE_API_LEVEL EQUAL __real_api_level ) - message( STATUS "Adjusting Android API level 'android-${ANDROID_NATIVE_API_LEVEL}' to 'android-${__real_api_level}'") - set( ANDROID_NATIVE_API_LEVEL ${__real_api_level} ) -endif() -unset(__real_api_level) -# validate -list( FIND ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_NATIVE_API_LEVEL}" __levelIdx ) -if( __levelIdx EQUAL -1 ) - message( SEND_ERROR "Specified Android native API level 'android-${ANDROID_NATIVE_API_LEVEL}' is not supported by your NDK/toolchain." ) -else() - if( BUILD_WITH_ANDROID_NDK ) - __DETECT_NATIVE_API_LEVEL( __realApiLevel "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}/usr/include/android/api-level.h" ) - if( NOT __realApiLevel EQUAL ANDROID_NATIVE_API_LEVEL ) - message( SEND_ERROR "Specified Android API level (${ANDROID_NATIVE_API_LEVEL}) does not match to the level found (${__realApiLevel}). Probably your copy of NDK is broken." ) - endif() - unset( __realApiLevel ) - endif() - set( ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" CACHE STRING "Android API level for native code" FORCE ) - if( CMAKE_VERSION VERSION_GREATER "2.8" ) - list( SORT ANDROID_SUPPORTED_NATIVE_API_LEVELS ) - set_property( CACHE ANDROID_NATIVE_API_LEVEL PROPERTY STRINGS ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} ) - endif() -endif() -unset( __levelIdx ) - - -# remember target ABI -set( ANDROID_ABI "${ANDROID_ABI}" CACHE STRING "The target ABI for Android. If arm, then armeabi-v7a is recommended for hardware floating point." FORCE ) -if( CMAKE_VERSION VERSION_GREATER "2.8" ) - list( SORT ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_FULLNAME} ) - set_property( CACHE ANDROID_ABI PROPERTY STRINGS ${ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_FULLNAME}} ) -endif() - - -# runtime choice (STL, rtti, exceptions) -if( NOT ANDROID_STL ) - # honor legacy ANDROID_USE_STLPORT - if( DEFINED ANDROID_USE_STLPORT ) - if( ANDROID_USE_STLPORT ) - set( ANDROID_STL stlport_static ) - endif() - message( WARNING "You are using an obsolete variable ANDROID_USE_STLPORT to select the STL variant. Use -DANDROID_STL=stlport_static instead." ) - endif() - if( NOT ANDROID_STL ) - set( ANDROID_STL gnustl_static ) - endif() -endif() -set( ANDROID_STL "${ANDROID_STL}" CACHE STRING "C++ runtime" ) -set( ANDROID_STL_FORCE_FEATURES ON CACHE BOOL "automatically configure rtti and exceptions support based on C++ runtime" ) -mark_as_advanced( ANDROID_STL ANDROID_STL_FORCE_FEATURES ) - -if( BUILD_WITH_ANDROID_NDK ) - if( NOT "${ANDROID_STL}" MATCHES "^(none|system|system_re|gabi\\+\\+_static|gabi\\+\\+_shared|stlport_static|stlport_shared|gnustl_static|gnustl_shared)$") - message( FATAL_ERROR "ANDROID_STL is set to invalid value \"${ANDROID_STL}\". -The possible values are: - none -> Do not configure the runtime. - system -> Use the default minimal system C++ runtime library. - system_re -> Same as system but with rtti and exceptions. - gabi++_static -> Use the GAbi++ runtime as a static library. - gabi++_shared -> Use the GAbi++ runtime as a shared library. - stlport_static -> Use the STLport runtime as a static library. - stlport_shared -> Use the STLport runtime as a shared library. - gnustl_static -> (default) Use the GNU STL as a static library. - gnustl_shared -> Use the GNU STL as a shared library. -" ) - endif() -elseif( BUILD_WITH_STANDALONE_TOOLCHAIN ) - if( NOT "${ANDROID_STL}" MATCHES "^(none|gnustl_static|gnustl_shared)$") - message( FATAL_ERROR "ANDROID_STL is set to invalid value \"${ANDROID_STL}\". -The possible values are: - none -> Do not configure the runtime. - gnustl_static -> (default) Use the GNU STL as a static library. - gnustl_shared -> Use the GNU STL as a shared library. -" ) - endif() -endif() - -unset( ANDROID_RTTI ) -unset( ANDROID_EXCEPTIONS ) -unset( ANDROID_STL_INCLUDE_DIRS ) -unset( __libstl ) -unset( __libsupcxx ) - -if( NOT _CMAKE_IN_TRY_COMPILE AND ANDROID_NDK_RELEASE STREQUAL "r7b" AND ARMEABI_V7A AND NOT VFPV3 AND ANDROID_STL MATCHES "gnustl" ) - message( WARNING "The GNU STL armeabi-v7a binaries from NDK r7b can crash non-NEON devices. The files provided with NDK r7b were not configured properly, resulting in crashes on Tegra2-based devices and others when trying to use certain floating-point functions (e.g., cosf, sinf, expf). -You are strongly recommended to switch to another NDK release. -" ) -endif() - -if( NOT _CMAKE_IN_TRY_COMPILE AND X86 AND ANDROID_STL MATCHES "gnustl" AND ANDROID_NDK_RELEASE STREQUAL "r6" ) - message( WARNING "The x86 system header file from NDK r6 has incorrect definition for ptrdiff_t. You are recommended to upgrade to a newer NDK release or manually patch the header: -See https://android.googlesource.com/platform/development.git f907f4f9d4e56ccc8093df6fee54454b8bcab6c2 - diff --git a/ndk/platforms/android-9/arch-x86/include/machine/_types.h b/ndk/platforms/android-9/arch-x86/include/machine/_types.h - index 5e28c64..65892a1 100644 - --- a/ndk/platforms/android-9/arch-x86/include/machine/_types.h - +++ b/ndk/platforms/android-9/arch-x86/include/machine/_types.h - @@ -51,7 +51,11 @@ typedef long int ssize_t; - #endif - #ifndef _PTRDIFF_T - #define _PTRDIFF_T - -typedef long ptrdiff_t; - +# ifdef __ANDROID__ - + typedef int ptrdiff_t; - +# else - + typedef long ptrdiff_t; - +# endif - #endif -" ) -endif() - - -# setup paths and STL for standalone toolchain -if( BUILD_WITH_STANDALONE_TOOLCHAIN ) - set( ANDROID_TOOLCHAIN_ROOT "${ANDROID_STANDALONE_TOOLCHAIN}" ) - set( ANDROID_CLANG_TOOLCHAIN_ROOT "${ANDROID_STANDALONE_TOOLCHAIN}" ) - set( ANDROID_SYSROOT "${ANDROID_STANDALONE_TOOLCHAIN}/sysroot" ) - - if( NOT ANDROID_STL STREQUAL "none" ) - set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/include/c++/${ANDROID_COMPILER_VERSION}" ) - if( NOT EXISTS "${ANDROID_STL_INCLUDE_DIRS}" ) - # old location ( pre r8c ) - set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}" ) - endif() - if( ARMEABI_V7A AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}/bits" ) - list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}" ) - elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb/bits" ) - list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb" ) - else() - list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" ) - endif() - # always search static GNU STL to get the location of libsupc++.a - if( ARMEABI_V7A AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libstdc++.a" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb" ) - elseif( ARMEABI_V7A AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libstdc++.a" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}" ) - elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libstdc++.a" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb" ) - elseif( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libstdc++.a" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib" ) - endif() - if( __libstl ) - set( __libsupcxx "${__libstl}/libsupc++.a" ) - set( __libstl "${__libstl}/libstdc++.a" ) - endif() - if( NOT EXISTS "${__libsupcxx}" ) - message( FATAL_ERROR "The required libstdsupc++.a is missing in your standalone toolchain. - Usually it happens because of bug in make-standalone-toolchain.sh script from NDK r7, r7b and r7c. - You need to either upgrade to newer NDK or manually copy - $ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a - to - ${__libsupcxx} - " ) - endif() - if( ANDROID_STL STREQUAL "gnustl_shared" ) - if( ARMEABI_V7A AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" ) - elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libgnustl_shared.so" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libgnustl_shared.so" ) - elseif( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libgnustl_shared.so" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libgnustl_shared.so" ) - endif() - endif() - endif() -endif() - -# clang -if( "${ANDROID_TOOLCHAIN_NAME}" STREQUAL "standalone-clang" ) - set( ANDROID_COMPILER_IS_CLANG 1 ) - execute_process( COMMAND "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/clang${TOOL_OS_SUFFIX}" --version OUTPUT_VARIABLE ANDROID_CLANG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE ) - string( REGEX MATCH "[0-9]+[.][0-9]+" ANDROID_CLANG_VERSION "${ANDROID_CLANG_VERSION}") -elseif( "${ANDROID_TOOLCHAIN_NAME}" MATCHES "-clang3[.][0-9]?$" ) - string( REGEX MATCH "3[.][0-9]$" ANDROID_CLANG_VERSION "${ANDROID_TOOLCHAIN_NAME}") - string( REGEX REPLACE "-clang${ANDROID_CLANG_VERSION}$" "-4.6" ANDROID_GCC_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" ) - if( NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/llvm-${ANDROID_CLANG_VERSION}${ANDROID_NDK_TOOLCHAINS_SUBPATH}/bin/clang${TOOL_OS_SUFFIX}" ) - message( FATAL_ERROR "Could not find the Clang compiler driver" ) - endif() - set( ANDROID_COMPILER_IS_CLANG 1 ) - set( ANDROID_CLANG_TOOLCHAIN_ROOT "${ANDROID_NDK_TOOLCHAINS_PATH}/llvm-${ANDROID_CLANG_VERSION}${ANDROID_NDK_TOOLCHAINS_SUBPATH}" ) -else() - set( ANDROID_GCC_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" ) - unset( ANDROID_COMPILER_IS_CLANG CACHE ) -endif() - -string( REPLACE "." "" _clang_name "clang${ANDROID_CLANG_VERSION}" ) -if( NOT EXISTS "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}${TOOL_OS_SUFFIX}" ) - set( _clang_name "clang" ) -endif() - - -# setup paths and STL for NDK -if( BUILD_WITH_ANDROID_NDK ) - set( ANDROID_TOOLCHAIN_ROOT "${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}${ANDROID_NDK_TOOLCHAINS_SUBPATH}" ) - set( ANDROID_SYSROOT "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}" ) - - if( ANDROID_STL STREQUAL "none" ) - # do nothing - elseif( ANDROID_STL STREQUAL "system" ) - set( ANDROID_RTTI OFF ) - set( ANDROID_EXCEPTIONS OFF ) - set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/system/include" ) - elseif( ANDROID_STL STREQUAL "system_re" ) - set( ANDROID_RTTI ON ) - set( ANDROID_EXCEPTIONS ON ) - set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/system/include" ) - elseif( ANDROID_STL MATCHES "gabi" ) - if( ANDROID_NDK_RELEASE STRLESS "r7" ) - message( FATAL_ERROR "gabi++ is not awailable in your NDK. You have to upgrade to NDK r7 or newer to use gabi++.") - endif() - set( ANDROID_RTTI ON ) - set( ANDROID_EXCEPTIONS OFF ) - set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/gabi++/include" ) - set( __libstl "${ANDROID_NDK}/sources/cxx-stl/gabi++/libs/${ANDROID_NDK_ABI_NAME}/libgabi++_static.a" ) - elseif( ANDROID_STL MATCHES "stlport" ) - if( NOT ANDROID_NDK_RELEASE STRLESS "r8d" ) - set( ANDROID_EXCEPTIONS ON ) - else() - set( ANDROID_EXCEPTIONS OFF ) - endif() - if( ANDROID_NDK_RELEASE STRLESS "r7" ) - set( ANDROID_RTTI OFF ) - else() - set( ANDROID_RTTI ON ) - endif() - set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/stlport/stlport" ) - set( __libstl "${ANDROID_NDK}/sources/cxx-stl/stlport/libs/${ANDROID_NDK_ABI_NAME}/libstlport_static.a" ) - elseif( ANDROID_STL MATCHES "gnustl" ) - set( ANDROID_EXCEPTIONS ON ) - set( ANDROID_RTTI ON ) - if( EXISTS "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}" ) - if( ARMEABI_V7A AND ANDROID_COMPILER_VERSION VERSION_EQUAL "4.7" AND ANDROID_NDK_RELEASE STREQUAL "r8d" ) - # gnustl binary for 4.7 compiler is buggy :( - # TODO: look for right fix - set( __libstl "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/4.6" ) - else() - set( __libstl "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}" ) - endif() - else() - set( __libstl "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++" ) - endif() - set( ANDROID_STL_INCLUDE_DIRS "${__libstl}/include" "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/include" ) - if( EXISTS "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libgnustl_static.a" ) - set( __libstl "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libgnustl_static.a" ) - else() - set( __libstl "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libstdc++.a" ) - endif() - else() - message( FATAL_ERROR "Unknown runtime: ${ANDROID_STL}" ) - endif() - # find libsupc++.a - rtti & exceptions - if( ANDROID_STL STREQUAL "system_re" OR ANDROID_STL MATCHES "gnustl" ) - set( __libsupcxx "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" ) # r8b or newer - if( NOT EXISTS "${__libsupcxx}" ) - set( __libsupcxx "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" ) # r7-r8 - endif() - if( NOT EXISTS "${__libsupcxx}" ) # before r7 - if( ARMEABI_V7A ) - if( ANDROID_FORCE_ARM_BUILD ) - set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libsupc++.a" ) - else() - set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libsupc++.a" ) - endif() - elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD ) - set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libsupc++.a" ) - else() - set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libsupc++.a" ) - endif() - endif() - if( NOT EXISTS "${__libsupcxx}") - message( ERROR "Could not find libsupc++.a for a chosen platform. Either your NDK is not supported or is broken.") - endif() - endif() -endif() - - -# case of shared STL linkage -if( ANDROID_STL MATCHES "shared" AND DEFINED __libstl ) - string( REPLACE "_static.a" "_shared.so" __libstl "${__libstl}" ) - # TODO: check if .so file exists before the renaming -endif() - - -# ccache support -__INIT_VARIABLE( _ndk_ccache NDK_CCACHE ENV_NDK_CCACHE ) -if( _ndk_ccache ) - if( DEFINED NDK_CCACHE AND NOT EXISTS NDK_CCACHE ) - unset( NDK_CCACHE CACHE ) - endif() - find_program( NDK_CCACHE "${_ndk_ccache}" DOC "The path to ccache binary") -else() - unset( NDK_CCACHE CACHE ) -endif() -unset( _ndk_ccache ) - - -# setup the cross-compiler -if( NOT CMAKE_C_COMPILER ) - if( NDK_CCACHE AND NOT ANDROID_SYSROOT MATCHES "[ ;\"]" ) - set( CMAKE_C_COMPILER "${NDK_CCACHE}" CACHE PATH "ccache as C compiler" ) - set( CMAKE_CXX_COMPILER "${NDK_CCACHE}" CACHE PATH "ccache as C++ compiler" ) - if( ANDROID_COMPILER_IS_CLANG ) - set( CMAKE_C_COMPILER_ARG1 "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}${TOOL_OS_SUFFIX}" CACHE PATH "C compiler") - set( CMAKE_CXX_COMPILER_ARG1 "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler") - else() - set( CMAKE_C_COMPILER_ARG1 "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}" CACHE PATH "C compiler") - set( CMAKE_CXX_COMPILER_ARG1 "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler") - endif() - else() - if( ANDROID_COMPILER_IS_CLANG ) - set( CMAKE_C_COMPILER "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}${TOOL_OS_SUFFIX}" CACHE PATH "C compiler") - set( CMAKE_CXX_COMPILER "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler") - else() - set( CMAKE_C_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}" CACHE PATH "C compiler" ) - set( CMAKE_CXX_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler" ) - endif() - endif() - set( CMAKE_ASM_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}" CACHE PATH "assembler" ) - set( CMAKE_STRIP "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-strip${TOOL_OS_SUFFIX}" CACHE PATH "strip" ) - set( CMAKE_AR "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ar${TOOL_OS_SUFFIX}" CACHE PATH "archive" ) - set( CMAKE_LINKER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ld${TOOL_OS_SUFFIX}" CACHE PATH "linker" ) - set( CMAKE_NM "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-nm${TOOL_OS_SUFFIX}" CACHE PATH "nm" ) - set( CMAKE_OBJCOPY "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objcopy${TOOL_OS_SUFFIX}" CACHE PATH "objcopy" ) - set( CMAKE_OBJDUMP "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objdump${TOOL_OS_SUFFIX}" CACHE PATH "objdump" ) - set( CMAKE_RANLIB "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ranlib${TOOL_OS_SUFFIX}" CACHE PATH "ranlib" ) -endif() - -set( _CMAKE_TOOLCHAIN_PREFIX "${ANDROID_TOOLCHAIN_MACHINE_NAME}-" ) -if( CMAKE_VERSION VERSION_LESS 2.8.5 ) - set( CMAKE_ASM_COMPILER_ARG1 "-c" ) -endif() -if( APPLE ) - find_program( CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool ) - if( NOT CMAKE_INSTALL_NAME_TOOL ) - message( FATAL_ERROR "Could not find install_name_tool, please check your installation." ) - endif() - mark_as_advanced( CMAKE_INSTALL_NAME_TOOL ) -endif() - -# Force set compilers because standard identification works badly for us -include( CMakeForceCompiler ) -CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU ) -if( ANDROID_COMPILER_IS_CLANG ) - set( CMAKE_C_COMPILER_ID Clang) -endif() -set( CMAKE_C_PLATFORM_ID Linux ) -set( CMAKE_C_SIZEOF_DATA_PTR 4 ) -set( CMAKE_C_HAS_ISYSROOT 1 ) -set( CMAKE_C_COMPILER_ABI ELF ) -CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU ) -if( ANDROID_COMPILER_IS_CLANG ) - set( CMAKE_CXX_COMPILER_ID Clang) -endif() -set( CMAKE_CXX_PLATFORM_ID Linux ) -set( CMAKE_CXX_SIZEOF_DATA_PTR 4 ) -set( CMAKE_CXX_HAS_ISYSROOT 1 ) -set( CMAKE_CXX_COMPILER_ABI ELF ) -set( CMAKE_CXX_SOURCE_FILE_EXTENSIONS cc cp cxx cpp CPP c++ C ) -# force ASM compiler (required for CMake < 2.8.5) -set( CMAKE_ASM_COMPILER_ID_RUN TRUE ) -set( CMAKE_ASM_COMPILER_ID GNU ) -set( CMAKE_ASM_COMPILER_WORKS TRUE ) -set( CMAKE_ASM_COMPILER_FORCED TRUE ) -set( CMAKE_COMPILER_IS_GNUASM 1) -set( CMAKE_ASM_SOURCE_FILE_EXTENSIONS s S asm ) - -# flags and definitions -remove_definitions( -DANDROID ) -add_definitions( -DANDROID ) - -if( ANDROID_SYSROOT MATCHES "[ ;\"]" ) - if( CMAKE_HOST_WIN32 ) - # try to convert path to 8.3 form - file( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cvt83.cmd" "@echo %~s1" ) - execute_process( COMMAND "$ENV{ComSpec}" /c "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cvt83.cmd" "${ANDROID_SYSROOT}" - OUTPUT_VARIABLE __path OUTPUT_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE __result ERROR_QUIET ) - if( __result EQUAL 0 ) - file( TO_CMAKE_PATH "${__path}" ANDROID_SYSROOT ) - set( ANDROID_CXX_FLAGS "--sysroot=${ANDROID_SYSROOT}" ) - else() - set( ANDROID_CXX_FLAGS "--sysroot=\"${ANDROID_SYSROOT}\"" ) - endif() - else() - set( ANDROID_CXX_FLAGS "'--sysroot=${ANDROID_SYSROOT}'" ) - endif() - if( NOT _CMAKE_IN_TRY_COMPILE ) - # quotes can break try_compile and compiler identification - message(WARNING "Path to your Android NDK (or toolchain) has non-alphanumeric symbols.\nThe build might be broken.\n") - endif() -else() - set( ANDROID_CXX_FLAGS "--sysroot=${ANDROID_SYSROOT}" ) -endif() - -# NDK flags -if( ARMEABI OR ARMEABI_V7A ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fpic -funwind-tables" ) - if( NOT ANDROID_FORCE_ARM_BUILD AND NOT ARMEABI_V6 ) - set( ANDROID_CXX_FLAGS_RELEASE "-mthumb -fomit-frame-pointer -fno-strict-aliasing" ) - set( ANDROID_CXX_FLAGS_DEBUG "-marm -fno-omit-frame-pointer -fno-strict-aliasing" ) - if( NOT ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -finline-limit=64" ) - endif() - else() - # always compile ARMEABI_V6 in arm mode; otherwise there is no difference from ARMEABI - set( ANDROID_CXX_FLAGS_RELEASE "-marm -fomit-frame-pointer -fstrict-aliasing" ) - set( ANDROID_CXX_FLAGS_DEBUG "-marm -fno-omit-frame-pointer -fno-strict-aliasing" ) - if( NOT ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" ) - endif() - endif() -elseif( X86 ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funwind-tables" ) - if( NOT ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" ) - else() - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fPIC" ) - endif() - set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer -fstrict-aliasing" ) - set( ANDROID_CXX_FLAGS_DEBUG "-fno-omit-frame-pointer -fno-strict-aliasing" ) -elseif( MIPS ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fpic -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0" ) - set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer" ) - set( ANDROID_CXX_FLAGS_DEBUG "-fno-omit-frame-pointer" ) - if( NOT ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers" ) - set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} -funswitch-loops -finline-limit=300" ) - endif() -elseif() - set( ANDROID_CXX_FLAGS_RELEASE "" ) - set( ANDROID_CXX_FLAGS_DEBUG "" ) -endif() - -set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fsigned-char" ) # good/necessary when porting desktop libraries - -if( NOT X86 AND NOT ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "-Wno-psabi ${ANDROID_CXX_FLAGS}" ) -endif() - -if( NOT ANDROID_COMPILER_VERSION VERSION_LESS "4.6" ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -no-canonical-prefixes" ) # see https://android-review.googlesource.com/#/c/47564/ -endif() - -# ABI-specific flags -if( ARMEABI_V7A ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv7-a -mfloat-abi=softfp" ) - if( NEON ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=neon" ) - elseif( VFPV3 ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=vfpv3" ) - else() - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=vfpv3-d16" ) - endif() -elseif( ARMEABI_V6 ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv6 -mfloat-abi=softfp -mfpu=vfp" ) # vfp == vfpv2 -elseif( ARMEABI ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv5te -mtune=xscale -msoft-float" ) -endif() - -if( ANDROID_STL MATCHES "gnustl" AND (EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}") ) - set( CMAKE_CXX_CREATE_SHARED_LIBRARY " -o " ) - set( CMAKE_CXX_CREATE_SHARED_MODULE " -o " ) - set( CMAKE_CXX_LINK_EXECUTABLE " -o " ) -else() - set( CMAKE_CXX_CREATE_SHARED_LIBRARY " -o " ) - set( CMAKE_CXX_CREATE_SHARED_MODULE " -o " ) - set( CMAKE_CXX_LINK_EXECUTABLE " -o " ) -endif() - -# STL -if( EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}" ) - if( EXISTS "${__libstl}" ) - set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${__libstl}\"" ) - set( CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${__libstl}\"" ) - set( CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libstl}\"" ) - endif() - if( EXISTS "${__libsupcxx}" ) - set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${__libsupcxx}\"" ) - set( CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${__libsupcxx}\"" ) - set( CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libsupcxx}\"" ) - # C objects: - set( CMAKE_C_CREATE_SHARED_LIBRARY " -o " ) - set( CMAKE_C_CREATE_SHARED_MODULE " -o " ) - set( CMAKE_C_LINK_EXECUTABLE " -o " ) - set( CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_C_CREATE_SHARED_LIBRARY} \"${__libsupcxx}\"" ) - set( CMAKE_C_CREATE_SHARED_MODULE "${CMAKE_C_CREATE_SHARED_MODULE} \"${__libsupcxx}\"" ) - set( CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE} \"${__libsupcxx}\"" ) - endif() - if( ANDROID_STL MATCHES "gnustl" ) - if( NOT EXISTS "${ANDROID_LIBM_PATH}" ) - set( ANDROID_LIBM_PATH -lm ) - endif() - set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} ${ANDROID_LIBM_PATH}" ) - set( CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE} ${ANDROID_LIBM_PATH}" ) - set( CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} ${ANDROID_LIBM_PATH}" ) - endif() -endif() - -# variables controlling optional build flags -if (ANDROID_NDK_RELEASE STRLESS "r7") - # libGLESv2.so in NDK's prior to r7 refers to missing external symbols. - # So this flag option is required for all projects using OpenGL from native. - __INIT_VARIABLE( ANDROID_SO_UNDEFINED VALUES ON ) -else() - __INIT_VARIABLE( ANDROID_SO_UNDEFINED VALUES OFF ) -endif() -__INIT_VARIABLE( ANDROID_NO_UNDEFINED OBSOLETE_NO_UNDEFINED VALUES ON ) -__INIT_VARIABLE( ANDROID_FUNCTION_LEVEL_LINKING VALUES ON ) -__INIT_VARIABLE( ANDROID_GOLD_LINKER VALUES ON ) -__INIT_VARIABLE( ANDROID_NOEXECSTACK VALUES ON ) -__INIT_VARIABLE( ANDROID_RELRO VALUES ON ) - -set( ANDROID_NO_UNDEFINED ${ANDROID_NO_UNDEFINED} CACHE BOOL "Show all undefined symbols as linker errors" ) -set( ANDROID_SO_UNDEFINED ${ANDROID_SO_UNDEFINED} CACHE BOOL "Allows or disallows undefined symbols in shared libraries" ) -set( ANDROID_FUNCTION_LEVEL_LINKING ${ANDROID_FUNCTION_LEVEL_LINKING} CACHE BOOL "Allows or disallows undefined symbols in shared libraries" ) -set( ANDROID_GOLD_LINKER ${ANDROID_GOLD_LINKER} CACHE BOOL "Enables gold linker (only avaialble for NDK r8b for ARM and x86 architectures on linux-86 and darwin-x86 hosts)" ) -set( ANDROID_NOEXECSTACK ${ANDROID_NOEXECSTACK} CACHE BOOL "Allows or disallows undefined symbols in shared libraries" ) -set( ANDROID_RELRO ${ANDROID_RELRO} CACHE BOOL "Enables RELRO - a memory corruption mitigation technique" ) -mark_as_advanced( ANDROID_NO_UNDEFINED ANDROID_SO_UNDEFINED ANDROID_FUNCTION_LEVEL_LINKING ANDROID_GOLD_LINKER ANDROID_NOEXECSTACK ANDROID_RELRO ) - -# linker flags -set( ANDROID_LINKER_FLAGS "" ) - -if( ARMEABI_V7A ) - # this is *required* to use the following linker flags that routes around - # a CPU bug in some Cortex-A8 implementations: - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--fix-cortex-a8" ) -endif() - -if( ANDROID_NO_UNDEFINED ) - if( MIPS ) - # there is some sysroot-related problem in mips linker... - if( NOT ANDROID_SYSROOT MATCHES "[ ;\"]" ) - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--no-undefined -Wl,-rpath-link,${ANDROID_SYSROOT}/usr/lib" ) - endif() - else() - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--no-undefined" ) - endif() -endif() - -if( ANDROID_SO_UNDEFINED ) - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,-allow-shlib-undefined" ) -endif() - -if( ANDROID_FUNCTION_LEVEL_LINKING ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fdata-sections -ffunction-sections" ) - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--gc-sections" ) -endif() - -if( ANDROID_COMPILER_VERSION VERSION_EQUAL "4.6" ) - if( ANDROID_GOLD_LINKER AND (CMAKE_HOST_UNIX OR ANDROID_NDK_RELEASE STRGREATER "r8b") AND (ARMEABI OR ARMEABI_V7A OR X86) ) - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=gold" ) - elseif( ANDROID_NDK_RELEASE STRGREATER "r8b") - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=bfd" ) - elseif( ANDROID_NDK_RELEASE STREQUAL "r8b" AND ARMEABI AND NOT _CMAKE_IN_TRY_COMPILE ) - message( WARNING "The default bfd linker from arm GCC 4.6 toolchain can fail with 'unresolvable R_ARM_THM_CALL relocation' error message. See https://code.google.com/p/android/issues/detail?id=35342 - On Linux and OS X host platform you can workaround this problem using gold linker (default). - Rerun cmake with -DANDROID_GOLD_LINKER=ON option in case of problems. -" ) - endif() -endif() # version 4.6 - -if( ANDROID_NOEXECSTACK ) - if( ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -Xclang -mnoexecstack" ) - else() - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -Wa,--noexecstack" ) - endif() - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,-z,noexecstack" ) -endif() - -if( ANDROID_RELRO ) - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now" ) -endif() - -if( ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "-Qunused-arguments ${ANDROID_CXX_FLAGS}" ) - if( ARMEABI_V7A AND NOT ANDROID_FORCE_ARM_BUILD ) - set( ANDROID_CXX_FLAGS_RELEASE "-target thumbv7-none-linux-androideabi ${ANDROID_CXX_FLAGS_RELEASE}" ) - set( ANDROID_CXX_FLAGS_DEBUG "-target ${ANDROID_LLVM_TRIPLE} ${ANDROID_CXX_FLAGS_DEBUG}" ) - else() - set( ANDROID_CXX_FLAGS "-target ${ANDROID_LLVM_TRIPLE} ${ANDROID_CXX_FLAGS}" ) - endif() - if( BUILD_WITH_ANDROID_NDK ) - set( ANDROID_CXX_FLAGS "-gcc-toolchain ${ANDROID_TOOLCHAIN_ROOT} ${ANDROID_CXX_FLAGS}" ) - endif() -endif() - -# cache flags -set( CMAKE_CXX_FLAGS "" CACHE STRING "c++ flags" ) -set( CMAKE_C_FLAGS "" CACHE STRING "c flags" ) -set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "c++ Release flags" ) -set( CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "c Release flags" ) -set( CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DDEBUG -D_DEBUG" CACHE STRING "c++ Debug flags" ) -set( CMAKE_C_FLAGS_DEBUG "-O0 -g -DDEBUG -D_DEBUG" CACHE STRING "c Debug flags" ) -set( CMAKE_SHARED_LINKER_FLAGS "" CACHE STRING "shared linker flags" ) -set( CMAKE_MODULE_LINKER_FLAGS "" CACHE STRING "module linker flags" ) -set( CMAKE_EXE_LINKER_FLAGS "-Wl,-z,nocopyreloc" CACHE STRING "executable linker flags" ) - -# put flags to cache (for debug purpose only) -set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS}" CACHE INTERNAL "Android specific c/c++ flags" ) -set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE}" CACHE INTERNAL "Android specific c/c++ Release flags" ) -set( ANDROID_CXX_FLAGS_DEBUG "${ANDROID_CXX_FLAGS_DEBUG}" CACHE INTERNAL "Android specific c/c++ Debug flags" ) -set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS}" CACHE INTERNAL "Android specific c/c++ linker flags" ) - -# finish flags -set( CMAKE_CXX_FLAGS "${ANDROID_CXX_FLAGS} ${CMAKE_CXX_FLAGS}" ) -set( CMAKE_C_FLAGS "${ANDROID_CXX_FLAGS} ${CMAKE_C_FLAGS}" ) -set( CMAKE_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELEASE}" ) -set( CMAKE_C_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELEASE}" ) -set( CMAKE_CXX_FLAGS_DEBUG "${ANDROID_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_DEBUG}" ) -set( CMAKE_C_FLAGS_DEBUG "${ANDROID_CXX_FLAGS_DEBUG} ${CMAKE_C_FLAGS_DEBUG}" ) -set( CMAKE_SHARED_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}" ) -set( CMAKE_MODULE_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_MODULE_LINKER_FLAGS}" ) -set( CMAKE_EXE_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}" ) - -if( MIPS AND BUILD_WITH_ANDROID_NDK AND ANDROID_NDK_RELEASE STREQUAL "r8" ) - set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.xsc ${CMAKE_SHARED_LINKER_FLAGS}" ) - set( CMAKE_MODULE_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.xsc ${CMAKE_MODULE_LINKER_FLAGS}" ) - set( CMAKE_EXE_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.x ${CMAKE_EXE_LINKER_FLAGS}" ) -endif() - -# configure rtti -if( DEFINED ANDROID_RTTI AND ANDROID_STL_FORCE_FEATURES ) - if( ANDROID_RTTI ) - set( CMAKE_CXX_FLAGS "-frtti ${CMAKE_CXX_FLAGS}" ) - else() - set( CMAKE_CXX_FLAGS "-fno-rtti ${CMAKE_CXX_FLAGS}" ) - endif() -endif() - -# configure exceptios -if( DEFINED ANDROID_EXCEPTIONS AND ANDROID_STL_FORCE_FEATURES ) - if( ANDROID_EXCEPTIONS ) - set( CMAKE_CXX_FLAGS "-fexceptions ${CMAKE_CXX_FLAGS}" ) - set( CMAKE_C_FLAGS "-fexceptions ${CMAKE_C_FLAGS}" ) - else() - set( CMAKE_CXX_FLAGS "-fno-exceptions ${CMAKE_CXX_FLAGS}" ) - set( CMAKE_C_FLAGS "-fno-exceptions ${CMAKE_C_FLAGS}" ) - endif() -endif() - -# global includes and link directories -include_directories( SYSTEM "${ANDROID_SYSROOT}/usr/include" ${ANDROID_STL_INCLUDE_DIRS} ) -get_filename_component(__android_install_path "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" ABSOLUTE) # avoid CMP0015 policy warning -link_directories( "${__android_install_path}" ) - -# detect if need link crtbegin_so.o explicitly -if( NOT DEFINED ANDROID_EXPLICIT_CRT_LINK ) - set( __cmd "${CMAKE_CXX_CREATE_SHARED_LIBRARY}" ) - string( REPLACE "" "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" __cmd "${__cmd}" ) - string( REPLACE "" "${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}" __cmd "${__cmd}" ) - string( REPLACE "" "${CMAKE_CXX_FLAGS}" __cmd "${__cmd}" ) - string( REPLACE "" "" __cmd "${__cmd}" ) - string( REPLACE "" "${CMAKE_SHARED_LINKER_FLAGS}" __cmd "${__cmd}" ) - string( REPLACE "" "-shared" __cmd "${__cmd}" ) - string( REPLACE "" "" __cmd "${__cmd}" ) - string( REPLACE "" "" __cmd "${__cmd}" ) - string( REPLACE "" "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/toolchain_crtlink_test.so" __cmd "${__cmd}" ) - string( REPLACE "" "\"${ANDROID_SYSROOT}/usr/lib/crtbegin_so.o\"" __cmd "${__cmd}" ) - string( REPLACE "" "" __cmd "${__cmd}" ) - separate_arguments( __cmd ) - foreach( __var ANDROID_NDK ANDROID_NDK_TOOLCHAINS_PATH ANDROID_STANDALONE_TOOLCHAIN ) - if( ${__var} ) - set( __tmp "${${__var}}" ) - separate_arguments( __tmp ) - string( REPLACE "${__tmp}" "${${__var}}" __cmd "${__cmd}") - endif() - endforeach() - string( REPLACE "'" "" __cmd "${__cmd}" ) - string( REPLACE "\"" "" __cmd "${__cmd}" ) - execute_process( COMMAND ${__cmd} RESULT_VARIABLE __cmd_result OUTPUT_QUIET ERROR_QUIET ) - if( __cmd_result EQUAL 0 ) - set( ANDROID_EXPLICIT_CRT_LINK ON ) - else() - set( ANDROID_EXPLICIT_CRT_LINK OFF ) - endif() -endif() - -if( ANDROID_EXPLICIT_CRT_LINK ) - set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${ANDROID_SYSROOT}/usr/lib/crtbegin_so.o\"" ) - set( CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${ANDROID_SYSROOT}/usr/lib/crtbegin_so.o\"" ) -endif() - -# setup output directories -set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_SOURCE_DIR} CACHE PATH "root for library output, set this to change where android libs are installed to" ) -set( CMAKE_INSTALL_PREFIX "${ANDROID_TOOLCHAIN_ROOT}/user" CACHE STRING "path for installing" ) - -if(NOT _CMAKE_IN_TRY_COMPILE) - if( EXISTS "${CMAKE_SOURCE_DIR}/jni/CMakeLists.txt" ) - set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_ABI_NAME}" CACHE PATH "Output directory for applications" ) - else() - set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin" CACHE PATH "Output directory for applications" ) - endif() - set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}" CACHE PATH "path for android libs" ) -endif() - -# copy shaed stl library to build directory -if( NOT _CMAKE_IN_TRY_COMPILE AND __libstl MATCHES "[.]so$" ) - get_filename_component( __libstlname "${__libstl}" NAME ) - execute_process( COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${__libstl}" "${LIBRARY_OUTPUT_PATH}/${__libstlname}" RESULT_VARIABLE __fileCopyProcess ) - if( NOT __fileCopyProcess EQUAL 0 OR NOT EXISTS "${LIBRARY_OUTPUT_PATH}/${__libstlname}") - message( SEND_ERROR "Failed copying of ${__libstl} to the ${LIBRARY_OUTPUT_PATH}/${__libstlname}" ) - endif() - unset( __fileCopyProcess ) - unset( __libstlname ) -endif() - - -# set these global flags for cmake client scripts to change behavior -set( ANDROID True ) -set( BUILD_ANDROID True ) - -# where is the target environment -set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" ) - -# only search for libraries and includes in the ndk toolchain -set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) -set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) -set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) - - -# macro to find packages on the host OS -macro( find_host_package ) - set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) - set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER ) - set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER ) - if( CMAKE_HOST_WIN32 ) - SET( WIN32 1 ) - SET( UNIX ) - elseif( CMAKE_HOST_APPLE ) - SET( APPLE 1 ) - SET( UNIX ) - endif() - find_package( ${ARGN} ) - SET( WIN32 ) - SET( APPLE ) - SET( UNIX 1 ) - set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) - set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) - set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) -endmacro() - - -# macro to find programs on the host OS -macro( find_host_program ) - set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) - set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER ) - set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER ) - if( CMAKE_HOST_WIN32 ) - SET( WIN32 1 ) - SET( UNIX ) - elseif( CMAKE_HOST_APPLE ) - SET( APPLE 1 ) - SET( UNIX ) - endif() - find_program( ${ARGN} ) - SET( WIN32 ) - SET( APPLE ) - SET( UNIX 1 ) - set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) - set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) - set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) -endmacro() - - -macro( ANDROID_GET_ABI_RAWNAME TOOLCHAIN_FLAG VAR ) - if( "${TOOLCHAIN_FLAG}" STREQUAL "ARMEABI" ) - set( ${VAR} "armeabi" ) - elseif( "${TOOLCHAIN_FLAG}" STREQUAL "ARMEABI_V7A" ) - set( ${VAR} "armeabi-v7a" ) - elseif( "${TOOLCHAIN_FLAG}" STREQUAL "X86" ) - set( ${VAR} "x86" ) - elseif( "${TOOLCHAIN_FLAG}" STREQUAL "MIPS" ) - set( ${VAR} "mips" ) - else() - set( ${VAR} "unknown" ) - endif() -endmacro() - - -# export toolchain settings for the try_compile() command -if( NOT PROJECT_NAME STREQUAL "CMAKE_TRY_COMPILE" ) - set( __toolchain_config "") - foreach( __var NDK_CCACHE LIBRARY_OUTPUT_PATH_ROOT ANDROID_FORBID_SYGWIN ANDROID_SET_OBSOLETE_VARIABLES - ANDROID_NDK_HOST_X64 - ANDROID_NDK - ANDROID_NDK_LAYOUT - ANDROID_STANDALONE_TOOLCHAIN - ANDROID_TOOLCHAIN_NAME - ANDROID_ABI - ANDROID_NATIVE_API_LEVEL - ANDROID_STL - ANDROID_STL_FORCE_FEATURES - ANDROID_FORCE_ARM_BUILD - ANDROID_NO_UNDEFINED - ANDROID_SO_UNDEFINED - ANDROID_FUNCTION_LEVEL_LINKING - ANDROID_GOLD_LINKER - ANDROID_NOEXECSTACK - ANDROID_RELRO - ANDROID_LIBM_PATH - ANDROID_EXPLICIT_CRT_LINK - ) - if( DEFINED ${__var} ) - if( "${__var}" MATCHES " ") - set( __toolchain_config "${__toolchain_config}set( ${__var} \"${${__var}}\" CACHE INTERNAL \"\" )\n" ) - else() - set( __toolchain_config "${__toolchain_config}set( ${__var} ${${__var}} CACHE INTERNAL \"\" )\n" ) - endif() - endif() - endforeach() - file( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/android.toolchain.config.cmake" "${__toolchain_config}" ) - unset( __toolchain_config ) -endif() - - -# force cmake to produce / instead of \ in build commands for Ninja generator -if( CMAKE_GENERATOR MATCHES "Ninja" AND CMAKE_HOST_WIN32 ) - # it is a bad hack after all - # CMake generates Ninja makefiles with UNIX paths only if it thinks that we are going to build with MinGW - set( CMAKE_COMPILER_IS_MINGW TRUE ) # tell CMake that we are MinGW - set( CMAKE_CROSSCOMPILING TRUE ) # stop recursion - enable_language( C ) - enable_language( CXX ) - # unset( CMAKE_COMPILER_IS_MINGW ) # can't unset because CMake does not convert back-slashes in response files without it - unset( MINGW ) -endif() - - -# set some obsolete variables for backward compatibility -set( ANDROID_SET_OBSOLETE_VARIABLES ON CACHE BOOL "Define obsolete Andrid-specific cmake variables" ) -mark_as_advanced( ANDROID_SET_OBSOLETE_VARIABLES ) -if( ANDROID_SET_OBSOLETE_VARIABLES ) - set( ANDROID_API_LEVEL ${ANDROID_NATIVE_API_LEVEL} ) - set( ARM_TARGET "${ANDROID_ABI}" ) - set( ARMEABI_NDK_NAME "${ANDROID_NDK_ABI_NAME}" ) -endif() - - -# Variables controlling behavior or set by cmake toolchain: -# ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips" -# ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14 (depends on NDK version) -# ANDROID_STL : gnustl_static/gnustl_shared/stlport_static/stlport_shared/gabi++_static/gabi++_shared/system_re/system/none -# ANDROID_FORBID_SYGWIN : ON/OFF -# ANDROID_NO_UNDEFINED : ON/OFF -# ANDROID_SO_UNDEFINED : OFF/ON (default depends on NDK version) -# ANDROID_FUNCTION_LEVEL_LINKING : ON/OFF -# ANDROID_GOLD_LINKER : ON/OFF -# ANDROID_NOEXECSTACK : ON/OFF -# ANDROID_RELRO : ON/OFF -# ANDROID_FORCE_ARM_BUILD : ON/OFF -# ANDROID_STL_FORCE_FEATURES : ON/OFF -# ANDROID_SET_OBSOLETE_VARIABLES : ON/OFF -# Can be set only at the first run: -# ANDROID_NDK -# ANDROID_STANDALONE_TOOLCHAIN -# ANDROID_TOOLCHAIN_NAME : the NDK name of compiler toolchain -# ANDROID_NDK_HOST_X64 : try to use x86_64 toolchain (default for x64 host systems) -# ANDROID_NDK_LAYOUT : the inner NDK structure (RELEASE, LINARO, ANDROID) -# LIBRARY_OUTPUT_PATH_ROOT : -# NDK_CCACHE : -# Obsolete: -# ANDROID_API_LEVEL : superseded by ANDROID_NATIVE_API_LEVEL -# ARM_TARGET : superseded by ANDROID_ABI -# ARM_TARGETS : superseded by ANDROID_ABI (can be set only) -# ANDROID_NDK_TOOLCHAIN_ROOT : superseded by ANDROID_STANDALONE_TOOLCHAIN (can be set only) -# ANDROID_USE_STLPORT : superseded by ANDROID_STL=stlport_static -# ANDROID_LEVEL : superseded by ANDROID_NATIVE_API_LEVEL (completely removed) -# -# Primary read-only variables: -# ANDROID : always TRUE -# ARMEABI : TRUE for arm v6 and older devices -# ARMEABI_V6 : TRUE for arm v6 -# ARMEABI_V7A : TRUE for arm v7a -# NEON : TRUE if NEON unit is enabled -# VFPV3 : TRUE if VFP version 3 is enabled -# X86 : TRUE if configured for x86 -# MIPS : TRUE if configured for mips -# BUILD_ANDROID : always TRUE -# BUILD_WITH_ANDROID_NDK : TRUE if NDK is used -# BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used -# ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform -# ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86" or "mips" depending on ANDROID_ABI -# ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c; set only for NDK -# ANDROID_ARCH_NAME : "arm" or "x86" or "mips" depending on ANDROID_ABI -# ANDROID_SYSROOT : path to the compiler sysroot -# TOOL_OS_SUFFIX : "" or ".exe" depending on host platform -# ANDROID_COMPILER_IS_CLANG : TRUE if clang compiler is used -# Obsolete: -# ARMEABI_NDK_NAME : superseded by ANDROID_NDK_ABI_NAME -# -# Secondary (less stable) read-only variables: -# ANDROID_COMPILER_VERSION : GCC version used -# ANDROID_CXX_FLAGS : C/C++ compiler flags required by Android platform -# ANDROID_SUPPORTED_ABIS : list of currently allowed values for ANDROID_ABI -# ANDROID_TOOLCHAIN_MACHINE_NAME : "arm-linux-androideabi", "arm-eabi" or "i686-android-linux" -# ANDROID_TOOLCHAIN_ROOT : path to the top level of toolchain (standalone or placed inside NDK) -# ANDROID_CLANG_TOOLCHAIN_ROOT : path to clang tools -# ANDROID_SUPPORTED_NATIVE_API_LEVELS : list of native API levels found inside NDK -# ANDROID_STL_INCLUDE_DIRS : stl include paths -# ANDROID_RTTI : if rtti is enabled by the runtime -# ANDROID_EXCEPTIONS : if exceptions are enabled by the runtime -# ANDROID_GCC_TOOLCHAIN_NAME : read-only, differs from ANDROID_TOOLCHAIN_NAME only if clang is used -# ANDROID_CLANG_VERSION : version of clang compiler if clang is used -# ANDROID_LIBM_PATH : path to libm.so (set to something like $(TOP)/out/target/product//obj/lib/libm.so) to workaround unresolved `sincos` -# -# Defaults: -# ANDROID_DEFAULT_NDK_API_LEVEL -# ANDROID_DEFAULT_NDK_API_LEVEL_${ARCH} -# ANDROID_NDK_SEARCH_PATHS -# ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH -# ANDROID_SUPPORTED_ABIS_${ARCH} -# ANDROID_SUPPORTED_NDK_VERSIONS \ No newline at end of file diff --git a/contrib/cmake/CrossCompile-iOS-Sim.cmake b/contrib/cmake/CrossCompile-iOS-Sim.cmake deleted file mode 100644 index 7ed22fb..0000000 --- a/contrib/cmake/CrossCompile-iOS-Sim.cmake +++ /dev/null @@ -1,95 +0,0 @@ -# To cross compile for iOS simulator: -# build$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../contrib/cmake/CrossCompile-iOS-Sim.cmake - -SET(CMAKE_SYSTEM_NAME Generic) -if (NOT "$ENV{IOS_SDK_VERSION}" STREQUAL "") - SET(CMAKE_SYSTEM_VERSION $ENV{IOS_SDK_VERSION}) -endif() -SET(CMAKE_SYSTEM_PROCESSOR i386) - -SET(ARCHS "-arch i386") -SET(CMAKE_CROSSCOMPILING_TARGET IOS) -SET(CMAKE_OSX_ARCHITECTURES "i386") -SET(IOS_MINPHONE_OS "4.3") -SET(IOS ON) -SET(IOSSIM ON) -SET(UNIX ON) -SET(APPLE ON) - -execute_process(COMMAND xcode-select -print-path - OUTPUT_VARIABLE XCODE_SELECT OUTPUT_STRIP_TRAILING_WHITESPACE) - -if(EXISTS ${XCODE_SELECT}) - SET(DEVROOT "${XCODE_SELECT}/Platforms/iPhoneSimulator.platform/Developer") - if (NOT EXISTS "${DEVROOT}/SDKs/iPhoneSimulator${CMAKE_SYSTEM_VERSION}.sdk") - # specified SDK version does not exist, use last one - file(GLOB INSTALLED_SDKS ${DEVROOT}/SDKs/*) - list(SORT INSTALLED_SDKS) - list(REVERSE INSTALLED_SDKS) - list(GET INSTALLED_SDKS 0 LATEST_SDK) - string(REGEX MATCH "[0-9]\\.[0-9]" CMAKE_SYSTEM_VERSION ${LATEST_SDK}) - endif() -else() - SET(DEVROOT "/Developer/Platforms/iPhoneSimulator.platform/Developer") -endif() - -if (${CMAKE_SYSTEM_VERSION} VERSION_EQUAL "6.0" OR ${CMAKE_SYSTEM_VERSION} VERSION_GREATER "6.0") - set(IOS6_OR_LATER ON) -else() - set(IOS6_OR_LATER OFF) -endif() - -if (IOS6_OR_LATER) - # we have to use clang - llvm will choke on those __has_feature macros? - SET (CMAKE_C_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang") - SET (CMAKE_CXX_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++") - SET (CMAKE_AR "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar" CACHE FILEPATH "" FORCE) - SET (CMAKE_LINKER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" CACHE FILEPATH "" FORCE) - SET (CMAKE_NM "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm" CACHE FILEPATH "" FORCE) - SET (CMAKE_STRIP "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip" CACHE FILEPATH "" FORCE) - - if ($ENV{MACOSX_DEPLOYMENT_TARGET}) - message(FATAL_ERROR "llvm will croak with MACOSX_DEPLOYMENT_TARGET environment variable set when building for ios - unset MACOSX_DEPLOYMENT_TARGET") - endif() - -else() - SET (CMAKE_C_COMPILER "${DEVROOT}/usr/bin/gcc") - SET (CMAKE_CXX_COMPILER "${DEVROOT}/usr/bin/g++") -endif() - -SET(SDKROOT "${DEVROOT}/SDKs/iPhoneSimulator${CMAKE_SYSTEM_VERSION}.sdk") -SET(CMAKE_OSX_SYSROOT "${SDKROOT}") -SET(CMAKE_SYSTEM_PREFIX_PATH "/;/usr;/usr/local;/opt/local") - -# This gets overridden somewhere! -SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so;.dylib") - -set(CMAKE_SYSTEM_FRAMEWORK_PATH - ~/Library/Frameworks - /Library/Frameworks - /Network/Library/Frameworks - /System/Library/Frameworks) - -# force compiler and linker flags -SET(CMAKE_C_LINK_FLAGS "${ARCHS} --sysroot=${SDKROOT} -miphoneos-version-min=${IOS_MINPHONE_OS}") -SET(CMAKE_CXX_LINK_FLAGS "${ARCHS} --sysroot=${SDKROOT} -miphoneos-version-min=${IOS_MINPHONE_OS}") -# SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} --sysroot=${SDKROOT}") -# SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} --sysroot=${SDKROOT}") - -# SET(CMAKE_C_FLAGS ${ARCHS}) # C_FLAGS wont stick, use ADD_DEFINITIONS instead -# SET(CMAKE_CXX_FLAGS ${ARCHS}) -ADD_DEFINITIONS(${ARCHS}) -ADD_DEFINITIONS("--sysroot=${SDKROOT}") -ADD_DEFINITIONS("-miphoneos-version-min=${IOS_MINPHONE_OS}") - -# ios headers -INCLUDE_DIRECTORIES(SYSTEM "${SDKROOT}/usr/include") - -# ios libraries -LINK_DIRECTORIES("${SDKROOT}/usr/lib/system") -LINK_DIRECTORIES("${SDKROOT}/usr/lib") - -SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}") -SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) -SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) -SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) diff --git a/contrib/cmake/CrossCompile-iOS.cmake b/contrib/cmake/CrossCompile-iOS.cmake deleted file mode 100644 index 3e67c79..0000000 --- a/contrib/cmake/CrossCompile-iOS.cmake +++ /dev/null @@ -1,104 +0,0 @@ -# To cross compile for iPhone: -# build$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../contrib/cmake/CrossCompile-iOS.cmake - -SET(CMAKE_SYSTEM_NAME Generic) -if (NOT "$ENV{IOS_SDK_VERSION}" STREQUAL "") - SET(CMAKE_SYSTEM_VERSION $ENV{IOS_SDK_VERSION}) -endif() -SET(CMAKE_SYSTEM_PROCESSOR arm) - -SET(CMAKE_CROSSCOMPILING_TARGET IOS) -SET(IOS ON) -SET(UNIX ON) -SET(APPLE ON) - -execute_process(COMMAND xcode-select -print-path - OUTPUT_VARIABLE XCODE_SELECT OUTPUT_STRIP_TRAILING_WHITESPACE) - -if(EXISTS ${XCODE_SELECT}) - SET(DEVROOT "${XCODE_SELECT}/Platforms/iPhoneOS.platform/Developer") - if (NOT EXISTS "${DEVROOT}/SDKs/iPhoneOS${CMAKE_SYSTEM_VERSION}.sdk") - # specified SDK version does not exist, use last one - file(GLOB INSTALLED_SDKS ${DEVROOT}/SDKs/*) - list(SORT INSTALLED_SDKS) - list(REVERSE INSTALLED_SDKS) - list(GET INSTALLED_SDKS 0 LATEST_SDK) - string(REGEX MATCH "[0-9]\\.[0-9]" CMAKE_SYSTEM_VERSION ${LATEST_SDK}) - endif() -else() - SET(DEVROOT "/Developer/Platforms/iPhoneOS.platform/Developer") -endif() - -set(IOS6_OR_LATER OFF) -if (${CMAKE_SYSTEM_VERSION} VERSION_EQUAL "5.0" OR ${CMAKE_SYSTEM_VERSION} VERSION_GREATER "5.0") - SET(CMAKE_OSX_ARCHITECTURES armv6 armv7) - SET(ARCHS "-arch armv6 -arch armv7") -endif() - -if (${CMAKE_SYSTEM_VERSION} VERSION_EQUAL "6.0" OR ${CMAKE_SYSTEM_VERSION} VERSION_GREATER "6.0") - set(IOS6_OR_LATER ON) - SET(CMAKE_OSX_ARCHITECTURES armv7 armv7s) - SET(ARCHS "-arch armv7 -arch armv7s") -endif() - -if (${CMAKE_SYSTEM_VERSION} VERSION_EQUAL "7.0" OR ${CMAKE_SYSTEM_VERSION} VERSION_GREATER "7.0") - set(IOS6_OR_LATER ON) - SET(CMAKE_OSX_ARCHITECTURES armv7 armv7s) - SET(ARCHS "-arch armv7 -arch armv7s") - # SET(CMAKE_OSX_ARCHITECTURES armv7 armv7s arm64) - # SET(ARCHS "-arch armv7 -arch armv7s -arch arm64") -endif() - -if (IOS6_OR_LATER) - # no armv6 support in ios6 - armv7s was added, but we did no compile our dependencies for it - - # we have to use clang - llvm will choke on those __has_feature macros? - SET (CMAKE_C_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang") - SET (CMAKE_CXX_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++") - SET (CMAKE_AR "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar" CACHE FILEPATH "" FORCE) - SET (CMAKE_LINKER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" CACHE FILEPATH "" FORCE) - SET (CMAKE_NM "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm" CACHE FILEPATH "" FORCE) - SET (CMAKE_STRIP "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip" CACHE FILEPATH "" FORCE) - - if ($ENV{MACOSX_DEPLOYMENT_TARGET}) - message(FATAL_ERROR "llvm will croak with MACOSX_DEPLOYMENT_TARGET environment variable set when building for ios - unset MACOSX_DEPLOYMENT_TARGET") - endif() - -else() - SET (CMAKE_C_COMPILER "${DEVROOT}/usr/bin/gcc") - SET (CMAKE_CXX_COMPILER "${DEVROOT}/usr/bin/g++") - -endif() - -SET(SDKROOT "${DEVROOT}/SDKs/iPhoneOS${CMAKE_SYSTEM_VERSION}.sdk") -SET(CMAKE_OSX_SYSROOT "${SDKROOT}") -SET(CMAKE_SYSTEM_PREFIX_PATH "/;/usr;/usr/local;/opt/local") - -# This gets overridden somewhere! -SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so;.dylib") - -set(CMAKE_SYSTEM_FRAMEWORK_PATH - ~/Library/Frameworks - /Library/Frameworks - /Network/Library/Frameworks - /System/Library/Frameworks) - -# force compiler and linker flags -SET(CMAKE_C_LINK_FLAGS ${ARCHS}) -SET(CMAKE_CXX_LINK_FLAGS ${ARCHS}) -# SET(CMAKE_C_FLAGS ${ARCHS}) # C_FLAGS wont stick, use ADD_DEFINITIONS instead -# SET(CMAKE_CXX_FLAGS ${ARCHS}) -ADD_DEFINITIONS(${ARCHS}) -ADD_DEFINITIONS("--sysroot=${SDKROOT}") - -# ios headers -INCLUDE_DIRECTORIES(SYSTEM "${SDKROOT}/usr/include") - -# ios libraries -LINK_DIRECTORIES("${SDKROOT}/usr/lib/system") -LINK_DIRECTORIES("${SDKROOT}/usr/lib") - -SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}") -SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) -SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) -SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) diff --git a/contrib/cmake/FindArabica.cmake b/contrib/cmake/FindArabica.cmake deleted file mode 100644 index 018ff89..0000000 --- a/contrib/cmake/FindArabica.cmake +++ /dev/null @@ -1,39 +0,0 @@ -FIND_PATH(ARABICA_INCLUDE_DIR Arabica/getparam.hpp - PATH_SUFFIXES arabica include - PATHS - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt - HINTS $ENV{ARABICA_SRC} -) - -set(ARABICA_LIBRARY) -FIND_LIBRARY(ARABICA_LIBRARY_RELEASE - NAMES arabica - HINTS - $ENV{ARABICA_SRC}/src/.libs/ - $ENV{ARABICA_SRC}/build/ -) - -FIND_LIBRARY(ARABICA_LIBRARY_DEBUG - NAMES arabica_d arabica_debug - HINTS - $ENV{ARABICA_SRC}/src/.libs/ - $ENV{ARABICA_SRC}/build/ -) - -if (ARABICA_LIBRARY_RELEASE AND NOT ARABICA_LIBRARY_DEBUG) - list(APPEND ARABICA_LIBRARY ${ARABICA_LIBRARY_RELEASE}) -elseif(ARABICA_LIBRARY_DEBUG AND NOT ARABICA_LIBRARY_RELEASE) - list(APPEND ARABICA_LIBRARY ${ARABICA_LIBRARY_DEBUG}) -elseif(ARABICA_LIBRARY_DEBUG AND ARABICA_LIBRARY_RELEASE) - list(APPEND ARABICA_LIBRARY optimized ${ARABICA_LIBRARY_RELEASE} debug ${ARABICA_LIBRARY_DEBUG}) -endif() - - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Arabica DEFAULT_MSG ARABICA_LIBRARY ARABICA_INCLUDE_DIR) -MARK_AS_ADVANCED(ARABICA_LIBRARY_RELEASE ARABICA_LIBRARY_DEBUG) diff --git a/contrib/cmake/FindEV.cmake b/contrib/cmake/FindEV.cmake deleted file mode 100644 index f994aa1..0000000 --- a/contrib/cmake/FindEV.cmake +++ /dev/null @@ -1,20 +0,0 @@ -FIND_PATH(EV_INCLUDE_DIR ev.h - PATH_SUFFIXES include - PATHS - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt - HINTS $ENV{EV_SRC} -) - -FIND_LIBRARY(EV_LIBRARY - NAMES ev - HINTS $ENV{EV_SRC}/.libs/ -) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(EV DEFAULT_MSG EV_LIBRARY EV_INCLUDE_DIR) -MARK_AS_ADVANCED(EV_LIBRARY EV_INCLUDE_DIR) diff --git a/contrib/cmake/FindEVENT.cmake b/contrib/cmake/FindEVENT.cmake deleted file mode 100644 index a32dbdf..0000000 --- a/contrib/cmake/FindEVENT.cmake +++ /dev/null @@ -1,83 +0,0 @@ -FIND_PATH(EVENT_INCLUDE_DIR event2/event.h - PATH_SUFFIXES include - PATHS - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt - HINTS $ENV{EVENT_SRC} -) - -FIND_LIBRARY(EVENT_LIBRARY_RELEASE - NAMES event libevent - HINTS $ENV{EVENT_SRC}/.libs/ -) -if (EVENT_LIBRARY_RELEASE) - list(APPEND EVENT_LIBRARY optimized ${EVENT_LIBRARY_RELEASE}) -endif() - -FIND_LIBRARY(EVENT_LIBRARY_DEBUG - NAMES event_d libevent_d - HINTS $ENV{EVENT_SRC}/.libs/ -) -if (EVENT_LIBRARY_DEBUG) - list(APPEND EVENT_LIBRARY debug ${EVENT_LIBRARY_DEBUG}) -else() - if (EVENT_LIBRARY_RELEASE) - list(APPEND EVENT_LIBRARY debug ${EVENT_LIBRARY_RELEASE}) - endif() -endif() - - - -FIND_LIBRARY(EVENT_SSL_LIBRARY_RELEASE - NAMES event_openssl libevent_openssl - HINTS $ENV{EVENT_SRC}/.libs/ -) -if (EVENT_SSL_LIBRARY_RELEASE) - list(APPEND EVENT_LIBRARY optimized ${EVENT_SSL_LIBRARY_RELEASE}) - SET(EVENT_SSL_FOUND ON) -endif() - -FIND_LIBRARY(EVENT_SSL_LIBRARY_DEBUG - NAMES event_openssl_d libevent_openssl_d - HINTS $ENV{EVENT_SRC}/.libs/ -) -if (EVENT_SSL_LIBRARY_DEBUG) - list(APPEND EVENT_LIBRARY debug ${EVENT_SSL_LIBRARY_DEBUG}) -else() - if (EVENT_SSL_LIBRARY_RELEASE) - list(APPEND EVENT_LIBRARY debug ${EVENT_SSL_LIBRARY_RELEASE}) - endif() -endif() - - - -if (NOT WIN32) - FIND_LIBRARY(EVENT_LIBRARY_THREADS - NAMES event_pthreads - HINTS $ENV{EVENT_SRC}/.libs/ - ) - list (APPEND EVENT_LIBRARY ${EVENT_LIBRARY_THREADS}) - - FIND_LIBRARY(EVENT_LIBRARY_EXTRA - NAMES event_extra - HINTS $ENV{EVENT_SRC}/.libs/ - ) - list (APPEND EVENT_LIBRARY ${EVENT_LIBRARY_EXTRA}) - - FIND_LIBRARY(EVENT_LIBRARY_CORE - NAMES event_core - HINTS $ENV{EVENT_SRC}/.libs/ - ) - list (APPEND EVENT_LIBRARY ${EVENT_LIBRARY_CORE}) - -endif() - -#message(FATAL_ERROR "EVENT_SSL_FOUND: ${EVENT_SSL_FOUND}") - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(EVENT DEFAULT_MSG EVENT_LIBRARY EVENT_INCLUDE_DIR) -MARK_AS_ADVANCED(EVENT_LIBRARY EVENT_INCLUDE_DIR EVENT_SSL_FOUND) diff --git a/contrib/cmake/FindExpect.cmake b/contrib/cmake/FindExpect.cmake deleted file mode 100644 index 889c57f..0000000 --- a/contrib/cmake/FindExpect.cmake +++ /dev/null @@ -1,48 +0,0 @@ -FIND_PATH(EXPECT_INCLUDE_DIR expect.h - PATH_SUFFIXES include - PATHS - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt -) - -set(EXPECT_LIBRARY) - -FIND_LIBRARY(EXPECT_LIBRARY_RELEASE - NAMES expect - PATHS - /usr/local - /usr - /sw - /opt/local - /opt/csw - /opt -) -if (EXPECT_LIBRARY_RELEASE) - list(APPEND EXPECT_LIBRARY optimized ${EXPECT_LIBRARY_RELEASE}) -endif() - -FIND_LIBRARY(EXPECT_LIBRARY_DEBUG - NAMES expectd expect_d - PATHS - /usr/local - /usr - /sw - /opt/local - /opt/csw - /opt -) -if (EXPECT_LIBRARY_DEBUG) - list(APPEND EXPECT_LIBRARY debug ${EXPECT_LIBRARY_DEBUG}) -else() - list(APPEND EXPECT_LIBRARY debug ${EXPECT_LIBRARY_RELEASE}) -endif() - -# handle the QUIETLY and REQUIRED arguments and set OPENAL_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXPECT DEFAULT_MSG EXPECT_LIBRARY_RELEASE EXPECT_LIBRARY EXPECT_INCLUDE_DIR) -MARK_AS_ADVANCED(EXPECT_LIBRARY_RELEASE EXPECT_LIBRARY_DEBUG) diff --git a/contrib/cmake/FindFFMPEG.cmake b/contrib/cmake/FindFFMPEG.cmake deleted file mode 100644 index 261b283..0000000 --- a/contrib/cmake/FindFFMPEG.cmake +++ /dev/null @@ -1,172 +0,0 @@ -# Locate ffmpeg -# This module defines -# FFMPEG_LIBRARIES -# FFMPEG_FOUND, if false, do not try to link to ffmpeg -# FFMPEG_INCLUDE_DIR, where to find the headers -# -# $FFMPEG_DIR is an environment variable that would -# correspond to the ./configure --prefix=$FFMPEG_DIR -# -# Created by Robert Osfield. - - -#In ffmpeg code, old version use "#include " and newer use "#include " -#In OSG ffmpeg plugin, we used "#include " for compatibility with old version of ffmpeg -#With the new version of FFmpeg, a file named "time.h" was added that breaks compatability with the old version of ffmpeg. - -#We have to search the path which contain the header.h (usefull for old version) -#and search the path which contain the libname/header.h (usefull for new version) - -#Then we need to include ${FFMPEG_libname_INCLUDE_DIRS} (in old version case, use by ffmpeg header and osg plugin code) -# (in new version case, use by ffmpeg header) -#and ${FFMPEG_libname_INCLUDE_DIRS/libname} (in new version case, use by osg plugin code) - - -# Macro to find header and lib directories -# example: FFMPEG_FIND(AVFORMAT avformat avformat.h) -MACRO(FFMPEG_FIND varname shortname headername) - # old version of ffmpeg put header in $prefix/include/[ffmpeg] - # so try to find header in include directory - - FIND_PATH(FFMPEG_${varname}_INCLUDE_DIRS lib${shortname}/${headername} - PATHS - ${FFMPEG_ROOT}/include - $ENV{FFMPEG_DIR}/include - ~/Library/Frameworks - /Library/Frameworks - /usr/local/include - /usr/include - /sw/include # Fink - /opt/local/include # DarwinPorts - /opt/csw/include # Blastwave - /opt/include - /usr/freeware/include - PATH_SUFFIXES ffmpeg - DOC "Location of FFMPEG Headers" - ) - - FIND_PATH(FFMPEG_${varname}_INCLUDE_DIRS ${headername} - PATHS - ${FFMPEG_ROOT}/include - $ENV{FFMPEG_DIR}/include - ~/Library/Frameworks - /Library/Frameworks - /usr/local/include - /usr/include - /sw/include # Fink - /opt/local/include # DarwinPorts - /opt/csw/include # Blastwave - /opt/include - /usr/freeware/include - PATH_SUFFIXES ffmpeg - DOC "Location of FFMPEG Headers" - ) - - FIND_LIBRARY(FFMPEG_${varname}_LIBRARIES - NAMES ${shortname} - PATHS - ${FFMPEG_ROOT}/lib - $ENV{FFMPEG_DIR}/lib - ~/Library/Frameworks - /Library/Frameworks - /usr/local/lib - /usr/local/lib64 - /usr/lib - /usr/lib64 - /sw/lib - /opt/local/lib - /opt/csw/lib - /opt/lib - /usr/freeware/lib64 - DOC "Location of FFMPEG Libraries" - ) - - IF (FFMPEG_${varname}_LIBRARIES AND FFMPEG_${varname}_INCLUDE_DIRS) - SET(FFMPEG_${varname}_FOUND 1) - ENDIF(FFMPEG_${varname}_LIBRARIES AND FFMPEG_${varname}_INCLUDE_DIRS) - -ENDMACRO(FFMPEG_FIND) - -SET(FFMPEG_ROOT "$ENV{FFMPEG_DIR}" CACHE PATH "Location of FFMPEG") - -# find stdint.h -IF(WIN32) - - FIND_PATH(FFMPEG_STDINT_INCLUDE_DIR stdint.h - PATHS - ${FFMPEG_ROOT}/include - $ENV{FFMPEG_DIR}/include - ~/Library/Frameworks - /Library/Frameworks - /usr/local/include - /usr/include - /sw/include # Fink - /opt/local/include # DarwinPorts - /opt/csw/include # Blastwave - /opt/include - /usr/freeware/include - PATH_SUFFIXES ffmpeg - DOC "Location of FFMPEG stdint.h Header" - ) - - IF (FFMPEG_STDINT_INCLUDE_DIR) - SET(STDINT_OK TRUE) - ENDIF() - -ELSE() - - SET(STDINT_OK TRUE) - -ENDIF() - -FFMPEG_FIND(LIBAVFORMAT avformat avformat.h) -FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h) -FFMPEG_FIND(LIBAVCODEC avcodec avcodec.h) -FFMPEG_FIND(LIBAVUTIL avutil avutil.h) -FFMPEG_FIND(LIBSWSCALE swscale swscale.h) # not sure about the header to look for here. - -SET(FFMPEG_FOUND "NO") -# Note we don't check FFMPEG_LIBSWSCALE_FOUND here, it's optional. -IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND AND FFMPEG_LIBSWSCALE_FOUND AND STDINT_OK) - - SET(FFMPEG_FOUND "YES") - - SET(FFMPEG_INCLUDE_DIRS - ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS} - ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS} - ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS} - ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} - ) - -# Using the new include style for FFmpeg prevents issues with #include - IF (FFMPEG_STDINT_INCLUDE_DIR) - SET(FFMPEG_INCLUDE_DIRS - ${FFMPEG_INCLUDE_DIRS} - ${FFMPEG_STDINT_INCLUDE_DIR} - ) - ENDIF() - - - SET(FFMPEG_LIBRARY_DIRS ${FFMPEG_LIBAVFORMAT_LIBRARY_DIRS}) - - # Note we don't add FFMPEG_LIBSWSCALE_LIBRARIES here, it will be added if found later. - SET(FFMPEG_LIBRARIES - ${FFMPEG_LIBAVFORMAT_LIBRARIES} - ${FFMPEG_LIBSWSCALE_LIBRARIES} - ${FFMPEG_LIBAVDEVICE_LIBRARIES} - ${FFMPEG_LIBAVCODEC_LIBRARIES} - ${FFMPEG_LIBAVUTIL_LIBRARIES}) - -ENDIF() - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFMPEG DEFAULT_MSG - FFMPEG_LIBRARIES - FFMPEG_INCLUDE_DIRS - FFMPEG_LIBAVFORMAT_INCLUDE_DIRS - FFMPEG_LIBAVDEVICE_INCLUDE_DIRS - FFMPEG_LIBAVCODEC_INCLUDE_DIRS - FFMPEG_LIBAVUTIL_INCLUDE_DIRS - FFMPEG_LIBSWSCALE_INCLUDE_DIRS -) -MARK_AS_ADVANCED(FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIR) diff --git a/contrib/cmake/FindGLIB2.cmake b/contrib/cmake/FindGLIB2.cmake deleted file mode 100644 index e62d843..0000000 --- a/contrib/cmake/FindGLIB2.cmake +++ /dev/null @@ -1,237 +0,0 @@ -# - Try to find GLib2 -# Once done this will define -# -# GLIB2_FOUND - system has GLib2 -# GLIB2_INCLUDE_DIRS - the GLib2 include directory -# GLIB2_LIBRARIES - Link these to use GLib2 -# -# HAVE_GLIB_GREGEX_H glib has gregex.h header and -# supports g_regex_match_simple -# -# Copyright (c) 2006 Andreas Schneider -# Copyright (c) 2006 Philippe Bernery -# Copyright (c) 2007 Daniel Gollub -# Copyright (c) 2007 Alban Browaeys -# Copyright (c) 2008 Michael Bell -# Copyright (c) 2008-2009 Bjoern Ricks -# -# Redistribution and use is allowed according to the terms of the New -# BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - - -IF (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS ) - # in cache already - SET(GLIB2_FOUND TRUE) -ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS ) - - if (NOT APPLE) - INCLUDE(FindPkgConfig) - - ## Glib - IF ( GLIB2_FIND_REQUIRED ) - SET( _pkgconfig_REQUIRED "REQUIRED" ) - ELSE ( GLIB2_FIND_REQUIRED ) - SET( _pkgconfig_REQUIRED "" ) - ENDIF ( GLIB2_FIND_REQUIRED ) - - IF ( GLIB2_MIN_VERSION ) - PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0>=${GLIB2_MIN_VERSION} ) - ELSE ( GLIB2_MIN_VERSION ) - PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0 ) - ENDIF ( GLIB2_MIN_VERSION ) - IF ( PKG_CONFIG_FOUND ) - IF ( GLIB2_FOUND ) - SET ( GLIB2_CORE_FOUND TRUE ) - ELSE ( GLIB2_FOUND ) - SET ( GLIB2_CORE_FOUND FALSE ) - ENDIF ( GLIB2_FOUND ) - ENDIF ( PKG_CONFIG_FOUND ) - endif() - - # Look for glib2 include dir and libraries w/o pkgconfig - IF ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND OR APPLE ) - FIND_PATH( - _glibconfig_include_DIR - NAMES - glibconfig.h - PATHS - /opt/gnome/lib64 - /opt/gnome/lib - /opt/lib/ - /opt/local/lib - /sw/lib/ - /usr/lib64 - /usr/lib - /usr/local/include - ${CMAKE_LIBRARY_PATH} - PATH_SUFFIXES - glib-2.0/include - ) - - FIND_PATH( - _glib2_include_DIR - NAMES - glib.h - PATHS - /opt/gnome/include - /opt/local/include - /sw/include - /usr/include - /usr/local/include - PATH_SUFFIXES - glib-2.0 - ) - - #MESSAGE(STATUS "Glib headers: ${_glib2_include_DIR}") - - FIND_LIBRARY( - _glib2_link_DIR - NAMES - glib-2.0 - glib - PATHS - /opt/gnome/lib - /opt/local/lib - /sw/lib - /usr/lib - /usr/local/lib - ) - IF ( _glib2_include_DIR AND _glib2_link_DIR ) - SET ( _glib2_FOUND TRUE ) - ENDIF ( _glib2_include_DIR AND _glib2_link_DIR ) - - - IF ( _glib2_FOUND ) - SET ( GLIB2_INCLUDE_DIRS ${_glib2_include_DIR} ${_glibconfig_include_DIR} ) - SET ( GLIB2_LIBRARIES ${_glib2_link_DIR} ) - SET ( GLIB2_CORE_FOUND TRUE ) - ELSE ( _glib2_FOUND ) - SET ( GLIB2_CORE_FOUND FALSE ) - ENDIF ( _glib2_FOUND ) - - # Handle dependencies - # libintl - IF ( NOT LIBINTL_FOUND ) - FIND_PATH(LIBINTL_INCLUDE_DIR - NAMES - libintl.h - PATHS - /opt/gnome/include - /opt/local/include - /sw/include - /usr/include - /usr/local/include - ) - - FIND_LIBRARY(LIBINTL_LIBRARY - NAMES - intl - PATHS - /opt/gnome/lib - /opt/local/lib - /sw/lib - /usr/local/lib - /usr/lib - ) - - IF (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR) - SET (LIBINTL_FOUND TRUE) - ENDIF (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR) - ENDIF ( NOT LIBINTL_FOUND ) - - # libiconv - IF ( NOT LIBICONV_FOUND ) - FIND_PATH(LIBICONV_INCLUDE_DIR - NAMES - iconv.h - PATHS - /opt/gnome/include - /opt/local/include - /opt/local/include - /sw/include - /sw/include - /usr/local/include - /usr/include - PATH_SUFFIXES - glib-2.0 - ) - - FIND_LIBRARY(LIBICONV_LIBRARY - NAMES - iconv - PATHS - /opt/gnome/lib - /opt/local/lib - /sw/lib - /usr/lib - /usr/local/lib - ) - - IF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR) - SET (LIBICONV_FOUND TRUE) - ENDIF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR) - ENDIF ( NOT LIBICONV_FOUND ) - - IF (LIBINTL_FOUND) - SET (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBINTL_LIBRARY}) - SET (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR}) - ENDIF (LIBINTL_FOUND) - - IF (LIBICONV_FOUND) - SET (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY}) - SET (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR}) - ENDIF (LIBICONV_FOUND) - - ENDIF ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND OR APPLE ) - ## - - IF (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES) - SET (GLIB2_FOUND TRUE) - ENDIF (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES) - - IF (GLIB2_FOUND) - IF (NOT GLIB2_FIND_QUIETLY) - MESSAGE (STATUS "Found GLib2: ${GLIB2_LIBRARIES} ${GLIB2_INCLUDE_DIRS}") - ENDIF (NOT GLIB2_FIND_QUIETLY) - ELSE (GLIB2_FOUND) - IF (GLIB2_FIND_REQUIRED) - MESSAGE (SEND_ERROR "Could not find GLib2") - ENDIF (GLIB2_FIND_REQUIRED) - ENDIF (GLIB2_FOUND) - - # show the GLIB2_INCLUDE_DIRS and GLIB2_LIBRARIES variables only in the advanced view - MARK_AS_ADVANCED(GLIB2_INCLUDE_DIRS GLIB2_LIBRARIES) - MARK_AS_ADVANCED(LIBICONV_INCLUDE_DIR LIBICONV_LIBRARY) - MARK_AS_ADVANCED(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARY) - -ENDIF (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS) - -IF ( WIN32 ) - # include libiconv for win32 - IF ( NOT LIBICONV_FOUND ) - FIND_PATH(LIBICONV_INCLUDE_DIR iconv.h PATH_SUFFIXES glib-2.0) - - FIND_LIBRARY(LIBICONV_LIBRARY NAMES iconv) - - IF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR) - SET (LIBICONV_FOUND TRUE) - ENDIF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR) - ENDIF ( NOT LIBICONV_FOUND ) - IF (LIBICONV_FOUND) - SET (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY}) - SET (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR}) - ENDIF (LIBICONV_FOUND) -ENDIF ( WIN32 ) - -IF ( GLIB2_FOUND ) - # Check if system has a newer version of glib - # which supports g_regex_match_simple - INCLUDE( CheckIncludeFiles ) - SET( CMAKE_REQUIRED_INCLUDES ${GLIB2_INCLUDE_DIRS} ) - CHECK_INCLUDE_FILES ( glib/gregex.h HAVE_GLIB_GREGEX_H ) - CHECK_INCLUDE_FILES ( glib/gchecksum.h HAVE_GLIB_GCHECKSUM_H ) - # Reset CMAKE_REQUIRED_INCLUDES - SET( CMAKE_REQUIRED_INCLUDES "" ) -ENDIF( GLIB2_FOUND ) \ No newline at end of file diff --git a/contrib/cmake/FindGLOG.cmake b/contrib/cmake/FindGLOG.cmake deleted file mode 100644 index e49a77b..0000000 --- a/contrib/cmake/FindGLOG.cmake +++ /dev/null @@ -1,35 +0,0 @@ -FIND_PATH(GLOG_INCLUDE_DIR glog/logging.h - PATH_SUFFIXES include src - PATHS - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt - HINTS $ENV{GLOG_SRC} -) - -FIND_LIBRARY(GLOG_LIBRARY_RELEASE - NAMES glog libglog_static - HINTS $ENV{GLOG_SRC}/.libs/ -) -if (GLOG_LIBRARY_RELEASE) - list(APPEND GLOG_LIBRARY optimized ${GLOG_LIBRARY_RELEASE}) -endif() - -FIND_LIBRARY(GLOG_LIBRARY_DEBUG - NAMES glog libglog_static_d - HINTS $ENV{GLOG_SRC}/.libs/ -) -if (GLOG_LIBRARY_DEBUG) - list(APPEND GLOG_LIBRARY debug ${GLOG_LIBRARY_DEBUG}) -else() - if (UNIX) - list(APPEND GLOG_LIBRARY debug ${GLOG_LIBRARY_RELEASE}) - endif() -endif() - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLOG DEFAULT_MSG GLOG_LIBRARY GLOG_INCLUDE_DIR) -MARK_AS_ADVANCED(GLOG_LIBRARY GLOG_INCLUDE_DIR) diff --git a/contrib/cmake/FindGMP.cmake b/contrib/cmake/FindGMP.cmake deleted file mode 100644 index 2926a98..0000000 --- a/contrib/cmake/FindGMP.cmake +++ /dev/null @@ -1,42 +0,0 @@ -FIND_PATH(GMP_INCLUDE_DIR gmp.h - PATH_SUFFIXES include - PATHS - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt - HINTS $ENV{GMP_SRC} -) - -FIND_LIBRARY(GMP_LIBRARY_RELEASE - NAMES gmp - PATHS - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt - HINTS $ENV{GMP_SRC}/.libs/ -) -if (GMP_LIBRARY_RELEASE) - list(APPEND GMP_LIBRARY optimized ${GMP_LIBRARY_RELEASE}) -endif() - -FIND_LIBRARY(GMP_LIBRARY_DEBUG - NAMES GMP libGMP_static_d - HINTS $ENV{GMP_SRC}/.libs/ -) -if (GMP_LIBRARY_DEBUG) - list(APPEND GMP_LIBRARY debug ${GMP_LIBRARY_DEBUG}) -else() - if (UNIX) - list(APPEND GMP_LIBRARY debug ${GMP_LIBRARY_RELEASE}) - endif() -endif() - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMP DEFAULT_MSG GMP_LIBRARY GMP_INCLUDE_DIR) -MARK_AS_ADVANCED(GMP_LIBRARY GMP_INCLUDE_DIR) diff --git a/contrib/cmake/FindGObject.cmake b/contrib/cmake/FindGObject.cmake deleted file mode 100644 index 1107c10..0000000 --- a/contrib/cmake/FindGObject.cmake +++ /dev/null @@ -1,52 +0,0 @@ -# - Try to find GObject -# Once done this will define -# -# GOBJECT_FOUND - system has GObject -# GOBJECT_INCLUDE_DIR - the GObject include directory -# GOBJECT_LIBRARIES - the libraries needed to use GObject -# GOBJECT_DEFINITIONS - Compiler switches required for using GObject - -# Copyright (c) 2011, Raphael Kubo da Costa -# Copyright (c) 2006, Tim Beaulen -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -FIND_PACKAGE(PkgConfig) -PKG_CHECK_MODULES(PC_GOBJECT gobject-2.0) -SET(GOBJECT_DEFINITIONS ${PC_GOBJECT_CFLAGS_OTHER}) - -FIND_PATH(GOBJECT_INCLUDE_DIR gobject.h - HINTS - ${PC_GOBJECT_INCLUDEDIR} - ${PC_GOBJECT_INCLUDE_DIRS} - PATH_SUFFIXES glib-2.0/gobject/ - ) - -FIND_LIBRARY(_GObjectLibs NAMES gobject-2.0 - HINTS - ${PC_GOBJECT_LIBDIR} - ${PC_GOBJECT_LIBRARY_DIRS} - ) -FIND_LIBRARY(_GModuleLibs NAMES gmodule-2.0 - HINTS - ${PC_GOBJECT_LIBDIR} - ${PC_GOBJECT_LIBRARY_DIRS} - ) -FIND_LIBRARY(_GThreadLibs NAMES gthread-2.0 - HINTS - ${PC_GOBJECT_LIBDIR} - ${PC_GOBJECT_LIBRARY_DIRS} - ) -FIND_LIBRARY(_GLibs NAMES glib-2.0 - HINTS - ${PC_GOBJECT_LIBDIR} - ${PC_GOBJECT_LIBRARY_DIRS} - ) - -SET( GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs} ) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GOBJECT DEFAULT_MSG GOBJECT_LIBRARIES GOBJECT_INCLUDE_DIR) - -MARK_AS_ADVANCED(GOBJECT_INCLUDE_DIR _GObjectLibs _GModuleLibs _GThreadLibs _GLibs) \ No newline at end of file diff --git a/contrib/cmake/FindICONV.cmake b/contrib/cmake/FindICONV.cmake deleted file mode 100644 index 8e0d636..0000000 --- a/contrib/cmake/FindICONV.cmake +++ /dev/null @@ -1,58 +0,0 @@ -# From https://github.com/onyx-intl/cmake_modules/blob/master/FindIconv.cmake -# - Try to find Iconv -# Once done this will define -# -# ICONV_FOUND - system has Iconv -# ICONV_INCLUDE_DIR - the Iconv include directory -# ICONV_LIBRARIES - Link these to use Iconv -# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const -# -include(CheckCXXSourceCompiles) - -IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - # Already in cache, be silent - SET(ICONV_FIND_QUIETLY TRUE) -ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - -FIND_PATH(ICONV_INCLUDE_DIR iconv.h) - -FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) - -IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - SET(ICONV_FOUND TRUE) -ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - -set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) -set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) -IF(ICONV_FOUND) - check_cxx_source_compiles(" - #include - int main(){ - iconv_t conv = 0; - const char* in = 0; - size_t ilen = 0; - char* out = 0; - size_t olen = 0; - iconv(conv, &in, &ilen, &out, &olen); - return 0; - } -" ICONV_SECOND_ARGUMENT_IS_CONST ) -ENDIF(ICONV_FOUND) -set(CMAKE_REQUIRED_INCLUDES) -set(CMAKE_REQUIRED_LIBRARIES) - -IF(ICONV_FOUND) - IF(NOT ICONV_FIND_QUIETLY) - MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") - ENDIF(NOT ICONV_FIND_QUIETLY) -ELSE(ICONV_FOUND) - IF(Iconv_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Iconv") - ENDIF(Iconv_FIND_REQUIRED) -ENDIF(ICONV_FOUND) - -MARK_AS_ADVANCED( - ICONV_INCLUDE_DIR - ICONV_LIBRARIES - ICONV_SECOND_ARGUMENT_IS_CONST -) \ No newline at end of file diff --git a/contrib/cmake/FindICU.cmake b/contrib/cmake/FindICU.cmake deleted file mode 100644 index c48a9a0..0000000 --- a/contrib/cmake/FindICU.cmake +++ /dev/null @@ -1,317 +0,0 @@ -# -# Taken from: -# https://github.com/julp/FindICU.cmake -# -# This module can find the International Components for Unicode (ICU) Library -# -# Requirements: -# - CMake >= 2.8.3 (for new version of find_package_handle_standard_args) -# -# The following variables will be defined for your use: -# - ICU_FOUND : were all of your specified components found (include dependencies)? -# - ICU_INCLUDE_DIRS : ICU include directory -# - ICU_LIBRARIES : ICU libraries -# - ICU_VERSION : complete version of ICU (x.y.z) -# - ICU_MAJOR_VERSION : major version of ICU -# - ICU_MINOR_VERSION : minor version of ICU -# - ICU_PATCH_VERSION : patch version of ICU -# - ICU__FOUND : were found? (FALSE for non specified component if it is not a dependency) -# -# For windows or non standard installation, define ICU_ROOT variable to point to the root installation of ICU. Two ways: -# - run cmake with -DICU_ROOT= -# - define an environment variable with the same name before running cmake -# With cmake-gui, before pressing "Configure": -# 1) Press "Add Entry" button -# 2) Add a new entry defined as: -# - Name: ICU_ROOT -# - Type: choose PATH in the selection list -# - Press "..." button and select the root installation of ICU -# -# Example Usage: -# -# 1. Copy this file in the root of your project source directory -# 2. Then, tell CMake to search this non-standard module in your project directory by adding to your CMakeLists.txt: -# set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) -# 3. Finally call find_package() once, here are some examples to pick from -# -# Require ICU 4.4 or later -# find_package(ICU 4.4 REQUIRED) -# -# if(ICU_FOUND) -# include_directories(${ICU_INCLUDE_DIRS}) -# add_executable(myapp myapp.c) -# target_link_libraries(myapp ${ICU_LIBRARIES}) -# endif(ICU_FOUND) - -#============================================================================= -# Copyright (c) 2011-2013, julp -# -# Distributed under the OSI-approved BSD License -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -#============================================================================= - -find_package(PkgConfig QUIET) - -########## Private ########## -if(NOT DEFINED ICU_PUBLIC_VAR_NS) - set(ICU_PUBLIC_VAR_NS "ICU") # Prefix for all ICU relative public variables -endif(NOT DEFINED ICU_PUBLIC_VAR_NS) -if(NOT DEFINED ICU_PRIVATE_VAR_NS) - set(ICU_PRIVATE_VAR_NS "_${ICU_PUBLIC_VAR_NS}") # Prefix for all ICU relative internal variables -endif(NOT DEFINED ICU_PRIVATE_VAR_NS) -if(NOT DEFINED PC_ICU_PRIVATE_VAR_NS) - set(PC_ICU_PRIVATE_VAR_NS "_PC${ICU_PRIVATE_VAR_NS}") # Prefix for all pkg-config relative internal variables -endif(NOT DEFINED PC_ICU_PRIVATE_VAR_NS) - -function(icudebug _VARNAME) - if(${ICU_PUBLIC_VAR_NS}_DEBUG) - if(DEFINED ${ICU_PUBLIC_VAR_NS}_${_VARNAME}) - message("${ICU_PUBLIC_VAR_NS}_${_VARNAME} = ${${ICU_PUBLIC_VAR_NS}_${_VARNAME}}") - else(DEFINED ${ICU_PUBLIC_VAR_NS}_${_VARNAME}) - message("${ICU_PUBLIC_VAR_NS}_${_VARNAME} = ") - endif(DEFINED ${ICU_PUBLIC_VAR_NS}_${_VARNAME}) - endif(${ICU_PUBLIC_VAR_NS}_DEBUG) -endfunction(icudebug) - -set(${ICU_PRIVATE_VAR_NS}_ROOT "") -if(DEFINED ENV{ICU_ROOT}) - set(${ICU_PRIVATE_VAR_NS}_ROOT "$ENV{ICU_ROOT}") -endif(DEFINED ENV{ICU_ROOT}) -if (DEFINED ICU_ROOT) - set(${ICU_PRIVATE_VAR_NS}_ROOT "${ICU_ROOT}") -endif(DEFINED ICU_ROOT) - -set(${ICU_PRIVATE_VAR_NS}_BIN_SUFFIXES ) -set(${ICU_PRIVATE_VAR_NS}_LIB_SUFFIXES ) -if(CMAKE_SIZEOF_VOID_P EQUAL 8) - list(APPEND ${ICU_PRIVATE_VAR_NS}_BIN_SUFFIXES "bin64") - list(APPEND ${ICU_PRIVATE_VAR_NS}_LIB_SUFFIXES "lib64") -endif(CMAKE_SIZEOF_VOID_P EQUAL 8) -list(APPEND ${ICU_PRIVATE_VAR_NS}_BIN_SUFFIXES "bin") -list(APPEND ${ICU_PRIVATE_VAR_NS}_LIB_SUFFIXES "lib") - -set(${ICU_PRIVATE_VAR_NS}_COMPONENTS ) -# ... -macro(icu_declare_component _NAME) - list(APPEND ${ICU_PRIVATE_VAR_NS}_COMPONENTS ${_NAME}) - set("${ICU_PRIVATE_VAR_NS}_COMPONENTS_${_NAME}" ${ARGN}) -endmacro(icu_declare_component) - -icu_declare_component(data icudata) -icu_declare_component(uc icuuc) # Common and Data libraries -icu_declare_component(i18n icui18n icuin) # Internationalization library -icu_declare_component(io icuio ustdio) # Stream and I/O Library -icu_declare_component(le icule) # Layout library -icu_declare_component(lx iculx) # Paragraph Layout library - -########## Public ########## -set(${ICU_PUBLIC_VAR_NS}_FOUND TRUE) -set(${ICU_PUBLIC_VAR_NS}_LIBRARIES ) -set(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS ) -set(${ICU_PUBLIC_VAR_NS}_C_FLAGS "") -set(${ICU_PUBLIC_VAR_NS}_CXX_FLAGS "") -set(${ICU_PUBLIC_VAR_NS}_CPP_FLAGS "") -set(${ICU_PUBLIC_VAR_NS}_C_SHARED_FLAGS "") -set(${ICU_PUBLIC_VAR_NS}_CXX_SHARED_FLAGS "") -set(${ICU_PUBLIC_VAR_NS}_CPP_SHARED_FLAGS "") -foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PRIVATE_VAR_NS}_COMPONENTS}) - string(TOUPPER "${${ICU_PRIVATE_VAR_NS}_COMPONENT}" ${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT) - set("${ICU_PUBLIC_VAR_NS}_${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}_FOUND" FALSE) # may be done in the icu_declare_component macro -endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT) - -# Check components -if(NOT ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) # uc required at least - set(${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS uc) -else(NOT ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) - list(APPEND ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS uc) - list(REMOVE_DUPLICATES ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) - foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS}) - if(NOT DEFINED ${ICU_PRIVATE_VAR_NS}_COMPONENTS_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) - message(FATAL_ERROR "Unknown ICU component: ${${ICU_PRIVATE_VAR_NS}_COMPONENT}") - endif(NOT DEFINED ${ICU_PRIVATE_VAR_NS}_COMPONENTS_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) - endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT) -endif(NOT ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) - -# Includes -find_path( - ${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS - NAMES unicode/utypes.h utypes.h - HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT} - PATH_SUFFIXES "include" - DOC "Include directories for ICU" -) - -if(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS) - ########## ########## - if(EXISTS "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/uvernum.h") # ICU >= 4 - file(READ "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/uvernum.h" ${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS) - elseif(EXISTS "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/uversion.h") # ICU [2;4[ - file(READ "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/uversion.h" ${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS) - elseif(EXISTS "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/utypes.h") # ICU [1.4;2[ - file(READ "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/utypes.h" ${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS) - elseif(EXISTS "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/utypes.h") # ICU 1.3 - file(READ "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/utypes.h" ${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS) - else() - message(FATAL_ERROR "ICU version header not found") - endif() - - if(${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS MATCHES ".*# *define *ICU_VERSION *\"([0-9]+)\".*") # ICU 1.3 - # [1.3;1.4[ as #define ICU_VERSION "3" (no patch version, ie all 1.3.X versions will be detected as 1.3.0) - set(${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION "1") - set(${ICU_PUBLIC_VAR_NS}_MINOR_VERSION "${CMAKE_MATCH_1}") - set(${ICU_PUBLIC_VAR_NS}_PATCH_VERSION "0") - elseif(${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS MATCHES ".*# *define *U_ICU_VERSION_MAJOR_NUM *([0-9]+).*") - # - # Since version 4.9.1, ICU release version numbering was totaly changed, see: - # - http://site.icu-project.org/download/49 - # - http://userguide.icu-project.org/design#TOC-Version-Numbers-in-ICU - # - set(${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION "${CMAKE_MATCH_1}") - string(REGEX REPLACE ".*# *define *U_ICU_VERSION_MINOR_NUM *([0-9]+).*" "\\1" ${ICU_PUBLIC_VAR_NS}_MINOR_VERSION "${${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS}") - string(REGEX REPLACE ".*# *define *U_ICU_VERSION_PATCHLEVEL_NUM *([0-9]+).*" "\\1" ${ICU_PUBLIC_VAR_NS}_PATCH_VERSION "${${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS}") - elseif(${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS MATCHES ".*# *define *U_ICU_VERSION *\"(([0-9]+)(\\.[0-9]+)*)\".*") # ICU [1.4;1.8[ - # [1.4;1.8[ as #define U_ICU_VERSION "1.4.1.2" but it seems that some 1.4.1(?:\.\d)? have releasing error and appears as 1.4.0 - set(${ICU_PRIVATE_VAR_NS}_FULL_VERSION "${CMAKE_MATCH_1}") # copy CMAKE_MATCH_1, no longer valid on the following if - if(${ICU_PRIVATE_VAR_NS}_FULL_VERSION MATCHES "^([0-9]+)\\.([0-9]+)$") - set(${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION "${CMAKE_MATCH_1}") - set(${ICU_PUBLIC_VAR_NS}_MINOR_VERSION "${CMAKE_MATCH_2}") - set(${ICU_PUBLIC_VAR_NS}_PATCH_VERSION "0") - elseif(${ICU_PRIVATE_VAR_NS}_FULL_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)") - set(${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION "${CMAKE_MATCH_1}") - set(${ICU_PUBLIC_VAR_NS}_MINOR_VERSION "${CMAKE_MATCH_2}") - set(${ICU_PUBLIC_VAR_NS}_PATCH_VERSION "${CMAKE_MATCH_3}") - endif() - else() - message(FATAL_ERROR "failed to detect ICU version") - endif() - set(${ICU_PUBLIC_VAR_NS}_VERSION "${${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION}.${${ICU_PUBLIC_VAR_NS}_MINOR_VERSION}.${${ICU_PUBLIC_VAR_NS}_PATCH_VERSION}") - ########## ########## - - # Check dependencies (implies pkg-config) - if(PKG_CONFIG_FOUND) - set(${ICU_PRIVATE_VAR_NS}_COMPONENTS_DUP ${${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS}) - foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PRIVATE_VAR_NS}_COMPONENTS_DUP}) - pkg_check_modules(PC_ICU_PRIVATE_VAR_NS "icu-${${ICU_PRIVATE_VAR_NS}_COMPONENT}" QUIET) - - if(${PC_ICU_PRIVATE_VAR_NS}_FOUND) - foreach(${PC_ICU_PRIVATE_VAR_NS}_LIBRARY ${PC_ICU_LIBRARIES}) - string(REGEX REPLACE "^icu" "" ${PC_ICU_PRIVATE_VAR_NS}_STRIPPED_LIBRARY ${${PC_ICU_PRIVATE_VAR_NS}_LIBRARY}) - list(APPEND ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS ${${PC_ICU_PRIVATE_VAR_NS}_STRIPPED_LIBRARY}) - endforeach(${PC_ICU_PRIVATE_VAR_NS}_LIBRARY) - endif(${PC_ICU_PRIVATE_VAR_NS}_FOUND) - endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT) - list(REMOVE_DUPLICATES ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) - endif(PKG_CONFIG_FOUND) - - # Check libraries - foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS}) - set(${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES ) - set(${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES ) - foreach(${ICU_PRIVATE_VAR_NS}_BASE_NAME ${${ICU_PRIVATE_VAR_NS}_COMPONENTS_${${ICU_PRIVATE_VAR_NS}_COMPONENT}}) - list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}") - list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}d") - list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}${ICU_MAJOR_VERSION}${ICU_MINOR_VERSION}") - list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}${ICU_MAJOR_VERSION}${ICU_MINOR_VERSION}d") - endforeach(${ICU_PRIVATE_VAR_NS}_BASE_NAME) - - find_library( - ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT} - NAMES ${${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES} - HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT} - PATH_SUFFIXES ${_ICU_LIB_SUFFIXES} - DOC "Release libraries for ICU" - ) - find_library( - ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT} - NAMES ${${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES} - HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT} - PATH_SUFFIXES ${_ICU_LIB_SUFFIXES} - DOC "Debug libraries for ICU" - ) - - string(TOUPPER "${${ICU_PRIVATE_VAR_NS}_COMPONENT}" ${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT) - if(NOT ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT} AND NOT ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) # both not found - set("${ICU_PUBLIC_VAR_NS}_${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}_FOUND" FALSE) - set("${ICU_PUBLIC_VAR_NS}_FOUND" FALSE) - else(NOT ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT} AND NOT ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) # one or both found - set("${ICU_PUBLIC_VAR_NS}_${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}_FOUND" TRUE) - if(NOT ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) # release not found => we are in debug - set(${ICU_PRIVATE_VAR_NS}_LIB_${${ICU_PRIVATE_VAR_NS}_COMPONENT} "${${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}}") - elseif(NOT ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) # debug not found => we are in release - set(${ICU_PRIVATE_VAR_NS}_LIB_${${ICU_PRIVATE_VAR_NS}_COMPONENT} "${${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT}}") - else() # both found - set( - ${ICU_PRIVATE_VAR_NS}_LIB_${${ICU_PRIVATE_VAR_NS}_COMPONENT} - optimized ${${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT}} - debug ${${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}} - ) - endif() - list(APPEND ${ICU_PUBLIC_VAR_NS}_LIBRARIES ${${ICU_PRIVATE_VAR_NS}_LIB_${${ICU_PRIVATE_VAR_NS}_COMPONENT}}) - endif(NOT ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT} AND NOT ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) - endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT) - - # Try to find out compiler flags - find_program(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE icu-config HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT}) - if(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE) - execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_C_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cxxflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CXX_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cppflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CPP_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) - - execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cflags-dynamic OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_C_SHARED_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cxxflags-dynamic OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CXX_SHARED_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cppflags-dynamic OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CPP_SHARED_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) - endif(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE) - - # Check find_package arguments - include(FindPackageHandleStandardArgs) - if(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) - find_package_handle_standard_args( - ${ICU_PUBLIC_VAR_NS} - REQUIRED_VARS ${ICU_PUBLIC_VAR_NS}_LIBRARIES ${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS - VERSION_VAR ${ICU_PUBLIC_VAR_NS}_VERSION - ) - else(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) - find_package_handle_standard_args(${ICU_PUBLIC_VAR_NS} "ICU not found" ${ICU_PUBLIC_VAR_NS}_LIBRARIES ${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS) - endif(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) -else(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS) - if(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) - message(FATAL_ERROR "Could not find ICU include directory") - endif(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) -endif(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS) - -mark_as_advanced( - ${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS - ${ICU_PUBLIC_VAR_NS}_LIBRARIES -) - -# IN (args) -icudebug("FIND_COMPONENTS") -icudebug("FIND_REQUIRED") -icudebug("FIND_QUIETLY") -icudebug("FIND_VERSION") -# OUT -# Found -icudebug("FOUND") -icudebug("UC_FOUND") -icudebug("I18N_FOUND") -icudebug("IO_FOUND") -icudebug("LE_FOUND") -icudebug("LX_FOUND") -icudebug("DATA_FOUND") -# Flags -icudebug("C_FLAGS") -icudebug("CPP_FLAGS") -icudebug("CXX_FLAGS") -icudebug("C_SHARED_FLAGS") -icudebug("CPP_SHARED_FLAGS") -icudebug("CXX_SHARED_FLAGS") -# Linking -icudebug("INCLUDE_DIRS") -icudebug("LIBRARIES") -# Version -icudebug("MAJOR_VERSION") -icudebug("MINOR_VERSION") -icudebug("PATCH_VERSION") -icudebug("VERSION") \ No newline at end of file diff --git a/contrib/cmake/FindLIBICAL.cmake b/contrib/cmake/FindLIBICAL.cmake deleted file mode 100644 index 6510f96..0000000 --- a/contrib/cmake/FindLIBICAL.cmake +++ /dev/null @@ -1,52 +0,0 @@ -# we cannot search for ical.h as we might find the wrong one without the libical suffix -FIND_PATH(LIBICAL_INCLUDE_DIR icalcomponent.h - PATH_SUFFIXES include/libical - PATHS - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt -) - -FIND_LIBRARY(LIBICAL_LIBRARY_RELEASE - NAMES ical libical libical-static -) -if (LIBICAL_LIBRARY_RELEASE) - list(APPEND LIBICAL_LIBRARIES optimized ${LIBICAL_LIBRARY_RELEASE}) -endif() - -FIND_LIBRARY(LIBICAL_LIBRARY_DEBUG - NAMES ical_d libical_d libical-static_d -) -if (LIBICAL_LIBRARY_DEBUG) - list(APPEND LIBICAL_LIBRARIES debug ${LIBICAL_LIBRARY_DEBUG}) -else() - if (UNIX) - list(APPEND LIBICAL_LIBRARIES debug ${LIBICAL_LIBRARY_RELEASE}) - endif() -endif() - -FIND_LIBRARY(LIBICALSS_LIBRARY_RELEASE - NAMES icalss libicalss libicalss-static -) -if (LIBICALSS_LIBRARY_RELEASE) - list(APPEND LIBICAL_LIBRARIES optimized ${LIBICALSS_LIBRARY_RELEASE}) -endif() - -FIND_LIBRARY(LIBICALSS_LIBRARY_DEBUG - NAMES icalss_d libicalss_d libicalss-static_d -) -if (LIBICALSS_LIBRARY_DEBUG) - list(APPEND LIBICAL_LIBRARIES debug ${LIBICALSS_LIBRARY_DEBUG}) -else() - if (UNIX) - list(APPEND LIBICAL_LIBRARIES debug ${LIBICALSS_LIBRARY_RELEASE}) - endif() -endif() - - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBICAL DEFAULT_MSG LIBICAL_LIBRARIES LIBICAL_INCLUDE_DIR) -MARK_AS_ADVANCED(LIBICAL_LIBRARIES LIBICAL_INCLUDE_DIR) diff --git a/contrib/cmake/FindLIBSNDFILE.cmake b/contrib/cmake/FindLIBSNDFILE.cmake deleted file mode 100644 index 2219aaf..0000000 --- a/contrib/cmake/FindLIBSNDFILE.cmake +++ /dev/null @@ -1,45 +0,0 @@ -SET(WIN_DIRECTORIES "") -if(CMAKE_SIZEOF_VOID_P EQUAL 8) - list(APPEND WIN_DIRECTORIES "C:/Program Files/Mega-Nerd/libsndfile") -else() - list(APPEND WIN_DIRECTORIES "C:/Program Files (x86)/Mega-Nerd/libsndfile") -endif() - -FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h - PATH_SUFFIXES include src - PATHS - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt - ${WIN_DIRECTORIES} - HINTS $ENV{LIBSNDFILE_SRC} -) - -FIND_LIBRARY(LIBSNDFILE_LIBRARY_RELEASE - PATH_SUFFIXES bin lib - NAMES sndfile libsndfile libsndfile-1 - PATHS ${WIN_DIRECTORIES} -) -if (LIBSNDFILE_LIBRARY_RELEASE) - list(APPEND LIBSNDFILE_LIBRARY optimized ${LIBSNDFILE_LIBRARY_RELEASE}) -endif() - -FIND_LIBRARY(LIBSNDFILE_LIBRARY_DEBUG - PATH_SUFFIXES bin lib - NAMES sndfile_d libsndfile_d libsndfile-1_d - PATHS ${WIN_DIRECTORIES} -) -if (LIBSNDFILE_LIBRARY_DEBUG) - list(APPEND LIBSNDFILE_LIBRARY debug ${LIBSNDFILE_LIBRARY_DEBUG}) -else() -# if (UNIX) - list(APPEND LIBSNDFILE_LIBRARY debug ${LIBSNDFILE_LIBRARY_RELEASE}) -# endif() -endif() - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSNDFILE DEFAULT_MSG LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR) -MARK_AS_ADVANCED(LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR) diff --git a/contrib/cmake/FindLibJingle.cmake b/contrib/cmake/FindLibJingle.cmake deleted file mode 100644 index d8ed094..0000000 --- a/contrib/cmake/FindLibJingle.cmake +++ /dev/null @@ -1,150 +0,0 @@ -find_path(LIBJINGLE_INCLUDE_DIR - NAMES - talk/app/webrtc/peerconnectioninterface.h - HINTS - ${LIBJINGLE_ROOT_DIR} - ENV LIBJINGLE_ROOT_DIR - DOC - "libjingle include directory path" -) - -find_path(LIBJINGLE_THIRD_PARTY_INCLUDE_DIR - NAMES - webrtc/common_types.h - HINTS - ${LIBJINGLE_ROOT_DIR} - ENV LIBJINGLE_ROOT_DIR - PATH_SUFFIXES - third_party - DOC - "libjingle/third_party include directory path" -) - -find_path(LIBJINGLE_WEBRTC_INCLUDE_DIR - NAMES - common_types.h - HINTS - ${LIBJINGLE_ROOT_DIR} - ENV LIBJINGLE_ROOT_DIR - PATH_SUFFIXES - third_party/webrtc - webrtc - DOC - "libjingle/third_party/webrtc include directory path" -) - -set(REQUIRED_VARS LIBJINGLE_INCLUDE_DIR LIBJINGLE_THIRD_PARTY_INCLUDE_DIR LIBJINGLE_WEBRTC_INCLUDE_DIR) - -if(WIN32) - set(LIBJINGLE_SYSTEM_LIBS - wininet - dnsapi - version - msimg32 - ws2_32 - usp10 - psapi - dbghelp - winmm - shlwapi - kernel32 - gdi32 - winspool - comdlg32 - advapi32 - shell32 - ole32 - oleaut32 - user32 - uuid - odbc32 - odbccp32 - delayimp - Strmiids - dmoguids - wmcodecdspuuid - amstrmid - msdmo - ) - macro(set_libjingle_libs VARNAME CONFIGURATION) - set(${VARNAME} - ${LIBJINGLE_SYSTEM_LIBS} - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/jsoncpp.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/libjingle_peerconnection.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/libjingle.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/expat.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/crnss.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/nss_static.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/crnspr.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/sqlite3.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/icui18n.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/icuuc.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/libjingle_media.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/libyuv.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/libjpeg.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/video_capture_module.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/webrtc_utility.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/audio_coding_module.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/CNG.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/signal_processing.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/system_wrappers.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/G711.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/G722.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/iLBC.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/iSAC.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/iSACFix.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/PCM16B.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/NetEq.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/resampler.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/vad.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/webrtc_opus.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/opus.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/webrtc_video_coding.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/webrtc_i420.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/common_video.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/video_coding_utility.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/webrtc_vp8.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/libvpx.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/libvpx_asm_offsets.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/libvpx_asm_offsets_vp9.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/libvpx_intrinsics.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/directshow_baseclasses.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/video_render_module.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/video_engine_core.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/media_file.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/rtp_rtcp.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/remote_bitrate_estimator.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/paced_sender.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/udp_transport.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/bitrate_controller.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/video_processing.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/video_processing_sse2.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/voice_engine_core.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/audio_conference_mixer.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/audio_processing.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/audioproc_debug_proto.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/protobuf_lite.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/audio_processing_sse2.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/audio_device.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/libjingle_sound.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/libjingle_p2p.lib - ${LIBJINGLE_ROOT_DIR}/build/${CONFIGURATION}/lib/libsrtp.lib - ) - endmacro() - set_libjingle_libs(LIBJINGLE_LIBRARIES_RELEASE Release) - set_libjingle_libs(LIBJINGLE_LIBRARIES_DEBUG Debug) - set_libjingle_libs(LIBJINGLE_LIBRARIES ${CMAKE_BUILD_TYPE}) -endif() - -# handle the QUIETLY and REQUIRED arguments and set SOFIA_SIP_UA_FOUND to TRUE if -# all listed variables are TRUE -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBJINGLE - REQUIRED_VARS ${REQUIRED_VARS}) - -# Copy the results to the output variables. -if(LIBJINGLE_FOUND) - set(LIBJINGLE_INCLUDE_DIRS ${LIBJINGLE_INCLUDE_DIR} ${LIBJINGLE_THIRD_PARTY_INCLUDE_DIR} ${LIBJINGLE_WEBRTC_INCLUDE_DIR}) -endif() - -mark_as_advanced(${REQUIRED_VARS}) \ No newline at end of file diff --git a/contrib/cmake/FindLibPurple.cmake b/contrib/cmake/FindLibPurple.cmake deleted file mode 100644 index 1de16f5..0000000 --- a/contrib/cmake/FindLibPurple.cmake +++ /dev/null @@ -1,98 +0,0 @@ -include(CheckCXXSourceCompiles) -set(LIBPURPLE_LIBRARY_DIRS "") -if (NOT WIN32) - include(FindPkgConfig) - pkg_check_modules(LIBPURPLE purple) -endif () - -if (LIBPURPLE_FOUND) - FIND_LIBRARY(LIBPURPLE_LIBRARY - NAMES libpurple purple - PATHS ${LIBPURPLE_LIBRARY_DIRS} - ) - -else() - FIND_LIBRARY(LIBPURPLE_LIBRARY_RELEASE - NAMES purple libpurple libpurple-static - ) - if (LIBPURPLE_LIBRARY_RELEASE) - list(APPEND LIBPURPLE_LIBRARY optimized ${LIBPURPLE_LIBRARY_RELEASE}) - endif() - - FIND_LIBRARY(LIBPURPLE_LIBRARY_DEBUG - NAMES purple_d libpurple_d libpurple-static_d - ) - if (LIBPURPLE_LIBRARY_DEBUG) - list(APPEND LIBPURPLE_LIBRARY debug ${LIBPURPLE_LIBRARY_DEBUG}) - else() - if (UNIX) - list(APPEND LIBPURPLE_LIBRARY debug ${LIBPURPLE_LIBRARY_RELEASE}) - endif() - endif() -endif() - -# message("LIBPURPLE_LIBRARY: ${LIBPURPLE_LIBRARY}") -# message("LIBPURPLE_INCLUDE_DIR: ${LIBPURPLE_INCLUDE_DIR}") - -FIND_PATH(LIBPURPLE_INCLUDE_DIR purple.h - PATH_SUFFIXES include/libpurple src/libpurple - PATHS - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt - ${LIBPURPLE_INCLUDE_DIRS} -) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBPURPLE DEFAULT_MSG LIBPURPLE_LIBRARY LIBPURPLE_INCLUDE_DIR) - -if (LIBPURPLE_FOUND) - set(LIBPURPLE_VERSION_HPP_CONTENTS "") - - file(STRINGS "${LIBPURPLE_INCLUDE_DIR}/version.h" LIBPURPLE_VERSION_HPP_CONTENTS REGEX "#define PURPLE_(.*)_VERSION (.)") - - STRING(REGEX MATCH "PURPLE_MAJOR_VERSION \\\(([0-9]*)\\\)" _LIBPURPLE_VERSION_MAJOR ${LIBPURPLE_VERSION_HPP_CONTENTS}) - STRING(REGEX MATCH "[0-9]+" LIBPURPLE_VERSION_MAJOR ${_LIBPURPLE_VERSION_MAJOR}) - unset(_LIBPURPLE_VERSION_MAJOR) - - STRING(REGEX MATCH "PURPLE_MINOR_VERSION \\\(([0-9]*)\\\)" _LIBPURPLE_VERSION_MINOR ${LIBPURPLE_VERSION_HPP_CONTENTS}) - STRING(REGEX MATCH "[0-9]+" LIBPURPLE_VERSION_MINOR ${_LIBPURPLE_VERSION_MINOR}) - unset(_LIBPURPLE_VERSION_MINOR) - - STRING(REGEX MATCH "PURPLE_MICRO_VERSION \\\(([0-9]*)\\\)" _LIBPURPLE_VERSION_PATCH ${LIBPURPLE_VERSION_HPP_CONTENTS}) - STRING(REGEX MATCH "[0-9]+" LIBPURPLE_VERSION_PATCH ${_LIBPURPLE_VERSION_PATCH}) - unset(_LIBPURPLE_VERSION_PATCH) - - set(LIBPURPLE_VERSION "${LIBPURPLE_VERSION_MAJOR}.${LIBPURPLE_VERSION_MINOR}.${LIBPURPLE_VERSION_PATCH}") - unset(LIBPURPLE_VERSION_HPP_CONTENTS) -endif() - -# we need to check the API of libpurple, but need a couple more libraries - solved via version > 3 -# find_package(ICONV) -# find_package(GLIB2) -# find_package(GObject) -# if (LIBPURPLE_FOUND AND GLIB2_FOUND AND ICONV_FOUND AND GOBJECT_FOUND) -# set(CMAKE_REQUIRED_INCLUDES ${LIBPURPLE_INCLUDE_DIR} ${GLIB2_INCLUDE_DIRS} ${ICONV_INCLUDE_DIR} ${GOBJECT_INCLUDE_DIR}) -# set(CMAKE_REQUIRED_LIBRARIES ${LIBPURPLE_LIBRARY} ${GLIB2_LIBRARIES} ${ICONV_LIBRARIES} ${GOBJECT_LIBRARIES}) -# if (LIBPURPLE_FOUND) -# check_cxx_source_compiles(" -# extern \"C\" { -# #include -# } -# int main(){ -# /* -# * There was a refactoring to glib datastructures, -# * The PurpleRequestFeature occured at the same time. -# */ -# PurpleRequestFeature _features; -# } -# " LIBPURPLE_GLIB_DATASTRUCTS) -# endif() -# set(CMAKE_REQUIRED_INCLUDES) -# set(CMAKE_REQUIRED_LIBRARIES) -# endif() - -MARK_AS_ADVANCED(LIBPURPLE_LIBRARY LIBPURPLE_INCLUDE_DIR) diff --git a/contrib/cmake/FindLua.cmake b/contrib/cmake/FindLua.cmake deleted file mode 100644 index f8b68b2..0000000 --- a/contrib/cmake/FindLua.cmake +++ /dev/null @@ -1,171 +0,0 @@ -#.rst: -# FindLua -# ------- -# -# -# -# Locate Lua library This module defines -# -# :: -# -# LUA_FOUND - if false, do not try to link to Lua -# LUA_LIBRARIES - both lua and lualib -# LUA_INCLUDE_DIR - where to find lua.h -# LUA_VERSION_STRING - the version of Lua found -# LUA_VERSION_MAJOR - the major version of Lua -# LUA_VERSION_MINOR - the minor version of Lua -# LUA_VERSION_PATCH - the patch version of Lua -# -# -# -# Note that the expected include convention is -# -# :: -# -# #include "lua.h" -# -# and not -# -# :: -# -# #include -# -# This is because, the lua location is not standardized and may exist in -# locations other than lua/ - -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# Copyright 2013 Rolf Eike Beer -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -unset(_lua_include_subdirs) -unset(_lua_library_names) - -# this is a function only to have all the variables inside go away automatically -function(set_lua_version_vars) - set(LUA_VERSIONS5 5.3 5.2 5.1 5.0) - - if (Lua_FIND_VERSION_EXACT) - if (Lua_FIND_VERSION_COUNT GREATER 1) - set(lua_append_versions ${Lua_FIND_VERSION_MAJOR} ${Lua_FIND_VERSION_MINOR}) - endif () - elseif (Lua_FIND_VERSION) - # once there is a different major version supported this should become a loop - if (NOT Lua_FIND_VERSION_MAJOR GREATER 5) - if (Lua_FIND_VERSION_COUNT EQUAL 1) - set(lua_append_versions ${LUA_VERSIONS5}) - else () - foreach (subver IN LISTS LUA_VERSIONS5) - if (NOT subver VERSION_LESS ${Lua_FIND_VERSION}) - list(APPEND lua_append_versions ${subver}) - endif () - endforeach () - endif () - endif () - else () - # once there is a different major version supported this should become a loop - set(lua_append_versions ${LUA_VERSIONS5}) - endif () - - foreach (ver IN LISTS lua_append_versions) - string(REGEX MATCH "^([0-9]+)\\.([0-9]+)$" _ver "${ver}") - list(APPEND _lua_include_subdirs - include/lua${CMAKE_MATCH_1}${CMAKE_MATCH_2} - include/lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2} - include/lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2} - ) - list(APPEND _lua_library_names - lua${CMAKE_MATCH_1}${CMAKE_MATCH_2} - lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2} - lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2} - ) - endforeach () - - set(_lua_include_subdirs "${_lua_include_subdirs}" PARENT_SCOPE) - set(_lua_library_names "${_lua_library_names}" PARENT_SCOPE) -endfunction(set_lua_version_vars) - -set_lua_version_vars() - -find_path(LUA_INCLUDE_DIR lua.h - HINTS - ENV LUA_DIR - PATH_SUFFIXES ${_lua_include_subdirs} include/lua include - PATHS - ~/Library/Frameworks - /Library/Frameworks - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt -) -unset(_lua_include_subdirs) - -find_library(LUA_LIBRARY - NAMES ${_lua_library_names} lua - HINTS - ENV LUA_DIR - PATH_SUFFIXES lib - PATHS - ~/Library/Frameworks - /Library/Frameworks - /sw - /opt/local - /opt/csw - /opt -) -unset(_lua_library_names) - -if (LUA_LIBRARY) - # include the math library for Unix - if (UNIX AND NOT APPLE AND NOT BEOS) - find_library(LUA_MATH_LIBRARY m) - set(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}") - # For Windows and Mac, don't need to explicitly include the math library - else () - set(LUA_LIBRARIES "${LUA_LIBRARY}") - endif () -endif () - -if (LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h") - # At least 5.[012] have different ways to express the version - # so all of them need to be tested. Lua 5.2 defines LUA_VERSION - # and LUA_RELEASE as joined by the C preprocessor, so avoid those. - file(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_strings - REGEX "^#define[ \t]+LUA_(RELEASE[ \t]+\"Lua [0-9]|VERSION([ \t]+\"Lua [0-9]|_[MR])).*") - - string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MAJOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MAJOR ";${lua_version_strings};") - if (LUA_VERSION_MAJOR MATCHES "^[0-9]+$") - string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MINOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MINOR ";${lua_version_strings};") - string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_RELEASE[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_PATCH ";${lua_version_strings};") - set(LUA_VERSION_STRING "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}") - else () - string(REGEX REPLACE ".*;#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};") - if (NOT LUA_VERSION_STRING MATCHES "^[0-9.]+$") - string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};") - endif () - string(REGEX REPLACE "^([0-9]+)\\.[0-9.]*$" "\\1" LUA_VERSION_MAJOR "${LUA_VERSION_STRING}") - string(REGEX REPLACE "^[0-9]+\\.([0-9]+)[0-9.]*$" "\\1" LUA_VERSION_MINOR "${LUA_VERSION_STRING}") - string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]).*" "\\1" LUA_VERSION_PATCH "${LUA_VERSION_STRING}") - endif () - - unset(lua_version_strings) -endif() - -include(FindPackageHandleStandardArgs) -# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if -# all listed variables are TRUE -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua - REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR - VERSION_VAR LUA_VERSION_STRING) - -mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY) diff --git a/contrib/cmake/FindMILES.cmake b/contrib/cmake/FindMILES.cmake deleted file mode 100644 index 9a166cd..0000000 --- a/contrib/cmake/FindMILES.cmake +++ /dev/null @@ -1,182 +0,0 @@ -# - Find Miles -# This module checks if Miles is installed and determines where the -# include files and libraries are. This code sets the following -# variables: -# -# MILES_INCLUDE_DIR = The full path to the miles headers -# MILES_LIBRARIES = All miles libraries for release and debug builds -# -# Example: -# find_package(MILES REQUIRED audio network) -# include_directories(${MILES_INCLUDE_DIR}) -# - -# is this a 64Bit host? -# if (NOT APPLE) -# if(CMAKE_SIZEOF_VOID_P EQUAL 8) -# set(_MILES_64BIT_LIB_POSTFIX 64) -# else() -# set(_MILES_64BIT_LIB_POSTFIX "") -# endif() -# endif() - -################################################### -# where to search for miles headers and libraries -################################################### -set(_MILES_LIB_SEARCHPATH - "/usr/local" - "/opt/local" - "C:/Program Files (x86)/miles" - "C:/Program Files/miles" -) - -################################################### -# get a list of components the user requested -################################################### -set(_MILES_COMPONENTS_TO_PROCESS) -foreach(_MILES_COMPONENT ${MILES_FIND_COMPONENTS}) - STRING(TOUPPER ${_MILES_COMPONENT} _MILES_COMPONENT_UC) - list(APPEND _MILES_COMPONENTS_TO_PROCESS ${_MILES_COMPONENT_UC}) -endforeach() -list(APPEND _MILES_COMPONENTS_TO_PROCESS "CORE") -list(REMOVE_DUPLICATES _MILES_COMPONENTS_TO_PROCESS) - -################################################### -# find the miles header files -################################################### -FIND_PATH(MILES_INCLUDE_DIR miles/miles.h - PATH_SUFFIXES include - PATHS ${_MILES_LIB_SEARCHPATH} - ENV MILES_INCLUDE_DIR -) - -################################################### -# iterate components and try to find libraries -# in debug and release configuration. For release -# we prefer MinSizeRel, for debug we prefer -# RelWithDebInfo. -################################################### -SET(MILES_LIBRARIES) - -list(LENGTH MILES_FIND_COMPONENTS MILES_NR_COMPONENTS) - -if (MILES_NR_COMPONENTS GREATER 0) - foreach (_MILES_COMPONENT ${_MILES_COMPONENTS_TO_PROCESS}) - SET(_CURR_COMPONENT "MILES_${_MILES_COMPONENT}_LIBRARY") - STRING(TOLOWER ${_MILES_COMPONENT}${_MILES_64BIT_LIB_POSTFIX} _MILES_COMPONENT_LC) - - # prefer MinSizeRel libraries - FIND_LIBRARY(${_CURR_COMPONENT} - PATH_SUFFIXES lib - NAMES miles_${_MILES_COMPONENT_LC}_s - PATHS ${_MILES_LIB_SEARCHPATH} - ENV MILES_LIB_DIR - ) - - if (${_CURR_COMPONENT}) - list(APPEND MILES_LIBRARIES optimized ${${_CURR_COMPONENT}}) - else() - # if no minsize libraries were found try normal release - FIND_LIBRARY(${_CURR_COMPONENT} - PATH_SUFFIXES lib - NAMES miles_${_MILES_COMPONENT_LC} - PATHS ${_MILES_LIB_SEARCHPATH} - ENV MILES_LIB_DIR - ) - if (${_CURR_COMPONENT}) - list(APPEND MILES_LIBRARIES optimized ${${_CURR_COMPONENT}}) - endif() - endif() - - # prefer RelWithDebInfo libraries - FIND_LIBRARY(${_CURR_COMPONENT}_DEBUG - PATH_SUFFIXES lib - NAMES miles_${_MILES_COMPONENT_LC}_rd - PATHS ${_MILES_LIB_SEARCHPATH} - ENV MILES_LIB_DIR - ) - if (${_CURR_COMPONENT}_DEBUG) - list(APPEND MILES_LIBRARIES debug ${${_CURR_COMPONENT}_DEBUG}) - else() - FIND_LIBRARY(${_CURR_COMPONENT}_DEBUG - PATH_SUFFIXES lib - NAMES miles_${_MILES_COMPONENT_LC}_d - PATHS ${_MILES_LIB_SEARCHPATH} - ENV MILES_LIB_DIR - ) - if (${_CURR_COMPONENT}_DEBUG) - list(APPEND MILES_LIBRARIES debug ${${_CURR_COMPONENT}_DEBUG}) - elseif(${_CURR_COMPONENT}) - list(APPEND MILES_LIBRARIES debug ${${_CURR_COMPONENT}}) - endif() - endif() - endforeach() -else() - FIND_LIBRARY(MILES_RELEASE - PATH_SUFFIXES lib - NAMES miles_s - PATHS ${_MILES_LIB_SEARCHPATH} - ENV MILES_LIB_DIR - ) - - if (MILES_RELEASE) - list(APPEND MILES_LIBRARIES optimized ${MILES_RELEASE}) - else() - # if no minsize libraries were found try normal release - FIND_LIBRARY(MILES_RELEASE - PATH_SUFFIXES lib - NAMES miles - PATHS ${_MILES_LIB_SEARCHPATH} - ENV MILES_LIB_DIR - ) - - if (MILES_RELEASE) - list(APPEND MILES_LIBRARIES optimized ${MILES_RELEASE}) - endif() - endif() - - # prefer RelWithDebInfo libraries - FIND_LIBRARY(MILES_DEBUG - PATH_SUFFIXES lib - NAMES miles_rd - PATHS ${_MILES_LIB_SEARCHPATH} - ENV MILES_LIB_DIR - ) - if (MILES_DEBUG) - list(APPEND MILES_LIBRARIES debug ${MILES_DEBUG}) - else() - FIND_LIBRARY(MILES_DEBUG - PATH_SUFFIXES lib - NAMES miles_d - PATHS ${_MILES_LIB_SEARCHPATH} - ENV MILES_LIB_DIR - ) - if (MILES_DEBUG) - list(APPEND MILES_LIBRARIES debug ${MILES_DEBUG}) - endif() - endif() -endif() - -if (MILES_INCLUDE_DIR AND MILES_LIBRARIES) - if (APPLE) - find_library(FRAMEWORK_FOUNDATION NAMES Foundation) - list(APPEND MILES_LIBRARIES "${FRAMEWORK_FOUNDATION}") - - find_library(FRAMEWORK_AVFOUNDATION NAMES AVFoundation) - list(APPEND MILES_LIBRARIES "${FRAMEWORK_AVFOUNDATION}") - - find_library(FRAMEWORK_COREMEDIA NAMES CoreMedia) - list(APPEND MILES_LIBRARIES "${FRAMEWORK_COREMEDIA}") - - find_library(FRAMEWORK_COREVIDEO NAMES CoreVideo) - list(APPEND MILES_LIBRARIES "${FRAMEWORK_COREVIDEO}") - endif() - - FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c - list(APPEND MILES_LIBRARIES "${ICONV_LIBRARIES}") - ) -endif() - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(MILES DEFAULT_MSG MILES_LIBRARIES MILES_INCLUDE_DIR) -MARK_AS_ADVANCED(MILES_INCLUDE_DIR MILES_LIBRARIES) diff --git a/contrib/cmake/FindOpenALKCAT.cmake b/contrib/cmake/FindOpenALKCAT.cmake deleted file mode 100644 index 982468d..0000000 --- a/contrib/cmake/FindOpenALKCAT.cmake +++ /dev/null @@ -1,31 +0,0 @@ -SET(WIN_DIRECTORIES "") -if(CMAKE_SIZEOF_VOID_P EQUAL 8) - list(APPEND WIN_DIRECTORIES "C:/Program Files/openal-soft-1.15.1-bin/lib/Win64") -else() - list(APPEND WIN_DIRECTORIES "C:/Program Files/openal-soft-1.15.1-bin/lib/Win32") -endif() - -find_path(OPENAL_INCLUDE_DIR al.h - HINTS - ENV OPENALDIR - PATH_SUFFIXES include/AL include/OpenAL include - PATHS - "C:/Program Files/openal-soft-1.15.1-bin" -) - -find_library(OPENAL_LIBRARY - NAMES OpenAL libOpenAL32.dll libOpenAL64.dll - HINTS - ENV OPENALDIR - PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64 - PATHS - ${WIN_DIRECTORIES} -) - - -# handle the QUIETLY and REQUIRED arguments and set OPENAL_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR) - -mark_as_advanced(OPENAL_LIBRARY OPENAL_INCLUDE_DIR) diff --git a/contrib/cmake/FindPHP5.cmake b/contrib/cmake/FindPHP5.cmake deleted file mode 100644 index fded5fd..0000000 --- a/contrib/cmake/FindPHP5.cmake +++ /dev/null @@ -1,58 +0,0 @@ -if (UNIX) - # if (APPLE) - # # mavericks broke it - will look into it eventually - # return() - # endif() - if (NOT PHP_CONFIG) - find_program(PHP_CONFIG - NAMES php-config - PATHS - /usr/bin - /usr/local/bin - /opt/local/bin - ) - endif() - if (PHP_CONFIG) - execute_process(COMMAND ${PHP_CONFIG} --includes - OUTPUT_VARIABLE PHP_INCLUDE_DIRS - ERROR_VARIABLE PHP_INCLUDE_errors - RESULT_VARIABLE PHP_INCLUDE_result) - string(REGEX REPLACE "-I" "" PHP_INCLUDE_DIRS ${PHP_INCLUDE_DIRS}) - string(REGEX REPLACE "[ \n\r]+" ";" PHP_INCLUDE_DIRS ${PHP_INCLUDE_DIRS}) - - execute_process(COMMAND ${PHP_CONFIG} --libs - OUTPUT_VARIABLE PHP_LIBRARIES - ERROR_VARIABLE PHP_LIBRARIES_errors - RESULT_VARIABLE PHP_LIBRARIES_result) - string(REGEX REPLACE "-l" "" PHP_LIBRARIES ${PHP_LIBRARIES}) - string(REGEX REPLACE "[ \n\r]+" ";" PHP_LIBRARIES ${PHP_LIBRARIES}) - list(REMOVE_DUPLICATES PHP_LIBRARIES) - - execute_process(COMMAND ${PHP_CONFIG} --ldflags - OUTPUT_VARIABLE PHP_LDFLAGS - ERROR_VARIABLE PHP_LDFLAGS_errors - RESULT_VARIABLE PHP_LDFLAGS_result) - - execute_process(COMMAND ${PHP_CONFIG} --configure-options - OUTPUT_VARIABLE PHP_CONFIGURE_OPTIONS - ERROR_VARIABLE PHP_CONFIGURE_OPTIONS_errors - RESULT_VARIABLE PHP_CONFIGURE_OPTIONS_result) - - set(PHP_ZTS_ENABLED OFF) - if (PHP_CONFIGURE_OPTIONS MATCHES ".*enable-maintainer-zts.*") - set(PHP_ZTS_ENABLED ON) - endif() - - set(PHP_DEBUG_ENABLED OFF) - if (PHP_CONFIGURE_OPTIONS MATCHES ".*enable-debug.*") - set(PHP_DEBUG_ENABLED ON) - endif() - - endif() -else() - message(STATUS "Finding PHP5 on Windows is not supported") -endif() - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(PHP5 DEFAULT_MSG PHP_CONFIG PHP_INCLUDE_DIRS PHP_LIBRARIES PHP_LDFLAGS) -MARK_AS_ADVANCED(PHP_LIBRARIES PHP_INCLUDE_DIRS PHP_LDFLAGS PHP_ZTS_ENABLED) diff --git a/contrib/cmake/FindSWI.cmake b/contrib/cmake/FindSWI.cmake deleted file mode 100644 index 51cfe82..0000000 --- a/contrib/cmake/FindSWI.cmake +++ /dev/null @@ -1,249 +0,0 @@ -set (SWI_SEARCH_PATHS) -list (APPEND SWI_SEARCH_PATHS - $ENV{SWI_HOME} - ${CMAKE_FIND_ROOT_PATH} - "/usr/lib/swi-prolog/" - "/opt/local/" - "/usr/local/" - "C:/Program Files (x86)/swipl" - "C:/Program Files/swipl" -) - - -if (NOT WIN32) - include(FindPkgConfig) - pkg_check_modules(SWI swipl) -endif (NOT WIN32) - -if (SWI_FOUND) - # message("SWI_LIBRARIES: ${SWI_LIBRARIES}") - # message("SWI_LIBRARY_DIRS: ${SWI_LIBRARY_DIRS}") - # message("SWI_LDFLAGS: ${SWI_LDFLAGS}") - # message("SWI_LDFLAGS_OTHER: ${SWI_LDFLAGS_OTHER}") - # message("SWI_INCLUDE_DIRS: ${SWI_INCLUDE_DIRS}") - # message("SWI_CFLAGS: ${SWI_CFLAGS}") - # message("SWI_CFLAGS_OTHER: ${SWI_CFLAGS_OTHER}") - # message("SWI_VERSION: ${SWI_VERSION}") - # - # message("SWI_LIBRARIES_STATIC: ${SWI_LIBRARIES_STATIC}") - # message("SWI_LIBRARY_DIRS_STATIC: ${SWI_LIBRARY_DIRS_STATIC}") - # message("SWI_LDFLAGS_STATIC: ${SWI_LDFLAGS_STATIC}") - # message("SWI_LDFLAGS_OTHER_STATIC: ${SWI_LDFLAGS_OTHER_STATIC}") - # message("SWI_INCLUDE_DIRS_STATIC: ${SWI_INCLUDE_DIRS_STATIC}") - # message("SWI_CFLAGS_STATIC: ${SWI_CFLAGS_STATIC}") - # message("SWI_CFLAGS_OTHER_STATIC: ${SWI_CFLAGS_OTHER_STATIC}") - # message(FATAL_ERROR "") - - if (SWI_INCLUDE_DIRS) - set(SWI_INCLUDE_DIR ${SWI_INCLUDE_DIRS}) - else() - FIND_PATH(SWI_INCLUDE_DIR SWI-Prolog.h - PATH_SUFFIXES - include - lib/swipl-${SWI_VERSION}/include - PATHS ${SWI_SEARCH_PATHS} - ) - endif() - - FIND_LIBRARY(SWI_LIBRARY - NAMES libswipl swipl - PATHS ${SWI_LIBRARY_DIRS} - ) - - FIND_PROGRAM(SWI_BINARY swipl) - - FIND_PATH(SWI_CPP_INCLUDE_DIR SWI-cpp.h - PATHS - ${SWI_INCLUDE_DIRS} - ${PROJECT_SOURCE_DIR}/contrib/src/swi-pl - ) - -else() - set(64BIT_HOST OFF) - if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(64BIT_HOST ON) - endif() - - set(SWI_PLATFORM_ID) - if (UNIX) - if (APPLE AND 64BIT_HOST) - set(SWI_PLATFORM_ID "x86_64-${CMAKE_SYSTEM_NAME}${CMAKE_SYSTEM_VERSION}") - else() - set(SWI_PLATFORM_ID "${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}") - endif() - else() - set(SWI_PLATFORM_ID "${CMAKE_SYSTEM_PROCESSOR}-windows") - endif() - - if (SWI_PLATFORM_ID) - string(TOLOWER ${SWI_PLATFORM_ID} SWI_PLATFORM_ID) - endif() - - #message("SWI_PLATFORM_ID: ${SWI_PLATFORM_ID}") - - list (APPEND SWI_SEARCH_PATHS - $ENV{SWI_HOME} - ${CMAKE_FIND_ROOT_PATH} - "/usr/lib/swi-prolog/" - "/opt/local/" - "/usr/local/" - "C:/Program Files (x86)/swipl" - "C:/Program Files/swipl" - ) - - #message("SWI_SEARCH_PATHS: ${SWI_SEARCH_PATHS}") - - set (SWI_VERSION) - set (LOOP_DONE 0) - foreach(SWI_SEARCH_PATH ${SWI_SEARCH_PATHS}) - if(NOT LOOP_DONE) - file(GLOB SWI_VERSIONS ${SWI_SEARCH_PATH}/lib/swipl*) - if (SWI_VERSIONS) - # message("SWI_VERSIONS: ${SWI_VERSIONS}") - set(LOOP_DONE 1) - list(SORT SWI_VERSIONS) - list(REVERSE SWI_VERSIONS) - list(GET SWI_VERSIONS 0 SWI_VERSION) - STRING(REGEX REPLACE ".*(([0-9]+).([0-9]+).([0-9]+))$" "\\1" SWI_VERSION "${SWI_VERSION}") - endif() - endif() - endforeach() - - #message("SWI_VERSION: ${SWI_VERSION}") - - set(SWI_PLATFORMS) - foreach (SWI_SEARCH_PATH ${SWI_SEARCH_PATHS}) - file(GLOB CURR_SWI_PLATFORMS ${SWI_SEARCH_PATH}/lib/swipl-${SWI_VERSION}/lib/*) - foreach(CURR_SWI_PLATFORM ${CURR_SWI_PLATFORMS}) - if(IS_DIRECTORY ${CURR_SWI_PLATFORM}) - list(APPEND SWI_PLATFORMS ${CURR_SWI_PLATFORM}) - endif() - endforeach() - endforeach() - #message(FATAL_ERROR "SWI_PLATFORMS: ${SWI_PLATFORMS}") - - #message("SWI_VERSION: ${SWI_VERSION}") - - # -- find prolog headers - FIND_PATH(SWI_INCLUDE_DIR SWI-Prolog.h - PATH_SUFFIXES - include - lib/swipl-${SWI_VERSION}/include - PATHS ${SWI_SEARCH_PATHS} - ) - - #message("SWI_INCLUDE_DIR: ${SWI_INCLUDE_DIR}") - - FIND_PATH(SWI_CPP_INCLUDE_DIR SWI-cpp.h - PATH_SUFFIXES - packages/cpp - lib/swipl-${SWI_VERSION}/include - PATHS - ${SWI_SEARCH_PATHS} - ${PROJECT_SOURCE_DIR}/contrib/src/swi-pl - ) - - #message("SWI_CPP_INCLUDE_DIR: ${SWI_CPP_INCLUDE_DIR}") - - FIND_PROGRAM(SWI_BINARY swipl - PATH_SUFFIXES - src - lib/swipl-${SWI_VERSION}/bin/${SWI_PLATFORM_ID} - PATHS ${SWI_SEARCH_PATHS} - ) - - FIND_LIBRARY(SWI_LIBRARY_RELEASE - NAMES libswipl swipl - PATH_SUFFIXES - lib/${SWI_PLATFORM_ID} # still in source directory - lib/swipl-${SWI_VERSION}/lib/${SWI_PLATFORM_ID} # after make install - - PATHS ${SWI_SEARCH_PATHS} ${SWI_PLATFORMS} - ) - - FIND_LIBRARY(SWI_LIBRARY_DEBUG - NAMES libswipl_d swipl_d - PATH_SUFFIXES - lib/${SWI_PLATFORM_ID} # still in source directory - lib/swipl-${SWI_VERSION}/lib/${SWI_PLATFORM_ID} # after make install - PATHS ${SWI_SEARCH_PATHS} ${SWI_PLATFORMS} - ) - - if (NOT SWI_LIBRARY_DEBUG) # no explicit debug build, just reuse release - if (UNIX) - set(SWI_LIBRARY_DEBUG ${SWI_LIBRARY_RELEASE}) - endif() - endif() - - if (SWI_LIBRARY_RELEASE) - list(APPEND SWI_LIBRARY optimized ${SWI_LIBRARY_RELEASE}) - if (SWI_LIBRARY_DEBUG) - list(APPEND SWI_LIBRARY debug ${SWI_LIBRARY_DEBUG}) - elseif(UNIX) - list(APPEND SWI_LIBRARY debug ${SWI_LIBRARY_RELEASE}) - else() - message(FATAL_ERROR "Cannot find debug version of SWI") - endif() - endif() -endif() - -#message(FATAL_ERROR "SWI_BINARY: ${SWI_BINARY} / SWI_LIBRARY_RELEASE: ${SWI_LIBRARY_RELEASE} / SWI_LIBRARY_DEBUG: ${SWI_LIBRARY_DEBUG} / SWI_INCLUDE_DIR: ${SWI_INCLUDE_DIR} / SWI_CPP_INCLUDE_DIR: ${SWI_CPP_INCLUDE_DIR}") - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(SWI DEFAULT_MSG SWI_LIBRARY SWI_BINARY SWI_INCLUDE_DIR SWI_CPP_INCLUDE_DIR) - - -if (SWI_FOUND) - include(CheckCXXSourceCompiles) - - set(CMAKE_REQUIRED_INCLUDES ${SWI_INCLUDE_DIR} ${SWI_CPP_INCLUDE_DIR}) - - set(CMAKE_REQUIRED_LIBRARIES ${SWI_LIBRARY}) - - # check for new reinterpret_cast(f) for foreign functions with in SWI 7.x and above - check_cxx_source_compiles(" - #include - int main(){ - } - " SWI_REINTERPRET_FOREIGN) - - check_cxx_source_compiles(" - #include - int main(){ - int a = 0; - switch(a) { - case PL_NIL: - break; - } - } - " SWI_HAS_PL_NIL) - - check_cxx_source_compiles(" - #include - int main(){ - int a = 0; - switch(a) { - case PL_DICT: - break; - } - } - " SWI_HAS_PL_DICT) - - check_cxx_source_compiles(" - #include - int main(){ - int a = 0; - switch(a) { - case PL_LIST_PAIR: - break; - } - } - " SWI_HAS_PL_LIST_PAIR) - - set(CMAKE_REQUIRED_INCLUDES) - set(CMAKE_REQUIRED_LIBRARIES) -endif() - -MARK_AS_ADVANCED(SWI_LIBRARY SWI_INCLUDE_DIR) - - diff --git a/contrib/cmake/FindSpiderMonkey.cmake b/contrib/cmake/FindSpiderMonkey.cmake deleted file mode 100644 index 0c61be7..0000000 --- a/contrib/cmake/FindSpiderMonkey.cmake +++ /dev/null @@ -1,25 +0,0 @@ -FIND_PATH(SPIDERMONKEY_INCLUDE_DIR jsapi.h - PATH_SUFFIXES include/js - PATHS - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt -) - -FIND_LIBRARY(SPIDERMONKEY_LIBRARY NAMES js - PATH_SUFFIXES lib - PATHS - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt -) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(SPIDERMONKEY DEFAULT_MSG SPIDERMONKEY_LIBRARY SPIDERMONKEY_INCLUDE_DIR) -MARK_AS_ADVANCED(JSC_LIBRARY JSC_INCLUDE_DIR) diff --git a/contrib/cmake/FindSqlite3.cmake b/contrib/cmake/FindSqlite3.cmake deleted file mode 100644 index 36c98b0..0000000 --- a/contrib/cmake/FindSqlite3.cmake +++ /dev/null @@ -1,21 +0,0 @@ -FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h) - -FIND_LIBRARY(SQLITE3_LIBRARY_RELEASE NAMES sqlite3) - -if (SQLITE3_LIBRARY_RELEASE) - list(APPEND SQLITE3_LIBRARY optimized ${SQLITE3_LIBRARY_RELEASE}) -endif() - -FIND_LIBRARY(SQLITE3_LIBRARY_DEBUG NAMES sqlite3_d) - -if (SQLITE3_LIBRARY_DEBUG) - list(APPEND SQLITE3_LIBRARY debug ${SQLITE3_LIBRARY_DEBUG}) -else() - if(NOT WIN32) - list(APPEND SQLITE3_LIBRARY debug ${SQLITE3_LIBRARY_RELEASE}) - endif() -endif() - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sqlite3 DEFAULT_MSG SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR) -MARK_AS_ADVANCED(SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR) diff --git a/contrib/cmake/FindUMUNDO.cmake b/contrib/cmake/FindUMUNDO.cmake deleted file mode 100644 index 437f861..0000000 --- a/contrib/cmake/FindUMUNDO.cmake +++ /dev/null @@ -1,132 +0,0 @@ -# - Find UMUNDO -# This module checks if UMundo is installed and determines where the -# include files and libraries are. This code sets the following -# variables: -# -# UMUNDO_INCLUDE_DIR = The full path to the umundo headers -# UMUNDO_LIBRARIES = All umundo libraries for release and debug builds -# -# Example: -# find_package(UMUNDO REQUIRED util serial rpc) -# include_directories(${UMUNDO_INCLUDE_DIR}) -# - -# is this a 64Bit host? -if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(64BIT_LIB_POSTFIX 64) -else() - set(64BIT_LIB_POSTFIX "") -endif() - -################################################### -# where to search for umundo headers and libraries -################################################### -set(_UMUNDO_LIB_SEARCHPATH - "/usr/local" - "/opt/local" - "C:/Program Files (x86)/uMundo" - "C:/Program Files/uMundo" -) - -################################################### -# find the umundo header files -################################################### -FIND_PATH(UMUNDO_INCLUDE_DIR umundo/core.h - PATH_SUFFIXES include - PATHS ${_UMUNDO_LIB_SEARCHPATH} - ENV UMUNDO_INCLUDE_DIR -) - -################################################### -# get a list of components the user requested -################################################### -set(_UMUNDO_COMPONENTS_TO_PROCESS) -foreach(_UMUNDO_COMPONENT ${UMUNDO_FIND_COMPONENTS}) - STRING(TOUPPER ${_UMUNDO_COMPONENT} _UMUNDO_COMPONENT_UC) - list(APPEND _UMUNDO_COMPONENTS_TO_PROCESS ${_UMUNDO_COMPONENT_UC}) -endforeach() - -# is the convenience library requested? -list(FIND _UMUNDO_COMPONENTS_TO_PROCESS "CONVENIENCE" FOUND_ITEM) -if (FOUND_ITEM GREATER -1) - set(_UMUNDO_COMPONENTS_TO_PROCESS "CONVENIENCE") -else() - list(APPEND _UMUNDO_COMPONENTS_TO_PROCESS "CORE") -endif() - -list(REMOVE_DUPLICATES _UMUNDO_COMPONENTS_TO_PROCESS) - -################################################### -# iterate components and try to find libraries -# in debug and release configuration. For release -# we prefer MinSizeRel, for debug we prefer -# RelWithDebInfo. -################################################### -SET(UMUNDO_LIBRARIES) -foreach (_UMUNDO_COMPONENT ${_UMUNDO_COMPONENTS_TO_PROCESS}) - SET(_CURR_COMPONENT "UMUNDO_${_UMUNDO_COMPONENT}_LIBRARY") - - if (_UMUNDO_COMPONENT STREQUAL "CONVENIENCE") - STRING(TOLOWER "${64BIT_LIB_POSTFIX}" _UMUNDO_COMPONENT_LC) - else() - STRING(TOLOWER ${_UMUNDO_COMPONENT}${64BIT_LIB_POSTFIX} _UMUNDO_COMPONENT_LC) - endif() - - # prefer MinSizeRel libraries - FIND_LIBRARY(${_CURR_COMPONENT} - PATH_SUFFIXES lib - NAMES umundo${_UMUNDO_COMPONENT_LC}_s - PATHS ${_UMUNDO_LIB_SEARCHPATH} - ENV UMUNDO_LIB_DIR - ) - if (${_CURR_COMPONENT}) - list(APPEND UMUNDO_LIBRARIES optimized ${${_CURR_COMPONENT}}) - else() - # if no minsize libraries were found try normal release - FIND_LIBRARY(${_CURR_COMPONENT} - PATH_SUFFIXES lib - NAMES umundo${_UMUNDO_COMPONENT_LC} - PATHS ${_UMUNDO_LIB_SEARCHPATH} - ENV UMUNDO_LIB_DIR - ) - if (${_CURR_COMPONENT}) - list(APPEND UMUNDO_LIBRARIES optimized ${${_CURR_COMPONENT}}) - endif() - endif() - - # prefer RelWithDebInfo libraries - FIND_LIBRARY(${_CURR_COMPONENT}_DEBUG - PATH_SUFFIXES lib - NAMES umundo${_UMUNDO_COMPONENT_LC}_rd - PATHS ${_UMUNDO_LIB_SEARCHPATH} - ENV UMUNDO_LIB_DIR - ) - if (${_CURR_COMPONENT}_DEBUG) - list(APPEND UMUNDO_LIBRARIES debug ${${_CURR_COMPONENT}_DEBUG}) - else() - FIND_LIBRARY(${_CURR_COMPONENT}_DEBUG - PATH_SUFFIXES lib - NAMES umundo${_UMUNDO_COMPONENT_LC}_d - PATHS ${_UMUNDO_LIB_SEARCHPATH} - ENV UMUNDO_LIB_DIR - ) - if (${_CURR_COMPONENT}_DEBUG) - list(APPEND UMUNDO_LIBRARIES debug ${${_CURR_COMPONENT}_DEBUG}) - else() - if (NOT WIN32 AND ${_CURR_COMPONENT}) - list(APPEND UMUNDO_LIBRARIES debug ${${_CURR_COMPONENT}}) - else() - message(STATUS "Could not find umundo component ${_UMUNDO_COMPONENT}") - endif() - endif() - endif() - - if (NOT ${_CURR_COMPONENT} AND NOT ${_CURR_COMPONENT}_DEBUG) - message(STATUS "Could not find umundo component ${_UMUNDO_COMPONENT}") - endif() -endforeach() - - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(UMUNDO DEFAULT_MSG UMUNDO_LIBRARIES UMUNDO_INCLUDE_DIR) -MARK_AS_ADVANCED(UMUNDO_INCLUDE_DIR UMUNDO_LIBRARIES) diff --git a/contrib/cmake/FunctionExists.cmake b/contrib/cmake/FunctionExists.cmake deleted file mode 100644 index d2877a1..0000000 --- a/contrib/cmake/FunctionExists.cmake +++ /dev/null @@ -1,2 +0,0 @@ -include(CheckFunctionExists) -CHECK_FUNCTION_EXISTS(strndup HAS_STRNDUP) diff --git a/contrib/cmake/HeaderExists.cmake b/contrib/cmake/HeaderExists.cmake deleted file mode 100644 index 810ac65..0000000 --- a/contrib/cmake/HeaderExists.cmake +++ /dev/null @@ -1,8 +0,0 @@ -include(CheckIncludeFile) -CHECK_INCLUDE_FILE(unistd.h HAS_UNISTD_H) -CHECK_INCLUDE_FILE(string.h HAS_STRING_H) -CHECK_INCLUDE_FILE(signal.h HAS_SIGNAL_H) -CHECK_INCLUDE_FILE(execinfo.h HAS_EXECINFO_H) -CHECK_INCLUDE_FILE(dlfcn.h HAS_DLFCN_H) -CHECK_INCLUDE_FILE(stdint.h HAS_STDINT_H) - diff --git a/contrib/cmake/TryCompile.cmake b/contrib/cmake/TryCompile.cmake deleted file mode 100644 index 3647dd1..0000000 --- a/contrib/cmake/TryCompile.cmake +++ /dev/null @@ -1,23 +0,0 @@ -include(CheckCXXSourceCompiles) -# set(CMAKE_REQUIRED_INCLUDES ${SWI_INCLUDE_DIR} ${SWI_CPP_INCLUDE_DIR}) -# set(CMAKE_REQUIRED_LIBRARIES ${SWI_LIBRARY}) - -check_cxx_source_compiles(" - #include - #include - #include - extern \"C\" - void __cxa_throw (void *thrown_exception, void *pvtinfo, void (*dest)(void *)) { - } - int main() {} -" CXA_THROW_HAS_VOID_PVTINFO_TYPE) - -check_cxx_source_compiles(" - #include - #include - #include - extern \"C\" - void __cxa_throw (void *thrown_exception, std::type_info *pvtinfo, void (*dest)(void *)) { - } - int main() {} -" CXA_THROW_HAS_TYPEINFO_PVTINFO_TYPE) diff --git a/contrib/cmake/USCXMLMacros.cmake b/contrib/cmake/USCXMLMacros.cmake index aa48bcf..cfc8585 100644 --- a/contrib/cmake/USCXMLMacros.cmake +++ b/contrib/cmake/USCXMLMacros.cmake @@ -78,3 +78,34 @@ MACRO(THREE_PART_VERSION_TO_VARS version major minor patch) MESSAGE(FATAL_ERROR "Problem parsing version string, I can't parse it properly.") ENDIF(${version} MATCHES ${THREE_PART_VERSION_REGEX}) ENDMACRO(THREE_PART_VERSION_TO_VARS) + + +MACRO(CHECK_COMPILER_FEATURE feature output) + if (";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";${feature};") + set(${output} ON) + else() + set(${output} OFF) + endif() + +ENDMACRO(CHECK_COMPILER_FEATURE) + + +# +# http://stackoverflow.com/questions/15706318/check-if-cmake-module-exists +# +# This makes use of the fact that if a package configuration file isn't found +# for VAR, then a cache variable VAR_DIR is set to VAR_DIR-NOTFOUND. So if the +# package configuration file is found, either this variable isn't defined, or +# it's set to a valid path (regardless of whether the find_package finds the +# requested package). + +function(CheckHasModule Module) + find_package(${Module} QUIET) + if(NOT DEFINED ${Module}_DIR) + set(HAS_MODULE_${Module} TRUE PARENT_SCOPE) + elseif(${Module}_DIR) + set(HAS_MODULE_${Module} TRUE PARENT_SCOPE) + else() + set(HAS_MODULE_${Module} FALSE PARENT_SCOPE) + endif() +endfunction() diff --git a/contrib/cmake/cotire.cmake b/contrib/cmake/cotire.cmake deleted file mode 100644 index 16cb90f..0000000 --- a/contrib/cmake/cotire.cmake +++ /dev/null @@ -1,3239 +0,0 @@ -# - cotire (compile time reducer) -# -# See the cotire manual for usage hints. -# -#============================================================================= -# Copyright 2012-2013 Sascha Kratky -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -#============================================================================= - -if(__COTIRE_INCLUDED) - return() -endif() -set(__COTIRE_INCLUDED TRUE) - -# call cmake_minimum_required, but prevent modification of the CMake policy stack in include mode -# cmake_minimum_required also sets the policy version as a side effect, which we have to avoid -if (NOT CMAKE_SCRIPT_MODE_FILE) - cmake_policy(PUSH) -endif() -# we need the CMake variables CMAKE_SCRIPT_MODE_FILE and CMAKE_ARGV available since 2.8.5 -# we need APPEND_STRING option for set_property available since 2.8.6 -cmake_minimum_required(VERSION 2.8.6) -if (NOT CMAKE_SCRIPT_MODE_FILE) - cmake_policy(POP) -endif() - -set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}") -set (COTIRE_CMAKE_MODULE_VERSION "1.4.3") - -include(CMakeParseArguments) -include(ProcessorCount) - -function (cotire_determine_compiler_version _language _versionPrefix) - if (NOT ${_versionPrefix}_VERSION) - # use CMake's predefined compiler version variable (available since CMake 2.8.8) - if (DEFINED CMAKE_${_language}_COMPILER_VERSION) - set (${_versionPrefix}_VERSION "${CMAKE_${_language}_COMPILER_VERSION}") - elseif (WIN32) - # cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared - unset (ENV{VS_UNICODE_OUTPUT}) - string (STRIP "${CMAKE_${_language}_COMPILER_ARG1}" _compilerArg1) - execute_process (COMMAND ${CMAKE_${_language}_COMPILER} ${_compilerArg1} - ERROR_VARIABLE _versionLine OUTPUT_QUIET TIMEOUT 10) - string (REGEX REPLACE ".*Version *([0-9]+(\\.[0-9]+)*).*" "\\1" ${_versionPrefix}_VERSION "${_versionLine}") - else() - # assume GCC like command line interface - string (STRIP "${CMAKE_${_language}_COMPILER_ARG1}" _compilerArg1) - execute_process (COMMAND ${CMAKE_${_language}_COMPILER} ${_compilerArg1} "-dumpversion" - OUTPUT_VARIABLE ${_versionPrefix}_VERSION - RESULT_VARIABLE _result - OUTPUT_STRIP_TRAILING_WHITESPACE TIMEOUT 10) - if (_result) - set (${_versionPrefix}_VERSION "") - endif() - endif() - if (${_versionPrefix}_VERSION) - set (${_versionPrefix}_VERSION "${${_versionPrefix}_VERSION}" CACHE INTERNAL "${_language} compiler version") - endif() - set (${_versionPrefix}_VERSION "${${_versionPrefix}_VERSION}" PARENT_SCOPE) - if (COTIRE_DEBUG) - message (STATUS "${CMAKE_${_language}_COMPILER} version ${${_versionPrefix}_VERSION}") - endif() - endif() -endfunction() - -function (cotire_get_source_file_extension _sourceFile _extVar) - # get_filename_component returns extension from first occurrence of . in file name - # this function computes the extension from last occurrence of . in file name - string (FIND "${_sourceFile}" "." _index REVERSE) - if (_index GREATER -1) - math (EXPR _index "${_index} + 1") - string (SUBSTRING "${_sourceFile}" ${_index} -1 _sourceExt) - else() - set (_sourceExt "") - endif() - set (${_extVar} "${_sourceExt}" PARENT_SCOPE) -endfunction() - -macro (cotire_check_is_path_relative_to _path _isRelativeVar) - set (${_isRelativeVar} FALSE) - if (IS_ABSOLUTE "${_path}") - foreach (_dir ${ARGN}) - file (RELATIVE_PATH _relPath "${_dir}" "${_path}") - if (NOT _relPath OR (NOT IS_ABSOLUTE "${_relPath}" AND NOT "${_relPath}" MATCHES "^\\.\\.")) - set (${_isRelativeVar} TRUE) - break() - endif() - endforeach() - endif() -endmacro() - -function (cotire_filter_language_source_files _language _sourceFilesVar _excludedSourceFilesVar _cotiredSourceFilesVar) - set (_sourceFiles "") - set (_excludedSourceFiles "") - set (_cotiredSourceFiles "") - if (CMAKE_${_language}_SOURCE_FILE_EXTENSIONS) - set (_languageExtensions "${CMAKE_${_language}_SOURCE_FILE_EXTENSIONS}") - else() - set (_languageExtensions "") - endif() - if (CMAKE_${_language}_IGNORE_EXTENSIONS) - set (_ignoreExtensions "${CMAKE_${_language}_IGNORE_EXTENSIONS}") - else() - set (_ignoreExtensions "") - endif() - if (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS) - set (_excludeExtensions "${COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS}") - else() - set (_excludeExtensions "") - endif() - if (COTIRE_DEBUG) - message (STATUS "${_language} source file extensions: ${_languageExtensions}") - message (STATUS "${_language} ignore extensions: ${_ignoreExtensions}") - message (STATUS "${_language} exclude extensions: ${_excludeExtensions}") - endif() - foreach (_sourceFile ${ARGN}) - get_source_file_property(_sourceIsHeaderOnly "${_sourceFile}" HEADER_FILE_ONLY) - get_source_file_property(_sourceIsExternal "${_sourceFile}" EXTERNAL_OBJECT) - get_source_file_property(_sourceIsSymbolic "${_sourceFile}" SYMBOLIC) - get_source_file_property(_sourceLanguage "${_sourceFile}" LANGUAGE) - set (_sourceIsFiltered FALSE) - if (NOT _sourceIsHeaderOnly AND NOT _sourceIsExternal AND NOT _sourceIsSymbolic) - cotire_get_source_file_extension("${_sourceFile}" _sourceExt) - if (_sourceExt) - list (FIND _ignoreExtensions "${_sourceExt}" _ignoreIndex) - if (_ignoreIndex LESS 0) - list (FIND _excludeExtensions "${_sourceExt}" _excludeIndex) - if (_excludeIndex GREATER -1) - list (APPEND _excludedSourceFiles "${_sourceFile}") - else() - list (FIND _languageExtensions "${_sourceExt}" _sourceIndex) - if (_sourceIndex GREATER -1) - set (_sourceIsFiltered TRUE) - elseif ("${_sourceLanguage}" STREQUAL "${_language}") - # add to excluded sources, if file is not ignored and has correct language without having the correct extension - list (APPEND _excludedSourceFiles "${_sourceFile}") - endif() - endif() - endif() - endif() - endif() - if (COTIRE_DEBUG) - message (STATUS "${_sourceFile} filtered=${_sourceIsFiltered} language=${_sourceLanguage} header=${_sourceIsHeaderOnly}") - endif() - if (_sourceIsFiltered) - get_source_file_property(_sourceIsExcluded "${_sourceFile}" COTIRE_EXCLUDED) - get_source_file_property(_sourceIsCotired "${_sourceFile}" COTIRE_TARGET) - get_source_file_property(_sourceCompileFlags "${_sourceFile}" COMPILE_FLAGS) - if (COTIRE_DEBUG) - message (STATUS "${_sourceFile} excluded=${_sourceIsExcluded} cotired=${_sourceIsCotired} compileFlags=${_sourceCompileFlags}") - endif() - if (_sourceIsCotired) - list (APPEND _cotiredSourceFiles "${_sourceFile}") - elseif (_sourceIsExcluded OR _sourceCompileFlags) - list (APPEND _excludedSourceFiles "${_sourceFile}") - else() - list (APPEND _sourceFiles "${_sourceFile}") - endif() - endif() - endforeach() - if (COTIRE_DEBUG) - message (STATUS "All: ${ARGN}") - message (STATUS "${_language}: ${_sourceFiles}") - message (STATUS "Excluded: ${_excludedSourceFiles}") - message (STATUS "Cotired: ${_cotiredSourceFiles}") - endif() - set (${_sourceFilesVar} ${_sourceFiles} PARENT_SCOPE) - set (${_excludedSourceFilesVar} ${_excludedSourceFiles} PARENT_SCOPE) - set (${_cotiredSourceFilesVar} ${_cotiredSourceFiles} PARENT_SCOPE) -endfunction() - -function (cotire_get_objects_with_property_on _filteredObjectsVar _property _type) - set (_filteredObjects "") - foreach (_object ${ARGN}) - get_property(_isSet ${_type} "${_object}" PROPERTY ${_property} SET) - if (_isSet) - get_property(_propertyValue ${_type} "${_object}" PROPERTY ${_property}) - if (_propertyValue) - list (APPEND _filteredObjects "${_object}") - endif() - endif() - endforeach() - set (${_filteredObjectsVar} ${_filteredObjects} PARENT_SCOPE) -endfunction() - -function (cotire_get_objects_with_property_off _filteredObjectsVar _property _type) - set (_filteredObjects "") - foreach (_object ${ARGN}) - get_property(_isSet ${_type} "${_object}" PROPERTY ${_property} SET) - if (_isSet) - get_property(_propertyValue ${_type} "${_object}" PROPERTY ${_property}) - if (NOT _propertyValue) - list (APPEND _filteredObjects "${_object}") - endif() - endif() - endforeach() - set (${_filteredObjectsVar} ${_filteredObjects} PARENT_SCOPE) -endfunction() - -function (cotire_get_source_file_property_values _valuesVar _property) - set (_values "") - foreach (_sourceFile ${ARGN}) - get_source_file_property(_propertyValue "${_sourceFile}" ${_property}) - if (_propertyValue) - list (APPEND _values "${_propertyValue}") - endif() - endforeach() - set (${_valuesVar} ${_values} PARENT_SCOPE) -endfunction() - -function (cotrie_resolve_config_properites _configurations _propertiesVar) - set (_properties "") - foreach (_property ${ARGN}) - if ("${_property}" MATCHES "") - foreach (_config ${_configurations}) - string (TOUPPER "${_config}" _upperConfig) - string (REPLACE "" "${_upperConfig}" _configProperty "${_property}") - list (APPEND _properties ${_configProperty}) - endforeach() - else() - list (APPEND _properties ${_property}) - endif() - endforeach() - set (${_propertiesVar} ${_properties} PARENT_SCOPE) -endfunction() - -function (cotrie_copy_set_properites _configurations _type _source _target) - cotrie_resolve_config_properites("${_configurations}" _properties ${ARGN}) - foreach (_property ${_properties}) - get_property(_isSet ${_type} ${_source} PROPERTY ${_property} SET) - if (_isSet) - get_property(_propertyValue ${_type} ${_source} PROPERTY ${_property}) - set_property(${_type} ${_target} PROPERTY ${_property} "${_propertyValue}") - endif() - endforeach() -endfunction() - -function (cotire_filter_compile_flags _language _flagFilter _matchedOptionsVar _unmatchedOptionsVar) - if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - set (_flagPrefix "[/-]") - else() - set (_flagPrefix "--?") - endif() - set (_optionFlag "") - set (_matchedOptions "") - set (_unmatchedOptions "") - foreach (_compileFlag ${ARGN}) - if (_compileFlag) - if (_optionFlag AND NOT "${_compileFlag}" MATCHES "^${_flagPrefix}") - # option with separate argument - list (APPEND _matchedOptions "${_compileFlag}") - set (_optionFlag "") - elseif ("${_compileFlag}" MATCHES "^(${_flagPrefix})(${_flagFilter})$") - # remember option - set (_optionFlag "${CMAKE_MATCH_2}") - elseif ("${_compileFlag}" MATCHES "^(${_flagPrefix})(${_flagFilter})(.+)$") - # option with joined argument - list (APPEND _matchedOptions "${CMAKE_MATCH_3}") - set (_optionFlag "") - else() - # flush remembered option - if (_optionFlag) - list (APPEND _matchedOptions "${_optionFlag}") - set (_optionFlag "") - endif() - # add to unfiltered options - list (APPEND _unmatchedOptions "${_compileFlag}") - endif() - endif() - endforeach() - if (_optionFlag) - list (APPEND _matchedOptions "${_optionFlag}") - endif() - if (COTIRE_DEBUG) - message (STATUS "Filter ${_flagFilter}") - if (_matchedOptions) - message (STATUS "Matched ${_matchedOptions}") - endif() - if (_unmatchedOptions) - message (STATUS "Unmatched ${_unmatchedOptions}") - endif() - endif() - set (${_matchedOptionsVar} ${_matchedOptions} PARENT_SCOPE) - set (${_unmatchedOptionsVar} ${_unmatchedOptions} PARENT_SCOPE) -endfunction() - -function (cotire_get_target_compile_flags _config _language _directory _target _flagsVar) - string (TOUPPER "${_config}" _upperConfig) - # collect options from CMake language variables - set (_compileFlags "") - if (CMAKE_${_language}_FLAGS) - set (_compileFlags "${_compileFlags} ${CMAKE_${_language}_FLAGS}") - endif() - if (CMAKE_${_language}_FLAGS_${_upperConfig}) - set (_compileFlags "${_compileFlags} ${CMAKE_${_language}_FLAGS_${_upperConfig}}") - endif() - if (_target) - # add option from CMake target type variable - get_target_property(_targetType ${_target} TYPE) - if (POLICY CMP0018) - # handle POSITION_INDEPENDENT_CODE property introduced with CMake 2.8.9 if policy CMP0018 is turned on - cmake_policy(GET CMP0018 _PIC_Policy) - else() - # default to old behavior - set (_PIC_Policy "OLD") - endif() - if (COTIRE_DEBUG) - message(STATUS "CMP0018=${_PIC_Policy}") - endif() - if (_PIC_Policy STREQUAL "NEW") - # NEW behavior: honor the POSITION_INDEPENDENT_CODE target property - get_target_property(_targetPIC ${_target} POSITION_INDEPENDENT_CODE) - if (_targetPIC) - if (_targetType STREQUAL "EXECUTABLE" AND CMAKE_${_language}_COMPILE_OPTIONS_PIE) - set (_compileFlags "${_compileFlags} ${CMAKE_${_language}_COMPILE_OPTIONS_PIE}") - elseif (CMAKE_${_language}_COMPILE_OPTIONS_PIC) - set (_compileFlags "${_compileFlags} ${CMAKE_${_language}_COMPILE_OPTIONS_PIC}") - endif() - endif() - else() - # OLD behavior or policy not set: use the value of CMAKE_SHARED_LIBRARY__FLAGS - if (_targetType STREQUAL "MODULE_LIBRARY") - # flags variable for module library uses different name SHARED_MODULE - # (e.g., CMAKE_SHARED_MODULE_C_FLAGS) - set (_targetType SHARED_MODULE) - endif() - if (CMAKE_${_targetType}_${_language}_FLAGS) - set (_compileFlags "${_compileFlags} ${CMAKE_${_targetType}_${_language}_FLAGS}") - endif() - endif() - endif() - if (_directory) - # add_definitions may have been used to add flags to the compiler command - get_directory_property(_dirDefinitions DIRECTORY "${_directory}" DEFINITIONS) - if (_dirDefinitions) - set (_compileFlags "${_compileFlags} ${_dirDefinitions}") - endif() - endif() - if (_target) - # add target compile options - get_target_property(_targetflags ${_target} COMPILE_FLAGS) - if (_targetflags) - set (_compileFlags "${_compileFlags} ${_targetflags}") - endif() - endif() - if (UNIX) - separate_arguments(_compileFlags UNIX_COMMAND "${_compileFlags}") - elseif(WIN32) - separate_arguments(_compileFlags WINDOWS_COMMAND "${_compileFlags}") - else() - separate_arguments(_compileFlags) - endif() - # platform specific flags - if (APPLE) - get_target_property(_architectures ${_target} OSX_ARCHITECTURES_${_upperConfig}) - if (NOT _architectures) - get_target_property(_architectures ${_target} OSX_ARCHITECTURES) - endif() - foreach (_arch ${_architectures}) - list (APPEND _compileFlags "-arch" "${_arch}") - endforeach() - if (CMAKE_OSX_SYSROOT AND CMAKE_OSX_SYSROOT_DEFAULT AND CMAKE_${_language}_HAS_ISYSROOT) - if (NOT "${CMAKE_OSX_SYSROOT}" STREQUAL "${CMAKE_OSX_SYSROOT_DEFAULT}") - list (APPEND _compileFlags "-isysroot" "${CMAKE_OSX_SYSROOT}") - endif() - endif() - if (CMAKE_OSX_DEPLOYMENT_TARGET AND CMAKE_${_language}_OSX_DEPLOYMENT_TARGET_FLAG) - list (APPEND _compileFlags "${CMAKE_${_language}_OSX_DEPLOYMENT_TARGET_FLAG}${CMAKE_OSX_DEPLOYMENT_TARGET}") - endif() - endif() - if (COTIRE_DEBUG AND _compileFlags) - message (STATUS "Target ${_target} compile flags ${_compileFlags}") - endif() - set (${_flagsVar} ${_compileFlags} PARENT_SCOPE) -endfunction() - -function (cotire_get_target_include_directories _config _language _targetSourceDir _targetBinaryDir _target _includeDirsVar) - set (_includeDirs "") - # default include dirs - if (CMAKE_INCLUDE_CURRENT_DIR) - list (APPEND _includeDirs "${_targetBinaryDir}") - list (APPEND _includeDirs "${_targetSourceDir}") - endif() - # parse additional include directories from target compile flags - set (_targetFlags "") - cotire_get_target_compile_flags("${_config}" "${_language}" "${_targetSourceDir}" "${_target}" _targetFlags) - cotire_filter_compile_flags("${_language}" "I" _dirs _ignore ${_targetFlags}) - if (_dirs) - list (APPEND _includeDirs ${_dirs}) - endif() - # target include directories - get_directory_property(_dirs DIRECTORY "${_targetSourceDir}" INCLUDE_DIRECTORIES) - if (_target) - get_target_property(_targetDirs ${_target} INCLUDE_DIRECTORIES) - if (_targetDirs) - list (APPEND _dirs ${_targetDirs}) - list (REMOVE_DUPLICATES _dirs) - endif() - endif() - list (LENGTH _includeDirs _projectInsertIndex) - foreach (_dir ${_dirs}) - if (CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE) - cotire_check_is_path_relative_to("${_dir}" _isRelative "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}") - if (_isRelative) - list (LENGTH _includeDirs _len) - if (_len EQUAL _projectInsertIndex) - list (APPEND _includeDirs "${_dir}") - else() - list (INSERT _includeDirs _projectInsertIndex "${_dir}") - endif() - math (EXPR _projectInsertIndex "${_projectInsertIndex} + 1") - else() - list (APPEND _includeDirs "${_dir}") - endif() - else() - list (APPEND _includeDirs "${_dir}") - endif() - endforeach() - list (REMOVE_DUPLICATES _includeDirs) - if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES) - list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES}) - endif() - if (COTIRE_DEBUG AND _includeDirs) - message (STATUS "Target ${_target} include dirs ${_includeDirs}") - endif() - set (${_includeDirsVar} ${_includeDirs} PARENT_SCOPE) -endfunction() - -macro (cotire_make_C_identifier _identifierVar _str) - # mimic CMake SystemTools::MakeCindentifier behavior - if ("${_str}" MATCHES "^[0-9].+$") - set (_str "_${str}") - endif() - string (REGEX REPLACE "[^a-zA-Z0-9]" "_" ${_identifierVar} "${_str}") -endmacro() - -function (cotire_get_target_export_symbol _target _exportSymbolVar) - set (_exportSymbol "") - get_target_property(_targetType ${_target} TYPE) - get_target_property(_enableExports ${_target} ENABLE_EXPORTS) - if (_targetType MATCHES "(SHARED|MODULE)_LIBRARY" OR - (_targetType STREQUAL "EXECUTABLE" AND _enableExports)) - get_target_property(_exportSymbol ${_target} DEFINE_SYMBOL) - if (NOT _exportSymbol) - set (_exportSymbol "${_target}_EXPORTS") - endif() - cotire_make_C_identifier(_exportSymbol "${_exportSymbol}") - endif() - set (${_exportSymbolVar} ${_exportSymbol} PARENT_SCOPE) -endfunction() - -function (cotire_get_target_compile_definitions _config _language _directory _target _definitionsVar) - string (TOUPPER "${_config}" _upperConfig) - set (_configDefinitions "") - # CMAKE_INTDIR for multi-configuration build systems - if (NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".") - list (APPEND _configDefinitions "CMAKE_INTDIR=\"${_config}\"") - endif() - # target export define symbol - cotire_get_target_export_symbol("${_target}" _defineSymbol) - if (_defineSymbol) - list (APPEND _configDefinitions "${_defineSymbol}") - endif() - # directory compile definitions - get_directory_property(_definitions DIRECTORY "${_directory}" COMPILE_DEFINITIONS) - if (_definitions) - list (APPEND _configDefinitions ${_definitions}) - endif() - get_directory_property(_definitions DIRECTORY "${_directory}" COMPILE_DEFINITIONS_${_upperConfig}) - if (_definitions) - list (APPEND _configDefinitions ${_definitions}) - endif() - # target compile definitions - get_target_property(_definitions ${_target} COMPILE_DEFINITIONS) - if (_definitions) - list (APPEND _configDefinitions ${_definitions}) - endif() - get_target_property(_definitions ${_target} COMPILE_DEFINITIONS_${_upperConfig}) - if (_definitions) - list (APPEND _configDefinitions ${_definitions}) - endif() - # parse additional compile definitions from target compile flags - # and don't look at directory compile definitions, which we already handled - set (_targetFlags "") - cotire_get_target_compile_flags("${_config}" "${_language}" "" "${_target}" _targetFlags) - cotire_filter_compile_flags("${_language}" "D" _definitions _ignore ${_targetFlags}) - if (_definitions) - list (APPEND _configDefinitions ${_definitions}) - endif() - list (REMOVE_DUPLICATES _configDefinitions) - if (COTIRE_DEBUG AND _configDefinitions) - message (STATUS "Target ${_target} compile definitions ${_configDefinitions}") - endif() - set (${_definitionsVar} ${_configDefinitions} PARENT_SCOPE) -endfunction() - -function (cotire_get_target_compiler_flags _config _language _directory _target _compilerFlagsVar) - # parse target compile flags omitting compile definitions and include directives - set (_targetFlags "") - cotire_get_target_compile_flags("${_config}" "${_language}" "${_directory}" "${_target}" _targetFlags) - set (_compilerFlags "") - cotire_filter_compile_flags("${_language}" "[ID]" _ignore _compilerFlags ${_targetFlags}) - if (COTIRE_DEBUG AND _compilerFlags) - message (STATUS "Target ${_target} compiler flags ${_compilerFlags}") - endif() - set (${_compilerFlagsVar} ${_compilerFlags} PARENT_SCOPE) -endfunction() - -function (cotire_add_sys_root_paths _pathsVar) - if (APPLE) - if (CMAKE_OSX_SYSROOT AND CMAKE_${_language}_HAS_ISYSROOT) - foreach (_path IN LISTS ${_pathsVar}) - if (IS_ABSOLUTE "${_path}") - get_filename_component(_path "${CMAKE_OSX_SYSROOT}/${_path}" ABSOLUTE) - if (EXISTS "${_path}") - list (APPEND ${_pathsVar} "${_path}") - endif() - endif() - endforeach() - endif() - endif() - set (${_pathsVar} ${${_pathsVar}} PARENT_SCOPE) - if (COTIRE_DEBUG) - message (STATUS "${_pathsVar}=${${_pathsVar}}") - endif() -endfunction() - -function (cotire_get_source_extra_properties _sourceFile _pattern _resultVar) - set (_extraProperties ${ARGN}) - set (_result "") - if (_extraProperties) - list (FIND _extraProperties "${_sourceFile}" _index) - if (_index GREATER -1) - math (EXPR _index "${_index} + 1") - list (LENGTH _extraProperties _len) - math (EXPR _len "${_len} - 1") - foreach (_index RANGE ${_index} ${_len}) - list (GET _extraProperties ${_index} _value) - if ("${_value}" MATCHES "${_pattern}") - list (APPEND _result "${_value}") - else() - break() - endif() - endforeach() - endif() - endif() - set (${_resultVar} ${_result} PARENT_SCOPE) -endfunction() - -function (cotire_get_source_compile_definitions _config _language _sourceFile _definitionsVar) - set (_compileDefinitions "") - if (NOT CMAKE_SCRIPT_MODE_FILE) - string (TOUPPER "${_config}" _upperConfig) - get_source_file_property(_definitions "${_sourceFile}" COMPILE_DEFINITIONS) - if (_definitions) - list (APPEND _compileDefinitions ${_definitions}) - endif() - get_source_file_property(_definitions "${_sourceFile}" COMPILE_DEFINITIONS_${_upperConfig}) - if (_definitions) - list (APPEND _compileDefinitions ${_definitions}) - endif() - endif() - cotire_get_source_extra_properties("${_sourceFile}" "^[a-zA-Z0-9_]+(=.*)?$" _definitions ${ARGN}) - if (_definitions) - list (APPEND _compileDefinitions ${_definitions}) - endif() - if (COTIRE_DEBUG AND _compileDefinitions) - message (STATUS "Source ${_sourceFile} compile definitions ${_compileDefinitions}") - endif() - set (${_definitionsVar} ${_compileDefinitions} PARENT_SCOPE) -endfunction() - -function (cotire_get_source_files_compile_definitions _config _language _definitionsVar) - set (_configDefinitions "") - foreach (_sourceFile ${ARGN}) - cotire_get_source_compile_definitions("${_config}" "${_language}" "${_sourceFile}" _sourceDefinitions) - if (_sourceDefinitions) - list (APPEND _configDefinitions "${_sourceFile}" ${_sourceDefinitions} "-") - endif() - endforeach() - set (${_definitionsVar} ${_configDefinitions} PARENT_SCOPE) -endfunction() - -function (cotire_get_source_undefs _sourceFile _property _sourceUndefsVar) - set (_sourceUndefs "") - if (NOT CMAKE_SCRIPT_MODE_FILE) - get_source_file_property(_undefs "${_sourceFile}" ${_property}) - if (_undefs) - list (APPEND _sourceUndefs ${_undefs}) - endif() - endif() - cotire_get_source_extra_properties("${_sourceFile}" "^[a-zA-Z0-9_]+$" _undefs ${ARGN}) - if (_undefs) - list (APPEND _sourceUndefs ${_undefs}) - endif() - if (COTIRE_DEBUG AND _sourceUndefs) - message (STATUS "Source ${_sourceFile} ${_property} undefs ${_sourceUndefs}") - endif() - set (${_sourceUndefsVar} ${_sourceUndefs} PARENT_SCOPE) -endfunction() - -function (cotire_get_source_files_undefs _property _sourceUndefsVar) - set (_sourceUndefs "") - foreach (_sourceFile ${ARGN}) - cotire_get_source_undefs("${_sourceFile}" ${_property} _undefs) - if (_undefs) - list (APPEND _sourceUndefs "${_sourceFile}" ${_undefs} "-") - endif() - endforeach() - set (${_sourceUndefsVar} ${_sourceUndefs} PARENT_SCOPE) -endfunction() - -macro (cotire_set_cmd_to_prologue _cmdVar) - set (${_cmdVar} "${CMAKE_COMMAND}") - if (COTIRE_DEBUG) - list (APPEND ${_cmdVar} "--warn-uninitialized") - endif() - list (APPEND ${_cmdVar} "-DCOTIRE_BUILD_TYPE:STRING=$") - if (COTIRE_VERBOSE) - list (APPEND ${_cmdVar} "-DCOTIRE_VERBOSE:BOOL=ON") - elseif("${CMAKE_GENERATOR}" MATCHES "Makefiles") - list (APPEND ${_cmdVar} "-DCOTIRE_VERBOSE:BOOL=$(VERBOSE)") - endif() -endmacro() - -function (cotire_init_compile_cmd _cmdVar _language _compilerExe _compilerArg1) - if (NOT _compilerExe) - set (_compilerExe "${CMAKE_${_language}_COMPILER}") - endif() - if (NOT _compilerArg1) - set (_compilerArg1 ${CMAKE_${_language}_COMPILER_ARG1}) - endif() - string (STRIP "${_compilerArg1}" _compilerArg1) - set (${_cmdVar} "${_compilerExe}" ${_compilerArg1} PARENT_SCOPE) -endfunction() - -macro (cotire_add_definitions_to_cmd _cmdVar _language) - foreach (_definition ${ARGN}) - if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - list (APPEND ${_cmdVar} "/D${_definition}") - else() - list (APPEND ${_cmdVar} "-D${_definition}") - endif() - endforeach() -endmacro() - -macro (cotire_add_includes_to_cmd _cmdVar _language) - foreach (_include ${ARGN}) - if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - file (TO_NATIVE_PATH "${_include}" _include) - list (APPEND ${_cmdVar} "/I${_include}") - else() - list (APPEND ${_cmdVar} "-I${_include}") - endif() - endforeach() -endmacro() - -macro (cotire_add_compile_flags_to_cmd _cmdVar) - foreach (_flag ${ARGN}) - list (APPEND ${_cmdVar} "${_flag}") - endforeach() -endmacro() - -function (cotire_check_file_up_to_date _fileIsUpToDateVar _file) - set (${_fileIsUpToDateVar} FALSE PARENT_SCOPE) - set (_triggerFile "") - foreach (_dependencyFile ${ARGN}) - if (EXISTS "${_dependencyFile}" AND "${_dependencyFile}" IS_NEWER_THAN "${_file}") - set (_triggerFile "${_dependencyFile}") - break() - endif() - endforeach() - get_filename_component(_fileName "${_file}" NAME) - if (EXISTS "${_file}") - if (_triggerFile) - if (COTIRE_VERBOSE) - message (STATUS "${_fileName} update triggered by ${_triggerFile} change.") - endif() - else() - if (COTIRE_VERBOSE) - message (STATUS "${_fileName} is up-to-date.") - endif() - set (${_fileIsUpToDateVar} TRUE PARENT_SCOPE) - endif() - else() - if (COTIRE_VERBOSE) - message (STATUS "${_fileName} does not exist yet.") - endif() - endif() -endfunction() - -macro (cotire_find_closest_relative_path _headerFile _includeDirs _relPathVar) - set (${_relPathVar} "") - foreach (_includeDir ${_includeDirs}) - if (IS_DIRECTORY "${_includeDir}") - file (RELATIVE_PATH _relPath "${_includeDir}" "${_headerFile}") - if (NOT IS_ABSOLUTE "${_relPath}" AND NOT "${_relPath}" MATCHES "^\\.\\.") - string (LENGTH "${${_relPathVar}}" _closestLen) - string (LENGTH "${_relPath}" _relLen) - if (_closestLen EQUAL 0 OR _relLen LESS _closestLen) - set (${_relPathVar} "${_relPath}") - endif() - endif() - elseif ("${_includeDir}" STREQUAL "${_headerFile}") - # if path matches exactly, return short non-empty string - set (${_relPathVar} "1") - break() - endif() - endforeach() -endmacro() - -macro (cotire_check_header_file_location _headerFile _insideIncudeDirs _outsideIncudeDirs _headerIsInside) - # check header path against ignored and honored include directories - cotire_find_closest_relative_path("${_headerFile}" "${_insideIncudeDirs}" _insideRelPath) - if (_insideRelPath) - # header is inside, but could be become outside if there is a shorter outside match - cotire_find_closest_relative_path("${_headerFile}" "${_outsideIncudeDirs}" _outsideRelPath) - if (_outsideRelPath) - string (LENGTH "${_insideRelPath}" _insideRelPathLen) - string (LENGTH "${_outsideRelPath}" _outsideRelPathLen) - if (_outsideRelPathLen LESS _insideRelPathLen) - set (${_headerIsInside} FALSE) - else() - set (${_headerIsInside} TRUE) - endif() - else() - set (${_headerIsInside} TRUE) - endif() - else() - # header is outside - set (${_headerIsInside} FALSE) - endif() -endmacro() - -macro (cotire_check_ignore_header_file_path _headerFile _headerIsIgnoredVar) - if (NOT EXISTS "${_headerFile}") - set (${_headerIsIgnoredVar} TRUE) - elseif (IS_DIRECTORY "${_headerFile}") - set (${_headerIsIgnoredVar} TRUE) - elseif ("${_headerFile}" MATCHES "\\.\\.|[_-]fixed" AND "${_headerFile}" MATCHES "\\.h$") - # heuristic: ignore C headers with embedded parent directory references or "-fixed" or "_fixed" in path - # these often stem from using GCC #include_next tricks, which may break the precompiled header compilation - # with the error message "error: no include path in which to search for header.h" - set (${_headerIsIgnoredVar} TRUE) - else() - set (${_headerIsIgnoredVar} FALSE) - endif() -endmacro() - -macro (cotire_check_ignore_header_file_ext _headerFile _ignoreExtensionsVar _headerIsIgnoredVar) - # check header file extension - cotire_get_source_file_extension("${_headerFile}" _headerFileExt) - set (${_headerIsIgnoredVar} FALSE) - if (_headerFileExt) - list (FIND ${_ignoreExtensionsVar} "${_headerFileExt}" _index) - if (_index GREATER -1) - set (${_headerIsIgnoredVar} TRUE) - endif() - endif() -endmacro() - -macro (cotire_parse_line _line _headerFileVar _headerDepthVar) - if (MSVC) - # cl.exe /showIncludes output looks different depending on the language pack used, e.g.: - # English: "Note: including file: C:\directory\file" - # German: "Hinweis: Einlesen der Datei: C:\directory\file" - # We use a very general regular expression, relying on the presence of the : characters - if ("${_line}" MATCHES ":( +)([^:]+:[^:]+)$") - # Visual Studio compiler output - string (LENGTH "${CMAKE_MATCH_1}" ${_headerDepthVar}) - get_filename_component(${_headerFileVar} "${CMAKE_MATCH_2}" ABSOLUTE) - else() - set (${_headerFileVar} "") - set (${_headerDepthVar} 0) - endif() - else() - if ("${_line}" MATCHES "^(\\.+) (.*)$") - # GCC like output - string (LENGTH "${CMAKE_MATCH_1}" ${_headerDepthVar}) - if (IS_ABSOLUTE "${CMAKE_MATCH_2}") - set (${_headerFileVar} "${CMAKE_MATCH_2}") - else() - get_filename_component(${_headerFileVar} "${CMAKE_MATCH_2}" REALPATH) - endif() - else() - set (${_headerFileVar} "") - set (${_headerDepthVar} 0) - endif() - endif() -endmacro() - -function (cotire_parse_includes _language _scanOutput _ignoredIncudeDirs _honoredIncudeDirs _ignoredExtensions _selectedIncludesVar _unparsedLinesVar) - if (WIN32) - # prevent CMake macro invocation errors due to backslash characters in Windows paths - string (REPLACE "\\" "/" _scanOutput "${_scanOutput}") - endif() - # canonize slashes - string (REPLACE "//" "/" _scanOutput "${_scanOutput}") - # prevent semicolon from being interpreted as a line separator - string (REPLACE ";" "\\;" _scanOutput "${_scanOutput}") - # then separate lines - string (REGEX REPLACE "\n" ";" _scanOutput "${_scanOutput}") - list (LENGTH _scanOutput _len) - # remove duplicate lines to speed up parsing - list (REMOVE_DUPLICATES _scanOutput) - list (LENGTH _scanOutput _uniqueLen) - if (COTIRE_VERBOSE) - message (STATUS "Scanning ${_uniqueLen} unique lines of ${_len} for includes") - if (_ignoredExtensions) - message (STATUS "Ignored extensions: ${_ignoredExtensions}") - endif() - if (_ignoredIncudeDirs) - message (STATUS "Ignored paths: ${_ignoredIncudeDirs}") - endif() - if (_honoredIncudeDirs) - message (STATUS "Included paths: ${_honoredIncudeDirs}") - endif() - endif() - set (_sourceFiles ${ARGN}) - set (_selectedIncludes "") - set (_unparsedLines "") - # stack keeps track of inside/outside project status of processed header files - set (_headerIsInsideStack "") - foreach (_line IN LISTS _scanOutput) - if (_line) - cotire_parse_line("${_line}" _headerFile _headerDepth) - if (_headerFile) - cotire_check_header_file_location("${_headerFile}" "${_ignoredIncudeDirs}" "${_honoredIncudeDirs}" _headerIsInside) - if (COTIRE_DEBUG) - message (STATUS "${_headerDepth}: ${_headerFile} ${_headerIsInside}") - endif() - # update stack - list (LENGTH _headerIsInsideStack _stackLen) - if (_headerDepth GREATER _stackLen) - math (EXPR _stackLen "${_stackLen} + 1") - foreach (_index RANGE ${_stackLen} ${_headerDepth}) - list (APPEND _headerIsInsideStack ${_headerIsInside}) - endforeach() - else() - foreach (_index RANGE ${_headerDepth} ${_stackLen}) - list (REMOVE_AT _headerIsInsideStack -1) - endforeach() - list (APPEND _headerIsInsideStack ${_headerIsInside}) - endif() - if (COTIRE_DEBUG) - message (STATUS "${_headerIsInsideStack}") - endif() - # header is a candidate if it is outside project - if (NOT _headerIsInside) - # get parent header file's inside/outside status - if (_headerDepth GREATER 1) - math (EXPR _index "${_headerDepth} - 2") - list (GET _headerIsInsideStack ${_index} _parentHeaderIsInside) - else() - set (_parentHeaderIsInside TRUE) - endif() - # select header file if parent header file is inside project - # (e.g., a project header file that includes a standard header file) - if (_parentHeaderIsInside) - cotire_check_ignore_header_file_path("${_headerFile}" _headerIsIgnored) - if (NOT _headerIsIgnored) - cotire_check_ignore_header_file_ext("${_headerFile}" _ignoredExtensions _headerIsIgnored) - if (NOT _headerIsIgnored) - list (APPEND _selectedIncludes "${_headerFile}") - else() - # fix header's inside status on stack, it is ignored by extension now - list (REMOVE_AT _headerIsInsideStack -1) - list (APPEND _headerIsInsideStack TRUE) - endif() - endif() - if (COTIRE_DEBUG) - message (STATUS "${_headerFile} ${_ignoredExtensions} ${_headerIsIgnored}") - endif() - endif() - endif() - else() - if (MSVC) - # for cl.exe do not keep unparsed lines which solely consist of a source file name - string (FIND "${_sourceFiles}" "${_line}" _index) - if (_index LESS 0) - list (APPEND _unparsedLines "${_line}") - endif() - else() - list (APPEND _unparsedLines "${_line}") - endif() - endif() - endif() - endforeach() - list (REMOVE_DUPLICATES _selectedIncludes) - set (${_selectedIncludesVar} ${_selectedIncludes} PARENT_SCOPE) - set (${_unparsedLinesVar} ${_unparsedLines} PARENT_SCOPE) -endfunction() - -function (cotire_scan_includes _includesVar) - set(_options "") - set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_VERSION LANGUAGE UNPARSED_LINES) - set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS) - cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - set (_sourceFiles ${_option_UNPARSED_ARGUMENTS}) - if (NOT _option_LANGUAGE) - set (_option_LANGUAGE "CXX") - endif() - if (NOT _option_COMPILER_ID) - set (_option_COMPILER_ID "${CMAKE_${_option_LANGUAGE}_ID}") - endif() - set (_cmd "${_option_COMPILER_EXECUTABLE}" ${_option_COMPILER_ARG1}) - cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}") - cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS}) - cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS}) - cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_INCLUDE_DIRECTORIES}) - cotire_add_makedep_flags("${_option_LANGUAGE}" "${_option_COMPILER_ID}" "${_option_COMPILER_VERSION}" _cmd) - # only consider existing source files for scanning - set (_existingSourceFiles "") - foreach (_sourceFile ${_sourceFiles}) - if (EXISTS "${_sourceFile}") - list (APPEND _existingSourceFiles "${_sourceFile}") - endif() - endforeach() - if (NOT _existingSourceFiles) - set (${_includesVar} "" PARENT_SCOPE) - return() - endif() - list (APPEND _cmd ${_existingSourceFiles}) - if (COTIRE_VERBOSE) - message (STATUS "execute_process: ${_cmd}") - endif() - if (_option_COMPILER_ID MATCHES "MSVC") - if (COTIRE_DEBUG) - message (STATUS "clearing VS_UNICODE_OUTPUT") - endif() - # cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared - unset (ENV{VS_UNICODE_OUTPUT}) - endif() - execute_process(COMMAND ${_cmd} WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - RESULT_VARIABLE _result OUTPUT_QUIET ERROR_VARIABLE _output) - if (_result) - message (STATUS "Result ${_result} scanning includes of ${_existingSourceFiles}.") - endif() - cotire_parse_includes( - "${_option_LANGUAGE}" "${_output}" - "${_option_IGNORE_PATH}" "${_option_INCLUDE_PATH}" - "${_option_IGNORE_EXTENSIONS}" - _includes _unparsedLines - ${_sourceFiles}) - set (${_includesVar} ${_includes} PARENT_SCOPE) - if (_option_UNPARSED_LINES) - set (${_option_UNPARSED_LINES} ${_unparsedLines} PARENT_SCOPE) - endif() -endfunction() - -macro (cotire_append_undefs _contentsVar) - set (_undefs ${ARGN}) - if (_undefs) - list (REMOVE_DUPLICATES _undefs) - foreach (_definition ${_undefs}) - list (APPEND ${_contentsVar} "#undef ${_definition}") - endforeach() - endif() -endmacro() - -macro (cotire_comment_str _language _commentText _commentVar) - if ("${_language}" STREQUAL "CMAKE") - set (${_commentVar} "# ${_commentText}") - else() - set (${_commentVar} "/* ${_commentText} */") - endif() -endmacro() - -function (cotire_write_file _language _file _contents _force) - get_filename_component(_moduleName "${COTIRE_CMAKE_MODULE_FILE}" NAME) - cotire_comment_str("${_language}" "${_moduleName} ${COTIRE_CMAKE_MODULE_VERSION} generated file" _header1) - cotire_comment_str("${_language}" "${_file}" _header2) - set (_contents "${_header1}\n${_header2}\n${_contents}") - if (COTIRE_DEBUG) - message (STATUS "${_contents}") - endif() - if (_force OR NOT EXISTS "${_file}") - file (WRITE "${_file}" "${_contents}") - else() - file (READ "${_file}" _oldContents) - if (NOT "${_oldContents}" STREQUAL "${_contents}") - file (WRITE "${_file}" "${_contents}") - else() - if (COTIRE_DEBUG) - message (STATUS "${_file} unchanged") - endif() - endif() - endif() -endfunction() - -function (cotire_generate_unity_source _unityFile) - set(_options "") - set(_oneValueArgs LANGUAGE) - set(_multiValueArgs - DEPENDS SOURCES_COMPILE_DEFINITIONS - PRE_UNDEFS SOURCES_PRE_UNDEFS POST_UNDEFS SOURCES_POST_UNDEFS PROLOGUE EPILOGUE) - cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - if (_option_DEPENDS) - cotire_check_file_up_to_date(_unityFileIsUpToDate "${_unityFile}" ${_option_DEPENDS}) - if (_unityFileIsUpToDate) - return() - endif() - endif() - set (_sourceFiles ${_option_UNPARSED_ARGUMENTS}) - if (NOT _option_PRE_UNDEFS) - set (_option_PRE_UNDEFS "") - endif() - if (NOT _option_SOURCES_PRE_UNDEFS) - set (_option_SOURCES_PRE_UNDEFS "") - endif() - if (NOT _option_POST_UNDEFS) - set (_option_POST_UNDEFS "") - endif() - if (NOT _option_SOURCES_POST_UNDEFS) - set (_option_SOURCES_POST_UNDEFS "") - endif() - set (_contents "") - if (_option_PROLOGUE) - list (APPEND _contents ${_option_PROLOGUE}) - endif() - if (_option_LANGUAGE AND _sourceFiles) - if ("${_option_LANGUAGE}" STREQUAL "CXX") - list (APPEND _contents "#ifdef __cplusplus") - elseif ("${_option_LANGUAGE}" STREQUAL "C") - list (APPEND _contents "#ifndef __cplusplus") - endif() - endif() - set (_compileUndefinitions "") - foreach (_sourceFile ${_sourceFiles}) - cotire_get_source_compile_definitions( - "${_option_CONFIGURATION}" "${_option_LANGUAGE}" "${_sourceFile}" _compileDefinitions - ${_option_SOURCES_COMPILE_DEFINITIONS}) - cotire_get_source_undefs("${_sourceFile}" COTIRE_UNITY_SOURCE_PRE_UNDEFS _sourcePreUndefs ${_option_SOURCES_PRE_UNDEFS}) - cotire_get_source_undefs("${_sourceFile}" COTIRE_UNITY_SOURCE_POST_UNDEFS _sourcePostUndefs ${_option_SOURCES_POST_UNDEFS}) - if (_option_PRE_UNDEFS) - list (APPEND _compileUndefinitions ${_option_PRE_UNDEFS}) - endif() - if (_sourcePreUndefs) - list (APPEND _compileUndefinitions ${_sourcePreUndefs}) - endif() - if (_compileUndefinitions) - cotire_append_undefs(_contents ${_compileUndefinitions}) - set (_compileUndefinitions "") - endif() - if (_sourcePostUndefs) - list (APPEND _compileUndefinitions ${_sourcePostUndefs}) - endif() - if (_option_POST_UNDEFS) - list (APPEND _compileUndefinitions ${_option_POST_UNDEFS}) - endif() - foreach (_definition ${_compileDefinitions}) - if ("${_definition}" MATCHES "^([a-zA-Z0-9_]+)=(.+)$") - list (APPEND _contents "#define ${CMAKE_MATCH_1} ${CMAKE_MATCH_2}") - list (INSERT _compileUndefinitions 0 "${CMAKE_MATCH_1}") - else() - list (APPEND _contents "#define ${_definition}") - list (INSERT _compileUndefinitions 0 "${_definition}") - endif() - endforeach() - get_filename_component(_sourceFile "${_sourceFile}" ABSOLUTE) - if (WIN32) - file (TO_NATIVE_PATH "${_sourceFile}" _sourceFile) - endif() - list (APPEND _contents "#include \"${_sourceFile}\"") - endforeach() - if (_compileUndefinitions) - cotire_append_undefs(_contents ${_compileUndefinitions}) - set (_compileUndefinitions "") - endif() - if (_option_LANGUAGE AND _sourceFiles) - list (APPEND _contents "#endif") - endif() - if (_option_EPILOGUE) - list (APPEND _contents ${_option_EPILOGUE}) - endif() - list (APPEND _contents "") - string (REPLACE ";" "\n" _contents "${_contents}") - if (COTIRE_VERBOSE) - message ("${_contents}") - endif() - cotire_write_file("${_option_LANGUAGE}" "${_unityFile}" "${_contents}" TRUE) -endfunction() - -function (cotire_generate_prefix_header _prefixFile) - set(_options "") - set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION) - set(_multiValueArgs DEPENDS COMPILE_DEFINITIONS COMPILE_FLAGS - INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS) - cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - if (_option_DEPENDS) - cotire_check_file_up_to_date(_prefixFileIsUpToDate "${_prefixFile}" ${_option_DEPENDS}) - if (_prefixFileIsUpToDate) - return() - endif() - endif() - set (_epilogue "") - if (_option_COMPILER_ID MATCHES "Intel") - # Intel compiler requires hdrstop pragma to stop generating PCH file - set (_epilogue "#pragma hdrstop") - endif() - set (_sourceFiles ${_option_UNPARSED_ARGUMENTS}) - cotire_scan_includes(_selectedHeaders ${_sourceFiles} - LANGUAGE "${_option_LANGUAGE}" - COMPILER_EXECUTABLE "${_option_COMPILER_EXECUTABLE}" - COMPILER_ID "${_option_COMPILER_ID}" - COMPILER_VERSION "${_option_COMPILER_VERSION}" - COMPILE_DEFINITIONS ${_option_COMPILE_DEFINITIONS} - COMPILE_FLAGS ${_option_COMPILE_FLAGS} - INCLUDE_DIRECTORIES ${_option_INCLUDE_DIRECTORIES} - IGNORE_PATH ${_option_IGNORE_PATH} - INCLUDE_PATH ${_option_INCLUDE_PATH} - IGNORE_EXTENSIONS ${_option_IGNORE_EXTENSIONS} - UNPARSED_LINES _unparsedLines) - cotire_generate_unity_source("${_prefixFile}" EPILOGUE ${_epilogue} LANGUAGE "${_option_LANGUAGE}" ${_selectedHeaders}) - set (_unparsedLinesFile "${_prefixFile}.log") - if (_unparsedLines) - if (COTIRE_VERBOSE OR NOT _selectedHeaders) - list (LENGTH _unparsedLines _skippedLineCount) - file (RELATIVE_PATH _unparsedLinesFileRelPath "${CMAKE_BINARY_DIR}" "${_unparsedLinesFile}") - message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesFileRelPath}") - endif() - string (REPLACE ";" "\n" _unparsedLines "${_unparsedLines}") - endif() - file (WRITE "${_unparsedLinesFile}" "${_unparsedLines}\n") -endfunction() - -function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flagsVar) - set (_flags ${${_flagsVar}}) - if (_compilerID MATCHES "MSVC") - # cl.exe options used - # /nologo suppresses display of sign-on banner - # /TC treat all files named on the command line as C source files - # /TP treat all files named on the command line as C++ source files - # /EP preprocess to stdout without #line directives - # /showIncludes list include files - set (_sourceFileTypeC "/TC") - set (_sourceFileTypeCXX "/TP") - if (_flags) - # append to list - list (APPEND _flags /nologo "${_sourceFileType${_language}}" /EP /showIncludes) - else() - # return as a flag string - set (_flags "${_sourceFileType${_language}} /EP /showIncludes") - endif() - elseif (_compilerID MATCHES "GNU") - # GCC options used - # -H print the name of each header file used - # -E invoke preprocessor - # -fdirectives-only do not expand macros, requires GCC >= 4.3 - if (_flags) - # append to list - list (APPEND _flags -H -E) - if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0") - list (APPEND _flags "-fdirectives-only") - endif() - else() - # return as a flag string - set (_flags "-H -E") - if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0") - set (_flags "${_flags} -fdirectives-only") - endif() - endif() - elseif (_compilerID MATCHES "Clang") - # Clang options used - # -H print the name of each header file used - # -E invoke preprocessor - if (_flags) - # append to list - list (APPEND _flags -H -E) - else() - # return as a flag string - set (_flags "-H -E") - endif() - elseif (_compilerID MATCHES "Intel") - if (WIN32) - # Windows Intel options used - # /nologo do not display compiler version information - # /QH display the include file order - # /EP preprocess to stdout, omitting #line directives - # /TC process all source or unrecognized file types as C source files - # /TP process all source or unrecognized file types as C++ source files - set (_sourceFileTypeC "/TC") - set (_sourceFileTypeCXX "/TP") - if (_flags) - # append to list - list (APPEND _flags /nologo "${_sourceFileType${_language}}" /EP /QH) - else() - # return as a flag string - set (_flags "${_sourceFileType${_language}} /EP /QH") - endif() - else() - # Linux / Mac OS X Intel options used - # -H print the name of each header file used - # -EP preprocess to stdout, omitting #line directives - # -Kc++ process all source or unrecognized file types as C++ source files - if (_flags) - # append to list - if ("${_language}" STREQUAL "CXX") - list (APPEND _flags -Kc++) - endif() - list (APPEND _flags -H -EP) - else() - # return as a flag string - if ("${_language}" STREQUAL "CXX") - set (_flags "-Kc++ ") - endif() - set (_flags "${_flags}-H -EP") - endif() - endif() - else() - message (FATAL_ERROR "Unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.") - endif() - set (${_flagsVar} ${_flags} PARENT_SCOPE) -endfunction() - -function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersion _prefixFile _pchFile _hostFile _flagsVar) - set (_flags ${${_flagsVar}}) - if (_compilerID MATCHES "MSVC") - file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) - file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) - file (TO_NATIVE_PATH "${_hostFile}" _hostFileNative) - # cl.exe options used - # /Yc creates a precompiled header file - # /Fp specifies precompiled header binary file name - # /FI forces inclusion of file - # /TC treat all files named on the command line as C source files - # /TP treat all files named on the command line as C++ source files - # /Zs syntax check only - set (_sourceFileTypeC "/TC") - set (_sourceFileTypeCXX "/TP") - if (_flags) - # append to list - list (APPEND _flags /nologo "${_sourceFileType${_language}}" - "/Yc${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}" /Zs "${_hostFileNative}") - else() - # return as a flag string - set (_flags "/Yc\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") - endif() - elseif (_compilerID MATCHES "GNU|Clang") - # GCC / Clang options used - # -x specify the source language - # -c compile but do not link - # -o place output in file - set (_xLanguage_C "c-header") - set (_xLanguage_CXX "c++-header") - if (_flags) - # append to list - list (APPEND _flags "-x" "${_xLanguage_${_language}}" "-c" "${_prefixFile}" -o "${_pchFile}") - else() - # return as a flag string - set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"") - endif() - elseif (_compilerID MATCHES "Intel") - if (WIN32) - file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) - file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) - file (TO_NATIVE_PATH "${_hostFile}" _hostFileNative) - # Windows Intel options used - # /nologo do not display compiler version information - # /Yc create a precompiled header (PCH) file - # /Fp specify a path or file name for precompiled header files - # /FI tells the preprocessor to include a specified file name as the header file - # /TC process all source or unrecognized file types as C source files - # /TP process all source or unrecognized file types as C++ source files - # /Zs syntax check only - # /Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) - set (_sourceFileTypeC "/TC") - set (_sourceFileTypeCXX "/TP") - if (_flags) - # append to list - list (APPEND _flags /nologo "${_sourceFileType${_language}}" - "/Yc" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}" /Zs "${_hostFileNative}") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - list (APPEND _flags "/Wpch-messages") - endif() - else() - # return as a flag string - set (_flags "/Yc /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - set (_flags "${_flags} /Wpch-messages") - endif() - endif() - else() - # Linux / Mac OS X Intel options used - # -pch-dir location for precompiled header files - # -pch-create name of the precompiled header (PCH) to create - # -Kc++ process all source or unrecognized file types as C++ source files - # -fsyntax-only check only for correct syntax - # -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) - get_filename_component(_pchDir "${_pchFile}" PATH) - get_filename_component(_pchName "${_pchFile}" NAME) - set (_xLanguage_C "c-header") - set (_xLanguage_CXX "c++-header") - if (_flags) - # append to list - if ("${_language}" STREQUAL "CXX") - list (APPEND _flags -Kc++) - endif() - list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-create" "${_pchName}" "-fsyntax-only" "${_hostFile}") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - list (APPEND _flags "-Wpch-messages") - endif() - else() - # return as a flag string - set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-create \"${_pchName}\"") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - set (_flags "${_flags} -Wpch-messages") - endif() - endif() - endif() - else() - message (FATAL_ERROR "Unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.") - endif() - set (${_flagsVar} ${_flags} PARENT_SCOPE) -endfunction() - -function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerVersion _prefixFile _pchFile _flagsVar) - set (_flags ${${_flagsVar}}) - if (_compilerID MATCHES "MSVC") - file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) - # cl.exe options used - # /Yu uses a precompiled header file during build - # /Fp specifies precompiled header binary file name - # /FI forces inclusion of file - if (_pchFile) - file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) - if (_flags) - # append to list - list (APPEND _flags "/Yu${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}") - else() - # return as a flag string - set (_flags "/Yu\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") - endif() - else() - # no precompiled header, force inclusion of prefix header - if (_flags) - # append to list - list (APPEND _flags "/FI${_prefixFileNative}") - else() - # return as a flag string - set (_flags "/FI\"${_prefixFileNative}\"") - endif() - endif() - elseif (_compilerID MATCHES "GNU") - # GCC options used - # -include process include file as the first line of the primary source file - # -Winvalid-pch warns if precompiled header is found but cannot be used - if (_flags) - # append to list - list (APPEND _flags "-include" "${_prefixFile}" "-Winvalid-pch") - else() - # return as a flag string - set (_flags "-include \"${_prefixFile}\" -Winvalid-pch") - endif() - elseif (_compilerID MATCHES "Clang") - # Clang options used - # -include process include file as the first line of the primary source file - # -Qunused-arguments don't emit warning for unused driver arguments - if (_flags) - # append to list - list (APPEND _flags "-include" "${_prefixFile}" "-Qunused-arguments") - else() - # return as a flag string - set (_flags "-include \"${_prefixFile}\" -Qunused-arguments") - endif() - elseif (_compilerID MATCHES "Intel") - if (WIN32) - file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) - # Windows Intel options used - # /Yu use a precompiled header (PCH) file - # /Fp specify a path or file name for precompiled header files - # /FI tells the preprocessor to include a specified file name as the header file - # /Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) - if (_pchFile) - file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) - if (_flags) - # append to list - list (APPEND _flags "/Yu" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - list (APPEND _flags "/Wpch-messages") - endif() - else() - # return as a flag string - set (_flags "/Yu /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - set (_flags "${_flags} /Wpch-messages") - endif() - endif() - else() - # no precompiled header, force inclusion of prefix header - if (_flags) - # append to list - list (APPEND _flags "/FI${_prefixFileNative}") - else() - # return as a flag string - set (_flags "/FI\"${_prefixFileNative}\"") - endif() - endif() - else() - # Linux / Mac OS X Intel options used - # -pch-dir location for precompiled header files - # -pch-use name of the precompiled header (PCH) to use - # -include process include file as the first line of the primary source file - # -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) - if (_pchFile) - get_filename_component(_pchDir "${_pchFile}" PATH) - get_filename_component(_pchName "${_pchFile}" NAME) - if (_flags) - # append to list - list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-use" "${_pchName}") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - list (APPEND _flags "-Wpch-messages") - endif() - else() - # return as a flag string - set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-use \"${_pchName}\"") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - set (_flags "${_flags} -Wpch-messages") - endif() - endif() - else() - # no precompiled header, force inclusion of prefix header - if (_flags) - # append to list - list (APPEND _flags "-include" "${_prefixFile}") - else() - # return as a flag string - set (_flags "-include \"${_prefixFile}\"") - endif() - endif() - endif() - else() - message (FATAL_ERROR "Unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.") - endif() - set (${_flagsVar} ${_flags} PARENT_SCOPE) -endfunction() - -function (cotire_precompile_prefix_header _prefixFile _pchFile _hostFile) - set(_options "") - set(_oneValueArgs COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION LANGUAGE) - set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES) - cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - if (NOT _option_LANGUAGE) - set (_option_LANGUAGE "CXX") - endif() - if (NOT _option_COMPILER_ID) - set (_option_COMPILER_ID "${CMAKE_${_option_LANGUAGE}_ID}") - endif() - cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}") - cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS}) - cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS}) - cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_INCLUDE_DIRECTORIES}) - cotire_add_pch_compilation_flags( - "${_option_LANGUAGE}" "${_option_COMPILER_ID}" "${_option_COMPILER_VERSION}" - "${_prefixFile}" "${_pchFile}" "${_hostFile}" _cmd) - if (COTIRE_VERBOSE) - message (STATUS "execute_process: ${_cmd}") - endif() - if (_option_COMPILER_ID MATCHES "MSVC") - if (COTIRE_DEBUG) - message (STATUS "clearing VS_UNICODE_OUTPUT") - endif() - # cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared - unset (ENV{VS_UNICODE_OUTPUT}) - endif() - execute_process(COMMAND ${_cmd} WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" RESULT_VARIABLE _result) - if (_result) - message (FATAL_ERROR "Error ${_result} precompiling ${_prefixFile}.") - endif() -endfunction() - -function (cotire_check_precompiled_header_support _language _targetSourceDir _target _msgVar) - set (_unsupportedCompiler - "Precompiled headers not supported for ${_language} compiler ${CMAKE_${_language}_COMPILER_ID}") - if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC") - # supported since Visual Studio C++ 6.0 - # and CMake does not support an earlier version - set (${_msgVar} "" PARENT_SCOPE) - elseif (CMAKE_${_language}_COMPILER_ID MATCHES "GNU") - # GCC PCH support requires version >= 3.4 - cotire_determine_compiler_version("${_language}" COTIRE_${_language}_COMPILER) - if ("${COTIRE_${_language}_COMPILER_VERSION}" MATCHES ".+" AND - "${COTIRE_${_language}_COMPILER_VERSION}" VERSION_LESS "3.4.0") - set (${_msgVar} "${_unsupportedCompiler} version ${COTIRE_${_language}_COMPILER_VERSION}." PARENT_SCOPE) - else() - set (${_msgVar} "" PARENT_SCOPE) - endif() - elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang") - # all Clang versions have PCH support - set (${_msgVar} "" PARENT_SCOPE) - elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel") - # Intel PCH support requires version >= 8.0.0 - cotire_determine_compiler_version("${_language}" COTIRE_${_language}_COMPILER) - if ("${COTIRE_${_language}_COMPILER_VERSION}" MATCHES ".+" AND - "${COTIRE_${_language}_COMPILER_VERSION}" VERSION_LESS "8.0.0") - set (${_msgVar} "${_unsupportedCompiler} version ${COTIRE_${_language}_COMPILER_VERSION}." PARENT_SCOPE) - else() - set (${_msgVar} "" PARENT_SCOPE) - endif() - else() - set (${_msgVar} "${_unsupportedCompiler}." PARENT_SCOPE) - endif() - if (APPLE) - # PCH compilation not supported by GCC / Clang for multi-architecture builds (e.g., i386, x86_64) - if (CMAKE_CONFIGURATION_TYPES) - set (_configs ${CMAKE_CONFIGURATION_TYPES}) - elseif (CMAKE_BUILD_TYPE) - set (_configs ${CMAKE_BUILD_TYPE}) - else() - set (_configs "None") - endif() - foreach (_config ${_configs}) - set (_targetFlags "") - cotire_get_target_compile_flags("${_config}" "${_language}" "${_targetSourceDir}" "${_target}" _targetFlags) - cotire_filter_compile_flags("${_language}" "arch" _architectures _ignore ${_targetFlags}) - list (LENGTH _architectures _numberOfArchitectures) - if (_numberOfArchitectures GREATER 1) - string (REPLACE ";" ", " _architectureStr "${_architectures}") - set (${_msgVar} - "Precompiled headers not supported on Darwin for multi-architecture builds (${_architectureStr})." - PARENT_SCOPE) - break() - endif() - endforeach() - endif() -endfunction() - -macro (cotire_get_intermediate_dir _cotireDir) - get_filename_component(${_cotireDir} "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${COTIRE_INTDIR}" ABSOLUTE) -endmacro() - -macro (cotire_setup_file_extension_variables) - set (_unityFileExt_C ".c") - set (_unityFileExt_CXX ".cxx") - set (_prefixFileExt_C ".h") - set (_prefixFileExt_CXX ".hxx") -endmacro() - -function (cotire_make_single_unity_source_file_path _language _target _unityFileVar) - cotire_setup_file_extension_variables() - if (NOT DEFINED _unityFileExt_${_language}) - set (${_unityFileVar} "" PARENT_SCOPE) - return() - endif() - set (_unityFileBaseName "${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}") - set (_unityFileName "${_unityFileBaseName}${_unityFileExt_${_language}}") - cotire_get_intermediate_dir(_baseDir) - set (_unityFile "${_baseDir}/${_unityFileName}") - set (${_unityFileVar} "${_unityFile}" PARENT_SCOPE) - if (COTIRE_DEBUG) - message(STATUS "${_unityFile}") - endif() -endfunction() - -function (cotire_make_unity_source_file_paths _language _target _maxIncludes _unityFilesVar) - cotire_setup_file_extension_variables() - if (NOT DEFINED _unityFileExt_${_language}) - set (${_unityFileVar} "" PARENT_SCOPE) - return() - endif() - set (_unityFileBaseName "${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}") - cotire_get_intermediate_dir(_baseDir) - set (_startIndex 0) - set (_index 0) - set (_unityFiles "") - set (_sourceFiles ${ARGN}) - foreach (_sourceFile ${_sourceFiles}) - get_source_file_property(_startNew "${_sourceFile}" COTIRE_START_NEW_UNITY_SOURCE) - math (EXPR _unityFileCount "${_index} - ${_startIndex}") - if (_startNew OR (_maxIncludes GREATER 0 AND NOT _unityFileCount LESS _maxIncludes)) - if (_index GREATER 0) - # start new unity file segment - math (EXPR _endIndex "${_index} - 1") - set (_unityFileName "${_unityFileBaseName}_${_startIndex}_${_endIndex}${_unityFileExt_${_language}}") - list (APPEND _unityFiles "${_baseDir}/${_unityFileName}") - endif() - set (_startIndex ${_index}) - endif() - math (EXPR _index "${_index} + 1") - endforeach() - list (LENGTH _sourceFiles _numberOfSources) - if (_startIndex EQUAL 0) - # there is only a single unity file - cotire_make_single_unity_source_file_path(${_language} ${_target} _unityFiles) - elseif (_startIndex LESS _numberOfSources) - # end with final unity file segment - math (EXPR _endIndex "${_index} - 1") - set (_unityFileName "${_unityFileBaseName}_${_startIndex}_${_endIndex}${_unityFileExt_${_language}}") - list (APPEND _unityFiles "${_baseDir}/${_unityFileName}") - endif() - set (${_unityFilesVar} ${_unityFiles} PARENT_SCOPE) - if (COTIRE_DEBUG) - message(STATUS "${_unityFiles}") - endif() -endfunction() - -function (cotire_unity_to_prefix_file_path _language _target _unityFile _prefixFileVar) - cotire_setup_file_extension_variables() - if (NOT DEFINED _unityFileExt_${_language}) - set (${_prefixFileVar} "" PARENT_SCOPE) - return() - endif() - set (_unityFileBaseName "${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}") - set (_prefixFileBaseName "${_target}_${_language}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}") - string (REPLACE "${_unityFileBaseName}" "${_prefixFileBaseName}" _prefixFile "${_unityFile}") - string (REGEX REPLACE "${_unityFileExt_${_language}}$" "${_prefixFileExt_${_language}}" _prefixFile "${_prefixFile}") - set (${_prefixFileVar} "${_prefixFile}" PARENT_SCOPE) -endfunction() - -function (cotire_make_prefix_file_name _language _target _prefixFileBaseNameVar _prefixFileNameVar) - cotire_setup_file_extension_variables() - if (NOT _language) - set (_prefixFileBaseName "${_target}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}") - set (_prefixFileName "${_prefixFileBaseName}${_prefixFileExt_C}") - elseif (DEFINED _prefixFileExt_${_language}) - set (_prefixFileBaseName "${_target}_${_language}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}") - set (_prefixFileName "${_prefixFileBaseName}${_prefixFileExt_${_language}}") - else() - set (_prefixFileBaseName "") - set (_prefixFileName "") - endif() - set (${_prefixFileBaseNameVar} "${_prefixFileBaseName}" PARENT_SCOPE) - set (${_prefixFileNameVar} "${_prefixFileName}" PARENT_SCOPE) -endfunction() - -function (cotire_make_prefix_file_path _language _target _prefixFileVar) - cotire_make_prefix_file_name("${_language}" "${_target}" _prefixFileBaseName _prefixFileName) - set (${_prefixFileVar} "" PARENT_SCOPE) - if (_prefixFileName) - if (NOT _language) - set (_language "C") - endif() - if (MSVC OR CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang|Intel") - cotire_get_intermediate_dir(_baseDir) - set (${_prefixFileVar} "${_baseDir}/${_prefixFileName}" PARENT_SCOPE) - endif() - endif() -endfunction() - -function (cotire_make_pch_file_path _language _targetSourceDir _target _pchFileVar) - cotire_make_prefix_file_name("${_language}" "${_target}" _prefixFileBaseName _prefixFileName) - set (${_pchFileVar} "" PARENT_SCOPE) - if (_prefixFileBaseName AND _prefixFileName) - cotire_check_precompiled_header_support("${_language}" "${_targetSourceDir}" "${_target}" _msg) - if (NOT _msg) - if (XCODE) - # For Xcode, we completely hand off the compilation of the prefix header to the IDE - return() - endif() - cotire_get_intermediate_dir(_baseDir) - if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC") - # MSVC uses the extension .pch added to the prefix header base name - set (${_pchFileVar} "${_baseDir}/${_prefixFileBaseName}.pch" PARENT_SCOPE) - elseif (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang") - # GCC / Clang look for a precompiled header corresponding to the prefix header with the extension .gch appended - set (${_pchFileVar} "${_baseDir}/${_prefixFileName}.gch" PARENT_SCOPE) - elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel") - # Intel uses the extension .pchi added to the prefix header base name - set (${_pchFileVar} "${_baseDir}/${_prefixFileBaseName}.pchi" PARENT_SCOPE) - endif() - endif() - endif() -endfunction() - -function (cotire_select_unity_source_files _unityFile _sourcesVar) - set (_sourceFiles ${ARGN}) - if (_sourceFiles AND "${_unityFile}" MATCHES "${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}_([0-9]+)_([0-9]+)") - set (_startIndex ${CMAKE_MATCH_1}) - set (_endIndex ${CMAKE_MATCH_2}) - list (LENGTH _sourceFiles _numberOfSources) - if (NOT _startIndex LESS _numberOfSources) - math (EXPR _startIndex "${_numberOfSources} - 1") - endif() - if (NOT _endIndex LESS _numberOfSources) - math (EXPR _endIndex "${_numberOfSources} - 1") - endif() - set (_files "") - foreach (_index RANGE ${_startIndex} ${_endIndex}) - list (GET _sourceFiles ${_index} _file) - list (APPEND _files "${_file}") - endforeach() - else() - set (_files ${_sourceFiles}) - endif() - set (${_sourcesVar} ${_files} PARENT_SCOPE) -endfunction() - -function (cotire_get_unity_source_dependencies _language _target _dependencySourcesVar) - set (_dependencySources "") - # depend on target's generated source files - cotire_get_objects_with_property_on(_generatedSources GENERATED SOURCE ${ARGN}) - if (_generatedSources) - # but omit all generated source files that have the COTIRE_EXCLUDED property set to true - cotire_get_objects_with_property_on(_excludedGeneratedSources COTIRE_EXCLUDED SOURCE ${_generatedSources}) - if (_excludedGeneratedSources) - list (REMOVE_ITEM _generatedSources ${_excludedGeneratedSources}) - endif() - # and omit all generated source files that have the COTIRE_DEPENDENCY property set to false explicitly - cotire_get_objects_with_property_off(_excludedNonDependencySources COTIRE_DEPENDENCY SOURCE ${_generatedSources}) - if (_excludedNonDependencySources) - list (REMOVE_ITEM _generatedSources ${_excludedNonDependencySources}) - endif() - if (_generatedSources) - list (APPEND _dependencySources ${_generatedSources}) - endif() - endif() - if (COTIRE_DEBUG AND _dependencySources) - message (STATUS "${_language} ${_target} unity source depends on ${_dependencySources}") - endif() - set (${_dependencySourcesVar} ${_dependencySources} PARENT_SCOPE) -endfunction() - -function (cotire_get_prefix_header_dependencies _language _target _dependencySourcesVar) - # depend on target source files marked with custom COTIRE_DEPENDENCY property - set (_dependencySources "") - cotire_get_objects_with_property_on(_dependencySources COTIRE_DEPENDENCY SOURCE ${ARGN}) - if (COTIRE_DEBUG AND _dependencySources) - message (STATUS "${_language} ${_target} prefix header DEPENDS ${_dependencySources}") - endif() - set (${_dependencySourcesVar} ${_dependencySources} PARENT_SCOPE) -endfunction() - -function (cotire_generate_target_script _language _configurations _targetSourceDir _targetBinaryDir _target _targetScriptVar) - set (COTIRE_TARGET_SOURCES ${ARGN}) - get_filename_component(_moduleName "${COTIRE_CMAKE_MODULE_FILE}" NAME) - set (_targetCotireScript "${CMAKE_CURRENT_BINARY_DIR}/${_target}_${_language}_${_moduleName}") - cotire_get_prefix_header_dependencies(${_language} ${_target} COTIRE_TARGET_PREFIX_DEPENDS ${COTIRE_TARGET_SOURCES}) - cotire_get_unity_source_dependencies(${_language} ${_target} COTIRE_TARGET_UNITY_DEPENDS ${COTIRE_TARGET_SOURCES}) - # set up variables to be configured - set (COTIRE_TARGET_LANGUAGE "${_language}") - cotire_determine_compiler_version("${COTIRE_TARGET_LANGUAGE}" COTIRE_${_language}_COMPILER) - get_target_property(COTIRE_TARGET_IGNORE_PATH ${_target} COTIRE_PREFIX_HEADER_IGNORE_PATH) - cotire_add_sys_root_paths(COTIRE_TARGET_IGNORE_PATH) - get_target_property(COTIRE_TARGET_INCLUDE_PATH ${_target} COTIRE_PREFIX_HEADER_INCLUDE_PATH) - cotire_add_sys_root_paths(COTIRE_TARGET_INCLUDE_PATH) - get_target_property(COTIRE_TARGET_PRE_UNDEFS ${_target} COTIRE_UNITY_SOURCE_PRE_UNDEFS) - get_target_property(COTIRE_TARGET_POST_UNDEFS ${_target} COTIRE_UNITY_SOURCE_POST_UNDEFS) - get_target_property(COTIRE_TARGET_MAXIMUM_NUMBER_OF_INCLUDES ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES) - cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_PRE_UNDEFS COTIRE_TARGET_SOURCES_PRE_UNDEFS ${COTIRE_TARGET_SOURCES}) - cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_POST_UNDEFS COTIRE_TARGET_SOURCES_POST_UNDEFS ${COTIRE_TARGET_SOURCES}) - set (COTIRE_TARGET_CONFIGURATION_TYPES "${_configurations}") - foreach (_config ${_configurations}) - string (TOUPPER "${_config}" _upperConfig) - cotire_get_target_include_directories( - "${_config}" "${_language}" "${_targetSourceDir}" "${_targetBinaryDir}" "${_target}" COTIRE_TARGET_INCLUDE_DIRECTORIES_${_upperConfig}) - cotire_get_target_compile_definitions( - "${_config}" "${_language}" "${_targetSourceDir}" "${_target}" COTIRE_TARGET_COMPILE_DEFINITIONS_${_upperConfig}) - cotire_get_target_compiler_flags( - "${_config}" "${_language}" "${_targetSourceDir}" "${_target}" COTIRE_TARGET_COMPILE_FLAGS_${_upperConfig}) - cotire_get_source_files_compile_definitions( - "${_config}" "${_language}" COTIRE_TARGET_SOURCES_COMPILE_DEFINITIONS_${_upperConfig} ${COTIRE_TARGET_SOURCES}) - endforeach() - get_cmake_property(_vars VARIABLES) - string (REGEX MATCHALL "COTIRE_[A-Za-z0-9_]+" _matchVars "${_vars}") - # remove COTIRE_VERBOSE which is passed as a CMake define on command line - list (REMOVE_ITEM _matchVars COTIRE_VERBOSE) - set (_contents "") - foreach (_var IN LISTS _matchVars ITEMS - MSVC CMAKE_GENERATOR CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES - CMAKE_${_language}_COMPILER_ID CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1 - CMAKE_${_language}_SOURCE_FILE_EXTENSIONS) - if (DEFINED ${_var}) - string (REPLACE "\"" "\\\"" _value "${${_var}}") - set (_contents "${_contents}set (${_var} \"${_value}\")\n") - endif() - endforeach() - cotire_write_file("CMAKE" "${_targetCotireScript}" "${_contents}" FALSE) - set (${_targetScriptVar} "${_targetCotireScript}" PARENT_SCOPE) -endfunction() - -function (cotire_setup_pch_file_compilation _language _target _targetSourceDir _targetScript _prefixFile _pchFile) - set (_sourceFiles ${ARGN}) - if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - # for Visual Studio and Intel, we attach the precompiled header compilation to the first source file - # the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion - if (_sourceFiles) - file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) - file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) - list (GET _sourceFiles 0 _hostFile) - set (_flags "") - cotire_determine_compiler_version("${_language}" COTIRE_${_language}_COMPILER) - cotire_add_pch_compilation_flags( - "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${COTIRE_${_language}_COMPILER_VERSION}" - "${_prefixFile}" "${_pchFile}" "${_hostFile}" _flags) - set_property (SOURCE ${_hostFile} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") - set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_OUTPUTS "${_pchFile}") - # make first source file depend on prefix header - set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}") - # mark first source file as cotired to prevent it from being used in another cotired target - set_property (SOURCE ${_hostFile} PROPERTY COTIRE_TARGET "${_target}") - endif() - elseif ("${CMAKE_GENERATOR}" MATCHES "Makefiles|Ninja") - # for makefile based generator, we add a custom command to precompile the prefix header - if (_targetScript) - cotire_set_cmd_to_prologue(_cmds) - list (GET _sourceFiles 0 _hostFile) - list (APPEND _cmds -P "${COTIRE_CMAKE_MODULE_FILE}" "precompile" "${_targetScript}" "${_prefixFile}" "${_pchFile}" "${_hostFile}") - file (RELATIVE_PATH _pchFileRelPath "${CMAKE_BINARY_DIR}" "${_pchFile}") - if (COTIRE_DEBUG) - message (STATUS "add_custom_command: OUTPUT ${_pchFile} ${_cmds} DEPENDS ${_prefixFile} IMPLICIT_DEPENDS ${_language} ${_prefixFile}") - endif() - set_property (SOURCE "${_pchFile}" PROPERTY GENERATED TRUE) - add_custom_command(OUTPUT "${_pchFile}" - COMMAND ${_cmds} - DEPENDS "${_prefixFile}" - IMPLICIT_DEPENDS ${_language} "${_prefixFile}" - WORKING_DIRECTORY "${_targetSourceDir}" - COMMENT "Building ${_language} precompiled header ${_pchFileRelPath}" VERBATIM) - endif() - endif() -endfunction() - -function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefixFile _pchFile) - set (_sourceFiles ${ARGN}) - if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - # for Visual Studio and Intel, we include the precompiled header in all but the first source file - # the first source file does the precompiled header compilation, see cotire_setup_pch_file_compilation - list (LENGTH _sourceFiles _numberOfSourceFiles) - if (_numberOfSourceFiles GREATER 1) - # mark sources as cotired to prevent them from being used in another cotired target - set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}") - list (REMOVE_AT _sourceFiles 0) - set (_flags "") - cotire_determine_compiler_version("${_language}" COTIRE_${_language}_COMPILER) - cotire_add_prefix_pch_inclusion_flags( - "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${COTIRE_${_language}_COMPILER_VERSION}" - "${_prefixFile}" "${_pchFile}" _flags) - set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") - # make source files depend on precompiled header - set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_pchFile}") - endif() - elseif ("${CMAKE_GENERATOR}" MATCHES "Makefiles|Ninja") - if (NOT _wholeTarget) - # for makefile based generator, we force the inclusion of the prefix header for a subset - # of the source files, if this is a multi-language target or has excluded files - set (_flags "") - cotire_determine_compiler_version("${_language}" COTIRE_${_language}_COMPILER) - cotire_add_prefix_pch_inclusion_flags( - "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${COTIRE_${_language}_COMPILER_VERSION}" - "${_prefixFile}" "${_pchFile}" _flags) - set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") - # mark sources as cotired to prevent them from being used in another cotired target - set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}") - endif() - # make source files depend on precompiled header - set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_pchFile}") - endif() -endfunction() - -function (cotire_setup_prefix_file_inclusion _language _target _prefixFile) - set (_sourceFiles ${ARGN}) - # force the inclusion of the prefix header for the given source files - set (_flags "") - cotire_determine_compiler_version("${_language}" COTIRE_${_language}_COMPILER) - cotire_add_prefix_pch_inclusion_flags( - "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${COTIRE_${_language}_COMPILER_VERSION}" - "${_prefixFile}" "" _flags) - set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") - # mark sources as cotired to prevent them from being used in another cotired target - set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}") - # make source files depend on prefix header - set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}") -endfunction() - -function (cotire_get_first_set_property_value _propertyValueVar _type _object) - set (_properties ${ARGN}) - foreach (_property ${_properties}) - get_property(_propertyValue ${_type} "${_object}" PROPERTY ${_property}) - if (_propertyValue) - set (${_propertyValueVar} ${_propertyValue} PARENT_SCOPE) - return() - endif() - endforeach() - set (${_propertyValueVar} "" PARENT_SCOPE) -endfunction() - -function (cotire_setup_combine_command _language _sourceDir _targetScript _joinedFile _cmdsVar) - set (_files ${ARGN}) - set (_filesPaths "") - foreach (_file ${_files}) - if (IS_ABSOLUTE "${_file}") - set (_filePath "${_file}") - else() - get_filename_component(_filePath "${_sourceDir}/${_file}" ABSOLUTE) - endif() - file (RELATIVE_PATH _fileRelPath "${_sourceDir}" "${_filePath}") - if (NOT IS_ABSOLUTE "${_fileRelPath}" AND NOT "${_fileRelPath}" MATCHES "^\\.\\.") - list (APPEND _filesPaths "${_fileRelPath}") - else() - list (APPEND _filesPaths "${_filePath}") - endif() - endforeach() - cotire_set_cmd_to_prologue(_prefixCmd) - list (APPEND _prefixCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "combine") - if (_targetScript) - list (APPEND _prefixCmd "${_targetScript}") - endif() - list (APPEND _prefixCmd "${_joinedFile}" ${_filesPaths}) - if (COTIRE_DEBUG) - message (STATUS "add_custom_command: OUTPUT ${_joinedFile} COMMAND ${_prefixCmd} DEPENDS ${_files}") - endif() - set_property (SOURCE "${_joinedFile}" PROPERTY GENERATED TRUE) - file (RELATIVE_PATH _joinedFileRelPath "${CMAKE_BINARY_DIR}" "${_joinedFile}") - get_filename_component(_joinedFileName "${_joinedFileRelPath}" NAME_WE) - if (_language AND _joinedFileName MATCHES "${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}$") - set (_comment "Generating ${_language} unity source ${_joinedFileRelPath}") - elseif (_language AND _joinedFileName MATCHES "${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}$") - set (_comment "Generating ${_language} prefix header ${_joinedFileRelPath}") - else() - set (_comment "Generating ${_joinedFileRelPath}") - endif() - add_custom_command( - OUTPUT "${_joinedFile}" - COMMAND ${_prefixCmd} - DEPENDS ${_files} - COMMENT "${_comment}" - WORKING_DIRECTORY "${_sourceDir}" VERBATIM) - list (APPEND ${_cmdsVar} COMMAND ${_prefixCmd}) - set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) -endfunction() - -function (cotire_setup_target_pch_usage _languages _targetSourceDir _target _wholeTarget) - if (XCODE) - # for Xcode, we attach a pre-build action to generate the unity sources and prefix headers - # if necessary, we also generate a single prefix header which includes all language specific prefix headers - set (_prefixFiles "") - foreach (_language ${_languages}) - get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER) - if (_prefixFile) - list (APPEND _prefixFiles "${_prefixFile}") - endif() - endforeach() - set (_cmds ${ARGN}) - list (LENGTH _prefixFiles _numberOfPrefixFiles) - if (_numberOfPrefixFiles GREATER 1) - cotire_make_prefix_file_path("" ${_target} _prefixHeader) - cotire_setup_combine_command("" "${_targetSourceDir}" "" "${_prefixHeader}" _cmds ${_prefixFiles}) - else() - set (_prefixHeader "${_prefixFiles}") - endif() - if (COTIRE_DEBUG) - message (STATUS "add_custom_command: TARGET ${_target} PRE_BUILD ${_cmds}") - endif() - add_custom_command(TARGET "${_target}" - PRE_BUILD ${_cmds} - WORKING_DIRECTORY "${_targetSourceDir}" - COMMENT "Updating target ${_target} prefix headers" VERBATIM) - # make Xcode precompile the generated prefix header with ProcessPCH and ProcessPCH++ - set_target_properties(${_target} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES") - set_target_properties(${_target} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${_prefixHeader}") - elseif ("${CMAKE_GENERATOR}" MATCHES "Makefiles|Ninja") - # for makefile based generator, we force inclusion of the prefix header for all target source files - # if this is a single-language target without any excluded files - if (_wholeTarget) - set (_language "${_languages}") - # for Visual Studio and Intel, precompiled header inclusion is always done on the source file level - # see cotire_setup_pch_file_inclusion - if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER) - get_property(_pchFile TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER) - set (_flags "") - cotire_determine_compiler_version("${_language}" COTIRE_${_language}_COMPILER) - cotire_add_prefix_pch_inclusion_flags( - "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${COTIRE_${_language}_COMPILER_VERSION}" - "${_prefixFile}" "${_pchFile}" _flags) - set_property (TARGET ${_target} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") - endif() - endif() - endif() -endfunction() - -function (cotire_setup_unity_generation_commands _language _targetSourceDir _target _targetScript _unityFiles _cmdsVar) - set (_dependencySources "") - cotire_get_unity_source_dependencies(${_language} ${_target} _dependencySources ${ARGN}) - foreach (_unityFile ${_unityFiles}) - file (RELATIVE_PATH _unityFileRelPath "${CMAKE_BINARY_DIR}" "${_unityFile}") - set_property (SOURCE "${_unityFile}" PROPERTY GENERATED TRUE) - # set up compiled unity source dependencies - # this ensures that missing source files are generated before the unity file is compiled - if (COTIRE_DEBUG AND _dependencySources) - message (STATUS "${_unityFile} OBJECT_DEPENDS ${_dependencySources}") - endif() - if (_dependencySources) - set_property (SOURCE "${_unityFile}" PROPERTY OBJECT_DEPENDS ${_dependencySources}) - endif() - if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - # unity file compilation results in potentially huge object file, thus use /bigobj by default unter MSVC and Windows Intel - set_property (SOURCE "${_unityFile}" APPEND_STRING PROPERTY COMPILE_FLAGS "/bigobj") - endif() - cotire_set_cmd_to_prologue(_unityCmd) - list (APPEND _unityCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "unity" "${_targetScript}" "${_unityFile}") - if (COTIRE_DEBUG) - message (STATUS "add_custom_command: OUTPUT ${_unityFile} COMMAND ${_unityCmd} DEPENDS ${_targetScript}") - endif() - add_custom_command( - OUTPUT "${_unityFile}" - COMMAND ${_unityCmd} - DEPENDS "${_targetScript}" - COMMENT "Generating ${_language} unity source ${_unityFileRelPath}" - WORKING_DIRECTORY "${_targetSourceDir}" VERBATIM) - list (APPEND ${_cmdsVar} COMMAND ${_unityCmd}) - endforeach() - list (LENGTH _unityFiles _numberOfUnityFiles) - if (_numberOfUnityFiles GREATER 1) - # create a joint unity file from all unity file segments - cotire_make_single_unity_source_file_path(${_language} ${_target} _unityFile) - cotire_setup_combine_command(${_language} "${_targetSourceDir}" "${_targetScript}" "${_unityFile}" ${_cmdsVar} ${_unityFiles}) - endif() - set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) -endfunction() - -function (cotire_setup_single_prefix_generation_command _language _target _targetSourceDir _targetScript _prefixFile _unityFile _cmdsVar) - set (_sourceFiles ${ARGN}) - set (_dependencySources "") - cotire_get_prefix_header_dependencies(${_language} ${_target} _dependencySources ${_sourceFiles}) - cotire_set_cmd_to_prologue(_prefixCmd) - list (APPEND _prefixCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "prefix" "${_targetScript}" "${_prefixFile}" "${_unityFile}") - set_property (SOURCE "${_prefixFile}" PROPERTY GENERATED TRUE) - if (COTIRE_DEBUG) - message (STATUS "add_custom_command: OUTPUT ${_prefixFile} COMMAND ${_prefixCmd} DEPENDS ${_targetScript} ${_unityFile} ${_dependencySources}") - endif() - file (RELATIVE_PATH _prefixFileRelPath "${CMAKE_BINARY_DIR}" "${_prefixFile}") - add_custom_command( - OUTPUT "${_prefixFile}" "${_prefixFile}.log" - COMMAND ${_prefixCmd} - DEPENDS "${_targetScript}" "${_unityFile}" ${_dependencySources} - COMMENT "Generating ${_language} prefix header ${_prefixFileRelPath}" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" VERBATIM) - list (APPEND ${_cmdsVar} COMMAND ${_prefixCmd}) - set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) -endfunction() - -function (cotire_setup_multi_prefix_generation_command _language _target _targetSourceDir _targetScript _prefixFile _unityFiles _cmdsVar) - set (_sourceFiles ${ARGN}) - list (LENGTH _unityFiles _numberOfUnityFiles) - if (_numberOfUnityFiles GREATER 1) - cotire_make_single_unity_source_file_path(${_language} ${_target} _unityFile) - cotire_setup_single_prefix_generation_command( - ${_language} ${_target} "${_targetSourceDir}" "${_targetScript}" - "${_prefixFile}" "${_unityFile}" ${_cmdsVar} ${_sourceFiles}) - else() - cotire_setup_single_prefix_generation_command( - ${_language} ${_target} "${_targetSourceDir}" "${_targetScript}" - "${_prefixFile}" "${_unityFiles}" ${_cmdsVar} ${_sourceFiles}) - endif() - set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) -endfunction() - -function (cotire_init_cotire_target_properties _target) - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER TRUE) - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD TRUE) - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_ADD_CLEAN SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_ADD_CLEAN FALSE) - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH "${CMAKE_SOURCE_DIR}") - cotire_check_is_path_relative_to("${CMAKE_BINARY_DIR}" _isRelative "${CMAKE_SOURCE_DIR}") - if (NOT _isRelative) - set_property(TARGET ${_target} APPEND PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH "${CMAKE_BINARY_DIR}") - endif() - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH "") - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_PRE_UNDEFS SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_PRE_UNDEFS "") - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_POST_UNDEFS SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_POST_UNDEFS "") - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES SET) - if (NOT _isSet) - if (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES) - set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES "${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES}") - else() - set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES "") - endif() - endif() -endfunction() - -function (cotire_make_target_message _target _languages _disableMsg _targetMsgVar) - get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER) - get_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD) - string (REPLACE ";" " " _languagesStr "${_languages}") - string (REPLACE ";" ", " _excludedStr "${ARGN}") - set (_targetMsg "") - if (NOT _languages) - set (_targetMsg "Target ${_target} cannot be cotired.") - if (_disableMsg) - set (_targetMsg "${_targetMsg} ${_disableMsg}") - endif() - elseif (NOT _targetUsePCH AND NOT _targetAddSCU) - set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build and precompiled header.") - if (_disableMsg) - set (_targetMsg "${_targetMsg} ${_disableMsg}") - endif() - elseif (NOT _targetUsePCH) - if (_allExcludedSourceFiles) - set (_targetMsg "${_languagesStr} target ${_target} cotired excluding files ${_excludedStr} without precompiled header.") - else() - set (_targetMsg "${_languagesStr} target ${_target} cotired without precompiled header.") - endif() - if (_disableMsg) - set (_targetMsg "${_targetMsg} ${_disableMsg}") - endif() - elseif (NOT _targetAddSCU) - if (_allExcludedSourceFiles) - set (_targetMsg "${_languagesStr} target ${_target} cotired excluding files ${_excludedStr} without unity build.") - else() - set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build.") - endif() - else() - if (_allExcludedSourceFiles) - set (_targetMsg "${_languagesStr} target ${_target} cotired excluding files ${_excludedStr}.") - else() - set (_targetMsg "${_languagesStr} target ${_target} cotired.") - endif() - endif() - set (${_targetMsgVar} "${_targetMsg}" PARENT_SCOPE) -endfunction() - -function (cotire_choose_target_languages _targetSourceDir _target _targetLanguagesVar) - set (_languages ${ARGN}) - set (_allSourceFiles "") - set (_allExcludedSourceFiles "") - set (_allCotiredSourceFiles "") - set (_targetLanguages "") - get_target_property(_targetType ${_target} TYPE) - get_target_property(_targetSourceFiles ${_target} SOURCES) - get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER) - get_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD) - set (_disableMsg "") - foreach (_language ${_languages}) - get_target_property(_prefixHeader ${_target} COTIRE_${_language}_PREFIX_HEADER) - get_target_property(_unityBuildFile ${_target} COTIRE_${_language}_UNITY_SOURCE) - if (_prefixHeader OR _unityBuildFile) - message (WARNING "Target ${_target} has already been cotired.") - set (${_targetLanguagesVar} "" PARENT_SCOPE) - return() - endif() - if (_targetUsePCH AND "${_language}" STREQUAL "C" OR "${_language}" STREQUAL "CXX") - cotire_check_precompiled_header_support("${_language}" "${_targetSourceDir}" "${_target}" _disableMsg) - if (_disableMsg) - set (_targetUsePCH FALSE) - endif() - endif() - set (_sourceFiles "") - set (_excludedSources "") - set (_cotiredSources "") - cotire_filter_language_source_files(${_language} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles}) - if (_sourceFiles OR _excludedSources OR _cotiredSources) - list (APPEND _targetLanguages ${_language}) - endif() - if (_sourceFiles) - list (APPEND _allSourceFiles ${_sourceFiles}) - endif() - if (_excludedSources) - list (APPEND _allExcludedSourceFiles ${_excludedSources}) - endif() - if (_cotiredSources) - list (APPEND _allCotiredSourceFiles ${_cotiredSources}) - endif() - endforeach() - set (_targetMsgLevel STATUS) - if (NOT _targetLanguages) - string (REPLACE ";" " or " _languagesStr "${_languages}") - set (_disableMsg "No ${_languagesStr} source files.") - set (_targetUsePCH FALSE) - set (_targetAddSCU FALSE) - endif() - if (_targetUsePCH) - list (LENGTH _allSourceFiles _numberOfSources) - if (_numberOfSources LESS ${COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES}) - set (_disableMsg "Too few applicable sources.") - set (_targetUsePCH FALSE) - elseif (_allCotiredSourceFiles) - cotire_get_source_file_property_values(_cotireTargets COTIRE_TARGET ${_allCotiredSourceFiles}) - list (REMOVE_DUPLICATES _cotireTargets) - string (REPLACE ";" ", " _cotireTargetsStr "${_cotireTargets}") - set (_disableMsg "Target sources already include a precompiled header for target(s) ${_cotireTargets}.") - set (_disableMsg "${_disableMsg} Set target property COTIRE_ENABLE_PRECOMPILED_HEADER to FALSE for targets ${_target},") - set (_disableMsg "${_disableMsg} ${_cotireTargetsStr} to get a workable build system.") - set (_targetMsgLevel SEND_ERROR) - set (_targetUsePCH FALSE) - elseif (XCODE AND _allExcludedSourceFiles) - # for Xcode, we cannot apply the precompiled header to individual sources, only to the whole target - set (_disableMsg "Exclusion of source files not supported for generator Xcode.") - set (_targetUsePCH FALSE) - elseif (XCODE AND "${_targetType}" STREQUAL "OBJECT_LIBRARY") - # for Xcode, we cannot apply the required PRE_BUILD action to generate the prefix header to an OBJECT_LIBRARY target - set (_disableMsg "Required PRE_BUILD action not supported for OBJECT_LIBRARY targets for generator Xcode.") - set (_targetUsePCH FALSE) - endif() - endif() - set_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER ${_targetUsePCH}) - set_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD ${_targetAddSCU}) - cotire_make_target_message(${_target} "${_targetLanguages}" "${_disableMsg}" _targetMsg ${_allExcludedSourceFiles}) - if (_targetMsg) - if (NOT DEFINED COTIREMSG_${_target}) - set (COTIREMSG_${_target} "") - endif() - if (COTIRE_VERBOSE OR NOT "${_targetMsgLevel}" STREQUAL "STATUS" OR - NOT "${COTIREMSG_${_target}}" STREQUAL "${_targetMsg}") - # cache message to avoid redundant messages on re-configure - set (COTIREMSG_${_target} "${_targetMsg}" CACHE INTERNAL "${_target} cotire message.") - message (${_targetMsgLevel} "${_targetMsg}") - endif() - endif() - set (${_targetLanguagesVar} ${_targetLanguages} PARENT_SCOPE) -endfunction() - -function (cotire_compute_unity_max_number_of_includes _target _maxIncludesVar) - set (_sourceFiles ${ARGN}) - get_target_property(_maxIncludes ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES) - if (_maxIncludes MATCHES "(-j|--parallel|--jobs) ?([0-9]*)") - set (_numberOfThreads "${CMAKE_MATCH_2}") - if (NOT _numberOfThreads) - # use all available cores - ProcessorCount(_numberOfThreads) - endif() - list (LENGTH _sourceFiles _numberOfSources) - math (EXPR _maxIncludes "(${_numberOfSources} + ${_numberOfThreads} - 1) / ${_numberOfThreads}") - # a unity source segment must not contain less than COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES files - if (_maxIncludes LESS ${COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES}) - set (_maxIncludes ${COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES}) - endif() - elseif (NOT _maxIncludes MATCHES "[0-9]+") - set (_maxIncludes 0) - endif() - if (COTIRE_DEBUG) - message (STATUS "${_target} unity source max includes = ${_maxIncludes}") - endif() - set (${_maxIncludesVar} ${_maxIncludes} PARENT_SCOPE) -endfunction() - -function (cotire_process_target_language _language _configurations _targetSourceDir _targetBinaryDir _target _wholeTargetVar _cmdsVar) - set (${_cmdsVar} "" PARENT_SCOPE) - get_target_property(_targetSourceFiles ${_target} SOURCES) - set (_sourceFiles "") - set (_excludedSources "") - set (_cotiredSources "") - cotire_filter_language_source_files(${_language} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles}) - if (NOT _sourceFiles AND NOT _cotiredSources) - return() - endif() - set (_wholeTarget ${${_wholeTargetVar}}) - set (_cmds "") - # check for user provided unity source file list - get_property(_unitySourceFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE_INIT) - if (NOT _unitySourceFiles) - set (_unitySourceFiles ${_sourceFiles} ${_cotiredSources}) - endif() - cotire_generate_target_script( - ${_language} "${_configurations}" "${_targetSourceDir}" "${_targetBinaryDir}" ${_target} _targetScript ${_unitySourceFiles}) - cotire_compute_unity_max_number_of_includes(${_target} _maxIncludes ${_unitySourceFiles}) - cotire_make_unity_source_file_paths(${_language} ${_target} ${_maxIncludes} _unityFiles ${_unitySourceFiles}) - if (NOT _unityFiles) - return() - endif() - cotire_setup_unity_generation_commands( - ${_language} "${_targetSourceDir}" ${_target} "${_targetScript}" "${_unityFiles}" _cmds ${_unitySourceFiles}) - cotire_make_prefix_file_path(${_language} ${_target} _prefixFile) - if (_prefixFile) - # check for user provided prefix header files - get_property(_prefixHeaderFiles TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER_INIT) - if (_prefixHeaderFiles) - cotire_setup_combine_command(${_language} "${_targetSourceDir}" "${_targetScript}" "${_prefixFile}" _cmds ${_prefixHeaderFiles}) - else() - cotire_setup_multi_prefix_generation_command( - ${_language} ${_target} "${_targetSourceDir}" "${_targetScript}" "${_prefixFile}" "${_unityFiles}" _cmds ${_unitySourceFiles}) - endif() - get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER) - if (_targetUsePCH) - cotire_make_pch_file_path(${_language} "${_targetSourceDir}" ${_target} _pchFile) - if (_pchFile) - cotire_setup_pch_file_compilation( - ${_language} ${_target} "${_targetSourceDir}" "${_targetScript}" "${_prefixFile}" "${_pchFile}" ${_sourceFiles}) - if (_excludedSources) - set (_wholeTarget FALSE) - endif() - cotire_setup_pch_file_inclusion( - ${_language} ${_target} ${_wholeTarget} "${_prefixFile}" "${_pchFile}" ${_sourceFiles}) - endif() - elseif (_prefixHeaderFiles) - # user provided prefix header must be included - cotire_setup_prefix_file_inclusion( - ${_language} ${_target} "${_prefixFile}" ${_sourceFiles}) - endif() - endif() - # mark target as cotired for language - set_property(TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE "${_unityFiles}") - if (_prefixFile) - set_property(TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER "${_prefixFile}") - if (_targetUsePCH AND _pchFile) - set_property(TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER "${_pchFile}") - endif() - endif() - set (${_wholeTargetVar} ${_wholeTarget} PARENT_SCOPE) - set (${_cmdsVar} ${_cmds} PARENT_SCOPE) -endfunction() - -function (cotire_setup_clean_target _target) - set (_cleanTargetName "${_target}${COTIRE_CLEAN_TARGET_SUFFIX}") - if (NOT TARGET "${_cleanTargetName}") - cotire_set_cmd_to_prologue(_cmds) - get_filename_component(_outputDir "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" ABSOLUTE) - list (APPEND _cmds -P "${COTIRE_CMAKE_MODULE_FILE}" "cleanup" "${_outputDir}" "${COTIRE_INTDIR}" "${_target}") - add_custom_target(${_cleanTargetName} COMMAND ${_cmds} WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - COMMENT "Cleaning up target ${_target} cotire generated files" VERBATIM) - cotire_init_target("${_cleanTargetName}") - endif() -endfunction() - -function (cotire_setup_pch_target _languages _configurations _target) - if ("${CMAKE_GENERATOR}" MATCHES "Makefiles|Ninja") - # for makefile based generators, we add a custom target to trigger the generation of the cotire related files - set (_dependsFiles "") - foreach (_language ${_languages}) - set (_props COTIRE_${_language}_PREFIX_HEADER COTIRE_${_language}_UNITY_SOURCE) - if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - # Visual Studio and Intel only create precompiled header as a side effect - list (INSERT _props 0 COTIRE_${_language}_PRECOMPILED_HEADER) - endif() - cotire_get_first_set_property_value(_dependsFile TARGET ${_target} ${_props}) - if (_dependsFile) - list (APPEND _dependsFiles "${_dependsFile}") - endif() - endforeach() - if (_dependsFiles) - set (_pchTargetName "${_target}${COTIRE_PCH_TARGET_SUFFIX}") - add_custom_target("${_pchTargetName}" DEPENDS ${_dependsFiles}) - cotire_init_target("${_pchTargetName}") - cotire_add_to_pch_all_target(${_pchTargetName}) - endif() - else() - # for other generators, we add the "clean all" target to clean up the precompiled header - cotire_setup_clean_all_target() - endif() -endfunction() - -function (cotire_setup_unity_build_target _languages _configurations _targetSourceDir _target) - get_target_property(_unityTargetName ${_target} COTIRE_UNITY_TARGET_NAME) - if (NOT _unityTargetName) - set (_unityTargetName "${_target}${COTIRE_UNITY_BUILD_TARGET_SUFFIX}") - endif() - # determine unity target sub type - get_target_property(_targetType ${_target} TYPE) - if ("${_targetType}" STREQUAL "EXECUTABLE") - get_target_property(_isWin32 ${_target} WIN32_EXECUTABLE) - get_target_property(_isMacOSX_Bundle ${_target} MACOSX_BUNDLE) - if (_isWin32) - set (_unityTargetSubType WIN32) - elseif (_isMacOSX_Bundle) - set (_unityTargetSubType MACOSX_BUNDLE) - else() - set (_unityTargetSubType "") - endif() - elseif (_targetType MATCHES "(STATIC|SHARED|MODULE|OBJECT)_LIBRARY") - set (_unityTargetSubType "${CMAKE_MATCH_1}") - else() - message (WARNING "Unknown target type ${_targetType}.") - return() - endif() - # determine unity target sources - get_target_property(_targetSourceFiles ${_target} SOURCES) - set (_unityTargetSources ${_targetSourceFiles}) - foreach (_language ${_languages}) - get_property(_unityFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE) - if (_unityFiles) - # remove source files that are included in the unity source - set (_sourceFiles "") - set (_excludedSources "") - set (_cotiredSources "") - cotire_filter_language_source_files(${_language} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles}) - if (_sourceFiles OR _cotiredSources) - list (REMOVE_ITEM _unityTargetSources ${_sourceFiles} ${_cotiredSources}) - endif() - # if cotire is applied to a target which has not been added in the current source dir, - # non-existing files cannot be referenced from the unity build target (this is a CMake restriction) - if (NOT "${_targetSourceDir}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") - set (_nonExistingFiles "") - foreach (_file ${_unityTargetSources}) - if (NOT EXISTS "${_file}") - list (APPEND _nonExistingFiles "${_file}") - endif() - endforeach() - if (_nonExistingFiles) - if (COTIRE_VERBOSE) - message (STATUS "removing non-existing ${_nonExistingFiles} from ${_unityTargetName}") - endif() - list (REMOVE_ITEM _unityTargetSources ${_nonExistingFiles}) - endif() - endif() - # add unity source files instead - list (APPEND _unityTargetSources ${_unityFiles}) - endif() - endforeach() - if (COTIRE_DEBUG) - message (STATUS "add ${_targetType} ${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources}") - endif() - # generate unity target - if ("${_targetType}" STREQUAL "EXECUTABLE") - add_executable(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources}) - else() - add_library(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources}) - endif() - set (_outputDirProperties - ARCHIVE_OUTPUT_DIRECTORY ARCHIVE_OUTPUT_DIRECTORY_ - LIBRARY_OUTPUT_DIRECTORY LIBRARY_OUTPUT_DIRECTORY_ - RUNTIME_OUTPUT_DIRECTORY RUNTIME_OUTPUT_DIRECTORY_) - # copy output location properties - if (COTIRE_UNITY_OUTPUT_DIRECTORY) - set (_setDefaultOutputDir TRUE) - if (IS_ABSOLUTE "${COTIRE_UNITY_OUTPUT_DIRECTORY}") - set (_outputDir "${COTIRE_UNITY_OUTPUT_DIRECTORY}") - else() - cotrie_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} ${_outputDirProperties}) - cotrie_resolve_config_properites("${_configurations}" _properties ${_outputDirProperties}) - foreach (_property ${_properties}) - get_property(_outputDir TARGET ${_target} PROPERTY ${_property}) - if (_outputDir) - get_filename_component(_outputDir "${_outputDir}/${COTIRE_UNITY_OUTPUT_DIRECTORY}" ABSOLUTE) - set_property(TARGET ${_unityTargetName} PROPERTY ${_property} "${_outputDir}") - set (_setDefaultOutputDir FALSE) - endif() - endforeach() - if (_setDefaultOutputDir) - get_filename_component(_outputDir "${CMAKE_CURRENT_BINARY_DIR}/${COTIRE_UNITY_OUTPUT_DIRECTORY}" ABSOLUTE) - endif() - endif() - if (_setDefaultOutputDir) - set_target_properties(${_unityTargetName} PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY "${_outputDir}" - LIBRARY_OUTPUT_DIRECTORY "${_outputDir}" - RUNTIME_OUTPUT_DIRECTORY "${_outputDir}") - endif() - else() - cotrie_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} ${_outputDirProperties}) - endif() - # copy output name - cotrie_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} - ARCHIVE_OUTPUT_NAME ARCHIVE_OUTPUT_NAME_ - LIBRARY_OUTPUT_NAME LIBRARY_OUTPUT_NAME_ - OUTPUT_NAME OUTPUT_NAME_ - RUNTIME_OUTPUT_NAME RUNTIME_OUTPUT_NAME_ - PREFIX _POSTFIX SUFFIX) - # copy compile stuff - cotrie_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} - COMPILE_DEFINITIONS COMPILE_DEFINITIONS_ - COMPILE_FLAGS Fortran_FORMAT - INCLUDE_DIRECTORIES - INTERPROCEDURAL_OPTIMIZATION INTERPROCEDURAL_OPTIMIZATION_ - POSITION_INDEPENDENT_CODE) - # copy link stuff - cotrie_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} - BUILD_WITH_INSTALL_RPATH INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH - LINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED - LINK_FLAGS LINK_FLAGS_ - LINK_INTERFACE_LIBRARIES LINK_INTERFACE_LIBRARIES_ - LINK_INTERFACE_MULTIPLICITY LINK_INTERFACE_MULTIPLICITY_ - LINK_SEARCH_START_STATIC LINK_SEARCH_END_STATIC - STATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_ - NO_SONAME SOVERSION VERSION) - # copy Qt stuff - cotrie_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} - AUTOMOC AUTOMOC_MOC_OPTIONS) - # copy cmake stuff - cotrie_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} - IMPLICIT_DEPENDS_INCLUDE_TRANSFORM RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK) - # copy platform stuff - if (APPLE) - cotrie_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} - BUNDLE BUNDLE_EXTENSION FRAMEWORK INSTALL_NAME_DIR MACOSX_BUNDLE_INFO_PLIST MACOSX_FRAMEWORK_INFO_PLIST - OSX_ARCHITECTURES OSX_ARCHITECTURES_ PRIVATE_HEADER PUBLIC_HEADER RESOURCE) - elseif (WIN32) - cotrie_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} - GNUtoMS - PDB_NAME PDB_NAME_ PDB_OUTPUT_DIRECTORY PDB_OUTPUT_DIRECTORY_ - VS_DOTNET_REFERENCES VS_GLOBAL_KEYWORD VS_GLOBAL_PROJECT_TYPES VS_KEYWORD - VS_SCC_AUXPATH VS_SCC_LOCALPATH VS_SCC_PROJECTNAME VS_SCC_PROVIDER - VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES) - endif() - # use output name from original target - get_target_property(_targetOutputName ${_unityTargetName} OUTPUT_NAME) - if (NOT _targetOutputName) - set_property(TARGET ${_unityTargetName} PROPERTY OUTPUT_NAME "${_target}") - endif() - # use export symbol from original target - cotire_get_target_export_symbol("${_target}" _defineSymbol) - if (_defineSymbol) - set_property(TARGET ${_unityTargetName} PROPERTY DEFINE_SYMBOL "${_defineSymbol}") - if ("${_targetType}" STREQUAL "EXECUTABLE") - set_property(TARGET ${_unityTargetName} PROPERTY ENABLE_EXPORTS TRUE) - endif() - endif() - cotire_init_target(${_unityTargetName}) - cotire_add_to_unity_all_target(${_unityTargetName}) - set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_TARGET_NAME "${_unityTargetName}") -endfunction(cotire_setup_unity_build_target) - -function (cotire_target _target) - set(_options "") - set(_oneValueArgs SOURCE_DIR BINARY_DIR) - set(_multiValueArgs LANGUAGES CONFIGURATIONS) - cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - if (NOT _option_SOURCE_DIR) - set (_option_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") - endif() - if (NOT _option_BINARY_DIR) - set (_option_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}") - endif() - if (NOT _option_LANGUAGES) - get_property (_option_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) - endif() - if (NOT _option_CONFIGURATIONS) - if (CMAKE_CONFIGURATION_TYPES) - set (_option_CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES}) - elseif (CMAKE_BUILD_TYPE) - set (_option_CONFIGURATIONS "${CMAKE_BUILD_TYPE}") - else() - set (_option_CONFIGURATIONS "None") - endif() - endif() - # trivial checks - get_target_property(_imported ${_target} IMPORTED) - if (_imported) - message (WARNING "Imported target ${_target} cannot be cotired.") - return() - endif() - # check if target needs to be cotired for build type - # when using configuration types, the test is performed at build time - cotire_init_cotire_target_properties(${_target}) - if (NOT CMAKE_CONFIGURATION_TYPES) - if (CMAKE_BUILD_TYPE) - list (FIND _option_CONFIGURATIONS "${CMAKE_BUILD_TYPE}" _index) - else() - list (FIND _option_CONFIGURATIONS "None" _index) - endif() - if (_index EQUAL -1) - if (COTIRE_DEBUG) - message (STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} not cotired (${_option_CONFIGURATIONS})") - endif() - return() - endif() - endif() - # choose languages that apply to the target - cotire_choose_target_languages("${_option_SOURCE_DIR}" "${_target}" _targetLanguages ${_option_LANGUAGES}) - if (NOT _targetLanguages) - return() - endif() - list (LENGTH _targetLanguages _numberOfLanguages) - if (_numberOfLanguages GREATER 1) - set (_wholeTarget FALSE) - else() - set (_wholeTarget TRUE) - endif() - set (_cmds "") - foreach (_language ${_targetLanguages}) - cotire_process_target_language("${_language}" "${_option_CONFIGURATIONS}" - "${_option_SOURCE_DIR}" "${_option_BINARY_DIR}" ${_target} _wholeTarget _cmd) - if (_cmd) - list (APPEND _cmds ${_cmd}) - endif() - endforeach() - get_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD) - if (_targetAddSCU) - cotire_setup_unity_build_target("${_targetLanguages}" "${_option_CONFIGURATIONS}" "${_option_SOURCE_DIR}" ${_target}) - endif() - get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER) - if (_targetUsePCH) - cotire_setup_target_pch_usage("${_targetLanguages}" "${_option_SOURCE_DIR}" ${_target} ${_wholeTarget} ${_cmds}) - cotire_setup_pch_target("${_targetLanguages}" "${_option_CONFIGURATIONS}" ${_target}) - endif() - get_target_property(_targetAddCleanTarget ${_target} COTIRE_ADD_CLEAN) - if (_targetAddCleanTarget) - cotire_setup_clean_target(${_target}) - endif() -endfunction() - -function (cotire_cleanup _binaryDir _cotireIntermediateDirName _targetName) - if (_targetName) - file (GLOB_RECURSE _cotireFiles "${_binaryDir}/${_targetName}*.*") - else() - file (GLOB_RECURSE _cotireFiles "${_binaryDir}/*.*") - endif() - # filter files in intermediate directory - set (_filesToRemove "") - foreach (_file ${_cotireFiles}) - get_filename_component(_dir "${_file}" PATH) - get_filename_component(_dirName "${_dir}" NAME) - if ("${_dirName}" STREQUAL "${_cotireIntermediateDirName}") - list (APPEND _filesToRemove "${_file}") - endif() - endforeach() - if (_filesToRemove) - if (COTIRE_VERBOSE) - message (STATUS "removing ${_filesToRemove}") - endif() - file (REMOVE ${_filesToRemove}) - endif() -endfunction() - -function (cotire_init_target _targetName) - if (COTIRE_TARGETS_FOLDER) - set_target_properties(${_targetName} PROPERTIES FOLDER "${COTIRE_TARGETS_FOLDER}") - endif() - if (MSVC_IDE) - set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE) - endif() -endfunction() - -function (cotire_add_to_pch_all_target _pchTargetName) - set (_targetName "${COTIRE_PCH_ALL_TARGET_NAME}") - if (NOT TARGET "${_targetName}") - add_custom_target("${_targetName}" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" VERBATIM) - cotire_init_target("${_targetName}") - endif() - cotire_setup_clean_all_target() - add_dependencies(${_targetName} ${_pchTargetName}) -endfunction() - -function (cotire_add_to_unity_all_target _unityTargetName) - set (_targetName "${COTIRE_UNITY_BUILD_ALL_TARGET_NAME}") - if (NOT TARGET "${_targetName}") - add_custom_target("${_targetName}" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" VERBATIM) - cotire_init_target("${_targetName}") - endif() - cotire_setup_clean_all_target() - add_dependencies(${_targetName} ${_unityTargetName}) -endfunction() - -function (cotire_setup_clean_all_target) - set (_targetName "${COTIRE_CLEAN_ALL_TARGET_NAME}") - if (NOT TARGET "${_targetName}") - cotire_set_cmd_to_prologue(_cmds) - list (APPEND _cmds -P "${COTIRE_CMAKE_MODULE_FILE}" "cleanup" "${CMAKE_BINARY_DIR}" "${COTIRE_INTDIR}") - add_custom_target(${_targetName} COMMAND ${_cmds} - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" COMMENT "Cleaning up all cotire generated files" VERBATIM) - cotire_init_target("${_targetName}") - endif() -endfunction() - -function (cotire) - set(_options "") - set(_oneValueArgs SOURCE_DIR BINARY_DIR) - set(_multiValueArgs LANGUAGES CONFIGURATIONS) - cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - set (_targets ${_option_UNPARSED_ARGUMENTS}) - if (NOT _option_SOURCE_DIR) - set (_option_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") - endif() - if (NOT _option_BINARY_DIR) - set (_option_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}") - endif() - foreach (_target ${_targets}) - if (TARGET ${_target}) - cotire_target(${_target} LANGUAGES ${_option_LANGUAGES} CONFIGURATIONS ${_option_CONFIGURATIONS} - SOURCE_DIR "${_option_SOURCE_DIR}" BINARY_DIR "${_option_BINARY_DIR}") - else() - message (WARNING "${_target} is not a target") - endif() - endforeach() -endfunction() - -if (CMAKE_SCRIPT_MODE_FILE) - - # cotire is being run in script mode - # locate -P on command args - set (COTIRE_ARGC -1) - foreach (_index RANGE ${CMAKE_ARGC}) - if (COTIRE_ARGC GREATER -1) - set (COTIRE_ARGV${COTIRE_ARGC} "${CMAKE_ARGV${_index}}") - math (EXPR COTIRE_ARGC "${COTIRE_ARGC} + 1") - elseif ("${CMAKE_ARGV${_index}}" STREQUAL "-P") - set (COTIRE_ARGC 0) - endif() - endforeach() - - # include target script if available - if ("${COTIRE_ARGV2}" MATCHES "\\.cmake$") - # the included target scripts sets up additional variables relating to the target (e.g., COTIRE_TARGET_SOURCES) - include("${COTIRE_ARGV2}") - endif() - - if (COTIRE_DEBUG) - message (STATUS "${COTIRE_ARGV0} ${COTIRE_ARGV1} ${COTIRE_ARGV2} ${COTIRE_ARGV3} ${COTIRE_ARGV4} ${COTIRE_ARGV5}") - endif() - - if (WIN32) - # for MSVC, compiler IDs may not always be set correctly - if (MSVC) - set (CMAKE_C_COMPILER_ID "MSVC") - set (CMAKE_CXX_COMPILER_ID "MSVC") - endif() - endif() - - if (NOT COTIRE_BUILD_TYPE) - set (COTIRE_BUILD_TYPE "None") - endif() - string (TOUPPER "${COTIRE_BUILD_TYPE}" _upperConfig) - set (_includeDirs ${COTIRE_TARGET_INCLUDE_DIRECTORIES_${_upperConfig}}) - set (_compileDefinitions ${COTIRE_TARGET_COMPILE_DEFINITIONS_${_upperConfig}}) - set (_compileFlags ${COTIRE_TARGET_COMPILE_FLAGS_${_upperConfig}}) - # check if target has been cotired for actual build type COTIRE_BUILD_TYPE - list (FIND COTIRE_TARGET_CONFIGURATION_TYPES "${COTIRE_BUILD_TYPE}" _index) - if (_index GREATER -1) - set (_sources ${COTIRE_TARGET_SOURCES}) - set (_sourcesDefinitions ${COTIRE_TARGET_SOURCES_COMPILE_DEFINITIONS_${_upperConfig}}) - else() - if (COTIRE_DEBUG) - message (STATUS "COTIRE_BUILD_TYPE=${COTIRE_BUILD_TYPE} not cotired (${COTIRE_TARGET_CONFIGURATION_TYPES})") - endif() - set (_sources "") - set (_sourcesDefinitions "") - endif() - set (_targetPreUndefs ${COTIRE_TARGET_PRE_UNDEFS}) - set (_targetPostUndefs ${COTIRE_TARGET_POST_UNDEFS}) - set (_sourcesPreUndefs ${COTIRE_TARGET_SOURCES_PRE_UNDEFS}) - set (_sourcesPostUndefs ${COTIRE_TARGET_SOURCES_POST_UNDEFS}) - - if ("${COTIRE_ARGV1}" STREQUAL "unity") - - cotire_select_unity_source_files("${COTIRE_ARGV3}" _sources ${_sources}) - cotire_generate_unity_source( - "${COTIRE_ARGV3}" ${_sources} - LANGUAGE "${COTIRE_TARGET_LANGUAGE}" - DEPENDS "${COTIRE_ARGV0}" "${COTIRE_ARGV2}" - SOURCES_COMPILE_DEFINITIONS ${_sourcesDefinitions} - PRE_UNDEFS ${_targetPreUndefs} - POST_UNDEFS ${_targetPostUndefs} - SOURCES_PRE_UNDEFS ${_sourcesPreUndefs} - SOURCES_POST_UNDEFS ${_sourcesPostUndefs}) - - elseif ("${COTIRE_ARGV1}" STREQUAL "prefix") - - set (_files "") - foreach (_index RANGE 4 ${COTIRE_ARGC}) - if (COTIRE_ARGV${_index}) - list (APPEND _files "${COTIRE_ARGV${_index}}") - endif() - endforeach() - - cotire_generate_prefix_header( - "${COTIRE_ARGV3}" ${_files} - COMPILER_EXECUTABLE "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}" - COMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1} - COMPILER_ID "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}" - COMPILER_VERSION "${COTIRE_${COTIRE_TARGET_LANGUAGE}_COMPILER_VERSION}" - LANGUAGE "${COTIRE_TARGET_LANGUAGE}" - DEPENDS "${COTIRE_ARGV0}" "${COTIRE_ARGV4}" ${COTIRE_TARGET_PREFIX_DEPENDS} - IGNORE_PATH "${COTIRE_TARGET_IGNORE_PATH};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH}" - INCLUDE_PATH ${COTIRE_TARGET_INCLUDE_PATH} - IGNORE_EXTENSIONS "${CMAKE_${COTIRE_TARGET_LANGUAGE}_SOURCE_FILE_EXTENSIONS};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS}" - INCLUDE_DIRECTORIES ${_includeDirs} - COMPILE_DEFINITIONS ${_compileDefinitions} - COMPILE_FLAGS ${_compileFlags}) - - elseif ("${COTIRE_ARGV1}" STREQUAL "precompile") - - set (_files "") - foreach (_index RANGE 5 ${COTIRE_ARGC}) - if (COTIRE_ARGV${_index}) - list (APPEND _files "${COTIRE_ARGV${_index}}") - endif() - endforeach() - - cotire_precompile_prefix_header( - "${COTIRE_ARGV3}" "${COTIRE_ARGV4}" "${COTIRE_ARGV5}" - COMPILER_EXECUTABLE "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}" - COMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1} - COMPILER_ID "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}" - COMPILER_VERSION "${COTIRE_${COTIRE_TARGET_LANGUAGE}_COMPILER_VERSION}" - LANGUAGE "${COTIRE_TARGET_LANGUAGE}" - INCLUDE_DIRECTORIES ${_includeDirs} - COMPILE_DEFINITIONS ${_compileDefinitions} - COMPILE_FLAGS ${_compileFlags}) - - elseif ("${COTIRE_ARGV1}" STREQUAL "combine") - - if (COTIRE_TARGET_LANGUAGE) - set (_startIndex 3) - else() - set (_startIndex 2) - endif() - set (_files "") - foreach (_index RANGE ${_startIndex} ${COTIRE_ARGC}) - if (COTIRE_ARGV${_index}) - list (APPEND _files "${COTIRE_ARGV${_index}}") - endif() - endforeach() - if (COTIRE_TARGET_LANGUAGE) - cotire_generate_unity_source(${_files} LANGUAGE "${COTIRE_TARGET_LANGUAGE}") - else() - cotire_generate_unity_source(${_files}) - endif() - - elseif ("${COTIRE_ARGV1}" STREQUAL "cleanup") - - cotire_cleanup("${COTIRE_ARGV2}" "${COTIRE_ARGV3}" "${COTIRE_ARGV4}") - - else() - message (FATAL_ERROR "Unknown cotire command \"${COTIRE_ARGV1}\".") - endif() - -else() - - # cotire is being run in include mode - # set up all variable and property definitions - - unset (COTIRE_C_COMPILER_VERSION CACHE) - unset (COTIRE_CXX_COMPILER_VERSION CACHE) - - if (NOT DEFINED COTIRE_DEBUG_INIT) - if (DEFINED COTIRE_DEBUG) - set (COTIRE_DEBUG_INIT ${COTIRE_DEBUG}) - else() - set (COTIRE_DEBUG_INIT FALSE) - endif() - endif() - option (COTIRE_DEBUG "Enable cotire debugging output?" ${COTIRE_DEBUG_INIT}) - - if (NOT DEFINED COTIRE_VERBOSE_INIT) - if (DEFINED COTIRE_VERBOSE) - set (COTIRE_VERBOSE_INIT ${COTIRE_VERBOSE}) - else() - set (COTIRE_VERBOSE_INIT FALSE) - endif() - endif() - option (COTIRE_VERBOSE "Enable cotire verbose output?" ${COTIRE_VERBOSE_INIT}) - - set (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS "inc;inl;ipp" CACHE STRING - "Ignore headers with the listed file extensions from the generated prefix header.") - - set (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH "" CACHE STRING - "Ignore headers from these directories when generating the prefix header.") - - set (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS "m;mm" CACHE STRING - "Ignore sources with the listed file extensions from the generated unity source.") - - set (COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES "3" CACHE STRING - "Minimum number of sources in target required to enable use of precompiled header.") - - if (NOT DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT) - if (DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES) - set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT ${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES}) - elseif ("${CMAKE_GENERATOR}" MATCHES "JOM|Ninja|Visual Studio") - # enable parallelization for generators that run multiple jobs by default - set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT "-j") - else() - set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT "0") - endif() - endif() - set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES "${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT}" CACHE STRING - "Maximum number of source files to include in a single unity source file.") - - if (NOT COTIRE_PREFIX_HEADER_FILENAME_SUFFIX) - set (COTIRE_PREFIX_HEADER_FILENAME_SUFFIX "_prefix") - endif() - if (NOT COTIRE_UNITY_SOURCE_FILENAME_SUFFIX) - set (COTIRE_UNITY_SOURCE_FILENAME_SUFFIX "_unity") - endif() - if (NOT COTIRE_INTDIR) - set (COTIRE_INTDIR "cotire") - endif() - if (NOT COTIRE_PCH_ALL_TARGET_NAME) - set (COTIRE_PCH_ALL_TARGET_NAME "all_pch") - endif() - if (NOT COTIRE_UNITY_BUILD_ALL_TARGET_NAME) - set (COTIRE_UNITY_BUILD_ALL_TARGET_NAME "all_unity") - endif() - if (NOT COTIRE_CLEAN_ALL_TARGET_NAME) - set (COTIRE_CLEAN_ALL_TARGET_NAME "clean_cotire") - endif() - if (NOT COTIRE_CLEAN_TARGET_SUFFIX) - set (COTIRE_CLEAN_TARGET_SUFFIX "_clean_cotire") - endif() - if (NOT COTIRE_PCH_TARGET_SUFFIX) - set (COTIRE_PCH_TARGET_SUFFIX "_pch") - endif() - if (NOT COTIRE_UNITY_BUILD_TARGET_SUFFIX) - set (COTIRE_UNITY_BUILD_TARGET_SUFFIX "_unity") - endif() - if (NOT DEFINED COTIRE_TARGETS_FOLDER) - set (COTIRE_TARGETS_FOLDER "cotire") - endif() - if (NOT DEFINED COTIRE_UNITY_OUTPUT_DIRECTORY) - if ("${CMAKE_GENERATOR}" MATCHES "Ninja") - # generated Ninja build files do not work if the unity target produces the same output file as the cotired target - set (COTIRE_UNITY_OUTPUT_DIRECTORY "unity") - else() - set (COTIRE_UNITY_OUTPUT_DIRECTORY "") - endif() - endif() - - # define cotire cache variables - - define_property( - CACHED_VARIABLE PROPERTY "COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH" - BRIEF_DOCS "Ignore headers from these directories when generating the prefix header." - FULL_DOCS - "The variable can be set to a semicolon separated list of include directories." - "If a header file is found in one of these directories or sub-directories, it will be excluded from the generated prefix header." - "If not defined, defaults to empty list." - ) - - define_property( - CACHED_VARIABLE PROPERTY "COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS" - BRIEF_DOCS "Ignore includes with the listed file extensions from the generated prefix header." - FULL_DOCS - "The variable can be set to a semicolon separated list of file extensions." - "If a header file extension matches one in the list, it will be excluded from the generated prefix header." - "Includes with an extension in CMAKE__SOURCE_FILE_EXTENSIONS are always ignored." - "If not defined, defaults to inc;inl;ipp." - ) - - define_property( - CACHED_VARIABLE PROPERTY "COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS" - BRIEF_DOCS "Exclude sources with the listed file extensions from the generated unity source." - FULL_DOCS - "The variable can be set to a semicolon separated list of file extensions." - "If a source file extension matches one in the list, it will be excluded from the generated unity source file." - "Source files with an extension in CMAKE__IGNORE_EXTENSIONS are always excluded." - "If not defined, defaults to m;mm." - ) - - define_property( - CACHED_VARIABLE PROPERTY "COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES" - BRIEF_DOCS "Minimum number of sources in target required to enable use of precompiled header." - FULL_DOCS - "The variable can be set to an integer > 0." - "If a target contains less than that number of source files, cotire will not enable the use of the precompiled header for the target." - "If not defined, defaults to 3." - ) - - define_property( - CACHED_VARIABLE PROPERTY "COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES" - BRIEF_DOCS "Maximum number of source files to include in a single unity source file." - FULL_DOCS - "This may be set to an integer >= 0." - "If 0, cotire will only create a single unity source file." - "If a target contains more than that number of source files, cotire will create multiple unity source files for it." - "Can be set to \"-j\" to optimize the count of unity source files for the number of available processor cores." - "Can be set to \"-j jobs\" to optimize the number of unity source files for the given number of simultaneous jobs." - "Is used to initialize the target property COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES." - "Defaults to \"-j\" for the generators Visual Studio, JOM or Ninja. Defaults to 0 otherwise." - ) - - # define cotire directory properties - - define_property( - DIRECTORY PROPERTY "COTIRE_ENABLE_PRECOMPILED_HEADER" - BRIEF_DOCS "Modify build command of cotired targets added in this directory to make use of the generated precompiled header." - FULL_DOCS - "See target property COTIRE_ENABLE_PRECOMPILED_HEADER." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_ADD_UNITY_BUILD" - BRIEF_DOCS "Add a new target that performs a unity build for cotired targets added in this directory." - FULL_DOCS - "See target property COTIRE_ADD_UNITY_BUILD." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_ADD_CLEAN" - BRIEF_DOCS "Add a new target that cleans all cotire generated files for cotired targets added in this directory." - FULL_DOCS - "See target property COTIRE_ADD_CLEAN." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_IGNORE_PATH" - BRIEF_DOCS "Ignore headers from these directories when generating the prefix header." - FULL_DOCS - "See target property COTIRE_PREFIX_HEADER_IGNORE_PATH." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PATH" - BRIEF_DOCS "Honor headers from these directories when generating the prefix header." - FULL_DOCS - "See target property COTIRE_PREFIX_HEADER_INCLUDE_PATH." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" - BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of each source file." - FULL_DOCS - "See target property COTIRE_UNITY_SOURCE_PRE_UNDEFS." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_UNITY_SOURCE_POST_UNDEFS" - BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file after the inclusion of each source file." - FULL_DOCS - "See target property COTIRE_UNITY_SOURCE_POST_UNDEFS." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES" - BRIEF_DOCS "Maximum number of source files to include in a single unity source file." - FULL_DOCS - "See target property COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES." - ) - - # define cotire target properties - - define_property( - TARGET PROPERTY "COTIRE_ENABLE_PRECOMPILED_HEADER" INHERITED - BRIEF_DOCS "Modify this target's build command to make use of the generated precompiled header." - FULL_DOCS - "If this property is set to TRUE, cotire will modify the build command to make use of the generated precompiled header." - "Irrespective of the value of this property, cotire will setup custom commands to generate the unity source and prefix header for the target." - "For makefile based generators cotire will also set up a custom target to manually invoke the generation of the precompiled header." - "The target name will be set to this target's name with the suffix _pch appended." - "Inherited from directory." - "Defaults to TRUE." - ) - - define_property( - TARGET PROPERTY "COTIRE_ADD_UNITY_BUILD" INHERITED - BRIEF_DOCS "Add a new target that performs a unity build for this target." - FULL_DOCS - "If this property is set to TRUE, cotire creates a new target of the same type that uses the generated unity source file instead of the target sources." - "Most of the relevant target properties will be copied from this target to the new unity build target." - "Target dependencies and linked libraries have to be manually set up for the new unity build target." - "The unity target name will be set to this target's name with the suffix _unity appended." - "Inherited from directory." - "Defaults to TRUE." - ) - - define_property( - TARGET PROPERTY "COTIRE_ADD_CLEAN" INHERITED - BRIEF_DOCS "Add a new target that cleans all cotire generated files for this target." - FULL_DOCS - "If this property is set to TRUE, cotire creates a new target that clean all files (unity source, prefix header, precompiled header)." - "The clean target name will be set to this target's name with the suffix _clean_cotire appended." - "Inherited from directory." - "Defaults to FALSE." - ) - - define_property( - TARGET PROPERTY "COTIRE_PREFIX_HEADER_IGNORE_PATH" INHERITED - BRIEF_DOCS "Ignore headers from these directories when generating the prefix header." - FULL_DOCS - "The property can be set to a list of directories." - "If a header file is found in one of these directories or sub-directories, it will be excluded from the generated prefix header." - "Inherited from directory." - "If not set, this property is initialized to \${CMAKE_SOURCE_DIR};\${CMAKE_BINARY_DIR}." - ) - - define_property( - TARGET PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PATH" INHERITED - BRIEF_DOCS "Honor headers from these directories when generating the prefix header." - FULL_DOCS - "The property can be set to a list of directories." - "If a header file is found in one of these directories or sub-directories, it will be included in the generated prefix header." - "If a header file is both selected by COTIRE_PREFIX_HEADER_IGNORE_PATH and COTIRE_PREFIX_HEADER_INCLUDE_PATH," - "the option which yields the closer relative path match wins." - "Inherited from directory." - "If not set, this property is initialized to the empty list." - ) - - define_property( - TARGET PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" INHERITED - BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of each target source file." - FULL_DOCS - "This may be set to a semicolon-separated list of preprocessor symbols." - "cotire will add corresponding #undef directives to the generated unit source file before each target source file." - "Inherited from directory." - "Defaults to empty string." - ) - - define_property( - TARGET PROPERTY "COTIRE_UNITY_SOURCE_POST_UNDEFS" INHERITED - BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file after the inclusion of each target source file." - FULL_DOCS - "This may be set to a semicolon-separated list of preprocessor symbols." - "cotire will add corresponding #undef directives to the generated unit source file after each target source file." - "Inherited from directory." - "Defaults to empty string." - ) - - define_property( - TARGET PROPERTY "COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES" INHERITED - BRIEF_DOCS "Maximum number of source files to include in a single unity source file." - FULL_DOCS - "This may be set to an integer > 0." - "If a target contains more than that number of source files, cotire will create multiple unity build files for it." - "If not set, cotire will only create a single unity source file." - "Inherited from directory." - "Defaults to empty." - ) - - define_property( - TARGET PROPERTY "COTIRE__UNITY_SOURCE_INIT" - BRIEF_DOCS "User provided unity source file to be used instead of the automatically generated one." - FULL_DOCS - "If set, cotire will only add the given file(s) to the generated unity source file." - "If not set, cotire will add all the target source files to the generated unity source file." - "The property can be set to a user provided unity source file." - "Defaults to empty." - ) - - define_property( - TARGET PROPERTY "COTIRE__PREFIX_HEADER_INIT" - BRIEF_DOCS "User provided prefix header file to be used instead of the automatically generated one." - FULL_DOCS - "If set, cotire will add the given header file(s) to the generated prefix header file." - "If not set, cotire will generate a prefix header by tracking the header files included by the unity source file." - "The property can be set to a user provided prefix header file (e.g., stdafx.h)." - "Defaults to empty." - ) - - define_property( - TARGET PROPERTY "COTIRE__UNITY_SOURCE" - BRIEF_DOCS "Read-only property. The generated unity source file(s)." - FULL_DOCS - "cotire sets this property to the path of the generated single computation unit source file for the target." - "Defaults to empty string." - ) - - define_property( - TARGET PROPERTY "COTIRE__PREFIX_HEADER" - BRIEF_DOCS "Read-only property. The generated prefix header file." - FULL_DOCS - "cotire sets this property to the full path of the generated language prefix header for the target." - "Defaults to empty string." - ) - - define_property( - TARGET PROPERTY "COTIRE__PRECOMPILED_HEADER" - BRIEF_DOCS "Read-only property. The generated precompiled header file." - FULL_DOCS - "cotire sets this property to the full path of the generated language precompiled header binary for the target." - "Defaults to empty string." - ) - - define_property( - TARGET PROPERTY "COTIRE_UNITY_TARGET_NAME" - BRIEF_DOCS "The name of the generated unity build target corresponding to this target." - FULL_DOCS - "This property can be set to the desired name of the unity target that will be created by cotire." - "If not set, the unity target name will be set to this target's name with the suffix _unity appended." - "After this target has been processed by cotire, the property is set to the actual name of the generated unity target." - "Defaults to empty string." - ) - - # define cotire source properties - - define_property( - SOURCE PROPERTY "COTIRE_EXCLUDED" - BRIEF_DOCS "Do not modify source file's build command." - FULL_DOCS - "If this property is set to TRUE, the source file's build command will not be modified to make use of the precompiled header." - "The source file will also be excluded from the generated unity source file." - "Source files that have their COMPILE_FLAGS property set will be excluded by default." - "Defaults to FALSE." - ) - - define_property( - SOURCE PROPERTY "COTIRE_DEPENDENCY" - BRIEF_DOCS "Add this source file to dependencies of the automatically generated prefix header file." - FULL_DOCS - "If this property is set to TRUE, the source file is added to dependencies of the generated prefix header file." - "If the file is modified, cotire will re-generate the prefix header source upon build." - "Defaults to FALSE." - ) - - define_property( - SOURCE PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" - BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of this source file." - FULL_DOCS - "This may be set to a semicolon-separated list of preprocessor symbols." - "cotire will add corresponding #undef directives to the generated unit source file before this file is included." - "Defaults to empty string." - ) - - define_property( - SOURCE PROPERTY "COTIRE_UNITY_SOURCE_POST_UNDEFS" - BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file after the inclusion of this source file." - FULL_DOCS - "This may be set to a semicolon-separated list of preprocessor symbols." - "cotire will add corresponding #undef directives to the generated unit source file after this file is included." - "Defaults to empty string." - ) - - define_property( - SOURCE PROPERTY "COTIRE_START_NEW_UNITY_SOURCE" - BRIEF_DOCS "Start a new unity source file which includes this source file as the first one." - FULL_DOCS - "If this property is set to TRUE, cotire will complete the current unity file and start a new one." - "The new unity source file will include this source file as the first one." - "This property essentially works as a separator for unity source files." - "Defaults to FALSE." - ) - - define_property( - SOURCE PROPERTY "COTIRE_TARGET" - BRIEF_DOCS "Read-only property. Mark this source file as cotired for the given target." - FULL_DOCS - "cotire sets this property to the name of target, that the source file's build command has been altered for." - "Defaults to empty string." - ) - - message (STATUS "cotire ${COTIRE_CMAKE_MODULE_VERSION} loaded.") - -endif() \ No newline at end of file diff --git a/contrib/ctest/README.md b/contrib/ctest/README.md deleted file mode 100644 index c4a54a8..0000000 --- a/contrib/ctest/README.md +++ /dev/null @@ -1,2 +0,0 @@ -Folder moved to <USCXML_SRC>/test/ctest. Some files remain here for backward compatibility with existing -build slaves. diff --git a/contrib/ctest/run-tests.cron b/contrib/ctest/run-tests.cron deleted file mode 100755 index b3a34fd..0000000 --- a/contrib/ctest/run-tests.cron +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -e -TEST_DIR="$( cd "$( dirname "$0" )" && pwd )" - -${TEST_DIR}/../../test/ctest/run-tests.cron \ No newline at end of file diff --git a/contrib/ctest/run-tests.vbs b/contrib/ctest/run-tests.vbs deleted file mode 100644 index 47511b2..0000000 --- a/contrib/ctest/run-tests.vbs +++ /dev/null @@ -1,15 +0,0 @@ -Set shell = CreateObject( "WScript.Shell" ) -Set fso = CreateObject("Scripting.FileSystemObject") -Set ip = CreateObject("WScript.Network") -Set procEnv = shell.Environment("Process") - -ME_NAME = Wscript.ScriptFullName -TEST_DIR = fso.GetParentFolderName(fso.GetFile(ME_NAME)) -ACTUAL_CMD = TEST_DIR + "\..\..\test\ctest\run-tests.vbs" - -if (NOT fso.FileExists(ACTUAL_CMD)) Then - MsgBox "Could not find actual script at " + ACTUAL_CMD - WScript.Quit -End If - -shell.Run ACTUAL_CMD \ No newline at end of file diff --git a/contrib/dom/idl/Attr.idl b/contrib/dom/idl/Attr.idl deleted file mode 100644 index 3964dd2..0000000 --- a/contrib/dom/idl/Attr.idl +++ /dev/null @@ -1,9 +0,0 @@ -interface Attr : Node { - readonly attribute DOMString name; - readonly attribute boolean specified; - attribute DOMString value; - // raises(DOMException) on setting - - // Introduced in DOM Level 2: - readonly attribute Element ownerElement; -}; diff --git a/contrib/dom/idl/CDATASection.idl b/contrib/dom/idl/CDATASection.idl deleted file mode 100644 index fee476e..0000000 --- a/contrib/dom/idl/CDATASection.idl +++ /dev/null @@ -1,2 +0,0 @@ -interface CDATASection : Text { -}; diff --git a/contrib/dom/idl/CharacterData.idl b/contrib/dom/idl/CharacterData.idl deleted file mode 100644 index 893392b..0000000 --- a/contrib/dom/idl/CharacterData.idl +++ /dev/null @@ -1,22 +0,0 @@ -interface CharacterData : Node { - attribute DOMString data; - // raises(DOMException) on setting - // raises(DOMException) on retrieval - - readonly attribute unsigned long length; - DOMString substringData(in unsigned long offset, - in unsigned long count) - raises(DOMException); - void appendData(in DOMString arg) - raises(DOMException); - void insertData(in unsigned long offset, - in DOMString arg) - raises(DOMException); - void deleteData(in unsigned long offset, - in unsigned long count) - raises(DOMException); - void replaceData(in unsigned long offset, - in unsigned long count, - in DOMString arg) - raises(DOMException); -}; diff --git a/contrib/dom/idl/Comment.idl b/contrib/dom/idl/Comment.idl deleted file mode 100644 index 3497628..0000000 --- a/contrib/dom/idl/Comment.idl +++ /dev/null @@ -1,2 +0,0 @@ -interface Comment : CharacterData { -}; diff --git a/contrib/dom/idl/DOMException.idl b/contrib/dom/idl/DOMException.idl deleted file mode 100644 index 9c596e2..0000000 --- a/contrib/dom/idl/DOMException.idl +++ /dev/null @@ -1,27 +0,0 @@ -exception DOMException { - - // ExceptionCode - const unsigned short INDEX_SIZE_ERR = 1; - const unsigned short DOMSTRING_SIZE_ERR = 2; - const unsigned short HIERARCHY_REQUEST_ERR = 3; - const unsigned short WRONG_DOCUMENT_ERR = 4; - const unsigned short INVALID_CHARACTER_ERR = 5; - const unsigned short NO_DATA_ALLOWED_ERR = 6; - const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7; - const unsigned short NOT_FOUND_ERR = 8; - const unsigned short NOT_SUPPORTED_ERR = 9; - const unsigned short INUSE_ATTRIBUTE_ERR = 10; - // Introduced in DOM Level 2: - const unsigned short INVALID_STATE_ERR = 11; - // Introduced in DOM Level 2: - const unsigned short SYNTAX_ERR = 12; - // Introduced in DOM Level 2: - const unsigned short INVALID_MODIFICATION_ERR = 13; - // Introduced in DOM Level 2: - const unsigned short NAMESPACE_ERR = 14; - // Introduced in DOM Level 2: - const unsigned short INVALID_ACCESS_ERR = 15; - - unsigned short code; - -}; diff --git a/contrib/dom/idl/DOMImplementation.idl b/contrib/dom/idl/DOMImplementation.idl deleted file mode 100644 index a91db5d..0000000 --- a/contrib/dom/idl/DOMImplementation.idl +++ /dev/null @@ -1,14 +0,0 @@ -interface DOMImplementation { - boolean hasFeature(in DOMString feature, - in DOMString version); - // Introduced in DOM Level 2: - DocumentType createDocumentType(in DOMString qualifiedName, - in DOMString publicId, - in DOMString systemId) - raises(DOMException); - // Introduced in DOM Level 2: - Document createDocument(in DOMString namespaceURI, - in DOMString qualifiedName, - in DocumentType doctype) - raises(DOMException); -}; diff --git a/contrib/dom/idl/Document.idl b/contrib/dom/idl/Document.idl deleted file mode 100644 index e80087a..0000000 --- a/contrib/dom/idl/Document.idl +++ /dev/null @@ -1,51 +0,0 @@ -interface Document : Node { - readonly attribute DocumentType doctype; - readonly attribute DOMImplementation implementation; - readonly attribute Element documentElement; - Element createElement(in DOMString tagName) - raises(DOMException); - DocumentFragment createDocumentFragment(); - Text createTextNode(in DOMString data); - Comment createComment(in DOMString data); - CDATASection createCDATASection(in DOMString data) - raises(DOMException); - ProcessingInstruction createProcessingInstruction(in DOMString target, - in DOMString data) - raises(DOMException); - Attr createAttribute(in DOMString name) - raises(DOMException); - EntityReference createEntityReference(in DOMString name) - raises(DOMException); - NodeList getElementsByTagName(in DOMString tagname); - // Introduced in DOM Level 2: - Node importNode(in Node importedNode, - in boolean deep) - raises(DOMException); - // Introduced in DOM Level 2: - [Custom] Element createElementNS(in DOMString namespaceURI, - in DOMString qualifiedName) - raises(DOMException); - // Introduced in DOM Level 2: - [Custom] Attr createAttributeNS(in DOMString namespaceURI, - in DOMString qualifiedName) - raises(DOMException); - // Introduced in DOM Level 2: - NodeList getElementsByTagNameNS(in DOMString namespaceURI, - in DOMString localName); - // Introduced in DOM Level 2: - Element getElementById(in DOMString elementId); - - // DOM Level 3 XPath (XPathEvaluator interface) -// XPathExpression createExpression(in DOMString expression, -// in XPathNSResolver resolver) -// raises(DOMException); -// XPathNSResolver createNSResolver(in Node nodeResolver); - [Custom] XPathResult evaluate(in DOMString expression, - in Node contextNode) -// in XPathNSResolver resolver, -// in unsigned short type, -// in XPathResult inResult) - raises(DOMException); - [CustomGetter] readonly attribute Storage localStorage; - -}; diff --git a/contrib/dom/idl/DocumentFragment.idl b/contrib/dom/idl/DocumentFragment.idl deleted file mode 100644 index a05fe77..0000000 --- a/contrib/dom/idl/DocumentFragment.idl +++ /dev/null @@ -1,2 +0,0 @@ -interface DocumentFragment : Node { -}; diff --git a/contrib/dom/idl/DocumentType.idl b/contrib/dom/idl/DocumentType.idl deleted file mode 100644 index 9a9e45d..0000000 --- a/contrib/dom/idl/DocumentType.idl +++ /dev/null @@ -1,11 +0,0 @@ -interface DocumentType : Node { - readonly attribute DOMString name; - readonly attribute NamedNodeMap entities; - readonly attribute NamedNodeMap notations; - // Introduced in DOM Level 2: - readonly attribute DOMString publicId; - // Introduced in DOM Level 2: - readonly attribute DOMString systemId; - // Introduced in DOM Level 2: - readonly attribute DOMString internalSubset; -}; diff --git a/contrib/dom/idl/Element.idl b/contrib/dom/idl/Element.idl deleted file mode 100644 index db175d2..0000000 --- a/contrib/dom/idl/Element.idl +++ /dev/null @@ -1,41 +0,0 @@ -interface Element : Node { - readonly attribute DOMString tagName; - DOMString getAttribute(in DOMString name); - void setAttribute(in DOMString name, - in DOMString value) - raises(DOMException); - void removeAttribute(in DOMString name) - raises(DOMException); - Attr getAttributeNode(in DOMString name); - Attr setAttributeNode(in Attr newAttr) - raises(DOMException); - Attr removeAttributeNode(in Attr oldAttr) - raises(DOMException); - NodeList getElementsByTagName(in DOMString name); - // Introduced in DOM Level 2: - DOMString getAttributeNS(in DOMString namespaceURI, - in DOMString localName); - // Introduced in DOM Level 2: - void setAttributeNS(in DOMString namespaceURI, - in DOMString qualifiedName, - in DOMString value) - raises(DOMException); - // Introduced in DOM Level 2: - void removeAttributeNS(in DOMString namespaceURI, - in DOMString localName) - raises(DOMException); - // Introduced in DOM Level 2: - Attr getAttributeNodeNS(in DOMString namespaceURI, - in DOMString localName); - // Introduced in DOM Level 2: - Attr setAttributeNodeNS(in Attr newAttr) - raises(DOMException); - // Introduced in DOM Level 2: - NodeList getElementsByTagNameNS(in DOMString namespaceURI, - in DOMString localName); - // Introduced in DOM Level 2: - boolean hasAttribute(in DOMString name); - // Introduced in DOM Level 2: - boolean hasAttributeNS(in DOMString namespaceURI, - in DOMString localName); -}; diff --git a/contrib/dom/idl/Entity.idl b/contrib/dom/idl/Entity.idl deleted file mode 100644 index 8b91cb8..0000000 --- a/contrib/dom/idl/Entity.idl +++ /dev/null @@ -1,5 +0,0 @@ -interface Entity : Node { - readonly attribute DOMString publicId; - readonly attribute DOMString systemId; - readonly attribute DOMString notationName; -}; diff --git a/contrib/dom/idl/EntityReference.idl b/contrib/dom/idl/EntityReference.idl deleted file mode 100644 index a211271..0000000 --- a/contrib/dom/idl/EntityReference.idl +++ /dev/null @@ -1,2 +0,0 @@ -interface EntityReference : Node { -}; diff --git a/contrib/dom/idl/NamedNodeMap.idl b/contrib/dom/idl/NamedNodeMap.idl deleted file mode 100644 index 6b4a38e..0000000 --- a/contrib/dom/idl/NamedNodeMap.idl +++ /dev/null @@ -1,19 +0,0 @@ -interface NamedNodeMap { - Node getNamedItem(in DOMString name); - Node setNamedItem(in Node arg) - raises(DOMException); - Node removeNamedItem(in DOMString name) - raises(DOMException); - Node item(in unsigned long index); - readonly attribute unsigned long length; - // Introduced in DOM Level 2: - Node getNamedItemNS(in DOMString namespaceURI, - in DOMString localName); - // Introduced in DOM Level 2: - Node setNamedItemNS(in Node arg) - raises(DOMException); - // Introduced in DOM Level 2: - Node removeNamedItemNS(in DOMString namespaceURI, - in DOMString localName) - raises(DOMException); -}; diff --git a/contrib/dom/idl/Node.idl b/contrib/dom/idl/Node.idl deleted file mode 100644 index f819441..0000000 --- a/contrib/dom/idl/Node.idl +++ /dev/null @@ -1,59 +0,0 @@ -interface Node { - - // NodeType - const unsigned short ELEMENT_NODE = 1; - const unsigned short ATTRIBUTE_NODE = 2; - const unsigned short TEXT_NODE = 3; - const unsigned short CDATA_SECTION_NODE = 4; - const unsigned short ENTITY_REFERENCE_NODE = 5; - const unsigned short ENTITY_NODE = 6; - const unsigned short PROCESSING_INSTRUCTION_NODE = 7; - const unsigned short COMMENT_NODE = 8; - const unsigned short DOCUMENT_NODE = 9; - const unsigned short DOCUMENT_TYPE_NODE = 10; - const unsigned short DOCUMENT_FRAGMENT_NODE = 11; - const unsigned short NOTATION_NODE = 12; - - readonly attribute DOMString nodeName; - attribute DOMString nodeValue; - // raises(DOMException) on setting - // raises(DOMException) on retrieval - - readonly attribute unsigned short nodeType; - readonly attribute Node parentNode; - readonly attribute NodeList childNodes; - readonly attribute Node firstChild; - readonly attribute Node lastChild; - readonly attribute Node previousSibling; - readonly attribute Node nextSibling; - [CustomGetter] readonly attribute NamedNodeMap attributes; - // Modified in DOM Level 2: - readonly attribute Document ownerDocument; - Node insertBefore(in Node newChild, - in Node refChild) - raises(DOMException); - Node replaceChild(in Node newChild, - in Node oldChild) - raises(DOMException); - Node removeChild(in Node oldChild) - raises(DOMException); - Node appendChild(in Node newChild) - raises(DOMException); - boolean hasChildNodes(); - Node cloneNode(in boolean deep); - // Modified in DOM Level 2: - void normalize(); - // Introduced in DOM Level 2: - boolean isSupported(in DOMString feature, - in DOMString version); - // Introduced in DOM Level 2: - readonly attribute DOMString namespaceURI; - // Introduced in DOM Level 2: - attribute DOMString prefix; - // raises(DOMException) on setting - - // Introduced in DOM Level 2: - readonly attribute DOMString localName; - // Introduced in DOM Level 2: - boolean hasAttributes(); -}; diff --git a/contrib/dom/idl/NodeList.idl b/contrib/dom/idl/NodeList.idl deleted file mode 100644 index cef2f90..0000000 --- a/contrib/dom/idl/NodeList.idl +++ /dev/null @@ -1,6 +0,0 @@ -[ - CustomIndexedGetter -] interface NodeList { - Node item(in unsigned long index); - readonly attribute unsigned long length; -}; diff --git a/contrib/dom/idl/NodeSet.idl b/contrib/dom/idl/NodeSet.idl deleted file mode 100644 index 4a32eaf..0000000 --- a/contrib/dom/idl/NodeSet.idl +++ /dev/null @@ -1,7 +0,0 @@ -[ - CustomIndexedGetter -] interface NodeSet { - void toDocumentOrder(); - readonly attribute unsigned long size; - readonly attribute boolean empty; -}; diff --git a/contrib/dom/idl/Notation.idl b/contrib/dom/idl/Notation.idl deleted file mode 100644 index 2d8666e..0000000 --- a/contrib/dom/idl/Notation.idl +++ /dev/null @@ -1,4 +0,0 @@ -interface Notation : Node { - readonly attribute DOMString publicId; - readonly attribute DOMString systemId; -}; diff --git a/contrib/dom/idl/ProcessingInstruction.idl b/contrib/dom/idl/ProcessingInstruction.idl deleted file mode 100644 index 3e90159..0000000 --- a/contrib/dom/idl/ProcessingInstruction.idl +++ /dev/null @@ -1,6 +0,0 @@ -interface ProcessingInstruction : Node { - readonly attribute DOMString target; - attribute DOMString data; - // raises(DOMException) on setting - -}; diff --git a/contrib/dom/idl/SCXMLEvent.idl b/contrib/dom/idl/SCXMLEvent.idl deleted file mode 100644 index 67f5070..0000000 --- a/contrib/dom/idl/SCXMLEvent.idl +++ /dev/null @@ -1,18 +0,0 @@ -[ - AttributesArePublic -] interface SCXMLEvent { - - // NodeType - const unsigned short INTERNAL = 1; - const unsigned short EXTERNAL = 2; - const unsigned short PLATFORM = 3; - - [CustomGetter, EmptyAsNull] readonly attribute DOMString type; - readonly attribute DOMString name; - [EmptyAsNull] readonly attribute DOMString origin; - [EmptyAsNull] readonly attribute DOMString origintype; - [EmptyAsNull] readonly attribute DOMString raw; - readonly attribute Node dom; - [CustomGetter] readonly attribute DOMString sendid; - [EmptyAsNull] readonly attribute DOMString invokeid; -}; diff --git a/contrib/dom/idl/Storage.idl b/contrib/dom/idl/Storage.idl deleted file mode 100644 index e709184..0000000 --- a/contrib/dom/idl/Storage.idl +++ /dev/null @@ -1,8 +0,0 @@ -[DontDestroyWrapped] interface Storage { - readonly attribute unsigned long length; - DOMString key(unsigned long index); - getter DOMString getItem(DOMString key); - setter creator void setItem(DOMString key, DOMString value); - deleter void removeItem(DOMString key); - void clear(); -}; diff --git a/contrib/dom/idl/Text.idl b/contrib/dom/idl/Text.idl deleted file mode 100644 index 159f3eb..0000000 --- a/contrib/dom/idl/Text.idl +++ /dev/null @@ -1,4 +0,0 @@ -interface Text : CharacterData { - Text splitText(in unsigned long offset) - raises(DOMException); -}; diff --git a/contrib/dom/idl/TypedArray.idl b/contrib/dom/idl/TypedArray.idl deleted file mode 100644 index f288361..0000000 --- a/contrib/dom/idl/TypedArray.idl +++ /dev/null @@ -1,307 +0,0 @@ -/* - * typedarray.idl - * - * TypedArray IDL definitions scraped from the Khronos specification. - * - * Original Khronos Working Draft: - * - * https://www.khronos.org/registry/typedarray/specs/latest/ - */ - -[ - Constructor(unsigned long length) -] -interface ArrayBuffer { - readonly attribute unsigned long byteLength; - attribute DOMString mimeType; - DOMString md5(); - DOMString base64(); - ArrayBuffer slice(long begin, optional long end); - static boolean isView(any value); -}; - -[NoInterfaceObject] -interface ArrayBufferView { - readonly attribute ArrayBuffer buffer; - readonly attribute unsigned long byteOffset; - readonly attribute unsigned long byteLength; -}; - - -// The 'byte' type does not currently exist in Web IDL. -// In this IDL, it should be a signed 8 bit type. -[ - CustomIndexedGetter, - CustomIndexedSetter, - Constructor(unsigned long length), - Constructor(Int8Array array), - Constructor(byte[] array), - Constructor(ArrayBuffer buffer, - optional unsigned long byteOffset, optional unsigned long length) -] -interface Int8Array : ArrayBufferView { - const long BYTES_PER_ELEMENT = 1; - - readonly attribute unsigned long length; - - getter byte get(unsigned long index); - setter void set(unsigned long index, byte value); - void set(Int8Array array, optional unsigned long offset); - void set(byte[] array, optional unsigned long offset); - Int8Array subarray(long start, optional long end); -}; -Int8Array implements ArrayBufferView; - - -// The 'unsigned byte' type does not currently exist in Web IDL, though -// 'octet' is equivalent. -[ - CustomIndexedGetter, - CustomIndexedSetter, - Constructor(unsigned long length), - Constructor(Uint8Array array), - Constructor(octet[] array), - Constructor(ArrayBuffer buffer, - optional unsigned long byteOffset, optional unsigned long length) -] -interface Uint8Array : ArrayBufferView{ - const long BYTES_PER_ELEMENT = 1; - - readonly attribute unsigned long length; - - getter octet get(unsigned long index); - setter void set(unsigned long index, octet value); - void set(Uint8Array array, optional unsigned long offset); - void set(octet[] array, optional unsigned long offset); - Uint8Array subarray(long start, optional long end); -}; -Uint8Array implements ArrayBufferView; - - -[ - CustomIndexedGetter, - CustomIndexedSetter, - Constructor(unsigned long length), - Constructor(Uint8ClampedArray array), - Constructor(octet[] array), - Constructor(ArrayBuffer buffer, - optional unsigned long byteOffset, optional unsigned long length) -] -interface Uint8ClampedArray : ArrayBufferView { - const long BYTES_PER_ELEMENT = 1; - - readonly attribute unsigned long length; - - getter octet get(unsigned long index); - setter void set(unsigned long index, [Clamp] octet value); - void set(Uint8ClampedArray array, optional unsigned long offset); - void set(octet[] array, optional unsigned long offset); - Uint8ClampedArray subarray(long start, optional long end); -}; -Uint8ClampedArray implements ArrayBufferView; - - -[ - CustomIndexedGetter, - CustomIndexedSetter, - Constructor(unsigned long length), - Constructor(Int16Array array), - Constructor(short[] array), - Constructor(ArrayBuffer buffer, - optional unsigned long byteOffset, optional unsigned long length) -] -interface Int16Array : ArrayBufferView { - const long BYTES_PER_ELEMENT = 2; - - readonly attribute unsigned long length; - - getter short get(unsigned long index); - setter void set(unsigned long index, short value); - void set(Int16Array array, optional unsigned long offset); - void set(short[] array, optional unsigned long offset); - Int16Array subarray(long start, optional long end); -}; -Int16Array implements ArrayBufferView; - - -[ - CustomIndexedGetter, - CustomIndexedSetter, - Constructor(unsigned long length), - Constructor(Uint16Array array), - Constructor(unsigned short[] array), - Constructor(ArrayBuffer buffer, - optional unsigned long byteOffset, optional unsigned long length) -] -interface Uint16Array : ArrayBufferView { - const long BYTES_PER_ELEMENT = 2; - - readonly attribute unsigned long length; - - getter unsigned short get(unsigned long index); - setter void set(unsigned long index, unsigned short value); - void set(Uint16Array array, optional unsigned long offset); - void set(unsigned short[] array, optional unsigned long offset); - Uint16Array subarray(long start, optional long end); -}; -Uint16Array implements ArrayBufferView; - - -[ - CustomIndexedGetter, - CustomIndexedSetter, - Constructor(unsigned long length), - Constructor(Int32Array array), - Constructor(long[] array), - Constructor(ArrayBuffer buffer, - optional unsigned long byteOffset, optional unsigned long length) -] -interface Int32Array : ArrayBufferView { - const long BYTES_PER_ELEMENT = 4; - - readonly attribute unsigned long length; - - getter long get(unsigned long index); - setter void set(unsigned long index, long value); - void set(Int32Array array, optional unsigned long offset); - void set(long[] array, optional unsigned long offset); - Int32Array subarray(long start, optional long end); -}; -Int32Array implements ArrayBufferView; - - -[ - CustomIndexedGetter, - CustomIndexedSetter, - Constructor(unsigned long length), - Constructor(Uint32Array array), - Constructor(unsigned long[] array), - Constructor(ArrayBuffer buffer, - optional unsigned long byteOffset, optional unsigned long length) -] -interface Uint32Array : ArrayBufferView { - const long BYTES_PER_ELEMENT = 4; - - readonly attribute unsigned long length; - - getter unsigned long get(unsigned long index); - setter void set(unsigned long index, unsigned long value); - void set(Uint32Array array, optional unsigned long offset); - void set(unsigned long[] array, optional unsigned long offset); - Uint32Array subarray(long start, optional long end); -}; -Uint32Array implements ArrayBufferView; - - -[ - CustomIndexedGetter, - CustomIndexedSetter, - Constructor(unsigned long length), - Constructor(Float32Array array), - Constructor(float[] array), - Constructor(ArrayBuffer buffer, - optional unsigned long byteOffset, optional unsigned long length) -] -interface Float32Array : ArrayBufferView { - const long BYTES_PER_ELEMENT = 4; - - readonly attribute unsigned long length; - - getter float get(unsigned long index); - setter void set(unsigned long index, float value); - void set(Float32Array array, optional unsigned long offset); - void set(float[] array, optional unsigned long offset); - Float32Array subarray(long start, optional long end); -}; -Float32Array implements ArrayBufferView; - - -[ - CustomIndexedGetter, - CustomIndexedSetter, - Constructor(unsigned long length), - Constructor(Float64Array array), - Constructor(double[] array), - Constructor(ArrayBuffer buffer, - optional unsigned long byteOffset, optional unsigned long length) -] -interface Float64Array : ArrayBufferView { - const long BYTES_PER_ELEMENT = 8; - - readonly attribute unsigned long length; - - getter double get(unsigned long index); - setter void set(unsigned long index, double value); - void set(Float64Array array, optional unsigned long offset); - void set(double[] array, optional unsigned long offset); - Float64Array subarray(long start, optional long end); -}; -Float64Array implements ArrayBufferView; - - -[ - Constructor(ArrayBuffer buffer, - optional unsigned long byteOffset, - optional unsigned long byteLength) -] -interface DataView : ArrayBufferView{ - // Gets the value of the given type at the specified byte offset - // from the start of the view. There is no alignment constraint; - // multi-byte values may be fetched from any offset. - // - // For multi-byte values, the optional littleEndian argument - // indicates whether a big-endian or little-endian value should be - // read. If false or undefined, a big-endian value is read. - // - // These methods raise an INDEX_SIZE_ERR exception if they would read - // beyond the end of the view. - byte getInt8(unsigned long byteOffset); - octet getUint8(unsigned long byteOffset); - short getInt16(unsigned long byteOffset, - optional boolean littleEndian); - unsigned short getUint16(unsigned long byteOffset, - optional boolean littleEndian); - long getInt32(unsigned long byteOffset, - optional boolean littleEndian); - unsigned long getUint32(unsigned long byteOffset, - optional boolean littleEndian); - float getFloat32(unsigned long byteOffset, - optional boolean littleEndian); - double getFloat64(unsigned long byteOffset, - optional boolean littleEndian); - - // Stores a value of the given type at the specified byte offset - // from the start of the view. There is no alignment constraint; - // multi-byte values may be stored at any offset. - // - // For multi-byte values, the optional littleEndian argument - // indicates whether the value should be stored in big-endian or - // little-endian byte order. If false or undefined, the value is - // stored in big-endian byte order. - // - // These methods throw exceptions if they would write beyond the end - // of the view. - void setInt8(unsigned long byteOffset, - byte value); - void setUint8(unsigned long byteOffset, - octet value); - void setInt16(unsigned long byteOffset, - short value, - optional boolean littleEndian); - void setUint16(unsigned long byteOffset, - unsigned short value, - optional boolean littleEndian); - void setInt32(unsigned long byteOffset, - long value, - optional boolean littleEndian); - void setUint32(unsigned long byteOffset, - unsigned long value, - optional boolean littleEndian); - void setFloat32(unsigned long byteOffset, - float value, - optional boolean littleEndian); - void setFloat64(unsigned long byteOffset, - double value, - optional boolean littleEndian); -}; -DataView implements ArrayBufferView; \ No newline at end of file diff --git a/contrib/dom/idl/XPathNSResolver.idl.deact b/contrib/dom/idl/XPathNSResolver.idl.deact deleted file mode 100644 index 3f52acb..0000000 --- a/contrib/dom/idl/XPathNSResolver.idl.deact +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. - * Copyright (C) 2006 Samuel Weinig - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -interface XPathNSResolver { - DOMString lookupNamespaceURI(in DOMString prefix); -}; - diff --git a/contrib/dom/idl/XPathResult.idl b/contrib/dom/idl/XPathResult.idl deleted file mode 100644 index 869207f..0000000 --- a/contrib/dom/idl/XPathResult.idl +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -interface XPathResult { - - readonly attribute double numberValue - getter raises (DOMException); - - readonly attribute DOMString stringValue - getter raises (DOMException); - - readonly attribute boolean booleanValue - getter raises (DOMException); - - [CustomGetter] readonly attribute Node singleNodeValue - getter raises (DOMException); - - NodeSet asNodeSet() - raises (DOMException); - boolean asBool() - raises (DOMException); - DOMString asString() - raises (DOMException); - double asNumber() - raises (DOMException); -}; - diff --git a/contrib/dom/scripts/CodeGenerator.pm b/contrib/dom/scripts/CodeGenerator.pm deleted file mode 100644 index fba0093..0000000 --- a/contrib/dom/scripts/CodeGenerator.pm +++ /dev/null @@ -1,752 +0,0 @@ -# -# WebKit IDL parser -# -# Copyright (C) 2005 Nikolas Zimmermann -# Copyright (C) 2006 Samuel Weinig -# Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. -# Copyright (C) 2009 Cameron McCormack -# Copyright (C) Research In Motion Limited 2010. All rights reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -package CodeGenerator; - -use strict; - -use File::Find; -use Data::Dumper; -use Carp qw/longmess cluck confess/; - -my $useDocument = ""; -my $useGenerator = ""; -my $useOutputDir = ""; -my $useOutputHeadersDir = ""; -my $useDirectories = ""; -my $useLayerOnTop = 0; -my $preprocessor; -my $writeDependencies = 0; -my $defines = ""; -my $targetIdlFilePath = ""; - -my $codeGenerator = 0; - -my $verbose = 0; - -my %numericTypeHash = ("int" => 1, "short" => 1, "long" => 1, "long long" => 1, - "unsigned int" => 1, "unsigned short" => 1, - "unsigned long" => 1, "unsigned long long" => 1, - "float" => 1, "double" => 1); - -my %primitiveTypeHash = ( "boolean" => 1, "void" => 1, "Date" => 1); - -my %stringTypeHash = ("DOMString" => 1, "AtomicString" => 1); - -my %nonPointerTypeHash = ("DOMTimeStamp" => 1, "CompareHow" => 1); - -my %svgAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1, - "SVGAnimatedEnumeration" => 1, "SVGAnimatedInteger" => 1, - "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1, - "SVGAnimatedNumber" => 1, "SVGAnimatedNumberList" => 1, - "SVGAnimatedPreserveAspectRatio" => 1, - "SVGAnimatedRect" => 1, "SVGAnimatedString" => 1, - "SVGAnimatedTransformList" => 1); - -my %svgAttributesInHTMLHash = ("class" => 1, "id" => 1, "onabort" => 1, "onclick" => 1, - "onerror" => 1, "onload" => 1, "onmousedown" => 1, - "onmousemove" => 1, "onmouseout" => 1, "onmouseover" => 1, - "onmouseup" => 1, "onresize" => 1, "onscroll" => 1, - "onunload" => 1); - -my %svgTypeNeedingTearOff = ( - "SVGAngle" => "SVGPropertyTearOff", - "SVGLength" => "SVGPropertyTearOff", - "SVGLengthList" => "SVGListPropertyTearOff", - "SVGMatrix" => "SVGPropertyTearOff", - "SVGNumber" => "SVGPropertyTearOff", - "SVGNumberList" => "SVGListPropertyTearOff", - "SVGPathSegList" => "SVGPathSegListPropertyTearOff", - "SVGPoint" => "SVGPropertyTearOff", - "SVGPointList" => "SVGListPropertyTearOff", - "SVGPreserveAspectRatio" => "SVGPropertyTearOff", - "SVGRect" => "SVGPropertyTearOff", - "SVGStringList" => "SVGStaticListPropertyTearOff", - "SVGTransform" => "SVGPropertyTearOff", - "SVGTransformList" => "SVGTransformListPropertyTearOff" -); - -my %svgTypeWithWritablePropertiesNeedingTearOff = ( - "SVGPoint" => 1, - "SVGMatrix" => 1 -); - -# Cache of IDL file pathnames. -my $idlFiles; - -# Default constructor -sub new -{ - my $object = shift; - my $reference = { }; - - $useDirectories = shift; - $useGenerator = shift; - $useOutputDir = shift; - $useOutputHeadersDir = shift; - $useLayerOnTop = shift; - $preprocessor = shift; - $writeDependencies = shift; - $verbose = shift; - $targetIdlFilePath = shift; - - bless($reference, $object); - return $reference; -} - -sub ProcessDocument -{ - my $object = shift; - $useDocument = shift; - $defines = shift; - - my $ifaceName = "CodeGenerator" . $useGenerator; - require $ifaceName . ".pm"; - - # Dynamically load external code generation perl module - $codeGenerator = $ifaceName->new($object, $useLayerOnTop, $preprocessor, $writeDependencies, $verbose, $targetIdlFilePath); - unless (defined($codeGenerator)) { - my $interfaces = $useDocument->interfaces; - foreach my $interface (@$interfaces) { - print "Skipping $useGenerator code generation for IDL interface \"" . $interface->name . "\".\n" if $verbose; - } - return; - } - - my $interfaces = $useDocument->interfaces; - foreach my $interface (@$interfaces) { - print "Generating $useGenerator bindings code for IDL interface \"" . $interface->name . "\"...\n" if $verbose; - $codeGenerator->GenerateInterface($interface, $defines); - $codeGenerator->WriteData($interface, $useOutputDir, $useOutputHeadersDir); - } -} - -sub FileNamePrefix -{ - my $object = shift; - - my $ifaceName = "CodeGenerator" . $useGenerator; - require $ifaceName . ".pm"; - - # Dynamically load external code generation perl module - $codeGenerator = $ifaceName->new($object, $useLayerOnTop, $preprocessor, $writeDependencies, $verbose); - return $codeGenerator->FileNamePrefix(); -} - -sub UpdateFile -{ - my $object = shift; - my $fileName = shift; - my $contents = shift; - - open FH, "> $fileName" or die "Couldn't open $fileName: $!\n"; - print FH $contents; - close FH; -} - -sub ForAllParents -{ - my $object = shift; - my $interface = shift; - my $beforeRecursion = shift; - my $afterRecursion = shift; - my $parentsOnly = shift; - - my $recurse; - $recurse = sub { - my $currentInterface = shift; - - for (@{$currentInterface->parents}) { - my $interfaceName = $_; - my $parentInterface = $object->ParseInterface($interfaceName, $parentsOnly); - - if ($beforeRecursion) { - &$beforeRecursion($parentInterface) eq 'prune' and next; - } - &$recurse($parentInterface); - &$afterRecursion($parentInterface) if $afterRecursion; - } - }; - - &$recurse($interface); -} - -sub AddMethodsConstantsAndAttributesFromParentInterfaces -{ - # Add to $interface all of its inherited interface members, except for those - # inherited through $interface's first listed parent. If an array reference - # is passed in as $parents, the names of all ancestor interfaces visited - # will be appended to the array. If $collectDirectParents is true, then - # even the names of $interface's first listed parent and its ancestors will - # be appended to $parents. - - my $object = shift; - my $interface = shift; - my $parents = shift; - my $collectDirectParents = shift; - - my $first = 1; - - $object->ForAllParents($interface, sub { - my $currentInterface = shift; - - if ($first) { - # Ignore first parent class, already handled by the generation itself. - $first = 0; - - if ($collectDirectParents) { - # Just collect the names of the direct ancestor interfaces, - # if necessary. - push(@$parents, $currentInterface->name); - $object->ForAllParents($currentInterface, sub { - my $currentInterface = shift; - push(@$parents, $currentInterface->name); - }, undef, 1); - } - - # Prune the recursion here. - return 'prune'; - } - - # Collect the name of this additional parent. - push(@$parents, $currentInterface->name) if $parents; - - print " | |> -> Inheriting " - . @{$currentInterface->constants} . " constants, " - . @{$currentInterface->functions} . " functions, " - . @{$currentInterface->attributes} . " attributes...\n | |>\n" if $verbose; - - # Add this parent's members to $interface. - push(@{$interface->constants}, @{$currentInterface->constants}); - push(@{$interface->functions}, @{$currentInterface->functions}); - push(@{$interface->attributes}, @{$currentInterface->attributes}); - }); -} - -sub FindSuperMethod -{ - my ($object, $interface, $functionName) = @_; - my $indexer; - $object->ForAllParents($interface, undef, sub { - my $currentInterface = shift; - foreach my $function (@{$currentInterface->functions}) { - if ($function->signature->name eq $functionName) { - $indexer = $function->signature; - return 'prune'; - } - } - }); - return $indexer; -} - -sub IDLFileForInterface -{ - my $object = shift; - my $interfaceName = shift; - - unless ($idlFiles) { - my $sourceRoot = $ENV{SOURCE_ROOT}; - my @directories = map { $_ = "$sourceRoot/$_" if $sourceRoot && -d "$sourceRoot/$_"; $_ } @$useDirectories; - - $idlFiles = { }; - - my $wanted = sub { - $idlFiles->{$1} = $File::Find::name if /^([A-Z].*)\.idl$/; - $File::Find::prune = 1 if /^\../; - }; - find($wanted, @directories); - $idlFiles->{"ArrayBufferView"} = "../idl/TypedArray.idl" - } - - # print Dumper($object); - # print Dumper($interfaceName); - - return $idlFiles->{$interfaceName}; -} - -sub ParseInterface -{ - my $object = shift; - my $interfaceName = shift; - my $parentsOnly = shift; - - return undef if $interfaceName eq 'Object'; - - # Step #1: Find the IDL file associated with 'interface' - my $filename = $object->IDLFileForInterface($interfaceName) - or confess("Could NOT find IDL file for interface \"$interfaceName\"!\n"); - - print " | |> Parsing parent IDL \"$filename\" for interface \"$interfaceName\"\n" if $verbose; - - # Step #2: Parse the found IDL file (in quiet mode). - my $parser = IDLParser->new(1); - my $document = $parser->Parse($filename, $defines, $preprocessor, $parentsOnly); - - foreach my $interface (@{$document->interfaces}) { - return $interface if $interface->name eq $interfaceName; - } - - die("Could NOT find interface definition for $interfaceName in $filename"); -} - -# Helpers for all CodeGenerator***.pm modules - -sub SkipIncludeHeader -{ - my $object = shift; - my $type = shift; - - return 1 if $primitiveTypeHash{$type}; - return 1 if $numericTypeHash{$type}; - return 1 if $type eq "String"; - - # Special case: SVGPoint.h / SVGNumber.h do not exist. - return 1 if $type eq "SVGPoint" or $type eq "SVGNumber"; - return 0; -} - -sub IsArrayType -{ - my $object = shift; - my $type = shift; - # FIXME: Add proper support for T[], T[]?, sequence. - return $type =~ m/\[\]$/; -} - -sub IsConstructorTemplate -{ - my $object = shift; - my $interface = shift; - my $template = shift; - - return $interface->extendedAttributes->{"ConstructorTemplate"} && $interface->extendedAttributes->{"ConstructorTemplate"} eq $template; -} - -sub IsPrimitiveType -{ - my $object = shift; - my $type = shift; - - return 1 if $primitiveTypeHash{$type}; - return 1 if $numericTypeHash{$type}; - return 0; -} - -sub IsStringType -{ - my $object = shift; - my $type = shift; - - return 1 if $stringTypeHash{$type}; - return 0; -} - -sub IsNonPointerType -{ - my $object = shift; - my $type = shift; - - return 1 if $nonPointerTypeHash{$type} or $primitiveTypeHash{$type} or $numericTypeHash{$type}; - return 0; -} - -sub IsSVGTypeNeedingTearOff -{ - my $object = shift; - my $type = shift; - - return 1 if exists $svgTypeNeedingTearOff{$type}; - return 0; -} - -sub IsSVGTypeWithWritablePropertiesNeedingTearOff -{ - my $object = shift; - my $type = shift; - - return 1 if $svgTypeWithWritablePropertiesNeedingTearOff{$type}; - return 0; -} - -sub IsTypedArrayType -{ - my $object = shift; - my $type = shift; - return 1 if (($type eq "ArrayBuffer") or ($type eq "ArrayBufferView")); - return 1 if (($type eq "Uint8Array") or ($type eq "Uint8ClampedArray") or ($type eq "Uint16Array") or ($type eq "Uint32Array")); - return 1 if (($type eq "Int8Array") or ($type eq "Int16Array") or ($type eq "Int32Array")); - return 1 if (($type eq "Float32Array") or ($type eq "Float64Array")); - return 0; -} - -sub IsRefPtrType -{ - my $object = shift; - my $type = shift; - - return 0 if $object->IsPrimitiveType($type); - return 0 if $type eq "DOMString"; - - return 1; -} - -sub GetSVGTypeNeedingTearOff -{ - my $object = shift; - my $type = shift; - - return $svgTypeNeedingTearOff{$type} if exists $svgTypeNeedingTearOff{$type}; - return undef; -} - -sub GetSVGWrappedTypeNeedingTearOff -{ - my $object = shift; - my $type = shift; - - my $svgTypeNeedingTearOff = $object->GetSVGTypeNeedingTearOff($type); - return $svgTypeNeedingTearOff if not $svgTypeNeedingTearOff; - - if ($svgTypeNeedingTearOff =~ /SVGPropertyTearOff/) { - $svgTypeNeedingTearOff =~ s/SVGPropertyTearOff//; - return $svgTypeNeedingTearOff; -} - -sub IsSVGAnimatedType -{ - my $object = shift; - my $type = shift; - - return 1 if $svgAnimatedTypeHash{$type}; - return 0; -} - -sub GetSequenceType -{ - my $object = shift; - my $type = shift; - - return $1 if $type =~ /^sequence<([\w\d_\s]+)>.*/; - return ""; -} - -sub GetArrayType -{ - my $object = shift; - my $type = shift; - - return $1 if $type =~ /^([\w\d_\s]+)\[\]/; - return ""; -} - -sub AssertNotSequenceType -{ - my $object = shift; - my $type = shift; - die "Sequences must not be used as the type of an attribute, constant or exception field." if $object->GetSequenceType($type); -} - -# Uppercase the first letter while respecting WebKit style guidelines. -# E.g., xmlEncoding becomes XMLEncoding, but xmlllang becomes Xmllang. -sub WK_ucfirst -{ - my ($object, $param) = @_; - my $ret = ucfirst($param); - $ret =~ s/Xml/XML/ if $ret =~ /^Xml[^a-z]/; - - return $ret; -} - -# Lowercase the first letter while respecting WebKit style guidelines. -# URL becomes url, but SetURL becomes setURL. -sub WK_lcfirst -{ - my ($object, $param) = @_; - my $ret = lcfirst($param); - $ret =~ s/hTML/html/ if $ret =~ /^hTML/; - $ret =~ s/uRL/url/ if $ret =~ /^uRL/; - $ret =~ s/jS/js/ if $ret =~ /^jS/; - $ret =~ s/xML/xml/ if $ret =~ /^xML/; - $ret =~ s/xSLT/xslt/ if $ret =~ /^xSLT/; - - # For HTML5 FileSystem API Flags attributes. - # (create is widely used to instantiate an object and must be avoided.) - $ret =~ s/^create/isCreate/ if $ret =~ /^create$/; - $ret =~ s/^exclusive/isExclusive/ if $ret =~ /^exclusive$/; - - return $ret; -} - -# Return the C++ namespace that a given attribute name string is defined in. -sub NamespaceForAttributeName -{ - my ($object, $interfaceName, $attributeName) = @_; - return "SVGNames" if $interfaceName =~ /^SVG/ && !$svgAttributesInHTMLHash{$attributeName}; - return "HTMLNames"; -} - -# Identifies overloaded functions and for each function adds an array with -# links to its respective overloads (including itself). -sub LinkOverloadedFunctions -{ - my ($object, $interface) = @_; - - my %nameToFunctionsMap = (); - foreach my $function (@{$interface->functions}) { - my $name = $function->signature->name; - $nameToFunctionsMap{$name} = [] if !exists $nameToFunctionsMap{$name}; - push(@{$nameToFunctionsMap{$name}}, $function); - $function->{overloads} = $nameToFunctionsMap{$name}; - $function->{overloadIndex} = @{$nameToFunctionsMap{$name}}; - } -} - -sub AttributeNameForGetterAndSetter -{ - my ($generator, $attribute) = @_; - - my $attributeName = $attribute->signature->name; - if ($attribute->signature->extendedAttributes->{"ImplementedAs"}) { - $attributeName = $attribute->signature->extendedAttributes->{"ImplementedAs"}; - } - my $attributeType = $attribute->signature->type; - - # Avoid clash with C++ keyword. - $attributeName = "_operator" if $attributeName eq "operator"; - - # SVGAElement defines a non-virtual "String& target() const" method which clashes with "virtual String target() const" in Element. - # To solve this issue the SVGAElement method was renamed to "svgTarget", take care of that when calling this method. - $attributeName = "svgTarget" if $attributeName eq "target" and $attributeType eq "SVGAnimatedString"; - - # SVG animated types need to use a special attribute name. - # The rest of the special casing for SVG animated types is handled in the language-specific code generators. - $attributeName .= "Animated" if $generator->IsSVGAnimatedType($attributeType); - - return $attributeName; -} - -sub ContentAttributeName -{ - my ($generator, $implIncludes, $interfaceName, $attribute) = @_; - - my $contentAttributeName = $attribute->signature->extendedAttributes->{"Reflect"}; - return undef if !$contentAttributeName; - - $contentAttributeName = lc $generator->AttributeNameForGetterAndSetter($attribute) if $contentAttributeName eq "VALUE_IS_MISSING"; - - my $namespace = $generator->NamespaceForAttributeName($interfaceName, $contentAttributeName); - - $implIncludes->{"${namespace}.h"} = 1; - return "WebCore::${namespace}::${contentAttributeName}Attr"; -} - -sub CanUseFastAttribute -{ - my ($generator, $attribute) = @_; - my $attributeType = $attribute->signature->type; - # HTMLNames::styleAttr cannot be used with fast{Get,Has}Attribute but we do not [Reflect] the - # style attribute. - - return !$generator->IsSVGAnimatedType($attributeType); -} - -sub GetterExpression -{ - my ($generator, $implIncludes, $interfaceName, $attribute) = @_; - - my $contentAttributeName = $generator->ContentAttributeName($implIncludes, $interfaceName, $attribute); - - if (!$contentAttributeName) { - return ($generator->WK_lcfirst($generator->AttributeNameForGetterAndSetter($attribute))); - } - - my $functionName; - if ($attribute->signature->extendedAttributes->{"URL"}) { - $functionName = "getURLAttribute"; - } elsif ($attribute->signature->type eq "boolean") { - my $namespace = $generator->NamespaceForAttributeName($interfaceName, $contentAttributeName); - if ($generator->CanUseFastAttribute($attribute)) { - $functionName = "fastHasAttribute"; - } else { - $functionName = "hasAttribute"; - } - } elsif ($attribute->signature->type eq "long") { - $functionName = "getIntegralAttribute"; - } elsif ($attribute->signature->type eq "unsigned long") { - $functionName = "getUnsignedIntegralAttribute"; - } else { - if ($contentAttributeName eq "WebCore::HTMLNames::idAttr") { - $functionName = "getIdAttribute"; - $contentAttributeName = ""; - } elsif ($contentAttributeName eq "WebCore::HTMLNames::nameAttr") { - $functionName = "getNameAttribute"; - $contentAttributeName = ""; - } elsif ($generator->CanUseFastAttribute($attribute)) { - $functionName = "fastGetAttribute"; - } else { - $functionName = "getAttribute"; - } - } - - return ($functionName, $contentAttributeName); -} - -sub SetterExpression -{ - my ($generator, $implIncludes, $interfaceName, $attribute) = @_; - - my $contentAttributeName = $generator->ContentAttributeName($implIncludes, $interfaceName, $attribute); - - if (!$contentAttributeName) { - return ("set" . $generator->WK_ucfirst($generator->AttributeNameForGetterAndSetter($attribute))); - } - - my $functionName; - if ($attribute->signature->type eq "boolean") { - $functionName = "setBooleanAttribute"; - } elsif ($attribute->signature->type eq "long") { - $functionName = "setIntegralAttribute"; - } elsif ($attribute->signature->type eq "unsigned long") { - $functionName = "setUnsignedIntegralAttribute"; - } else { - $functionName = "setAttribute"; - } - - return ($functionName, $contentAttributeName); -} - -sub GenerateConditionalString -{ - my $generator = shift; - my $node = shift; - - my $conditional = $node->extendedAttributes->{"Conditional"}; - if ($conditional) { - return $generator->GenerateConditionalStringFromAttributeValue($conditional); - } else { - return ""; - } -} - -sub GenerateConditionalStringFromAttributeValue -{ - my $generator = shift; - my $conditional = shift; - - my $operator = ($conditional =~ /&/ ? '&' : ($conditional =~ /\|/ ? '|' : '')); - if ($operator) { - # Avoid duplicated conditions. - my %conditions; - map { $conditions{$_} = 1 } split('\\' . $operator, $conditional); - return "ENABLE(" . join(") $operator$operator ENABLE(", sort keys %conditions) . ")"; - } else { - return "ENABLE(" . $conditional . ")"; - } -} - -sub GenerateCompileTimeCheckForEnumsIfNeeded -{ - my ($generator, $interface) = @_; - my $interfaceName = $interface->name; - my @checks = (); - # If necessary, check that all constants are available as enums with the same value. - if (!$interface->extendedAttributes->{"DoNotCheckConstants"} && @{$interface->constants}) { - push(@checks, "\n"); - foreach my $constant (@{$interface->constants}) { - my $reflect = $constant->extendedAttributes->{"Reflect"}; - my $name = $reflect ? $reflect : $constant->name; - my $value = $constant->value; - my $conditional = $constant->extendedAttributes->{"Conditional"}; - - if ($conditional) { - my $conditionalString = $generator->GenerateConditionalStringFromAttributeValue($conditional); - push(@checks, "#if ${conditionalString}\n"); - } - - if ($constant->extendedAttributes->{"ImplementedBy"}) { - push(@checks, "COMPILE_ASSERT($value == " . $constant->extendedAttributes->{"ImplementedBy"} . "::$name, ${interfaceName}Enum${name}IsWrongUseDoNotCheckConstants);\n"); - } else { - push(@checks, "COMPILE_ASSERT($value == ${interfaceName}::$name, ${interfaceName}Enum${name}IsWrongUseDoNotCheckConstants);\n"); - } - - if ($conditional) { - push(@checks, "#endif\n"); - } - } - push(@checks, "\n"); - } - return @checks; -} - -sub ExtendedAttributeContains -{ - my $object = shift; - my $callWith = shift; - return 0 unless $callWith; - my $keyword = shift; - - my @callWithKeywords = split /\s*\|\s*/, $callWith; - return grep { $_ eq $keyword } @callWithKeywords; -} - -# FIXME: This is backwards. We currently name the interface and the IDL files with the implementation name. We -# should use the real interface name in the IDL files and then use ImplementedAs to map this to the implementation name. -sub GetVisibleInterfaceName -{ - my $object = shift; - my $interface = shift; - my $interfaceName = $interface->extendedAttributes->{"InterfaceName"}; - return $interfaceName ? $interfaceName : $interface->name; -} - -sub IsSubType -{ - my $object = shift; - my $interface = shift; - my $interfaceName = shift; - my $found = 0; - - return 1 if $interfaceName eq $interface->name; - $object->ForAllParents($interface, sub { - my $currentInterface = shift; - if ($currentInterface->name eq $interfaceName) { - $found = 1; - } - return "prune" if $found; - }, 0, 1); - - return $found; -} - -1; diff --git a/contrib/dom/scripts/CodeGeneratorArabicaJSC.pm b/contrib/dom/scripts/CodeGeneratorArabicaJSC.pm deleted file mode 100644 index 64004d0..0000000 --- a/contrib/dom/scripts/CodeGeneratorArabicaJSC.pm +++ /dev/null @@ -1,1154 +0,0 @@ -# Copyright (C) 2005, 2006 Nikolas Zimmermann -# Copyright (C) 2006 Anders Carlsson -# Copyright (C) 2006 Samuel Weinig -# Copyright (C) 2006 Alexey Proskuryakov -# Copyright (C) 2006 Apple Computer, Inc. -# Copyright (C) 2007, 2008, 2009, 2012 Google Inc. -# Copyright (C) 2009 Cameron McCormack -# Copyright (C) Research In Motion Limited 2010. All rights reserved. -# Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) -# Copyright (C) 2012 Ericsson AB. All rights reserved. -# Copyright (C) 2013 Stefan Radomski -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. -# - -package CodeGeneratorArabicaJSC; - -use strict; -use Data::Dumper; -use Carp qw/longmess cluck confess/; - -use constant FileNamePrefix => "JSC"; - -my $codeGenerator; - - -my @headerContent = (); -my @implContentHeader = (); -my @implContent = (); -my @implContentDecls = (); -my %implIncludes = (); -my %headerIncludes = (); - -# Default .h template -my $headerTemplate = << 'EOF'; -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -EOF - -# Default constructor -sub new -{ - my $object = shift; - my $reference = { }; - - $codeGenerator = shift; - - bless($reference, $object); - return $reference; -} - -sub GenerateInterface -{ - my $object = shift; - my $interface = shift; - - # Start actual generation - if ($interface->extendedAttributes->{"Callback"}) { - die(); - $object->GenerateCallbackHeader($interface); - $object->GenerateCallbackImplementation($interface); - } else { - $object->GenerateHeader($interface); - $object->GenerateImplementation($interface); - } -} - -sub AddToImplIncludes -{ - my $header = shift; - my $conditional = shift; - - if ($header eq "JSCbool.h") { - confess(); - } - - if (not $conditional) { - $implIncludes{$header} = 1; - } elsif (not exists($implIncludes{$header})) { - $implIncludes{$header} = $conditional; - } else { - my $oldValue = $implIncludes{$header}; - if ($oldValue ne 1) { - my %newValue = (); - $newValue{$conditional} = 1; - foreach my $condition (split(/\|/, $oldValue)) { - $newValue{$condition} = 1; - } - $implIncludes{$header} = join("|", sort keys %newValue); - } - } -} - -sub GenerateHeader -{ - my $object = shift; - my $interface = shift; - my $interfaceName = $interface->name; - my $extensions = $interface->extendedAttributes; -# print Dumper($interface); - - # Copy contents of parent interfaces except the first parent. - my @parents; - $codeGenerator->AddMethodsConstantsAndAttributesFromParentInterfaces($interface, \@parents, 1); - $codeGenerator->LinkOverloadedFunctions($interface); - - # - Add default header template - push(@headerContent, GenerateHeaderContentHeader($interface)); - - $headerIncludes{"uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h"} = 1; - $headerIncludes{"DOM/Node.hpp"} = 1; - $headerIncludes{"JavaScriptCore/JavaScriptCore.h"} = 1; - - if ($interfaceName =~ /.*Array$/ or $interfaceName =~ /^ArrayBuffer.*/) { - $headerIncludes{"../../TypedArray.h"} = 1; - } - - foreach (@{$interface->parents}) { - my $parent = $_; - $headerIncludes{"JSC${parent}.h"} = 1; - } - - push(@headerContent, "#include \\n"); - foreach my $headerInclude (sort keys(%headerIncludes)) { - if ($headerInclude =~ /wtf|JavaScriptCore\/JavaScriptCore\.h/) { - push(@headerContent, "#include \<${headerInclude}\>\n"); - } else { - push(@headerContent, "#include \"${headerInclude}\"\n"); - } - } - - push(@headerContent, ""); - push(@headerContent, "\nnamespace Arabica {"); - push(@headerContent, "\nnamespace DOM {\n"); - - push(@headerContent, "\nclass JSC${interfaceName} {"); - push(@headerContent, "\npublic:"); - - my $wrapperType = IdlToWrapperType($interfaceName); - push(@headerContent, <{'DontDestroyWrapped'}) { - push(@headerContent, "\n JSC_DESTRUCTOR_KEEP_WRAPPED(JSC${interfaceName}Private);"); - } else { - push(@headerContent, "\n JSC_DESTRUCTOR(JSC${interfaceName}Private);"); - } - push(@headerContent, "\n"); - - - # callbacks for actual functions - my %generated; - foreach my $function (@{$interface->functions}) { - my $name = $function->signature->name; - my $attrExt = $function->signature->extendedAttributes; - my $custom = ($attrExt->{'Custom'} ? "Custom" : ""); - next if (exists $generated{"${name}${custom}Callback"}); - - push(@headerContent, "\n static JSValueRef ${name}${custom}Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception);"); - $generated{"${name}${custom}Callback"} = 1; - } - push(@headerContent, "\n"); - - if ($extensions->{'Constructors'}) { - push(@headerContent, "\n static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);"); - } - - # attribute getter and setters - foreach my $attribute (@{$interface->attributes}) { - my $name = $attribute->signature->name; - my $attrExt = $attribute->signature->extendedAttributes; - my $customGetter = ($attrExt->{'CustomGetter'} ? "Custom" : ""); - my $customSetter = ($attrExt->{'CustomSetter'} ? "Custom" : ""); - push(@headerContent, "\n static JSValueRef ${name}${customGetter}AttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception);"); - if (!IsReadonly($attribute)) { - push(@headerContent, "\n static bool ${name}${customSetter}AttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception);"); - } - } - - # const getters - foreach my $constant (@{$interface->constants}) { - my $name = $constant->name; - my $value = $constant->value; - my $getter = "${name}ConstGetter"; - push(@headerContent, "\n static JSValueRef ${getter}(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception);"); - } - - if ($extensions->{'CustomIndexedGetter'}) { - push(@headerContent, "\n static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName);"); - push(@headerContent, "\n static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);"); - } - if ($extensions->{'CustomIndexedSetter'}) { - push(@headerContent, "\n static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception);"); - } - push(@headerContent, "\n"); - - push(@headerContent, <{'CustomIndexedGetter'}) { - push(@headerContent, " classDef.hasProperty = hasPropertyCustomCallback;\n"); - push(@headerContent, " classDef.getProperty = getPropertyCustomCallback;\n"); - } - if ($extensions->{'CustomIndexedSetter'}) { - push(@headerContent, " classDef.setProperty = setPropertyCustomCallback;\n"); - } - if ($extensions->{'Constructors'}) { - push(@headerContent, " classDef.callAsConstructor = jsConstructor;\n"); - } - if (@{$interface->parents}) { - my $parent = @{$interface->parents}[0]; - push(@headerContent, " classDef.parentClass = JSC${parent}::getTmpl();\n"); - } - - push(@headerContent, <name; - my $extensions = $interface->extendedAttributes; - - push(@implContent, "\nJSStaticValue JSC${interfaceName}::staticValues[] = {"); - foreach my $attribute (@{$interface->attributes}) { - my $name = $attribute->signature->name; - my $attrExt = $attribute->signature->extendedAttributes; - my $customGetter = ($attrExt->{'CustomGetter'} ? "Custom" : ""); - my $customSetter = ($attrExt->{'CustomSetter'} ? "Custom" : ""); - my $getter = "${name}${customGetter}AttrGetter"; - my $setter = (IsReadonly($attribute) ? "0" : "${name}${customSetter}AttrSetter"); - my $flags = "kJSPropertyAttributeDontDelete"; - $flags .= " | kJSPropertyAttributeReadOnly" if (IsReadonly($attribute)); - push(@implContent, "\n { \"${name}\", ${getter}, ${setter}, ${flags} },"); - - } - - push(@implContent, "\n"); - foreach my $constant (@{$interface->constants}) { - my $name = $constant->name; - my $value = $constant->value; - my $getter = "${name}ConstGetter"; - my $flags = "kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly"; - push(@implContent, "\n { \"${name}\", ${getter}, 0, ${flags} },"); - } - - push(@implContent, "\n { 0, 0, 0, 0 }"); - push(@implContent, "\n};\n"); - - push(@implContent, "\nJSStaticFunction JSC${interfaceName}::staticFunctions[] = {"); - my %generated; - foreach my $function (@{$interface->functions}) { - my $name = $function->signature->name; - my $attrExt = $function->signature->extendedAttributes; - my $custom = ($attrExt->{'Custom'} ? "Custom" : ""); - my $callback = ${name}.${custom}."Callback"; - my $flags = "kJSPropertyAttributeDontDelete"; - next if (exists $generated{"${name}"}); - $generated{"${name}"} = 1; - push(@implContent, "\n { \"${name}\", ${callback}, ${flags} },"); - - } - push(@implContent, "\n { 0, 0, 0 }"); - push(@implContent, "\n};\n"); - -} - -sub GenerateImplementationAttributes -{ - my $interface = shift; - my $interfaceName = $interface->name; - my $extensions = $interface->extendedAttributes; - - # Generate property accessors for attributes. - for (my $index = 0; $index < @{$interface->attributes}; $index++) { - my $attribute = @{$interface->attributes}[$index]; - my $attrType = $attribute->signature->type; - my $attrName = $attribute->signature->name; - my $attrExt = $attribute->signature->extendedAttributes; - - my $wrapperRetType = IdlToWrapperType($attrType); - my $wrapperType = IdlToWrapperType($interfaceName); - my $wrapperGetter; - - if ($attrExt->{'AttributeIsPublic'} || $extensions->{'AttributesArePublic'}) { - $wrapperGetter = $attrName; - } else { - $wrapperGetter = IdlToWrapperAttrGetter($interface, $attribute)."()"; - - } - - # getter - if (!$attrExt->{'CustomGetter'}) { - push(@implContent, <nativeObj->${wrapperGetter}")); - - push(@implContent, <nativeObj->${wrapperGetter}); - - JSClassRef arbaicaRetClass = JSC${attrType}::getTmpl(); - - struct JSC${attrType}::JSC${attrType}Private* retPrivData = new JSC${attrType}::JSC${attrType}Private(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -END - } else { - my $JSCType = IdlToJSCType($attrType); - if ($JSCType eq "String") { - if ($attrExt->{'EmptyAsNull'}) { - push(@implContent, "\n if (privData->nativeObj->${wrapperGetter}.length() == 0)"); - push(@implContent, "\n return JSValueMakeUndefined(ctx);"); - } - push(@implContent, <nativeObj->${wrapperGetter}.c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -END - } elsif($JSCType eq "Number") { - push(@implContent, "\n return JSValueMakeNumber(ctx, privData->nativeObj->${wrapperGetter});\n"); - } elsif($JSCType eq "Boolean") { - push(@implContent, "\n return JSValueMakeBoolean(ctx, privData->nativeObj->${wrapperGetter});\n"); - } - } - push(@implContent, " }\n\n"); - } - - if (!$attrExt->{'CustomSetter'}) { - # setter - if (!IsReadonly($attribute)) { - push(@implContent, "\n bool JSC${interfaceName}::${attrName}AttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) {"); - push(@implContent, "\n struct JSC${interfaceName}Private* privData = (struct JSC${interfaceName}Private*)JSObjectGetPrivate(thisObj);\n"); - my $wrapperSetter = IdlToWrapperAttrSetter($attrName); - - my ($handle, $deref) = IdlToArgHandle($attribute->signature->type, "local".ucfirst($attribute->signature->name), "value"); - - push(@implContent, "\n $handle"); - push(@implContent, "\n privData->nativeObj->${wrapperSetter}(${deref});"); - push(@implContent, "\n return true;"); - push(@implContent, "\n }\n"); - - } - } - } - foreach my $constant (@{$interface->constants}) { - my $name = $constant->name; - my $value = $constant->value; - my $getter = "${name}ConstGetter"; - push(@implContent, " JSValueRef JSC${interfaceName}::${getter}(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) {"); - my $JSCType = IdlToJSCType($constant->type); - if ($JSCType eq "String") { - push(@implContent, - "\n JSStringRef jscString = JSStringCreateWithUTF8CString(" . $constant->value . ");". - "\n JSValueRef retVal = JSValueMakeString(ctx, jscString);". - "\n JSStringRelease(jscString);". - "\n return retVal;\n"); - } elsif($JSCType eq "Number") { - push(@implContent, "\n return JSValueMakeNumber(ctx, " . $constant->value . ");\n"); - } elsif($JSCType eq "Boolean") { - push(@implContent, "\n return JSValueMakeBoolean(ctx, " . $constant->value . ");\n"); - } - push(@implContent, <signature->type eq "NamedNodeMap"); - return "" if ($attribute->signature->type eq "NodeList"); - return "if (!$getterExpression) return JSValueMakeUndefined(ctx);"; -} - -sub GenerateConstructor -{ - my $interface = shift; - my $interfaceName = $interface->name; - my $extensions = $interface->extendedAttributes; - my $wrapperType = IdlToWrapperType($interfaceName); - - if ($extensions->{'Constructors'}) { - push(@implContent, <{'Constructors'}}) { - push (@variants, $fullCons); - - for (my $i = @{$fullCons}; $i > 0; $i--) { - my $variant = @{$fullCons}[$i]; - if ($variant->{'domSignature::isOptional'}) { - my $slice; - for (my $j = 0; $j < $i; $j++) { - push(@{$slice}, @{$fullCons}[$j]); - } - push (@variants, $slice); - } - } - - # sort to put most determinate signatures first - @variants = sort { - if (@{$b} != @{$a}) { - # more arguments are more determinant - @{$b} <=> @{$a}; - } else { - my @aWrap = grep(IsWrapperType($_->{'domSignature::type'}), @{$a}); - my @bWrap = grep(IsWrapperType($_->{'domSignature::type'}), @{$b}); - @bWrap <=> @aWrap; - } - } @variants; - } - foreach my $constructor (@variants) { - push(@implContent, " else if (argumentCount == " . @{$constructor}); - for (my $i = 0; $i < @{$constructor}; $i++) { - my $type = $constructor->[$i]->{'domSignature::type'}; - AddToImplIncludes("JSC".$type.".h") if (IsWrapperType($type)); - push(@implContent, " &&\n " . IdlToTypeChecker($type, "arguments[$i]")); - - } - - push(@implContent, ") {\n"); - my $constructorArgs; - my $constructorSep = ""; - for (my $i = 0; $i < @{$constructor}; $i++) { - my $type = $constructor->[$i]->{'domSignature::type'}; - my $name = $constructor->[$i]->{'domSignature::name'}; - my ($handle, $deref) = IdlToArgHandle($type, "local".ucfirst($name), "arguments[$i]", $interfaceName); - $constructorArgs .= ${constructorSep}.${deref}; - $constructorSep = ", "; - push(@implContent, "\n $handle"); - - } - push(@implContent, "\n localInstance = new ".IdlToWrapperType($interfaceName)."(${constructorArgs});"); - push(@implContent, "\n\n }"); - - } - push(@implContent, "\n"); - - push(@implContent, <nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; - } -END - } -} - -sub IdlToTypeChecker -{ - my $idlType = shift; - my $attr = shift; - - return "JSValueIsString(ctx, ${attr})" if ($idlType eq "DOMString"); - return "JSValueIsBoolean(ctx, ${attr})" if ($idlType eq "boolean"); - return "JSValueIsNumber(ctx, ${attr})" if ($idlType eq "short"); - return "JSValueIsNumber(ctx, ${attr})" if ($idlType eq "long"); - return "JSValueIsObject(ctx, ${attr})" if ($idlType eq "long[]"); - return "JSValueIsNumber(ctx, ${attr})" if ($idlType eq "unsigned short"); - return "JSValueIsNumber(ctx, ${attr})" if ($idlType eq "unsigned long"); - return "JSValueIsNumber(ctx, ${attr})" if ($idlType eq "byte"); - return "JSValueIsNumber(ctx, ${attr})" if ($idlType eq "octet"); - return "JSValueIsNumber(ctx, ${attr})" if ($idlType eq "double"); - return "JSValueIsObject(ctx, ${attr})" if ($idlType eq "double[]"); - return "JSValueIsNumber(ctx, ${attr})" if ($idlType eq "float"); - return "JSValueIsObject(ctx, ${attr})" if ($idlType eq "float[]"); - return "JSValueIsObject(ctx, ${attr})" if ($idlType eq "short[]"); - return "JSValueIsObject(ctx, ${attr})" if ($idlType eq "unsigned short[]"); - return "JSValueIsObject(ctx, ${attr})" if ($idlType eq "unsigned long[]"); - return "JSValueIsObject(ctx, ${attr})" if ($idlType eq "byte[]"); - return "JSValueIsObject(ctx, ${attr})" if ($idlType eq "octet[]"); - return "true" if ($idlType eq "any"); - - return "JSValueIsObject(ctx, ${attr}) && JSValueIsObjectOfClass(ctx, ${attr}, JSC${idlType}::getTmpl())" if (IsWrapperType($idlType)); - - print $idlType."\n"; - die(); - -} - - -sub GenerateImplementationFunctionCallbacks -{ - my $interface = shift; - my $interfaceName = $interface->name; - my $wrapperType = IdlToWrapperType($interfaceName); - - # Generate methods for functions. - my %generated; - foreach my $function (@{$interface->functions}) { - my $name = $function->signature->name; - my $attrExt = $function->signature->extendedAttributes; - my $retType = $function->signature->type; - my $wrapperRetType = IdlToWrapperType($retType); - - next if ($attrExt->{'Custom'}); - next if (exists $generated{"${name}Callback"}); - $generated{"${name}Callback"} = 1; - - # get all functions with this name - my @sameFunctions = grep($_->signature->name eq $name, @{$interface->functions}); - - # signature - push(@implContent, <parameters); - - for (my $i = @{$functionVar->parameters}; $i > 0; $i--) { - my $variant = @{$functionVar->parameters}[$i]; - if ($variant->{'domSignature::isOptional'}) { - my $slice; - for (my $j = 0; $j < $i; $j++) { - push(@{$slice}, @{$functionVar->parameters}[$j]); - } - push (@variants, $slice); - } - } - } - - # arguments to local handles - push(@implContent, "\n if (false) {"); - - # sort to put most determinate signatures first - @variants = sort { - if (@{$b} != @{$a}) { - # more arguments are more determinant - @{$b} <=> @{$a}; - } else { - my @aWrap = grep(IsWrapperType($_->{'domSignature::type'}), @{$a}); - my @bWrap = grep(IsWrapperType($_->{'domSignature::type'}), @{$b}); - @bWrap <=> @aWrap; - } - } @variants; - - foreach my $variant (@variants) { - my $parameterIndex = 0; - my @argList; - - push(@implContent, "\n } else if (argumentCount == " . @{$variant}); - for (my $i = 0; $i < @{$variant}; $i++) { - my $type = $variant->[$i]->{'domSignature::type'}; - push(@implContent, " &&\n " . IdlToTypeChecker($type, "arguments[$i]")); - } - push(@implContent, ")\n {"); - foreach my $parameter (@{$variant}) { - my $type = $parameter->type; - AddToImplIncludes("JSC".$type.".h") if (IsWrapperType($type)); - - my ($handle, $deref) = IdlToArgHandle($parameter->type, "local".ucfirst($parameter->name), "arguments[${parameterIndex}]"); - push(@implContent, "\n ${handle}"); -# push(@implContent, "\n if (exception)\n return JSValueMakeUndefined(ctx);"); - push(@argList, $deref); - - $parameterIndex++; - } - - # invoke native function with argument handles - my $retNativeType = IdlToNativeType($retType); - my $wrapperFunctionName = IdlToWrapperFunction($interface, $function); - if (IsWrapperType($retType)) { - push(@implContent, "\n\n ${retNativeType}* retVal = new $wrapperRetType(privData->nativeObj->${wrapperFunctionName}(" . join(", ", @argList) . "));\n"); - } elsif ($retNativeType eq "void") { - push(@implContent, "\n\n privData->nativeObj->${wrapperFunctionName}(" . join(", ", @argList) . ");\n"); - } else { - push(@implContent, "\n\n ${retNativeType} retVal = privData->nativeObj->${wrapperFunctionName}(" . join(", ", @argList) . ");\n"); - } - - # wrap return type if needed - if (IsWrapperType($retType)) { - AddToImplIncludes("JSC".$retType.".h"); - - push(@implContent, <dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; -END - } else { - my $toHandleString = NativeToHandle($retNativeType, "retVal", "jscRetVal"); - push(@implContent, "${toHandleString}\n return jscRetVal;"); - } - } - push(@implContent, <name; - my $visibleInterfaceName = $codeGenerator->GetVisibleInterfaceName($interface); - my $JSCInterfaceName = "JSC$interfaceName"; - my $wrapperType = IdlToWrapperType($interfaceName); - - AddToImplIncludes("JSC${interfaceName}.h"); - - # Find the super descriptor. - my $parentClass = ""; - my $parentClassTemplate = ""; - foreach (@{$interface->parents}) { - my $parent = $_; - AddToImplIncludes("JSC${parent}.h"); - $parentClass = "JSC" . $parent; - last; - } - - push(@implContent, "namespace Arabica {\n"); - push(@implContent, "namespace DOM {\n\n"); - push(@implContent, "JSClassRef JSC${interfaceName}::Tmpl;\n"); - - GenerateClassDefStatics($interface); - if ($interface->extendedAttributes->{'Constructors'}) { - GenerateConstructor($interface); - } - GenerateImplementationAttributes($interface); - GenerateImplementationFunctionCallbacks($interface); - - push(@implContent, <name; - my $prefix = FileNamePrefix; - my $headerFileName = "$outputHeadersDir/$prefix$name.h"; - my $implFileName = "$outputDir/$prefix$name.cpp"; - - # print "WriteData\n"; - # print Dumper($interface); - # exit(); - - # Update a .cpp file if the contents are changed. - my $contents = $headerTemplate; - $contents .= join "", @implContentHeader; - - my @includes = (); - my %implIncludeConditions = (); - foreach my $include (keys %implIncludes) { - my $condition = $implIncludes{$include}; - my $checkType = $include; - $checkType =~ s/\.h//; - next if $codeGenerator->IsSVGAnimatedType($checkType); - - if ($include =~ /wtf/) { - $include = "\<$include\>"; - } else { - $include = "\"$include\""; - } - - if ($condition eq 1) { - push @includes, $include; - } else { - push @{$implIncludeConditions{$condition}}, $include; - } - } - foreach my $include (sort @includes) { - $contents .= "#include $include\n"; - } - foreach my $condition (sort keys %implIncludeConditions) { - $contents .= "\n#if " . $codeGenerator->GenerateConditionalStringFromAttributeValue($condition) . "\n"; - foreach my $include (sort @{$implIncludeConditions{$condition}}) { - $contents .= "#include $include\n"; - } - $contents .= "#endif\n"; - } - - $contents .= "\n"; - $contents .= join "", @implContentDecls, @implContent; - $codeGenerator->UpdateFile($implFileName, $contents); - - %implIncludes = (); - @implContentHeader = (); - @implContentDecls = (); - @implContent = (); - - # Update a .h file if the contents are changed. - $contents = join "", @headerContent; - $codeGenerator->UpdateFile($headerFileName, $contents); - - @headerContent = (); -} - -sub IdlToJSCType -{ - my $idlType = shift; - return "Number" if ($idlType eq "unsigned short"); - return "Number" if ($idlType eq "short"); - return "Number" if ($idlType eq "unsigned long"); - return "Number" if ($idlType eq "long"); - return "String" if ($idlType eq "DOMString"); - return "Boolean" if ($idlType eq "boolean"); - return "Number" if ($idlType eq "double"); - die($idlType); -} - -sub IdlToNativeType -{ - my $idlType = shift; - - return IdlToWrapperType($idlType) if (IsWrapperType($idlType)); - - return "std::string" if ($idlType eq "DOMString"); - return "bool" if ($idlType eq "boolean"); - return "short" if ($idlType eq "short"); - return "long" if ($idlType eq "long"); - return "unsigned short" if ($idlType eq "unsigned short"); - return "unsigned long" if ($idlType eq "unsigned long"); - return "void" if ($idlType eq "void"); - return "char" if ($idlType eq "byte"); - return "unsigned char" if ($idlType eq "octet"); - return "double" if ($idlType eq "double"); - return "float" if ($idlType eq "float"); - die(${idlType}); -} - -sub NativeToHandle -{ - my $nativeType = shift; - my $nativeName = shift; - my $paramName = shift; - - return ("\n JSValueRef ${paramName} = JSValueMakeBoolean(ctx, ${nativeName});") if ($nativeType eq "bool"); - return ("\n JSValueRef ${paramName} = JSValueMakeNumber(ctx, ${nativeName});") if ($nativeType eq "double"); - return ("\n JSValueRef ${paramName} = JSValueMakeNumber(ctx, ${nativeName});") if ($nativeType eq "float"); - return ("\n JSValueRef ${paramName} = JSValueMakeNumber(ctx, ${nativeName});") if ($nativeType eq "short"); - return ("\n JSValueRef ${paramName} = JSValueMakeNumber(ctx, ${nativeName});") if ($nativeType eq "char"); - return ("\n JSValueRef ${paramName} = JSValueMakeNumber(ctx, ${nativeName});") if ($nativeType eq "unsigned char"); - return ("\n JSValueRef ${paramName} = JSValueMakeNumber(ctx, ${nativeName});") if ($nativeType eq "unsigned short"); - return ("\n JSValueRef ${paramName} = JSValueMakeNumber(ctx, ${nativeName});") if ($nativeType eq "unsigned long"); - return ("\n JSValueRef ${paramName} = JSValueMakeNumber(ctx, ${nativeName});") if ($nativeType eq "long"); - return ("\n JSValueRef ${paramName} = JSValueMakeUndefined(ctx);") if ($nativeType eq "void"); - return ( - "\n JSStringRef jscString = JSStringCreateWithUTF8CString(${nativeName}.c_str());". - "\n JSValueRef ${paramName} = JSValueMakeString(ctx, jscString);". - "\n JSStringRelease(jscString);" - ) if ($nativeType eq "std::string"); - - die($nativeType); -} - -sub IdlToWrapperType -{ - my $idlType = shift; - return "Arabica::XPath::XPathValue" if ($idlType eq "XPathResult"); - return "Arabica::XPath::NodeSet" if ($idlType eq "NodeSet"); - return "Arabica::DOM::Node" if ($idlType eq "Node"); - return "Arabica::DOM::Element" if ($idlType eq "Element"); - return "uscxml::Event" if ($idlType eq "SCXMLEvent"); - return "uscxml::Storage" if ($idlType eq "Storage"); - return "uscxml::ArrayBuffer" if ($idlType eq "ArrayBuffer"); - return "uscxml::ArrayBufferView" if ($idlType eq "ArrayBufferView"); - return "uscxml::Int8Array" if ($idlType eq "Int8Array"); - return "uscxml::Uint8Array" if ($idlType eq "Uint8Array"); - return "uscxml::Uint8ClampedArray" if ($idlType eq "Uint8ClampedArray"); - return "uscxml::Int16Array" if ($idlType eq "Int16Array"); - return "uscxml::Uint16Array" if ($idlType eq "Uint16Array"); - return "uscxml::Int32Array" if ($idlType eq "Int32Array"); - return "uscxml::Uint32Array" if ($idlType eq "Uint32Array"); - return "uscxml::Float32Array" if ($idlType eq "Float32Array"); - return "uscxml::Float64Array" if ($idlType eq "Float64Array"); - return "uscxml::DataView" if ($idlType eq "DataView"); - return "Arabica::DOM::${idlType}"; -} - -sub IdlToArgHandle -{ - my $type = shift; - my $localName = shift; - my $paramName = shift; - if ($type eq "DOMString") { - return ( - "JSStringRef stringRef${localName} = JSValueToStringCopy(ctx, ${paramName}, exception);\n" . - "\t\tsize_t ${localName}MaxSize = JSStringGetMaximumUTF8CStringSize(stringRef${localName});\n" . - "\t\tchar* ${localName}Buffer = new char[${localName}MaxSize];\n" . - "\t\tJSStringGetUTF8CString(stringRef${localName}, ${localName}Buffer, ${localName}MaxSize);\n" . - "\t\tstd::string ${localName}(${localName}Buffer);\n" . - "\t\tJSStringRelease(stringRef${localName});\n" . - "\t\tfree(${localName}Buffer);\n", - "${localName}") ; - } - return ("unsigned long ${localName} = (unsigned long)JSValueToNumber(ctx, ${paramName}, exception);", ${localName}) if ($type eq "unsigned long"); - return ("long ${localName} = (long)JSValueToNumber(ctx, ${paramName}, exception);", ${localName}) if ($type eq "long"); - return ("unsigned short ${localName} = (unsigned short)JSValueToNumber(ctx, ${paramName}, exception);", ${localName}) if ($type eq "unsigned short"); - return ("float ${localName} = (float)JSValueToNumber(ctx, ${paramName}, exception);", ${localName}) if ($type eq "float"); - return ("double ${localName} = (double)JSValueToNumber(ctx, ${paramName}, exception);", ${localName}) if ($type eq "double"); - return ("short ${localName} = (short)JSValueToNumber(ctx, ${paramName}, exception);", ${localName}) if ($type eq "short"); - return ("char ${localName} = (char)JSValueToNumber(ctx, ${paramName}, exception);", ${localName}) if ($type eq "byte"); - return ("unsigned char ${localName} = (unsigned char)JSValueToNumber(ctx, ${paramName}, exception);", ${localName}) if ($type eq "octet"); - return ("bool ${localName} = JSValueToBoolean(ctx, ${paramName});", ${localName}) if ($type eq "boolean"); - return ("void* ${localName} = JSObjectGetPrivate(JSValueToObject(ctx, ${paramName}, exception));", ${localName}) if ($type eq "any"); - - if ($type =~ /(.*)\[\]$/) { - my $nativeType = $1; - $nativeType = "char" if ($nativeType =~ /^byte$/); - $nativeType = "unsigned char" if ($nativeType =~ /^octet$/); - return ("\ - std::vector<${nativeType}> ${localName};\n\ - JSValueRef ${localName}Item; - unsigned int ${localName}Index = 0; - while((${localName}Item = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, ${paramName}, exception), ${localName}Index, exception))) {\ - if (JSValueIsUndefined(ctx, ${localName}Item))\ - break;\ - if (JSValueIsNumber(ctx,${localName}Item))\ - ${localName}.push_back(JSValueToNumber(ctx, ${localName}Item, exception));\ - ${localName}Index++;\ - }", "${localName}"); - } - # return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToNumber()->Value());\n}", "${localName}") if ($type eq "float[]"); - # return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToNumber()->Value());\n}", "${localName}") if ($type eq "double[]"); - # return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToInt32()->Value());\n}", "${localName}") if ($type eq "byte[]"); - # return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToInt32()->Value());\n}", "${localName}") if ($type eq "short[]"); - # return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToUint32()->Value());\n}", "${localName}") if ($type eq "unsigned short[]"); - # return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToUint32()->Value());\n}", "${localName}") if ($type eq "unsigned long[]"); - # return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToUint32()->Value());\n}", "${localName}") if ($type eq "octet[]"); - - if (IsWrapperType($type)) { - my $wrapperType = IdlToWrapperType($type); - if ($wrapperType =~ /^Arabica.*/) { - return ("${wrapperType}* ${localName} = ((struct JSC${type}::JSC${type}Private*)JSObjectGetPrivate(JSValueToObject(ctx, ${paramName}, exception)))->nativeObj;", "*${localName}"); - } else { - return ("${wrapperType}* ${localName} = ((struct JSC${type}::JSC${type}Private*)JSObjectGetPrivate(JSValueToObject(ctx, ${paramName}, exception)))->nativeObj;", "${localName}"); - } - } - - print $type."\n"; - die(); -} - -sub IdlToWrapperAttrGetter -{ - my $interface = shift; - my $attribute = shift; - - return $attribute->signature->name if ($interface->name eq "NodeSet" && $attribute->signature->name eq "size"); - return $attribute->signature->name if ($interface->name eq "NodeSet" && $attribute->signature->name eq "empty"); - return "asString" if ($interface->name eq "XPathResult" && $attribute->signature->name eq "stringValue"); - return "asBool" if ($interface->name eq "XPathResult" && $attribute->signature->name eq "booleanValue"); - return "asNumber" if ($interface->name eq "XPathResult" && $attribute->signature->name eq "numberValue"); - - return "get" . ucfirst($attribute->signature->name); -} - -sub IdlToWrapperFunction -{ - my $interface = shift; - my $function = shift; - - # if ($interface->name eq "NodeSet" && $function->signature->name eq "toDocumentOrder") { - # print Dumper($interface); - # print Dumper($function); - # } - - return "to_document_order" if ($interface->name eq "NodeSet" && $function->signature->name eq "toDocumentOrder"); - - return $function->signature->name; - -} - -sub IdlToWrapperAttrSetter -{ - my $idlAttr = shift; - return "set" . ucfirst($idlAttr); -} - - -sub IsReadonly -{ - my $attribute = shift; - my $attrExt = $attribute->signature->extendedAttributes; - return ($attribute->type =~ /readonly/ || $attrExt->{"JSCReadOnly"}) && !$attrExt->{"Replaceable"}; -} - - -sub GenerateArgumentsCountCheck -{ - my $function = shift; - my $interface = shift; - - my $numMandatoryParams = 0; - my $allowNonOptional = 1; - foreach my $param (@{$function->parameters}) { - if ($param->extendedAttributes->{"Optional"} or $param->isVariadic) { - $allowNonOptional = 0; - } else { - die "An argument must not be declared to be optional unless all subsequent arguments to the operation are also optional." if !$allowNonOptional; - $numMandatoryParams++; - } - } - - my $argumentsCountCheckString = ""; - if ($numMandatoryParams >= 1) { - $argumentsCountCheckString .= -" if (argumentCount < $numMandatoryParams) {\n". -" std::string errorMsg = \"Wrong number of arguments in " . $function->signature->name . "\";\n" . -" JSStringRef string = JSStringCreateWithUTF8CString(errorMsg.c_str());\n". -" JSValueRef exceptionString =JSValueMakeString(ctx, string);\n". -" JSStringRelease(string);\n". -" *exception = JSValueToObject(ctx, exceptionString, NULL);\n". -" return NULL;\n". -" }\n"; - } - return $argumentsCountCheckString; -} - -sub GenerateArgumentsTypeCheck -{ - my $function = shift; - my $interface = shift; - - my @andExpression = (); - - my $parameterIndex = 0; - foreach my $parameter (@{$function->parameters}) { - my $value = "arguments[$parameterIndex]"; - my $type = $parameter->type; - - # Only DOMString or wrapper types are checked. - # For DOMString with StrictTypeChecking only Null, Undefined and Object - # are accepted for compatibility. Otherwise, no restrictions are made to - # match the non-overloaded behavior. - # FIXME: Implement WebIDL overload resolution algorithm. - if ($codeGenerator->IsStringType($type)) { - if ($parameter->extendedAttributes->{"StrictTypeChecking"}) { - push(@andExpression, "(${value}->IsNull() || ${value}->IsUndefined() || ${value}->IsString() || ${value}->IsObject())"); - } - } elsif ($parameter->extendedAttributes->{"Callback"}) { - # For Callbacks only checks if the value is null or object. - push(@andExpression, "(${value}->IsNull() || ${value}->IsFunction())"); - } elsif ($codeGenerator->IsArrayType($type) || $codeGenerator->GetSequenceType($type)) { - if ($parameter->isNullable) { - push(@andExpression, "(${value}->IsNull() || ${value}->IsArray())"); - } else { - push(@andExpression, "(${value}->IsArray())"); - } - } elsif (IsWrapperType($type)) { - if ($parameter->isNullable) { - push(@andExpression, "(${value}->IsNull() || JSC${type}::hasInstance($value))"); - } else { - push(@andExpression, "(JSC${type}::hasInstance($value))"); - } - } - - $parameterIndex++; - } - my $res = join(" && ", @andExpression); - $res = "($res)" if @andExpression > 1; - return $res; -} - - -my %non_wrapper_types = ( - 'CompareHow' => 1, - 'DOMObject' => 1, - 'DOMString' => 1, - 'DOMString[]' => 1, - 'DOMTimeStamp' => 1, - 'Date' => 1, - 'Dictionary' => 1, - 'EventListener' => 1, - # FIXME: When EventTarget is an interface and not a mixin, fix this so that - # EventTarget is treated as a wrapper type. - 'EventTarget' => 1, - 'IDBKey' => 1, - 'JSObject' => 1, - 'MediaQueryListListener' => 1, - 'NodeFilter' => 1, - 'SerializedScriptValue' => 1, - 'any' => 1, - 'boolean' => 1, - 'double' => 1, - 'float' => 1, - 'int' => 1, - 'long long' => 1, - 'long' => 1, - 'long[]' => 1, - 'short' => 1, - 'short[]' => 1, - 'void' => 1, - 'byte' => 1, - 'octet' => 1, - 'char' => 1, - 'float[]' => 1, - 'byte[]' => 1, - 'float' => 1, - 'double[]' => 1, - 'double' => 1, - 'unsigned int' => 1, - 'unsigned long long' => 1, - 'unsigned long' => 1, - 'unsigned long[]' => 1, - 'unsigned short' => 1, - 'unsigned short[]' => 1, - 'octet[]' => 1 -); - -sub IsWrapperType -{ - my $type = shift; - return !($non_wrapper_types{$type}); -} - -sub GenerateHeaderContentHeader -{ - my $interface = shift; - my $JSCInterfaceName = "JSC" . $interface->name; - my $conditionalString = $codeGenerator->GenerateConditionalString($interface); - - my @headerContentHeader = split("\r", $headerTemplate); - - push(@headerContentHeader, "\n#if ${conditionalString}\n") if $conditionalString; - push(@headerContentHeader, "\n#ifndef ${JSCInterfaceName}" . "_h"); - push(@headerContentHeader, "\n#define ${JSCInterfaceName}" . "_h\n\n"); - return @headerContentHeader; -} - -1; diff --git a/contrib/dom/scripts/CodeGeneratorArabicaV8.pm b/contrib/dom/scripts/CodeGeneratorArabicaV8.pm deleted file mode 100644 index 0095f6b..0000000 --- a/contrib/dom/scripts/CodeGeneratorArabicaV8.pm +++ /dev/null @@ -1,1023 +0,0 @@ -# Copyright (C) 2005, 2006 Nikolas Zimmermann -# Copyright (C) 2006 Anders Carlsson -# Copyright (C) 2006 Samuel Weinig -# Copyright (C) 2006 Alexey Proskuryakov -# Copyright (C) 2006 Apple Computer, Inc. -# Copyright (C) 2007, 2008, 2009, 2012 Google Inc. -# Copyright (C) 2009 Cameron McCormack -# Copyright (C) Research In Motion Limited 2010. All rights reserved. -# Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) -# Copyright (C) 2012 Ericsson AB. All rights reserved. -# Copyright (C) 2013 Stefan Radomski -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. -# - -package CodeGeneratorArabicaV8; - -use strict; -use Data::Dumper; -use Carp qw/longmess cluck confess/; - -use constant FileNamePrefix => "V8"; - -my $codeGenerator; - - -my @headerContent = (); -my @implContentHeader = (); -my @implContent = (); -my @implContentDecls = (); -my %implIncludes = (); -my %headerIncludes = (); - -# Default .h template -my $headerTemplate = << 'EOF'; -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -EOF - -# Default constructor -sub new -{ - my $object = shift; - my $reference = { }; - - $codeGenerator = shift; - - bless($reference, $object); - return $reference; -} - -sub GenerateInterface -{ - my $object = shift; - my $interface = shift; - -# print Dumper($interface); - - # Start actual generation - if ($interface->extendedAttributes->{"Callback"}) { - die(); - $object->GenerateCallbackHeader($interface); - $object->GenerateCallbackImplementation($interface); - } else { - $object->GenerateHeader($interface); - $object->GenerateImplementation($interface); - } -} - -sub AddToImplIncludes -{ - my $header = shift; - my $conditional = shift; - - if ($header eq "V8bool.h") { - confess(); - } - - if (not $conditional) { - $implIncludes{$header} = 1; - } elsif (not exists($implIncludes{$header})) { - $implIncludes{$header} = $conditional; - } else { - my $oldValue = $implIncludes{$header}; - if ($oldValue ne 1) { - my %newValue = (); - $newValue{$conditional} = 1; - foreach my $condition (split(/\|/, $oldValue)) { - $newValue{$condition} = 1; - } - $implIncludes{$header} = join("|", sort keys %newValue); - } - } -} - -sub GenerateHeader -{ - my $object = shift; - my $interface = shift; - my $interfaceName = $interface->name; - my $extensions = $interface->extendedAttributes; -# print Dumper($extensions); - - # Copy contents of parent interfaces except the first parent. - my @parents; - $codeGenerator->AddMethodsConstantsAndAttributesFromParentInterfaces($interface, \@parents, 1); - $codeGenerator->LinkOverloadedFunctions($interface); - - # - Add default header template - push(@headerContent, GenerateHeaderContentHeader($interface)); - - $headerIncludes{"string"} = 1; - $headerIncludes{"uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h"} = 1; - $headerIncludes{"DOM/Node.hpp"} = 1; - $headerIncludes{"v8.h"} = 1; - - if ($interfaceName =~ /.*Array$/ or $interfaceName =~ /^ArrayBuffer.*/) { - $headerIncludes{"../../TypedArray.h"} = 1; - } - - foreach (@{$interface->parents}) { - my $parent = $_; - $headerIncludes{"V8${parent}.h"} = 1; - } - - push(@headerContent, "#include \\n"); - foreach my $headerInclude (sort keys(%headerIncludes)) { - if ($headerInclude =~ /wtf|v8\.h/) { - push(@headerContent, "#include \<${headerInclude}\>\n"); - } else { - push(@headerContent, "#include \"${headerInclude}\"\n"); - } - } - - push(@headerContent, ""); - push(@headerContent, "\nnamespace Arabica {"); - push(@headerContent, "\nnamespace DOM {\n"); - - push(@headerContent, "\nclass V8${interfaceName} {"); - push(@headerContent, "\npublic:"); - - my $wrapperType = IdlToWrapperType($interfaceName); - push(@headerContent, <{'DontDestroyWrapped'}) { - push(@headerContent, "\n V8_DESTRUCTOR_KEEP_WRAPPED(V8${interfaceName}Private);"); - } else { - push(@headerContent, "\n V8_DESTRUCTOR(V8${interfaceName}Private);"); - } - push(@headerContent, "\n static bool hasInstance(v8::Handle);"); - push(@headerContent, "\n"); - - # callbacks for actual functions - my %generated; - foreach my $function (@{$interface->functions}) { - my $name = $function->signature->name; - my $attrExt = $function->signature->extendedAttributes; - my $custom = ($attrExt->{'Custom'} ? "Custom" : ""); - next if (exists $generated{"${name}${custom}Callback"}); - push(@headerContent, "\n static v8::Handle ${name}${custom}Callback(const v8::Arguments&);"); - $generated{"${name}${custom}Callback"} = 1; - } - push(@headerContent, "\n"); - - # attribute getter and setters - foreach my $attribute (@{$interface->attributes}) { - my $name = $attribute->signature->name; - my $attrExt = $attribute->signature->extendedAttributes; - my $customGetter = ($attrExt->{'CustomGetter'} ? "Custom" : ""); - my $customSetter = ($attrExt->{'CustomSetter'} ? "Custom" : ""); - push(@headerContent, "\n static v8::Handle ${name}${customGetter}AttrGetter(v8::Local property, const v8::AccessorInfo& info);"); - if (!IsReadonly($attribute)) { - push(@headerContent, "\n static void ${name}${customSetter}AttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info);"); - } - } - - if ($extensions->{'CustomIndexedGetter'}) { - push(@headerContent, "\n static v8::Handle indexedPropertyCustomGetter(uint32_t, const v8::AccessorInfo&);"); - } - if ($extensions->{'CustomIndexedSetter'}) { - push(@headerContent, "\n static v8::Handle indexedPropertyCustomSetter(uint32_t, v8::Local, const v8::AccessorInfo&);"); - } - push(@headerContent, "\n"); - - GenerateClassPrototypeHeader($interface); - - push(@headerContent, "\n};\n\n}\n}\n\n"); - push(@headerContent, "#endif // V8${interfaceName}" . "_h\n"); - -} - -# -# Write class template prototype constructor -# -sub GenerateClassPrototypeHeader -{ - my $interface = shift; - my $interfaceName = $interface->name; - my $extensions = $interface->extendedAttributes; - - if ($extensions->{'Constructors'}) { - - push(@headerContent, "\n"); - push(@headerContent, " static v8::Handle constructor(const v8::Arguments&);\n"); - push(@headerContent, " static v8::Persistent Constr;\n"); - push(@headerContent, < getConstructor() { - if (Constr.IsEmpty()) { - v8::Handle constr = v8::FunctionTemplate::New(constructor); - Constr = v8::Persistent::New(constr); - } - return Constr; - } -END - } - - push(@headerContent, "\n static v8::Persistent Tmpl;\n"); - push(@headerContent, < getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("${interfaceName}")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); -END - - push(@headerContent, "\n"); - foreach my $attribute (@{$interface->attributes}) { - my $name = $attribute->signature->name; - my $attrExt = $attribute->signature->extendedAttributes; - my $customGetter = ($attrExt->{'CustomGetter'} ? "Custom" : ""); - my $customSetter = ($attrExt->{'CustomSetter'} ? "Custom" : ""); - my $getter = "V8${interfaceName}::${name}${customGetter}AttrGetter"; - my $setter = (IsReadonly($attribute) ? "0" : "V8${interfaceName}::${name}${customSetter}AttrSetter"); - push(@headerContent, <SetAccessor(v8::String::NewSymbol("${name}"), ${getter}, ${setter}, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); -END - } - - if ($extensions->{'CustomIndexedGetter'} || $extensions->{'CustomIndexedSetter'}) { - my $indexedGetter = ($extensions->{'CustomIndexedGetter'} ? "V8${interfaceName}::indexedPropertyCustomGetter" : 0); - my $indexedSetter = ($extensions->{'CustomIndexedSetter'} ? "V8${interfaceName}::indexedPropertyCustomSetter" : 0); - push(@headerContent, "\n instance->SetIndexedPropertyHandler(${indexedGetter}, ${indexedSetter});"); - } - - push(@headerContent, "\n"); - my %generated; - foreach my $function (@{$interface->functions}) { - my $name = $function->signature->name; - my $attrExt = $function->signature->extendedAttributes; - my $custom = ($attrExt->{'Custom'} ? "Custom" : ""); - next if (exists $generated{"${name}"}); - $generated{"${name}"} = 1; - push(@headerContent, <Set(v8::String::NewSymbol("${name}"), - v8::FunctionTemplate::New(V8${interfaceName}::${name}${custom}Callback, v8::Undefined()), static_cast(v8::DontDelete)); -END - } - - push(@headerContent, "\n"); - foreach my $constant (@{$interface->constants}) { - my $name = $constant->name; - my $value = $constant->value; - my $type = IdlToV8Type($constant->type); - push(@headerContent, <Set(v8::String::NewSymbol("${name}"), ${type}::New(${value}), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("${name}"), ${type}::New(${value}), static_cast(v8::ReadOnly | v8::DontEnum)); -END - } - - push(@headerContent, "\n"); - if (@{$interface->parents}) { - my $parent = @{$interface->parents}[0]; - push(@headerContent, " tmpl->Inherit(V8${parent}::getTmpl());\n"); - } - push(@headerContent, <::New(tmpl); - } - return Tmpl; - } - -END - -} - -sub GenerateImplementationAttributes -{ - my $interface = shift; - my $interfaceName = $interface->name; - my $extensions = $interface->extendedAttributes; - - # Generate property accessors for attributes. - for (my $index = 0; $index < @{$interface->attributes}; $index++) { - my $attribute = @{$interface->attributes}[$index]; - my $attrType = $attribute->signature->type; - my $attrName = $attribute->signature->name; - my $attrExt = $attribute->signature->extendedAttributes; - - my $wrapperRetType = IdlToWrapperType($attrType); - my $wrapperType = IdlToWrapperType($interfaceName); - my $wrapperGetter; - - if ($attrExt->{'AttributeIsPublic'} || $extensions->{'AttributesArePublic'}) { - $wrapperGetter = $attrName; - } else { - $wrapperGetter = IdlToWrapperAttrGetter($interface, $attribute)."()"; - - } - - # getter - if (!$attrExt->{'CustomGetter'}) { - push(@implContent, < V8${interfaceName}::${attrName}AttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8${interfaceName}Private* privData = V8DOM::toClassPtr(self->GetInternalField(0)); -END - if (IsWrapperType($attrType)) { - AddToImplIncludes("V8".$attrType.".h"); - push(@implContent, "\n ".GenerateConditionalUndefReturn($interface, $attribute, "privData->nativeObj->${wrapperGetter}")); - - push(@implContent, <nativeObj->${wrapperGetter}); - - v8::Handle arbaicaRetCtor = V8${attrType}::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8${attrType}::V8${attrType}Private* retPrivData = new V8${attrType}::V8${attrType}Private(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8${attrType}::jsDestructor); - return arbaicaRetObj; -END - } else { - my $v8Type = IdlToV8Type($attrType); - if ($attrType eq "DOMString") { - if ($attrExt->{'EmptyAsNull'}) { - push(@implContent, "\n if (privData->nativeObj->${wrapperGetter}.length() == 0)"); - push(@implContent, "\n return v8::Undefined();"); - } - push(@implContent, "\n return ${v8Type}::New(privData->nativeObj->${wrapperGetter}.c_str());"); - } else { - push(@implContent, "\n return ${v8Type}::New(privData->nativeObj->${wrapperGetter});"); - } - } - push(@implContent, "\n }\n"); - } - - if (!$attrExt->{'CustomSetter'}) { - # setter - if (!IsReadonly($attribute)) { - my $wrapperSetter = IdlToWrapperAttrSetter($attrName); - push(@implContent, "\n void V8${interfaceName}::${attrName}AttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info) {"); - push(@implContent, "\n v8::Local self = info.Holder();"); - push(@implContent, "\n struct V8${interfaceName}Private* privData = V8DOM::toClassPtr(self->GetInternalField(0));"); - - my ($handle, $deref) = IdlToArgHandle($attribute->signature->type, "local".ucfirst($attribute->signature->name), "value", $interfaceName); - - push(@implContent, "\n $handle"); - push(@implContent, "\n privData->nativeObj->${wrapperSetter}(${deref});"); - push(@implContent, "\n }\n"); - - } - } - } -} - -sub GenerateConditionalUndefReturn -{ - my $interface = shift; - my $attribute = shift; - my $getterExpression = shift; - - return "" if ($attribute->signature->type eq "NamedNodeMap"); - return "" if ($attribute->signature->type eq "NodeList"); - return "if (!$getterExpression) return v8::Undefined();"; -} - -sub GenerateConstructor -{ - my $interface = shift; - my $interfaceName = $interface->name; - my $wrapperType = IdlToWrapperType($interfaceName); - my $extensions = $interface->extendedAttributes; - - if ($extensions->{'Constructors'}) { - - push(@implContent, "\n v8::Handle V8${interfaceName}::constructor(const v8::Arguments& args) {"); - push(@implContent, <{'Constructors'}}) { - push (@variants, $fullCons); - - for (my $i = @{$fullCons}; $i > 0; $i--) { - my $variant = @{$fullCons}[$i]; - if ($variant->{'domSignature::isOptional'}) { - my $slice; - for (my $j = 0; $j < $i; $j++) { - push(@{$slice}, @{$fullCons}[$j]); - } - push (@variants, $slice); - } - } - - # sort to put most determinate signatures first - @variants = sort { - if (@{$b} != @{$a}) { - # more arguments are more determinant - @{$b} <=> @{$a}; - } else { - my @aWrap = grep(IsWrapperType($_->{'domSignature::type'}), @{$a}); - my @bWrap = grep(IsWrapperType($_->{'domSignature::type'}), @{$b}); - @bWrap <=> @aWrap; - } - } @variants; - } - foreach my $constructor (@variants) { - push(@implContent, " else if (args.Length() == " . @{$constructor}); - - for (my $i = 0; $i < @{$constructor}; $i++) { - my $type = $constructor->[$i]->{'domSignature::type'}; - AddToImplIncludes("V8".$type.".h") if (IsWrapperType($type)); - push(@implContent, " &&\n " . IdlToTypeChecker($type, "args[$i]")); - - } - push(@implContent, ") {\n"); - my $constructorArgs; - my $constructorSep = ""; - for (my $i = 0; $i < @{$constructor}; $i++) { - my $type = $constructor->[$i]->{'domSignature::type'}; - my $name = $constructor->[$i]->{'domSignature::name'}; - my ($handle, $deref) = IdlToArgHandle($type, "local".ucfirst($name), "args[$i]", $interfaceName); - $constructorArgs .= ${constructorSep}.${deref}; - $constructorSep = ", "; - push(@implContent, "\n $handle"); - - } - push(@implContent, "\n localInstance = new ".IdlToWrapperType($interfaceName)."(${constructorArgs});"); - push(@implContent, "\n\n }"); - } - push(@implContent, "\n"); - - push(@implContent, < retCtor = V8${interfaceName}::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8${interfaceName}::V8${interfaceName}Private* retPrivData = new V8${interfaceName}::V8${interfaceName}Private(); - retPrivData->nativeObj = localInstance; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8${interfaceName}::jsDestructor); - return retObj; - } -END - } - -} - -sub GenerateImplementationFunctionCallbacks -{ - my $interface = shift; - my $interfaceName = $interface->name; - my $wrapperType = IdlToWrapperType($interfaceName); - my $extensions = $interface->extendedAttributes; - - - # Generate methods for functions. - my %generated; - foreach my $function (@{$interface->functions}) { - my $name = $function->signature->name; - my $attrExt = $function->signature->extendedAttributes; - my $retType = $function->signature->type; - my $wrapperRetType = IdlToWrapperType($retType); - - next if ($attrExt->{'Custom'}); - next if (exists $generated{"${name}Callback"}); - $generated{"${name}Callback"} = 1; - - # get all functions with this name - my @sameFunctions = grep($_->signature->name eq $name, @{$interface->functions}); - - # signature - push(@implContent, < V8${interfaceName}::${name}Callback(const v8::Arguments& args) { -END - - # get this - push(@implContent, "\n v8::Local self = args.Holder();"); - push(@implContent, "\n struct V8${interfaceName}Private* privData = V8DOM::toClassPtr(self->GetInternalField(0));"); - - # establish all variants - my @variants; - foreach my $functionVar (@sameFunctions) { - push (@variants, $functionVar->parameters); - - for (my $i = @{$functionVar->parameters}; $i > 0; $i--) { - my $variant = @{$functionVar->parameters}[$i]; - if ($variant->{'domSignature::isOptional'}) { - my $slice; - for (my $j = 0; $j < $i; $j++) { - push(@{$slice}, @{$functionVar->parameters}[$j]); - } - push (@variants, $slice); - } - } - } - - # arguments to local handles - push(@implContent, "\n if (false) {"); - - # sort to put most determinate signatures first - @variants = sort { - if (@{$b} != @{$a}) { - # more arguments are more determinant - @{$b} <=> @{$a}; - } else { - my @aWrap = grep(IsWrapperType($_->{'domSignature::type'}), @{$a}); - my @bWrap = grep(IsWrapperType($_->{'domSignature::type'}), @{$b}); - @bWrap <=> @aWrap; - } - } @variants; - - foreach my $variant (@variants) { - my $parameterIndex = 0; - my @argList; - - push(@implContent, "\n } else if (args.Length() == " . @{$variant}); - for (my $i = 0; $i < @{$variant}; $i++) { - my $type = $variant->[$i]->{'domSignature::type'}; - push(@implContent, " &&\n " . IdlToTypeChecker($type, "args[$i]")); - } - push(@implContent, ")\n {"); - foreach my $parameter (@{$variant}) { - my $value = "args[$parameterIndex]"; - my $type = $parameter->type; - AddToImplIncludes("V8".$type.".h") if (IsWrapperType($type)); - - my ($handle, $deref) = IdlToArgHandle($parameter->type, "local".ucfirst($parameter->name), "args[${parameterIndex}]", $interfaceName); - push(@implContent, "\n ${handle}"); - push(@argList, $deref); - $parameterIndex++; - } - - # invoke native function with argument handles - my $retNativeType = IdlToNativeType($retType); - my $wrapperFunctionName = IdlToWrapperFunction($interface, $function); - if (IsWrapperType($retType)) { - push(@implContent, "\n\n ${retNativeType}* retVal = new $wrapperRetType(privData->nativeObj->${wrapperFunctionName}(" . join(", ", @argList) . "));\n"); - } elsif ($retNativeType eq "void") { - push(@implContent, "\n\n privData->nativeObj->${wrapperFunctionName}(" . join(", ", @argList) . ");\n"); - } else { - push(@implContent, "\n\n ${retNativeType} retVal = privData->nativeObj->${wrapperFunctionName}(" . join(", ", @argList) . ");\n"); - } - - # wrap return type if needed - if (IsWrapperType($retType)) { - AddToImplIncludes("V8".$retType.".h"); - - push(@implContent, < retCtor = V8${retType}::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8${retType}::V8${retType}Private* retPrivData = new V8${retType}::V8${retType}Private(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8${retType}::jsDestructor); - return retObj; -END - } else { - my $toHandleString = NativeToHandle($retNativeType, "retVal"); - push(@implContent, "\n return ${toHandleString};"); - } - } - push(@implContent, <name; - my $visibleInterfaceName = $codeGenerator->GetVisibleInterfaceName($interface); - my $v8InterfaceName = "V8$interfaceName"; - my $wrapperType = IdlToWrapperType($interfaceName); - my $extensions = $interface->extendedAttributes; - - AddToImplIncludes("V8${interfaceName}.h"); - - # Find the super descriptor. - my $parentClass = ""; - my $parentClassTemplate = ""; - foreach (@{$interface->parents}) { - my $parent = $_; - AddToImplIncludes("V8${parent}.h"); - $parentClass = "V8" . $parent; - last; - } - - push(@implContent, "namespace Arabica {\n"); - push(@implContent, "namespace DOM {\n\n"); - push(@implContent, " v8::Persistent V8${interfaceName}::Tmpl;\n"); - - if ($extensions->{'Constructors'}) { - push(@implContent, " v8::Persistent V8${interfaceName}::Constr;\n"); - GenerateConstructor($interface); - } - - GenerateImplementationAttributes($interface); - GenerateImplementationFunctionCallbacks($interface); - - - push(@implContent, < value) { - return getTmpl()->HasInstance(value); - } - -} -} -END - - # We've already added the header for this file in implContentHeader, so remove - # it from implIncludes to ensure we don't #include it twice. -# delete $implIncludes{"${v8InterfaceName}.h"}; -} - -sub WriteData -{ - my $object = shift; - my $interface = shift; - my $outputDir = shift; - my $outputHeadersDir = shift; - - my $name = $interface->name; - my $prefix = FileNamePrefix; - my $headerFileName = "$outputHeadersDir/$prefix$name.h"; - my $implFileName = "$outputDir/$prefix$name.cpp"; - - # print "WriteData\n"; - # print Dumper($interface); - # exit(); - - # Update a .cpp file if the contents are changed. - my $contents = $headerTemplate; - $contents .= join "", @implContentHeader; - - my @includes = (); - my %implIncludeConditions = (); - foreach my $include (keys %implIncludes) { - my $condition = $implIncludes{$include}; - my $checkType = $include; - $checkType =~ s/\.h//; - next if $codeGenerator->IsSVGAnimatedType($checkType); - - if ($include =~ /wtf/) { - $include = "\<$include\>"; - } else { - $include = "\"$include\""; - } - - if ($condition eq 1) { - push @includes, $include; - } else { - push @{$implIncludeConditions{$condition}}, $include; - } - } - foreach my $include (sort @includes) { - $contents .= "#include $include\n"; - } - foreach my $condition (sort keys %implIncludeConditions) { - $contents .= "\n#if " . $codeGenerator->GenerateConditionalStringFromAttributeValue($condition) . "\n"; - foreach my $include (sort @{$implIncludeConditions{$condition}}) { - $contents .= "#include $include\n"; - } - $contents .= "#endif\n"; - } - - $contents .= "\n"; - $contents .= join "", @implContentDecls, @implContent; - $codeGenerator->UpdateFile($implFileName, $contents); - - %implIncludes = (); - @implContentHeader = (); - @implContentDecls = (); - @implContent = (); - - # Update a .h file if the contents are changed. - $contents = join "", @headerContent; - $codeGenerator->UpdateFile($headerFileName, $contents); - - @headerContent = (); -} - -sub IdlToV8Type -{ - my $idlType = shift; - return "v8::Integer" if ($idlType eq "unsigned short"); - return "v8::Integer" if ($idlType eq "short"); - return "v8::Integer" if ($idlType eq "unsigned long"); - return "v8::Integer" if ($idlType eq "long"); - return "v8::String" if ($idlType eq "DOMString"); - return "v8::Boolean" if ($idlType eq "boolean"); - return "v8::Number" if ($idlType eq "double"); - die($idlType); -} - -sub IdlToNativeType -{ - my $idlType = shift; - - return IdlToWrapperType($idlType) if (IsWrapperType($idlType)); - - return "std::string" if ($idlType eq "DOMString"); - return "bool" if ($idlType eq "boolean"); - return "short" if ($idlType eq "short"); - return "long" if ($idlType eq "long"); - return "unsigned short" if ($idlType eq "unsigned short"); - return "unsigned long" if ($idlType eq "unsigned long"); - return "void" if ($idlType eq "void"); - return "char" if ($idlType eq "byte"); - return "unsigned char" if ($idlType eq "octet"); - return "double" if ($idlType eq "double"); - return "float" if ($idlType eq "float"); - die(${idlType}); -} - -sub NativeToHandle -{ - my $nativeType = shift; - my $nativeName = shift; - - return ("v8::Boolean::New(${nativeName})") if ($nativeType eq "bool"); - return ("v8::Number::New(${nativeName})") if ($nativeType eq "double"); - return ("v8::Number::New(${nativeName})") if ($nativeType eq "double"); - return ("v8::Number::New(${nativeName})") if ($nativeType eq "float"); - return ("v8::Number::New(${nativeName})") if ($nativeType eq "short"); - return ("v8::Number::New(${nativeName})") if ($nativeType eq "char"); - return ("v8::Number::New(${nativeName})") if ($nativeType eq "unsigned short"); - return ("v8::Number::New(${nativeName})") if ($nativeType eq "unsigned long"); - return ("v8::Number::New(${nativeName})") if ($nativeType eq "unsigned char"); - return ("v8::Number::New(${nativeName})") if ($nativeType eq "long"); - return ("v8::String::New(${nativeName}.c_str())") if ($nativeType eq "std::string"); - return ("v8::Undefined()") if ($nativeType eq "void"); - - die($nativeType); -} - -sub IdlToWrapperType -{ - my $idlType = shift; - return "Arabica::XPath::XPathValue" if ($idlType eq "XPathResult"); - return "Arabica::XPath::NodeSet" if ($idlType eq "NodeSet"); - return "Arabica::DOM::Node" if ($idlType eq "Node"); - return "Arabica::DOM::Element" if ($idlType eq "Element"); - return "uscxml::Event" if ($idlType eq "SCXMLEvent"); - return "uscxml::Storage" if ($idlType eq "Storage"); - return "uscxml::ArrayBuffer" if ($idlType eq "ArrayBuffer"); - return "uscxml::ArrayBufferView" if ($idlType eq "ArrayBufferView"); - return "uscxml::Int8Array" if ($idlType eq "Int8Array"); - return "uscxml::Uint8Array" if ($idlType eq "Uint8Array"); - return "uscxml::Uint8ClampedArray" if ($idlType eq "Uint8ClampedArray"); - return "uscxml::Int16Array" if ($idlType eq "Int16Array"); - return "uscxml::Uint16Array" if ($idlType eq "Uint16Array"); - return "uscxml::Int32Array" if ($idlType eq "Int32Array"); - return "uscxml::Uint32Array" if ($idlType eq "Uint32Array"); - return "uscxml::Float32Array" if ($idlType eq "Float32Array"); - return "uscxml::Float64Array" if ($idlType eq "Float64Array"); - return "uscxml::DataView" if ($idlType eq "DataView"); - return "Arabica::DOM::${idlType}"; -} - -sub IdlToArgHandle -{ - my $type = shift; - my $localName = shift; - my $paramName = shift; - my $thisType = shift; - - return ("v8::String::AsciiValue ${localName}(${paramName});", "*${localName}") if ($type eq "DOMString"); - return ("unsigned long ${localName} = ${paramName}->ToNumber()->Uint32Value();", ${localName}) if ($type eq "unsigned long"); - return ("long ${localName} = ${paramName}->ToNumber()->Int32Value();", ${localName}) if ($type eq "long"); - return ("double ${localName} = ${paramName}->ToNumber()->Value();", ${localName}) if ($type eq "double"); - return ("float ${localName} = ${paramName}->ToNumber()->Value();", ${localName}) if ($type eq "float"); - return ("unsigned short ${localName} = ${paramName}->ToNumber()->Uint32Value();", ${localName}) if ($type eq "unsigned short"); - return ("bool ${localName} = ${paramName}->ToBoolean()->BooleanValue();", ${localName}) if ($type eq "boolean"); - return ("char ${localName} = ${paramName}->ToNumber()->Int32Value();", ${localName}) if ($type eq "byte"); - return ("short ${localName} = ${paramName}->ToNumber()->Int32Value();", ${localName}) if ($type eq "short"); - return ("unsigned char ${localName} = ${paramName}->ToNumber()->Uint32Value();", ${localName}) if ($type eq "octet"); - return ("void* ${localName} = v8::External::Unwrap(${paramName}->ToObject()->GetInternalField(0));", ${localName}) if ($type eq "any"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToInteger()->Value());\n}", "${localName}") if ($type eq "long[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToNumber()->Value());\n}", "${localName}") if ($type eq "float[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToNumber()->Value());\n}", "${localName}") if ($type eq "double[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToInt32()->Value());\n}", "${localName}") if ($type eq "byte[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToInt32()->Value());\n}", "${localName}") if ($type eq "short[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToUint32()->Value());\n}", "${localName}") if ($type eq "unsigned short[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToUint32()->Value());\n}", "${localName}") if ($type eq "unsigned long[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array(v8::Array::Cast(*args[0]));\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToUint32()->Value());\n}", "${localName}") if ($type eq "octet[]"); - - if (IsWrapperType($type)) { - my $wrapperType = IdlToWrapperType($type); - if ($type =~ /.*Array$/ or $type =~ /^ArrayBuffer.*/) { - return ("${wrapperType}* ${localName} = V8DOM::toClassPtr(${paramName}->ToObject()->GetInternalField(0))->nativeObj;", "${localName}"); - } - - return ("${wrapperType}* ${localName} = V8DOM::toClassPtr(${paramName}->ToObject()->GetInternalField(0))->nativeObj;", "*${localName}"); - } - - print $type."\n"; - die(); -} - -sub IdlToTypeChecker -{ - my $idlType = shift; - my $attr = shift; - - return $attr."->IsString()" if ($idlType eq "DOMString"); - return $attr."->IsBoolean()" if ($idlType eq "boolean"); - return $attr."->IsInt32()" if ($idlType eq "short"); - return $attr."->IsInt32()" if ($idlType eq "long"); - return $attr."->IsArray()" if ($idlType eq "long[]"); - return $attr."->IsUint32()" if ($idlType eq "unsigned short"); - return $attr."->IsUint32()" if ($idlType eq "unsigned long"); - return $attr."->IsInt32()" if ($idlType eq "byte"); - return $attr."->IsUint32()" if ($idlType eq "octet"); - return $attr."->IsNumber()" if ($idlType eq "double"); - return $attr."->IsArray()" if ($idlType eq "double[]"); - return $attr."->IsNumber()" if ($idlType eq "float"); - return $attr."->IsArray()" if ($idlType eq "float[]"); - return $attr."->IsArray()" if ($idlType eq "short[]"); - return $attr."->IsArray()" if ($idlType eq "unsigned short[]"); - return $attr."->IsArray()" if ($idlType eq "unsigned long[]"); - return $attr."->IsArray()" if ($idlType eq "byte[]"); - return $attr."->IsArray()" if ($idlType eq "octet[]"); - return "true" if ($idlType eq "any"); - - return $attr."->IsObject() && V8".$idlType."::hasInstance(".$attr.")" if (IsWrapperType($idlType)); - - print $idlType."\n"; - die(); - -} - -sub IdlToWrapperAttrGetter -{ - my $interface = shift; - my $attribute = shift; - - return $attribute->signature->name if ($interface->name eq "NodeSet" && $attribute->signature->name eq "size"); - return $attribute->signature->name if ($interface->name eq "NodeSet" && $attribute->signature->name eq "empty"); - return "asString" if ($interface->name eq "XPathResult" && $attribute->signature->name eq "stringValue"); - return "asBool" if ($interface->name eq "XPathResult" && $attribute->signature->name eq "booleanValue"); - return "asNumber" if ($interface->name eq "XPathResult" && $attribute->signature->name eq "numberValue"); - - return "get" . ucfirst($attribute->signature->name); -} - -sub IdlToWrapperFunction -{ - my $interface = shift; - my $function = shift; - - # if ($interface->name eq "NodeSet" && $function->signature->name eq "toDocumentOrder") { - # print Dumper($interface); - # print Dumper($function); - # } - - return "to_document_order" if ($interface->name eq "NodeSet" && $function->signature->name eq "toDocumentOrder"); - - return $function->signature->name; - -} - -sub IdlToWrapperAttrSetter -{ - my $idlAttr = shift; - return "set" . ucfirst($idlAttr); -} - - -sub IsReadonly -{ - my $attribute = shift; - my $attrExt = $attribute->signature->extendedAttributes; - return ($attribute->type =~ /readonly/ || $attrExt->{"V8ReadOnly"}) && !$attrExt->{"Replaceable"}; -} - - -my %non_wrapper_types = ( - 'CompareHow' => 1, - 'DOMObject' => 1, - 'DOMString' => 1, - 'DOMString[]' => 1, - 'DOMTimeStamp' => 1, - 'Date' => 1, - 'Dictionary' => 1, - 'EventListener' => 1, - # FIXME: When EventTarget is an interface and not a mixin, fix this so that - # EventTarget is treated as a wrapper type. - 'EventTarget' => 1, - 'IDBKey' => 1, - 'JSObject' => 1, - 'MediaQueryListListener' => 1, - 'NodeFilter' => 1, - 'any' => 1, - 'boolean' => 1, - 'double' => 1, - 'float' => 1, - 'int' => 1, - 'long long' => 1, - 'long' => 1, - 'long[]' => 1, - 'short' => 1, - 'short[]' => 1, - 'void' => 1, - 'byte' => 1, - 'byte[]' => 1, - 'octet' => 1, - 'char' => 1, - 'float[]' => 1, - 'float' => 1, - 'double[]' => 1, - 'octet[]' => 1, - 'double' => 1, - 'unsigned int' => 1, - 'unsigned long long' => 1, - 'unsigned long' => 1, - 'unsigned long[]' => 1, - 'unsigned short' => 1, - 'unsigned short[]' => 1 -); - -sub IsWrapperType -{ - my $type = shift; - return !($non_wrapper_types{$type}); -} - -sub GenerateHeaderContentHeader -{ - my $interface = shift; - my $v8InterfaceName = "V8" . $interface->name; - my $conditionalString = $codeGenerator->GenerateConditionalString($interface); - - my @headerContentHeader = split("\r", $headerTemplate); - - push(@headerContentHeader, "\n#if ${conditionalString}\n") if $conditionalString; - push(@headerContentHeader, "\n#ifndef ${v8InterfaceName}" . "_h"); - push(@headerContentHeader, "\n#define ${v8InterfaceName}" . "_h\n\n"); - return @headerContentHeader; -} - -1; diff --git a/contrib/dom/scripts/CodeGeneratorArabicaV8.post3.14.pm b/contrib/dom/scripts/CodeGeneratorArabicaV8.post3.14.pm deleted file mode 100644 index e913aaa..0000000 --- a/contrib/dom/scripts/CodeGeneratorArabicaV8.post3.14.pm +++ /dev/null @@ -1,1021 +0,0 @@ -# Copyright (C) 2005, 2006 Nikolas Zimmermann -# Copyright (C) 2006 Anders Carlsson -# Copyright (C) 2006 Samuel Weinig -# Copyright (C) 2006 Alexey Proskuryakov -# Copyright (C) 2006 Apple Computer, Inc. -# Copyright (C) 2007, 2008, 2009, 2012 Google Inc. -# Copyright (C) 2009 Cameron McCormack -# Copyright (C) Research In Motion Limited 2010. All rights reserved. -# Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) -# Copyright (C) 2012 Ericsson AB. All rights reserved. -# Copyright (C) 2013 Stefan Radomski -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. -# - -package CodeGeneratorArabicaV8; - -use strict; -use Data::Dumper; -use Carp qw/longmess cluck confess/; - -use constant FileNamePrefix => "V8"; - -my $codeGenerator; - - -my @headerContent = (); -my @implContentHeader = (); -my @implContent = (); -my @implContentDecls = (); -my %implIncludes = (); -my %headerIncludes = (); - -# Default .h template -my $headerTemplate = << 'EOF'; -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -EOF - -# Default constructor -sub new -{ - my $object = shift; - my $reference = { }; - - $codeGenerator = shift; - - bless($reference, $object); - return $reference; -} - -sub GenerateInterface -{ - my $object = shift; - my $interface = shift; - -# print Dumper($interface); - - # Start actual generation - if ($interface->extendedAttributes->{"Callback"}) { - die(); - $object->GenerateCallbackHeader($interface); - $object->GenerateCallbackImplementation($interface); - } else { - $object->GenerateHeader($interface); - $object->GenerateImplementation($interface); - } -} - -sub AddToImplIncludes -{ - my $header = shift; - my $conditional = shift; - - if ($header eq "V8bool.h") { - confess(); - } - - if (not $conditional) { - $implIncludes{$header} = 1; - } elsif (not exists($implIncludes{$header})) { - $implIncludes{$header} = $conditional; - } else { - my $oldValue = $implIncludes{$header}; - if ($oldValue ne 1) { - my %newValue = (); - $newValue{$conditional} = 1; - foreach my $condition (split(/\|/, $oldValue)) { - $newValue{$condition} = 1; - } - $implIncludes{$header} = join("|", sort keys %newValue); - } - } -} - -sub GenerateHeader -{ - my $object = shift; - my $interface = shift; - my $interfaceName = $interface->name; - my $extensions = $interface->extendedAttributes; -# print Dumper($extensions); - - # Copy contents of parent interfaces except the first parent. - my @parents; - $codeGenerator->AddMethodsConstantsAndAttributesFromParentInterfaces($interface, \@parents, 1); - $codeGenerator->LinkOverloadedFunctions($interface); - - # - Add default header template - push(@headerContent, GenerateHeaderContentHeader($interface)); - - $headerIncludes{"string"} = 1; - $headerIncludes{"uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h"} = 1; - $headerIncludes{"DOM/Node.hpp"} = 1; - $headerIncludes{"v8.h"} = 1; - - if ($interfaceName =~ /.*Array$/ or $interfaceName =~ /^ArrayBuffer.*/) { - $headerIncludes{"../../TypedArray.h"} = 1; - } - - foreach (@{$interface->parents}) { - my $parent = $_; - $headerIncludes{"V8${parent}.h"} = 1; - } - - push(@headerContent, "#include \\n"); - foreach my $headerInclude (sort keys(%headerIncludes)) { - if ($headerInclude =~ /wtf|v8\.h/) { - push(@headerContent, "#include \<${headerInclude}\>\n"); - } else { - push(@headerContent, "#include \"${headerInclude}\"\n"); - } - } - - push(@headerContent, ""); - push(@headerContent, "\nnamespace Arabica {"); - push(@headerContent, "\nnamespace DOM {\n"); - - push(@headerContent, "\nclass V8${interfaceName} {"); - push(@headerContent, "\npublic:"); - - my $wrapperType = IdlToWrapperType($interfaceName); - push(@headerContent, <{'DontDestroyWrapped'}) { - push(@headerContent, "\n V8_DESTRUCTOR_KEEP_WRAPPED(V8${interfaceName}Private);"); - } else { - push(@headerContent, "\n V8_DESTRUCTOR(V8${interfaceName}Private);"); - } - push(@headerContent, "\n static bool hasInstance(v8::Handle);"); - push(@headerContent, "\n"); - - # callbacks for actual functions - my %generated; - foreach my $function (@{$interface->functions}) { - my $name = $function->signature->name; - my $attrExt = $function->signature->extendedAttributes; - my $custom = ($attrExt->{'Custom'} ? "Custom" : ""); - next if (exists $generated{"${name}${custom}Callback"}); - push(@headerContent, "\n static void ${name}${custom}Callback(const v8::FunctionCallbackInfo&);"); - $generated{"${name}${custom}Callback"} = 1; - } - push(@headerContent, "\n"); - - # attribute getter and setters - foreach my $attribute (@{$interface->attributes}) { - my $name = $attribute->signature->name; - my $attrExt = $attribute->signature->extendedAttributes; - my $customGetter = ($attrExt->{'CustomGetter'} ? "Custom" : ""); - my $customSetter = ($attrExt->{'CustomSetter'} ? "Custom" : ""); - push(@headerContent, "\n static void ${name}${customGetter}AttrGetter(v8::Local property, const v8::PropertyCallbackInfo& info);"); - if (!IsReadonly($attribute)) { - push(@headerContent, "\n static void ${name}${customSetter}AttrSetter(v8::Local property, v8::Local value, const v8::PropertyCallbackInfo& info);"); - } - } - - if ($extensions->{'CustomIndexedGetter'}) { - push(@headerContent, "\n static void indexedPropertyCustomGetter(uint32_t, const v8::PropertyCallbackInfo&);"); - } - if ($extensions->{'CustomIndexedSetter'}) { - push(@headerContent, "\n static void indexedPropertyCustomSetter(uint32_t, v8::Local, const v8::PropertyCallbackInfo&);"); - } - push(@headerContent, "\n"); - - GenerateClassPrototypeHeader($interface); - - push(@headerContent, "\n};\n\n}\n}\n\n"); - push(@headerContent, "#endif // V8${interfaceName}" . "_h\n"); - -} - -# -# Write class template prototype constructor -# -sub GenerateClassPrototypeHeader -{ - my $interface = shift; - my $interfaceName = $interface->name; - my $extensions = $interface->extendedAttributes; - - if ($extensions->{'Constructors'}) { - - push(@headerContent, "\n"); - push(@headerContent, " static void constructor(const v8::FunctionCallbackInfo&);\n"); - push(@headerContent, < getConstructor(v8::Isolate* isolate) { - return v8::FunctionTemplate::New(isolate, constructor); - } -END - } - - push(@headerContent, < getTmpl(v8::Isolate* isolate) { - v8::Handle tmpl = v8::FunctionTemplate::New(isolate); - tmpl->SetClassName(v8::String::NewFromUtf8(isolate, "${interfaceName}")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); -END - - push(@headerContent, "\n"); - foreach my $attribute (@{$interface->attributes}) { - my $name = $attribute->signature->name; - my $attrExt = $attribute->signature->extendedAttributes; - my $customGetter = ($attrExt->{'CustomGetter'} ? "Custom" : ""); - my $customSetter = ($attrExt->{'CustomSetter'} ? "Custom" : ""); - my $getter = "V8${interfaceName}::${name}${customGetter}AttrGetter"; - my $setter = (IsReadonly($attribute) ? "0" : "V8${interfaceName}::${name}${customSetter}AttrSetter"); - push(@headerContent, <SetAccessor(v8::String::NewFromUtf8(isolate, "${name}"), ${getter}, ${setter}, - v8::External::New(isolate, 0), static_cast(v8::DEFAULT), static_cast(v8::None)); -END - } - - if ($extensions->{'CustomIndexedGetter'} || $extensions->{'CustomIndexedSetter'}) { - my $indexedGetter = ($extensions->{'CustomIndexedGetter'} ? "V8${interfaceName}::indexedPropertyCustomGetter" : 0); - my $indexedSetter = ($extensions->{'CustomIndexedSetter'} ? "V8${interfaceName}::indexedPropertyCustomSetter" : 0); - push(@headerContent, "\n instance->SetIndexedPropertyHandler(${indexedGetter}, ${indexedSetter});"); - } - - push(@headerContent, "\n"); - my %generated; - foreach my $function (@{$interface->functions}) { - my $name = $function->signature->name; - my $attrExt = $function->signature->extendedAttributes; - my $custom = ($attrExt->{'Custom'} ? "Custom" : ""); - next if (exists $generated{"${name}"}); - $generated{"${name}"} = 1; - push(@headerContent, <Set(v8::String::NewFromUtf8(isolate, "${name}"), - v8::FunctionTemplate::New(isolate, V8${interfaceName}::${name}${custom}Callback, v8::Undefined(isolate)), static_cast(v8::DontDelete)); -END - } - - push(@headerContent, "\n"); - foreach my $constant (@{$interface->constants}) { - my $name = $constant->name; - my $value = $constant->value; - my $type = IdlToV8Type($constant->type); - push(@headerContent, <Set(v8::String::NewFromUtf8(isolate, "${name}"), ${type}::New(isolate, ${value}), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewFromUtf8(isolate, "${name}"), ${type}::New(isolate, ${value}), static_cast(v8::ReadOnly | v8::DontEnum)); -END - } - - push(@headerContent, "\n"); - if (@{$interface->parents}) { - my $parent = @{$interface->parents}[0]; - push(@headerContent, " tmpl->Inherit(V8${parent}::getTmpl(isolate));\n"); - } - push(@headerContent, <name; - my $extensions = $interface->extendedAttributes; - - # Generate property accessors for attributes. - for (my $index = 0; $index < @{$interface->attributes}; $index++) { - my $attribute = @{$interface->attributes}[$index]; - my $attrType = $attribute->signature->type; - my $attrName = $attribute->signature->name; - my $attrExt = $attribute->signature->extendedAttributes; - - my $wrapperRetType = IdlToWrapperType($attrType); - my $wrapperType = IdlToWrapperType($interfaceName); - my $wrapperGetter; - - if ($attrExt->{'AttributeIsPublic'} || $extensions->{'AttributesArePublic'}) { - $wrapperGetter = $attrName; - } else { - $wrapperGetter = IdlToWrapperAttrGetter($interface, $attribute)."()"; - - } - - # getter - if (!$attrExt->{'CustomGetter'}) { - push(@implContent, < property, const v8::PropertyCallbackInfo& info) { - v8::Isolate* isolate = info.GetIsolate(); - v8::Local self = info.Holder(); - struct V8${interfaceName}Private* privData = V8DOM::toClassPtr(self->GetInternalField(0)); -END - if (IsWrapperType($attrType)) { - AddToImplIncludes("V8".$attrType.".h"); - push(@implContent, "\n ".GenerateConditionalUndefReturn($interface, $attribute, "privData->nativeObj->${wrapperGetter}")); - - push(@implContent, <nativeObj->${wrapperGetter}); - - v8::Handle arbaicaRetCtor = V8${attrType}::getTmpl(isolate)->GetFunction(); - v8::Persistent arbaicaRetObj(isolate, arbaicaRetCtor->NewInstance()); - - struct V8${attrType}::V8${attrType}Private* retPrivData = new V8${attrType}::V8${attrType}Private(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj.Get(isolate)->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.SetWeak(0, V8${attrType}::jsDestructor); - info.GetReturnValue().Set(arbaicaRetObj); - // return arbaicaRetObj; -END - } else { - my $v8Type = IdlToV8Type($attrType); - if ($attrType eq "DOMString") { - if ($attrExt->{'EmptyAsNull'}) { - push(@implContent, "\n if (privData->nativeObj->${wrapperGetter}.length() == 0)"); - push(@implContent, "\n return; //v8::Undefined(isolate);"); - } - push(@implContent, "\n info.GetReturnValue().Set(${v8Type}::NewFromUtf8(isolate, privData->nativeObj->${wrapperGetter}.c_str()));"); - # push(@implContent, "\n return ${v8Type}::New(privData->nativeObj->${wrapperGetter}.c_str());"); - } else { - push(@implContent, "\n info.GetReturnValue().Set(${v8Type}::New(isolate, privData->nativeObj->${wrapperGetter}));"); - } - } - push(@implContent, "\n }\n"); - } - - if (!$attrExt->{'CustomSetter'}) { - # setter - if (!IsReadonly($attribute)) { - my $wrapperSetter = IdlToWrapperAttrSetter($attrName); - push(@implContent, "\n void V8${interfaceName}::${attrName}AttrSetter(v8::Local property, v8::Local value, const v8::PropertyCallbackInfo& info) {"); - push(@implContent, "\n v8::Isolate* isolate = info.GetIsolate();"); - push(@implContent, "\n v8::Local self = info.Holder();"); - push(@implContent, "\n struct V8${interfaceName}Private* privData = V8DOM::toClassPtr(self->GetInternalField(0));"); - - my ($handle, $deref) = IdlToArgHandle($attribute->signature->type, "local".ucfirst($attribute->signature->name), "value", $interfaceName); - - push(@implContent, "\n $handle"); - push(@implContent, "\n privData->nativeObj->${wrapperSetter}(${deref});"); - push(@implContent, "\n }\n"); - - } - } - } -} - -sub GenerateConditionalUndefReturn -{ - my $interface = shift; - my $attribute = shift; - my $getterExpression = shift; - - return "" if ($attribute->signature->type eq "NamedNodeMap"); - return "" if ($attribute->signature->type eq "NodeList"); - return "if (!$getterExpression) return; //v8::Undefined(isolate);"; -} - -sub GenerateConstructor -{ - my $interface = shift; - my $interfaceName = $interface->name; - my $wrapperType = IdlToWrapperType($interfaceName); - my $extensions = $interface->extendedAttributes; - - if ($extensions->{'Constructors'}) { - - push(@implContent, "\n void V8${interfaceName}::constructor(const v8::FunctionCallbackInfo& info) {"); - push(@implContent, <ThrowException(v8::String::NewFromUtf8(isolate, "Cannot call constructor as function")); - return; - } -END - - push(@implContent, "\n ".IdlToWrapperType($interfaceName)."* localInstance = NULL;"); - # dispatch the actual constructor - push(@implContent, "\n if (false) {\n}"); - my @variants; - foreach my $fullCons (@{$extensions->{'Constructors'}}) { - push (@variants, $fullCons); - - for (my $i = @{$fullCons}; $i > 0; $i--) { - my $variant = @{$fullCons}[$i]; - if ($variant->{'domSignature::isOptional'}) { - my $slice; - for (my $j = 0; $j < $i; $j++) { - push(@{$slice}, @{$fullCons}[$j]); - } - push (@variants, $slice); - } - } - - # sort to put most determinate signatures first - @variants = sort { - if (@{$b} != @{$a}) { - # more arguments are more determinant - @{$b} <=> @{$a}; - } else { - my @aWrap = grep(IsWrapperType($_->{'domSignature::type'}), @{$a}); - my @bWrap = grep(IsWrapperType($_->{'domSignature::type'}), @{$b}); - @bWrap <=> @aWrap; - } - } @variants; - } - foreach my $constructor (@variants) { - push(@implContent, " else if (info.Length() == " . @{$constructor}); - - for (my $i = 0; $i < @{$constructor}; $i++) { - my $type = $constructor->[$i]->{'domSignature::type'}; - AddToImplIncludes("V8".$type.".h") if (IsWrapperType($type)); - push(@implContent, " &&\n " . IdlToTypeChecker($type, "info[$i]")); - - } - push(@implContent, ") {\n"); - my $constructorArgs; - my $constructorSep = ""; - for (my $i = 0; $i < @{$constructor}; $i++) { - my $type = $constructor->[$i]->{'domSignature::type'}; - my $name = $constructor->[$i]->{'domSignature::name'}; - my ($handle, $deref) = IdlToArgHandle($type, "local".ucfirst($name), "info[$i]", $interfaceName); - $constructorArgs .= ${constructorSep}.${deref}; - $constructorSep = ", "; - push(@implContent, "\n $handle"); - - } - push(@implContent, "\n localInstance = new ".IdlToWrapperType($interfaceName)."(${constructorArgs});"); - push(@implContent, "\n\n }"); - } - push(@implContent, "\n"); - - push(@implContent, < retCtor = V8${interfaceName}::getTmpl(isolate)->GetFunction(); - v8::Persistent retObj(isolate, retCtor->NewInstance()); - - struct V8${interfaceName}::V8${interfaceName}Private* retPrivData = new V8${interfaceName}::V8${interfaceName}Private(); - retPrivData->nativeObj = localInstance; - - retObj.Get(isolate)->SetInternalField(0, V8DOM::toExternal(retPrivData)); - retObj.SetWeak(0, V8${interfaceName}::jsDestructor); - - info.GetReturnValue().Set(retObj); - return; - } -END - } - -} - -sub GenerateImplementationFunctionCallbacks -{ - my $interface = shift; - my $interfaceName = $interface->name; - my $wrapperType = IdlToWrapperType($interfaceName); - my $extensions = $interface->extendedAttributes; - - - # Generate methods for functions. - my %generated; - foreach my $function (@{$interface->functions}) { - my $name = $function->signature->name; - my $attrExt = $function->signature->extendedAttributes; - my $retType = $function->signature->type; - my $wrapperRetType = IdlToWrapperType($retType); - - next if ($attrExt->{'Custom'}); - next if (exists $generated{"${name}Callback"}); - $generated{"${name}Callback"} = 1; - - # get all functions with this name - my @sameFunctions = grep($_->signature->name eq $name, @{$interface->functions}); - - # signature - push(@implContent, <& info) { - v8::Isolate* isolate = info.GetIsolate(); -END - - # get this - push(@implContent, "\n v8::Local self = info.Holder();"); - push(@implContent, "\n struct V8${interfaceName}Private* privData = V8DOM::toClassPtr(self->GetInternalField(0));"); - - # establish all variants - my @variants; - foreach my $functionVar (@sameFunctions) { - push (@variants, $functionVar->parameters); - - for (my $i = @{$functionVar->parameters}; $i > 0; $i--) { - my $variant = @{$functionVar->parameters}[$i]; - if ($variant->{'domSignature::isOptional'}) { - my $slice; - for (my $j = 0; $j < $i; $j++) { - push(@{$slice}, @{$functionVar->parameters}[$j]); - } - push (@variants, $slice); - } - } - } - - # arguments to local handles - push(@implContent, "\n if (false) {"); - - # sort to put most determinate signatures first - @variants = sort { - if (@{$b} != @{$a}) { - # more arguments are more determinant - @{$b} <=> @{$a}; - } else { - my @aWrap = grep(IsWrapperType($_->{'domSignature::type'}), @{$a}); - my @bWrap = grep(IsWrapperType($_->{'domSignature::type'}), @{$b}); - @bWrap <=> @aWrap; - } - } @variants; - - foreach my $variant (@variants) { - my $parameterIndex = 0; - my @argList; - - push(@implContent, "\n } else if (info.Length() == " . @{$variant}); - for (my $i = 0; $i < @{$variant}; $i++) { - my $type = $variant->[$i]->{'domSignature::type'}; - push(@implContent, " &&\n " . IdlToTypeChecker($type, "info[$i]")); - } - push(@implContent, ")\n {"); - foreach my $parameter (@{$variant}) { - my $value = "info[$parameterIndex]"; - my $type = $parameter->type; - AddToImplIncludes("V8".$type.".h") if (IsWrapperType($type)); - - my ($handle, $deref) = IdlToArgHandle($parameter->type, "local".ucfirst($parameter->name), "info[${parameterIndex}]", $interfaceName); - push(@implContent, "\n ${handle}"); - push(@argList, $deref); - $parameterIndex++; - } - - # invoke native function with argument handles - my $retNativeType = IdlToNativeType($retType); - my $wrapperFunctionName = IdlToWrapperFunction($interface, $function); - if (IsWrapperType($retType)) { - push(@implContent, "\n\n ${retNativeType}* retVal = new $wrapperRetType(privData->nativeObj->${wrapperFunctionName}(" . join(", ", @argList) . "));\n"); - } elsif ($retNativeType eq "void") { - push(@implContent, "\n\n privData->nativeObj->${wrapperFunctionName}(" . join(", ", @argList) . ");\n"); - } else { - push(@implContent, "\n\n ${retNativeType} retVal = privData->nativeObj->${wrapperFunctionName}(" . join(", ", @argList) . ");\n"); - } - - # wrap return type if needed - if (IsWrapperType($retType)) { - AddToImplIncludes("V8".$retType.".h"); - - push(@implContent, < retCtor = V8${retType}::getTmpl(isolate)->GetFunction(); - v8::Persistent retObj(isolate, retCtor->NewInstance()); - - struct V8${retType}::V8${retType}Private* retPrivData = new V8${retType}::V8${retType}Private(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj.Get(isolate)->SetInternalField(0, V8DOM::toExternal(retPrivData)); - retObj.SetWeak(0, V8${retType}::jsDestructor); - info.GetReturnValue().Set(retObj); - //return retObj; -END - } else { - my $toHandleString = NativeToHandle($retNativeType, "retVal"); - push(@implContent, "\n info.GetReturnValue().Set(${toHandleString});"); - } - } - push(@implContent, <name; - my $visibleInterfaceName = $codeGenerator->GetVisibleInterfaceName($interface); - my $v8InterfaceName = "V8$interfaceName"; - my $wrapperType = IdlToWrapperType($interfaceName); - my $extensions = $interface->extendedAttributes; - - AddToImplIncludes("V8${interfaceName}.h"); - - # Find the super descriptor. - my $parentClass = ""; - my $parentClassTemplate = ""; - foreach (@{$interface->parents}) { - my $parent = $_; - AddToImplIncludes("V8${parent}.h"); - $parentClass = "V8" . $parent; - last; - } - - push(@implContent, "namespace Arabica {\n"); - push(@implContent, "namespace DOM {\n\n"); - - if ($extensions->{'Constructors'}) { - GenerateConstructor($interface); - } - - GenerateImplementationAttributes($interface); - GenerateImplementationFunctionCallbacks($interface); - - - push(@implContent, < value) { - return getTmpl(v8::Isolate::GetCurrent())->HasInstance(value); - } - -} -} -END - - # We've already added the header for this file in implContentHeader, so remove - # it from implIncludes to ensure we don't #include it twice. -# delete $implIncludes{"${v8InterfaceName}.h"}; -} - -sub WriteData -{ - my $object = shift; - my $interface = shift; - my $outputDir = shift; - my $outputHeadersDir = shift; - - my $name = $interface->name; - my $prefix = FileNamePrefix; - my $headerFileName = "$outputHeadersDir/$prefix$name.h"; - my $implFileName = "$outputDir/$prefix$name.cpp"; - - # print "WriteData\n"; - # print Dumper($interface); - # exit(); - - # Update a .cpp file if the contents are changed. - my $contents = $headerTemplate; - $contents .= join "", @implContentHeader; - - my @includes = (); - my %implIncludeConditions = (); - foreach my $include (keys %implIncludes) { - my $condition = $implIncludes{$include}; - my $checkType = $include; - $checkType =~ s/\.h//; - next if $codeGenerator->IsSVGAnimatedType($checkType); - - if ($include =~ /wtf/) { - $include = "\<$include\>"; - } else { - $include = "\"$include\""; - } - - if ($condition eq 1) { - push @includes, $include; - } else { - push @{$implIncludeConditions{$condition}}, $include; - } - } - foreach my $include (sort @includes) { - $contents .= "#include $include\n"; - } - foreach my $condition (sort keys %implIncludeConditions) { - $contents .= "\n#if " . $codeGenerator->GenerateConditionalStringFromAttributeValue($condition) . "\n"; - foreach my $include (sort @{$implIncludeConditions{$condition}}) { - $contents .= "#include $include\n"; - } - $contents .= "#endif\n"; - } - - $contents .= "\n"; - $contents .= join "", @implContentDecls, @implContent; - $codeGenerator->UpdateFile($implFileName, $contents); - - %implIncludes = (); - @implContentHeader = (); - @implContentDecls = (); - @implContent = (); - - # Update a .h file if the contents are changed. - $contents = join "", @headerContent; - $codeGenerator->UpdateFile($headerFileName, $contents); - - @headerContent = (); -} - -sub IdlToV8Type -{ - my $idlType = shift; - return "v8::Integer" if ($idlType eq "unsigned short"); - return "v8::Integer" if ($idlType eq "short"); - return "v8::Integer" if ($idlType eq "unsigned long"); - return "v8::Integer" if ($idlType eq "long"); - return "v8::String" if ($idlType eq "DOMString"); - return "v8::Boolean" if ($idlType eq "boolean"); - return "v8::Number" if ($idlType eq "double"); - die($idlType); -} - -sub IdlToNativeType -{ - my $idlType = shift; - - return IdlToWrapperType($idlType) if (IsWrapperType($idlType)); - - return "std::string" if ($idlType eq "DOMString"); - return "bool" if ($idlType eq "boolean"); - return "short" if ($idlType eq "short"); - return "long" if ($idlType eq "long"); - return "unsigned short" if ($idlType eq "unsigned short"); - return "unsigned long" if ($idlType eq "unsigned long"); - return "void" if ($idlType eq "void"); - return "char" if ($idlType eq "byte"); - return "unsigned char" if ($idlType eq "octet"); - return "double" if ($idlType eq "double"); - return "float" if ($idlType eq "float"); - die(${idlType}); -} - -sub NativeToHandle -{ - my $nativeType = shift; - my $nativeName = shift; - - return ("v8::Boolean::New(isolate, ${nativeName})") if ($nativeType eq "bool"); - return ("v8::Number::New(isolate, ${nativeName})") if ($nativeType eq "double"); - return ("v8::Number::New(isolate, ${nativeName})") if ($nativeType eq "double"); - return ("v8::Number::New(isolate, ${nativeName})") if ($nativeType eq "float"); - return ("v8::Number::New(isolate, ${nativeName})") if ($nativeType eq "short"); - return ("v8::Number::New(isolate, ${nativeName})") if ($nativeType eq "char"); - return ("v8::Number::New(isolate, ${nativeName})") if ($nativeType eq "unsigned short"); - return ("v8::Number::New(isolate, ${nativeName})") if ($nativeType eq "unsigned long"); - return ("v8::Number::New(isolate, ${nativeName})") if ($nativeType eq "unsigned char"); - return ("v8::Number::New(isolate, ${nativeName})") if ($nativeType eq "long"); - return ("v8::String::NewFromUtf8(isolate, ${nativeName}.c_str())") if ($nativeType eq "std::string"); - return ("v8::Undefined(isolate)") if ($nativeType eq "void"); - - die($nativeType); -} - -sub IdlToWrapperType -{ - my $idlType = shift; - return "Arabica::XPath::XPathValue" if ($idlType eq "XPathResult"); - return "Arabica::XPath::NodeSet" if ($idlType eq "NodeSet"); - return "Arabica::DOM::Node" if ($idlType eq "Node"); - return "Arabica::DOM::Element" if ($idlType eq "Element"); - return "uscxml::Event" if ($idlType eq "SCXMLEvent"); - return "uscxml::Storage" if ($idlType eq "Storage"); - return "uscxml::ArrayBuffer" if ($idlType eq "ArrayBuffer"); - return "uscxml::ArrayBufferView" if ($idlType eq "ArrayBufferView"); - return "uscxml::Int8Array" if ($idlType eq "Int8Array"); - return "uscxml::Uint8Array" if ($idlType eq "Uint8Array"); - return "uscxml::Uint8ClampedArray" if ($idlType eq "Uint8ClampedArray"); - return "uscxml::Int16Array" if ($idlType eq "Int16Array"); - return "uscxml::Uint16Array" if ($idlType eq "Uint16Array"); - return "uscxml::Int32Array" if ($idlType eq "Int32Array"); - return "uscxml::Uint32Array" if ($idlType eq "Uint32Array"); - return "uscxml::Float32Array" if ($idlType eq "Float32Array"); - return "uscxml::Float64Array" if ($idlType eq "Float64Array"); - return "uscxml::DataView" if ($idlType eq "DataView"); - return "Arabica::DOM::${idlType}"; -} - -sub IdlToArgHandle -{ - my $type = shift; - my $localName = shift; - my $paramName = shift; - my $thisType = shift; - - return ("v8::String::Utf8Value ${localName}(${paramName});", "*${localName}") if ($type eq "DOMString"); - return ("unsigned long ${localName} = ${paramName}->ToNumber()->Uint32Value();", ${localName}) if ($type eq "unsigned long"); - return ("long ${localName} = ${paramName}->ToNumber()->Int32Value();", ${localName}) if ($type eq "long"); - return ("double ${localName} = ${paramName}->ToNumber()->Value();", ${localName}) if ($type eq "double"); - return ("float ${localName} = ${paramName}->ToNumber()->Value();", ${localName}) if ($type eq "float"); - return ("unsigned short ${localName} = ${paramName}->ToNumber()->Uint32Value();", ${localName}) if ($type eq "unsigned short"); - return ("bool ${localName} = ${paramName}->ToBoolean()->BooleanValue();", ${localName}) if ($type eq "boolean"); - return ("char ${localName} = ${paramName}->ToNumber()->Int32Value();", ${localName}) if ($type eq "byte"); - return ("short ${localName} = ${paramName}->ToNumber()->Int32Value();", ${localName}) if ($type eq "short"); - return ("unsigned char ${localName} = ${paramName}->ToNumber()->Uint32Value();", ${localName}) if ($type eq "octet"); - # return ("void* ${localName} = v8::External::Unwrap(${paramName}->ToObject()->GetInternalField(0));", ${localName}) if ($type eq "any"); - return ("void* ${localName} = v8::Handle::Cast(${paramName}->ToObject()->GetInternalField(0))->Value();", ${localName}) if ($type eq "any"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array = v8::Array::New(isolate, v8::Array::Cast(*info[0])->Length());\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToInteger()->Value());\n}", "${localName}") if ($type eq "long[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array = v8::Array::New(isolate, v8::Array::Cast(*info[0])->Length());\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToNumber()->Value());\n}", "${localName}") if ($type eq "float[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array = v8::Array::New(isolate, v8::Array::Cast(*info[0])->Length());\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToNumber()->Value());\n}", "${localName}") if ($type eq "double[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array = v8::Array::New(isolate, v8::Array::Cast(*info[0])->Length());\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToInt32()->Value());\n}", "${localName}") if ($type eq "byte[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array = v8::Array::New(isolate, v8::Array::Cast(*info[0])->Length());\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToInt32()->Value());\n}", "${localName}") if ($type eq "short[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array = v8::Array::New(isolate, v8::Array::Cast(*info[0])->Length());\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToUint32()->Value());\n}", "${localName}") if ($type eq "unsigned short[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array = v8::Array::New(isolate, v8::Array::Cast(*info[0])->Length());\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToUint32()->Value());\n}", "${localName}") if ($type eq "unsigned long[]"); - return ("std::vector ${localName};\nv8::Handle ${localName}Array = v8::Array::New(isolate, v8::Array::Cast(*info[0])->Length());\nfor (int i = 0; i < ${localName}Array->Length(); i++) {\n ${localName}.push_back(${localName}Array->Get(i)->ToUint32()->Value());\n}", "${localName}") if ($type eq "octet[]"); - - if (IsWrapperType($type)) { - my $wrapperType = IdlToWrapperType($type); - if ($type =~ /.*Array$/ or $type =~ /^ArrayBuffer.*/) { - return ("${wrapperType}* ${localName} = V8DOM::toClassPtr(${paramName}->ToObject()->GetInternalField(0))->nativeObj;", "${localName}"); - } - - return ("${wrapperType}* ${localName} = V8DOM::toClassPtr(${paramName}->ToObject()->GetInternalField(0))->nativeObj;", "*${localName}"); - } - - print $type."\n"; - die(); -} - -sub IdlToTypeChecker -{ - my $idlType = shift; - my $attr = shift; - - return $attr."->IsString()" if ($idlType eq "DOMString"); - return $attr."->IsBoolean()" if ($idlType eq "boolean"); - return $attr."->IsInt32()" if ($idlType eq "short"); - return $attr."->IsInt32()" if ($idlType eq "long"); - return $attr."->IsArray()" if ($idlType eq "long[]"); - return $attr."->IsUint32()" if ($idlType eq "unsigned short"); - return $attr."->IsUint32()" if ($idlType eq "unsigned long"); - return $attr."->IsInt32()" if ($idlType eq "byte"); - return $attr."->IsUint32()" if ($idlType eq "octet"); - return $attr."->IsNumber()" if ($idlType eq "double"); - return $attr."->IsArray()" if ($idlType eq "double[]"); - return $attr."->IsNumber()" if ($idlType eq "float"); - return $attr."->IsArray()" if ($idlType eq "float[]"); - return $attr."->IsArray()" if ($idlType eq "short[]"); - return $attr."->IsArray()" if ($idlType eq "unsigned short[]"); - return $attr."->IsArray()" if ($idlType eq "unsigned long[]"); - return $attr."->IsArray()" if ($idlType eq "byte[]"); - return $attr."->IsArray()" if ($idlType eq "octet[]"); - return "true" if ($idlType eq "any"); - - return $attr."->IsObject() && V8".$idlType."::hasInstance(".$attr.")" if (IsWrapperType($idlType)); - - print $idlType."\n"; - die(); - -} - -sub IdlToWrapperAttrGetter -{ - my $interface = shift; - my $attribute = shift; - - return $attribute->signature->name if ($interface->name eq "NodeSet" && $attribute->signature->name eq "size"); - return $attribute->signature->name if ($interface->name eq "NodeSet" && $attribute->signature->name eq "empty"); - return "asString" if ($interface->name eq "XPathResult" && $attribute->signature->name eq "stringValue"); - return "asBool" if ($interface->name eq "XPathResult" && $attribute->signature->name eq "booleanValue"); - return "asNumber" if ($interface->name eq "XPathResult" && $attribute->signature->name eq "numberValue"); - - return "get" . ucfirst($attribute->signature->name); -} - -sub IdlToWrapperFunction -{ - my $interface = shift; - my $function = shift; - - # if ($interface->name eq "NodeSet" && $function->signature->name eq "toDocumentOrder") { - # print Dumper($interface); - # print Dumper($function); - # } - - return "to_document_order" if ($interface->name eq "NodeSet" && $function->signature->name eq "toDocumentOrder"); - - return $function->signature->name; - -} - -sub IdlToWrapperAttrSetter -{ - my $idlAttr = shift; - return "set" . ucfirst($idlAttr); -} - - -sub IsReadonly -{ - my $attribute = shift; - my $attrExt = $attribute->signature->extendedAttributes; - return ($attribute->type =~ /readonly/ || $attrExt->{"V8ReadOnly"}) && !$attrExt->{"Replaceable"}; -} - - -my %non_wrapper_types = ( - 'CompareHow' => 1, - 'DOMObject' => 1, - 'DOMString' => 1, - 'DOMString[]' => 1, - 'DOMTimeStamp' => 1, - 'Date' => 1, - 'Dictionary' => 1, - 'EventListener' => 1, - # FIXME: When EventTarget is an interface and not a mixin, fix this so that - # EventTarget is treated as a wrapper type. - 'EventTarget' => 1, - 'IDBKey' => 1, - 'JSObject' => 1, - 'MediaQueryListListener' => 1, - 'NodeFilter' => 1, - 'any' => 1, - 'boolean' => 1, - 'double' => 1, - 'float' => 1, - 'int' => 1, - 'long long' => 1, - 'long' => 1, - 'long[]' => 1, - 'short' => 1, - 'short[]' => 1, - 'void' => 1, - 'byte' => 1, - 'byte[]' => 1, - 'octet' => 1, - 'char' => 1, - 'float[]' => 1, - 'float' => 1, - 'double[]' => 1, - 'octet[]' => 1, - 'double' => 1, - 'unsigned int' => 1, - 'unsigned long long' => 1, - 'unsigned long' => 1, - 'unsigned long[]' => 1, - 'unsigned short' => 1, - 'unsigned short[]' => 1 -); - -sub IsWrapperType -{ - my $type = shift; - return !($non_wrapper_types{$type}); -} - -sub GenerateHeaderContentHeader -{ - my $interface = shift; - my $v8InterfaceName = "V8" . $interface->name; - my $conditionalString = $codeGenerator->GenerateConditionalString($interface); - - my @headerContentHeader = split("\r", $headerTemplate); - - push(@headerContentHeader, "\n#if ${conditionalString}\n") if $conditionalString; - push(@headerContentHeader, "\n#ifndef ${v8InterfaceName}" . "_h"); - push(@headerContentHeader, "\n#define ${v8InterfaceName}" . "_h\n\n"); - return @headerContentHeader; -} - -1; diff --git a/contrib/dom/scripts/IDLAttributes.txt b/contrib/dom/scripts/IDLAttributes.txt deleted file mode 100644 index e18b311..0000000 --- a/contrib/dom/scripts/IDLAttributes.txt +++ /dev/null @@ -1,126 +0,0 @@ -# -# This file describes all IDL attributes. -# If any IDL file uses an IDL attribute not listed below, the WebKit build will fail. -# If you want to add a new IDL attribute, you need to -# (1) add the IDL attribute to this file -# (2) add the explanation to the WebKit IDL document (https://trac.webkit.org/wiki/WebKitIDL) -# (3) add test cases to run-bindings-tests -# -# The syntax of this file is as follows: -# - You can write one IDL attribute per one line. -# - "ATTR" means that the IDL attribute ATTR does not take any argument; i.e. [ATTR]. -# - "ATTR=X" means that the IDL attribute ATTR always takes one argument X; i.e. [ATTR=X]. -# - "ATTR=X|Y|Z" means that the IDL attribute ATTR takes one or more arguments -# and the arguments are X, Y or Z; e.g. [ATTR=X], [ATTR=Y], [ATTR=X|Z], [ATTR=X|Y|Z]. -# - "ATTR=|X|Y|Z" means that the IDL attribute ATTR can take arguments -# and the arguments are X, Y or Z; e.g. [ATTR], [ATTR=X], [ATTR=Y], [ATTR=X|Z], [ATTR=X|Y|Z]. -# - "ATTR=*" means that the IDL attribute ATTR can take arbitrary arguments; -# e.g. [ATTR=INDEXED_DATABASE], [ATTR=deleteFunction]. -# - -ActiveDOMObject -CPPPureInterface -CachedAttribute -CallWith=ScriptExecutionContext|ScriptState|ScriptArguments|CallStack -Callback -CheckSecurity -CheckSecurityForNode -Clamp -Conditional=* -Constructor -ConstructorParameters=* -ConstructorRaisesException -ConstructorTemplate=Event|TypedArray -Custom -CustomCall -CustomConstructor -CustomDeleteProperty -CustomEnumerateProperty -CustomGetOwnPropertySlot -CustomGetter -CustomIndexedSetter -CustomIsReachable -CustomNamedGetter -CustomNamedSetter -CustomPutFunction -CustomReturn -CustomSetter -CustomToJSObject -Deletable -DoNotCheckConstants -DoNotCheckSecurity -DoNotCheckSecurityOnGetter -DoNotCheckSecurityOnSetter -EventTarget -ExtendsDOMGlobalObject -GenerateIsReachable=ImplDocument|ImplElementRoot|ImplOwnerNodeRoot -Immutable -ImplementedAs=* -IndexedGetter -InitializedByEventConstructor -InterfaceName=* -IsIndex -IsWorkerContext -JSCustom -JSCustomConstructor -JSCustomDefineOwnProperty -JSCustomDefineOwnPropertyOnPrototype -JSCustomFinalize -JSCustomGetOwnPropertySlotAndDescriptor -JSCustomGetter -JSCustomHeader -JSCustomIsReachable -JSCustomMarkFunction -JSCustomNamedGetterOnPrototype -JSCustomPushEventHandlerScope -JSCustomSetter -JSCustomToJSObject -JSCustomToNativeObject -JSGenerateIsReachable=|Impl|ImplContext|ImplDocument|ImplElementRoot|ImplFrame|ImplOwnerNodeRoot -JSGenerateToJSObject -JSGenerateToNativeObject -JSInlineGetOwnPropertySlot -JSLegacyParent=* -JSNoStaticTables -JSWindowEventListener -MasqueradesAsUndefined -NamedConstructor=* -NamedGetter -NotEnumerable -NumericIndexedGetter -ObjCCustomImplementation -ObjCLegacyUnnamedParameters -ObjCPolymorphic -ObjCProtocol -OmitConstructor -Optional=|DefaultIsNullString|DefaultIsUndefined -PassThisToCallback=* -Reflect=* -Replaceable -ReplaceableConstructor -ReturnNewObject -StrictTypeChecking -Supplemental=* -SuppressToJSObject -TransferList=* -TreatNullAs=NullString -TreatReturnedNullStringAs=Null|Undefined -TreatUndefinedAs=NullString -TypedArray=* -URL -V8CacheAttributeForGC -V8Custom -V8CustomConstructor -V8CustomGetter -V8CustomIsReachable -V8CustomSetter -V8CustomToJSObject -V8DependentLifetime -V8DoNotCheckSignature -V8EnabledAtRuntime=* -V8EnabledPerContext=* -V8GenerateIsReachable=ImplDocument|ImplElementRoot|ImplOwnerRoot|ImplOwnerNodeRoot -V8NoWrapperCache -V8MeasureAs=* -V8ReadOnly -V8Unforgeable diff --git a/contrib/dom/scripts/IDLParser.pm b/contrib/dom/scripts/IDLParser.pm deleted file mode 100644 index 61fab7b..0000000 --- a/contrib/dom/scripts/IDLParser.pm +++ /dev/null @@ -1,2456 +0,0 @@ -# -# KDOM IDL parser -# -# Copyright (C) 2005 Nikolas Zimmermann -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -package IDLParser; - -use strict; - -use preprocessor; -use Class::Struct; -use Data::Dumper; - -use constant StringToken => 0; -use constant IntegerToken => 1; -use constant FloatToken => 2; -use constant IdentifierToken => 3; -use constant OtherToken => 4; -use constant EmptyToken => 5; - -# Used to represent a parsed IDL document -struct( idlDocument => { - interfaces => '@', # All parsed interfaces - fileName => '$' # file name -}); - -# Used to represent 'interface' blocks -struct( domInterface => { - name => '$', # Class identifier - parents => '@', # List of strings - constants => '@', # List of 'domConstant' - functions => '@', # List of 'domFunction' - attributes => '@', # List of 'domAttribute' - extendedAttributes => '$', # Extended attributes - constructors => '@', # Constructor - isException => '$', # Used for exception interfaces -}); - -# Used to represent domInterface contents (name of method, signature) -struct( domFunction => { - isStatic => '$', - signature => '$', # Return type/Object name/extended attributes - parameters => '@', # List of 'domSignature' - raisesExceptions => '@', # Possibly raised exceptions. -}); - -# Used to represent domInterface contents (name of attribute, signature) -struct( domAttribute => { - type => '$', # Attribute type (including namespace) - isStatic => '$', - signature => '$', # Attribute signature - getterExceptions => '@', # Possibly raised exceptions. - setterExceptions => '@', # Possibly raised exceptions. -}); - -# Used to represent a map of 'variable name' <-> 'variable type' -struct( domSignature => { - direction => '$', # Variable direction (in or out) - name => '$', # Variable name - type => '$', # Variable type - extendedAttributes => '$', # Extended attributes - isNullable => '$', # Is variable type Nullable (T?) - isOptional => '$', # Is variable optional (T?) - isVariadic => '$' # Is variable variadic (long... numbers) -}); - -# Used to represent string constants -struct( domConstant => { - name => '$', # DOM Constant identifier - type => '$', # Type of data - value => '$', # Constant value - extendedAttributes => '$', # Extended attributes -}); - -struct( Token => { - type => '$', # type of token - value => '$' # value of token -}); - -sub new { - my $class = shift; - - my $emptyToken = Token->new(); - $emptyToken->type(EmptyToken); - $emptyToken->value("empty"); - - my $self = { - DocumentContent => "", - EmptyToken => $emptyToken, - NextToken => $emptyToken, - Token => $emptyToken, - Line => "", - LineNumber => 1 - }; - return bless $self, $class; -} - -sub assertTokenValue -{ - my $self = shift; - my $token = shift; - my $value = shift; - my $line = shift; - my $msg = "Next token should be " . $value . ", but " . $token->value() . " at " . $self->{Line}; - if (defined ($line)) { - $msg .= " IDLParser.pm:" . $line; - } - die $msg unless $token->value() eq $value; -} - -sub assertTokenType -{ - my $self = shift; - my $token = shift; - my $type = shift; - die "Next token's type should be " . $type . ", but " . $token->type() . " at " . $self->{Line} unless $token->type() eq $type; -} - -sub assertUnexpectedToken -{ - my $self = shift; - my $token = shift; - my $line = shift; - my $msg = "Unexpected token " . $token . " at " . $self->{Line}; - if (defined ($line)) { - $msg .= " IDLParser.pm:" . $line; - } - die $msg; -} - -sub Parse -{ - my $self = shift; - my $fileName = shift; - my $defines = shift; - my $preprocessor = shift; - - my @definitions = (); - - my @lines = applyPreprocessor($fileName, $defines, $preprocessor); - $self->{Line} = $lines[0]; - $self->{DocumentContent} = join(' ', @lines); - - $self->getToken(); - eval { - my $result = $self->parseDefinitions(); - push(@definitions, @{$result}); - - my $next = $self->nextToken(); - $self->assertTokenType($next, EmptyToken); - }; - die $@ . " in $fileName" if $@; - - die "No document found" unless @definitions; - - my $document; - if ($#definitions == 0 && ref($definitions[0]) eq "idlDocument") { - $document = $definitions[0]; - } else { - $document = idlDocument->new(); - push(@{$document->interfaces}, @definitions); - } - - $document->fileName($fileName); - return $document; -} - -sub nextToken -{ - my $self = shift; - return $self->{NextToken}; -} - -sub getToken -{ - my $self = shift; - $self->{Token} = $self->{NextToken}; - $self->{NextToken} = $self->getTokenInternal(); - return $self->{Token}; -} - -my $whitespaceTokenPattern = '^[\t\n\r ]*[\n\r]'; -my $floatTokenPattern = '^(-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+))'; -my $integerTokenPattern = '^(-?[1-9][0-9]*|-?0[Xx][0-9A-Fa-f]+|-?0[0-7]*)'; -my $stringTokenPattern = '^(\"[^\"]*\")'; -my $identifierTokenPattern = '^([A-Z_a-z][0-9A-Z_a-z]*)'; -my $otherTokenPattern = '^(::|\.\.\.|[^\t\n\r 0-9A-Z_a-z])'; - -sub getTokenInternal -{ - my $self = shift; - - if ($self->{DocumentContent} =~ /$whitespaceTokenPattern/) { - $self->{DocumentContent} =~ s/($whitespaceTokenPattern)//; - my $skipped = $1; - $self->{LineNumber}++ while ($skipped =~ /\n/g); - if ($self->{DocumentContent} =~ /^([^\n\r]+)/) { - $self->{Line} = $self->{LineNumber} . ":" . $1; - } else { - $self->{Line} = "Unknown"; - } - } - $self->{DocumentContent} =~ s/^([\t\n\r ]+)//; - if ($self->{DocumentContent} eq "") { - return $self->{EmptyToken}; - } - - my $token = Token->new(); - if ($self->{DocumentContent} =~ /$floatTokenPattern/) { - $token->type(FloatToken); - $token->value($1); - $self->{DocumentContent} =~ s/$floatTokenPattern//; - return $token; - } - if ($self->{DocumentContent} =~ /$integerTokenPattern/) { - $token->type(IntegerToken); - $token->value($1); - $self->{DocumentContent} =~ s/$integerTokenPattern//; - return $token; - } - if ($self->{DocumentContent} =~ /$stringTokenPattern/) { - $token->type(StringToken); - $token->value($1); - $self->{DocumentContent} =~ s/$stringTokenPattern//; - return $token; - } - if ($self->{DocumentContent} =~ /$identifierTokenPattern/) { - $token->type(IdentifierToken); - $token->value($1); - $self->{DocumentContent} =~ s/$identifierTokenPattern//; - return $token; - } - if ($self->{DocumentContent} =~ /$otherTokenPattern/) { - $token->type(OtherToken); - $token->value($1); - $self->{DocumentContent} =~ s/$otherTokenPattern//; - return $token; - } - die "Failed in tokenizing at " . $self->{Line}; -} - -my $nextAttributeOld_1 = '^(attribute|inherit|readonly)$'; -my $nextPrimitiveType_1 = '^(int|long|short|unsigned)$'; -my $nextPrimitiveType_2 = '^(double|float|unrestricted)$'; -my $nextSetGetRaises2_1 = '^(;|getraises|setraises)$'; -my $nextArgumentList_1 = '^(\(|::|ByteString|DOMString|Date|\[|any|boolean|byte|double|float|in|int|long|object|octet|optional|sequence|short|unrestricted|unsigned)$'; -my $nextNonAnyType_1 = '^(boolean|byte|double|float|int|long|octet|short|unrestricted|unsigned)$'; -my $nextInterfaceMemberOld_1 = '^(\(|::|ByteString|DOMString|Date|any|attribute|boolean|byte|creator|deleter|double|float|getter|inherit|int|legacycaller|long|object|octet|readonly|sequence|serializer|setter|short|static|stringifier|unrestricted|unsigned|void)$'; -my $nextOptionalIteratorInterfaceOrObject_1 = '^(;|=)$'; -my $nextAttributeOrOperationOrIterator_1 = '^(static|stringifier)$'; -my $nextAttributeOrOperationOrIterator_2 = '^(\(|::|ByteString|DOMString|Date|any|boolean|byte|creator|deleter|double|float|getter|int|legacycaller|long|object|octet|sequence|setter|short|unrestricted|unsigned|void)$'; -my $nextUnrestrictedFloatType_1 = '^(double|float)$'; -my $nextExtendedAttributeRest3_1 = '^(\,|::|\])$'; -my $nextExceptionField_1 = '^(\(|::|ByteString|DOMString|Date|any|boolean|byte|double|float|int|long|object|octet|sequence|short|unrestricted|unsigned)$'; -my $nextType_1 = '^(::|ByteString|DOMString|Date|any|boolean|byte|double|float|int|long|object|octet|sequence|short|unrestricted|unsigned)$'; -my $nextSpecials_1 = '^(creator|deleter|getter|legacycaller|setter)$'; -my $nextDefinitions_1 = '^(::|callback|dictionary|enum|exception|interface|partial|typedef)$'; -my $nextExceptionMembers_1 = '^(\(|::|ByteString|DOMString|Date|\[|any|boolean|byte|const|double|float|int|long|object|octet|optional|sequence|short|unrestricted|unsigned)$'; -my $nextAttributeRest_1 = '^(attribute|readonly)$'; -my $nextInterfaceMembers_1 = '^(\(|::|ByteString|DOMString|Date|any|attribute|boolean|byte|const|creator|deleter|double|float|getter|inherit|int|legacycaller|long|object|octet|readonly|sequence|serializer|setter|short|static|stringifier|unrestricted|unsigned|void)$'; -my $nextSingleType_1 = '^(::|ByteString|DOMString|Date|boolean|byte|double|float|int|long|object|octet|sequence|short|unrestricted|unsigned)$'; -my $nextGet_1 = '^(;|getraises|getter|setraises|setter)$'; -my $nextArgumentName_1 = '^(attribute|callback|const|creator|deleter|dictionary|enum|exception|getter|implements|inherit|interface|legacycaller|partial|serializer|setter|static|stringifier|typedef|unrestricted)$'; -my $nextConstValue_1 = '^(false|true)$'; -my $nextConstValue_2 = '^(-|Infinity|NaN)$'; -my $nextDefinition_1 = '^(callback|interface)$'; -my $nextAttributeOrOperationRest_1 = '^(\(|::|ByteString|DOMString|Date|any|boolean|byte|double|float|int|long|object|octet|sequence|short|unrestricted|unsigned|void)$'; -my $nextUnsignedIntegerType_1 = '^(int|long|short)$'; -my $nextDefaultValue_1 = '^(-|Infinity|NaN|false|null|true)$'; - - -sub parseDefinitions -{ - my $self = shift; - my @definitions = (); - - while (1) { - my $next = $self->nextToken(); - my $definition; - if ($next->value() eq "[") { - my $extendedAttributeList = $self->parseExtendedAttributeList(); - $definition = $self->parseDefinition($extendedAttributeList); - } elsif ($next->type() == IdentifierToken || $next->value() =~ /$nextDefinitions_1/) { - $definition = $self->parseDefinitionOld(); - } else { - last; - } - if (defined ($definition)) { - push(@definitions, $definition); - } - } - return \@definitions; -} - -sub parseDefinition -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() =~ /$nextDefinition_1/) { - return $self->parseCallbackOrInterface($extendedAttributeList); - } - if ($next->value() eq "partial") { - return $self->parsePartial($extendedAttributeList); - } - if ($next->value() eq "dictionary") { - return $self->parseDictionary($extendedAttributeList); - } - if ($next->value() eq "exception") { - return $self->parseException($extendedAttributeList); - } - if ($next->value() eq "enum") { - return $self->parseEnum($extendedAttributeList); - } - if ($next->value() eq "typedef") { - return $self->parseTypedef($extendedAttributeList); - } - if ($next->type() == IdentifierToken || $next->value() eq "::") { - return $self->parseImplementsStatement($extendedAttributeList); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseCallbackOrInterface -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "callback") { - $self->assertTokenValue($self->getToken(), "callback", __LINE__); - return $self->parseCallbackRestOrInterface($extendedAttributeList); - } - if ($next->value() eq "interface") { - return $self->parseInterface($extendedAttributeList); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseCallbackRestOrInterface -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "interface") { - return $self->parseInterface($extendedAttributeList); - } - if ($next->type() == IdentifierToken) { - return $self->parseCallbackRest($extendedAttributeList); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseInterface -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "interface") { - my $interface = domInterface->new(); - $self->assertTokenValue($self->getToken(), "interface", __LINE__); - my $interfaceNameToken = $self->getToken(); - $self->assertTokenType($interfaceNameToken, IdentifierToken); - $interface->name($interfaceNameToken->value()); - push(@{$interface->parents}, @{$self->parseInheritance()}); - $self->assertTokenValue($self->getToken(), "{", __LINE__); - my $interfaceMembers = $self->parseInterfaceMembers(); - $self->assertTokenValue($self->getToken(), "}", __LINE__); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - applyMemberList($interface, $interfaceMembers); - applyExtendedAttributeList($interface, $extendedAttributeList); - return $interface; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parsePartial -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "partial") { - $self->assertTokenValue($self->getToken(), "partial", __LINE__); - return $self->parsePartialDefinition($extendedAttributeList); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parsePartialDefinition -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "interface") { - return $self->parsePartialInterface($extendedAttributeList); - } - if ($next->value() eq "dictionary") { - return $self->parsePartialDictionary($extendedAttributeList); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parsePartialInterface -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "interface") { - $self->assertTokenValue($self->getToken(), "interface", __LINE__); - $self->assertTokenType($self->getToken(), IdentifierToken); - $self->assertTokenValue($self->getToken(), "{", __LINE__); - $self->parseInterfaceMembers(); - $self->assertTokenValue($self->getToken(), "}", __LINE__); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseInterfaceMembers -{ - my $self = shift; - my @interfaceMembers = (); - - while (1) { - my $next = $self->nextToken(); - my $interfaceMember; - - if ($next->value() eq "[") { - my $extendedAttributeList = $self->parseExtendedAttributeList(); - $interfaceMember = $self->parseInterfaceMember($extendedAttributeList); - } elsif ($next->type() == IdentifierToken || $next->value() =~ /$nextInterfaceMembers_1/) { - $interfaceMember = $self->parseInterfaceMemberOld(); - } else { - last; - } - if (defined $interfaceMember) { - push(@interfaceMembers, $interfaceMember); - } - } - return \@interfaceMembers; -} - -sub parseInterfaceMember -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "const") { - return $self->parseConst($extendedAttributeList); - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextInterfaceMemberOld_1/) { - return $self->parseAttributeOrOperationOrIterator($extendedAttributeList); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseDictionary -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "dictionary") { - $self->assertTokenValue($self->getToken(), "dictionary", __LINE__); - $self->assertTokenType($self->getToken(), IdentifierToken); - $self->parseInheritance(); - $self->assertTokenValue($self->getToken(), "{", __LINE__); - $self->parseDictionaryMembers(); - $self->assertTokenValue($self->getToken(), "}", __LINE__); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseDictionaryMembers -{ - my $self = shift; - - while (1) { - my $next = $self->nextToken(); - if ($next->value() eq "[") { - my $extendedAttributeList = $self->parseExtendedAttributeList(); - $self->parseDictionaryMember($extendedAttributeList); - } elsif ($next->type() == IdentifierToken || $next->value() =~ /$nextExceptionField_1/) { - $self->parseDictionaryMemberOld(); - } else { - last; - } - } -} - -sub parseDictionaryMember -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken || $next->value() =~ /$nextExceptionField_1/) { - $self->parseType(); - $self->assertTokenType($self->getToken(), IdentifierToken); - $self->parseDefault(); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parsePartialDictionary -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "dictionary") { - $self->assertTokenValue($self->getToken(), "dictionary", __LINE__); - $self->assertTokenType($self->getToken(), IdentifierToken); - $self->assertTokenValue($self->getToken(), "{", __LINE__); - $self->parseDictionaryMembers(); - $self->assertTokenValue($self->getToken(), "}", __LINE__); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseDefault -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "=") { - $self->assertTokenValue($self->getToken(), "=", __LINE__); - return $self->parseDefaultValue(); - } -} - -sub parseDefaultValue -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->type() == FloatToken || $next->type() == IntegerToken || $next->value() =~ /$nextDefaultValue_1/) { - return $self->parseConstValue(); - } - if ($next->type() == StringToken) { - return $self->getToken()->value(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseException -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "exception") { - my $interface = domInterface->new(); - $self->assertTokenValue($self->getToken(), "exception", __LINE__); - my $exceptionNameToken = $self->getToken(); - $self->assertTokenType($exceptionNameToken, IdentifierToken); - $interface->name($exceptionNameToken->value()); - $interface->isException(1); - push(@{$interface->parents}, @{$self->parseInheritance()}); - $self->assertTokenValue($self->getToken(), "{", __LINE__); - my $exceptionMembers = $self->parseExceptionMembers(); - $self->assertTokenValue($self->getToken(), "}", __LINE__); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - applyMemberList($interface, $exceptionMembers); - applyExtendedAttributeList($interface, $extendedAttributeList); - return $interface; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseExceptionMembers -{ - my $self = shift; - my @members = (); - - while (1) { - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken || $next->value() =~ /$nextExceptionMembers_1/) { - my $extendedAttributeList = $self->parseExtendedAttributeListAllowEmpty(); - #my $member = $self->parseExceptionMember($extendedAttributeList); - my $member = $self->parseInterfaceMember($extendedAttributeList); - if (defined ($member)) { - push(@members, $member); - } - } else { - last; - } - } - return \@members; -} - -sub parseInheritance -{ - my $self = shift; - my @parent = (); - - my $next = $self->nextToken(); - if ($next->value() eq ":") { - $self->assertTokenValue($self->getToken(), ":", __LINE__); - my $scopedName = $self->parseScopedName(); - push(@parent, $scopedName); - # Multiple inheritance? - push(@parent, @{$self->parseIdentifiers()}); - } - return \@parent; -} - -sub parseEnum -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "enum") { - $self->assertTokenValue($self->getToken(), "enum", __LINE__); - $self->assertTokenType($self->getToken(), IdentifierToken); - $self->assertTokenValue($self->getToken(), "{", __LINE__); - $self->parseEnumValueList(); - $self->assertTokenValue($self->getToken(), "}", __LINE__); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseEnumValueList -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->type() == StringToken) { - $self->assertTokenType($self->getToken(), StringToken); - $self->parseEnumValues(); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseEnumValues -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq ",") { - $self->assertTokenValue($self->getToken(), ",", __LINE__); - $self->assertTokenType($self->getToken(), StringToken); - $self->parseEnumValues(); - } -} - -sub parseCallbackRest -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken) { - $self->assertTokenType($self->getToken(), IdentifierToken); - $self->assertTokenValue($self->getToken(), "=", __LINE__); - $self->parseReturnType(); - $self->assertTokenValue($self->getToken(), "(", __LINE__); - $self->parseArgumentList(); - $self->assertTokenValue($self->getToken(), ")", __LINE__); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseTypedef -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "typedef") { - $self->assertTokenValue($self->getToken(), "typedef", __LINE__); - $self->parseExtendedAttributeList(); - $self->parseType(); - $self->assertTokenType($self->getToken(), IdentifierToken); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseImplementsStatement -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken) { - $self->parseScopedName(); - $self->assertTokenValue($self->getToken(), "implements", __LINE__); - $self->parseScopedName(); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseConst -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "const") { - my $newDataNode = domConstant->new(); - $self->assertTokenValue($self->getToken(), "const", __LINE__); - $newDataNode->type($self->parseConstType()); - my $constNameToken = $self->getToken(); - $self->assertTokenType($constNameToken, IdentifierToken); - $newDataNode->name($constNameToken->value()); - $self->assertTokenValue($self->getToken(), "=", __LINE__); - $newDataNode->value($self->parseConstValue()); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - $newDataNode->extendedAttributes($extendedAttributeList); - return $newDataNode; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseConstValue -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() =~ /$nextConstValue_1/) { - return $self->parseBooleanLiteral(); - } - if ($next->value() eq "null") { - $self->assertTokenValue($self->getToken(), "null", __LINE__); - return "null"; - } - if ($next->type() == FloatToken || $next->value() =~ /$nextConstValue_2/) { - return $self->parseFloatLiteral(); - } - # backward compatibility - if ($next->type() == StringToken) { - return $self->getToken()->value(); - } - if ($next->type() == IntegerToken) { - return $self->getToken()->value(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseBooleanLiteral -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "true") { - $self->assertTokenValue($self->getToken(), "true", __LINE__); - return "true"; - } - if ($next->value() eq "false") { - $self->assertTokenValue($self->getToken(), "false", __LINE__); - return "false"; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseFloatLiteral -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "-") { - $self->assertTokenValue($self->getToken(), "-", __LINE__); - $self->assertTokenValue($self->getToken(), "Infinity", __LINE__); - return "-Infinity"; - } - if ($next->value() eq "Infinity") { - $self->assertTokenValue($self->getToken(), "Infinity", __LINE__); - return "Infinity"; - } - if ($next->value() eq "NaN") { - $self->assertTokenValue($self->getToken(), "NaN", __LINE__); - return "NaN"; - } - if ($next->type() == FloatToken) { - return $self->getToken()->value(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseAttributeOrOperationOrIterator -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "serializer") { - return $self->parseSerializer($extendedAttributeList); - } - if ($next->value() =~ /$nextAttributeOrOperationOrIterator_1/) { - my $qualifier = $self->parseQualifier(); - my $newDataNode = $self->parseAttributeOrOperationRest($extendedAttributeList); - if (defined($newDataNode) && $qualifier eq "static") { - $newDataNode->isStatic(1); - } - return $newDataNode; - } - if ($next->value() =~ /$nextAttributeOld_1/) { - return $self->parseAttribute($extendedAttributeList); - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextAttributeOrOperationOrIterator_2/) { - return $self->parseOperationOrIterator($extendedAttributeList); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseSerializer -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "serializer") { - $self->assertTokenValue($self->getToken(), "serializer", __LINE__); - return $self->parseSerializerRest($extendedAttributeList); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseSerializerRest -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "=") { - $self->assertTokenValue($self->getToken(), "=", __LINE__); - return $self->parseSerializationPattern($extendedAttributeList); - } - if ($next->type() == IdentifierToken || $next->value() eq "(") { - return $self->parseOperationRest($extendedAttributeList); - } -} - -sub parseSerializationPattern -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "{") { - $self->assertTokenValue($self->getToken(), "{", __LINE__); - $self->parseSerializationPatternMap(); - $self->assertTokenValue($self->getToken(), "}", __LINE__); - return; - } - if ($next->value() eq "[") { - $self->assertTokenValue($self->getToken(), "[", __LINE__); - $self->parseSerializationPatternList(); - $self->assertTokenValue($self->getToken(), "]", __LINE__); - return; - } - if ($next->type() == IdentifierToken) { - $self->assertTokenType($self->getToken(), IdentifierToken); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseSerializationPatternMap -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "getter") { - $self->assertTokenValue($self->getToken(), "getter", __LINE__); - return; - } - if ($next->value() eq "inherit") { - $self->assertTokenValue($self->getToken(), "inherit", __LINE__); - $self->parseIdentifiers(); - return; - } - if ($next->type() == IdentifierToken) { - $self->assertTokenType($self->getToken(), IdentifierToken); - $self->parseIdentifiers(); - } -} - -sub parseSerializationPatternList -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "getter") { - $self->assertTokenValue($self->getToken(), "getter", __LINE__); - return; - } - if ($next->type() == IdentifierToken) { - $self->assertTokenType($self->getToken(), IdentifierToken); - $self->parseIdentifiers(); - } -} - -sub parseIdentifiers -{ - my $self = shift; - my @idents = (); - - while (1) { - my $next = $self->nextToken(); - if ($next->value() eq ",") { - $self->assertTokenValue($self->getToken(), ",", __LINE__); - my $token = $self->getToken(); - $self->assertTokenType($token, IdentifierToken); - push(@idents, $token->value()); - } else { - last; - } - } - return \@idents; -} - -sub parseQualifier -{ - my $self = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "static") { - $self->assertTokenValue($self->getToken(), "static", __LINE__); - return "static"; - } - if ($next->value() eq "stringifier") { - $self->assertTokenValue($self->getToken(), "stringifier", __LINE__); - return "stringifier"; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseAttributeOrOperationRest -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() =~ /$nextAttributeRest_1/) { - return $self->parseAttributeRest($extendedAttributeList); - } - if ($next->value() eq ";") { - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextAttributeOrOperationRest_1/) { - my $returnType = $self->parseReturnType(); - my $interface = $self->parseOperationRest($extendedAttributeList); - if (defined ($interface)) { - $interface->signature->type($returnType); - } - return $interface; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseAttribute -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() =~ /$nextAttributeOld_1/) { - $self->parseInherit(); - return $self->parseAttributeRest($extendedAttributeList); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseAttributeRest -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() =~ /$nextAttributeRest_1/) { - my $newDataNode = domAttribute->new(); - if ($self->parseReadOnly()) { - $newDataNode->type("readonly attribute"); - } else { - $newDataNode->type("attribute"); - } - $self->assertTokenValue($self->getToken(), "attribute", __LINE__); - $newDataNode->signature(domSignature->new()); - $newDataNode->signature->type($self->parseType()); - my $token = $self->getToken(); - $self->assertTokenType($token, IdentifierToken); - $newDataNode->signature->name($token->value()); - my $getRef = $self->parseGet(); - if (defined $getRef) { - push(@{$newDataNode->getterExceptions}, @{$getRef->{"getraises"}}); - push(@{$newDataNode->setterExceptions}, @{$getRef->{"setraises"}}); - } - $self->assertTokenValue($self->getToken(), ";", __LINE__); - $newDataNode->signature->extendedAttributes($extendedAttributeList); - return $newDataNode; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseInherit -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "inherit") { - $self->assertTokenValue($self->getToken(), "inherit", __LINE__); - return 1; - } - return 0; -} - -sub parseReadOnly -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "readonly") { - $self->assertTokenValue($self->getToken(), "readonly", __LINE__); - return 1; - } - return 0; -} - -sub parseOperationOrIterator -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() =~ /$nextSpecials_1/) { - return $self->parseSpecialOperation($extendedAttributeList); - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextAttributeOrOperationRest_1/) { - my $returnType = $self->parseReturnType(); - my $interface = $self->parseOperationOrIteratorRest($extendedAttributeList); - if (defined ($interface)) { - $interface->signature->type($returnType); - } - return $interface; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseSpecialOperation -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() =~ /$nextSpecials_1/) { - $self->parseSpecial(); - $self->parseSpecials(); - my $returnType = $self->parseReturnType(); - my $interface = $self->parseOperationRest($extendedAttributeList); - if (defined ($interface)) { - $interface->signature->type($returnType); - } - return $interface; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseSpecials -{ - my $self = shift; - - while (1) { - my $next = $self->nextToken(); - if ($next->value() =~ /$nextSpecials_1/) { - $self->parseSpecial(); - } else { - last; - } - } - return []; -} - -sub parseSpecial -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "getter") { - $self->assertTokenValue($self->getToken(), "getter", __LINE__); - return "getter"; - } - if ($next->value() eq "setter") { - $self->assertTokenValue($self->getToken(), "setter", __LINE__); - return "setter"; - } - if ($next->value() eq "creator") { - $self->assertTokenValue($self->getToken(), "creator", __LINE__); - return "creator"; - } - if ($next->value() eq "deleter") { - $self->assertTokenValue($self->getToken(), "deleter", __LINE__); - return "deleter"; - } - if ($next->value() eq "legacycaller") { - $self->assertTokenValue($self->getToken(), "legacycaller", __LINE__); - return "legacycaller"; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseOperationOrIteratorRest -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "iterator") { - return $self->parseIteratorRest($extendedAttributeList); - } - if ($next->type() == IdentifierToken || $next->value() eq "(") { - return $self->parseOperationRest($extendedAttributeList); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseIteratorRest -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "iterator") { - $self->assertTokenValue($self->getToken(), "iterator", __LINE__); - $self->parseOptionalIteratorInterfaceOrObject($extendedAttributeList); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseOptionalIteratorInterfaceOrObject -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() =~ /$nextOptionalIteratorInterfaceOrObject_1/) { - return $self->parseOptionalIteratorInterface($extendedAttributeList); - } - if ($next->value() eq "object") { - $self->assertTokenValue($self->getToken(), "object", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseOptionalIteratorInterface -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "=") { - $self->assertTokenValue($self->getToken(), "=", __LINE__); - $self->assertTokenType($self->getToken(), IdentifierToken); - } -} - -sub parseOperationRest -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken || $next->value() eq "(") { - my $newDataNode = domFunction->new(); - $newDataNode->signature(domSignature->new()); - my $name = $self->parseOptionalIdentifier(); - $newDataNode->signature->name($name); - $self->assertTokenValue($self->getToken(), "(", $name, __LINE__); - push(@{$newDataNode->parameters}, @{$self->parseArgumentList()}); - $self->assertTokenValue($self->getToken(), ")", __LINE__); - push(@{$newDataNode->raisesExceptions}, @{$self->parseRaises()}); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - $newDataNode->signature->extendedAttributes($extendedAttributeList); - return $newDataNode; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseOptionalIdentifier -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken) { - my $token = $self->getToken(); - return $token->value(); - } - return ""; -} - -sub parseArgumentList -{ - my $self = shift; - my @arguments = (); - - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken || $next->value() =~ /$nextArgumentList_1/) { - push(@arguments, $self->parseArgument()); - push(@arguments, @{$self->parseArguments()}); - } - return \@arguments; -} - -sub parseArguments -{ - my $self = shift; - my @arguments = (); - - while (1) { - my $next = $self->nextToken(); - if ($next->value() eq ",") { - $self->assertTokenValue($self->getToken(), ",", __LINE__); - push(@arguments, $self->parseArgument()); - } else { - last; - } - } - return \@arguments; -} - -sub parseArgument -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken || $next->value() =~ /$nextArgumentList_1/) { - my $in = $self->parseIn(); - my $extendedAttributeList = $self->parseExtendedAttributeListAllowEmpty(); - my $argument = $self->parseOptionalOrRequiredArgument($extendedAttributeList); - $argument->direction($self->parseIn()); - return $argument; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseOptionalOrRequiredArgument -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $paramDataNode = domSignature->new(); - $paramDataNode->extendedAttributes($extendedAttributeList); - - my $next = $self->nextToken(); - if ($next->value() eq "optional") { - $self->assertTokenValue($self->getToken(), "optional", __LINE__); - my $type = $self->parseType(); - # domDataNode can only consider last "?". - if ($type =~ /\?$/) { - $paramDataNode->isNullable(1); - } else { - $paramDataNode->isNullable(0); - } - # Remove all "?" if exists, e.g. "object?[]?" -> "object[]". - $type =~ s/\?//g; - $paramDataNode->type($type); - $paramDataNode->name($self->parseArgumentName()); - $self->parseDefault(); - $paramDataNode->isOptional(1); -# print Dumper($paramDataNode); - return $paramDataNode; - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextExceptionField_1/) { - my $type = $self->parseType(); - # domDataNode can only consider last "?". - if ($type =~ /\?$/) { - $paramDataNode->isNullable(1); - } else { - $paramDataNode->isNullable(0); - } - # Remove all "?" if exists, e.g. "object?[]?" -> "object[]". - $type =~ s/\?//g; - $paramDataNode->type($type); - $paramDataNode->isVariadic($self->parseEllipsis()); - $paramDataNode->name($self->parseArgumentName()); - return $paramDataNode; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseArgumentName -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() =~ /$nextArgumentName_1/) { - return $self->parseArgumentNameKeyword(); - } - if ($next->type() == IdentifierToken) { - return $self->getToken()->value(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseEllipsis -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "...") { - $self->assertTokenValue($self->getToken(), "...", __LINE__); - return 1; - } - return 0; -} - -sub parseExceptionMember -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "const") { - return $self->parseConst($extendedAttributeList); - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextExceptionField_1/) { - return $self->parseExceptionField($extendedAttributeList); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseExceptionField -{ - my $self = shift; - my $extendedAttributeList = shift; - - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken || $next->value() =~ /$nextExceptionField_1/) { - my $newDataNode = domAttribute->new(); - $newDataNode->type("readonly attribute"); - $newDataNode->signature(domSignature->new()); - $newDataNode->signature->type($self->parseType()); - my $token = $self->getToken(); - $self->assertTokenType($token, IdentifierToken); - $newDataNode->signature->name($token->value()); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - $newDataNode->signature->extendedAttributes($extendedAttributeList); - return $newDataNode; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseExtendedAttributeListAllowEmpty -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "[") { - return $self->parseExtendedAttributeList(); - } - return {}; -} - -sub copyExtendedAttributes -{ - my $extendedAttributeList = shift; - my $attr = shift; - - for my $key (keys %{$attr}) { - if ($key eq "Constructor") { - push(@{$extendedAttributeList->{"Constructors"}}, $attr->{$key}); - } elsif ($key eq "Constructors") { - my @constructors = @{$attr->{$key}}; - foreach my $constructor (@constructors) { - push(@{$extendedAttributeList->{"Constructors"}}, $constructor); - } - } else { - $extendedAttributeList->{$key} = $attr->{$key}; - } - } -} - -sub parseExtendedAttributeList -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "[") { - $self->assertTokenValue($self->getToken(), "[", __LINE__); - my $extendedAttributeList = {}; - my $attr = $self->parseExtendedAttribute(); - copyExtendedAttributes($extendedAttributeList, $attr); - $attr = $self->parseExtendedAttributes(); - copyExtendedAttributes($extendedAttributeList, $attr); - $self->assertTokenValue($self->getToken(), "]", __LINE__); - return $extendedAttributeList; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseExtendedAttributes -{ - my $self = shift; - my $extendedAttributeList = {}; - - while (1) { - my $next = $self->nextToken(); - if ($next->value() eq ",") { - $self->assertTokenValue($self->getToken(), ",", __LINE__); - my $attr = $self->parseExtendedAttribute2(); - copyExtendedAttributes($extendedAttributeList, $attr); - } else { - last; - } - } - return $extendedAttributeList; -} - -sub parseExtendedAttribute -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken || $next->value() eq "::") { - my $scopedName = $self->parseScopedName(); - return $self->parseExtendedAttributeRest($scopedName); - } - # backward compatibility. Spec doesn' allow "[]". But WebKit requires. - if ($next->value() eq ']') { - return {}; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseExtendedAttribute2 -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken || $next->value() eq "::") { - my $scopedName = $self->parseScopedName(); - return $self->parseExtendedAttributeRest($scopedName); - } - return {}; -} - -sub parseExtendedAttributeRest -{ - my $self = shift; - my $name = shift; - my $attrs = {}; - - my $next = $self->nextToken(); - if ($next->value() eq "(") { - $self->assertTokenValue($self->getToken(), "(", __LINE__); - $attrs->{$name} = $self->parseArgumentList(); - $self->assertTokenValue($self->getToken(), ")", __LINE__); - return $attrs; - } - if ($next->value() eq "=") { - $self->assertTokenValue($self->getToken(), "=", __LINE__); - $attrs->{$name} = $self->parseExtendedAttributeRest2(); - return $attrs; - } - - if ($name eq "Constructor") { - $attrs->{$name} = []; - } else { - $attrs->{$name} = "VALUE_IS_MISSING"; - } - return $attrs; -} - -sub parseExtendedAttributeRest2 -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken || $next->value() eq "::") { - my $scopedName = $self->parseScopedName(); - return $self->parseExtendedAttributeRest3($scopedName); - } - if ($next->type() == IntegerToken) { - my $token = $self->getToken(); - return $token->value(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseExtendedAttributeRest3 -{ - my $self = shift; - my $name = shift; - - my $next = $self->nextToken(); - if ($next->value() eq "&") { - $self->assertTokenValue($self->getToken(), "&", __LINE__); - my $rightValue = $self->parseScopedName(); - return $name . "&" . $rightValue; - } - if ($next->value() eq "|") { - $self->assertTokenValue($self->getToken(), "|", __LINE__); - my $rightValue = $self->parseScopedName(); - return $name . "|" . $rightValue; - } - if ($next->value() eq "(") { - my $attr = {}; - $self->assertTokenValue($self->getToken(), "(", __LINE__); - $attr->{$name} = $self->parseArgumentList(); - $self->assertTokenValue($self->getToken(), ")", __LINE__); - return $attr; - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextExtendedAttributeRest3_1/) { - my @names = (); - push(@names, $name); - push(@names, @{$self->parseScopedNameListNoComma()}); - return join(' ', @names); - } - $self->assertUnexpectedToken($next->value()); -} - -sub parseScopedNameListNoComma -{ - my $self = shift; - my @names = (); - - while (1) { - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken || $next->value() eq "::") { - push(@names, $self->parseScopedName()); - } else { - last; - } - } - return \@names; -} - -sub parseArgumentNameKeyword -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "attribute") { - return $self->getToken()->value(); - } - if ($next->value() eq "callback") { - return $self->getToken()->value(); - } - if ($next->value() eq "const") { - return $self->getToken()->value(); - } - if ($next->value() eq "creator") { - return $self->getToken()->value(); - } - if ($next->value() eq "deleter") { - return $self->getToken()->value(); - } - if ($next->value() eq "dictionary") { - return $self->getToken()->value(); - } - if ($next->value() eq "enum") { - return $self->getToken()->value(); - } - if ($next->value() eq "exception") { - return $self->getToken()->value(); - } - if ($next->value() eq "getter") { - return $self->getToken()->value(); - } - if ($next->value() eq "implements") { - return $self->getToken()->value(); - } - if ($next->value() eq "inherit") { - return $self->getToken()->value(); - } - if ($next->value() eq "interface") { - return $self->getToken()->value(); - } - if ($next->value() eq "legacycaller") { - return $self->getToken()->value(); - } - if ($next->value() eq "partial") { - return $self->getToken()->value(); - } - if ($next->value() eq "serializer") { - return $self->getToken()->value(); - } - if ($next->value() eq "setter") { - return $self->getToken()->value(); - } - if ($next->value() eq "static") { - return $self->getToken()->value(); - } - if ($next->value() eq "stringifier") { - return $self->getToken()->value(); - } - if ($next->value() eq "typedef") { - return $self->getToken()->value(); - } - if ($next->value() eq "unrestricted") { - return $self->getToken()->value(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseType -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "(") { - $self->parseUnionType(); - $self->parseTypeSuffix(); - return; - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextType_1/) { - return $self->parseSingleType(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseSingleType -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "any") { - $self->assertTokenValue($self->getToken(), "any", __LINE__); - return "any" . $self->parseTypeSuffixStartingWithArray(); - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextSingleType_1/) { - return $self->parseNonAnyType(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseUnionType -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "(") { - $self->assertTokenValue($self->getToken(), "(", __LINE__); - $self->parseUnionMemberType(); - $self->assertTokenValue($self->getToken(), "or", __LINE__); - $self->parseUnionMemberType(); - $self->parseUnionMemberTypes(); - $self->assertTokenValue($self->getToken(), ")", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseUnionMemberType -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "(") { - $self->parseUnionType(); - $self->parseTypeSuffix(); - return; - } - if ($next->value() eq "any") { - $self->assertTokenValue($self->getToken(), "any", __LINE__); - $self->assertTokenValue($self->getToken(), "[", __LINE__); - $self->assertTokenValue($self->getToken(), "]", __LINE__); - $self->parseTypeSuffix(); - return; - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextSingleType_1/) { - $self->parseNonAnyType(); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseUnionMemberTypes -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "or") { - $self->assertTokenValue($self->getToken(), "or", __LINE__); - $self->parseUnionMemberType(); - $self->parseUnionMemberTypes(); - } -} - -sub parseNonAnyType -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() =~ /$nextNonAnyType_1/) { - return $self->parsePrimitiveType() . $self->parseTypeSuffix(); - } - if ($next->value() eq "ByteString") { - $self->assertTokenValue($self->getToken(), "ByteString", __LINE__); - return "ByteString" . $self->parseTypeSuffix(); - } - if ($next->value() eq "DOMString") { - $self->assertTokenValue($self->getToken(), "DOMString", __LINE__); - return "DOMString" . $self->parseTypeSuffix(); - } - if ($next->value() eq "sequence") { - $self->assertTokenValue($self->getToken(), "sequence", __LINE__); - $self->assertTokenValue($self->getToken(), "<", __LINE__); - my $type = $self->parseType(); - $self->assertTokenValue($self->getToken(), ">", __LINE__); - return "sequence<" . $type . ">" . $self->parseNull(); - } - if ($next->value() eq "object") { - $self->assertTokenValue($self->getToken(), "object", __LINE__); - return "object" . $self->parseTypeSuffix(); - } - if ($next->value() eq "Date") { - $self->assertTokenValue($self->getToken(), "Date", __LINE__); - return "Date" . $self->parseTypeSuffix(); - } - if ($next->type() == IdentifierToken || $next->value() eq "::") { - my $name = $self->parseScopedName(); - return $name . $self->parseTypeSuffix(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseConstType -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() =~ /$nextNonAnyType_1/) { - return $self->parsePrimitiveType() . $self->parseNull(); - } - if ($next->type() == IdentifierToken) { - my $token = $self->getToken(); - return $token->value() . $self->parseNull(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parsePrimitiveType -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() =~ /$nextPrimitiveType_1/) { - return $self->parseUnsignedIntegerType(); - } - if ($next->value() =~ /$nextPrimitiveType_2/) { - return $self->parseUnrestrictedFloatType(); - } - if ($next->value() eq "boolean") { - $self->assertTokenValue($self->getToken(), "boolean", __LINE__); - return "boolean"; - } - if ($next->value() eq "byte") { - $self->assertTokenValue($self->getToken(), "byte", __LINE__); - return "byte"; - } - if ($next->value() eq "octet") { - $self->assertTokenValue($self->getToken(), "octet", __LINE__); - return "octet"; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseUnrestrictedFloatType -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "unrestricted") { - $self->assertTokenValue($self->getToken(), "unrestricted", __LINE__); - return "unrestricted" . $self->parseFloatType(); - } - if ($next->value() =~ /$nextUnrestrictedFloatType_1/) { - return $self->parseFloatType(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseFloatType -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "float") { - $self->assertTokenValue($self->getToken(), "float", __LINE__); - return "float"; - } - if ($next->value() eq "double") { - $self->assertTokenValue($self->getToken(), "double", __LINE__); - return "double"; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseUnsignedIntegerType -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "unsigned") { - $self->assertTokenValue($self->getToken(), "unsigned", __LINE__); - return "unsigned " . $self->parseIntegerType(); - } - if ($next->value() =~ /$nextUnsignedIntegerType_1/) { - return $self->parseIntegerType(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseIntegerType -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "short") { - $self->assertTokenValue($self->getToken(), "short", __LINE__); - return "short"; - } - if ($next->value() eq "int") { - $self->assertTokenValue($self->getToken(), "int", __LINE__); - return "int"; - } - if ($next->value() eq "long") { - $self->assertTokenValue($self->getToken(), "long", __LINE__); - if ($self->parseOptionalLong()) { - return "long long"; - } - return "long"; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseOptionalLong -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "long") { - $self->assertTokenValue($self->getToken(), "long", __LINE__); - return 1; - } - return 0; -} - -sub parseTypeSuffix -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "[") { - $self->assertTokenValue($self->getToken(), "[", __LINE__); - $self->assertTokenValue($self->getToken(), "]", __LINE__); - return "[]" . $self->parseTypeSuffix(); - } - if ($next->value() eq "?") { - $self->assertTokenValue($self->getToken(), "?", __LINE__); - return "?" . $self->parseTypeSuffixStartingWithArray(); - } - return ""; -} - -sub parseTypeSuffixStartingWithArray -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "[") { - $self->assertTokenValue($self->getToken(), "[", __LINE__); - $self->assertTokenValue($self->getToken(), "]", __LINE__); - return "[]" . $self->parseTypeSuffix(); - } - return ""; -} - -sub parseNull -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "?") { - $self->assertTokenValue($self->getToken(), "?", __LINE__); - return "?"; - } - return ""; -} - -sub parseReturnType -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "void") { - $self->assertTokenValue($self->getToken(), "void", __LINE__); - return "void"; - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextExceptionField_1/) { - return $self->parseType(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseGet -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "inherits") { - my $attr = {}; - $self->parseInheritsGetter(); - $attr->{"inherits"} = 1; - $attr->{"getraises"} = []; - $attr->{"setraises"} = $self->parseSetRaises(); - return $attr; - } - if ($next->value() =~ /$nextGet_1/) { - return $self->parseSetGetRaises(); - } -} - -sub parseInheritsGetter -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "inherits") { - $self->assertTokenValue($self->getToken(), "inherits", __LINE__); - $self->assertTokenValue($self->getToken(), "getter", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseSetGetRaises -{ - my $self = shift; - my $attr = {}; - $attr->{"inherits"} = 0; - - my $next = $self->nextToken(); - if ($next->value() eq "setter") { - $attr->{"setraises"} = $self->parseSetRaises(); - $attr->{"getraises"} = $self->parseGetRaises2(); - return $attr; - } - if ($next->value() eq "getter") { - $attr->{"setraises"} = []; - $attr->{"getraises"} = $self->parseGetRaises(); - return $attr; - } - if ($next->value() =~ /$nextSetGetRaises2_1/) { - return $self->parseSetGetRaises2(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseGetRaises -{ - my $self = shift; - my $next = $self->nextToken(); - - if ($next->value() eq "getter") { - $self->assertTokenValue($self->getToken(), "getter", __LINE__); - $self->assertTokenValue($self->getToken(), "raises", __LINE__); - return $self->parseExceptionList(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseGetRaises2 -{ - my $self = shift; - my $next = $self->nextToken(); - - if ($next->value() eq ",") { - $self->assertTokenValue($self->getToken(), ",", __LINE__); - $self->assertTokenValue($self->getToken(), "getter", __LINE__); - $self->assertTokenValue($self->getToken(), "raises", __LINE__); - return $self->parseExceptionList(); - } - return []; -} - -sub parseSetRaises -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "setter") { - $self->assertTokenValue($self->getToken(), "setter", __LINE__); - $self->assertTokenValue($self->getToken(), "raises", __LINE__); - return $self->parseExceptionList(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseSetGetRaises2 -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() =~ /$nextSetGetRaises2_1/) { - my $attr = {}; - $attr->{"inherits"} = 0; - $attr->{"getraises"} = $self->parseGetRaises3(); - $attr->{"setraises"} = $self->parseSetRaises3(); - return $attr; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseGetRaises3 -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "getraises") { - $self->assertTokenValue($self->getToken(), "getraises", __LINE__); - return $self->parseExceptionList(); - } - return []; -} - -sub parseSetRaises3 -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "setraises") { - $self->assertTokenValue($self->getToken(), "setraises", __LINE__); - return $self->parseExceptionList(); - } - return []; -} - -sub parseExceptionList -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "(") { - my @exceptions = (); - $self->assertTokenValue($self->getToken(), "(", __LINE__); - push(@exceptions, @{$self->parseScopedNameList()}); - $self->assertTokenValue($self->getToken(), ")", __LINE__); - return \@exceptions; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseRaises -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "raises") { - $self->assertTokenValue($self->getToken(), "raises", __LINE__); - return $self->parseExceptionList(); - } - return []; -} - -sub parseDefinitionOld -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() =~ /$nextDefinition_1/) { - return $self->parseCallbackOrInterfaceOld(); - } - if ($next->value() eq "partial") { - return $self->parsePartial({}); - } - if ($next->value() eq "dictionary") { - return $self->parseDictionaryOld(); - } - if ($next->value() eq "exception") { - return $self->parseExceptionOld(); - } - if ($next->value() eq "enum") { - return $self->parseEnumOld(); - } - if ($next->value() eq "typedef") { - return $self->parseTypedef({}); - } - if ($next->type() == IdentifierToken || $next->value() eq "::") { - return $self->parseImplementsStatement({}); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseCallbackOrInterfaceOld -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "callback") { - $self->assertTokenValue($self->getToken(), "callback", __LINE__); - return $self->parseCallbackRestOrInterface({}); - } - if ($next->value() eq "interface") { - return $self->parseInterfaceOld(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseInterfaceOld -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "interface") { - my $interface = domInterface->new(); - $self->assertTokenValue($self->getToken(), "interface", __LINE__); - my $extendedAttributeList = $self->parseExtendedAttributeListAllowEmpty(); - my $token = $self->getToken(); - $self->assertTokenType($token, IdentifierToken); - $interface->name($token->value()); - $interface->isException(0); - push(@{$interface->parents}, @{$self->parseInheritance()}); - $self->assertTokenValue($self->getToken(), "{", __LINE__); - my $interfaceMembers = $self->parseInterfaceMembers(); - $self->assertTokenValue($self->getToken(), "}", __LINE__); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - applyMemberList($interface, $interfaceMembers); - applyExtendedAttributeList($interface, $extendedAttributeList); - return $interface; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseInterfaceMemberOld -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "const") { - return $self->parseConst({}); - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextInterfaceMemberOld_1/) { - return $self->parseAttributeOrOperationOrIteratorOld(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseDictionaryOld -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "dictionary") { - $self->assertTokenValue($self->getToken(), "dictionary", __LINE__); - $self->parseExtendedAttributeListAllowEmpty(); - $self->assertTokenType($self->getToken(), IdentifierToken); - $self->parseInheritance(); - $self->assertTokenValue($self->getToken(), "{", __LINE__); - $self->parseDictionaryMembers(); - $self->assertTokenValue($self->getToken(), "}", __LINE__); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseDictionaryMemberOld -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken || $next->value() =~ /$nextExceptionField_1/) { - $self->parseType(); - $self->parseExtendedAttributeListAllowEmpty(); - $self->assertTokenType($self->getToken(), IdentifierToken); - $self->parseDefault(); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseExceptionOld -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "exception") { - my $interface = domInterface->new(); - $self->assertTokenValue($self->getToken(), "exception", __LINE__); - my $extendedAttributeList = $self->parseExtendedAttributeListAllowEmpty(); - my $token = $self->getToken(); - $self->assertTokenType($token, IdentifierToken); - $interface->name($token->value()); - $interface->isException(1); - push(@{$interface->parents}, @{$self->parseInheritance()}); - $self->assertTokenValue($self->getToken(), "{", __LINE__); - my $exceptionMembers = $self->parseInterfaceMembers(); - #$self->parseExceptionMembers(); - $self->assertTokenValue($self->getToken(), "}", __LINE__); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - applyMemberList($interface, $exceptionMembers); - applyExtendedAttributeList($interface, $extendedAttributeList); - return $interface; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseEnumOld -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "enum") { - $self->assertTokenValue($self->getToken(), "enum", __LINE__); - $self->parseExtendedAttributeListAllowEmpty(); - $self->assertTokenType($self->getToken(), IdentifierToken); - $self->assertTokenValue($self->getToken(), "{", __LINE__); - $self->parseEnumValueList(); - $self->assertTokenValue($self->getToken(), "}", __LINE__); - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseAttributeOrOperationOrIteratorOld -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "serializer") { - return $self->parseSerializer({}); - } - if ($next->value() =~ /$nextAttributeOrOperationOrIterator_1/) { - my $qualifier = $self->parseQualifier(); - my $interface = $self->parseAttributeOrOperationRestOld(); - if (defined ($interface) && $qualifier eq "static") { - $interface->isStatic(1); - } - return $interface; - } - if ($next->value() =~ /$nextAttributeOld_1/) { - return $self->parseAttributeOld(); - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextAttributeOrOperationOrIterator_2/) { - return $self->parseOperationOrIterator({}); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseAttributeOrOperationRestOld -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() =~ /$nextAttributeRest_1/) { - return $self->parseAttributeRestOld(); - } - if ($next->value() eq ";") { - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return; - } - if ($next->type() == IdentifierToken || $next->value() =~ /$nextAttributeOrOperationRest_1/) { - my $returnType = $self->parseReturnType(); - my $interface = $self->parseOperationRest({}); - if (defined ($interface)) { - $interface->signature->type($returnType); - } - return $interface; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseAttributeOld -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() =~ /$nextAttributeOld_1/) { - $self->parseInherit(); - return $self->parseAttributeRestOld(); - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseAttributeRestOld -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() =~ /$nextAttributeRest_1/) { - my $newDataNode = domAttribute->new(); - if ($self->parseReadOnly()) { - $newDataNode->type("readonly attribute"); - } else { - $newDataNode->type("attribute"); - } - $self->assertTokenValue($self->getToken(), "attribute", __LINE__); - my $extendedAttributeList = $self->parseExtendedAttributeListAllowEmpty(); - $newDataNode->signature(domSignature->new()); - $newDataNode->signature->type($self->parseType()); - $newDataNode->signature->extendedAttributes($extendedAttributeList); - my $token = $self->getToken(); - $self->assertTokenType($token, IdentifierToken); - $newDataNode->signature->name($token->value()); - my $getRef = $self->parseGet(); - if (defined $getRef) { - push(@{$newDataNode->getterExceptions}, @{$getRef->{"getraises"}}); - push(@{$newDataNode->setterExceptions}, @{$getRef->{"setraises"}}); - } - $self->assertTokenValue($self->getToken(), ";", __LINE__); - return $newDataNode; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseIn -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "in") { - $self->assertTokenValue($self->getToken(), "in", __LINE__); - return "in"; - } - return ""; -} - -sub parseOptionalSemicolon -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq ";") { - $self->assertTokenValue($self->getToken(), ";", __LINE__); - } -} - -sub parseScopedName -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "::") { - return $self->parseAbsoluteScopedName(); - } - if ($next->type() == IdentifierToken) { - return $self->parseRelativeScopedName(); - } - $self->assertUnexpectedToken($next->value()); -} - -sub parseAbsoluteScopedName -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->value() eq "::") { - $self->assertTokenValue($self->getToken(), "::"); - my $token = $self->getToken(); - $self->assertTokenType($token, IdentifierToken); - return "::" . $token->value() . $self->parseScopedNameParts(); - } - $self->assertUnexpectedToken($next->value()); -} - -sub parseRelativeScopedName -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken) { - my $token = $self->getToken(); - return $token->value() . $self->parseScopedNameParts(); - } - $self->assertUnexpectedToken($next->value()); -} - -sub parseScopedNameParts -{ - my $self = shift; - my @names = (); - - while (1) { - my $next = $self->nextToken(); - if ($next->value() eq "::") { - $self->assertTokenValue($self->getToken(), "::"); - push(@names, "::"); - my $token = $self->getToken(); - $self->assertTokenType($token, IdentifierToken); - push(@names, $token->value()); - } else { - last; - } - } - return join("", @names); -} - -sub parseScopedNameList -{ - my $self = shift; - my $next = $self->nextToken(); - if ($next->type() == IdentifierToken || $next->value() eq "::") { - my @names = (); - push(@names, $self->parseScopedName()); - push(@names, @{$self->parseScopedNames()}); - return \@names; - } - $self->assertUnexpectedToken($next->value(), __LINE__); -} - -sub parseScopedNames -{ - my $self = shift; - my @names = (); - - while (1) { - my $next = $self->nextToken(); - if ($next->value() eq ",") { - $self->assertTokenValue($self->getToken(), ","); - push(@names, $self->parseScopedName()); - } else { - last; - } - } - return \@names; -} - -sub applyMemberList -{ - my $interface = shift; - my $members = shift; - - for my $item (@{$members}) { - if (ref($item) eq "domAttribute") { - push(@{$interface->attributes}, $item); - next; - } - if (ref($item) eq "domConstant") { - push(@{$interface->constants}, $item); - next; - } - if (ref($item) eq "domFunction") { - push(@{$interface->functions}, $item); - next; - } - } -} - -sub applyExtendedAttributeList -{ - my $interface = shift; - my $extendedAttributeList = shift; - - if (defined $extendedAttributeList->{"Constructors"}) { - my @constructorParams = @{$extendedAttributeList->{"Constructors"}}; - my $index = (@constructorParams == 1) ? 0 : 1; - foreach my $param (@constructorParams) { - my $constructor = domFunction->new(); - $constructor->signature(domSignature->new()); - $constructor->signature->name("Constructor"); - $constructor->signature->extendedAttributes($extendedAttributeList); - $constructor->parameters($param); - $constructor->{overloadedIndex} = $index++; - push(@{$interface->constructors}, $constructor); - } - # delete $extendedAttributeList->{"Constructors"}; - # $extendedAttributeList->{"Constructor"} = "VALUE_IS_MISSING"; - } elsif (defined $extendedAttributeList->{"NamedConstructor"}) { - my $newDataNode = domFunction->new(); - $newDataNode->signature(domSignature->new()); - $newDataNode->signature->name("NamedConstructor"); - $newDataNode->signature->extendedAttributes($extendedAttributeList); - my %attributes = %{$extendedAttributeList->{"NamedConstructor"}}; - my @attributeKeys = keys (%attributes); - my $constructorName = $attributeKeys[0]; - push(@{$newDataNode->parameters}, @{$attributes{$constructorName}}); - $extendedAttributeList->{"NamedConstructor"} = $constructorName; - push(@{$interface->constructors}, $newDataNode); - } - $interface->extendedAttributes($extendedAttributeList); -} - -1; - diff --git a/contrib/dom/scripts/InFilesCompiler.pm b/contrib/dom/scripts/InFilesCompiler.pm deleted file mode 100644 index 3dcd772..0000000 --- a/contrib/dom/scripts/InFilesCompiler.pm +++ /dev/null @@ -1,296 +0,0 @@ -#!/usr/bin/perl -w - -# Copyright (C) 2011 Adam Barth -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY GOOGLE, INC. ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -use strict; - -use Config; -use Getopt::Long; -use File::Path; -use File::Spec; -use IO::File; -use InFilesParser; - -require Config; - -package InFilesCompiler; - -my $inputFile = ""; -my $outputDir = "."; -my $defaultItemFactory; - -my %parsedItems; -my %parsedParameters; - -sub itemHandler($$$) -{ - my ($itemName, $property, $value) = @_; - - $parsedItems{$itemName} = { &$defaultItemFactory($itemName) } if !defined($parsedItems{$itemName}); - - return unless $property; - - die "Unknown property $property for $itemName\n" if !defined($parsedItems{$itemName}{$property}); - $parsedItems{$itemName}{$property} = $value; -} - -sub parameterHandler($$) -{ - my ($parameter, $value) = @_; - - die "Unknown parameter $parameter\n" if !defined($parsedParameters{$parameter}); - $parsedParameters{$parameter} = $value; -} - -sub new() -{ - my $object = shift; - my $reference = { }; - - my $defaultParametersRef = shift; - %parsedParameters = %{ $defaultParametersRef }; - $defaultItemFactory = shift; - - %parsedItems = (); - - bless($reference, $object); - return $reference; -} - -sub initializeFromCommandLine() -{ - ::GetOptions( - 'input=s' => \$inputFile, - 'outputDir=s' => \$outputDir, - ); - - die "You must specify --input " unless length($inputFile); - - ::mkpath($outputDir); - - # FIXME: Should we provide outputDir via an accessor? - return $outputDir; -} - -sub compile() -{ - my $object = shift; - my $generateCode = shift; - - my $file = new IO::File; - open($file, $inputFile) or die "Failed to open file: $!"; - - my $InParser = InFilesParser->new(); - $InParser->parse($file, \¶meterHandler, \&itemHandler); - - close($file); - die "Failed to read from file: $inputFile" if (keys %parsedItems == 0); - - &$generateCode(\%parsedParameters, \%parsedItems); -} - -sub license() -{ - return "/* - * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT. - * - * Copyright (C) 2011 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GOOGLE, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -"; -} - -sub interfaceForItem($) -{ - my $object = shift; - my $itemName = shift; - - my $interfaceName = $parsedItems{$itemName}{"interfaceName"}; - $interfaceName = $itemName unless $interfaceName; - - return $interfaceName; -} - -sub toMacroStyle($$) -{ - my $object = shift; - my $camelCase = shift; - - return "EVENT" if $camelCase eq "Event"; - return "EVENT_TARGET" if $camelCase eq "EventTarget"; - return "EXCEPTION" if $camelCase eq "Exception"; - - die "Ok, you got me. This script is really just a giant hack. (\$camelCase=${camelCase})"; -} - -sub preferredConditional() -{ - my $object = shift; - my $conditional = shift; - - my @conditionals = split('\\|', $conditional); - return $conditionals[0]; -} - -sub conditionalStringFromAttributeValue() -{ - my $object = shift; - my $conditional = shift; - - return "ENABLE(" . join(') || ENABLE(', split('\\|', $conditional)) . ")"; -} - -sub generateInterfacesHeader() -{ - my $object = shift; - - my $F; - my $namespace = $parsedParameters{"namespace"}; - my $outputFile = "$outputDir/${namespace}Interfaces.h"; - - open F, ">$outputFile" or die "Failed to open file: $!"; - - print F license(); - - print F "#ifndef ${namespace}Interfaces_h\n"; - print F "#define ${namespace}Interfaces_h\n"; - print F "\n"; - - my %unconditionalInterfaces = (); - my %interfacesByConditional = (); - - for my $itemName (sort keys %parsedItems) { - my $conditional = $parsedItems{$itemName}{"conditional"}; - my $interfaceName = $object->interfaceForItem($itemName); - - if ($conditional) { - if (!defined($interfacesByConditional{$conditional})) { - $interfacesByConditional{$conditional} = (); - } - $interfacesByConditional{$conditional}{$interfaceName} = 1; - } else { - $unconditionalInterfaces{$interfaceName} = 1 - } - } - - my $macroStyledNamespace = $object->toMacroStyle($namespace); - - for my $conditional (sort keys %interfacesByConditional) { - my $preferredConditional = $object->preferredConditional($conditional); - print F "#if " . $object->conditionalStringFromAttributeValue($conditional) . "\n"; - print F "#define DOM_${macroStyledNamespace}_INTERFACES_FOR_EACH_$preferredConditional(macro) \\\n"; - - for my $interface (sort keys %{ $interfacesByConditional{$conditional} }) { - next if defined($unconditionalInterfaces{$interface}); - print F " macro($interface) \\\n"; - } - - print F "// End of DOM_${macroStyledNamespace}_INTERFACES_FOR_EACH_$preferredConditional\n"; - print F "#else\n"; - print F "#define DOM_${macroStyledNamespace}_INTERFACES_FOR_EACH_$preferredConditional(macro)\n"; - print F "#endif\n"; - print F "\n"; - } - - print F "#define DOM_${macroStyledNamespace}_INTERFACES_FOR_EACH(macro) \\\n"; - print F " \\\n"; - for my $interface (sort keys %unconditionalInterfaces) { - print F " macro($interface) \\\n"; - } - print F " \\\n"; - for my $conditional (sort keys %interfacesByConditional) { - my $preferredConditional = $object->preferredConditional($conditional); - print F " DOM_${macroStyledNamespace}_INTERFACES_FOR_EACH_$preferredConditional(macro) \\\n"; - } - - print F "\n"; - print F "#endif // ${namespace}Interfaces_h\n"; - - close F; -} - -sub generateHeadersHeader() -{ - my $object = shift; - - my $F; - my $namespace = $parsedParameters{"namespace"}; - my $outputFile = "$outputDir/${namespace}Headers.h"; - - open F, ">$outputFile" or die "Failed to open file: $!"; - - print F license(); - - print F "#ifndef ${namespace}Headers_h\n"; - print F "#define ${namespace}Headers_h\n"; - print F "\n"; - - my %includedInterfaces = (); - - for my $itemName (sort keys %parsedItems) { - my $conditional = $parsedItems{$itemName}{"conditional"}; - my $interfaceName = $object->interfaceForItem($itemName); - - next if defined($includedInterfaces{$interfaceName}); - $includedInterfaces{$interfaceName} = 1; - - print F "#if " . $object->conditionalStringFromAttributeValue($conditional) . "\n" if $conditional; - print F "#include \"$interfaceName.h\"\n"; - print F "#if USE(JSC)\n"; - print F "#include \"JS$interfaceName.h\"\n"; - print F "#elif USE(V8)\n"; - print F "#include \"V8$interfaceName.h\"\n"; - print F "#endif\n"; - print F "#endif\n" if $conditional; - } - - print F "\n"; - print F "#endif // ${namespace}Headers_h\n"; - - close F; -} - -1; diff --git a/contrib/dom/scripts/InFilesParser.pm b/contrib/dom/scripts/InFilesParser.pm deleted file mode 100644 index 6539380..0000000 --- a/contrib/dom/scripts/InFilesParser.pm +++ /dev/null @@ -1,154 +0,0 @@ -#!/usr/bin/perl -w - -# Copyright (C) 2008 Julien Chaffraix -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -use strict; - -package InFilesParser; - -my $isParsingCommonParameters; -my $hasStartedParsing; - -# Helper functions - -sub trimComment -{ - my $string = shift; - $string =~ s/#.+$//; - chomp($string); - return $string; -} - -sub trimWS -{ - my $string = shift; - $string =~ s/^\s+//; - $string =~ s/\s+$//; - chomp($string); - return $string; -} - -sub trimQuoteAndWS -{ - my $string = shift; - $string =~ s/\"([^\"]+)\"/$1/; - return trimWS($string); -} - -# Default constructor - -sub new -{ - my $object = shift; - my $reference = { }; - - # Initialize the parser. - $isParsingCommonParameters = 1; - $hasStartedParsing = 0; - - bless($reference, $object); - return $reference; -} - -# parse take 3 attributes: -# - the filestream to read from (the caller has to open / close it). -# - the commonParameterHandler called when parsing the first part of the file with the parameter and the value. -# - the perTagHandler called for each optional parameter with the element name, the parameter and its value. -# If no parameter were provided, it is called once with an empty parameter and value. -sub parse($) -{ - my $object = shift; - my $fileStream = shift; # IO::File only - my $commonParameterHandler = shift; - my $perTagHandler = shift; - - foreach (<$fileStream>) { - # Ignore whitespace, in case the .in files have the wrong EOL - # markers and those are getting treated as whitespace. - $_ = trimWS($_); - - # Empty line, change from common parameter part - # to per tag part if we have started parsing. - if (/^$/) { - if ($hasStartedParsing) { - $isParsingCommonParameters = 0; - } - next; - } - - # There may be a few empty lines at the beginning of the file - # so detect the first non empty line which starts the common - # parameters part. - $hasStartedParsing = 1; - - if (/^#/) { - next; - } - - $_ = trimComment($_); - - if ($isParsingCommonParameters) { - my ($name, $value) = split '=', $_; - - $name = trimWS($name); - if (defined($value)) { - $value = trimQuoteAndWS($value); - } else { - # We default to 1 as it eases the syntax. - $value = "1"; - } - - &$commonParameterHandler($name, $value); - } else { - # Parsing per-tag parameters. - - # Split the tag name ($1) from the optionnal parameter(s) ($2) - /^(\S+)\s*(.*)$/; - my $elementName = $1; - - if ($2) { - my @options = split "," , $2; - my ($option, $value); - for (my $i = 0; $i < @options; ++$i) { - ($option, $value) = split "=", $options[$i]; - $option = trimWS($option); - if (defined($value)) { - $value = trimQuoteAndWS($value); - } else { - # We default to 1 as it eases the syntax. - $value = "1"; - } - - &$perTagHandler($elementName, $option, $value); - } - } else { - # No parameter was given so call it with empty strings. - &$perTagHandler($elementName, "", ""); - } - } - } -} - -1; diff --git a/contrib/dom/scripts/generate-bindings.pl b/contrib/dom/scripts/generate-bindings.pl deleted file mode 100755 index ecf0218..0000000 --- a/contrib/dom/scripts/generate-bindings.pl +++ /dev/null @@ -1,217 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2005 Apple Computer, Inc. -# Copyright (C) 2006 Anders Carlsson -# -# This file is part of WebKit -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -# This script is a temporary hack. -# Files are generated in the source directory, when they really should go -# to the DerivedSources directory. -# This should also eventually be a build rule driven off of .idl files -# however a build rule only solution is blocked by several radars: -# - -use strict; - -use File::Path; -use File::Basename; -use Getopt::Long; -use Text::ParseWords; -use Data::Dumper; -use Cwd; - -use IDLParser; -use CodeGenerator; - -my @idlDirectories; -my $outputDirectory; -my $outputHeadersDirectory; -my $generator; -my $defines; -my $filename; -my $prefix; -my $preprocessor; -my $writeDependencies; -my $verbose; -my $supplementalDependencyFile; -my $additionalIdlFiles; - -GetOptions('include=s@' => \@idlDirectories, - 'outputDir=s' => \$outputDirectory, - 'outputHeadersDir=s' => \$outputHeadersDirectory, - 'generator=s' => \$generator, - 'defines=s' => \$defines, - 'filename=s' => \$filename, - 'prefix=s' => \$prefix, - 'preprocessor=s' => \$preprocessor, - 'verbose' => \$verbose, - 'write-dependencies' => \$writeDependencies, - 'supplementalDependencyFile=s' => \$supplementalDependencyFile, - 'additionalIdlFiles=s' => \$additionalIdlFiles); - -my $targetIdlFile = $ARGV[0]; - -print "$targetIdlFile\n"; - -die('Must specify input file.') unless defined($targetIdlFile); -die('Must specify generator') unless defined($generator); -die('Must specify output directory.') unless defined($outputDirectory); - -if (!$outputHeadersDirectory) { - $outputHeadersDirectory = $outputDirectory; -} -$targetIdlFile = Cwd::realpath($targetIdlFile); -if ($verbose) { - print "$generator: $targetIdlFile\n"; -} -my $targetInterfaceName = fileparse(basename($targetIdlFile), ".idl"); - -my $idlFound = 0; -my @supplementedIdlFiles; -if ($supplementalDependencyFile) { - # The format of a supplemental dependency file: - # - # DOMWindow.idl P.idl Q.idl R.idl - # Document.idl S.idl - # Event.idl - # ... - # - # The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl, - # Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs. - # The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file. - open FH, "< $supplementalDependencyFile" or die "Cannot open $supplementalDependencyFile\n"; - while (my $line = ) { - my ($idlFile, @followingIdlFiles) = split(/\s+/, $line); - if ($idlFile and basename($idlFile) eq basename($targetIdlFile)) { - $idlFound = 1; - @supplementedIdlFiles = @followingIdlFiles; - } - } - close FH; - - # $additionalIdlFiles is list of IDL files which should not be included in - # DerivedSources*.cpp (i.e. they are not described in the supplemental - # dependency file) but should generate .h and .cpp files. - if (!$idlFound and $additionalIdlFiles) { - my @idlFiles = shellwords($additionalIdlFiles); - $idlFound = grep { $_ and basename($_) eq basename($targetIdlFile) } @idlFiles; - } - - if (!$idlFound) { - my $codeGen = CodeGenerator->new(\@idlDirectories, $generator, $outputDirectory, $outputHeadersDirectory, 0, $preprocessor, $writeDependencies, $verbose); - - # We generate empty .h and .cpp files just to tell build scripts that .h and .cpp files are created. - generateEmptyHeaderAndCpp($codeGen->FileNamePrefix(), $targetInterfaceName, $outputHeadersDirectory, $outputDirectory); - exit 0; - } -} - -# Parse the target IDL file. -my $targetParser = IDLParser->new(!$verbose); -my $targetDocument = $targetParser->Parse($targetIdlFile, $defines, $preprocessor); - -# print Dumper($targetDocument); -# exit; - -foreach my $idlFile (@supplementedIdlFiles) { - next if $idlFile eq $targetIdlFile; - - my $interfaceName = fileparse(basename($idlFile), ".idl"); - my $parser = IDLParser->new(!$verbose); - my $document = $parser->Parse($idlFile, $defines, $preprocessor); - - foreach my $interface (@{$document->interfaces}) { - if ($interface->extendedAttributes->{"Supplemental"} and $interface->extendedAttributes->{"Supplemental"} eq $targetInterfaceName) { - my $targetDataNode; - foreach my $interface (@{$targetDocument->interfaces}) { - if ($interface->name eq $targetInterfaceName) { - $targetDataNode = $interface; - last; - } - } - die "Not found an interface ${targetInterfaceName} in ${targetInterfaceName}.idl." unless defined $targetDataNode; - - # Support [Supplemental] for attributes. - foreach my $attribute (@{$interface->attributes}) { - # Record that this attribute is implemented by $interfaceName. - $attribute->signature->extendedAttributes->{"ImplementedBy"} = $interfaceName; - - # Add interface-wide extended attributes to each attribute. - foreach my $extendedAttributeName (keys %{$interface->extendedAttributes}) { - next if ($extendedAttributeName eq "Supplemental"); - $attribute->signature->extendedAttributes->{$extendedAttributeName} = $interface->extendedAttributes->{$extendedAttributeName}; - } - push(@{$targetDataNode->attributes}, $attribute); - } - - # Support [Supplemental] for methods. - foreach my $function (@{$interface->functions}) { - # Record that this method is implemented by $interfaceName. - $function->signature->extendedAttributes->{"ImplementedBy"} = $interfaceName; - - # Add interface-wide extended attributes to each method. - foreach my $extendedAttributeName (keys %{$interface->extendedAttributes}) { - next if ($extendedAttributeName eq "Supplemental"); - $function->signature->extendedAttributes->{$extendedAttributeName} = $interface->extendedAttributes->{$extendedAttributeName}; - } - push(@{$targetDataNode->functions}, $function); - } - - # Support [Supplemental] for constants. - foreach my $constant (@{$interface->constants}) { - # Record that this constant is implemented by $interfaceName. - $constant->extendedAttributes->{"ImplementedBy"} = $interfaceName; - - # Add interface-wide extended attributes to each constant. - foreach my $extendedAttributeName (keys %{$interface->extendedAttributes}) { - next if ($extendedAttributeName eq "Supplemental"); - $constant->extendedAttributes->{$extendedAttributeName} = $interface->extendedAttributes->{$extendedAttributeName}; - } - push(@{$targetDataNode->constants}, $constant); - } - } - } -} - -# Generate desired output for the target IDL file. -my $codeGen = CodeGenerator->new(\@idlDirectories, $generator, $outputDirectory, $outputHeadersDirectory, 0, $preprocessor, $writeDependencies, $verbose, $targetIdlFile); -$codeGen->ProcessDocument($targetDocument, $defines); - -sub generateEmptyHeaderAndCpp -{ - my ($prefix, $targetInterfaceName, $outputHeadersDirectory, $outputDirectory) = @_; - - my $headerName = "${prefix}${targetInterfaceName}.h"; - my $cppName = "${prefix}${targetInterfaceName}.cpp"; - my $contents = "/* - This file is generated just to tell build scripts that $headerName and - $cppName are created for ${targetInterfaceName}.idl, and thus - prevent the build scripts from trying to generate $headerName and - $cppName at every build. This file must not be tried to compile. -*/ -"; - open FH, "> ${outputHeadersDirectory}/${headerName}" or die "Cannot open $headerName\n"; - print FH $contents; - close FH; - - open FH, "> ${outputDirectory}/${cppName}" or die "Cannot open $cppName\n"; - print FH $contents; - close FH; -} diff --git a/contrib/dom/scripts/make_jsc.sh b/contrib/dom/scripts/make_jsc.sh deleted file mode 100755 index 465e382..0000000 --- a/contrib/dom/scripts/make_jsc.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -find ../idl/ -name *.idl -exec ./generate-bindings.pl --outputDir=/Users/sradomski/Documents/TK/Code/uscxml/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom --include=../idl/ --generator=ArabicaJSC {} \; diff --git a/contrib/dom/scripts/make_v8.sh b/contrib/dom/scripts/make_v8.sh deleted file mode 100755 index 0d17f88..0000000 --- a/contrib/dom/scripts/make_v8.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -find ../idl/ -name *.idl -exec ./generate-bindings.pl --outputDir=/Users/sradomski/Documents/TK/Code/uscxml/src/uscxml/plugins/datamodel/ecmascript/v8/dom --include=../idl/ --generator=ArabicaV8 {} \; diff --git a/contrib/dom/scripts/preprocessor.pm b/contrib/dom/scripts/preprocessor.pm deleted file mode 100644 index 5f67539..0000000 --- a/contrib/dom/scripts/preprocessor.pm +++ /dev/null @@ -1,89 +0,0 @@ -# -# Copyright (C) 2005 Nikolas Zimmermann -# Copyright (C) 2011 Google Inc. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -use strict; -use warnings; - -use Config; -use IPC::Open2; -use IPC::Open3; - -BEGIN { - use Exporter (); - our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); - $VERSION = 1.00; - @ISA = qw(Exporter); - @EXPORT = qw(&applyPreprocessor); - %EXPORT_TAGS = ( ); - @EXPORT_OK = (); -} - -# Returns an array of lines. -sub applyPreprocessor -{ - my $fileName = shift; - my $defines = shift || ""; - my $preprocessor = shift; - - my @args = (); - if (!$preprocessor) { - require Config; - if ($ENV{CC}) { - $preprocessor = $ENV{CC}; - } elsif (($Config::Config{'osname'}) =~ /solaris/i) { - $preprocessor = "/usr/sfw/bin/gcc"; - } else { - $preprocessor = "/usr/bin/gcc"; - } - push(@args, qw(-E -P -x c++)); - } - - # Remove double quotations from $defines and extract macros. - # For example, if $defines is ' "A=1" "B=1" C=1 "" D ', - # then it is converted into four macros -DA=1, -DB=1, -DC=1 and -DD. - $defines =~ s/\"//g; - my @macros = grep { $_ } split(/\s+/, $defines); # grep skips empty macros. - @macros = map { "-D$_" } @macros; - - my $pid = 0; - if ($Config{osname} eq "cygwin" || $Config{osname} eq 'MSWin32') { - # This call can fail if Windows rebases cygwin, so retry a few times until it succeeds. - for (my $tries = 0; !$pid && ($tries < 20); $tries++) { - eval { - # Suppress STDERR so that if we're using cl.exe, the output - # name isn't needlessly echoed. - use Symbol 'gensym'; my $err = gensym; - $pid = open3(\*PP_IN, \*PP_OUT, $err, split(' ', $preprocessor), @args, @macros, $fileName); - 1; - } or do { - sleep 1; - } - }; - } else { - $pid = open2(\*PP_OUT, \*PP_IN, split(' ', $preprocessor), @args, @macros, $fileName); - } - close PP_IN; - my @documentContent = ; - close PP_OUT; - waitpid($pid, 0); - return @documentContent; -} - -1; diff --git a/contrib/iwyu-g++ b/contrib/iwyu-g++ deleted file mode 100755 index 27b98be..0000000 --- a/contrib/iwyu-g++ +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# call as cmake CC=[..]/iwyu-gcc CXX=[..]/iwyu-g++ - -IWYU_COMMAND=/usr/bin/iwyu -COMPILER_COMMAND=/usr/bin/g++ -$IWYU_COMMAND $@ -$COMPILER_COMMAND $@ diff --git a/contrib/iwyu-gcc b/contrib/iwyu-gcc deleted file mode 100755 index 5145bc0..0000000 --- a/contrib/iwyu-gcc +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -IWYU_COMMAND=/usr/bin/iwyu -COMPILER_COMMAND=/usr/bin/gcc -$IWYU_COMMAND $@ -$COMPILER_COMMAND $@ diff --git a/contrib/java/build-java.xml b/contrib/java/build-java.xml deleted file mode 100644 index ca5cc88..0000000 --- a/contrib/java/build-java.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${echo.all.jni} - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/contrib/local/annotate-xml-lineno.pl b/contrib/local/annotate-xml-lineno.pl deleted file mode 100755 index f7e1a79..0000000 --- a/contrib/local/annotate-xml-lineno.pl +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use File::Spec; -use File::Basename; -use XML::LibXML; -use Data::Dumper; - -my $xmlIn = shift or die("Expected *.xml file as input"); - -# absolutize and split into components -$xmlIn = File::Spec->rel2abs($xmlIn) or die($!); -my($filename, $dirs, $suffix) = fileparse($xmlIn) or die($!); - -my $parser = XML::LibXML->new({'line_numbers' => 1 }); -# my $xml = $parser->parse_file($xmlIn); -my $doc = $parser->load_xml('location' => $xmlIn, 'line_numbers' => 1) ; - -my $lineOffset = 0; - -sub lineNoNodes { - my $node = shift; - - if ($node->nodeType == XML_ELEMENT_NODE) { - $node->setAttribute("line_start", $node->line_number() + $lineOffset); - } - - my $prevElem; - for my $child ($node->childNodes()) { - lineNoNodes($child); - if ($prevElem) { - $prevElem->setAttribute("line_end", $child->line_number() - 1 + $lineOffset); - undef($prevElem); - } - if ($child->nodeType == XML_ELEMENT_NODE) { - $prevElem = $child; - } - } -} - -&lineNoNodes($doc->getDocumentElement()); - -print $doc->toString(); \ No newline at end of file diff --git a/contrib/local/bcp-boost.sh b/contrib/local/bcp-boost.sh index bdeea97..0371214 100755 --- a/contrib/local/bcp-boost.sh +++ b/contrib/local/bcp-boost.sh @@ -5,14 +5,13 @@ DIR="$( cd "$( dirname "$0" )" && pwd )" CWD=`pwd` SOURCE_FILES=`find ${DIR}/../../src/ -name \*.h -print -o -name \*.cpp -print` -ARABICA_FILES=`find ${DIR}/../../contrib/prebuilt/darwin-i386/clang/include/arabica -name \*.hpp -print -o -name \*.cpp -print` # echo ${ARABICA_FILES} # exit -/Users/sradomski/Documents/TK/Code/boost_1_54_0/dist/bin/bcp \ ---boost=/Users/sradomski/Documents/TK/Code/boost_1_54_0 \ ---scan ${SOURCE_FILES} ${ARABICA_FILES} \ -${DIR}/../prebuilt/include +/Users/sradomski/Documents/TK/Code/boost_1_60_0/dist/bin/bcp \ +--boost=/Users/sradomski/Documents/TK/Code/boost_1_60_0 \ +--scan ${SOURCE_FILES} \ +${DIR}/../src -rm -rf ${DIR}/../prebuilt/include/libs +# rm -rf ${DIR}/../prebuilt/include/libs diff --git a/contrib/local/beautifyCode.sh b/contrib/local/beautifyCode.sh index 487fa40..8e36b8d 100755 --- a/contrib/local/beautifyCode.sh +++ b/contrib/local/beautifyCode.sh @@ -22,10 +22,3 @@ astyle \ --indent=tab \ --recursive "${DIR}/../../test/*.cpp" find ${DIR}/../../test/ -iname '*.orig' -exec rm {} \; - -astyle \ - --style=java \ - --indent=tab \ - --recursive "${DIR}/../../apps/*.cpp" -find ${DIR}/../../apps/ -iname '*.orig' -exec rm {} \; - diff --git a/contrib/local/build-linux.expect b/contrib/local/build-linux.expect deleted file mode 100755 index 793d3d6..0000000 --- a/contrib/local/build-linux.expect +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/expect - -set timeout 300 -set USCXML_BUILD_HOST $::env(USCXML_BUILD_HOST) - -set prompt "sradomski@" -append prompt ${USCXML_BUILD_HOST} -append prompt {:[a-zA-Z~\/\-]+\$ } - -eval spawn ping -c1 ${USCXML_BUILD_HOST}.local. -expect "cannot resolve" { puts "Host ${USCXML_BUILD_HOST}.local. not found"; exit } \ - -re $prompt { } - -eval spawn ssh ${USCXML_BUILD_HOST}.local. - -############################## -# uscxml in debug configuration -expect -re $prompt { send "rm -rf /tmp/build-uscxml && mkdir /tmp/build-uscxml && cd /tmp/build-uscxml\n" } -expect -re $prompt { send "cmake -DCMAKE_BUILD_TYPE=Debug -DDIST_PREPARE=ON /media/psf/Home/Documents/TK/Code/uscxml\n" } - -expect "download" { exp_continue } \ - -re $prompt { send "make -j2\n" } - -expect "Building CXX" { exp_continue } \ - "Linking CXX" { exp_continue } \ - -re $prompt { send "\n" } - -############################## -# uscxml in release configuration -expect -re $prompt { send "rm -rf /tmp/build-uscxml && mkdir /tmp/build-uscxml && cd /tmp/build-uscxml\n" } -expect -re $prompt { send "cmake -DCMAKE_BUILD_TYPE=Release -DDIST_PREPARE=ON /media/psf/Home/Documents/TK/Code/uscxml\n" } -expect -re $prompt { send "make\n" } - -expect "Building CXX" { exp_continue } \ - "Linking CXX" { exp_continue } \ - -re $prompt { exit } diff --git a/contrib/local/build-windows.expect b/contrib/local/build-windows.expect deleted file mode 100755 index 27ab7c0..0000000 --- a/contrib/local/build-windows.expect +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/expect - -set timeout 600 -set USCXML_BUILD_HOST $::env(USCXML_BUILD_HOST) -set USCXML_BUILD_ARCH $::env(USCXML_BUILD_ARCH) - - -set local_prompt {sradomski$ } -set initial_remote_prompt "C*>" -# the default windows prompt is hard to recognize -set remote_prompt "easy_to_recognize" - -eval spawn ping -c1 ${USCXML_BUILD_HOST}.local. -expect "cannot resolve" { puts "Host ${USCXML_BUILD_HOST}.local. not found"; exit } \ - -re $local_prompt { } - -eval cd ~/Documents/TK/Code/ - -############################## -# prepare and deploy archive - -# check age of archive against modification date -eval spawn find ./uscxml -newer uscxml-win.tar -set redeploy 0; -expect { - "find:*No such file" { set redeploy 1; } - -re ".cpp\r\n" { set redeploy 1; } - -re "package\r\n" { set redeploy 1; } - -re ".h\r\n" { set redeploy 1; } - -re "CMakeLists.txt\r\n" { set redeploy 1; } - -re $local_prompt { } -} -#set redeploy 0; - -if {$redeploy} { -# eval spawn rm uscxml-win.tar -# eval spawn tar --exclude='__*' --exclude=uscxml/contrib/prebuilt/darwin --exclude=uscxml/docs/html --exclude=uscxml/examples/ios --exclude=uscxml/contrib/archives --exclude=uscxml/.git --exclude=uscxml/build* --exclude=uscxml/lib/ios-5.0 --exclude=uscxml/lib/linux* --exclude=uscxml/lib/darwin* --exclude=uscxml/installer/uMundo* --exclude=uscxml/contrib/prebuilt/linux* --exclude=uscxml/contrib/prebuilt/ios -cf uscxml-win.tar uscxml/ -eval spawn rm uscxml-win.zip -eval spawn zip -r uscxml-win.zip uscxml/ --exclude __\* uscxml/contrib/prebuilt/darwin\* uscxml/contrib/prebuilt/ios\* uscxml/contrib/prebuilt/linux\* uscxml/docs/html\* uscxml/examples/ios uscxml/contrib/archives\* uscxml/.git/\* uscxml/build\* uscxml/installer/uMundo* uscxml/contrib/prebuilt/linux* - expect { - "a uscxml/" { exp_continue } - timeout { puts "Timeout when packaging source code"; exit; } - -re $local_prompt { } - } - -# eval spawn scp -4 uscxml-win.tar sradomski@${USCXML_BUILD_HOST}.local:\\uscxml-win.tar - eval spawn scp -4 uscxml-win.zip sradomski@${USCXML_BUILD_HOST}.local:\\uscxml-win.zip - expect { - "ETA" { exp_continue } - "The authenticity" { send "yes\n"; exp_continue; } - timeout { puts "Timeout when uploading source code"; exit; } - -re $local_prompt { } - } -} - -############################## -# ssh into remote host - -eval spawn ssh -4 sradomski@${USCXML_BUILD_HOST}.local. -expect { - timeout { puts "Timeout when connecting to windows"; exit; } - "The authenticity" { send "yes\n"; } - -re $local_prompt { puts "Could not connect to remote host"; exit; } - -re $initial_remote_prompt { } -} - -send "set prompt=easy_to_recognize \r" -expect -re $remote_prompt - -# unpack archive if required -if {$redeploy} { - send "rmdir \/S \/Q uscxml\r" - expect -re $remote_prompt - -# send "tar xf uscxml-win.tar\r" - send "unzip uscxml-win.zip\r" - expect "uscxml/" { exp_continue } \ - -re $remote_prompt { } - -} - -# setup directories -send "rmdir \/S \/Q build-uscxml\r" -expect -re $remote_prompt -send "mkdir build-uscxml\r" -expect -re $remote_prompt -send "cd build-uscxml\r" -expect -re $remote_prompt - -############################## -# start cmd.exe and prepare for compiling -# send "cmd\n" -# expect -re $cmd_prompt - -# "c:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat" -# send "\"c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\vcvarsall.bat x86_amd64\"\n" -if { [string compare $USCXML_BUILD_ARCH 32] == 0 } { - send "\"c:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\bin\\vcvars32.bat\"\r" - expect -re $remote_prompt -} else { - send "\"c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\vcvarsall.bat\" x86_amd64\r" - expect -re $remote_prompt -} -############################## -# compile in debug configuration - -send "\"cmake.exe\" -G \"NMake Makefiles\" -DCMAKE_BUILD_TYPE=Debug -DDIST_PREPARE=ON ..\\uscxml\r" - -expect "download" { exp_continue } \ - -re $remote_prompt { } - -send "nmake\r" -expect { - "Building" { exp_continue; } - "Linking" { exp_continue; } - "fatal error" { exit } - -re $remote_prompt { } -} - -# send "nmake java\r" -# expect { -# "Building" { exp_continue; } -# "Linking" { exp_continue; } -# "fatal error" { exit } -# -re $remote_prompt { } -# } -# -# send "nmake csharp\r" -# expect { -# "Building" { exp_continue; } -# "Linking" { exp_continue; } -# "fatal error" { exit } -# -re $remote_prompt { } -# } - -############################## -# compile in release configuration - -send "\"cmake\" -G \"NMake Makefiles\" -DCMAKE_BUILD_TYPE=Release -DDIST_PREPARE=ON ..\\uscxml\r" -expect -re $remote_prompt - -send "nmake\n\r" -expect { - timeout { puts "Timeout when building"; exit; } - "Building" { puts "Building"; exp_continue; } - "Scanning" { puts "Scanning"; exp_continue; } - "Linking" { puts "Linking"; exp_continue; } - "fatal error" { puts "Dying"; exit; } - -re $remote_prompt { puts "Continuing"; } -} - -# send "nmake java\n\r" -# expect { -# timeout { puts "Timeout when building"; exit; } -# "Building" { puts "Building"; exp_continue; } -# "Scanning" { puts "Scanning"; exp_continue; } -# "Linking" { puts "Linking"; exp_continue; } -# "fatal error" { puts "Dying"; exit; } -# -re $remote_prompt { puts "Continuing"; } -# } -# -# send "nmake csharp\n\r" -# expect { -# timeout { puts "Timeout when building"; exit; } -# "Building" { puts "Building"; exp_continue; } -# "Scanning" { puts "Scanning"; exp_continue; } -# "Linking" { puts "Linking"; exp_continue; } -# "fatal error" { puts "Dying"; exit; } -# -re $remote_prompt { puts "Continuing"; } -# } - -send "cd ..\r" -expect -re $remote_prompt - -if { [string compare $USCXML_BUILD_ARCH 32] == 0 } { - send "zip -r win-package-x86.zip uscxml\\package\\windows-x86\r" -} else { - send "zip -r win-package-x86_64.zip uscxml\\package\\windows-x86_64\r" -} - -send "exit\r" -expect -re $local_prompt -eval cd ~/Documents/TK/Code/ - -if { [string compare $USCXML_BUILD_ARCH 32] == 0 } { - eval spawn "scp epikur-win7.local:win-package-x86.zip ." - expect -re $local_prompt - eval spawn "unzip -o win-package-x86.zip" - expect -re $local_prompt - eval spawn "rm win-package-x86.zip" - expect -re $local_prompt - -} else { - eval spawn "scp epikur-win7-64.local:win-package-x86_64.zip ." - expect -re $local_prompt - eval spawn "unzip -o win-package-x86_64.zip" - expect -re $local_prompt - eval spawn "rm win-package-x86_64.zip" - expect -re $local_prompt -} - -exit diff --git a/contrib/local/compress_and_upload_deps.sh b/contrib/local/compress_and_upload_deps.sh deleted file mode 100755 index 19350ba..0000000 --- a/contrib/local/compress_and_upload_deps.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/bash - -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -CWD=`pwd` - -cd $DIR - -if [ "$USCXML_PREBUILT_HOST" == "" ]; then - USCXML_PREBUILT_HOST="admin@uscxml.tk.informatik.tu-darmstadt.de" -fi - -USCXML_PREBUILT_PATH="/var/www/html/uscxml/prebuilt" - -if [ "$1" == "" ] || [ "$2" == "" ]; then - echo "$ME " - exit -fi - -if [ ! -d $1 ]; then - echo "$1: no such directory" - exit -fi - -VERSION=$2 - -cd ../prebuilt - -ssh ${USCXML_PREBUILT_HOST} mkdir -p ${USCXML_PREBUILT_PATH}/${VERSION} - -PLATFORMS=`find . -maxdepth 1 -type d -regex ./[^\.].*` -#PLATFORMS="linux-x86_64" -#PLATFORMS="linux-armv6l" -#PLATFORMS="darwin-i386" -#PLATFORMS="windows-x86" - -for FILE in ${PLATFORMS}; do - PLATFORM=`basename $FILE` - echo $FILE - case "$PLATFORM" in - *linux-*-clang* | *darwin-*-gnu* ) - # do nothing - we will symlink - ;; - "include") - tar cvzf include.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' ${FILE} - scp include.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION} - rm include.tgz - ;; - *darwin*) - cd $FILE - # do not upload v8 for mac and strip first dir - tar cvzf ../uscxml-prebuilt-${PLATFORM}.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' --exclude='lib/libv8*' --exclude='lib/*_d.a' * - cd .. - scp uscxml-prebuilt-${PLATFORM}.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION} - rm uscxml-prebuilt-${PLATFORM}.tgz - ;; - *linux*) - cd $FILE - # no debug libs with linux and strip first dir - tar cvzf ../uscxml-prebuilt-${PLATFORM}.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' --exclude='lib/*_d.a' * - cd .. - scp uscxml-prebuilt-${PLATFORM}.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION} - rm uscxml-prebuilt-${PLATFORM}.tgz - ;; - *) - cd $FILE - # and strip first dir - tar cvzf ../uscxml-prebuilt-${PLATFORM}.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' * - cd .. - scp uscxml-prebuilt-${PLATFORM}.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION} - rm uscxml-prebuilt-${PLATFORM}.tgz - ;; - esac -done - -# link ABI compatibles - -for FILE in ${PLATFORMS}; do - PLATFORM=`basename $FILE` - - case "$PLATFORM" in - *linux-*-gnu* ) - # gcc is ABI compatible to clang - NEW_PLATFORM="${PLATFORM//gnu/clang}" - ssh ${USCXML_PREBUILT_HOST} \ - ln -s ${USCXML_PREBUILT_PATH}/${VERSION}/uscxml-prebuilt-${PLATFORM}.tgz \ - ${USCXML_PREBUILT_PATH}/${VERSION}/uscxml-prebuilt-${NEW_PLATFORM}.tgz - ;; - *darwin-*-clang* ) - # gcc is ABI compatible to clang - NEW_PLATFORM="${PLATFORM//clang/gnu}" - ssh ${USCXML_PREBUILT_HOST} \ - ln -s ${USCXML_PREBUILT_PATH}/${VERSION}/uscxml-prebuilt-${PLATFORM}.tgz \ - ${USCXML_PREBUILT_PATH}/${VERSION}/uscxml-prebuilt-${NEW_PLATFORM}.tgz - ;; - esac -done \ No newline at end of file diff --git a/contrib/local/create-random-scxml.pl b/contrib/local/create-random-scxml.pl deleted file mode 100755 index 5674852..0000000 --- a/contrib/local/create-random-scxml.pl +++ /dev/null @@ -1,217 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use List::Util qw[min max sum]; - -use Getopt::Long qw(GetOptions); -use Data::Dumper; - -my %options = (); - -GetOptions( - \%options, - "depth-max=i", - "child-max=i", - "events-max=i", - "states-max=i", - "trans-max=i", - "random-seed=i" -); - -my $seed = $options{'random-seed'} || int(rand(2**31)); -my $maxDepth = $options{'depth-max'} || 6; -my $maxChilds = $options{'child-max'} || 6; -my $maxStates = $options{'states-max'} || 60; -my $maxTrans = $options{'trans-max'} || 6; -my $maxEvents = $options{'trans-max'} || int($maxStates / 3) + 1; - -# $maxStates = 8; -# $maxTrans = 8 - -srand($seed); - -my $machine; -my $stateId = 0; - -my $probs = { - 'state' => { - 'type' => { - 'history' => 2, - 'parallel' => 2, - 'state' => 5, - 'final' => 1 - } - }, - 'transition' => { - 'target' => 0.8, - 'event' => 0.7, - 'cond' => 0.9, - 'execContent' => 0.7, - }, - 'history' => { - 'deep' => 0.4 - } -}; - -my $sumChildProbs = sum( values(%{$probs->{'state'}->{'type'}})); - -sub putMachine { - my $where = shift; - - $$where->{'name'} = 'test'; - $$where->{'type'} = 'scxml'; - $$where->{'datamodel'} = 'ecmascript'; - - putState(\$$where->{'children'}, 0); - putTransition(\$$where); -} - -sub putTransition { - my $where = shift; - - return if $$where->{'type'} eq 'final'; - - my $nrTrans = int(rand($maxTrans + 1)); - $nrTrans = min($nrTrans, 1) if $$where->{'type'} eq 'history'; - - for (my $i = 0; $i < $nrTrans; $i++) { - - my $trans; - if (rand(1) < $probs->{'transition'}->{'target'}) { - # has a target - pick one at random - $trans->{'target'} = 'id' . int(rand($stateId)); - } - - if (rand(1) < $probs->{'transition'}->{'event'}) { - # has an event - $trans->{'event'} = 'e' . int(rand($maxEvents + 1)); - } - - if (rand(1) < $probs->{'transition'}->{'cond'}) { - # has a condition - if (int(rand(2)) > 0) { - $trans->{'cond'} = 'true'; - } else { - $trans->{'cond'} = 'false'; - } - } - - if (rand(1) < $probs->{'transition'}->{'execContent'}) { - # has a executable content - push @{$trans->{'execContent'}}, ''; - } - - push @{$$where->{'transitions'}}, $trans; - } - - # continue with childs - foreach (@{$$where->{'children'}}) { - putTransition(\$_); - } -} - -sub putState { - my $where = shift; - my $depth = shift; - my $minStates = shift || 0; - my $r; - - return if ($stateId > $maxStates); - return if ($depth > $maxDepth); - my $nrChilds = int(rand($maxChilds + 1)); - $nrChilds = max($minStates, $nrChilds); - - for (my $i = 0; $i < $nrChilds; $i++) { - my $r = rand($sumChildProbs); - - my $state; - foreach my $type (keys %{$probs->{'state'}->{'type'}}) { - my $prob = $probs->{'state'}->{'type'}->{$type}; - if ($r < $prob) { - $state->{'type'} = $type; - last; - } - $r -= $prob; - } - - $state->{'id'} = "id".$stateId++; - - if ($state->{'type'} eq 'parallel') { - putState(\$state->{'children'}, $depth + 1, 2); - } elsif ($state->{'type'} eq 'state') { - putState(\$state->{'children'}, $depth + 1); - } elsif ($state->{'type'} eq 'history') { - if (rand(1) < $probs->{'history'}->{'deep'}) { - $state->{'deep'} = 1; - } - } - - push @{$$where}, $state; - } -}; - -sub writeState { - my $state = shift; - - print STDOUT '<'.$state->{'type'}; - print STDOUT ' id="'.$state->{'id'} . '"'; - print STDOUT ' type="deep"' if exists $state->{'deep'}; - print STDOUT '>'; - - foreach (@{$state->{'children'}}) { - writeState($_); - } - - # foreach (@{$state->{'transitions'}}) { - # writeTransition($_); - # } - - print STDOUT '{'type'} . '>'; - -}; - -sub writeTransition { - my $trans = shift; - - print STDOUT '{'target'}; - print STDOUT ' event="' . $trans->{'event'} . '"' if $trans->{'event'}; - print STDOUT ' cond="' . $trans->{'cond'} . '"' if $trans->{'cond'}; - - if ($trans->{'execContent'}) { - print STDOUT '>'; - foreach (@{$trans->{'execContent'}}) { - print STDOUT $_; - } - print STDOUT ''; - } else { - print STDOUT '/>'; - } - -}; - -sub writeMachine { - my $machine = shift; - print STDOUT '{'datamodel'}; - print STDOUT ' seed="' . $seed . '"'; - print STDOUT ' name="' . $machine->{'name'} . '"' if $machine->{'name'}; - print STDOUT '>'; - - foreach (@{$machine->{'children'}}) { - writeState($_); - } - - print STDOUT ''; -} - -putMachine(\$machine); -# print Dumper($machine); - -writeMachine($machine); - - -#print Dumper($machine); - - -# writeState($machine); diff --git a/contrib/local/make-dist.sh b/contrib/local/make-dist.sh deleted file mode 100755 index 9337eb0..0000000 --- a/contrib/local/make-dist.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/bash - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" - -# do not tar ._ files -export COPY_EXTENDED_ATTRIBUTES_DISABLE=1 -export COPYFILE_DISABLE=1 - -############################ -# Compile libraries -############################ - -cd ${DIR} - -./remove-dsstore-files.sh - -echo -n "Build uscxml for Linux 32Bit? [y/N]: "; read BUILD_LINUX32 -if [ "$BUILD_LINUX32" == "y" ] || [ "$BUILD_LINUX32" == "Y" ]; then - echo "Start the Linux 32Bit system named 'debian' and press return" && read - echo == BUILDING USCXML FOR Linux 32Bit ========================================================= - export USCXML_BUILD_HOST=debian - expect build-linux.expect -fi - -echo -n "Build uscxml for Linux 64Bit? [y/N]: "; read BUILD_LINUX64 -if [ "$BUILD_LINUX64" == "y" ] || [ "$BUILD_LINUX64" == "Y" ]; then - echo "Start the Linux 64Bit system named 'debian64' and press return" && read - echo == BUILDING USCXML FOR Linux 64Bit ========================================================= - export USCXML_BUILD_HOST=debian64 - expect build-linux.expect -fi - -# make sure to cross-compile before windows as we will copy all the files into the windows VM -# echo -n "Build uscxml for iOS? [y/N]: "; read BUILD_IOS -# if [ "$BUILD_IOS" == "y" ] || [ "$BUILD_IOS" == "Y" ]; then -# echo == BUILDING USCXML FOR IOS ========================================================= -# ${DIR}/../build-uscxml-ios.sh -# fi -# -# echo -n "Build uscxml for Android? [y/N]: "; read BUILD_ANDROID -# if [ "$BUILD_ANDROID" == "y" ] || [ "$BUILD_ANDROID" == "Y" ]; then -# echo == BUILDING USCXML FOR Android ========================================================= -# export ANDROID_NDK=~/Developer/SDKs/android-ndk-r8 -# ${DIR}/../build-uscxml-android.sh -# fi - -echo -n "Build uscxml for Windows 32Bit? [y/N]: "; read BUILD_WIN32 -if [ "$BUILD_WIN32" == "y" ] || [ "$BUILD_WIN32" == "Y" ]; then - echo "Start the Windows 32Bit system named 'epikur-win7' and press return" && read - echo == BUILDING USCXML FOR Windows 32Bit ========================================================= - export USCXML_BUILD_HOST=epikur-win7 - export USCXML_BUILD_ARCH=32 - # winsshd needs an xterm .. - TERM=xterm expect build-windows.expect -fi - -echo -n "Build uscxml for Windows 64Bit? [y/N]: "; read BUILD_WIN64 -if [ "$BUILD_WIN64" == "y" ] || [ "$BUILD_WIN64" == "Y" ]; then - echo "Start the Windows 64Bit system named 'epikur-win7-64' and press return" && read - echo == BUILDING USCXML FOR Windows 64Bit ========================================================= - export USCXML_BUILD_HOST=epikur-win7-64 - export USCXML_BUILD_ARCH=64 - # winsshd needs an xterm .. - TERM=xterm expect build-windows.expect -fi - -echo -n "Build uscxml for Mac OSX? [y/N]: "; read BUILD_MAC -if [ "$BUILD_MAC" == "y" ] || [ "$BUILD_MAC" == "Y" ]; then - echo == BUILDING USCXML FOR Mac OSX ========================================================= - rm -rf /tmp/build-uscxml - mkdir -p /tmp/build-uscxml - cd /tmp/build-uscxml - cmake -DDIST_PREPARE=ON -DCMAKE_BUILD_TYPE=Debug ${DIR}/../.. - make -j2 - make -j2 java - cmake -DDIST_PREPARE=ON -DCMAKE_BUILD_TYPE=Release ${DIR}/../.. - make -j2 - make -j2 java -fi - -############################ -# Create installers -############################ - -echo -n "Build packages for those platforms? [a/y/N]: "; read BUILD_PACKAGES -if [ "$BUILD_PACKAGES" == "y" ] || [ "$BUILD_PACKAGES" == "a" ]; then - - cd ${DIR} - - if [ "$BUILD_LINUX32" == "y" ] || [ "$BUILD_LINUX32" == "Y" ] || [ "$BUILD_PACKAGES" == "a" ]; then - echo Start the Linux 32Bit system named 'debian' again && read - echo == PACKAGING USCXML FOR Linux 32Bit ========================================================= - export USCXML_BUILD_HOST=debian - expect package-linux.expect - fi - - if [ "$BUILD_LINUX64" == "y" ] || [ "$BUILD_LINUX64" == "Y" ] || [ "$BUILD_PACKAGES" == "a" ]; then - echo Start the Linux 64Bit system named 'debian64' again && read - echo == PACKAGING USCXML FOR Linux 64Bit ========================================================= - export USCXML_BUILD_HOST=debian64 - expect package-linux.expect - fi - - if [ "$BUILD_WIN32" == "y" ] || [ "$BUILD_WIN32" == "Y" ] || [ "$BUILD_PACKAGES" == "a" ]; then - echo Start the Windows 32Bit system named 'epikur-win7' again && read - echo == PACKAGING USCXML FOR Windows 32Bit ========================================================= - export USCXML_BUILD_HOST=epikur-win7 - export USCXML_BUILD_ARCH=32 - TERM=xterm expect package-windows.expect - fi - - if [ "$BUILD_WIN64" == "y" ] || [ "$BUILD_WIN64" == "Y" ] || [ "$BUILD_PACKAGES" == "a" ]; then - echo Start the Windows 64Bit system named 'epikur-win7-64' again && read - echo == PACKAGING USCXML FOR Windows 64Bit ========================================================= - export USCXML_BUILD_HOST=epikur-win7-64 - export USCXML_BUILD_ARCH=64 - TERM=xterm expect package-windows.expect - fi - - if [ "$BUILD_MAC" == "y" ] || [ "$BUILD_MAC" == "Y" ] || [ "$BUILD_PACKAGES" == "a" ]; then - echo == PACKAGING USCXML FOR MacOSX ========================================================= - cd /tmp/build-uscxml - # rerun cmake for new cpack files - cmake -DDIST_PREPARE=ON -DCMAKE_BUILD_TYPE=Release ${DIR}/../.. - make package - cp uscxml*darwin* ${DIR}/../../installer - cd ${DIR} - fi -fi - -############################ -# Validate installers -############################ - -expect validate-installers.expect - -############################ -# Create ReadMe.html -############################ - -echo -n "Create ReadMe.html? [y/N]: "; read CREATE_README -if [ "$CREATE_README" == "y" ]; then - ./make-installer-html-table.pl ${DIR}/../../installer > ${DIR}/../../installer/ReadMe.html -fi \ No newline at end of file diff --git a/contrib/local/make-installer-html-table.pl b/contrib/local/make-installer-html-table.pl deleted file mode 100755 index 6315404..0000000 --- a/contrib/local/make-installer-html-table.pl +++ /dev/null @@ -1,245 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use Cwd 'abs_path'; # abs_path -use Cwd; # getcwd -use File::Spec; # abs2rel -use Data::Dumper; # recursively dump data structures via Dumper($foo) -use File::Path; # make_path -use File::Path qw(make_path); -use File::Temp qw/ tempfile tempdir /; -use File::Basename; - -my $script_dir = dirname(abs_path($0)); -my $orig_cwd = getcwd; - -# get last version where we bumped the version string (ignoring pre, rc, beta ..) -my $cmake_edits = `git log --follow -p $script_dir/../../CMakeLists.txt`; -my $commit_hash; -foreach my $line (split("\n", $cmake_edits)) { - if ($line =~ /^commit ([\dabcdef]+)/) { - $commit_hash = $1; - } - last if ($commit_hash and $line =~ /\+SET\(UMUNDO_VERSION_PATCH \"\d+\"\)/); -} -my $change_log = `git log --pretty=format:"%H %h @@@ %ai: %s ### %b" $commit_hash..`; -# remove empty bodies -#$change_log =~ s/\n\n/\n/g; -# link to commit on github -$change_log =~ s/([\dabcdef]+) ([\dabcdef]+) @@@/$2<\/a>/g; -# put body below commit message -$change_log =~ s/###\s\n/\n/g; -$change_log =~ s/###\s/\n\n /g; -$change_log =~ s/\n([^<])/\n $1/g; - - -my $installer_dir = shift or die("Expected directory as first argument\n"); -if (!File::Spec->file_name_is_absolute($installer_dir)) { - $installer_dir = File::Spec->rel2abs($installer_dir, getcwd); -} - -my $descriptions = { - './bin/protoc-umundo-cpp-rpc.*' => 'ProtoBuf RPC plugin for C++', - './bin/protoc-umundo-java-rpc.*' => 'ProtoBuf RPC plugin for Java', - './bin/umundo-monitor.*' => 'Diagnosis tool (somewhat unmaintained)', - './bin/umundo-pingpong.*' => 'Test deployments (i=incoming, o=outgoing)', - './include/umundo/core.h' => 'C++ headers for core layer', - './include/umundo/rpc.h' => 'C++ headers for remote procedure calls', - './include/umundo/s11n.h' => 'C++ headers for object serialization', - './include/umundo/util.h' => 'C++ headers for utilities', - './lib' => 'Pure C++ libraries', - './lib/libumundoNativeJava[\.6].*' => 'SWIG generated JNI wrapper (included in JAR)', - './lib/libumundocore[\.6].*' => 'C++ library for core', - './lib/libumundorpc[\.6].*' => 'C++ library for remote procedure calls', - './lib/libumundoserial[\.6].*' => 'C++ library for serialization', - './lib/libumundoutil[\.6].*' => 'C++ library with utilities', - './lib/umundo-monitor.lib' => 'not sure', - './lib/umundo-pingpong.lib' => 'not sure', - './lib/umundoNativeCSharp[\.6].*' => 'SWIG generated C# backend for DLLInvoke', - './share/umundo/android-8' => 'Cross compiled binaries for Android', - './share/umundo/android-8/armv5te/libumundoNativeJava.so' => 'SWIG generated JNI wrapper', - './share/umundo/android-8/umundo.jar' => 'JAR for Android (without JNI inside)', - './share/umundo/lib/umundo.jar' => 'JAR for desktops (auto-loading JNI code inside)', - './share/umundo/lib/umundoCSharp.dll' => 'C# library with managed code', - './share/umundo/prebuilt' => 'Prebuilt libraries in case we forgot something', - './share/umundo/samples' => 'Sample programs and IDE templates', - './share/umundo/samples/android' => 'Sample programs for Android', - './share/umundo/samples/android/umundo-pingpong/libs' => 'These are just placehoders!', - './share/umundo/samples/android/umundo-pingpong/libs/armeabi/libumundoNativeJava.so' => 'Replace with real library from above!', - './share/umundo/samples/android/umundo-pingpong/libs/armeabi/libumundoNativeJava_d.so' => 'Replace with real library from above!', - './share/umundo/samples/android/umundo-pingpong/libs/umundo.jar' => 'Replace with real library from above!', - './share/umundo/samples/csharp' => 'Sample programs for C#', - './share/umundo/samples/csharp/umundo-pingpong' => 'The simplest umundo program in C#', - './share/umundo/samples/csharp/umundo-s11ndemo' => 'Serialization in C# (Dirk is working on it)', - './share/umundo/samples/csharp/umundo.s11n' => 'My initial attempts at serialization with C# (deprecated)', - './share/umundo/samples/ios' => 'Sample programs for iOS', - './share/umundo/samples/ios/umundo-pingpong' => 'The simplest umundo program for iOS', - './share/umundo/samples/java' => 'Sample programs for Java', - './share/umundo/samples/java/core/chat' => 'Chat using the core layer', - './share/umundo/samples/java/core/chat/build.properties' => 'Adapt these for your system', - './share/umundo/samples/java/rpc/chat' => 'Chat using the RPC layer', - './share/umundo/samples/java/rpc/chat/build.properties' => 'Adapt these for your system', - './share/umundo/samples/java/rpc/chat/proto/ChatS11N.proto' => 'ProtoBuf file for chat services', - './share/umundo/samples/java/s11n/chat' => 'Chat using the serialization layer', - './share/umundo/samples/java/s11n/chat/build.properties' => 'Adapt these for your system', - './share/umundo/samples/java/s11n/chat/proto/ChatS11N.proto' => 'ProtoBuf file for chat message objects', - './share/umundo/samples/cpp' => 'Sample programs for C++', - './share/umundo/samples/cpp/core/chat' => 'Chat using the core layer', - './share/umundo/samples/cpp/rpc/chat' => 'Chat using the RPC layer', - './share/umundo/samples/cpp/s11n/chat' => 'Chat using the serialization layer', - './share/umundo/samples/cpp/s11n/chat/proto/ChatS11N.proto' => 'ProtoBuf file for chat message objects', - './share/umundo/samples/cpp/rpc/chat/proto/ChatS11N.proto' => 'ProtoBuf file for chat services', - './share/umundo/cmake/FindUMundo.cmake' => 'CMake module to find umundo once it is installed', - './share/umundo/cmake/UseUMundo.cmake' => 'CMake macros for protobuf', -}; - -my ($mac_archive, $linux32_archive, $linux64_archive, $win32_archive, $win64_archive); -my ($mac_files, $linux32_files, $linux64_files, $win32_files, $win64_files); - -chdir $installer_dir; -foreach (sort <*>) { - next if m/^\./; - $mac_archive = File::Spec->rel2abs($_, getcwd) if (m/.*darwin.*\.tar\.gz/i); - $linux32_archive = File::Spec->rel2abs($_, getcwd) if (m/.*linux-i686.*\.tar\.gz/i); - $linux64_archive = File::Spec->rel2abs($_, getcwd) if (m/.*linux-x86_64.*\.tar\.gz/i); - $win32_archive = File::Spec->rel2abs($_, getcwd) if (m/.*windows-x86-.*\.zip/i); - $win64_archive = File::Spec->rel2abs($_, getcwd) if (m/.*windows-x86_64.*\.zip/i); -} - -print STDERR "No archive for MacOSX found!\n" if (!$mac_archive); -print STDERR "No archive for Linux 32Bit found!\n" if (!$linux32_archive); -print STDERR "No archive for Linux 64Bit found!\n" if (!$linux64_archive); -print STDERR "No archive for Windows 32Bit found!\n" if (!$win32_archive); -print STDERR "No archive for Windows 64Bit found!\n" if (!$win64_archive); - -$mac_archive =~ m/.*darwin-i386-(.*)\.tar\.gz/; -my $version = $1; - -# make a hash remove first element split into array at newline -%{$mac_files} = map { $_ => 1 } map { s/^[^\/]*\///; $_ } split("\n", `tar tzf $mac_archive`) if $mac_archive; -%{$linux32_files} = map { $_ => 1 } map { s/^[^\/]*\///; $_ } split("\n", `tar tzf $linux32_archive`) if $linux32_archive; -%{$linux64_files} = map { $_ => 1 } map { s/^[^\/]*\///; $_ } split("\n", `tar tzf $linux64_archive`) if $linux64_archive; -%{$win32_files} = map { $_ => 1 } map { s/^[^\/]*\///; $_ } split("\n", `unzip -l $win32_archive`) if $win32_archive; -%{$win64_files} = map { $_ => 1 } map { s/^[^\/]*\///; $_ } split("\n", `unzip -l $win64_archive`) if $win64_archive; - -# print Dumper($mac_files); -# exit; -my $tmpdir = File::Temp->newdir() or die($!); -#print STDERR $tmpdir."\n"; -chdir $tmpdir or die($!); - -system("tar", "xzf", $mac_archive) if $mac_archive; -system("tar", "xzf", $linux32_archive) if $linux32_archive; -system("tar", "xzf", $linux64_archive) if $linux64_archive; -system("unzip", "-q", $win32_archive) if $win32_archive; -system("unzip", "-q", $win64_archive) if $win64_archive; - -my $rv; -mkdir("content") or die($!); -foreach (sort <*>) { - next if m/^\./; - next if m/.*content/; - if ($_ !~ /.*windows.*/i) { - $rv = `ditto $_/usr/local content`; - } else { - $rv = `ditto $_ content`; - } - $rv = `rm -rf $_`; -} - -# remove duplicates and uninteresting directories -# $rv = `rm -rf content/bin/protoc-umundo-cpp-rpc.exe`; -# $rv = `rm -rf content/bin/protoc-umundo-java-rpc.exe`; -# $rv = `rm -rf content/bin/umundo-monitor.exe`; -# $rv = `rm -rf content/bin/umundo-pingpong.exe`; - -$rv = `rm -rf content/include/umundo/common`; -$rv = `rm -rf content/include/umundo/connection`; -$rv = `rm -rf content/include/umundo/discovery`; -$rv = `rm -rf content/include/umundo/protobuf`; -$rv = `rm -rf content/include/umundo/rpc`; -$rv = `rm -rf content/include/umundo/s11n`; -$rv = `rm -rf content/include/umundo/thread`; -$rv = `rm -rf content/include/umundo/util`; -$rv = `rm -rf content/include/umundo-objc`; - -chdir "content/" or die($!); - -my $tree_list = `tree -a -h --noreport --charset ISO-8859-1`; -my $flat_list = `find -s .`; - -print ''."\n"; - -print '

Changelog

'."\n"; -print '
'."\n";
-print $change_log;
-print '
'."\n"; - -print '

Contents

'; -print <The following table is an excerpt of all the files in the individual installer -packages (detailled C++ headers are not shown). All the different archives/installers -for a given platform contain the same files, it is only a matter of taste and -convenience. There are differences between the contents for each platform though -and they are listed in the availability column.

- -

Mac are all the darwin installers, L32 and L64 is short for Linux 32 and 64Bit -respectively, same with W32 and W64 for Windows. Only the first occurence of a -library is commented, the _d suffix signifies debug libraries, the 64 -suffix is for 64Bit builds and the Windows libraries have no lib prefix.

- -EOF -print ''."\n"; -print ''; -print ''."\n"; -print '
AvailabilityFilenameDescription
'."\n"; -print '
'."\n";
-
-foreach my $file (split("\n", $flat_list)) {
-	if ($file eq '.') {
-		print 'MAC|L32|L64|W32|W64'."\n";
-		next;
-	}
-	if (-d $file) {
-		print "\n";
-		next;
-	}
-	$file =~ s/\.\///;
-#	print STDERR $file."\n";
-	(exists($mac_files->{"usr/local/$file"}) ? print " X  " : print " -  ");
-	(exists($linux32_files->{"usr/local/$file"}) ? print " X  " : print " -  ");
-	(exists($linux64_files->{"usr/local/$file"}) ? print " X  " : print " -  ");
-	(exists($win32_files->{"$file"}) ? print " X  " : print " -  ");
-	(exists($win64_files->{"$file"}) ? print " X  " : print " -  ");
-	print "\n";
-}
-
-print '
'."\n"; -print '
'."\n"; -print '
'."\n";
-
-print $tree_list;
-
-print '
'."\n"; -print '
'."\n"; -print '
'."\n";
-
-foreach my $file (split("\n", $flat_list)) {
-	my $has_description = 0;
-	foreach my $desc (keys %{$descriptions}) {
-		if ($file =~ /^$desc$/) {
-			print $descriptions->{$desc}."\n";
-			delete $descriptions->{$desc};
-			$has_description = 1;
-		}
-	}
-	if (!$has_description) {
-		print "\n";
-	}
-}
-
-print '
'."\n"; -print '
'."\n"; -print ''."\n"; - -chdir $orig_cwd; \ No newline at end of file diff --git a/contrib/local/package-linux.expect b/contrib/local/package-linux.expect deleted file mode 100755 index 2685981..0000000 --- a/contrib/local/package-linux.expect +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/expect -d - -set USCXML_BUILD_HOST $::env(USCXML_BUILD_HOST) -set timeout 150 - -set local_prompt {sradomski$ } -set prompt "sradomski@" -append prompt ${USCXML_BUILD_HOST} -append prompt {:[a-zA-Z~\/\-]+\$ } - -eval spawn ping -c1 ${USCXML_BUILD_HOST}.local. -expect "cannot resolve" { puts "Host ${USCXML_BUILD_HOST}.local. not found"; exit } \ - -re $local_prompt { } - -eval spawn ssh ${USCXML_BUILD_HOST}.local. -expect -re $prompt { send "cd /tmp/build-uscxml\n" } -expect -re $prompt { send "cmake -DCMAKE_BUILD_TYPE=Release -DDIST_PREPARE=ON /media/psf/Home/Documents/TK/Code/uscxml\n" } - -expect -re $prompt { send "make package\n" } - -expect "CPack" { exp_continue; } \ - -re $prompt { send "logout\n" } - -############################## -# exit and copy packages - -expect -re $local_prompt -eval cd ~/Documents/TK/Code/ - -eval spawn "scp -r ${USCXML_BUILD_HOST}.local:/tmp/build-uscxml/uscxml-linux* uscxml/installer/" -expect -re $local_prompt - -exit diff --git a/contrib/local/package-windows.expect b/contrib/local/package-windows.expect deleted file mode 100755 index 8aa4ac8..0000000 --- a/contrib/local/package-windows.expect +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/expect - -set timeout 600 -set USCXML_BUILD_HOST $::env(USCXML_BUILD_HOST) -set USCXML_BUILD_ARCH $::env(USCXML_BUILD_ARCH) - -set local_prompt {sradomski$ } -eval spawn ping -c1 ${USCXML_BUILD_HOST}.local. -expect "cannot resolve" { puts "Host ${USCXML_BUILD_HOST}.local. not found"; exit } \ - -re $local_prompt { } - -set initial_remote_prompt "C*>" -# the default windows prompt is hard to recognize -set remote_prompt "easy_to_recognize" - -eval spawn scp -4 -r ../../package sradomski@epikur-win7.local:uscxml -expect { - "100" { exp_continue } - "The authenticity" { send "yes\n"; exp_continue; } - timeout { puts "Timeout when uploading source code"; exit; } - -re $local_prompt { } -} - -############################## -# ssh into remote host - -eval spawn ssh -4 sradomski@${USCXML_BUILD_HOST}.local. -expect { - timeout { puts "Timeout when connecting to windows"; exit; } - "The authenticity" { send "yes\n"; } - -re $local_prompt { puts "Could not connect to remote host"; exit; } - -re $initial_remote_prompt { } -} - -send "set prompt=easy_to_recognize \r" -expect -re $remote_prompt - -send "cd build-uscxml\r" -expect -re $remote_prompt - -if { [string compare $USCXML_BUILD_ARCH 32] == 0 } { - send "\"c:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\bin\\vcvars32.bat\"\r" - expect -re $remote_prompt -} else { - send "\"c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\vcvarsall.bat\" x86_amd64\r" - expect -re $remote_prompt -} - -############################## -# package - -send "\"cmake.exe\" -G \"NMake Makefiles\" -DCMAKE_BUILD_TYPE=Release -DDIST_PREPARE=ON ..\\uscxml\r" -expect -re $remote_prompt - -send "nmake package\r" -expect { - -re $remote_prompt {} - "Built target" { exp_continue; } - "CPack" { exp_continue; } -} - -############################## -# exit and copy packages - -send "exit\r" -expect -re $local_prompt - -eval cd ~/Documents/TK/Code/ - -if { [string compare $USCXML_BUILD_ARCH 32] == 0 } { - eval spawn "scp -r epikur-win7.local:build-uscxml\\\\uscxml-windows* uscxml/installer/" -} else { - eval spawn "scp -r epikur-win7-64.local:build-uscxml\\\\uscxml-windows* uscxml/installer/" -} -expect -re $local_prompt - -exit diff --git a/contrib/local/prune_promela.pl b/contrib/local/prune_promela.pl deleted file mode 100755 index 684afaa..0000000 --- a/contrib/local/prune_promela.pl +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/perl -w - -die("Not practical as spin reports superfluous line numbers after preprocessing - minimize SCXML instead"); - -use strict; -use File::Spec; -use File::Basename; - -my $pmlIn = shift or die("Expected *.pml file as input"); - -# absolutize and split into components -$pmlIn = File::Spec->rel2abs($pmlIn) or die($!); -my($filename, $dirs, $suffix) = fileparse($pmlIn) or die($!); - -my $spinOut = `spin -a $pmlIn`; -my $gccOut = `gcc -DMEMLIM=1024 -O2 -DVECTORSZ=2048 -DXUSAFE -w -o pan pan.c`; -my $panOut = `./pan -m10000 -a`; - -my %unvisited; - -for (split /^/, $panOut) { - # /Users/sradomski/Desktop/foo.pml:128, state 12, "foreachIndex1 = 0" - if (/$pmlIn:(\d+), state (\d+), "(.*)"/) { - $unvisited{$1} = $3; - } -} - -open(my $fh, "<", $pmlIn) or die($!); -my $line = 0; -while(<$fh>) { - if (exists($unvisited{$line}) && m/$unvisited{$line}/ ) { - print "/* removed as unvisited */\n"; - } elsif (exists($unvisited{$line})) { - chomp($_); - chomp($unvisited{$line}); - print STDERR "$_ vs $unvisited{$line} \n"; - } else { - print; - } - $line++; -} -close($fh); \ No newline at end of file diff --git a/contrib/local/remove-dsstore-files.sh b/contrib/local/remove-dsstore-files.sh deleted file mode 100755 index 50cbb3a..0000000 --- a/contrib/local/remove-dsstore-files.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -CWD=`pwd` - -find ${DIR}/../.. -name '.DS_Store' -exec rm {} \; \ No newline at end of file diff --git a/contrib/local/test-include-linux.sh b/contrib/local/test-include-linux.sh deleted file mode 100755 index 19d0bd2..0000000 --- a/contrib/local/test-include-linux.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" -IWYU="/usr/bin/iwyu" -CLANG="/usr/bin/clang++" - -cd $DIR - -mkdir uscxml -touch uscxml/config.h - -#set -e - -SOURCES=`find ../../src -name "*.cpp"` - -for SOURCE in ${SOURCES}; do - if [[ "$SOURCE" == *plugins* ]]; then - continue - fi - echo ${SOURCE} - - ${IWYU} -c \ - -I /usr/include \ - -I ${DIR}/../prebuilt/include \ - -I ${DIR}/../prebuilt/linux-i686/gnu/include/arabica \ - -I ${DIR}/../prebuilt/linux-i686/gnu/include \ - -I ${DIR}/../src/evws \ - -I /usr/include/libxml2 \ - -I ${DIR} \ - -I ${DIR}/../../src ${SOURCE} -done \ No newline at end of file diff --git a/contrib/local/test-include-macosx.sh b/contrib/local/test-include-macosx.sh deleted file mode 100755 index b71103a..0000000 --- a/contrib/local/test-include-macosx.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -set -e - -ME=`basename $0` -DIR="$( cd "$( dirname "$0" )" && pwd )" - -cd $DIR - -HEADERS=`find ../../src -name *.h` - -for HEADER in ${HEADERS}; do - if [[ "$HEADER" == *inttypes.h* ]]; then - continue - fi - if [[ "$HEADER" == *bindings* ]]; then - continue - fi - if [[ "$HEADER" == *plugins* ]]; then - continue - fi - echo ${HEADER} - - echo "\ -#include \"${HEADER}\" -int main() {} " > test.cpp - - g++ \ - -I ${DIR}/../prebuilt/include \ - -I ${DIR}/../prebuilt/darwin-i386/10.9/clang/include/arabica \ - -I ${DIR}/../prebuilt/darwin-i386/10.9/clang/include \ - -I ${DIR}/../src/evws \ - -I /opt/local/include/libxml2 \ - -I /opt/local/lib/swipl-7.1.4/include \ - -I ${DIR}/../../src test.cpp -done \ No newline at end of file diff --git a/contrib/local/validate-installers.expect b/contrib/local/validate-installers.expect deleted file mode 100755 index 7022b37..0000000 --- a/contrib/local/validate-installers.expect +++ /dev/null @@ -1,317 +0,0 @@ -#!/usr/bin/expect - -## way more verbose: -#!/usr/bin/expect -d - -set timeout 2; -set local_prompt {easy_to_recognize} -log_user 0 -eval spawn /bin/bash -expect -re {bash.*$} {} -send "export PS1=easy_to_recognize\n" -expect -re $local_prompt -expect -re $local_prompt - -proc checkArchive {listCommand label listOfFiles} { - upvar 1 local_prompt local_prompt - set reqFiles [lsort $listOfFiles] - - puts "Validating $label installer via $listCommand" - - log_user 0 - send "$listCommand 1>/dev/null\n" - expect { - "cannot find" { puts " Cannot find archive for $label"; puts " Not OK"; return; } - "Error opening" { puts " Cannot find archive for $label"; return; } - -re $local_prompt { } - } - - send "$listCommand |sort\n" - foreach {file} $reqFiles { - set relist 1; - expect { - -re $file { } - -re $local_prompt { - if {$relist} { - send "$listCommand |sort\n"; - set relist 0; - exp_continue; - } else { - puts " Cannot find $file in $label installer"; exit; - } - } - } - } - expect -re $local_prompt - puts " Archive OK" -} - -set reqFilesCSharpProject { - "samples/csharp/umundo-pingpong/umundo-pingpong.sln" - "samples/csharp/umundo-pingpong/umundo-pingpong.suo" - "samples/csharp/umundo-pingpong/umundo-pingpong/Program.cs" - "samples/csharp/umundo-pingpong/umundo-pingpong/umundo-pingpong.csproj" - "samples/csharp/umundo-pingpong/umundo-pingpong/umundo-pingpong.csproj.user" - "samples/csharp/umundo-pingpong/umundo-pingpong/Properties/AssemblyInfo.cs" -} - -set reqFilesXCodeProject { - "samples/ios/umundo-pingpong/AppDelegate.h" - "samples/ios/umundo-pingpong/AppDelegate.mm" - "samples/ios/umundo-pingpong/main.m" - "samples/ios/umundo-pingpong/umundo-pingpong-Info.plist" - "samples/ios/umundo-pingpong/ViewController.h" - "samples/ios/umundo-pingpong/ViewController.m" - "samples/ios/umundo-pingpong.xcodeproj/project.pbxproj" - "samples/ios/umundo-pingpong.xcodeproj/project.xcworkspace" -} - -set reqFilesAndroidProject { - "samples/android/umundo-pingpong/AndroidManifest.xml" - "samples/android/umundo-pingpong/project.properties" - "samples/android/umundo-pingpong/src/org/umundo/samples/UMundoAndroidActivity.java" -} - -set reqFilesDesktopCommonUnix { - "/usr/local/bin/protoc-umundo-cpp-rpc" - "/usr/local/bin/protoc-umundo-java-rpc" - "/usr/local/bin/umundo-pingpong" - "/usr/local/bin/umundo-monitor" - "/usr/local/share/umundo/java/umundo.jar" -} - -set reqFilesAndroid { - "/share/umundo/android-.*/armv.*/libumundoNativeJava.so" - "/share/umundo/android-.*/armv.*/libumundoNativeJava_d.so" - "/share/umundo/android-.*/umundo.jar" -} - -set reqFilesJavaSamples { - "samples/java/core/chat/build.properties" - "samples/java/core/chat/build.xml" - "samples/java/core/chat/src/org/umundo/Chat.java" - "samples/java/rpc/chat/build.properties" - "samples/java/rpc/chat/build.xml" - "samples/java/rpc/chat/proto/ChatS11N.proto" - "samples/java/rpc/chat/src/org/umundo/Chat.java" - "samples/java/s11n/chat/build.properties" - "samples/java/s11n/chat/build.xml" - "samples/java/s11n/chat/proto/ChatS11N.proto" - "samples/java/s11n/chat/src/org/umundo/Chat.java" -} - -set reqFilesCPPSamples { - "samples/cpp/core/chat/CMakeLists.txt" - "samples/cpp/core/chat/src/Chat.cpp" - "samples/cpp/core/chat/src/Chat.h" - "samples/cpp/rpc/chat/CMakeLists.txt" - "samples/cpp/rpc/chat/proto/ChatS11N.proto" - "samples/cpp/rpc/chat/src/Chat.cpp" - "samples/cpp/rpc/chat/src/Chat.h" - "samples/cpp/s11n/chat/CMakeLists.txt" - "samples/cpp/s11n/chat/proto/ChatS11N.proto" - "samples/cpp/s11n/chat/src/Chat.cpp" - "samples/cpp/s11n/chat/src/Chat.h" -} - -# "/share/umundo/prebuilt/android/arm-linux-androideabi/libmDNSEmbedded.a" -# "/share/umundo/prebuilt/android/arm-linux-androideabi/libmDNSEmbedded.so" -# "/share/umundo/prebuilt/android/arm-linux-androideabi/libmDNSEmbedded_d.a" -# "/share/umundo/prebuilt/android/arm-linux-androideabi/libmDNSEmbedded_d.so" -# "/share/umundo/prebuilt/android/arm-linux-androideabi/libpcre.a" -# "/share/umundo/prebuilt/android/arm-linux-androideabi/libpcre_d.a" -# "/share/umundo/prebuilt/android/arm-linux-androideabi/libpcreposix.a" -# "/share/umundo/prebuilt/android/arm-linux-androideabi/libpcreposix_d.a" -# "/share/umundo/prebuilt/android/arm-linux-androideabi/libzmq.a" -# "/share/umundo/prebuilt/android/arm-linux-androideabi/libzmq_d.a" - - -set reqFilesIOS { - "/usr/local/share/umundo/ios-.*/libumundo.ios.a" - "/usr/local/share/umundo/ios-.*/libumundo_d.ios.a" - - "/usr/local/share/umundo/deps/ios/.*/libpcreposix.a" - "/usr/local/share/umundo/deps/ios/.*/libpcrecpp.a" - "/usr/local/share/umundo/deps/ios/.*/libpcre.a" - "/usr/local/share/umundo/deps/ios/.*/libprotobuf-lite.a" - "/usr/local/share/umundo/deps/ios/.*/libprotobuf.a" - "/usr/local/share/umundo/deps/ios/.*/libprotoc.a" - "/usr/local/share/umundo/deps/ios/.*/libzmq.a" -} - -# "/usr/local/share/umundo/ios-.*/libumundocore.ios.a" -# "/usr/local/share/umundo/ios-.*/libumundocore_d.ios.a" -# "/usr/local/share/umundo/ios-.*/libumundoserial.ios.a" -# "/usr/local/share/umundo/ios-.*/libumundoserial_d.ios.a" -# "/usr/local/share/umundo/ios-.*/libumundorpc.ios.a" -# "/usr/local/share/umundo/ios-.*/libumundorpc_d.ios.a" -# "/usr/local/share/umundo/ios-.*/libumundoutil.ios.a" -# "/usr/local/share/umundo/ios-.*/libumundoutil_d.ios.a" - -############################# -# Validate Mac installers -############################# -log_user 0 -set reqFilesMac { - "/usr/local/include/umundo/s11n.h" - "/usr/local/include/umundo/core.h" - "/usr/local/include/umundo/rpc.h" - "/usr/local/include/umundo/util.h" - - "/usr/local/lib/libumundo64.dylib" - "/usr/local/lib/libumundo64_d.dylib" - "/usr/local/lib/libumundocore64.dylib" - "/usr/local/lib/libumundocore64_d.dylib" - "/usr/local/lib/libumundoserial64.dylib" - "/usr/local/lib/libumundoserial64_d.dylib" - "/usr/local/lib/libumundorpc64.dylib" - "/usr/local/lib/libumundorpc64_d.dylib" - "/usr/local/lib/libumundoutil64.dylib" - "/usr/local/lib/libumundoutil64_d.dylib" - "/usr/local/lib/libumundoNativeJava64.jnilib" - "/usr/local/lib/libumundoNativeJava64_d.jnilib" -} - -set reqFilesMac [concat $reqFilesMac $reqFilesAndroid $reqFilesIOS $reqFilesDesktopCommonUnix $reqFilesXCodeProject $reqFilesAndroidProject $reqFilesJavaSamples $reqFilesCPPSamples] -set reqFilesMac [lsort $reqFilesMac] -checkArchive "tar tzf ../../installer/umundo-darwin-*.tar.gz" Mac $reqFilesMac - -############################# -# Validate Linux32 installers -############################# - -log_user 0 -set reqFilesLinux32 { - "/usr/local/bin/protoc-umundo-cpp-rpc" - "/usr/local/bin/umundo-pingpong" - "/usr/local/bin/umundo-monitor" - - "/usr/local/include/umundo/s11n.h" - "/usr/local/include/umundo/core.h" - "/usr/local/include/umundo/rpc.h" - "/usr/local/include/umundo/util.h" - - "/usr/local/lib/libumundo.so" - "/usr/local/lib/libumundo_d.so" - "/usr/local/lib/libumundocore.so" - "/usr/local/lib/libumundocore_d.so" - "/usr/local/lib/libumundoserial.so" - "/usr/local/lib/libumundoserial_d.so" - "/usr/local/lib/libumundorpc.so" - "/usr/local/lib/libumundorpc_d.so" - "/usr/local/lib/libumundoutil.so" - "/usr/local/lib/libumundoutil_d.so" - "/usr/local/lib/libumundoNativeJava.so" - "/usr/local/lib/libumundoNativeJava_d.so" - - "/usr/local/share/umundo/java/umundo.jar" -} -set reqFilesLinux32 [concat $reqFilesLinux32 $reqFilesDesktopCommonUnix $reqFilesAndroid $reqFilesAndroidProject $reqFilesJavaSamples $reqFilesCPPSamples] -set reqFilesLinux32 [lsort $reqFilesLinux32] -checkArchive "tar tzf ../../installer/umundo-linux-i686-*.tar.gz" Linux32 $reqFilesLinux32 - -############################# -# Validate Linux64 installers -############################# - -log_user 0 -set reqFilesLinux64 { - "/usr/local/bin/protoc-umundo-cpp-rpc" - "/usr/local/bin/umundo-pingpong" - "/usr/local/bin/umundo-monitor" - - "/usr/local/include/umundo/s11n.h" - "/usr/local/include/umundo/core.h" - "/usr/local/include/umundo/rpc.h" - "/usr/local/include/umundo/util.h" - - "/usr/local/lib/libumundo64.so" - "/usr/local/lib/libumundo64_d.so" - "/usr/local/lib/libumundocore64.so" - "/usr/local/lib/libumundocore64_d.so" - "/usr/local/lib/libumundoserial64.so" - "/usr/local/lib/libumundoserial64_d.so" - "/usr/local/lib/libumundorpc64.so" - "/usr/local/lib/libumundorpc64_d.so" - "/usr/local/lib/libumundoutil64.so" - "/usr/local/lib/libumundoutil64_d.so" - "/usr/local/lib/libumundoNativeJava64.so" - "/usr/local/lib/libumundoNativeJava64_d.so" - - "/usr/local/share/umundo/java/umundo.jar" -} -set reqFilesLinux64 [concat $reqFilesLinux64 $reqFilesDesktopCommonUnix $reqFilesAndroid $reqFilesAndroidProject $reqFilesJavaSamples $reqFilesCPPSamples] -set reqFilesLinux64 [lsort $reqFilesLinux64] -checkArchive "tar tzf ../../installer/umundo-linux-x86_64-*.tar.gz" Linux64 $reqFilesLinux64 - -############################# -# Validate Win32 installers -############################# - -log_user 0 -set reqFilesWin32 { - "/bin/protoc-umundo-cpp-rpc.exe" - "/bin/umundo-pingpong.exe" - "/bin/umundo-monitor.exe" - - "/include/umundo/s11n.h" - "/include/umundo/core.h" - "/include/umundo/rpc.h" - "/include/umundo/util.h" - - "/lib/umundo.lib" - "/lib/umundo_d.lib" - "/lib/umundocore.lib" - "/lib/umundocore_d.lib" - "/lib/umundoserial.lib" - "/lib/umundoserial_d.lib" - "/lib/umundorpc.lib" - "/lib/umundorpc_d.lib" - "/lib/umundoutil.lib" - "/lib/umundoutil_d.lib" - "/lib/umundoNativeCSharp.dll" - "/lib/umundoNativeCSharp_d.dll" - "/lib/umundoNativeJava.dll" - "/lib/umundoNativeJava_d.dll" -} -set reqFilesWin32 [concat $reqFilesWin32 $reqFilesAndroid $reqFilesCSharpProject $reqFilesAndroidProject $reqFilesJavaSamples $reqFilesCPPSamples] -set reqFilesWin32 [lsort $reqFilesWin32] -checkArchive "unzip -l ../../installer/umundo-windows-x86-*.zip" Win32 $reqFilesWin32 - -############################# -# Validate Win64 installers -############################# - -log_user 0 -set reqFilesWin64 { - "/bin/protoc-umundo-cpp-rpc.exe" - "/bin/umundo-pingpong.exe" - "/bin/umundo-monitor.exe" - - "/include/umundo/s11n.h" - "/include/umundo/core.h" - "/include/umundo/rpc.h" - "/include/umundo/util.h" - - "/lib/umundo64.lib" - "/lib/umundo64_d.lib" - "/lib/umundocore64.lib" - "/lib/umundocore64_d.lib" - "/lib/umundoserial64.lib" - "/lib/umundoserial64_d.lib" - "/lib/umundorpc64.lib" - "/lib/umundorpc64_d.lib" - "/lib/umundoutil64.lib" - "/lib/umundoutil64_d.lib" - "/lib/umundoNativeCSharp64.dll" - "/lib/umundoNativeCSharp64_d.dll" - "/lib/umundoNativeJava64.dll" - "/lib/umundoNativeJava64_d.dll" -} -set reqFilesWin64 [concat $reqFilesWin64 $reqFilesAndroid $reqFilesCSharpProject $reqFilesAndroidProject $reqFilesJavaSamples $reqFilesCPPSamples] -set reqFilesWin64 [lsort $reqFilesWin64] -checkArchive "unzip -l ../../installer/umundo-windows-x86_64-*.zip" Win64 $reqFilesWin64 - -expect $local_prompt -send "logout\n" -exit \ No newline at end of file diff --git a/contrib/local/virtualbox.sh b/contrib/local/virtualbox.sh deleted file mode 100755 index 905217c..0000000 --- a/contrib/local/virtualbox.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# VBoxManage startvm b307622e-6b5e-4e47-a427-84760cf2312b -# -# VBoxManage --nologo guestcontrol b307622e-6b5e-4e47-a427-84760cf2312b execute --image "C:\\Program/ Files\\Internet/ Explorer\\iexplore.exe" --username RailroadGuest --password bnsf1234 --wait-exit --wait-stdout -# -# VBoxManage controlvm b307622e-6b5e-4e47-a427-84760cf2312b savestate -# -# VBoxManage showvminfo b307622e-6b5e-4e47-a427-84760cf2312b | grep State diff --git a/contrib/proto/mmi/LifeCycleEvents.proto b/contrib/proto/mmi/LifeCycleEvents.proto deleted file mode 100644 index f77c3d0..0000000 --- a/contrib/proto/mmi/LifeCycleEvents.proto +++ /dev/null @@ -1,217 +0,0 @@ -option java_package = "@mmi.protoc.package@"; - -message LifeCycleEvent { - required string RequestID = 1; - required string Source = 2; - required string Target = 3; - - // For type identification of nested types - enum LifeCycleEventType { - NEW_CONTEXT_REQUEST = 0; - NEW_CONTEXT_RESPONSE = 1; - PREPARE_REQUEST = 2; - PREPARE_RESPONSE = 3; - START_REQUEST = 4; - START_RESPONSE = 5; - DONE_NOTIFICATION = 6; - CANCEL_REQUEST = 7; - CANCEL_RESPONSE = 8; - PAUSE_REQUEST = 9; - PAUSE_RESPONSE = 10; - RESUME_REQUEST = 11; - RESUME_RESPONSE = 12; - EXTENSION_NOTIFICATION = 13; - CLEAR_CONTEXT_REQUEST = 14; - CLEAR_CONTEXT_RESPONSE = 15; - STATUS_REQUEST = 16; - STATUS_RESPONSE = 17; - } - required LifeCycleEventType Type = 4; - // For the nested extension and for data - extensions 5 to max; -} - -message LifeCycleRequest { - extend LifeCycleEvent { - required LifeCycleRequest Request = 5; - } - - required string Context = 1; - extensions 2 to max; -} - -message LifeCycleResponse { - extend LifeCycleEvent { - required LifeCycleResponse Response = 6; - } - - enum StatusType { - SUCCESS = 0; - FAILURE = 1; - } - - required string Context = 1; - required StatusType Status = 2; - optional string StatusInfo = 3; - extensions 4 to max; -} - - -message NewContextRequest { - extend LifeCycleEvent { - required NewContextRequest Request = 7; - } - // Extend for custom data - extensions 1 to max; -} - -message NewContextResponse { - extend LifeCycleResponse { - required NewContextResponse Response = 4; - } - // Extend for custom data - extensions 1 to max; -} - -message PrepareRequest { - extend LifeCycleRequest { - required PrepareRequest Request = 2; - } - - optional string ContentURL = 1; - optional string Content = 2; - // Extend for custom data - extensions 3 to max; -} - -message PrepareResponse { - extend LifeCycleResponse { - required PrepareResponse Response = 5; - } - // Extend for custom data - extensions 1 to max; -} - -message StartRequest { - extend LifeCycleRequest { - required StartRequest Request = 3; - } - optional string ContentURL = 1; - optional string Content = 2; - // Extend for custom data - extensions 3 to max; -} - -message StartResponse { - extend LifeCycleResponse { - required StartResponse Response = 6; - } - // Extend for custom data - extensions 1 to max; -} - -message DoneNotification { - extend LifeCycleResponse { - required DoneNotification Notification = 9; - } - // Extend for custom data - extensions 1 to max; -} - -message CancelRequest { - extend LifeCycleRequest { - required CancelRequest Request = 4; - } - // Extend for custom data - extensions 1 to max; -} - -message CancelResponse { - extend LifeCycleResponse { - required CancelResponse Response = 7; - } - // Extend for custom data - extensions 1 to max; -} - -message PauseRequest { - extend LifeCycleRequest { - required PauseRequest Request = 5; - } - // Extend for custom data - extensions 1 to max; -} - -message PauseResponse { - extend LifeCycleResponse { - required PauseResponse Response = 8; - } - // Extend for custom data - extensions 1 to max; -} - -message ResumeRequest { - extend LifeCycleRequest { - required ResumeRequest Request = 6; - } - // Extend for custom data - extensions 1 to max; -} - -message ResumeResponse { - extend LifeCycleResponse { - required ResumeResponse Response = 10; - } - // Extend for custom data - extensions 1 to max; -} - -message ExtensionNotification { - extend LifeCycleEvent { - required ExtensionNotification Notification = 8; - } - required string Name = 1; - required string Context = 2; - // Extend for custom data - extensions 3 to max; -} - -message ClearContextRequest { - extend LifeCycleRequest { - required ClearContextRequest Request = 7; - } - // Extend for custom data - extensions 1 to max; -} - -message ClearContextResponse { - extend LifeCycleResponse { - required ClearContextResponse Response = 11; - } - // Extend for custom data - extensions 1 to max; -} - -message StatusRequest { - extend LifeCycleEvent { - required StatusRequest Request = 9; - } - optional string Context = 2; - // Extend for custom data - extensions 3 to max; -} - -message StatusResponse { - extend LifeCycleEvent { - required StatusResponse Response = 10; - } - enum StatusType { - ALIVE = 0; - DEAD = 1; - } - - optional string Context = 1; - required StatusType Status = 2; - // Extend for custom data - extensions 3 to max; -} diff --git a/contrib/proto/mmi/StringDataExtension.proto b/contrib/proto/mmi/StringDataExtension.proto deleted file mode 100644 index 428f2ff..0000000 --- a/contrib/proto/mmi/StringDataExtension.proto +++ /dev/null @@ -1,129 +0,0 @@ -import "LifeCycleEvents.proto"; - -option java_package = "@mmi.protoc.package@"; - -message NewContextRequestData { - extend NewContextRequest { - required NewContextRequestData Request = 1; - } - optional string Data = 1; -} - -message NewContextResponseData { - extend NewContextResponse { - required NewContextResponseData Response = 1; - } - optional string Data = 1; -} - -message PrepareRequestData { - extend PrepareRequest { - required PrepareRequestData Request = 3; - } - optional string Data = 1; -} - -message PrepareResponseData { - extend PrepareResponse { - required PrepareResponseData Response = 1; - } - optional string Data = 1; -} - -message StartRequestData { - extend StartRequest { - required StartRequestData Request = 3; - } - optional string Data = 1; -} - -message StartResponseData { - extend StartResponse { - required StartResponseData Response = 1; - } - optional string Data = 1; -} - -message DoneNotificationData { - extend DoneNotification { - required DoneNotificationData Notification = 1; - } - optional string Data = 1; -} - -message CancelRequestData { - extend CancelRequest { - required CancelRequestData Request = 1; - } - optional string Data = 1; -} - -message CancelResponseData { - extend CancelResponse { - required CancelResponseData Response = 1; - } - optional string Data = 1; -} - -message PauseRequestData { - extend PauseRequest { - required PauseRequestData Request = 1; - } - optional string Data = 1; -} - -message PauseResponseData { - extend PauseResponse { - required PauseResponseData Response = 1; - } - optional string Data = 1; -} - -message ResumeRequestData { - extend ResumeRequest { - required ResumeRequestData Request = 1; - } - optional string Data = 1; -} - -message ResumeResponseData { - extend ResumeResponse { - required ResumeResponseData Response = 1; - } - optional string Data = 1; -} - -message ExtensionNotificationData { - extend ExtensionNotification { - required ExtensionNotificationData Notification = 3; - } - optional string Data = 1; -} - -message ClearContextRequestData { - extend ClearContextRequest { - required ClearContextRequestData Request = 1; - } - optional string Data = 1; -} - -message ClearContextResponseData { - extend ClearContextResponse { - required ClearContextResponseData Response = 1; - } - optional string Data = 1; -} - -message StatusRequestData { - extend StatusRequest { - required StatusRequestData Request = 3; - } - optional string Data = 1; -} - -message StatusResponseData { - extend StatusResponse { - required StatusResponse Response = 3; - } - optional string Data = 1; -} diff --git a/contrib/src/Pluma/Config.hpp b/contrib/src/Pluma/Config.hpp new file mode 100755 index 0000000..efd98c9 --- /dev/null +++ b/contrib/src/Pluma/Config.hpp @@ -0,0 +1,141 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////// +// +// Based on SFML configuration header +// SFML Config.hpp: +// http://www.sfml-dev.org/documentation/2.0/Config_8hpp-source.htm +// +// Acknowledgements to Simple and Fast Multimedia Library +// http://www.sfml-dev.org/ +// +//////////////////////////////////////////////////////////// + + +#ifndef PLUMA_CONFIG_HPP +#define PLUMA_CONFIG_HPP + + +//////////////////////////////////////////////////////////// +// Identify the operating system +//////////////////////////////////////////////////////////// +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) + + // Windows + #define PLUMA_SYS_WINDOWS + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif + #ifndef NOMINMAX + #define NOMINMAX + #endif + +#elif defined(linux) || defined(__linux) + + // Linux + #define PLUMA_SYS_LINUX + +#elif defined(__APPLE__) || defined(MACOSX) || defined(macintosh) || defined(Macintosh) + + // MacOS + #define PLUMA_SYS_MACOS + +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + + // FreeBSD + #define PLUMA_SYS_FREEBSD + +#else + + // Unsupported system + #error This operating system is not supported by this library + +#endif + + + +//////////////////////////////////////////////////////////// +// Define library file extension based on OS +//////////////////////////////////////////////////////////// +#ifdef PLUMA_SYS_WINDOWS + #define PLUMA_LIB_EXTENSION "dll" +#elif defined(PLUMA_SYS_MACOS) + #define PLUMA_LIB_EXTENSION "dylib" +#elif defined(PLUMA_SYS_LINUX) || defined(PLUMA_SYS_FREEBSD) + #define PLUMA_LIB_EXTENSION "so" +#else + // unknown library file type + #error Unknown library file extension for this operating system +#endif + + +//////////////////////////////////////////////////////////// +// Define portable import / export macros +//////////////////////////////////////////////////////////// +#if defined(PLUMA_SYS_WINDOWS) + + #ifndef PLUMA_STATIC + + // Windows platforms + #ifdef PLUMA_EXPORTS + + // From DLL side, we must export + #define PLUMA_API __declspec(dllexport) + + #else + + // From client application side, we must import + #define PLUMA_API __declspec(dllimport) + + #endif + + // For Visual C++ compilers, we also need to turn off this annoying C4251 warning. + // You can read lots ot different things about it, but the point is the code will + // just work fine, and so the simplest way to get rid of this warning is to disable it + #ifdef _MSC_VER + + #pragma warning(disable : 4251) + + #endif + + #else + + // No specific directive needed for static build + #define PLUMA_API + + #endif + +#else + + // Other platforms don't need to define anything + #define PLUMA_API + +#endif + + + + +#endif // PLUMA_CONFIG_HPP diff --git a/contrib/src/Pluma/Connector.hpp b/contrib/src/Pluma/Connector.hpp new file mode 100755 index 0000000..3c227e7 --- /dev/null +++ b/contrib/src/Pluma/Connector.hpp @@ -0,0 +1,86 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef PLUMA_CONNECTOR_HPP +#define PLUMA_CONNECTOR_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include + + +///////////////////////////////////////////////////////////////// +// Define portable import/export macros for Plugin registration +///////////////////////////////////////////////////////////////// +#if defined(PLUMA_SYS_WINDOWS) + + #ifndef PLUMA_STATIC_PLUGIN + + // Windows platforms + #ifndef PLUGIN_IMPORTS + + // From DLL side, we must export + #ifdef __cplusplus + #define PLUMA_CONNECTOR extern "C" __declspec(dllexport) + #else + #define PLUMA_CONNECTOR __declspec(dllexport) + #endif + + #else + + // From client application side, we must import + #ifdef __cplusplus + #define PLUMA_CONNECTOR extern "C" __declspec(dllimport) + #else + #define PLUMA_CONNECTOR __declspec(dllimport) + #endif + + #endif + + #else + + // Only define the extern "C" for static build + #ifdef __cplusplus + #define PLUMA_CONNECTOR extern "C" + #else + #define PLUMA_CONNECTOR + #endif + + #endif + +#else + + // Only define the extern "C" for other platforms + #ifdef __cplusplus + #define PLUMA_CONNECTOR extern "C" + #else + #define PLUMA_CONNECTOR + #endif + +#endif + + +#endif // PLUMA_CONNECTOR_HPP diff --git a/contrib/src/Pluma/DLibrary.cpp b/contrib/src/Pluma/DLibrary.cpp new file mode 100755 index 0000000..9b617db --- /dev/null +++ b/contrib/src/Pluma/DLibrary.cpp @@ -0,0 +1,106 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include + + +namespace pluma{ + +//////////////////////////////////////////////////////////// +DLibrary* DLibrary::load(const std::string& path){ + if ( path.empty() ){ + fprintf(stderr, "Failed to load library: Empty path\n"); + return NULL; + } + void* handle = NULL; + + // load library - OS dependent operation + #ifdef PLUMA_SYS_WINDOWS + handle = ::LoadLibraryA(path.c_str()); + if (!handle){ + fprintf(stderr, "Failed to load library \"%s\".\n", path.c_str()); + return NULL; + } + #else + handle = ::dlopen(path.c_str(), RTLD_NOW); + if (!handle){ + const char* errorString = ::dlerror(); + fprintf(stderr, "Failed to load library \"%s\".", path.c_str()); + if(errorString) fprintf(stderr, " OS returned error: \"%s\".", errorString); + fprintf(stderr, "\n"); + return NULL; + } + #endif + // return a DLibrary with the DLL handle + return new DLibrary(handle); +} + + +//////////////////////////////////////////////////////////// +DLibrary::~DLibrary(){ + if (handle){ + #ifdef PLUMA_SYS_WINDOWS + ::FreeLibrary( (HMODULE)handle ); + #else + ::dlclose(handle); + #endif + } +} + + +//////////////////////////////////////////////////////////// +void* DLibrary::getSymbol(const std::string& symbol){ + if (!handle){ + fprintf(stderr, "Cannot inspect library symbols, library isn't loaded.\n"); + return NULL; + } + void* res; + #ifdef PLUMA_SYS_WINDOWS + res = (void*)(::GetProcAddress((HMODULE)handle, symbol.c_str())); + #else + res = (void*)(::dlsym(handle, symbol.c_str())); + #endif + if (!res){ + fprintf(stderr, "Library symbol \"%s\" not found.\n", symbol.c_str()); + return NULL; + } + return res; +} + + +//////////////////////////////////////////////////////////// +DLibrary::DLibrary(void* handle): + handle(handle) +{ + // Nothing to do +} + +} // namespace pluma + diff --git a/contrib/src/Pluma/DLibrary.hpp b/contrib/src/Pluma/DLibrary.hpp new file mode 100755 index 0000000..1bb9bac --- /dev/null +++ b/contrib/src/Pluma/DLibrary.hpp @@ -0,0 +1,123 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef PLUMA_DYNAMIC_LIBRARY_HPP +#define PLUMA_DYNAMIC_LIBRARY_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include + +// include OS dependent support for DLL +#ifdef PLUMA_SYS_WINDOWS + #include +#else + #include +#endif + + + +namespace pluma{ + +//////////////////////////////////////////////////////////// +/// \brief Manages a Dynamic Linking Library. +/// +//////////////////////////////////////////////////////////// +class DLibrary{ + + +public: + + //////////////////////////////////////////////////////////// + /// \brief Load a library. + /// + /// \param path Path to the library. + /// + /// \return Pointer to the loaded library, or NULL if failed. + /// + //////////////////////////////////////////////////////////// + static DLibrary* load(const std::string& path); + + //////////////////////////////////////////////////////////// + /// \brief Destructor. + /// + /// Close and free the opened library (if any). + /// + //////////////////////////////////////////////////////////// + ~DLibrary(); + + //////////////////////////////////////////////////////////// + /// \brief Get a symbol from the library. + /// + /// \param symbol Symbol that we're looking for. + /// + /// \return Pointer to what the symbol refers to, or NULL if + /// the symbol is not found. + /// + //////////////////////////////////////////////////////////// + void* getSymbol(const std::string& symbol); + + +private: + + //////////////////////////////////////////////////////////// + /// \brief Default constructor. + /// + /// Library instances cannot be created, use load instead. + /// + /// \see load + /// + //////////////////////////////////////////////////////////// + DLibrary(); + + //////////////////////////////////////////////////////////// + /// \brief Constructor via library handle. + /// + /// Used on load function. + /// + /// \see load + /// + //////////////////////////////////////////////////////////// + DLibrary(void* handle); + + + +//////////////////////////////////////////////////////////// +// Member data +//////////////////////////////////////////////////////////// + + +private: + + void* handle; ///< Library handle. + +}; + + +} // namespace pluma + + +#endif // PLUMA_DYNAMIC_LIBRARY_HPP diff --git a/contrib/src/Pluma/Dir.cpp b/contrib/src/Pluma/Dir.cpp new file mode 100755 index 0000000..860220e --- /dev/null +++ b/contrib/src/Pluma/Dir.cpp @@ -0,0 +1,103 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include +#include + + +namespace pluma{ + +namespace dir{ + + +//////////////////////////////////////////////////////////// +void listFiles(std::list& list, const std::string& folder, const std::string& extension, bool recursive){ + DIR* dir; + DIR* subDir; + struct dirent *ent; + // try to open top folder + dir = opendir(folder.c_str()); + if (dir == NULL){ + // could not open directory + fprintf(stderr, "Could not open \"%s\" directory.\n", folder.c_str()); + return; + }else{ + // close, we'll process it next + closedir(dir); + } + // enqueue top folder + std::queue folders; + folders.push(folder); + + // run while has queued folders + while (!folders.empty()){ + std::string currFolder = folders.front(); + folders.pop(); + dir = opendir(currFolder.c_str()); + if (dir == NULL) continue; + // iterate through all the files and directories + while ((ent = readdir (dir)) != NULL) { + std::string name(ent->d_name); + // ignore "." and ".." directories + if ( name.compare(".") == 0 || name.compare("..") == 0) continue; + // add path to the file name + std::string path = currFolder; + path.append("/"); + path.append(name); + // check if it's a folder by trying to open it + subDir = opendir(path.c_str()); + if (subDir != NULL){ + // it's a folder: close, we can process it later + closedir(subDir); + if (recursive) folders.push(path); + }else{ + // it's a file + if (extension.empty()){ + list.push_back(path); + }else{ + // check file extension + size_t lastDot = name.find_last_of('.'); + std::string ext = name.substr(lastDot+1); + if (ext.compare(extension) == 0){ + // match + list.push_back(path); + } + } // endif (extension test) + } // endif (folder test) + } // endwhile (nextFile) + closedir(dir); + } // endwhile (queued folders) + +} // end listFiles + + +} // namespace dir + +} // namespace pluma diff --git a/contrib/src/Pluma/Dir.hpp b/contrib/src/Pluma/Dir.hpp new file mode 100755 index 0000000..a94c477 --- /dev/null +++ b/contrib/src/Pluma/Dir.hpp @@ -0,0 +1,64 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef PLUMA_DIRECTORY_HPP +#define PLUMA_DIRECTORY_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include + + +namespace pluma{ + +namespace dir{ + +//////////////////////////////////////////////////////////// +/// \brief List files of a directory. +/// +/// \param list The output files list. +/// \param folder The folder where to search in +/// \param extension A file extension filter, +/// empty extension will match all files. +/// \param recursive If true it will list files in +/// sub directories as well. +/// +//////////////////////////////////////////////////////////// +void listFiles( + std::list& list, + const std::string& folder, + const std::string& extension = "", + bool recursive = false +); + + +} // namespace dir + +} // namespace pluma + + +#endif // PLUMA_DIRECTORY_HPP diff --git a/contrib/src/Pluma/Host.cpp b/contrib/src/Pluma/Host.cpp new file mode 100755 index 0000000..eb37c33 --- /dev/null +++ b/contrib/src/Pluma/Host.cpp @@ -0,0 +1,179 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include + + +namespace pluma{ + +//////////////////////////////////////////////////////////// +Host::Host(){ + // Nothing to do +} + + +//////////////////////////////////////////////////////////// +bool Host::add(Provider* provider){ + if (provider == NULL){ + fprintf(stderr, "Trying to add a null provider.\n"); + return false; + } + if (!validateProvider(provider)){ + delete provider; + return false; + } + addRequests[ provider->plumaGetType() ].push_back(provider); + return true; +} + + +//////////////////////////////////////////////////////////// +Host::~Host(){ + clearProviders(); + // map frees itself +} + + +//////////////////////////////////////////////////////////// +void Host::clearProviders(){ + ProvidersMap::iterator it; + for (it = knownTypes.begin() ; it != knownTypes.end() ; ++it){ + std::list& providers = it->second.providers; + std::list::iterator provIt; + for (provIt = providers.begin() ; provIt != providers.end() ; ++provIt){ + delete *provIt; + } + std::list().swap(providers); + } +} + + +//////////////////////////////////////////////////////////// +bool Host::knows(const std::string& type) const{ + return knownTypes.find(type) != knownTypes.end(); +} + + +//////////////////////////////////////////////////////////// +unsigned int Host::getVersion(const std::string& type) const{ + ProvidersMap::const_iterator it = knownTypes.find(type); + if (it != knownTypes.end()) + return it->second.version; + return 0; +} + + +//////////////////////////////////////////////////////////// +unsigned int Host::getLowestVersion(const std::string& type) const{ + ProvidersMap::const_iterator it = knownTypes.find(type); + if (it != knownTypes.end()) + return it->second.lowestVersion; + return 0; +} + + +//////////////////////////////////////////////////////////// +void Host::registerType(const std::string& type, unsigned int version, unsigned int lowestVersion){ + if (!knows(type)){ + ProviderInfo pi; + pi.version = version; + pi.lowestVersion = lowestVersion; + knownTypes[type] = pi; + } +} + + +//////////////////////////////////////////////////////////// +const std::list* Host::getProviders(const std::string& type) const{ + ProvidersMap::const_iterator it = knownTypes.find(type); + if (it != knownTypes.end()) + return &it->second.providers; + return NULL; +} + + +//////////////////////////////////////////////////////////// +bool Host::validateProvider(Provider* provider) const{ + const std::string& type = provider->plumaGetType(); + if ( !knows(type) ){ + fprintf(stderr, "%s provider type isn't registered.\n", type.c_str()); + return false; + } + if (!provider->isCompatible(*this)){ + fprintf(stderr, "Incompatible %s provider version.\n", type.c_str()); + return false; + } + return true; +} + + +//////////////////////////////////////////////////////////// +bool Host::registerProvider(Provider* provider){ + if (!validateProvider(provider)){ + delete provider; + return false; + } + knownTypes[ provider->plumaGetType() ].providers.push_back(provider); + return true; +} + + +//////////////////////////////////////////////////////////// +void Host::cancelAddictions(){ + TempProvidersMap::iterator it; + for( it = addRequests.begin() ; it != addRequests.end() ; ++it){ + std::list lst = it->second; + std::list::iterator providerIt; + for (providerIt = lst.begin() ; providerIt != lst.end() ; ++providerIt){ + delete *providerIt; + } + } + // clear map + TempProvidersMap().swap(addRequests); +} + + +//////////////////////////////////////////////////////////// +bool Host::confirmAddictions(){ + if (addRequests.empty()) return false; + TempProvidersMap::iterator it; + for( it = addRequests.begin() ; it != addRequests.end() ; ++it){ + std::list lst = it->second; + std::list::iterator providerIt; + for (providerIt = lst.begin() ; providerIt != lst.end() ; ++providerIt){ + knownTypes[it->first].providers.push_back(*providerIt); + } + } + // clear map + TempProvidersMap().swap(addRequests); + return true; +} + + +} //namespace pluma diff --git a/contrib/src/Pluma/Host.hpp b/contrib/src/Pluma/Host.hpp new file mode 100755 index 0000000..cf049f5 --- /dev/null +++ b/contrib/src/Pluma/Host.hpp @@ -0,0 +1,212 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef PLUMA_HOST_HPP +#define PLUMA_HOST_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include + +#include +#include +#include + +namespace pluma{ + +//////////////////////////////////////////////////////////// +/// \brief Manages providers. +/// +//////////////////////////////////////////////////////////// +class PLUMA_API Host{ +friend class PluginManager; +friend class Provider; + + +public: + + //////////////////////////////////////////////////////////// + /// \brief Add provider. + /// + /// Provider type and version are checked. Only known and + /// valid provider types are accepted. + /// + /// \param provider Provider to be added. + /// + /// \return True if the provider is accepted. + /// + //////////////////////////////////////////////////////////// + bool add(Provider* provider); + + +private: + + //////////////////////////////////////////////////////////// + /// \brief Default constructor. + /// + /// New Host instances are not publicly allowed. + /// + //////////////////////////////////////////////////////////// + Host(); + + //////////////////////////////////////////////////////////// + /// \brief Destructor. + /// + /// Clears all hosted providers + /// + //////////////////////////////////////////////////////////// + ~Host(); + + //////////////////////////////////////////////////////////// + /// \brief Ckeck if a provider type is registered. + /// + /// \param type Provider type id. + /// + /// \return True if the type is registered + /// + //////////////////////////////////////////////////////////// + bool knows(const std::string& type) const; + + //////////////////////////////////////////////////////////// + /// \brief Get version of a type of providers. + /// + /// \param type Provider type. + /// + /// \return The version of the provider type. + /// + //////////////////////////////////////////////////////////// + unsigned int getVersion(const std::string& type) const; + + //////////////////////////////////////////////////////////// + /// \brief Get lowest compatible version of a type of providers. + /// + /// \param type Provider type. + /// + /// \return The lowest compatible version of the provider type. + /// + //////////////////////////////////////////////////////////// + unsigned int getLowestVersion(const std::string& type) const; + + //////////////////////////////////////////////////////////// + /// \brief Register a type of providers. + /// + /// \param type Provider type. + /// \param version Current version of that provider type. + /// \param lowestVersion Lowest compatible version of that provider type. + /// + //////////////////////////////////////////////////////////// + void registerType(const std::string& type, unsigned int version, unsigned int lowestVersion); + + //////////////////////////////////////////////////////////// + /// \brief Get providers of a certain type. + /// + /// \param type Provider type. + /// + /// \return Pointer to the list of providers of that \a type, + /// or NULL if \a type is not registered. + /// + //////////////////////////////////////////////////////////// + const std::list* getProviders(const std::string& type) const; + + //////////////////////////////////////////////////////////// + /// \brief Clears all hosted providers. + /// + //////////////////////////////////////////////////////////// + void clearProviders(); + + //////////////////////////////////////////////////////////// + /// \brief Validate provider type and version. + /// + /// \return True if the provider is acceptable. + /// + //////////////////////////////////////////////////////////// + bool validateProvider(Provider* provider) const; + + //////////////////////////////////////////////////////////// + /// \brief Clearly add a provider. + /// + /// Provider type and version are checked. Only known and + /// valid provider types are accepted. + /// If acepted, provider is directly stored. + /// + /// \param provider Provider to be added. + /// + /// \return True if the provider is accepted. + /// + //////////////////////////////////////////////////////////// + bool registerProvider(Provider* provider); + + //////////////////////////////////////////////////////////// + /// \brief Previous add calls are canceled. + /// + /// Added providers are not stored. + /// + /// \see add + /// + //////////////////////////////////////////////////////////// + void cancelAddictions(); + + //////////////////////////////////////////////////////////// + /// \brief Previous add calls are confirmed. + /// + /// Added providers are finally stored. + /// + /// \return True if something was stored. + /// + /// \see add + /// + //////////////////////////////////////////////////////////// + bool confirmAddictions(); + + + +//////////////////////////////////////////////////////////// +// Member data +//////////////////////////////////////////////////////////// + +private: + + //////////////////////////////////////////////////////////// + /// \brief Structure with information about a provider type. + /// + //////////////////////////////////////////////////////////// + struct ProviderInfo{ + unsigned int version; + unsigned int lowestVersion; + std::list providers; + }; + + typedef std::map ProvidersMap; + typedef std::map > TempProvidersMap; + + ProvidersMap knownTypes; ///< Map of registered types. + TempProvidersMap addRequests; ///< Temporarily added providers + +}; + +} // namespace pluma + +#endif // PLUMA_HOST_HPP diff --git a/contrib/src/Pluma/PluginManager.cpp b/contrib/src/Pluma/PluginManager.cpp new file mode 100755 index 0000000..1124505 --- /dev/null +++ b/contrib/src/Pluma/PluginManager.cpp @@ -0,0 +1,201 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include +#include + +namespace pluma{ + +//////////////////////////////////////////////////////////// +PluginManager::PluginManager(){ + // Nothing to do +} + + +//////////////////////////////////////////////////////////// +PluginManager::~PluginManager(){ + unloadAll(); +} + + +//////////////////////////////////////////////////////////// +bool PluginManager::load(const std::string& path){ + std::string plugName = getPluginName(path); + std::string realPath = resolvePathExtension(path); + DLibrary* lib = DLibrary::load(realPath); + if (!lib) return false; + + fnRegisterPlugin* registerFunction; + registerFunction = reinterpret_cast(lib->getSymbol("connect")); + + if(!registerFunction){ + fprintf(stderr, "Failed to initialize plugin \"%s\": connect function not found\n", plugName.c_str()); + delete lib; + return false; + } + // try to initialize plugin: + if (!registerFunction(host)){ + // plugin decided to fail + fprintf(stderr, "Self registry failed on plugin \"%s\".\n", plugName.c_str()); + host.cancelAddictions(); + delete lib; + return false; + } + // Store the library if addictions are confirmed + if (host.confirmAddictions()) + libraries[plugName] = lib; + else{ + // otherwise nothing was registered + fprintf(stderr, "Nothing registered by plugin \"%s\".\n", plugName.c_str()); + delete lib; + return false; + } + return true; +} + + +//////////////////////////////////////////////////////////// +bool PluginManager::load(const std::string& folder, const std::string& pluginName){ + if (folder.empty()) + return load(pluginName); + else if (folder[folder.size()-1] == '/' || folder[folder.size()-1] == '\\') + return load(folder + pluginName); + return load(folder + '/' + pluginName); +} + + +//////////////////////////////////////////////////////////// +int PluginManager::loadFromFolder(const std::string& folder, bool recursive){ + std::list files; + dir::listFiles(files, folder, PLUMA_LIB_EXTENSION, recursive); + // try to load every library + int res = 0; + std::list::const_iterator it; + for (it = files.begin() ; it != files.end() ; ++it){ + if ( load(*it) ) ++res; + } + return res; +} + + +//////////////////////////////////////////////////////////// +bool PluginManager::unload(const std::string& pluginName){ + std::string plugName = getPluginName(pluginName); + LibMap::iterator it = libraries.find(plugName); + if( it != libraries.end() ) { + delete it->second; + libraries.erase(it); + return true; + } + return false; +} + + +//////////////////////////////////////////////////////////// +void PluginManager::unloadAll(){ + + host.clearProviders(); + LibMap::iterator it; + for (it = libraries.begin() ; it != libraries.end() ; ++it){ + delete it->second; + } + libraries.clear(); +} + + +//////////////////////////////////////////////////////////// +std::string PluginManager::getPluginName(const std::string& path){ + size_t lastDash = path.find_last_of("/\\"); + size_t lastDot = path.find_last_of('.'); + if (lastDash == std::string::npos) lastDash = 0; + else ++lastDash; + if (lastDot < lastDash || lastDot == std::string::npos){ + // path without extension + lastDot = path.length(); + } + return path.substr(lastDash, lastDot-lastDash); +} + + +//////////////////////////////////////////////////////////// +std::string PluginManager::resolvePathExtension(const std::string& path){ + size_t lastDash = path.find_last_of("/\\"); + size_t lastDot = path.find_last_of('.'); + if (lastDash == std::string::npos) lastDash = 0; + else ++lastDash; + if (lastDot < lastDash || lastDot == std::string::npos){ + // path without extension, add it + return path + "." + PLUMA_LIB_EXTENSION; + } + return path; +} + + +//////////////////////////////////////////////////////////// +void PluginManager::registerType(const std::string& type, unsigned int version, unsigned int lowestVersion){ + host.registerType(type, version, lowestVersion); +} + + +//////////////////////////////////////////////////////////// +bool PluginManager::addProvider(Provider* provider){ + if (provider == NULL){ + fprintf(stderr, "Trying to add null provider\n"); + return false; + } + return host.registerProvider(provider); +} + + +//////////////////////////////////////////////////////////// +void PluginManager::getLoadedPlugins(std::vector& pluginNames) const{ + pluginNames.reserve(pluginNames.size()+libraries.size()); + LibMap::const_iterator it; + for(it = libraries.begin() ; it != libraries.end() ; ++it){ + pluginNames.push_back(&(it->first)); + } +} + + +//////////////////////////////////////////////////////////// +bool PluginManager::isLoaded(const std::string& pluginName) const{ + return libraries.find(getPluginName(pluginName)) != libraries.end(); +} + + +//////////////////////////////////////////////////////////// +const std::list* PluginManager::getProviders(const std::string& type) const{ + return host.getProviders(type); +} + + + +} // namespace pluma + diff --git a/contrib/src/Pluma/PluginManager.hpp b/contrib/src/Pluma/PluginManager.hpp new file mode 100755 index 0000000..e5ddf06 --- /dev/null +++ b/contrib/src/Pluma/PluginManager.hpp @@ -0,0 +1,245 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef PLUMA_PLUGIN_MANAGER_HPP +#define PLUMA_PLUGIN_MANAGER_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include + +#include +#include + +namespace pluma{ +class DLibrary; + +//////////////////////////////////////////////////////////// +/// \brief Manages loaded plugins. +/// +//////////////////////////////////////////////////////////// +class PLUMA_API PluginManager{ + + +public: + + //////////////////////////////////////////////////////////// + /// \brief Destructor. + /// + //////////////////////////////////////////////////////////// + ~PluginManager(); + + //////////////////////////////////////////////////////////// + /// \brief Load a plugin given it's path + /// + /// \param path Path for the plugin, including plugin name. File extension + /// may be included, but is discouraged for better cross platform code. + /// If file extension isn't present on the path, Pluma will deduce it + /// from the operating system. + /// + /// \return True if the plugin is successfully loaded. + /// + /// \see load(const std::string&, const std::string&) + /// \see loadFromFolder + /// \see unload + /// \see unloadAll + /// + //////////////////////////////////////////////////////////// + bool load(const std::string& path); + + + //////////////////////////////////////////////////////////// + /// \brief Load a plugin from a given folder + /// + /// \param folder The folder path. + /// \param pluginName Name of the plugin. File extension + /// may be included, but is discouraged for better cross platform code. + /// If file extension is omitted, Pluma will deduce it + /// from the operating system. + /// + /// \return True if the plugin is successfully loaded. + /// + /// \see load(const std::string&) + /// \see loadFromFolder + /// \see unload + /// \see unloadAll + /// + //////////////////////////////////////////////////////////// + bool load(const std::string& folder, const std::string& pluginName); + + //////////////////////////////////////////////////////////// + /// \brief Load all plugins from a given folder + /// + /// \param folder Path for the folder where the plug-ins are. + /// \param recursive If true it will search on sub-folders as well + /// + /// \return Number of successfully loaded plug-ins. + /// + /// \see load(const std::string&, const std::string&) + /// \see load(const std::string&) + /// \see unload + /// \see unloadAll + /// + //////////////////////////////////////////////////////////// + int loadFromFolder(const std::string& folder, bool recursive = false); + + //////////////////////////////////////////////////////////// + /// \brief Unload a plugin. + /// + /// \param pluginName Name or path of the plugin. + /// + /// \return True if the plugin is successfully unloaded, + /// false if no such plugin exists on the manager. + /// + /// \see load(const std::string&, const std::string&) + /// \see load(const std::string&) + /// \see loadFromFolder + /// \see unloadAll + /// + //////////////////////////////////////////////////////////// + bool unload(const std::string& pluginName); + + //////////////////////////////////////////////////////////// + /// \brief Unload all loaded plugins. + /// + /// \see load(const std::string&, const std::string&) + /// \see load(const std::string&) + /// \see loadFromFolder + /// \see unload + /// + //////////////////////////////////////////////////////////// + void unloadAll(); + + //////////////////////////////////////////////////////////// + /// \brief Directly add a new provider. + /// + /// \param provider Provider. + /// + //////////////////////////////////////////////////////////// + bool addProvider(Provider* provider); + + //////////////////////////////////////////////////////////// + /// \brief Get the name of all loaded plugins. + /// + /// \param pluginNames A vector to fill with the plugins names. + /// + //////////////////////////////////////////////////////////// + void getLoadedPlugins(std::vector& pluginNames) const; + + //////////////////////////////////////////////////////////// + /// \brief Check if a plug-in is loaded. + /// + /// \param pluginName the plug-in tname o check. + /// + //////////////////////////////////////////////////////////// + bool isLoaded(const std::string& pluginName) const; + + +protected: + + //////////////////////////////////////////////////////////// + /// \brief Default constructor. + /// + /// PluginManager cannot be publicly instantiated. + /// + //////////////////////////////////////////////////////////// + PluginManager(); + + //////////////////////////////////////////////////////////// + /// \brief Register a provider type + /// + /// \param type Provider type. + /// \param version Current version of that provider type. + /// \param lowestVersion Lowest compatible version of that provider type. + /// + /// \see Host::registerType + /// + //////////////////////////////////////////////////////////// + void registerType(const std::string& type, unsigned int version, unsigned int lowestVersion); + + //////////////////////////////////////////////////////////// + /// \brief Get providers of a certain type. + /// + /// \param type Provider type. + /// + /// \return Pointer to the list of providers of that \a type, + /// or NULL if \a type is not registered. + /// + /// \see Host::getProviders + /// + //////////////////////////////////////////////////////////// + const std::list* getProviders(const std::string& type) const; + + +private: + + //////////////////////////////////////////////////////////// + /// \brief Get the plugin name (without extension) from its path + /// + /// \param path Plugin path. + /// + /// \return Name of the plugin. + /// + /// \see resolvePathExtension + /// \see load(const std::string&, const std::string&) + /// \see load(const std::string&) + /// \see unload + /// + //////////////////////////////////////////////////////////// + static std::string getPluginName(const std::string& path); + + //////////////////////////////////////////////////////////// + /// \brief If the plugin path omits it's extension, this method returns + /// the path plus the OS specific dll extension. + /// Return a copy of the path otherwise. + /// + /// \param path Plugin path. + /// + /// \return Path with extension. + /// + /// \see getPluginName + /// \see load(const std::string&, const std::string&) + /// \see load(const std::string&) + /// \see unload + /// + //////////////////////////////////////////////////////////// + static std::string resolvePathExtension(const std::string& path); + + +private: + + /// Signature for the plugin's registration function + typedef bool fnRegisterPlugin(Host&); + typedef std::map LibMap; + + LibMap libraries; ///< Map containing the loaded libraries + Host host; ///< Host app proxy, holding all providers + +}; + +} // namespace pluma + +#endif // PLUMA_PLUGIN_MANAGER_HPP diff --git a/contrib/src/Pluma/Pluma.hpp b/contrib/src/Pluma/Pluma.hpp new file mode 100755 index 0000000..a9d614e --- /dev/null +++ b/contrib/src/Pluma/Pluma.hpp @@ -0,0 +1,171 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef PLUMA_PLUMA_HPP +#define PLUMA_PLUMA_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include + +//////////////////////////////////////////////////////////// +// Andy macro to convert parameter to string +//////////////////////////////////////////////////////////// +#define PLUMA_2STRING(X) #X + +//////////////////////////////////////////////////////////// +// Macro that helps host applications defining +// their provider classes +//////////////////////////////////////////////////////////// +#define PLUMA_PROVIDER_HEADER(TYPE)\ +PLUMA_PROVIDER_HEADER_BEGIN(TYPE)\ +virtual TYPE* create() const = 0;\ +PLUMA_PROVIDER_HEADER_END + +//////////////////////////////////////////////////////////// +// Macro that generate first part of the provider definition +//////////////////////////////////////////////////////////// +#define PLUMA_PROVIDER_HEADER_BEGIN(TYPE)\ +class TYPE##Provider: public pluma::Provider{\ +private:\ + friend class pluma::Pluma;\ + static const unsigned int PLUMA_INTERFACE_VERSION;\ + static const unsigned int PLUMA_INTERFACE_LOWEST_VERSION;\ + static const std::string PLUMA_PROVIDER_TYPE;\ + std::string plumaGetType() const{ return PLUMA_PROVIDER_TYPE; }\ +public:\ + unsigned int getVersion() const{ return PLUMA_INTERFACE_VERSION; } + +//////////////////////////////////////////////////////////// +// Macro that generate last part of the provider definition +//////////////////////////////////////////////////////////// +#define PLUMA_PROVIDER_HEADER_END }; + +//////////////////////////////////////////////////////////// +// Macro that generate the provider declaration +//////////////////////////////////////////////////////////// +#define PLUMA_PROVIDER_SOURCE(TYPE, Version, LowestVersion)\ +const std::string TYPE##Provider::PLUMA_PROVIDER_TYPE = PLUMA_2STRING( TYPE );\ +const unsigned int TYPE##Provider::PLUMA_INTERFACE_VERSION = Version;\ +const unsigned int TYPE##Provider::PLUMA_INTERFACE_LOWEST_VERSION = LowestVersion; + + +//////////////////////////////////////////////////////////// +// Macro that helps plugins generating their provider implementations +// PRE: SPECIALIZED_TYPE must inherit from BASE_TYPE +//////////////////////////////////////////////////////////// +#define PLUMA_INHERIT_PROVIDER(SPECIALIZED_TYPE, BASE_TYPE)\ +class SPECIALIZED_TYPE##Provider: public BASE_TYPE##Provider{\ +public:\ + BASE_TYPE * create() const{ return new SPECIALIZED_TYPE (); }\ +}; + + +namespace pluma{ + +//////////////////////////////////////////////////////////// +/// \brief Pluma plugins management +/// +//////////////////////////////////////////////////////////// +class Pluma: public PluginManager{ + +public: + //////////////////////////////////////////////////////////// + /// \brief Default Constructor + /// + //////////////////////////////////////////////////////////// + Pluma(); + + //////////////////////////////////////////////////////////// + /// \brief Tell Pluma to accept a certain type of providers + /// + /// A Pluma object is able to accept multiple types of providers. + /// When a plugin is loaded, it tries to register it's providers + /// implementations. Those are only accepted by the host + /// application if it's accepting providers of that kind. + /// + /// \tparam ProviderType type of provider. + /// + //////////////////////////////////////////////////////////// + template + void acceptProviderType(); + + //////////////////////////////////////////////////////////// + /// \brief Get the stored providers of a certain type. + /// + /// Providers are added at the end of the \a providers vector. + /// + /// \tparam ProviderType type of provider to be returned. + /// \param[out] providers Vector to fill with the existing + /// providers. + /// + //////////////////////////////////////////////////////////// + template + void getProviders(std::vector& providers); +}; + +#include + +} + + +#endif // PLUMA_PLUMA_HPP + + +//////////////////////////////////////////////////////////// +/// \class pluma::Pluma +/// +/// Pluma is the main class of Pluma library. Allows hosting +/// applications to load/unload dlls in runtime (plugins), and +/// to get providers of shared interface objects. +/// +/// Example: +/// \code +/// pluma::Pluma pluma; +/// // Tell it to accept providers of the type DeviceProvider +/// pluma.acceptProviderType(); +/// // Load some dll +/// pluma.load("plugins/standard_devices"); +/// // Get device providers into a vector +/// std::vector providers; +/// pluma.getProviders(providers); +/// // create a Device from the first provider +/// if (!providers.empty()){ +/// Device* myDevice = providers.first()->create(); +/// // do something with myDevice +/// std::cout << device->getDescription() << std::endl; +/// // (...) +/// delete myDevice; +/// } +/// \endcode +/// +/// It is also possible to add local providers, providers that +/// are defined directly on the host application. That can +/// be useful to provide and use default implementations of certain +/// interfaces, along with plugin implementations. +/// +//////////////////////////////////////////////////////////// diff --git a/contrib/src/Pluma/Pluma.inl b/contrib/src/Pluma/Pluma.inl new file mode 100755 index 0000000..c3b6ce7 --- /dev/null +++ b/contrib/src/Pluma/Pluma.inl @@ -0,0 +1,52 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////// +inline Pluma::Pluma(){ + // Nothing to do +} + + +//////////////////////////////////////////////////////////// +template +void Pluma::acceptProviderType(){ + PluginManager::registerType( + ProviderType::PLUMA_PROVIDER_TYPE, + ProviderType::PLUMA_INTERFACE_VERSION, + ProviderType::PLUMA_INTERFACE_LOWEST_VERSION + ); +} + + +//////////////////////////////////////////////////////////// +template +void Pluma::getProviders(std::vector& providers){ + const std::list* lst = PluginManager::getProviders(ProviderType::PLUMA_PROVIDER_TYPE); + if (!lst) return; + providers.reserve(providers.size() + lst->size()); + std::list::const_iterator it; + for (it = lst->begin() ; it != lst->end() ; ++it) + providers.push_back(static_cast(*it)); +} diff --git a/contrib/src/Pluma/Provider.cpp b/contrib/src/Pluma/Provider.cpp new file mode 100755 index 0000000..36d4da3 --- /dev/null +++ b/contrib/src/Pluma/Provider.cpp @@ -0,0 +1,52 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include + + +namespace pluma{ + +//////////////////////////////////////////////////////////// +Provider::~Provider(){ + // Nothing to do +} + + +//////////////////////////////////////////////////////////// +bool Provider::isCompatible(const Host& host) const{ + // check compatibility with host + const std::string& type = this->plumaGetType(); + if (!host.knows(type)) return false; + unsigned int lowest = host.getLowestVersion(type); + unsigned int current = host.getVersion(type); + unsigned int myVersion = this->getVersion(); + return lowest <= myVersion && myVersion <= current; +} + +} // namespace pluma diff --git a/contrib/src/Pluma/Provider.hpp b/contrib/src/Pluma/Provider.hpp new file mode 100755 index 0000000..ea06497 --- /dev/null +++ b/contrib/src/Pluma/Provider.hpp @@ -0,0 +1,204 @@ +//////////////////////////////////////////////////////////// +// +// Pluma - Plug-in Management Framework +// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) +// +// This software is provided 'as-is', without any express or implied warranty. +// In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef PLUMA_PROVIDER_HPP +#define PLUMA_PROVIDER_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include + + +namespace pluma{ +class Host; + +//////////////////////////////////////////////////////////// +/// \brief Interface to provide applications with objects from plugins. +/// +//////////////////////////////////////////////////////////// +class PLUMA_API Provider{ +friend class Host; + + +public: + + //////////////////////////////////////////////////////////// + /// \brief Destructor. + /// + //////////////////////////////////////////////////////////// + virtual ~Provider(); + + //////////////////////////////////////////////////////////// + /// \brief Get provider version. + /// + /// \return Version number. + /// + //////////////////////////////////////////////////////////// + virtual unsigned int getVersion() const = 0; + + //////////////////////////////////////////////////////////// + /// \brief Check compatibility with host. + /// + /// The same provider may be compiled with different versions + /// on host side and on plugins side. This function checks if + /// a plugin provider is compatible with the current version of + /// the same provider type on the host side. + /// + /// \param host Host, proxy of host application. + /// + /// \return True if it's compatible with \a host. + /// + //////////////////////////////////////////////////////////// + bool isCompatible(const Host& host) const; + + +private: + + //////////////////////////////////////////////////////////// + /// \brief Get provider type. + /// + /// Each provider defined on the host application is identified by + /// a unique type. Those types are automatically managed internally by + /// pluma. + /// + /// \return Provider type id. + /// + //////////////////////////////////////////////////////////// + virtual std::string plumaGetType() const = 0; + +}; + +} // namespace pluma + + +#endif // PLUMA_PROVIDER_HPP + + +//////////////////////////////////////////////////////////// +/// \class pluma::Provider +/// The plugin specific implementations are unknown at the host side, +/// only their shared interfaces are known. Then, host app needs a generic +/// way of create interface objects. That's what provider classes are for. +/// It is the factory design pattern +/// (http://www.oodesign.com/factory-pattern.html) +/// +/// Shared interfaces define their provider types (by inheriting from +/// pluma::Provider). Hosts then use those tipes to get objects from the +/// plugins. +/// Plugins derive the shared interface providers so that they can provide +/// host with specific implementations of the shared interface. +/// Those specific providers are given to the host through a connect function. +/// +/// +/// Example: A host app uses objects of type Device. A certain plugin +/// defines a Keyboard, witch is a Device. +/// The Host will use DeviceProviders to create objects of type Device. +/// The plugin will provide host specifically with a KeyboardProvider. +/// Other plugins may provide host with other derived DeviceProvider types. +/// +/// Device hpp (shared): +/// \code +/// #include +/// class Device{ +/// public: +/// virtual std::string getDescription() const = 0; +/// }; +/// // create DevicedProvider class +/// PLUMA_PROVIDER_HEADER(Device); +/// \endcode +/// +/// Device cpp (shared): +/// \code +/// #include "Device.hpp" +/// generate DevicedProvider with version 6, and compatible with at least v.3 +/// PLUMA_PROVIDER_SOURCE(Device, 6, 3); +/// \endcode +/// +/// +///
+/// Keyboard code on the plugin side: +/// \code +/// #include +/// #include "Device.hpp" +/// +/// class Keyboard: public Device{ +/// public: +/// std::string getDescription() const{ +/// return "keyboard"; +/// } +/// }; +/// +/// // create KeyboardProvider, it implements DeviceProvider +/// PLUMA_INHERIT_PROVIDER(Keyboard, Device); +/// \endcode +/// +/// plugin connector: +/// \code +/// #include +/// #include "Keyboard.hpp" +/// +/// PLUMA_CONNECTOR +/// bool connect(pluma::Host& host){ +/// // add a keyboard provider to host +/// host.add( new KeyboardProvider() ); +/// return true; +/// } +/// \endcode +/// +/// +/// Host application code: +/// \code +/// #include +/// +/// #include "Device.hpp" +/// #include +/// #include +/// +/// int main(){ +/// +/// pluma::Pluma plugins; +/// // Tell plugins manager to accept providers of the type DeviceProvider +/// plugins.acceptProviderType(); +/// // Load library "standard_devices" from folder "plugins" +/// plugins.load("plugins", "standard_devices"); +/// +/// // Get device providers into a vector +/// std::vector providers; +/// plugins.getProviders(providers); +/// +/// // create a Device from the first provider +/// if (!providers.empty()){ +/// Device* myDevice = providers.first()->create(); +/// // do something with myDevice +/// std::cout << device->getDescription() << std::endl; +/// // and delete it in the end +/// delete myDevice; +/// } +/// return 0; +/// } +/// \endcode +/// +//////////////////////////////////////////////////////////// diff --git a/contrib/src/Pluma/uce-dirent.h b/contrib/src/Pluma/uce-dirent.h new file mode 100755 index 0000000..ecf78eb --- /dev/null +++ b/contrib/src/Pluma/uce-dirent.h @@ -0,0 +1,679 @@ +/* + * uce-dirent.h - operating system independent dirent implementation + * + * Copyright (C) 1998-2002 Toni Ronkko + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * ``Software''), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * + * May 28 1998, Toni Ronkko + * + * $Id: uce-dirent.h,v 1.7 2002/05/13 10:48:35 tr Exp $ + * + * $Log: uce-dirent.h,v $ + * Revision 1.7 2002/05/13 10:48:35 tr + * embedded some source code directly to the header so that no source + * modules need to be included in the MS Visual C project using the + * interface, removed all the dependencies to other headers of the `uce' + * library so that the header can be made public + * + * Revision 1.6 2002/04/12 16:22:04 tr + * Unified Compiling Environment (UCE) replaced `std' library + * + * Revision 1.5 2001/07/20 16:33:40 tr + * moved to `std' library and re-named defines accordingly + * + * Revision 1.4 2001/07/10 16:47:18 tronkko + * revised comments + * + * Revision 1.3 2001/01/11 13:16:43 tr + * using ``uce-machine.h'' for finding out defines such as `FREEBSD' + * + * Revision 1.2 2000/10/08 16:00:41 tr + * copy of FreeBSD man page + * + * Revision 1.1 2000/07/10 05:53:16 tr + * Initial revision + * + * Revision 1.2 1998/07/19 18:29:14 tr + * Added error reporting capabilities and some asserts. + * + * Revision 1.1 1998/07/04 16:27:51 tr + * Initial revision + * + * + * MSVC 1.0 scans automatic dependencies incorrectly when your project + * contains this very header. The problem is that MSVC cannot handle + * include directives inside #if..#endif block those are never entered. + * Since this header ought to compile in many different operating systems, + * there had to be several conditional blocks that are compiled only in + * operating systems for what they were designed for. MSVC 1.0 cannot + * handle inclusion of sys/dir.h in a part that is compiled only in Apollo + * operating system. To fix the problem you need to insert DIR.H into + * SYSINCL.DAT located in MSVC\BIN directory and restart visual C++. + * Consult manuals for more informaton about the problem. + * + * Since many UNIX systems have dirent.h we assume to have one also. + * However, if your UNIX system does not have dirent.h you can download one + * for example at: http://ftp.uni-mannheim.de/ftp/GNU/dirent/dirent.tar.gz. + * You can also see if you have one of dirent.h, direct.h, dir.h, ndir.h, + * sys/dir.h and sys/ndir.h somewhere. Try defining HAVE_DIRENT_H, + * HAVE_DIRECT_H, HAVE_DIR_H, HAVE_NDIR_H, HAVE_SYS_DIR_H and + * HAVE_SYS_NDIR_H according to the files found. + */ +#ifndef DIRENT_H +#define DIRENT_H +#define DIRENT_H_INCLUDED + +/* find out platform */ +#if defined(MSDOS) /* MS-DOS */ +#elif defined(__MSDOS__) /* Turbo C/Borland */ +# define MSDOS +#elif defined(__DOS__) /* Watcom */ +# define MSDOS +#endif + +#if defined(WIN32) /* MS-Windows */ +#elif defined(__NT__) /* Watcom */ +# define WIN32 +#elif defined(_WIN32) /* Microsoft */ +# define WIN32 +#elif defined(__WIN32__) /* Borland */ +# define WIN32 +#endif + +/* + * See what kind of dirent interface we have unless autoconf has already + * determinated that. + */ +#if !defined(HAVE_DIRENT_H) && !defined(HAVE_DIRECT_H) && !defined(HAVE_SYS_DIR_H) && !defined(HAVE_NDIR_H) && !defined(HAVE_SYS_NDIR_H) && !defined(HAVE_DIR_H) +# if defined(_MSC_VER) /* Microsoft C/C++ */ + /* no dirent.h */ +# elif defined(__BORLANDC__) /* Borland C/C++ */ +# define HAVE_DIRENT_H +# define VOID_CLOSEDIR +# elif defined(__TURBOC__) /* Borland Turbo C */ + /* no dirent.h */ +# elif defined(__WATCOMC__) /* Watcom C/C++ */ +# define HAVE_DIRECT_H +# elif defined(__apollo) /* Apollo */ +# define HAVE_SYS_DIR_H +# elif defined(__hpux) /* HP-UX */ +# define HAVE_DIRENT_H +# elif defined(__alpha) || defined(__alpha__) /* Alpha OSF1 */ +# error "not implemented" +# elif defined(__sgi) /* Silicon Graphics */ +# define HAVE_DIRENT_H +# elif defined(sun) || defined(_sun) /* Sun Solaris */ +# define HAVE_DIRENT_H +# elif defined(__FreeBSD__) /* FreeBSD */ +# define HAVE_DIRENT_H +# elif defined(__linux__) /* Linux */ +# define HAVE_DIRENT_H +# elif defined(__GNUC__) /* GNU C/C++ */ +# define HAVE_DIRENT_H +# else +# error "not implemented" +# endif +#endif + +/* include proper interface headers */ +#if defined(HAVE_DIRENT_H) +# include +# ifdef FREEBSD +# define NAMLEN(dp) ((int)((dp)->d_namlen)) +# else +# define NAMLEN(dp) ((int)(strlen((dp)->d_name))) +# endif + +#elif defined(HAVE_NDIR_H) +# include +# define NAMLEN(dp) ((int)((dp)->d_namlen)) + +#elif defined(HAVE_SYS_NDIR_H) +# include +# define NAMLEN(dp) ((int)((dp)->d_namlen)) + +#elif defined(HAVE_DIRECT_H) +# include +# define NAMLEN(dp) ((int)((dp)->d_namlen)) + +#elif defined(HAVE_DIR_H) +# include +# define NAMLEN(dp) ((int)((dp)->d_namlen)) + +#elif defined(HAVE_SYS_DIR_H) +# include +# include +# ifndef dirent +# define dirent direct +# endif +# define NAMLEN(dp) ((int)((dp)->d_namlen)) + +#elif defined(MSDOS) || defined(WIN32) + + /* figure out type of underlaying directory interface to be used */ +# if defined(WIN32) +# define DIRENT_WIN32_INTERFACE +# elif defined(MSDOS) +# define DIRENT_MSDOS_INTERFACE +# else +# error "missing native dirent interface" +# endif + + /*** WIN32 specifics ***/ +# if defined(DIRENT_WIN32_INTERFACE) +# include +# if !defined(DIRENT_MAXNAMLEN) +# define DIRENT_MAXNAMLEN (MAX_PATH) +# endif + + + /*** MS-DOS specifics ***/ +# elif defined(DIRENT_MSDOS_INTERFACE) +# include + + /* Borland defines file length macros in dir.h */ +# if defined(__BORLANDC__) +# include +# if !defined(DIRENT_MAXNAMLEN) +# define DIRENT_MAXNAMLEN ((MAXFILE)+(MAXEXT)) +# endif +# if !defined(_find_t) +# define _find_t find_t +# endif + + /* Turbo C defines ffblk structure in dir.h */ +# elif defined(__TURBOC__) +# include +# if !defined(DIRENT_MAXNAMLEN) +# define DIRENT_MAXNAMLEN ((MAXFILE)+(MAXEXT)) +# endif +# define DIRENT_USE_FFBLK + + /* MSVC */ +# elif defined(_MSC_VER) +# if !defined(DIRENT_MAXNAMLEN) +# define DIRENT_MAXNAMLEN (12) +# endif + + /* Watcom */ +# elif defined(__WATCOMC__) +# if !defined(DIRENT_MAXNAMLEN) +# if defined(__OS2__) || defined(__NT__) +# define DIRENT_MAXNAMLEN (255) +# else +# define DIRENT_MAXNAMLEN (12) +# endif +# endif + +# endif +# endif + + /*** generic MS-DOS and MS-Windows stuff ***/ +# if !defined(NAME_MAX) && defined(DIRENT_MAXNAMLEN) +# define NAME_MAX DIRENT_MAXNAMLEN +# endif +# if NAME_MAX < DIRENT_MAXNAMLEN +# error "assertion failed: NAME_MAX >= DIRENT_MAXNAMLEN" +# endif + + + /* + * Substitute for real dirent structure. Note that `d_name' field is a + * true character array although we have it copied in the implementation + * dependent data. We could save some memory if we had declared `d_name' + * as a pointer refering the name within implementation dependent data. + * We have not done that since some code may rely on sizeof(d_name) to be + * something other than four. Besides, directory entries are typically so + * small that it takes virtually no time to copy them from place to place. + */ + typedef struct dirent { + char d_name[NAME_MAX + 1]; + + /*** Operating system specific part ***/ +# if defined(DIRENT_WIN32_INTERFACE) /*WIN32*/ + WIN32_FIND_DATA data; +# elif defined(DIRENT_MSDOS_INTERFACE) /*MSDOS*/ +# if defined(DIRENT_USE_FFBLK) + struct ffblk data; +# else + struct _find_t data; +# endif +# endif + } dirent; + + /* DIR substitute structure containing directory name. The name is + * essential for the operation of ``rewinndir'' function. */ + typedef struct DIR { + char *dirname; /* directory being scanned */ + dirent current; /* current entry */ + int dirent_filled; /* is current un-processed? */ + + /*** Operating system specific part ***/ +# if defined(DIRENT_WIN32_INTERFACE) + HANDLE search_handle; +# elif defined(DIRENT_MSDOS_INTERFACE) +# endif + } DIR; + +# ifdef __cplusplus +extern "C" { +# endif + +/* supply prototypes for dirent functions */ +static DIR *opendir (const char *dirname); +static struct dirent *readdir (DIR *dirp); +static int closedir (DIR *dirp); +static void rewinddir (DIR *dirp); + +/* + * Implement dirent interface as static functions so that the user does not + * need to change his project in any way to use dirent function. With this + * it is sufficient to include this very header from source modules using + * dirent functions and the functions will be pulled in automatically. + */ +#include +#include +#include +#include +#include + +/* use ffblk instead of _find_t if requested */ +#if defined(DIRENT_USE_FFBLK) +# define _A_ARCH (FA_ARCH) +# define _A_HIDDEN (FA_HIDDEN) +# define _A_NORMAL (0) +# define _A_RDONLY (FA_RDONLY) +# define _A_SUBDIR (FA_DIREC) +# define _A_SYSTEM (FA_SYSTEM) +# define _A_VOLID (FA_LABEL) +# define _dos_findnext(dest) findnext(dest) +# define _dos_findfirst(name,flags,dest) findfirst(name,dest,flags) +#endif + +static int _initdir (DIR *p); +static const char *_getdirname (const struct dirent *dp); +static void _setdirname (struct DIR *dirp); + +/* + * + * open directory stream for reading + * DIR *opendir (const char *dirname); + * + * Open named directory stream for read and return pointer to the + * internal working area that is used for retrieving individual directory + * entries. The internal working area has no fields of your interest. + * + * Returns a pointer to the internal working area or NULL in case the + * directory stream could not be opened. Global `errno' variable will set + * in case of error as follows: + * + * + * [EACESS |Permission denied. + * [EMFILE |Too many open files used by the process. + * [ENFILE |Too many open files in system. + * [ENOENT |Directory does not exist. + * [ENOMEM |Insufficient memory. + * [ENOTDIR |dirname does not refer to directory. This value is not + * reliable on MS-DOS and MS-Windows platforms. Many + * implementations return ENOENT even when the name refers to a + * file.] + *
+ *
+ */ +static DIR * +opendir( + const char *dirname) +{ + DIR *dirp; + assert (dirname != NULL); + + dirp = (DIR*)malloc (sizeof (struct DIR)); + if (dirp != NULL) { + char *p; + + /* allocate room for directory name */ + dirp->dirname = (char*) malloc (strlen (dirname) + 1 + strlen ("\\*.*")); + if (dirp->dirname == NULL) { + /* failed to duplicate directory name. errno set by malloc() */ + free (dirp); + return NULL; + } + /* Copy directory name while appending directory separator and "*.*". + * Directory separator is not appended if the name already ends with + * drive or directory separator. Directory separator is assumed to be + * '/' or '\' and drive separator is assumed to be ':'. */ + strcpy (dirp->dirname, dirname); + p = strchr (dirp->dirname, '\0'); + if (dirp->dirname < p && + *(p - 1) != '\\' && *(p - 1) != '/' && *(p - 1) != ':') + { + strcpy (p++, "/"); + } +# ifdef DIRENT_WIN32_INTERFACE + strcpy (p, "*"); /*scan files with and without extension in win32*/ +# else + strcpy (p, "*.*"); /*scan files with and without extension in DOS*/ +# endif + + /* open stream */ + if (_initdir (dirp) == 0) { + /* initialization failed */ + free (dirp->dirname); + free (dirp); + return NULL; + } + } + return dirp; +} + + +/* + * + * read a directory entry + * struct dirent *readdir (DIR *dirp); + * + * Read individual directory entry and return pointer to a structure + * containing the name of the entry. Individual directory entries returned + * include normal files, sub-directories, pseudo-directories "." and ".." + * and also volume labels, hidden files and system files in MS-DOS and + * MS-Windows. You might want to use stat(2) function to determinate which + * one are you dealing with. Many dirent implementations already contain + * equivalent information in dirent structure but you cannot depend on + * this. + * + * The dirent structure contains several system dependent fields that + * generally have no interest to you. The only interesting one is char + * d_name[] that is also portable across different systems. The d_name + * field contains the name of the directory entry without leading path. + * While d_name is portable across different systems the actual storage + * capacity of d_name varies from system to system and there is no portable + * way to find out it at compile time as different systems define the + * capacity of d_name with different macros and some systems do not define + * capacity at all (besides actual declaration of the field). If you really + * need to find out storage capacity of d_name then you might want to try + * NAME_MAX macro. The NAME_MAX is defined in POSIX standard althought + * there are many MS-DOS and MS-Windows implementations those do not define + * it. There are also systems that declare d_name as "char d_name[1]" and + * then allocate suitable amount of memory at run-time. Thanks to Alain + * Decamps (Alain.Decamps@advalvas.be) for pointing it out to me. + * + * This all leads to the fact that it is difficult to allocate space + * for the directory names when the very same program is being compiled on + * number of operating systems. Therefore I suggest that you always + * allocate space for directory names dynamically. + * + * + * Returns a pointer to a structure containing name of the directory entry + * in `d_name' field or NULL if there was an error. In case of an error the + * global `errno' variable will set as follows: + * + * + * [EBADF |dir parameter refers to an invalid directory stream. This value + * is not set reliably on all implementations.] + *
+ *
+ */ +static struct dirent * +readdir (DIR *dirp) +{ + assert (dirp != NULL); + if (dirp == NULL) { + errno = EBADF; + return NULL; + } + +#if defined(DIRENT_WIN32_INTERFACE) + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* directory stream was opened/rewound incorrectly or it ended normally */ + errno = EBADF; + return NULL; + } +#endif + + if (dirp->dirent_filled != 0) { + /* + * Directory entry has already been retrieved and there is no need to + * retrieve a new one. Directory entry will be retrieved in advance + * when the user calls readdir function for the first time. This is so + * because real dirent has separate functions for opening and reading + * the stream whereas Win32 and DOS dirents open the stream + * automatically when we retrieve the first file. Therefore, we have to + * save the first file when opening the stream and later we have to + * return the saved entry when the user tries to read the first entry. + */ + dirp->dirent_filled = 0; + } else { + /* fill in entry and return that */ +#if defined(DIRENT_WIN32_INTERFACE) + if (FindNextFile (dirp->search_handle, &dirp->current.data) == FALSE) { + /* Last file has been processed or an error occured */ + FindClose (dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + errno = ENOENT; + return NULL; + } + +# elif defined(DIRENT_MSDOS_INTERFACE) + if (_dos_findnext (&dirp->current.data) != 0) { + /* _dos_findnext and findnext will set errno to ENOENT when no + * more entries could be retrieved. */ + return NULL; + } +# endif + + _setdirname (dirp); + assert (dirp->dirent_filled == 0); + } + return &dirp->current; +} + + +/* + * + * close directory stream. + * int closedir (DIR *dirp); + * + * Close directory stream opened by the `opendir' function. Close of + * directory stream invalidates the DIR structure as well as previously read + * dirent entry. + * + * The function typically returns 0 on success and -1 on failure but + * the function may be declared to return void on same systems. At least + * Borland C/C++ and some UNIX implementations use void as a return type. + * The dirent wrapper tries to define VOID_CLOSEDIR whenever closedir is + * known to return nothing. The very same definition is made by the GNU + * autoconf if you happen to use it. + * + * The global `errno' variable will set to EBADF in case of error. + * + */ +static int +closedir (DIR *dirp) +{ + int retcode = 0; + + /* make sure that dirp points to legal structure */ + assert (dirp != NULL); + if (dirp == NULL) { + errno = EBADF; + return -1; + } + + /* free directory name and search handles */ + if (dirp->dirname != NULL) free (dirp->dirname); + +#if defined(DIRENT_WIN32_INTERFACE) + if (dirp->search_handle != INVALID_HANDLE_VALUE) { + if (FindClose (dirp->search_handle) == FALSE) { + /* Unknown error */ + retcode = -1; + errno = EBADF; + } + } +#endif + + /* clear dirp structure to make sure that it cannot be used anymore*/ + memset (dirp, 0, sizeof (*dirp)); +# if defined(DIRENT_WIN32_INTERFACE) + dirp->search_handle = INVALID_HANDLE_VALUE; +# endif + + free (dirp); + return retcode; +} + + +/* + * + * rewind directory stream to the beginning + * void rewinddir (DIR *dirp); + * + * Rewind directory stream to the beginning so that the next call of + * readdir() returns the very first directory entry again. However, note + * that next call of readdir() may not return the same directory entry as it + * did in first time. The directory stream may have been affected by newly + * created files. + * + * Almost every dirent implementation ensure that rewinddir will update + * the directory stream to reflect any changes made to the directory entries + * since the previous ``opendir'' or ``rewinddir'' call. Keep an eye on + * this if your program depends on the feature. I know at least one dirent + * implementation where you are required to close and re-open the stream to + * see the changes. + * + * Returns nothing. If something went wrong while rewinding, you will + * notice it later when you try to retrieve the first directory entry. + */ +static void +rewinddir (DIR *dirp) +{ + /* make sure that dirp is legal */ + assert (dirp != NULL); + if (dirp == NULL) { + errno = EBADF; + return; + } + assert (dirp->dirname != NULL); + + /* close previous stream */ +#if defined(DIRENT_WIN32_INTERFACE) + if (dirp->search_handle != INVALID_HANDLE_VALUE) { + if (FindClose (dirp->search_handle) == FALSE) { + /* Unknown error */ + errno = EBADF; + } + } +#endif + + /* re-open previous stream */ + if (_initdir (dirp) == 0) { + /* initialization failed but we cannot deal with error. User will notice + * error later when she tries to retrieve first directory enty. */ + /*EMPTY*/; + } +} + + +/* + * Open native directory stream object and retrieve first file. + * Be sure to close previous stream before opening new one. + */ +static int +_initdir (DIR *dirp) +{ + assert (dirp != NULL); + assert (dirp->dirname != NULL); + dirp->dirent_filled = 0; + +# if defined(DIRENT_WIN32_INTERFACE) + /* Open stream and retrieve first file */ + dirp->search_handle = FindFirstFile (dirp->dirname, &dirp->current.data); + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* something went wrong but we don't know what. GetLastError() could + * give us more information about the error, but then we should map + * the error code into errno. */ + errno = ENOENT; + return 0; + } + +# elif defined(DIRENT_MSDOS_INTERFACE) + if (_dos_findfirst (dirp->dirname, + _A_SUBDIR | _A_RDONLY | _A_ARCH | _A_SYSTEM | _A_HIDDEN, + &dirp->current.data) != 0) + { + /* _dos_findfirst and findfirst will set errno to ENOENT when no + * more entries could be retrieved. */ + return 0; + } +# endif + + /* initialize DIR and it's first entry */ + _setdirname (dirp); + dirp->dirent_filled = 1; + return 1; +} + + +/* + * Return implementation dependent name of the current directory entry. + */ +static const char * +_getdirname (const struct dirent *dp) +{ +#if defined(DIRENT_WIN32_INTERFACE) + return dp->data.cFileName; + +#elif defined(DIRENT_USE_FFBLK) + return dp->data.ff_name; + +#else + return dp->data.name; +#endif +} + + +/* + * Copy name of implementation dependent directory entry to the d_name field. + */ +static void +_setdirname (struct DIR *dirp) { + /* make sure that d_name is long enough */ + assert (strlen (_getdirname (&dirp->current)) <= NAME_MAX); + + strncpy (dirp->current.d_name, + _getdirname (&dirp->current), + NAME_MAX); + dirp->current.d_name[NAME_MAX] = '\0'; /*char d_name[NAME_MAX+1]*/ +} + +# ifdef __cplusplus +} +# endif +# define NAMLEN(dp) ((int)(strlen((dp)->d_name))) + +#else +# error "missing dirent interface" +#endif + + +#endif /*DIRENT_H*/ + diff --git a/contrib/src/boost/algorithm/string.hpp b/contrib/src/boost/algorithm/string.hpp new file mode 100644 index 0000000..0771517 --- /dev/null +++ b/contrib/src/boost/algorithm/string.hpp @@ -0,0 +1,31 @@ +// Boost string_algo library string_algo.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2004. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_ALGO_HPP +#define BOOST_STRING_ALGO_HPP + +/*! \file + Cumulative include for string_algo library +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#endif // BOOST_STRING_ALGO_HPP diff --git a/contrib/src/boost/algorithm/string/case_conv.hpp b/contrib/src/boost/algorithm/string/case_conv.hpp new file mode 100644 index 0000000..683340b --- /dev/null +++ b/contrib/src/boost/algorithm/string/case_conv.hpp @@ -0,0 +1,176 @@ +// Boost string_algo library case_conv.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CASE_CONV_HPP +#define BOOST_STRING_CASE_CONV_HPP + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +/*! \file + Defines sequence case-conversion algorithms. + Algorithms convert each element in the input sequence to the + desired case using provided locales. +*/ + +namespace boost { + namespace algorithm { + +// to_lower -----------------------------------------------// + + //! Convert to lower case + /*! + Each element of the input sequence is converted to lower + case. The result is a copy of the input converted to lower case. + It is returned as a sequence or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input range + \param Loc A locale used for conversion + \return + An output iterator pointing just after the last inserted character or + a copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + + */ + template + inline OutputIteratorT + to_lower_copy( + OutputIteratorT Output, + const RangeT& Input, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::detail::transform_range_copy( + Output, + ::boost::as_literal(Input), + ::boost::algorithm::detail::to_lowerF< + typename range_value::type >(Loc)); + } + + //! Convert to lower case + /*! + \overload + */ + template + inline SequenceT to_lower_copy( + const SequenceT& Input, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::detail::transform_range_copy( + Input, + ::boost::algorithm::detail::to_lowerF< + typename range_value::type >(Loc)); + } + + //! Convert to lower case + /*! + Each element of the input sequence is converted to lower + case. The input sequence is modified in-place. + + \param Input A range + \param Loc a locale used for conversion + */ + template + inline void to_lower( + WritableRangeT& Input, + const std::locale& Loc=std::locale()) + { + ::boost::algorithm::detail::transform_range( + ::boost::as_literal(Input), + ::boost::algorithm::detail::to_lowerF< + typename range_value::type >(Loc)); + } + +// to_upper -----------------------------------------------// + + //! Convert to upper case + /*! + Each element of the input sequence is converted to upper + case. The result is a copy of the input converted to upper case. + It is returned as a sequence or copied to the output iterator + + \param Output An output iterator to which the result will be copied + \param Input An input range + \param Loc A locale used for conversion + \return + An output iterator pointing just after the last inserted character or + a copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template + inline OutputIteratorT + to_upper_copy( + OutputIteratorT Output, + const RangeT& Input, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::detail::transform_range_copy( + Output, + ::boost::as_literal(Input), + ::boost::algorithm::detail::to_upperF< + typename range_value::type >(Loc)); + } + + //! Convert to upper case + /*! + \overload + */ + template + inline SequenceT to_upper_copy( + const SequenceT& Input, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::detail::transform_range_copy( + Input, + ::boost::algorithm::detail::to_upperF< + typename range_value::type >(Loc)); + } + + //! Convert to upper case + /*! + Each element of the input sequence is converted to upper + case. The input sequence is modified in-place. + + \param Input An input range + \param Loc a locale used for conversion + */ + template + inline void to_upper( + WritableRangeT& Input, + const std::locale& Loc=std::locale()) + { + ::boost::algorithm::detail::transform_range( + ::boost::as_literal(Input), + ::boost::algorithm::detail::to_upperF< + typename range_value::type >(Loc)); + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::to_lower; + using algorithm::to_lower_copy; + using algorithm::to_upper; + using algorithm::to_upper_copy; + +} // namespace boost + +#endif // BOOST_STRING_CASE_CONV_HPP diff --git a/contrib/src/boost/algorithm/string/classification.hpp b/contrib/src/boost/algorithm/string/classification.hpp new file mode 100644 index 0000000..ca43602 --- /dev/null +++ b/contrib/src/boost/algorithm/string/classification.hpp @@ -0,0 +1,312 @@ +// Boost string_algo library classification.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CLASSIFICATION_HPP +#define BOOST_STRING_CLASSIFICATION_HPP + +#include +#include +#include +#include +#include +#include + + +/*! \file + Classification predicates are included in the library to give + some more convenience when using algorithms like \c trim() and \c all(). + They wrap functionality of STL classification functions ( e.g. \c std::isspace() ) + into generic functors. +*/ + +namespace boost { + namespace algorithm { + +// classification functor generator -------------------------------------// + + //! is_classified predicate + /*! + Construct the \c is_classified predicate. This predicate holds if the input is + of specified \c std::ctype category. + + \param Type A \c std::ctype category + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_classified(std::ctype_base::mask Type, const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(Type, Loc); + } + + //! is_space predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::space category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_space(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::space, Loc); + } + + //! is_alnum predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::alnum category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_alnum(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::alnum, Loc); + } + + //! is_alpha predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::alpha category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_alpha(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::alpha, Loc); + } + + //! is_cntrl predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::cntrl category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_cntrl(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::cntrl, Loc); + } + + //! is_digit predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::digit category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_digit(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::digit, Loc); + } + + //! is_graph predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::graph category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_graph(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::graph, Loc); + } + + //! is_lower predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::lower category. + + \param Loc A locale used for classification + \return An instance of \c is_classified predicate + */ + inline detail::is_classifiedF + is_lower(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::lower, Loc); + } + + //! is_print predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::print category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_print(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::print, Loc); + } + + //! is_punct predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::punct category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_punct(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::punct, Loc); + } + + //! is_upper predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::upper category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_upper(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::upper, Loc); + } + + //! is_xdigit predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::xdigit category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_xdigit(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::xdigit, Loc); + } + + //! is_any_of predicate + /*! + Construct the \c is_any_of predicate. The predicate holds if the input + is included in the specified set of characters. + + \param Set A set of characters to be recognized + \return An instance of the \c is_any_of predicate + */ + template + inline detail::is_any_ofF< + BOOST_STRING_TYPENAME range_value::type> + is_any_of( const RangeT& Set ) + { + iterator_range::type> lit_set(boost::as_literal(Set)); + return detail::is_any_ofF::type>(lit_set); + } + + //! is_from_range predicate + /*! + Construct the \c is_from_range predicate. The predicate holds if the input + is included in the specified range. (i.e. From <= Ch <= To ) + + \param From The start of the range + \param To The end of the range + \return An instance of the \c is_from_range predicate + */ + template + inline detail::is_from_rangeF is_from_range(CharT From, CharT To) + { + return detail::is_from_rangeF(From,To); + } + + // predicate combinators ---------------------------------------------------// + + //! predicate 'and' composition predicate + /*! + Construct the \c class_and predicate. This predicate can be used + to logically combine two classification predicates. \c class_and holds, + if both predicates return true. + + \param Pred1 The first predicate + \param Pred2 The second predicate + \return An instance of the \c class_and predicate + */ + template + inline detail::pred_andF + operator&&( + const predicate_facade& Pred1, + const predicate_facade& Pred2 ) + { + // Doing the static_cast with the pointer instead of the reference + // is a workaround for some compilers which have problems with + // static_cast's of template references, i.e. CW8. /grafik/ + return detail::pred_andF( + *static_cast(&Pred1), + *static_cast(&Pred2) ); + } + + //! predicate 'or' composition predicate + /*! + Construct the \c class_or predicate. This predicate can be used + to logically combine two classification predicates. \c class_or holds, + if one of the predicates return true. + + \param Pred1 The first predicate + \param Pred2 The second predicate + \return An instance of the \c class_or predicate + */ + template + inline detail::pred_orF + operator||( + const predicate_facade& Pred1, + const predicate_facade& Pred2 ) + { + // Doing the static_cast with the pointer instead of the reference + // is a workaround for some compilers which have problems with + // static_cast's of template references, i.e. CW8. /grafik/ + return detail::pred_orF( + *static_cast(&Pred1), + *static_cast(&Pred2)); + } + + //! predicate negation operator + /*! + Construct the \c class_not predicate. This predicate represents a negation. + \c class_or holds if of the predicates return false. + + \param Pred The predicate to be negated + \return An instance of the \c class_not predicate + */ + template + inline detail::pred_notF + operator!( const predicate_facade& Pred ) + { + // Doing the static_cast with the pointer instead of the reference + // is a workaround for some compilers which have problems with + // static_cast's of template references, i.e. CW8. /grafik/ + return detail::pred_notF(*static_cast(&Pred)); + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::is_classified; + using algorithm::is_space; + using algorithm::is_alnum; + using algorithm::is_alpha; + using algorithm::is_cntrl; + using algorithm::is_digit; + using algorithm::is_graph; + using algorithm::is_lower; + using algorithm::is_upper; + using algorithm::is_print; + using algorithm::is_punct; + using algorithm::is_xdigit; + using algorithm::is_any_of; + using algorithm::is_from_range; + +} // namespace boost + +#endif // BOOST_STRING_PREDICATE_HPP diff --git a/contrib/src/boost/algorithm/string/compare.hpp b/contrib/src/boost/algorithm/string/compare.hpp new file mode 100644 index 0000000..734303a --- /dev/null +++ b/contrib/src/boost/algorithm/string/compare.hpp @@ -0,0 +1,199 @@ +// Boost string_algo library compare.hpp header file -------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_COMPARE_HPP +#define BOOST_STRING_COMPARE_HPP + +#include +#include + +/*! \file + Defines element comparison predicates. Many algorithms in this library can + take an additional argument with a predicate used to compare elements. + This makes it possible, for instance, to have case insensitive versions + of the algorithms. +*/ + +namespace boost { + namespace algorithm { + + // is_equal functor -----------------------------------------------// + + //! is_equal functor + /*! + Standard STL equal_to only handle comparison between arguments + of the same type. This is a less restrictive version which wraps operator ==. + */ + struct is_equal + { + //! Function operator + /*! + Compare two operands for equality + */ + template< typename T1, typename T2 > + bool operator()( const T1& Arg1, const T2& Arg2 ) const + { + return Arg1==Arg2; + } + }; + + //! case insensitive version of is_equal + /*! + Case insensitive comparison predicate. Comparison is done using + specified locales. + */ + struct is_iequal + { + //! Constructor + /*! + \param Loc locales used for comparison + */ + is_iequal( const std::locale& Loc=std::locale() ) : + m_Loc( Loc ) {} + + //! Function operator + /*! + Compare two operands. Case is ignored. + */ + template< typename T1, typename T2 > + bool operator()( const T1& Arg1, const T2& Arg2 ) const + { + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + return std::toupper(Arg1)==std::toupper(Arg2); + #else + return std::toupper(Arg1,m_Loc)==std::toupper(Arg2,m_Loc); + #endif + } + + private: + std::locale m_Loc; + }; + + // is_less functor -----------------------------------------------// + + //! is_less functor + /*! + Convenient version of standard std::less. Operation is templated, therefore it is + not required to specify the exact types upon the construction + */ + struct is_less + { + //! Functor operation + /*! + Compare two operands using > operator + */ + template< typename T1, typename T2 > + bool operator()( const T1& Arg1, const T2& Arg2 ) const + { + return Arg1 + bool operator()( const T1& Arg1, const T2& Arg2 ) const + { + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + return std::toupper(Arg1)(Arg1,m_Loc)(Arg2,m_Loc); + #endif + } + + private: + std::locale m_Loc; + }; + + // is_not_greater functor -----------------------------------------------// + + //! is_not_greater functor + /*! + Convenient version of standard std::not_greater_to. Operation is templated, therefore it is + not required to specify the exact types upon the construction + */ + struct is_not_greater + { + //! Functor operation + /*! + Compare two operands using > operator + */ + template< typename T1, typename T2 > + bool operator()( const T1& Arg1, const T2& Arg2 ) const + { + return Arg1<=Arg2; + } + }; + + + //! case insensitive version of is_not_greater + /*! + Case insensitive comparison predicate. Comparison is done using + specified locales. + */ + struct is_not_igreater + { + //! Constructor + /*! + \param Loc locales used for comparison + */ + is_not_igreater( const std::locale& Loc=std::locale() ) : + m_Loc( Loc ) {} + + //! Function operator + /*! + Compare two operands. Case is ignored. + */ + template< typename T1, typename T2 > + bool operator()( const T1& Arg1, const T2& Arg2 ) const + { + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + return std::toupper(Arg1)<=std::toupper(Arg2); + #else + return std::toupper(Arg1,m_Loc)<=std::toupper(Arg2,m_Loc); + #endif + } + + private: + std::locale m_Loc; + }; + + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::is_equal; + using algorithm::is_iequal; + using algorithm::is_less; + using algorithm::is_iless; + using algorithm::is_not_greater; + using algorithm::is_not_igreater; + +} // namespace boost + + +#endif // BOOST_STRING_COMPARE_HPP diff --git a/contrib/src/boost/algorithm/string/concept.hpp b/contrib/src/boost/algorithm/string/concept.hpp new file mode 100644 index 0000000..17e8349 --- /dev/null +++ b/contrib/src/boost/algorithm/string/concept.hpp @@ -0,0 +1,83 @@ +// Boost string_algo library concept.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CONCEPT_HPP +#define BOOST_STRING_CONCEPT_HPP + +#include +#include +#include +#include + +/*! \file + Defines concepts used in string_algo library +*/ + +namespace boost { + namespace algorithm { + + //! Finder concept + /*! + Defines the Finder concept. Finder is a functor which selects + an arbitrary part of a string. Search is performed on + the range specified by starting and ending iterators. + + Result of the find operation must be convertible to iterator_range. + */ + template + struct FinderConcept + { + private: + typedef iterator_range range; + public: + void constraints() + { + // Operation + r=(*pF)(i,i); + } + private: + range r; + IteratorT i; + FinderT* pF; + }; // Finder_concept + + + //! Formatter concept + /*! + Defines the Formatter concept. Formatter is a functor, which + takes a result from a finder operation and transforms it + in a specific way. + + Result must be a container supported by container_traits, + or a reference to it. + */ + template + struct FormatterConcept + { + public: + void constraints() + { + // Operation + ::boost::begin((*pFo)( (*pF)(i,i) )); + ::boost::end((*pFo)( (*pF)(i,i) )); + } + private: + IteratorT i; + FinderT* pF; + FormatterT *pFo; + }; // FormatterConcept; + + } // namespace algorithm +} // namespace boost + + + + +#endif // BOOST_STRING_CONCEPT_HPP diff --git a/contrib/src/boost/algorithm/string/config.hpp b/contrib/src/boost/algorithm/string/config.hpp new file mode 100644 index 0000000..559750a --- /dev/null +++ b/contrib/src/boost/algorithm/string/config.hpp @@ -0,0 +1,28 @@ +// Boost string_algo library config.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CONFIG_HPP +#define BOOST_STRING_CONFIG_HPP + +#include +#include + +#ifdef BOOST_STRING_DEDUCED_TYPENAME +# error "macro already defined!" +#endif + +#define BOOST_STRING_TYPENAME BOOST_DEDUCED_TYPENAME + +// Metrowerks workaround +#if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // 8.x +#pragma parse_func_templ off +#endif + +#endif // BOOST_STRING_CONFIG_HPP diff --git a/contrib/src/boost/algorithm/string/constants.hpp b/contrib/src/boost/algorithm/string/constants.hpp new file mode 100644 index 0000000..6ed70ef --- /dev/null +++ b/contrib/src/boost/algorithm/string/constants.hpp @@ -0,0 +1,36 @@ +// Boost string_algo library constants.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CONSTANTS_HPP +#define BOOST_STRING_CONSTANTS_HPP + +namespace boost { + namespace algorithm { + + //! Token compression mode + /*! + Specifies token compression mode for the token_finder. + */ + enum token_compress_mode_type + { + token_compress_on, //!< Compress adjacent tokens + token_compress_off //!< Do not compress adjacent tokens + }; + + } // namespace algorithm + + // pull the names to the boost namespace + using algorithm::token_compress_on; + using algorithm::token_compress_off; + +} // namespace boost + +#endif // BOOST_STRING_CONSTANTS_HPP + diff --git a/contrib/src/boost/algorithm/string/detail/case_conv.hpp b/contrib/src/boost/algorithm/string/detail/case_conv.hpp new file mode 100644 index 0000000..42621c7 --- /dev/null +++ b/contrib/src/boost/algorithm/string/detail/case_conv.hpp @@ -0,0 +1,123 @@ +// Boost string_algo library string_funct.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CASE_CONV_DETAIL_HPP +#define BOOST_STRING_CASE_CONV_DETAIL_HPP + +#include +#include +#include + +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// case conversion functors -----------------------------------------------// + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(push) +#pragma warning(disable:4512) //assignment operator could not be generated +#endif + + // a tolower functor + template + struct to_lowerF : public std::unary_function + { + // Constructor + to_lowerF( const std::locale& Loc ) : m_Loc( &Loc ) {} + + // Operation + CharT operator ()( CharT Ch ) const + { + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + return std::tolower( static_cast::type> ( Ch )); + #else + return std::tolower( Ch, *m_Loc ); + #endif + } + private: + const std::locale* m_Loc; + }; + + // a toupper functor + template + struct to_upperF : public std::unary_function + { + // Constructor + to_upperF( const std::locale& Loc ) : m_Loc( &Loc ) {} + + // Operation + CharT operator ()( CharT Ch ) const + { + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + return std::toupper( static_cast::type> ( Ch )); + #else + return std::toupper( Ch, *m_Loc ); + #endif + } + private: + const std::locale* m_Loc; + }; + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(pop) +#endif + +// algorithm implementation ------------------------------------------------------------------------- + + // Transform a range + template + OutputIteratorT transform_range_copy( + OutputIteratorT Output, + const RangeT& Input, + FunctorT Functor) + { + return std::transform( + ::boost::begin(Input), + ::boost::end(Input), + Output, + Functor); + } + + // Transform a range (in-place) + template + void transform_range( + const RangeT& Input, + FunctorT Functor) + { + std::transform( + ::boost::begin(Input), + ::boost::end(Input), + ::boost::begin(Input), + Functor); + } + + template + inline SequenceT transform_range_copy( + const RangeT& Input, + FunctorT Functor) + { + return SequenceT( + ::boost::make_transform_iterator( + ::boost::begin(Input), + Functor), + ::boost::make_transform_iterator( + ::boost::end(Input), + Functor)); + } + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_CASE_CONV_DETAIL_HPP diff --git a/contrib/src/boost/algorithm/string/detail/classification.hpp b/contrib/src/boost/algorithm/string/detail/classification.hpp new file mode 100644 index 0000000..704d9d2 --- /dev/null +++ b/contrib/src/boost/algorithm/string/detail/classification.hpp @@ -0,0 +1,353 @@ +// Boost string_algo library classification.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CLASSIFICATION_DETAIL_HPP +#define BOOST_STRING_CLASSIFICATION_DETAIL_HPP + +#include +#include +#include +#include + +#include +#include + +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// classification functors -----------------------------------------------// + + // is_classified functor + struct is_classifiedF : + public predicate_facade + { + // Boost.ResultOf support + typedef bool result_type; + + // Constructor from a locale + is_classifiedF(std::ctype_base::mask Type, std::locale const & Loc = std::locale()) : + m_Type(Type), m_Locale(Loc) {} + // Operation + template + bool operator()( CharT Ch ) const + { + return std::use_facet< std::ctype >(m_Locale).is( m_Type, Ch ); + } + + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x582) && !defined(_USE_OLD_RW_STL) + template<> + bool operator()( char const Ch ) const + { + return std::use_facet< std::ctype >(m_Locale).is( m_Type, Ch ); + } + #endif + + private: + std::ctype_base::mask m_Type; + std::locale m_Locale; + }; + + + // is_any_of functor + /* + returns true if the value is from the specified set + */ + template + struct is_any_ofF : + public predicate_facade > + { + private: + // set cannot operate on const value-type + typedef typename ::boost::remove_const::type set_value_type; + + public: + // Boost.ResultOf support + typedef bool result_type; + + // Constructor + template + is_any_ofF( const RangeT& Range ) : m_Size(0) + { + // Prepare storage + m_Storage.m_dynSet=0; + + std::size_t Size=::boost::distance(Range); + m_Size=Size; + set_value_type* Storage=0; + + if(use_fixed_storage(m_Size)) + { + // Use fixed storage + Storage=&m_Storage.m_fixSet[0]; + } + else + { + // Use dynamic storage + m_Storage.m_dynSet=new set_value_type[m_Size]; + Storage=m_Storage.m_dynSet; + } + + // Use fixed storage + ::std::copy(::boost::begin(Range), ::boost::end(Range), Storage); + ::std::sort(Storage, Storage+m_Size); + } + + // Copy constructor + is_any_ofF(const is_any_ofF& Other) : m_Size(Other.m_Size) + { + // Prepare storage + m_Storage.m_dynSet=0; + const set_value_type* SrcStorage=0; + set_value_type* DestStorage=0; + + if(use_fixed_storage(m_Size)) + { + // Use fixed storage + DestStorage=&m_Storage.m_fixSet[0]; + SrcStorage=&Other.m_Storage.m_fixSet[0]; + } + else + { + // Use dynamic storage + m_Storage.m_dynSet=new set_value_type[m_Size]; + DestStorage=m_Storage.m_dynSet; + SrcStorage=Other.m_Storage.m_dynSet; + } + + // Use fixed storage + ::std::memcpy(DestStorage, SrcStorage, sizeof(set_value_type)*m_Size); + } + + // Destructor + ~is_any_ofF() + { + if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0) + { + delete [] m_Storage.m_dynSet; + } + } + + // Assignment + is_any_ofF& operator=(const is_any_ofF& Other) + { + // Handle self assignment + if(this==&Other) return *this; + + // Prepare storage + const set_value_type* SrcStorage; + set_value_type* DestStorage; + + if(use_fixed_storage(Other.m_Size)) + { + // Use fixed storage + DestStorage=&m_Storage.m_fixSet[0]; + SrcStorage=&Other.m_Storage.m_fixSet[0]; + + // Delete old storage if was present + if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0) + { + delete [] m_Storage.m_dynSet; + } + + // Set new size + m_Size=Other.m_Size; + } + else + { + // Other uses dynamic storage + SrcStorage=Other.m_Storage.m_dynSet; + + // Check what kind of storage are we using right now + if(use_fixed_storage(m_Size)) + { + // Using fixed storage, allocate new + set_value_type* pTemp=new set_value_type[Other.m_Size]; + DestStorage=pTemp; + m_Storage.m_dynSet=pTemp; + m_Size=Other.m_Size; + } + else + { + // Using dynamic storage, check if can reuse + if(m_Storage.m_dynSet!=0 && m_Size>=Other.m_Size && m_Size + bool operator()( Char2T Ch ) const + { + const set_value_type* Storage= + (use_fixed_storage(m_Size)) + ? &m_Storage.m_fixSet[0] + : m_Storage.m_dynSet; + + return ::std::binary_search(Storage, Storage+m_Size, Ch); + } + private: + // check if the size is eligible for fixed storage + static bool use_fixed_storage(std::size_t size) + { + return size<=sizeof(set_value_type*)*2; + } + + + private: + // storage + // The actual used storage is selected on the type + union + { + set_value_type* m_dynSet; + set_value_type m_fixSet[sizeof(set_value_type*)*2]; + } + m_Storage; + + // storage size + ::std::size_t m_Size; + }; + + // is_from_range functor + /* + returns true if the value is from the specified range. + (i.e. x>=From && x>=To) + */ + template + struct is_from_rangeF : + public predicate_facade< is_from_rangeF > + { + // Boost.ResultOf support + typedef bool result_type; + + // Constructor + is_from_rangeF( CharT From, CharT To ) : m_From(From), m_To(To) {} + + // Operation + template + bool operator()( Char2T Ch ) const + { + return ( m_From <= Ch ) && ( Ch <= m_To ); + } + + private: + CharT m_From; + CharT m_To; + }; + + // class_and composition predicate + template + struct pred_andF : + public predicate_facade< pred_andF > + { + public: + + // Boost.ResultOf support + typedef bool result_type; + + // Constructor + pred_andF( Pred1T Pred1, Pred2T Pred2 ) : + m_Pred1(Pred1), m_Pred2(Pred2) {} + + // Operation + template + bool operator()( CharT Ch ) const + { + return m_Pred1(Ch) && m_Pred2(Ch); + } + + private: + Pred1T m_Pred1; + Pred2T m_Pred2; + }; + + // class_or composition predicate + template + struct pred_orF : + public predicate_facade< pred_orF > + { + public: + // Boost.ResultOf support + typedef bool result_type; + + // Constructor + pred_orF( Pred1T Pred1, Pred2T Pred2 ) : + m_Pred1(Pred1), m_Pred2(Pred2) {} + + // Operation + template + bool operator()( CharT Ch ) const + { + return m_Pred1(Ch) || m_Pred2(Ch); + } + + private: + Pred1T m_Pred1; + Pred2T m_Pred2; + }; + + // class_not composition predicate + template< typename PredT > + struct pred_notF : + public predicate_facade< pred_notF > + { + public: + // Boost.ResultOf support + typedef bool result_type; + + // Constructor + pred_notF( PredT Pred ) : m_Pred(Pred) {} + + // Operation + template + bool operator()( CharT Ch ) const + { + return !m_Pred(Ch); + } + + private: + PredT m_Pred; + }; + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_CLASSIFICATION_DETAIL_HPP diff --git a/contrib/src/boost/algorithm/string/detail/find_format.hpp b/contrib/src/boost/algorithm/string/detail/find_format.hpp new file mode 100644 index 0000000..b398750 --- /dev/null +++ b/contrib/src/boost/algorithm/string/detail/find_format.hpp @@ -0,0 +1,204 @@ +// Boost string_algo library find_format.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_FORMAT_DETAIL_HPP +#define BOOST_STRING_FIND_FORMAT_DETAIL_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// find_format_copy (iterator variant) implementation -------------------------------// + + template< + typename OutputIteratorT, + typename InputT, + typename FormatterT, + typename FindResultT, + typename FormatResultT > + inline OutputIteratorT find_format_copy_impl2( + OutputIteratorT Output, + const InputT& Input, + FormatterT Formatter, + const FindResultT& FindResult, + const FormatResultT& FormatResult ) + { + typedef find_format_store< + BOOST_STRING_TYPENAME + range_const_iterator::type, + FormatterT, + FormatResultT > store_type; + + // Create store for the find result + store_type M( FindResult, FormatResult, Formatter ); + + if ( !M ) + { + // Match not found - return original sequence + Output = std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); + return Output; + } + + // Copy the beginning of the sequence + Output = std::copy( ::boost::begin(Input), ::boost::begin(M), Output ); + // Format find result + // Copy formatted result + Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); + // Copy the rest of the sequence + Output = std::copy( M.end(), ::boost::end(Input), Output ); + + return Output; + } + + template< + typename OutputIteratorT, + typename InputT, + typename FormatterT, + typename FindResultT > + inline OutputIteratorT find_format_copy_impl( + OutputIteratorT Output, + const InputT& Input, + FormatterT Formatter, + const FindResultT& FindResult ) + { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { + return ::boost::algorithm::detail::find_format_copy_impl2( + Output, + Input, + Formatter, + FindResult, + Formatter(FindResult) ); + } else { + return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); + } + } + + +// find_format_copy implementation --------------------------------------------------// + + template< + typename InputT, + typename FormatterT, + typename FindResultT, + typename FormatResultT > + inline InputT find_format_copy_impl2( + const InputT& Input, + FormatterT Formatter, + const FindResultT& FindResult, + const FormatResultT& FormatResult) + { + typedef find_format_store< + BOOST_STRING_TYPENAME + range_const_iterator::type, + FormatterT, + FormatResultT > store_type; + + // Create store for the find result + store_type M( FindResult, FormatResult, Formatter ); + + if ( !M ) + { + // Match not found - return original sequence + return InputT( Input ); + } + + InputT Output; + // Copy the beginning of the sequence + boost::algorithm::detail::insert( Output, ::boost::end(Output), ::boost::begin(Input), M.begin() ); + // Copy formatted result + boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() ); + // Copy the rest of the sequence + boost::algorithm::detail::insert( Output, ::boost::end(Output), M.end(), ::boost::end(Input) ); + + return Output; + } + + template< + typename InputT, + typename FormatterT, + typename FindResultT > + inline InputT find_format_copy_impl( + const InputT& Input, + FormatterT Formatter, + const FindResultT& FindResult) + { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { + return ::boost::algorithm::detail::find_format_copy_impl2( + Input, + Formatter, + FindResult, + Formatter(FindResult) ); + } else { + return Input; + } + } + + // replace implementation ----------------------------------------------------// + + template< + typename InputT, + typename FormatterT, + typename FindResultT, + typename FormatResultT > + inline void find_format_impl2( + InputT& Input, + FormatterT Formatter, + const FindResultT& FindResult, + const FormatResultT& FormatResult) + { + typedef find_format_store< + BOOST_STRING_TYPENAME + range_iterator::type, + FormatterT, + FormatResultT > store_type; + + // Create store for the find result + store_type M( FindResult, FormatResult, Formatter ); + + if ( !M ) + { + // Search not found - return original sequence + return; + } + + // Replace match + ::boost::algorithm::detail::replace( Input, M.begin(), M.end(), M.format_result() ); + } + + template< + typename InputT, + typename FormatterT, + typename FindResultT > + inline void find_format_impl( + InputT& Input, + FormatterT Formatter, + const FindResultT& FindResult) + { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { + ::boost::algorithm::detail::find_format_impl2( + Input, + Formatter, + FindResult, + Formatter(FindResult) ); + } + } + + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_FIND_FORMAT_DETAIL_HPP diff --git a/contrib/src/boost/algorithm/string/detail/find_format_all.hpp b/contrib/src/boost/algorithm/string/detail/find_format_all.hpp new file mode 100644 index 0000000..52930c8 --- /dev/null +++ b/contrib/src/boost/algorithm/string/detail/find_format_all.hpp @@ -0,0 +1,273 @@ +// Boost string_algo library find_format_all.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP +#define BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// find_format_all_copy (iterator variant) implementation ---------------------------// + + template< + typename OutputIteratorT, + typename InputT, + typename FinderT, + typename FormatterT, + typename FindResultT, + typename FormatResultT > + inline OutputIteratorT find_format_all_copy_impl2( + OutputIteratorT Output, + const InputT& Input, + FinderT Finder, + FormatterT Formatter, + const FindResultT& FindResult, + const FormatResultT& FormatResult ) + { + typedef BOOST_STRING_TYPENAME + range_const_iterator::type input_iterator_type; + + typedef find_format_store< + input_iterator_type, + FormatterT, + FormatResultT > store_type; + + // Create store for the find result + store_type M( FindResult, FormatResult, Formatter ); + + // Initialize last match + input_iterator_type LastMatch=::boost::begin(Input); + + // Iterate through all matches + while( M ) + { + // Copy the beginning of the sequence + Output = std::copy( LastMatch, M.begin(), Output ); + // Copy formatted result + Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); + + // Proceed to the next match + LastMatch=M.end(); + M=Finder( LastMatch, ::boost::end(Input) ); + } + + // Copy the rest of the sequence + Output = std::copy( LastMatch, ::boost::end(Input), Output ); + + return Output; + } + + template< + typename OutputIteratorT, + typename InputT, + typename FinderT, + typename FormatterT, + typename FindResultT > + inline OutputIteratorT find_format_all_copy_impl( + OutputIteratorT Output, + const InputT& Input, + FinderT Finder, + FormatterT Formatter, + const FindResultT& FindResult ) + { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { + return ::boost::algorithm::detail::find_format_all_copy_impl2( + Output, + Input, + Finder, + Formatter, + FindResult, + Formatter(FindResult) ); + } else { + return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); + } + } + + // find_format_all_copy implementation ----------------------------------------------// + + template< + typename InputT, + typename FinderT, + typename FormatterT, + typename FindResultT, + typename FormatResultT > + inline InputT find_format_all_copy_impl2( + const InputT& Input, + FinderT Finder, + FormatterT Formatter, + const FindResultT& FindResult, + const FormatResultT& FormatResult) + { + typedef BOOST_STRING_TYPENAME + range_const_iterator::type input_iterator_type; + + typedef find_format_store< + input_iterator_type, + FormatterT, + FormatResultT > store_type; + + // Create store for the find result + store_type M( FindResult, FormatResult, Formatter ); + + // Initialize last match + input_iterator_type LastMatch=::boost::begin(Input); + + // Output temporary + InputT Output; + + // Iterate through all matches + while( M ) + { + // Copy the beginning of the sequence + boost::algorithm::detail::insert( Output, ::boost::end(Output), LastMatch, M.begin() ); + // Copy formatted result + boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() ); + + // Proceed to the next match + LastMatch=M.end(); + M=Finder( LastMatch, ::boost::end(Input) ); + } + + // Copy the rest of the sequence + ::boost::algorithm::detail::insert( Output, ::boost::end(Output), LastMatch, ::boost::end(Input) ); + + return Output; + } + + template< + typename InputT, + typename FinderT, + typename FormatterT, + typename FindResultT > + inline InputT find_format_all_copy_impl( + const InputT& Input, + FinderT Finder, + FormatterT Formatter, + const FindResultT& FindResult) + { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { + return ::boost::algorithm::detail::find_format_all_copy_impl2( + Input, + Finder, + Formatter, + FindResult, + Formatter(FindResult) ); + } else { + return Input; + } + } + + // find_format_all implementation ------------------------------------------------// + + template< + typename InputT, + typename FinderT, + typename FormatterT, + typename FindResultT, + typename FormatResultT > + inline void find_format_all_impl2( + InputT& Input, + FinderT Finder, + FormatterT Formatter, + FindResultT FindResult, + FormatResultT FormatResult) + { + typedef BOOST_STRING_TYPENAME + range_iterator::type input_iterator_type; + typedef find_format_store< + input_iterator_type, + FormatterT, + FormatResultT > store_type; + + // Create store for the find result + store_type M( FindResult, FormatResult, Formatter ); + + // Instantiate replacement storage + std::deque< + BOOST_STRING_TYPENAME range_value::type> Storage; + + // Initialize replacement iterators + input_iterator_type InsertIt=::boost::begin(Input); + input_iterator_type SearchIt=::boost::begin(Input); + + while( M ) + { + // process the segment + InsertIt=process_segment( + Storage, + Input, + InsertIt, + SearchIt, + M.begin() ); + + // Adjust search iterator + SearchIt=M.end(); + + // Copy formatted replace to the storage + ::boost::algorithm::detail::copy_to_storage( Storage, M.format_result() ); + + // Find range for a next match + M=Finder( SearchIt, ::boost::end(Input) ); + } + + // process the last segment + InsertIt=::boost::algorithm::detail::process_segment( + Storage, + Input, + InsertIt, + SearchIt, + ::boost::end(Input) ); + + if ( Storage.empty() ) + { + // Truncate input + ::boost::algorithm::detail::erase( Input, InsertIt, ::boost::end(Input) ); + } + else + { + // Copy remaining data to the end of input + ::boost::algorithm::detail::insert( Input, ::boost::end(Input), Storage.begin(), Storage.end() ); + } + } + + template< + typename InputT, + typename FinderT, + typename FormatterT, + typename FindResultT > + inline void find_format_all_impl( + InputT& Input, + FinderT Finder, + FormatterT Formatter, + FindResultT FindResult) + { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { + ::boost::algorithm::detail::find_format_all_impl2( + Input, + Finder, + Formatter, + FindResult, + Formatter(FindResult) ); + } + } + + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP diff --git a/contrib/src/boost/algorithm/string/detail/find_format_store.hpp b/contrib/src/boost/algorithm/string/detail/find_format_store.hpp new file mode 100644 index 0000000..b9f4a88 --- /dev/null +++ b/contrib/src/boost/algorithm/string/detail/find_format_store.hpp @@ -0,0 +1,89 @@ +// Boost string_algo library find_format_store.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP +#define BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP + +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// temporary format and find result storage --------------------------------// + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(push) +#pragma warning(disable:4512) //assignment operator could not be generated +#endif + template< + typename ForwardIteratorT, + typename FormatterT, + typename FormatResultT > + class find_format_store : + public iterator_range + { + public: + // typedefs + typedef iterator_range base_type; + typedef FormatterT formatter_type; + typedef FormatResultT format_result_type; + + public: + // Construction + find_format_store( + const base_type& FindResult, + const format_result_type& FormatResult, + const formatter_type& Formatter ) : + base_type(FindResult), + m_FormatResult(FormatResult), + m_Formatter(Formatter) {} + + // Assignment + template< typename FindResultT > + find_format_store& operator=( FindResultT FindResult ) + { + iterator_range::operator=(FindResult); + if( !this->empty() ) { + m_FormatResult=m_Formatter(FindResult); + } + + return *this; + } + + // Retrieve format result + const format_result_type& format_result() + { + return m_FormatResult; + } + + private: + format_result_type m_FormatResult; + const formatter_type& m_Formatter; + }; + + template + bool check_find_result(InputT&, FindResultT& FindResult) + { + typedef BOOST_STRING_TYPENAME + range_const_iterator::type input_iterator_type; + iterator_range ResultRange(FindResult); + return !ResultRange.empty(); + } + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(pop) +#endif + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP diff --git a/contrib/src/boost/algorithm/string/detail/find_iterator.hpp b/contrib/src/boost/algorithm/string/detail/find_iterator.hpp new file mode 100644 index 0000000..9b78a0f --- /dev/null +++ b/contrib/src/boost/algorithm/string/detail/find_iterator.hpp @@ -0,0 +1,87 @@ +// Boost string_algo library find_iterator.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_ITERATOR_DETAIL_HPP +#define BOOST_STRING_FIND_ITERATOR_DETAIL_HPP + +#include +#include +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// find_iterator base -----------------------------------------------// + + // Find iterator base + template + class find_iterator_base + { + protected: + // typedefs + typedef IteratorT input_iterator_type; + typedef iterator_range match_type; + typedef function2< + match_type, + input_iterator_type, + input_iterator_type> finder_type; + + protected: + // Protected construction/destruction + + // Default constructor + find_iterator_base() {}; + // Copy construction + find_iterator_base( const find_iterator_base& Other ) : + m_Finder(Other.m_Finder) {} + + // Constructor + template + find_iterator_base( FinderT Finder, int ) : + m_Finder(Finder) {} + + // Destructor + ~find_iterator_base() {} + + // Find operation + match_type do_find( + input_iterator_type Begin, + input_iterator_type End ) const + { + if (!m_Finder.empty()) + { + return m_Finder(Begin,End); + } + else + { + return match_type(End,End); + } + } + + // Check + bool is_null() const + { + return m_Finder.empty(); + } + + private: + // Finder + finder_type m_Finder; + }; + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_FIND_ITERATOR_DETAIL_HPP diff --git a/contrib/src/boost/algorithm/string/detail/finder.hpp b/contrib/src/boost/algorithm/string/detail/finder.hpp new file mode 100644 index 0000000..a2a9582 --- /dev/null +++ b/contrib/src/boost/algorithm/string/detail/finder.hpp @@ -0,0 +1,639 @@ +// Boost string_algo library finder.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FINDER_DETAIL_HPP +#define BOOST_STRING_FINDER_DETAIL_HPP + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + + +// find first functor -----------------------------------------------// + + // find a subsequence in the sequence ( functor ) + /* + Returns a pair marking the subsequence in the sequence. + If the find fails, functor returns + */ + template + struct first_finderF + { + typedef SearchIteratorT search_iterator_type; + + // Construction + template< typename SearchT > + first_finderF( const SearchT& Search, PredicateT Comp ) : + m_Search(::boost::begin(Search), ::boost::end(Search)), m_Comp(Comp) {} + first_finderF( + search_iterator_type SearchBegin, + search_iterator_type SearchEnd, + PredicateT Comp ) : + m_Search(SearchBegin, SearchEnd), m_Comp(Comp) {} + + // Operation + template< typename ForwardIteratorT > + iterator_range + operator()( + ForwardIteratorT Begin, + ForwardIteratorT End ) const + { + typedef iterator_range result_type; + typedef ForwardIteratorT input_iterator_type; + + // Outer loop + for(input_iterator_type OuterIt=Begin; + OuterIt!=End; + ++OuterIt) + { + // Sanity check + if( boost::empty(m_Search) ) + return result_type( End, End ); + + input_iterator_type InnerIt=OuterIt; + search_iterator_type SubstrIt=m_Search.begin(); + for(; + InnerIt!=End && SubstrIt!=m_Search.end(); + ++InnerIt,++SubstrIt) + { + if( !( m_Comp(*InnerIt,*SubstrIt) ) ) + break; + } + + // Substring matching succeeded + if ( SubstrIt==m_Search.end() ) + return result_type( OuterIt, InnerIt ); + } + + return result_type( End, End ); + } + + private: + iterator_range m_Search; + PredicateT m_Comp; + }; + +// find last functor -----------------------------------------------// + + // find the last match a subsequence in the sequence ( functor ) + /* + Returns a pair marking the subsequence in the sequence. + If the find fails, returns + */ + template + struct last_finderF + { + typedef SearchIteratorT search_iterator_type; + typedef first_finderF< + search_iterator_type, + PredicateT> first_finder_type; + + // Construction + template< typename SearchT > + last_finderF( const SearchT& Search, PredicateT Comp ) : + m_Search(::boost::begin(Search), ::boost::end(Search)), m_Comp(Comp) {} + last_finderF( + search_iterator_type SearchBegin, + search_iterator_type SearchEnd, + PredicateT Comp ) : + m_Search(SearchBegin, SearchEnd), m_Comp(Comp) {} + + // Operation + template< typename ForwardIteratorT > + iterator_range + operator()( + ForwardIteratorT Begin, + ForwardIteratorT End ) const + { + typedef iterator_range result_type; + + if( boost::empty(m_Search) ) + return result_type( End, End ); + + typedef BOOST_STRING_TYPENAME boost::detail:: + iterator_traits::iterator_category category; + + return findit( Begin, End, category() ); + } + + private: + // forward iterator + template< typename ForwardIteratorT > + iterator_range + findit( + ForwardIteratorT Begin, + ForwardIteratorT End, + std::forward_iterator_tag ) const + { + typedef iterator_range result_type; + + first_finder_type first_finder( + m_Search.begin(), m_Search.end(), m_Comp ); + + result_type M=first_finder( Begin, End ); + result_type Last=M; + + while( M ) + { + Last=M; + M=first_finder( ::boost::end(M), End ); + } + + return Last; + } + + // bidirectional iterator + template< typename ForwardIteratorT > + iterator_range + findit( + ForwardIteratorT Begin, + ForwardIteratorT End, + std::bidirectional_iterator_tag ) const + { + typedef iterator_range result_type; + typedef ForwardIteratorT input_iterator_type; + + // Outer loop + for(input_iterator_type OuterIt=End; + OuterIt!=Begin; ) + { + input_iterator_type OuterIt2=--OuterIt; + + input_iterator_type InnerIt=OuterIt2; + search_iterator_type SubstrIt=m_Search.begin(); + for(; + InnerIt!=End && SubstrIt!=m_Search.end(); + ++InnerIt,++SubstrIt) + { + if( !( m_Comp(*InnerIt,*SubstrIt) ) ) + break; + } + + // Substring matching succeeded + if( SubstrIt==m_Search.end() ) + return result_type( OuterIt2, InnerIt ); + } + + return result_type( End, End ); + } + + private: + iterator_range m_Search; + PredicateT m_Comp; + }; + +// find n-th functor -----------------------------------------------// + + // find the n-th match of a subsequence in the sequence ( functor ) + /* + Returns a pair marking the subsequence in the sequence. + If the find fails, returns + */ + template + struct nth_finderF + { + typedef SearchIteratorT search_iterator_type; + typedef first_finderF< + search_iterator_type, + PredicateT> first_finder_type; + typedef last_finderF< + search_iterator_type, + PredicateT> last_finder_type; + + // Construction + template< typename SearchT > + nth_finderF( + const SearchT& Search, + int Nth, + PredicateT Comp) : + m_Search(::boost::begin(Search), ::boost::end(Search)), + m_Nth(Nth), + m_Comp(Comp) {} + nth_finderF( + search_iterator_type SearchBegin, + search_iterator_type SearchEnd, + int Nth, + PredicateT Comp) : + m_Search(SearchBegin, SearchEnd), + m_Nth(Nth), + m_Comp(Comp) {} + + // Operation + template< typename ForwardIteratorT > + iterator_range + operator()( + ForwardIteratorT Begin, + ForwardIteratorT End ) const + { + if(m_Nth>=0) + { + return find_forward(Begin, End, m_Nth); + } + else + { + return find_backward(Begin, End, -m_Nth); + } + + } + + private: + // Implementation helpers + template< typename ForwardIteratorT > + iterator_range + find_forward( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N) const + { + typedef iterator_range result_type; + + // Sanity check + if( boost::empty(m_Search) ) + return result_type( End, End ); + + // Instantiate find functor + first_finder_type first_finder( + m_Search.begin(), m_Search.end(), m_Comp ); + + result_type M( Begin, Begin ); + + for( unsigned int n=0; n<=N; ++n ) + { + // find next match + M=first_finder( ::boost::end(M), End ); + + if ( !M ) + { + // Subsequence not found, return + return M; + } + } + + return M; + } + + template< typename ForwardIteratorT > + iterator_range + find_backward( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N) const + { + typedef iterator_range result_type; + + // Sanity check + if( boost::empty(m_Search) ) + return result_type( End, End ); + + // Instantiate find functor + last_finder_type last_finder( + m_Search.begin(), m_Search.end(), m_Comp ); + + result_type M( End, End ); + + for( unsigned int n=1; n<=N; ++n ) + { + // find next match + M=last_finder( Begin, ::boost::begin(M) ); + + if ( !M ) + { + // Subsequence not found, return + return M; + } + } + + return M; + } + + + private: + iterator_range m_Search; + int m_Nth; + PredicateT m_Comp; + }; + +// find head/tail implementation helpers ---------------------------// + + template + iterator_range + find_head_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N, + std::forward_iterator_tag ) + { + typedef ForwardIteratorT input_iterator_type; + typedef iterator_range result_type; + + input_iterator_type It=Begin; + for( + unsigned int Index=0; + Index + iterator_range + find_head_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N, + std::random_access_iterator_tag ) + { + typedef iterator_range result_type; + + if ( (End<=Begin) || ( static_cast(End-Begin) < N ) ) + return result_type( Begin, End ); + + return result_type(Begin,Begin+N); + } + + // Find head implementation + template + iterator_range + find_head_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N ) + { + typedef BOOST_STRING_TYPENAME boost::detail:: + iterator_traits::iterator_category category; + + return ::boost::algorithm::detail::find_head_impl( Begin, End, N, category() ); + } + + template< typename ForwardIteratorT > + iterator_range + find_tail_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N, + std::forward_iterator_tag ) + { + typedef ForwardIteratorT input_iterator_type; + typedef iterator_range result_type; + + unsigned int Index=0; + input_iterator_type It=Begin; + input_iterator_type It2=Begin; + + // Advance It2 by N increments + for( Index=0; Index + iterator_range + find_tail_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N, + std::bidirectional_iterator_tag ) + { + typedef ForwardIteratorT input_iterator_type; + typedef iterator_range result_type; + + input_iterator_type It=End; + for( + unsigned int Index=0; + Index + iterator_range + find_tail_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N, + std::random_access_iterator_tag ) + { + typedef iterator_range result_type; + + if ( (End<=Begin) || ( static_cast(End-Begin) < N ) ) + return result_type( Begin, End ); + + return result_type( End-N, End ); + } + + // Operation + template< typename ForwardIteratorT > + iterator_range + find_tail_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N ) + { + typedef BOOST_STRING_TYPENAME boost::detail:: + iterator_traits::iterator_category category; + + return ::boost::algorithm::detail::find_tail_impl( Begin, End, N, category() ); + } + + + +// find head functor -----------------------------------------------// + + + // find a head in the sequence ( functor ) + /* + This functor find a head of the specified range. For + a specified N, the head is a subsequence of N starting + elements of the range. + */ + struct head_finderF + { + // Construction + head_finderF( int N ) : m_N(N) {} + + // Operation + template< typename ForwardIteratorT > + iterator_range + operator()( + ForwardIteratorT Begin, + ForwardIteratorT End ) const + { + if(m_N>=0) + { + return ::boost::algorithm::detail::find_head_impl( Begin, End, m_N ); + } + else + { + iterator_range Res= + ::boost::algorithm::detail::find_tail_impl( Begin, End, -m_N ); + + return ::boost::make_iterator_range(Begin, Res.begin()); + } + } + + private: + int m_N; + }; + +// find tail functor -----------------------------------------------// + + + // find a tail in the sequence ( functor ) + /* + This functor find a tail of the specified range. For + a specified N, the head is a subsequence of N starting + elements of the range. + */ + struct tail_finderF + { + // Construction + tail_finderF( int N ) : m_N(N) {} + + // Operation + template< typename ForwardIteratorT > + iterator_range + operator()( + ForwardIteratorT Begin, + ForwardIteratorT End ) const + { + if(m_N>=0) + { + return ::boost::algorithm::detail::find_tail_impl( Begin, End, m_N ); + } + else + { + iterator_range Res= + ::boost::algorithm::detail::find_head_impl( Begin, End, -m_N ); + + return ::boost::make_iterator_range(Res.end(), End); + } + } + + private: + int m_N; + }; + +// find token functor -----------------------------------------------// + + // find a token in a sequence ( functor ) + /* + This find functor finds a token specified be a predicate + in a sequence. It is equivalent of std::find algorithm, + with an exception that it return range instead of a single + iterator. + + If bCompress is set to true, adjacent matching tokens are + concatenated into one match. + */ + template< typename PredicateT > + struct token_finderF + { + // Construction + token_finderF( + PredicateT Pred, + token_compress_mode_type eCompress=token_compress_off ) : + m_Pred(Pred), m_eCompress(eCompress) {} + + // Operation + template< typename ForwardIteratorT > + iterator_range + operator()( + ForwardIteratorT Begin, + ForwardIteratorT End ) const + { + typedef iterator_range result_type; + + ForwardIteratorT It=std::find_if( Begin, End, m_Pred ); + + if( It==End ) + { + return result_type( End, End ); + } + else + { + ForwardIteratorT It2=It; + + if( m_eCompress==token_compress_on ) + { + // Find first non-matching character + while( It2!=End && m_Pred(*It2) ) ++It2; + } + else + { + // Advance by one position + ++It2; + } + + return result_type( It, It2 ); + } + } + + private: + PredicateT m_Pred; + token_compress_mode_type m_eCompress; + }; + +// find range functor -----------------------------------------------// + + // find a range in the sequence ( functor ) + /* + This functor actually does not perform any find operation. + It always returns given iterator range as a result. + */ + template + struct range_finderF + { + typedef ForwardIterator1T input_iterator_type; + typedef iterator_range result_type; + + // Construction + range_finderF( + input_iterator_type Begin, + input_iterator_type End ) : m_Range(Begin, End) {} + + range_finderF(const iterator_range& Range) : + m_Range(Range) {} + + // Operation + template< typename ForwardIterator2T > + iterator_range + operator()( + ForwardIterator2T, + ForwardIterator2T ) const + { +#if BOOST_WORKAROUND( __MWERKS__, <= 0x3003 ) + return iterator_range(this->m_Range); +#else + return m_Range; +#endif + } + + private: + iterator_range m_Range; + }; + + + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_FINDER_DETAIL_HPP diff --git a/contrib/src/boost/algorithm/string/detail/formatter.hpp b/contrib/src/boost/algorithm/string/detail/formatter.hpp new file mode 100644 index 0000000..c071822 --- /dev/null +++ b/contrib/src/boost/algorithm/string/detail/formatter.hpp @@ -0,0 +1,119 @@ +// Boost string_algo library formatter.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FORMATTER_DETAIL_HPP +#define BOOST_STRING_FORMATTER_DETAIL_HPP + + +#include +#include +#include +#include + +#include + +// generic replace functors -----------------------------------------------// + +namespace boost { + namespace algorithm { + namespace detail { + +// const format functor ----------------------------------------------------// + + // constant format functor + template + struct const_formatF + { + private: + typedef BOOST_STRING_TYPENAME + range_const_iterator::type format_iterator; + typedef iterator_range result_type; + + public: + // Construction + const_formatF(const RangeT& Format) : + m_Format(::boost::begin(Format), ::boost::end(Format)) {} + + // Operation +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + template + result_type& operator()(const Range2T&) + { + return m_Format; + } +#endif + + template + const result_type& operator()(const Range2T&) const + { + return m_Format; + } + + private: + result_type m_Format; + }; + +// identity format functor ----------------------------------------------------// + + // identity format functor + template + struct identity_formatF + { + // Operation + template< typename Range2T > + const RangeT& operator()(const Range2T& Replace) const + { + return RangeT(::boost::begin(Replace), ::boost::end(Replace)); + } + }; + +// empty format functor ( used by erase ) ------------------------------------// + + // empty format functor + template< typename CharT > + struct empty_formatF + { + template< typename ReplaceT > + empty_container operator()(const ReplaceT&) const + { + return empty_container(); + } + }; + +// dissect format functor ----------------------------------------------------// + + // dissect format functor + template + struct dissect_formatF + { + public: + // Construction + dissect_formatF(FinderT Finder) : + m_Finder(Finder) {} + + // Operation + template + inline iterator_range< + BOOST_STRING_TYPENAME range_const_iterator::type> + operator()(const RangeT& Replace) const + { + return m_Finder(::boost::begin(Replace), ::boost::end(Replace)); + } + + private: + FinderT m_Finder; + }; + + + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_FORMATTER_DETAIL_HPP diff --git a/contrib/src/boost/algorithm/string/detail/predicate.hpp b/contrib/src/boost/algorithm/string/detail/predicate.hpp new file mode 100644 index 0000000..5acf3cc --- /dev/null +++ b/contrib/src/boost/algorithm/string/detail/predicate.hpp @@ -0,0 +1,77 @@ +// Boost string_algo library predicate.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_PREDICATE_DETAIL_HPP +#define BOOST_STRING_PREDICATE_DETAIL_HPP + +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// ends_with predicate implementation ----------------------------------// + + template< + typename ForwardIterator1T, + typename ForwardIterator2T, + typename PredicateT> + inline bool ends_with_iter_select( + ForwardIterator1T Begin, + ForwardIterator1T End, + ForwardIterator2T SubBegin, + ForwardIterator2T SubEnd, + PredicateT Comp, + std::bidirectional_iterator_tag) + { + ForwardIterator1T it=End; + ForwardIterator2T pit=SubEnd; + for(;it!=Begin && pit!=SubBegin;) + { + if( !(Comp(*(--it),*(--pit))) ) + return false; + } + + return pit==SubBegin; + } + + template< + typename ForwardIterator1T, + typename ForwardIterator2T, + typename PredicateT> + inline bool ends_with_iter_select( + ForwardIterator1T Begin, + ForwardIterator1T End, + ForwardIterator2T SubBegin, + ForwardIterator2T SubEnd, + PredicateT Comp, + std::forward_iterator_tag) + { + if ( SubBegin==SubEnd ) + { + // empty subsequence check + return true; + } + + iterator_range Result + =last_finder( + ::boost::make_iterator_range(SubBegin, SubEnd), + Comp)(Begin, End); + + return !Result.empty() && Result.end()==End; + } + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_PREDICATE_DETAIL_HPP diff --git a/contrib/src/boost/algorithm/string/detail/replace_storage.hpp b/contrib/src/boost/algorithm/string/detail/replace_storage.hpp new file mode 100644 index 0000000..db35e4c --- /dev/null +++ b/contrib/src/boost/algorithm/string/detail/replace_storage.hpp @@ -0,0 +1,159 @@ +// Boost string_algo library replace_storage.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP +#define BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP + +#include +#include +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// storage handling routines -----------------------------------------------// + + template< typename StorageT, typename OutputIteratorT > + inline OutputIteratorT move_from_storage( + StorageT& Storage, + OutputIteratorT DestBegin, + OutputIteratorT DestEnd ) + { + OutputIteratorT OutputIt=DestBegin; + + while( !Storage.empty() && OutputIt!=DestEnd ) + { + *OutputIt=Storage.front(); + Storage.pop_front(); + ++OutputIt; + } + + return OutputIt; + } + + template< typename StorageT, typename WhatT > + inline void copy_to_storage( + StorageT& Storage, + const WhatT& What ) + { + Storage.insert( Storage.end(), ::boost::begin(What), ::boost::end(What) ); + } + + +// process segment routine -----------------------------------------------// + + template< bool HasStableIterators > + struct process_segment_helper + { + // Optimized version of process_segment for generic sequence + template< + typename StorageT, + typename InputT, + typename ForwardIteratorT > + ForwardIteratorT operator()( + StorageT& Storage, + InputT& /*Input*/, + ForwardIteratorT InsertIt, + ForwardIteratorT SegmentBegin, + ForwardIteratorT SegmentEnd ) + { + // Copy data from the storage until the beginning of the segment + ForwardIteratorT It=::boost::algorithm::detail::move_from_storage( Storage, InsertIt, SegmentBegin ); + + // 3 cases are possible : + // a) Storage is empty, It==SegmentBegin + // b) Storage is empty, It!=SegmentBegin + // c) Storage is not empty + + if( Storage.empty() ) + { + if( It==SegmentBegin ) + { + // Case a) everything is grand, just return end of segment + return SegmentEnd; + } + else + { + // Case b) move the segment backwards + return std::copy( SegmentBegin, SegmentEnd, It ); + } + } + else + { + // Case c) -> shift the segment to the left and keep the overlap in the storage + while( It!=SegmentEnd ) + { + // Store value into storage + Storage.push_back( *It ); + // Get the top from the storage and put it here + *It=Storage.front(); + Storage.pop_front(); + + // Advance + ++It; + } + + return It; + } + } + }; + + template<> + struct process_segment_helper< true > + { + // Optimized version of process_segment for list-like sequence + template< + typename StorageT, + typename InputT, + typename ForwardIteratorT > + ForwardIteratorT operator()( + StorageT& Storage, + InputT& Input, + ForwardIteratorT InsertIt, + ForwardIteratorT SegmentBegin, + ForwardIteratorT SegmentEnd ) + + { + // Call replace to do the job + ::boost::algorithm::detail::replace( Input, InsertIt, SegmentBegin, Storage ); + // Empty the storage + Storage.clear(); + // Iterators were not changed, simply return the end of segment + return SegmentEnd; + } + }; + + // Process one segment in the replace_all algorithm + template< + typename StorageT, + typename InputT, + typename ForwardIteratorT > + inline ForwardIteratorT process_segment( + StorageT& Storage, + InputT& Input, + ForwardIteratorT InsertIt, + ForwardIteratorT SegmentBegin, + ForwardIteratorT SegmentEnd ) + { + return + process_segment_helper< + has_stable_iterators::value>()( + Storage, Input, InsertIt, SegmentBegin, SegmentEnd ); + } + + + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP diff --git a/contrib/src/boost/algorithm/string/detail/sequence.hpp b/contrib/src/boost/algorithm/string/detail/sequence.hpp new file mode 100644 index 0000000..dc47409 --- /dev/null +++ b/contrib/src/boost/algorithm/string/detail/sequence.hpp @@ -0,0 +1,200 @@ +// Boost string_algo library sequence.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_DETAIL_SEQUENCE_HPP +#define BOOST_STRING_DETAIL_SEQUENCE_HPP + +#include +#include +#include +#include +#include + +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// insert helpers -------------------------------------------------// + + template< typename InputT, typename ForwardIteratorT > + inline void insert( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator At, + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + Input.insert( At, Begin, End ); + } + + template< typename InputT, typename InsertT > + inline void insert( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator At, + const InsertT& Insert ) + { + ::boost::algorithm::detail::insert( Input, At, ::boost::begin(Insert), ::boost::end(Insert) ); + } + +// erase helper ---------------------------------------------------// + + // Erase a range in the sequence + /* + Returns the iterator pointing just after the erase subrange + */ + template< typename InputT > + inline typename InputT::iterator erase( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To ) + { + return Input.erase( From, To ); + } + +// replace helper implementation ----------------------------------// + + // Optimized version of replace for generic sequence containers + // Assumption: insert and erase are expensive + template< bool HasConstTimeOperations > + struct replace_const_time_helper + { + template< typename InputT, typename ForwardIteratorT > + void operator()( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To, + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + // Copy data to the container ( as much as possible ) + ForwardIteratorT InsertIt=Begin; + BOOST_STRING_TYPENAME InputT::iterator InputIt=From; + for(; InsertIt!=End && InputIt!=To; InsertIt++, InputIt++ ) + { + *InputIt=*InsertIt; + } + + if ( InsertIt!=End ) + { + // Replace sequence is longer, insert it + Input.insert( InputIt, InsertIt, End ); + } + else + { + if ( InputIt!=To ) + { + // Replace sequence is shorter, erase the rest + Input.erase( InputIt, To ); + } + } + } + }; + + template<> + struct replace_const_time_helper< true > + { + // Const-time erase and insert methods -> use them + template< typename InputT, typename ForwardIteratorT > + void operator()( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To, + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + BOOST_STRING_TYPENAME InputT::iterator At=Input.erase( From, To ); + if ( Begin!=End ) + { + if(!Input.empty()) + { + Input.insert( At, Begin, End ); + } + else + { + Input.insert( Input.begin(), Begin, End ); + } + } + } + }; + + // No native replace method + template< bool HasNative > + struct replace_native_helper + { + template< typename InputT, typename ForwardIteratorT > + void operator()( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To, + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + replace_const_time_helper< + boost::mpl::and_< + has_const_time_insert, + has_const_time_erase >::value >()( + Input, From, To, Begin, End ); + } + }; + + // Container has native replace method + template<> + struct replace_native_helper< true > + { + template< typename InputT, typename ForwardIteratorT > + void operator()( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To, + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + Input.replace( From, To, Begin, End ); + } + }; + +// replace helper -------------------------------------------------// + + template< typename InputT, typename ForwardIteratorT > + inline void replace( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To, + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + replace_native_helper< has_native_replace::value >()( + Input, From, To, Begin, End ); + } + + template< typename InputT, typename InsertT > + inline void replace( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To, + const InsertT& Insert ) + { + if(From!=To) + { + ::boost::algorithm::detail::replace( Input, From, To, ::boost::begin(Insert), ::boost::end(Insert) ); + } + else + { + ::boost::algorithm::detail::insert( Input, From, ::boost::begin(Insert), ::boost::end(Insert) ); + } + } + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_DETAIL_SEQUENCE_HPP diff --git a/contrib/src/boost/algorithm/string/detail/trim.hpp b/contrib/src/boost/algorithm/string/detail/trim.hpp new file mode 100644 index 0000000..1233e49 --- /dev/null +++ b/contrib/src/boost/algorithm/string/detail/trim.hpp @@ -0,0 +1,95 @@ +// Boost string_algo library trim.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_TRIM_DETAIL_HPP +#define BOOST_STRING_TRIM_DETAIL_HPP + +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// trim iterator helper -----------------------------------------------// + + template< typename ForwardIteratorT, typename PredicateT > + inline ForwardIteratorT trim_end_iter_select( + ForwardIteratorT InBegin, + ForwardIteratorT InEnd, + PredicateT IsSpace, + std::forward_iterator_tag ) + { + ForwardIteratorT TrimIt=InBegin; + + for( ForwardIteratorT It=InBegin; It!=InEnd; ++It ) + { + if ( !IsSpace(*It) ) + { + TrimIt=It; + ++TrimIt; + } + } + + return TrimIt; + } + + template< typename ForwardIteratorT, typename PredicateT > + inline ForwardIteratorT trim_end_iter_select( + ForwardIteratorT InBegin, + ForwardIteratorT InEnd, + PredicateT IsSpace, + std::bidirectional_iterator_tag ) + { + for( ForwardIteratorT It=InEnd; It!=InBegin; ) + { + if ( !IsSpace(*(--It)) ) + return ++It; + } + + return InBegin; + } + // Search for first non matching character from the beginning of the sequence + template< typename ForwardIteratorT, typename PredicateT > + inline ForwardIteratorT trim_begin( + ForwardIteratorT InBegin, + ForwardIteratorT InEnd, + PredicateT IsSpace ) + { + ForwardIteratorT It=InBegin; + for(; It!=InEnd; ++It ) + { + if (!IsSpace(*It)) + return It; + } + + return It; + } + + // Search for first non matching character from the end of the sequence + template< typename ForwardIteratorT, typename PredicateT > + inline ForwardIteratorT trim_end( + ForwardIteratorT InBegin, + ForwardIteratorT InEnd, + PredicateT IsSpace ) + { + typedef BOOST_STRING_TYPENAME boost::detail:: + iterator_traits::iterator_category category; + + return ::boost::algorithm::detail::trim_end_iter_select( InBegin, InEnd, IsSpace, category() ); + } + + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_TRIM_DETAIL_HPP diff --git a/contrib/src/boost/algorithm/string/detail/util.hpp b/contrib/src/boost/algorithm/string/detail/util.hpp new file mode 100644 index 0000000..cf4a8b1 --- /dev/null +++ b/contrib/src/boost/algorithm/string/detail/util.hpp @@ -0,0 +1,106 @@ +// Boost string_algo library util.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_UTIL_DETAIL_HPP +#define BOOST_STRING_UTIL_DETAIL_HPP + +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// empty container -----------------------------------------------// + + // empty_container + /* + This class represents always empty container, + containing elements of type CharT. + + It is supposed to be used in a const version only + */ + template< typename CharT > + struct empty_container + { + typedef empty_container type; + typedef CharT value_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef const value_type& reference; + typedef const value_type& const_reference; + typedef const value_type* iterator; + typedef const value_type* const_iterator; + + + // Operations + const_iterator begin() const + { + return reinterpret_cast(0); + } + + const_iterator end() const + { + return reinterpret_cast(0); + } + + bool empty() const + { + return false; + } + + size_type size() const + { + return 0; + } + }; + +// bounded copy algorithm -----------------------------------------------// + + // Bounded version of the std::copy algorithm + template + inline OutputIteratorT bounded_copy( + InputIteratorT First, + InputIteratorT Last, + OutputIteratorT DestFirst, + OutputIteratorT DestLast ) + { + InputIteratorT InputIt=First; + OutputIteratorT OutputIt=DestFirst; + for(; InputIt!=Last && OutputIt!=DestLast; InputIt++, OutputIt++ ) + { + *OutputIt=*InputIt; + } + + return OutputIt; + } + +// iterator range utilities -----------------------------------------// + + // copy range functor + template< + typename SeqT, + typename IteratorT=BOOST_STRING_TYPENAME SeqT::const_iterator > + struct copy_iterator_rangeF : + public std::unary_function< iterator_range, SeqT > + { + SeqT operator()( const iterator_range& Range ) const + { + return copy_range(Range); + } + }; + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_UTIL_DETAIL_HPP diff --git a/contrib/src/boost/algorithm/string/erase.hpp b/contrib/src/boost/algorithm/string/erase.hpp new file mode 100644 index 0000000..6883790 --- /dev/null +++ b/contrib/src/boost/algorithm/string/erase.hpp @@ -0,0 +1,844 @@ +// Boost string_algo library erase.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_ERASE_HPP +#define BOOST_STRING_ERASE_HPP + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file + Defines various erase algorithms. Each algorithm removes + part(s) of the input according to a searching criteria. +*/ + +namespace boost { + namespace algorithm { + +// erase_range -------------------------------------------------------// + + //! Erase range algorithm + /*! + Remove the given range from the input. The result is a modified copy of + the input. It is returned as a sequence or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input sequence + \param SearchRange A range in the input to be removed + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template + inline OutputIteratorT erase_range_copy( + OutputIteratorT Output, + const RangeT& Input, + const iterator_range< + BOOST_STRING_TYPENAME + range_const_iterator::type>& SearchRange ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::range_finder(SearchRange), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase range algorithm + /*! + \overload + */ + template + inline SequenceT erase_range_copy( + const SequenceT& Input, + const iterator_range< + BOOST_STRING_TYPENAME + range_const_iterator::type>& SearchRange ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::range_finder(SearchRange), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase range algorithm + /*! + Remove the given range from the input. + The input sequence is modified in-place. + + \param Input An input sequence + \param SearchRange A range in the input to be removed + */ + template + inline void erase_range( + SequenceT& Input, + const iterator_range< + BOOST_STRING_TYPENAME + range_iterator::type>& SearchRange ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::range_finder(SearchRange), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_first --------------------------------------------------------// + + //! Erase first algorithm + /*! + Remove the first occurrence of the substring from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT erase_first_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase first algorithm + /*! + \overload + */ + template + inline SequenceT erase_first_copy( + const SequenceT& Input, + const RangeT& Search ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase first algorithm + /*! + Remove the first occurrence of the substring from the input. + The input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for. + */ + template + inline void erase_first( + SequenceT& Input, + const RangeT& Search ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_first ( case insensitive ) ------------------------------------// + + //! Erase first algorithm ( case insensitive ) + /*! + Remove the first occurrence of the substring from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT ierase_first_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase first algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ierase_first_copy( + const SequenceT& Input, + const RangeT& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase first algorithm ( case insensitive ) + /*! + Remove the first occurrence of the substring from the input. + The input sequence is modified in-place. Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for + \param Loc A locale used for case insensitive comparison + */ + template + inline void ierase_first( + SequenceT& Input, + const RangeT& Search, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_last --------------------------------------------------------// + + //! Erase last algorithm + /*! + Remove the last occurrence of the substring from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for. + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT erase_last_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::last_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase last algorithm + /*! + \overload + */ + template + inline SequenceT erase_last_copy( + const SequenceT& Input, + const RangeT& Search ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::last_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase last algorithm + /*! + Remove the last occurrence of the substring from the input. + The input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for + */ + template + inline void erase_last( + SequenceT& Input, + const RangeT& Search ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::last_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_last ( case insensitive ) ------------------------------------// + + //! Erase last algorithm ( case insensitive ) + /*! + Remove the last occurrence of the substring from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT ierase_last_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::last_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase last algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ierase_last_copy( + const SequenceT& Input, + const RangeT& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::last_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase last algorithm ( case insensitive ) + /*! + Remove the last occurrence of the substring from the input. + The input sequence is modified in-place. Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for + \param Loc A locale used for case insensitive comparison + */ + template + inline void ierase_last( + SequenceT& Input, + const RangeT& Search, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::last_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_nth --------------------------------------------------------------------// + + //! Erase nth algorithm + /*! + Remove the Nth occurrence of the substring in the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT erase_nth_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + int Nth ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::nth_finder(Search, Nth), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase nth algorithm + /*! + \overload + */ + template + inline SequenceT erase_nth_copy( + const SequenceT& Input, + const RangeT& Search, + int Nth ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::nth_finder(Search, Nth), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase nth algorithm + /*! + Remove the Nth occurrence of the substring in the input. + The input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for. + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + */ + template + inline void erase_nth( + SequenceT& Input, + const RangeT& Search, + int Nth ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::nth_finder(Search, Nth), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_nth ( case insensitive ) ---------------------------------------------// + + //! Erase nth algorithm ( case insensitive ) + /*! + Remove the Nth occurrence of the substring in the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for. + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT ierase_nth_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + int Nth, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase nth algorithm + /*! + \overload + */ + template + inline SequenceT ierase_nth_copy( + const SequenceT& Input, + const RangeT& Search, + int Nth, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), + empty_formatter(Input) ); + } + + //! Erase nth algorithm + /*! + Remove the Nth occurrence of the substring in the input. + The input sequence is modified in-place. Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for. + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \param Loc A locale used for case insensitive comparison + */ + template + inline void ierase_nth( + SequenceT& Input, + const RangeT& Search, + int Nth, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + +// erase_all --------------------------------------------------------// + + //! Erase all algorithm + /*! + Remove all the occurrences of the string from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + + \param Output An output iterator to which the result will be copied + \param Input An input sequence + \param Search A substring to be searched for. + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT erase_all_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search ) + { + return ::boost::algorithm::find_format_all_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase all algorithm + /*! + \overload + */ + template + inline SequenceT erase_all_copy( + const SequenceT& Input, + const RangeT& Search ) + { + return ::boost::algorithm::find_format_all_copy( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase all algorithm + /*! + Remove all the occurrences of the string from the input. + The input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for. + */ + template + inline void erase_all( + SequenceT& Input, + const RangeT& Search ) + { + ::boost::algorithm::find_format_all( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_all ( case insensitive ) ------------------------------------// + + //! Erase all algorithm ( case insensitive ) + /*! + Remove all the occurrences of the string from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT ierase_all_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_all_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase all algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ierase_all_copy( + const SequenceT& Input, + const RangeT& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_all_copy( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase all algorithm ( case insensitive ) + /*! + Remove all the occurrences of the string from the input. + The input sequence is modified in-place. Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for. + \param Loc A locale used for case insensitive comparison + */ + template + inline void ierase_all( + SequenceT& Input, + const RangeT& Search, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format_all( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_head --------------------------------------------------------------------// + + //! Erase head algorithm + /*! + Remove the head from the input. The head is a prefix of a sequence of given size. + If the sequence is shorter then required, the whole string is + considered to be the head. The result is a modified copy of the input. + It is returned as a sequence or copied to the output iterator. + + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param N Length of the head. + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename RangeT> + inline OutputIteratorT erase_head_copy( + OutputIteratorT Output, + const RangeT& Input, + int N ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::head_finder(N), + ::boost::algorithm::empty_formatter( Input ) ); + } + + //! Erase head algorithm + /*! + \overload + */ + template + inline SequenceT erase_head_copy( + const SequenceT& Input, + int N ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::head_finder(N), + ::boost::algorithm::empty_formatter( Input ) ); + } + + //! Erase head algorithm + /*! + Remove the head from the input. The head is a prefix of a sequence of given size. + If the sequence is shorter then required, the whole string is + considered to be the head. The input sequence is modified in-place. + + \param Input An input string + \param N Length of the head + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + */ + template + inline void erase_head( + SequenceT& Input, + int N ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::head_finder(N), + ::boost::algorithm::empty_formatter( Input ) ); + } + +// erase_tail --------------------------------------------------------------------// + + //! Erase tail algorithm + /*! + Remove the tail from the input. The tail is a suffix of a sequence of given size. + If the sequence is shorter then required, the whole string is + considered to be the tail. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param N Length of the tail. + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename RangeT> + inline OutputIteratorT erase_tail_copy( + OutputIteratorT Output, + const RangeT& Input, + int N ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::tail_finder(N), + ::boost::algorithm::empty_formatter( Input ) ); + } + + //! Erase tail algorithm + /*! + \overload + */ + template + inline SequenceT erase_tail_copy( + const SequenceT& Input, + int N ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::tail_finder(N), + ::boost::algorithm::empty_formatter( Input ) ); + } + + //! Erase tail algorithm + /*! + Remove the tail from the input. The tail is a suffix of a sequence of given size. + If the sequence is shorter then required, the whole string is + considered to be the tail. The input sequence is modified in-place. + + \param Input An input string + \param N Length of the tail + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + */ + template + inline void erase_tail( + SequenceT& Input, + int N ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::tail_finder(N), + ::boost::algorithm::empty_formatter( Input ) ); + } + + } // namespace algorithm + + // pull names into the boost namespace + using algorithm::erase_range_copy; + using algorithm::erase_range; + using algorithm::erase_first_copy; + using algorithm::erase_first; + using algorithm::ierase_first_copy; + using algorithm::ierase_first; + using algorithm::erase_last_copy; + using algorithm::erase_last; + using algorithm::ierase_last_copy; + using algorithm::ierase_last; + using algorithm::erase_nth_copy; + using algorithm::erase_nth; + using algorithm::ierase_nth_copy; + using algorithm::ierase_nth; + using algorithm::erase_all_copy; + using algorithm::erase_all; + using algorithm::ierase_all_copy; + using algorithm::ierase_all; + using algorithm::erase_head_copy; + using algorithm::erase_head; + using algorithm::erase_tail_copy; + using algorithm::erase_tail; + +} // namespace boost + + +#endif // BOOST_ERASE_HPP diff --git a/contrib/src/boost/algorithm/string/find.hpp b/contrib/src/boost/algorithm/string/find.hpp new file mode 100644 index 0000000..f2c2926 --- /dev/null +++ b/contrib/src/boost/algorithm/string/find.hpp @@ -0,0 +1,334 @@ +// Boost string_algo library find.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_HPP +#define BOOST_STRING_FIND_HPP + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file + Defines a set of find algorithms. The algorithms are searching + for a substring of the input. The result is given as an \c iterator_range + delimiting the substring. +*/ + +namespace boost { + namespace algorithm { + +// Generic find -----------------------------------------------// + + //! Generic find algorithm + /*! + Search the input using the given finder. + + \param Input A string which will be searched. + \param Finder Finder object used for searching. + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c RangeT::iterator or + \c RangeT::const_iterator, depending on the constness of + the input parameter. + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find( + RangeT& Input, + const FinderT& Finder) + { + iterator_range::type> lit_input(::boost::as_literal(Input)); + + return Finder(::boost::begin(lit_input),::boost::end(lit_input)); + } + +// find_first -----------------------------------------------// + + //! Find first algorithm + /*! + Search for the first occurrence of the substring in the input. + + \param Input A string which will be searched. + \param Search A substring to be searched for. + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c RangeT::iterator or + \c RangeT::const_iterator, depending on the constness of + the input parameter. + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find_first( + Range1T& Input, + const Range2T& Search) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::first_finder(Search)); + } + + //! Find first algorithm ( case insensitive ) + /*! + Search for the first occurrence of the substring in the input. + Searching is case insensitive. + + \param Input A string which will be searched. + \param Search A substring to be searched for. + \param Loc A locale used for case insensitive comparison + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c Range1T::iterator or + \c Range1T::const_iterator, depending on the constness of + the input parameter. + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + ifind_first( + Range1T& Input, + const Range2T& Search, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::first_finder(Search,is_iequal(Loc))); + } + +// find_last -----------------------------------------------// + + //! Find last algorithm + /*! + Search for the last occurrence of the substring in the input. + + \param Input A string which will be searched. + \param Search A substring to be searched for. + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c Range1T::iterator or + \c Range1T::const_iterator, depending on the constness of + the input parameter. + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find_last( + Range1T& Input, + const Range2T& Search) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::last_finder(Search)); + } + + //! Find last algorithm ( case insensitive ) + /*! + Search for the last match a string in the input. + Searching is case insensitive. + + \param Input A string which will be searched. + \param Search A substring to be searched for. + \param Loc A locale used for case insensitive comparison + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c Range1T::iterator or + \c Range1T::const_iterator, depending on the constness of + the input parameter. + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + ifind_last( + Range1T& Input, + const Range2T& Search, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::last_finder(Search, is_iequal(Loc))); + } + +// find_nth ----------------------------------------------------------------------// + + //! Find n-th algorithm + /*! + Search for the n-th (zero-indexed) occurrence of the substring in the + input. + + \param Input A string which will be searched. + \param Search A substring to be searched for. + \param Nth An index (zero-indexed) of the match to be found. + For negative N, the matches are counted from the end of string. + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c Range1T::iterator or + \c Range1T::const_iterator, depending on the constness of + the input parameter. + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find_nth( + Range1T& Input, + const Range2T& Search, + int Nth) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::nth_finder(Search,Nth)); + } + + //! Find n-th algorithm ( case insensitive ). + /*! + Search for the n-th (zero-indexed) occurrence of the substring in the + input. Searching is case insensitive. + + \param Input A string which will be searched. + \param Search A substring to be searched for. + \param Nth An index (zero-indexed) of the match to be found. + For negative N, the matches are counted from the end of string. + \param Loc A locale used for case insensitive comparison + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c Range1T::iterator or + \c Range1T::const_iterator, depending on the constness of + the input parameter. + + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + ifind_nth( + Range1T& Input, + const Range2T& Search, + int Nth, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::nth_finder(Search,Nth,is_iequal(Loc))); + } + +// find_head ----------------------------------------------------------------------// + + //! Find head algorithm + /*! + Get the head of the input. Head is a prefix of the string of the + given size. If the input is shorter then required, whole input is considered + to be the head. + + \param Input An input string + \param N Length of the head + For N>=0, at most N characters are extracted. + For N<0, at most size(Input)-|N| characters are extracted. + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c Range1T::iterator or + \c Range1T::const_iterator, depending on the constness of + the input parameter. + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find_head( + RangeT& Input, + int N) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::head_finder(N)); + } + +// find_tail ----------------------------------------------------------------------// + + //! Find tail algorithm + /*! + Get the tail of the input. Tail is a suffix of the string of the + given size. If the input is shorter then required, whole input is considered + to be the tail. + + \param Input An input string + \param N Length of the tail. + For N>=0, at most N characters are extracted. + For N<0, at most size(Input)-|N| characters are extracted. + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c RangeT::iterator or + \c RangeT::const_iterator, depending on the constness of + the input parameter. + + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find_tail( + RangeT& Input, + int N) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::tail_finder(N)); + } + +// find_token --------------------------------------------------------------------// + + //! Find token algorithm + /*! + Look for a given token in the string. Token is a character that matches the + given predicate. + If the "token compress mode" is enabled, adjacent tokens are considered to be one match. + + \param Input A input string. + \param Pred A unary predicate to identify a token + \param eCompress Enable/Disable compressing of adjacent tokens + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c RangeT::iterator or + \c RangeT::const_iterator, depending on the constness of + the input parameter. + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find_token( + RangeT& Input, + PredicateT Pred, + token_compress_mode_type eCompress=token_compress_off) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::token_finder(Pred, eCompress)); + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::find; + using algorithm::find_first; + using algorithm::ifind_first; + using algorithm::find_last; + using algorithm::ifind_last; + using algorithm::find_nth; + using algorithm::ifind_nth; + using algorithm::find_head; + using algorithm::find_tail; + using algorithm::find_token; + +} // namespace boost + + +#endif // BOOST_STRING_FIND_HPP diff --git a/contrib/src/boost/algorithm/string/find_format.hpp b/contrib/src/boost/algorithm/string/find_format.hpp new file mode 100644 index 0000000..0e84a4e --- /dev/null +++ b/contrib/src/boost/algorithm/string/find_format.hpp @@ -0,0 +1,287 @@ +// Boost string_algo library find_format.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_FORMAT_HPP +#define BOOST_STRING_FIND_FORMAT_HPP + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file + Defines generic replace algorithms. Each algorithm replaces + part(s) of the input. The part to be replaced is looked up using a Finder object. + Result of finding is then used by a Formatter object to generate the replacement. +*/ + +namespace boost { + namespace algorithm { + +// generic replace -----------------------------------------------------------------// + + //! Generic replace algorithm + /*! + Use the Finder to search for a substring. Use the Formatter to format + this substring and replace it in the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input sequence + \param Finder A Finder object used to search for a match to be replaced + \param Formatter A Formatter object used to format a match + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename RangeT, + typename FinderT, + typename FormatterT> + inline OutputIteratorT find_format_copy( + OutputIteratorT Output, + const RangeT& Input, + FinderT Finder, + FormatterT Formatter ) + { + // Concept check + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_const_iterator::type> + )); + BOOST_CONCEPT_ASSERT(( + FormatterConcept< + FormatterT, + FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> + )); + + iterator_range::type> lit_input(::boost::as_literal(Input)); + + return detail::find_format_copy_impl( + Output, + lit_input, + Formatter, + Finder( ::boost::begin(lit_input), ::boost::end(lit_input) ) ); + } + + //! Generic replace algorithm + /*! + \overload + */ + template< + typename SequenceT, + typename FinderT, + typename FormatterT> + inline SequenceT find_format_copy( + const SequenceT& Input, + FinderT Finder, + FormatterT Formatter ) + { + // Concept check + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_const_iterator::type> + )); + BOOST_CONCEPT_ASSERT(( + FormatterConcept< + FormatterT, + FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> + )); + + return detail::find_format_copy_impl( + Input, + Formatter, + Finder(::boost::begin(Input), ::boost::end(Input))); + } + + //! Generic replace algorithm + /*! + Use the Finder to search for a substring. Use the Formatter to format + this substring and replace it in the input. The input is modified in-place. + + \param Input An input sequence + \param Finder A Finder object used to search for a match to be replaced + \param Formatter A Formatter object used to format a match + */ + template< + typename SequenceT, + typename FinderT, + typename FormatterT> + inline void find_format( + SequenceT& Input, + FinderT Finder, + FormatterT Formatter) + { + // Concept check + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_const_iterator::type> + )); + BOOST_CONCEPT_ASSERT(( + FormatterConcept< + FormatterT, + FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> + )); + + detail::find_format_impl( + Input, + Formatter, + Finder(::boost::begin(Input), ::boost::end(Input))); + } + + +// find_format_all generic ----------------------------------------------------------------// + + //! Generic replace all algorithm + /*! + Use the Finder to search for a substring. Use the Formatter to format + this substring and replace it in the input. Repeat this for all matching + substrings. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input sequence + \param Finder A Finder object used to search for a match to be replaced + \param Formatter A Formatter object used to format a match + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename RangeT, + typename FinderT, + typename FormatterT> + inline OutputIteratorT find_format_all_copy( + OutputIteratorT Output, + const RangeT& Input, + FinderT Finder, + FormatterT Formatter) + { + // Concept check + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_const_iterator::type> + )); + BOOST_CONCEPT_ASSERT(( + FormatterConcept< + FormatterT, + FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> + )); + + iterator_range::type> lit_input(::boost::as_literal(Input)); + + return detail::find_format_all_copy_impl( + Output, + lit_input, + Finder, + Formatter, + Finder(::boost::begin(lit_input), ::boost::end(lit_input))); + } + + //! Generic replace all algorithm + /*! + \overload + */ + template< + typename SequenceT, + typename FinderT, + typename FormatterT > + inline SequenceT find_format_all_copy( + const SequenceT& Input, + FinderT Finder, + FormatterT Formatter ) + { + // Concept check + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_const_iterator::type> + )); + BOOST_CONCEPT_ASSERT(( + FormatterConcept< + FormatterT, + FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> + )); + + return detail::find_format_all_copy_impl( + Input, + Finder, + Formatter, + Finder( ::boost::begin(Input), ::boost::end(Input) ) ); + } + + //! Generic replace all algorithm + /*! + Use the Finder to search for a substring. Use the Formatter to format + this substring and replace it in the input. Repeat this for all matching + substrings.The input is modified in-place. + + \param Input An input sequence + \param Finder A Finder object used to search for a match to be replaced + \param Formatter A Formatter object used to format a match + */ + template< + typename SequenceT, + typename FinderT, + typename FormatterT > + inline void find_format_all( + SequenceT& Input, + FinderT Finder, + FormatterT Formatter ) + { + // Concept check + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_const_iterator::type> + )); + BOOST_CONCEPT_ASSERT(( + FormatterConcept< + FormatterT, + FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> + )); + + detail::find_format_all_impl( + Input, + Finder, + Formatter, + Finder(::boost::begin(Input), ::boost::end(Input))); + + } + + } // namespace algorithm + + // pull the names to the boost namespace + using algorithm::find_format_copy; + using algorithm::find_format; + using algorithm::find_format_all_copy; + using algorithm::find_format_all; + +} // namespace boost + + +#endif // BOOST_STRING_FIND_FORMAT_HPP diff --git a/contrib/src/boost/algorithm/string/find_iterator.hpp b/contrib/src/boost/algorithm/string/find_iterator.hpp new file mode 100644 index 0000000..5a52d92 --- /dev/null +++ b/contrib/src/boost/algorithm/string/find_iterator.hpp @@ -0,0 +1,388 @@ +// Boost string_algo library find_iterator.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2004. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_ITERATOR_HPP +#define BOOST_STRING_FIND_ITERATOR_HPP + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +/*! \file + Defines find iterator classes. Find iterator repeatedly applies a Finder + to the specified input string to search for matches. Dereferencing + the iterator yields the current match or a range between the last and the current + match depending on the iterator used. +*/ + +namespace boost { + namespace algorithm { + +// find_iterator -----------------------------------------------// + + //! find_iterator + /*! + Find iterator encapsulates a Finder and allows + for incremental searching in a string. + Each increment moves the iterator to the next match. + + Find iterator is a readable forward traversal iterator. + + Dereferencing the iterator yields an iterator_range delimiting + the current match. + */ + template + class find_iterator : + public iterator_facade< + find_iterator, + const iterator_range, + forward_traversal_tag >, + private detail::find_iterator_base + { + private: + // facade support + friend class ::boost::iterator_core_access; + + private: + // typedefs + + typedef detail::find_iterator_base base_type; + typedef BOOST_STRING_TYPENAME + base_type::input_iterator_type input_iterator_type; + typedef BOOST_STRING_TYPENAME + base_type::match_type match_type; + + public: + //! Default constructor + /*! + Construct null iterator. All null iterators are equal. + + \post eof()==true + */ + find_iterator() {} + + //! Copy constructor + /*! + Construct a copy of the find_iterator + */ + find_iterator( const find_iterator& Other ) : + base_type(Other), + m_Match(Other.m_Match), + m_End(Other.m_End) {} + + //! Constructor + /*! + Construct new find_iterator for a given finder + and a range. + */ + template + find_iterator( + IteratorT Begin, + IteratorT End, + FinderT Finder ) : + detail::find_iterator_base(Finder,0), + m_Match(Begin,Begin), + m_End(End) + { + increment(); + } + + //! Constructor + /*! + Construct new find_iterator for a given finder + and a range. + */ + template + find_iterator( + RangeT& Col, + FinderT Finder ) : + detail::find_iterator_base(Finder,0) + { + iterator_range::type> lit_col(::boost::as_literal(Col)); + m_Match=::boost::make_iterator_range(::boost::begin(lit_col), ::boost::begin(lit_col)); + m_End=::boost::end(lit_col); + + increment(); + } + + private: + // iterator operations + + // dereference + const match_type& dereference() const + { + return m_Match; + } + + // increment + void increment() + { + m_Match=this->do_find(m_Match.end(),m_End); + } + + // comparison + bool equal( const find_iterator& Other ) const + { + bool bEof=eof(); + bool bOtherEof=Other.eof(); + + return bEof || bOtherEof ? bEof==bOtherEof : + ( + m_Match==Other.m_Match && + m_End==Other.m_End + ); + } + + public: + // operations + + //! Eof check + /*! + Check the eof condition. Eof condition means that + there is nothing more to be searched i.e. find_iterator + is after the last match. + */ + bool eof() const + { + return + this->is_null() || + ( + m_Match.begin() == m_End && + m_Match.end() == m_End + ); + } + + private: + // Attributes + match_type m_Match; + input_iterator_type m_End; + }; + + //! find iterator construction helper + /*! + * Construct a find iterator to iterate through the specified string + */ + template + inline find_iterator< + BOOST_STRING_TYPENAME range_iterator::type> + make_find_iterator( + RangeT& Collection, + FinderT Finder) + { + return find_iterator::type>( + Collection, Finder); + } + +// split iterator -----------------------------------------------// + + //! split_iterator + /*! + Split iterator encapsulates a Finder and allows + for incremental searching in a string. + Unlike the find iterator, split iterator iterates + through gaps between matches. + + Find iterator is a readable forward traversal iterator. + + Dereferencing the iterator yields an iterator_range delimiting + the current match. + */ + template + class split_iterator : + public iterator_facade< + split_iterator, + const iterator_range, + forward_traversal_tag >, + private detail::find_iterator_base + { + private: + // facade support + friend class ::boost::iterator_core_access; + + private: + // typedefs + + typedef detail::find_iterator_base base_type; + typedef BOOST_STRING_TYPENAME + base_type::input_iterator_type input_iterator_type; + typedef BOOST_STRING_TYPENAME + base_type::match_type match_type; + + public: + //! Default constructor + /*! + Construct null iterator. All null iterators are equal. + + \post eof()==true + */ + split_iterator() : + m_Next(), + m_End(), + m_bEof(true) + {} + + //! Copy constructor + /*! + Construct a copy of the split_iterator + */ + split_iterator( const split_iterator& Other ) : + base_type(Other), + m_Match(Other.m_Match), + m_Next(Other.m_Next), + m_End(Other.m_End), + m_bEof(Other.m_bEof) + {} + + //! Constructor + /*! + Construct new split_iterator for a given finder + and a range. + */ + template + split_iterator( + IteratorT Begin, + IteratorT End, + FinderT Finder ) : + detail::find_iterator_base(Finder,0), + m_Match(Begin,Begin), + m_Next(Begin), + m_End(End), + m_bEof(false) + { + // force the correct behavior for empty sequences and yield at least one token + if(Begin!=End) + { + increment(); + } + } + //! Constructor + /*! + Construct new split_iterator for a given finder + and a collection. + */ + template + split_iterator( + RangeT& Col, + FinderT Finder ) : + detail::find_iterator_base(Finder,0), + m_bEof(false) + { + iterator_range::type> lit_col(::boost::as_literal(Col)); + m_Match=make_iterator_range(::boost::begin(lit_col), ::boost::begin(lit_col)); + m_Next=::boost::begin(lit_col); + m_End=::boost::end(lit_col); + + // force the correct behavior for empty sequences and yield at least one token + if(m_Next!=m_End) + { + increment(); + } + } + + + private: + // iterator operations + + // dereference + const match_type& dereference() const + { + return m_Match; + } + + // increment + void increment() + { + match_type FindMatch=this->do_find( m_Next, m_End ); + + if(FindMatch.begin()==m_End && FindMatch.end()==m_End) + { + if(m_Match.end()==m_End) + { + // Mark iterator as eof + m_bEof=true; + } + } + + m_Match=match_type( m_Next, FindMatch.begin() ); + m_Next=FindMatch.end(); + } + + // comparison + bool equal( const split_iterator& Other ) const + { + bool bEof=eof(); + bool bOtherEof=Other.eof(); + + return bEof || bOtherEof ? bEof==bOtherEof : + ( + m_Match==Other.m_Match && + m_Next==Other.m_Next && + m_End==Other.m_End + ); + } + + public: + // operations + + //! Eof check + /*! + Check the eof condition. Eof condition means that + there is nothing more to be searched i.e. find_iterator + is after the last match. + */ + bool eof() const + { + return this->is_null() || m_bEof; + } + + private: + // Attributes + match_type m_Match; + input_iterator_type m_Next; + input_iterator_type m_End; + bool m_bEof; + }; + + //! split iterator construction helper + /*! + * Construct a split iterator to iterate through the specified collection + */ + template + inline split_iterator< + BOOST_STRING_TYPENAME range_iterator::type> + make_split_iterator( + RangeT& Collection, + FinderT Finder) + { + return split_iterator::type>( + Collection, Finder); + } + + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::find_iterator; + using algorithm::make_find_iterator; + using algorithm::split_iterator; + using algorithm::make_split_iterator; + +} // namespace boost + + +#endif // BOOST_STRING_FIND_ITERATOR_HPP diff --git a/contrib/src/boost/algorithm/string/finder.hpp b/contrib/src/boost/algorithm/string/finder.hpp new file mode 100644 index 0000000..93f7ec3 --- /dev/null +++ b/contrib/src/boost/algorithm/string/finder.hpp @@ -0,0 +1,270 @@ +// Boost string_algo library finder.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FINDER_HPP +#define BOOST_STRING_FINDER_HPP + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file + Defines Finder generators. Finder object is a functor which is able to + find a substring matching a specific criteria in the input. + Finders are used as a pluggable components for replace, find + and split facilities. This header contains generator functions + for finders provided in this library. +*/ + +namespace boost { + namespace algorithm { + +// Finder generators ------------------------------------------// + + //! "First" finder + /*! + Construct the \c first_finder. The finder searches for the first + occurrence of the string in a given input. + The result is given as an \c iterator_range delimiting the match. + + \param Search A substring to be searched for. + \param Comp An element comparison predicate + \return An instance of the \c first_finder object + */ + template + inline detail::first_finderF< + BOOST_STRING_TYPENAME range_const_iterator::type, + is_equal> + first_finder( const RangeT& Search ) + { + return + detail::first_finderF< + BOOST_STRING_TYPENAME + range_const_iterator::type, + is_equal>( ::boost::as_literal(Search), is_equal() ) ; + } + + //! "First" finder + /*! + \overload + */ + template + inline detail::first_finderF< + BOOST_STRING_TYPENAME range_const_iterator::type, + PredicateT> + first_finder( + const RangeT& Search, PredicateT Comp ) + { + return + detail::first_finderF< + BOOST_STRING_TYPENAME + range_const_iterator::type, + PredicateT>( ::boost::as_literal(Search), Comp ); + } + + //! "Last" finder + /*! + Construct the \c last_finder. The finder searches for the last + occurrence of the string in a given input. + The result is given as an \c iterator_range delimiting the match. + + \param Search A substring to be searched for. + \param Comp An element comparison predicate + \return An instance of the \c last_finder object + */ + template + inline detail::last_finderF< + BOOST_STRING_TYPENAME range_const_iterator::type, + is_equal> + last_finder( const RangeT& Search ) + { + return + detail::last_finderF< + BOOST_STRING_TYPENAME + range_const_iterator::type, + is_equal>( ::boost::as_literal(Search), is_equal() ); + } + //! "Last" finder + /*! + \overload + */ + template + inline detail::last_finderF< + BOOST_STRING_TYPENAME range_const_iterator::type, + PredicateT> + last_finder( const RangeT& Search, PredicateT Comp ) + { + return + detail::last_finderF< + BOOST_STRING_TYPENAME + range_const_iterator::type, + PredicateT>( ::boost::as_literal(Search), Comp ) ; + } + + //! "Nth" finder + /*! + Construct the \c nth_finder. The finder searches for the n-th (zero-indexed) + occurrence of the string in a given input. + The result is given as an \c iterator_range delimiting the match. + + \param Search A substring to be searched for. + \param Nth An index of the match to be find + \param Comp An element comparison predicate + \return An instance of the \c nth_finder object + */ + template + inline detail::nth_finderF< + BOOST_STRING_TYPENAME range_const_iterator::type, + is_equal> + nth_finder( + const RangeT& Search, + int Nth) + { + return + detail::nth_finderF< + BOOST_STRING_TYPENAME + range_const_iterator::type, + is_equal>( ::boost::as_literal(Search), Nth, is_equal() ) ; + } + //! "Nth" finder + /*! + \overload + */ + template + inline detail::nth_finderF< + BOOST_STRING_TYPENAME range_const_iterator::type, + PredicateT> + nth_finder( + const RangeT& Search, + int Nth, + PredicateT Comp ) + { + return + detail::nth_finderF< + BOOST_STRING_TYPENAME + range_const_iterator::type, + PredicateT>( ::boost::as_literal(Search), Nth, Comp ); + } + + //! "Head" finder + /*! + Construct the \c head_finder. The finder returns a head of a given + input. The head is a prefix of a string up to n elements in + size. If an input has less then n elements, whole input is + considered a head. + The result is given as an \c iterator_range delimiting the match. + + \param N The size of the head + \return An instance of the \c head_finder object + */ + inline detail::head_finderF + head_finder( int N ) + { + return detail::head_finderF(N); + } + + //! "Tail" finder + /*! + Construct the \c tail_finder. The finder returns a tail of a given + input. The tail is a suffix of a string up to n elements in + size. If an input has less then n elements, whole input is + considered a head. + The result is given as an \c iterator_range delimiting the match. + + \param N The size of the head + \return An instance of the \c tail_finder object + */ + inline detail::tail_finderF + tail_finder( int N ) + { + return detail::tail_finderF(N); + } + + //! "Token" finder + /*! + Construct the \c token_finder. The finder searches for a token + specified by a predicate. It is similar to std::find_if + algorithm, with an exception that it return a range of + instead of a single iterator. + + If "compress token mode" is enabled, adjacent matching tokens are + concatenated into one match. Thus the finder can be used to + search for continuous segments of characters satisfying the + given predicate. + + The result is given as an \c iterator_range delimiting the match. + + \param Pred An element selection predicate + \param eCompress Compress flag + \return An instance of the \c token_finder object + */ + template< typename PredicateT > + inline detail::token_finderF + token_finder( + PredicateT Pred, + token_compress_mode_type eCompress=token_compress_off ) + { + return detail::token_finderF( Pred, eCompress ); + } + + //! "Range" finder + /*! + Construct the \c range_finder. The finder does not perform + any operation. It simply returns the given range for + any input. + + \param Begin Beginning of the range + \param End End of the range + \param Range The range. + \return An instance of the \c range_finger object + */ + template< typename ForwardIteratorT > + inline detail::range_finderF + range_finder( + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + return detail::range_finderF( Begin, End ); + } + + //! "Range" finder + /*! + \overload + */ + template< typename ForwardIteratorT > + inline detail::range_finderF + range_finder( iterator_range Range ) + { + return detail::range_finderF( Range ); + } + + } // namespace algorithm + + // pull the names to the boost namespace + using algorithm::first_finder; + using algorithm::last_finder; + using algorithm::nth_finder; + using algorithm::head_finder; + using algorithm::tail_finder; + using algorithm::token_finder; + using algorithm::range_finder; + +} // namespace boost + + +#endif // BOOST_STRING_FINDER_HPP diff --git a/contrib/src/boost/algorithm/string/formatter.hpp b/contrib/src/boost/algorithm/string/formatter.hpp new file mode 100644 index 0000000..de8681b --- /dev/null +++ b/contrib/src/boost/algorithm/string/formatter.hpp @@ -0,0 +1,120 @@ +// Boost string_algo library formatter.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FORMATTER_HPP +#define BOOST_STRING_FORMATTER_HPP + +#include +#include +#include +#include + +#include + +/*! \file + Defines Formatter generators. Formatter is a functor which formats + a string according to given parameters. A Formatter works + in conjunction with a Finder. A Finder can provide additional information + for a specific Formatter. An example of such a cooperation is regex_finder + and regex_formatter. + + Formatters are used as pluggable components for replace facilities. + This header contains generator functions for the Formatters provided in this library. +*/ + +namespace boost { + namespace algorithm { + +// generic formatters ---------------------------------------------------------------// + + //! Constant formatter + /*! + Constructs a \c const_formatter. Const formatter always returns + the same value, regardless of the parameter. + + \param Format A predefined value used as a result for formatting + \return An instance of the \c const_formatter object. + */ + template + inline detail::const_formatF< + iterator_range< + BOOST_STRING_TYPENAME range_const_iterator::type> > + const_formatter(const RangeT& Format) + { + return detail::const_formatF< + iterator_range< + BOOST_STRING_TYPENAME range_const_iterator::type> >(::boost::as_literal(Format)); + } + + //! Identity formatter + /*! + Constructs an \c identity_formatter. Identity formatter always returns + the parameter. + + \return An instance of the \c identity_formatter object. + */ + template + inline detail::identity_formatF< + iterator_range< + BOOST_STRING_TYPENAME range_const_iterator::type> > + identity_formatter() + { + return detail::identity_formatF< + iterator_range< + BOOST_STRING_TYPENAME range_const_iterator::type> >(); + } + + //! Empty formatter + /*! + Constructs an \c empty_formatter. Empty formatter always returns an empty + sequence. + + \param Input container used to select a correct value_type for the + resulting empty_container<>. + \return An instance of the \c empty_formatter object. + */ + template + inline detail::empty_formatF< + BOOST_STRING_TYPENAME range_value::type> + empty_formatter(const RangeT&) + { + return detail::empty_formatF< + BOOST_STRING_TYPENAME range_value::type>(); + } + + //! Empty formatter + /*! + Constructs a \c dissect_formatter. Dissect formatter uses a specified finder + to extract a portion of the formatted sequence. The first finder's match is returned + as a result + + \param Finder a finder used to select a portion of the formatted sequence + \return An instance of the \c dissect_formatter object. + */ + template + inline detail::dissect_formatF< FinderT > + dissect_formatter(const FinderT& Finder) + { + return detail::dissect_formatF(Finder); + } + + + } // namespace algorithm + + // pull the names to the boost namespace + using algorithm::const_formatter; + using algorithm::identity_formatter; + using algorithm::empty_formatter; + using algorithm::dissect_formatter; + +} // namespace boost + + +#endif // BOOST_FORMATTER_HPP diff --git a/contrib/src/boost/algorithm/string/iter_find.hpp b/contrib/src/boost/algorithm/string/iter_find.hpp new file mode 100644 index 0000000..10424ab --- /dev/null +++ b/contrib/src/boost/algorithm/string/iter_find.hpp @@ -0,0 +1,193 @@ +// Boost string_algo library iter_find.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_ITER_FIND_HPP +#define BOOST_STRING_ITER_FIND_HPP + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file + Defines generic split algorithms. Split algorithms can be + used to divide a sequence into several part according + to a given criteria. Result is given as a 'container + of containers' where elements are copies or references + to extracted parts. + + There are two algorithms provided. One iterates over matching + substrings, the other one over the gaps between these matches. +*/ + +namespace boost { + namespace algorithm { + +// iterate find ---------------------------------------------------// + + //! Iter find algorithm + /*! + This algorithm executes a given finder in iteration on the input, + until the end of input is reached, or no match is found. + Iteration is done using built-in find_iterator, so the real + searching is performed only when needed. + In each iteration new match is found and added to the result. + + \param Result A 'container container' to contain the result of search. + Both outer and inner container must have constructor taking a pair + of iterators as an argument. + Typical type of the result is + \c std::vector> + (each element of such a vector will container a range delimiting + a match). + \param Input A container which will be searched. + \param Finder A Finder object used for searching + \return A reference to the result + + \note Prior content of the result will be overwritten. + */ + template< + typename SequenceSequenceT, + typename RangeT, + typename FinderT > + inline SequenceSequenceT& + iter_find( + SequenceSequenceT& Result, + RangeT& Input, + FinderT Finder ) + { + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_iterator::type> + )); + + iterator_range::type> lit_input(::boost::as_literal(Input)); + + typedef BOOST_STRING_TYPENAME + range_iterator::type input_iterator_type; + typedef find_iterator find_iterator_type; + typedef detail::copy_iterator_rangeF< + BOOST_STRING_TYPENAME + range_value::type, + input_iterator_type> copy_range_type; + + input_iterator_type InputEnd=::boost::end(lit_input); + + typedef transform_iterator + transform_iter_type; + + transform_iter_type itBegin= + ::boost::make_transform_iterator( + find_iterator_type( ::boost::begin(lit_input), InputEnd, Finder ), + copy_range_type()); + + transform_iter_type itEnd= + ::boost::make_transform_iterator( + find_iterator_type(), + copy_range_type()); + + SequenceSequenceT Tmp(itBegin, itEnd); + + Result.swap(Tmp); + return Result; + } + +// iterate split ---------------------------------------------------// + + //! Split find algorithm + /*! + This algorithm executes a given finder in iteration on the input, + until the end of input is reached, or no match is found. + Iteration is done using built-in find_iterator, so the real + searching is performed only when needed. + Each match is used as a separator of segments. These segments are then + returned in the result. + + \param Result A 'container container' to contain the result of search. + Both outer and inner container must have constructor taking a pair + of iterators as an argument. + Typical type of the result is + \c std::vector> + (each element of such a vector will container a range delimiting + a match). + \param Input A container which will be searched. + \param Finder A finder object used for searching + \return A reference to the result + + \note Prior content of the result will be overwritten. + */ + template< + typename SequenceSequenceT, + typename RangeT, + typename FinderT > + inline SequenceSequenceT& + iter_split( + SequenceSequenceT& Result, + RangeT& Input, + FinderT Finder ) + { + BOOST_CONCEPT_ASSERT(( + FinderConcept::type> + )); + + iterator_range::type> lit_input(::boost::as_literal(Input)); + + typedef BOOST_STRING_TYPENAME + range_iterator::type input_iterator_type; + typedef split_iterator find_iterator_type; + typedef detail::copy_iterator_rangeF< + BOOST_STRING_TYPENAME + range_value::type, + input_iterator_type> copy_range_type; + + input_iterator_type InputEnd=::boost::end(lit_input); + + typedef transform_iterator + transform_iter_type; + + transform_iter_type itBegin= + ::boost::make_transform_iterator( + find_iterator_type( ::boost::begin(lit_input), InputEnd, Finder ), + copy_range_type() ); + + transform_iter_type itEnd= + ::boost::make_transform_iterator( + find_iterator_type(), + copy_range_type() ); + + SequenceSequenceT Tmp(itBegin, itEnd); + + Result.swap(Tmp); + return Result; + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::iter_find; + using algorithm::iter_split; + +} // namespace boost + + +#endif // BOOST_STRING_ITER_FIND_HPP diff --git a/contrib/src/boost/algorithm/string/join.hpp b/contrib/src/boost/algorithm/string/join.hpp new file mode 100644 index 0000000..b871eb4 --- /dev/null +++ b/contrib/src/boost/algorithm/string/join.hpp @@ -0,0 +1,145 @@ +// Boost string_algo library join.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_JOIN_HPP +#define BOOST_STRING_JOIN_HPP + +#include +#include +#include +#include + +/*! \file + Defines join algorithm. + + Join algorithm is a counterpart to split algorithms. + It joins strings from a 'list' by adding user defined separator. + Additionally there is a version that allows simple filtering + by providing a predicate. +*/ + +namespace boost { + namespace algorithm { + +// join --------------------------------------------------------------// + + //! Join algorithm + /*! + This algorithm joins all strings in a 'list' into one long string. + Segments are concatenated by given separator. + + \param Input A container that holds the input strings. It must be a container-of-containers. + \param Separator A string that will separate the joined segments. + \return Concatenated string. + + \note This function provides the strong exception-safety guarantee + */ + template< typename SequenceSequenceT, typename Range1T> + inline typename range_value::type + join( + const SequenceSequenceT& Input, + const Range1T& Separator) + { + // Define working types + typedef typename range_value::type ResultT; + typedef typename range_const_iterator::type InputIteratorT; + + // Parse input + InputIteratorT itBegin=::boost::begin(Input); + InputIteratorT itEnd=::boost::end(Input); + + // Construct container to hold the result + ResultT Result; + + // Append first element + if(itBegin!=itEnd) + { + detail::insert(Result, ::boost::end(Result), *itBegin); + ++itBegin; + } + + for(;itBegin!=itEnd; ++itBegin) + { + // Add separator + detail::insert(Result, ::boost::end(Result), ::boost::as_literal(Separator)); + // Add element + detail::insert(Result, ::boost::end(Result), *itBegin); + } + + return Result; + } + +// join_if ----------------------------------------------------------// + + //! Conditional join algorithm + /*! + This algorithm joins all strings in a 'list' into one long string. + Segments are concatenated by given separator. Only segments that + satisfy the predicate will be added to the result. + + \param Input A container that holds the input strings. It must be a container-of-containers. + \param Separator A string that will separate the joined segments. + \param Pred A segment selection predicate + \return Concatenated string. + + \note This function provides the strong exception-safety guarantee + */ + template< typename SequenceSequenceT, typename Range1T, typename PredicateT> + inline typename range_value::type + join_if( + const SequenceSequenceT& Input, + const Range1T& Separator, + PredicateT Pred) + { + // Define working types + typedef typename range_value::type ResultT; + typedef typename range_const_iterator::type InputIteratorT; + + // Parse input + InputIteratorT itBegin=::boost::begin(Input); + InputIteratorT itEnd=::boost::end(Input); + + // Construct container to hold the result + ResultT Result; + + // Roll to the first element that will be added + while(itBegin!=itEnd && !Pred(*itBegin)) ++itBegin; + // Add this element + if(itBegin!=itEnd) + { + detail::insert(Result, ::boost::end(Result), *itBegin); + ++itBegin; + } + + for(;itBegin!=itEnd; ++itBegin) + { + if(Pred(*itBegin)) + { + // Add separator + detail::insert(Result, ::boost::end(Result), ::boost::as_literal(Separator)); + // Add element + detail::insert(Result, ::boost::end(Result), *itBegin); + } + } + + return Result; + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::join; + using algorithm::join_if; + +} // namespace boost + + +#endif // BOOST_STRING_JOIN_HPP + diff --git a/contrib/src/boost/algorithm/string/predicate.hpp b/contrib/src/boost/algorithm/string/predicate.hpp new file mode 100644 index 0000000..0879829 --- /dev/null +++ b/contrib/src/boost/algorithm/string/predicate.hpp @@ -0,0 +1,475 @@ +// Boost string_algo library predicate.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_PREDICATE_HPP +#define BOOST_STRING_PREDICATE_HPP + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file boost/algorithm/string/predicate.hpp + Defines string-related predicates. + The predicates determine whether a substring is contained in the input string + under various conditions: a string starts with the substring, ends with the + substring, simply contains the substring or if both strings are equal. + Additionaly the algorithm \c all() checks all elements of a container to satisfy a + condition. + + All predicates provide the strong exception guarantee. +*/ + +namespace boost { + namespace algorithm { + +// starts_with predicate -----------------------------------------------// + + //! 'Starts with' predicate + /*! + This predicate holds when the test string is a prefix of the Input. + In other words, if the input starts with the test. + When the optional predicate is specified, it is used for character-wise + comparison. + + \param Input An input sequence + \param Test A test sequence + \param Comp An element comparison predicate + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool starts_with( + const Range1T& Input, + const Range2T& Test, + PredicateT Comp) + { + iterator_range::type> lit_input(::boost::as_literal(Input)); + iterator_range::type> lit_test(::boost::as_literal(Test)); + + typedef BOOST_STRING_TYPENAME + range_const_iterator::type Iterator1T; + typedef BOOST_STRING_TYPENAME + range_const_iterator::type Iterator2T; + + Iterator1T InputEnd=::boost::end(lit_input); + Iterator2T TestEnd=::boost::end(lit_test); + + Iterator1T it=::boost::begin(lit_input); + Iterator2T pit=::boost::begin(lit_test); + for(; + it!=InputEnd && pit!=TestEnd; + ++it,++pit) + { + if( !(Comp(*it,*pit)) ) + return false; + } + + return pit==TestEnd; + } + + //! 'Starts with' predicate + /*! + \overload + */ + template + inline bool starts_with( + const Range1T& Input, + const Range2T& Test) + { + return ::boost::algorithm::starts_with(Input, Test, is_equal()); + } + + //! 'Starts with' predicate ( case insensitive ) + /*! + This predicate holds when the test string is a prefix of the Input. + In other words, if the input starts with the test. + Elements are compared case insensitively. + + \param Input An input sequence + \param Test A test sequence + \param Loc A locale used for case insensitive comparison + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool istarts_with( + const Range1T& Input, + const Range2T& Test, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::starts_with(Input, Test, is_iequal(Loc)); + } + + +// ends_with predicate -----------------------------------------------// + + //! 'Ends with' predicate + /*! + This predicate holds when the test string is a suffix of the Input. + In other words, if the input ends with the test. + When the optional predicate is specified, it is used for character-wise + comparison. + + + \param Input An input sequence + \param Test A test sequence + \param Comp An element comparison predicate + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool ends_with( + const Range1T& Input, + const Range2T& Test, + PredicateT Comp) + { + iterator_range::type> lit_input(::boost::as_literal(Input)); + iterator_range::type> lit_test(::boost::as_literal(Test)); + + typedef BOOST_STRING_TYPENAME + range_const_iterator::type Iterator1T; + typedef BOOST_STRING_TYPENAME boost::detail:: + iterator_traits::iterator_category category; + + return detail:: + ends_with_iter_select( + ::boost::begin(lit_input), + ::boost::end(lit_input), + ::boost::begin(lit_test), + ::boost::end(lit_test), + Comp, + category()); + } + + + //! 'Ends with' predicate + /*! + \overload + */ + template + inline bool ends_with( + const Range1T& Input, + const Range2T& Test) + { + return ::boost::algorithm::ends_with(Input, Test, is_equal()); + } + + //! 'Ends with' predicate ( case insensitive ) + /*! + This predicate holds when the test container is a suffix of the Input. + In other words, if the input ends with the test. + Elements are compared case insensitively. + + \param Input An input sequence + \param Test A test sequence + \param Loc A locale used for case insensitive comparison + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool iends_with( + const Range1T& Input, + const Range2T& Test, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::ends_with(Input, Test, is_iequal(Loc)); + } + +// contains predicate -----------------------------------------------// + + //! 'Contains' predicate + /*! + This predicate holds when the test container is contained in the Input. + When the optional predicate is specified, it is used for character-wise + comparison. + + \param Input An input sequence + \param Test A test sequence + \param Comp An element comparison predicate + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool contains( + const Range1T& Input, + const Range2T& Test, + PredicateT Comp) + { + iterator_range::type> lit_input(::boost::as_literal(Input)); + iterator_range::type> lit_test(::boost::as_literal(Test)); + + if (::boost::empty(lit_test)) + { + // Empty range is contained always + return true; + } + + // Use the temporary variable to make VACPP happy + bool bResult=(::boost::algorithm::first_finder(lit_test,Comp)(::boost::begin(lit_input), ::boost::end(lit_input))); + return bResult; + } + + //! 'Contains' predicate + /*! + \overload + */ + template + inline bool contains( + const Range1T& Input, + const Range2T& Test) + { + return ::boost::algorithm::contains(Input, Test, is_equal()); + } + + //! 'Contains' predicate ( case insensitive ) + /*! + This predicate holds when the test container is contained in the Input. + Elements are compared case insensitively. + + \param Input An input sequence + \param Test A test sequence + \param Loc A locale used for case insensitive comparison + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool icontains( + const Range1T& Input, + const Range2T& Test, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::contains(Input, Test, is_iequal(Loc)); + } + +// equals predicate -----------------------------------------------// + + //! 'Equals' predicate + /*! + This predicate holds when the test container is equal to the + input container i.e. all elements in both containers are same. + When the optional predicate is specified, it is used for character-wise + comparison. + + \param Input An input sequence + \param Test A test sequence + \param Comp An element comparison predicate + \return The result of the test + + \note This is a two-way version of \c std::equal algorithm + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool equals( + const Range1T& Input, + const Range2T& Test, + PredicateT Comp) + { + iterator_range::type> lit_input(::boost::as_literal(Input)); + iterator_range::type> lit_test(::boost::as_literal(Test)); + + typedef BOOST_STRING_TYPENAME + range_const_iterator::type Iterator1T; + typedef BOOST_STRING_TYPENAME + range_const_iterator::type Iterator2T; + + Iterator1T InputEnd=::boost::end(lit_input); + Iterator2T TestEnd=::boost::end(lit_test); + + Iterator1T it=::boost::begin(lit_input); + Iterator2T pit=::boost::begin(lit_test); + for(; + it!=InputEnd && pit!=TestEnd; + ++it,++pit) + { + if( !(Comp(*it,*pit)) ) + return false; + } + + return (pit==TestEnd) && (it==InputEnd); + } + + //! 'Equals' predicate + /*! + \overload + */ + template + inline bool equals( + const Range1T& Input, + const Range2T& Test) + { + return ::boost::algorithm::equals(Input, Test, is_equal()); + } + + //! 'Equals' predicate ( case insensitive ) + /*! + This predicate holds when the test container is equal to the + input container i.e. all elements in both containers are same. + Elements are compared case insensitively. + + \param Input An input sequence + \param Test A test sequence + \param Loc A locale used for case insensitive comparison + \return The result of the test + + \note This is a two-way version of \c std::equal algorithm + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool iequals( + const Range1T& Input, + const Range2T& Test, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::equals(Input, Test, is_iequal(Loc)); + } + +// lexicographical_compare predicate -----------------------------// + + //! Lexicographical compare predicate + /*! + This predicate is an overload of std::lexicographical_compare + for range arguments + + It check whether the first argument is lexicographically less + then the second one. + + If the optional predicate is specified, it is used for character-wise + comparison + + \param Arg1 First argument + \param Arg2 Second argument + \param Pred Comparison predicate + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool lexicographical_compare( + const Range1T& Arg1, + const Range2T& Arg2, + PredicateT Pred) + { + iterator_range::type> lit_arg1(::boost::as_literal(Arg1)); + iterator_range::type> lit_arg2(::boost::as_literal(Arg2)); + + return std::lexicographical_compare( + ::boost::begin(lit_arg1), + ::boost::end(lit_arg1), + ::boost::begin(lit_arg2), + ::boost::end(lit_arg2), + Pred); + } + + //! Lexicographical compare predicate + /*! + \overload + */ + template + inline bool lexicographical_compare( + const Range1T& Arg1, + const Range2T& Arg2) + { + return ::boost::algorithm::lexicographical_compare(Arg1, Arg2, is_less()); + } + + //! Lexicographical compare predicate (case-insensitive) + /*! + This predicate is an overload of std::lexicographical_compare + for range arguments. + It check whether the first argument is lexicographically less + then the second one. + Elements are compared case insensitively + + + \param Arg1 First argument + \param Arg2 Second argument + \param Loc A locale used for case insensitive comparison + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool ilexicographical_compare( + const Range1T& Arg1, + const Range2T& Arg2, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::lexicographical_compare(Arg1, Arg2, is_iless(Loc)); + } + + +// all predicate -----------------------------------------------// + + //! 'All' predicate + /*! + This predicate holds it all its elements satisfy a given + condition, represented by the predicate. + + \param Input An input sequence + \param Pred A predicate + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool all( + const RangeT& Input, + PredicateT Pred) + { + iterator_range::type> lit_input(::boost::as_literal(Input)); + + typedef BOOST_STRING_TYPENAME + range_const_iterator::type Iterator1T; + + Iterator1T InputEnd=::boost::end(lit_input); + for( Iterator1T It=::boost::begin(lit_input); It!=InputEnd; ++It) + { + if (!Pred(*It)) + return false; + } + + return true; + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::starts_with; + using algorithm::istarts_with; + using algorithm::ends_with; + using algorithm::iends_with; + using algorithm::contains; + using algorithm::icontains; + using algorithm::equals; + using algorithm::iequals; + using algorithm::all; + using algorithm::lexicographical_compare; + using algorithm::ilexicographical_compare; + +} // namespace boost + + +#endif // BOOST_STRING_PREDICATE_HPP diff --git a/contrib/src/boost/algorithm/string/predicate_facade.hpp b/contrib/src/boost/algorithm/string/predicate_facade.hpp new file mode 100644 index 0000000..a9753fc --- /dev/null +++ b/contrib/src/boost/algorithm/string/predicate_facade.hpp @@ -0,0 +1,42 @@ +// Boost string_algo library predicate_facade.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_PREDICATE_FACADE_HPP +#define BOOST_STRING_PREDICATE_FACADE_HPP + +#include + +/* + \file boost/algorith/string/predicate_facade.hpp + This file contains predicate_facade definition. This template class is used + to identify classification predicates, so they can be combined using + composition operators. +*/ + +namespace boost { + namespace algorithm { + +// predicate facade ------------------------------------------------------// + + //! Predicate facade + /*! + This class allows to recognize classification + predicates, so that they can be combined using + composition operators. + Every classification predicate must be derived from this class. + */ + template + struct predicate_facade {}; + + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_CLASSIFICATION_DETAIL_HPP diff --git a/contrib/src/boost/algorithm/string/replace.hpp b/contrib/src/boost/algorithm/string/replace.hpp new file mode 100644 index 0000000..0c04e47 --- /dev/null +++ b/contrib/src/boost/algorithm/string/replace.hpp @@ -0,0 +1,928 @@ +// Boost string_algo library replace.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_REPLACE_HPP +#define BOOST_STRING_REPLACE_HPP + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +/*! \file + Defines various replace algorithms. Each algorithm replaces + part(s) of the input according to set of searching and replace criteria. +*/ + +namespace boost { + namespace algorithm { + +// replace_range --------------------------------------------------------------------// + + //! Replace range algorithm + /*! + Replace the given range in the input string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param SearchRange A range in the input to be substituted + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT replace_range_copy( + OutputIteratorT Output, + const Range1T& Input, + const iterator_range< + BOOST_STRING_TYPENAME + range_const_iterator::type>& SearchRange, + const Range2T& Format) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::range_finder(SearchRange), + ::boost::algorithm::const_formatter(Format)); + } + + //! Replace range algorithm + /*! + \overload + */ + template + inline SequenceT replace_range_copy( + const SequenceT& Input, + const iterator_range< + BOOST_STRING_TYPENAME + range_const_iterator::type>& SearchRange, + const RangeT& Format) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::range_finder(SearchRange), + ::boost::algorithm::const_formatter(Format)); + } + + //! Replace range algorithm + /*! + Replace the given range in the input string. + The input sequence is modified in-place. + + \param Input An input string + \param SearchRange A range in the input to be substituted + \param Format A substitute string + */ + template + inline void replace_range( + SequenceT& Input, + const iterator_range< + BOOST_STRING_TYPENAME + range_iterator::type>& SearchRange, + const RangeT& Format) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::range_finder(SearchRange), + ::boost::algorithm::const_formatter(Format)); + } + +// replace_first --------------------------------------------------------------------// + + //! Replace first algorithm + /*! + Replace the first match of the search substring in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT replace_first_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const Range3T& Format) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace first algorithm + /*! + \overload + */ + template + inline SequenceT replace_first_copy( + const SequenceT& Input, + const Range1T& Search, + const Range2T& Format ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace first algorithm + /*! + replace the first match of the search substring in the input + with the format string. The input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + */ + template + inline void replace_first( + SequenceT& Input, + const Range1T& Search, + const Range2T& Format ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_first ( case insensitive ) ---------------------------------------------// + + //! Replace first algorithm ( case insensitive ) + /*! + Replace the first match of the search substring in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT ireplace_first_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const Range3T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace first algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ireplace_first_copy( + const SequenceT& Input, + const Range2T& Search, + const Range1T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace first algorithm ( case insensitive ) + /*! + Replace the first match of the search substring in the input + with the format string. Input sequence is modified in-place. + Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + */ + template + inline void ireplace_first( + SequenceT& Input, + const Range1T& Search, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_last --------------------------------------------------------------------// + + //! Replace last algorithm + /*! + Replace the last match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT replace_last_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const Range3T& Format ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::last_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace last algorithm + /*! + \overload + */ + template + inline SequenceT replace_last_copy( + const SequenceT& Input, + const Range1T& Search, + const Range2T& Format ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::last_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace last algorithm + /*! + Replace the last match of the search string in the input + with the format string. Input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + */ + template + inline void replace_last( + SequenceT& Input, + const Range1T& Search, + const Range2T& Format ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::last_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_last ( case insensitive ) -----------------------------------------------// + + //! Replace last algorithm ( case insensitive ) + /*! + Replace the last match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT ireplace_last_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const Range3T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::last_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace last algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ireplace_last_copy( + const SequenceT& Input, + const Range1T& Search, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::last_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace last algorithm ( case insensitive ) + /*! + Replace the last match of the search string in the input + with the format string.The input sequence is modified in-place. + Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + \return A reference to the modified input + */ + template + inline void ireplace_last( + SequenceT& Input, + const Range1T& Search, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::last_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_nth --------------------------------------------------------------------// + + //! Replace nth algorithm + /*! + Replace an Nth (zero-indexed) match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT replace_nth_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + int Nth, + const Range3T& Format ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::nth_finder(Search, Nth), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace nth algorithm + /*! + \overload + */ + template + inline SequenceT replace_nth_copy( + const SequenceT& Input, + const Range1T& Search, + int Nth, + const Range2T& Format ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::nth_finder(Search, Nth), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace nth algorithm + /*! + Replace an Nth (zero-indexed) match of the search string in the input + with the format string. Input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \param Format A substitute string + */ + template + inline void replace_nth( + SequenceT& Input, + const Range1T& Search, + int Nth, + const Range2T& Format ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::nth_finder(Search, Nth), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_nth ( case insensitive ) -----------------------------------------------// + + //! Replace nth algorithm ( case insensitive ) + /*! + Replace an Nth (zero-indexed) match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT ireplace_nth_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + int Nth, + const Range3T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc) ), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace nth algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ireplace_nth_copy( + const SequenceT& Input, + const Range1T& Search, + int Nth, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace nth algorithm ( case insensitive ) + /*! + Replace an Nth (zero-indexed) match of the search string in the input + with the format string. Input sequence is modified in-place. + Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + */ + template + inline void ireplace_nth( + SequenceT& Input, + const Range1T& Search, + int Nth, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_all --------------------------------------------------------------------// + + //! Replace all algorithm + /*! + Replace all occurrences of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT replace_all_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const Range3T& Format ) + { + return ::boost::algorithm::find_format_all_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace all algorithm + /*! + \overload + */ + template + inline SequenceT replace_all_copy( + const SequenceT& Input, + const Range1T& Search, + const Range2T& Format ) + { + return ::boost::algorithm::find_format_all_copy( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace all algorithm + /*! + Replace all occurrences of the search string in the input + with the format string. The input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \return A reference to the modified input + */ + template + inline void replace_all( + SequenceT& Input, + const Range1T& Search, + const Range2T& Format ) + { + ::boost::algorithm::find_format_all( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_all ( case insensitive ) -----------------------------------------------// + + //! Replace all algorithm ( case insensitive ) + /*! + Replace all occurrences of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT ireplace_all_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const Range3T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_all_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace all algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ireplace_all_copy( + const SequenceT& Input, + const Range1T& Search, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_all_copy( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace all algorithm ( case insensitive ) + /*! + Replace all occurrences of the search string in the input + with the format string.The input sequence is modified in-place. + Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + */ + template + inline void ireplace_all( + SequenceT& Input, + const Range1T& Search, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format_all( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_head --------------------------------------------------------------------// + + //! Replace head algorithm + /*! + Replace the head of the input with the given format string. + The head is a prefix of a string of given size. + If the sequence is shorter then required, whole string if + considered to be the head. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param N Length of the head. + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT replace_head_copy( + OutputIteratorT Output, + const Range1T& Input, + int N, + const Range2T& Format ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::head_finder(N), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace head algorithm + /*! + \overload + */ + template + inline SequenceT replace_head_copy( + const SequenceT& Input, + int N, + const RangeT& Format ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::head_finder(N), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace head algorithm + /*! + Replace the head of the input with the given format string. + The head is a prefix of a string of given size. + If the sequence is shorter then required, the whole string is + considered to be the head. The input sequence is modified in-place. + + \param Input An input string + \param N Length of the head. + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \param Format A substitute string + */ + template + inline void replace_head( + SequenceT& Input, + int N, + const RangeT& Format ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::head_finder(N), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_tail --------------------------------------------------------------------// + + //! Replace tail algorithm + /*! + Replace the tail of the input with the given format string. + The tail is a suffix of a string of given size. + If the sequence is shorter then required, whole string is + considered to be the tail. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param N Length of the tail. + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT replace_tail_copy( + OutputIteratorT Output, + const Range1T& Input, + int N, + const Range2T& Format ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::tail_finder(N), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace tail algorithm + /*! + \overload + */ + template + inline SequenceT replace_tail_copy( + const SequenceT& Input, + int N, + const RangeT& Format ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::tail_finder(N), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace tail algorithm + /*! + Replace the tail of the input with the given format sequence. + The tail is a suffix of a string of given size. + If the sequence is shorter then required, the whole string is + considered to be the tail. The input sequence is modified in-place. + + \param Input An input string + \param N Length of the tail. + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \param Format A substitute string + */ + template + inline void replace_tail( + SequenceT& Input, + int N, + const RangeT& Format ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::tail_finder(N), + ::boost::algorithm::const_formatter(Format) ); + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::replace_range_copy; + using algorithm::replace_range; + using algorithm::replace_first_copy; + using algorithm::replace_first; + using algorithm::ireplace_first_copy; + using algorithm::ireplace_first; + using algorithm::replace_last_copy; + using algorithm::replace_last; + using algorithm::ireplace_last_copy; + using algorithm::ireplace_last; + using algorithm::replace_nth_copy; + using algorithm::replace_nth; + using algorithm::ireplace_nth_copy; + using algorithm::ireplace_nth; + using algorithm::replace_all_copy; + using algorithm::replace_all; + using algorithm::ireplace_all_copy; + using algorithm::ireplace_all; + using algorithm::replace_head_copy; + using algorithm::replace_head; + using algorithm::replace_tail_copy; + using algorithm::replace_tail; + +} // namespace boost + +#endif // BOOST_REPLACE_HPP diff --git a/contrib/src/boost/algorithm/string/sequence_traits.hpp b/contrib/src/boost/algorithm/string/sequence_traits.hpp new file mode 100644 index 0000000..be151f8 --- /dev/null +++ b/contrib/src/boost/algorithm/string/sequence_traits.hpp @@ -0,0 +1,120 @@ +// Boost string_algo library sequence_traits.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_SEQUENCE_TRAITS_HPP +#define BOOST_STRING_SEQUENCE_TRAITS_HPP + +#include +#include +#include + +/*! \file + Traits defined in this header are used by various algorithms to achieve + better performance for specific containers. + Traits provide fail-safe defaults. If a container supports some of these + features, it is possible to specialize the specific trait for this container. + For lacking compilers, it is possible of define an override for a specific tester + function. + + Due to a language restriction, it is not currently possible to define specializations for + stl containers without including the corresponding header. To decrease the overhead + needed by this inclusion, user can selectively include a specialization + header for a specific container. They are located in boost/algorithm/string/stl + directory. Alternatively she can include boost/algorithm/string/std_collection_traits.hpp + header which contains specializations for all stl containers. +*/ + +namespace boost { + namespace algorithm { + +// sequence traits -----------------------------------------------// + + + //! Native replace trait + /*! + This trait specifies that the sequence has \c std::string like replace method + */ + template< typename T > + class has_native_replace + { + + public: +# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = false }; +# else + BOOST_STATIC_CONSTANT(bool, value=false); +# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + + + typedef mpl::bool_::value> type; + }; + + + //! Stable iterators trait + /*! + This trait specifies that the sequence has stable iterators. It means + that operations like insert/erase/replace do not invalidate iterators. + */ + template< typename T > + class has_stable_iterators + { + public: +# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = false }; +# else + BOOST_STATIC_CONSTANT(bool, value=false); +# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + + typedef mpl::bool_::value> type; + }; + + + //! Const time insert trait + /*! + This trait specifies that the sequence's insert method has + constant time complexity. + */ + template< typename T > + class has_const_time_insert + { + public: +# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = false }; +# else + BOOST_STATIC_CONSTANT(bool, value=false); +# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + + typedef mpl::bool_::value> type; + }; + + + //! Const time erase trait + /*! + This trait specifies that the sequence's erase method has + constant time complexity. + */ + template< typename T > + class has_const_time_erase + { + public: +# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = false }; +# else + BOOST_STATIC_CONSTANT(bool, value=false); +# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + + typedef mpl::bool_::value> type; + }; + + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_SEQUENCE_TRAITS_HPP diff --git a/contrib/src/boost/algorithm/string/split.hpp b/contrib/src/boost/algorithm/string/split.hpp new file mode 100644 index 0000000..cae712c --- /dev/null +++ b/contrib/src/boost/algorithm/string/split.hpp @@ -0,0 +1,163 @@ +// Boost string_algo library split.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_SPLIT_HPP +#define BOOST_STRING_SPLIT_HPP + +#include + +#include +#include +#include + +/*! \file + Defines basic split algorithms. + Split algorithms can be used to divide a string + into several parts according to given criteria. + + Each part is copied and added as a new element to the + output container. + Thus the result container must be able to hold copies + of the matches (in a compatible structure like std::string) or + a reference to it (e.g. using the iterator range class). + Examples of such a container are \c std::vector + or \c std::list> +*/ + +namespace boost { + namespace algorithm { + +// find_all ------------------------------------------------------------// + + //! Find all algorithm + /*! + This algorithm finds all occurrences of the search string + in the input. + + Each part is copied and added as a new element to the + output container. + Thus the result container must be able to hold copies + of the matches (in a compatible structure like std::string) or + a reference to it (e.g. using the iterator range class). + Examples of such a container are \c std::vector + or \c std::list> + + \param Result A container that can hold copies of references to the substrings + \param Input A container which will be searched. + \param Search A substring to be searched for. + \return A reference the result + + \note Prior content of the result will be overwritten. + + \note This function provides the strong exception-safety guarantee + */ + template< typename SequenceSequenceT, typename Range1T, typename Range2T > + inline SequenceSequenceT& find_all( + SequenceSequenceT& Result, + Range1T& Input, + const Range2T& Search) + { + return ::boost::algorithm::iter_find( + Result, + Input, + ::boost::algorithm::first_finder(Search) ); + } + + //! Find all algorithm ( case insensitive ) + /*! + This algorithm finds all occurrences of the search string + in the input. + Each part is copied and added as a new element to the + output container. Thus the result container must be able to hold copies + of the matches (in a compatible structure like std::string) or + a reference to it (e.g. using the iterator range class). + Examples of such a container are \c std::vector + or \c std::list> + + Searching is case insensitive. + + \param Result A container that can hold copies of references to the substrings + \param Input A container which will be searched. + \param Search A substring to be searched for. + \param Loc A locale used for case insensitive comparison + \return A reference the result + + \note Prior content of the result will be overwritten. + + \note This function provides the strong exception-safety guarantee + */ + template< typename SequenceSequenceT, typename Range1T, typename Range2T > + inline SequenceSequenceT& ifind_all( + SequenceSequenceT& Result, + Range1T& Input, + const Range2T& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::iter_find( + Result, + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc) ) ); + } + + +// tokenize -------------------------------------------------------------// + + //! Split algorithm + /*! + Tokenize expression. This function is equivalent to C strtok. Input + sequence is split into tokens, separated by separators. Separators + are given by means of the predicate. + + Each part is copied and added as a new element to the + output container. + Thus the result container must be able to hold copies + of the matches (in a compatible structure like std::string) or + a reference to it (e.g. using the iterator range class). + Examples of such a container are \c std::vector + or \c std::list> + + \param Result A container that can hold copies of references to the substrings + \param Input A container which will be searched. + \param Pred A predicate to identify separators. This predicate is + supposed to return true if a given element is a separator. + \param eCompress If eCompress argument is set to token_compress_on, adjacent + separators are merged together. Otherwise, every two separators + delimit a token. + \return A reference the result + + \note Prior content of the result will be overwritten. + + \note This function provides the strong exception-safety guarantee + */ + template< typename SequenceSequenceT, typename RangeT, typename PredicateT > + inline SequenceSequenceT& split( + SequenceSequenceT& Result, + RangeT& Input, + PredicateT Pred, + token_compress_mode_type eCompress=token_compress_off ) + { + return ::boost::algorithm::iter_split( + Result, + Input, + ::boost::algorithm::token_finder( Pred, eCompress ) ); + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::find_all; + using algorithm::ifind_all; + using algorithm::split; + +} // namespace boost + + +#endif // BOOST_STRING_SPLIT_HPP + diff --git a/contrib/src/boost/algorithm/string/std/list_traits.hpp b/contrib/src/boost/algorithm/string/std/list_traits.hpp new file mode 100644 index 0000000..a3cf7bb --- /dev/null +++ b/contrib/src/boost/algorithm/string/std/list_traits.hpp @@ -0,0 +1,68 @@ +// Boost string_algo library list_traits.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_STD_LIST_TRAITS_HPP +#define BOOST_STRING_STD_LIST_TRAITS_HPP + +#include +#include +#include + +namespace boost { + namespace algorithm { + +// std::list<> traits -----------------------------------------------// + + + // stable iterators trait + template + class has_stable_iterators< ::std::list > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_::value> type; + }; + + // const time insert trait + template + class has_const_time_insert< ::std::list > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_::value> type; + }; + + // const time erase trait + template + class has_const_time_erase< ::std::list > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_::value> type; + }; + + + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_STD_LIST_TRAITS_HPP diff --git a/contrib/src/boost/algorithm/string/std/slist_traits.hpp b/contrib/src/boost/algorithm/string/std/slist_traits.hpp new file mode 100644 index 0000000..c30b93c --- /dev/null +++ b/contrib/src/boost/algorithm/string/std/slist_traits.hpp @@ -0,0 +1,69 @@ +// Boost string_algo library slist_traits.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_STD_SLIST_TRAITS_HPP +#define BOOST_STRING_STD_SLIST_TRAITS_HPP + +#include +#include +#include BOOST_SLIST_HEADER +#include + +namespace boost { + namespace algorithm { + +// SGI's std::slist<> traits -----------------------------------------------// + + + // stable iterators trait + template + class has_stable_iterators< BOOST_STD_EXTENSION_NAMESPACE::slist > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_::value> type; + }; + + // const time insert trait + template + class has_const_time_insert< BOOST_STD_EXTENSION_NAMESPACE::slist > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_::value> type; + }; + + // const time erase trait + template + class has_const_time_erase< BOOST_STD_EXTENSION_NAMESPACE::slist > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_::value> type; + }; + + + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_STD_LIST_TRAITS_HPP diff --git a/contrib/src/boost/algorithm/string/std/string_traits.hpp b/contrib/src/boost/algorithm/string/std/string_traits.hpp new file mode 100644 index 0000000..c940830 --- /dev/null +++ b/contrib/src/boost/algorithm/string/std/string_traits.hpp @@ -0,0 +1,44 @@ +// Boost string_algo library string_traits.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_STD_STRING_TRAITS_HPP +#define BOOST_STRING_STD_STRING_TRAITS_HPP + +#include +#include +#include + +namespace boost { + namespace algorithm { + +// std::basic_string<> traits -----------------------------------------------// + + + // native replace trait + template + class has_native_replace< std::basic_string > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true } ; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + + typedef mpl::bool_::value> type; + }; + + + + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_LIST_TRAITS_HPP diff --git a/contrib/src/boost/algorithm/string/std_containers_traits.hpp b/contrib/src/boost/algorithm/string/std_containers_traits.hpp new file mode 100644 index 0000000..3f02246 --- /dev/null +++ b/contrib/src/boost/algorithm/string/std_containers_traits.hpp @@ -0,0 +1,26 @@ +// Boost string_algo library std_containers_traits.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_STD_CONTAINERS_TRAITS_HPP +#define BOOST_STRING_STD_CONTAINERS_TRAITS_HPP + +/*!\file + This file includes sequence traits for stl containers. +*/ + +#include +#include +#include + +#ifdef BOOST_HAS_SLIST +# include +#endif + +#endif // BOOST_STRING_STD_CONTAINERS_TRAITS_HPP diff --git a/contrib/src/boost/algorithm/string/trim.hpp b/contrib/src/boost/algorithm/string/trim.hpp new file mode 100644 index 0000000..e740d57 --- /dev/null +++ b/contrib/src/boost/algorithm/string/trim.hpp @@ -0,0 +1,398 @@ +// Boost string_algo library trim.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_TRIM_HPP +#define BOOST_STRING_TRIM_HPP + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file + Defines trim algorithms. + Trim algorithms are used to remove trailing and leading spaces from a + sequence (string). Space is recognized using given locales. + + Parametric (\c _if) variants use a predicate (functor) to select which characters + are to be trimmed.. + Functions take a selection predicate as a parameter, which is used to determine + whether a character is a space. Common predicates are provided in classification.hpp header. + +*/ + +namespace boost { + namespace algorithm { + + // left trim -----------------------------------------------// + + + //! Left trim - parametric + /*! + Remove all leading spaces from the input. + The supplied predicate is used to determine which characters are considered spaces. + The result is a trimmed copy of the input. It is returned as a sequence + or copied to the output iterator + + \param Output An output iterator to which the result will be copied + \param Input An input range + \param IsSpace A unary predicate identifying spaces + \return + An output iterator pointing just after the last inserted character or + a copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template + inline OutputIteratorT trim_left_copy_if( + OutputIteratorT Output, + const RangeT& Input, + PredicateT IsSpace) + { + iterator_range::type> lit_range(::boost::as_literal(Input)); + + std::copy( + ::boost::algorithm::detail::trim_begin( + ::boost::begin(lit_range), + ::boost::end(lit_range), + IsSpace ), + ::boost::end(lit_range), + Output); + + return Output; + } + + //! Left trim - parametric + /*! + \overload + */ + template + inline SequenceT trim_left_copy_if(const SequenceT& Input, PredicateT IsSpace) + { + return SequenceT( + ::boost::algorithm::detail::trim_begin( + ::boost::begin(Input), + ::boost::end(Input), + IsSpace ), + ::boost::end(Input)); + } + + //! Left trim - parametric + /*! + Remove all leading spaces from the input. + The result is a trimmed copy of the input. + + \param Input An input sequence + \param Loc a locale used for 'space' classification + \return A trimmed copy of the input + + \note This function provides the strong exception-safety guarantee + */ + template + inline SequenceT trim_left_copy(const SequenceT& Input, const std::locale& Loc=std::locale()) + { + return + ::boost::algorithm::trim_left_copy_if( + Input, + is_space(Loc)); + } + + //! Left trim + /*! + Remove all leading spaces from the input. The supplied predicate is + used to determine which characters are considered spaces. + The input sequence is modified in-place. + + \param Input An input sequence + \param IsSpace A unary predicate identifying spaces + */ + template + inline void trim_left_if(SequenceT& Input, PredicateT IsSpace) + { + Input.erase( + ::boost::begin(Input), + ::boost::algorithm::detail::trim_begin( + ::boost::begin(Input), + ::boost::end(Input), + IsSpace)); + } + + //! Left trim + /*! + Remove all leading spaces from the input. + The Input sequence is modified in-place. + + \param Input An input sequence + \param Loc A locale used for 'space' classification + */ + template + inline void trim_left(SequenceT& Input, const std::locale& Loc=std::locale()) + { + ::boost::algorithm::trim_left_if( + Input, + is_space(Loc)); + } + + // right trim -----------------------------------------------// + + //! Right trim - parametric + /*! + Remove all trailing spaces from the input. + The supplied predicate is used to determine which characters are considered spaces. + The result is a trimmed copy of the input. It is returned as a sequence + or copied to the output iterator + + \param Output An output iterator to which the result will be copied + \param Input An input range + \param IsSpace A unary predicate identifying spaces + \return + An output iterator pointing just after the last inserted character or + a copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template + inline OutputIteratorT trim_right_copy_if( + OutputIteratorT Output, + const RangeT& Input, + PredicateT IsSpace ) + { + iterator_range::type> lit_range(::boost::as_literal(Input)); + + std::copy( + ::boost::begin(lit_range), + ::boost::algorithm::detail::trim_end( + ::boost::begin(lit_range), + ::boost::end(lit_range), + IsSpace ), + Output ); + + return Output; + } + + //! Right trim - parametric + /*! + \overload + */ + template + inline SequenceT trim_right_copy_if(const SequenceT& Input, PredicateT IsSpace) + { + return SequenceT( + ::boost::begin(Input), + ::boost::algorithm::detail::trim_end( + ::boost::begin(Input), + ::boost::end(Input), + IsSpace) + ); + } + + //! Right trim + /*! + Remove all trailing spaces from the input. + The result is a trimmed copy of the input + + \param Input An input sequence + \param Loc A locale used for 'space' classification + \return A trimmed copy of the input + + \note This function provides the strong exception-safety guarantee + */ + template + inline SequenceT trim_right_copy(const SequenceT& Input, const std::locale& Loc=std::locale()) + { + return + ::boost::algorithm::trim_right_copy_if( + Input, + is_space(Loc)); + } + + + //! Right trim - parametric + /*! + Remove all trailing spaces from the input. + The supplied predicate is used to determine which characters are considered spaces. + The input sequence is modified in-place. + + \param Input An input sequence + \param IsSpace A unary predicate identifying spaces + */ + template + inline void trim_right_if(SequenceT& Input, PredicateT IsSpace) + { + Input.erase( + ::boost::algorithm::detail::trim_end( + ::boost::begin(Input), + ::boost::end(Input), + IsSpace ), + ::boost::end(Input) + ); + } + + + //! Right trim + /*! + Remove all trailing spaces from the input. + The input sequence is modified in-place. + + \param Input An input sequence + \param Loc A locale used for 'space' classification + */ + template + inline void trim_right(SequenceT& Input, const std::locale& Loc=std::locale()) + { + ::boost::algorithm::trim_right_if( + Input, + is_space(Loc) ); + } + + // both side trim -----------------------------------------------// + + //! Trim - parametric + /*! + Remove all trailing and leading spaces from the input. + The supplied predicate is used to determine which characters are considered spaces. + The result is a trimmed copy of the input. It is returned as a sequence + or copied to the output iterator + + \param Output An output iterator to which the result will be copied + \param Input An input range + \param IsSpace A unary predicate identifying spaces + \return + An output iterator pointing just after the last inserted character or + a copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template + inline OutputIteratorT trim_copy_if( + OutputIteratorT Output, + const RangeT& Input, + PredicateT IsSpace) + { + iterator_range::type> lit_range(::boost::as_literal(Input)); + + BOOST_STRING_TYPENAME + range_const_iterator::type TrimEnd= + ::boost::algorithm::detail::trim_end( + ::boost::begin(lit_range), + ::boost::end(lit_range), + IsSpace); + + std::copy( + detail::trim_begin( + ::boost::begin(lit_range), TrimEnd, IsSpace), + TrimEnd, + Output + ); + + return Output; + } + + //! Trim - parametric + /*! + \overload + */ + template + inline SequenceT trim_copy_if(const SequenceT& Input, PredicateT IsSpace) + { + BOOST_STRING_TYPENAME + range_const_iterator::type TrimEnd= + ::boost::algorithm::detail::trim_end( + ::boost::begin(Input), + ::boost::end(Input), + IsSpace); + + return SequenceT( + detail::trim_begin( + ::boost::begin(Input), + TrimEnd, + IsSpace), + TrimEnd + ); + } + + //! Trim + /*! + Remove all leading and trailing spaces from the input. + The result is a trimmed copy of the input + + \param Input An input sequence + \param Loc A locale used for 'space' classification + \return A trimmed copy of the input + + \note This function provides the strong exception-safety guarantee + */ + template + inline SequenceT trim_copy( const SequenceT& Input, const std::locale& Loc=std::locale() ) + { + return + ::boost::algorithm::trim_copy_if( + Input, + is_space(Loc) ); + } + + //! Trim + /*! + Remove all leading and trailing spaces from the input. + The supplied predicate is used to determine which characters are considered spaces. + The input sequence is modified in-place. + + \param Input An input sequence + \param IsSpace A unary predicate identifying spaces + */ + template + inline void trim_if(SequenceT& Input, PredicateT IsSpace) + { + ::boost::algorithm::trim_right_if( Input, IsSpace ); + ::boost::algorithm::trim_left_if( Input, IsSpace ); + } + + //! Trim + /*! + Remove all leading and trailing spaces from the input. + The input sequence is modified in-place. + + \param Input An input sequence + \param Loc A locale used for 'space' classification + */ + template + inline void trim(SequenceT& Input, const std::locale& Loc=std::locale()) + { + ::boost::algorithm::trim_if( + Input, + is_space( Loc ) ); + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::trim_left; + using algorithm::trim_left_if; + using algorithm::trim_left_copy; + using algorithm::trim_left_copy_if; + using algorithm::trim_right; + using algorithm::trim_right_if; + using algorithm::trim_right_copy; + using algorithm::trim_right_copy_if; + using algorithm::trim; + using algorithm::trim_if; + using algorithm::trim_copy; + using algorithm::trim_copy_if; + +} // namespace boost + +#endif // BOOST_STRING_TRIM_HPP diff --git a/contrib/src/boost/algorithm/string/yes_no_type.hpp b/contrib/src/boost/algorithm/string/yes_no_type.hpp new file mode 100644 index 0000000..b76cc6c --- /dev/null +++ b/contrib/src/boost/algorithm/string/yes_no_type.hpp @@ -0,0 +1,33 @@ +// Boost string_algo library yes_no_type.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_YES_NO_TYPE_DETAIL_HPP +#define BOOST_STRING_YES_NO_TYPE_DETAIL_HPP + +namespace boost { + namespace algorithm { + + // taken from boost mailing-list + // when yes_no_type will become officially + // a part of boost distribution, this header + // will be deprecated + template struct size_descriptor + { + typedef char (& type)[I]; + }; + + typedef size_descriptor<1>::type yes_type; + typedef size_descriptor<2>::type no_type; + + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_YES_NO_TYPE_DETAIL_HPP diff --git a/contrib/src/boost/assert.hpp b/contrib/src/boost/assert.hpp new file mode 100644 index 0000000..9650d7a --- /dev/null +++ b/contrib/src/boost/assert.hpp @@ -0,0 +1,85 @@ +// +// boost/assert.hpp - BOOST_ASSERT(expr) +// BOOST_ASSERT_MSG(expr, msg) +// BOOST_VERIFY(expr) +// BOOST_VERIFY_MSG(expr, msg) +// BOOST_ASSERT_IS_VOID +// +// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2007, 2014 Peter Dimov +// Copyright (c) Beman Dawes 2011 +// Copyright (c) 2015 Ion Gaztanaga +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// Note: There are no include guards. This is intentional. +// +// See http://www.boost.org/libs/assert/assert.html for documentation. +// + +// +// Stop inspect complaining about use of 'assert': +// +// boostinspect:naassert_macro +// + +// +// BOOST_ASSERT, BOOST_ASSERT_MSG, BOOST_ASSERT_IS_VOID +// + +#undef BOOST_ASSERT +#undef BOOST_ASSERT_MSG +#undef BOOST_ASSERT_IS_VOID + +#if defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) ) + +# define BOOST_ASSERT(expr) ((void)0) +# define BOOST_ASSERT_MSG(expr, msg) ((void)0) +# define BOOST_ASSERT_IS_VOID + +#elif defined(BOOST_ENABLE_ASSERT_HANDLER) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG) ) + +#include // for BOOST_LIKELY +#include + +namespace boost +{ + void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined + void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line); // user defined +} // namespace boost + +#define BOOST_ASSERT(expr) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) +#define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) + +#else + +# include // .h to support old libraries w/o - effect is the same + +# define BOOST_ASSERT(expr) assert(expr) +# define BOOST_ASSERT_MSG(expr, msg) assert((expr)&&(msg)) +#if defined(NDEBUG) +# define BOOST_ASSERT_IS_VOID +#endif + +#endif + +// +// BOOST_VERIFY, BOOST_VERIFY_MSG +// + +#undef BOOST_VERIFY +#undef BOOST_VERIFY_MSG + +#if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) ) + +# define BOOST_VERIFY(expr) ((void)(expr)) +# define BOOST_VERIFY_MSG(expr, msg) ((void)(expr)) + +#else + +# define BOOST_VERIFY(expr) BOOST_ASSERT(expr) +# define BOOST_VERIFY_MSG(expr, msg) BOOST_ASSERT_MSG(expr,msg) + +#endif diff --git a/contrib/src/boost/bind/mem_fn.hpp b/contrib/src/boost/bind/mem_fn.hpp new file mode 100644 index 0000000..956e7d8 --- /dev/null +++ b/contrib/src/boost/bind/mem_fn.hpp @@ -0,0 +1,389 @@ +#ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED +#define BOOST_BIND_MEM_FN_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// mem_fn.hpp - a generalization of std::mem_fun[_ref] +// +// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2001 David Abrahams +// Copyright (c) 2003-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +#include +#include +#include + +namespace boost +{ + +#if defined(BOOST_NO_VOID_RETURNS) + +#define BOOST_MEM_FN_CLASS_F , class F +#define BOOST_MEM_FN_TYPEDEF(X) + +namespace _mfi // mem_fun_impl +{ + +template struct mf +{ + +#define BOOST_MEM_FN_RETURN return + +#define BOOST_MEM_FN_NAME(X) inner_##X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#undef BOOST_MEM_FN_RETURN + +}; // struct mf + +template<> struct mf +{ + +#define BOOST_MEM_FN_RETURN + +#define BOOST_MEM_FN_NAME(X) inner_##X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#undef BOOST_MEM_FN_RETURN + +}; // struct mf + +#undef BOOST_MEM_FN_CLASS_F +#undef BOOST_MEM_FN_TYPEDEF_F + +#define BOOST_MEM_FN_NAME(X) X +#define BOOST_MEM_FN_NAME2(X) inner_##X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_NAME2 +#undef BOOST_MEM_FN_CC + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) X##_cdecl +#define BOOST_MEM_FN_NAME2(X) inner_##X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_NAME2 +#undef BOOST_MEM_FN_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) X##_stdcall +#define BOOST_MEM_FN_NAME2(X) inner_##X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_NAME2 +#undef BOOST_MEM_FN_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) X##_fastcall +#define BOOST_MEM_FN_NAME2(X) inner_##X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_NAME2 +#undef BOOST_MEM_FN_CC + +#endif + +} // namespace _mfi + +#else // #ifdef BOOST_NO_VOID_RETURNS + +#define BOOST_MEM_FN_CLASS_F +#define BOOST_MEM_FN_TYPEDEF(X) typedef X; + +namespace _mfi +{ + +#define BOOST_MEM_FN_RETURN return + +#define BOOST_MEM_FN_NAME(X) X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#undef BOOST_MEM_FN_RETURN + +} // namespace _mfi + +#undef BOOST_MEM_FN_CLASS_F +#undef BOOST_MEM_FN_TYPEDEF + +#endif // #ifdef BOOST_NO_VOID_RETURNS + +#define BOOST_MEM_FN_NAME(X) X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_CC + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_CC + +#endif + +// data member support + +namespace _mfi +{ + +template class dm +{ +public: + + typedef R const & result_type; + typedef T const * argument_type; + +private: + + typedef R (T::*F); + F f_; + + template R const & call(U & u, T const *) const + { + return (u.*f_); + } + + template R const & call(U & u, void const *) const + { + return (get_pointer(u)->*f_); + } + +public: + + explicit dm(F f): f_(f) {} + + R & operator()(T * p) const + { + return (p->*f_); + } + + R const & operator()(T const * p) const + { + return (p->*f_); + } + + template R const & operator()(U const & u) const + { + return call(u, &u); + } + +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__MWERKS__, < 0x3200) + + R & operator()(T & t) const + { + return (t.*f_); + } + + R const & operator()(T const & t) const + { + return (t.*f_); + } + +#endif + + bool operator==(dm const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(dm const & rhs) const + { + return f_ != rhs.f_; + } +}; + +} // namespace _mfi + +template _mfi::dm mem_fn(R T::*f) +{ + return _mfi::dm(f); +} + +} // namespace boost + +#endif // #ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED diff --git a/contrib/src/boost/bind/mem_fn_cc.hpp b/contrib/src/boost/bind/mem_fn_cc.hpp new file mode 100644 index 0000000..8b6ea0b --- /dev/null +++ b/contrib/src/boost/bind/mem_fn_cc.hpp @@ -0,0 +1,103 @@ +// +// bind/mem_fn_cc.hpp - support for different calling conventions +// +// Do not include this header directly. +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +template _mfi::BOOST_MEM_FN_NAME(mf0) mem_fn(R (BOOST_MEM_FN_CC T::*f) ()) +{ + return _mfi::BOOST_MEM_FN_NAME(mf0)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf0) mem_fn(R (BOOST_MEM_FN_CC T::*f) () const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf0)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf1) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf1)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf1) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf1)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf2) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf2)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf2) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf2)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf3) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf3)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf3) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf3)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf4) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf4)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf4) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf4)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf5) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf5)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf5) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf5)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf6) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf6)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf6) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf6)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf7) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf7)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf7) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf7)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf8) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf8)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf8) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf8)(f); +} diff --git a/contrib/src/boost/bind/mem_fn_template.hpp b/contrib/src/boost/bind/mem_fn_template.hpp new file mode 100644 index 0000000..b26d585 --- /dev/null +++ b/contrib/src/boost/bind/mem_fn_template.hpp @@ -0,0 +1,1047 @@ +// +// bind/mem_fn_template.hpp +// +// Do not include this header directly +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) +# define BOOST_MEM_FN_ENABLE_CONST_OVERLOADS +#endif + +// mf0 + +template class BOOST_MEM_FN_NAME(mf0) +{ +public: + + typedef R result_type; + typedef T * argument_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) ()) + F f_; + + template R call(U & u, T const *) const + { + BOOST_MEM_FN_RETURN (u.*f_)(); + } + + template R call(U & u, void const *) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf0)(F f): f_(f) {} + + R operator()(T * p) const + { + BOOST_MEM_FN_RETURN (p->*f_)(); + } + + template R operator()(U & u) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p); + } + +#endif + + R operator()(T & t) const + { + BOOST_MEM_FN_RETURN (t.*f_)(); + } + + bool operator==(BOOST_MEM_FN_NAME(mf0) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf0) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf0 + +template class BOOST_MEM_FN_NAME(cmf0) +{ +public: + + typedef R result_type; + typedef T const * argument_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) () const) + F f_; + + template R call(U & u, T const *) const + { + BOOST_MEM_FN_RETURN (u.*f_)(); + } + + template R call(U & u, void const *) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf0)(F f): f_(f) {} + + template R operator()(U const & u) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p); + } + + R operator()(T const & t) const + { + BOOST_MEM_FN_RETURN (t.*f_)(); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf0) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf0) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf1 + +template class BOOST_MEM_FN_NAME(mf1) +{ +public: + + typedef R result_type; + typedef T * first_argument_type; + typedef A1 second_argument_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1)) + F f_; + + template R call(U & u, T const *, B1 & b1) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1); + } + + template R call(U & u, void const *, B1 & b1) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf1)(F f): f_(f) {} + + R operator()(T * p, A1 a1) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1); + } + + template R operator()(U & u, A1 a1) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1); + } + +#endif + + R operator()(T & t, A1 a1) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1); + } + + bool operator==(BOOST_MEM_FN_NAME(mf1) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf1) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf1 + +template class BOOST_MEM_FN_NAME(cmf1) +{ +public: + + typedef R result_type; + typedef T const * first_argument_type; + typedef A1 second_argument_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1) const) + F f_; + + template R call(U & u, T const *, B1 & b1) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1); + } + + template R call(U & u, void const *, B1 & b1) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf1)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1); + } + + R operator()(T const & t, A1 a1) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf1) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf1) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf2 + +template class BOOST_MEM_FN_NAME(mf2) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf2)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2); + } + + template R operator()(U & u, A1 a1, A2 a2) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2); + } + + bool operator==(BOOST_MEM_FN_NAME(mf2) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf2) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf2 + +template class BOOST_MEM_FN_NAME(cmf2) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf2)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2); + } + + R operator()(T const & t, A1 a1, A2 a2) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf2) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf2) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf3 + +template class BOOST_MEM_FN_NAME(mf3) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf3)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3); + } + + bool operator==(BOOST_MEM_FN_NAME(mf3) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf3) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf3 + +template class BOOST_MEM_FN_NAME(cmf3) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf3)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf3) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf3) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf4 + +template class BOOST_MEM_FN_NAME(mf4) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf4)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4); + } + + bool operator==(BOOST_MEM_FN_NAME(mf4) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf4) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf4 + +template class BOOST_MEM_FN_NAME(cmf4) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf4)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf4) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf4) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf5 + +template class BOOST_MEM_FN_NAME(mf5) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf5)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5); + } + + bool operator==(BOOST_MEM_FN_NAME(mf5) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf5) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf5 + +template class BOOST_MEM_FN_NAME(cmf5) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf5)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf5) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf5) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf6 + +template class BOOST_MEM_FN_NAME(mf6) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf6)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6); + } + + bool operator==(BOOST_MEM_FN_NAME(mf6) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf6) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf6 + +template class BOOST_MEM_FN_NAME(cmf6) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf6)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf6) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf6) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf7 + +template class BOOST_MEM_FN_NAME(mf7) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf7)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7); + } + + bool operator==(BOOST_MEM_FN_NAME(mf7) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf7) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf7 + +template class BOOST_MEM_FN_NAME(cmf7) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf7)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf7) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf7) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf8 + +template class BOOST_MEM_FN_NAME(mf8) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf8)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + bool operator==(BOOST_MEM_FN_NAME(mf8) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf8) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf8 + +template class BOOST_MEM_FN_NAME(cmf8) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf8)(F f): f_(f) {} + + R operator()(T const * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf8) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf8) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +#undef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS diff --git a/contrib/src/boost/bind/mem_fn_vw.hpp b/contrib/src/boost/bind/mem_fn_vw.hpp new file mode 100644 index 0000000..f3fc58d --- /dev/null +++ b/contrib/src/boost/bind/mem_fn_vw.hpp @@ -0,0 +1,130 @@ +// +// bind/mem_fn_vw.hpp - void return helper wrappers +// +// Do not include this header directly +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +template struct BOOST_MEM_FN_NAME(mf0): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (); + explicit BOOST_MEM_FN_NAME(mf0)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf0): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0) +{ + typedef R (BOOST_MEM_FN_CC T::*F) () const; + explicit BOOST_MEM_FN_NAME(cmf0)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf1): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1); + explicit BOOST_MEM_FN_NAME(mf1)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf1): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1) const; + explicit BOOST_MEM_FN_NAME(cmf1)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf2): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2); + explicit BOOST_MEM_FN_NAME(mf2)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf2): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2) const; + explicit BOOST_MEM_FN_NAME(cmf2)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf3): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3); + explicit BOOST_MEM_FN_NAME(mf3)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf3): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const; + explicit BOOST_MEM_FN_NAME(cmf3)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf4): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4); + explicit BOOST_MEM_FN_NAME(mf4)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf4): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const; + explicit BOOST_MEM_FN_NAME(cmf4)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf5): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5); + explicit BOOST_MEM_FN_NAME(mf5)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf5): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const; + explicit BOOST_MEM_FN_NAME(cmf5)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf6): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6); + explicit BOOST_MEM_FN_NAME(mf6)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf6): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const; + explicit BOOST_MEM_FN_NAME(cmf6)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf7): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7); + explicit BOOST_MEM_FN_NAME(mf7)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf7): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const; + explicit BOOST_MEM_FN_NAME(cmf7)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf8): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8); + explicit BOOST_MEM_FN_NAME(mf8)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf8): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const; + explicit BOOST_MEM_FN_NAME(cmf8)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8)(f) {} +}; + diff --git a/contrib/src/boost/checked_delete.hpp b/contrib/src/boost/checked_delete.hpp new file mode 100644 index 0000000..fb71c78 --- /dev/null +++ b/contrib/src/boost/checked_delete.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_CHECKED_DELETE_HPP +#define BOOST_CHECKED_DELETE_HPP + +// The header file at this path is deprecated; +// use boost/core/checked_delete.hpp instead. + +#include + +#endif diff --git a/contrib/src/boost/concept/assert.hpp b/contrib/src/boost/concept/assert.hpp new file mode 100644 index 0000000..cf98179 --- /dev/null +++ b/contrib/src/boost/concept/assert.hpp @@ -0,0 +1,45 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP +# define BOOST_CONCEPT_ASSERT_DWA2006430_HPP + +# include +# include + +// The old protocol used a constraints() member function in concept +// checking classes. If the compiler supports SFINAE, we can detect +// that function and seamlessly support the old concept checking +// classes. In this release, backward compatibility with the old +// concept checking classes is enabled by default, where available. +// The old protocol is deprecated, though, and backward compatibility +// will no longer be the default in the next release. + +# if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \ + && !defined(BOOST_NO_SFINAE) \ + \ + && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4)) + +// Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to +// check for the presence of particularmember functions. + +# define BOOST_OLD_CONCEPT_SUPPORT + +# endif + +# ifdef BOOST_MSVC +# include +# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +# include +# else +# include +# endif + + // Usage, in class or function context: + // + // BOOST_CONCEPT_ASSERT((UnaryFunctionConcept)); + // +# define BOOST_CONCEPT_ASSERT(ModelInParens) \ + BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens) + +#endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP diff --git a/contrib/src/boost/concept/detail/backward_compatibility.hpp b/contrib/src/boost/concept/detail/backward_compatibility.hpp new file mode 100644 index 0000000..66d573e --- /dev/null +++ b/contrib/src/boost/concept/detail/backward_compatibility.hpp @@ -0,0 +1,16 @@ +// Copyright David Abrahams 2009. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP +# define BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP + +namespace boost +{ + namespace concepts {} + +# if defined(BOOST_HAS_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD) + namespace concept = concepts; +# endif +} // namespace boost::concept + +#endif // BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP diff --git a/contrib/src/boost/concept/detail/borland.hpp b/contrib/src/boost/concept/detail/borland.hpp new file mode 100644 index 0000000..300d5d4 --- /dev/null +++ b/contrib/src/boost/concept/detail/borland.hpp @@ -0,0 +1,30 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP +# define BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP + +# include +# include + +namespace boost { namespace concepts { + +template +struct require; + +template +struct require +{ + enum { instantiate = sizeof((((Model*)0)->~Model()), 3) }; +}; + +# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ + enum \ + { \ + BOOST_PP_CAT(boost_concept_check,__LINE__) = \ + boost::concepts::require::instantiate \ + } + +}} // namespace boost::concept + +#endif // BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP diff --git a/contrib/src/boost/concept/detail/concept_def.hpp b/contrib/src/boost/concept/detail/concept_def.hpp new file mode 100644 index 0000000..750561e --- /dev/null +++ b/contrib/src/boost/concept/detail/concept_def.hpp @@ -0,0 +1,34 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP +# define BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP +# include +# include +# include +# include +#endif // BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP + +// BOOST_concept(SomeName, (p1)(p2)...(pN)) +// +// Expands to "template struct SomeName" +// +// Also defines an equivalent SomeNameConcept for backward compatibility. +// Maybe in the next release we can kill off the "Concept" suffix for good. +# define BOOST_concept(name, params) \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct name; /* forward declaration */ \ + \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct BOOST_PP_CAT(name,Concept) \ + : name< BOOST_PP_SEQ_ENUM(params) > \ + { \ + }; \ + \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct name + +// Helper for BOOST_concept, above. +# define BOOST_CONCEPT_typename(r, ignored, index, t) \ + BOOST_PP_COMMA_IF(index) typename t + diff --git a/contrib/src/boost/concept/detail/concept_undef.hpp b/contrib/src/boost/concept/detail/concept_undef.hpp new file mode 100644 index 0000000..713db89 --- /dev/null +++ b/contrib/src/boost/concept/detail/concept_undef.hpp @@ -0,0 +1,5 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# undef BOOST_concept_typename +# undef BOOST_concept diff --git a/contrib/src/boost/concept/detail/general.hpp b/contrib/src/boost/concept/detail/general.hpp new file mode 100644 index 0000000..525ea65 --- /dev/null +++ b/contrib/src/boost/concept/detail/general.hpp @@ -0,0 +1,77 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP +# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP + +# include +# include +# include + +# ifdef BOOST_OLD_CONCEPT_SUPPORT +# include +# include +# endif + +// This implementation works on Comeau and GCC, all the way back to +// 2.95 +namespace boost { namespace concepts { + +template +struct requirement_; + +namespace detail +{ + template struct instantiate {}; +} + +template +struct requirement +{ + static void failed() { ((Model*)0)->~Model(); } +}; + +struct failed {}; + +template +struct requirement +{ + static void failed() { ((Model*)0)->~Model(); } +}; + +# ifdef BOOST_OLD_CONCEPT_SUPPORT + +template +struct constraint +{ + static void failed() { ((Model*)0)->constraints(); } +}; + +template +struct requirement_ + : mpl::if_< + concepts::not_satisfied + , constraint + , requirement + >::type +{}; + +# else + +// For GCC-2.x, these can't have exactly the same name +template +struct requirement_ + : requirement +{}; + +# endif + +# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ + typedef ::boost::concepts::detail::instantiate< \ + &::boost::concepts::requirement_::failed> \ + BOOST_PP_CAT(boost_concept_check,__LINE__) \ + BOOST_ATTRIBUTE_UNUSED + +}} + +#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP diff --git a/contrib/src/boost/concept/detail/has_constraints.hpp b/contrib/src/boost/concept/detail/has_constraints.hpp new file mode 100644 index 0000000..a309db3 --- /dev/null +++ b/contrib/src/boost/concept/detail/has_constraints.hpp @@ -0,0 +1,50 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP +# define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP + +# include +# include +# include + +namespace boost { namespace concepts { + +namespace detail +{ + +// Here we implement the metafunction that detects whether a +// constraints metafunction exists + typedef char yes; + typedef char (&no)[2]; + + template + struct wrap_constraints {}; + +#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__) + // Work around the following bogus error in Sun Studio 11, by + // turning off the has_constraints function entirely: + // Error: complex expression not allowed in dependent template + // argument expression + inline no has_constraints_(...); +#else + template + inline yes has_constraints_(Model*, wrap_constraints* = 0); + inline no has_constraints_(...); +#endif +} + +// This would be called "detail::has_constraints," but it has a strong +// tendency to show up in error messages. +template +struct not_satisfied +{ + BOOST_STATIC_CONSTANT( + bool + , value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes) ); + typedef mpl::bool_ type; +}; + +}} // namespace boost::concepts::detail + +#endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP diff --git a/contrib/src/boost/concept/detail/msvc.hpp b/contrib/src/boost/concept/detail/msvc.hpp new file mode 100644 index 0000000..078dd22 --- /dev/null +++ b/contrib/src/boost/concept/detail/msvc.hpp @@ -0,0 +1,123 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP +# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP + +# include +# include +# include + +# ifdef BOOST_OLD_CONCEPT_SUPPORT +# include +# include +# endif + +# ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable:4100) +# endif + +namespace boost { namespace concepts { + + +template +struct check +{ + virtual void failed(Model* x) + { + x->~Model(); + } +}; + +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION +struct failed {}; +template +struct check +{ + virtual void failed(Model* x) + { + x->~Model(); + } +}; +# endif + +# ifdef BOOST_OLD_CONCEPT_SUPPORT + +namespace detail +{ + // No need for a virtual function here, since evaluating + // not_satisfied below will have already instantiated the + // constraints() member. + struct constraint {}; +} + +template +struct require + : mpl::if_c< + not_satisfied::value + , detail::constraint +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION + , check +# else + , check +# endif + >::type +{}; + +# else + +template +struct require +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION + : check +# else + : check +# endif +{}; + +# endif + +# if BOOST_WORKAROUND(BOOST_MSVC, == 1310) + +// +// The iterator library sees some really strange errors unless we +// do things this way. +// +template +struct require +{ + virtual void failed(Model*) + { + require(); + } +}; + +# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ +enum \ +{ \ + BOOST_PP_CAT(boost_concept_check,__LINE__) = \ + sizeof(::boost::concepts::require) \ +} + +# else // Not vc-7.1 + +template +require +require_(void(*)(Model)); + +# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ +enum \ +{ \ + BOOST_PP_CAT(boost_concept_check,__LINE__) = \ + sizeof(::boost::concepts::require_((ModelFnPtr)0)) \ +} + +# endif +}} + +# ifdef BOOST_MSVC +# pragma warning(pop) +# endif + +#endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP diff --git a/contrib/src/boost/concept/usage.hpp b/contrib/src/boost/concept/usage.hpp new file mode 100644 index 0000000..e73370f --- /dev/null +++ b/contrib/src/boost/concept/usage.hpp @@ -0,0 +1,36 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_USAGE_DWA2006919_HPP +# define BOOST_CONCEPT_USAGE_DWA2006919_HPP + +# include +# include +# include + +namespace boost { namespace concepts { + +template +struct usage_requirements +{ + ~usage_requirements() { ((Model*)0)->~Model(); } +}; + +# if BOOST_WORKAROUND(__GNUC__, <= 3) + +# define BOOST_CONCEPT_USAGE(model) \ + model(); /* at least 2.96 and 3.4.3 both need this :( */ \ + BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements)); \ + ~model() + +# else + +# define BOOST_CONCEPT_USAGE(model) \ + BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements)); \ + ~model() + +# endif + +}} // namespace boost::concepts + +#endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP diff --git a/contrib/src/boost/concept_check.hpp b/contrib/src/boost/concept_check.hpp new file mode 100644 index 0000000..25f118b --- /dev/null +++ b/contrib/src/boost/concept_check.hpp @@ -0,0 +1,1082 @@ +// +// (C) Copyright Jeremy Siek 2000. +// Copyright 2002 The Trustees of Indiana University. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Revision History: +// 05 May 2001: Workarounds for HP aCC from Thomas Matelich. (Jeremy Siek) +// 02 April 2001: Removed limits header altogether. (Jeremy Siek) +// 01 April 2001: Modified to use new header. (JMaddock) +// + +// See http://www.boost.org/libs/concept_check for documentation. + +#ifndef BOOST_CONCEPT_CHECKS_HPP +# define BOOST_CONCEPT_CHECKS_HPP + +# include + +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include + +#if (defined _MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4510 ) // default constructor could not be generated +# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required +#endif + +namespace boost +{ + + // + // Backward compatibility + // + + template + inline void function_requires(Model* = 0) + { + BOOST_CONCEPT_ASSERT((Model)); + } + template inline void ignore_unused_variable_warning(T const&) {} + +# define BOOST_CLASS_REQUIRE(type_var, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + +# define BOOST_CLASS_REQUIRE2(type_var1, type_var2, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + +# define BOOST_CLASS_REQUIRE3(tv1, tv2, tv3, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + +# define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + + + // + // Begin concept definitions + // + BOOST_concept(Integer, (T)) + { + BOOST_CONCEPT_USAGE(Integer) + { + x.error_type_must_be_an_integer_type(); + } + private: + T x; + }; + + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; +# if defined(BOOST_HAS_LONG_LONG) + template <> struct Integer< ::boost::long_long_type> {}; + template <> struct Integer< ::boost::ulong_long_type> {}; +# elif defined(BOOST_HAS_MS_INT64) + template <> struct Integer<__int64> {}; + template <> struct Integer {}; +# endif + + BOOST_concept(SignedInteger,(T)) { + BOOST_CONCEPT_USAGE(SignedInteger) { + x.error_type_must_be_a_signed_integer_type(); + } + private: + T x; + }; + template <> struct SignedInteger { }; + template <> struct SignedInteger {}; + template <> struct SignedInteger {}; + template <> struct SignedInteger {}; +# if defined(BOOST_HAS_LONG_LONG) + template <> struct SignedInteger< ::boost::long_long_type> {}; +# elif defined(BOOST_HAS_MS_INT64) + template <> struct SignedInteger<__int64> {}; +# endif + + BOOST_concept(UnsignedInteger,(T)) { + BOOST_CONCEPT_USAGE(UnsignedInteger) { + x.error_type_must_be_an_unsigned_integer_type(); + } + private: + T x; + }; + + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; +# if defined(BOOST_HAS_LONG_LONG) + template <> struct UnsignedInteger< ::boost::ulong_long_type> {}; +# elif defined(BOOST_HAS_MS_INT64) + template <> struct UnsignedInteger {}; +# endif + + //=========================================================================== + // Basic Concepts + + BOOST_concept(DefaultConstructible,(TT)) + { + BOOST_CONCEPT_USAGE(DefaultConstructible) { + TT a; // require default constructor + ignore_unused_variable_warning(a); + } + }; + + BOOST_concept(Assignable,(TT)) + { + BOOST_CONCEPT_USAGE(Assignable) { +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = b; // require assignment operator +#endif + const_constraints(b); + } + private: + void const_constraints(const TT& x) { +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = x; // const required for argument to assignment +#else + ignore_unused_variable_warning(x); +#endif + } + private: + TT a; + TT b; + }; + + + BOOST_concept(CopyConstructible,(TT)) + { + BOOST_CONCEPT_USAGE(CopyConstructible) { + TT a(b); // require copy constructor + TT* ptr = &a; // require address of operator + const_constraints(a); + ignore_unused_variable_warning(ptr); + } + private: + void const_constraints(const TT& a) { + TT c(a); // require const copy constructor + const TT* ptr = &a; // require const address of operator + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(ptr); + } + TT b; + }; + + // The SGI STL version of Assignable requires copy constructor and operator= + BOOST_concept(SGIAssignable,(TT)) + { + BOOST_CONCEPT_USAGE(SGIAssignable) { + TT c(a); +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = b; // require assignment operator +#endif + const_constraints(b); + ignore_unused_variable_warning(c); + } + private: + void const_constraints(const TT& x) { + TT c(x); +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = x; // const required for argument to assignment +#endif + ignore_unused_variable_warning(c); + } + TT a; + TT b; + }; + + BOOST_concept(Convertible,(X)(Y)) + { + BOOST_CONCEPT_USAGE(Convertible) { + Y y = x; + ignore_unused_variable_warning(y); + } + private: + X x; + }; + + // The C++ standard requirements for many concepts talk about return + // types that must be "convertible to bool". The problem with this + // requirement is that it leaves the door open for evil proxies that + // define things like operator|| with strange return types. Two + // possible solutions are: + // 1) require the return type to be exactly bool + // 2) stay with convertible to bool, and also + // specify stuff about all the logical operators. + // For now we just test for convertible to bool. + template + void require_boolean_expr(const TT& t) { + bool x = t; + ignore_unused_variable_warning(x); + } + + BOOST_concept(EqualityComparable,(TT)) + { + BOOST_CONCEPT_USAGE(EqualityComparable) { + require_boolean_expr(a == b); + require_boolean_expr(a != b); + } + private: + TT a, b; + }; + + BOOST_concept(LessThanComparable,(TT)) + { + BOOST_CONCEPT_USAGE(LessThanComparable) { + require_boolean_expr(a < b); + } + private: + TT a, b; + }; + + // This is equivalent to SGI STL's LessThanComparable. + BOOST_concept(Comparable,(TT)) + { + BOOST_CONCEPT_USAGE(Comparable) { + require_boolean_expr(a < b); + require_boolean_expr(a > b); + require_boolean_expr(a <= b); + require_boolean_expr(a >= b); + } + private: + TT a, b; + }; + +#define BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(OP,NAME) \ + BOOST_concept(NAME, (First)(Second)) \ + { \ + BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ + private: \ + bool constraints_() { return a OP b; } \ + First a; \ + Second b; \ + } + +#define BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(OP,NAME) \ + BOOST_concept(NAME, (Ret)(First)(Second)) \ + { \ + BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ + private: \ + Ret constraints_() { return a OP b; } \ + First a; \ + Second b; \ + } + + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, EqualOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, NotEqualOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, LessThanOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, LessEqualOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, GreaterThanOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, GreaterEqualOp); + + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, PlusOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, TimesOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, DivideOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, SubtractOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, ModOp); + + //=========================================================================== + // Function Object Concepts + + BOOST_concept(Generator,(Func)(Return)) + { + BOOST_CONCEPT_USAGE(Generator) { test(is_void()); } + + private: + void test(boost::mpl::false_) + { + // Do we really want a reference here? + const Return& r = f(); + ignore_unused_variable_warning(r); + } + + void test(boost::mpl::true_) + { + f(); + } + + Func f; + }; + + BOOST_concept(UnaryFunction,(Func)(Return)(Arg)) + { + BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void()); } + + private: + void test(boost::mpl::false_) + { + f(arg); // "priming the pump" this way keeps msvc6 happy (ICE) + Return r = f(arg); + ignore_unused_variable_warning(r); + } + + void test(boost::mpl::true_) + { + f(arg); + } + +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy construktor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::UnaryFunction::arg" + // in class without a constructor [-Wuninitialized]) + UnaryFunction(); +#endif + + Func f; + Arg arg; + }; + + BOOST_concept(BinaryFunction,(Func)(Return)(First)(Second)) + { + BOOST_CONCEPT_USAGE(BinaryFunction) { test(is_void()); } + private: + void test(boost::mpl::false_) + { + f(first,second); + Return r = f(first, second); // require operator() + (void)r; + } + + void test(boost::mpl::true_) + { + f(first,second); + } + +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::BinaryFunction::arg" + // in class without a constructor [-Wuninitialized]) + BinaryFunction(); +#endif + + Func f; + First first; + Second second; + }; + + BOOST_concept(UnaryPredicate,(Func)(Arg)) + { + BOOST_CONCEPT_USAGE(UnaryPredicate) { + require_boolean_expr(f(arg)); // require operator() returning bool + } + private: +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::UnaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + UnaryPredicate(); +#endif + + Func f; + Arg arg; + }; + + BOOST_concept(BinaryPredicate,(Func)(First)(Second)) + { + BOOST_CONCEPT_USAGE(BinaryPredicate) { + require_boolean_expr(f(a, b)); // require operator() returning bool + } + private: +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::BinaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + BinaryPredicate(); +#endif + Func f; + First a; + Second b; + }; + + // use this when functor is used inside a container class like std::set + BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second)) + : BinaryPredicate + { + BOOST_CONCEPT_USAGE(Const_BinaryPredicate) { + const_constraints(f); + } + private: + void const_constraints(const Func& fun) { + // operator() must be a const member function + require_boolean_expr(fun(a, b)); + } +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::Const_BinaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + Const_BinaryPredicate(); +#endif + + Func f; + First a; + Second b; + }; + + BOOST_concept(AdaptableGenerator,(Func)(Return)) + : Generator + { + typedef typename Func::result_type result_type; + + BOOST_CONCEPT_USAGE(AdaptableGenerator) + { + BOOST_CONCEPT_ASSERT((Convertible)); + } + }; + + BOOST_concept(AdaptableUnaryFunction,(Func)(Return)(Arg)) + : UnaryFunction + { + typedef typename Func::argument_type argument_type; + typedef typename Func::result_type result_type; + + ~AdaptableUnaryFunction() + { + BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_CONCEPT_ASSERT((Convertible)); + } + }; + + BOOST_concept(AdaptableBinaryFunction,(Func)(Return)(First)(Second)) + : BinaryFunction< + Func + , typename Func::result_type + , typename Func::first_argument_type + , typename Func::second_argument_type + > + { + typedef typename Func::first_argument_type first_argument_type; + typedef typename Func::second_argument_type second_argument_type; + typedef typename Func::result_type result_type; + + ~AdaptableBinaryFunction() + { + BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_CONCEPT_ASSERT((Convertible)); + } + }; + + BOOST_concept(AdaptablePredicate,(Func)(Arg)) + : UnaryPredicate + , AdaptableUnaryFunction + { + }; + + BOOST_concept(AdaptableBinaryPredicate,(Func)(First)(Second)) + : BinaryPredicate + , AdaptableBinaryFunction + { + }; + + //=========================================================================== + // Iterator Concepts + + BOOST_concept(InputIterator,(TT)) + : Assignable + , EqualityComparable + { + typedef typename std::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::difference_type difference_type; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::pointer pointer; + typedef typename std::iterator_traits::iterator_category iterator_category; + + BOOST_CONCEPT_USAGE(InputIterator) + { + BOOST_CONCEPT_ASSERT((SignedInteger)); + BOOST_CONCEPT_ASSERT((Convertible)); + + TT j(i); + (void)*i; // require dereference operator + ++j; // require preincrement operator + i++; // require postincrement operator + } + private: + TT i; + }; + + BOOST_concept(OutputIterator,(TT)(ValueT)) + : Assignable + { + BOOST_CONCEPT_USAGE(OutputIterator) { + + ++i; // require preincrement operator + i++; // require postincrement operator + *i++ = t; // require postincrement and assignment + } + private: + TT i, j; + ValueT t; + }; + + BOOST_concept(ForwardIterator,(TT)) + : InputIterator + { + BOOST_CONCEPT_USAGE(ForwardIterator) + { + BOOST_CONCEPT_ASSERT((Convertible< + BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category + , std::forward_iterator_tag + >)); + + typename InputIterator::reference r = *i; + ignore_unused_variable_warning(r); + } + + private: + TT i; + }; + + BOOST_concept(Mutable_ForwardIterator,(TT)) + : ForwardIterator + { + BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) { + *i++ = *j; // require postincrement and assignment + } + private: + TT i, j; + }; + + BOOST_concept(BidirectionalIterator,(TT)) + : ForwardIterator + { + BOOST_CONCEPT_USAGE(BidirectionalIterator) + { + BOOST_CONCEPT_ASSERT((Convertible< + BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category + , std::bidirectional_iterator_tag + >)); + + --i; // require predecrement operator + i--; // require postdecrement operator + } + private: + TT i; + }; + + BOOST_concept(Mutable_BidirectionalIterator,(TT)) + : BidirectionalIterator + , Mutable_ForwardIterator + { + BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator) + { + *i-- = *j; // require postdecrement and assignment + } + private: + TT i, j; + }; + + BOOST_concept(RandomAccessIterator,(TT)) + : BidirectionalIterator + , Comparable + { + BOOST_CONCEPT_USAGE(RandomAccessIterator) + { + BOOST_CONCEPT_ASSERT((Convertible< + BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category + , std::random_access_iterator_tag + >)); + + i += n; // require assignment addition operator + i = i + n; i = n + i; // require addition with difference type + i -= n; // require assignment subtraction operator + i = i - n; // require subtraction with difference type + n = i - j; // require difference operator + (void)i[n]; // require element access operator + } + + private: + TT a, b; + TT i, j; + typename std::iterator_traits::difference_type n; + }; + + BOOST_concept(Mutable_RandomAccessIterator,(TT)) + : RandomAccessIterator + , Mutable_BidirectionalIterator + { + BOOST_CONCEPT_USAGE(Mutable_RandomAccessIterator) + { + i[n] = *i; // require element access and assignment + } + private: + TT i; + typename std::iterator_traits::difference_type n; + }; + + //=========================================================================== + // Container s + + BOOST_concept(Container,(C)) + : Assignable + { + typedef typename C::value_type value_type; + typedef typename C::difference_type difference_type; + typedef typename C::size_type size_type; + typedef typename C::const_reference const_reference; + typedef typename C::const_pointer const_pointer; + typedef typename C::const_iterator const_iterator; + + BOOST_CONCEPT_USAGE(Container) + { + BOOST_CONCEPT_ASSERT((InputIterator)); + const_constraints(c); + } + + private: + void const_constraints(const C& cc) { + i = cc.begin(); + i = cc.end(); + n = cc.size(); + n = cc.max_size(); + b = cc.empty(); + } + C c; + bool b; + const_iterator i; + size_type n; + }; + + BOOST_concept(Mutable_Container,(C)) + : Container + { + typedef typename C::reference reference; + typedef typename C::iterator iterator; + typedef typename C::pointer pointer; + + BOOST_CONCEPT_USAGE(Mutable_Container) + { + BOOST_CONCEPT_ASSERT(( + Assignable)); + + BOOST_CONCEPT_ASSERT((InputIterator)); + + i = c.begin(); + i = c.end(); + c.swap(c2); + } + + private: + iterator i; + C c, c2; + }; + + BOOST_concept(ForwardContainer,(C)) + : Container + { + BOOST_CONCEPT_USAGE(ForwardContainer) + { + BOOST_CONCEPT_ASSERT(( + ForwardIterator< + typename ForwardContainer::const_iterator + >)); + } + }; + + BOOST_concept(Mutable_ForwardContainer,(C)) + : ForwardContainer + , Mutable_Container + { + BOOST_CONCEPT_USAGE(Mutable_ForwardContainer) + { + BOOST_CONCEPT_ASSERT(( + Mutable_ForwardIterator< + typename Mutable_ForwardContainer::iterator + >)); + } + }; + + BOOST_concept(ReversibleContainer,(C)) + : ForwardContainer + { + typedef typename + C::const_reverse_iterator + const_reverse_iterator; + + BOOST_CONCEPT_USAGE(ReversibleContainer) + { + BOOST_CONCEPT_ASSERT(( + BidirectionalIterator< + typename ReversibleContainer::const_iterator>)); + + BOOST_CONCEPT_ASSERT((BidirectionalIterator)); + + const_constraints(c); + } + private: + void const_constraints(const C& cc) + { + const_reverse_iterator i = cc.rbegin(); + i = cc.rend(); + } + C c; + }; + + BOOST_concept(Mutable_ReversibleContainer,(C)) + : Mutable_ForwardContainer + , ReversibleContainer + { + typedef typename C::reverse_iterator reverse_iterator; + + BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer) + { + typedef typename Mutable_ForwardContainer::iterator iterator; + BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); + BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); + + reverse_iterator i = c.rbegin(); + i = c.rend(); + } + private: + C c; + }; + + BOOST_concept(RandomAccessContainer,(C)) + : ReversibleContainer + { + typedef typename C::size_type size_type; + typedef typename C::const_reference const_reference; + + BOOST_CONCEPT_USAGE(RandomAccessContainer) + { + BOOST_CONCEPT_ASSERT(( + RandomAccessIterator< + typename RandomAccessContainer::const_iterator + >)); + + const_constraints(c); + } + private: + void const_constraints(const C& cc) + { + const_reference r = cc[n]; + ignore_unused_variable_warning(r); + } + + C c; + size_type n; + }; + + BOOST_concept(Mutable_RandomAccessContainer,(C)) + : Mutable_ReversibleContainer + , RandomAccessContainer + { + private: + typedef Mutable_RandomAccessContainer self; + public: + BOOST_CONCEPT_USAGE(Mutable_RandomAccessContainer) + { + BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); + BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); + + typename self::reference r = c[i]; + ignore_unused_variable_warning(r); + } + + private: + typename Mutable_ReversibleContainer::size_type i; + C c; + }; + + // A Sequence is inherently mutable + BOOST_concept(Sequence,(S)) + : Mutable_ForwardContainer + // Matt Austern's book puts DefaultConstructible here, the C++ + // standard places it in Container --JGS + // ... so why aren't we following the standard? --DWA + , DefaultConstructible + { + BOOST_CONCEPT_USAGE(Sequence) + { + S + c(n, t), + c2(first, last); + + c.insert(p, t); + c.insert(p, n, t); + c.insert(p, first, last); + + c.erase(p); + c.erase(p, q); + + typename Sequence::reference r = c.front(); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(c2); + ignore_unused_variable_warning(r); + const_constraints(c); + } + private: + void const_constraints(const S& c) { + typename Sequence::const_reference r = c.front(); + ignore_unused_variable_warning(r); + } + + typename S::value_type t; + typename S::size_type n; + typename S::value_type* first, *last; + typename S::iterator p, q; + }; + + BOOST_concept(FrontInsertionSequence,(S)) + : Sequence + { + BOOST_CONCEPT_USAGE(FrontInsertionSequence) + { + c.push_front(t); + c.pop_front(); + } + private: + S c; + typename S::value_type t; + }; + + BOOST_concept(BackInsertionSequence,(S)) + : Sequence + { + BOOST_CONCEPT_USAGE(BackInsertionSequence) + { + c.push_back(t); + c.pop_back(); + typename BackInsertionSequence::reference r = c.back(); + ignore_unused_variable_warning(r); + const_constraints(c); + } + private: + void const_constraints(const S& cc) { + typename BackInsertionSequence::const_reference + r = cc.back(); + ignore_unused_variable_warning(r); + } + S c; + typename S::value_type t; + }; + + BOOST_concept(AssociativeContainer,(C)) + : ForwardContainer + , DefaultConstructible + { + typedef typename C::key_type key_type; + typedef typename C::key_compare key_compare; + typedef typename C::value_compare value_compare; + typedef typename C::iterator iterator; + + BOOST_CONCEPT_USAGE(AssociativeContainer) + { + i = c.find(k); + r = c.equal_range(k); + c.erase(k); + c.erase(i); + c.erase(r.first, r.second); + const_constraints(c); + BOOST_CONCEPT_ASSERT((BinaryPredicate)); + + typedef typename AssociativeContainer::value_type value_type_; + BOOST_CONCEPT_ASSERT((BinaryPredicate)); + } + + // Redundant with the base concept, but it helps below. + typedef typename C::const_iterator const_iterator; + private: + void const_constraints(const C& cc) + { + ci = cc.find(k); + n = cc.count(k); + cr = cc.equal_range(k); + } + + C c; + iterator i; + std::pair r; + const_iterator ci; + std::pair cr; + typename C::key_type k; + typename C::size_type n; + }; + + BOOST_concept(UniqueAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(UniqueAssociativeContainer) + { + C c(first, last); + + pos_flag = c.insert(t); + c.insert(first, last); + + ignore_unused_variable_warning(c); + } + private: + std::pair pos_flag; + typename C::value_type t; + typename C::value_type* first, *last; + }; + + BOOST_concept(MultipleAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(MultipleAssociativeContainer) + { + C c(first, last); + + pos = c.insert(t); + c.insert(first, last); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(pos); + } + private: + typename C::iterator pos; + typename C::value_type t; + typename C::value_type* first, *last; + }; + + BOOST_concept(SimpleAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(SimpleAssociativeContainer) + { + typedef typename C::key_type key_type; + typedef typename C::value_type value_type; + BOOST_MPL_ASSERT((boost::is_same)); + } + }; + + BOOST_concept(PairAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(PairAssociativeContainer) + { + typedef typename C::key_type key_type; + typedef typename C::value_type value_type; + typedef typename C::mapped_type mapped_type; + typedef std::pair required_value_type; + BOOST_MPL_ASSERT((boost::is_same)); + } + }; + + BOOST_concept(SortedAssociativeContainer,(C)) + : AssociativeContainer + , ReversibleContainer + { + BOOST_CONCEPT_USAGE(SortedAssociativeContainer) + { + C + c(kc), + c2(first, last), + c3(first, last, kc); + + p = c.upper_bound(k); + p = c.lower_bound(k); + r = c.equal_range(k); + + c.insert(p, t); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(c2); + ignore_unused_variable_warning(c3); + const_constraints(c); + } + + void const_constraints(const C& c) + { + kc = c.key_comp(); + vc = c.value_comp(); + + cp = c.upper_bound(k); + cp = c.lower_bound(k); + cr = c.equal_range(k); + } + + private: + typename C::key_compare kc; + typename C::value_compare vc; + typename C::value_type t; + typename C::key_type k; + typedef typename C::iterator iterator; + typedef typename C::const_iterator const_iterator; + + typedef SortedAssociativeContainer self; + iterator p; + const_iterator cp; + std::pair r; + std::pair cr; + typename C::value_type* first, *last; + }; + + // HashedAssociativeContainer + + BOOST_concept(Collection,(C)) + { + BOOST_CONCEPT_USAGE(Collection) + { + boost::function_requires >(); + boost::function_requires >(); + boost::function_requires >(); + const_constraints(c); + i = c.begin(); + i = c.end(); + c.swap(c); + } + + void const_constraints(const C& cc) { + ci = cc.begin(); + ci = cc.end(); + n = cc.size(); + b = cc.empty(); + } + + private: + typedef typename C::value_type value_type; + typedef typename C::iterator iterator; + typedef typename C::const_iterator const_iterator; + typedef typename C::reference reference; + typedef typename C::const_reference const_reference; + // typedef typename C::pointer pointer; + typedef typename C::difference_type difference_type; + typedef typename C::size_type size_type; + + C c; + bool b; + iterator i; + const_iterator ci; + size_type n; + }; +} // namespace boost + +#if (defined _MSC_VER) +# pragma warning( pop ) +#endif + +# include + +#endif // BOOST_CONCEPT_CHECKS_HPP + diff --git a/contrib/src/boost/config.hpp b/contrib/src/boost/config.hpp new file mode 100644 index 0000000..d49bb27 --- /dev/null +++ b/contrib/src/boost/config.hpp @@ -0,0 +1,67 @@ +// Boost config.hpp configuration header file ------------------------------// + +// (C) Copyright John Maddock 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for most recent version. + +// Boost config.hpp policy and rationale documentation has been moved to +// http://www.boost.org/libs/config +// +// CAUTION: This file is intended to be completely stable - +// DO NOT MODIFY THIS FILE! +// + +#ifndef BOOST_CONFIG_HPP +#define BOOST_CONFIG_HPP + +// if we don't have a user config, then use the default location: +#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG) +# define BOOST_USER_CONFIG +#if 0 +// For dependency trackers: +# include +#endif +#endif +// include it first: +#ifdef BOOST_USER_CONFIG +# include BOOST_USER_CONFIG +#endif + +// if we don't have a compiler config set, try and find one: +#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG) +# include +#endif +// if we have a compiler config, include it now: +#ifdef BOOST_COMPILER_CONFIG +# include BOOST_COMPILER_CONFIG +#endif + +// if we don't have a std library config set, try and find one: +#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus) +# include +#endif +// if we have a std library config, include it now: +#ifdef BOOST_STDLIB_CONFIG +# include BOOST_STDLIB_CONFIG +#endif + +// if we don't have a platform config set, try and find one: +#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG) +# include +#endif +// if we have a platform config, include it now: +#ifdef BOOST_PLATFORM_CONFIG +# include BOOST_PLATFORM_CONFIG +#endif + +// get config suffix code: +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#endif // BOOST_CONFIG_HPP diff --git a/contrib/src/boost/config/abi/borland_prefix.hpp b/contrib/src/boost/config/abi/borland_prefix.hpp new file mode 100644 index 0000000..3a0e5ae --- /dev/null +++ b/contrib/src/boost/config/abi/borland_prefix.hpp @@ -0,0 +1,27 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// for C++ Builder the following options effect the ABI: +// +// -b (on or off - effect emum sizes) +// -Vx (on or off - empty members) +// -Ve (on or off - empty base classes) +// -aX (alignment - 5 options). +// -pX (Calling convention - 4 options) +// -VmX (member pointer size and layout - 5 options) +// -VC (on or off, changes name mangling) +// -Vl (on or off, changes struct layout). + +// In addition the following warnings are sufficiently annoying (and +// unfixable) to have them turned off by default: +// +// 8027 - functions containing [for|while] loops are not expanded inline +// 8026 - functions taking class by value arguments are not expanded inline + +#pragma nopushoptwarn +# pragma option push -a8 -Vx- -Ve- -b- -pc -Vmv -VC- -Vl- -w-8027 -w-8026 + + + diff --git a/contrib/src/boost/config/abi/borland_suffix.hpp b/contrib/src/boost/config/abi/borland_suffix.hpp new file mode 100644 index 0000000..940535f --- /dev/null +++ b/contrib/src/boost/config/abi/borland_suffix.hpp @@ -0,0 +1,12 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# pragma option pop +#pragma nopushoptwarn + + + + + diff --git a/contrib/src/boost/config/abi/msvc_prefix.hpp b/contrib/src/boost/config/abi/msvc_prefix.hpp new file mode 100644 index 0000000..97f06cd --- /dev/null +++ b/contrib/src/boost/config/abi/msvc_prefix.hpp @@ -0,0 +1,22 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// +// Boost binaries are built with the compiler's default ABI settings, +// if the user changes their default alignment in the VS IDE then their +// code will no longer be binary compatible with the bjam built binaries +// unless this header is included to force Boost code into a consistent ABI. +// +// Note that inclusion of this header is only necessary for libraries with +// separate source, header only libraries DO NOT need this as long as all +// translation units are built with the same options. +// +#if defined(_M_X64) +# pragma pack(push,16) +#else +# pragma pack(push,8) +#endif + + diff --git a/contrib/src/boost/config/abi/msvc_suffix.hpp b/contrib/src/boost/config/abi/msvc_suffix.hpp new file mode 100644 index 0000000..a64d783 --- /dev/null +++ b/contrib/src/boost/config/abi/msvc_suffix.hpp @@ -0,0 +1,8 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#pragma pack(pop) + + diff --git a/contrib/src/boost/config/abi_prefix.hpp b/contrib/src/boost/config/abi_prefix.hpp new file mode 100644 index 0000000..3b13474 --- /dev/null +++ b/contrib/src/boost/config/abi_prefix.hpp @@ -0,0 +1,25 @@ +// abi_prefix header -------------------------------------------------------// + +// (c) Copyright John Maddock 2003 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). + +#ifndef BOOST_CONFIG_ABI_PREFIX_HPP +# define BOOST_CONFIG_ABI_PREFIX_HPP +#else +# error double inclusion of header boost/config/abi_prefix.hpp is an error +#endif + +#include + +// this must occur after all other includes and before any code appears: +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX +#endif + +#if defined( __BORLANDC__ ) +#pragma nopushoptwarn +#endif + diff --git a/contrib/src/boost/config/abi_suffix.hpp b/contrib/src/boost/config/abi_suffix.hpp new file mode 100644 index 0000000..9391616 --- /dev/null +++ b/contrib/src/boost/config/abi_suffix.hpp @@ -0,0 +1,27 @@ +// abi_sufffix header -------------------------------------------------------// + +// (c) Copyright John Maddock 2003 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). + +// This header should be #included AFTER code that was preceded by a #include +// . + +#ifndef BOOST_CONFIG_ABI_PREFIX_HPP +# error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp +#else +# undef BOOST_CONFIG_ABI_PREFIX_HPP +#endif + +// the suffix header occurs after all of our code: +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX +#endif + +#if defined( __BORLANDC__ ) +#pragma nopushoptwarn +#endif + + diff --git a/contrib/src/boost/config/auto_link.hpp b/contrib/src/boost/config/auto_link.hpp new file mode 100644 index 0000000..56a16b0 --- /dev/null +++ b/contrib/src/boost/config/auto_link.hpp @@ -0,0 +1,439 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + /* + * LOCATION: see http://www.boost.org for most recent version. + * FILE auto_link.hpp + * VERSION see + * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers. + */ + +/************************************************************************* + +USAGE: +~~~~~~ + +Before including this header you must define one or more of define the following macros: + +BOOST_LIB_NAME: Required: A string containing the basename of the library, + for example boost_regex. +BOOST_LIB_TOOLSET: Optional: the base name of the toolset. +BOOST_DYN_LINK: Optional: when set link to dll rather than static library. +BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name + of the library selected (useful for debugging). +BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib, + rather than a mangled-name version. +BOOST_AUTO_LINK_TAGGED: Specifies that we link to libraries built with the --layout=tagged option. + This is essentially the same as the default name-mangled version, but without + the compiler name and version, or the Boost version. Just the build options. + +These macros will be undef'ed at the end of the header, further this header +has no include guards - so be sure to include it only once from your library! + +Algorithm: +~~~~~~~~~~ + +Libraries for Borland and Microsoft compilers are automatically +selected here, the name of the lib is selected according to the following +formula: + +BOOST_LIB_PREFIX + + BOOST_LIB_NAME + + "_" + + BOOST_LIB_TOOLSET + + BOOST_LIB_THREAD_OPT + + BOOST_LIB_RT_OPT + "-" + + BOOST_LIB_VERSION + +These are defined as: + +BOOST_LIB_PREFIX: "lib" for static libraries otherwise "". + +BOOST_LIB_NAME: The base name of the lib ( for example boost_regex). + +BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc). + +BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing. + +BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used, + contains one or more of the following letters after + a hyphen: + + s static runtime (dynamic if not present). + g debug/diagnostic runtime (release if not present). + y Python debug/diagnostic runtime (release if not present). + d debug build (release if not present). + p STLport build. + n STLport build without its IOStreams. + +BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. + + +***************************************************************************/ + +#ifdef __cplusplus +# ifndef BOOST_CONFIG_HPP +# include +# endif +#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__) +// +// C language compatability (no, honestly) +// +# define BOOST_MSVC _MSC_VER +# define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) +# define BOOST_DO_STRINGIZE(X) #X +#endif +// +// Only include what follows for known and supported compilers: +// +#if defined(BOOST_MSVC) \ + || defined(__BORLANDC__) \ + || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \ + || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) + +#ifndef BOOST_VERSION_HPP +# include +#endif + +#ifndef BOOST_LIB_NAME +# error "Macro BOOST_LIB_NAME not set (internal error)" +#endif + +// +// error check: +// +#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG) +# pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors") +# pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes") +# error "Incompatible build options" +#endif +// +// select toolset if not defined already: +// +#ifndef BOOST_LIB_TOOLSET +# if defined(BOOST_MSVC) && (BOOST_MSVC < 1200) + // Note: no compilers before 1200 are supported +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1300) + +# ifdef UNDER_CE + // eVC4: +# define BOOST_LIB_TOOLSET "evc4" +# else + // vc6: +# define BOOST_LIB_TOOLSET "vc6" +# endif + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1310) + + // vc7: +# define BOOST_LIB_TOOLSET "vc7" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1400) + + // vc71: +# define BOOST_LIB_TOOLSET "vc71" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1500) + + // vc80: +# define BOOST_LIB_TOOLSET "vc80" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1600) + + // vc90: +# define BOOST_LIB_TOOLSET "vc90" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1700) + + // vc10: +# define BOOST_LIB_TOOLSET "vc100" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800) + + // vc11: +# define BOOST_LIB_TOOLSET "vc110" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1900) + + // vc12: +# define BOOST_LIB_TOOLSET "vc120" + +# elif defined(BOOST_MSVC) + + // vc14: +# define BOOST_LIB_TOOLSET "vc140" + +# elif defined(__BORLANDC__) + + // CBuilder 6: +# define BOOST_LIB_TOOLSET "bcb" + +# elif defined(__ICL) + + // Intel C++, no version number: +# define BOOST_LIB_TOOLSET "iw" + +# elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF ) + + // Metrowerks CodeWarrior 8.x +# define BOOST_LIB_TOOLSET "cw8" + +# elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF ) + + // Metrowerks CodeWarrior 9.x +# define BOOST_LIB_TOOLSET "cw9" + +# endif +#endif // BOOST_LIB_TOOLSET + +// +// select thread opt: +// +#if defined(_MT) || defined(__MT__) +# define BOOST_LIB_THREAD_OPT "-mt" +#else +# define BOOST_LIB_THREAD_OPT +#endif + +#if defined(_MSC_VER) || defined(__MWERKS__) + +# ifdef _DLL + +# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gydp" +# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-gdp" +# elif defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gydp" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-gdp" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-p" +# endif + +# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gydpn" +# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-gdpn" +# elif defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gydpn" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-gdpn" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-pn" +# endif + +# else + +# if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gyd" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-gd" +# else +# define BOOST_LIB_RT_OPT +# endif + +# endif + +# else + +# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgydp" +# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-sgdp" +# elif defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgydp" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sgdp" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-sp" +# endif + +# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgydpn" +# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-sgdpn" +# elif defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgydpn" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sgdpn" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-spn" +# endif + +# else + +# if defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgyd" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sgd" +# else +# define BOOST_LIB_RT_OPT "-s" +# endif + +# endif + +# endif + +#elif defined(__BORLANDC__) + +// +// figure out whether we want the debug builds or not: +// +#if __BORLANDC__ > 0x561 +#pragma defineonoption BOOST_BORLAND_DEBUG -v +#endif +// +// sanity check: +// +#if defined(__STL_DEBUG) || defined(_STLP_DEBUG) +#error "Pre-built versions of the Boost libraries are not provided in STLport-debug form" +#endif + +# ifdef _RTLDLL + +# if defined(BOOST_BORLAND_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-yd" +# elif defined(BOOST_BORLAND_DEBUG) +# define BOOST_LIB_RT_OPT "-d" +# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT -y +# else +# define BOOST_LIB_RT_OPT +# endif + +# else + +# if defined(BOOST_BORLAND_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-syd" +# elif defined(BOOST_BORLAND_DEBUG) +# define BOOST_LIB_RT_OPT "-sd" +# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sy" +# else +# define BOOST_LIB_RT_OPT "-s" +# endif + +# endif + +#endif + +// +// select linkage opt: +// +#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK) +# define BOOST_LIB_PREFIX +#elif defined(BOOST_DYN_LINK) +# error "Mixing a dll boost library with a static runtime is a really bad idea..." +#else +# define BOOST_LIB_PREFIX "lib" +#endif + +// +// now include the lib: +// +#if defined(BOOST_LIB_NAME) \ + && defined(BOOST_LIB_PREFIX) \ + && defined(BOOST_LIB_TOOLSET) \ + && defined(BOOST_LIB_THREAD_OPT) \ + && defined(BOOST_LIB_RT_OPT) \ + && defined(BOOST_LIB_VERSION) + +#ifdef BOOST_AUTO_LINK_TAGGED +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") +# endif +#elif defined(BOOST_AUTO_LINK_NOMANGLE) +# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# endif +#elif defined(BOOST_LIB_BUILDID) +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# endif +#else +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") +# endif +#endif + +#else +# error "some required macros where not defined (internal logic error)." +#endif + + +#endif // _MSC_VER || __BORLANDC__ + +// +// finally undef any macros we may have set: +// +#ifdef BOOST_LIB_PREFIX +# undef BOOST_LIB_PREFIX +#endif +#if defined(BOOST_LIB_NAME) +# undef BOOST_LIB_NAME +#endif +// Don't undef this one: it can be set by the user and should be the +// same for all libraries: +//#if defined(BOOST_LIB_TOOLSET) +//# undef BOOST_LIB_TOOLSET +//#endif +#if defined(BOOST_LIB_THREAD_OPT) +# undef BOOST_LIB_THREAD_OPT +#endif +#if defined(BOOST_LIB_RT_OPT) +# undef BOOST_LIB_RT_OPT +#endif +#if defined(BOOST_LIB_LINK_OPT) +# undef BOOST_LIB_LINK_OPT +#endif +#if defined(BOOST_LIB_DEBUG_OPT) +# undef BOOST_LIB_DEBUG_OPT +#endif +#if defined(BOOST_DYN_LINK) +# undef BOOST_DYN_LINK +#endif + + diff --git a/contrib/src/boost/config/compiler/borland.hpp b/contrib/src/boost/config/compiler/borland.hpp new file mode 100644 index 0000000..80dd230 --- /dev/null +++ b/contrib/src/boost/config/compiler/borland.hpp @@ -0,0 +1,318 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Borland C++ compiler setup: + +// +// versions check: +// we don't support Borland prior to version 5.4: +#if __BORLANDC__ < 0x540 +# error "Compiler not supported or configured - please reconfigure" +#endif + +// last known compiler version: +#if (__BORLANDC__ > 0x613) +//# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +//# else +//# pragma message( "Unknown compiler version - please run the configure tests and report the results") +//# endif +#elif (__BORLANDC__ == 0x600) +# error "CBuilderX preview compiler is no longer supported" +#endif + +// +// Support macros to help with standard library detection +#if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL) +# define BOOST_BCB_WITH_ROGUE_WAVE +#elif __BORLANDC__ < 0x570 +# define BOOST_BCB_WITH_STLPORT +#else +# define BOOST_BCB_WITH_DINKUMWARE +#endif + +// +// Version 5.0 and below: +# if __BORLANDC__ <= 0x0550 +// Borland C++Builder 4 and 5: +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# if __BORLANDC__ == 0x0550 +// Borland C++Builder 5, command-line compiler 5.5: +# define BOOST_NO_OPERATORS_IN_NAMESPACE +# endif +// Variadic macros do not exist for C++ Builder versions 5 and below +#define BOOST_NO_CXX11_VARIADIC_MACROS +# endif + +// Version 5.51 and below: +#if (__BORLANDC__ <= 0x551) +# define BOOST_NO_CV_SPECIALIZATIONS +# define BOOST_NO_CV_VOID_SPECIALIZATIONS +# define BOOST_NO_DEDUCED_TYPENAME +// workaround for missing WCHAR_MAX/WCHAR_MIN: +#ifdef __cplusplus +#include +#include +#else +#include +#include +#endif // __cplusplus +#ifndef WCHAR_MAX +# define WCHAR_MAX 0xffff +#endif +#ifndef WCHAR_MIN +# define WCHAR_MIN 0 +#endif +#endif + +// Borland C++ Builder 6 and below: +#if (__BORLANDC__ <= 0x564) + +# if defined(NDEBUG) && defined(__cplusplus) + // fix broken so that Boost.test works: +# include +# undef strcmp +# endif + // fix broken errno declaration: +# include +# ifndef errno +# define errno errno +# endif + +#endif + +// +// new bug in 5.61: +#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580) + // this seems to be needed by the command line compiler, but not the IDE: +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +#endif + +// Borland C++ Builder 2006 Update 2 and below: +#if (__BORLANDC__ <= 0x582) +# define BOOST_NO_SFINAE +# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG +# define BOOST_NO_TEMPLATE_TEMPLATES + +# define BOOST_NO_PRIVATE_IN_AGGREGATE + +# ifdef _WIN32 +# define BOOST_NO_SWPRINTF +# elif defined(linux) || defined(__linux__) || defined(__linux) + // we should really be able to do without this + // but the wcs* functions aren't imported into std:: +# define BOOST_NO_STDC_NAMESPACE + // _CPPUNWIND doesn't get automatically set for some reason: +# pragma defineonoption BOOST_CPPUNWIND -x +# endif +#endif + +#if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info + // we shouldn't really need this - but too many things choke + // without it, this needs more investigation: +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_NO_IS_ABSTRACT +# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS +# define BOOST_NO_USING_TEMPLATE +# define BOOST_SP_NO_SP_CONVERTIBLE + +// Temporary workaround +#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif + +// Borland C++ Builder 2008 and below: +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE +# define BOOST_NO_NESTED_FRIENDSHIP +# define BOOST_NO_TYPENAME_WITH_CTOR +#if (__BORLANDC__ < 0x600) +# define BOOST_ILLEGAL_CV_REFERENCES +#endif + +// +// Positive Feature detection +// +// Borland C++ Builder 2008 and below: +#if (__BORLANDC__ >= 0x599) +# pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax +#endif +// +// C++0x Macros: +// +#if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610) +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +# define BOOST_NO_CXX11_DECLTYPE +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_EXTERN_TEMPLATE +# define BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_NO_CXX11_SCOPED_ENUMS +# define BOOST_NO_CXX11_STATIC_ASSERT +#else +# define BOOST_HAS_ALIGNOF +# define BOOST_HAS_CHAR16_T +# define BOOST_HAS_CHAR32_T +# define BOOST_HAS_DECLTYPE +# define BOOST_HAS_EXPLICIT_CONVERSION_OPS +# define BOOST_HAS_REF_QUALIFIER +# define BOOST_HAS_RVALUE_REFS +# define BOOST_HAS_STATIC_ASSERT +#endif + +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#if __BORLANDC__ >= 0x590 +# define BOOST_HAS_TR1_HASH + +# define BOOST_HAS_MACRO_USE_FACET +#endif + +// +// Post 0x561 we have long long and stdint.h: +#if __BORLANDC__ >= 0x561 +# ifndef __NO_LONG_LONG +# define BOOST_HAS_LONG_LONG +# else +# define BOOST_NO_LONG_LONG +# endif + // On non-Win32 platforms let the platform config figure this out: +# ifdef _WIN32 +# define BOOST_HAS_STDINT_H +# endif +#endif + +// Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is +// defined, then we have 0x560 or greater with the Rogue Wave implementation +// which presumably has the std::DBL_MAX bug. +#if defined( BOOST_BCB_WITH_ROGUE_WAVE ) +// is partly broken, some macros define symbols that are really in +// namespace std, so you end up having to use illegal constructs like +// std::DBL_MAX, as a fix we'll just include float.h and have done with: +#include +#endif +// +// __int64: +// +#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__) +# define BOOST_HAS_MS_INT64 +#endif +// +// check for exception handling support: +// +#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif +// +// all versions have a : +// +#ifndef __STRICT_ANSI__ +# define BOOST_HAS_DIRENT_H +#endif +// +// all versions support __declspec: +// +#if defined(__STRICT_ANSI__) +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +# define BOOST_SYMBOL_EXPORT +#endif +// +// ABI fixing headers: +// +#if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet +#ifndef BOOST_ABI_PREFIX +# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" +#endif +#ifndef BOOST_ABI_SUFFIX +# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" +#endif +#endif +// +// Disable Win32 support in ANSI mode: +// +#if __BORLANDC__ < 0x600 +# pragma defineonoption BOOST_DISABLE_WIN32 -A +#elif defined(__STRICT_ANSI__) +# define BOOST_DISABLE_WIN32 +#endif +// +// MSVC compatibility mode does some nasty things: +// TODO: look up if this doesn't apply to the whole 12xx range +// +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# define BOOST_NO_VOID_RETURNS +#endif + +// Borland did not implement value-initialization completely, as I reported +// in 2007, Borland Report 51854, "Value-initialization: POD struct should be +// zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854 +// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues +// (Niels Dekker, LKEB, April 2010) +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION + +#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) diff --git a/contrib/src/boost/config/compiler/clang.hpp b/contrib/src/boost/config/compiler/clang.hpp new file mode 100644 index 0000000..5481e5e --- /dev/null +++ b/contrib/src/boost/config/compiler/clang.hpp @@ -0,0 +1,279 @@ +// (C) Copyright Douglas Gregor 2010 +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Clang compiler setup. + +#define BOOST_HAS_PRAGMA_ONCE + +// Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used. +#if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) +# define BOOST_HAS_PRAGMA_DETECT_MISMATCH +#endif + +// When compiling with clang before __has_extension was defined, +// even if one writes 'defined(__has_extension) && __has_extension(xxx)', +// clang reports a compiler error. So the only workaround found is: + +#ifndef __has_extension +#define __has_extension __has_feature +#endif + +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif + +#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + +#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID) +# define BOOST_NO_TYPEID +#endif + +#if defined(__int64) && !defined(__GNUC__) +# define BOOST_HAS_MS_INT64 +#endif + +#define BOOST_HAS_NRVO + +// Branch prediction hints +#if defined(__has_builtin) +#if __has_builtin(__builtin_expect) +#define BOOST_LIKELY(x) __builtin_expect(x, 1) +#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) +#endif +#endif + +// Clang supports "long long" in all compilation modes. +#define BOOST_HAS_LONG_LONG + +// +// We disable this if the compiler is really nvcc as it +// doesn't actually support __int128 as of CUDA_VERSION=5000 +// even though it defines __SIZEOF_INT128__. +// See https://svn.boost.org/trac/boost/ticket/10418 +// Only re-enable this for nvcc if you're absolutely sure +// of the circumstances under which it's supported. +// Similarly __SIZEOF_INT128__ is defined when targetting msvc +// compatibility even though the required support functions are absent. +// +#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) && !defined(_MSC_VER) +# define BOOST_HAS_INT128 +#endif + + +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) +# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) +# define BOOST_SYMBOL_IMPORT +# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) +#endif + +// +// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through +// between switch labels. +// +#if __cplusplus >= 201103L && defined(__has_warning) +# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") +# define BOOST_FALLTHROUGH [[clang::fallthrough]] +# endif +#endif + +#if !__has_feature(cxx_auto_type) +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#endif + +// +// Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t +// +#if defined(_MSC_VER) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +#endif + +#if !__has_feature(cxx_constexpr) +# define BOOST_NO_CXX11_CONSTEXPR +#endif + +#if !__has_feature(cxx_decltype) +# define BOOST_NO_CXX11_DECLTYPE +#endif + +#if !__has_feature(cxx_decltype_incomplete_return_types) +# define BOOST_NO_CXX11_DECLTYPE_N3276 +#endif + +#if !__has_feature(cxx_defaulted_functions) +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#endif + +#if !__has_feature(cxx_deleted_functions) +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +#endif + +#if !__has_feature(cxx_explicit_conversions) +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#endif + +#if !__has_feature(cxx_default_function_template_args) +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#endif + +#if !__has_feature(cxx_generalized_initializers) +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#endif + +#if !__has_feature(cxx_lambdas) +# define BOOST_NO_CXX11_LAMBDAS +#endif + +#if !__has_feature(cxx_local_type_template_args) +# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#endif + +#if !__has_feature(cxx_noexcept) +# define BOOST_NO_CXX11_NOEXCEPT +#endif + +#if !__has_feature(cxx_nullptr) +# define BOOST_NO_CXX11_NULLPTR +#endif + +#if !__has_feature(cxx_range_for) +# define BOOST_NO_CXX11_RANGE_BASED_FOR +#endif + +#if !__has_feature(cxx_raw_string_literals) +# define BOOST_NO_CXX11_RAW_LITERALS +#endif + +#if !__has_feature(cxx_reference_qualified_functions) +# define BOOST_NO_CXX11_REF_QUALIFIERS +#endif + +#if !__has_feature(cxx_generalized_initializers) +# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#endif + +#if !__has_feature(cxx_rvalue_references) +# define BOOST_NO_CXX11_RVALUE_REFERENCES +#endif + +#if !__has_feature(cxx_strong_enums) +# define BOOST_NO_CXX11_SCOPED_ENUMS +#endif + +#if !__has_feature(cxx_static_assert) +# define BOOST_NO_CXX11_STATIC_ASSERT +#endif + +#if !__has_feature(cxx_alias_templates) +# define BOOST_NO_CXX11_TEMPLATE_ALIASES +#endif + +#if !__has_feature(cxx_unicode_literals) +# define BOOST_NO_CXX11_UNICODE_LITERALS +#endif + +#if !__has_feature(cxx_variadic_templates) +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#endif + +#if !__has_feature(cxx_user_literals) +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#endif + +#if !__has_feature(cxx_alignas) +# define BOOST_NO_CXX11_ALIGNAS +#endif + +#if !__has_feature(cxx_trailing_return) +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#endif + +#if !__has_feature(cxx_inline_namespaces) +# define BOOST_NO_CXX11_INLINE_NAMESPACES +#endif + +#if !__has_feature(cxx_override_control) +# define BOOST_NO_CXX11_FINAL +#endif + +#if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif + +#if !__has_feature(__cxx_decltype_auto__) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif + +#if !__has_feature(__cxx_aggregate_nsdmi__) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif + +#if !__has_feature(__cxx_init_captures__) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif + +#if !__has_feature(__cxx_generic_lambdas__) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif + +// clang < 3.5 has a defect with dependent type, like following. +// +// template +// constexpr typename enable_if >::type foo(T &) +// { } // error: no return statement in constexpr function +// +// This issue also affects C++11 mode, but C++11 constexpr requires return stmt. +// Therefore we don't care such case. +// +// Note that we can't check Clang version directly as the numbering system changes depending who's +// creating the Clang release (see https://github.com/boostorg/config/pull/39#issuecomment-59927873) +// so instead verify that we have a feature that was introduced at the same time as working C++14 +// constexpr (generic lambda's in this case): +// +#if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) +# define BOOST_NO_CXX14_CONSTEXPR +#endif + +#if !__has_feature(__cxx_return_type_deduction__) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif + +#if !__has_feature(__cxx_variable_templates__) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#if __cplusplus < 201400 +// All versions with __cplusplus above this value seem to support this: +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +// +// __builtin_unreachable: +#if defined(__has_builtin) && __has_builtin(__builtin_unreachable) +#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); +#endif + +// Clang has supported the 'unused' attribute since the first release. +#define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "Clang version " __clang_version__ +#endif + +// Macro used to identify the Clang compiler. +#define BOOST_CLANG 1 + diff --git a/contrib/src/boost/config/compiler/codegear.hpp b/contrib/src/boost/config/compiler/codegear.hpp new file mode 100644 index 0000000..02bd792 --- /dev/null +++ b/contrib/src/boost/config/compiler/codegear.hpp @@ -0,0 +1,220 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// CodeGear C++ compiler setup: + +#if !defined( BOOST_WITH_CODEGEAR_WARNINGS ) +// these warnings occur frequently in optimized template code +# pragma warn -8004 // var assigned value, but never used +# pragma warn -8008 // condition always true/false +# pragma warn -8066 // dead code can never execute +# pragma warn -8104 // static members with ctors not threadsafe +# pragma warn -8105 // reference member in class without ctors +#endif +// +// versions check: +// last known and checked version is 0x621 +#if (__CODEGEARC__ > 0x621) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# else +# pragma message( "Unknown compiler version - please run the configure tests and report the results") +# endif +#endif + +// CodeGear C++ Builder 2009 +#if (__CODEGEARC__ <= 0x613) +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_PRIVATE_IN_AGGREGATE +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE + // we shouldn't really need this - but too many things choke + // without it, this needs more investigation: +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_SP_NO_SP_CONVERTIBLE +#endif + +// CodeGear C++ Builder 2010 +#if (__CODEGEARC__ <= 0x621) +# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member +# define BOOST_NO_USING_TEMPLATE +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +// Temporary hack, until specific MPL preprocessed headers are generated +# define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +// CodeGear has not yet completely implemented value-initialization, for +// example for array types, as I reported in 2010: Embarcadero Report 83751, +// "Value-initialization: arrays should have each element value-initialized", +// http://qc.embarcadero.com/wc/qcmain.aspx?d=83751 +// Last checked version: Embarcadero C++ 6.21 +// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues +// (Niels Dekker, LKEB, April 2010) +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION + +# if defined(NDEBUG) && defined(__cplusplus) + // fix broken so that Boost.test works: +# include +# undef strcmp +# endif + // fix broken errno declaration: +# include +# ifndef errno +# define errno errno +# endif + +#endif + +// Reportedly, #pragma once is supported since C++ Builder 2010 +#if (__CODEGEARC__ >= 0x620) +# define BOOST_HAS_PRAGMA_ONCE +#endif + +// +// C++0x macros: +// +#if (__CODEGEARC__ <= 0x620) +#define BOOST_NO_CXX11_STATIC_ASSERT +#else +#define BOOST_HAS_STATIC_ASSERT +#endif +#define BOOST_HAS_CHAR16_T +#define BOOST_HAS_CHAR32_T +#define BOOST_HAS_LONG_LONG +// #define BOOST_HAS_ALIGNOF +#define BOOST_HAS_DECLTYPE +#define BOOST_HAS_EXPLICIT_CONVERSION_OPS +// #define BOOST_HAS_RVALUE_REFS +#define BOOST_HAS_SCOPED_ENUM +// #define BOOST_HAS_STATIC_ASSERT +#define BOOST_HAS_STD_TYPE_TRAITS + +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +// +// TR1 macros: +// +#define BOOST_HAS_TR1_HASH +#define BOOST_HAS_TR1_TYPE_TRAITS +#define BOOST_HAS_TR1_UNORDERED_MAP +#define BOOST_HAS_TR1_UNORDERED_SET + +#define BOOST_HAS_MACRO_USE_FACET + +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST + +// On non-Win32 platforms let the platform config figure this out: +#ifdef _WIN32 +# define BOOST_HAS_STDINT_H +#endif + +// +// __int64: +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_MS_INT64 +#endif +// +// check for exception handling support: +// +#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif +// +// all versions have a : +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_DIRENT_H +#endif +// +// all versions support __declspec: +// +#if defined(__STRICT_ANSI__) +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +# define BOOST_SYMBOL_EXPORT +#endif +// +// ABI fixing headers: +// +#ifndef BOOST_ABI_PREFIX +# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" +#endif +#ifndef BOOST_ABI_SUFFIX +# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" +#endif +// +// Disable Win32 support in ANSI mode: +// +# pragma defineonoption BOOST_DISABLE_WIN32 -A +// +// MSVC compatibility mode does some nasty things: +// TODO: look up if this doesn't apply to the whole 12xx range +// +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# define BOOST_NO_VOID_RETURNS +#endif + +#define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__) + diff --git a/contrib/src/boost/config/compiler/comeau.hpp b/contrib/src/boost/config/compiler/comeau.hpp new file mode 100644 index 0000000..278222d --- /dev/null +++ b/contrib/src/boost/config/compiler/comeau.hpp @@ -0,0 +1,59 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Douglas Gregor 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Aleksey Gurtovoy 2003. +// (C) Copyright Beman Dawes 2003. +// (C) Copyright Jens Maurer 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Comeau C++ compiler setup: + +#include "boost/config/compiler/common_edg.hpp" + +#if (__COMO_VERSION__ <= 4245) + +# if defined(_MSC_VER) && _MSC_VER <= 1300 +# if _MSC_VER > 100 + // only set this in non-strict mode: +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# endif +# endif + +// Void returns don't work when emulating VC 6 (Peter Dimov) +// TODO: look up if this doesn't apply to the whole 12xx range +# if defined(_MSC_VER) && (_MSC_VER < 1300) +# define BOOST_NO_VOID_RETURNS +# endif + +#endif // version 4245 + +// +// enable __int64 support in VC emulation mode +// +# if defined(_MSC_VER) && (_MSC_VER >= 1200) +# define BOOST_HAS_MS_INT64 +# endif + +#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__) + +// +// versions check: +// we don't know Comeau prior to version 4245: +#if __COMO_VERSION__ < 4245 +# error "Compiler not configured - please reconfigure" +#endif +// +// last known and checked version is 4245: +#if (__COMO_VERSION__ > 4245) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + + diff --git a/contrib/src/boost/config/compiler/common_edg.hpp b/contrib/src/boost/config/compiler/common_edg.hpp new file mode 100644 index 0000000..b92e574 --- /dev/null +++ b/contrib/src/boost/config/compiler/common_edg.hpp @@ -0,0 +1,143 @@ +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright Markus Schoepflin 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// +// Options common to all edg based compilers. +// +// This is included from within the individual compiler mini-configs. + +#ifndef __EDG_VERSION__ +# error This file requires that __EDG_VERSION__ be defined. +#endif + +#if (__EDG_VERSION__ <= 238) +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_SFINAE +#endif + +#if (__EDG_VERSION__ <= 240) +# define BOOST_NO_VOID_RETURNS +#endif + +#if (__EDG_VERSION__ <= 241) && !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +#endif + +#if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES) +# define BOOST_NO_TEMPLATE_TEMPLATES +#endif + +#if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT) +# define BOOST_NO_IS_ABSTRACT +#endif + +#if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#endif + +// See also kai.hpp which checks a Kai-specific symbol for EH +# if !defined(__KCC) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +# endif + +# if !defined(__NO_LONG_LONG) +# define BOOST_HAS_LONG_LONG +# else +# define BOOST_NO_LONG_LONG +# endif + +// Not sure what version was the first to support #pragma once, but +// different EDG-based compilers (e.g. Intel) supported it for ages. +// Add a proper version check if it causes problems. +#define BOOST_HAS_PRAGMA_ONCE + +// +// C++0x features +// +// See above for BOOST_NO_LONG_LONG +// +#if (__EDG_VERSION__ < 310) +# define BOOST_NO_CXX11_EXTERN_TEMPLATE +#endif +#if (__EDG_VERSION__ <= 310) +// No support for initializer lists +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#endif +#if (__EDG_VERSION__ < 400) +# define BOOST_NO_CXX11_VARIADIC_MACROS +#endif + +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#ifdef c_plusplus +// EDG has "long long" in non-strict mode +// However, some libraries have insufficient "long long" support +// #define BOOST_HAS_LONG_LONG +#endif diff --git a/contrib/src/boost/config/compiler/compaq_cxx.hpp b/contrib/src/boost/config/compiler/compaq_cxx.hpp new file mode 100644 index 0000000..b44486c --- /dev/null +++ b/contrib/src/boost/config/compiler/compaq_cxx.hpp @@ -0,0 +1,19 @@ +// (C) Copyright John Maddock 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Tru64 C++ compiler setup (now HP): + +#define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER) + +#include "boost/config/compiler/common_edg.hpp" + +// +// versions check: +// Nothing to do here? + + + diff --git a/contrib/src/boost/config/compiler/cray.hpp b/contrib/src/boost/config/compiler/cray.hpp new file mode 100644 index 0000000..3f66043 --- /dev/null +++ b/contrib/src/boost/config/compiler/cray.hpp @@ -0,0 +1,92 @@ +// (C) Copyright John Maddock 2011. +// (C) Copyright Cray, Inc. 2013 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Greenhills C compiler setup: + +#define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE) + +#if _RELEASE < 8 +# error "Boost is not configured for Cray compilers prior to version 8, please try the configure script." +#endif + +// +// Check this is a recent EDG based compiler, otherwise we don't support it here: +// +#ifndef __EDG_VERSION__ +# error "Unsupported Cray compiler, please try running the configure script." +#endif + +#include "boost/config/compiler/common_edg.hpp" + + +// +// +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_HAS_NRVO +#define BOOST_NO_CXX11_VARIADIC_MACROS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#define BOOST_HAS_NRVO +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + + +//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG +#define BOOST_MATH_DISABLE_STD_FPCLASSIFY +//#define BOOST_HAS_FPCLASSIFY + +#define BOOST_SP_USE_PTHREADS +#define BOOST_AC_USE_PTHREADS + +/* everything that follows is working around what are thought to be + * compiler shortcomings. Revist all of these regularly. + */ + +//#define BOOST_USE_ENUM_STATIC_ASSERT +//#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS //(this may be implied by the previous #define + +// These constants should be provided by the +// compiler, at least when -hgnu is asserted on the command line. + +#ifndef __ATOMIC_RELAXED +#define __ATOMIC_RELAXED 0 +#define __ATOMIC_CONSUME 1 +#define __ATOMIC_ACQUIRE 2 +#define __ATOMIC_RELEASE 3 +#define __ATOMIC_ACQ_REL 4 +#define __ATOMIC_SEQ_CST 5 +#endif + + + diff --git a/contrib/src/boost/config/compiler/digitalmars.hpp b/contrib/src/boost/config/compiler/digitalmars.hpp new file mode 100644 index 0000000..a3d293c --- /dev/null +++ b/contrib/src/boost/config/compiler/digitalmars.hpp @@ -0,0 +1,124 @@ +// Copyright (C) Christof Meerwald 2003 +// Copyright (C) Dan Watkins 2003 +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Digital Mars C++ compiler setup: +#define BOOST_COMPILER __DMC_VERSION_STRING__ + +#define BOOST_HAS_LONG_LONG +#define BOOST_HAS_PRAGMA_ONCE + +#if !defined(BOOST_STRICT_CONFIG) +#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +#define BOOST_NO_OPERATORS_IN_NAMESPACE +#define BOOST_NO_UNREACHABLE_RETURN_DETECTION +#define BOOST_NO_SFINAE +#define BOOST_NO_USING_TEMPLATE +#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#endif + +// +// has macros: +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_WINTHREADS + +#if (__DMC__ >= 0x847) +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_LOG1P +#endif + +// +// Is this really the best way to detect whether the std lib is in namespace std? +// +#ifdef __cplusplus +#include +#endif +#if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD) +# define BOOST_NO_STDC_NAMESPACE +#endif + + +// check for exception handling support: +#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +// +// C++0x features +// +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#if (__DMC__ <= 0x840) +#error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is ...: +#if (__DMC__ > 0x848) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif diff --git a/contrib/src/boost/config/compiler/gcc.hpp b/contrib/src/boost/config/compiler/gcc.hpp new file mode 100644 index 0000000..d9dd59d --- /dev/null +++ b/contrib/src/boost/config/compiler/gcc.hpp @@ -0,0 +1,314 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Jens Maurer 2001 - 2002. +// (C) Copyright Beman Dawes 2001 - 2003. +// (C) Copyright Douglas Gregor 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Synge Todo 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// GNU C++ compiler setup. + +// +// Define BOOST_GCC so we know this is "real" GCC and not some pretender: +// +#define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#if !defined(__CUDACC__) +#define BOOST_GCC BOOST_GCC_VERSION +#endif + +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) +# define BOOST_GCC_CXX11 +#endif + +#if __GNUC__ == 3 +# if defined (__PATHSCALE__) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +# define BOOST_NO_IS_ABSTRACT +# endif + +# if __GNUC_MINOR__ < 4 +# define BOOST_NO_IS_ABSTRACT +# endif +# define BOOST_NO_CXX11_EXTERN_TEMPLATE +#endif +#if __GNUC__ < 4 +// +// All problems to gcc-3.x and earlier here: +// +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +# ifdef __OPEN64__ +# define BOOST_NO_IS_ABSTRACT +# endif +#endif + +// GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links +#if BOOST_GCC_VERSION >= 30400 +#define BOOST_HAS_PRAGMA_ONCE +#endif + +#if BOOST_GCC_VERSION < 40400 +// Previous versions of GCC did not completely implement value-initialization: +// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize +// members", reported by Jonathan Wakely in 2006, +// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4) +// GCC Bug 33916, "Default constructor fails to initialize array members", +// reported by Michael Elizabeth Chastain in 2007, +// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4) +// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +#endif + +#if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + + +// +// Threading support: Turn this on unconditionally here (except for +// those platforms where we can know for sure). It will get turned off again +// later if no threading API is detected. +// +#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) +# define BOOST_HAS_THREADS +#endif + +// +// gcc has "long long" +// Except on Darwin with standard compliance enabled (-pedantic) +// Apple gcc helpfully defines this macro we can query +// +#if !defined(__DARWIN_NO_LONG_LONG) +# define BOOST_HAS_LONG_LONG +#endif + +// +// gcc implements the named return value optimization since version 3.1 +// +#define BOOST_HAS_NRVO + +// Branch prediction hints +#define BOOST_LIKELY(x) __builtin_expect(x, 1) +#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) + +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if __GNUC__ >= 4 +# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) + // All Win32 development environments, including 64-bit Windows and MinGW, define + // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, + // so does not define _WIN32 or its variants. +# define BOOST_HAS_DECLSPEC +# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__)) +# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__)) +# else +# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) +# define BOOST_SYMBOL_IMPORT +# endif +# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) +#else +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +# define BOOST_SYMBOL_EXPORT +#endif + +// +// RTTI and typeinfo detection is possible post gcc-4.3: +// +#if BOOST_GCC_VERSION > 40300 +# ifndef __GXX_RTTI +# ifndef BOOST_NO_TYPEID +# define BOOST_NO_TYPEID +# endif +# ifndef BOOST_NO_RTTI +# define BOOST_NO_RTTI +# endif +# endif +#endif + +// +// Recent GCC versions have __int128 when in 64-bit mode. +// +// We disable this if the compiler is really nvcc as it +// doesn't actually support __int128 as of CUDA_VERSION=5000 +// even though it defines __SIZEOF_INT128__. +// See https://svn.boost.org/trac/boost/ticket/8048 +// Only re-enable this for nvcc if you're absolutely sure +// of the circumstances under which it's supported: +// +#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) +# define BOOST_HAS_INT128 +#endif +// +// Recent GCC versions have a __float128 native type, we need to +// include a std lib header to detect this - not ideal, but we'll +// be including later anyway when we select the std lib. +// +#ifdef __cplusplus +#include +#else +#include +#endif +#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) +# define BOOST_HAS_FLOAT128 +#endif + +// C++0x features in 4.3.n and later +// +#if (BOOST_GCC_VERSION >= 40300) && defined(BOOST_GCC_CXX11) +// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are +// passed on the command line, which in turn defines +// __GXX_EXPERIMENTAL_CXX0X__. +# define BOOST_HAS_DECLTYPE +# define BOOST_HAS_RVALUE_REFS +# define BOOST_HAS_STATIC_ASSERT +# define BOOST_HAS_VARIADIC_TMPL +#else +# define BOOST_NO_CXX11_DECLTYPE +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_NO_CXX11_STATIC_ASSERT +#endif + +// C++0x features in 4.4.n and later +// +#if (BOOST_GCC_VERSION < 40400) || !defined(BOOST_GCC_CXX11) +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +# define BOOST_NO_CXX11_INLINE_NAMESPACES +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#endif + +#if BOOST_GCC_VERSION < 40500 +# define BOOST_NO_SFINAE_EXPR +#endif + +// GCC 4.5 forbids declaration of defaulted functions in private or protected sections +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 5) || !defined(BOOST_GCC_CXX11) +# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS +#endif + +// C++0x features in 4.5.0 and later +// +#if (BOOST_GCC_VERSION < 40500) || !defined(BOOST_GCC_CXX11) +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_LAMBDAS +# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +# define BOOST_NO_CXX11_RAW_LITERALS +# define BOOST_NO_CXX11_UNICODE_LITERALS +#endif + +// C++0x features in 4.5.1 and later +// +#if (BOOST_GCC_VERSION < 40501) || !defined(BOOST_GCC_CXX11) +// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1 +// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 +# define BOOST_NO_CXX11_SCOPED_ENUMS +#endif + +// C++0x features in 4.6.n and later +// +#if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11) +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#endif + +// C++0x features in 4.7.n and later +// +#if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11) +# define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_TEMPLATE_ALIASES +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +#endif + +// C++0x features in 4.8.n and later +// +#if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11) +# define BOOST_NO_CXX11_ALIGNAS +#endif + +// C++0x features in 4.8.1 and later +// +#if (BOOST_GCC_VERSION < 40801) || !defined(BOOST_GCC_CXX11) +# define BOOST_NO_CXX11_DECLTYPE_N3276 +# define BOOST_NO_CXX11_REF_QUALIFIERS +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif + +// C++14 features in 4.9.0 and later +// +#if (BOOST_GCC_VERSION < 40900) || (__cplusplus < 201300) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +# define BOOST_NO_CXX14_DECLTYPE_AUTO +# if !((BOOST_GCC_VERSION >= 40801) && (BOOST_GCC_VERSION < 40900) && defined(BOOST_GCC_CXX11)) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +# endif +#endif + + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +// +// Unused attribute: +#if __GNUC__ >= 4 +# define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) +#endif +// +// __builtin_unreachable: +#if BOOST_GCC_VERSION >= 40800 +#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); +#endif + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "GNU C++ version " __VERSION__ +#endif + +// ConceptGCC compiler: +// http://www.generic-programming.org/software/ConceptGCC/ +#ifdef __GXX_CONCEPTS__ +# define BOOST_HAS_CONCEPTS +# define BOOST_COMPILER "ConceptGCC version " __VERSION__ +#endif + +// versions check: +// we don't know gcc prior to version 3.30: +#if (BOOST_GCC_VERSION< 30300) +# error "Compiler not configured - please reconfigure" +#endif +// +// last known and checked version is 4.9: +#if (BOOST_GCC_VERSION > 40900) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# else +// we don't emit warnings here anymore since there are no defect macros defined for +// gcc post 3.4, so any failures are gcc regressions... +//# warning "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + diff --git a/contrib/src/boost/config/compiler/gcc_xml.hpp b/contrib/src/boost/config/compiler/gcc_xml.hpp new file mode 100644 index 0000000..c11f29d --- /dev/null +++ b/contrib/src/boost/config/compiler/gcc_xml.hpp @@ -0,0 +1,95 @@ +// (C) Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// GCC-XML C++ compiler setup: + +# if !defined(__GCCXML_GNUC__) || ((__GCCXML_GNUC__ <= 3) && (__GCCXML_GNUC_MINOR__ <= 3)) +# define BOOST_NO_IS_ABSTRACT +# endif + +// +// Threading support: Turn this on unconditionally here (except for +// those platforms where we can know for sure). It will get turned off again +// later if no threading API is detected. +// +#if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(linux) && !defined(__linux) && !defined(__linux__) +# define BOOST_HAS_THREADS +#endif + +// +// gcc has "long long" +// +#define BOOST_HAS_LONG_LONG + +// C++0x features: +// +# define BOOST_NO_CXX11_CONSTEXPR +# define BOOST_NO_CXX11_NULLPTR +# define BOOST_NO_CXX11_TEMPLATE_ALIASES +# define BOOST_NO_CXX11_DECLTYPE +# define BOOST_NO_CXX11_DECLTYPE_N3276 +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_NO_CXX11_STATIC_ASSERT +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +# define BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_SCOPED_ENUMS +# define BOOST_NO_SFINAE_EXPR +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_LAMBDAS +# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +# define BOOST_NO_CXX11_RANGE_BASED_FOR +# define BOOST_NO_CXX11_RAW_LITERALS +# define BOOST_NO_CXX11_UNICODE_LITERALS +# define BOOST_NO_CXX11_NOEXCEPT +# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +# define BOOST_NO_CXX11_ALIGNAS +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +# define BOOST_NO_CXX11_INLINE_NAMESPACES +# define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__ + + diff --git a/contrib/src/boost/config/compiler/greenhills.hpp b/contrib/src/boost/config/compiler/greenhills.hpp new file mode 100644 index 0000000..038b6b2 --- /dev/null +++ b/contrib/src/boost/config/compiler/greenhills.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Greenhills C++ compiler setup: + +#define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs) + +#include "boost/config/compiler/common_edg.hpp" + +// +// versions check: +// we don't support Greenhills prior to version 0: +#if __ghs < 0 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 0: +#if (__ghs > 0) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + diff --git a/contrib/src/boost/config/compiler/hp_acc.hpp b/contrib/src/boost/config/compiler/hp_acc.hpp new file mode 100644 index 0000000..fb63839 --- /dev/null +++ b/contrib/src/boost/config/compiler/hp_acc.hpp @@ -0,0 +1,145 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Toon Knapen 2003. +// (C) Copyright Boris Gubenko 2006 - 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// HP aCC C++ compiler setup: + +#if defined(__EDG__) +#include "boost/config/compiler/common_edg.hpp" +#endif + +#if (__HP_aCC <= 33100) +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_OPERATORS_IN_NAMESPACE +# if !defined(_NAMESPACE_STD) +# define BOOST_NO_STD_LOCALE +# define BOOST_NO_STRINGSTREAM +# endif +#endif + +#if (__HP_aCC <= 33300) +// member templates are sufficiently broken that we disable them for now +# define BOOST_NO_MEMBER_TEMPLATES +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE +#endif + +#if (__HP_aCC <= 38000) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif + +#if (__HP_aCC > 50000) && (__HP_aCC < 60000) +# define BOOST_NO_UNREACHABLE_RETURN_DETECTION +# define BOOST_NO_TEMPLATE_TEMPLATES +# define BOOST_NO_SWPRINTF +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_IS_ABSTRACT +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +#endif + +// optional features rather than defects: +#if (__HP_aCC >= 33900) +# define BOOST_HAS_LONG_LONG +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +#endif + +#if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 ) +# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD +#endif + +// This macro should not be defined when compiling in strict ansi +// mode, but, currently, we don't have the ability to determine +// what standard mode we are compiling with. Some future version +// of aCC6 compiler will provide predefined macros reflecting the +// compilation options, including the standard mode. +#if (__HP_aCC >= 60000) || ((__HP_aCC > 38000) && defined(__hpxstd98)) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif + +#define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC) + +// +// versions check: +// we don't support HP aCC prior to version 33000: +#if __HP_aCC < 33000 +# error "Compiler not supported or configured - please reconfigure" +#endif + +// +// Extended checks for supporting aCC on PA-RISC +#if __HP_aCC > 30000 && __HP_aCC < 50000 +# if __HP_aCC < 38000 + // versions prior to version A.03.80 not supported +# error "Compiler version not supported - version A.03.80 or higher is required" +# elif !defined(__hpxstd98) + // must compile using the option +hpxstd98 with version A.03.80 and above +# error "Compiler option '+hpxstd98' is required for proper support" +# endif //PA-RISC +#endif + +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#if !defined(__EDG__) + +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS + +/* + See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and + https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443436 +*/ + +#if (__HP_aCC < 62500) || !defined(HP_CXX0x_SOURCE) + #define BOOST_NO_CXX11_VARIADIC_MACROS +#endif + +#endif + +// +// last known and checked version for HP-UX/ia64 is 61300 +// last known and checked version for PA-RISC is 38000 +#if ((__HP_aCC > 61300) || ((__HP_aCC > 38000) && defined(__hpxstd98))) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif diff --git a/contrib/src/boost/config/compiler/intel.hpp b/contrib/src/boost/config/compiler/intel.hpp new file mode 100644 index 0000000..7789b94 --- /dev/null +++ b/contrib/src/boost/config/compiler/intel.hpp @@ -0,0 +1,535 @@ +// (C) Copyright John Maddock 2001-8. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002 - 2003. +// (C) Copyright Guillaume Melquiond 2002 - 2003. +// (C) Copyright Beman Dawes 2003. +// (C) Copyright Martin Wille 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Intel compiler setup: + +#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__)) + +#ifdef _MSC_VER + +#include + +#undef BOOST_MSVC +#undef BOOST_MSVC_FULL_VER + +#if (__INTEL_COMPILER >= 1500) && (_MSC_VER >= 1900) +// +// These appear to be supported, even though VC++ may not support them: +// +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_LOG1P +#undef BOOST_NO_CXX14_BINARY_LITERALS +// This one may be a little risky to enable?? +#undef BOOST_NO_SFINAE_EXPR + +#endif + +#else + +#include + +#undef BOOST_GCC_VERSION +#undef BOOST_GCC_CXX11 + +#endif + +#undef BOOST_COMPILER + +#if defined(__INTEL_COMPILER) +#if __INTEL_COMPILER == 9999 +# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1. +#else +# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER +#endif +#elif defined(__ICL) +# define BOOST_INTEL_CXX_VERSION __ICL +#elif defined(__ICC) +# define BOOST_INTEL_CXX_VERSION __ICC +#elif defined(__ECC) +# define BOOST_INTEL_CXX_VERSION __ECC +#endif + +// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' +#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__) +# define BOOST_INTEL_STDCXX0X +#endif +#if defined(_MSC_VER) && (_MSC_VER >= 1600) +# define BOOST_INTEL_STDCXX0X +#endif + +#ifdef __GNUC__ +# define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#endif + +#if !defined(BOOST_COMPILER) +# if defined(BOOST_INTEL_STDCXX0X) +# define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +# else +# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +# endif +#endif + +#define BOOST_INTEL BOOST_INTEL_CXX_VERSION + +#if defined(_WIN32) || defined(_WIN64) +# define BOOST_INTEL_WIN BOOST_INTEL +#else +# define BOOST_INTEL_LINUX BOOST_INTEL +#endif + +#else + +#include "boost/config/compiler/common_edg.hpp" + +#if defined(__INTEL_COMPILER) +#if __INTEL_COMPILER == 9999 +# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1. +#else +# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER +#endif +#elif defined(__ICL) +# define BOOST_INTEL_CXX_VERSION __ICL +#elif defined(__ICC) +# define BOOST_INTEL_CXX_VERSION __ICC +#elif defined(__ECC) +# define BOOST_INTEL_CXX_VERSION __ECC +#endif + +// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' +#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__) +# define BOOST_INTEL_STDCXX0X +#endif +#if defined(_MSC_VER) && (_MSC_VER >= 1600) +# define BOOST_INTEL_STDCXX0X +#endif + +#ifdef __GNUC__ +# define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#endif + +#if !defined(BOOST_COMPILER) +# if defined(BOOST_INTEL_STDCXX0X) +# define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +# else +# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +# endif +#endif + +#define BOOST_INTEL BOOST_INTEL_CXX_VERSION + +#if defined(_WIN32) || defined(_WIN64) +# define BOOST_INTEL_WIN BOOST_INTEL +#else +# define BOOST_INTEL_LINUX BOOST_INTEL +#endif + +#if (BOOST_INTEL_CXX_VERSION <= 600) + +# if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov) + +// Boost libraries assume strong standard conformance unless otherwise +// indicated by a config macro. As configured by Intel, the EDG front-end +// requires certain compiler options be set to achieve that strong conformance. +// Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt) +// and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for +// details as they apply to particular versions of the compiler. When the +// compiler does not predefine a macro indicating if an option has been set, +// this config file simply assumes the option has been set. +// Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if +// the compiler option is not enabled. + +# define BOOST_NO_SWPRINTF +# endif + +// Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov) + +# if defined(_MSC_VER) && (_MSC_VER <= 1200) +# define BOOST_NO_VOID_RETURNS +# define BOOST_NO_INTEGRAL_INT64_T +# endif + +#endif + +#if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32) +# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS +#endif + +// See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864 +#if BOOST_INTEL_CXX_VERSION < 600 +# define BOOST_NO_INTRINSIC_WCHAR_T +#else +// We should test the macro _WCHAR_T_DEFINED to check if the compiler +// supports wchar_t natively. *BUT* there is a problem here: the standard +// headers define this macro if they typedef wchar_t. Anyway, we're lucky +// because they define it without a value, while Intel C++ defines it +// to 1. So we can check its value to see if the macro was defined natively +// or not. +// Under UNIX, the situation is exactly the same, but the macro _WCHAR_T +// is used instead. +# if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0) +# define BOOST_NO_INTRINSIC_WCHAR_T +# endif +#endif + +#if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) +// +// Figure out when Intel is emulating this gcc bug +// (All Intel versions prior to 9.0.26, and versions +// later than that if they are set up to emulate gcc 3.2 +// or earlier): +// +# if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912) +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# endif +#endif +#if (defined(__GNUC__) && (__GNUC__ < 4)) || (defined(_WIN32) && (BOOST_INTEL_CXX_VERSION <= 1200)) || (BOOST_INTEL_CXX_VERSION <= 1200) +// GCC or VC emulation: +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif +// +// Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T +// set correctly, if we don't do this now, we will get errors later +// in type_traits code among other things, getting this correct +// for the Intel compiler is actually remarkably fragile and tricky: +// +#ifdef __cplusplus +#if defined(BOOST_NO_INTRINSIC_WCHAR_T) +#include +template< typename T > struct assert_no_intrinsic_wchar_t; +template<> struct assert_no_intrinsic_wchar_t { typedef void type; }; +// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T +// where it is defined above: +typedef assert_no_intrinsic_wchar_t::type assert_no_intrinsic_wchar_t_; +#else +template< typename T > struct assert_intrinsic_wchar_t; +template<> struct assert_intrinsic_wchar_t {}; +// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line: +template<> struct assert_intrinsic_wchar_t {}; +#endif +#endif + +#if defined(_MSC_VER) && (_MSC_VER+0 >= 1000) +# if _MSC_VER >= 1200 +# define BOOST_HAS_MS_INT64 +# endif +# define BOOST_NO_SWPRINTF +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#elif defined(_WIN32) +# define BOOST_DISABLE_WIN32 +#endif + +// I checked version 6.0 build 020312Z, it implements the NRVO. +// Correct this as you find out which version of the compiler +// implemented the NRVO first. (Daniel Frey) +#if (BOOST_INTEL_CXX_VERSION >= 600) +# define BOOST_HAS_NRVO +#endif + +// Branch prediction hints +// I'm not sure 8.0 was the first version to support these builtins, +// update the condition if the version is not accurate. (Andrey Semashev) +#if defined(__GNUC__) && BOOST_INTEL_CXX_VERSION >= 800 +#define BOOST_LIKELY(x) __builtin_expect(x, 1) +#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) +#endif + +// RTTI +// __RTTI is the EDG macro +// __INTEL_RTTI__ is the Intel macro +// __GXX_RTTI is the g++ macro +// _CPPRTTI is the MSVC++ macro +#if !defined(__RTTI) && !defined(__INTEL_RTTI__) && !defined(__GXX_RTTI) && !defined(_CPPRTTI) + +#if !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + +// in MS mode, static typeid works even when RTTI is off +#if !defined(_MSC_VER) && !defined(BOOST_NO_TYPEID) +# define BOOST_NO_TYPEID +#endif + +#endif + +// +// versions check: +// we don't support Intel prior to version 6.0: +#if BOOST_INTEL_CXX_VERSION < 600 +# error "Compiler not supported or configured - please reconfigure" +#endif + +// Intel on MacOS requires +#if defined(__APPLE__) && defined(__INTEL_COMPILER) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif + +// Intel on Altix Itanium +#if defined(__itanium__) && defined(__INTEL_COMPILER) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif + +// +// An attempt to value-initialize a pointer-to-member may trigger an +// internal error on Intel <= 11.1 (last checked version), as was +// reported by John Maddock, Intel support issue 589832, May 2010. +// Moreover, according to test results from Huang-Vista-x86_32_intel, +// intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some +// cases when it should be value-initialized. +// (Niels Dekker, LKEB, May 2010) +// Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression). +#if defined(__INTEL_COMPILER) +# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1600)) +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +# endif +#endif + +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) +# define BOOST_SYMBOL_IMPORT +# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) +#endif +// +// C++0x features +// For each feature we need to check both the Intel compiler version, +// and the version of MSVC or GCC that we are emulating. +// See http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ +// for a list of which features were implemented in which Intel releases. +// +#if defined(BOOST_INTEL_STDCXX0X) +// BOOST_NO_CXX11_CONSTEXPR: +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && !defined(_MSC_VER) +// Available in earlier Intel versions, but fail our tests: +# undef BOOST_NO_CXX11_CONSTEXPR +#endif +// BOOST_NO_CXX11_NULLPTR: +#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_NULLPTR +#endif +// BOOST_NO_CXX11_TEMPLATE_ALIASES +#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_TEMPLATE_ALIASES +#endif + +// BOOST_NO_CXX11_DECLTYPE +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_DECLTYPE +#endif + +// BOOST_NO_CXX11_DECLTYPE_N3276 +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_DECLTYPE_N3276 +#endif + +// BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#endif + +// BOOST_NO_CXX11_RVALUE_REFERENCES +#if (BOOST_INTEL_CXX_VERSION >= 1300) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +// This is available from earlier Intel versions, but breaks Filesystem and other libraries: +# undef BOOST_NO_CXX11_RVALUE_REFERENCES +#endif + +// BOOST_NO_CXX11_STATIC_ASSERT +#if (BOOST_INTEL_CXX_VERSION >= 1110) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_STATIC_ASSERT +#endif + +// BOOST_NO_CXX11_VARIADIC_TEMPLATES +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_VARIADIC_TEMPLATES +#endif + +// BOOST_NO_CXX11_VARIADIC_MACROS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40200)) && (!defined(_MSC_VER) || (_MSC_VER >= 1400)) +# undef BOOST_NO_CXX11_VARIADIC_MACROS +#endif + +// BOOST_NO_CXX11_AUTO_DECLARATIONS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_AUTO_DECLARATIONS +#endif + +// BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#endif + +// BOOST_NO_CXX11_CHAR16_T +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_CXX11_CHAR16_T +#endif + +// BOOST_NO_CXX11_CHAR32_T +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_CXX11_CHAR32_T +#endif + +// BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#endif + +// BOOST_NO_CXX11_DELETED_FUNCTIONS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_DELETED_FUNCTIONS +#endif + +// BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) +# undef BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#endif + +// BOOST_NO_CXX11_SCOPED_ENUMS +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40501)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) +// This is available but broken in earlier Intel releases. +# undef BOOST_NO_CXX11_SCOPED_ENUMS +#endif + +// BOOST_NO_SFINAE_EXPR +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_SFINAE_EXPR +#endif + +// BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +// This is available in earlier Intel releases, but breaks Multiprecision: +# undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#endif + +// BOOST_NO_CXX11_LAMBDAS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_LAMBDAS +#endif + +// BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) +# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#endif + +// BOOST_NO_CXX11_RANGE_BASED_FOR +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) +# undef BOOST_NO_CXX11_RANGE_BASED_FOR +#endif + +// BOOST_NO_CXX11_RAW_LITERALS +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_RAW_LITERALS +#endif + +// BOOST_NO_CXX11_UNICODE_LITERALS +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_CXX11_UNICODE_LITERALS +#endif + +// BOOST_NO_CXX11_NOEXCEPT +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +// Available in earlier Intel release, but generates errors when used with +// conditional exception specifications, for example in multiprecision: +# undef BOOST_NO_CXX11_NOEXCEPT +#endif + +// BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#endif + +// BOOST_NO_CXX11_USER_DEFINED_LITERALS +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) +# undef BOOST_NO_CXX11_USER_DEFINED_LITERALS +#endif + +// BOOST_NO_CXX11_ALIGNAS +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) +# undef BOOST_NO_CXX11_ALIGNAS +#endif + +// BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#endif + +// BOOST_NO_CXX11_INLINE_NAMESPACES +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) +# undef BOOST_NO_CXX11_INLINE_NAMESPACES +#endif + +// BOOST_NO_CXX11_REF_QUALIFIERS +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) +# undef BOOST_NO_CXX11_REF_QUALIFIERS +#endif + +// BOOST_NO_CXX11_FINAL +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) +# undef BOOST_NO_CXX11_FINAL +#endif + +#endif + +// +// Broken in all versions up to 15: +#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS + +#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION <= 1310) +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#endif + +#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION == 1400) +// A regression in Intel's compiler means that seems to be broken in this release as well as : +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_TUPLE +#endif + +#if (BOOST_INTEL_CXX_VERSION < 1200) +// +// fenv.h appears not to work with Intel prior to 12.0: +// +# define BOOST_NO_FENV_H +#endif + +// Intel 13.10 fails to access defaulted functions of a base class declared in private or protected sections, +// producing the following errors: +// error #453: protected function "..." (declared at ...") is not accessible through a "..." pointer or object +#if (BOOST_INTEL_CXX_VERSION <= 1310) +# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS +#endif + +#if defined(_MSC_VER) && (_MSC_VER >= 1600) +# define BOOST_HAS_STDINT_H +#endif + +#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(__CUDACC__) +# define BOOST_HAS_INT128 +#endif + +#endif +// +// last known and checked version: +#if (BOOST_INTEL_CXX_VERSION > 1500) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# elif defined(_MSC_VER) +// +// We don't emit this warning any more, since we have so few +// defect macros set anyway (just the one). +// +//# pragma message("Unknown compiler version - please run the configure tests and report the results") +# endif +#endif + diff --git a/contrib/src/boost/config/compiler/kai.hpp b/contrib/src/boost/config/compiler/kai.hpp new file mode 100644 index 0000000..2337e6a --- /dev/null +++ b/contrib/src/boost/config/compiler/kai.hpp @@ -0,0 +1,33 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Kai C++ compiler setup: + +#include "boost/config/compiler/common_edg.hpp" + +# if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG) + // at least on Sun, the contents of is not in namespace std +# define BOOST_NO_STDC_NAMESPACE +# endif + +// see also common_edg.hpp which needs a special check for __KCC +# if !defined(_EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +# endif + +// +// last known and checked version is 4001: +#if (__KCC_VERSION > 4001) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + diff --git a/contrib/src/boost/config/compiler/metrowerks.hpp b/contrib/src/boost/config/compiler/metrowerks.hpp new file mode 100644 index 0000000..c930143 --- /dev/null +++ b/contrib/src/boost/config/compiler/metrowerks.hpp @@ -0,0 +1,179 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright David Abrahams 2001 - 2002. +// (C) Copyright Beman Dawes 2001 - 2003. +// (C) Copyright Stefan Slapeta 2004. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Metrowerks C++ compiler setup: + +// locale support is disabled when linking with the dynamic runtime +# ifdef _MSL_NO_LOCALE +# define BOOST_NO_STD_LOCALE +# endif + +# if __MWERKS__ <= 0x2301 // 5.3 +# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# define BOOST_NO_POINTER_TO_MEMBER_CONST +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD +# endif + +# if __MWERKS__ <= 0x2401 // 6.2 +//# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# endif + +# if(__MWERKS__ <= 0x2407) // 7.x +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +# define BOOST_NO_UNREACHABLE_RETURN_DETECTION +# endif + +# if(__MWERKS__ <= 0x3003) // 8.x +# define BOOST_NO_SFINAE +# endif + +// the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last +// tested version *only*: +# if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_IS_ABSTRACT +# endif + +#if !__option(wchar_type) +# define BOOST_NO_INTRINSIC_WCHAR_T +#endif + +#if !__option(exceptions) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +#if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh) +# if __MWERKS__ == 0x3000 +# define BOOST_COMPILER_VERSION 8.0 +# elif __MWERKS__ == 0x3001 +# define BOOST_COMPILER_VERSION 8.1 +# elif __MWERKS__ == 0x3002 +# define BOOST_COMPILER_VERSION 8.2 +# elif __MWERKS__ == 0x3003 +# define BOOST_COMPILER_VERSION 8.3 +# elif __MWERKS__ == 0x3200 +# define BOOST_COMPILER_VERSION 9.0 +# elif __MWERKS__ == 0x3201 +# define BOOST_COMPILER_VERSION 9.1 +# elif __MWERKS__ == 0x3202 +# define BOOST_COMPILER_VERSION 9.2 +# elif __MWERKS__ == 0x3204 +# define BOOST_COMPILER_VERSION 9.3 +# elif __MWERKS__ == 0x3205 +# define BOOST_COMPILER_VERSION 9.4 +# elif __MWERKS__ == 0x3206 +# define BOOST_COMPILER_VERSION 9.5 +# elif __MWERKS__ == 0x3207 +# define BOOST_COMPILER_VERSION 9.6 +# else +# define BOOST_COMPILER_VERSION __MWERKS__ +# endif +#else +# define BOOST_COMPILER_VERSION __MWERKS__ +#endif + +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#if __MWERKS__ > 0x3206 && __option(rvalue_refs) +# define BOOST_HAS_RVALUE_REFS +#else +# define BOOST_NO_CXX11_RVALUE_REFERENCES +#endif +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_VARIADIC_MACROS +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) + +// +// versions check: +// we don't support Metrowerks prior to version 5.3: +#if __MWERKS__ < 0x2301 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version: +#if (__MWERKS__ > 0x3205) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + + + + + diff --git a/contrib/src/boost/config/compiler/mpw.hpp b/contrib/src/boost/config/compiler/mpw.hpp new file mode 100644 index 0000000..76045bc --- /dev/null +++ b/contrib/src/boost/config/compiler/mpw.hpp @@ -0,0 +1,121 @@ +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// MPW C++ compilers setup: + +# if defined(__SC__) +# define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__) +# elif defined(__MRC__) +# define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__) +# else +# error "Using MPW compiler configuration by mistake. Please update." +# endif + +// +// MPW 8.90: +// +#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG) +# define BOOST_NO_CV_SPECIALIZATIONS +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_INTRINSIC_WCHAR_T +# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# define BOOST_NO_USING_TEMPLATE + +# define BOOST_NO_CWCHAR +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + +# define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */ + +#endif + +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_VARIADIC_MACROS +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +// +// versions check: +// we don't support MPW prior to version 8.9: +#if MPW_CPLUS < 0x890 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 0x890: +#if (MPW_CPLUS > 0x890) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + diff --git a/contrib/src/boost/config/compiler/nvcc.hpp b/contrib/src/boost/config/compiler/nvcc.hpp new file mode 100644 index 0000000..bbe81f6 --- /dev/null +++ b/contrib/src/boost/config/compiler/nvcc.hpp @@ -0,0 +1,16 @@ +// (C) Copyright Eric Jourdanneau, Joel Falcou 2010 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// NVIDIA CUDA C++ compiler setup + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" +#endif + +// NVIDIA Specific support +// BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device +#define BOOST_GPU_ENABLED __host__ __device__ diff --git a/contrib/src/boost/config/compiler/pathscale.hpp b/contrib/src/boost/config/compiler/pathscale.hpp new file mode 100644 index 0000000..7c211c4 --- /dev/null +++ b/contrib/src/boost/config/compiler/pathscale.hpp @@ -0,0 +1,114 @@ +// (C) Copyright Bryce Lelbach 2011 + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// PathScale EKOPath C++ Compiler + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__ +#endif + +#if __PATHCC__ >= 4 +# define BOOST_MSVC6_MEMBER_TEMPLATES +# define BOOST_HAS_UNISTD_H +# define BOOST_HAS_STDINT_H +# define BOOST_HAS_SIGACTION +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_THREADS +# define BOOST_HAS_PTHREADS +# define BOOST_HAS_PTHREAD_YIELD +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +# define BOOST_HAS_NRVO +# define BOOST_HAS_NL_TYPES_H +# define BOOST_HAS_NANOSLEEP +# define BOOST_HAS_LONG_LONG +# define BOOST_HAS_LOG1P +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_EXPM1 +# define BOOST_HAS_DIRENT_H +# define BOOST_HAS_CLOCK_GETTIME +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +# define BOOST_NO_CXX11_UNICODE_LITERALS +# define BOOST_NO_CXX11_TEMPLATE_ALIASES +# define BOOST_NO_CXX11_STATIC_ASSERT +# define BOOST_NO_SFINAE_EXPR +# define BOOST_NO_CXX11_SCOPED_ENUMS +# define BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_NO_CXX11_RANGE_BASED_FOR +# define BOOST_NO_CXX11_RAW_LITERALS +# define BOOST_NO_CXX11_NULLPTR +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_NOEXCEPT +# define BOOST_NO_CXX11_LAMBDAS +# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +# define BOOST_NO_CXX11_DECLTYPE +# define BOOST_NO_CXX11_DECLTYPE_N3276 +# define BOOST_NO_CXX11_CONSTEXPR +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +# define BOOST_NO_CXX11_CHAR32_T +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +# define BOOST_NO_CXX11_ALIGNAS +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +# define BOOST_NO_CXX11_INLINE_NAMESPACES +# define BOOST_NO_CXX11_REF_QUALIFIERS +# define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif +#endif diff --git a/contrib/src/boost/config/compiler/pgi.hpp b/contrib/src/boost/config/compiler/pgi.hpp new file mode 100644 index 0000000..e5605c9 --- /dev/null +++ b/contrib/src/boost/config/compiler/pgi.hpp @@ -0,0 +1,155 @@ +// (C) Copyright Noel Belcourt 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// PGI C++ compiler setup: + +#define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__ +#define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) + +// +// Threading support: +// Turn this on unconditionally here, it will get turned off again later +// if no threading API is detected. +// + +#if __PGIC__ >= 11 + +// options requested by configure --enable-test +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_THREADS +#define BOOST_HAS_PTHREAD_YIELD +#define BOOST_HAS_NRVO +#define BOOST_HAS_LONG_LONG + +// options --enable-test wants undefined +#undef BOOST_NO_STDC_NAMESPACE +#undef BOOST_NO_EXCEPTION_STD_NAMESPACE +#undef BOOST_DEDUCED_TYPENAME + +#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_AUTO_DECLARATIONS + +#elif __PGIC__ >= 10 + +// options requested by configure --enable-test +#define BOOST_HAS_THREADS +#define BOOST_HAS_NRVO +#define BOOST_HAS_LONG_LONG +#if defined(linux) || defined(__linux) || defined(__linux__) +# define BOOST_HAS_STDINT_H +#endif + +// options --enable-test wants undefined +#undef BOOST_NO_STDC_NAMESPACE +#undef BOOST_NO_EXCEPTION_STD_NAMESPACE +#undef BOOST_DEDUCED_TYPENAME + +#elif __PGIC__ >= 7 + +#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#define BOOST_NO_SWPRINTF +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_AUTO_DECLARATIONS + +#else + +# error "Pgi compiler not configured - please reconfigure" + +#endif +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_NUMERIC_LIMITS +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_SWPRINTF +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_VARIADIC_MACROS +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + +#define BOOST_NO_CXX11_HDR_UNORDERED_SET +#define BOOST_NO_CXX11_HDR_UNORDERED_MAP +#define BOOST_NO_CXX11_HDR_TYPEINDEX +#define BOOST_NO_CXX11_HDR_TYPE_TRAITS +#define BOOST_NO_CXX11_HDR_TUPLE +#define BOOST_NO_CXX11_HDR_THREAD +#define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +#define BOOST_NO_CXX11_HDR_REGEX +#define BOOST_NO_CXX11_HDR_RATIO +#define BOOST_NO_CXX11_HDR_RANDOM +#define BOOST_NO_CXX11_HDR_MUTEX +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_HDR_FUTURE +#define BOOST_NO_CXX11_HDR_FORWARD_LIST +#define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +#define BOOST_NO_CXX11_HDR_CODECVT +#define BOOST_NO_CXX11_HDR_CHRONO +#define BOOST_NO_CXX11_HDR_ARRAY +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif +// +// version check: +// probably nothing to do here? + diff --git a/contrib/src/boost/config/compiler/sgi_mipspro.hpp b/contrib/src/boost/config/compiler/sgi_mipspro.hpp new file mode 100644 index 0000000..9068831 --- /dev/null +++ b/contrib/src/boost/config/compiler/sgi_mipspro.hpp @@ -0,0 +1,29 @@ +// (C) Copyright John Maddock 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// SGI C++ compiler setup: + +#define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION) + +#include "boost/config/compiler/common_edg.hpp" + +// +// Threading support: +// Turn this on unconditionally here, it will get turned off again later +// if no threading API is detected. +// +#define BOOST_HAS_THREADS +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP + +#undef BOOST_NO_SWPRINTF +#undef BOOST_DEDUCED_TYPENAME + +// +// version check: +// probably nothing to do here? + + diff --git a/contrib/src/boost/config/compiler/sunpro_cc.hpp b/contrib/src/boost/config/compiler/sunpro_cc.hpp new file mode 100644 index 0000000..6017660 --- /dev/null +++ b/contrib/src/boost/config/compiler/sunpro_cc.hpp @@ -0,0 +1,190 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Peter Dimov 2002. +// (C) Copyright Aleksey Gurtovoy 2002 - 2003. +// (C) Copyright David Abrahams 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Sun C++ compiler setup: + +# if __SUNPRO_CC <= 0x500 +# define BOOST_NO_MEMBER_TEMPLATES +# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# endif + +# if (__SUNPRO_CC <= 0x520) + // + // Sunpro 5.2 and earler: + // + // although sunpro 5.2 supports the syntax for + // inline initialization it often gets the value + // wrong, especially where the value is computed + // from other constants (J Maddock 6th May 2001) +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION + + // Although sunpro 5.2 supports the syntax for + // partial specialization, it often seems to + // bind to the wrong specialization. Better + // to disable it until suppport becomes more stable + // (J Maddock 6th May 2001). +# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# endif + +# if (__SUNPRO_CC <= 0x530) + // Requesting debug info (-g) with Boost.Python results + // in an internal compiler error for "static const" + // initialized in-class. + // >> Assertion: (../links/dbg_cstabs.cc, line 611) + // while processing ../test.cpp at line 0. + // (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002) +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION + + // SunPro 5.3 has better support for partial specialization, + // but breaks when compiling std::less > + // (Jens Maurer 4 Nov 2001). + + // std::less specialization fixed as reported by George + // Heintzelman; partial specialization re-enabled + // (Peter Dimov 17 Jan 2002) + +//# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // integral constant expressions with 64 bit numbers fail +# define BOOST_NO_INTEGRAL_INT64_T +# endif + +# if (__SUNPRO_CC < 0x570) +# define BOOST_NO_TEMPLATE_TEMPLATES + // see http://lists.boost.org/MailArchives/boost/msg47184.php + // and http://lists.boost.org/MailArchives/boost/msg47220.php +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_SFINAE +# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS +# endif +# if (__SUNPRO_CC <= 0x580) +# define BOOST_NO_IS_ABSTRACT +# endif + +# if (__SUNPRO_CC <= 0x5100) + // Sun 5.10 may not correctly value-initialize objects of + // some user defined types, as was reported in April 2010 + // (CR 6947016), and confirmed by Steve Clamage. + // (Niels Dekker, LKEB, May 2010). +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +# endif + +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if __SUNPRO_CC > 0x500 +# define BOOST_SYMBOL_EXPORT __global +# define BOOST_SYMBOL_IMPORT __global +# define BOOST_SYMBOL_VISIBLE __global +#endif + +#if (__SUNPRO_CC < 0x5130) +// C++03 features in 12.4: +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_ADL_BARRIER +#define BOOST_NO_CXX11_VARIADIC_MACROS +#endif + +#if (__SUNPRO_CC < 0x5130) || (__cplusplus < 201100) +// C++11 only featuires in 12.4: +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_FINAL +#endif + +#if (__SUNPRO_CC < 0x5140) || (__cplusplus < 201103) +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_REF_QUALIFIERS +#endif + +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +// +// C++0x features +// +# define BOOST_HAS_LONG_LONG + + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif +// +// Version +// + +#define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC) + +// +// versions check: +// we don't support sunpro prior to version 4: +#if __SUNPRO_CC < 0x400 +#error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 0x590: +#if (__SUNPRO_CC > 0x590) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif diff --git a/contrib/src/boost/config/compiler/vacpp.hpp b/contrib/src/boost/config/compiler/vacpp.hpp new file mode 100644 index 0000000..6c228ea --- /dev/null +++ b/contrib/src/boost/config/compiler/vacpp.hpp @@ -0,0 +1,162 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Toon Knapen 2001 - 2003. +// (C) Copyright Lie-Quan Lee 2001. +// (C) Copyright Markus Schoepflin 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Visual Age (IBM) C++ compiler setup: + +#if __IBMCPP__ <= 501 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +#endif + +#if (__IBMCPP__ <= 502) +// Actually the compiler supports inclass member initialization but it +// requires a definition for the class member and it doesn't recognize +// it as an integral constant expression when used as a template argument. +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD +#endif + +#if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG) +# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS +#endif + +#if (__IBMCPP__ <= 1110) +// XL C++ V11.1 and earlier versions may not always value-initialize +// a temporary object T(), when T is a non-POD aggregate class type. +// Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it +// high priority. -- Niels Dekker (LKEB), May 2010. +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +#endif + +// +// On AIX thread support seems to be indicated by _THREAD_SAFE: +// +#ifdef _THREAD_SAFE +# define BOOST_HAS_THREADS +#endif + +#define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__) + +// +// versions check: +// we don't support Visual age prior to version 5: +#if __IBMCPP__ < 500 +#error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 1210: +#if (__IBMCPP__ > 1210) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + +// Some versions of the compiler have issues with default arguments on partial specializations +#if __IBMCPP__ <= 1010 +#define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS +#endif + +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#if ! __IBMCPP_AUTO_TYPEDEDUCTION +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#endif +#if ! __IBMCPP_UTF_LITERAL__ +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +#endif +#if ! __IBMCPP_CONSTEXPR +# define BOOST_NO_CXX11_CONSTEXPR +#endif +#if ! __IBMCPP_DECLTYPE +# define BOOST_NO_CXX11_DECLTYPE +#else +# define BOOST_HAS_DECLTYPE +#endif +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#if ! __IBMCPP_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#endif +#if ! __IBMCPP_EXTERN_TEMPLATE +# define BOOST_NO_CXX11_EXTERN_TEMPLATE +#endif +#if ! __IBMCPP_VARIADIC_TEMPLATES +// not enabled separately at this time +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#endif +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#if ! __IBMCPP_RVALUE_REFERENCES +# define BOOST_NO_CXX11_RVALUE_REFERENCES +#endif +#if ! __IBMCPP_SCOPED_ENUM +# define BOOST_NO_CXX11_SCOPED_ENUMS +#endif +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#if ! __IBMCPP_STATIC_ASSERT +# define BOOST_NO_CXX11_STATIC_ASSERT +#endif +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#if ! __IBMCPP_VARIADIC_TEMPLATES +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#endif +#if ! __C99_MACRO_WITH_VA_ARGS +# define BOOST_NO_CXX11_VARIADIC_MACROS +#endif +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif diff --git a/contrib/src/boost/config/compiler/visualc.hpp b/contrib/src/boost/config/compiler/visualc.hpp new file mode 100644 index 0000000..baaab58 --- /dev/null +++ b/contrib/src/boost/config/compiler/visualc.hpp @@ -0,0 +1,298 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. +// +// Microsoft Visual C++ compiler setup: +// +// We need to be careful with the checks in this file, as contrary +// to popular belief there are versions with _MSC_VER with the final +// digit non-zero (mainly the MIPS cross compiler). +// +// So we either test _MSC_VER >= XXXX or else _MSC_VER < XXXX. +// No other comparisons (==, >, or <=) are safe. +// + +#define BOOST_MSVC _MSC_VER + +// +// Helper macro BOOST_MSVC_FULL_VER for use in Boost code: +// +#if _MSC_FULL_VER > 100000000 +# define BOOST_MSVC_FULL_VER _MSC_FULL_VER +#else +# define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10) +#endif + +// Attempt to suppress VC6 warnings about the length of decorated names (obsolete): +#pragma warning( disable : 4503 ) // warning: decorated name length exceeded + +#define BOOST_HAS_PRAGMA_ONCE + +// +// versions check: +// we don't support Visual C++ prior to version 7.1: +#if _MSC_VER < 1310 +# error "Compiler not supported or configured - please reconfigure" +#endif + +#if _MSC_FULL_VER < 180020827 +# define BOOST_NO_FENV_H +#endif + +#if _MSC_VER < 1400 +// although a conforming signature for swprint exists in VC7.1 +// it appears not to actually work: +# define BOOST_NO_SWPRINTF +// Our extern template tests also fail for this compiler: +# define BOOST_NO_CXX11_EXTERN_TEMPLATE +// Variadic macros do not exist for VC7.1 and lower +# define BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#endif + +#if _MSC_VER < 1500 // 140X == VC++ 8.0 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +#endif + +#if _MSC_VER < 1600 // 150X == VC++ 9.0 + // A bug in VC9: +# define BOOST_NO_ADL_BARRIER +#endif + + +#ifndef _NATIVE_WCHAR_T_DEFINED +# define BOOST_NO_INTRINSIC_WCHAR_T +#endif + +// +// check for exception handling support: +#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +// +// __int64 support: +// +#define BOOST_HAS_MS_INT64 +#if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400) +# define BOOST_HAS_LONG_LONG +#else +# define BOOST_NO_LONG_LONG +#endif +#if (_MSC_VER >= 1400) && !defined(_DEBUG) +# define BOOST_HAS_NRVO +#endif +#if _MSC_VER >= 1600 // 160X == VC++ 10.0 +# define BOOST_HAS_PRAGMA_DETECT_MISMATCH +#endif +// +// disable Win32 API's if compiler extensions are +// turned off: +// +#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32) +# define BOOST_DISABLE_WIN32 +#endif +#if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + +// +// TR1 features: +// +#if _MSC_VER >= 1700 +// # define BOOST_HAS_TR1_HASH // don't know if this is true yet. +// # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet. +# define BOOST_HAS_TR1_UNORDERED_MAP +# define BOOST_HAS_TR1_UNORDERED_SET +#endif + +// +// C++0x features +// +// See above for BOOST_NO_LONG_LONG + +// C++ features supported by VC++ 10 (aka 2010) +// +#if _MSC_VER < 1600 +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +# define BOOST_NO_CXX11_LAMBDAS +# define BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_NO_CXX11_STATIC_ASSERT +# define BOOST_NO_CXX11_NULLPTR +# define BOOST_NO_CXX11_DECLTYPE +#endif // _MSC_VER < 1600 + +#if _MSC_VER >= 1600 +# define BOOST_HAS_STDINT_H +#endif + +// C++11 features supported by VC++ 11 (aka 2012) +// +#if _MSC_VER < 1700 +# define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_RANGE_BASED_FOR +# define BOOST_NO_CXX11_SCOPED_ENUMS +#endif // _MSC_VER < 1700 + +// C++11 features supported by VC++ 12 (aka 2013). +// +#if _MSC_FULL_VER < 180020827 +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_CXX11_RAW_LITERALS +# define BOOST_NO_CXX11_TEMPLATE_ALIASES +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +# define BOOST_NO_CXX11_DECLTYPE_N3276 +#endif + +// C++11 features supported by VC++ 14 (aka 2015) +// +#if (_MSC_FULL_VER < 190023026) +# define BOOST_NO_CXX11_NOEXCEPT +# define BOOST_NO_CXX11_REF_QUALIFIERS +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +# define BOOST_NO_CXX11_ALIGNAS +# define BOOST_NO_CXX11_INLINE_NAMESPACES +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +# define BOOST_NO_CXX11_UNICODE_LITERALS +# define BOOST_NO_CXX14_DECLTYPE_AUTO +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +# define BOOST_NO_CXX14_BINARY_LITERALS +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif + +// MSVC including version 14 has not yet completely +// implemented value-initialization, as is reported: +// "VC++ does not value-initialize members of derived classes without +// user-declared constructor", reported in 2009 by Sylvester Hesp: +// https://connect.microsoft.com/VisualStudio/feedback/details/484295 +// "Presence of copy constructor breaks member class initialization", +// reported in 2009 by Alex Vakulenko: +// https://connect.microsoft.com/VisualStudio/feedback/details/499606 +// "Value-initialization in new-expression", reported in 2005 by +// Pavel Kuznetsov (MetaCommunications Engineering): +// https://connect.microsoft.com/VisualStudio/feedback/details/100744 +// Reported again by John Maddock in 2015 for VC14: +// https://connect.microsoft.com/VisualStudio/feedback/details/1582233/c-subobjects-still-not-value-initialized-correctly +// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues +// (Niels Dekker, LKEB, May 2010) +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +// C++11 features not supported by any versions +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +// +// This is somewhat supported in VC14, but we may need to wait for +// a service release before enabling: +// +#define BOOST_NO_CXX11_CONSTEXPR + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +// +// prefix and suffix headers: +// +#ifndef BOOST_ABI_PREFIX +# define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp" +#endif +#ifndef BOOST_ABI_SUFFIX +# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp" +#endif + +#ifndef BOOST_COMPILER +// TODO: +// these things are mostly bogus. 1200 means version 12.0 of the compiler. The +// artificial versions assigned to them only refer to the versions of some IDE +// these compilers have been shipped with, and even that is not all of it. Some +// were shipped with freely downloadable SDKs, others as crosscompilers in eVC. +// IOW, you can't use these 'versions' in any sensible way. Sorry. +# if defined(UNDER_CE) +# if _MSC_VER < 1400 + // Note: I'm not aware of any CE compiler with version 13xx +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown EVC++ compiler version - please run the configure tests and report the results" +# else +# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results") +# endif +# elif _MSC_VER < 1500 +# define BOOST_COMPILER_VERSION evc8 +# elif _MSC_VER < 1600 +# define BOOST_COMPILER_VERSION evc9 +# elif _MSC_VER < 1700 +# define BOOST_COMPILER_VERSION evc10 +# elif _MSC_VER < 1800 +# define BOOST_COMPILER_VERSION evc11 +# elif _MSC_VER < 1900 +# define BOOST_COMPILER_VERSION evc12 +# elif _MSC_VER < 2000 +# define BOOST_COMPILER_VERSION evc14 +# else +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown EVC++ compiler version - please run the configure tests and report the results" +# else +# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results") +# endif +# endif +# else +# if _MSC_VER < 1310 + // Note: Versions up to 7.0 aren't supported. +# define BOOST_COMPILER_VERSION 5.0 +# elif _MSC_VER < 1300 +# define BOOST_COMPILER_VERSION 6.0 +# elif _MSC_VER < 1310 +# define BOOST_COMPILER_VERSION 7.0 +# elif _MSC_VER < 1400 +# define BOOST_COMPILER_VERSION 7.1 +# elif _MSC_VER < 1500 +# define BOOST_COMPILER_VERSION 8.0 +# elif _MSC_VER < 1600 +# define BOOST_COMPILER_VERSION 9.0 +# elif _MSC_VER < 1700 +# define BOOST_COMPILER_VERSION 10.0 +# elif _MSC_VER < 1800 +# define BOOST_COMPILER_VERSION 11.0 +# elif _MSC_VER < 1900 +# define BOOST_COMPILER_VERSION 12.0 +# elif _MSC_VER < 2000 +# define BOOST_COMPILER_VERSION 14.0 +# else +# define BOOST_COMPILER_VERSION _MSC_VER +# endif +# endif + +# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) +#endif + +// +// last known and checked version is 19.00.23026 (VC++ 2015 RTM): +#if (_MSC_VER > 1900) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# else +# pragma message("Unknown compiler version - please run the configure tests and report the results") +# endif +#endif diff --git a/contrib/src/boost/config/compiler/xlcpp.hpp b/contrib/src/boost/config/compiler/xlcpp.hpp new file mode 100644 index 0000000..e369ece --- /dev/null +++ b/contrib/src/boost/config/compiler/xlcpp.hpp @@ -0,0 +1,258 @@ +// (C) Copyright Douglas Gregor 2010 +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// compiler setup for IBM XL C/C++ for Linux (Little Endian) based on clang. + +#define BOOST_HAS_PRAGMA_ONCE + +// Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used. +#if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) +# define BOOST_HAS_PRAGMA_DETECT_MISMATCH +#endif + +// When compiling with clang before __has_extension was defined, +// even if one writes 'defined(__has_extension) && __has_extension(xxx)', +// clang reports a compiler error. So the only workaround found is: + +#ifndef __has_extension +#define __has_extension __has_feature +#endif + +#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + +#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID) +# define BOOST_NO_TYPEID +#endif + +#if defined(__int64) && !defined(__GNUC__) +# define BOOST_HAS_MS_INT64 +#endif + +#define BOOST_HAS_NRVO + +// Branch prediction hints +#if defined(__has_builtin) +#if __has_builtin(__builtin_expect) +#define BOOST_LIKELY(x) __builtin_expect(x, 1) +#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) +#endif +#endif + +// Clang supports "long long" in all compilation modes. +#define BOOST_HAS_LONG_LONG + +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) +# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) +# define BOOST_SYMBOL_IMPORT +# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) +#endif + +// +// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through +// between switch labels. +// +#if __cplusplus >= 201103L && defined(__has_warning) +# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") +# define BOOST_FALLTHROUGH [[clang::fallthrough]] +# endif +#endif + +#if !__has_feature(cxx_auto_type) +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#endif + +// +// Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t +// +#if defined(_MSC_VER) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +#endif + +#if !__has_feature(cxx_constexpr) +# define BOOST_NO_CXX11_CONSTEXPR +#endif + +#if !__has_feature(cxx_decltype) +# define BOOST_NO_CXX11_DECLTYPE +#endif + +#if !__has_feature(cxx_decltype_incomplete_return_types) +# define BOOST_NO_CXX11_DECLTYPE_N3276 +#endif + +#if !__has_feature(cxx_defaulted_functions) +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#endif + +#if !__has_feature(cxx_deleted_functions) +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +#endif + +#if !__has_feature(cxx_explicit_conversions) +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#endif + +#if !__has_feature(cxx_default_function_template_args) +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#endif + +#if !__has_feature(cxx_generalized_initializers) +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#endif + +#if !__has_feature(cxx_lambdas) +# define BOOST_NO_CXX11_LAMBDAS +#endif + +#if !__has_feature(cxx_local_type_template_args) +# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#endif + +#if !__has_feature(cxx_noexcept) +# define BOOST_NO_CXX11_NOEXCEPT +#endif + +#if !__has_feature(cxx_nullptr) +# define BOOST_NO_CXX11_NULLPTR +#endif + +#if !__has_feature(cxx_range_for) +# define BOOST_NO_CXX11_RANGE_BASED_FOR +#endif + +#if !__has_feature(cxx_raw_string_literals) +# define BOOST_NO_CXX11_RAW_LITERALS +#endif + +#if !__has_feature(cxx_reference_qualified_functions) +# define BOOST_NO_CXX11_REF_QUALIFIERS +#endif + +#if !__has_feature(cxx_generalized_initializers) +# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#endif + +#if !__has_feature(cxx_rvalue_references) +# define BOOST_NO_CXX11_RVALUE_REFERENCES +#endif + +#if !__has_feature(cxx_strong_enums) +# define BOOST_NO_CXX11_SCOPED_ENUMS +#endif + +#if !__has_feature(cxx_static_assert) +# define BOOST_NO_CXX11_STATIC_ASSERT +#endif + +#if !__has_feature(cxx_alias_templates) +# define BOOST_NO_CXX11_TEMPLATE_ALIASES +#endif + +#if !__has_feature(cxx_unicode_literals) +# define BOOST_NO_CXX11_UNICODE_LITERALS +#endif + +#if !__has_feature(cxx_variadic_templates) +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#endif + +#if !__has_feature(cxx_user_literals) +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#endif + +#if !__has_feature(cxx_alignas) +# define BOOST_NO_CXX11_ALIGNAS +#endif + +#if !__has_feature(cxx_trailing_return) +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#endif + +#if !__has_feature(cxx_inline_namespaces) +# define BOOST_NO_CXX11_INLINE_NAMESPACES +#endif + +#if !__has_feature(cxx_override_control) +# define BOOST_NO_CXX11_FINAL +#endif + +#if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif + +#if !__has_feature(__cxx_decltype_auto__) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif + +#if !__has_feature(__cxx_aggregate_nsdmi__) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif + +#if !__has_feature(__cxx_init_captures__) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif + +#if !__has_feature(__cxx_generic_lambdas__) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif + +// clang < 3.5 has a defect with dependent type, like following. +// +// template +// constexpr typename enable_if >::type foo(T &) +// { } // error: no return statement in constexpr function +// +// This issue also affects C++11 mode, but C++11 constexpr requires return stmt. +// Therefore we don't care such case. +// +// Note that we can't check Clang version directly as the numbering system changes depending who's +// creating the Clang release (see https://github.com/boostorg/config/pull/39#issuecomment-59927873) +// so instead verify that we have a feature that was introduced at the same time as working C++14 +// constexpr (generic lambda's in this case): +// +#if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) +# define BOOST_NO_CXX14_CONSTEXPR +#endif + +#if !__has_feature(__cxx_return_type_deduction__) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif + +#if !__has_feature(__cxx_variable_templates__) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#if __cplusplus < 201400 +// All versions with __cplusplus above this value seem to support this: +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif + + +// Unused attribute: +#if defined(__GNUC__) && (__GNUC__ >= 4) +# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) +#endif + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "Clang version " __clang_version__ +#endif + +// Macro used to identify the Clang compiler. +#define BOOST_CLANG 1 + diff --git a/contrib/src/boost/config/no_tr1/cmath.hpp b/contrib/src/boost/config/no_tr1/cmath.hpp new file mode 100644 index 0000000..d8268d8 --- /dev/null +++ b/contrib/src/boost/config/no_tr1/cmath.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/cmath is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_CMATH +# define BOOST_CONFIG_CMATH + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_CMATH_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_CMATH_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_CMATH_RECURSION +# endif + +#endif diff --git a/contrib/src/boost/config/no_tr1/complex.hpp b/contrib/src/boost/config/no_tr1/complex.hpp new file mode 100644 index 0000000..ca20092 --- /dev/null +++ b/contrib/src/boost/config/no_tr1/complex.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/complex is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_COMPLEX +# define BOOST_CONFIG_COMPLEX + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_COMPLEX_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_COMPLEX_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_COMPLEX_RECURSION +# endif + +#endif diff --git a/contrib/src/boost/config/no_tr1/functional.hpp b/contrib/src/boost/config/no_tr1/functional.hpp new file mode 100644 index 0000000..e395efc --- /dev/null +++ b/contrib/src/boost/config/no_tr1/functional.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/functional is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_FUNCTIONAL +# define BOOST_CONFIG_FUNCTIONAL + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_FUNCTIONAL_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION +# endif + +#endif diff --git a/contrib/src/boost/config/no_tr1/memory.hpp b/contrib/src/boost/config/no_tr1/memory.hpp new file mode 100644 index 0000000..2b5d208 --- /dev/null +++ b/contrib/src/boost/config/no_tr1/memory.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/memory is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_MEMORY +# define BOOST_CONFIG_MEMORY + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_MEMORY_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_MEMORY_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_MEMORY_RECURSION +# endif + +#endif diff --git a/contrib/src/boost/config/no_tr1/utility.hpp b/contrib/src/boost/config/no_tr1/utility.hpp new file mode 100644 index 0000000..dea8f11 --- /dev/null +++ b/contrib/src/boost/config/no_tr1/utility.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/utility is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_UTILITY +# define BOOST_CONFIG_UTILITY + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_UTILITY_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_UTILITY_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_UTILITY_RECURSION +# endif + +#endif diff --git a/contrib/src/boost/config/platform/aix.hpp b/contrib/src/boost/config/platform/aix.hpp new file mode 100644 index 0000000..894ef42 --- /dev/null +++ b/contrib/src/boost/config/platform/aix.hpp @@ -0,0 +1,33 @@ +// (C) Copyright John Maddock 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// IBM/Aix specific config options: + +#define BOOST_PLATFORM "IBM Aix" + +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_NL_TYPES_H +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_CLOCK_GETTIME + +// This needs support in "boost/cstdint.hpp" exactly like FreeBSD. +// This platform has header named which includes all +// the things needed. +#define BOOST_HAS_STDINT_H + +// Threading API's: +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_PTHREAD_DELAY_NP +#define BOOST_HAS_SCHED_YIELD +//#define BOOST_HAS_PTHREAD_YIELD + +// boilerplate code: +#include + + + + diff --git a/contrib/src/boost/config/platform/amigaos.hpp b/contrib/src/boost/config/platform/amigaos.hpp new file mode 100644 index 0000000..34bcf41 --- /dev/null +++ b/contrib/src/boost/config/platform/amigaos.hpp @@ -0,0 +1,15 @@ +// (C) Copyright John Maddock 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +#define BOOST_PLATFORM "AmigaOS" + +#define BOOST_DISABLE_THREADS +#define BOOST_NO_CWCHAR +#define BOOST_NO_STD_WSTRING +#define BOOST_NO_INTRINSIC_WCHAR_T + + diff --git a/contrib/src/boost/config/platform/beos.hpp b/contrib/src/boost/config/platform/beos.hpp new file mode 100644 index 0000000..48c3d8d --- /dev/null +++ b/contrib/src/boost/config/platform/beos.hpp @@ -0,0 +1,26 @@ +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// BeOS specific config options: + +#define BOOST_PLATFORM "BeOS" + +#define BOOST_NO_CWCHAR +#define BOOST_NO_CWCTYPE +#define BOOST_HAS_UNISTD_H + +#define BOOST_HAS_BETHREADS + +#ifndef BOOST_DISABLE_THREADS +# define BOOST_HAS_THREADS +#endif + +// boilerplate code: +#include + + + diff --git a/contrib/src/boost/config/platform/bsd.hpp b/contrib/src/boost/config/platform/bsd.hpp new file mode 100644 index 0000000..a014297 --- /dev/null +++ b/contrib/src/boost/config/platform/bsd.hpp @@ -0,0 +1,86 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Douglas Gregor 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// generic BSD config options: + +#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) +#error "This platform is not BSD" +#endif + +#ifdef __FreeBSD__ +#define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) +#elif defined(__NetBSD__) +#define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) +#elif defined(__OpenBSD__) +#define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) +#elif defined(__DragonFly__) +#define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__) +#endif + +// +// is this the correct version check? +// FreeBSD has but does not +// advertise the fact in : +// +#if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__) +# define BOOST_HAS_NL_TYPES_H +#endif + +// +// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in +// and not in +// +#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\ + || defined(__OpenBSD__) || defined(__DragonFly__) +# define BOOST_HAS_PTHREADS +#endif + +// +// No wide character support in the BSD header files: +// +#if defined(__NetBSD__) +#define __NetBSD_GCC__ (__GNUC__ * 1000000 \ + + __GNUC_MINOR__ * 1000 \ + + __GNUC_PATCHLEVEL__) +// XXX - the following is required until c++config.h +// defines _GLIBCXX_HAVE_SWPRINTF and friends +// or the preprocessor conditionals are removed +// from the cwchar header. +#define _GLIBCXX_HAVE_SWPRINTF 1 +#endif + +#if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \ + || (defined(__NetBSD_GCC__) && (__NetBSD_GCC__ >= 2095003)) || defined(__DragonFly__)) +# define BOOST_NO_CWCHAR +#endif +// +// The BSD has macros only, no functions: +// +#if !defined(__OpenBSD__) || defined(__DragonFly__) +# define BOOST_NO_CTYPE_FUNCTIONS +#endif + +// +// thread API's not auto detected: +// +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#define BOOST_HAS_SIGACTION + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + + + + + diff --git a/contrib/src/boost/config/platform/cloudabi.hpp b/contrib/src/boost/config/platform/cloudabi.hpp new file mode 100644 index 0000000..bed7b63 --- /dev/null +++ b/contrib/src/boost/config/platform/cloudabi.hpp @@ -0,0 +1,18 @@ +// Copyright Nuxi, https://nuxi.nl/ 2015. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_PLATFORM "CloudABI" + +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_UNISTD_H + +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_LOG1P +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_SCHED_YIELD diff --git a/contrib/src/boost/config/platform/cray.hpp b/contrib/src/boost/config/platform/cray.hpp new file mode 100644 index 0000000..5c476e4 --- /dev/null +++ b/contrib/src/boost/config/platform/cray.hpp @@ -0,0 +1,18 @@ +// (C) Copyright John Maddock 2011. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// SGI Irix specific config options: + +#define BOOST_PLATFORM "Cray" + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + + diff --git a/contrib/src/boost/config/platform/cygwin.hpp b/contrib/src/boost/config/platform/cygwin.hpp new file mode 100644 index 0000000..b7ef572 --- /dev/null +++ b/contrib/src/boost/config/platform/cygwin.hpp @@ -0,0 +1,58 @@ +// (C) Copyright John Maddock 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// cygwin specific config options: + +#define BOOST_PLATFORM "Cygwin" +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_LOG1P +#define BOOST_HAS_EXPM1 + +// +// Threading API: +// See if we have POSIX threads, if we do use them, otherwise +// revert to native Win threads. +#define BOOST_HAS_UNISTD_H +#include +#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) +# define BOOST_HAS_PTHREADS +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_SIGACTION +#else +# if !defined(BOOST_HAS_WINTHREADS) +# define BOOST_HAS_WINTHREADS +# endif +# define BOOST_HAS_FTIME +#endif + +// +// find out if we have a stdint.h, there should be a better way to do this: +// +#include +#ifdef _STDINT_H +#define BOOST_HAS_STDINT_H +#endif + +/// Cygwin has no fenv.h +#define BOOST_NO_FENV_H + +// boilerplate code: +#include + +// +// Cygwin lies about XSI conformance, there is no nl_types.h: +// +#ifdef BOOST_HAS_NL_TYPES_H +# undef BOOST_HAS_NL_TYPES_H +#endif + + + + + diff --git a/contrib/src/boost/config/platform/haiku.hpp b/contrib/src/boost/config/platform/haiku.hpp new file mode 100644 index 0000000..750866c --- /dev/null +++ b/contrib/src/boost/config/platform/haiku.hpp @@ -0,0 +1,31 @@ +// (C) Copyright Jessica Hamilton 2014. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Haiku specific config options: + +#define BOOST_PLATFORM "Haiku" + +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_STDINT_H + +#ifndef BOOST_DISABLE_THREADS +# define BOOST_HAS_THREADS +#endif + +#define BOOST_NO_CXX11_HDR_TYPE_TRAITS +#define BOOST_NO_CXX11_ATOMIC_SMART_PTR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_VARIADIC_MACROS + +// +// thread API's not auto detected: +// +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_GETTIMEOFDAY + +// boilerplate code: +#include diff --git a/contrib/src/boost/config/platform/hpux.hpp b/contrib/src/boost/config/platform/hpux.hpp new file mode 100644 index 0000000..19ce68e --- /dev/null +++ b/contrib/src/boost/config/platform/hpux.hpp @@ -0,0 +1,87 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Toon Knapen 2003. +// (C) Copyright Boris Gubenko 2006 - 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// hpux specific config options: + +#define BOOST_PLATFORM "HP-UX" + +// In principle, HP-UX has a nice under the name +// However, it has the following problem: +// Use of UINT32_C(0) results in "0u l" for the preprocessed source +// (verifyable with gcc 2.95.3) +#if (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__HP_aCC) +# define BOOST_HAS_STDINT_H +#endif + +#if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE)) +# define BOOST_NO_SWPRINTF +#endif +#if defined(__HP_aCC) && !defined(_INCLUDE__STDC_A1_SOURCE) +# define BOOST_NO_CWCTYPE +#endif + +#if defined(__GNUC__) +# if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)) + // GNU C on HP-UX does not support threads (checked up to gcc 3.3) +# define BOOST_DISABLE_THREADS +# elif !defined(BOOST_DISABLE_THREADS) + // threads supported from gcc-3.3 onwards: +# define BOOST_HAS_THREADS +# define BOOST_HAS_PTHREADS +# endif +#elif defined(__HP_aCC) && !defined(BOOST_DISABLE_THREADS) +# define BOOST_HAS_PTHREADS +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + +// the following are always available: +#ifndef BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_GETTIMEOFDAY +#endif +#ifndef BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_SCHED_YIELD +#endif +#ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#endif +#ifndef BOOST_HAS_NL_TYPES_H +# define BOOST_HAS_NL_TYPES_H +#endif +#ifndef BOOST_HAS_NANOSLEEP +# define BOOST_HAS_NANOSLEEP +#endif +#ifndef BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_GETTIMEOFDAY +#endif +#ifndef BOOST_HAS_DIRENT_H +# define BOOST_HAS_DIRENT_H +#endif +#ifndef BOOST_HAS_CLOCK_GETTIME +# define BOOST_HAS_CLOCK_GETTIME +#endif +#ifndef BOOST_HAS_SIGACTION +# define BOOST_HAS_SIGACTION +#endif +#ifndef BOOST_HAS_NRVO +# ifndef __parisc +# define BOOST_HAS_NRVO +# endif +#endif +#ifndef BOOST_HAS_LOG1P +# define BOOST_HAS_LOG1P +#endif +#ifndef BOOST_HAS_EXPM1 +# define BOOST_HAS_EXPM1 +#endif + diff --git a/contrib/src/boost/config/platform/irix.hpp b/contrib/src/boost/config/platform/irix.hpp new file mode 100644 index 0000000..aeae49c --- /dev/null +++ b/contrib/src/boost/config/platform/irix.hpp @@ -0,0 +1,31 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// SGI Irix specific config options: + +#define BOOST_PLATFORM "SGI Irix" + +#define BOOST_NO_SWPRINTF +// +// these are not auto detected by POSIX feature tests: +// +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE + +#ifdef __GNUC__ + // GNU C on IRIX does not support threads (checked up to gcc 3.3) +# define BOOST_DISABLE_THREADS +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + + diff --git a/contrib/src/boost/config/platform/linux.hpp b/contrib/src/boost/config/platform/linux.hpp new file mode 100644 index 0000000..6fa5f45 --- /dev/null +++ b/contrib/src/boost/config/platform/linux.hpp @@ -0,0 +1,105 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// linux specific config options: + +#define BOOST_PLATFORM "linux" + +// make sure we have __GLIBC_PREREQ if available at all +#ifdef __cplusplus +#include +#else +#include +#endif + +// +// added to glibc 2.1.1 +// We can only test for 2.1 though: +// +#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1))) + // defines int64_t unconditionally, but defines + // int64_t only if __GNUC__. Thus, assume a fully usable + // only when using GCC. +# if defined __GNUC__ +# define BOOST_HAS_STDINT_H +# endif +#endif + +#if defined(__LIBCOMO__) + // + // como on linux doesn't have std:: c functions: + // NOTE: versions of libcomo prior to beta28 have octal version numbering, + // e.g. version 25 is 21 (dec) + // +# if __LIBCOMO_VERSION__ <= 20 +# define BOOST_NO_STDC_NAMESPACE +# endif + +# if __LIBCOMO_VERSION__ <= 21 +# define BOOST_NO_SWPRINTF +# endif + +#endif + +// +// If glibc is past version 2 then we definitely have +// gettimeofday, earlier versions may or may not have it: +// +#if defined(__GLIBC__) && (__GLIBC__ >= 2) +# define BOOST_HAS_GETTIMEOFDAY +#endif + +#ifdef __USE_POSIX199309 +# define BOOST_HAS_NANOSLEEP +#endif + +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) +// __GLIBC_PREREQ is available since 2.1.2 + + // swprintf is available since glibc 2.2.0 +# if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98)) +# define BOOST_NO_SWPRINTF +# endif +#else +# define BOOST_NO_SWPRINTF +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include +#ifdef __USE_GNU +#define BOOST_HAS_PTHREAD_YIELD +#endif + +#ifndef __GNUC__ +// +// if the compiler is not gcc we still need to be able to parse +// the GNU system headers, some of which (mainly ) +// use GNU specific extensions: +// +# ifndef __extension__ +# define __extension__ +# endif +# ifndef __const__ +# define __const__ const +# endif +# ifndef __volatile__ +# define __volatile__ volatile +# endif +# ifndef __signed__ +# define __signed__ signed +# endif +# ifndef __typeof__ +# define __typeof__ typeof +# endif +# ifndef __inline__ +# define __inline__ inline +# endif +#endif + + diff --git a/contrib/src/boost/config/platform/macos.hpp b/contrib/src/boost/config/platform/macos.hpp new file mode 100644 index 0000000..5be4e3b --- /dev/null +++ b/contrib/src/boost/config/platform/macos.hpp @@ -0,0 +1,87 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Bill Kempf 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Mac OS specific config options: + +#define BOOST_PLATFORM "Mac OS" + +#if __MACH__ && !defined(_MSL_USING_MSL_C) + +// Using the Mac OS X system BSD-style C library. + +# ifndef BOOST_HAS_UNISTD_H +# define BOOST_HAS_UNISTD_H +# endif +// +// Begin by including our boilerplate code for POSIX +// feature detection, this is safe even when using +// the MSL as Metrowerks supply their own +// to replace the platform-native BSD one. G++ users +// should also always be able to do this on MaxOS X. +// +# include +# ifndef BOOST_HAS_STDINT_H +# define BOOST_HAS_STDINT_H +# endif + +// +// BSD runtime has pthreads, sigaction, sched_yield and gettimeofday, +// of these only pthreads are advertised in , so set the +// other options explicitly: +// +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_SIGACTION + +# if (__GNUC__ < 3) && !defined( __APPLE_CC__) + +// GCC strange "ignore std" mode works better if you pretend everything +// is in the std namespace, for the most part. + +# define BOOST_NO_STDC_NAMESPACE +# endif + +# if (__GNUC__ >= 4) + +// Both gcc and intel require these. +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_NANOSLEEP + +# endif + +#else + +// Using the MSL C library. + +// We will eventually support threads in non-Carbon builds, but we do +// not support this yet. +# if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON ) + +# if !defined(BOOST_HAS_PTHREADS) +// MPTasks support is deprecated/removed from Boost: +//# define BOOST_HAS_MPTASKS +# elif ( __dest_os == __mac_os_x ) +// We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the +// gettimeofday and no posix. +# define BOOST_HAS_GETTIMEOFDAY +# endif + +#ifdef BOOST_HAS_PTHREADS +# define BOOST_HAS_THREADS +#endif + +// The remote call manager depends on this. +# define BOOST_BIND_ENABLE_PASCAL + +# endif + +#endif + + + diff --git a/contrib/src/boost/config/platform/qnxnto.hpp b/contrib/src/boost/config/platform/qnxnto.hpp new file mode 100644 index 0000000..b1377c8 --- /dev/null +++ b/contrib/src/boost/config/platform/qnxnto.hpp @@ -0,0 +1,31 @@ +// (C) Copyright Jim Douglas 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// QNX specific config options: + +#define BOOST_PLATFORM "QNX" + +#define BOOST_HAS_UNISTD_H +#include + +// QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h +// or log1p and expm1: +#undef BOOST_HAS_NL_TYPES_H +#undef BOOST_HAS_LOG1P +#undef BOOST_HAS_EXPM1 + +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE + +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_NANOSLEEP + + + + + diff --git a/contrib/src/boost/config/platform/solaris.hpp b/contrib/src/boost/config/platform/solaris.hpp new file mode 100644 index 0000000..6e4efc9 --- /dev/null +++ b/contrib/src/boost/config/platform/solaris.hpp @@ -0,0 +1,31 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// sun specific config options: + +#define BOOST_PLATFORM "Sun Solaris" + +#define BOOST_HAS_GETTIMEOFDAY + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + +// +// pthreads don't actually work with gcc unless _PTHREADS is defined: +// +#if defined(__GNUC__) && defined(_POSIX_THREADS) && !defined(_PTHREADS) +# undef BOOST_HAS_PTHREADS +#endif + +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#define BOOST_HAS_LOG1P +#define BOOST_HAS_EXPM1 + + diff --git a/contrib/src/boost/config/platform/symbian.hpp b/contrib/src/boost/config/platform/symbian.hpp new file mode 100644 index 0000000..e02a778 --- /dev/null +++ b/contrib/src/boost/config/platform/symbian.hpp @@ -0,0 +1,97 @@ +// (C) Copyright Yuriy Krasnoschek 2009. +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// symbian specific config options: + + +#define BOOST_PLATFORM "Symbian" +#define BOOST_SYMBIAN 1 + + +#if defined(__S60_3X__) +// Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL +# define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK +// make sure we have __GLIBC_PREREQ if available at all +#ifdef __cplusplus +#include +#else +#include +#endif// boilerplate code: +# define BOOST_HAS_UNISTD_H +# include +// S60 SDK defines _POSIX_VERSION as POSIX.1 +# ifndef BOOST_HAS_STDINT_H +# define BOOST_HAS_STDINT_H +# endif +# ifndef BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_GETTIMEOFDAY +# endif +# ifndef BOOST_HAS_DIRENT_H +# define BOOST_HAS_DIRENT_H +# endif +# ifndef BOOST_HAS_SIGACTION +# define BOOST_HAS_SIGACTION +# endif +# ifndef BOOST_HAS_PTHREADS +# define BOOST_HAS_PTHREADS +# endif +# ifndef BOOST_HAS_NANOSLEEP +# define BOOST_HAS_NANOSLEEP +# endif +# ifndef BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_SCHED_YIELD +# endif +# ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# endif +# ifndef BOOST_HAS_LOG1P +# define BOOST_HAS_LOG1P +# endif +# ifndef BOOST_HAS_EXPM1 +# define BOOST_HAS_EXPM1 +# endif +# ifndef BOOST_POSIX_API +# define BOOST_POSIX_API +# endif +// endianess support +# include +// Symbian SDK provides _BYTE_ORDER instead of __BYTE_ORDER +# ifndef __LITTLE_ENDIAN +# ifdef _LITTLE_ENDIAN +# define __LITTLE_ENDIAN _LITTLE_ENDIAN +# else +# define __LITTLE_ENDIAN 1234 +# endif +# endif +# ifndef __BIG_ENDIAN +# ifdef _BIG_ENDIAN +# define __BIG_ENDIAN _BIG_ENDIAN +# else +# define __BIG_ENDIAN 4321 +# endif +# endif +# ifndef __BYTE_ORDER +# define __BYTE_ORDER __LITTLE_ENDIAN // Symbian is LE +# endif +// Known limitations +# define BOOST_ASIO_DISABLE_SERIAL_PORT +# define BOOST_DATE_TIME_NO_LOCALE +# define BOOST_NO_STD_WSTRING +# define BOOST_EXCEPTION_DISABLE +# define BOOST_NO_EXCEPTIONS + +#else // TODO: More platform support e.g. UIQ +# error "Unsuppoted Symbian SDK" +#endif + +#if defined(__WINSCW__) && !defined(BOOST_DISABLE_WIN32) +# define BOOST_DISABLE_WIN32 // winscw defines WIN32 macro +#endif + + diff --git a/contrib/src/boost/config/platform/vms.hpp b/contrib/src/boost/config/platform/vms.hpp new file mode 100644 index 0000000..f70efcf --- /dev/null +++ b/contrib/src/boost/config/platform/vms.hpp @@ -0,0 +1,25 @@ +// (C) Copyright Artyom Beilis 2010. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_CONFIG_PLATFORM_VMS_HPP +#define BOOST_CONFIG_PLATFORM_VMS_HPP + +#define BOOST_PLATFORM "OpenVMS" + +#undef BOOST_HAS_STDINT_H +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_NL_TYPES_H +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#define BOOST_HAS_LOG1P +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_THREADS +#undef BOOST_HAS_SCHED_YIELD + +#endif diff --git a/contrib/src/boost/config/platform/vxworks.hpp b/contrib/src/boost/config/platform/vxworks.hpp new file mode 100644 index 0000000..cdda015 --- /dev/null +++ b/contrib/src/boost/config/platform/vxworks.hpp @@ -0,0 +1,369 @@ +// (C) Copyright Dustin Spicuzza 2009. +// Adapted to vxWorks 6.9 by Peter Brockamp 2012. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Since WRS does not yet properly support boost under vxWorks +// and this file was badly outdated, but I was keen on using it, +// I patched boost myself to make things work. This has been tested +// and adapted by me for vxWorks 6.9 *only*, as I'm lacking access +// to earlier 6.X versions! The only thing I know for sure is that +// very old versions of vxWorks (namely everything below 6.x) are +// absolutely unable to use boost. This is mainly due to the completely +// outdated libraries and ancient compiler (GCC 2.96 or worse). Do +// not even think of getting this to work, a miserable failure will +// be guaranteed! +// Equally, this file has been tested for RTPs (Real Time Processes) +// only, not for DKMs (Downloadable Kernel Modules). These two types +// of executables differ largely in the available functionality of +// the C-library, STL, and so on. A DKM uses a library similar to those +// of vxWorks 5.X - with all its limitations and incompatibilities +// with respect to ANSI C++ and STL. So probably there might be problems +// with the usage of boost from DKMs. WRS or any voluteers are free to +// prove the opposite! + +// ==================================================================== +// +// Some important information regarding the usage of POSIX semaphores: +// ------------------------------------------------------------------- +// +// VxWorks as a real time operating system handles threads somewhat +// different from what "normal" OSes do, regarding their scheduling! +// This could lead to a scenario called "priority inversion" when using +// semaphores, see http://en.wikipedia.org/wiki/Priority_inversion. +// +// Now, VxWorks POSIX-semaphores for DKM's default to the usage of +// priority inverting semaphores, which is fine. On the other hand, +// for RTP's it defaults to using non priority inverting semaphores, +// which could easily pose a serious problem for a real time process, +// i.e. deadlocks! To overcome this two possibilities do exist: +// +// a) Patch every piece of boost that uses semaphores to instanciate +// the proper type of semaphores. This is non-intrusive with respect +// to the OS and could relatively easy been done by giving all +// semaphores attributes deviating from the default (for in-depth +// information see the POSIX functions pthread_mutexattr_init() +// and pthread_mutexattr_setprotocol()). However this breaks all +// too easily, as with every new version some boost library could +// all in a sudden start using semaphores, resurrecting the very +// same, hard to locate problem over and over again! +// +// b) We could change the default properties for POSIX-semaphores +// that VxWorks uses for RTP's and this is being suggested here, +// as it will more or less seamlessly integrate with boost. I got +// the following information from WRS how to do this, compare +// Wind River TSR# 1209768: +// +// Instructions for changing the default properties of POSIX- +// semaphores for RTP's in VxWorks 6.9: +// - Edit the file /vxworks-6.9/target/usr/src/posix/pthreadLib.c +// in the root of your Workbench-installation. +// - Around line 917 there should be the definition of the default +// mutex attributes: +// +// LOCAL pthread_mutexattr_t defaultMutexAttr = +// { +// PTHREAD_INITIALIZED_OBJ, PTHREAD_PRIO_NONE, 0, +// PTHREAD_MUTEX_DEFAULT +// }; +// +// Here, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. +// - Around line 1236 there should be a definition for the function +// pthread_mutexattr_init(). A couple of lines below you should +// find a block of code like this: +// +// pAttr->mutexAttrStatus = PTHREAD_INITIALIZED_OBJ; +// pAttr->mutexAttrProtocol = PTHREAD_PRIO_NONE; +// pAttr->mutexAttrPrioceiling = 0; +// pAttr->mutexAttrType = PTHREAD_MUTEX_DEFAULT; +// +// Here again, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. +// - Finally, rebuild your VSB. This will create a new VxWorks kernel +// with the changed properties. That's it! Now, using boost should +// no longer cause any problems with task deadlocks! +// +// And here's another useful piece of information concerning VxWorks' +// POSIX-functionality in general: +// VxWorks is not a genuine POSIX-OS in itself, rather it is using a +// kind of compatibility layer (sort of a wrapper) to emulate the +// POSIX-functionality by using its own resources and functions. +// At the time a task (thread) calls it's first POSIX-function during +// runtime it is being transformed by the OS into a POSIX-thread. +// This transformation does include a call to malloc() to allocate the +// memory required for the housekeeping of POSIX-threads. In a high +// priority RTP this malloc() call may be highly undesirable, as its +// timing is more or less unpredictable (depending on what your actual +// heap looks like). You can circumvent this problem by calling the +// function thread_self() at a well defined point in the code of the +// task, e.g. shortly after the task spawns up. Thereby you are able +// to define the time when the task-transformation will take place and +// you could shift it to an uncritical point where a malloc() call is +// tolerable. So, if this could pose a problem for your code, remember +// to call thread_self() from the affected task at an early stage. +// +// ==================================================================== + +// Block out all versions before vxWorks 6.x, as these don't work: +// Include header with the vxWorks version information and query them +#include +#if !defined(_WRS_VXWORKS_MAJOR) || (_WRS_VXWORKS_MAJOR < 6) +# error "The vxWorks version you're using is so badly outdated,\ + it doesn't work at all with boost, sorry, no chance!" +#endif + +// Handle versions above 5.X but below 6.9 +#if (_WRS_VXWORKS_MAJOR == 6) && (_WRS_VXWORKS_MINOR < 9) +// TODO: Starting from what version does vxWorks work with boost? +// We can't reasonably insert a #warning "" as a user hint here, +// as this will show up with every file including some boost header, +// badly bugging the user... So for the time being we just leave it. +#endif + +// vxWorks specific config options: +// -------------------------------- +#define BOOST_PLATFORM "vxWorks" + +// Special behaviour for DKMs: +#ifdef _WRS_KERNEL + // DKMs do not have the -header, + // but apparently they do have an intrinsic wchar_t meanwhile! +# define BOOST_NO_CWCHAR + + // Lots of wide-functions and -headers are unavailable for DKMs as well: +# define BOOST_NO_CWCTYPE +# define BOOST_NO_SWPRINTF +# define BOOST_NO_STD_WSTRING +# define BOOST_NO_STD_WSTREAMBUF +#endif + +// Generally available headers: +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_SLIST + +// vxWorks does not have installed an iconv-library by default, +// so unfortunately no Unicode support from scratch is available! +// Thus, instead it is suggested to switch to ICU, as this seems +// to be the most complete and portable option... +#define BOOST_LOCALE_WITH_ICU + +// Generally available functionality: +#define BOOST_HAS_THREADS +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_MACRO_USE_FACET + +// Generally unavailable functionality, delivered by boost's test function: +//#define BOOST_NO_DEDUCED_TYPENAME // Commented this out, boost's test gives an errorneous result! +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_VARIADIC_MACROS + +// Generally available threading API's: +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_SIGACTION + +// Functionality available for RTPs only: +#ifdef __RTP__ +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_LOG1P +# define BOOST_HAS_EXPM1 +#endif + +// Functionality available for DKMs only: +#ifdef _WRS_KERNEL + // Luckily, at the moment there seems to be none! +#endif + +// These #defines allow posix_features to work, since vxWorks doesn't +// #define them itself for DKMs (for RTPs on the contrary it does): +#ifdef _WRS_KERNEL +# ifndef _POSIX_TIMERS +# define _POSIX_TIMERS 1 +# endif +# ifndef _POSIX_THREADS +# define _POSIX_THREADS 1 +# endif +#endif + +// vxWorks doesn't work with asio serial ports: +#define BOOST_ASIO_DISABLE_SERIAL_PORT +// TODO: The problem here seems to bee that vxWorks uses its own, very specific +// ways to handle serial ports, incompatible with POSIX or anything... +// Maybe a specific implementation would be possible, but until the +// straight need arises... This implementation would presumably consist +// of some vxWorks specific ioctl-calls, etc. Any voluteers? + +// vxWorks-around: #defines CLOCKS_PER_SEC as sysClkRateGet() but +// miserably fails to #include the required to make +// sysClkRateGet() available! So we manually include it here. +#ifdef __RTP__ +# include +# include +#endif + +// vxWorks-around: In the macros INT32_C(), UINT32_C(), INT64_C() and +// UINT64_C() are defined errorneously, yielding not a signed/ +// unsigned long/long long type, but a signed/unsigned int/long +// type. Eventually this leads to compile errors in ratio_fwd.hpp, +// when trying to define several constants which do not fit into a +// long type! We correct them here by redefining. +#include + +// Some macro-magic to do the job +#define VX_JOIN(X, Y) VX_DO_JOIN(X, Y) +#define VX_DO_JOIN(X, Y) VX_DO_JOIN2(X, Y) +#define VX_DO_JOIN2(X, Y) X##Y + +// Correctly setup the macros +#undef INT32_C +#undef UINT32_C +#undef INT64_C +#undef UINT64_C +#define INT32_C(x) VX_JOIN(x, L) +#define UINT32_C(x) VX_JOIN(x, UL) +#define INT64_C(x) VX_JOIN(x, LL) +#define UINT64_C(x) VX_JOIN(x, ULL) + +// #include Libraries required for the following function adaption +#include +#include +#include + +// Use C-linkage for the following helper functions +extern "C" { + +// vxWorks-around: The required functions getrlimit() and getrlimit() are missing. +// But we have the similar functions getprlimit() and setprlimit(), +// which may serve the purpose. +// Problem: The vxWorks-documentation regarding these functions +// doesn't deserve its name! It isn't documented what the first two +// parameters idtype and id mean, so we must fall back to an educated +// guess - null, argh... :-/ + +// TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason. +// Thus for DKMs there would have to be another implementation. +#ifdef __RTP__ + inline int getrlimit(int resource, struct rlimit *rlp){ + return getprlimit(0, 0, resource, rlp); + } + + inline int setrlimit(int resource, const struct rlimit *rlp){ + return setprlimit(0, 0, resource, const_cast(rlp)); + } +#endif + +// vxWorks has ftruncate() only, so we do simulate truncate(): +inline int truncate(const char *p, off_t l){ + int fd = open(p, O_WRONLY); + if (fd == -1){ + errno = EACCES; + return -1; + } + if (ftruncate(fd, l) == -1){ + close(fd); + errno = EACCES; + return -1; + } + return close(fd); +} + +// Fake symlink handling by dummy functions: +inline int symlink(const char*, const char*){ + // vxWorks has no symlinks -> always return an error! + errno = EACCES; + return -1; +} + +inline ssize_t readlink(const char*, char*, size_t){ + // vxWorks has no symlinks -> always return an error! + errno = EACCES; + return -1; +} + +// vxWorks claims to implement gettimeofday in sys/time.h +// but nevertheless does not provide it! See +// https://support.windriver.com/olsPortal/faces/maintenance/techtipDetail_noHeader.jspx?docId=16442&contentId=WR_TECHTIP_006256 +// We implement a surrogate version here via clock_gettime: +inline int gettimeofday(struct timeval *tv, void * /*tzv*/) { + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + tv->tv_sec = ts.tv_sec; + tv->tv_usec = ts.tv_nsec / 1000; + return 0; +} + +// vxWorks does provide neither struct tms nor function times()! +// We implement an empty dummy-function, simply setting the user +// and system time to the half of thew actual system ticks-value +// and the child user and system time to 0. +// Rather ugly but at least it suppresses compiler errors... +// Unfortunately, this of course *does* have an severe impact on +// dependant libraries, actually this is chrono only! Here it will +// not be possible to correctly use user and system times! But +// as vxWorks is lacking the ability to calculate user and system +// process times there seems to be no other possible solution. +struct tms{ + clock_t tms_utime; // User CPU time + clock_t tms_stime; // System CPU time + clock_t tms_cutime; // User CPU time of terminated child processes + clock_t tms_cstime; // System CPU time of terminated child processes +}; + +inline clock_t times(struct tms *t){ + struct timespec ts; + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); + clock_t ticks(static_cast(static_cast(ts.tv_sec) * CLOCKS_PER_SEC + + static_cast(ts.tv_nsec) * CLOCKS_PER_SEC / 1000000.0)); + t->tms_utime = ticks/2U; + t->tms_stime = ticks/2U; + t->tms_cutime = 0; // vxWorks is lacking the concept of a child process! + t->tms_cstime = 0; // -> Set the wait times for childs to 0 + return ticks; +} + +} // extern "C" + +// Put the selfmade functions into the std-namespace, just in case +namespace std { +# ifdef __RTP__ + using ::getrlimit; + using ::setrlimit; +# endif + using ::truncate; + using ::symlink; + using ::readlink; + using ::times; + using ::gettimeofday; +} + +// Some more macro-magic: +// vxWorks-around: Some functions are not present or broken in vxWorks +// but may be patched to life via helper macros... + +// Include signal.h which might contain a typo to be corrected here +#include + +#define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway! +#ifndef S_ISSOCK +# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket? +#endif +#define lstat(p, b) stat(p, b) // lstat() == stat(), as vxWorks has no symlinks! +#ifndef FPE_FLTINV +# define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy +#endif +#if !defined(BUS_ADRALN) && defined(BUS_ADRALNR) +# define BUS_ADRALN BUS_ADRALNR // Correct a supposed typo in vxWorks' +#endif +//typedef int locale_t; // locale_t is a POSIX-extension, currently unpresent in vxWorks! + +// #include boilerplate code: +#include + +// vxWorks lies about XSI conformance, there is no nl_types.h: +#undef BOOST_HAS_NL_TYPES_H diff --git a/contrib/src/boost/config/platform/win32.hpp b/contrib/src/boost/config/platform/win32.hpp new file mode 100644 index 0000000..450158f --- /dev/null +++ b/contrib/src/boost/config/platform/win32.hpp @@ -0,0 +1,90 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Bill Kempf 2001. +// (C) Copyright Aleksey Gurtovoy 2003. +// (C) Copyright Rene Rivera 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Win32 specific config options: + +#define BOOST_PLATFORM "Win32" + +// Get the information about the MinGW runtime, i.e. __MINGW32_*VERSION. +#if defined(__MINGW32__) +# include <_mingw.h> +#endif + +#if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF) +# define BOOST_NO_SWPRINTF +#endif + +// Default defines for BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT +// If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport), +// its boost/config/compiler/ file must define BOOST_SYMBOL_EXPORT and +// BOOST_SYMBOL_IMPORT +#ifndef BOOST_SYMBOL_EXPORT +# define BOOST_HAS_DECLSPEC +# define BOOST_SYMBOL_EXPORT __declspec(dllexport) +# define BOOST_SYMBOL_IMPORT __declspec(dllimport) +#endif + +#if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0))) +# define BOOST_HAS_STDINT_H +# ifndef __STDC_LIMIT_MACROS +# define __STDC_LIMIT_MACROS +# endif +# define BOOST_HAS_DIRENT_H +# define BOOST_HAS_UNISTD_H +#endif + +#if defined(__MINGW32__) && (__GNUC__ >= 4) +// Mingw has these functions but there are persistent problems +// with calls to these crashing, so disable for now: +//# define BOOST_HAS_EXPM1 +//# define BOOST_HAS_LOG1P +# define BOOST_HAS_GETTIMEOFDAY +#endif +// +// Win32 will normally be using native Win32 threads, +// but there is a pthread library avaliable as an option, +// we used to disable this when BOOST_DISABLE_WIN32 was +// defined but no longer - this should allow some +// files to be compiled in strict mode - while maintaining +// a consistent setting of BOOST_HAS_THREADS across +// all translation units (needed for shared_ptr etc). +// + +#ifndef BOOST_HAS_PTHREADS +# define BOOST_HAS_WINTHREADS +#endif + +// +// WinCE configuration: +// +#if defined(_WIN32_WCE) || defined(UNDER_CE) +# define BOOST_NO_ANSI_APIS +// Windows CE does not have a conforming signature for swprintf +# define BOOST_NO_SWPRINTF +#else +# define BOOST_HAS_GETSYSTEMTIMEASFILETIME +# define BOOST_HAS_THREADEX +# define BOOST_HAS_GETSYSTEMTIMEASFILETIME +#endif + +// +// Windows Runtime +// +#if defined(WINAPI_FAMILY) && \ + (WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) +# define BOOST_NO_ANSI_APIS +#endif + +#ifndef BOOST_DISABLE_WIN32 +// WEK: Added +#define BOOST_HAS_FTIME +#define BOOST_WINDOWS 1 + +#endif diff --git a/contrib/src/boost/config/posix_features.hpp b/contrib/src/boost/config/posix_features.hpp new file mode 100644 index 0000000..d129547 --- /dev/null +++ b/contrib/src/boost/config/posix_features.hpp @@ -0,0 +1,95 @@ +// (C) Copyright John Maddock 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// All POSIX feature tests go in this file, +// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well +// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's +// may be present but none-functional unless _POSIX_C_SOURCE and +// _XOPEN_SOURCE have been defined to the right value (it's up +// to the user to do this *before* including any header, although +// in most cases the compiler will do this for you). + +# if defined(BOOST_HAS_UNISTD_H) +# include + + // XOpen has , but is this the correct version check? +# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3) +# define BOOST_HAS_NL_TYPES_H +# endif + + // POSIX version 6 requires +# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100) +# define BOOST_HAS_STDINT_H +# endif + + // POSIX version 2 requires +# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L) +# define BOOST_HAS_DIRENT_H +# endif + + // POSIX version 3 requires to have sigaction: +# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L) +# define BOOST_HAS_SIGACTION +# endif + // POSIX defines _POSIX_THREADS > 0 for pthread support, + // however some platforms define _POSIX_THREADS without + // a value, hence the (_POSIX_THREADS+0 >= 0) check. + // Strictly speaking this may catch platforms with a + // non-functioning stub , but such occurrences should + // occur very rarely if at all. +# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS) +# define BOOST_HAS_PTHREADS +# endif + + // BOOST_HAS_NANOSLEEP: + // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME: +# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \ + || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) +# define BOOST_HAS_NANOSLEEP +# endif + + // BOOST_HAS_CLOCK_GETTIME: + // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME + // but at least one platform - linux - defines that flag without + // defining clock_gettime): +# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) +# define BOOST_HAS_CLOCK_GETTIME +# endif + + // BOOST_HAS_SCHED_YIELD: + // This is predicated on _POSIX_PRIORITY_SCHEDULING or + // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME. +# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\ + || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\ + || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) +# define BOOST_HAS_SCHED_YIELD +# endif + + // BOOST_HAS_GETTIMEOFDAY: + // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE: + // These are predicated on _XOPEN_VERSION, and appears to be first released + // in issue 4, version 2 (_XOPEN_VERSION > 500). + // Likewise for the functions log1p and expm1. +# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500) +# define BOOST_HAS_GETTIMEOFDAY +# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500) +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# endif +# ifndef BOOST_HAS_LOG1P +# define BOOST_HAS_LOG1P +# endif +# ifndef BOOST_HAS_EXPM1 +# define BOOST_HAS_EXPM1 +# endif +# endif + +# endif + + + + diff --git a/contrib/src/boost/config/requires_threads.hpp b/contrib/src/boost/config/requires_threads.hpp new file mode 100644 index 0000000..cfaff23 --- /dev/null +++ b/contrib/src/boost/config/requires_threads.hpp @@ -0,0 +1,92 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +#ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP +#define BOOST_CONFIG_REQUIRES_THREADS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif + +#if defined(BOOST_DISABLE_THREADS) + +// +// special case to handle versions of gcc which don't currently support threads: +// +#if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG)) +// +// this is checked up to gcc 3.3: +// +#if defined(__sgi) || defined(__hpux) +# error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)" +#endif + +#endif + +# error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" + +#elif !defined(BOOST_HAS_THREADS) + +# if defined __COMO__ +// Comeau C++ +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)" + +#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) +// Intel +#ifdef _WIN32 +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" +#else +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp" +#endif + +# elif defined __GNUC__ +// GNU C++: +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" + +#elif defined __sgi +// SGI MIPSpro C++ +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE" + +#elif defined __DECCXX +// Compaq Tru64 Unix cxx +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread" + +#elif defined __BORLANDC__ +// Borland +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM" + +#elif defined __MWERKS__ +// Metrowerks CodeWarrior +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either -runtime sm, -runtime smd, -runtime dm, or -runtime dmd" + +#elif defined __SUNPRO_CC +// Sun Workshop Compiler C++ +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" + +#elif defined __HP_aCC +// HP aCC +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" + +#elif defined(__IBMCPP__) +// IBM Visual Age +# error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler" + +#elif defined _MSC_VER +// Microsoft Visual C++ +// +// Must remain the last #elif since some other vendors (Metrowerks, for +// example) also #define _MSC_VER +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" + +#else + +# error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use" + +#endif // compilers + +#endif // BOOST_HAS_THREADS + +#endif // BOOST_CONFIG_REQUIRES_THREADS_HPP diff --git a/contrib/src/boost/config/select_compiler_config.hpp b/contrib/src/boost/config/select_compiler_config.hpp new file mode 100644 index 0000000..4d87093 --- /dev/null +++ b/contrib/src/boost/config/select_compiler_config.hpp @@ -0,0 +1,148 @@ +// Boost compiler configuration selection header file + +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Martin Wille 2003. +// (C) Copyright Guillaume Melquiond 2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for most recent version. + +// locate which compiler we are using and define +// BOOST_COMPILER_CONFIG as needed: + +#if defined __CUDACC__ +// NVIDIA CUDA C++ compiler for GPU +# include "boost/config/compiler/nvcc.hpp" + +#endif + +#if defined(__GCCXML__) +// GCC-XML emulates other compilers, it has to appear first here! +# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp" + +#elif defined(_CRAYC) +// EDG based Cray compiler: +# define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp" + +#elif defined __COMO__ +// Comeau C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp" + +#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4) +// PathScale EKOPath compiler (has to come before clang and gcc) +# define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp" + +#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) +// Intel +# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" + +#elif defined __clang__ && !defined(__CUDACC__) && !defined(__ibmxl__) +// when using clang and cuda at same time, you want to appear as gcc +// Clang C++ emulates GCC, so it has to appear early. +# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp" + +#elif defined __DMC__ +// Digital Mars C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp" + +# elif defined(__GNUC__) && !defined(__ibmxl__) +// GNU C++: +# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp" + +#elif defined __KCC +// Kai C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp" + +#elif defined __sgi +// SGI MIPSpro C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp" + +#elif defined __DECCXX +// Compaq Tru64 Unix cxx +# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp" + +#elif defined __ghs +// Greenhills C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp" + +#elif defined __CODEGEARC__ +// CodeGear - must be checked for before Borland +# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp" + +#elif defined __BORLANDC__ +// Borland +# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp" + +#elif defined __MWERKS__ +// Metrowerks CodeWarrior +# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp" + +#elif defined __SUNPRO_CC +// Sun Workshop Compiler C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp" + +#elif defined __HP_aCC +// HP aCC +# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp" + +#elif defined(__MRC__) || defined(__SC__) +// MPW MrCpp or SCpp +# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp" + +#elif defined(__ibmxl__) +// IBM XL C/C++ for Linux (Little Endian) +# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp.hpp" + +#elif defined(__IBMCPP__) +// IBM Visual Age or IBM XL C/C++ for Linux (Big Endian) +# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp" + +#elif defined(__PGI) +// Portland Group Inc. +# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp" + +#elif defined _MSC_VER +// Microsoft Visual C++ +// +// Must remain the last #elif since some other vendors (Metrowerks, for +// example) also #define _MSC_VER +# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp" + +#elif defined (BOOST_ASSERT_CONFIG) +// this must come last - generate an error if we don't +// recognise the compiler: +# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)" + +#endif + +#if 0 +// +// This section allows dependency scanners to find all the headers we *might* include: +// +#include "boost/config/compiler/gcc_xml.hpp" +#include "boost/config/compiler/cray.hpp" +#include "boost/config/compiler/comeau.hpp" +#include "boost/config/compiler/pathscale.hpp" +#include "boost/config/compiler/intel.hpp" +#include "boost/config/compiler/clang.hpp" +#include "boost/config/compiler/digitalmars.hpp" +#include "boost/config/compiler/gcc.hpp" +#include "boost/config/compiler/kai.hpp" +#include "boost/config/compiler/sgi_mipspro.hpp" +#include "boost/config/compiler/compaq_cxx.hpp" +#include "boost/config/compiler/greenhills.hpp" +#include "boost/config/compiler/codegear.hpp" +#include "boost/config/compiler/borland.hpp" +#include "boost/config/compiler/metrowerks.hpp" +#include "boost/config/compiler/sunpro_cc.hpp" +#include "boost/config/compiler/hp_acc.hpp" +#include "boost/config/compiler/mpw.hpp" +#include "boost/config/compiler/vacpp.hpp" +#include "boost/config/compiler/pgi.hpp" +#include "boost/config/compiler/visualc.hpp" + +#endif + diff --git a/contrib/src/boost/config/select_platform_config.hpp b/contrib/src/boost/config/select_platform_config.hpp new file mode 100644 index 0000000..62fd818 --- /dev/null +++ b/contrib/src/boost/config/select_platform_config.hpp @@ -0,0 +1,137 @@ +// Boost compiler configuration selection header file + +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed. +// Note that we define the headers to include using "header_name" not +// in order to prevent macro expansion within the header +// name (for example "linux" is a macro on linux systems). + +#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC) +// linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though? +# define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp" + +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) +// BSD: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp" + +#elif defined(sun) || defined(__sun) +// solaris: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp" + +#elif defined(__sgi) +// SGI Irix: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp" + +#elif defined(__hpux) +// hp unix: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp" + +#elif defined(__CYGWIN__) +// cygwin is not win32: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +// win32: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp" + +#elif defined(__HAIKU__) +// Haiku +# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp" + +#elif defined(__BEOS__) +// BeOS +# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp" + +#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) +// MacOS +# define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp" + +#elif defined(__IBMCPP__) || defined(_AIX) +// IBM +# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp" + +#elif defined(__amigaos__) +// AmigaOS +# define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp" + +#elif defined(__QNXNTO__) +// QNX: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp" + +#elif defined(__VXWORKS__) +// vxWorks: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp" + +#elif defined(__SYMBIAN32__) +// Symbian: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp" + +#elif defined(_CRAYC) +// Cray: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp" + +#elif defined(__VMS) +// VMS: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" + +#elif defined(__CloudABI__) +// Nuxi CloudABI: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/cloudabi.hpp" +#else + +# if defined(unix) \ + || defined(__unix) \ + || defined(_XOPEN_SOURCE) \ + || defined(_POSIX_SOURCE) + + // generic unix platform: + +# ifndef BOOST_HAS_UNISTD_H +# define BOOST_HAS_UNISTD_H +# endif + +# include + +# endif + +# if defined (BOOST_ASSERT_CONFIG) + // this must come last - generate an error if we don't + // recognise the platform: +# error "Unknown platform - please configure and report the results to boost.org" +# endif + +#endif + +#if 0 +// +// This section allows dependency scanners to find all the files we *might* include: +// +# include "boost/config/platform/linux.hpp" +# include "boost/config/platform/bsd.hpp" +# include "boost/config/platform/solaris.hpp" +# include "boost/config/platform/irix.hpp" +# include "boost/config/platform/hpux.hpp" +# include "boost/config/platform/cygwin.hpp" +# include "boost/config/platform/win32.hpp" +# include "boost/config/platform/beos.hpp" +# include "boost/config/platform/macos.hpp" +# include "boost/config/platform/aix.hpp" +# include "boost/config/platform/amigaos.hpp" +# include "boost/config/platform/qnxnto.hpp" +# include "boost/config/platform/vxworks.hpp" +# include "boost/config/platform/symbian.hpp" +# include "boost/config/platform/cray.hpp" +# include "boost/config/platform/vms.hpp" +# include + + + +#endif + diff --git a/contrib/src/boost/config/select_stdlib_config.hpp b/contrib/src/boost/config/select_stdlib_config.hpp new file mode 100644 index 0000000..e270a88 --- /dev/null +++ b/contrib/src/boost/config/select_stdlib_config.hpp @@ -0,0 +1,105 @@ +// Boost compiler configuration selection header file + +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed: + +// First include to determine if some version of STLport is in use as the std lib +// (do not rely on this header being included since users can short-circuit this header +// if they know whose std lib they are using.) +#ifdef __cplusplus +# include +#else +# include +#endif + +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) +// STLPort library; this _must_ come first, otherwise since +// STLport typically sits on top of some other library, we +// can end up detecting that first rather than STLport: +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp" + +#else + +// If our std lib was not some version of STLport, and has not otherwise +// been detected, then include as it is about +// the smallest of the std lib headers that includes real C++ stuff. +// Some std libs do not include their C++-related macros in +// so this additional include makes sure we get those definitions. +// Note: do not rely on this header being included since users can short-circuit this +// #include if they know whose std lib they are using. +#if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\ + && !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__)\ + && !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__)\ + && !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER) +#include +#endif + +#if defined(__LIBCOMO__) +// Comeau STL: +#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp" + +#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) +// Rogue Wave library: +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp" + +#elif defined(_LIBCPP_VERSION) +// libc++ +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp" + +#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) +// GNU libstdc++ 3 +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp" + +#elif defined(__STL_CONFIG_H) +// generic SGI STL +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp" + +#elif defined(__MSL_CPP__) +// MSL standard lib: +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp" + +#elif defined(__IBMCPP__) +// take the default VACPP std lib +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp" + +#elif defined(MSIPL_COMPILE_H) +// Modena C++ standard library +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp" + +#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) +// Dinkumware Library (this has to appear after any possible replacement libraries): +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp" + +#elif defined (BOOST_ASSERT_CONFIG) +// this must come last - generate an error if we don't +// recognise the library: +# error "Unknown standard library - please configure and report the results to boost.org" + +#endif + +#endif + +#if 0 +// +// This section allows dependency scanners to find all the files we *might* include: +// +# include "boost/config/stdlib/stlport.hpp" +# include "boost/config/stdlib/libcomo.hpp" +# include "boost/config/stdlib/roguewave.hpp" +# include "boost/config/stdlib/libcpp.hpp" +# include "boost/config/stdlib/libstdcpp3.hpp" +# include "boost/config/stdlib/sgi.hpp" +# include "boost/config/stdlib/msl.hpp" +# include "boost/config/stdlib/vacpp.hpp" +# include "boost/config/stdlib/modena.hpp" +# include "boost/config/stdlib/dinkumware.hpp" +#endif + diff --git a/contrib/src/boost/config/stdlib/dinkumware.hpp b/contrib/src/boost/config/stdlib/dinkumware.hpp new file mode 100644 index 0000000..af8ddda --- /dev/null +++ b/contrib/src/boost/config/stdlib/dinkumware.hpp @@ -0,0 +1,198 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Guillaume Melquiond 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Dinkumware standard library config: + +#if !defined(_YVALS) && !defined(_CPPLIB_VER) +#include +#if !defined(_YVALS) && !defined(_CPPLIB_VER) +#error This is not the Dinkumware lib! +#endif +#endif + + +#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306) + // full dinkumware 3.06 and above + // fully conforming provided the compiler supports it: +# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h +# define BOOST_NO_STDC_NAMESPACE +# endif +# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC) +# define BOOST_NO_STD_ALLOCATOR +# endif +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +# if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) + // if this lib version is set up for vc6 then there is no std::use_facet: +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_TWO_ARG_USE_FACET + // C lib functions aren't in namespace std either: +# define BOOST_NO_STDC_NAMESPACE + // and nor is +# define BOOST_NO_EXCEPTION_STD_NAMESPACE +# endif +// There's no numeric_limits support unless _LONGLONG is defined: +# if !defined(_LONGLONG) && (_CPPLIB_VER <= 310) +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# endif +// 3.06 appears to have (non-sgi versions of) & , +// and no at all +#else +# define BOOST_MSVC_STD_ITERATOR 1 +# define BOOST_NO_STD_ITERATOR +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# define BOOST_NO_STD_ALLOCATOR +# define BOOST_NO_STDC_NAMESPACE +# define BOOST_NO_STD_USE_FACET +# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN +# define BOOST_HAS_MACRO_USE_FACET +# ifndef _CPPLIB_VER + // Updated Dinkum library defines this, and provides + // its own min and max definitions, as does MTA version. +# ifndef __MTA__ +# define BOOST_NO_STD_MIN_MAX +# endif +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# endif +#endif + +// +// std extension namespace is stdext for vc7.1 and later, +// the same applies to other compilers that sit on top +// of vc7.1 (Intel and Comeau): +// +#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__) +# define BOOST_STD_EXTENSION_NAMESPACE stdext +#endif + + +#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306) + // if we're using a dinkum lib that's + // been configured for VC6/7 then there is + // no iterator traits (true even for icl) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +#if defined(__ICL) && (__ICL < 800) && defined(_CPPLIB_VER) && (_CPPLIB_VER <= 310) +// Intel C++ chokes over any non-trivial use of +// this may be an overly restrictive define, but regex fails without it: +# define BOOST_NO_STD_LOCALE +#endif + +// Fix for VC++ 8.0 on up ( I do not have a previous version to test ) +// or clang-cl. If exceptions are off you must manually include the +// header before including the header. Admittedly +// trying to use Boost libraries or the standard C++ libraries without +// exception support is not suggested but currently clang-cl ( v 3.4 ) +// does not support exceptions and must be compiled with exceptions off. +#if !_HAS_EXCEPTIONS && ((defined(BOOST_MSVC) && BOOST_MSVC >= 1400) || (defined(__clang__) && defined(_MSC_VER))) +#include +#endif +#include +#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) +# define BOOST_NO_STD_TYPEINFO +#endif + +// C++0x headers implemented in 520 (as shipped by Microsoft) +// +#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520 +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_SMART_PTR +#endif + +#if ((!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(BOOST_NO_CXX11_HDR_TUPLE)) \ + && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 610) +# define BOOST_NO_CXX11_HDR_TUPLE +#endif + +// C++0x headers implemented in 540 (as shipped by Microsoft) +// +#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 540 +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +#endif + +// C++0x headers implemented in 610 (as shipped by Microsoft) +// +#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 610 +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_ALLOCATOR +// 540 has std::align but it is not a conforming implementation +# define BOOST_NO_CXX11_STD_ALIGN +#endif + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#elif !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +#if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400) +// Intel's compiler can't handle this header yet: +# define BOOST_NO_CXX11_HDR_ATOMIC +#endif + + +// 520..610 have std::addressof, but it doesn't support functions +// +#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 650 +# define BOOST_NO_CXX11_ADDRESSOF +#endif + +// Bug specific to VC14, +// See https://connect.microsoft.com/VisualStudio/feedback/details/1348277/link-error-when-using-std-codecvt-utf8-utf16-char16-t +// and discussion here: http://blogs.msdn.com/b/vcblog/archive/2014/11/12/visual-studio-2015-preview-now-available.aspx?PageIndex=2 +#if defined(_CPPLIB_VER) && (_CPPLIB_VER == 650) +# define BOOST_NO_CXX11_HDR_CODECVT +#endif + +#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 650) +// If _HAS_AUTO_PTR_ETC is defined to 0, std::auto_ptr is not available. +// See https://www.visualstudio.com/en-us/news/vs2015-vs.aspx#C++ +// and http://blogs.msdn.com/b/vcblog/archive/2015/06/19/c-11-14-17-features-in-vs-2015-rtm.aspx +# if defined(_HAS_AUTO_PTR_ETC) && (_HAS_AUTO_PTR_ETC == 0) +# define BOOST_NO_AUTO_PTR +# endif +#endif + +#ifdef _CPPLIB_VER +# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER +#else +# define BOOST_DINKUMWARE_STDLIB 1 +#endif + +#ifdef _CPPLIB_VER +# define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER) +#else +# define BOOST_STDLIB "Dinkumware standard library version 1.x" +#endif diff --git a/contrib/src/boost/config/stdlib/libcomo.hpp b/contrib/src/boost/config/stdlib/libcomo.hpp new file mode 100644 index 0000000..941498d --- /dev/null +++ b/contrib/src/boost/config/stdlib/libcomo.hpp @@ -0,0 +1,83 @@ +// (C) Copyright John Maddock 2002 - 2003. +// (C) Copyright Jens Maurer 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Comeau STL: + +#if !defined(__LIBCOMO__) +# include +# if !defined(__LIBCOMO__) +# error "This is not the Comeau STL!" +# endif +#endif + +// +// std::streambuf is non-standard +// NOTE: versions of libcomo prior to beta28 have octal version numbering, +// e.g. version 25 is 21 (dec) +#if __LIBCOMO_VERSION__ <= 22 +# define BOOST_NO_STD_WSTREAMBUF +#endif + +#if (__LIBCOMO_VERSION__ <= 31) && defined(_WIN32) +#define BOOST_NO_SWPRINTF +#endif + +#if __LIBCOMO_VERSION__ >= 31 +# define BOOST_HAS_HASH +# define BOOST_HAS_SLIST +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +// +// Intrinsic type_traits support. +// The SGI STL has it's own __type_traits class, which +// has intrinsic compiler support with SGI's compilers. +// Whatever map SGI style type traits to boost equivalents: +// +#define BOOST_HAS_SGI_TYPE_TRAITS + +#define BOOST_STDLIB "Comeau standard library " BOOST_STRINGIZE(__LIBCOMO_VERSION__) diff --git a/contrib/src/boost/config/stdlib/libcpp.hpp b/contrib/src/boost/config/stdlib/libcpp.hpp new file mode 100644 index 0000000..ab5d123 --- /dev/null +++ b/contrib/src/boost/config/stdlib/libcpp.hpp @@ -0,0 +1,80 @@ +// (C) Copyright Christopher Jefferson 2011. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// config for libc++ +// Might need more in here later. + +#if !defined(_LIBCPP_VERSION) +# include +# if !defined(_LIBCPP_VERSION) +# error "This is not libc++!" +# endif +#endif + +#define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION) + +#define BOOST_HAS_THREADS + +#ifdef _LIBCPP_HAS_NO_VARIADICS +# define BOOST_NO_CXX11_HDR_TUPLE +#endif + +// BOOST_NO_CXX11_ALLOCATOR should imply no support for the C++11 +// allocator model. The C++11 allocator model requires a conforming +// std::allocator_traits which is only possible with C++11 template +// aliases since members rebind_alloc and rebind_traits require it. +#if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES) +# define BOOST_NO_CXX11_ALLOCATOR +#endif + +#if __cplusplus < 201103 +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF +#endif + +// +// These appear to be unusable/incomplete so far: +// +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_HDR_ATOMIC + +// libc++ uses a non-standard messages_base +#define BOOST_NO_STD_MESSAGES + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus <= 201103 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +// --- end --- diff --git a/contrib/src/boost/config/stdlib/libstdcpp3.hpp b/contrib/src/boost/config/stdlib/libstdcpp3.hpp new file mode 100644 index 0000000..9718bed --- /dev/null +++ b/contrib/src/boost/config/stdlib/libstdcpp3.hpp @@ -0,0 +1,281 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// config for libstdc++ v3 +// not much to go in here: + +#define BOOST_GNU_STDLIB 1 + +#ifdef __GLIBCXX__ +#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__) +#else +#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__) +#endif + +#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T) +# define BOOST_NO_CWCHAR +# define BOOST_NO_CWCTYPE +# define BOOST_NO_STD_WSTRING +# define BOOST_NO_STD_WSTREAMBUF +#endif + +#if defined(__osf__) && !defined(_REENTRANT) \ + && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) ) +// GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header +// file is included, therefore for consistency we define it here as well. +# define _REENTRANT +#endif + +#ifdef __GLIBCXX__ // gcc 3.4 and greater: +# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ + || defined(_GLIBCXX__PTHREADS) \ + || defined(_GLIBCXX_HAS_GTHREADS) \ + || defined(_WIN32) \ + || defined(_AIX) \ + || defined(__HAIKU__) + // + // If the std lib has thread support turned on, then turn it on in Boost + // as well. We do this because some gcc-3.4 std lib headers define _REENTANT + // while others do not... + // +# define BOOST_HAS_THREADS +# else +# define BOOST_DISABLE_THREADS +# endif +#elif defined(__GLIBCPP__) \ + && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \ + && !defined(_GLIBCPP__PTHREADS) + // disable thread support if the std lib was built single threaded: +# define BOOST_DISABLE_THREADS +#endif + +#if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT) +// linux on arm apparently doesn't define _REENTRANT +// so just turn on threading support whenever the std lib is thread safe: +# define BOOST_HAS_THREADS +#endif + +#if !defined(_GLIBCPP_USE_LONG_LONG) \ + && !defined(_GLIBCXX_USE_LONG_LONG)\ + && defined(BOOST_HAS_LONG_LONG) +// May have been set by compiler/*.hpp, but "long long" without library +// support is useless. +# undef BOOST_HAS_LONG_LONG +#endif + +// Apple doesn't seem to reliably defined a *unix* macro +#if !defined(CYGWIN) && ( defined(__unix__) \ + || defined(__unix) \ + || defined(unix) \ + || defined(__APPLE__) \ + || defined(__APPLE) \ + || defined(APPLE)) +# include +#endif + +#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 +# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx +# define BOOST_HAS_SLIST +# define BOOST_HAS_HASH +# define BOOST_SLIST_HEADER +# if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) +# define BOOST_HASH_SET_HEADER +# define BOOST_HASH_MAP_HEADER +# else +# define BOOST_HASH_SET_HEADER +# define BOOST_HASH_MAP_HEADER +# endif +#endif + +// +// Decide whether we have C++11 support turned on: +// +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103) +# define BOOST_LIBSTDCXX11 +#endif +// +// Decide which version of libstdc++ we have, normally +// stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly +// __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++ +// developers. He also commented: +// +// "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in +// GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305. +// Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support +// than any release in the 4.2 series." +// +// Another resource for understanding stdlibc++ features is: +// http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x +// +// However, using the GCC version number fails when the compiler is clang since this +// only ever claims to emulate GCC-4.2, see https://svn.boost.org/trac/boost/ticket/7473 +// for a long discussion on this issue. What we can do though is use clang's __has_include +// to detect the presence of a C++11 header that was introduced with a specific GCC release. +// We still have to be careful though as many such headers were buggy and/or incomplete when +// first introduced, so we only check for headers that were fully featured from day 1, and then +// use that to infer the underlying GCC version: +// +#ifdef __clang__ + +#if __has_include() +# define BOOST_LIBSTDCXX_VERSION 50100 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40900 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40800 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40700 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40600 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40500 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40400 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40300 +#endif +// +// GCC 4.8 and 9 add working versions of and respectively. +// However, we have no test for these as the headers were present but broken +// in early GCC versions. +// +#endif + +#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) && (__cplusplus >= 201103L) +// +// Oracle Solaris compiler uses it's own verison of libstdc++ but doesn't +// set __GNUC__ +// +#define BOOST_LIBSTDCXX_VERSION 40800 +#endif + +#if !defined(BOOST_LIBSTDCXX_VERSION) +# define BOOST_LIBSTDCXX_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#endif + +// C++0x headers in GCC 4.3.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40300) || !defined(BOOST_LIBSTDCXX11) +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +#endif + +// C++0x headers in GCC 4.4.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40400) || !defined(BOOST_LIBSTDCXX11) +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_SMART_PTR +#else +# define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG +# define BOOST_HAS_TR1_COMPLEX_OVERLOADS +#endif + +// C++0x features in GCC 4.5.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40500) || !defined(BOOST_LIBSTDCXX11) +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_RANDOM +#endif + +// C++0x features in GCC 4.6.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40600) || !defined(BOOST_LIBSTDCXX11) +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_ADDRESSOF +#endif + +// C++0x features in GCC 4.7.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40700) || !defined(BOOST_LIBSTDCXX11) +// Note that although existed prior to 4.7, "steady_clock" is spelled "monotonic_clock" +// so 4.7.0 is the first truely conforming one. +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_ALLOCATOR +#endif +// C++0x features in GCC 4.8.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40800) || !defined(BOOST_LIBSTDCXX11) +// Note that although existed prior to gcc 4.8 it was largely unimplemented for many types: +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_HDR_THREAD +#endif +// C++0x features in GCC 4.9.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11) +// Although is present and compilable against, the actual implementation is not functional +// even for the simplest patterns such as "\d" or "[0-9]". This is the case at least in gcc up to 4.8, inclusively. +# define BOOST_NO_CXX11_HDR_REGEX +#endif + +#if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7))) +// As of clang-3.6, libstdc++ header throws up errors with clang: +# define BOOST_NO_CXX11_HDR_ATOMIC +#endif +// +// C++0x features in GCC 5.1 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 50100) || !defined(BOOST_LIBSTDCXX11) +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_STD_ALIGN +#endif + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus <= 201103 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#elif __cplusplus < 201402 || (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11) +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +// +// Headers not present on Solaris with the Oracle compiler: +#if defined(__SUNPRO_CC) +#define BOOST_NO_CXX11_HDR_FUTURE +#define BOOST_NO_CXX11_HDR_FORWARD_LIST +#define BOOST_NO_CXX11_HDR_ATOMIC +// shared_ptr is present, but is not convertible to bool +// which causes all kinds of problems especially in Boost.Thread +// but probably elsewhere as well. +#define BOOST_NO_CXX11_SMART_PTR +#endif + +#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) + // Headers not always available: +# ifndef BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# endif +# ifndef BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_MUTEX +# endif +# ifndef BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_THREAD +# endif +# ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +# endif +#endif + +#if (!defined(_GTHREAD_USE_MUTEX_TIMEDLOCK) || (_GTHREAD_USE_MUTEX_TIMEDLOCK == 0)) && !defined(BOOST_NO_CXX11_HDR_MUTEX) +// Timed mutexes are not always available: +# define BOOST_NO_CXX11_HDR_MUTEX +#endif + +// --- end --- diff --git a/contrib/src/boost/config/stdlib/modena.hpp b/contrib/src/boost/config/stdlib/modena.hpp new file mode 100644 index 0000000..7a85e0c --- /dev/null +++ b/contrib/src/boost/config/stdlib/modena.hpp @@ -0,0 +1,69 @@ +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Modena C++ standard library (comes with KAI C++) + +#if !defined(MSIPL_COMPILE_H) +# include +# if !defined(__MSIPL_COMPILE_H) +# error "This is not the Modena C++ library!" +# endif +#endif + +#ifndef MSIPL_NL_TYPES +#define BOOST_NO_STD_MESSAGES +#endif + +#ifndef MSIPL_WCHART +#define BOOST_NO_STD_WSTRING +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +#define BOOST_STDLIB "Modena C++ standard library" + + + + + diff --git a/contrib/src/boost/config/stdlib/msl.hpp b/contrib/src/boost/config/stdlib/msl.hpp new file mode 100644 index 0000000..dd2775e --- /dev/null +++ b/contrib/src/boost/config/stdlib/msl.hpp @@ -0,0 +1,88 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Darin Adler 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Metrowerks standard library: + +#ifndef __MSL_CPP__ +# include +# ifndef __MSL_CPP__ +# error This is not the MSL standard library! +# endif +#endif + +#if __MSL_CPP__ >= 0x6000 // Pro 6 +# define BOOST_HAS_HASH +# define BOOST_STD_EXTENSION_NAMESPACE Metrowerks +#endif +#define BOOST_HAS_SLIST + +#if __MSL_CPP__ < 0x6209 +# define BOOST_NO_STD_MESSAGES +#endif + +// check C lib version for +#include + +#if defined(__MSL__) && (__MSL__ >= 0x5000) +# define BOOST_HAS_STDINT_H +# if !defined(__PALMOS_TRAPS__) +# define BOOST_HAS_UNISTD_H +# endif + // boilerplate code: +# include +#endif + +#if defined(_MWMT) || _MSL_THREADSAFE +# define BOOST_HAS_THREADS +#endif + +#ifdef _MSL_NO_EXPLICIT_FUNC_TEMPLATE_ARG +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_TWO_ARG_USE_FACET +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__) diff --git a/contrib/src/boost/config/stdlib/roguewave.hpp b/contrib/src/boost/config/stdlib/roguewave.hpp new file mode 100644 index 0000000..97a2b0b --- /dev/null +++ b/contrib/src/boost/config/stdlib/roguewave.hpp @@ -0,0 +1,198 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright David Abrahams 2003. +// (C) Copyright Boris Gubenko 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Rogue Wave std lib: + +#define BOOST_RW_STDLIB 1 + +#if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) +# include +# if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) +# error This is not the Rogue Wave standard library +# endif +#endif +// +// figure out a consistent version number: +// +#ifndef _RWSTD_VER +# define BOOST_RWSTD_VER 0x010000 +#elif _RWSTD_VER < 0x010000 +# define BOOST_RWSTD_VER (_RWSTD_VER << 8) +#else +# define BOOST_RWSTD_VER _RWSTD_VER +#endif + +#ifndef _RWSTD_VER +# define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)" +#elif _RWSTD_VER < 0x04010200 + # define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER) +#else +# ifdef _RWSTD_VER_STR +# define BOOST_STDLIB "Apache STDCXX standard library version " _RWSTD_VER_STR +# else +# define BOOST_STDLIB "Apache STDCXX standard library version " BOOST_STRINGIZE(_RWSTD_VER) +# endif +#endif + +// +// Prior to version 2.2.0 the primary template for std::numeric_limits +// does not have compile time constants, even though specializations of that +// template do: +// +#if BOOST_RWSTD_VER < 0x020200 +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +#endif + +// Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the +// library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817): +#if BOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550)) +# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS +# endif + +// +// Borland version of numeric_limits lacks __int64 specialisation: +// +#ifdef __BORLANDC__ +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +#endif + +// +// No std::iterator if it can't figure out default template args: +// +#if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (BOOST_RWSTD_VER < 0x020000) +# define BOOST_NO_STD_ITERATOR +#endif + +// +// No iterator traits without partial specialization: +// +#if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +// +// Prior to version 2.0, std::auto_ptr was buggy, and there were no +// new-style iostreams, and no conformant std::allocator: +// +#if (BOOST_RWSTD_VER < 0x020000) +# define BOOST_NO_AUTO_PTR +# define BOOST_NO_STRINGSTREAM +# define BOOST_NO_STD_ALLOCATOR +# define BOOST_NO_STD_LOCALE +#endif + +// +// No template iterator constructors without member template support: +// +#if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +#endif + +// +// RW defines _RWSTD_ALLOCATOR if the allocator is conformant and in use +// (the or _HPACC_ part is a hack - the library seems to define _RWSTD_ALLOCATOR +// on HP aCC systems even though the allocator is in fact broken): +// +#if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100) +# define BOOST_NO_STD_ALLOCATOR +#endif + +// +// If we have a std::locale, we still may not have std::use_facet: +// +#if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE) +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_TWO_ARG_USE_FACET +#endif + +// +// There's no std::distance prior to version 2, or without +// partial specialization support: +// +#if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) + #define BOOST_NO_STD_DISTANCE +#endif + +// +// Some versions of the rogue wave library don't have assignable +// OutputIterators: +// +#if BOOST_RWSTD_VER < 0x020100 +# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN +#endif + +// +// Disable BOOST_HAS_LONG_LONG when the library has no support for it. +// +#if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG) +# undef BOOST_HAS_LONG_LONG +#endif + +// +// check that on HP-UX, the proper RW library is used +// +#if defined(__HP_aCC) && !defined(_HP_NAMESPACE_STD) +# error "Boost requires Standard RW library. Please compile and link with -AA" +#endif + +// +// Define macros specific to RW V2.2 on HP-UX +// +#if defined(__HP_aCC) && (BOOST_RWSTD_VER == 0x02020100) +# ifndef __HP_TC1_MAKE_PAIR +# define __HP_TC1_MAKE_PAIR +# endif +# ifndef _HP_INSTANTIATE_STD2_VL +# define _HP_INSTANTIATE_STD2_VL +# endif +#endif + +#if _RWSTD_VER < 0x05000000 +# define BOOST_NO_CXX11_HDR_ARRAY +#endif +// type_traits header is incomplete: +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +// +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif diff --git a/contrib/src/boost/config/stdlib/sgi.hpp b/contrib/src/boost/config/stdlib/sgi.hpp new file mode 100644 index 0000000..c805271 --- /dev/null +++ b/contrib/src/boost/config/stdlib/sgi.hpp @@ -0,0 +1,158 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Jens Maurer 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// generic SGI STL: + +#if !defined(__STL_CONFIG_H) +# include +# if !defined(__STL_CONFIG_H) +# error "This is not the SGI STL!" +# endif +#endif + +// +// No std::iterator traits without partial specialisation: +// +#if !defined(__STL_CLASS_PARTIAL_SPECIALIZATION) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +// +// No std::stringstream with gcc < 3 +// +#if defined(__GNUC__) && (__GNUC__ < 3) && \ + ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) && \ + !defined(__STL_USE_NEW_IOSTREAMS) || \ + defined(__APPLE_CC__) + // Note that we only set this for GNU C++ prior to 2.95 since the + // latest patches for that release do contain a minimal + // If you are running a 2.95 release prior to 2.95.3 then this will need + // setting, but there is no way to detect that automatically (other + // than by running the configure script). + // Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't + // have . +# define BOOST_NO_STRINGSTREAM +#endif + +// Apple doesn't seem to reliably defined a *unix* macro +#if !defined(CYGWIN) && ( defined(__unix__) \ + || defined(__unix) \ + || defined(unix) \ + || defined(__APPLE__) \ + || defined(__APPLE) \ + || defined(APPLE)) +# include +#endif + + +// +// Assume no std::locale without own iostreams (this may be an +// incorrect assumption in some cases): +// +#if !defined(__SGI_STL_OWN_IOSTREAMS) && !defined(__STL_USE_NEW_IOSTREAMS) +# define BOOST_NO_STD_LOCALE +#endif + +// +// Original native SGI streams have non-standard std::messages facet: +// +#if defined(__sgi) && (_COMPILER_VERSION <= 650) && !defined(__SGI_STL_OWN_IOSTREAMS) +# define BOOST_NO_STD_LOCALE +#endif + +// +// SGI's new iostreams have missing "const" in messages<>::open +// +#if defined(__sgi) && (_COMPILER_VERSION <= 740) && defined(__STL_USE_NEW_IOSTREAMS) +# define BOOST_NO_STD_MESSAGES +#endif + +// +// No template iterator constructors, or std::allocator +// without member templates: +// +#if !defined(__STL_MEMBER_TEMPLATES) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# define BOOST_NO_STD_ALLOCATOR +#endif + +// +// We always have SGI style hash_set, hash_map, and slist: +// +#define BOOST_HAS_HASH +#define BOOST_HAS_SLIST + +// +// If this is GNU libstdc++2, then no and no std::wstring: +// +#if (defined(__GNUC__) && (__GNUC__ < 3)) +# include +# if defined(__BASTRING__) +# define BOOST_NO_LIMITS +// Note: will provide compile-time constants +# undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_NO_STD_WSTRING +# endif +#endif + +// +// There is no standard iterator unless we have namespace support: +// +#if !defined(__STL_USE_NAMESPACES) +# define BOOST_NO_STD_ITERATOR +#endif + +// +// Intrinsic type_traits support. +// The SGI STL has it's own __type_traits class, which +// has intrinsic compiler support with SGI's compilers. +// Whatever map SGI style type traits to boost equivalents: +// +#define BOOST_HAS_SGI_TYPE_TRAITS + +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +#define BOOST_STDLIB "SGI standard library" \ No newline at end of file diff --git a/contrib/src/boost/config/stdlib/stlport.hpp b/contrib/src/boost/config/stdlib/stlport.hpp new file mode 100644 index 0000000..bbc4176 --- /dev/null +++ b/contrib/src/boost/config/stdlib/stlport.hpp @@ -0,0 +1,248 @@ +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// STLPort standard library config: + +#if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) +# include +# if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) +# error "This is not STLPort!" +# endif +#endif + +// Apple doesn't seem to reliably defined a *unix* macro +#if !defined(CYGWIN) && ( defined(__unix__) \ + || defined(__unix) \ + || defined(unix) \ + || defined(__APPLE__) \ + || defined(__APPLE) \ + || defined(APPLE)) +# include +#endif + +// +// __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +// for versions prior to 4.1(beta) +// +#if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400) +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +#endif + +// +// If STLport thinks that there is no partial specialisation, then there is no +// std::iterator traits: +// +#if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION)) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +// +// No new style iostreams on GCC without STLport's iostreams enabled: +// +#if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS)) +# define BOOST_NO_STRINGSTREAM +#endif + +// +// No new iostreams implies no std::locale, and no std::stringstream: +// +#if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS) +# define BOOST_NO_STD_LOCALE +# define BOOST_NO_STRINGSTREAM +#endif + +// +// If the streams are not native, and we have a "using ::x" compiler bug +// then the io stream facets are not available in namespace std:: +// +#ifdef _STLPORT_VERSION +# if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) +# define BOOST_NO_STD_LOCALE +# endif +#else +# if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) +# define BOOST_NO_STD_LOCALE +# endif +#endif + +#if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520) +# define BOOST_HAS_TR1_UNORDERED_SET +# define BOOST_HAS_TR1_UNORDERED_MAP +#endif +// +// Without member template support enabled, their are no template +// iterate constructors, and no std::allocator: +// +#if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES)) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# define BOOST_NO_STD_ALLOCATOR +#endif +// +// however we always have at least a partial allocator: +// +#define BOOST_HAS_PARTIAL_STD_ALLOCATOR + +#if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) +# define BOOST_NO_STD_ALLOCATOR +#endif + +#if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) +# define BOOST_NO_STD_ALLOCATOR +#endif + +// +// If STLport thinks there is no wchar_t at all, then we have to disable +// the support for the relevant specilazations of std:: templates. +// +#if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT) +# ifndef BOOST_NO_STD_WSTRING +# define BOOST_NO_STD_WSTRING +# endif +# ifndef BOOST_NO_STD_WSTREAMBUF +# define BOOST_NO_STD_WSTREAMBUF +# endif +#endif + +// +// We always have SGI style hash_set, hash_map, and slist: +// +#ifndef _STLP_NO_EXTENSIONS +#define BOOST_HAS_HASH +#define BOOST_HAS_SLIST +#endif + +// +// STLport does a good job of importing names into namespace std::, +// but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our +// workaround does not conflict with STLports: +// +// +// Harold Howe says: +// Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with +// BCB6 does cause problems. If we detect C++ Builder, then don't define +// BOOST_NO_STDC_NAMESPACE +// +#if !defined(__BORLANDC__) && !defined(__DMC__) +// +// If STLport is using it's own namespace, and the real names are in +// the global namespace, then we duplicate STLport's using declarations +// (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't +// necessarily import all the names we need into namespace std:: +// +# if (defined(__STL_IMPORT_VENDOR_CSTD) \ + || defined(__STL_USE_OWN_NAMESPACE) \ + || defined(_STLP_IMPORT_VENDOR_CSTD) \ + || defined(_STLP_USE_OWN_NAMESPACE)) \ + && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD)) +# define BOOST_NO_STDC_NAMESPACE +# define BOOST_NO_EXCEPTION_STD_NAMESPACE +# endif +#elif defined(__BORLANDC__) && __BORLANDC__ < 0x560 +// STLport doesn't import std::abs correctly: +#include +namespace std { using ::abs; } +// and strcmp/strcpy don't get imported either ('cos they are macros) +#include +#ifdef strcpy +# undef strcpy +#endif +#ifdef strcmp +# undef strcmp +#endif +#ifdef _STLP_VENDOR_CSTD +namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; } +#endif +#endif + +// +// std::use_facet may be non-standard, uses a class instead: +// +#if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS) +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_STLP_USE_FACET +#endif + +// +// If STLport thinks there are no wide functions, etc. is not working; but +// only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import +// into std:: ourselves). +// +#if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE) +# define BOOST_NO_CWCHAR +# define BOOST_NO_CWCTYPE +#endif + +// +// If STLport for some reason was configured so that it thinks that wchar_t +// is not an intrinsic type, then we have to disable the support for it as +// well (we would be missing required specializations otherwise). +// +#if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT) +# undef BOOST_NO_INTRINSIC_WCHAR_T +# define BOOST_NO_INTRINSIC_WCHAR_T +#endif + +// +// Borland ships a version of STLport with C++ Builder 6 that lacks +// hashtables and the like: +// +#if defined(__BORLANDC__) && (__BORLANDC__ == 0x560) +# undef BOOST_HAS_HASH +#endif + +// +// gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max +// +#if defined(__GNUC__) && (__GNUC__ < 3) +# include // for std::min and std::max +# define BOOST_USING_STD_MIN() ((void)0) +# define BOOST_USING_STD_MAX() ((void)0) +namespace boost { using std::min; using std::max; } +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) diff --git a/contrib/src/boost/config/stdlib/vacpp.hpp b/contrib/src/boost/config/stdlib/vacpp.hpp new file mode 100644 index 0000000..4ccd0d2 --- /dev/null +++ b/contrib/src/boost/config/stdlib/vacpp.hpp @@ -0,0 +1,64 @@ +// (C) Copyright John Maddock 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +#if __IBMCPP__ <= 501 +# define BOOST_NO_STD_ALLOCATOR +#endif + +#define BOOST_HAS_MACRO_USE_FACET +#define BOOST_NO_STD_MESSAGES + +// Apple doesn't seem to reliably defined a *unix* macro +#if !defined(CYGWIN) && ( defined(__unix__) \ + || defined(__unix) \ + || defined(unix) \ + || defined(__APPLE__) \ + || defined(__APPLE) \ + || defined(APPLE)) +# include +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +#define BOOST_STDLIB "Visual Age default standard library" diff --git a/contrib/src/boost/config/suffix.hpp b/contrib/src/boost/config/suffix.hpp new file mode 100644 index 0000000..17bf102 --- /dev/null +++ b/contrib/src/boost/config/suffix.hpp @@ -0,0 +1,1007 @@ +// Boost config.hpp configuration header file ------------------------------// +// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file + +// Copyright (c) 2001-2003 John Maddock +// Copyright (c) 2001 Darin Adler +// Copyright (c) 2001 Peter Dimov +// Copyright (c) 2002 Bill Kempf +// Copyright (c) 2002 Jens Maurer +// Copyright (c) 2002-2003 David Abrahams +// Copyright (c) 2003 Gennaro Prota +// Copyright (c) 2003 Eric Friedman +// Copyright (c) 2010 Eric Jourdanneau, Joel Falcou +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for most recent version. + +// Boost config.hpp policy and rationale documentation has been moved to +// http://www.boost.org/libs/config/ +// +// This file is intended to be stable, and relatively unchanging. +// It should contain boilerplate code only - no compiler specific +// code unless it is unavoidable - no changes unless unavoidable. + +#ifndef BOOST_CONFIG_SUFFIX_HPP +#define BOOST_CONFIG_SUFFIX_HPP + +#if defined(__GNUC__) && (__GNUC__ >= 4) +// +// Some GCC-4.x versions issue warnings even when __extension__ is used, +// so use this as a workaround: +// +#pragma GCC system_header +#endif + +// +// ensure that visibility macros are always defined, thus symplifying use +// +#ifndef BOOST_SYMBOL_EXPORT +# define BOOST_SYMBOL_EXPORT +#endif +#ifndef BOOST_SYMBOL_IMPORT +# define BOOST_SYMBOL_IMPORT +#endif +#ifndef BOOST_SYMBOL_VISIBLE +# define BOOST_SYMBOL_VISIBLE +#endif + +// +// look for long long by looking for the appropriate macros in . +// Note that we use limits.h rather than climits for maximal portability, +// remember that since these just declare a bunch of macros, there should be +// no namespace issues from this. +// +#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \ + && !defined(BOOST_MSVC) && !defined(__BORLANDC__) +# include +# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) +# define BOOST_HAS_LONG_LONG +# else +# define BOOST_NO_LONG_LONG +# endif +#endif + +// GCC 3.x will clean up all of those nasty macro definitions that +// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine +// it under GCC 3.x. +#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS) +# undef BOOST_NO_CTYPE_FUNCTIONS +#endif + +// +// Assume any extensions are in namespace std:: unless stated otherwise: +// +# ifndef BOOST_STD_EXTENSION_NAMESPACE +# define BOOST_STD_EXTENSION_NAMESPACE std +# endif + +// +// If cv-qualified specializations are not allowed, then neither are cv-void ones: +// +# if defined(BOOST_NO_CV_SPECIALIZATIONS) \ + && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) +# define BOOST_NO_CV_VOID_SPECIALIZATIONS +# endif + +// +// If there is no numeric_limits template, then it can't have any compile time +// constants either! +// +# if defined(BOOST_NO_LIMITS) \ + && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS +# endif + +// +// if there is no long long then there is no specialisation +// for numeric_limits either: +// +#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS) +# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS +#endif + +// +// if there is no __int64 then there is no specialisation +// for numeric_limits<__int64> either: +// +#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS) +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +#endif + +// +// if member templates are supported then so is the +// VC6 subset of member templates: +// +# if !defined(BOOST_NO_MEMBER_TEMPLATES) \ + && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) +# define BOOST_MSVC6_MEMBER_TEMPLATES +# endif + +// +// Without partial specialization, can't test for partial specialisation bugs: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) +# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG +# endif + +// +// Without partial specialization, we can't have array-type partial specialisations: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS +# endif + +// +// Without partial specialization, std::iterator_traits can't work: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_NO_STD_ITERATOR_TRAITS) +# define BOOST_NO_STD_ITERATOR_TRAITS +# endif + +// +// Without partial specialization, partial +// specialization with default args won't work either: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) +# define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS +# endif + +// +// Without member template support, we can't have template constructors +// in the standard library either: +// +# if defined(BOOST_NO_MEMBER_TEMPLATES) \ + && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ + && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# endif + +// +// Without member template support, we can't have a conforming +// std::allocator template either: +// +# if defined(BOOST_NO_MEMBER_TEMPLATES) \ + && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ + && !defined(BOOST_NO_STD_ALLOCATOR) +# define BOOST_NO_STD_ALLOCATOR +# endif + +// +// without ADL support then using declarations will break ADL as well: +// +#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#endif + +// +// Without typeid support we have no dynamic RTTI either: +// +#if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + +// +// If we have a standard allocator, then we have a partial one as well: +// +#if !defined(BOOST_NO_STD_ALLOCATOR) +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +#endif + +// +// We can't have a working std::use_facet if there is no std::locale: +// +# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET) +# define BOOST_NO_STD_USE_FACET +# endif + +// +// We can't have a std::messages facet if there is no std::locale: +// +# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES) +# define BOOST_NO_STD_MESSAGES +# endif + +// +// We can't have a working std::wstreambuf if there is no std::locale: +// +# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF) +# define BOOST_NO_STD_WSTREAMBUF +# endif + +// +// We can't have a if there is no : +// +# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE) +# define BOOST_NO_CWCTYPE +# endif + +// +// We can't have a swprintf if there is no : +// +# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF) +# define BOOST_NO_SWPRINTF +# endif + +// +// If Win32 support is turned off, then we must turn off +// threading support also, unless there is some other +// thread API enabled: +// +#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \ + && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS) +# define BOOST_DISABLE_THREADS +#endif + +// +// Turn on threading support if the compiler thinks that it's in +// multithreaded mode. We put this here because there are only a +// limited number of macros that identify this (if there's any missing +// from here then add to the appropriate compiler section): +// +#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \ + || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \ + && !defined(BOOST_HAS_THREADS) +# define BOOST_HAS_THREADS +#endif + +// +// Turn threading support off if BOOST_DISABLE_THREADS is defined: +// +#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS) +# undef BOOST_HAS_THREADS +#endif + +// +// Turn threading support off if we don't recognise the threading API: +// +#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\ + && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\ + && !defined(BOOST_HAS_MPTASKS) +# undef BOOST_HAS_THREADS +#endif + +// +// Turn threading detail macros off if we don't (want to) use threading +// +#ifndef BOOST_HAS_THREADS +# undef BOOST_HAS_PTHREADS +# undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# undef BOOST_HAS_PTHREAD_YIELD +# undef BOOST_HAS_PTHREAD_DELAY_NP +# undef BOOST_HAS_WINTHREADS +# undef BOOST_HAS_BETHREADS +# undef BOOST_HAS_MPTASKS +#endif + +// +// If the compiler claims to be C99 conformant, then it had better +// have a : +// +# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) +# define BOOST_HAS_STDINT_H +# ifndef BOOST_HAS_LOG1P +# define BOOST_HAS_LOG1P +# endif +# ifndef BOOST_HAS_EXPM1 +# define BOOST_HAS_EXPM1 +# endif +# endif + +// +// Define BOOST_NO_SLIST and BOOST_NO_HASH if required. +// Note that this is for backwards compatibility only. +// +# if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST) +# define BOOST_NO_SLIST +# endif + +# if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH) +# define BOOST_NO_HASH +# endif + +// +// Set BOOST_SLIST_HEADER if not set already: +// +#if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER) +# define BOOST_SLIST_HEADER +#endif + +// +// Set BOOST_HASH_SET_HEADER if not set already: +// +#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER) +# define BOOST_HASH_SET_HEADER +#endif + +// +// Set BOOST_HASH_MAP_HEADER if not set already: +// +#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER) +# define BOOST_HASH_MAP_HEADER +#endif + +// BOOST_HAS_ABI_HEADERS +// This macro gets set if we have headers that fix the ABI, +// and prevent ODR violations when linking to external libraries: +#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS) +# define BOOST_HAS_ABI_HEADERS +#endif + +#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS) +# undef BOOST_HAS_ABI_HEADERS +#endif + +// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------// +// Because std::size_t usage is so common, even in boost headers which do not +// otherwise use the C library, the workaround is included here so +// that ugly workaround code need not appear in many other boost headers. +// NOTE WELL: This is a workaround for non-conforming compilers; +// must still be #included in the usual places so that inclusion +// works as expected with standard conforming compilers. The resulting +// double inclusion of is harmless. + +# if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus) +# include + namespace std { using ::ptrdiff_t; using ::size_t; } +# endif + +// Workaround for the unfortunate min/max macros defined by some platform headers + +#define BOOST_PREVENT_MACRO_SUBSTITUTION + +#ifndef BOOST_USING_STD_MIN +# define BOOST_USING_STD_MIN() using std::min +#endif + +#ifndef BOOST_USING_STD_MAX +# define BOOST_USING_STD_MAX() using std::max +#endif + +// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------// + +# if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus) + +namespace std { + template + inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { + return __b < __a ? __b : __a; + } + template + inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { + return __a < __b ? __b : __a; + } +} + +# endif + +// BOOST_STATIC_CONSTANT workaround --------------------------------------- // +// On compilers which don't allow in-class initialization of static integral +// constant members, we must use enums as a workaround if we want the constants +// to be available at compile-time. This macro gives us a convenient way to +// declare such constants. + +# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment } +# else +# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment +# endif + +// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------// +// When the standard library does not have a conforming std::use_facet there +// are various workarounds available, but they differ from library to library. +// The same problem occurs with has_facet. +// These macros provide a consistent way to access a locale's facets. +// Usage: +// replace +// std::use_facet(loc); +// with +// BOOST_USE_FACET(Type, loc); +// Note do not add a std:: prefix to the front of BOOST_USE_FACET! +// Use for BOOST_HAS_FACET is analogous. + +#if defined(BOOST_NO_STD_USE_FACET) +# ifdef BOOST_HAS_TWO_ARG_USE_FACET +# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast(0)) +# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast(0)) +# elif defined(BOOST_HAS_MACRO_USE_FACET) +# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type) +# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type) +# elif defined(BOOST_HAS_STLP_USE_FACET) +# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet(loc)) +# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) +# endif +#else +# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc) +# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) +#endif + +// BOOST_NESTED_TEMPLATE workaround ------------------------------------------// +// Member templates are supported by some compilers even though they can't use +// the A::template member syntax, as a workaround replace: +// +// typedef typename A::template rebind binder; +// +// with: +// +// typedef typename A::BOOST_NESTED_TEMPLATE rebind binder; + +#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD +# define BOOST_NESTED_TEMPLATE template +#else +# define BOOST_NESTED_TEMPLATE +#endif + +// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------// +// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION +// is defined, in which case it evaluates to return x; Use when you have a return +// statement that can never be reached. + +#ifndef BOOST_UNREACHABLE_RETURN +# ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION +# define BOOST_UNREACHABLE_RETURN(x) return x; +# else +# define BOOST_UNREACHABLE_RETURN(x) +# endif +#endif + +// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------// +// +// Some compilers don't support the use of `typename' for dependent +// types in deduced contexts, e.g. +// +// template void f(T, typename T::type); +// ^^^^^^^^ +// Replace these declarations with: +// +// template void f(T, BOOST_DEDUCED_TYPENAME T::type); + +#ifndef BOOST_NO_DEDUCED_TYPENAME +# define BOOST_DEDUCED_TYPENAME typename +#else +# define BOOST_DEDUCED_TYPENAME +#endif + +#ifndef BOOST_NO_TYPENAME_WITH_CTOR +# define BOOST_CTOR_TYPENAME typename +#else +# define BOOST_CTOR_TYPENAME +#endif + +// long long workaround ------------------------------------------// +// On gcc (and maybe other compilers?) long long is alway supported +// but it's use may generate either warnings (with -ansi), or errors +// (with -pedantic -ansi) unless it's use is prefixed by __extension__ +// +#if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus) +namespace boost{ +# ifdef __GNUC__ + __extension__ typedef long long long_long_type; + __extension__ typedef unsigned long long ulong_long_type; +# else + typedef long long long_long_type; + typedef unsigned long long ulong_long_type; +# endif +} +#endif +// same again for __int128: +#if defined(BOOST_HAS_INT128) && defined(__cplusplus) +namespace boost{ +# ifdef __GNUC__ + __extension__ typedef __int128 int128_type; + __extension__ typedef unsigned __int128 uint128_type; +# else + typedef __int128 int128_type; + typedef unsigned __int128 uint128_type; +# endif +} +#endif +// same again for __float128: +#if defined(BOOST_HAS_FLOAT128) && defined(__cplusplus) +namespace boost { +# ifdef __GNUC__ + __extension__ typedef __float128 float128_type; +# else + typedef __float128 float128_type; +# endif +} +#endif + +// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// + +// These macros are obsolete. Port away and remove. + +# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) +# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) +# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) +# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) + +# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) + +// When BOOST_NO_STD_TYPEINFO is defined, we can just import +// the global definition into std namespace: +#if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus) +#include +namespace std{ using ::type_info; } +#endif + +// ---------------------------------------------------------------------------// + +// +// Helper macro BOOST_STRINGIZE: +// Converts the parameter X to a string after macro replacement +// on X has been performed. +// +#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) +#define BOOST_DO_STRINGIZE(X) #X + +// +// Helper macro BOOST_JOIN: +// The following piece of macro magic joins the two +// arguments together, even when one of the arguments is +// itself a macro (see 16.3.1 in C++ standard). The key +// is that macro expansion of macro arguments does not +// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN. +// +#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y ) +#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y) +#define BOOST_DO_JOIN2( X, Y ) X##Y + +// +// Set some default values for compiler/library/platform names. +// These are for debugging config setup only: +// +# ifndef BOOST_COMPILER +# define BOOST_COMPILER "Unknown ISO C++ Compiler" +# endif +# ifndef BOOST_STDLIB +# define BOOST_STDLIB "Unknown ISO standard library" +# endif +# ifndef BOOST_PLATFORM +# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \ + || defined(_POSIX_SOURCE) +# define BOOST_PLATFORM "Generic Unix" +# else +# define BOOST_PLATFORM "Unknown" +# endif +# endif + +// +// Set some default values GPU support +// +# ifndef BOOST_GPU_ENABLED +# define BOOST_GPU_ENABLED +# endif + +// BOOST_FORCEINLINE ---------------------------------------------// +// Macro to use in place of 'inline' to force a function to be inline +#if !defined(BOOST_FORCEINLINE) +# if defined(_MSC_VER) +# define BOOST_FORCEINLINE __forceinline +# elif defined(__GNUC__) && __GNUC__ > 3 + // Clang also defines __GNUC__ (as 4) +# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__)) +# else +# define BOOST_FORCEINLINE inline +# endif +#endif + +// BOOST_NOINLINE ---------------------------------------------// +// Macro to use in place of 'inline' to prevent a function to be inlined +#if !defined(BOOST_NOINLINE) +# if defined(_MSC_VER) +# define BOOST_NOINLINE __declspec(noinline) +# elif defined(__GNUC__) && __GNUC__ > 3 + // Clang also defines __GNUC__ (as 4) +# if defined(__CUDACC__) + // nvcc doesn't always parse __noinline__, + // see: https://svn.boost.org/trac/boost/ticket/9392 +# define BOOST_NOINLINE __attribute__ ((noinline)) +# else +# define BOOST_NOINLINE __attribute__ ((__noinline__)) +# endif +# else +# define BOOST_NOINLINE +# endif +#endif + +// BOOST_NORETURN ---------------------------------------------// +// Macro to use before a function declaration/definition to designate +// the function as not returning normally (i.e. with a return statement +// or by leaving the function scope, if the function return type is void). +#if !defined(BOOST_NORETURN) +# if defined(_MSC_VER) +# define BOOST_NORETURN __declspec(noreturn) +# elif defined(__GNUC__) +# define BOOST_NORETURN __attribute__ ((__noreturn__)) +# else +# define BOOST_NO_NORETURN +# define BOOST_NORETURN +# endif +#endif + +// Branch prediction hints +// These macros are intended to wrap conditional expressions that yield true or false +// +// if (BOOST_LIKELY(var == 10)) +// { +// // the most probable code here +// } +// +#if !defined(BOOST_LIKELY) +# define BOOST_LIKELY(x) x +#endif +#if !defined(BOOST_UNLIKELY) +# define BOOST_UNLIKELY(x) x +#endif + +// Type and data alignment specification +// +#if !defined(BOOST_NO_CXX11_ALIGNAS) +# define BOOST_ALIGNMENT(x) alignas(x) +#elif defined(_MSC_VER) +# define BOOST_ALIGNMENT(x) __declspec(align(x)) +#elif defined(__GNUC__) +# define BOOST_ALIGNMENT(x) __attribute__ ((__aligned__(x))) +#else +# define BOOST_NO_ALIGNMENT +# define BOOST_ALIGNMENT(x) +#endif + +// Lack of non-public defaulted functions is implied by the lack of any defaulted functions +#if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) +# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS +#endif + +// Defaulted and deleted function declaration helpers +// These macros are intended to be inside a class definition. +// BOOST_DEFAULTED_FUNCTION accepts the function declaration and its +// body, which will be used if the compiler doesn't support defaulted functions. +// BOOST_DELETED_FUNCTION only accepts the function declaration. It +// will expand to a private function declaration, if the compiler doesn't support +// deleted functions. Because of this it is recommended to use BOOST_DELETED_FUNCTION +// in the end of the class definition. +// +// class my_class +// { +// public: +// // Default-constructible +// BOOST_DEFAULTED_FUNCTION(my_class(), {}) +// // Copying prohibited +// BOOST_DELETED_FUNCTION(my_class(my_class const&)) +// BOOST_DELETED_FUNCTION(my_class& operator= (my_class const&)) +// }; +// +#if !(defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)) +# define BOOST_DEFAULTED_FUNCTION(fun, body) fun = default; +#else +# define BOOST_DEFAULTED_FUNCTION(fun, body) fun body +#endif + +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) +# define BOOST_DELETED_FUNCTION(fun) fun = delete; +#else +# define BOOST_DELETED_FUNCTION(fun) private: fun; +#endif + +// +// Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined +// +#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276) +#define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE +#endif + +// -------------------- Deprecated macros for 1.50 --------------------------- +// These will go away in a future release + +// Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP +// instead of BOOST_NO_STD_UNORDERED +#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET) +# ifndef BOOST_NO_CXX11_STD_UNORDERED +# define BOOST_NO_CXX11_STD_UNORDERED +# endif +#endif + +// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS +#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS) +# define BOOST_NO_INITIALIZER_LISTS +#endif + +// Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY +#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_0X_HDR_ARRAY) +# define BOOST_NO_0X_HDR_ARRAY +#endif +// Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO +#if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO) +# define BOOST_NO_0X_HDR_CHRONO +#endif +// Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT +#if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT) +# define BOOST_NO_0X_HDR_CODECVT +#endif +// Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE +#if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE) +# define BOOST_NO_0X_HDR_CONDITION_VARIABLE +#endif +// Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST +#if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST) +# define BOOST_NO_0X_HDR_FORWARD_LIST +#endif +// Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE +#if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE) +# define BOOST_NO_0X_HDR_FUTURE +#endif + +// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST +// instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS +#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST +# define BOOST_NO_0X_HDR_INITIALIZER_LIST +# endif +# ifndef BOOST_NO_INITIALIZER_LISTS +# define BOOST_NO_INITIALIZER_LISTS +# endif +#endif + +// Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX +#if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX) +# define BOOST_NO_0X_HDR_MUTEX +#endif +// Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM +#if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM) +# define BOOST_NO_0X_HDR_RANDOM +#endif +// Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO +#if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO) +# define BOOST_NO_0X_HDR_RATIO +#endif +// Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX +#if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX) +# define BOOST_NO_0X_HDR_REGEX +#endif +// Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR +#if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR) +# define BOOST_NO_0X_HDR_SYSTEM_ERROR +#endif +// Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD +#if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD) +# define BOOST_NO_0X_HDR_THREAD +#endif +// Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE +#if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE) +# define BOOST_NO_0X_HDR_TUPLE +#endif +// Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS +#if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS) +# define BOOST_NO_0X_HDR_TYPE_TRAITS +#endif +// Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX +#if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX) +# define BOOST_NO_0X_HDR_TYPEINDEX +#endif +// Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP +#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP) +# define BOOST_NO_0X_HDR_UNORDERED_MAP +#endif +// Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET +#if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET) +# define BOOST_NO_0X_HDR_UNORDERED_SET +#endif + +// ------------------ End of deprecated macros for 1.50 --------------------------- + +// -------------------- Deprecated macros for 1.51 --------------------------- +// These will go away in a future release + +// Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS +#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS) +# define BOOST_NO_AUTO_DECLARATIONS +#endif +// Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS +#if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS) +# define BOOST_NO_AUTO_MULTIDECLARATIONS +#endif +// Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T +#if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T) +# define BOOST_NO_CHAR16_T +#endif +// Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T +#if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T) +# define BOOST_NO_CHAR32_T +#endif +// Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES +#if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES) +# define BOOST_NO_TEMPLATE_ALIASES +#endif +// Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR +#if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR) +# define BOOST_NO_CONSTEXPR +#endif +// Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276 +#if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276) +# define BOOST_NO_DECLTYPE_N3276 +#endif +// Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE +#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE) +# define BOOST_NO_DECLTYPE +#endif +// Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS +#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS) +# define BOOST_NO_DEFAULTED_FUNCTIONS +#endif +// Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS +#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS) +# define BOOST_NO_DELETED_FUNCTIONS +#endif +// Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS) +# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#endif +// Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE +#if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE) +# define BOOST_NO_EXTERN_TEMPLATE +#endif +// Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS) +# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#endif +// Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS +#if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS) +# define BOOST_NO_LAMBDAS +#endif +// Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS +#if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS) +# define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS +#endif +// Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT +#if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT) +# define BOOST_NO_NOEXCEPT +#endif +// Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR +#if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR) +# define BOOST_NO_NULLPTR +#endif +// Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS +#if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS) +# define BOOST_NO_RAW_LITERALS +#endif +// Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES) +# define BOOST_NO_RVALUE_REFERENCES +#endif +// Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS +#if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS) +# define BOOST_NO_SCOPED_ENUMS +#endif +// Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT +#if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT) +# define BOOST_NO_STATIC_ASSERT +#endif +// Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED +#if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED) +# define BOOST_NO_STD_UNORDERED +#endif +// Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS +#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS) +# define BOOST_NO_UNICODE_LITERALS +#endif +// Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX +#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX) +# define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX +#endif +// Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES) +# define BOOST_NO_VARIADIC_TEMPLATES +#endif +// Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS +#if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS) +# define BOOST_NO_VARIADIC_MACROS +#endif +// Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST +#if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST) +# define BOOST_NO_NUMERIC_LIMITS_LOWEST +#endif +// ------------------ End of deprecated macros for 1.51 --------------------------- + + + +// +// Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR +// These aid the transition to C++11 while still supporting C++03 compilers +// +#ifdef BOOST_NO_CXX11_NOEXCEPT +# define BOOST_NOEXCEPT +# define BOOST_NOEXCEPT_OR_NOTHROW throw() +# define BOOST_NOEXCEPT_IF(Predicate) +# define BOOST_NOEXCEPT_EXPR(Expression) false +#else +# define BOOST_NOEXCEPT noexcept +# define BOOST_NOEXCEPT_OR_NOTHROW noexcept +# define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate)) +# define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression)) +#endif +// +// Helper macro BOOST_FALLTHROUGH +// Fallback definition of BOOST_FALLTHROUGH macro used to mark intended +// fall-through between case labels in a switch statement. We use a definition +// that requires a semicolon after it to avoid at least one type of misuse even +// on unsupported compilers. +// +#ifndef BOOST_FALLTHROUGH +# define BOOST_FALLTHROUGH ((void)0) +#endif + +// +// constexpr workarounds +// +#if defined(BOOST_NO_CXX11_CONSTEXPR) +#define BOOST_CONSTEXPR +#define BOOST_CONSTEXPR_OR_CONST const +#else +#define BOOST_CONSTEXPR constexpr +#define BOOST_CONSTEXPR_OR_CONST constexpr +#endif +#if defined(BOOST_NO_CXX14_CONSTEXPR) +#define BOOST_CXX14_CONSTEXPR +#else +#define BOOST_CXX14_CONSTEXPR constexpr +#endif + +// +// Unused variable/typedef workarounds: +// +#ifndef BOOST_ATTRIBUTE_UNUSED +# define BOOST_ATTRIBUTE_UNUSED +#endif + +#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST + +// +// Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined +// +#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT) +# define BOOST_HAS_STATIC_ASSERT +#endif + +// +// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined +// +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS) +#define BOOST_HAS_RVALUE_REFS +#endif + +// +// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined +// +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL) +#define BOOST_HAS_VARIADIC_TMPL +#endif +// +// Set BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS when +// BOOST_NO_CXX11_VARIADIC_TEMPLATES is set: +// +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS) +# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +#endif + +// +// Finish off with checks for macros that are depricated / no longer supported, +// if any of these are set then it's very likely that much of Boost will no +// longer work. So stop with a #error for now, but give the user a chance +// to continue at their own risk if they really want to: +// +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONFIG_ALLOW_DEPRECATED) +# error "You are using a compiler which lacks features which are now a minimum requirement in order to use Boost, define BOOST_CONFIG_ALLOW_DEPRECATED if you want to continue at your own risk!!!" +#endif + +#endif diff --git a/contrib/src/boost/config/user.hpp b/contrib/src/boost/config/user.hpp new file mode 100644 index 0000000..28e7476 --- /dev/null +++ b/contrib/src/boost/config/user.hpp @@ -0,0 +1,133 @@ +// boost/config/user.hpp ---------------------------------------------------// + +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Do not check in modified versions of this file, +// This file may be customized by the end user, but not by boost. + +// +// Use this file to define a site and compiler specific +// configuration policy: +// + +// define this to locate a compiler config file: +// #define BOOST_COMPILER_CONFIG + +// define this to locate a stdlib config file: +// #define BOOST_STDLIB_CONFIG + +// define this to locate a platform config file: +// #define BOOST_PLATFORM_CONFIG + +// define this to disable compiler config, +// use if your compiler config has nothing to set: +// #define BOOST_NO_COMPILER_CONFIG + +// define this to disable stdlib config, +// use if your stdlib config has nothing to set: +// #define BOOST_NO_STDLIB_CONFIG + +// define this to disable platform config, +// use if your platform config has nothing to set: +// #define BOOST_NO_PLATFORM_CONFIG + +// define this to disable all config options, +// excluding the user config. Use if your +// setup is fully ISO compliant, and has no +// useful extensions, or for autoconf generated +// setups: +// #define BOOST_NO_CONFIG + +// define this to make the config "optimistic" +// about unknown compiler versions. Normally +// unknown compiler versions are assumed to have +// all the defects of the last known version, however +// setting this flag, causes the config to assume +// that unknown compiler versions are fully conformant +// with the standard: +// #define BOOST_STRICT_CONFIG + +// define this to cause the config to halt compilation +// with an #error if it encounters anything unknown -- +// either an unknown compiler version or an unknown +// compiler/platform/library: +// #define BOOST_ASSERT_CONFIG + + +// define if you want to disable threading support, even +// when available: +// #define BOOST_DISABLE_THREADS + +// define when you want to disable Win32 specific features +// even when available: +// #define BOOST_DISABLE_WIN32 + +// BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any +// prefix/suffix headers that normally control things like struct +// packing and alignment. +// #define BOOST_DISABLE_ABI_HEADERS + +// BOOST_ABI_PREFIX: A prefix header to include in place of whatever +// boost.config would normally select, any replacement should set up +// struct packing and alignment options as required. +// #define BOOST_ABI_PREFIX my-header-name + +// BOOST_ABI_SUFFIX: A suffix header to include in place of whatever +// boost.config would normally select, any replacement should undo +// the effects of the prefix header. +// #define BOOST_ABI_SUFFIX my-header-name + +// BOOST_ALL_DYN_LINK: Forces all libraries that have separate source, +// to be linked as dll's rather than static libraries on Microsoft Windows +// (this macro is used to turn on __declspec(dllimport) modifiers, so that +// the compiler knows which symbols to look for in a dll rather than in a +// static library). Note that there may be some libraries that can only +// be linked in one way (statically or dynamically), in these cases this +// macro has no effect. +// #define BOOST_ALL_DYN_LINK + +// BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll +// rather than a static library on Microsoft Windows: replace the WHATEVER +// part of the macro name with the name of the library that you want to +// dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or +// BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport) +// modifiers, so that the compiler knows which symbols to look for in a dll +// rather than in a static library). +// Note that there may be some libraries that can only +// be linked in one way (statically or dynamically), +// in these cases this macro is unsupported. +// #define BOOST_WHATEVER_DYN_LINK + +// BOOST_ALL_NO_LIB: Tells the config system not to automatically select +// which libraries to link against. +// Normally if a compiler supports #pragma lib, then the correct library +// build variant will be automatically selected and linked against, +// simply by the act of including one of that library's headers. +// This macro turns that feature off. +// #define BOOST_ALL_NO_LIB + +// BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically +// select which library to link against for library "whatever", +// replace WHATEVER in the macro name with the name of the library; +// for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB. +// Normally if a compiler supports #pragma lib, then the correct library +// build variant will be automatically selected and linked against, simply +// by the act of including one of that library's headers. This macro turns +// that feature off. +// #define BOOST_WHATEVER_NO_LIB + +// BOOST_LIB_BUILDID: Set to the same value as the value passed to Boost.Build's +// --buildid command line option. For example if you built using: +// +// bjam address-model=64 --buildid=amd64 +// +// then compile your code with: +// +// -DBOOST_LIB_BUILDID = amd64 +// +// to ensure the correct libraries are selected at link time. +// #define BOOST_LIB_BUILDID amd64 + diff --git a/contrib/src/boost/config/warning_disable.hpp b/contrib/src/boost/config/warning_disable.hpp new file mode 100644 index 0000000..fea8e82 --- /dev/null +++ b/contrib/src/boost/config/warning_disable.hpp @@ -0,0 +1,47 @@ +// Copyright John Maddock 2008 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// This file exists to turn off some overly-pedantic warning emitted +// by certain compilers. You should include this header only in: +// +// * A test case, before any other headers, or, +// * A library source file before any other headers. +// +// IT SHOULD NOT BE INCLUDED BY ANY BOOST HEADER. +// +// YOU SHOULD NOT INCLUDE IT IF YOU CAN REASONABLY FIX THE WARNING. +// +// The only warnings disabled here are those that are: +// +// * Quite unreasonably pedantic. +// * Generally only emitted by a single compiler. +// * Can't easily be fixed: for example if the vendors own std lib +// code emits these warnings! +// +// Note that THIS HEADER MUST NOT INCLUDE ANY OTHER HEADERS: +// not even std library ones! Doing so may turn the warning +// off too late to be of any use. For example the VC++ C4996 +// warning can be emitted from if that header is included +// before or by this one :-( +// + +#ifndef BOOST_CONFIG_WARNING_DISABLE_HPP +#define BOOST_CONFIG_WARNING_DISABLE_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1400) + // Error 'function': was declared deprecated + // http://msdn2.microsoft.com/en-us/library/ttcz0bys(VS.80).aspx + // This error is emitted when you use some perfectly conforming + // std lib functions in a perfectly correct way, and also by + // some of Microsoft's own std lib code ! +# pragma warning(disable:4996) +#endif +#if defined(__INTEL_COMPILER) || defined(__ICL) + // As above: gives warning when a "deprecated" + // std library function is encountered. +# pragma warning(disable:1786) +#endif + +#endif // BOOST_CONFIG_WARNING_DISABLE_HPP diff --git a/contrib/src/boost/core/addressof.hpp b/contrib/src/boost/core/addressof.hpp new file mode 100644 index 0000000..889b582 --- /dev/null +++ b/contrib/src/boost/core/addressof.hpp @@ -0,0 +1,162 @@ +// Copyright (C) 2002 Brad King (brad.king@kitware.com) +// Douglas Gregor (gregod@cs.rpi.edu) +// +// Copyright (C) 2002, 2008, 2013 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#ifndef BOOST_CORE_ADDRESSOF_HPP +#define BOOST_CORE_ADDRESSOF_HPP + +# include +# include +# include + +namespace boost +{ + +namespace detail +{ + +template struct addr_impl_ref +{ + T & v_; + + BOOST_FORCEINLINE addr_impl_ref( T & v ): v_( v ) {} + BOOST_FORCEINLINE operator T& () const { return v_; } + +private: + addr_impl_ref & operator=(const addr_impl_ref &); +}; + +template struct addressof_impl +{ + static BOOST_FORCEINLINE T * f( T & v, long ) + { + return reinterpret_cast( + &const_cast(reinterpret_cast(v))); + } + + static BOOST_FORCEINLINE T * f( T * v, int ) + { + return v; + } +}; + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +#if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) ) + + typedef decltype(nullptr) addr_nullptr_t; + +#else + + typedef std::nullptr_t addr_nullptr_t; + +#endif + +template<> struct addressof_impl< addr_nullptr_t > +{ + typedef addr_nullptr_t T; + + static BOOST_FORCEINLINE T * f( T & v, int ) + { + return &v; + } +}; + +template<> struct addressof_impl< addr_nullptr_t const > +{ + typedef addr_nullptr_t const T; + + static BOOST_FORCEINLINE T * f( T & v, int ) + { + return &v; + } +}; + +template<> struct addressof_impl< addr_nullptr_t volatile > +{ + typedef addr_nullptr_t volatile T; + + static BOOST_FORCEINLINE T * f( T & v, int ) + { + return &v; + } +}; + +template<> struct addressof_impl< addr_nullptr_t const volatile > +{ + typedef addr_nullptr_t const volatile T; + + static BOOST_FORCEINLINE T * f( T & v, int ) + { + return &v; + } +}; + +#endif + +} // namespace detail + +template +BOOST_FORCEINLINE +T * addressof( T & v ) +{ +#if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120)) + + return boost::detail::addressof_impl::f( v, 0 ); + +#else + + return boost::detail::addressof_impl::f( boost::detail::addr_impl_ref( v ), 0 ); + +#endif +} + +#if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) ) + +namespace detail +{ + +template struct addressof_addp +{ + typedef T * type; +}; + +} // namespace detail + +template< class T, std::size_t N > +BOOST_FORCEINLINE +typename detail::addressof_addp< T[N] >::type addressof( T (&t)[N] ) +{ + return &t; +} + +#endif + +// Borland doesn't like casting an array reference to a char reference +// but these overloads work around the problem. +#if defined( __BORLANDC__ ) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +template +BOOST_FORCEINLINE +T (*addressof(T (&t)[N]))[N] +{ + return reinterpret_cast(&t); +} + +template +BOOST_FORCEINLINE +const T (*addressof(const T (&t)[N]))[N] +{ + return reinterpret_cast(&t); +} +#endif + +} // namespace boost + +#endif // BOOST_CORE_ADDRESSOF_HPP diff --git a/contrib/src/boost/core/checked_delete.hpp b/contrib/src/boost/core/checked_delete.hpp new file mode 100644 index 0000000..b086e03 --- /dev/null +++ b/contrib/src/boost/core/checked_delete.hpp @@ -0,0 +1,69 @@ +#ifndef BOOST_CORE_CHECKED_DELETE_HPP +#define BOOST_CORE_CHECKED_DELETE_HPP + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/checked_delete.hpp +// +// Copyright (c) 2002, 2003 Peter Dimov +// Copyright (c) 2003 Daniel Frey +// Copyright (c) 2003 Howard Hinnant +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/core/doc/html/core/checked_delete.html for documentation. +// + +namespace boost +{ + +// verify that types are complete for increased safety + +template inline void checked_delete(T * x) +{ + // intentionally complex - simplification causes regressions + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete x; +} + +template inline void checked_array_delete(T * x) +{ + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete [] x; +} + +template struct checked_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const + { + // boost:: disables ADL + boost::checked_delete(x); + } +}; + +template struct checked_array_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const + { + boost::checked_array_delete(x); + } +}; + +} // namespace boost + +#endif // #ifndef BOOST_CORE_CHECKED_DELETE_HPP diff --git a/contrib/src/boost/core/demangle.hpp b/contrib/src/boost/core/demangle.hpp new file mode 100644 index 0000000..44aeb8d --- /dev/null +++ b/contrib/src/boost/core/demangle.hpp @@ -0,0 +1,128 @@ +#ifndef BOOST_CORE_DEMANGLE_HPP_INCLUDED +#define BOOST_CORE_DEMANGLE_HPP_INCLUDED + +// core::demangle +// +// Copyright 2014 Peter Dimov +// Copyright 2014 Andrey Semashev +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#if defined( __clang__ ) && defined( __has_include ) +# if __has_include() +# define BOOST_CORE_HAS_CXXABI_H +# endif +#elif defined( __GLIBCXX__ ) || defined( __GLIBCPP__ ) +# define BOOST_CORE_HAS_CXXABI_H +#endif + +#if defined( BOOST_CORE_HAS_CXXABI_H ) +# include +// For some archtectures (mips, mips64, x86, x86_64) cxxabi.h in Android NDK is implemented by gabi++ library +// (https://android.googlesource.com/platform/ndk/+/master/sources/cxx-stl/gabi++/), which does not implement +// abi::__cxa_demangle(). We detect this implementation by checking the include guard here. +# if defined( __GABIXX_CXXABI_H__ ) +# undef BOOST_CORE_HAS_CXXABI_H +# else +# include +# include +# endif +#endif + +namespace boost +{ + +namespace core +{ + +inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT; +inline void demangle_free( char const * name ) BOOST_NOEXCEPT; + +class scoped_demangled_name +{ +private: + char const * m_p; + +public: + explicit scoped_demangled_name( char const * name ) BOOST_NOEXCEPT : + m_p( demangle_alloc( name ) ) + { + } + + ~scoped_demangled_name() BOOST_NOEXCEPT + { + demangle_free( m_p ); + } + + char const * get() const BOOST_NOEXCEPT + { + return m_p; + } + + BOOST_DELETED_FUNCTION(scoped_demangled_name( scoped_demangled_name const& )) + BOOST_DELETED_FUNCTION(scoped_demangled_name& operator= ( scoped_demangled_name const& )) +}; + + +#if defined( BOOST_CORE_HAS_CXXABI_H ) + +inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT +{ + int status = 0; + std::size_t size = 0; + return abi::__cxa_demangle( name, NULL, &size, &status ); +} + +inline void demangle_free( char const * name ) BOOST_NOEXCEPT +{ + std::free( const_cast< char* >( name ) ); +} + +inline std::string demangle( char const * name ) +{ + scoped_demangled_name demangled_name( name ); + char const * const p = demangled_name.get(); + if( p ) + { + return p; + } + else + { + return name; + } +} + +#else + +inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT +{ + return name; +} + +inline void demangle_free( char const * ) BOOST_NOEXCEPT +{ +} + +inline std::string demangle( char const * name ) +{ + return name; +} + +#endif + +} // namespace core + +} // namespace boost + +#undef BOOST_CORE_HAS_CXXABI_H + +#endif // #ifndef BOOST_CORE_DEMANGLE_HPP_INCLUDED diff --git a/contrib/src/boost/core/enable_if.hpp b/contrib/src/boost/core/enable_if.hpp new file mode 100644 index 0000000..5dcef1e --- /dev/null +++ b/contrib/src/boost/core/enable_if.hpp @@ -0,0 +1,128 @@ +// Boost enable_if library + +// Copyright 2003 (c) The Trustees of Indiana University. + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jaakko Jarvi (jajarvi at osl.iu.edu) +// Jeremiah Willcock (jewillco at osl.iu.edu) +// Andrew Lumsdaine (lums at osl.iu.edu) + + +#ifndef BOOST_CORE_ENABLE_IF_HPP +#define BOOST_CORE_ENABLE_IF_HPP + +#include "boost/config.hpp" + +// Even the definition of enable_if causes problems on some compilers, +// so it's macroed out for all compilers that do not support SFINAE + +#ifndef BOOST_NO_SFINAE + +namespace boost +{ + template + struct enable_if_has_type + { + typedef R type; + }; + + template + struct enable_if_c { + typedef T type; + }; + + template + struct enable_if_c {}; + + template + struct enable_if : public enable_if_c {}; + + template + struct lazy_enable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_enable_if_c {}; + + template + struct lazy_enable_if : public lazy_enable_if_c {}; + + + template + struct disable_if_c { + typedef T type; + }; + + template + struct disable_if_c {}; + + template + struct disable_if : public disable_if_c {}; + + template + struct lazy_disable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_disable_if_c {}; + + template + struct lazy_disable_if : public lazy_disable_if_c {}; + +} // namespace boost + +#else + +namespace boost { + + namespace detail { typedef void enable_if_default_T; } + + template + struct enable_if_does_not_work_on_this_compiler; + + template + struct enable_if_has_type : enable_if_does_not_work_on_this_compiler + { }; + + template + struct enable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct disable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_enable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_disable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct enable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct disable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_enable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_disable_if : enable_if_does_not_work_on_this_compiler + { }; + +} // namespace boost + +#endif // BOOST_NO_SFINAE + +#endif diff --git a/contrib/src/boost/core/no_exceptions_support.hpp b/contrib/src/boost/core/no_exceptions_support.hpp new file mode 100644 index 0000000..a697f01 --- /dev/null +++ b/contrib/src/boost/core/no_exceptions_support.hpp @@ -0,0 +1,44 @@ +#ifndef BOOST_CORE_NO_EXCEPTIONS_SUPPORT_HPP +#define BOOST_CORE_NO_EXCEPTIONS_SUPPORT_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +//---------------------------------------------------------------------- +// (C) Copyright 2004 Pavel Vozenilek. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// +// This file contains helper macros used when exception support may be +// disabled (as indicated by macro BOOST_NO_EXCEPTIONS). +// +// Before picking up these macros you may consider using RAII techniques +// to deal with exceptions - their syntax can be always the same with +// or without exception support enabled. +//---------------------------------------------------------------------- + +#include +#include + +#if !(defined BOOST_NO_EXCEPTIONS) +# define BOOST_TRY { try +# define BOOST_CATCH(x) catch(x) +# define BOOST_RETHROW throw; +# define BOOST_CATCH_END } +#else +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +# define BOOST_TRY { if ("") +# define BOOST_CATCH(x) else if (!"") +# else +# define BOOST_TRY { if (true) +# define BOOST_CATCH(x) else if (false) +# endif +# define BOOST_RETHROW +# define BOOST_CATCH_END } +#endif + + +#endif diff --git a/contrib/src/boost/core/noncopyable.hpp b/contrib/src/boost/core/noncopyable.hpp new file mode 100644 index 0000000..6ae8c24 --- /dev/null +++ b/contrib/src/boost/core/noncopyable.hpp @@ -0,0 +1,48 @@ +// Boost noncopyable.hpp header file --------------------------------------// + +// (C) Copyright Beman Dawes 1999-2003. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/utility for documentation. + +#ifndef BOOST_CORE_NONCOPYABLE_HPP +#define BOOST_CORE_NONCOPYABLE_HPP + +#include + +namespace boost { + +// Private copy constructor and copy assignment ensure classes derived from +// class noncopyable cannot be copied. + +// Contributed by Dave Abrahams + +namespace noncopyable_ // protection from unintended ADL +{ + class noncopyable + { + protected: +#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) + BOOST_CONSTEXPR noncopyable() = default; + ~noncopyable() = default; +#else + noncopyable() {} + ~noncopyable() {} +#endif +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) + noncopyable( const noncopyable& ) = delete; + noncopyable& operator=( const noncopyable& ) = delete; +#else + private: // emphasize the following members are private + noncopyable( const noncopyable& ); + noncopyable& operator=( const noncopyable& ); +#endif + }; +} + +typedef noncopyable_::noncopyable noncopyable; + +} // namespace boost + +#endif // BOOST_CORE_NONCOPYABLE_HPP diff --git a/contrib/src/boost/core/ref.hpp b/contrib/src/boost/core/ref.hpp new file mode 100644 index 0000000..47dc858 --- /dev/null +++ b/contrib/src/boost/core/ref.hpp @@ -0,0 +1,301 @@ +#ifndef BOOST_CORE_REF_HPP +#define BOOST_CORE_REF_HPP + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include + +// +// ref.hpp - ref/cref, useful helper functions +// +// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +// Copyright (C) 2001, 2002 Peter Dimov +// Copyright (C) 2002 David Abrahams +// +// Copyright (C) 2014 Glen Joseph Fernandes +// glenfe at live dot com +// Copyright (C) 2014 Agustin Berge +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/core/doc/html/core/ref.html for documentation. +// + +/** + @file +*/ + +/** + Boost namespace. +*/ +namespace boost +{ + +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 ) + + struct ref_workaround_tag {}; + +#endif + +// reference_wrapper + +/** + @brief Contains a reference to an object of type `T`. + + `reference_wrapper` is primarily used to "feed" references to + function templates (algorithms) that take their parameter by + value. It provides an implicit conversion to `T&`, which + usually allows the function templates to work on references + unmodified. +*/ +template class reference_wrapper +{ +public: + /** + Type `T`. + */ + typedef T type; + + /** + Constructs a `reference_wrapper` object that stores a + reference to `t`. + + @remark Does not throw. + */ + BOOST_FORCEINLINE explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} + +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 ) + + BOOST_FORCEINLINE explicit reference_wrapper( T & t, ref_workaround_tag ): t_( boost::addressof( t ) ) {} + +#endif + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + /** + @remark Construction from a temporary object is disabled. + */ + BOOST_DELETED_FUNCTION(reference_wrapper(T&& t)) +public: +#endif + + /** + @return The stored reference. + @remark Does not throw. + */ + BOOST_FORCEINLINE operator T& () const { return *t_; } + + /** + @return The stored reference. + @remark Does not throw. + */ + BOOST_FORCEINLINE T& get() const { return *t_; } + + /** + @return A pointer to the object referenced by the stored + reference. + @remark Does not throw. + */ + BOOST_FORCEINLINE T* get_pointer() const { return t_; } + +private: + + T* t_; +}; + +// ref + +/** + @cond +*/ +#if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) +# define BOOST_REF_CONST +#else +# define BOOST_REF_CONST const +#endif +/** + @endcond +*/ + +/** + @return `reference_wrapper(t)` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST ref( T & t ) +{ +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 ) + + return reference_wrapper( t, ref_workaround_tag() ); + +#else + + return reference_wrapper( t ); + +#endif +} + +// cref + +/** + @return `reference_wrapper(t)` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST cref( T const & t ) +{ + return reference_wrapper(t); +} + +#undef BOOST_REF_CONST + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + +/** + @cond +*/ +#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) +# define BOOST_REF_DELETE +#else +# define BOOST_REF_DELETE = delete +#endif +/** + @endcond +*/ + +/** + @remark Construction from a temporary object is disabled. +*/ +template void ref(T const&&) BOOST_REF_DELETE; + +/** + @remark Construction from a temporary object is disabled. +*/ +template void cref(T const&&) BOOST_REF_DELETE; + +#undef BOOST_REF_DELETE + +#endif + +// is_reference_wrapper + +/** + @brief Determine if a type `T` is an instantiation of + `reference_wrapper`. + + The value static constant will be true if the type `T` is a + specialization of `reference_wrapper`. +*/ +template struct is_reference_wrapper +{ + BOOST_STATIC_CONSTANT( bool, value = false ); +}; + +/** + @cond +*/ +template struct is_reference_wrapper< reference_wrapper > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +#if !defined(BOOST_NO_CV_SPECIALIZATIONS) + +template struct is_reference_wrapper< reference_wrapper const > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +template struct is_reference_wrapper< reference_wrapper volatile > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +template struct is_reference_wrapper< reference_wrapper const volatile > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS) + +/** + @endcond +*/ + + +// unwrap_reference + +/** + @brief Find the type in a `reference_wrapper`. + + The `typedef` type is `T::type` if `T` is a + `reference_wrapper`, `T` otherwise. +*/ +template struct unwrap_reference +{ + typedef T type; +}; + +/** + @cond +*/ +template struct unwrap_reference< reference_wrapper > +{ + typedef T type; +}; + +#if !defined(BOOST_NO_CV_SPECIALIZATIONS) + +template struct unwrap_reference< reference_wrapper const > +{ + typedef T type; +}; + +template struct unwrap_reference< reference_wrapper volatile > +{ + typedef T type; +}; + +template struct unwrap_reference< reference_wrapper const volatile > +{ + typedef T type; +}; + +#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS) + +/** + @endcond +*/ + +// unwrap_ref + +/** + @return `unwrap_reference::type&(t)` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE typename unwrap_reference::type& unwrap_ref( T & t ) +{ + return t; +} + +// get_pointer + +/** + @cond +*/ +template BOOST_FORCEINLINE T* get_pointer( reference_wrapper const & r ) +{ + return r.get_pointer(); +} +/** + @endcond +*/ + +} // namespace boost + +#endif // #ifndef BOOST_CORE_REF_HPP diff --git a/contrib/src/boost/core/typeinfo.hpp b/contrib/src/boost/core/typeinfo.hpp new file mode 100644 index 0000000..e67b4a3 --- /dev/null +++ b/contrib/src/boost/core/typeinfo.hpp @@ -0,0 +1,151 @@ +#ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED +#define BOOST_CORE_TYPEINFO_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// core::typeinfo, BOOST_CORE_TYPEID +// +// Copyright 2007, 2014 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include + +#if defined( BOOST_NO_TYPEID ) + +#include +#include + +namespace boost +{ + +namespace core +{ + +class typeinfo +{ +private: + + typeinfo( typeinfo const& ); + typeinfo& operator=( typeinfo const& ); + + char const * name_; + +public: + + explicit typeinfo( char const * name ): name_( name ) + { + } + + bool operator==( typeinfo const& rhs ) const + { + return this == &rhs; + } + + bool operator!=( typeinfo const& rhs ) const + { + return this != &rhs; + } + + bool before( typeinfo const& rhs ) const + { + return std::less< typeinfo const* >()( this, &rhs ); + } + + char const* name() const + { + return name_; + } +}; + +inline char const * demangled_name( core::typeinfo const & ti ) +{ + return ti.name(); +} + +} // namespace core + +namespace detail +{ + +template struct core_typeid_ +{ + static boost::core::typeinfo ti_; + + static char const * name() + { + return BOOST_CURRENT_FUNCTION; + } +}; + +#if defined(__SUNPRO_CC) +// see #4199, the Sun Studio compiler gets confused about static initialization +// constructor arguments. But an assignment works just fine. +template boost::core::typeinfo core_typeid_< T >::ti_ = core_typeid_< T >::name(); +#else +template boost::core::typeinfo core_typeid_< T >::ti_(core_typeid_< T >::name()); +#endif + +template struct core_typeid_< T & >: core_typeid_< T > +{ +}; + +template struct core_typeid_< T const >: core_typeid_< T > +{ +}; + +template struct core_typeid_< T volatile >: core_typeid_< T > +{ +}; + +template struct core_typeid_< T const volatile >: core_typeid_< T > +{ +}; + +} // namespace detail + +} // namespace boost + +#define BOOST_CORE_TYPEID(T) (boost::detail::core_typeid_::ti_) + +#else + +#include +#include + +namespace boost +{ + +namespace core +{ + +#if defined( BOOST_NO_STD_TYPEINFO ) + +typedef ::type_info typeinfo; + +#else + +typedef std::type_info typeinfo; + +#endif + +inline std::string demangled_name( core::typeinfo const & ti ) +{ + return core::demangle( ti.name() ); +} + +} // namespace core + +} // namespace boost + +#define BOOST_CORE_TYPEID(T) typeid(T) + +#endif + +#endif // #ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED diff --git a/contrib/src/boost/cstdint.hpp b/contrib/src/boost/cstdint.hpp new file mode 100644 index 0000000..bf7097e --- /dev/null +++ b/contrib/src/boost/cstdint.hpp @@ -0,0 +1,546 @@ +// boost cstdint.hpp header file ------------------------------------------// + +// (C) Copyright Beman Dawes 1999. +// (C) Copyright Jens Mauer 2001 +// (C) Copyright John Maddock 2001 +// Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/integer for documentation. + +// Revision History +// 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.) +// 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer) +// 23 Jan 01 prefer "long" over "int" for int32_t and intmax_t (Jens Maurer) +// 12 Nov 00 Merged (Jens Maurer) +// 23 Sep 00 Added INTXX_C macro support (John Maddock). +// 22 Sep 00 Better 64-bit support (John Maddock) +// 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost +// 8 Aug 99 Initial version (Beman Dawes) + + +#ifndef BOOST_CSTDINT_HPP +#define BOOST_CSTDINT_HPP + +// +// Since we always define the INT#_C macros as per C++0x, +// define __STDC_CONSTANT_MACROS so that does the right +// thing if possible, and so that the user knows that the macros +// are actually defined as per C99. +// +#ifndef __STDC_CONSTANT_MACROS +# define __STDC_CONSTANT_MACROS +#endif + +#include + +// +// Note that GLIBC is a bit inconsistent about whether int64_t is defined or not +// depending upon what headers happen to have been included first... +// so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG. +// See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 +// +#if defined(BOOST_HAS_STDINT_H) \ + && (!defined(__GLIBC__) \ + || defined(__GLIBC_HAVE_LONG_LONG) \ + || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17))))) + +// The following #include is an implementation artifact; not part of interface. +# ifdef __hpux +// HP-UX has a vaguely nice in a non-standard location +# include +# ifdef __STDC_32_MODE__ + // this is triggered with GCC, because it defines __cplusplus < 199707L +# define BOOST_NO_INT64_T +# endif +# elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX) +# include +# else +# include + +// There is a bug in Cygwin two _C macros +# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__) +# undef INTMAX_C +# undef UINTMAX_C +# define INTMAX_C(c) c##LL +# define UINTMAX_C(c) c##ULL +# endif + +# endif + +#if defined(__QNX__) && defined(__EXT_QNX) + +// QNX (Dinkumware stdlib) defines these as non-standard names. +// Reflect to the standard names. + +typedef ::intleast8_t int_least8_t; +typedef ::intfast8_t int_fast8_t; +typedef ::uintleast8_t uint_least8_t; +typedef ::uintfast8_t uint_fast8_t; + +typedef ::intleast16_t int_least16_t; +typedef ::intfast16_t int_fast16_t; +typedef ::uintleast16_t uint_least16_t; +typedef ::uintfast16_t uint_fast16_t; + +typedef ::intleast32_t int_least32_t; +typedef ::intfast32_t int_fast32_t; +typedef ::uintleast32_t uint_least32_t; +typedef ::uintfast32_t uint_fast32_t; + +# ifndef BOOST_NO_INT64_T + +typedef ::intleast64_t int_least64_t; +typedef ::intfast64_t int_fast64_t; +typedef ::uintleast64_t uint_least64_t; +typedef ::uintfast64_t uint_fast64_t; + +# endif + +#endif + +namespace boost +{ + + using ::int8_t; + using ::int_least8_t; + using ::int_fast8_t; + using ::uint8_t; + using ::uint_least8_t; + using ::uint_fast8_t; + + using ::int16_t; + using ::int_least16_t; + using ::int_fast16_t; + using ::uint16_t; + using ::uint_least16_t; + using ::uint_fast16_t; + + using ::int32_t; + using ::int_least32_t; + using ::int_fast32_t; + using ::uint32_t; + using ::uint_least32_t; + using ::uint_fast32_t; + +# ifndef BOOST_NO_INT64_T + + using ::int64_t; + using ::int_least64_t; + using ::int_fast64_t; + using ::uint64_t; + using ::uint_least64_t; + using ::uint_fast64_t; + +# endif + + using ::intmax_t; + using ::uintmax_t; + +} // namespace boost + +#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS) || defined(__SOLARIS9__) || defined(__NetBSD__) +// FreeBSD and Tru64 have an that contains much of what we need. +# include + +namespace boost { + + using ::int8_t; + typedef int8_t int_least8_t; + typedef int8_t int_fast8_t; + using ::uint8_t; + typedef uint8_t uint_least8_t; + typedef uint8_t uint_fast8_t; + + using ::int16_t; + typedef int16_t int_least16_t; + typedef int16_t int_fast16_t; + using ::uint16_t; + typedef uint16_t uint_least16_t; + typedef uint16_t uint_fast16_t; + + using ::int32_t; + typedef int32_t int_least32_t; + typedef int32_t int_fast32_t; + using ::uint32_t; + typedef uint32_t uint_least32_t; + typedef uint32_t uint_fast32_t; + +# ifndef BOOST_NO_INT64_T + + using ::int64_t; + typedef int64_t int_least64_t; + typedef int64_t int_fast64_t; + using ::uint64_t; + typedef uint64_t uint_least64_t; + typedef uint64_t uint_fast64_t; + + typedef int64_t intmax_t; + typedef uint64_t uintmax_t; + +# else + + typedef int32_t intmax_t; + typedef uint32_t uintmax_t; + +# endif + +} // namespace boost + +#else // BOOST_HAS_STDINT_H + +# include // implementation artifact; not part of interface +# include // needed for limits macros + + +namespace boost +{ + +// These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit +// platforms. For other systems, they will have to be hand tailored. +// +// Because the fast types are assumed to be the same as the undecorated types, +// it may be possible to hand tailor a more efficient implementation. Such +// an optimization may be illusionary; on the Intel x86-family 386 on, for +// example, byte arithmetic and load/stores are as fast as "int" sized ones. + +// 8-bit types ------------------------------------------------------------// + +# if UCHAR_MAX == 0xff + typedef signed char int8_t; + typedef signed char int_least8_t; + typedef signed char int_fast8_t; + typedef unsigned char uint8_t; + typedef unsigned char uint_least8_t; + typedef unsigned char uint_fast8_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +// 16-bit types -----------------------------------------------------------// + +# if USHRT_MAX == 0xffff +# if defined(__crayx1) + // The Cray X1 has a 16-bit short, however it is not recommend + // for use in performance critical code. + typedef short int16_t; + typedef short int_least16_t; + typedef int int_fast16_t; + typedef unsigned short uint16_t; + typedef unsigned short uint_least16_t; + typedef unsigned int uint_fast16_t; +# else + typedef short int16_t; + typedef short int_least16_t; + typedef short int_fast16_t; + typedef unsigned short uint16_t; + typedef unsigned short uint_least16_t; + typedef unsigned short uint_fast16_t; +# endif +# elif (USHRT_MAX == 0xffffffff) && defined(__MTA__) + // On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified + // MTA / XMT does support the following non-standard integer types + typedef __short16 int16_t; + typedef __short16 int_least16_t; + typedef __short16 int_fast16_t; + typedef unsigned __short16 uint16_t; + typedef unsigned __short16 uint_least16_t; + typedef unsigned __short16 uint_fast16_t; +# elif (USHRT_MAX == 0xffffffff) && defined(CRAY) + // no 16-bit types on Cray: + typedef short int_least16_t; + typedef short int_fast16_t; + typedef unsigned short uint_least16_t; + typedef unsigned short uint_fast16_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +// 32-bit types -----------------------------------------------------------// + +# if UINT_MAX == 0xffffffff + typedef int int32_t; + typedef int int_least32_t; + typedef int int_fast32_t; + typedef unsigned int uint32_t; + typedef unsigned int uint_least32_t; + typedef unsigned int uint_fast32_t; +# elif (USHRT_MAX == 0xffffffff) + typedef short int32_t; + typedef short int_least32_t; + typedef short int_fast32_t; + typedef unsigned short uint32_t; + typedef unsigned short uint_least32_t; + typedef unsigned short uint_fast32_t; +# elif ULONG_MAX == 0xffffffff + typedef long int32_t; + typedef long int_least32_t; + typedef long int_fast32_t; + typedef unsigned long uint32_t; + typedef unsigned long uint_least32_t; + typedef unsigned long uint_fast32_t; +# elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) + // Integers are 64 bits on the MTA / XMT + typedef __int32 int32_t; + typedef __int32 int_least32_t; + typedef __int32 int_fast32_t; + typedef unsigned __int32 uint32_t; + typedef unsigned __int32 uint_least32_t; + typedef unsigned __int32 uint_fast32_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +// 64-bit types + intmax_t and uintmax_t ----------------------------------// + +# if defined(BOOST_HAS_LONG_LONG) && \ + !defined(BOOST_MSVC) && !defined(__BORLANDC__) && \ + (!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \ + (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) +# if defined(__hpux) + // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions +# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) + // 2**64 - 1 +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + + typedef ::boost::long_long_type intmax_t; + typedef ::boost::ulong_long_type uintmax_t; + typedef ::boost::long_long_type int64_t; + typedef ::boost::long_long_type int_least64_t; + typedef ::boost::long_long_type int_fast64_t; + typedef ::boost::ulong_long_type uint64_t; + typedef ::boost::ulong_long_type uint_least64_t; + typedef ::boost::ulong_long_type uint_fast64_t; + +# elif ULONG_MAX != 0xffffffff + +# if ULONG_MAX == 18446744073709551615 // 2**64 - 1 + typedef long intmax_t; + typedef unsigned long uintmax_t; + typedef long int64_t; + typedef long int_least64_t; + typedef long int_fast64_t; + typedef unsigned long uint64_t; + typedef unsigned long uint_least64_t; + typedef unsigned long uint_fast64_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG) + __extension__ typedef long long intmax_t; + __extension__ typedef unsigned long long uintmax_t; + __extension__ typedef long long int64_t; + __extension__ typedef long long int_least64_t; + __extension__ typedef long long int_fast64_t; + __extension__ typedef unsigned long long uint64_t; + __extension__ typedef unsigned long long uint_least64_t; + __extension__ typedef unsigned long long uint_fast64_t; +# elif defined(BOOST_HAS_MS_INT64) + // + // we have Borland/Intel/Microsoft __int64: + // + typedef __int64 intmax_t; + typedef unsigned __int64 uintmax_t; + typedef __int64 int64_t; + typedef __int64 int_least64_t; + typedef __int64 int_fast64_t; + typedef unsigned __int64 uint64_t; + typedef unsigned __int64 uint_least64_t; + typedef unsigned __int64 uint_fast64_t; +# else // assume no 64-bit integers +# define BOOST_NO_INT64_T + typedef int32_t intmax_t; + typedef uint32_t uintmax_t; +# endif + +} // namespace boost + + +#endif // BOOST_HAS_STDINT_H + +// intptr_t/uintptr_t are defined separately because they are optional and not universally available +#if defined(BOOST_WINDOWS) && !defined(_WIN32_WCE) && !defined(BOOST_HAS_STDINT_H) +// Older MSVC don't have stdint.h and have intptr_t/uintptr_t defined in stddef.h +#include +#endif + +// PGI seems to not support intptr_t/uintptr_t properly. BOOST_HAS_STDINT_H is not defined for this compiler by Boost.Config. +#if !defined(__PGIC__) + +#if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \ + || (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \ + || defined(__CYGWIN__) \ + || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \ + || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(sun) + +namespace boost { + using ::intptr_t; + using ::uintptr_t; +} +#define BOOST_HAS_INTPTR_T + +// Clang pretends to be GCC, so it'll match this condition +#elif defined(__GNUC__) && defined(__INTPTR_TYPE__) && defined(__UINTPTR_TYPE__) + +namespace boost { + typedef __INTPTR_TYPE__ intptr_t; + typedef __UINTPTR_TYPE__ uintptr_t; +} +#define BOOST_HAS_INTPTR_T + +#endif + +#endif // !defined(__PGIC__) + +#endif // BOOST_CSTDINT_HPP + + +/**************************************************** + +Macro definition section: + +Added 23rd September 2000 (John Maddock). +Modified 11th September 2001 to be excluded when +BOOST_HAS_STDINT_H is defined (John Maddock). +Modified 11th Dec 2009 to always define the +INT#_C macros if they're not already defined (John Maddock). + +******************************************************/ + +#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \ + (!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C)) +// +// For the following code we get several warnings along the lines of: +// +// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant +// +// So we declare this a system header to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +#include +# define BOOST__STDC_CONSTANT_MACROS_DEFINED +# if defined(BOOST_HAS_MS_INT64) +// +// Borland/Intel/Microsoft compilers have width specific suffixes: +// +#ifndef INT8_C +# define INT8_C(value) value##i8 +#endif +#ifndef INT16_C +# define INT16_C(value) value##i16 +#endif +#ifndef INT32_C +# define INT32_C(value) value##i32 +#endif +#ifndef INT64_C +# define INT64_C(value) value##i64 +#endif +# ifdef __BORLANDC__ + // Borland bug: appending ui8 makes the type a signed char +# define UINT8_C(value) static_cast(value##u) +# else +# define UINT8_C(value) value##ui8 +# endif +#ifndef UINT16_C +# define UINT16_C(value) value##ui16 +#endif +#ifndef UINT32_C +# define UINT32_C(value) value##ui32 +#endif +#ifndef UINT64_C +# define UINT64_C(value) value##ui64 +#endif +#ifndef INTMAX_C +# define INTMAX_C(value) value##i64 +# define UINTMAX_C(value) value##ui64 +#endif + +# else +// do it the old fashioned way: + +// 8-bit types ------------------------------------------------------------// + +# if (UCHAR_MAX == 0xff) && !defined(INT8_C) +# define INT8_C(value) static_cast(value) +# define UINT8_C(value) static_cast(value##u) +# endif + +// 16-bit types -----------------------------------------------------------// + +# if (USHRT_MAX == 0xffff) && !defined(INT16_C) +# define INT16_C(value) static_cast(value) +# define UINT16_C(value) static_cast(value##u) +# endif + +// 32-bit types -----------------------------------------------------------// +#ifndef INT32_C +# if (UINT_MAX == 0xffffffff) +# define INT32_C(value) value +# define UINT32_C(value) value##u +# elif ULONG_MAX == 0xffffffff +# define INT32_C(value) value##L +# define UINT32_C(value) value##uL +# endif +#endif + +// 64-bit types + intmax_t and uintmax_t ----------------------------------// +#ifndef INT64_C +# if defined(BOOST_HAS_LONG_LONG) && \ + (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_ULLONG_MAX) || defined(_LLONG_MAX)) + +# if defined(__hpux) + // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions +# define INT64_C(value) value##LL +# define UINT64_C(value) value##uLL +# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || \ + (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || \ + (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) || \ + (defined(_ULLONG_MAX) && _ULLONG_MAX == 18446744073709551615ULL) || \ + (defined(_LLONG_MAX) && _LLONG_MAX == 9223372036854775807LL) + +# define INT64_C(value) value##LL +# define UINT64_C(value) value##uLL +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# elif ULONG_MAX != 0xffffffff + +# if ULONG_MAX == 18446744073709551615U // 2**64 - 1 +# define INT64_C(value) value##L +# define UINT64_C(value) value##uL +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# elif defined(BOOST_HAS_LONG_LONG) + // Usual macros not defined, work things out for ourselves: +# if(~0uLL == 18446744073709551615ULL) +# define INT64_C(value) value##LL +# define UINT64_C(value) value##uLL +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +# ifdef BOOST_NO_INT64_T +# define INTMAX_C(value) INT32_C(value) +# define UINTMAX_C(value) UINT32_C(value) +# else +# define INTMAX_C(value) INT64_C(value) +# define UINTMAX_C(value) UINT64_C(value) +# endif +#endif +# endif // Borland/Microsoft specific width suffixes + +#endif // INT#_C macros. + + + + diff --git a/contrib/src/boost/current_function.hpp b/contrib/src/boost/current_function.hpp new file mode 100644 index 0000000..5c113f8 --- /dev/null +++ b/contrib/src/boost/current_function.hpp @@ -0,0 +1,71 @@ +#ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED +#define BOOST_CURRENT_FUNCTION_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/current_function.hpp - BOOST_CURRENT_FUNCTION +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// http://www.boost.org/libs/assert/current_function.html +// + +namespace boost +{ + +namespace detail +{ + +inline void current_function_helper() +{ + +#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__) + +# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__ + +#elif defined(__DMC__) && (__DMC__ >= 0x810) + +# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__ + +#elif defined(__FUNCSIG__) + +# define BOOST_CURRENT_FUNCTION __FUNCSIG__ + +#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500)) + +# define BOOST_CURRENT_FUNCTION __FUNCTION__ + +#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) + +# define BOOST_CURRENT_FUNCTION __FUNC__ + +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) + +# define BOOST_CURRENT_FUNCTION __func__ + +#elif defined(__cplusplus) && (__cplusplus >= 201103) + +# define BOOST_CURRENT_FUNCTION __func__ + +#else + +# define BOOST_CURRENT_FUNCTION "(unknown)" + +#endif + +} + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED diff --git a/contrib/src/boost/detail/dynamic_bitset.hpp b/contrib/src/boost/detail/dynamic_bitset.hpp new file mode 100644 index 0000000..e0f675d --- /dev/null +++ b/contrib/src/boost/detail/dynamic_bitset.hpp @@ -0,0 +1,241 @@ +// ----------------------------------------------------------- +// +// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek +// Copyright (c) 2003-2006, 2008 Gennaro Prota +// +// Copyright (c) 2014 Glen Joseph Fernandes +// glenfe at live dot com +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +#ifndef BOOST_DETAIL_DYNAMIC_BITSET_HPP +#define BOOST_DETAIL_DYNAMIC_BITSET_HPP + +#include +#include +#include "boost/config.hpp" +#include "boost/detail/workaround.hpp" + + +namespace boost { + + namespace detail { + namespace dynamic_bitset_impl { + + // Gives (read-)access to the object representation + // of an object of type T (3.9p4). CANNOT be used + // on a base sub-object + // + template + inline const unsigned char * object_representation (T* p) + { + return static_cast(static_cast(p)); + } + + template + struct shifter + { + static void left_shift(T & v) { + amount >= width ? (v = 0) + : (v >>= BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(amount)); + } + }; + + // ------- count function implementation -------------- + + typedef unsigned char byte_type; + + // These two entities + // + // enum mode { access_by_bytes, access_by_blocks }; + // template struct mode_to_type {}; + // + // were removed, since the regression logs (as of 24 Aug 2008) + // showed that several compilers had troubles with recognizing + // + // const mode m = access_by_bytes + // + // as a constant expression + // + // * So, we'll use bool, instead of enum *. + // + template + struct value_to_type + { + value_to_type() {} + }; + const bool access_by_bytes = true; + const bool access_by_blocks = false; + + + // the table: wrapped in a class template, so + // that it is only instantiated if/when needed + // + template + struct count_table { static const byte_type table[]; }; + + template <> + struct count_table { /* no table */ }; + + + const unsigned int table_width = 8; + template + const byte_type count_table::table[] = + { + // Automatically generated by GPTableGen.exe v.1.0 + // + 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, + 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, + 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, + 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, + 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, + 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, + 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, + 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 + }; + + + // overload for access by bytes + // + + template + inline std::size_t do_count(Iterator first, std::size_t length, + int /*dummy param*/, + value_to_type* ) + { + std::size_t num = 0; + if (length) + { + const byte_type * p = object_representation(&*first); + length *= sizeof(*first); + + do { + num += count_table<>::table[*p]; + ++p; + --length; + + } while (length); + } + + return num; + } + + + // overload for access by blocks + // + template + inline std::size_t do_count(Iterator first, std::size_t length, ValueType, + value_to_type*) + { + std::size_t num = 0; + while (length){ + + ValueType value = *first; + while (value) { + num += count_table<>::table[value & ((1u<>= table_width; + } + + ++first; + --length; + } + + return num; + } + + // ------------------------------------------------------- + + + // Some library implementations simply return a dummy + // value such as + // + // size_type(-1) / sizeof(T) + // + // from vector<>::max_size. This tries to get more + // meaningful info. + // + template + inline typename T::size_type vector_max_size_workaround(const T & v) + BOOST_NOEXCEPT + { + typedef typename T::allocator_type allocator_type; + + const allocator_type& alloc = v.get_allocator(); + +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + typedef std::allocator_traits allocator_traits; + + const typename allocator_traits::size_type alloc_max = + allocator_traits::max_size(alloc); +#else + const typename allocator_type::size_type alloc_max = alloc.max_size(); +#endif + + const typename T::size_type container_max = v.max_size(); + + return alloc_max < container_max ? alloc_max : container_max; + } + + // for static_asserts + template + struct allowed_block_type { + enum { value = T(-1) > 0 }; // ensure T has no sign + }; + + template <> + struct allowed_block_type { + enum { value = false }; + }; + + + template + struct is_numeric { + enum { value = false }; + }; + +# define BOOST_dynamic_bitset_is_numeric(x) \ + template<> \ + struct is_numeric< x > { \ + enum { value = true }; \ + } /**/ + + BOOST_dynamic_bitset_is_numeric(bool); + BOOST_dynamic_bitset_is_numeric(char); + +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) + BOOST_dynamic_bitset_is_numeric(wchar_t); +#endif + + BOOST_dynamic_bitset_is_numeric(signed char); + BOOST_dynamic_bitset_is_numeric(short int); + BOOST_dynamic_bitset_is_numeric(int); + BOOST_dynamic_bitset_is_numeric(long int); + + BOOST_dynamic_bitset_is_numeric(unsigned char); + BOOST_dynamic_bitset_is_numeric(unsigned short); + BOOST_dynamic_bitset_is_numeric(unsigned int); + BOOST_dynamic_bitset_is_numeric(unsigned long); + +#if defined(BOOST_HAS_LONG_LONG) + BOOST_dynamic_bitset_is_numeric(::boost::long_long_type); + BOOST_dynamic_bitset_is_numeric(::boost::ulong_long_type); +#endif + + // intentionally omitted + //BOOST_dynamic_bitset_is_numeric(float); + //BOOST_dynamic_bitset_is_numeric(double); + //BOOST_dynamic_bitset_is_numeric(long double); + +#undef BOOST_dynamic_bitset_is_numeric + + } // dynamic_bitset_impl + } // namespace detail + +} // namespace boost + +#endif // include guard + diff --git a/contrib/src/boost/detail/indirect_traits.hpp b/contrib/src/boost/detail/indirect_traits.hpp new file mode 100644 index 0000000..6294e40 --- /dev/null +++ b/contrib/src/boost/detail/indirect_traits.hpp @@ -0,0 +1,204 @@ +// Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef INDIRECT_TRAITS_DWA2002131_HPP +# define INDIRECT_TRAITS_DWA2002131_HPP +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include + +# include +# include +# include +# include +# include +# include + + +namespace boost { namespace detail { + +namespace indirect_traits { + +template +struct is_reference_to_const : mpl::false_ +{ +}; + +template +struct is_reference_to_const : mpl::true_ +{ +}; + +# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround +template +struct is_reference_to_const : mpl::true_ +{ +}; +# endif + +template +struct is_reference_to_function : mpl::false_ +{ +}; + +template +struct is_reference_to_function : is_function +{ +}; + +template +struct is_pointer_to_function : mpl::false_ +{ +}; + +// There's no such thing as a pointer-to-cv-function, so we don't need +// specializations for those +template +struct is_pointer_to_function : is_function +{ +}; + +template +struct is_reference_to_member_function_pointer_impl : mpl::false_ +{ +}; + +template +struct is_reference_to_member_function_pointer_impl + : is_member_function_pointer::type> +{ +}; + + +template +struct is_reference_to_member_function_pointer + : is_reference_to_member_function_pointer_impl +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T)) +}; + +template +struct is_reference_to_function_pointer_aux + : mpl::and_< + is_reference + , is_pointer_to_function< + typename remove_cv< + typename remove_reference::type + >::type + > + > +{ + // There's no such thing as a pointer-to-cv-function, so we don't need specializations for those +}; + +template +struct is_reference_to_function_pointer + : mpl::if_< + is_reference_to_function + , mpl::false_ + , is_reference_to_function_pointer_aux + >::type +{ +}; + +template +struct is_reference_to_non_const + : mpl::and_< + is_reference + , mpl::not_< + is_reference_to_const + > + > +{ +}; + +template +struct is_reference_to_volatile : mpl::false_ +{ +}; + +template +struct is_reference_to_volatile : mpl::true_ +{ +}; + +# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround +template +struct is_reference_to_volatile : mpl::true_ +{ +}; +# endif + + +template +struct is_reference_to_pointer : mpl::false_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_class + : mpl::and_< + is_reference + , is_class< + typename remove_cv< + typename remove_reference::type + >::type + > + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T)) +}; + +template +struct is_pointer_to_class + : mpl::and_< + is_pointer + , is_class< + typename remove_cv< + typename remove_pointer::type + >::type + > + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_class,(T)) +}; + + +} + +using namespace indirect_traits; + +}} // namespace boost::python::detail + +#endif // INDIRECT_TRAITS_DWA2002131_HPP diff --git a/contrib/src/boost/detail/iterator.hpp b/contrib/src/boost/detail/iterator.hpp new file mode 100644 index 0000000..c2e8f1e --- /dev/null +++ b/contrib/src/boost/detail/iterator.hpp @@ -0,0 +1,26 @@ +// (C) Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef ITERATOR_DWA122600_HPP_ +#define ITERATOR_DWA122600_HPP_ + +// This header is obsolete and will be deprecated. + +#include + +namespace boost +{ + +namespace detail +{ + +using std::iterator_traits; +using std::distance; + +} // namespace detail + +} // namespace boost + +#endif // ITERATOR_DWA122600_HPP_ diff --git a/contrib/src/boost/detail/lightweight_mutex.hpp b/contrib/src/boost/detail/lightweight_mutex.hpp new file mode 100644 index 0000000..b7a7f6d --- /dev/null +++ b/contrib/src/boost/detail/lightweight_mutex.hpp @@ -0,0 +1,22 @@ +#ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED +#define BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/lightweight_mutex.hpp - lightweight mutex +// +// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// + +#include + +#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED diff --git a/contrib/src/boost/detail/no_exceptions_support.hpp b/contrib/src/boost/detail/no_exceptions_support.hpp new file mode 100644 index 0000000..7d17454 --- /dev/null +++ b/contrib/src/boost/detail/no_exceptions_support.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP +#define BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP + +// The header file at this path is deprecated; +// use boost/core/no_exceptions_support.hpp instead. + +#include + +#endif diff --git a/contrib/src/boost/detail/sp_typeinfo.hpp b/contrib/src/boost/detail/sp_typeinfo.hpp new file mode 100644 index 0000000..4e4de55 --- /dev/null +++ b/contrib/src/boost/detail/sp_typeinfo.hpp @@ -0,0 +1,36 @@ +#ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED +#define BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_typeinfo.hpp +// +// Deprecated, please use boost/core/typeinfo.hpp +// +// Copyright 2007 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include + +namespace boost +{ + +namespace detail +{ + +typedef boost::core::typeinfo sp_typeinfo; + +} // namespace detail + +} // namespace boost + +#define BOOST_SP_TYPEID(T) BOOST_CORE_TYPEID(T) + +#endif // #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED diff --git a/contrib/src/boost/detail/winapi/GetCurrentProcess.hpp b/contrib/src/boost/detail/winapi/GetCurrentProcess.hpp new file mode 100644 index 0000000..431b52f --- /dev/null +++ b/contrib/src/boost/detail/winapi/GetCurrentProcess.hpp @@ -0,0 +1,34 @@ +// GetCurrentProcess.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GETCURRENTPROCESS_HPP +#define BOOST_DETAIL_WINAPI_GETCURRENTPROCESS_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +// Windows CE define GetCurrentProcess as an inline function in kfuncs.h +#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI GetCurrentProcess(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::GetCurrentProcess; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GETCURRENTPROCESS_HPP diff --git a/contrib/src/boost/detail/winapi/GetCurrentThread.hpp b/contrib/src/boost/detail/winapi/GetCurrentThread.hpp new file mode 100644 index 0000000..cbcdc97 --- /dev/null +++ b/contrib/src/boost/detail/winapi/GetCurrentThread.hpp @@ -0,0 +1,34 @@ +// GetCurrentThread.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GETCURRENTTHREAD_HPP +#define BOOST_DETAIL_WINAPI_GETCURRENTTHREAD_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +// Windows CE define GetCurrentThread as an inline function in kfuncs.h +#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI GetCurrentThread(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::GetCurrentThread; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GETCURRENTTHREAD_HPP diff --git a/contrib/src/boost/detail/winapi/basic_types.hpp b/contrib/src/boost/detail/winapi/basic_types.hpp new file mode 100644 index 0000000..717e934 --- /dev/null +++ b/contrib/src/boost/detail/winapi/basic_types.hpp @@ -0,0 +1,225 @@ +// basic_types.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP +#define BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP + +#include +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if defined( BOOST_USE_WINDOWS_H ) +# include +#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__) +# include +# ifdef UNDER_CE +# ifndef WINAPI +# ifndef _WIN32_WCE_EMULATION +# define WINAPI __cdecl // Note this doesn't match the desktop definition +# else +# define WINAPI __stdcall +# endif +# endif +// Windows CE defines a few functions as inline functions in kfuncs.h +typedef int BOOL; +typedef unsigned long DWORD; +typedef void* HANDLE; +# include +# else +# ifndef WINAPI +# define WINAPI __stdcall +# endif +# endif +# ifndef NTAPI +# define NTAPI __stdcall +# endif +#else +# error "Win32 functions not available" +#endif + +#ifndef NO_STRICT +#ifndef STRICT +#define STRICT 1 +#endif +#endif + +#if defined(STRICT) +#define BOOST_DETAIL_WINAPI_DECLARE_HANDLE(x) struct x##__; typedef struct x##__ *x +#else +#define BOOST_DETAIL_WINAPI_DECLARE_HANDLE(x) typedef void* x +#endif + +#if !defined( BOOST_USE_WINDOWS_H ) +extern "C" { +union _LARGE_INTEGER; +struct _SECURITY_ATTRIBUTES; +BOOST_DETAIL_WINAPI_DECLARE_HANDLE(HINSTANCE); +typedef HINSTANCE HMODULE; +} +#endif + +#if defined(__GNUC__) +#define BOOST_DETAIL_WINAPI_MAY_ALIAS __attribute__ ((__may_alias__)) +#else +#define BOOST_DETAIL_WINAPI_MAY_ALIAS +#endif + +// MinGW64 gcc 4.8.2 fails to compile function declarations with boost::detail::winapi::VOID_ arguments even though +// the typedef expands to void. In Windows SDK, VOID is a macro which unfolds to void. We use our own macro in such cases. +#define BOOST_DETAIL_WINAPI_VOID void + +namespace boost { +namespace detail { +namespace winapi { +#if defined( BOOST_USE_WINDOWS_H ) + +typedef ::BOOL BOOL_; +typedef ::PBOOL PBOOL_; +typedef ::LPBOOL LPBOOL_; +typedef ::BOOLEAN BOOLEAN_; +typedef ::PBOOLEAN PBOOLEAN_; +typedef ::BYTE BYTE_; +typedef ::PBYTE PBYTE_; +typedef ::LPBYTE LPBYTE_; +typedef ::WORD WORD_; +typedef ::PWORD PWORD_; +typedef ::LPWORD LPWORD_; +typedef ::DWORD DWORD_; +typedef ::PDWORD PDWORD_; +typedef ::LPDWORD LPDWORD_; +typedef ::HANDLE HANDLE_; +typedef ::PHANDLE PHANDLE_; +typedef ::INT INT_; +typedef ::PINT PINT_; +typedef ::LPINT LPINT_; +typedef ::UINT UINT_; +typedef ::PUINT PUINT_; +typedef ::LONG LONG_; +typedef ::PLONG PLONG_; +typedef ::LPLONG LPLONG_; +typedef ::ULONG ULONG_; +typedef ::PULONG PULONG_; +typedef ::LONGLONG LONGLONG_; +typedef ::ULONGLONG ULONGLONG_; +typedef ::INT_PTR INT_PTR_; +typedef ::UINT_PTR UINT_PTR_; +typedef ::LONG_PTR LONG_PTR_; +typedef ::ULONG_PTR ULONG_PTR_; +typedef ::DWORD_PTR DWORD_PTR_; +typedef ::PDWORD_PTR PDWORD_PTR_; +typedef ::SIZE_T SIZE_T_; +typedef ::PSIZE_T PSIZE_T_; +typedef ::SSIZE_T SSIZE_T_; +typedef ::PSSIZE_T PSSIZE_T_; +typedef VOID VOID_; // VOID is a macro +typedef ::PVOID PVOID_; +typedef ::LPVOID LPVOID_; +typedef ::LPCVOID LPCVOID_; +typedef ::CHAR CHAR_; +typedef ::LPSTR LPSTR_; +typedef ::LPCSTR LPCSTR_; +typedef ::WCHAR WCHAR_; +typedef ::LPWSTR LPWSTR_; +typedef ::LPCWSTR LPCWSTR_; + +#else // defined( BOOST_USE_WINDOWS_H ) + +typedef int BOOL_; +typedef BOOL_* PBOOL_; +typedef BOOL_* LPBOOL_; +typedef unsigned char BYTE_; +typedef BYTE_* PBYTE_; +typedef BYTE_* LPBYTE_; +typedef BYTE_ BOOLEAN_; +typedef BOOLEAN_* PBOOLEAN_; +typedef unsigned short WORD_; +typedef WORD_* PWORD_; +typedef WORD_* LPWORD_; +typedef unsigned long DWORD_; +typedef DWORD_* PDWORD_; +typedef DWORD_* LPDWORD_; +typedef void* HANDLE_; +typedef void** PHANDLE_; + +typedef int INT_; +typedef INT_* PINT_; +typedef INT_* LPINT_; +typedef unsigned int UINT_; +typedef UINT_* PUINT_; +typedef long LONG_; +typedef LONG_* PLONG_; +typedef LONG_* LPLONG_; +typedef unsigned long ULONG_; +typedef ULONG_* PULONG_; + +typedef boost::int64_t LONGLONG_; +typedef boost::uint64_t ULONGLONG_; + +# ifdef _WIN64 +# if defined(__CYGWIN__) +typedef long INT_PTR_; +typedef unsigned long UINT_PTR_; +typedef long LONG_PTR_; +typedef unsigned long ULONG_PTR_; +# else +typedef __int64 INT_PTR_; +typedef unsigned __int64 UINT_PTR_; +typedef __int64 LONG_PTR_; +typedef unsigned __int64 ULONG_PTR_; +# endif +# else +typedef int INT_PTR_; +typedef unsigned int UINT_PTR_; +typedef long LONG_PTR_; +typedef unsigned long ULONG_PTR_; +# endif + +typedef ULONG_PTR_ DWORD_PTR_, *PDWORD_PTR_; +typedef ULONG_PTR_ SIZE_T_, *PSIZE_T_; +typedef LONG_PTR_ SSIZE_T_, *PSSIZE_T_; + +typedef void VOID_; +typedef void *PVOID_; +typedef void *LPVOID_; +typedef const void *LPCVOID_; + +typedef char CHAR_; +typedef CHAR_ *LPSTR_; +typedef const CHAR_ *LPCSTR_; + +typedef wchar_t WCHAR_; +typedef WCHAR_ *LPWSTR_; +typedef const WCHAR_ *LPCWSTR_; + +#endif // defined( BOOST_USE_WINDOWS_H ) + +typedef ::HMODULE HMODULE_; + +typedef union BOOST_DETAIL_WINAPI_MAY_ALIAS _LARGE_INTEGER { + struct { + DWORD_ LowPart; + LONG_ HighPart; + } u; + LONGLONG_ QuadPart; +} LARGE_INTEGER_, *PLARGE_INTEGER_; + +typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SECURITY_ATTRIBUTES { + DWORD_ nLength; + LPVOID_ lpSecurityDescriptor; + BOOL_ bInheritHandle; +} SECURITY_ATTRIBUTES_, *PSECURITY_ATTRIBUTES_, *LPSECURITY_ATTRIBUTES_; + +} +} +} + +#endif // BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP diff --git a/contrib/src/boost/detail/winapi/config.hpp b/contrib/src/boost/detail/winapi/config.hpp new file mode 100644 index 0000000..c67d670 --- /dev/null +++ b/contrib/src/boost/detail/winapi/config.hpp @@ -0,0 +1,72 @@ +// config.hpp --------------------------------------------------------------// + +// Copyright 2013 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_ +#define BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_ + +#include +#if defined __MINGW32__ +#include <_mingw.h> +#endif + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +// BOOST_WINAPI_IS_MINGW indicates that the target Windows SDK is provided by MinGW (http://mingw.org/). +// BOOST_WINAPI_IS_MINGW_W64 indicates that the target Windows SDK is provided by MinGW-w64 (http://mingw-w64.org). +#if defined __MINGW32__ +#if defined __MINGW64_VERSION_MAJOR +#define BOOST_WINAPI_IS_MINGW_W64 +#else +#define BOOST_WINAPI_IS_MINGW +#endif +#endif + +// These constants reflect _WIN32_WINNT_* macros from sdkddkver.h +// See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#setting_winver_or__win32_winnt +#define BOOST_WINAPI_VERSION_NT4 0x0400 +#define BOOST_WINAPI_VERSION_WIN2K 0x0500 +#define BOOST_WINAPI_VERSION_WINXP 0x0501 +#define BOOST_WINAPI_VERSION_WS03 0x0502 +#define BOOST_WINAPI_VERSION_WIN6 0x0600 +#define BOOST_WINAPI_VERSION_VISTA 0x0600 +#define BOOST_WINAPI_VERSION_WS08 0x0600 +#define BOOST_WINAPI_VERSION_LONGHORN 0x0600 +#define BOOST_WINAPI_VERSION_WIN7 0x0601 +#define BOOST_WINAPI_VERSION_WIN8 0x0602 +#define BOOST_WINAPI_VERSION_WINBLUE 0x0603 +#define BOOST_WINAPI_VERSION_WINTHRESHOLD 0x0A00 +#define BOOST_WINAPI_VERSION_WIN10 0x0A00 + +#if !defined(BOOST_USE_WINAPI_VERSION) +#if defined(_WIN32_WINNT) +#define BOOST_USE_WINAPI_VERSION _WIN32_WINNT +#elif defined(WINVER) +#define BOOST_USE_WINAPI_VERSION WINVER +#else +// By default use Windows Vista API on compilers that support it and XP on the others +#if (defined(_MSC_VER) && _MSC_VER <= 1400) || defined(BOOST_WINAPI_IS_MINGW) +#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WINXP +#else +#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN6 +#endif +#endif +#endif + +#if defined(BOOST_USE_WINDOWS_H) +// We have to define the version macros so that windows.h provides the necessary symbols +#if !defined(_WIN32_WINNT) +#define _WIN32_WINNT BOOST_USE_WINAPI_VERSION +#endif +#if !defined(WINVER) +#define WINVER BOOST_USE_WINAPI_VERSION +#endif +#endif + +#endif // BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_ diff --git a/contrib/src/boost/detail/winapi/crypt.hpp b/contrib/src/boost/detail/winapi/crypt.hpp new file mode 100644 index 0000000..4d2ebed --- /dev/null +++ b/contrib/src/boost/detail/winapi/crypt.hpp @@ -0,0 +1,193 @@ +// crypt.hpp --------------------------------------------------------------// + +// Copyright 2014 Antony Polukhin +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_CRYPT_HPP +#define BOOST_DETAIL_WINAPI_CRYPT_HPP + +#include +#include +#if defined( BOOST_USE_WINDOWS_H ) && defined( BOOST_WINAPI_IS_MINGW ) +// MinGW does not include this header as part of windows.h +#include +#endif + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if !defined( BOOST_USE_WINDOWS_H ) +namespace boost { namespace detail { namespace winapi { +typedef ULONG_PTR_ HCRYPTPROV_; +}}} + +// Some versions of MinGW (including the latest ones) contain buggy declarations of CryptEnumProvidersA and CryptEnumProvidersW. +// We cannot detect those broken versions, and we can't include the system header because it's incomplete. +// So below we duplicate the broken declarations here and work around the problem with cast_ptr. These declarations +// will have to be removed when MinGW is fixed. + +extern "C" { +#if !defined( BOOST_NO_ANSI_APIS ) +#if !defined( BOOST_WINAPI_IS_MINGW ) || !defined( UNICODE ) +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptEnumProvidersA( + boost::detail::winapi::DWORD_ dwIndex, + boost::detail::winapi::DWORD_ *pdwReserved, + boost::detail::winapi::DWORD_ dwFlags, + boost::detail::winapi::DWORD_ *pdwProvType, + boost::detail::winapi::LPSTR_ szProvName, + boost::detail::winapi::DWORD_ *pcbProvName); +#else +// Broken declaration in MinGW +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptEnumProvidersA( + boost::detail::winapi::DWORD_ dwIndex, + boost::detail::winapi::DWORD_ *pdwReserved, + boost::detail::winapi::DWORD_ dwFlags, + boost::detail::winapi::DWORD_ *pdwProvType, + boost::detail::winapi::LPWSTR_ szProvName, + boost::detail::winapi::DWORD_ *pcbProvName); +#endif + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptAcquireContextA( + boost::detail::winapi::HCRYPTPROV_ *phProv, + boost::detail::winapi::LPCSTR_ pszContainer, + boost::detail::winapi::LPCSTR_ pszProvider, + boost::detail::winapi::DWORD_ dwProvType, + boost::detail::winapi::DWORD_ dwFlags); +#endif // !defined( BOOST_NO_ANSI_APIS ) + +#if !defined( BOOST_WINAPI_IS_MINGW ) || defined( UNICODE ) +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptEnumProvidersW( + boost::detail::winapi::DWORD_ dwIndex, + boost::detail::winapi::DWORD_ *pdwReserved, + boost::detail::winapi::DWORD_ dwFlags, + boost::detail::winapi::DWORD_ *pdwProvType, + boost::detail::winapi::LPWSTR_ szProvName, + boost::detail::winapi::DWORD_ *pcbProvName); +#else +// Broken declaration in MinGW +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptEnumProvidersW( + boost::detail::winapi::DWORD_ dwIndex, + boost::detail::winapi::DWORD_ *pdwReserved, + boost::detail::winapi::DWORD_ dwFlags, + boost::detail::winapi::DWORD_ *pdwProvType, + boost::detail::winapi::LPSTR_ szProvName, + boost::detail::winapi::DWORD_ *pcbProvName); +#endif + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptAcquireContextW( + boost::detail::winapi::HCRYPTPROV_ *phProv, + boost::detail::winapi::LPCWSTR_ szContainer, + boost::detail::winapi::LPCWSTR_ szProvider, + boost::detail::winapi::DWORD_ dwProvType, + boost::detail::winapi::DWORD_ dwFlags); + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptGenRandom( + boost::detail::winapi::HCRYPTPROV_ hProv, + boost::detail::winapi::DWORD_ dwLen, + boost::detail::winapi::BYTE_ *pbBuffer); + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptReleaseContext( + boost::detail::winapi::HCRYPTPROV_ hProv, + boost::detail::winapi::DWORD_ dwFlags); +} +#endif // !defined( BOOST_USE_WINDOWS_H ) + +namespace boost { +namespace detail { +namespace winapi { + +#if defined( BOOST_USE_WINDOWS_H ) + +typedef ::HCRYPTPROV HCRYPTPROV_; + +const DWORD_ PROV_RSA_FULL_ = PROV_RSA_FULL; + +const DWORD_ CRYPT_VERIFYCONTEXT_ = CRYPT_VERIFYCONTEXT; +const DWORD_ CRYPT_NEWKEYSET_ = CRYPT_NEWKEYSET; +const DWORD_ CRYPT_DELETEKEYSET_ = CRYPT_DELETEKEYSET; +const DWORD_ CRYPT_MACHINE_KEYSET_ = CRYPT_MACHINE_KEYSET; +const DWORD_ CRYPT_SILENT_ = CRYPT_SILENT; + +#else + +const DWORD_ PROV_RSA_FULL_ = 1; + +const DWORD_ CRYPT_VERIFYCONTEXT_ = 0xF0000000; +const DWORD_ CRYPT_NEWKEYSET_ = 8; +const DWORD_ CRYPT_DELETEKEYSET_ = 16; +const DWORD_ CRYPT_MACHINE_KEYSET_ = 32; +const DWORD_ CRYPT_SILENT_ = 64; + +#endif + +#if !defined( BOOST_NO_ANSI_APIS ) +using ::CryptEnumProvidersA; +using ::CryptAcquireContextA; +#endif +using ::CryptEnumProvidersW; +using ::CryptAcquireContextW; +using ::CryptGenRandom; +using ::CryptReleaseContext; + +#if !defined( BOOST_NO_ANSI_APIS ) +BOOST_FORCEINLINE BOOL_ crypt_enum_providers( + DWORD_ dwIndex, + DWORD_ *pdwReserved, + DWORD_ dwFlags, + DWORD_ *pdwProvType, + LPSTR_ szProvName, + DWORD_ *pcbProvName) +{ + return ::CryptEnumProvidersA(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName); +} + +BOOST_FORCEINLINE BOOL_ crypt_acquire_context( + HCRYPTPROV_ *phProv, + LPCSTR_ pszContainer, + LPCSTR_ pszProvider, + DWORD_ dwProvType, + DWORD_ dwFlags) +{ + return ::CryptAcquireContextA(phProv, pszContainer, pszProvider, dwProvType, dwFlags); +} +#endif + +BOOST_FORCEINLINE BOOL_ crypt_enum_providers( + DWORD_ dwIndex, + DWORD_ *pdwReserved, + DWORD_ dwFlags, + DWORD_ *pdwProvType, + LPWSTR_ szProvName, + DWORD_ *pcbProvName) +{ + return ::CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName); +} + +BOOST_FORCEINLINE BOOL_ crypt_acquire_context( + HCRYPTPROV_ *phProv, + LPCWSTR_ szContainer, + LPCWSTR_ szProvider, + DWORD_ dwProvType, + DWORD_ dwFlags) +{ + return ::CryptAcquireContextW(phProv, szContainer, szProvider, dwProvType, dwFlags); +} + +} +} +} + +#endif // BOOST_DETAIL_WINAPI_CRYPT_HPP diff --git a/contrib/src/boost/detail/winapi/detail/cast_ptr.hpp b/contrib/src/boost/detail/winapi/detail/cast_ptr.hpp new file mode 100644 index 0000000..261007e --- /dev/null +++ b/contrib/src/boost/detail/winapi/detail/cast_ptr.hpp @@ -0,0 +1,40 @@ +// cast_ptr.hpp --------------------------------------------------------------// + +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP +#define BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost { +namespace detail { +namespace winapi { +namespace detail { + +//! This class is used to automatically cast pointers to the type used in the current Windows SDK function declarations +class cast_ptr +{ +private: + const void* m_p; + +public: + explicit BOOST_FORCEINLINE cast_ptr(const void* p) BOOST_NOEXCEPT : m_p(p) {} + template< typename T > + BOOST_FORCEINLINE operator T* () const BOOST_NOEXCEPT { return (T*)m_p; } +}; + +} +} +} +} + +#endif // BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP diff --git a/contrib/src/boost/detail/winapi/process.hpp b/contrib/src/boost/detail/winapi/process.hpp new file mode 100644 index 0000000..3c3de56 --- /dev/null +++ b/contrib/src/boost/detail/winapi/process.hpp @@ -0,0 +1,34 @@ +// process.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_PROCESS_HPP +#define BOOST_DETAIL_WINAPI_PROCESS_HPP + +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +// Windows CE define GetCurrentProcessId as an inline function in kfuncs.h +#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetCurrentProcessId(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::GetCurrentProcessId; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_PROCESS_HPP diff --git a/contrib/src/boost/detail/winapi/thread.hpp b/contrib/src/boost/detail/winapi/thread.hpp new file mode 100644 index 0000000..9367d46 --- /dev/null +++ b/contrib/src/boost/detail/winapi/thread.hpp @@ -0,0 +1,46 @@ +// thread.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_THREAD_HPP +#define BOOST_DETAIL_WINAPI_THREAD_HPP + +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if !defined( BOOST_USE_WINDOWS_H ) +extern "C" { +// Windows CE define GetCurrentThreadId as an inline function in kfuncs.h +#if !defined( UNDER_CE ) +BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetCurrentThreadId(BOOST_DETAIL_WINAPI_VOID); +#endif +BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI +SleepEx( + boost::detail::winapi::DWORD_ dwMilliseconds, + boost::detail::winapi::BOOL_ bAlertable); +BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI Sleep(boost::detail::winapi::DWORD_ dwMilliseconds); +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI SwitchToThread(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::GetCurrentThreadId; +using ::SleepEx; +using ::Sleep; +using ::SwitchToThread; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_THREAD_HPP diff --git a/contrib/src/boost/detail/winapi/timers.hpp b/contrib/src/boost/detail/winapi/timers.hpp new file mode 100644 index 0000000..c3bf826 --- /dev/null +++ b/contrib/src/boost/detail/winapi/timers.hpp @@ -0,0 +1,48 @@ +// timers.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_TIMERS_HPP +#define BOOST_DETAIL_WINAPI_TIMERS_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if !defined( BOOST_USE_WINDOWS_H ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +QueryPerformanceCounter(::_LARGE_INTEGER* lpPerformanceCount); + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +QueryPerformanceFrequency(::_LARGE_INTEGER* lpFrequency); +} +#endif + + +namespace boost { +namespace detail { +namespace winapi { + +BOOST_FORCEINLINE BOOL_ QueryPerformanceCounter(LARGE_INTEGER_* lpPerformanceCount) +{ + return ::QueryPerformanceCounter(reinterpret_cast< ::_LARGE_INTEGER* >(lpPerformanceCount)); +} + +BOOST_FORCEINLINE BOOL_ QueryPerformanceFrequency(LARGE_INTEGER_* lpFrequency) +{ + return ::QueryPerformanceFrequency(reinterpret_cast< ::_LARGE_INTEGER* >(lpFrequency)); +} + +} +} +} + +#endif // BOOST_DETAIL_WINAPI_TIMERS_HPP diff --git a/contrib/src/boost/detail/workaround.hpp b/contrib/src/boost/detail/workaround.hpp new file mode 100644 index 0000000..40b3423 --- /dev/null +++ b/contrib/src/boost/detail/workaround.hpp @@ -0,0 +1,267 @@ +// Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef WORKAROUND_DWA2002126_HPP +# define WORKAROUND_DWA2002126_HPP + +// Compiler/library version workaround macro +// +// Usage: +// +// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// // workaround for eVC4 and VC6 +// ... // workaround code here +// #endif +// +// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the +// first argument must be undefined or expand to a numeric +// value. The above expands to: +// +// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300 +// +// When used for workarounds that apply to the latest known version +// and all earlier versions of a compiler, the following convention +// should be observed: +// +// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301)) +// +// The version number in this case corresponds to the last version in +// which the workaround was known to have been required. When +// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro +// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates +// the workaround for any version of the compiler. When +// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or +// error will be issued if the compiler version exceeds the argument +// to BOOST_TESTED_AT(). This can be used to locate workarounds which +// may be obsoleted by newer versions. + +# ifndef BOOST_STRICT_CONFIG + +#include + +#ifndef __BORLANDC__ +#define __BORLANDC___WORKAROUND_GUARD 1 +#else +#define __BORLANDC___WORKAROUND_GUARD 0 +#endif +#ifndef __CODEGEARC__ +#define __CODEGEARC___WORKAROUND_GUARD 1 +#else +#define __CODEGEARC___WORKAROUND_GUARD 0 +#endif +#ifndef _MSC_VER +#define _MSC_VER_WORKAROUND_GUARD 1 +#else +#define _MSC_VER_WORKAROUND_GUARD 0 +#endif +#ifndef _MSC_FULL_VER +#define _MSC_FULL_VER_WORKAROUND_GUARD 1 +#else +#define _MSC_FULL_VER_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_MSVC +#define BOOST_MSVC_WORKAROUND_GUARD 1 +#else +#define BOOST_MSVC_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_MSVC_FULL_VER +#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1 +#else +#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC__ +#define __GNUC___WORKAROUND_GUARD 1 +#else +#define __GNUC___WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC_MINOR__ +#define __GNUC_MINOR___WORKAROUND_GUARD 1 +#else +#define __GNUC_MINOR___WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC_PATCHLEVEL__ +#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1 +#else +#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0 +#endif +#ifndef __IBMCPP__ +#define __IBMCPP___WORKAROUND_GUARD 1 +#else +#define __IBMCPP___WORKAROUND_GUARD 0 +#endif +#ifndef __SUNPRO_CC +#define __SUNPRO_CC_WORKAROUND_GUARD 1 +#else +#define __SUNPRO_CC_WORKAROUND_GUARD 0 +#endif +#ifndef __DECCXX_VER +#define __DECCXX_VER_WORKAROUND_GUARD 1 +#else +#define __DECCXX_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __MWERKS__ +#define __MWERKS___WORKAROUND_GUARD 1 +#else +#define __MWERKS___WORKAROUND_GUARD 0 +#endif +#ifndef __EDG__ +#define __EDG___WORKAROUND_GUARD 1 +#else +#define __EDG___WORKAROUND_GUARD 0 +#endif +#ifndef __EDG_VERSION__ +#define __EDG_VERSION___WORKAROUND_GUARD 1 +#else +#define __EDG_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef __HP_aCC +#define __HP_aCC_WORKAROUND_GUARD 1 +#else +#define __HP_aCC_WORKAROUND_GUARD 0 +#endif +#ifndef __hpxstd98 +#define __hpxstd98_WORKAROUND_GUARD 1 +#else +#define __hpxstd98_WORKAROUND_GUARD 0 +#endif +#ifndef _CRAYC +#define _CRAYC_WORKAROUND_GUARD 1 +#else +#define _CRAYC_WORKAROUND_GUARD 0 +#endif +#ifndef __DMC__ +#define __DMC___WORKAROUND_GUARD 1 +#else +#define __DMC___WORKAROUND_GUARD 0 +#endif +#ifndef MPW_CPLUS +#define MPW_CPLUS_WORKAROUND_GUARD 1 +#else +#define MPW_CPLUS_WORKAROUND_GUARD 0 +#endif +#ifndef __COMO__ +#define __COMO___WORKAROUND_GUARD 1 +#else +#define __COMO___WORKAROUND_GUARD 0 +#endif +#ifndef __COMO_VERSION__ +#define __COMO_VERSION___WORKAROUND_GUARD 1 +#else +#define __COMO_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef __INTEL_COMPILER +#define __INTEL_COMPILER_WORKAROUND_GUARD 1 +#else +#define __INTEL_COMPILER_WORKAROUND_GUARD 0 +#endif +#ifndef __ICL +#define __ICL_WORKAROUND_GUARD 1 +#else +#define __ICL_WORKAROUND_GUARD 0 +#endif +#ifndef _COMPILER_VERSION +#define _COMPILER_VERSION_WORKAROUND_GUARD 1 +#else +#define _COMPILER_VERSION_WORKAROUND_GUARD 0 +#endif + +#ifndef _RWSTD_VER +#define _RWSTD_VER_WORKAROUND_GUARD 1 +#else +#define _RWSTD_VER_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_RWSTD_VER +#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1 +#else +#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __GLIBCPP__ +#define __GLIBCPP___WORKAROUND_GUARD 1 +#else +#define __GLIBCPP___WORKAROUND_GUARD 0 +#endif +#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC +#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1 +#else +#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0 +#endif +#ifndef __SGI_STL_PORT +#define __SGI_STL_PORT_WORKAROUND_GUARD 1 +#else +#define __SGI_STL_PORT_WORKAROUND_GUARD 0 +#endif +#ifndef _STLPORT_VERSION +#define _STLPORT_VERSION_WORKAROUND_GUARD 1 +#else +#define _STLPORT_VERSION_WORKAROUND_GUARD 0 +#endif +#ifndef __LIBCOMO_VERSION__ +#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1 +#else +#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef _CPPLIB_VER +#define _CPPLIB_VER_WORKAROUND_GUARD 1 +#else +#define _CPPLIB_VER_WORKAROUND_GUARD 0 +#endif + +#ifndef BOOST_INTEL_CXX_VERSION +#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_INTEL_WIN +#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_DINKUMWARE_STDLIB +#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1 +#else +#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_INTEL +#define BOOST_INTEL_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_WORKAROUND_GUARD 0 +#endif +// Always define to zero, if it's used it'll be defined my MPL: +#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0 + +# define BOOST_WORKAROUND(symbol, test) \ + ((symbol ## _WORKAROUND_GUARD + 0 == 0) && \ + (symbol != 0) && (1 % (( (symbol test) ) + 1))) +// ^ ^ ^ ^ +// The extra level of parenthesis nesting above, along with the +// BOOST_OPEN_PAREN indirection below, is required to satisfy the +// broken preprocessor in MWCW 8.3 and earlier. +// +// The basic mechanism works as follows: +// (symbol test) + 1 => if (symbol test) then 2 else 1 +// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0 +// +// The complication with % is for cooperation with BOOST_TESTED_AT(). +// When "test" is BOOST_TESTED_AT(x) and +// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined, +// +// symbol test => if (symbol <= x) then 1 else -1 +// (symbol test) + 1 => if (symbol <= x) then 2 else 0 +// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero +// + +# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS +# define BOOST_OPEN_PAREN ( +# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1 +# else +# define BOOST_TESTED_AT(value) != ((value)-(value)) +# endif + +# else + +# define BOOST_WORKAROUND(symbol, test) 0 + +# endif + +#endif // WORKAROUND_DWA2002126_HPP diff --git a/contrib/src/boost/dynamic_bitset.hpp b/contrib/src/boost/dynamic_bitset.hpp new file mode 100644 index 0000000..29e1038 --- /dev/null +++ b/contrib/src/boost/dynamic_bitset.hpp @@ -0,0 +1,17 @@ +// ----------------------------------------------------------- +// +// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek +// Copyright (c) 2003-2004, 2008 Gennaro Prota +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +#ifndef BOOST_DYNAMIC_BITSET_HPP +#define BOOST_DYNAMIC_BITSET_HPP + +#include "boost/dynamic_bitset/dynamic_bitset.hpp" + +#endif // include guard diff --git a/contrib/src/boost/dynamic_bitset/config.hpp b/contrib/src/boost/dynamic_bitset/config.hpp new file mode 100644 index 0000000..1e6d9f7 --- /dev/null +++ b/contrib/src/boost/dynamic_bitset/config.hpp @@ -0,0 +1,72 @@ +// ----------------------------------------------------------- +// +// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek +// Copyright (c) 2003-2006, 2008 Gennaro Prota +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +#ifndef BOOST_DYNAMIC_BITSET_CONFIG_HPP_GP_20040424 +#define BOOST_DYNAMIC_BITSET_CONFIG_HPP_GP_20040424 + +#include "boost/config.hpp" +#include "boost/detail/workaround.hpp" + +// support for pre 3.0 libstdc++ - thanks Phil Edwards! +#if defined (__STL_CONFIG_H) && !defined (__STL_USE_NEW_IOSTREAMS) +# define BOOST_OLD_IOSTREAMS +#endif + +// no-op function to workaround gcc bug c++/8419 +// +namespace boost { namespace detail { + template T make_non_const(T t) { return t; } +}} + +#if defined(__GNUC__) +# define BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(expr) \ + (boost::detail::make_non_const(expr)) +#else +# define BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(expr) (expr) +#endif + +// +#if (defined __BORLANDC__ && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))) \ + || (defined BOOST_NO_MEMBER_TEMPLATE_FRIENDS) +#define BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS +#endif + +// if we can't use friends then we simply expose private members +// +#if defined(BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS) +#define BOOST_DYNAMIC_BITSET_PRIVATE public +#else +#define BOOST_DYNAMIC_BITSET_PRIVATE private +#endif + +// A couple of macros to cope with libraries without locale +// support. The first macro must be used to declare a reference +// to a ctype facet. The second one to widen a char by using +// that ctype object. If facets and locales aren't available +// the first macro is a no-op and the second one just expands +// to its parameter c. +// +#if defined (BOOST_USE_FACET) + +#define BOOST_DYNAMIC_BITSET_CTYPE_FACET(ch, name, loc) \ + const std::ctype & name = \ + BOOST_USE_FACET(std::ctype, loc) /**/ + +#define BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, c) \ + (fac.widen(c)) +#else + +#define BOOST_DYNAMIC_BITSET_CTYPE_FACET(ch, name, loc) /**/ +#define BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, c) c + +#endif + +#endif // include guard diff --git a/contrib/src/boost/dynamic_bitset/dynamic_bitset.hpp b/contrib/src/boost/dynamic_bitset/dynamic_bitset.hpp new file mode 100644 index 0000000..f6002d8 --- /dev/null +++ b/contrib/src/boost/dynamic_bitset/dynamic_bitset.hpp @@ -0,0 +1,1867 @@ +// ----------------------------------------------------------- +// +// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek +// Copyright (c) 2003-2006, 2008 Gennaro Prota +// Copyright (c) 2014 Ahmed Charles +// +// Copyright (c) 2014 Glen Joseph Fernandes +// glenfe at live dot com +// Copyright (c) 2014 Riccardo Marcangelo +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +#ifndef BOOST_DYNAMIC_BITSET_DYNAMIC_BITSET_HPP +#define BOOST_DYNAMIC_BITSET_DYNAMIC_BITSET_HPP + +#include +#include +#include +#include +#include +#include // for CHAR_BIT + +#include "boost/dynamic_bitset/config.hpp" + +#ifndef BOOST_NO_STD_LOCALE +# include +#endif + +#if defined(BOOST_OLD_IOSTREAMS) +# include +# include // for isspace +#else +# include +# include +#endif + +#include "boost/dynamic_bitset_fwd.hpp" +#include "boost/detail/dynamic_bitset.hpp" +#include "boost/detail/iterator.hpp" // used to implement append(Iter, Iter) +#include "boost/move/move.hpp" +#include "boost/limits.hpp" +#include "boost/pending/lowest_bit.hpp" +#include "boost/static_assert.hpp" +#include "boost/utility/addressof.hpp" +#include "boost/detail/no_exceptions_support.hpp" +#include "boost/throw_exception.hpp" + + +namespace boost { + +template +class dynamic_bitset +{ + // Portability note: member function templates are defined inside + // this class definition to avoid problems with VC++. Similarly, + // with the member functions of nested classes. + // + // [October 2008: the note above is mostly historical; new versions + // of VC++ are likely able to digest a more drinking form of the + // code; but changing it now is probably not worth the risks...] + + BOOST_STATIC_ASSERT((bool)detail::dynamic_bitset_impl::allowed_block_type::value); + typedef std::vector buffer_type; + +public: + typedef Block block_type; + typedef Allocator allocator_type; + typedef std::size_t size_type; + typedef typename buffer_type::size_type block_width_type; + + BOOST_STATIC_CONSTANT(block_width_type, bits_per_block = (std::numeric_limits::digits)); + BOOST_STATIC_CONSTANT(size_type, npos = static_cast(-1)); + + +public: + + // A proxy class to simulate lvalues of bit type. + // + class reference + { + friend class dynamic_bitset; + + + // the one and only non-copy ctor + reference(block_type & b, block_type pos) + :m_block(b), + m_mask( (assert(pos < bits_per_block), + block_type(1) << pos ) + ) + { } + + void operator&(); // left undefined + + public: + + // copy constructor: compiler generated + + operator bool() const { return (m_block & m_mask) != 0; } + bool operator~() const { return (m_block & m_mask) == 0; } + + reference& flip() { do_flip(); return *this; } + + reference& operator=(bool x) { do_assign(x); return *this; } // for b[i] = x + reference& operator=(const reference& rhs) { do_assign(rhs); return *this; } // for b[i] = b[j] + + reference& operator|=(bool x) { if (x) do_set(); return *this; } + reference& operator&=(bool x) { if (!x) do_reset(); return *this; } + reference& operator^=(bool x) { if (x) do_flip(); return *this; } + reference& operator-=(bool x) { if (x) do_reset(); return *this; } + + private: + block_type & m_block; + const block_type m_mask; + + void do_set() { m_block |= m_mask; } + void do_reset() { m_block &= ~m_mask; } + void do_flip() { m_block ^= m_mask; } + void do_assign(bool x) { x? do_set() : do_reset(); } + }; + + typedef bool const_reference; + + // constructors, etc. + explicit + dynamic_bitset(const Allocator& alloc = Allocator()); + + explicit + dynamic_bitset(size_type num_bits, unsigned long value = 0, + const Allocator& alloc = Allocator()); + + + // WARNING: you should avoid using this constructor. + // + // A conversion from string is, in most cases, formatting, + // and should be performed by using operator>>. + // + // NOTE: + // Leave the parentheses around std::basic_string::npos. + // g++ 3.2 requires them and probably the standard will - see core issue 325 + // NOTE 2: + // split into two constructors because of bugs in MSVC 6.0sp5 with STLport + + template + dynamic_bitset(const std::basic_string& s, + typename std::basic_string::size_type pos, + typename std::basic_string::size_type n, + size_type num_bits = npos, + const Allocator& alloc = Allocator()) + + :m_bits(alloc), + m_num_bits(0) + { + init_from_string(s, pos, n, num_bits); + } + + template + explicit + dynamic_bitset(const std::basic_string& s, + typename std::basic_string::size_type pos = 0) + + :m_bits(Allocator()), + m_num_bits(0) + { + init_from_string(s, pos, (std::basic_string::npos), + npos); + } + + // The first bit in *first is the least significant bit, and the + // last bit in the block just before *last is the most significant bit. + template + dynamic_bitset(BlockInputIterator first, BlockInputIterator last, + const Allocator& alloc = Allocator()) + + :m_bits(alloc), + m_num_bits(0) + { + using boost::detail::dynamic_bitset_impl::value_to_type; + using boost::detail::dynamic_bitset_impl::is_numeric; + + const value_to_type< + is_numeric::value> selector; + + dispatch_init(first, last, selector); + } + + template + void dispatch_init(T num_bits, unsigned long value, + detail::dynamic_bitset_impl::value_to_type) + { + init_from_unsigned_long(static_cast(num_bits), value); + } + + template + void dispatch_init(T first, T last, + detail::dynamic_bitset_impl::value_to_type) + { + init_from_block_range(first, last); + } + + template + void init_from_block_range(BlockIter first, BlockIter last) + { + assert(m_bits.size() == 0); + m_bits.insert(m_bits.end(), first, last); + m_num_bits = m_bits.size() * bits_per_block; + } + + // copy constructor + dynamic_bitset(const dynamic_bitset& b); + + ~dynamic_bitset(); + + void swap(dynamic_bitset& b); + dynamic_bitset& operator=(const dynamic_bitset& b); + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + dynamic_bitset(dynamic_bitset&& src); + dynamic_bitset& operator=(dynamic_bitset&& src); +#endif // BOOST_NO_CXX11_RVALUE_REFERENCES + + allocator_type get_allocator() const; + + // size changing operations + void resize(size_type num_bits, bool value = false); + void clear(); + void push_back(bool bit); + void pop_back(); + void append(Block block); + + template + void m_append(BlockInputIterator first, BlockInputIterator last, std::input_iterator_tag) + { + std::vector v(first, last); + m_append(v.begin(), v.end(), std::random_access_iterator_tag()); + } + template + void m_append(BlockInputIterator first, BlockInputIterator last, std::forward_iterator_tag) + { + assert(first != last); + block_width_type r = count_extra_bits(); + std::size_t d = boost::detail::distance(first, last); + m_bits.reserve(num_blocks() + d); + if (r == 0) { + for( ; first != last; ++first) + m_bits.push_back(*first); // could use vector<>::insert() + } + else { + m_highest_block() |= (*first << r); + do { + Block b = *first >> (bits_per_block - r); + ++first; + m_bits.push_back(b | (first==last? 0 : *first << r)); + } while (first != last); + } + m_num_bits += bits_per_block * d; + } + template + void append(BlockInputIterator first, BlockInputIterator last) // strong guarantee + { + if (first != last) { + typename detail::iterator_traits::iterator_category cat; + m_append(first, last, cat); + } + } + + + // bitset operations + dynamic_bitset& operator&=(const dynamic_bitset& b); + dynamic_bitset& operator|=(const dynamic_bitset& b); + dynamic_bitset& operator^=(const dynamic_bitset& b); + dynamic_bitset& operator-=(const dynamic_bitset& b); + dynamic_bitset& operator<<=(size_type n); + dynamic_bitset& operator>>=(size_type n); + dynamic_bitset operator<<(size_type n) const; + dynamic_bitset operator>>(size_type n) const; + + // basic bit operations + dynamic_bitset& set(size_type n, bool val = true); + dynamic_bitset& set(); + dynamic_bitset& reset(size_type n); + dynamic_bitset& reset(); + dynamic_bitset& flip(size_type n); + dynamic_bitset& flip(); + bool test(size_type n) const; + bool test_set(size_type n, bool val = true); + bool all() const; + bool any() const; + bool none() const; + dynamic_bitset operator~() const; + size_type count() const BOOST_NOEXCEPT; + + // subscript + reference operator[](size_type pos) { + return reference(m_bits[block_index(pos)], bit_index(pos)); + } + bool operator[](size_type pos) const { return test(pos); } + + unsigned long to_ulong() const; + + size_type size() const BOOST_NOEXCEPT; + size_type num_blocks() const BOOST_NOEXCEPT; + size_type max_size() const BOOST_NOEXCEPT; + bool empty() const BOOST_NOEXCEPT; + + bool is_subset_of(const dynamic_bitset& a) const; + bool is_proper_subset_of(const dynamic_bitset& a) const; + bool intersects(const dynamic_bitset & a) const; + + // lookup + size_type find_first() const; + size_type find_next(size_type pos) const; + + +#if !defined BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS + // lexicographical comparison + template + friend bool operator==(const dynamic_bitset& a, + const dynamic_bitset& b); + + template + friend bool operator<(const dynamic_bitset& a, + const dynamic_bitset& b); + + + template + friend void to_block_range(const dynamic_bitset& b, + BlockOutputIterator result); + + template + friend void from_block_range(BlockIterator first, BlockIterator last, + dynamic_bitset& result); + + + template + friend std::basic_istream& operator>>(std::basic_istream& is, + dynamic_bitset& b); + + template + friend void to_string_helper(const dynamic_bitset & b, stringT & s, bool dump_all); + + +#endif + + +private: + BOOST_STATIC_CONSTANT(block_width_type, ulong_width = std::numeric_limits::digits); + + void m_zero_unused_bits(); + bool m_check_invariants() const; + + size_type m_do_find_from(size_type first_block) const; + + block_width_type count_extra_bits() const BOOST_NOEXCEPT { return bit_index(size()); } + static size_type block_index(size_type pos) BOOST_NOEXCEPT { return pos / bits_per_block; } + static block_width_type bit_index(size_type pos) BOOST_NOEXCEPT { return static_cast(pos % bits_per_block); } + static Block bit_mask(size_type pos) BOOST_NOEXCEPT { return Block(1) << bit_index(pos); } + + template + void init_from_string(const std::basic_string& s, + typename std::basic_string::size_type pos, + typename std::basic_string::size_type n, + size_type num_bits) + { + assert(pos <= s.size()); + + typedef typename std::basic_string StrT; + typedef typename StrT::traits_type Tr; + + const typename StrT::size_type rlen = (std::min)(n, s.size() - pos); + const size_type sz = ( num_bits != npos? num_bits : rlen); + m_bits.resize(calc_num_blocks(sz)); + m_num_bits = sz; + + + BOOST_DYNAMIC_BITSET_CTYPE_FACET(CharT, fac, std::locale()); + const CharT one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1'); + + const size_type m = num_bits < rlen ? num_bits : rlen; + typename StrT::size_type i = 0; + for( ; i < m; ++i) { + + const CharT c = s[(pos + m - 1) - i]; + + assert( Tr::eq(c, one) + || Tr::eq(c, BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0')) ); + + if (Tr::eq(c, one)) + set(i); + + } + + } + + void init_from_unsigned_long(size_type num_bits, + unsigned long value/*, + const Allocator& alloc*/) + { + + assert(m_bits.size() == 0); + + m_bits.resize(calc_num_blocks(num_bits)); + m_num_bits = num_bits; + + typedef unsigned long num_type; + typedef boost::detail::dynamic_bitset_impl + ::shifter shifter; + + //if (num_bits == 0) + // return; + + // zero out all bits at pos >= num_bits, if any; + // note that: num_bits == 0 implies value == 0 + if (num_bits < static_cast(ulong_width)) { + const num_type mask = (num_type(1) << num_bits) - 1; + value &= mask; + } + + typename buffer_type::iterator it = m_bits.begin(); + for( ; value; shifter::left_shift(value), ++it) { + *it = static_cast(value); + } + + } + + + +BOOST_DYNAMIC_BITSET_PRIVATE: + + bool m_unchecked_test(size_type pos) const; + static size_type calc_num_blocks(size_type num_bits); + + Block& m_highest_block(); + const Block& m_highest_block() const; + + buffer_type m_bits; + size_type m_num_bits; + + + class bit_appender; + friend class bit_appender; + class bit_appender { + // helper for stream >> + // Supplies to the lack of an efficient append at the less + // significant end: bits are actually appended "at left" but + // rearranged in the destructor. From the perspective of + // client code everything works *as if* dynamic_bitset<> had + // an append_at_right() function (eventually throwing the same + // exceptions as push_back) except that the function is in fact + // called bit_appender::do_append(). + // + dynamic_bitset & bs; + size_type n; + Block mask; + Block * current; + + // not implemented + bit_appender(const bit_appender &); + bit_appender & operator=(const bit_appender &); + + public: + bit_appender(dynamic_bitset & r) : bs(r), n(0), mask(0), current(0) {} + ~bit_appender() { + // reverse the order of blocks, shift + // if needed, and then resize + // + std::reverse(bs.m_bits.begin(), bs.m_bits.end()); + const block_width_type offs = bit_index(n); + if (offs) + bs >>= (bits_per_block - offs); + bs.resize(n); // doesn't enlarge, so can't throw + assert(bs.m_check_invariants()); + } + inline void do_append(bool value) { + + if (mask == 0) { + bs.append(Block(0)); + current = &bs.m_highest_block(); + mask = Block(1) << (bits_per_block - 1); + } + + if(value) + *current |= mask; + + mask /= 2; + ++n; + } + size_type get_count() const { return n; } + }; + +}; + +#if !defined BOOST_NO_INCLASS_MEMBER_INITIALIZATION + +template +const typename dynamic_bitset::block_width_type +dynamic_bitset::bits_per_block; + +template +const typename dynamic_bitset::size_type +dynamic_bitset::npos; + +template +const typename dynamic_bitset::block_width_type +dynamic_bitset::ulong_width; + +#endif + +// Global Functions: + +// comparison +template +bool operator!=(const dynamic_bitset& a, + const dynamic_bitset& b); + +template +bool operator<=(const dynamic_bitset& a, + const dynamic_bitset& b); + +template +bool operator>(const dynamic_bitset& a, + const dynamic_bitset& b); + +template +bool operator>=(const dynamic_bitset& a, + const dynamic_bitset& b); + +// stream operators +#ifdef BOOST_OLD_IOSTREAMS +template +std::ostream& operator<<(std::ostream& os, + const dynamic_bitset& b); + +template +std::istream& operator>>(std::istream& is, dynamic_bitset& b); +#else +template +std::basic_ostream& +operator<<(std::basic_ostream& os, + const dynamic_bitset& b); + +template +std::basic_istream& +operator>>(std::basic_istream& is, + dynamic_bitset& b); +#endif + +// bitset operations +template +dynamic_bitset +operator&(const dynamic_bitset& b1, + const dynamic_bitset& b2); + +template +dynamic_bitset +operator|(const dynamic_bitset& b1, + const dynamic_bitset& b2); + +template +dynamic_bitset +operator^(const dynamic_bitset& b1, + const dynamic_bitset& b2); + +template +dynamic_bitset +operator-(const dynamic_bitset& b1, + const dynamic_bitset& b2); + +// namespace scope swap +template +void swap(dynamic_bitset& b1, + dynamic_bitset& b2); + + +template +void +to_string(const dynamic_bitset& b, stringT & s); + +template +void +to_block_range(const dynamic_bitset& b, + BlockOutputIterator result); + + +template +inline void +from_block_range(BlockIterator first, BlockIterator last, + dynamic_bitset& result) +{ + // PRE: distance(first, last) <= numblocks() + std::copy (first, last, result.m_bits.begin()); +} + +//============================================================================= +// dynamic_bitset implementation + + +//----------------------------------------------------------------------------- +// constructors, etc. + +template +dynamic_bitset::dynamic_bitset(const Allocator& alloc) + : m_bits(alloc), m_num_bits(0) +{ + +} + +template +dynamic_bitset:: +dynamic_bitset(size_type num_bits, unsigned long value, const Allocator& alloc) + : m_bits(alloc), + m_num_bits(0) +{ + init_from_unsigned_long(num_bits, value); +} + +// copy constructor +template +inline dynamic_bitset:: +dynamic_bitset(const dynamic_bitset& b) + : m_bits(b.m_bits), m_num_bits(b.m_num_bits) +{ + +} + +template +inline dynamic_bitset:: +~dynamic_bitset() +{ + assert(m_check_invariants()); +} + +template +inline void dynamic_bitset:: +swap(dynamic_bitset& b) // no throw +{ + std::swap(m_bits, b.m_bits); + std::swap(m_num_bits, b.m_num_bits); +} + +template +dynamic_bitset& dynamic_bitset:: +operator=(const dynamic_bitset& b) +{ + m_bits = b.m_bits; + m_num_bits = b.m_num_bits; + return *this; +} + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template +inline dynamic_bitset:: +dynamic_bitset(dynamic_bitset&& b) + : m_bits(boost::move(b.m_bits)), m_num_bits(boost::move(b.m_num_bits)) +{ + // Required so that assert(m_check_invariants()); works. + assert((b.m_bits = buffer_type()).empty()); + b.m_num_bits = 0; +} + +template +inline dynamic_bitset& dynamic_bitset:: +operator=(dynamic_bitset&& b) +{ + if (boost::addressof(b) == this) { return *this; } + + m_bits = boost::move(b.m_bits); + m_num_bits = boost::move(b.m_num_bits); + // Required so that assert(m_check_invariants()); works. + assert((b.m_bits = buffer_type()).empty()); + b.m_num_bits = 0; + return *this; +} + +#endif // BOOST_NO_CXX11_RVALUE_REFERENCES + +template +inline typename dynamic_bitset::allocator_type +dynamic_bitset::get_allocator() const +{ + return m_bits.get_allocator(); +} + +//----------------------------------------------------------------------------- +// size changing operations + +template +void dynamic_bitset:: +resize(size_type num_bits, bool value) // strong guarantee +{ + + const size_type old_num_blocks = num_blocks(); + const size_type required_blocks = calc_num_blocks(num_bits); + + const block_type v = value? ~Block(0) : Block(0); + + if (required_blocks != old_num_blocks) { + m_bits.resize(required_blocks, v); // s.g. (copy) + } + + + // At this point: + // + // - if the buffer was shrunk, we have nothing more to do, + // except a call to m_zero_unused_bits() + // + // - if it was enlarged, all the (used) bits in the new blocks have + // the correct value, but we have not yet touched those bits, if + // any, that were 'unused bits' before enlarging: if value == true, + // they must be set. + + if (value && (num_bits > m_num_bits)) { + + const block_width_type extra_bits = count_extra_bits(); + if (extra_bits) { + assert(old_num_blocks >= 1 && old_num_blocks <= m_bits.size()); + + // Set them. + m_bits[old_num_blocks - 1] |= (v << extra_bits); + } + + } + + m_num_bits = num_bits; + m_zero_unused_bits(); + +} + +template +void dynamic_bitset:: +clear() // no throw +{ + m_bits.clear(); + m_num_bits = 0; +} + + +template +void dynamic_bitset:: +push_back(bool bit) +{ + const size_type sz = size(); + resize(sz + 1); + set(sz, bit); +} + +template +void dynamic_bitset:: +pop_back() +{ + const size_type old_num_blocks = num_blocks(); + const size_type required_blocks = calc_num_blocks(m_num_bits - 1); + + if (required_blocks != old_num_blocks) { + m_bits.pop_back(); + } + + --m_num_bits; + m_zero_unused_bits(); +} + + +template +void dynamic_bitset:: +append(Block value) // strong guarantee +{ + const block_width_type r = count_extra_bits(); + + if (r == 0) { + // the buffer is empty, or all blocks are filled + m_bits.push_back(value); + } + else { + m_bits.push_back(value >> (bits_per_block - r)); + m_bits[m_bits.size() - 2] |= (value << r); // m_bits.size() >= 2 + } + + m_num_bits += bits_per_block; + assert(m_check_invariants()); + +} + + +//----------------------------------------------------------------------------- +// bitset operations +template +dynamic_bitset& +dynamic_bitset::operator&=(const dynamic_bitset& rhs) +{ + assert(size() == rhs.size()); + for (size_type i = 0; i < num_blocks(); ++i) + m_bits[i] &= rhs.m_bits[i]; + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::operator|=(const dynamic_bitset& rhs) +{ + assert(size() == rhs.size()); + for (size_type i = 0; i < num_blocks(); ++i) + m_bits[i] |= rhs.m_bits[i]; + //m_zero_unused_bits(); + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::operator^=(const dynamic_bitset& rhs) +{ + assert(size() == rhs.size()); + for (size_type i = 0; i < this->num_blocks(); ++i) + m_bits[i] ^= rhs.m_bits[i]; + //m_zero_unused_bits(); + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::operator-=(const dynamic_bitset& rhs) +{ + assert(size() == rhs.size()); + for (size_type i = 0; i < num_blocks(); ++i) + m_bits[i] &= ~rhs.m_bits[i]; + //m_zero_unused_bits(); + return *this; +} + +// +// NOTE: +// Note that the 'if (r != 0)' is crucial to avoid undefined +// behavior when the left hand operand of >> isn't promoted to a +// wider type (because rs would be too large). +// +template +dynamic_bitset& +dynamic_bitset::operator<<=(size_type n) +{ + if (n >= m_num_bits) + return reset(); + //else + if (n > 0) { + + size_type const last = num_blocks() - 1; // num_blocks() is >= 1 + size_type const div = n / bits_per_block; // div is <= last + block_width_type const r = bit_index(n); + block_type * const b = &m_bits[0]; + + if (r != 0) { + + block_width_type const rs = bits_per_block - r; + + for (size_type i = last-div; i>0; --i) { + b[i+div] = (b[i] << r) | (b[i-1] >> rs); + } + b[div] = b[0] << r; + + } + else { + for (size_type i = last-div; i>0; --i) { + b[i+div] = b[i]; + } + b[div] = b[0]; + } + + // zero out div blocks at the less significant end + std::fill_n(m_bits.begin(), div, static_cast(0)); + + // zero out any 1 bit that flowed into the unused part + m_zero_unused_bits(); // thanks to Lester Gong + + } + + return *this; + + +} + + +// +// NOTE: +// see the comments to operator <<= +// +template +dynamic_bitset & dynamic_bitset::operator>>=(size_type n) { + if (n >= m_num_bits) { + return reset(); + } + //else + if (n>0) { + + size_type const last = num_blocks() - 1; // num_blocks() is >= 1 + size_type const div = n / bits_per_block; // div is <= last + block_width_type const r = bit_index(n); + block_type * const b = &m_bits[0]; + + + if (r != 0) { + + block_width_type const ls = bits_per_block - r; + + for (size_type i = div; i < last; ++i) { + b[i-div] = (b[i] >> r) | (b[i+1] << ls); + } + // r bits go to zero + b[last-div] = b[last] >> r; + } + + else { + for (size_type i = div; i <= last; ++i) { + b[i-div] = b[i]; + } + // note the '<=': the last iteration 'absorbs' + // b[last-div] = b[last] >> 0; + } + + + + // div blocks are zero filled at the most significant end + std::fill_n(m_bits.begin() + (num_blocks()-div), div, static_cast(0)); + } + + return *this; +} + + +template +dynamic_bitset +dynamic_bitset::operator<<(size_type n) const +{ + dynamic_bitset r(*this); + return r <<= n; +} + +template +dynamic_bitset +dynamic_bitset::operator>>(size_type n) const +{ + dynamic_bitset r(*this); + return r >>= n; +} + + +//----------------------------------------------------------------------------- +// basic bit operations + +template +dynamic_bitset& +dynamic_bitset::set(size_type pos, bool val) +{ + assert(pos < m_num_bits); + + if (val) + m_bits[block_index(pos)] |= bit_mask(pos); + else + reset(pos); + + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::set() +{ + std::fill(m_bits.begin(), m_bits.end(), ~Block(0)); + m_zero_unused_bits(); + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::reset(size_type pos) +{ + assert(pos < m_num_bits); +#if defined __MWERKS__ && BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // 8.x + // CodeWarrior 8 generates incorrect code when the &=~ is compiled, + // use the |^ variation instead.. + m_bits[block_index(pos)] |= bit_mask(pos); + m_bits[block_index(pos)] ^= bit_mask(pos); +#else + m_bits[block_index(pos)] &= ~bit_mask(pos); +#endif + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::reset() +{ + std::fill(m_bits.begin(), m_bits.end(), Block(0)); + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::flip(size_type pos) +{ + assert(pos < m_num_bits); + m_bits[block_index(pos)] ^= bit_mask(pos); + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::flip() +{ + for (size_type i = 0; i < num_blocks(); ++i) + m_bits[i] = ~m_bits[i]; + m_zero_unused_bits(); + return *this; +} + +template +bool dynamic_bitset::m_unchecked_test(size_type pos) const +{ + return (m_bits[block_index(pos)] & bit_mask(pos)) != 0; +} + +template +bool dynamic_bitset::test(size_type pos) const +{ + assert(pos < m_num_bits); + return m_unchecked_test(pos); +} + +template +bool dynamic_bitset::test_set(size_type pos, bool val) +{ + bool const b = test(pos); + if (b != val) { + set(pos, val); + } + return b; +} + +template +bool dynamic_bitset::all() const +{ + if (empty()) { + return true; + } + + const block_width_type extra_bits = count_extra_bits(); + block_type const all_ones = ~static_cast(0); + + if (extra_bits == 0) { + for (size_type i = 0, e = num_blocks(); i < e; ++i) { + if (m_bits[i] != all_ones) { + return false; + } + } + } else { + for (size_type i = 0, e = num_blocks() - 1; i < e; ++i) { + if (m_bits[i] != all_ones) { + return false; + } + } + block_type const mask = ~(~static_cast(0) << extra_bits); + if (m_highest_block() != mask) { + return false; + } + } + return true; +} + +template +bool dynamic_bitset::any() const +{ + for (size_type i = 0; i < num_blocks(); ++i) + if (m_bits[i]) + return true; + return false; +} + +template +inline bool dynamic_bitset::none() const +{ + return !any(); +} + +template +dynamic_bitset +dynamic_bitset::operator~() const +{ + dynamic_bitset b(*this); + b.flip(); + return b; +} + +template +typename dynamic_bitset::size_type +dynamic_bitset::count() const BOOST_NOEXCEPT +{ + using detail::dynamic_bitset_impl::table_width; + using detail::dynamic_bitset_impl::access_by_bytes; + using detail::dynamic_bitset_impl::access_by_blocks; + using detail::dynamic_bitset_impl::value_to_type; + +#if BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ == 3) && (__GNUC_PATCHLEVEL__ == 3) + // NOTE: Explicit qualification of "bits_per_block" + // breaks compilation on gcc 4.3.3 + enum { no_padding = bits_per_block == CHAR_BIT * sizeof(Block) }; +#else + // NOTE: Explicitly qualifying "bits_per_block" to workaround + // regressions of gcc 3.4.x + enum { no_padding = + dynamic_bitset::bits_per_block + == CHAR_BIT * sizeof(Block) }; +#endif + + enum { enough_table_width = table_width >= CHAR_BIT }; + + enum { mode = (no_padding && enough_table_width) + ? access_by_bytes + : access_by_blocks }; + + return do_count(m_bits.begin(), num_blocks(), Block(0), + static_cast *>(0)); +} + + +//----------------------------------------------------------------------------- +// conversions + + +template +void to_string_helper(const dynamic_bitset & b, stringT & s, + bool dump_all) +{ + typedef typename stringT::traits_type Tr; + typedef typename stringT::value_type Ch; + + BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, std::locale()); + const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0'); + const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1'); + + // Note that this function may access (when + // dump_all == true) bits beyond position size() - 1 + + typedef typename dynamic_bitset::size_type size_type; + + const size_type len = dump_all? + dynamic_bitset::bits_per_block * b.num_blocks(): + b.size(); + s.assign (len, zero); + + for (size_type i = 0; i < len; ++i) { + if (b.m_unchecked_test(i)) + Tr::assign(s[len - 1 - i], one); + + } + +} + + +// A comment similar to the one about the constructor from +// basic_string can be done here. Thanks to James Kanze for +// making me (Gennaro) realize this important separation of +// concerns issue, as well as many things about i18n. +// +template +inline void +to_string(const dynamic_bitset& b, stringT& s) +{ + to_string_helper(b, s, false); +} + + +// Differently from to_string this function dumps out +// every bit of the internal representation (may be +// useful for debugging purposes) +// +template +inline void +dump_to_string(const dynamic_bitset& b, stringT& s) +{ + to_string_helper(b, s, true /* =dump_all*/); +} + +template +inline void +to_block_range(const dynamic_bitset& b, + BlockOutputIterator result) +{ + // note how this copies *all* bits, including the + // unused ones in the last block (which are zero) + std::copy(b.m_bits.begin(), b.m_bits.end(), result); +} + +template +unsigned long dynamic_bitset:: +to_ulong() const +{ + + if (m_num_bits == 0) + return 0; // convention + + // Check for overflows. This may be a performance burden on very + // large bitsets but is required by the specification, sorry + if (find_next(ulong_width - 1) != npos) + BOOST_THROW_EXCEPTION(std::overflow_error("boost::dynamic_bitset::to_ulong overflow")); + + + // Ok, from now on we can be sure there's no "on" bit + // beyond the "allowed" positions + typedef unsigned long result_type; + + const size_type maximum_size = + (std::min)(m_num_bits, static_cast(ulong_width)); + + const size_type last_block = block_index( maximum_size - 1 ); + + assert((last_block * bits_per_block) < static_cast(ulong_width)); + + result_type result = 0; + for (size_type i = 0; i <= last_block; ++i) { + const size_type offset = i * bits_per_block; + result |= (static_cast(m_bits[i]) << offset); + } + + return result; +} + +template +inline typename dynamic_bitset::size_type +dynamic_bitset::size() const BOOST_NOEXCEPT +{ + return m_num_bits; +} + +template +inline typename dynamic_bitset::size_type +dynamic_bitset::num_blocks() const BOOST_NOEXCEPT +{ + return m_bits.size(); +} + +template +inline typename dynamic_bitset::size_type +dynamic_bitset::max_size() const BOOST_NOEXCEPT +{ + // Semantics of vector<>::max_size() aren't very clear + // (see lib issue 197) and many library implementations + // simply return dummy values, _unrelated_ to the underlying + // allocator. + // + // Given these problems, I was tempted to not provide this + // function at all but the user could need it if he provides + // his own allocator. + // + + const size_type m = detail::dynamic_bitset_impl:: + vector_max_size_workaround(m_bits); + + return m <= (size_type(-1)/bits_per_block) ? + m * bits_per_block : + size_type(-1); +} + +template +inline bool dynamic_bitset::empty() const BOOST_NOEXCEPT +{ + return size() == 0; +} + +template +bool dynamic_bitset:: +is_subset_of(const dynamic_bitset& a) const +{ + assert(size() == a.size()); + for (size_type i = 0; i < num_blocks(); ++i) + if (m_bits[i] & ~a.m_bits[i]) + return false; + return true; +} + +template +bool dynamic_bitset:: +is_proper_subset_of(const dynamic_bitset& a) const +{ + assert(size() == a.size()); + assert(num_blocks() == a.num_blocks()); + + bool proper = false; + for (size_type i = 0; i < num_blocks(); ++i) { + const Block & bt = m_bits[i]; + const Block & ba = a.m_bits[i]; + + if (bt & ~ba) + return false; // not a subset at all + if (ba & ~bt) + proper = true; + } + return proper; +} + +template +bool dynamic_bitset::intersects(const dynamic_bitset & b) const +{ + size_type common_blocks = num_blocks() < b.num_blocks() + ? num_blocks() : b.num_blocks(); + + for(size_type i = 0; i < common_blocks; ++i) { + if(m_bits[i] & b.m_bits[i]) + return true; + } + return false; +} + +// -------------------------------- +// lookup + + +// look for the first bit "on", starting +// from the block with index first_block +// +template +typename dynamic_bitset::size_type +dynamic_bitset::m_do_find_from(size_type first_block) const +{ + size_type i = first_block; + + // skip null blocks + while (i < num_blocks() && m_bits[i] == 0) + ++i; + + if (i >= num_blocks()) + return npos; // not found + + return i * bits_per_block + static_cast(boost::lowest_bit(m_bits[i])); + +} + + +template +typename dynamic_bitset::size_type +dynamic_bitset::find_first() const +{ + return m_do_find_from(0); +} + + +template +typename dynamic_bitset::size_type +dynamic_bitset::find_next(size_type pos) const +{ + + const size_type sz = size(); + if (pos >= (sz-1) || sz == 0) + return npos; + + ++pos; + + const size_type blk = block_index(pos); + const block_width_type ind = bit_index(pos); + + // shift bits upto one immediately after current + const Block fore = m_bits[blk] >> ind; + + return fore? + pos + static_cast(lowest_bit(fore)) + : + m_do_find_from(blk + 1); + +} + + + +//----------------------------------------------------------------------------- +// comparison + +template +bool operator==(const dynamic_bitset& a, + const dynamic_bitset& b) +{ + return (a.m_num_bits == b.m_num_bits) + && (a.m_bits == b.m_bits); +} + +template +inline bool operator!=(const dynamic_bitset& a, + const dynamic_bitset& b) +{ + return !(a == b); +} + +template +bool operator<(const dynamic_bitset& a, + const dynamic_bitset& b) +{ + assert(a.size() == b.size()); + typedef typename dynamic_bitset::size_type size_type; + + //if (a.size() == 0) + // return false; + + // Since we are storing the most significant bit + // at pos == size() - 1, we need to do the comparisons in reverse. + // + for (size_type ii = a.num_blocks(); ii > 0; --ii) { + size_type i = ii-1; + if (a.m_bits[i] < b.m_bits[i]) + return true; + else if (a.m_bits[i] > b.m_bits[i]) + return false; + } + return false; +} + +template +inline bool operator<=(const dynamic_bitset& a, + const dynamic_bitset& b) +{ + return !(a > b); +} + +template +inline bool operator>(const dynamic_bitset& a, + const dynamic_bitset& b) +{ + return b < a; +} + +template +inline bool operator>=(const dynamic_bitset& a, + const dynamic_bitset& b) +{ + return !(a < b); +} + +//----------------------------------------------------------------------------- +// stream operations + +#ifdef BOOST_OLD_IOSTREAMS +template < typename Block, typename Alloc> +std::ostream& +operator<<(std::ostream& os, const dynamic_bitset& b) +{ + // NOTE: since this is aimed at "classic" iostreams, exception + // masks on the stream are not supported. The library that + // ships with gcc 2.95 has an exceptions() member function but + // nothing is actually implemented; not even the class ios::failure. + + using namespace std; + + const ios::iostate ok = ios::goodbit; + ios::iostate err = ok; + + if (os.opfx()) { + + //try + typedef typename dynamic_bitset::size_type bitsetsize_type; + + const bitsetsize_type sz = b.size(); + std::streambuf * buf = os.rdbuf(); + size_t npad = os.width() <= 0 // careful: os.width() is signed (and can be < 0) + || (bitsetsize_type) os.width() <= sz? 0 : os.width() - sz; + + const char fill_char = os.fill(); + const ios::fmtflags adjustfield = os.flags() & ios::adjustfield; + + // if needed fill at left; pad is decresed along the way + if (adjustfield != ios::left) { + for (; 0 < npad; --npad) + if (fill_char != buf->sputc(fill_char)) { + err |= ios::failbit; + break; + } + } + + if (err == ok) { + // output the bitset + for (bitsetsize_type i = b.size(); 0 < i; --i) { + const char dig = b.test(i-1)? '1' : '0'; + if (EOF == buf->sputc(dig)) { + err |= ios::failbit; + break; + } + } + } + + if (err == ok) { + // if needed fill at right + for (; 0 < npad; --npad) { + if (fill_char != buf->sputc(fill_char)) { + err |= ios::failbit; + break; + } + } + } + + os.osfx(); + os.width(0); + + } // if opfx + + if(err != ok) + os.setstate(err); // assume this does NOT throw + return os; + +} +#else + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, + const dynamic_bitset& b) +{ + + using namespace std; + + const ios_base::iostate ok = ios_base::goodbit; + ios_base::iostate err = ok; + + typename basic_ostream::sentry cerberos(os); + if (cerberos) { + + BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, os.getloc()); + const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0'); + const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1'); + + BOOST_TRY { + + typedef typename dynamic_bitset::size_type bitset_size_type; + typedef basic_streambuf buffer_type; + + buffer_type * buf = os.rdbuf(); + // careful: os.width() is signed (and can be < 0) + const bitset_size_type width = (os.width() <= 0) ? 0 : static_cast(os.width()); + streamsize npad = (width <= b.size()) ? 0 : width - b.size(); + + const Ch fill_char = os.fill(); + const ios_base::fmtflags adjustfield = os.flags() & ios_base::adjustfield; + + // if needed fill at left; pad is decreased along the way + if (adjustfield != ios_base::left) { + for (; 0 < npad; --npad) + if (Tr::eq_int_type(Tr::eof(), buf->sputc(fill_char))) { + err |= ios_base::failbit; + break; + } + } + + if (err == ok) { + // output the bitset + for (bitset_size_type i = b.size(); 0 < i; --i) { + typename buffer_type::int_type + ret = buf->sputc(b.test(i-1)? one : zero); + if (Tr::eq_int_type(Tr::eof(), ret)) { + err |= ios_base::failbit; + break; + } + } + } + + if (err == ok) { + // if needed fill at right + for (; 0 < npad; --npad) { + if (Tr::eq_int_type(Tr::eof(), buf->sputc(fill_char))) { + err |= ios_base::failbit; + break; + } + } + } + + + os.width(0); + + } BOOST_CATCH (...) { // see std 27.6.1.1/4 + bool rethrow = false; + BOOST_TRY { os.setstate(ios_base::failbit); } BOOST_CATCH (...) { rethrow = true; } BOOST_CATCH_END + + if (rethrow) + BOOST_RETHROW; + } + BOOST_CATCH_END + } + + if(err != ok) + os.setstate(err); // may throw exception + return os; + +} +#endif + + +#ifdef BOOST_OLD_IOSTREAMS + + // A sentry-like class that calls isfx in its destructor. + // "Necessary" because bit_appender::do_append may throw. + class pseudo_sentry { + std::istream & m_r; + const bool m_ok; + public: + explicit pseudo_sentry(std::istream & r) : m_r(r), m_ok(r.ipfx(0)) { } + ~pseudo_sentry() { m_r.isfx(); } + operator bool() const { return m_ok; } + }; + +template +std::istream& +operator>>(std::istream& is, dynamic_bitset& b) +{ + +// Extractor for classic IO streams (libstdc++ < 3.0) +// ----------------------------------------------------// +// It's assumed that the stream buffer functions, and +// the stream's setstate() _cannot_ throw. + + + typedef dynamic_bitset bitset_type; + typedef typename bitset_type::size_type size_type; + + std::ios::iostate err = std::ios::goodbit; + pseudo_sentry cerberos(is); // skips whitespaces + if(cerberos) { + + b.clear(); + + const std::streamsize w = is.width(); + const size_type limit = w > 0 && static_cast(w) < b.max_size() + ? static_cast(w) : b.max_size(); + typename bitset_type::bit_appender appender(b); + std::streambuf * buf = is.rdbuf(); + for(int c = buf->sgetc(); appender.get_count() < limit; c = buf->snextc() ) { + + if (c == EOF) { + err |= std::ios::eofbit; + break; + } + else if (char(c) != '0' && char(c) != '1') + break; // non digit character + + else { + BOOST_TRY { + appender.do_append(char(c) == '1'); + } + BOOST_CATCH(...) { + is.setstate(std::ios::failbit); // assume this can't throw + BOOST_RETHROW; + } + BOOST_CATCH_END + } + + } // for + } + + is.width(0); + if (b.size() == 0) + err |= std::ios::failbit; + if (err != std::ios::goodbit) + is.setstate (err); // may throw + + return is; +} + +#else // BOOST_OLD_IOSTREAMS + +template +std::basic_istream& +operator>>(std::basic_istream& is, dynamic_bitset& b) +{ + + using namespace std; + + typedef dynamic_bitset bitset_type; + typedef typename bitset_type::size_type size_type; + + const streamsize w = is.width(); + const size_type limit = 0 < w && static_cast(w) < b.max_size()? + static_cast(w) : b.max_size(); + + ios_base::iostate err = ios_base::goodbit; + typename basic_istream::sentry cerberos(is); // skips whitespaces + if(cerberos) { + + // in accordance with prop. resol. of lib DR 303 [last checked 4 Feb 2004] + BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, is.getloc()); + const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0'); + const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1'); + + b.clear(); + BOOST_TRY { + typename bitset_type::bit_appender appender(b); + basic_streambuf * buf = is.rdbuf(); + typename Tr::int_type c = buf->sgetc(); + for( ; appender.get_count() < limit; c = buf->snextc() ) { + + if (Tr::eq_int_type(Tr::eof(), c)) { + err |= ios_base::eofbit; + break; + } + else { + const Ch to_c = Tr::to_char_type(c); + const bool is_one = Tr::eq(to_c, one); + + if (!is_one && !Tr::eq(to_c, zero)) + break; // non digit character + + appender.do_append(is_one); + + } + + } // for + } + BOOST_CATCH (...) { + // catches from stream buf, or from vector: + // + // bits_stored bits have been extracted and stored, and + // either no further character is extractable or we can't + // append to the underlying vector (out of memory) + + bool rethrow = false; // see std 27.6.1.1/4 + BOOST_TRY { is.setstate(ios_base::badbit); } + BOOST_CATCH(...) { rethrow = true; } + BOOST_CATCH_END + + if (rethrow) + BOOST_RETHROW; + + } + BOOST_CATCH_END + } + + is.width(0); + if (b.size() == 0 /*|| !cerberos*/) + err |= ios_base::failbit; + if (err != ios_base::goodbit) + is.setstate (err); // may throw + + return is; + +} + + +#endif + + +//----------------------------------------------------------------------------- +// bitset operations + +template +dynamic_bitset +operator&(const dynamic_bitset& x, + const dynamic_bitset& y) +{ + dynamic_bitset b(x); + return b &= y; +} + +template +dynamic_bitset +operator|(const dynamic_bitset& x, + const dynamic_bitset& y) +{ + dynamic_bitset b(x); + return b |= y; +} + +template +dynamic_bitset +operator^(const dynamic_bitset& x, + const dynamic_bitset& y) +{ + dynamic_bitset b(x); + return b ^= y; +} + +template +dynamic_bitset +operator-(const dynamic_bitset& x, + const dynamic_bitset& y) +{ + dynamic_bitset b(x); + return b -= y; +} + +//----------------------------------------------------------------------------- +// namespace scope swap + +template +inline void +swap(dynamic_bitset& left, + dynamic_bitset& right) // no throw +{ + left.swap(right); +} + + +//----------------------------------------------------------------------------- +// private (on conforming compilers) member functions + + +template +inline typename dynamic_bitset::size_type +dynamic_bitset::calc_num_blocks(size_type num_bits) +{ + return num_bits / bits_per_block + + static_cast( num_bits % bits_per_block != 0 ); +} + +// gives a reference to the highest block +// +template +inline Block& dynamic_bitset::m_highest_block() +{ + return const_cast + (static_cast(this)->m_highest_block()); +} + +// gives a const-reference to the highest block +// +template +inline const Block& dynamic_bitset::m_highest_block() const +{ + assert(size() > 0 && num_blocks() > 0); + return m_bits.back(); +} + + +// If size() is not a multiple of bits_per_block +// then not all the bits in the last block are used. +// This function resets the unused bits (convenient +// for the implementation of many member functions) +// +template +inline void dynamic_bitset::m_zero_unused_bits() +{ + assert (num_blocks() == calc_num_blocks(m_num_bits)); + + // if != 0 this is the number of bits used in the last block + const block_width_type extra_bits = count_extra_bits(); + + if (extra_bits != 0) + m_highest_block() &= ~(~static_cast(0) << extra_bits); + +} + +// check class invariants +template +bool dynamic_bitset::m_check_invariants() const +{ + const block_width_type extra_bits = count_extra_bits(); + if (extra_bits > 0) { + block_type const mask = (~static_cast(0) << extra_bits); + if ((m_highest_block() & mask) != 0) + return false; + } + if (m_bits.size() > m_bits.capacity() || num_blocks() != calc_num_blocks(size())) + return false; + + return true; + +} + + +} // namespace boost + + +#undef BOOST_BITSET_CHAR + +#endif // include guard + diff --git a/contrib/src/boost/dynamic_bitset_fwd.hpp b/contrib/src/boost/dynamic_bitset_fwd.hpp new file mode 100644 index 0000000..7bb6e89 --- /dev/null +++ b/contrib/src/boost/dynamic_bitset_fwd.hpp @@ -0,0 +1,25 @@ +// ----------------------------------------------------------- +// +// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek +// Copyright (c) 2003-2004 Gennaro Prota +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +#ifndef BOOST_DYNAMIC_BITSET_FWD_HPP +#define BOOST_DYNAMIC_BITSET_FWD_HPP + +#include + +namespace boost { + +template > +class dynamic_bitset; + +} + +#endif // include guard diff --git a/contrib/src/boost/exception/exception.hpp b/contrib/src/boost/exception/exception.hpp new file mode 100644 index 0000000..1f2bd9c --- /dev/null +++ b/contrib/src/boost/exception/exception.hpp @@ -0,0 +1,499 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_274DA366004E11DCB1DDFE2E56D89593 +#define UUID_274DA366004E11DCB1DDFE2E56D89593 +#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +namespace +boost + { + namespace + exception_detail + { + template + class + refcount_ptr + { + public: + + refcount_ptr(): + px_(0) + { + } + + ~refcount_ptr() + { + release(); + } + + refcount_ptr( refcount_ptr const & x ): + px_(x.px_) + { + add_ref(); + } + + refcount_ptr & + operator=( refcount_ptr const & x ) + { + adopt(x.px_); + return *this; + } + + void + adopt( T * px ) + { + release(); + px_=px; + add_ref(); + } + + T * + get() const + { + return px_; + } + + private: + + T * px_; + + void + add_ref() + { + if( px_ ) + px_->add_ref(); + } + + void + release() + { + if( px_ && px_->release() ) + px_=0; + } + }; + } + + //////////////////////////////////////////////////////////////////////// + + template + class error_info; + + typedef error_info throw_function; + typedef error_info throw_file; + typedef error_info throw_line; + + template <> + class + error_info + { + public: + typedef char const * value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + + template <> + class + error_info + { + public: + typedef char const * value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + + template <> + class + error_info + { + public: + typedef int value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif + class exception; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif + + template + class shared_ptr; + + namespace + exception_detail + { + class error_info_base; + struct type_info_; + + struct + error_info_container + { + virtual char const * diagnostic_information( char const * ) const = 0; + virtual shared_ptr get( type_info_ const & ) const = 0; + virtual void set( shared_ptr const &, type_info_ const & ) = 0; + virtual void add_ref() const = 0; + virtual bool release() const = 0; + virtual refcount_ptr clone() const = 0; + + protected: + + ~error_info_container() throw() + { + } + }; + + template + struct get_info; + + template <> + struct get_info; + + template <> + struct get_info; + + template <> + struct get_info; + + char const * get_diagnostic_information( exception const &, char const * ); + + void copy_boost_exception( exception *, exception const * ); + + template + E const & set_info( E const &, error_info const & ); + + template + E const & set_info( E const &, throw_function const & ); + + template + E const & set_info( E const &, throw_file const & ); + + template + E const & set_info( E const &, throw_line const & ); + } + +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif + class + exception + { + // + public: + template void set( typename Tag::type const & ); + template typename Tag::type const * get() const; + // + + protected: + + exception(): + throw_function_(0), + throw_file_(0), + throw_line_(-1) + { + } + +#ifdef __HP_aCC + //On HP aCC, this protected copy constructor prevents throwing boost::exception. + //On all other platforms, the same effect is achieved by the pure virtual destructor. + exception( exception const & x ) throw(): + data_(x.data_), + throw_function_(x.throw_function_), + throw_file_(x.throw_file_), + throw_line_(x.throw_line_) + { + } +#endif + + virtual ~exception() throw() +#ifndef __HP_aCC + = 0 //Workaround for HP aCC, =0 incorrectly leads to link errors. +#endif + ; + +#if (defined(__MWERKS__) && __MWERKS__<=0x3207) || (defined(_MSC_VER) && _MSC_VER<=1310) + public: +#else + private: + + template + friend E const & exception_detail::set_info( E const &, throw_function const & ); + + template + friend E const & exception_detail::set_info( E const &, throw_file const & ); + + template + friend E const & exception_detail::set_info( E const &, throw_line const & ); + + template + friend E const & exception_detail::set_info( E const &, error_info const & ); + + friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); + + template + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend void exception_detail::copy_boost_exception( exception *, exception const * ); +#endif + mutable exception_detail::refcount_ptr data_; + mutable char const * throw_function_; + mutable char const * throw_file_; + mutable int throw_line_; + }; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif + + inline + exception:: + ~exception() throw() + { + } + + namespace + exception_detail + { + template + E const & + set_info( E const & x, throw_function const & y ) + { + x.throw_function_=y.v_; + return x; + } + + template + E const & + set_info( E const & x, throw_file const & y ) + { + x.throw_file_=y.v_; + return x; + } + + template + E const & + set_info( E const & x, throw_line const & y ) + { + x.throw_line_=y.v_; + return x; + } + } + + //////////////////////////////////////////////////////////////////////// + + namespace + exception_detail + { +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif + template + struct + error_info_injector: + public T, + public exception + { + explicit + error_info_injector( T const & x ): + T(x) + { + } + + ~error_info_injector() throw() + { + } + }; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif + + struct large_size { char c[256]; }; + large_size dispatch_boost_exception( exception const * ); + + struct small_size { }; + small_size dispatch_boost_exception( void const * ); + + template + struct enable_error_info_helper; + + template + struct + enable_error_info_helper + { + typedef T type; + }; + + template + struct + enable_error_info_helper + { + typedef error_info_injector type; + }; + + template + struct + enable_error_info_return_type + { + typedef typename enable_error_info_helper(0)))>::type type; + }; + } + + template + inline + typename + exception_detail::enable_error_info_return_type::type + enable_error_info( T const & x ) + { + typedef typename exception_detail::enable_error_info_return_type::type rt; + return rt(x); + } + + //////////////////////////////////////////////////////////////////////// + + namespace + exception_detail + { +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif + class + clone_base + { + public: + + virtual clone_base const * clone() const = 0; + virtual void rethrow() const = 0; + + virtual + ~clone_base() throw() + { + } + }; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif + + inline + void + copy_boost_exception( exception * a, exception const * b ) + { + refcount_ptr data; + if( error_info_container * d=b->data_.get() ) + data = d->clone(); + a->throw_file_ = b->throw_file_; + a->throw_line_ = b->throw_line_; + a->throw_function_ = b->throw_function_; + a->data_ = data; + } + + inline + void + copy_boost_exception( void *, void const * ) + { + } + +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif + template + class + clone_impl: + public T, + public virtual clone_base + { + struct clone_tag { }; + clone_impl( clone_impl const & x, clone_tag ): + T(x) + { + copy_boost_exception(this,&x); + } + + public: + + explicit + clone_impl( T const & x ): + T(x) + { + copy_boost_exception(this,&x); + } + + ~clone_impl() throw() + { + } + + private: + + clone_base const * + clone() const + { + return new clone_impl(*this,clone_tag()); + } + + void + rethrow() const + { + throw*this; + } + }; + } +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif + + template + inline + exception_detail::clone_impl + enable_current_exception( T const & x ) + { + return exception_detail::clone_impl(x); + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/contrib/src/boost/function.hpp b/contrib/src/boost/function.hpp new file mode 100644 index 0000000..b72842b --- /dev/null +++ b/contrib/src/boost/function.hpp @@ -0,0 +1,66 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2001-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org/libs/function + +// William Kempf, Jesse Jones and Karl Nelson were all very helpful in the +// design of this library. + +#include // unary_function, binary_function + +#include +#include + +#ifndef BOOST_FUNCTION_MAX_ARGS +# define BOOST_FUNCTION_MAX_ARGS 10 +#endif // BOOST_FUNCTION_MAX_ARGS + +// Include the prologue here so that the use of file-level iteration +// in anything that may be included by function_template.hpp doesn't break +#include + +// Older Visual Age C++ version do not handle the file iteration well +#if BOOST_WORKAROUND(__IBMCPP__, >= 500) && BOOST_WORKAROUND(__IBMCPP__, < 800) +# if BOOST_FUNCTION_MAX_ARGS >= 0 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 1 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 2 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 3 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 4 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 5 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 6 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 7 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 8 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 9 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 10 +# include +# endif +#else +// What is the '3' for? +# define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_FUNCTION_MAX_ARGS,)) +# include BOOST_PP_ITERATE() +# undef BOOST_PP_ITERATION_PARAMS_1 +#endif diff --git a/contrib/src/boost/function/detail/function_iterate.hpp b/contrib/src/boost/function/detail/function_iterate.hpp new file mode 100644 index 0000000..5370b36 --- /dev/null +++ b/contrib/src/boost/function/detail/function_iterate.hpp @@ -0,0 +1,16 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org +#if !defined(BOOST_PP_IS_ITERATING) +# error Boost.Function - do not include this file! +#endif + +#define BOOST_FUNCTION_NUM_ARGS BOOST_PP_ITERATION() +#include +#undef BOOST_FUNCTION_NUM_ARGS + diff --git a/contrib/src/boost/function/detail/gen_maybe_include.pl b/contrib/src/boost/function/detail/gen_maybe_include.pl new file mode 100644 index 0000000..d062920 --- /dev/null +++ b/contrib/src/boost/function/detail/gen_maybe_include.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl -w +# +# Boost.Function library +# +# Copyright (C) 2001-2003 Douglas Gregor (gregod@cs.rpi.edu) +# +# Permission to copy, use, sell and distribute this software is granted +# provided this copyright notice appears in all copies. +# Permission to modify the code and to distribute modified code is granted +# provided this copyright notice appears in all copies, and a notice +# that the code was modified is included with the copyright notice. +# +# This software is provided "as is" without express or implied warranty, +# and with no claim as to its suitability for any purpose. +# +# For more information, see http://www.boost.org +use English; + +$max_args = $ARGV[0]; + +open (OUT, ">maybe_include.hpp") or die("Cannot write to maybe_include.hpp"); +for($on_arg = 0; $on_arg <= $max_args; ++$on_arg) { + if ($on_arg == 0) { + print OUT "#if"; + } + else { + print OUT "#elif"; + } + print OUT " BOOST_FUNCTION_NUM_ARGS == $on_arg\n"; + print OUT "# ifndef BOOST_FUNCTION_$on_arg\n"; + print OUT "# define BOOST_FUNCTION_$on_arg\n"; + print OUT "# include \n"; + print OUT "# endif\n"; +} +print OUT "#else\n"; +print OUT "# error Cannot handle Boost.Function objects that accept more than $max_args arguments!\n"; +print OUT "#endif\n"; diff --git a/contrib/src/boost/function/detail/maybe_include.hpp b/contrib/src/boost/function/detail/maybe_include.hpp new file mode 100644 index 0000000..92f71bb --- /dev/null +++ b/contrib/src/boost/function/detail/maybe_include.hpp @@ -0,0 +1,267 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#if BOOST_FUNCTION_NUM_ARGS == 0 +# ifndef BOOST_FUNCTION_0 +# define BOOST_FUNCTION_0 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 1 +# ifndef BOOST_FUNCTION_1 +# define BOOST_FUNCTION_1 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 2 +# ifndef BOOST_FUNCTION_2 +# define BOOST_FUNCTION_2 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 3 +# ifndef BOOST_FUNCTION_3 +# define BOOST_FUNCTION_3 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 4 +# ifndef BOOST_FUNCTION_4 +# define BOOST_FUNCTION_4 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 5 +# ifndef BOOST_FUNCTION_5 +# define BOOST_FUNCTION_5 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 6 +# ifndef BOOST_FUNCTION_6 +# define BOOST_FUNCTION_6 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 7 +# ifndef BOOST_FUNCTION_7 +# define BOOST_FUNCTION_7 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 8 +# ifndef BOOST_FUNCTION_8 +# define BOOST_FUNCTION_8 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 9 +# ifndef BOOST_FUNCTION_9 +# define BOOST_FUNCTION_9 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 10 +# ifndef BOOST_FUNCTION_10 +# define BOOST_FUNCTION_10 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 11 +# ifndef BOOST_FUNCTION_11 +# define BOOST_FUNCTION_11 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 12 +# ifndef BOOST_FUNCTION_12 +# define BOOST_FUNCTION_12 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 13 +# ifndef BOOST_FUNCTION_13 +# define BOOST_FUNCTION_13 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 14 +# ifndef BOOST_FUNCTION_14 +# define BOOST_FUNCTION_14 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 15 +# ifndef BOOST_FUNCTION_15 +# define BOOST_FUNCTION_15 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 16 +# ifndef BOOST_FUNCTION_16 +# define BOOST_FUNCTION_16 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 17 +# ifndef BOOST_FUNCTION_17 +# define BOOST_FUNCTION_17 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 18 +# ifndef BOOST_FUNCTION_18 +# define BOOST_FUNCTION_18 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 19 +# ifndef BOOST_FUNCTION_19 +# define BOOST_FUNCTION_19 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 20 +# ifndef BOOST_FUNCTION_20 +# define BOOST_FUNCTION_20 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 21 +# ifndef BOOST_FUNCTION_21 +# define BOOST_FUNCTION_21 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 22 +# ifndef BOOST_FUNCTION_22 +# define BOOST_FUNCTION_22 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 23 +# ifndef BOOST_FUNCTION_23 +# define BOOST_FUNCTION_23 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 24 +# ifndef BOOST_FUNCTION_24 +# define BOOST_FUNCTION_24 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 25 +# ifndef BOOST_FUNCTION_25 +# define BOOST_FUNCTION_25 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 26 +# ifndef BOOST_FUNCTION_26 +# define BOOST_FUNCTION_26 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 27 +# ifndef BOOST_FUNCTION_27 +# define BOOST_FUNCTION_27 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 28 +# ifndef BOOST_FUNCTION_28 +# define BOOST_FUNCTION_28 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 29 +# ifndef BOOST_FUNCTION_29 +# define BOOST_FUNCTION_29 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 30 +# ifndef BOOST_FUNCTION_30 +# define BOOST_FUNCTION_30 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 31 +# ifndef BOOST_FUNCTION_31 +# define BOOST_FUNCTION_31 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 32 +# ifndef BOOST_FUNCTION_32 +# define BOOST_FUNCTION_32 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 33 +# ifndef BOOST_FUNCTION_33 +# define BOOST_FUNCTION_33 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 34 +# ifndef BOOST_FUNCTION_34 +# define BOOST_FUNCTION_34 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 35 +# ifndef BOOST_FUNCTION_35 +# define BOOST_FUNCTION_35 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 36 +# ifndef BOOST_FUNCTION_36 +# define BOOST_FUNCTION_36 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 37 +# ifndef BOOST_FUNCTION_37 +# define BOOST_FUNCTION_37 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 38 +# ifndef BOOST_FUNCTION_38 +# define BOOST_FUNCTION_38 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 39 +# ifndef BOOST_FUNCTION_39 +# define BOOST_FUNCTION_39 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 40 +# ifndef BOOST_FUNCTION_40 +# define BOOST_FUNCTION_40 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 41 +# ifndef BOOST_FUNCTION_41 +# define BOOST_FUNCTION_41 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 42 +# ifndef BOOST_FUNCTION_42 +# define BOOST_FUNCTION_42 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 43 +# ifndef BOOST_FUNCTION_43 +# define BOOST_FUNCTION_43 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 44 +# ifndef BOOST_FUNCTION_44 +# define BOOST_FUNCTION_44 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 45 +# ifndef BOOST_FUNCTION_45 +# define BOOST_FUNCTION_45 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 46 +# ifndef BOOST_FUNCTION_46 +# define BOOST_FUNCTION_46 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 47 +# ifndef BOOST_FUNCTION_47 +# define BOOST_FUNCTION_47 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 48 +# ifndef BOOST_FUNCTION_48 +# define BOOST_FUNCTION_48 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 49 +# ifndef BOOST_FUNCTION_49 +# define BOOST_FUNCTION_49 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 50 +# ifndef BOOST_FUNCTION_50 +# define BOOST_FUNCTION_50 +# include +# endif +#else +# error Cannot handle Boost.Function objects that accept more than 50 arguments! +#endif diff --git a/contrib/src/boost/function/detail/prologue.hpp b/contrib/src/boost/function/detail/prologue.hpp new file mode 100644 index 0000000..53d0f05 --- /dev/null +++ b/contrib/src/boost/function/detail/prologue.hpp @@ -0,0 +1,26 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#ifndef BOOST_FUNCTION_PROLOGUE_HPP +#define BOOST_FUNCTION_PROLOGUE_HPP +# include +# include +# include // unary_function, binary_function +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#endif // BOOST_FUNCTION_PROLOGUE_HPP diff --git a/contrib/src/boost/function/function0.hpp b/contrib/src/boost/function/function0.hpp new file mode 100644 index 0000000..65a02e5 --- /dev/null +++ b/contrib/src/boost/function/function0.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 0 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/contrib/src/boost/function/function1.hpp b/contrib/src/boost/function/function1.hpp new file mode 100644 index 0000000..9089715 --- /dev/null +++ b/contrib/src/boost/function/function1.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 1 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/contrib/src/boost/function/function10.hpp b/contrib/src/boost/function/function10.hpp new file mode 100644 index 0000000..6562724 --- /dev/null +++ b/contrib/src/boost/function/function10.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 10 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/contrib/src/boost/function/function2.hpp b/contrib/src/boost/function/function2.hpp new file mode 100644 index 0000000..dc8bf97 --- /dev/null +++ b/contrib/src/boost/function/function2.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 2 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/contrib/src/boost/function/function3.hpp b/contrib/src/boost/function/function3.hpp new file mode 100644 index 0000000..19d1a49 --- /dev/null +++ b/contrib/src/boost/function/function3.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 3 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/contrib/src/boost/function/function4.hpp b/contrib/src/boost/function/function4.hpp new file mode 100644 index 0000000..f3349e2 --- /dev/null +++ b/contrib/src/boost/function/function4.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 4 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/contrib/src/boost/function/function5.hpp b/contrib/src/boost/function/function5.hpp new file mode 100644 index 0000000..a1305eb --- /dev/null +++ b/contrib/src/boost/function/function5.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 5 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/contrib/src/boost/function/function6.hpp b/contrib/src/boost/function/function6.hpp new file mode 100644 index 0000000..1f60914 --- /dev/null +++ b/contrib/src/boost/function/function6.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 6 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/contrib/src/boost/function/function7.hpp b/contrib/src/boost/function/function7.hpp new file mode 100644 index 0000000..68542ed --- /dev/null +++ b/contrib/src/boost/function/function7.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 7 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/contrib/src/boost/function/function8.hpp b/contrib/src/boost/function/function8.hpp new file mode 100644 index 0000000..cf2c376 --- /dev/null +++ b/contrib/src/boost/function/function8.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 8 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/contrib/src/boost/function/function9.hpp b/contrib/src/boost/function/function9.hpp new file mode 100644 index 0000000..590e088 --- /dev/null +++ b/contrib/src/boost/function/function9.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 9 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/contrib/src/boost/function/function_base.hpp b/contrib/src/boost/function/function_base.hpp new file mode 100644 index 0000000..35c1995 --- /dev/null +++ b/contrib/src/boost/function/function_base.hpp @@ -0,0 +1,892 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2001-2006 +// Copyright Emil Dotchevski 2007 +// Use, modification and distribution is subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#ifndef BOOST_FUNCTION_BASE_HEADER +#define BOOST_FUNCTION_BASE_HEADER + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef BOOST_NO_SFINAE +# include "boost/utility/enable_if.hpp" +#else +# include "boost/mpl/bool.hpp" +#endif +#include +#include + +#if defined(BOOST_MSVC) +# pragma warning( push ) +# pragma warning( disable : 4793 ) // complaint about native code generation +# pragma warning( disable : 4127 ) // "conditional expression is constant" +#endif + +// Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info. +#ifdef BOOST_NO_STD_TYPEINFO +// Embedded VC++ does not have type_info in namespace std +# define BOOST_FUNCTION_STD_NS +#else +# define BOOST_FUNCTION_STD_NS std +#endif + +// Borrowed from Boost.Python library: determines the cases where we +// need to use std::type_info::name to compare instead of operator==. +#if defined( BOOST_NO_TYPEID ) +# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) +#elif defined(__GNUC__) \ + || defined(_AIX) \ + || ( defined(__sgi) && defined(__host_mips)) +# include +# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) \ + (std::strcmp((X).name(),(Y).name()) == 0) +# else +# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) +#endif + +#if defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG) +# define BOOST_FUNCTION_TARGET_FIX(x) x +#else +# define BOOST_FUNCTION_TARGET_FIX(x) +#endif // __ICL etc + +# define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \ + typename ::boost::enable_if_c< \ + !(::boost::is_integral::value), \ + Type>::type + +namespace boost { + namespace detail { + namespace function { + class X; + + /** + * A buffer used to store small function objects in + * boost::function. It is a union containing function pointers, + * object pointers, and a structure that resembles a bound + * member function pointer. + */ + union function_buffer + { + // For pointers to function objects + mutable void* obj_ptr; + + // For pointers to std::type_info objects + struct type_t { + // (get_functor_type_tag, check_functor_type_tag). + const detail::sp_typeinfo* type; + + // Whether the type is const-qualified. + bool const_qualified; + // Whether the type is volatile-qualified. + bool volatile_qualified; + } type; + + // For function pointers of all kinds + mutable void (*func_ptr)(); + + // For bound member pointers + struct bound_memfunc_ptr_t { + void (X::*memfunc_ptr)(int); + void* obj_ptr; + } bound_memfunc_ptr; + + // For references to function objects. We explicitly keep + // track of the cv-qualifiers on the object referenced. + struct obj_ref_t { + mutable void* obj_ptr; + bool is_const_qualified; + bool is_volatile_qualified; + } obj_ref; + + // To relax aliasing constraints + mutable char data; + }; + + /** + * The unusable class is a placeholder for unused function arguments + * It is also completely unusable except that it constructable from + * anything. This helps compilers without partial specialization to + * handle Boost.Function objects returning void. + */ + struct unusable + { + unusable() {} + template unusable(const T&) {} + }; + + /* Determine the return type. This supports compilers that do not support + * void returns or partial specialization by silently changing the return + * type to "unusable". + */ + template struct function_return_type { typedef T type; }; + + template<> + struct function_return_type + { + typedef unusable type; + }; + + // The operation type to perform on the given functor/function pointer + enum functor_manager_operation_type { + clone_functor_tag, + move_functor_tag, + destroy_functor_tag, + check_functor_type_tag, + get_functor_type_tag + }; + + // Tags used to decide between different types of functions + struct function_ptr_tag {}; + struct function_obj_tag {}; + struct member_ptr_tag {}; + struct function_obj_ref_tag {}; + + template + class get_function_tag + { + typedef typename mpl::if_c<(is_pointer::value), + function_ptr_tag, + function_obj_tag>::type ptr_or_obj_tag; + + typedef typename mpl::if_c<(is_member_pointer::value), + member_ptr_tag, + ptr_or_obj_tag>::type ptr_or_obj_or_mem_tag; + + typedef typename mpl::if_c<(is_reference_wrapper::value), + function_obj_ref_tag, + ptr_or_obj_or_mem_tag>::type or_ref_tag; + + public: + typedef or_ref_tag type; + }; + + // The trivial manager does nothing but return the same pointer (if we + // are cloning) or return the null pointer (if we are deleting). + template + struct reference_manager + { + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + switch (op) { + case clone_functor_tag: + out_buffer.obj_ref = in_buffer.obj_ref; + return; + + case move_functor_tag: + out_buffer.obj_ref = in_buffer.obj_ref; + in_buffer.obj_ref.obj_ptr = 0; + return; + + case destroy_functor_tag: + out_buffer.obj_ref.obj_ptr = 0; + return; + + case check_functor_type_tag: + { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + + // Check whether we have the same type. We can add + // cv-qualifiers, but we can't take them away. + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(F)) + && (!in_buffer.obj_ref.is_const_qualified + || out_buffer.type.const_qualified) + && (!in_buffer.obj_ref.is_volatile_qualified + || out_buffer.type.volatile_qualified)) + out_buffer.obj_ptr = in_buffer.obj_ref.obj_ptr; + else + out_buffer.obj_ptr = 0; + } + return; + + case get_functor_type_tag: + out_buffer.type.type = &BOOST_SP_TYPEID(F); + out_buffer.type.const_qualified = in_buffer.obj_ref.is_const_qualified; + out_buffer.type.volatile_qualified = in_buffer.obj_ref.is_volatile_qualified; + return; + } + } + }; + + /** + * Determine if boost::function can use the small-object + * optimization with the function object type F. + */ + template + struct function_allows_small_object_optimization + { + BOOST_STATIC_CONSTANT + (bool, + value = ((sizeof(F) <= sizeof(function_buffer) && + (alignment_of::value + % alignment_of::value == 0)))); + }; + + template + struct functor_wrapper: public F, public A + { + functor_wrapper( F f, A a ): + F(f), + A(a) + { + } + + functor_wrapper(const functor_wrapper& f) : + F(static_cast(f)), + A(static_cast(f)) + { + } + }; + + /** + * The functor_manager class contains a static function "manage" which + * can clone or destroy the given function/function object pointer. + */ + template + struct functor_manager_common + { + typedef Functor functor_type; + + // Function pointers + static inline void + manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + if (op == clone_functor_tag) + out_buffer.func_ptr = in_buffer.func_ptr; + else if (op == move_functor_tag) { + out_buffer.func_ptr = in_buffer.func_ptr; + in_buffer.func_ptr = 0; + } else if (op == destroy_functor_tag) + out_buffer.func_ptr = 0; + else if (op == check_functor_type_tag) { + const boost::detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) + out_buffer.obj_ptr = &in_buffer.func_ptr; + else + out_buffer.obj_ptr = 0; + } else /* op == get_functor_type_tag */ { + out_buffer.type.type = &BOOST_SP_TYPEID(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + + // Function objects that fit in the small-object buffer. + static inline void + manage_small(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + if (op == clone_functor_tag || op == move_functor_tag) { + const functor_type* in_functor = + reinterpret_cast(&in_buffer.data); + new (reinterpret_cast(&out_buffer.data)) functor_type(*in_functor); + + if (op == move_functor_tag) { + functor_type* f = reinterpret_cast(&in_buffer.data); + (void)f; // suppress warning about the value of f not being used (MSVC) + f->~Functor(); + } + } else if (op == destroy_functor_tag) { + // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type. + functor_type* f = reinterpret_cast(&out_buffer.data); + (void)f; // suppress warning about the value of f not being used (MSVC) + f->~Functor(); + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) + out_buffer.obj_ptr = &in_buffer.data; + else + out_buffer.obj_ptr = 0; + } else /* op == get_functor_type_tag */ { + out_buffer.type.type = &BOOST_SP_TYPEID(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + }; + + template + struct functor_manager + { + private: + typedef Functor functor_type; + + // Function pointers + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_ptr_tag) + { + functor_manager_common::manage_ptr(in_buffer,out_buffer,op); + } + + // Function objects that fit in the small-object buffer. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::true_) + { + functor_manager_common::manage_small(in_buffer,out_buffer,op); + } + + // Function objects that require heap allocation + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::false_) + { + if (op == clone_functor_tag) { + // Clone the functor + // GCC 2.95.3 gets the CV qualifiers wrong here, so we + // can't do the static_cast that we should do. + // jewillco: Changing this to static_cast because GCC 2.95.3 is + // obsolete. + const functor_type* f = + static_cast(in_buffer.obj_ptr); + functor_type* new_f = new functor_type(*f); + out_buffer.obj_ptr = new_f; + } else if (op == move_functor_tag) { + out_buffer.obj_ptr = in_buffer.obj_ptr; + in_buffer.obj_ptr = 0; + } else if (op == destroy_functor_tag) { + /* Cast from the void pointer to the functor pointer type */ + functor_type* f = + static_cast(out_buffer.obj_ptr); + delete f; + out_buffer.obj_ptr = 0; + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) + out_buffer.obj_ptr = in_buffer.obj_ptr; + else + out_buffer.obj_ptr = 0; + } else /* op == get_functor_type_tag */ { + out_buffer.type.type = &BOOST_SP_TYPEID(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + + // For function objects, we determine whether the function + // object can use the small-object optimization buffer or + // whether we need to allocate it on the heap. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_obj_tag) + { + manager(in_buffer, out_buffer, op, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + } + + // For member pointers, we use the small-object optimization buffer. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, member_ptr_tag) + { + manager(in_buffer, out_buffer, op, mpl::true_()); + } + + public: + /* Dispatch to an appropriate manager based on whether we have a + function pointer or a function object pointer. */ + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + typedef typename get_function_tag::type tag_type; + switch (op) { + case get_functor_type_tag: + out_buffer.type.type = &BOOST_SP_TYPEID(functor_type); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + return; + + default: + manager(in_buffer, out_buffer, op, tag_type()); + return; + } + } + }; + + template + struct functor_manager_a + { + private: + typedef Functor functor_type; + + // Function pointers + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_ptr_tag) + { + functor_manager_common::manage_ptr(in_buffer,out_buffer,op); + } + + // Function objects that fit in the small-object buffer. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::true_) + { + functor_manager_common::manage_small(in_buffer,out_buffer,op); + } + + // Function objects that require heap allocation + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::false_) + { + typedef functor_wrapper functor_wrapper_type; + typedef typename Allocator::template rebind::other + wrapper_allocator_type; + typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; + + if (op == clone_functor_tag) { + // Clone the functor + // GCC 2.95.3 gets the CV qualifiers wrong here, so we + // can't do the static_cast that we should do. + const functor_wrapper_type* f = + static_cast(in_buffer.obj_ptr); + wrapper_allocator_type wrapper_allocator(static_cast(*f)); + wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); + wrapper_allocator.construct(copy, *f); + + // Get back to the original pointer type + functor_wrapper_type* new_f = static_cast(copy); + out_buffer.obj_ptr = new_f; + } else if (op == move_functor_tag) { + out_buffer.obj_ptr = in_buffer.obj_ptr; + in_buffer.obj_ptr = 0; + } else if (op == destroy_functor_tag) { + /* Cast from the void pointer to the functor_wrapper_type */ + functor_wrapper_type* victim = + static_cast(in_buffer.obj_ptr); + wrapper_allocator_type wrapper_allocator(static_cast(*victim)); + wrapper_allocator.destroy(victim); + wrapper_allocator.deallocate(victim,1); + out_buffer.obj_ptr = 0; + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) + out_buffer.obj_ptr = in_buffer.obj_ptr; + else + out_buffer.obj_ptr = 0; + } else /* op == get_functor_type_tag */ { + out_buffer.type.type = &BOOST_SP_TYPEID(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + + // For function objects, we determine whether the function + // object can use the small-object optimization buffer or + // whether we need to allocate it on the heap. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_obj_tag) + { + manager(in_buffer, out_buffer, op, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + } + + public: + /* Dispatch to an appropriate manager based on whether we have a + function pointer or a function object pointer. */ + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + typedef typename get_function_tag::type tag_type; + switch (op) { + case get_functor_type_tag: + out_buffer.type.type = &BOOST_SP_TYPEID(functor_type); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + return; + + default: + manager(in_buffer, out_buffer, op, tag_type()); + return; + } + } + }; + + // A type that is only used for comparisons against zero + struct useless_clear_type {}; + +#ifdef BOOST_NO_SFINAE + // These routines perform comparisons between a Boost.Function + // object and an arbitrary function object (when the last + // parameter is mpl::bool_) or against zero (when the + // last parameter is mpl::bool_). They are only necessary + // for compilers that don't support SFINAE. + template + bool + compare_equal(const Function& f, const Functor&, int, mpl::bool_) + { return f.empty(); } + + template + bool + compare_not_equal(const Function& f, const Functor&, int, + mpl::bool_) + { return !f.empty(); } + + template + bool + compare_equal(const Function& f, const Functor& g, long, + mpl::bool_) + { + if (const Functor* fp = f.template target()) + return function_equal(*fp, g); + else return false; + } + + template + bool + compare_equal(const Function& f, const reference_wrapper& g, + int, mpl::bool_) + { + if (const Functor* fp = f.template target()) + return fp == g.get_pointer(); + else return false; + } + + template + bool + compare_not_equal(const Function& f, const Functor& g, long, + mpl::bool_) + { + if (const Functor* fp = f.template target()) + return !function_equal(*fp, g); + else return true; + } + + template + bool + compare_not_equal(const Function& f, + const reference_wrapper& g, int, + mpl::bool_) + { + if (const Functor* fp = f.template target()) + return fp != g.get_pointer(); + else return true; + } +#endif // BOOST_NO_SFINAE + + /** + * Stores the "manager" portion of the vtable for a + * boost::function object. + */ + struct vtable_base + { + void (*manager)(const function_buffer& in_buffer, + function_buffer& out_buffer, + functor_manager_operation_type op); + }; + } // end namespace function + } // end namespace detail + +/** + * The function_base class contains the basic elements needed for the + * function1, function2, function3, etc. classes. It is common to all + * functions (and as such can be used to tell if we have one of the + * functionN objects). + */ +class function_base +{ +public: + function_base() : vtable(0) { } + + /** Determine if the function is empty (i.e., has no target). */ + bool empty() const { return !vtable; } + + /** Retrieve the type of the stored function object, or BOOST_SP_TYPEID(void) + if this is empty. */ + const detail::sp_typeinfo& target_type() const + { + if (!vtable) return BOOST_SP_TYPEID(void); + + detail::function::function_buffer type; + get_vtable()->manager(functor, type, detail::function::get_functor_type_tag); + return *type.type.type; + } + + template + Functor* target() + { + if (!vtable) return 0; + + detail::function::function_buffer type_result; + type_result.type.type = &BOOST_SP_TYPEID(Functor); + type_result.type.const_qualified = is_const::value; + type_result.type.volatile_qualified = is_volatile::value; + get_vtable()->manager(functor, type_result, + detail::function::check_functor_type_tag); + return static_cast(type_result.obj_ptr); + } + + template + const Functor* target() const + { + if (!vtable) return 0; + + detail::function::function_buffer type_result; + type_result.type.type = &BOOST_SP_TYPEID(Functor); + type_result.type.const_qualified = true; + type_result.type.volatile_qualified = is_volatile::value; + get_vtable()->manager(functor, type_result, + detail::function::check_functor_type_tag); + // GCC 2.95.3 gets the CV qualifiers wrong here, so we + // can't do the static_cast that we should do. + return static_cast(type_result.obj_ptr); + } + + template + bool contains(const F& f) const + { + if (const F* fp = this->template target()) + { + return function_equal(*fp, f); + } else { + return false; + } + } + +#if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3 + // GCC 3.3 and newer cannot copy with the global operator==, due to + // problems with instantiation of function return types before it + // has been verified that the argument types match up. + template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(Functor g) const + { + if (const Functor* fp = target()) + return function_equal(*fp, g); + else return false; + } + + template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(Functor g) const + { + if (const Functor* fp = target()) + return !function_equal(*fp, g); + else return true; + } +#endif + +public: // should be protected, but GCC 2.95.3 will fail to allow access + detail::function::vtable_base* get_vtable() const { + return reinterpret_cast( + reinterpret_cast(vtable) & ~static_cast(0x01)); + } + + bool has_trivial_copy_and_destroy() const { + return reinterpret_cast(vtable) & 0x01; + } + + detail::function::vtable_base* vtable; + mutable detail::function::function_buffer functor; +}; + +/** + * The bad_function_call exception class is thrown when a boost::function + * object is invoked + */ +class bad_function_call : public std::runtime_error +{ +public: + bad_function_call() : std::runtime_error("call to empty boost::function") {} +}; + +#ifndef BOOST_NO_SFINAE +inline bool operator==(const function_base& f, + detail::function::useless_clear_type*) +{ + return f.empty(); +} + +inline bool operator!=(const function_base& f, + detail::function::useless_clear_type*) +{ + return !f.empty(); +} + +inline bool operator==(detail::function::useless_clear_type*, + const function_base& f) +{ + return f.empty(); +} + +inline bool operator!=(detail::function::useless_clear_type*, + const function_base& f) +{ + return !f.empty(); +} +#endif + +#ifdef BOOST_NO_SFINAE +// Comparisons between boost::function objects and arbitrary function objects +template + inline bool operator==(const function_base& f, Functor g) + { + typedef mpl::bool_<(is_integral::value)> integral; + return detail::function::compare_equal(f, g, 0, integral()); + } + +template + inline bool operator==(Functor g, const function_base& f) + { + typedef mpl::bool_<(is_integral::value)> integral; + return detail::function::compare_equal(f, g, 0, integral()); + } + +template + inline bool operator!=(const function_base& f, Functor g) + { + typedef mpl::bool_<(is_integral::value)> integral; + return detail::function::compare_not_equal(f, g, 0, integral()); + } + +template + inline bool operator!=(Functor g, const function_base& f) + { + typedef mpl::bool_<(is_integral::value)> integral; + return detail::function::compare_not_equal(f, g, 0, integral()); + } +#else + +# if !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) +// Comparisons between boost::function objects and arbitrary function +// objects. GCC 3.3 and before has an obnoxious bug that prevents this +// from working. +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(const function_base& f, Functor g) + { + if (const Functor* fp = f.template target()) + return function_equal(*fp, g); + else return false; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(Functor g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return function_equal(g, *fp); + else return false; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(const function_base& f, Functor g) + { + if (const Functor* fp = f.template target()) + return !function_equal(*fp, g); + else return true; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(Functor g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return !function_equal(g, *fp); + else return true; + } +# endif + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(const function_base& f, reference_wrapper g) + { + if (const Functor* fp = f.template target()) + return fp == g.get_pointer(); + else return false; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(reference_wrapper g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return g.get_pointer() == fp; + else return false; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(const function_base& f, reference_wrapper g) + { + if (const Functor* fp = f.template target()) + return fp != g.get_pointer(); + else return true; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(reference_wrapper g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return g.get_pointer() != fp; + else return true; + } + +#endif // Compiler supporting SFINAE + +namespace detail { + namespace function { + inline bool has_empty_target(const function_base* f) + { + return f->empty(); + } + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310) + inline bool has_empty_target(const void*) + { + return false; + } +#else + inline bool has_empty_target(...) + { + return false; + } +#endif + } // end namespace function +} // end namespace detail +} // end namespace boost + +#undef BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL +#undef BOOST_FUNCTION_COMPARE_TYPE_ID + +#if defined(BOOST_MSVC) +# pragma warning( pop ) +#endif + +#endif // BOOST_FUNCTION_BASE_HEADER diff --git a/contrib/src/boost/function/function_fwd.hpp b/contrib/src/boost/function/function_fwd.hpp new file mode 100644 index 0000000..e79b504 --- /dev/null +++ b/contrib/src/boost/function/function_fwd.hpp @@ -0,0 +1,69 @@ +// Boost.Function library +// Copyright (C) Douglas Gregor 2008 +// +// Use, modification and distribution is subject to the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org +#ifndef BOOST_FUNCTION_FWD_HPP +#define BOOST_FUNCTION_FWD_HPP +#include + +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 && !defined(BOOST_STRICT_CONFIG) +// Work around a compiler bug. +// boost::python::objects::function has to be seen by the compiler before the +// boost::function class template. +namespace boost { namespace python { namespace objects { + class function; +}}} +#endif + +#if defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \ + || !(defined(BOOST_STRICT_CONFIG) || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540) +# define BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX +#endif + +namespace boost { + class bad_function_call; + +#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) + // Preferred syntax + template class function; + + template + inline void swap(function& f1, function& f2) + { + f1.swap(f2); + } +#endif // have partial specialization + + // Portable syntax + template class function0; + template class function1; + template class function2; + template class function3; + template + class function4; + template + class function5; + template + class function6; + template + class function7; + template + class function8; + template + class function9; + template + class function10; +} + +#endif diff --git a/contrib/src/boost/function/function_template.hpp b/contrib/src/boost/function/function_template.hpp new file mode 100644 index 0000000..211b81d --- /dev/null +++ b/contrib/src/boost/function/function_template.hpp @@ -0,0 +1,1190 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2001-2006 +// Copyright Emil Dotchevski 2007 +// Use, modification and distribution is subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +// Note: this header is a header template and must NOT have multiple-inclusion +// protection. +#include +#include + +#if defined(BOOST_MSVC) +# pragma warning( push ) +# pragma warning( disable : 4127 ) // "conditional expression is constant" +#endif + +#define BOOST_FUNCTION_TEMPLATE_PARMS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, typename T) + +#define BOOST_FUNCTION_TEMPLATE_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, T) + +#define BOOST_FUNCTION_PARM(J,I,D) BOOST_PP_CAT(T,I) BOOST_PP_CAT(a,I) + +#define BOOST_FUNCTION_PARMS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_PARM,BOOST_PP_EMPTY) + +#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, a) +#else +# include +# define BOOST_FUNCTION_ARG(J,I,D) ::boost::forward< BOOST_PP_CAT(T,I) >(BOOST_PP_CAT(a,I)) +# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG,BOOST_PP_EMPTY) +#endif + +#define BOOST_FUNCTION_ARG_TYPE(J,I,D) \ + typedef BOOST_PP_CAT(T,I) BOOST_PP_CAT(BOOST_PP_CAT(arg, BOOST_PP_INC(I)),_type); + +#define BOOST_FUNCTION_ARG_TYPES BOOST_PP_REPEAT(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG_TYPE,BOOST_PP_EMPTY) + +// Comma if nonzero number of arguments +#if BOOST_FUNCTION_NUM_ARGS == 0 +# define BOOST_FUNCTION_COMMA +#else +# define BOOST_FUNCTION_COMMA , +#endif // BOOST_FUNCTION_NUM_ARGS > 0 + +// Class names used in this version of the code +#define BOOST_FUNCTION_FUNCTION BOOST_JOIN(function,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_FUNCTION_INVOKER \ + BOOST_JOIN(function_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER \ + BOOST_JOIN(void_function_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER \ + BOOST_JOIN(function_obj_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER \ + BOOST_JOIN(void_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_FUNCTION_REF_INVOKER \ + BOOST_JOIN(function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER \ + BOOST_JOIN(void_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_MEMBER_INVOKER \ + BOOST_JOIN(function_mem_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VOID_MEMBER_INVOKER \ + BOOST_JOIN(function_void_mem_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_FUNCTION_INVOKER \ + BOOST_JOIN(get_function_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER \ + BOOST_JOIN(get_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER \ + BOOST_JOIN(get_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_MEMBER_INVOKER \ + BOOST_JOIN(get_member_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_INVOKER \ + BOOST_JOIN(get_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VTABLE BOOST_JOIN(basic_vtable,BOOST_FUNCTION_NUM_ARGS) + +#ifndef BOOST_NO_VOID_RETURNS +# define BOOST_FUNCTION_VOID_RETURN_TYPE void +# define BOOST_FUNCTION_RETURN(X) X +#else +# define BOOST_FUNCTION_VOID_RETURN_TYPE boost::detail::function::unusable +# define BOOST_FUNCTION_RETURN(X) X; return BOOST_FUNCTION_VOID_RETURN_TYPE () +#endif + +namespace boost { + namespace detail { + namespace function { + template< + typename FunctionPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_FUNCTION_INVOKER + { + static R invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + return f(BOOST_FUNCTION_ARGS); + } + }; + + template< + typename FunctionPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_VOID_FUNCTION_INVOKER + { + static BOOST_FUNCTION_VOID_RETURN_TYPE + invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + BOOST_FUNCTION_RETURN(f(BOOST_FUNCTION_ARGS)); + } + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_FUNCTION_OBJ_INVOKER + { + static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)(BOOST_FUNCTION_ARGS); + } + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER + { + static BOOST_FUNCTION_VOID_RETURN_TYPE + invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS)); + } + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_FUNCTION_REF_INVOKER + { + static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)(BOOST_FUNCTION_ARGS); + } + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER + { + static BOOST_FUNCTION_VOID_RETURN_TYPE + invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS)); + } + }; + +#if BOOST_FUNCTION_NUM_ARGS > 0 + /* Handle invocation of member pointers. */ + template< + typename MemberPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_MEMBER_INVOKER + { + static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + MemberPtr* f = + reinterpret_cast(&function_obj_ptr.data); + return boost::mem_fn(*f)(BOOST_FUNCTION_ARGS); + } + }; + + template< + typename MemberPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_VOID_MEMBER_INVOKER + { + static BOOST_FUNCTION_VOID_RETURN_TYPE + invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + MemberPtr* f = + reinterpret_cast(&function_obj_ptr.data); + BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS)); + } + }; +#endif + + template< + typename FunctionPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_GET_FUNCTION_INVOKER + { + typedef typename mpl::if_c<(is_void::value), + BOOST_FUNCTION_VOID_FUNCTION_INVOKER< + FunctionPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >, + BOOST_FUNCTION_FUNCTION_INVOKER< + FunctionPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + > + >::type type; + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER + { + typedef typename mpl::if_c<(is_void::value), + BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >, + BOOST_FUNCTION_FUNCTION_OBJ_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + > + >::type type; + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER + { + typedef typename mpl::if_c<(is_void::value), + BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >, + BOOST_FUNCTION_FUNCTION_REF_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + > + >::type type; + }; + +#if BOOST_FUNCTION_NUM_ARGS > 0 + /* Retrieve the appropriate invoker for a member pointer. */ + template< + typename MemberPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_GET_MEMBER_INVOKER + { + typedef typename mpl::if_c<(is_void::value), + BOOST_FUNCTION_VOID_MEMBER_INVOKER< + MemberPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >, + BOOST_FUNCTION_MEMBER_INVOKER< + MemberPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + > + >::type type; + }; +#endif + + /* Given the tag returned by get_function_tag, retrieve the + actual invoker that will be used for the given function + object. + + Each specialization contains an "apply" nested class template + that accepts the function object, return type, function + argument types, and allocator. The resulting "apply" class + contains two typedefs, "invoker_type" and "manager_type", + which correspond to the invoker and manager types. */ + template + struct BOOST_FUNCTION_GET_INVOKER { }; + + /* Retrieve the invoker for a function pointer. */ + template<> + struct BOOST_FUNCTION_GET_INVOKER + { + template + struct apply + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER< + FunctionPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER< + FunctionPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + }; + +#if BOOST_FUNCTION_NUM_ARGS > 0 + /* Retrieve the invoker for a member pointer. */ + template<> + struct BOOST_FUNCTION_GET_INVOKER + { + template + struct apply + { + typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER< + MemberPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER< + MemberPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + }; +#endif + + /* Retrieve the invoker for a function object. */ + template<> + struct BOOST_FUNCTION_GET_INVOKER + { + template + struct apply + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager_a manager_type; + }; + }; + + /* Retrieve the invoker for a reference to a function object. */ + template<> + struct BOOST_FUNCTION_GET_INVOKER + { + template + struct apply + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER< + typename RefWrapper::type, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef reference_manager manager_type; + }; + + template + struct apply_a + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER< + typename RefWrapper::type, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef reference_manager manager_type; + }; + }; + + + /** + * vtable for a specific boost::function instance. This + * structure must be an aggregate so that we can use static + * initialization in boost::function's assign_to and assign_to_a + * members. It therefore cannot have any constructors, + * destructors, base classes, etc. + */ + template + struct BOOST_FUNCTION_VTABLE + { +#ifndef BOOST_NO_VOID_RETURNS + typedef R result_type; +#else + typedef typename function_return_type::type result_type; +#endif // BOOST_NO_VOID_RETURNS + + typedef result_type (*invoker_type)(function_buffer& + BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS); + + template + bool assign_to(F f, function_buffer& functor) const + { + typedef typename get_function_tag::type tag; + return assign_to(f, functor, tag()); + } + template + bool assign_to_a(F f, function_buffer& functor, Allocator a) const + { + typedef typename get_function_tag::type tag; + return assign_to_a(f, functor, a, tag()); + } + + void clear(function_buffer& functor) const + { + if (base.manager) + base.manager(functor, functor, destroy_functor_tag); + } + + private: + // Function pointers + template + bool + assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const + { + this->clear(functor); + if (f) { + // should be a reinterpret cast, but some compilers insist + // on giving cv-qualifiers to free functions + functor.func_ptr = reinterpret_cast(f); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const + { + return assign_to(f,functor,function_ptr_tag()); + } + + // Member pointers +#if BOOST_FUNCTION_NUM_ARGS > 0 + template + bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const + { + // DPG TBD: Add explicit support for member function + // objects, so we invoke through mem_fn() but we retain the + // right target_type() values. + if (f) { + this->assign_to(boost::mem_fn(f), functor); + return true; + } else { + return false; + } + } + template + bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const + { + // DPG TBD: Add explicit support for member function + // objects, so we invoke through mem_fn() but we retain the + // right target_type() values. + if (f) { + this->assign_to_a(boost::mem_fn(f), functor, a); + return true; + } else { + return false; + } + } +#endif // BOOST_FUNCTION_NUM_ARGS > 0 + + // Function objects + // Assign to a function object using the small object optimization + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const + { + new (reinterpret_cast(&functor.data)) FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const + { + assign_functor(f,functor,mpl::true_()); + } + + // Assign to a function object allocated on the heap. + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const + { + functor.obj_ptr = new FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const + { + typedef functor_wrapper functor_wrapper_type; + typedef typename Allocator::template rebind::other + wrapper_allocator_type; + typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; + wrapper_allocator_type wrapper_allocator(a); + wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); + wrapper_allocator.construct(copy, functor_wrapper_type(f,a)); + functor_wrapper_type* new_f = static_cast(copy); + functor.obj_ptr = new_f; + } + + template + bool + assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor(f, functor, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor_a(f, functor, a, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + + // Reference to a function object + template + bool + assign_to(const reference_wrapper& f, + function_buffer& functor, function_obj_ref_tag) const + { + functor.obj_ref.obj_ptr = (void *)(f.get_pointer()); + functor.obj_ref.is_const_qualified = is_const::value; + functor.obj_ref.is_volatile_qualified = is_volatile::value; + return true; + } + template + bool + assign_to_a(const reference_wrapper& f, + function_buffer& functor, Allocator, function_obj_ref_tag) const + { + return assign_to(f,functor,function_obj_ref_tag()); + } + + public: + vtable_base base; + invoker_type invoker; + }; + } // end namespace function + } // end namespace detail + + template< + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + class BOOST_FUNCTION_FUNCTION : public function_base + +#if BOOST_FUNCTION_NUM_ARGS == 1 + + , public std::unary_function + +#elif BOOST_FUNCTION_NUM_ARGS == 2 + + , public std::binary_function + +#endif + + { + public: +#ifndef BOOST_NO_VOID_RETURNS + typedef R result_type; +#else + typedef typename boost::detail::function::function_return_type::type + result_type; +#endif // BOOST_NO_VOID_RETURNS + + private: + typedef boost::detail::function::BOOST_FUNCTION_VTABLE< + R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS> + vtable_type; + + vtable_type* get_vtable() const { + return reinterpret_cast( + reinterpret_cast(vtable) & ~static_cast(0x01)); + } + + struct clear_type {}; + + public: + BOOST_STATIC_CONSTANT(int, args = BOOST_FUNCTION_NUM_ARGS); + + // add signature for boost::lambda + template + struct sig + { + typedef result_type type; + }; + +#if BOOST_FUNCTION_NUM_ARGS == 1 + typedef T0 argument_type; +#elif BOOST_FUNCTION_NUM_ARGS == 2 + typedef T0 first_argument_type; + typedef T1 second_argument_type; +#endif + + BOOST_STATIC_CONSTANT(int, arity = BOOST_FUNCTION_NUM_ARGS); + BOOST_FUNCTION_ARG_TYPES + + typedef BOOST_FUNCTION_FUNCTION self_type; + + BOOST_FUNCTION_FUNCTION() : function_base() { } + + // MSVC chokes if the following two constructors are collapsed into + // one with a default parameter. + template + BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f +#ifndef BOOST_NO_SFINAE + ,typename boost::enable_if_c< + !(is_integral::value), + int>::type = 0 +#endif // BOOST_NO_SFINAE + ) : + function_base() + { + this->assign_to(f); + } + template + BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a +#ifndef BOOST_NO_SFINAE + ,typename boost::enable_if_c< + !(is_integral::value), + int>::type = 0 +#endif // BOOST_NO_SFINAE + ) : + function_base() + { + this->assign_to_a(f,a); + } + +#ifndef BOOST_NO_SFINAE + BOOST_FUNCTION_FUNCTION(clear_type*) : function_base() { } +#else + BOOST_FUNCTION_FUNCTION(int zero) : function_base() + { + BOOST_ASSERT(zero == 0); + } +#endif + + BOOST_FUNCTION_FUNCTION(const BOOST_FUNCTION_FUNCTION& f) : function_base() + { + this->assign_to_own(f); + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_FUNCTION_FUNCTION(BOOST_FUNCTION_FUNCTION&& f) : function_base() + { + this->move_assign(f); + } +#endif + + ~BOOST_FUNCTION_FUNCTION() { clear(); } + + result_type operator()(BOOST_FUNCTION_PARMS) const + { + if (this->empty()) + boost::throw_exception(bad_function_call()); + + return get_vtable()->invoker + (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS); + } + + // The distinction between when to use BOOST_FUNCTION_FUNCTION and + // when to use self_type is obnoxious. MSVC cannot handle self_type as + // the return type of these assignment operators, but Borland C++ cannot + // handle BOOST_FUNCTION_FUNCTION as the type of the temporary to + // construct. + template +#ifndef BOOST_NO_SFINAE + typename boost::enable_if_c< + !(is_integral::value), + BOOST_FUNCTION_FUNCTION&>::type +#else + BOOST_FUNCTION_FUNCTION& +#endif + operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f) + { + this->clear(); + BOOST_TRY { + this->assign_to(f); + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + return *this; + } + template + void assign(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a) + { + this->clear(); + BOOST_TRY{ + this->assign_to_a(f,a); + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + } + +#ifndef BOOST_NO_SFINAE + BOOST_FUNCTION_FUNCTION& operator=(clear_type*) + { + this->clear(); + return *this; + } +#else + BOOST_FUNCTION_FUNCTION& operator=(int zero) + { + BOOST_ASSERT(zero == 0); + this->clear(); + return *this; + } +#endif + + // Assignment from another BOOST_FUNCTION_FUNCTION + BOOST_FUNCTION_FUNCTION& operator=(const BOOST_FUNCTION_FUNCTION& f) + { + if (&f == this) + return *this; + + this->clear(); + BOOST_TRY { + this->assign_to_own(f); + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + return *this; + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + // Move assignment from another BOOST_FUNCTION_FUNCTION + BOOST_FUNCTION_FUNCTION& operator=(BOOST_FUNCTION_FUNCTION&& f) + { + + if (&f == this) + return *this; + + this->clear(); + BOOST_TRY { + this->move_assign(f); + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + return *this; + } +#endif + + void swap(BOOST_FUNCTION_FUNCTION& other) + { + if (&other == this) + return; + + BOOST_FUNCTION_FUNCTION tmp; + tmp.move_assign(*this); + this->move_assign(other); + other.move_assign(tmp); + } + + // Clear out a target, if there is one + void clear() + { + if (vtable) { + if (!this->has_trivial_copy_and_destroy()) + get_vtable()->clear(this->functor); + vtable = 0; + } + } + +#if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG) + // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it + operator bool () const { return !this->empty(); } +#else + private: + struct dummy { + void nonnull() {} + }; + + typedef void (dummy::*safe_bool)(); + + public: + operator safe_bool () const + { return (this->empty())? 0 : &dummy::nonnull; } + + bool operator!() const + { return this->empty(); } +#endif + + private: + void assign_to_own(const BOOST_FUNCTION_FUNCTION& f) + { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::clone_functor_tag); + } + } + + template + void assign_to(Functor f) + { + using boost::detail::function::vtable_base; + + typedef typename boost::detail::function::get_function_tag::type tag; + typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; + typedef typename get_invoker:: + template apply + handler_type; + + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + + // Note: it is extremely important that this initialization use + // static initialization. Otherwise, we will have a race + // condition here in multi-threaded code. See + // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/. + static const vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + + if (stored_vtable.assign_to(f, functor)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + // coverity[pointless_expression]: suppress coverity warnings on apparant if(const). + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + boost::detail::function::function_allows_small_object_optimization::value) + value |= static_cast(0x01); + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + + template + void assign_to_a(Functor f,Allocator a) + { + using boost::detail::function::vtable_base; + + typedef typename boost::detail::function::get_function_tag::type tag; + typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; + typedef typename get_invoker:: + template apply_a + handler_type; + + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + + // Note: it is extremely important that this initialization use + // static initialization. Otherwise, we will have a race + // condition here in multi-threaded code. See + // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/. + static const vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + + if (stored_vtable.assign_to_a(f, functor, a)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + // coverity[pointless_expression]: suppress coverity warnings on apparant if(const). + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + boost::detail::function::function_allows_small_object_optimization::value) + value |= static_cast(0x01); + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + + // Moves the value from the specified argument to *this. If the argument + // has its function object allocated on the heap, move_assign will pass + // its buffer to *this, and set the argument's buffer pointer to NULL. + void move_assign(BOOST_FUNCTION_FUNCTION& f) + { + if (&f == this) + return; + + BOOST_TRY { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::move_functor_tag); + f.vtable = 0; + } else { + clear(); + } + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + } + }; + + template + inline void swap(BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >& f1, + BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >& f2) + { + f1.swap(f2); + } + +// Poison comparisons between boost::function objects of the same type. +template + void operator==(const BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS>&, + const BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS>&); +template + void operator!=(const BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS>&, + const BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS>& ); + +#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) + +#if BOOST_FUNCTION_NUM_ARGS == 0 +#define BOOST_FUNCTION_PARTIAL_SPEC R (void) +#else +#define BOOST_FUNCTION_PARTIAL_SPEC R (BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS,T)) +#endif + +template +class function + : public BOOST_FUNCTION_FUNCTION +{ + typedef BOOST_FUNCTION_FUNCTION base_type; + typedef function self_type; + + struct clear_type {}; + +public: + + function() : base_type() {} + + template + function(Functor f +#ifndef BOOST_NO_SFINAE + ,typename boost::enable_if_c< + !(is_integral::value), + int>::type = 0 +#endif + ) : + base_type(f) + { + } + template + function(Functor f, Allocator a +#ifndef BOOST_NO_SFINAE + ,typename boost::enable_if_c< + !(is_integral::value), + int>::type = 0 +#endif + ) : + base_type(f,a) + { + } + +#ifndef BOOST_NO_SFINAE + function(clear_type*) : base_type() {} +#endif + + function(const self_type& f) : base_type(static_cast(f)){} + + function(const base_type& f) : base_type(static_cast(f)){} + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + // Move constructors + function(self_type&& f): base_type(static_cast(f)){} + function(base_type&& f): base_type(static_cast(f)){} +#endif + + self_type& operator=(const self_type& f) + { + self_type(f).swap(*this); + return *this; + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + self_type& operator=(self_type&& f) + { + self_type(static_cast(f)).swap(*this); + return *this; + } +#endif + + template +#ifndef BOOST_NO_SFINAE + typename boost::enable_if_c< + !(is_integral::value), + self_type&>::type +#else + self_type& +#endif + operator=(Functor f) + { + self_type(f).swap(*this); + return *this; + } + +#ifndef BOOST_NO_SFINAE + self_type& operator=(clear_type*) + { + this->clear(); + return *this; + } +#endif + + self_type& operator=(const base_type& f) + { + self_type(f).swap(*this); + return *this; + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + self_type& operator=(base_type&& f) + { + self_type(static_cast(f)).swap(*this); + return *this; + } +#endif +}; + +#undef BOOST_FUNCTION_PARTIAL_SPEC +#endif // have partial specialization + +} // end namespace boost + +// Cleanup after ourselves... +#undef BOOST_FUNCTION_VTABLE +#undef BOOST_FUNCTION_COMMA +#undef BOOST_FUNCTION_FUNCTION +#undef BOOST_FUNCTION_FUNCTION_INVOKER +#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER +#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER +#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER +#undef BOOST_FUNCTION_FUNCTION_REF_INVOKER +#undef BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER +#undef BOOST_FUNCTION_MEMBER_INVOKER +#undef BOOST_FUNCTION_VOID_MEMBER_INVOKER +#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER +#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER +#undef BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER +#undef BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER +#undef BOOST_FUNCTION_GET_INVOKER +#undef BOOST_FUNCTION_TEMPLATE_PARMS +#undef BOOST_FUNCTION_TEMPLATE_ARGS +#undef BOOST_FUNCTION_PARMS +#undef BOOST_FUNCTION_PARM +#ifdef BOOST_FUNCTION_ARG +# undef BOOST_FUNCTION_ARG +#endif +#undef BOOST_FUNCTION_ARGS +#undef BOOST_FUNCTION_ARG_TYPE +#undef BOOST_FUNCTION_ARG_TYPES +#undef BOOST_FUNCTION_VOID_RETURN_TYPE +#undef BOOST_FUNCTION_RETURN + +#if defined(BOOST_MSVC) +# pragma warning( pop ) +#endif diff --git a/contrib/src/boost/function_equal.hpp b/contrib/src/boost/function_equal.hpp new file mode 100644 index 0000000..2d76c75 --- /dev/null +++ b/contrib/src/boost/function_equal.hpp @@ -0,0 +1,28 @@ +// Copyright Douglas Gregor 2004. +// Copyright 2005 Peter Dimov + +// Use, modification and distribution is subject to +// the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org +#ifndef BOOST_FUNCTION_EQUAL_HPP +#define BOOST_FUNCTION_EQUAL_HPP + +namespace boost { + +template + bool function_equal_impl(const F& f, const G& g, long) + { return f == g; } + +// function_equal_impl needs to be unqualified to pick +// user overloads on two-phase compilers + +template + bool function_equal(const F& f, const G& g) + { return function_equal_impl(f, g, 0); } + +} // end namespace boost + +#endif // BOOST_FUNCTION_EQUAL_HPP diff --git a/contrib/src/boost/get_pointer.hpp b/contrib/src/boost/get_pointer.hpp new file mode 100644 index 0000000..36e2cd7 --- /dev/null +++ b/contrib/src/boost/get_pointer.hpp @@ -0,0 +1,76 @@ +// Copyright Peter Dimov and David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef GET_POINTER_DWA20021219_HPP +#define GET_POINTER_DWA20021219_HPP + +#include + +// In order to avoid circular dependencies with Boost.TR1 +// we make sure that our include of doesn't try to +// pull in the TR1 headers: that's why we use this header +// rather than including directly: +#include // std::auto_ptr + +namespace boost { + +// get_pointer(p) extracts a ->* capable pointer from p + +template T * get_pointer(T * p) +{ + return p; +} + +// get_pointer(shared_ptr const & p) has been moved to shared_ptr.hpp + +#if !defined( BOOST_NO_AUTO_PTR ) + +#if defined( __GNUC__ ) && (defined( __GXX_EXPERIMENTAL_CXX0X__ ) || (__cplusplus >= 201103L)) +#if defined( BOOST_GCC ) +#if BOOST_GCC >= 40600 +#define BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS +#endif // BOOST_GCC >= 40600 +#elif defined( __clang__ ) && defined( __has_warning ) +#if __has_warning("-Wdeprecated-declarations") +#define BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS +#endif // __has_warning("-Wdeprecated-declarations") +#endif +#endif // defined( __GNUC__ ) && (defined( __GXX_EXPERIMENTAL_CXX0X__ ) || (__cplusplus >= 201103L)) + +#if defined( BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS ) +// Disable libstdc++ warnings about std::auto_ptr being deprecated in C++11 mode +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#define BOOST_CORE_DETAIL_DISABLED_DEPRECATED_WARNINGS +#endif + +template T * get_pointer(std::auto_ptr const& p) +{ + return p.get(); +} + +#if defined( BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS ) +#pragma GCC diagnostic pop +#undef BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS +#endif + +#endif // !defined( BOOST_NO_AUTO_PTR ) + +#if !defined( BOOST_NO_CXX11_SMART_PTR ) + +template T * get_pointer( std::unique_ptr const& p ) +{ + return p.get(); +} + +template T * get_pointer( std::shared_ptr const& p ) +{ + return p.get(); +} + +#endif + +} // namespace boost + +#endif // GET_POINTER_DWA20021219_HPP diff --git a/contrib/src/boost/integer.hpp b/contrib/src/boost/integer.hpp new file mode 100644 index 0000000..9fa0019 --- /dev/null +++ b/contrib/src/boost/integer.hpp @@ -0,0 +1,262 @@ +// boost integer.hpp header file -------------------------------------------// + +// Copyright Beman Dawes and Daryle Walker 1999. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/integer for documentation. + +// Revision History +// 22 Sep 01 Added value-based integer templates. (Daryle Walker) +// 01 Apr 01 Modified to use new header. (John Maddock) +// 30 Jul 00 Add typename syntax fix (Jens Maurer) +// 28 Aug 99 Initial version + +#ifndef BOOST_INTEGER_HPP +#define BOOST_INTEGER_HPP + +#include // self include + +#include // for boost::::boost::integer_traits +#include // for ::std::numeric_limits +#include // for boost::int64_t and BOOST_NO_INTEGRAL_INT64_T +#include + +// +// We simply cannot include this header on gcc without getting copious warnings of the kind: +// +// boost/integer.hpp:77:30: warning: use of C99 long long integer constant +// +// And yet there is no other reasonable implementation, so we declare this a system header +// to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +namespace boost +{ + + // Helper templates ------------------------------------------------------// + + // fast integers from least integers + // int_fast_t<> works correctly for unsigned too, in spite of the name. + template< typename LeastInt > + struct int_fast_t + { + typedef LeastInt fast; + typedef fast type; + }; // imps may specialize + + namespace detail{ + + // convert category to type + template< int Category > struct int_least_helper {}; // default is empty + template< int Category > struct uint_least_helper {}; // default is empty + + // specializatons: 1=long, 2=int, 3=short, 4=signed char, + // 6=unsigned long, 7=unsigned int, 8=unsigned short, 9=unsigned char + // no specializations for 0 and 5: requests for a type > long are in error +#ifdef BOOST_HAS_LONG_LONG + template<> struct int_least_helper<1> { typedef boost::long_long_type least; }; +#elif defined(BOOST_HAS_MS_INT64) + template<> struct int_least_helper<1> { typedef __int64 least; }; +#endif + template<> struct int_least_helper<2> { typedef long least; }; + template<> struct int_least_helper<3> { typedef int least; }; + template<> struct int_least_helper<4> { typedef short least; }; + template<> struct int_least_helper<5> { typedef signed char least; }; +#ifdef BOOST_HAS_LONG_LONG + template<> struct uint_least_helper<1> { typedef boost::ulong_long_type least; }; +#elif defined(BOOST_HAS_MS_INT64) + template<> struct uint_least_helper<1> { typedef unsigned __int64 least; }; +#endif + template<> struct uint_least_helper<2> { typedef unsigned long least; }; + template<> struct uint_least_helper<3> { typedef unsigned int least; }; + template<> struct uint_least_helper<4> { typedef unsigned short least; }; + template<> struct uint_least_helper<5> { typedef unsigned char least; }; + + template + struct exact_signed_base_helper{}; + template + struct exact_unsigned_base_helper{}; + + template <> struct exact_signed_base_helper { typedef signed char exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned char exact; }; +#if USHRT_MAX != UCHAR_MAX + template <> struct exact_signed_base_helper { typedef short exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned short exact; }; +#endif +#if UINT_MAX != USHRT_MAX + template <> struct exact_signed_base_helper { typedef int exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned int exact; }; +#endif +#if ULONG_MAX != UINT_MAX && ( !defined __TI_COMPILER_VERSION__ || \ + ( __TI_COMPILER_VERSION__ >= 7000000 && !defined __TI_40BIT_LONG__ ) ) + template <> struct exact_signed_base_helper { typedef long exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned long exact; }; +#endif +#if defined(BOOST_HAS_LONG_LONG) &&\ + ((defined(ULLONG_MAX) && (ULLONG_MAX != ULONG_MAX)) ||\ + (defined(ULONG_LONG_MAX) && (ULONG_LONG_MAX != ULONG_MAX)) ||\ + (defined(ULONGLONG_MAX) && (ULONGLONG_MAX != ULONG_MAX)) ||\ + (defined(_ULLONG_MAX) && (_ULLONG_MAX != ULONG_MAX))) + template <> struct exact_signed_base_helper { typedef boost::long_long_type exact; }; + template <> struct exact_unsigned_base_helper { typedef boost::ulong_long_type exact; }; +#endif + + + } // namespace detail + + // integer templates specifying number of bits ---------------------------// + + // signed + template< int Bits > // bits (including sign) required + struct int_t : public boost::detail::exact_signed_base_helper + { + BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::intmax_t) * CHAR_BIT), + "No suitable signed integer type with the requested number of bits is available."); + typedef typename boost::detail::int_least_helper + < +#ifdef BOOST_HAS_LONG_LONG + (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + +#else + 1 + +#endif + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + >::least least; + typedef typename int_fast_t::type fast; + }; + + // unsigned + template< int Bits > // bits required + struct uint_t : public boost::detail::exact_unsigned_base_helper + { + BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::uintmax_t) * CHAR_BIT), + "No suitable unsigned integer type with the requested number of bits is available."); +#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T) + // It's really not clear why this workaround should be needed... shrug I guess! JM + BOOST_STATIC_CONSTANT(int, s = + 6 + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits)); + typedef typename detail::int_least_helper< ::boost::uint_t::s>::least least; +#else + typedef typename boost::detail::uint_least_helper + < +#ifdef BOOST_HAS_LONG_LONG + (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + +#else + 1 + +#endif + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + >::least least; +#endif + typedef typename int_fast_t::type fast; + // int_fast_t<> works correctly for unsigned too, in spite of the name. + }; + + // integer templates specifying extreme value ----------------------------// + + // signed +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MaxValue > // maximum value to require support +#else + template< long MaxValue > // maximum value to require support +#endif + struct int_max_value_t + { + typedef typename boost::detail::int_least_helper + < +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) + (MaxValue <= ::boost::integer_traits::const_max) + +#else + 1 + +#endif + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + >::least least; + typedef typename int_fast_t::type fast; + }; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MinValue > // minimum value to require support +#else + template< long MinValue > // minimum value to require support +#endif + struct int_min_value_t + { + typedef typename boost::detail::int_least_helper + < +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) + (MinValue >= ::boost::integer_traits::const_min) + +#else + 1 + +#endif + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + >::least least; + typedef typename int_fast_t::type fast; + }; + + // unsigned +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::ulong_long_type MaxValue > // minimum value to require support +#else + template< unsigned long MaxValue > // minimum value to require support +#endif + struct uint_value_t + { +#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) + // It's really not clear why this workaround should be needed... shrug I guess! JM +#if defined(BOOST_NO_INTEGRAL_INT64_T) + BOOST_STATIC_CONSTANT(unsigned, which = + 1 + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max)); + typedef typename detail::int_least_helper< ::boost::uint_value_t::which>::least least; +#else // BOOST_NO_INTEGRAL_INT64_T + BOOST_STATIC_CONSTANT(unsigned, which = + 1 + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max)); + typedef typename detail::uint_least_helper< ::boost::uint_value_t::which>::least least; +#endif // BOOST_NO_INTEGRAL_INT64_T +#else + typedef typename boost::detail::uint_least_helper + < +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + (MaxValue <= ::boost::integer_traits::const_max) + +#else + 1 + +#endif + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + >::least least; +#endif + typedef typename int_fast_t::type fast; + }; + + +} // namespace boost + +#endif // BOOST_INTEGER_HPP diff --git a/contrib/src/boost/integer/integer_log2.hpp b/contrib/src/boost/integer/integer_log2.hpp new file mode 100644 index 0000000..8b34ce7 --- /dev/null +++ b/contrib/src/boost/integer/integer_log2.hpp @@ -0,0 +1,112 @@ +// ----------------------------------------------------------- +// integer_log2.hpp +// +// Gives the integer part of the logarithm, in base 2, of a +// given number. Behavior is undefined if the argument is <= 0. +// +// Copyright (c) 2003-2004, 2008 Gennaro Prota +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +#ifndef BOOST_INTEGER_INTEGER_LOG2_HPP +#define BOOST_INTEGER_INTEGER_LOG2_HPP + +#include +#ifdef __BORLANDC__ +#include +#endif +#include +#include + + +namespace boost { + namespace detail { + + template + int integer_log2_impl(T x, int n) { + + int result = 0; + + while (x != 1) { + + const T t = static_cast(x >> n); + if (t) { + result += n; + x = t; + } + n /= 2; + + } + + return result; + } + + + + // helper to find the maximum power of two + // less than p (more involved than necessary, + // to avoid PTS) + // + template + struct max_pow2_less { + + enum { c = 2*n < p }; + + BOOST_STATIC_CONSTANT(int, value = + c ? (max_pow2_less< c*p, 2*c*n>::value) : n); + + }; + + template <> + struct max_pow2_less<0, 0> { + + BOOST_STATIC_CONSTANT(int, value = 0); + }; + + // this template is here just for Borland :( + // we could simply rely on numeric_limits but sometimes + // Borland tries to use numeric_limits, because + // of its usual const-related problems in argument deduction + // - gps + template + struct width { + +#ifdef __BORLANDC__ + BOOST_STATIC_CONSTANT(int, value = sizeof(T) * CHAR_BIT); +#else + BOOST_STATIC_CONSTANT(int, value = (std::numeric_limits::digits)); +#endif + + }; + + } // detail + + + // --------- + // integer_log2 + // --------------- + // + template + int integer_log2(T x) { + + assert(x > 0); + + const int n = detail::max_pow2_less< + detail::width :: value, 4 + > :: value; + + return detail::integer_log2_impl(x, n); + + } + + + +} + + + +#endif // include guard diff --git a/contrib/src/boost/integer/integer_mask.hpp b/contrib/src/boost/integer/integer_mask.hpp new file mode 100644 index 0000000..2acf7f7 --- /dev/null +++ b/contrib/src/boost/integer/integer_mask.hpp @@ -0,0 +1,126 @@ +// Boost integer/integer_mask.hpp header file ------------------------------// + +// (C) Copyright Daryle Walker 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#ifndef BOOST_INTEGER_INTEGER_MASK_HPP +#define BOOST_INTEGER_INTEGER_MASK_HPP + +#include // self include + +#include // for BOOST_STATIC_CONSTANT +#include // for boost::uint_t + +#include // for UCHAR_MAX, etc. +#include // for std::size_t + +#include // for std::numeric_limits + +// +// We simply cannot include this header on gcc without getting copious warnings of the kind: +// +// boost/integer/integer_mask.hpp:93:35: warning: use of C99 long long integer constant +// +// And yet there is no other reasonable implementation, so we declare this a system header +// to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +namespace boost +{ + + +// Specified single-bit mask class declaration -----------------------------// +// (Lowest bit starts counting at 0.) + +template < std::size_t Bit > +struct high_bit_mask_t +{ + typedef typename uint_t<(Bit + 1)>::least least; + typedef typename uint_t<(Bit + 1)>::fast fast; + + BOOST_STATIC_CONSTANT( least, high_bit = (least( 1u ) << Bit) ); + BOOST_STATIC_CONSTANT( fast, high_bit_fast = (fast( 1u ) << Bit) ); + + BOOST_STATIC_CONSTANT( std::size_t, bit_position = Bit ); + +}; // boost::high_bit_mask_t + + +// Specified bit-block mask class declaration ------------------------------// +// Makes masks for the lowest N bits +// (Specializations are needed when N fills up a type.) + +template < std::size_t Bits > +struct low_bits_mask_t +{ + typedef typename uint_t::least least; + typedef typename uint_t::fast fast; + + BOOST_STATIC_CONSTANT( least, sig_bits = (~( ~(least( 0u )) << Bits )) ); + BOOST_STATIC_CONSTANT( fast, sig_bits_fast = fast(sig_bits) ); + + BOOST_STATIC_CONSTANT( std::size_t, bit_count = Bits ); + +}; // boost::low_bits_mask_t + + +#define BOOST_LOW_BITS_MASK_SPECIALIZE( Type ) \ + template < > struct low_bits_mask_t< std::numeric_limits::digits > { \ + typedef std::numeric_limits limits_type; \ + typedef uint_t::least least; \ + typedef uint_t::fast fast; \ + BOOST_STATIC_CONSTANT( least, sig_bits = (~( least(0u) )) ); \ + BOOST_STATIC_CONSTANT( fast, sig_bits_fast = fast(sig_bits) ); \ + BOOST_STATIC_CONSTANT( std::size_t, bit_count = limits_type::digits ); \ + } + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4245) // 'initializing' : conversion from 'int' to 'const boost::low_bits_mask_t<8>::least', signed/unsigned mismatch +#endif + +BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned char ); + +#if USHRT_MAX > UCHAR_MAX +BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned short ); +#endif + +#if UINT_MAX > USHRT_MAX +BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned int ); +#endif + +#if ULONG_MAX > UINT_MAX +BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned long ); +#endif + +#if defined(BOOST_HAS_LONG_LONG) + #if ((defined(ULLONG_MAX) && (ULLONG_MAX > ULONG_MAX)) ||\ + (defined(ULONG_LONG_MAX) && (ULONG_LONG_MAX > ULONG_MAX)) ||\ + (defined(ULONGLONG_MAX) && (ULONGLONG_MAX > ULONG_MAX)) ||\ + (defined(_ULLONG_MAX) && (_ULLONG_MAX > ULONG_MAX))) + BOOST_LOW_BITS_MASK_SPECIALIZE( boost::ulong_long_type ); + #endif +#elif defined(BOOST_HAS_MS_INT64) + #if 18446744073709551615ui64 > ULONG_MAX + BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned __int64 ); + #endif +#endif + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#undef BOOST_LOW_BITS_MASK_SPECIALIZE + + +} // namespace boost + + +#endif // BOOST_INTEGER_INTEGER_MASK_HPP diff --git a/contrib/src/boost/integer/static_log2.hpp b/contrib/src/boost/integer/static_log2.hpp new file mode 100644 index 0000000..56c7a00 --- /dev/null +++ b/contrib/src/boost/integer/static_log2.hpp @@ -0,0 +1,127 @@ +// -------------- Boost static_log2.hpp header file ----------------------- // +// +// Copyright (C) 2001 Daryle Walker. +// Copyright (C) 2003 Vesa Karvonen. +// Copyright (C) 2003 Gennaro Prota. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// --------------------------------------------------- +// See http://www.boost.org/libs/integer for documentation. +// ------------------------------------------------------------------------- // + + +#ifndef BOOST_INTEGER_STATIC_LOG2_HPP +#define BOOST_INTEGER_STATIC_LOG2_HPP + +#include "boost/integer_fwd.hpp" // for boost::intmax_t + +namespace boost { + + namespace detail { + + namespace static_log2_impl { + + // choose_initial_n<> + // + // Recursively doubles its integer argument, until it + // becomes >= of the "width" (C99, 6.2.6.2p4) of + // static_log2_argument_type. + // + // Used to get the maximum power of two less then the width. + // + // Example: if on your platform argument_type has 48 value + // bits it yields n=32. + // + // It's easy to prove that, starting from such a value + // of n, the core algorithm works correctly for any width + // of static_log2_argument_type and that recursion always + // terminates with x = 1 and n = 0 (see the algorithm's + // invariant). + + typedef boost::static_log2_argument_type argument_type; + typedef boost::static_log2_result_type result_type; + + template + struct choose_initial_n { + + BOOST_STATIC_CONSTANT(bool, c = (argument_type(1) << n << n) != 0); + BOOST_STATIC_CONSTANT( + result_type, + value = !c*n + choose_initial_n<2*c*n>::value + ); + + }; + + template <> + struct choose_initial_n<0> { + BOOST_STATIC_CONSTANT(result_type, value = 0); + }; + + + + // start computing from n_zero - must be a power of two + const result_type n_zero = 16; + const result_type initial_n = choose_initial_n::value; + + // static_log2_impl<> + // + // * Invariant: + // 2n + // 1 <= x && x < 2 at the start of each recursion + // (see also choose_initial_n<>) + // + // * Type requirements: + // + // argument_type maybe any unsigned type with at least n_zero + 1 + // value bits. (Note: If larger types will be standardized -e.g. + // unsigned long long- then the argument_type typedef can be + // changed without affecting the rest of the code.) + // + + template + struct static_log2_impl { + + BOOST_STATIC_CONSTANT(bool, c = (x >> n) > 0); // x >= 2**n ? + BOOST_STATIC_CONSTANT( + result_type, + value = c*n + (static_log2_impl< (x>>c*n), n/2 >::value) + ); + + }; + + template <> + struct static_log2_impl<1, 0> { + BOOST_STATIC_CONSTANT(result_type, value = 0); + }; + + } + } // detail + + + + // -------------------------------------- + // static_log2 + // ---------------------------------------- + + template + struct static_log2 { + + BOOST_STATIC_CONSTANT( + static_log2_result_type, + value = detail::static_log2_impl::static_log2_impl::value + ); + + }; + + + template <> + struct static_log2<0> { }; + +} + + + +#endif // include guard diff --git a/contrib/src/boost/integer_fwd.hpp b/contrib/src/boost/integer_fwd.hpp new file mode 100644 index 0000000..10577ae --- /dev/null +++ b/contrib/src/boost/integer_fwd.hpp @@ -0,0 +1,187 @@ +// Boost integer_fwd.hpp header file ---------------------------------------// + +// (C) Copyright Dave Abrahams and Daryle Walker 2001. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/integer for documentation. + +#ifndef BOOST_INTEGER_FWD_HPP +#define BOOST_INTEGER_FWD_HPP + +#include // for UCHAR_MAX, etc. +#include // for std::size_t + +#include // for BOOST_NO_INTRINSIC_WCHAR_T +#include // for std::numeric_limits +#include // For intmax_t + + +namespace boost +{ + +#ifdef BOOST_NO_INTEGRAL_INT64_T + typedef unsigned long static_log2_argument_type; + typedef int static_log2_result_type; + typedef long static_min_max_signed_type; + typedef unsigned long static_min_max_unsigned_type; +#else + typedef boost::uintmax_t static_min_max_unsigned_type; + typedef boost::intmax_t static_min_max_signed_type; + typedef boost::uintmax_t static_log2_argument_type; + typedef int static_log2_result_type; +#endif + +// From ------------------------------------------------// + +// Only has typedefs or using statements, with #conditionals + + +// From -----------------------------------------// + +template < class T > + class integer_traits; + +template < > + class integer_traits< bool >; + +template < > + class integer_traits< char >; + +template < > + class integer_traits< signed char >; + +template < > + class integer_traits< unsigned char >; + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template < > + class integer_traits< wchar_t >; +#endif + +template < > + class integer_traits< short >; + +template < > + class integer_traits< unsigned short >; + +template < > + class integer_traits< int >; + +template < > + class integer_traits< unsigned int >; + +template < > + class integer_traits< long >; + +template < > + class integer_traits< unsigned long >; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) +template < > +class integer_traits< ::boost::long_long_type>; + +template < > +class integer_traits< ::boost::ulong_long_type >; +#elif !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_MS_INT64) +template < > +class integer_traits<__int64>; + +template < > +class integer_traits; +#endif + + +// From ------------------------------------------------// + +template < typename LeastInt > + struct int_fast_t; + +template< int Bits > + struct int_t; + +template< int Bits > + struct uint_t; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MaxValue > // maximum value to require support +#else + template< long MaxValue > // maximum value to require support +#endif + struct int_max_value_t; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MinValue > // minimum value to require support +#else + template< long MinValue > // minimum value to require support +#endif + struct int_min_value_t; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::ulong_long_type MaxValue > // maximum value to require support +#else + template< unsigned long MaxValue > // maximum value to require support +#endif + struct uint_value_t; + + +// From -----------------------------------// + +template < std::size_t Bit > + struct high_bit_mask_t; + +template < std::size_t Bits > + struct low_bits_mask_t; + +template < > + struct low_bits_mask_t< ::std::numeric_limits::digits >; + +// From ------------------------------------// + +template + struct static_log2; + +template <> struct static_log2<0u>; + + +// From ---------------------------------// + +template + struct static_signed_min; + +template + struct static_signed_max; + +template + struct static_unsigned_min; + +template + struct static_unsigned_max; + + +// From + +#ifdef BOOST_NO_INTEGRAL_INT64_T + typedef unsigned long static_gcd_type; +#else + typedef boost::uintmax_t static_gcd_type; +#endif + +template < static_gcd_type Value1, static_gcd_type Value2 > + struct static_gcd; +template < static_gcd_type Value1, static_gcd_type Value2 > + struct static_lcm; + + +// From + +template < typename IntegerType > + class gcd_evaluator; +template < typename IntegerType > + class lcm_evaluator; + + +} // namespace boost + + +#endif // BOOST_INTEGER_FWD_HPP diff --git a/contrib/src/boost/integer_traits.hpp b/contrib/src/boost/integer_traits.hpp new file mode 100644 index 0000000..94eb00d --- /dev/null +++ b/contrib/src/boost/integer_traits.hpp @@ -0,0 +1,256 @@ +/* boost integer_traits.hpp header file + * + * Copyright Jens Maurer 2000 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * $Id$ + * + * Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers + */ + +// See http://www.boost.org/libs/integer for documentation. + + +#ifndef BOOST_INTEGER_TRAITS_HPP +#define BOOST_INTEGER_TRAITS_HPP + +#include +#include + +// These are an implementation detail and not part of the interface +#include +// we need wchar.h for WCHAR_MAX/MIN but not all platforms provide it, +// and some may have but not ... +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun) || defined(__QNX__)) +#include +#endif + +// +// We simply cannot include this header on gcc without getting copious warnings of the kind: +// +// ../../../boost/integer_traits.hpp:164:66: warning: use of C99 long long integer constant +// +// And yet there is no other reasonable implementation, so we declare this a system header +// to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +namespace boost { +template +class integer_traits : public std::numeric_limits +{ +public: + BOOST_STATIC_CONSTANT(bool, is_integral = false); +}; + +namespace detail { +template +class integer_traits_base +{ +public: + BOOST_STATIC_CONSTANT(bool, is_integral = true); + BOOST_STATIC_CONSTANT(T, const_min = min_val); + BOOST_STATIC_CONSTANT(T, const_max = max_val); +}; + +#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +// A definition is required even for integral static constants +template +const bool integer_traits_base::is_integral; + +template +const T integer_traits_base::const_min; + +template +const T integer_traits_base::const_max; +#endif + +} // namespace detail + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template<> +class integer_traits + : public std::numeric_limits, + // Don't trust WCHAR_MIN and WCHAR_MAX with Mac OS X's native + // library: they are wrong! +#if defined(WCHAR_MIN) && defined(WCHAR_MAX) && !defined(__APPLE__) + public detail::integer_traits_base +#elif defined(__BORLANDC__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__)) + // No WCHAR_MIN and WCHAR_MAX, whar_t is short and unsigned: + public detail::integer_traits_base +#elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400))\ + || (defined __APPLE__)\ + || (defined(__OpenBSD__) && defined(__GNUC__))\ + || (defined(__NetBSD__) && defined(__GNUC__))\ + || (defined(__FreeBSD__) && defined(__GNUC__))\ + || (defined(__DragonFly__) && defined(__GNUC__))\ + || (defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 3) && !defined(__SGI_STL_PORT)) + // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as int. + // - SGI MIPSpro with native library + // - gcc 3.x on HP-UX + // - Mac OS X with native library + // - gcc on FreeBSD, OpenBSD and NetBSD + public detail::integer_traits_base +#else +#error No WCHAR_MIN and WCHAR_MAX present, please adjust integer_traits<> for your compiler. +#endif +{ }; +#endif // BOOST_NO_INTRINSIC_WCHAR_T + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) +#if defined(ULLONG_MAX) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, LLONG_MIN, LLONG_MAX> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULLONG_MAX> +{ }; + +#elif defined(ULONG_LONG_MAX) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> : public std::numeric_limits< ::boost::long_long_type>, public detail::integer_traits_base< ::boost::long_long_type, LONG_LONG_MIN, LONG_LONG_MAX>{ }; +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULONG_LONG_MAX> +{ }; + +#elif defined(ULONGLONG_MAX) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, LONGLONG_MIN, LONGLONG_MAX> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULONGLONG_MAX> +{ }; + +#elif defined(_LLONG_MAX) && defined(_C2) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, -_LLONG_MAX - _C2, _LLONG_MAX> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, _ULLONG_MAX> +{ }; + +#elif defined(BOOST_HAS_LONG_LONG) +// +// we have long long but no constants, this happens for example with gcc in -ansi mode, +// we'll just have to work out the values for ourselves (assumes 2's compliment representation): +// +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, (1LL << (sizeof(::boost::long_long_type) * CHAR_BIT - 1)), ~(1LL << (sizeof(::boost::long_long_type) * CHAR_BIT - 1))> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ~0uLL> +{ }; + +#elif defined(BOOST_HAS_MS_INT64) + +template<> +class integer_traits< __int64> + : public std::numeric_limits< __int64>, + public detail::integer_traits_base< __int64, _I64_MIN, _I64_MAX> +{ }; + +template<> +class integer_traits< unsigned __int64> + : public std::numeric_limits< unsigned __int64>, + public detail::integer_traits_base< unsigned __int64, 0, _UI64_MAX> +{ }; + +#endif +#endif + +} // namespace boost + +#endif /* BOOST_INTEGER_TRAITS_HPP */ + + + diff --git a/contrib/src/boost/io/ios_state.hpp b/contrib/src/boost/io/ios_state.hpp new file mode 100644 index 0000000..07cfb34 --- /dev/null +++ b/contrib/src/boost/io/ios_state.hpp @@ -0,0 +1,439 @@ +// Boost io/ios_state.hpp header file --------------------------------------// + +// Copyright 2002, 2005 Daryle Walker. Use, modification, and distribution +// are subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or a copy at .) + +// See for the library's home page. + +#ifndef BOOST_IO_IOS_STATE_HPP +#define BOOST_IO_IOS_STATE_HPP + +#include // self include +#include + +#include // for std::ios_base, std::basic_ios, etc. +#ifndef BOOST_NO_STD_LOCALE +#include // for std::locale +#endif +#include // for std::basic_ostream +#include // for std::basic_streambuf +#include // for std::char_traits + + +namespace boost +{ +namespace io +{ + + +// Basic stream state saver class declarations -----------------------------// + +class ios_flags_saver +{ +public: + typedef ::std::ios_base state_type; + typedef ::std::ios_base::fmtflags aspect_type; + + explicit ios_flags_saver( state_type &s ) + : s_save_( s ), a_save_( s.flags() ) + {} + ios_flags_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.flags(a) ) + {} + ~ios_flags_saver() + { this->restore(); } + + void restore() + { s_save_.flags( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + + ios_flags_saver& operator=(const ios_flags_saver&); +}; + +class ios_precision_saver +{ +public: + typedef ::std::ios_base state_type; + typedef ::std::streamsize aspect_type; + + explicit ios_precision_saver( state_type &s ) + : s_save_( s ), a_save_( s.precision() ) + {} + ios_precision_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.precision(a) ) + {} + ~ios_precision_saver() + { this->restore(); } + + void restore() + { s_save_.precision( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + + ios_precision_saver& operator=(const ios_precision_saver&); +}; + +class ios_width_saver +{ +public: + typedef ::std::ios_base state_type; + typedef ::std::streamsize aspect_type; + + explicit ios_width_saver( state_type &s ) + : s_save_( s ), a_save_( s.width() ) + {} + ios_width_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.width(a) ) + {} + ~ios_width_saver() + { this->restore(); } + + void restore() + { s_save_.width( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + ios_width_saver& operator=(const ios_width_saver&); +}; + + +// Advanced stream state saver class template declarations -----------------// + +template < typename Ch, class Tr > +class basic_ios_iostate_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::ios_base::iostate aspect_type; + + explicit basic_ios_iostate_saver( state_type &s ) + : s_save_( s ), a_save_( s.rdstate() ) + {} + basic_ios_iostate_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.rdstate() ) + { s.clear(a); } + ~basic_ios_iostate_saver() + { this->restore(); } + + void restore() + { s_save_.clear( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_iostate_saver& operator=(const basic_ios_iostate_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_exception_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::ios_base::iostate aspect_type; + + explicit basic_ios_exception_saver( state_type &s ) + : s_save_( s ), a_save_( s.exceptions() ) + {} +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + basic_ios_exception_saver( state_type &s, aspect_type a ) +#else + basic_ios_exception_saver( state_type &s, aspect_type const &a ) +#endif + : s_save_( s ), a_save_( s.exceptions() ) + { s.exceptions(a); } + ~basic_ios_exception_saver() + { this->restore(); } + + void restore() + { s_save_.exceptions( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_exception_saver& operator=(const basic_ios_exception_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_tie_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::basic_ostream * aspect_type; + + explicit basic_ios_tie_saver( state_type &s ) + : s_save_( s ), a_save_( s.tie() ) + {} + basic_ios_tie_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.tie(a) ) + {} + ~basic_ios_tie_saver() + { this->restore(); } + + void restore() + { s_save_.tie( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_tie_saver& operator=(const basic_ios_tie_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_rdbuf_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::basic_streambuf * aspect_type; + + explicit basic_ios_rdbuf_saver( state_type &s ) + : s_save_( s ), a_save_( s.rdbuf() ) + {} + basic_ios_rdbuf_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.rdbuf(a) ) + {} + ~basic_ios_rdbuf_saver() + { this->restore(); } + + void restore() + { s_save_.rdbuf( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_rdbuf_saver& operator=(const basic_ios_rdbuf_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_fill_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef typename state_type::char_type aspect_type; + + explicit basic_ios_fill_saver( state_type &s ) + : s_save_( s ), a_save_( s.fill() ) + {} + basic_ios_fill_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.fill(a) ) + {} + ~basic_ios_fill_saver() + { this->restore(); } + + void restore() + { s_save_.fill( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_fill_saver& operator=(const basic_ios_fill_saver&); +}; + +#ifndef BOOST_NO_STD_LOCALE +template < typename Ch, class Tr > +class basic_ios_locale_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::locale aspect_type; + + explicit basic_ios_locale_saver( state_type &s ) + : s_save_( s ), a_save_( s.getloc() ) + {} + basic_ios_locale_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.imbue(a) ) + {} + ~basic_ios_locale_saver() + { this->restore(); } + + void restore() + { s_save_.imbue( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_locale_saver& operator=(const basic_ios_locale_saver&); +}; +#endif + + +// User-defined stream state saver class declarations ----------------------// + +class ios_iword_saver +{ +public: + typedef ::std::ios_base state_type; + typedef int index_type; + typedef long aspect_type; + + explicit ios_iword_saver( state_type &s, index_type i ) + : s_save_( s ), a_save_( s.iword(i) ), i_save_( i ) + {} + ios_iword_saver( state_type &s, index_type i, aspect_type const &a ) + : s_save_( s ), a_save_( s.iword(i) ), i_save_( i ) + { s.iword(i) = a; } + ~ios_iword_saver() + { this->restore(); } + + void restore() + { s_save_.iword( i_save_ ) = a_save_; } + +private: + state_type & s_save_; + aspect_type const a_save_; + index_type const i_save_; + + ios_iword_saver& operator=(const ios_iword_saver&); +}; + +class ios_pword_saver +{ +public: + typedef ::std::ios_base state_type; + typedef int index_type; + typedef void * aspect_type; + + explicit ios_pword_saver( state_type &s, index_type i ) + : s_save_( s ), a_save_( s.pword(i) ), i_save_( i ) + {} + ios_pword_saver( state_type &s, index_type i, aspect_type const &a ) + : s_save_( s ), a_save_( s.pword(i) ), i_save_( i ) + { s.pword(i) = a; } + ~ios_pword_saver() + { this->restore(); } + + void restore() + { s_save_.pword( i_save_ ) = a_save_; } + +private: + state_type & s_save_; + aspect_type const a_save_; + index_type const i_save_; + + ios_pword_saver operator=(const ios_pword_saver&); +}; + + +// Combined stream state saver class (template) declarations ---------------// + +class ios_base_all_saver +{ +public: + typedef ::std::ios_base state_type; + + explicit ios_base_all_saver( state_type &s ) + : s_save_( s ), a1_save_( s.flags() ), a2_save_( s.precision() ) + , a3_save_( s.width() ) + {} + + ~ios_base_all_saver() + { this->restore(); } + + void restore() + { + s_save_.width( a3_save_ ); + s_save_.precision( a2_save_ ); + s_save_.flags( a1_save_ ); + } + +private: + state_type & s_save_; + state_type::fmtflags const a1_save_; + ::std::streamsize const a2_save_; + ::std::streamsize const a3_save_; + + ios_base_all_saver& operator=(const ios_base_all_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_all_saver +{ +public: + typedef ::std::basic_ios state_type; + + explicit basic_ios_all_saver( state_type &s ) + : s_save_( s ), a1_save_( s.flags() ), a2_save_( s.precision() ) + , a3_save_( s.width() ), a4_save_( s.rdstate() ) + , a5_save_( s.exceptions() ), a6_save_( s.tie() ) + , a7_save_( s.rdbuf() ), a8_save_( s.fill() ) + #ifndef BOOST_NO_STD_LOCALE + , a9_save_( s.getloc() ) + #endif + {} + + ~basic_ios_all_saver() + { this->restore(); } + + void restore() + { + #ifndef BOOST_NO_STD_LOCALE + s_save_.imbue( a9_save_ ); + #endif + s_save_.fill( a8_save_ ); + s_save_.rdbuf( a7_save_ ); + s_save_.tie( a6_save_ ); + s_save_.exceptions( a5_save_ ); + s_save_.clear( a4_save_ ); + s_save_.width( a3_save_ ); + s_save_.precision( a2_save_ ); + s_save_.flags( a1_save_ ); + } + +private: + state_type & s_save_; + typename state_type::fmtflags const a1_save_; + ::std::streamsize const a2_save_; + ::std::streamsize const a3_save_; + typename state_type::iostate const a4_save_; + typename state_type::iostate const a5_save_; + ::std::basic_ostream * const a6_save_; + ::std::basic_streambuf * const a7_save_; + typename state_type::char_type const a8_save_; + #ifndef BOOST_NO_STD_LOCALE + ::std::locale const a9_save_; + #endif + + basic_ios_all_saver& operator=(const basic_ios_all_saver&); +}; + +class ios_all_word_saver +{ +public: + typedef ::std::ios_base state_type; + typedef int index_type; + + ios_all_word_saver( state_type &s, index_type i ) + : s_save_( s ), i_save_( i ), a1_save_( s.iword(i) ) + , a2_save_( s.pword(i) ) + {} + + ~ios_all_word_saver() + { this->restore(); } + + void restore() + { + s_save_.pword( i_save_ ) = a2_save_; + s_save_.iword( i_save_ ) = a1_save_; + } + +private: + state_type & s_save_; + index_type const i_save_; + long const a1_save_; + void * const a2_save_; + + ios_all_word_saver& operator=(const ios_all_word_saver&); +}; + + +} // namespace io +} // namespace boost + + +#endif // BOOST_IO_IOS_STATE_HPP diff --git a/contrib/src/boost/io_fwd.hpp b/contrib/src/boost/io_fwd.hpp new file mode 100644 index 0000000..417b81e --- /dev/null +++ b/contrib/src/boost/io_fwd.hpp @@ -0,0 +1,67 @@ +// Boost io_fwd.hpp header file --------------------------------------------// + +// Copyright 2002 Daryle Walker. Use, modification, and distribution are subject +// to the Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or a copy at .) + +// See for the library's home page. + +#ifndef BOOST_IO_FWD_HPP +#define BOOST_IO_FWD_HPP + +#include // for std::char_traits (declaration) + + +namespace boost +{ +namespace io +{ + + +// From -------------------------------------------// + +class ios_flags_saver; +class ios_precision_saver; +class ios_width_saver; +class ios_base_all_saver; + +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_iostate_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_exception_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_tie_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_rdbuf_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_fill_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_locale_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_all_saver; + +typedef basic_ios_iostate_saver ios_iostate_saver; +typedef basic_ios_iostate_saver wios_iostate_saver; +typedef basic_ios_exception_saver ios_exception_saver; +typedef basic_ios_exception_saver wios_exception_saver; +typedef basic_ios_tie_saver ios_tie_saver; +typedef basic_ios_tie_saver wios_tie_saver; +typedef basic_ios_rdbuf_saver ios_rdbuf_saver; +typedef basic_ios_rdbuf_saver wios_rdbuf_saver; +typedef basic_ios_fill_saver ios_fill_saver; +typedef basic_ios_fill_saver wios_fill_saver; +typedef basic_ios_locale_saver ios_locale_saver; +typedef basic_ios_locale_saver wios_locale_saver; +typedef basic_ios_all_saver ios_all_saver; +typedef basic_ios_all_saver wios_all_saver; + +class ios_iword_saver; +class ios_pword_saver; +class ios_all_word_saver; + + +} // namespace io +} // namespace boost + + +#endif // BOOST_IO_FWD_HPP diff --git a/contrib/src/boost/iterator.hpp b/contrib/src/boost/iterator.hpp new file mode 100644 index 0000000..c9c6197 --- /dev/null +++ b/contrib/src/boost/iterator.hpp @@ -0,0 +1,20 @@ +// (C) Copyright Beman Dawes 2000. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ITERATOR_HPP +#define BOOST_ITERATOR_HPP + +// This header is obsolete and will be deprecated. + +#include +#include // std::ptrdiff_t + +namespace boost +{ + +using std::iterator; + +} // namespace boost + +#endif // BOOST_ITERATOR_HPP diff --git a/contrib/src/boost/iterator/detail/config_def.hpp b/contrib/src/boost/iterator/detail/config_def.hpp new file mode 100644 index 0000000..117e75a --- /dev/null +++ b/contrib/src/boost/iterator/detail/config_def.hpp @@ -0,0 +1,128 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// no include guard multiple inclusion intended + +// +// This is a temporary workaround until the bulk of this is +// available in boost config. +// 23/02/03 thw +// + +#include // for prior +#include + +#ifdef BOOST_ITERATOR_CONFIG_DEF +# error you have nested config_def #inclusion. +#else +# define BOOST_ITERATOR_CONFIG_DEF +#endif + +// We enable this always now. Otherwise, the simple case in +// libs/iterator/test/constant_iterator_arrow.cpp fails to compile +// because the operator-> return is improperly deduced as a non-const +// pointer. +#if 1 || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531)) + +// Recall that in general, compilers without partial specialization +// can't strip constness. Consider counting_iterator, which normally +// passes a const Value to iterator_facade. As a result, any code +// which makes a std::vector of the iterator's value_type will fail +// when its allocator declares functions overloaded on reference and +// const_reference (the same type). +// +// Furthermore, Borland 5.5.1 drops constness in enough ways that we +// end up using a proxy for operator[] when we otherwise shouldn't. +// Using reference constness gives it an extra hint that it can +// return the value_type from operator[] directly, but is not +// strictly necessary. Not sure how best to resolve this one. + +# define BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY 1 + +#endif + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x5A0)) \ + || (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \ + || BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) \ + || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) + +# define BOOST_NO_LVALUE_RETURN_DETECTION + +# if 0 // test code + struct v {}; + + typedef char (&no)[3]; + + template + no foo(T const&, ...); + + template + char foo(T&, int); + + + struct value_iterator + { + v operator*() const; + }; + + template + struct lvalue_deref_helper + { + static T& x; + enum { value = (sizeof(foo(*x,0)) == 1) }; + }; + + int z2[(lvalue_deref_helper::value == 1) ? 1 : -1]; + int z[(lvalue_deref_helper::value) == 1 ? -1 : 1 ]; +# endif + +#endif + +#if BOOST_WORKAROUND(__MWERKS__, <=0x2407) +# define BOOST_NO_IS_CONVERTIBLE // "is_convertible doesn't work for simple types" +#endif + +#if BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4) && !defined(__EDG_VERSION__) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) +# define BOOST_NO_IS_CONVERTIBLE_TEMPLATE // The following program fails to compile: + +# if 0 // test code + #include + template + struct foo + { + foo(T); + + template + foo(foo const& other) : p(other.p) { } + + T p; + }; + + bool x = boost::is_convertible, foo >::value; +# endif + +#endif + + +#if !defined(BOOST_MSVC) && (defined(BOOST_NO_SFINAE) || defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_IS_CONVERTIBLE_TEMPLATE)) +# define BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY +#endif + +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + +// GCC-2.95 (obsolete) eagerly instantiates templated constructors and conversion +// operators in convertibility checks, causing premature errors. +// +// Borland's problems are harder to diagnose due to lack of an +// instantiation stack backtrace. They may be due in part to the fact +// that it drops cv-qualification willy-nilly in templates. +# define BOOST_NO_ONE_WAY_ITERATOR_INTEROP +# endif + +// no include guard; multiple inclusion intended diff --git a/contrib/src/boost/iterator/detail/config_undef.hpp b/contrib/src/boost/iterator/detail/config_undef.hpp new file mode 100644 index 0000000..bf1b8d7 --- /dev/null +++ b/contrib/src/boost/iterator/detail/config_undef.hpp @@ -0,0 +1,24 @@ +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// no include guard multiple inclusion intended + +// +// This is a temporary workaround until the bulk of this is +// available in boost config. +// 23/02/03 thw +// + +#undef BOOST_NO_IS_CONVERTIBLE +#undef BOOST_NO_IS_CONVERTIBLE_TEMPLATE +#undef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY +#undef BOOST_NO_LVALUE_RETURN_DETECTION +#undef BOOST_NO_ONE_WAY_ITERATOR_INTEROP + +#ifdef BOOST_ITERATOR_CONFIG_DEF +# undef BOOST_ITERATOR_CONFIG_DEF +#else +# error missing or nested #include config_def +#endif diff --git a/contrib/src/boost/iterator/detail/enable_if.hpp b/contrib/src/boost/iterator/detail/enable_if.hpp new file mode 100644 index 0000000..071f5fe --- /dev/null +++ b/contrib/src/boost/iterator/detail/enable_if.hpp @@ -0,0 +1,83 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_ENABLE_IF_23022003THW_HPP +#define BOOST_ENABLE_IF_23022003THW_HPP + +#include +#include + +#include + +// +// Boost iterators uses its own enable_if cause we need +// special semantics for deficient compilers. +// 23/02/03 thw +// + +namespace boost +{ + + namespace iterators + { + // + // Base machinery for all kinds of enable if + // + template + struct enabled + { + template + struct base + { + typedef T type; + }; + }; + + // + // For compilers that don't support "Substitution Failure Is Not An Error" + // enable_if falls back to always enabled. See comments + // on operator implementation for consequences. + // + template<> + struct enabled + { + template + struct base + { +#ifdef BOOST_NO_SFINAE + + typedef T type; + + // This way to do it would give a nice error message containing + // invalid overload, but has the big disadvantage that + // there is no reference to user code in the error message. + // + // struct invalid_overload; + // typedef invalid_overload type; + // +#endif + }; + }; + + + template + struct enable_if +# if !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_IS_CONVERTIBLE) + : enabled<(Cond::value)>::template base +# else + : mpl::identity +# endif + { + }; + + } // namespace iterators + +} // namespace boost + +#include + +#endif // BOOST_ENABLE_IF_23022003THW_HPP diff --git a/contrib/src/boost/iterator/detail/facade_iterator_category.hpp b/contrib/src/boost/iterator/detail/facade_iterator_category.hpp new file mode 100644 index 0000000..67fdf44 --- /dev/null +++ b/contrib/src/boost/iterator/detail/facade_iterator_category.hpp @@ -0,0 +1,193 @@ +// Copyright David Abrahams 2003. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef FACADE_ITERATOR_CATEGORY_DWA20031118_HPP +# define FACADE_ITERATOR_CATEGORY_DWA20031118_HPP + +# include + +# include // used in iterator_tag inheritance logic +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +# include + +# include // try to keep this last + +# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY +# include +# endif + +// +// iterator_category deduction for iterator_facade +// + +namespace boost { +namespace iterators { + +// forward declaration +struct use_default; + +namespace detail { + +struct input_output_iterator_tag + : std::input_iterator_tag +{ + // Using inheritance for only input_iterator_tag helps to avoid + // ambiguities when a stdlib implementation dispatches on a + // function which is overloaded on both input_iterator_tag and + // output_iterator_tag, as STLPort does, in its __valid_range + // function. I claim it's better to avoid the ambiguity in these + // cases. + operator std::output_iterator_tag() const + { + return std::output_iterator_tag(); + } +}; + +// +// True iff the user has explicitly disabled writability of this +// iterator. Pass the iterator_facade's Value parameter and its +// nested ::reference type. +// +template +struct iterator_writability_disabled +# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY // Adding Thomas' logic? + : mpl::or_< + is_const + , boost::detail::indirect_traits::is_reference_to_const + , is_const + > +# else + : is_const +# endif +{}; + + +// +// Convert an iterator_facade's traversal category, Value parameter, +// and ::reference type to an appropriate old-style category. +// +// Due to changeset 21683, this now never results in a category convertible +// to output_iterator_tag. +// +// Change at: https://svn.boost.org/trac/boost/changeset/21683 +template +struct iterator_facade_default_category + : mpl::eval_if< + mpl::and_< + is_reference + , is_convertible + > + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::if_< + is_convertible + , std::bidirectional_iterator_tag + , std::forward_iterator_tag + > + > + , typename mpl::eval_if< + mpl::and_< + is_convertible + + // check for readability + , is_convertible + > + , mpl::identity + , mpl::identity + > + > +{ +}; + +// True iff T is convertible to an old-style iterator category. +template +struct is_iterator_category + : mpl::or_< + is_convertible + , is_convertible + > +{ +}; + +template +struct is_iterator_traversal + : is_convertible +{}; + +// +// A composite iterator_category tag convertible to Category (a pure +// old-style category) and Traversal (a pure traversal tag). +// Traversal must be a strict increase of the traversal power given by +// Category. +// +template +struct iterator_category_with_traversal + : Category, Traversal +{ + // Make sure this isn't used to build any categories where + // convertibility to Traversal is redundant. Should just use the + // Category element in that case. + BOOST_MPL_ASSERT_NOT(( + is_convertible< + typename iterator_category_to_traversal::type + , Traversal + >)); + + BOOST_MPL_ASSERT((is_iterator_category)); + BOOST_MPL_ASSERT_NOT((is_iterator_category)); + BOOST_MPL_ASSERT_NOT((is_iterator_traversal)); +# if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) + BOOST_MPL_ASSERT((is_iterator_traversal)); +# endif +}; + +// Computes an iterator_category tag whose traversal is Traversal and +// which is appropriate for an iterator +template +struct facade_iterator_category_impl +{ + BOOST_MPL_ASSERT_NOT((is_iterator_category)); + + typedef typename iterator_facade_default_category< + Traversal,ValueParam,Reference + >::type category; + + typedef typename mpl::if_< + is_same< + Traversal + , typename iterator_category_to_traversal::type + > + , category + , iterator_category_with_traversal + >::type type; +}; + +// +// Compute an iterator_category for iterator_facade +// +template +struct facade_iterator_category + : mpl::eval_if< + is_iterator_category + , mpl::identity // old-style categories are fine as-is + , facade_iterator_category_impl + > +{ +}; + +}}} // namespace boost::iterators::detail + +# include + +#endif // FACADE_ITERATOR_CATEGORY_DWA20031118_HPP diff --git a/contrib/src/boost/iterator/interoperable.hpp b/contrib/src/boost/iterator/interoperable.hpp new file mode 100644 index 0000000..6f3c872 --- /dev/null +++ b/contrib/src/boost/iterator/interoperable.hpp @@ -0,0 +1,54 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_INTEROPERABLE_23022003THW_HPP +# define BOOST_INTEROPERABLE_23022003THW_HPP + +# include +# include + +# include + +# include // must appear last + +namespace boost { +namespace iterators { + + // + // Meta function that determines whether two + // iterator types are considered interoperable. + // + // Two iterator types A,B are considered interoperable if either + // A is convertible to B or vice versa. + // This interoperability definition is in sync with the + // standards requirements on constant/mutable container + // iterators (23.1 [lib.container.requirements]). + // + // For compilers that don't support is_convertible + // is_interoperable gives false positives. See comments + // on operator implementation for consequences. + // + template + struct is_interoperable +# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY + : mpl::true_ +# else + : mpl::or_< + is_convertible< A, B > + , is_convertible< B, A > > +# endif + { + }; + +} // namespace iterators + +using iterators::is_interoperable; + +} // namespace boost + +# include + +#endif // BOOST_INTEROPERABLE_23022003THW_HPP diff --git a/contrib/src/boost/iterator/iterator_adaptor.hpp b/contrib/src/boost/iterator/iterator_adaptor.hpp new file mode 100644 index 0000000..87cfd05 --- /dev/null +++ b/contrib/src/boost/iterator/iterator_adaptor.hpp @@ -0,0 +1,360 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_ITERATOR_ADAPTOR_23022003THW_HPP +#define BOOST_ITERATOR_ADAPTOR_23022003THW_HPP + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY +# include +#endif + +#include +#include + +#include + +namespace boost { +namespace iterators { + + // Used as a default template argument internally, merely to + // indicate "use the default", this can also be passed by users + // explicitly in order to specify that the default should be used. + struct use_default; + +} // namespace iterators + +using iterators::use_default; + +// the incompleteness of use_default causes massive problems for +// is_convertible (naturally). This workaround is fortunately not +// needed for vc6/vc7. +template +struct is_convertible + : mpl::false_ {}; + +namespace iterators { + + namespace detail + { + + // + // Result type used in enable_if_convertible meta function. + // This can be an incomplete type, as only pointers to + // enable_if_convertible< ... >::type are used. + // We could have used void for this, but conversion to + // void* is just to easy. + // + struct enable_type; + } + + + // + // enable_if for use in adapted iterators constructors. + // + // In order to provide interoperability between adapted constant and + // mutable iterators, adapted iterators will usually provide templated + // conversion constructors of the following form + // + // template + // class adapted_iterator : + // public iterator_adaptor< adapted_iterator, Iterator > + // { + // public: + // + // ... + // + // template + // adapted_iterator( + // OtherIterator const& it + // , typename enable_if_convertible::type* = 0); + // + // ... + // }; + // + // enable_if_convertible is used to remove those overloads from the overload + // set that cannot be instantiated. For all practical purposes only overloads + // for constant/mutable interaction will remain. This has the advantage that + // meta functions like boost::is_convertible do not return false positives, + // as they can only look at the signature of the conversion constructor + // and not at the actual instantiation. + // + // enable_if_interoperable can be safely used in user code. It falls back to + // always enabled for compilers that don't support enable_if or is_convertible. + // There is no need for compiler specific workarounds in user code. + // + // The operators implementation relies on boost::is_convertible not returning + // false positives for user/library defined iterator types. See comments + // on operator implementation for consequences. + // +# if defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_SFINAE) + + template + struct enable_if_convertible + { + typedef boost::iterators::detail::enable_type type; + }; + +# elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292)) + + // For some reason vc7.1 needs us to "cut off" instantiation + // of is_convertible in a few cases. + template + struct enable_if_convertible + : iterators::enable_if< + mpl::or_< + is_same + , is_convertible + > + , boost::iterators::detail::enable_type + > + {}; + +# else + + template + struct enable_if_convertible + : iterators::enable_if< + is_convertible + , boost::iterators::detail::enable_type + > + {}; + +# endif + + // + // Default template argument handling for iterator_adaptor + // + namespace detail + { + // If T is use_default, return the result of invoking + // DefaultNullaryFn, otherwise return T. + template + struct ia_dflt_help + : mpl::eval_if< + is_same + , DefaultNullaryFn + , mpl::identity + > + { + }; + + // A metafunction which computes an iterator_adaptor's base class, + // a specialization of iterator_facade. + template < + class Derived + , class Base + , class Value + , class Traversal + , class Reference + , class Difference + > + struct iterator_adaptor_base + { + typedef iterator_facade< + Derived + +# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY + , typename boost::iterators::detail::ia_dflt_help< + Value + , mpl::eval_if< + is_same + , iterator_value + , remove_reference + > + >::type +# else + , typename boost::iterators::detail::ia_dflt_help< + Value, iterator_value + >::type +# endif + + , typename boost::iterators::detail::ia_dflt_help< + Traversal + , iterator_traversal + >::type + + , typename boost::iterators::detail::ia_dflt_help< + Reference + , mpl::eval_if< + is_same + , iterator_reference + , add_reference + > + >::type + + , typename boost::iterators::detail::ia_dflt_help< + Difference, iterator_difference + >::type + > + type; + }; + + // workaround for aC++ CR JAGaf33512 + template + inline void iterator_adaptor_assert_traversal () + { + BOOST_STATIC_ASSERT((is_convertible::value)); + } + } + + // + // Iterator Adaptor + // + // The parameter ordering changed slightly with respect to former + // versions of iterator_adaptor The idea is that when the user needs + // to fiddle with the reference type it is highly likely that the + // iterator category has to be adjusted as well. Any of the + // following four template arguments may be ommitted or explicitly + // replaced by use_default. + // + // Value - if supplied, the value_type of the resulting iterator, unless + // const. If const, a conforming compiler strips constness for the + // value_type. If not supplied, iterator_traits::value_type is used + // + // Category - the traversal category of the resulting iterator. If not + // supplied, iterator_traversal::type is used. + // + // Reference - the reference type of the resulting iterator, and in + // particular, the result type of operator*(). If not supplied but + // Value is supplied, Value& is used. Otherwise + // iterator_traits::reference is used. + // + // Difference - the difference_type of the resulting iterator. If not + // supplied, iterator_traits::difference_type is used. + // + template < + class Derived + , class Base + , class Value = use_default + , class Traversal = use_default + , class Reference = use_default + , class Difference = use_default + > + class iterator_adaptor + : public boost::iterators::detail::iterator_adaptor_base< + Derived, Base, Value, Traversal, Reference, Difference + >::type + { + friend class iterator_core_access; + + protected: + typedef typename boost::iterators::detail::iterator_adaptor_base< + Derived, Base, Value, Traversal, Reference, Difference + >::type super_t; + public: + iterator_adaptor() {} + + explicit iterator_adaptor(Base const &iter) + : m_iterator(iter) + { + } + + typedef Base base_type; + + Base const& base() const + { return m_iterator; } + + protected: + // for convenience in derived classes + typedef iterator_adaptor iterator_adaptor_; + + // + // lvalue access to the Base object for Derived + // + Base const& base_reference() const + { return m_iterator; } + + Base& base_reference() + { return m_iterator; } + + private: + // + // Core iterator interface for iterator_facade. This is private + // to prevent temptation for Derived classes to use it, which + // will often result in an error. Derived classes should use + // base_reference(), above, to get direct access to m_iterator. + // + typename super_t::reference dereference() const + { return *m_iterator; } + + template < + class OtherDerived, class OtherIterator, class V, class C, class R, class D + > + bool equal(iterator_adaptor const& x) const + { + // Maybe readd with same_distance + // BOOST_STATIC_ASSERT( + // (detail::same_category_and_difference::value) + // ); + return m_iterator == x.base(); + } + + typedef typename iterator_category_to_traversal< + typename super_t::iterator_category + >::type my_traversal; + +# define BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(cat) \ + boost::iterators::detail::iterator_adaptor_assert_traversal(); + + void advance(typename super_t::difference_type n) + { + BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag) + m_iterator += n; + } + + void increment() { ++m_iterator; } + + void decrement() + { + BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(bidirectional_traversal_tag) + --m_iterator; + } + + template < + class OtherDerived, class OtherIterator, class V, class C, class R, class D + > + typename super_t::difference_type distance_to( + iterator_adaptor const& y) const + { + BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag) + // Maybe readd with same_distance + // BOOST_STATIC_ASSERT( + // (detail::same_category_and_difference::value) + // ); + return y.base() - m_iterator; + } + +# undef BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL + + private: // data members + Base m_iterator; + }; + +} // namespace iterators + +using iterators::iterator_adaptor; +using iterators::enable_if_convertible; + +} // namespace boost + +#include + +#endif // BOOST_ITERATOR_ADAPTOR_23022003THW_HPP diff --git a/contrib/src/boost/iterator/iterator_categories.hpp b/contrib/src/boost/iterator/iterator_categories.hpp new file mode 100644 index 0000000..71202c9 --- /dev/null +++ b/contrib/src/boost/iterator/iterator_categories.hpp @@ -0,0 +1,215 @@ +// (C) Copyright Jeremy Siek 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ITERATOR_CATEGORIES_HPP +# define BOOST_ITERATOR_CATEGORIES_HPP + +# include +# include +# include + +# include + +# include +# include +# include +# include + +# include + +# include + +namespace boost { +namespace iterators { + +// +// Traversal Categories +// + +struct no_traversal_tag {}; + +struct incrementable_traversal_tag + : no_traversal_tag +{ +// incrementable_traversal_tag() {} +// incrementable_traversal_tag(std::output_iterator_tag const&) {}; +}; + +struct single_pass_traversal_tag + : incrementable_traversal_tag +{ +// single_pass_traversal_tag() {} +// single_pass_traversal_tag(std::input_iterator_tag const&) {}; +}; + +struct forward_traversal_tag + : single_pass_traversal_tag +{ +// forward_traversal_tag() {} +// forward_traversal_tag(std::forward_iterator_tag const&) {}; +}; + +struct bidirectional_traversal_tag + : forward_traversal_tag +{ +// bidirectional_traversal_tag() {}; +// bidirectional_traversal_tag(std::bidirectional_iterator_tag const&) {}; +}; + +struct random_access_traversal_tag + : bidirectional_traversal_tag +{ +// random_access_traversal_tag() {}; +// random_access_traversal_tag(std::random_access_iterator_tag const&) {}; +}; + +namespace detail +{ + // + // Convert a "strictly old-style" iterator category to a traversal + // tag. This is broken out into a separate metafunction to reduce + // the cost of instantiating iterator_category_to_traversal, below, + // for new-style types. + // + template + struct old_category_to_traversal + : mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , void + > + > + > + > + > + {}; + +} // namespace detail + +// +// Convert an iterator category into a traversal tag +// +template +struct iterator_category_to_traversal + : mpl::eval_if< // if already convertible to a traversal tag, we're done. + is_convertible + , mpl::identity + , boost::iterators::detail::old_category_to_traversal + > +{}; + +// Trait to get an iterator's traversal category +template +struct iterator_traversal + : iterator_category_to_traversal< + typename boost::detail::iterator_traits::iterator_category + > +{}; + +# ifdef BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT +// Hack because BOOST_MPL_AUX_LAMBDA_SUPPORT doesn't seem to work +// out well. Instantiating the nested apply template also +// requires instantiating iterator_traits on the +// placeholder. Instead we just specialize it as a metafunction +// class. +template <> +struct iterator_traversal +{ + template + struct apply : iterator_traversal + {}; +}; +template <> +struct iterator_traversal + : iterator_traversal +{}; +# endif + +// +// Convert an iterator traversal to one of the traversal tags. +// +template +struct pure_traversal_tag + : mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , void + > + > + > + > + > +{ +}; + +// +// Trait to retrieve one of the iterator traversal tags from the iterator category or traversal. +// +template +struct pure_iterator_traversal + : pure_traversal_tag::type> +{}; + +# ifdef BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT +template <> +struct pure_iterator_traversal +{ + template + struct apply : pure_iterator_traversal + {}; +}; +template <> +struct pure_iterator_traversal + : pure_iterator_traversal +{}; +# endif + +} // namespace iterators + +using iterators::no_traversal_tag; +using iterators::incrementable_traversal_tag; +using iterators::single_pass_traversal_tag; +using iterators::forward_traversal_tag; +using iterators::bidirectional_traversal_tag; +using iterators::random_access_traversal_tag; +using iterators::iterator_category_to_traversal; +using iterators::iterator_traversal; + +// This import is needed for backward compatibility with Boost.Range: +// boost/range/detail/demote_iterator_traversal_tag.hpp +// It should be removed when that header is fixed. +namespace detail { +using iterators::pure_traversal_tag; +} // namespace detail + +} // namespace boost + +#include + +#endif // BOOST_ITERATOR_CATEGORIES_HPP diff --git a/contrib/src/boost/iterator/iterator_concepts.hpp b/contrib/src/boost/iterator/iterator_concepts.hpp new file mode 100644 index 0000000..1a9f7d6 --- /dev/null +++ b/contrib/src/boost/iterator/iterator_concepts.hpp @@ -0,0 +1,275 @@ +// (C) Copyright Jeremy Siek 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ITERATOR_CONCEPTS_HPP +#define BOOST_ITERATOR_CONCEPTS_HPP + +#include +#include + +// Use boost::detail::iterator_traits to work around some MSVC/Dinkumware problems. +#include + +#include +#include + +#include +#include +#include +#include + +#include + +// Use boost/limits to work around missing limits headers on some compilers +#include +#include + +#include + +#include + +namespace boost_concepts +{ + // Used a different namespace here (instead of "boost") so that the + // concept descriptions do not take for granted the names in + // namespace boost. + + //=========================================================================== + // Iterator Access Concepts + + BOOST_concept(ReadableIterator,(Iterator)) + : boost::Assignable + , boost::CopyConstructible + + { + typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type value_type; + typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference reference; + + BOOST_CONCEPT_USAGE(ReadableIterator) + { + + value_type v = *i; + boost::ignore_unused_variable_warning(v); + } + private: + Iterator i; + }; + + template < + typename Iterator + , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type + > + struct WritableIterator + : boost::CopyConstructible + { + BOOST_CONCEPT_USAGE(WritableIterator) + { + *i = v; + } + private: + ValueType v; + Iterator i; + }; + + template < + typename Iterator + , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type + > + struct WritableIteratorConcept : WritableIterator {}; + + BOOST_concept(SwappableIterator,(Iterator)) + { + BOOST_CONCEPT_USAGE(SwappableIterator) + { + std::iter_swap(i1, i2); + } + private: + Iterator i1; + Iterator i2; + }; + + BOOST_concept(LvalueIterator,(Iterator)) + { + typedef typename boost::detail::iterator_traits::value_type value_type; + + BOOST_CONCEPT_USAGE(LvalueIterator) + { + value_type& r = const_cast(*i); + boost::ignore_unused_variable_warning(r); + } + private: + Iterator i; + }; + + + //=========================================================================== + // Iterator Traversal Concepts + + BOOST_concept(IncrementableIterator,(Iterator)) + : boost::Assignable + , boost::CopyConstructible + { + typedef typename boost::iterator_traversal::type traversal_category; + + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + traversal_category + , boost::incrementable_traversal_tag + >)); + + BOOST_CONCEPT_USAGE(IncrementableIterator) + { + ++i; + (void)i++; + } + private: + Iterator i; + }; + + BOOST_concept(SinglePassIterator,(Iterator)) + : IncrementableIterator + , boost::EqualityComparable + + { + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + BOOST_DEDUCED_TYPENAME SinglePassIterator::traversal_category + , boost::single_pass_traversal_tag + > )); + }; + + BOOST_concept(ForwardTraversal,(Iterator)) + : SinglePassIterator + , boost::DefaultConstructible + { + typedef typename boost::detail::iterator_traits::difference_type difference_type; + + BOOST_MPL_ASSERT((boost::is_integral)); + BOOST_MPL_ASSERT_RELATION(std::numeric_limits::is_signed, ==, true); + + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + BOOST_DEDUCED_TYPENAME ForwardTraversal::traversal_category + , boost::forward_traversal_tag + > )); + }; + + BOOST_concept(BidirectionalTraversal,(Iterator)) + : ForwardTraversal + { + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + BOOST_DEDUCED_TYPENAME BidirectionalTraversal::traversal_category + , boost::bidirectional_traversal_tag + > )); + + BOOST_CONCEPT_USAGE(BidirectionalTraversal) + { + --i; + (void)i--; + } + private: + Iterator i; + }; + + BOOST_concept(RandomAccessTraversal,(Iterator)) + : BidirectionalTraversal + { + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + BOOST_DEDUCED_TYPENAME RandomAccessTraversal::traversal_category + , boost::random_access_traversal_tag + > )); + + BOOST_CONCEPT_USAGE(RandomAccessTraversal) + { + i += n; + i = i + n; + i = n + i; + i -= n; + i = i - n; + n = i - j; + } + + private: + typename BidirectionalTraversal::difference_type n; + Iterator i, j; + }; + + //=========================================================================== + // Iterator Interoperability + + namespace detail + { + template + void interop_single_pass_constraints(Iterator1 const& i1, Iterator2 const& i2) + { + bool b; + b = i1 == i2; + b = i1 != i2; + + b = i2 == i1; + b = i2 != i1; + boost::ignore_unused_variable_warning(b); + } + + template + void interop_rand_access_constraints( + Iterator1 const& i1, Iterator2 const& i2, + boost::random_access_traversal_tag, boost::random_access_traversal_tag) + { + bool b; + typename boost::detail::iterator_traits::difference_type n; + b = i1 < i2; + b = i1 <= i2; + b = i1 > i2; + b = i1 >= i2; + n = i1 - i2; + + b = i2 < i1; + b = i2 <= i1; + b = i2 > i1; + b = i2 >= i1; + n = i2 - i1; + boost::ignore_unused_variable_warning(b); + boost::ignore_unused_variable_warning(n); + } + + template + void interop_rand_access_constraints( + Iterator1 const&, Iterator2 const&, + boost::single_pass_traversal_tag, boost::single_pass_traversal_tag) + { } + + } // namespace detail + + BOOST_concept(InteroperableIterator,(Iterator)(ConstIterator)) + { + private: + typedef typename boost::iterators::pure_iterator_traversal::type traversal_category; + typedef typename boost::iterators::pure_iterator_traversal::type const_traversal_category; + + public: + BOOST_CONCEPT_ASSERT((SinglePassIterator)); + BOOST_CONCEPT_ASSERT((SinglePassIterator)); + + BOOST_CONCEPT_USAGE(InteroperableIterator) + { + detail::interop_single_pass_constraints(i, ci); + detail::interop_rand_access_constraints(i, ci, traversal_category(), const_traversal_category()); + + ci = i; + } + + private: + Iterator i; + ConstIterator ci; + }; + +} // namespace boost_concepts + +#include + +#endif // BOOST_ITERATOR_CONCEPTS_HPP diff --git a/contrib/src/boost/iterator/iterator_facade.hpp b/contrib/src/boost/iterator/iterator_facade.hpp new file mode 100644 index 0000000..7b11d0a --- /dev/null +++ b/contrib/src/boost/iterator/iterator_facade.hpp @@ -0,0 +1,980 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_ITERATOR_FACADE_23022003THW_HPP +#define BOOST_ITERATOR_FACADE_23022003THW_HPP + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include // this goes last + +namespace boost { +namespace iterators { + + // This forward declaration is required for the friend declaration + // in iterator_core_access + template class iterator_facade; + + namespace detail + { + // A binary metafunction class that always returns bool. VC6 + // ICEs on mpl::always, probably because of the default + // parameters. + struct always_bool2 + { + template + struct apply + { + typedef bool type; + }; + }; + + // The type trait checks if the category or traversal is at least as advanced as the specified required traversal + template< typename CategoryOrTraversal, typename Required > + struct is_traversal_at_least : + public boost::is_convertible< typename iterator_category_to_traversal< CategoryOrTraversal >::type, Required > + {}; + + // + // enable if for use in operator implementation. + // + template < + class Facade1 + , class Facade2 + , class Return + > + struct enable_if_interoperable : + public boost::iterators::enable_if< + is_interoperable< Facade1, Facade2 > + , Return + > + {}; + + // + // enable if for use in implementation of operators specific for random access traversal. + // + template < + class Facade1 + , class Facade2 + , class Return + > + struct enable_if_interoperable_and_random_access_traversal : + public boost::iterators::enable_if< + mpl::and_< + is_interoperable< Facade1, Facade2 > + , is_traversal_at_least< typename iterator_category< Facade1 >::type, random_access_traversal_tag > + , is_traversal_at_least< typename iterator_category< Facade2 >::type, random_access_traversal_tag > + > + , Return + > + {}; + + // + // Generates associated types for an iterator_facade with the + // given parameters. + // + template < + class ValueParam + , class CategoryOrTraversal + , class Reference + , class Difference + > + struct iterator_facade_types + { + typedef typename facade_iterator_category< + CategoryOrTraversal, ValueParam, Reference + >::type iterator_category; + + typedef typename remove_const::type value_type; + + // Not the real associated pointer type + typedef typename mpl::eval_if< + boost::iterators::detail::iterator_writability_disabled + , add_pointer + , add_pointer + >::type pointer; + +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && (BOOST_WORKAROUND(_STLPORT_VERSION, BOOST_TESTED_AT(0x452)) \ + || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, BOOST_TESTED_AT(310))) \ + || BOOST_WORKAROUND(BOOST_RWSTD_VER, BOOST_TESTED_AT(0x20101)) \ + || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, <= 310) + + // To interoperate with some broken library/compiler + // combinations, user-defined iterators must be derived from + // std::iterator. It is possible to implement a standard + // library for broken compilers without this limitation. +# define BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE 1 + + typedef + iterator + base; +# endif + }; + + // iterators whose dereference operators reference the same value + // for all iterators into the same sequence (like many input + // iterators) need help with their postfix ++: the referenced + // value must be read and stored away before the increment occurs + // so that *a++ yields the originally referenced element and not + // the next one. + template + class postfix_increment_proxy + { + typedef typename iterator_value::type value_type; + public: + explicit postfix_increment_proxy(Iterator const& x) + : stored_value(*x) + {} + + // Returning a mutable reference allows nonsense like + // (*r++).mutate(), but it imposes fewer assumptions about the + // behavior of the value_type. In particular, recall that + // (*r).mutate() is legal if operator* returns by value. + value_type& + operator*() const + { + return this->stored_value; + } + private: + mutable value_type stored_value; + }; + + // + // In general, we can't determine that such an iterator isn't + // writable -- we also need to store a copy of the old iterator so + // that it can be written into. + template + class writable_postfix_increment_proxy + { + typedef typename iterator_value::type value_type; + public: + explicit writable_postfix_increment_proxy(Iterator const& x) + : stored_value(*x) + , stored_iterator(x) + {} + + // Dereferencing must return a proxy so that both *r++ = o and + // value_type(*r++) can work. In this case, *r is the same as + // *r++, and the conversion operator below is used to ensure + // readability. + writable_postfix_increment_proxy const& + operator*() const + { + return *this; + } + + // Provides readability of *r++ + operator value_type&() const + { + return stored_value; + } + + // Provides writability of *r++ + template + T const& operator=(T const& x) const + { + *this->stored_iterator = x; + return x; + } + + // This overload just in case only non-const objects are writable + template + T& operator=(T& x) const + { + *this->stored_iterator = x; + return x; + } + + // Provides X(r++) + operator Iterator const&() const + { + return stored_iterator; + } + + private: + mutable value_type stored_value; + Iterator stored_iterator; + }; + +# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + template + struct is_non_proxy_reference_impl + { + static Reference r; + + template + static typename mpl::if_< + is_convertible< + R const volatile* + , Value const volatile* + > + , char[1] + , char[2] + >::type& helper(R const&); + + BOOST_STATIC_CONSTANT(bool, value = sizeof(helper(r)) == 1); + }; + + template + struct is_non_proxy_reference + : mpl::bool_< + is_non_proxy_reference_impl::value + > + {}; +# else + template + struct is_non_proxy_reference + : is_convertible< + typename remove_reference::type + const volatile* + , Value const volatile* + > + {}; +# endif + + // A metafunction to choose the result type of postfix ++ + // + // Because the C++98 input iterator requirements say that *r++ has + // type T (value_type), implementations of some standard + // algorithms like lexicographical_compare may use constructions + // like: + // + // *r++ < *s++ + // + // If *r++ returns a proxy (as required if r is writable but not + // multipass), this sort of expression will fail unless the proxy + // supports the operator<. Since there are any number of such + // operations, we're not going to try to support them. Therefore, + // even if r++ returns a proxy, *r++ will only return a proxy if + // *r also returns a proxy. + template + struct postfix_increment_result + : mpl::eval_if< + mpl::and_< + // A proxy is only needed for readable iterators + is_convertible< + Reference + // Use add_lvalue_reference to form `reference to Value` due to + // some (strict) C++03 compilers (e.g. `gcc -std=c++03`) reject + // 'reference-to-reference' in the template which described in CWG + // DR106. + // http://www.open-std.org/Jtc1/sc22/wg21/docs/cwg_defects.html#106 + , typename add_lvalue_reference::type + > + + // No multipass iterator can have values that disappear + // before positions can be re-visited + , mpl::not_< + is_convertible< + typename iterator_category_to_traversal::type + , forward_traversal_tag + > + > + > + , mpl::if_< + is_non_proxy_reference + , postfix_increment_proxy + , writable_postfix_increment_proxy + > + , mpl::identity + > + {}; + + // operator->() needs special support for input iterators to strictly meet the + // standard's requirements. If *i is not a reference type, we must still + // produce an lvalue to which a pointer can be formed. We do that by + // returning a proxy object containing an instance of the reference object. + template + struct operator_arrow_dispatch // proxy references + { + struct proxy + { + explicit proxy(Reference const & x) : m_ref(x) {} + Reference* operator->() { return boost::addressof(m_ref); } + // This function is needed for MWCW and BCC, which won't call + // operator-> again automatically per 13.3.1.2 para 8 + operator Reference*() { return boost::addressof(m_ref); } + Reference m_ref; + }; + typedef proxy result_type; + static result_type apply(Reference const & x) + { + return result_type(x); + } + }; + + template + struct operator_arrow_dispatch // "real" references + { + typedef Pointer result_type; + static result_type apply(T& x) + { + return boost::addressof(x); + } + }; + + // A proxy return type for operator[], needed to deal with + // iterators that may invalidate referents upon destruction. + // Consider the temporary iterator in *(a + n) + template + class operator_brackets_proxy + { + // Iterator is actually an iterator_facade, so we do not have to + // go through iterator_traits to access the traits. + typedef typename Iterator::reference reference; + typedef typename Iterator::value_type value_type; + + public: + operator_brackets_proxy(Iterator const& iter) + : m_iter(iter) + {} + + operator reference() const + { + return *m_iter; + } + + operator_brackets_proxy& operator=(value_type const& val) + { + *m_iter = val; + return *this; + } + + private: + Iterator m_iter; + }; + + // A metafunction that determines whether operator[] must return a + // proxy, or whether it can simply return a copy of the value_type. + template + struct use_operator_brackets_proxy + : mpl::not_< + mpl::and_< + // Really we want an is_copy_constructible trait here, + // but is_POD will have to suffice in the meantime. + boost::is_POD + , iterator_writability_disabled + > + > + {}; + + template + struct operator_brackets_result + { + typedef typename mpl::if_< + use_operator_brackets_proxy + , operator_brackets_proxy + , Value + >::type type; + }; + + template + operator_brackets_proxy make_operator_brackets_result(Iterator const& iter, mpl::true_) + { + return operator_brackets_proxy(iter); + } + + template + typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_) + { + return *iter; + } + + struct choose_difference_type + { + template + struct apply + : +# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP + iterator_difference +# else + mpl::eval_if< + is_convertible + , iterator_difference + , iterator_difference + > +# endif + {}; + + }; + + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference + , class Difference + , bool IsBidirectionalTraversal + , bool IsRandomAccessTraversal + > + class iterator_facade_base; + + } // namespace detail + + + // Macros which describe the declarations of binary operators +# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY +# define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \ + template < \ + class Derived1, class V1, class TC1, class Reference1, class Difference1 \ + , class Derived2, class V2, class TC2, class Reference2, class Difference2 \ + > \ + prefix typename mpl::apply2::type \ + operator op( \ + iterator_facade const& lhs \ + , iterator_facade const& rhs) +# else +# define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \ + template < \ + class Derived1, class V1, class TC1, class Reference1, class Difference1 \ + , class Derived2, class V2, class TC2, class Reference2, class Difference2 \ + > \ + prefix typename enabler< \ + Derived1, Derived2 \ + , typename mpl::apply2::type \ + >::type \ + operator op( \ + iterator_facade const& lhs \ + , iterator_facade const& rhs) +# endif + +# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ + BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable) + +# define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(prefix, op, result_type) \ + BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable_and_random_access_traversal) + +# define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args) \ + template \ + prefix typename boost::iterators::enable_if< \ + boost::iterators::detail::is_traversal_at_least< TC, boost::iterators::random_access_traversal_tag >, \ + Derived \ + >::type operator+ args + + // + // Helper class for granting access to the iterator core interface. + // + // The simple core interface is used by iterator_facade. The core + // interface of a user/library defined iterator type should not be made public + // so that it does not clutter the public interface. Instead iterator_core_access + // should be made friend so that iterator_facade can access the core + // interface through iterator_core_access. + // + class iterator_core_access + { +# if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) + // Tasteless as this may seem, making all members public allows member templates + // to work in the absence of member template friends. + public: +# else + + template friend class iterator_facade; + template + friend class detail::iterator_facade_base; + +# define BOOST_ITERATOR_FACADE_RELATION(op) \ + BOOST_ITERATOR_FACADE_INTEROP_HEAD(friend,op, boost::iterators::detail::always_bool2); + + BOOST_ITERATOR_FACADE_RELATION(==) + BOOST_ITERATOR_FACADE_RELATION(!=) + +# undef BOOST_ITERATOR_FACADE_RELATION + +# define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op) \ + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(friend,op, boost::iterators::detail::always_bool2); + + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=) + +# undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION + + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD( + friend, -, boost::iterators::detail::choose_difference_type) + ; + + BOOST_ITERATOR_FACADE_PLUS_HEAD( + friend inline + , (iterator_facade const& + , typename Derived::difference_type) + ) + ; + + BOOST_ITERATOR_FACADE_PLUS_HEAD( + friend inline + , (typename Derived::difference_type + , iterator_facade const&) + ) + ; + +# endif + + template + static typename Facade::reference dereference(Facade const& f) + { + return f.dereference(); + } + + template + static void increment(Facade& f) + { + f.increment(); + } + + template + static void decrement(Facade& f) + { + f.decrement(); + } + + template + static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_) + { + return f1.equal(f2); + } + + template + static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_) + { + return f2.equal(f1); + } + + template + static void advance(Facade& f, typename Facade::difference_type n) + { + f.advance(n); + } + + template + static typename Facade1::difference_type distance_from( + Facade1 const& f1, Facade2 const& f2, mpl::true_) + { + return -f1.distance_to(f2); + } + + template + static typename Facade2::difference_type distance_from( + Facade1 const& f1, Facade2 const& f2, mpl::false_) + { + return f2.distance_to(f1); + } + + // + // Curiously Recurring Template interface. + // + template + static I& derived(iterator_facade& facade) + { + return *static_cast(&facade); + } + + template + static I const& derived(iterator_facade const& facade) + { + return *static_cast(&facade); + } + + // objects of this class are useless + BOOST_DELETED_FUNCTION(iterator_core_access()) + }; + + namespace detail { + + // Implementation for forward traversal iterators + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference + , class Difference + > + class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false > +# ifdef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE + : public boost::iterators::detail::iterator_facade_types< + Value, CategoryOrTraversal, Reference, Difference + >::base +# undef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE +# endif + { + private: + typedef boost::iterators::detail::iterator_facade_types< + Value, CategoryOrTraversal, Reference, Difference + > associated_types; + + typedef boost::iterators::detail::operator_arrow_dispatch< + Reference + , typename associated_types::pointer + > operator_arrow_dispatch_; + + public: + typedef typename associated_types::value_type value_type; + typedef Reference reference; + typedef Difference difference_type; + + typedef typename operator_arrow_dispatch_::result_type pointer; + + typedef typename associated_types::iterator_category iterator_category; + + public: + reference operator*() const + { + return iterator_core_access::dereference(this->derived()); + } + + pointer operator->() const + { + return operator_arrow_dispatch_::apply(*this->derived()); + } + + Derived& operator++() + { + iterator_core_access::increment(this->derived()); + return this->derived(); + } + + protected: + // + // Curiously Recurring Template interface. + // + Derived& derived() + { + return *static_cast(this); + } + + Derived const& derived() const + { + return *static_cast(this); + } + }; + + // Implementation for bidirectional traversal iterators + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference + , class Difference + > + class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > : + public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false > + { + public: + Derived& operator--() + { + iterator_core_access::decrement(this->derived()); + return this->derived(); + } + + Derived operator--(int) + { + Derived tmp(this->derived()); + --*this; + return tmp; + } + }; + + // Implementation for random access traversal iterators + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference + , class Difference + > + class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, true > : + public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > + { + private: + typedef iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > base_type; + + public: + typedef typename base_type::reference reference; + typedef typename base_type::difference_type difference_type; + + public: + typename boost::iterators::detail::operator_brackets_result::type + operator[](difference_type n) const + { + typedef boost::iterators::detail::use_operator_brackets_proxy use_proxy; + + return boost::iterators::detail::make_operator_brackets_result( + this->derived() + n + , use_proxy() + ); + } + + Derived& operator+=(difference_type n) + { + iterator_core_access::advance(this->derived(), n); + return this->derived(); + } + + Derived& operator-=(difference_type n) + { + iterator_core_access::advance(this->derived(), -n); + return this->derived(); + } + + Derived operator-(difference_type x) const + { + Derived result(this->derived()); + return result -= x; + } + }; + + } // namespace detail + + // + // iterator_facade - use as a public base class for defining new + // standard-conforming iterators. + // + template < + class Derived // The derived iterator type being constructed + , class Value + , class CategoryOrTraversal + , class Reference = Value& + , class Difference = std::ptrdiff_t + > + class iterator_facade : + public detail::iterator_facade_base< + Derived, + Value, + CategoryOrTraversal, + Reference, + Difference, + detail::is_traversal_at_least< CategoryOrTraversal, bidirectional_traversal_tag >::value, + detail::is_traversal_at_least< CategoryOrTraversal, random_access_traversal_tag >::value + > + { + protected: + // For use by derived classes + typedef iterator_facade iterator_facade_; + }; + + template + inline typename boost::iterators::detail::postfix_increment_result::type + operator++( + iterator_facade& i + , int + ) + { + typename boost::iterators::detail::postfix_increment_result::type + tmp(*static_cast(&i)); + + ++i; + + return tmp; + } + + + // + // Comparison operator implementation. The library supplied operators + // enables the user to provide fully interoperable constant/mutable + // iterator types. I.e. the library provides all operators + // for all mutable/constant iterator combinations. + // + // Note though that this kind of interoperability for constant/mutable + // iterators is not required by the standard for container iterators. + // All the standard asks for is a conversion mutable -> constant. + // Most standard library implementations nowadays provide fully interoperable + // iterator implementations, but there are still heavily used implementations + // that do not provide them. (Actually it's even worse, they do not provide + // them for only a few iterators.) + // + // ?? Maybe a BOOST_ITERATOR_NO_FULL_INTEROPERABILITY macro should + // enable the user to turn off mixed type operators + // + // The library takes care to provide only the right operator overloads. + // I.e. + // + // bool operator==(Iterator, Iterator); + // bool operator==(ConstIterator, Iterator); + // bool operator==(Iterator, ConstIterator); + // bool operator==(ConstIterator, ConstIterator); + // + // ... + // + // In order to do so it uses c++ idioms that are not yet widely supported + // by current compiler releases. The library is designed to degrade gracefully + // in the face of compiler deficiencies. In general compiler + // deficiencies result in less strict error checking and more obscure + // error messages, functionality is not affected. + // + // For full operation compiler support for "Substitution Failure Is Not An Error" + // (aka. enable_if) and boost::is_convertible is required. + // + // The following problems occur if support is lacking. + // + // Pseudo code + // + // --------------- + // AdaptorA a1; + // AdaptorA a2; + // + // // This will result in a no such overload error in full operation + // // If enable_if or is_convertible is not supported + // // The instantiation will fail with an error hopefully indicating that + // // there is no operator== for Iterator1, Iterator2 + // // The same will happen if no enable_if is used to remove + // // false overloads from the templated conversion constructor + // // of AdaptorA. + // + // a1 == a2; + // ---------------- + // + // AdaptorA a; + // AdaptorB b; + // + // // This will result in a no such overload error in full operation + // // If enable_if is not supported the static assert used + // // in the operator implementation will fail. + // // This will accidently work if is_convertible is not supported. + // + // a == b; + // ---------------- + // + +# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP +# define BOOST_ITERATOR_CONVERTIBLE(a,b) mpl::true_() +# else +# define BOOST_ITERATOR_CONVERTIBLE(a,b) is_convertible() +# endif + +# define BOOST_ITERATOR_FACADE_INTEROP(op, result_type, return_prefix, base_op) \ + BOOST_ITERATOR_FACADE_INTEROP_HEAD(inline, op, result_type) \ + { \ + /* For those compilers that do not support enable_if */ \ + BOOST_STATIC_ASSERT(( \ + is_interoperable< Derived1, Derived2 >::value \ + )); \ + return_prefix iterator_core_access::base_op( \ + *static_cast(&lhs) \ + , *static_cast(&rhs) \ + , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \ + ); \ + } + +# define BOOST_ITERATOR_FACADE_RELATION(op, return_prefix, base_op) \ + BOOST_ITERATOR_FACADE_INTEROP( \ + op \ + , boost::iterators::detail::always_bool2 \ + , return_prefix \ + , base_op \ + ) + + BOOST_ITERATOR_FACADE_RELATION(==, return, equal) + BOOST_ITERATOR_FACADE_RELATION(!=, return !, equal) + +# undef BOOST_ITERATOR_FACADE_RELATION + + +# define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS(op, result_type, return_prefix, base_op) \ + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(inline, op, result_type) \ + { \ + /* For those compilers that do not support enable_if */ \ + BOOST_STATIC_ASSERT(( \ + is_interoperable< Derived1, Derived2 >::value && \ + boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && \ + boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value \ + )); \ + return_prefix iterator_core_access::base_op( \ + *static_cast(&lhs) \ + , *static_cast(&rhs) \ + , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \ + ); \ + } + +# define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op, return_prefix, base_op) \ + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS( \ + op \ + , boost::iterators::detail::always_bool2 \ + , return_prefix \ + , base_op \ + ) + + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<, return 0 >, distance_from) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>, return 0 <, distance_from) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=, return 0 >=, distance_from) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=, return 0 <=, distance_from) + +# undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION + + // operator- requires an additional part in the static assertion + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS( + - + , boost::iterators::detail::choose_difference_type + , return + , distance_from + ) + +# undef BOOST_ITERATOR_FACADE_INTEROP +# undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS + +# define BOOST_ITERATOR_FACADE_PLUS(args) \ + BOOST_ITERATOR_FACADE_PLUS_HEAD(inline, args) \ + { \ + Derived tmp(static_cast(i)); \ + return tmp += n; \ + } + + BOOST_ITERATOR_FACADE_PLUS(( + iterator_facade const& i + , typename Derived::difference_type n + )) + + BOOST_ITERATOR_FACADE_PLUS(( + typename Derived::difference_type n + , iterator_facade const& i + )) + +# undef BOOST_ITERATOR_FACADE_PLUS +# undef BOOST_ITERATOR_FACADE_PLUS_HEAD + +# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD +# undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD +# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL + +} // namespace iterators + +using iterators::iterator_core_access; +using iterators::iterator_facade; + +} // namespace boost + +#include + +#endif // BOOST_ITERATOR_FACADE_23022003THW_HPP diff --git a/contrib/src/boost/iterator/iterator_traits.hpp b/contrib/src/boost/iterator/iterator_traits.hpp new file mode 100644 index 0000000..1a5f1e0 --- /dev/null +++ b/contrib/src/boost/iterator/iterator_traits.hpp @@ -0,0 +1,60 @@ +// Copyright David Abrahams 2003. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef ITERATOR_TRAITS_DWA200347_HPP +# define ITERATOR_TRAITS_DWA200347_HPP + +# include +# include + +namespace boost { +namespace iterators { + +// Macro for supporting old compilers, no longer needed but kept +// for backwards compatibility (it was documented). +#define BOOST_ITERATOR_CATEGORY iterator_category + + +template +struct iterator_value +{ + typedef typename boost::detail::iterator_traits::value_type type; +}; + +template +struct iterator_reference +{ + typedef typename boost::detail::iterator_traits::reference type; +}; + + +template +struct iterator_pointer +{ + typedef typename boost::detail::iterator_traits::pointer type; +}; + +template +struct iterator_difference +{ + typedef typename boost::detail::iterator_traits::difference_type type; +}; + +template +struct iterator_category +{ + typedef typename boost::detail::iterator_traits::iterator_category type; +}; + +} // namespace iterators + +using iterators::iterator_value; +using iterators::iterator_reference; +using iterators::iterator_pointer; +using iterators::iterator_difference; +using iterators::iterator_category; + +} // namespace boost + +#endif // ITERATOR_TRAITS_DWA200347_HPP diff --git a/contrib/src/boost/iterator/reverse_iterator.hpp b/contrib/src/boost/iterator/reverse_iterator.hpp new file mode 100644 index 0000000..3bef39e --- /dev/null +++ b/contrib/src/boost/iterator/reverse_iterator.hpp @@ -0,0 +1,74 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP +#define BOOST_REVERSE_ITERATOR_23022003THW_HPP + +#include +#include +#include + +namespace boost { +namespace iterators { + + // + // + // + template + class reverse_iterator + : public iterator_adaptor< reverse_iterator, Iterator > + { + typedef iterator_adaptor< reverse_iterator, Iterator > super_t; + + friend class iterator_core_access; + + public: + reverse_iterator() {} + + explicit reverse_iterator(Iterator x) + : super_t(x) {} + + template + reverse_iterator( + reverse_iterator const& r + , typename enable_if_convertible::type* = 0 + ) + : super_t(r.base()) + {} + + private: + typename super_t::reference dereference() const { return *boost::prior(this->base()); } + + void increment() { --this->base_reference(); } + void decrement() { ++this->base_reference(); } + + void advance(typename super_t::difference_type n) + { + this->base_reference() += -n; + } + + template + typename super_t::difference_type + distance_to(reverse_iterator const& y) const + { + return this->base_reference() - y.base(); + } + }; + + template + inline reverse_iterator make_reverse_iterator(BidirectionalIterator x) + { + return reverse_iterator(x); + } + +} // namespace iterators + +using iterators::reverse_iterator; +using iterators::make_reverse_iterator; + +} // namespace boost + +#endif // BOOST_REVERSE_ITERATOR_23022003THW_HPP diff --git a/contrib/src/boost/iterator/transform_iterator.hpp b/contrib/src/boost/iterator/transform_iterator.hpp new file mode 100644 index 0000000..851f16f --- /dev/null +++ b/contrib/src/boost/iterator/transform_iterator.hpp @@ -0,0 +1,171 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_TRANSFORM_ITERATOR_23022003THW_HPP +#define BOOST_TRANSFORM_ITERATOR_23022003THW_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) +# include + +#endif +#include + + +namespace boost { +namespace iterators { + + template + class transform_iterator; + + namespace detail + { + // Compute the iterator_adaptor instantiation to be used for transform_iterator + template + struct transform_iterator_base + { + private: + // By default, dereferencing the iterator yields the same as + // the function. + typedef typename ia_dflt_help< + Reference + , result_of::reference)> + >::type reference; + + // To get the default for Value: remove any reference on the + // result type, but retain any constness to signal + // non-writability. Note that if we adopt Thomas' suggestion + // to key non-writability *only* on the Reference argument, + // we'd need to strip constness here as well. + typedef typename ia_dflt_help< + Value + , remove_reference + >::type cv_value_type; + + public: + typedef iterator_adaptor< + transform_iterator + , Iterator + , cv_value_type + , use_default // Leave the traversal category alone + , reference + > type; + }; + } + + template + class transform_iterator + : public boost::iterators::detail::transform_iterator_base::type + { + typedef typename + boost::iterators::detail::transform_iterator_base::type + super_t; + + friend class iterator_core_access; + + public: + transform_iterator() { } + + transform_iterator(Iterator const& x, UnaryFunc f) + : super_t(x), m_f(f) { } + + explicit transform_iterator(Iterator const& x) + : super_t(x) + { + // Pro8 is a little too aggressive about instantiating the + // body of this function. +#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) + // don't provide this constructor if UnaryFunc is a + // function pointer type, since it will be 0. Too dangerous. + BOOST_STATIC_ASSERT(is_class::value); +#endif + } + + template < + class OtherUnaryFunction + , class OtherIterator + , class OtherReference + , class OtherValue> + transform_iterator( + transform_iterator const& t + , typename enable_if_convertible::type* = 0 +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) + , typename enable_if_convertible::type* = 0 +#endif + ) + : super_t(t.base()), m_f(t.functor()) + {} + + UnaryFunc functor() const + { return m_f; } + + private: + typename super_t::reference dereference() const + { return m_f(*this->base()); } + + // Probably should be the initial base class so it can be + // optimized away via EBO if it is an empty class. + UnaryFunc m_f; + }; + + template + inline transform_iterator + make_transform_iterator(Iterator it, UnaryFunc fun) + { + return transform_iterator(it, fun); + } + + // Version which allows explicit specification of the UnaryFunc + // type. + // + // This generator is not provided if UnaryFunc is a function + // pointer type, because it's too dangerous: the default-constructed + // function pointer in the iterator be 0, leading to a runtime + // crash. + template + inline typename iterators::enable_if< + is_class // We should probably find a cheaper test than is_class<> + , transform_iterator + >::type + make_transform_iterator(Iterator it) + { + return transform_iterator(it, UnaryFunc()); + } + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + template + inline transform_iterator< Return (*)(Argument), Iterator, Return> + make_transform_iterator(Iterator it, Return (*fun)(Argument)) + { + return transform_iterator(it, fun); + } +#endif + +} // namespace iterators + +using iterators::transform_iterator; +using iterators::make_transform_iterator; + +} // namespace boost + +#include + +#endif // BOOST_TRANSFORM_ITERATOR_23022003THW_HPP diff --git a/contrib/src/boost/limits.hpp b/contrib/src/boost/limits.hpp new file mode 100644 index 0000000..47d8155 --- /dev/null +++ b/contrib/src/boost/limits.hpp @@ -0,0 +1,146 @@ + +// (C) Copyright John maddock 1999. +// (C) David Abrahams 2002. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// use this header as a workaround for missing + +// See http://www.boost.org/libs/compatibility/index.html for documentation. + +#ifndef BOOST_LIMITS +#define BOOST_LIMITS + +#include + +#ifdef BOOST_NO_LIMITS +# error "There is no std::numeric_limits suppport available." +#else +# include +#endif + +#if (defined(BOOST_HAS_LONG_LONG) && defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)) \ + || (defined(BOOST_HAS_MS_INT64) && defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)) +// Add missing specializations for numeric_limits: +#ifdef BOOST_HAS_MS_INT64 +# define BOOST_LLT __int64 +# define BOOST_ULLT unsigned __int64 +#else +# define BOOST_LLT ::boost::long_long_type +# define BOOST_ULLT ::boost::ulong_long_type +#endif + +#include // for CHAR_BIT + +namespace std +{ + template<> + class numeric_limits + { + public: + + BOOST_STATIC_CONSTANT(bool, is_specialized = true); +#ifdef BOOST_HAS_MS_INT64 + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x8000000000000000i64; } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x7FFFFFFFFFFFFFFFi64; } +#elif defined(LLONG_MAX) + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MIN; } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MAX; } +#elif defined(LONGLONG_MAX) + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MIN; } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MAX; } +#else + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 1LL << (sizeof(BOOST_LLT) * CHAR_BIT - 1); } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~(min)(); } +#endif + BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT -1); + BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT) - 1) * 301L / 1000); + BOOST_STATIC_CONSTANT(bool, is_signed = true); + BOOST_STATIC_CONSTANT(bool, is_integer = true); + BOOST_STATIC_CONSTANT(bool, is_exact = true); + BOOST_STATIC_CONSTANT(int, radix = 2); + static BOOST_LLT epsilon() throw() { return 0; }; + static BOOST_LLT round_error() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(int, min_exponent = 0); + BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); + BOOST_STATIC_CONSTANT(int, max_exponent = 0); + BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); + + BOOST_STATIC_CONSTANT(bool, has_infinity = false); + BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_denorm = false); + BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); + static BOOST_LLT infinity() throw() { return 0; }; + static BOOST_LLT quiet_NaN() throw() { return 0; }; + static BOOST_LLT signaling_NaN() throw() { return 0; }; + static BOOST_LLT denorm_min() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(bool, is_iec559 = false); + BOOST_STATIC_CONSTANT(bool, is_bounded = true); + BOOST_STATIC_CONSTANT(bool, is_modulo = true); + + BOOST_STATIC_CONSTANT(bool, traps = false); + BOOST_STATIC_CONSTANT(bool, tinyness_before = false); + BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); + + }; + + template<> + class numeric_limits + { + public: + + BOOST_STATIC_CONSTANT(bool, is_specialized = true); +#ifdef BOOST_HAS_MS_INT64 + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0ui64; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0xFFFFFFFFFFFFFFFFui64; } +#elif defined(ULLONG_MAX) && defined(ULLONG_MIN) + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MIN; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MAX; } +#elif defined(ULONGLONG_MAX) && defined(ULONGLONG_MIN) + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MIN; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MAX; } +#else + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0uLL; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~0uLL; } +#endif + BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT); + BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT)) * 301L / 1000); + BOOST_STATIC_CONSTANT(bool, is_signed = false); + BOOST_STATIC_CONSTANT(bool, is_integer = true); + BOOST_STATIC_CONSTANT(bool, is_exact = true); + BOOST_STATIC_CONSTANT(int, radix = 2); + static BOOST_ULLT epsilon() throw() { return 0; }; + static BOOST_ULLT round_error() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(int, min_exponent = 0); + BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); + BOOST_STATIC_CONSTANT(int, max_exponent = 0); + BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); + + BOOST_STATIC_CONSTANT(bool, has_infinity = false); + BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_denorm = false); + BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); + static BOOST_ULLT infinity() throw() { return 0; }; + static BOOST_ULLT quiet_NaN() throw() { return 0; }; + static BOOST_ULLT signaling_NaN() throw() { return 0; }; + static BOOST_ULLT denorm_min() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(bool, is_iec559 = false); + BOOST_STATIC_CONSTANT(bool, is_bounded = true); + BOOST_STATIC_CONSTANT(bool, is_modulo = true); + + BOOST_STATIC_CONSTANT(bool, traps = false); + BOOST_STATIC_CONSTANT(bool, tinyness_before = false); + BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); + + }; +} +#endif + +#endif + diff --git a/contrib/src/boost/mem_fn.hpp b/contrib/src/boost/mem_fn.hpp new file mode 100644 index 0000000..3bcd2c5 --- /dev/null +++ b/contrib/src/boost/mem_fn.hpp @@ -0,0 +1,24 @@ +#ifndef BOOST_MEM_FN_HPP_INCLUDED +#define BOOST_MEM_FN_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// mem_fn.hpp - a generalization of std::mem_fun[_ref] +// +// Copyright (c) 2009 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +#include + +#endif // #ifndef BOOST_MEM_FN_HPP_INCLUDED diff --git a/contrib/src/boost/move/algorithm.hpp b/contrib/src/boost/move/algorithm.hpp new file mode 100644 index 0000000..fbda0f4 --- /dev/null +++ b/contrib/src/boost/move/algorithm.hpp @@ -0,0 +1,282 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file + +#ifndef BOOST_MOVE_ALGORITHM_HPP +#define BOOST_MOVE_ALGORITHM_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include + +#include +#include +#include + +#include //copy, copy_backward +#include //uninitialized_copy + +namespace boost { + +////////////////////////////////////////////////////////////////////////////// +// +// move +// +////////////////////////////////////////////////////////////////////////////// + +#if !defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + + //! Effects: Moves elements in the range [first,last) into the range [result,result + (last - + //! first)) starting from first and proceeding to last. For each non-negative integer n < (last-first), + //! performs *(result + n) = ::boost::move (*(first + n)). + //! + //! Effects: result + (last - first). + //! + //! Requires: result shall not be in the range [first,last). + //! + //! Complexity: Exactly last - first move assignments. + template // O models OutputIterator + O move(I f, I l, O result) + { + while (f != l) { + *result = ::boost::move(*f); + ++f; ++result; + } + return result; + } + + ////////////////////////////////////////////////////////////////////////////// + // + // move_backward + // + ////////////////////////////////////////////////////////////////////////////// + + //! Effects: Moves elements in the range [first,last) into the range + //! [result - (last-first),result) starting from last - 1 and proceeding to + //! first. For each positive integer n <= (last - first), + //! performs *(result - n) = ::boost::move(*(last - n)). + //! + //! Requires: result shall not be in the range [first,last). + //! + //! Returns: result - (last - first). + //! + //! Complexity: Exactly last - first assignments. + template // O models BidirectionalIterator + O move_backward(I f, I l, O result) + { + while (f != l) { + --l; --result; + *result = ::boost::move(*l); + } + return result; + } + +#else + + using ::std::move_backward; + +#endif //!defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + +////////////////////////////////////////////////////////////////////////////// +// +// uninitialized_move +// +////////////////////////////////////////////////////////////////////////////// + +//! Effects: +//! \code +//! for (; first != last; ++result, ++first) +//! new (static_cast(&*result)) +//! typename iterator_traits::value_type(boost::move(*first)); +//! \endcode +//! +//! Returns: result +template + // F models ForwardIterator +F uninitialized_move(I f, I l, F r + /// @cond +// ,typename ::boost::move_detail::enable_if::value_type> >::type* = 0 + /// @endcond + ) +{ + typedef typename std::iterator_traits::value_type input_value_type; + + F back = r; + BOOST_TRY{ + while (f != l) { + void * const addr = static_cast(::boost::move_detail::addressof(*r)); + ::new(addr) input_value_type(::boost::move(*f)); + ++f; ++r; + } + } + BOOST_CATCH(...){ + for (; back != r; ++back){ + back->~input_value_type(); + } + BOOST_RETHROW; + } + BOOST_CATCH_END + return r; +} + +/// @cond +/* +template + // F models ForwardIterator +F uninitialized_move(I f, I l, F r, + typename ::boost::move_detail::disable_if::value_type> >::type* = 0) +{ + return std::uninitialized_copy(f, l, r); +} +*/ + +////////////////////////////////////////////////////////////////////////////// +// +// uninitialized_copy_or_move +// +////////////////////////////////////////////////////////////////////////////// + +namespace move_detail { + +template + // F models ForwardIterator +inline F uninitialized_move_move_iterator(I f, I l, F r +// ,typename ::boost::move_detail::enable_if< has_move_emulation_enabled >::type* = 0 +) +{ + return ::boost::uninitialized_move(f, l, r); +} +/* +template + // F models ForwardIterator +F uninitialized_move_move_iterator(I f, I l, F r, + typename ::boost::move_detail::disable_if< has_move_emulation_enabled >::type* = 0) +{ + return std::uninitialized_copy(f.base(), l.base(), r); +} +*/ +} //namespace move_detail { + +template + // F models ForwardIterator +inline F uninitialized_copy_or_move(I f, I l, F r, + typename ::boost::move_detail::enable_if< move_detail::is_move_iterator >::type* = 0) +{ + return ::boost::move_detail::uninitialized_move_move_iterator(f, l, r); +} + +////////////////////////////////////////////////////////////////////////////// +// +// copy_or_move +// +////////////////////////////////////////////////////////////////////////////// + +namespace move_detail { + +template + // F models ForwardIterator +inline F move_move_iterator(I f, I l, F r +// ,typename ::boost::move_detail::enable_if< has_move_emulation_enabled >::type* = 0 +) +{ + return ::boost::move(f, l, r); +} +/* +template + // F models ForwardIterator +F move_move_iterator(I f, I l, F r, + typename ::boost::move_detail::disable_if< has_move_emulation_enabled >::type* = 0) +{ + return std::copy(f.base(), l.base(), r); +} +*/ + +} //namespace move_detail { + +template + // F models ForwardIterator +inline F copy_or_move(I f, I l, F r, + typename ::boost::move_detail::enable_if< move_detail::is_move_iterator >::type* = 0) +{ + return ::boost::move_detail::move_move_iterator(f, l, r); +} + +/// @endcond + +//! Effects: +//! \code +//! for (; first != last; ++result, ++first) +//! new (static_cast(&*result)) +//! typename iterator_traits::value_type(*first); +//! \endcode +//! +//! Returns: result +//! +//! Note: This function is provided because +//! std::uninitialized_copy from some STL implementations +//! is not compatible with move_iterator +template + // F models ForwardIterator +inline F uninitialized_copy_or_move(I f, I l, F r + /// @cond + ,typename ::boost::move_detail::disable_if< move_detail::is_move_iterator >::type* = 0 + /// @endcond + ) +{ + return std::uninitialized_copy(f, l, r); +} + +//! Effects: +//! \code +//! for (; first != last; ++result, ++first) +//! *result = *first; +//! \endcode +//! +//! Returns: result +//! +//! Note: This function is provided because +//! std::uninitialized_copy from some STL implementations +//! is not compatible with move_iterator +template + // F models ForwardIterator +inline F copy_or_move(I f, I l, F r + /// @cond + ,typename ::boost::move_detail::disable_if< move_detail::is_move_iterator >::type* = 0 + /// @endcond + ) +{ + return std::copy(f, l, r); +} + +} //namespace boost { + +#include + +#endif //#ifndef BOOST_MOVE_ALGORITHM_HPP diff --git a/contrib/src/boost/move/core.hpp b/contrib/src/boost/move/core.hpp new file mode 100644 index 0000000..54aece0 --- /dev/null +++ b/contrib/src/boost/move/core.hpp @@ -0,0 +1,501 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file +//! This header implements macros to define movable classes and +//! move-aware functions + +#ifndef BOOST_MOVE_CORE_HPP +#define BOOST_MOVE_CORE_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include + +// @cond + +//boost_move_no_copy_constructor_or_assign typedef +//used to detect noncopyable types for other Boost libraries. +#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \ + private:\ + TYPE(TYPE &);\ + TYPE& operator=(TYPE &);\ + public:\ + typedef int boost_move_no_copy_constructor_or_assign; \ + private:\ + // +#else + #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \ + public:\ + TYPE(TYPE const &) = delete;\ + TYPE& operator=(TYPE const &) = delete;\ + public:\ + typedef int boost_move_no_copy_constructor_or_assign; \ + private:\ + // +#endif //BOOST_NO_CXX11_DELETED_FUNCTIONS + +// @endcond + +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #include + + #if defined(BOOST_MOVE_ADDRESS_SANITIZER_ON) + #define BOOST_MOVE_TO_RV_CAST(RV_TYPE, ARG) reinterpret_cast(ARG) + #else + #define BOOST_MOVE_TO_RV_CAST(RV_TYPE, ARG) static_cast(ARG) + #endif + + //Move emulation rv breaks standard aliasing rules so add workarounds for some compilers + #if defined(__GNUC__) && (__GNUC__ >= 4) && \ + (\ + defined(BOOST_GCC) || \ + (defined(BOOST_INTEL) && (BOOST_INTEL_CXX_VERSION >= 1300)) \ + ) + #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__)) + #else + #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS + #endif + + namespace boost { + + ////////////////////////////////////////////////////////////////////////////// + // + // struct rv + // + ////////////////////////////////////////////////////////////////////////////// + template + class rv + : public ::boost::move_detail::if_c + < ::boost::move_detail::is_class::value + , T + , ::boost::move_detail::nat + >::type + { + rv(); + ~rv() throw(); + rv(rv const&); + void operator=(rv const&); + } BOOST_MOVE_ATTRIBUTE_MAY_ALIAS; + + + ////////////////////////////////////////////////////////////////////////////// + // + // is_rv + // + ////////////////////////////////////////////////////////////////////////////// + + namespace move_detail { + + template + struct is_rv + //Derive from integral constant because some Boost code assummes it has + //a "type" internal typedef + : integral_constant::value > + {}; + + template + struct is_not_rv + { + static const bool value = !is_rv::value; + }; + + } //namespace move_detail { + + ////////////////////////////////////////////////////////////////////////////// + // + // has_move_emulation_enabled + // + ////////////////////////////////////////////////////////////////////////////// + template + struct has_move_emulation_enabled + : ::boost::move_detail::has_move_emulation_enabled_impl + {}; + + template + struct has_move_emulation_disabled + { + static const bool value = !::boost::move_detail::has_move_emulation_enabled_impl::value; + }; + + } //namespace boost { + + #define BOOST_RV_REF(TYPE)\ + ::boost::rv< TYPE >& \ + // + + #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ + ::boost::rv< TYPE >& \ + // + + #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ + ::boost::rv< TYPE >& \ + // + + #define BOOST_RV_REF_BEG\ + ::boost::rv< \ + // + + #define BOOST_RV_REF_END\ + >& \ + // + + #define BOOST_RV_REF_BEG_IF_CXX11 \ + \ + // + + #define BOOST_RV_REF_END_IF_CXX11 \ + \ + // + + #define BOOST_FWD_REF(TYPE)\ + const TYPE & \ + // + + #define BOOST_COPY_ASSIGN_REF(TYPE)\ + const ::boost::rv< TYPE >& \ + // + + #define BOOST_COPY_ASSIGN_REF_BEG \ + const ::boost::rv< \ + // + + #define BOOST_COPY_ASSIGN_REF_END \ + >& \ + // + + #define BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ + const ::boost::rv< TYPE >& \ + // + + #define BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ + const ::boost::rv< TYPE >& \ + // + + #define BOOST_CATCH_CONST_RLVALUE(TYPE)\ + const ::boost::rv< TYPE >& \ + // + + namespace boost { + namespace move_detail { + + template + inline typename ::boost::move_detail::enable_if_c + < ::boost::move_detail::is_lvalue_reference::value || + !::boost::has_move_emulation_enabled::value + , T&>::type + move_return(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < !::boost::move_detail::is_lvalue_reference::value && + ::boost::has_move_emulation_enabled::value + , ::boost::rv&>::type + move_return(T& x) BOOST_NOEXCEPT + { + return *BOOST_MOVE_TO_RV_CAST(::boost::rv*, ::boost::move_detail::addressof(x)); + } + + template + inline typename ::boost::move_detail::enable_if_c + < !::boost::move_detail::is_lvalue_reference::value && + ::boost::has_move_emulation_enabled::value + , ::boost::rv&>::type + move_return(::boost::rv& x) BOOST_NOEXCEPT + { + return x; + } + + } //namespace move_detail { + } //namespace boost { + + #define BOOST_MOVE_RET(RET_TYPE, REF)\ + boost::move_detail::move_return< RET_TYPE >(REF) + // + + #define BOOST_MOVE_BASE(BASE_TYPE, ARG) \ + ::boost::move((BASE_TYPE&)(ARG)) + // + + ////////////////////////////////////////////////////////////////////////////// + // + // BOOST_MOVABLE_BUT_NOT_COPYABLE + // + ////////////////////////////////////////////////////////////////////////////// + #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ + BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\ + public:\ + operator ::boost::rv&() \ + { return *BOOST_MOVE_TO_RV_CAST(::boost::rv*, this); }\ + operator const ::boost::rv&() const \ + { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv*, this); }\ + private:\ + // + + ////////////////////////////////////////////////////////////////////////////// + // + // BOOST_COPYABLE_AND_MOVABLE + // + ////////////////////////////////////////////////////////////////////////////// + + #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\ + public:\ + TYPE& operator=(TYPE &t)\ + { this->operator=(const_cast(t)); return *this;}\ + public:\ + operator ::boost::rv&() \ + { return *BOOST_MOVE_TO_RV_CAST(::boost::rv*, this); }\ + operator const ::boost::rv&() const \ + { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv*, this); }\ + private:\ + // + + #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\ + public:\ + operator ::boost::rv&() \ + { return *BOOST_MOVE_TO_RV_CAST(::boost::rv*, this); }\ + operator const ::boost::rv&() const \ + { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv*, this); }\ + private:\ + // + + namespace boost{ + namespace move_detail{ + + template< class T> + struct forward_type + { typedef const T &type; }; + + template< class T> + struct forward_type< boost::rv > + { typedef T type; }; + + }} + +#else //BOOST_NO_CXX11_RVALUE_REFERENCES + + //! This macro marks a type as movable but not copyable, disabling copy construction + //! and assignment. The user will need to write a move constructor/assignment as explained + //! in the documentation to fully write a movable but not copyable class. + #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ + BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\ + public:\ + typedef int boost_move_emulation_t;\ + // + + //! This macro marks a type as copyable and movable. + //! The user will need to write a move constructor/assignment and a copy assignment + //! as explained in the documentation to fully write a copyable and movable class. + #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\ + // + + #if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\ + // + #endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + namespace boost { + + //!This trait yields to a compile-time true boolean if T was marked as + //!BOOST_MOVABLE_BUT_NOT_COPYABLE or BOOST_COPYABLE_AND_MOVABLE and + //!rvalue references are not available on the platform. False otherwise. + template + struct has_move_emulation_enabled + { + static const bool value = false; + }; + + template + struct has_move_emulation_disabled + { + static const bool value = true; + }; + + } //namespace boost{ + + //!This macro is used to achieve portable syntax in move + //!constructors and assignments for classes marked as + //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE + #define BOOST_RV_REF(TYPE)\ + TYPE && \ + // + + //!This macro is used to achieve portable syntax in move + //!constructors and assignments for template classes marked as + //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE. + //!As macros have problems with comma-separated template arguments, + //!the template argument must be preceded with BOOST_RV_REF_BEG + //!and ended with BOOST_RV_REF_END + #define BOOST_RV_REF_BEG\ + \ + // + + //!This macro is used to achieve portable syntax in move + //!constructors and assignments for template classes marked as + //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE. + //!As macros have problems with comma-separated template arguments, + //!the template argument must be preceded with BOOST_RV_REF_BEG + //!and ended with BOOST_RV_REF_END + #define BOOST_RV_REF_END\ + && \ + // + + //!This macro expands to BOOST_RV_REF_BEG if BOOST_NO_CXX11_RVALUE_REFERENCES + //!is not defined, empty otherwise + #define BOOST_RV_REF_BEG_IF_CXX11 \ + BOOST_RV_REF_BEG \ + // + + //!This macro expands to BOOST_RV_REF_END if BOOST_NO_CXX11_RVALUE_REFERENCES + //!is not defined, empty otherwise + #define BOOST_RV_REF_END_IF_CXX11 \ + BOOST_RV_REF_END \ + // + + //!This macro is used to achieve portable syntax in copy + //!assignment for classes marked as BOOST_COPYABLE_AND_MOVABLE. + #define BOOST_COPY_ASSIGN_REF(TYPE)\ + const TYPE & \ + // + + //! This macro is used to implement portable perfect forwarding + //! as explained in the documentation. + #define BOOST_FWD_REF(TYPE)\ + TYPE && \ + // + + #if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ + TYPE && \ + // + + #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ + TYPE && \ + // + + #define BOOST_COPY_ASSIGN_REF_BEG \ + const \ + // + + #define BOOST_COPY_ASSIGN_REF_END \ + & \ + // + + #define BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ + const TYPE & \ + // + + #define BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ + const TYPE& \ + // + + #define BOOST_CATCH_CONST_RLVALUE(TYPE)\ + const TYPE & \ + // + + #endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #if !defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED) + + //!This macro is used to achieve portable move return semantics. + //!The C++11 Standard allows implicit move returns when the object to be returned + //!is designated by a lvalue and: + //! - The criteria for elision of a copy operation are met OR + //! - The criteria would be met save for the fact that the source object is a function parameter + //! + //!For C++11 conforming compilers this macros only yields to REF: + //! return BOOST_MOVE_RET(RET_TYPE, REF); -> return REF; + //! + //!For compilers without rvalue references + //!this macro does an explicit move if the move emulation is activated + //!and the return type (RET_TYPE) is not a reference. + //! + //!For non-conforming compilers with rvalue references like Visual 2010 & 2012, + //!an explicit move is performed if RET_TYPE is not a reference. + //! + //! Caution: When using this macro in non-conforming or C++03 + //!compilers, a move will be performed even if the C++11 standard does not allow it + //!(e.g. returning a static variable). The user is responsible for using this macro + //!only to return local objects that met C++11 criteria. + #define BOOST_MOVE_RET(RET_TYPE, REF)\ + REF + // + + #else //!defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #include + + namespace boost { + namespace move_detail { + + template + inline typename ::boost::move_detail::enable_if_c + < ::boost::move_detail::is_lvalue_reference::value + , T&>::type + move_return(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < !::boost::move_detail::is_lvalue_reference::value + , Ret && >::type + move_return(T&& t) BOOST_NOEXCEPT + { + return static_cast< Ret&& >(t); + } + + } //namespace move_detail { + } //namespace boost { + + #define BOOST_MOVE_RET(RET_TYPE, REF)\ + boost::move_detail::move_return< RET_TYPE >(REF) + // + + #endif //!defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED) + + //!This macro is used to achieve portable optimal move constructors. + //! + //!When implementing the move constructor, in C++03 compilers the moved-from argument must be + //!cast to the base type before calling `::boost::move()` due to rvalue reference limitations. + //! + //!In C++11 compilers the cast from a rvalue reference of a derived type to a rvalue reference of + //!a base type is implicit. + #define BOOST_MOVE_BASE(BASE_TYPE, ARG) \ + ::boost::move((BASE_TYPE&)(ARG)) + // + + namespace boost { + namespace move_detail { + + template< class T> struct forward_type { typedef T type; }; + + }} + +#endif //BOOST_NO_CXX11_RVALUE_REFERENCES + +#include + +#endif //#ifndef BOOST_MOVE_CORE_HPP diff --git a/contrib/src/boost/move/detail/config_begin.hpp b/contrib/src/boost/move/detail/config_begin.hpp new file mode 100644 index 0000000..342390b --- /dev/null +++ b/contrib/src/boost/move/detail/config_begin.hpp @@ -0,0 +1,19 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_CONFIG_HPP +#include +#endif + +#ifdef BOOST_MSVC +# pragma warning (push) +# pragma warning (disable : 4324) // structure was padded due to __declspec(align()) +# pragma warning (disable : 4675) // "function": resolved overload was found by argument-dependent lookup +# pragma warning (disable : 4996) // "function": was declared deprecated (_CRT_SECURE_NO_DEPRECATE/_SCL_SECURE_NO_WARNINGS) +#endif diff --git a/contrib/src/boost/move/detail/config_end.hpp b/contrib/src/boost/move/detail/config_end.hpp new file mode 100644 index 0000000..71a99e9 --- /dev/null +++ b/contrib/src/boost/move/detail/config_end.hpp @@ -0,0 +1,12 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// +#if defined BOOST_MSVC +# pragma warning (pop) +#endif diff --git a/contrib/src/boost/move/detail/iterator_traits.hpp b/contrib/src/boost/move/detail/iterator_traits.hpp new file mode 100644 index 0000000..a75ee03 --- /dev/null +++ b/contrib/src/boost/move/detail/iterator_traits.hpp @@ -0,0 +1,73 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2014-2014. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file + +#ifndef BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP +#define BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include + +#include +BOOST_MOVE_STD_NS_BEG + +struct input_iterator_tag; +struct forward_iterator_tag; +struct bidirectional_iterator_tag; +struct random_access_iterator_tag; +struct output_iterator_tag; + +BOOST_MOVE_STD_NS_END +#include + +namespace boost{ namespace movelib{ + +template +struct iterator_traits +{ + typedef typename Iterator::difference_type difference_type; + typedef typename Iterator::value_type value_type; + typedef typename Iterator::pointer pointer; + typedef typename Iterator::reference reference; + typedef typename Iterator::iterator_category iterator_category; +}; + +template +struct iterator_traits +{ + typedef std::ptrdiff_t difference_type; + typedef T value_type; + typedef T* pointer; + typedef T& reference; + typedef std::random_access_iterator_tag iterator_category; +}; + +template +struct iterator_traits +{ + typedef std::ptrdiff_t difference_type; + typedef T value_type; + typedef const T* pointer; + typedef const T& reference; + typedef std::random_access_iterator_tag iterator_category; +}; + +}} //namespace boost { namespace movelib{ + +#endif //#ifndef BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP diff --git a/contrib/src/boost/move/detail/meta_utils.hpp b/contrib/src/boost/move/detail/meta_utils.hpp new file mode 100644 index 0000000..323c13a --- /dev/null +++ b/contrib/src/boost/move/detail/meta_utils.hpp @@ -0,0 +1,564 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2015. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file + +#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP +#define BOOST_MOVE_DETAIL_META_UTILS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif +#include +#include //for std::size_t + +//Small meta-typetraits to support move + +namespace boost { + +//Forward declare boost::rv +template class rv; + +namespace move_detail { + +////////////////////////////////////// +// is_different +////////////////////////////////////// +template +struct is_different +{ + static const bool value = !is_same::value; +}; + +////////////////////////////////////// +// apply +////////////////////////////////////// +template +struct apply +{ + typedef typename F::template apply::type type; +}; + +////////////////////////////////////// +// bool_ +////////////////////////////////////// + +template< bool C_ > +struct bool_ : integral_constant +{ + operator bool() const { return C_; } + bool operator()() const { return C_; } +}; + +typedef bool_ true_; +typedef bool_ false_; + +////////////////////////////////////// +// nat +////////////////////////////////////// +struct nat{}; + +////////////////////////////////////// +// yes_type/no_type +////////////////////////////////////// +typedef char yes_type; + +struct no_type +{ + char _[2]; +}; + +////////////////////////////////////// +// natify +////////////////////////////////////// +template struct natify{}; + +////////////////////////////////////// +// remove_reference +////////////////////////////////////// +template +struct remove_reference +{ + typedef T type; +}; + +template +struct remove_reference +{ + typedef T type; +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template +struct remove_reference +{ + typedef T type; +}; + +#else + +template +struct remove_reference< rv > +{ + typedef T type; +}; + +template +struct remove_reference< rv &> +{ + typedef T type; +}; + +template +struct remove_reference< const rv &> +{ + typedef T type; +}; + +#endif + +////////////////////////////////////// +// remove_pointer +////////////////////////////////////// + +template< class T > struct remove_pointer { typedef T type; }; +template< class T > struct remove_pointer { typedef T type; }; +template< class T > struct remove_pointer { typedef T type; }; +template< class T > struct remove_pointer { typedef T type; }; +template< class T > struct remove_pointer { typedef T type; }; + +////////////////////////////////////// +// add_pointer +////////////////////////////////////// +template< class T > +struct add_pointer +{ + typedef typename remove_reference::type* type; +}; + +////////////////////////////////////// +// add_const +////////////////////////////////////// +template +struct add_const +{ + typedef const T type; +}; + +template +struct add_const +{ + typedef const T& type; +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template +struct add_const +{ + typedef T&& type; +}; + +#endif + +////////////////////////////////////// +// add_lvalue_reference +////////////////////////////////////// +template +struct add_lvalue_reference +{ typedef T& type; }; + +template struct add_lvalue_reference { typedef T& type; }; +template<> struct add_lvalue_reference { typedef void type; }; +template<> struct add_lvalue_reference { typedef const void type; }; +template<> struct add_lvalue_reference { typedef volatile void type; }; +template<> struct add_lvalue_reference{ typedef const volatile void type; }; + +template +struct add_const_lvalue_reference +{ + typedef typename remove_reference::type t_unreferenced; + typedef typename add_const::type t_unreferenced_const; + typedef typename add_lvalue_reference + ::type type; +}; + +////////////////////////////////////// +// is_lvalue_reference +////////////////////////////////////// +template +struct is_lvalue_reference +{ + static const bool value = false; +}; + +template +struct is_lvalue_reference +{ + static const bool value = true; +}; + + +////////////////////////////////////// +// identity +////////////////////////////////////// +template +struct identity +{ + typedef T type; + typedef typename add_const_lvalue_reference::type reference; + reference operator()(reference t) + { return t; } +}; + +////////////////////////////////////// +// is_class_or_union +////////////////////////////////////// +template +struct is_class_or_union +{ + struct twochar { char dummy[2]; }; + template + static char is_class_or_union_tester(void(U::*)(void)); + template + static twochar is_class_or_union_tester(...); + static const bool value = sizeof(is_class_or_union_tester(0)) == sizeof(char); +}; + +////////////////////////////////////// +// addressof +////////////////////////////////////// +template +struct addr_impl_ref +{ + T & v_; + inline addr_impl_ref( T & v ): v_( v ) {} + inline operator T& () const { return v_; } + + private: + addr_impl_ref & operator=(const addr_impl_ref &); +}; + +template +struct addressof_impl +{ + static inline T * f( T & v, long ) + { + return reinterpret_cast( + &const_cast(reinterpret_cast(v))); + } + + static inline T * f( T * v, int ) + { return v; } +}; + +template +inline T * addressof( T & v ) +{ + return ::boost::move_detail::addressof_impl::f + ( ::boost::move_detail::addr_impl_ref( v ), 0 ); +} + +////////////////////////////////////// +// has_pointer_type +////////////////////////////////////// +template +struct has_pointer_type +{ + struct two { char c[2]; }; + template static two test(...); + template static char test(typename U::pointer* = 0); + static const bool value = sizeof(test(0)) == 1; +}; + +////////////////////////////////////// +// is_convertible +////////////////////////////////////// +#if defined(_MSC_VER) && (_MSC_VER >= 1400) + +//use intrinsic since in MSVC +//overaligned types can't go through ellipsis +template +struct is_convertible +{ + static const bool value = __is_convertible_to(T, U); +}; + +#else + +template +class is_convertible +{ + typedef typename add_lvalue_reference::type t_reference; + typedef char true_t; + class false_t { char dummy[2]; }; + static false_t dispatch(...); + static true_t dispatch(U); + static t_reference trigger(); + public: + static const bool value = sizeof(dispatch(trigger())) == sizeof(true_t); +}; + +#endif + +template< + bool C + , typename F1 + , typename F2 + > +struct eval_if_c + : if_c::type +{}; + +template< + typename C + , typename T1 + , typename T2 + > +struct eval_if + : if_::type +{}; + + +#if defined(BOOST_GCC) && (BOOST_GCC <= 40000) +#define BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN +#endif + +template +struct enable_if_convertible + : enable_if< is_convertible, R> +{}; + +template +struct disable_if_convertible + : disable_if< is_convertible, R> +{}; + +////////////////////////////////////////////////////////////////////////////// +// +// and_ +// +////////////////////////////////////////////////////////////////////////////// +template +struct and_impl + : and_impl +{}; + +template<> +struct and_impl +{ + static const bool value = true; +}; + +template +struct and_impl +{ + static const bool value = false; +}; + +template +struct and_ + : and_impl +{}; + +////////////////////////////////////////////////////////////////////////////// +// +// or_ +// +////////////////////////////////////////////////////////////////////////////// +template +struct or_impl + : or_impl +{}; + +template<> +struct or_impl +{ + static const bool value = false; +}; + +template +struct or_impl +{ + static const bool value = true; +}; + +template +struct or_ + : or_impl +{}; + +////////////////////////////////////////////////////////////////////////////// +// +// not_ +// +////////////////////////////////////////////////////////////////////////////// +template +struct not_ +{ + static const bool value = !T::value; +}; + +////////////////////////////////////////////////////////////////////////////// +// +// enable_if_and / disable_if_and / enable_if_or / disable_if_or +// +////////////////////////////////////////////////////////////////////////////// + +template +struct enable_if_and + : enable_if_c< and_::value, R> +{}; + +template +struct disable_if_and + : disable_if_c< and_::value, R> +{}; + +template +struct enable_if_or + : enable_if_c< or_::value, R> +{}; + +template +struct disable_if_or + : disable_if_c< or_::value, R> +{}; + +////////////////////////////////////////////////////////////////////////////// +// +// has_move_emulation_enabled_impl +// +////////////////////////////////////////////////////////////////////////////// +template +struct has_move_emulation_enabled_impl + : is_convertible< T, ::boost::rv& > +{}; + +template +struct has_move_emulation_enabled_impl +{ static const bool value = false; }; + +template +struct has_move_emulation_enabled_impl< ::boost::rv > +{ static const bool value = false; }; + +////////////////////////////////////////////////////////////////////////////// +// +// is_rv_impl +// +////////////////////////////////////////////////////////////////////////////// + +template +struct is_rv_impl +{ static const bool value = false; }; + +template +struct is_rv_impl< rv > +{ static const bool value = true; }; + +template +struct is_rv_impl< const rv > +{ static const bool value = true; }; + +// Code from Jeffrey Lee Hellrung, many thanks + +template< class T > +struct is_rvalue_reference +{ static const bool value = false; }; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template< class T > +struct is_rvalue_reference< T&& > +{ static const bool value = true; }; + +#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template< class T > +struct is_rvalue_reference< boost::rv& > +{ static const bool value = true; }; + +template< class T > +struct is_rvalue_reference< const boost::rv& > +{ static const bool value = true; }; + +#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template< class T > +struct add_rvalue_reference +{ typedef T&& type; }; + +#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +namespace detail_add_rvalue_reference +{ + template< class T + , bool emulation = has_move_emulation_enabled_impl::value + , bool rv = is_rv_impl::value > + struct add_rvalue_reference_impl { typedef T type; }; + + template< class T, bool emulation> + struct add_rvalue_reference_impl< T, emulation, true > { typedef T & type; }; + + template< class T, bool rv > + struct add_rvalue_reference_impl< T, true, rv > { typedef ::boost::rv& type; }; +} // namespace detail_add_rvalue_reference + +template< class T > +struct add_rvalue_reference + : detail_add_rvalue_reference::add_rvalue_reference_impl +{ }; + +template< class T > +struct add_rvalue_reference +{ typedef T & type; }; + +#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template< class T > struct remove_rvalue_reference { typedef T type; }; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template< class T > struct remove_rvalue_reference< T&& > { typedef T type; }; +#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template< class T > struct remove_rvalue_reference< rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< volatile rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const volatile rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< rv& > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const rv& > { typedef T type; }; + template< class T > struct remove_rvalue_reference< volatile rv& > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const volatile rv& >{ typedef T type; }; +#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +// Ideas from Boost.Move review, Jeffrey Lee Hellrung: +// +//- TypeTraits metafunctions is_lvalue_reference, add_lvalue_reference, and remove_lvalue_reference ? +// Perhaps add_reference and remove_reference can be modified so that they behave wrt emulated rvalue +// references the same as wrt real rvalue references, i.e., add_reference< rv& > -> T& rather than +// rv& (since T&& & -> T&). +// +//- Add'l TypeTraits has_[trivial_]move_{constructor,assign}...? +// +//- An as_lvalue(T& x) function, which amounts to an identity operation in C++0x, but strips emulated +// rvalue references in C++03. This may be necessary to prevent "accidental moves". + +} //namespace move_detail { +} //namespace boost { + +#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP diff --git a/contrib/src/boost/move/detail/meta_utils_core.hpp b/contrib/src/boost/move/detail/meta_utils_core.hpp new file mode 100644 index 0000000..4d715a0 --- /dev/null +++ b/contrib/src/boost/move/detail/meta_utils_core.hpp @@ -0,0 +1,120 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2015-2015. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file + +#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP +#define BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +//Small meta-typetraits to support move + +namespace boost { +namespace move_detail { + +////////////////////////////////////// +// if_c +////////////////////////////////////// +template +struct if_c +{ + typedef T1 type; +}; + +template +struct if_c +{ + typedef T2 type; +}; + +////////////////////////////////////// +// if_ +////////////////////////////////////// +template +struct if_ : if_c<0 != T1::value, T2, T3> +{}; + +////////////////////////////////////// +// enable_if_c +////////////////////////////////////// +template +struct enable_if_c +{ + typedef T type; +}; + +template +struct enable_if_c {}; + +////////////////////////////////////// +// enable_if +////////////////////////////////////// +template +struct enable_if : enable_if_c {}; + +////////////////////////////////////// +// disable_if_c +////////////////////////////////////// +template +struct disable_if_c + : enable_if_c +{}; + +////////////////////////////////////// +// disable_if +////////////////////////////////////// +template +struct disable_if : enable_if_c {}; + +////////////////////////////////////// +// integral_constant +////////////////////////////////////// +template +struct integral_constant +{ + static const T value = v; + typedef T value_type; + typedef integral_constant type; + + operator T() const { return value; } + T operator()() const { return value; } +}; + +typedef integral_constant true_type; +typedef integral_constant false_type; + + +////////////////////////////////////// +// is_same +////////////////////////////////////// +template +struct is_same +{ + static const bool value = false; +}; + +template +struct is_same +{ + static const bool value = true; +}; + +} //namespace move_detail { +} //namespace boost { + +#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP diff --git a/contrib/src/boost/move/detail/std_ns_begin.hpp b/contrib/src/boost/move/detail/std_ns_begin.hpp new file mode 100644 index 0000000..a768e61 --- /dev/null +++ b/contrib/src/boost/move/detail/std_ns_begin.hpp @@ -0,0 +1,30 @@ +#////////////////////////////////////////////////////////////////////////////// +#// +#// (C) Copyright Ion Gaztanaga 2015-2015. +#// Distributed under the Boost Software License, Version 1.0. +#// (See accompanying file LICENSE_1_0.txt or copy at +#// http://www.boost.org/LICENSE_1_0.txt) +#// +#// See http://www.boost.org/libs/move for documentation. +#// +#////////////////////////////////////////////////////////////////////////////// +# +#if defined(_LIBCPP_VERSION) + #if defined(__clang__) + #define BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wc++11-extensions" + #endif + #define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD + #define BOOST_MOVE_STD_NS_END _LIBCPP_END_NAMESPACE_STD +#elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE_VERSION) //GCC >= 4.6 + #define BOOST_MOVE_STD_NS_BEG namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION + #define BOOST_MOVE_STD_NS_END _GLIBCXX_END_NAMESPACE_VERSION } // namespace +#elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE) //GCC >= 4.2 + #define BOOST_MOVE_STD_NS_BEG _GLIBCXX_BEGIN_NAMESPACE(std) + #define BOOST_MOVE_STD_NS_END _GLIBCXX_END_NAMESPACE +#else + #define BOOST_MOVE_STD_NS_BEG namespace std{ + #define BOOST_MOVE_STD_NS_END } +#endif + diff --git a/contrib/src/boost/move/detail/std_ns_end.hpp b/contrib/src/boost/move/detail/std_ns_end.hpp new file mode 100644 index 0000000..0975059 --- /dev/null +++ b/contrib/src/boost/move/detail/std_ns_end.hpp @@ -0,0 +1,14 @@ +#////////////////////////////////////////////////////////////////////////////// +#// +#// (C) Copyright Ion Gaztanaga 2015-2015. +#// Distributed under the Boost Software License, Version 1.0. +#// (See accompanying file LICENSE_1_0.txt or copy at +#// http://www.boost.org/LICENSE_1_0.txt) +#// +#// See http://www.boost.org/libs/move for documentation. +#// +#////////////////////////////////////////////////////////////////////////////// +#ifdef BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH + #pragma GCC diagnostic pop + #undef BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH +#endif //BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH diff --git a/contrib/src/boost/move/detail/type_traits.hpp b/contrib/src/boost/move/detail/type_traits.hpp new file mode 100644 index 0000000..816fdca --- /dev/null +++ b/contrib/src/boost/move/detail/type_traits.hpp @@ -0,0 +1,1078 @@ +////////////////////////////////////////////////////////////////////////////// +// (C) Copyright John Maddock 2000. +// (C) Copyright Ion Gaztanaga 2005-2015. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +// The alignment and Type traits implementation comes from +// John Maddock's TypeTraits library. +// +// Some other tricks come from Howard Hinnant's papers and StackOverflow replies +////////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP +#define BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include + +// move/detail +#include +// other +#include +#include +// std +#include + +//Use of Boost.TypeTraits leads to long preprocessed source code due to +//MPL dependencies. We'll use intrinsics directly and make or own +//simplified version of TypeTraits. +//If someday Boost.TypeTraits dependencies are minimized, we should +//revisit this file redirecting code to Boost.TypeTraits traits. + +//These traits don't care about volatile, reference or other checks +//made by Boost.TypeTraits because no volatile or reference types +//can be hold in Boost.Containers. This helps to avoid any Boost.TypeTraits +//dependency. + +// Helper macros for builtin compiler support. +// If your compiler has builtin support for any of the following +// traits concepts, then redefine the appropriate macros to pick +// up on the compiler support: +// +// (these should largely ignore cv-qualifiers) +// BOOST_MOVE_IS_POD(T) should evaluate to true if T is a POD type +// BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect +// BOOST_MOVE_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy +// BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy +// BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy +// BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy +// BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect +// BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw +// BOOST_MOVE_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw +// BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) should evaluate to true if t = u can not throw +// BOOST_MOVE_IS_ENUM(T) should evaluate to true it t is a union type. +// +// The following can also be defined: when detected our implementation is greatly simplified. +// +// BOOST_ALIGNMENT_OF(T) should evaluate to the alignment requirements of type T. + +#if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) + // Metrowerks compiler is acquiring intrinsic type traits support + // post version 8. We hook into the published interface to pick up + // user defined specializations as well as compiler intrinsics as + // and when they become available: +# include +# define BOOST_MOVE_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union::value +# define BOOST_MOVE_IS_POD(T) BOOST_STD_EXTENSION_NAMESPACE::is_POD::value +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_default_ctor::value +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_copy_ctor::value +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_assignment::value +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_dtor::value +#endif + +#if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\ + || (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500)) +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# define BOOST_MOVE_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T)) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T)|| ::boost::move_detail::is_pod::value) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ::boost::move_detail::is_pod::value) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::move_detail::is_pod::value) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::move_detail::is_trivially_default_constructible::value) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) || ::boost::move_detail::is_trivially_copy_constructible::value) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::move_detail::is_trivially_copy_assignable::value) + +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# if defined(_MSC_VER) && (_MSC_VER >= 1700) +# define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__has_trivial_move_constructor(T) || ::boost::move_detail::is_pod::value) +# define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) (__has_trivial_move_assign(T) || ::boost::move_detail::is_pod::value) +# endif +#endif + +#if defined(BOOST_CLANG) && defined(__has_feature) + +# if __has_feature(is_union) +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# endif +# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod) +# define BOOST_MOVE_IS_POD(T) __is_pod(T) +# endif +# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# endif +# if __has_feature(has_trivial_constructor) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# endif +# if __has_feature(has_trivial_copy) +# //There are problems with deleted copy constructors detected as trivially copyable. +# //http://stackoverflow.com/questions/12754886/has-trivial-copy-behaves-differently-in-clang-and-gcc-whos-right +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && ::boost::move_detail::is_copy_constructible::value) +# endif +# if __has_feature(has_trivial_assign) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) ) +# endif +# if __has_feature(has_trivial_destructor) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# endif +# if __has_feature(has_nothrow_constructor) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) +# endif +# if __has_feature(has_nothrow_copy) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T)) +# endif +# if __has_feature(is_nothrow_copy_assignable) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T)) +# endif +# if __has_feature(is_enum) +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# endif +# if __has_feature(has_trivial_move_constructor) +# define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T) +# endif +# if __has_feature(has_trivial_move_assign) +# define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T) +# endif +# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof(T) +#endif + +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG) + +#ifdef BOOST_INTEL +# define BOOST_MOVE_INTEL_TT_OPTS || ::boost::move_detail::is_pod::value +#else +# define BOOST_MOVE_INTEL_TT_OPTS +#endif + +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# define BOOST_MOVE_IS_POD(T) __is_pod(T) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_MOVE_INTEL_TT_OPTS)) +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_MOVE_INTEL_TT_OPTS)) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_MOVE_INTEL_TT_OPTS) ) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_MOVE_INTEL_TT_OPTS) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_MOVE_INTEL_TT_OPTS) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_MOVE_INTEL_TT_OPTS)) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_MOVE_INTEL_TT_OPTS)) + +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# if (!defined(unix) && !defined(__unix__)) || defined(__LP64__) + // GCC sometimes lies about alignment requirements + // of type double on 32-bit unix platforms, use the + // old implementation instead in that case: +# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof__(T) +# endif +#endif + +#if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600) + +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# define BOOST_MOVE_IS_POD(T) __is_pod(T) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T)) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T)) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T)) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T)) + +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof__(T) +#endif + +# if defined(__CODEGEARC__) +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# define BOOST_MOVE_IS_POD(T) __is_pod(T) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T)) +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T)) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T)) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T)) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T)) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T)) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T)) + +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# define BOOST_MOVE_ALIGNMENT_OF(T) alignof(T) + +#endif + +//Fallback definitions + +#ifdef BOOST_MOVE_IS_UNION + #define BOOST_MOVE_IS_UNION_IMPL(T) BOOST_MOVE_IS_UNION(T) +#else + #define BOOST_MOVE_IS_UNION_IMPL(T) false +#endif + +#ifdef BOOST_MOVE_IS_POD + //in some compilers the intrinsic is limited to class types so add scalar and void + #define BOOST_MOVE_IS_POD_IMPL(T) (::boost::move_detail::is_scalar::value ||\ + ::boost::move_detail::is_void::value ||\ + BOOST_MOVE_IS_POD(T)) +#else + #define BOOST_MOVE_IS_POD_IMPL(T) \ + (::boost::move_detail::is_scalar::value || ::boost::move_detail::is_void::value) +#endif + +#ifdef BOOST_MOVE_IS_EMPTY + #define BOOST_MOVE_IS_EMPTY_IMPL(T) BOOST_MOVE_IS_EMPTY(T) +#else + #define BOOST_MOVE_IS_EMPTY_IMPL(T) ::boost::move_detail::is_empty_nonintrinsic::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY + #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_COPY(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR + #define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY + #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_COPY(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR + #define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_ASSIGN + #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN + #define BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR + #define BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR + #define BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) +#else + #define BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_COPY + #define BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_COPY(T) +#else + #define BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_MOVE + #define BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_MOVE(T) +#else + #define BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_ASSIGN + #define BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T) BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) +#else + #define BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN + #define BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T) BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN(T) +#else + #define BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_IS_ENUM + #define BOOST_MOVE_IS_ENUM_IMPL(T) BOOST_MOVE_IS_ENUM(T) +#else + #define BOOST_MOVE_IS_ENUM_IMPL(T) ::boost::move_detail::is_enum_nonintrinsic::value +#endif + +namespace boost { +namespace move_detail { + +////////////////////////// +// is_reference +////////////////////////// +template +struct is_reference +{ static const bool value = false; }; + +template +struct is_reference +{ static const bool value = true; }; + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template +struct is_reference +{ static const bool value = true; }; +#endif + +////////////////////////// +// is_pointer +////////////////////////// +template +struct is_pointer +{ static const bool value = false; }; + +template +struct is_pointer +{ static const bool value = true; }; + +////////////////////////// +// is_const +////////////////////////// +template +struct is_const +{ static const bool value = false; }; + +template +struct is_const +{ static const bool value = true; }; + +////////////////////////// +// unvoid_ref +////////////////////////// +template struct unvoid_ref : add_lvalue_reference{}; +template <> struct unvoid_ref { typedef unvoid_ref & type; }; +template <> struct unvoid_ref { typedef unvoid_ref & type; }; +template <> struct unvoid_ref { typedef unvoid_ref & type; }; +template <> struct unvoid_ref { typedef unvoid_ref & type; }; + +template +struct add_reference : add_lvalue_reference +{}; + +////////////////////////// +// add_const_reference +////////////////////////// +template +struct add_const_reference +{ typedef const T &type; }; + +template +struct add_const_reference +{ typedef T& type; }; + +////////////////////////// +// add_const_if_c +////////////////////////// +template +struct add_const_if_c + : if_c::type, T> +{}; + +////////////////////////// +// remove_const +////////////////////////// +template +struct remove_const +{ typedef T type; }; + +template +struct remove_const< const T> +{ typedef T type; }; + +////////////////////////// +// remove_cv +////////////////////////// +template struct remove_cv { typedef T type; }; +template struct remove_cv { typedef T type; }; +template struct remove_cv { typedef T type; }; +template struct remove_cv { typedef T type; }; + +////////////////////////// +// make_unsigned +////////////////////////// +template +struct make_unsigned_impl { typedef T type; }; +template <> struct make_unsigned_impl { typedef unsigned char type; }; +template <> struct make_unsigned_impl { typedef unsigned short type; }; +template <> struct make_unsigned_impl { typedef unsigned int type; }; +template <> struct make_unsigned_impl { typedef unsigned long type; }; +#ifdef BOOST_HAS_LONG_LONG +template <> struct make_unsigned_impl< ::boost::long_long_type > { typedef ::boost::ulong_long_type type; }; +#endif + +template +struct make_unsigned + : make_unsigned_impl::type> +{}; + +////////////////////////// +// is_floating_point +////////////////////////// +template struct is_floating_point_cv { static const bool value = false; }; +template<> struct is_floating_point_cv { static const bool value = true; }; +template<> struct is_floating_point_cv { static const bool value = true; }; +template<> struct is_floating_point_cv { static const bool value = true; }; + +template +struct is_floating_point + : is_floating_point_cv::type> +{}; + +////////////////////////// +// is_integral +////////////////////////// +template struct is_integral_cv { static const bool value = false; }; +template<> struct is_integral_cv< bool>{ static const bool value = true; }; +template<> struct is_integral_cv< char>{ static const bool value = true; }; +template<> struct is_integral_cv< unsigned char>{ static const bool value = true; }; +template<> struct is_integral_cv< signed char>{ static const bool value = true; }; +#ifndef BOOST_NO_CXX11_CHAR16_T +template<> struct is_integral_cv< char16_t>{ static const bool value = true; }; +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T +template<> struct is_integral_cv< char32_t>{ static const bool value = true; }; +#endif +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template<> struct is_integral_cv< wchar_t>{ static const bool value = true; }; +#endif +template<> struct is_integral_cv< short>{ static const bool value = true; }; +template<> struct is_integral_cv< unsigned short>{ static const bool value = true; }; +template<> struct is_integral_cv< int>{ static const bool value = true; }; +template<> struct is_integral_cv< unsigned int>{ static const bool value = true; }; +template<> struct is_integral_cv< long>{ static const bool value = true; }; +template<> struct is_integral_cv< unsigned long>{ static const bool value = true; }; +#ifdef BOOST_HAS_LONG_LONG +template<> struct is_integral_cv< ::boost:: long_long_type>{ static const bool value = true; }; +template<> struct is_integral_cv< ::boost::ulong_long_type>{ static const bool value = true; }; +#endif + +template +struct is_integral + : public is_integral_cv::type> +{}; + +////////////////////////////////////// +// remove_all_extents +////////////////////////////////////// +template +struct remove_all_extents +{ typedef T type;}; + +template +struct remove_all_extents +{ typedef typename remove_all_extents::type type; }; + +template +struct remove_all_extents +{ typedef typename remove_all_extents::type type;}; + +////////////////////////// +// is_scalar +////////////////////////// +template +struct is_scalar +{ static const bool value = is_integral::value || is_floating_point::value; }; + +////////////////////////// +// is_void +////////////////////////// +template +struct is_void_cv +{ static const bool value = false; }; + +template<> +struct is_void_cv +{ static const bool value = true; }; + +template +struct is_void + : is_void_cv::type> +{}; + +////////////////////////////////////// +// is_array +////////////////////////////////////// +template +struct is_array +{ static const bool value = false; }; + +template +struct is_array +{ static const bool value = true; }; + +template +struct is_array +{ static const bool value = true; }; + +////////////////////////////////////// +// is_member_pointer +////////////////////////////////////// +template struct is_member_pointer_cv { static const bool value = false; }; +template struct is_member_pointer_cv { static const bool value = true; }; + +template +struct is_member_pointer + : is_member_pointer_cv::type> +{}; + +////////////////////////////////////// +// is_nullptr_t +////////////////////////////////////// +template +struct is_nullptr_t_cv +{ static const bool value = false; }; + +#if !defined(BOOST_NO_CXX11_NULLPTR) +template <> +struct is_nullptr_t_cv + #if !defined(BOOST_NO_CXX11_DECLTYPE) + + #else + + #endif +{ static const bool value = true; }; +#endif + +template +struct is_nullptr_t + : is_nullptr_t_cv::type> +{}; + +////////////////////////////////////// +// is_function +////////////////////////////////////// +//Inspired by libc++, thanks to Howard Hinnant +//For a function to pointer an lvalue of function type T can be implicitly converted to a prvalue +//pointer to that function. This does not apply to non-static member functions because lvalues +//that refer to non-static member functions do not exist. +template +struct is_reference_convertible_to_pointer +{ + struct twochar { char dummy[2]; }; + template static char test(U*); + template static twochar test(...); + static T& source(); + static const bool value = sizeof(char) == sizeof(test(source())); +}; +//Filter out: +// - class types that might have implicit conversions +// - void (to avoid forming a reference to void later) +// - references (e.g.: filtering reference to functions) +// - nullptr_t (convertible to pointer) +template < class T + , bool Filter = is_class_or_union::value || + is_void::value || + is_reference::value || + is_nullptr_t::value > +struct is_function_impl +{ static const bool value = is_reference_convertible_to_pointer::value; }; + +template +struct is_function_impl +{ static const bool value = false; }; + +template +struct is_function + : is_function_impl +{}; + +////////////////////////////////////// +// is_union +////////////////////////////////////// +template +struct is_union_noextents_cv +{ static const bool value = BOOST_MOVE_IS_UNION_IMPL(T); }; + +template +struct is_union + : is_union_noextents_cv::type>::type> +{}; + +////////////////////////////////////// +// is_class +////////////////////////////////////// +template +struct is_class +{ + static const bool value = is_class_or_union::value && ! is_union::value; +}; + + +////////////////////////////////////// +// is_arithmetic +////////////////////////////////////// +template +struct is_arithmetic +{ + static const bool value = is_floating_point::value || + is_integral::value; +}; + +////////////////////////////////////// +// is_member_function_pointer +////////////////////////////////////// +template +struct is_member_function_pointer_cv +{ + static const bool value = false; +}; + +template +struct is_member_function_pointer_cv + : is_function +{}; + +template +struct is_member_function_pointer + : is_member_function_pointer_cv::type> +{}; + +////////////////////////////////////// +// is_enum +////////////////////////////////////// +#if !defined(BOOST_MOVE_IS_ENUM) +//Based on (http://howardhinnant.github.io/TypeHiearchy.pdf) +template +struct is_enum_nonintrinsic +{ + static const bool value = !is_arithmetic::value && + !is_reference::value && + !is_class_or_union::value && + !is_array::value && + !is_void::value && + !is_nullptr_t::value && + !is_member_pointer::value && + !is_pointer::value && + !is_function::value; +}; +#endif + +template +struct is_enum +{ static const bool value = BOOST_MOVE_IS_ENUM_IMPL(T); }; + +////////////////////////////////////// +// is_pod +////////////////////////////////////// +template +struct is_pod_noextents_cv //for non-c++11 compilers, a safe fallback +{ static const bool value = BOOST_MOVE_IS_POD_IMPL(T); }; + +template +struct is_pod + : is_pod_noextents_cv::type>::type> +{}; + +////////////////////////////////////// +// is_empty +////////////////////////////////////// +#if !defined(BOOST_MOVE_IS_EMPTY) + +template +struct empty_helper_t1 : public T +{ + empty_helper_t1(); // hh compiler bug workaround + int i[256]; + private: + + empty_helper_t1(const empty_helper_t1&); + empty_helper_t1& operator=(const empty_helper_t1&); +}; + +struct empty_helper_t2 { int i[256]; }; + +template ::value > +struct is_empty_nonintrinsic +{ + static const bool value = false; +}; + +template +struct is_empty_nonintrinsic +{ + static const bool value = sizeof(empty_helper_t1) == sizeof(empty_helper_t2); +}; +#endif + +template +struct is_empty +{ static const bool value = BOOST_MOVE_IS_EMPTY_IMPL(T); }; + + +template +struct has_boost_move_no_copy_constructor_or_assign_type +{ + template + static yes_type test(typename U::boost_move_no_copy_constructor_or_assign*); + + template + static no_type test(...); + + static const bool value = sizeof(test(0)) == sizeof(yes_type); +}; + +////////////////////////////////////// +// is_copy_constructible +////////////////////////////////////// +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_CXX11_DECLTYPE) \ + && !defined(BOOST_INTEL_CXX_VERSION) && \ + !(defined(BOOST_MSVC) && _MSC_VER == 1800) +#define BOOST_MOVE_TT_CXX11_IS_COPY_CONSTRUCTIBLE +#endif + +template +struct is_copy_constructible +{ + // Intel compiler has problems with SFINAE for copy constructors and deleted functions: + // + // error: function *function_name* cannot be referenced -- it is a deleted function + // static yes_type test(U&, decltype(U(boost::declval()))* = 0); + // ^ + // MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See: + // https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken + #if defined(BOOST_MOVE_TT_CXX11_IS_COPY_CONSTRUCTIBLE) + template static typename add_reference::type source(); + static no_type test(...); + #ifdef BOOST_NO_CXX11_DECLTYPE + template + static yes_type test(U&, bool_()))>* = 0); + #else + template + static yes_type test(U&, decltype(U(source()))* = 0); + #endif + static const bool value = sizeof(test(source())) == sizeof(yes_type); + #else + static const bool value = !has_boost_move_no_copy_constructor_or_assign_type::value; + #endif +}; + + +////////////////////////////////////// +// is_copy_assignable +////////////////////////////////////// +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_CXX11_DECLTYPE) \ + && !defined(BOOST_INTEL_CXX_VERSION) && \ + !(defined(BOOST_MSVC) && _MSC_VER == 1800) +#define BOOST_MOVE_TT_CXX11_IS_COPY_ASSIGNABLE +#endif + +template +struct is_copy_assignable +{ +// Intel compiler has problems with SFINAE for copy constructors and deleted functions: +// +// error: function *function_name* cannot be referenced -- it is a deleted function +// static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval()))* = 0); +// ^ +// +// MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See: +// https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken +#if defined(BOOST_MOVE_TT_CXX11_IS_COPY_ASSIGNABLE) + typedef char yes_type; + struct no_type { char dummy[2]; }; + + template static typename add_reference::type source(); + template static decltype(source() = source(), yes_type() ) test(int); + template static no_type test(...); + + static const bool value = sizeof(test(0)) == sizeof(yes_type); +#else + static const bool value = !has_boost_move_no_copy_constructor_or_assign_type::value; +#endif +}; + +////////////////////////////////////// +// is_trivially_destructible +////////////////////////////////////// +template +struct is_trivially_destructible +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_trivially_default_constructible +////////////////////////////////////// +template +struct is_trivially_default_constructible +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_trivially_copy_constructible +////////////////////////////////////// +template +struct is_trivially_copy_constructible +{ + //In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with + //deleted copy constructors so make sure the type is copy constructible. + static const bool value = ::boost::move_detail::is_pod::value || + ( ::boost::move_detail::is_copy_constructible::value && + BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ); +}; + +////////////////////////////////////// +// is_trivially_move_constructible +////////////////////////////////////// +template +struct is_trivially_move_constructible +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_trivially_copy_assignable +////////////////////////////////////// +template +struct is_trivially_copy_assignable +{ + //In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with + //deleted copy constructors so make sure the type is copy constructible. + static const bool value = ::boost::move_detail::is_pod::value || + ( ::boost::move_detail::is_copy_assignable::value && + BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ); +}; + +////////////////////////////////////// +// is_trivially_move_assignable +////////////////////////////////////// +template +struct is_trivially_move_assignable +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T); }; + +////////////////////////////////////// +// is_nothrow_default_constructible +////////////////////////////////////// +template +struct is_nothrow_default_constructible + : is_pod +{ static const bool value = BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_nothrow_copy_constructible +////////////////////////////////////// +template +struct is_nothrow_copy_constructible +{ static const bool value = BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_nothrow_move_constructible +////////////////////////////////////// +template +struct is_nothrow_move_constructible +{ static const bool value = BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_nothrow_copy_assignable +////////////////////////////////////// +template +struct is_nothrow_copy_assignable +{ static const bool value = BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T); }; + +////////////////////////////////////// +// is_nothrow_move_assignable +////////////////////////////////////// +template +struct is_nothrow_move_assignable +{ static const bool value = BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T); }; + +////////////////////////////////////// +// is_nothrow_swappable +////////////////////////////////////// +template +struct is_nothrow_swappable +{ + static const bool value = is_empty::value || is_pod::value; +}; + +////////////////////////////////////// +// alignment_of +////////////////////////////////////// +template +struct alignment_of_hack +{ + T t1; + char c; + T t2; + alignment_of_hack(); +}; + +template +struct alignment_logic +{ static const std::size_t value = A < S ? A : S; }; + +template< typename T > +struct alignment_of_impl +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) + // With MSVC both the native __alignof operator + // and our own logic gets things wrong from time to time :-( + // Using a combination of the two seems to make the most of a bad job: + : alignment_logic< sizeof(alignment_of_hack) - 2*sizeof(T), __alignof(T)> +{}; +#elif !defined(BOOST_MOVE_ALIGNMENT_OF) + : alignment_logic< sizeof(alignment_of_hack) - 2*sizeof(T), sizeof(T)> +{}; +#else +{ static const std::size_t value = BOOST_MOVE_ALIGNMENT_OF(T); }; +#endif + +template< typename T > +struct alignment_of + : alignment_of_impl +{}; + +class alignment_dummy; +typedef void (*function_ptr)(); +typedef int (alignment_dummy::*member_ptr); +typedef int (alignment_dummy::*member_function_ptr)(); +struct alignment_struct +{ long double dummy[4]; }; + +///////////////////////////// +// max_align_t +///////////////////////////// +//This is not standard, but should work with all compilers +union max_align +{ + char char_; + short short_; + int int_; + long long_; + #ifdef BOOST_HAS_LONG_LONG + ::boost::long_long_type long_long_; + #endif + float float_; + double double_; + void * void_ptr_; + long double long_double_[4]; + alignment_dummy *unknown_class_ptr_; + function_ptr function_ptr_; + member_function_ptr member_function_ptr_; + alignment_struct alignment_struct_; +}; + +typedef union max_align max_align_t; + +///////////////////////////// +// aligned_storage +///////////////////////////// + +#if !defined(BOOST_NO_ALIGNMENT) + +template +struct aligned_storage_impl; + +#define BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(A)\ +template\ +struct BOOST_ALIGNMENT(A) aligned_storage_impl\ +{\ + char dummy[Len];\ + typedef aligned_storage_impl type;\ +};\ +// + +//Up to 4K alignment (typical page size) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x2) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x4) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x8) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x10) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x20) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x40) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x80) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x100) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x200) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x400) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x800) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1000) + +#undef BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT + +#else //BOOST_NO_ALIGNMENT + +template +union aligned_union +{ + T aligner; + char dummy[Len]; +}; + +template +struct aligned_next; + +template +struct aligned_next +{ + BOOST_STATIC_ASSERT((alignment_of::value == Align)); + typedef aligned_union type; +}; + +//End of search defaults to max_align_t +template +struct aligned_next +{ typedef aligned_union type; }; + +//Now define a search list through types +#define BOOST_MOVE_ALIGNED_NEXT_STEP(TYPE, NEXT_TYPE)\ + template\ + struct aligned_next\ + : aligned_next::value>\ + {};\ + // + BOOST_MOVE_ALIGNED_NEXT_STEP(long double, max_align_t) + BOOST_MOVE_ALIGNED_NEXT_STEP(double, long double) + #ifdef BOOST_HAS_LONG_LONG + BOOST_MOVE_ALIGNED_NEXT_STEP(::boost::long_long_type, double) + BOOST_MOVE_ALIGNED_NEXT_STEP(long, ::boost::long_long_type) + #else + BOOST_MOVE_ALIGNED_NEXT_STEP(long, double) + #endif + BOOST_MOVE_ALIGNED_NEXT_STEP(int, long) + BOOST_MOVE_ALIGNED_NEXT_STEP(short, int) + BOOST_MOVE_ALIGNED_NEXT_STEP(char, short) +#undef BOOST_MOVE_ALIGNED_NEXT_STEP + +template +struct aligned_storage_impl + : aligned_next::value> +{}; + +#endif + +template::value> +struct aligned_storage +{ + //Sanity checks for input parameters + BOOST_STATIC_ASSERT(Align > 0); + + //Sanity checks for output type + typedef typename aligned_storage_impl::type type; + static const std::size_t value = alignment_of::value; + BOOST_STATIC_ASSERT(value >= Align); + BOOST_STATIC_ASSERT((value % Align) == 0); + + //Just in case someone instantiates aligned_storage + //instead of aligned_storage::type (typical error). + private: + aligned_storage(); +}; + +} //namespace move_detail { +} //namespace boost { + +#include + +#endif //#ifndef BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP diff --git a/contrib/src/boost/move/detail/workaround.hpp b/contrib/src/boost/move/detail/workaround.hpp new file mode 100644 index 0000000..b3f81b1 --- /dev/null +++ b/contrib/src/boost/move/detail/workaround.hpp @@ -0,0 +1,55 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/interprocess for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP +#define BOOST_MOVE_DETAIL_WORKAROUND_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + #define BOOST_MOVE_PERFECT_FORWARDING +#endif + +#if defined(__has_feature) + #define BOOST_MOVE_HAS_FEATURE __has_feature +#else + #define BOOST_MOVE_HAS_FEATURE(x) 0 +#endif + +#if BOOST_MOVE_HAS_FEATURE(address_sanitizer) || defined(__SANITIZE_ADDRESS__) + #define BOOST_MOVE_ADDRESS_SANITIZER_ON +#endif + +//Macros for documentation purposes. For code, expands to the argument +#define BOOST_MOVE_IMPDEF(TYPE) TYPE +#define BOOST_MOVE_SEEDOC(TYPE) TYPE +#define BOOST_MOVE_DOC0PTR(TYPE) TYPE +#define BOOST_MOVE_DOC1ST(TYPE1, TYPE2) TYPE2 +#define BOOST_MOVE_I , +#define BOOST_MOVE_DOCIGN(T1) T1 + +#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5) && !defined(__clang__) + //Pre-standard rvalue binding rules + #define BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES +#elif defined(_MSC_VER) && (_MSC_VER == 1600) + //Standard rvalue binding rules but with some bugs + #define BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG + #define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG +#elif defined(_MSC_VER) && (_MSC_VER == 1700) + #define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG +#endif + +#endif //#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP diff --git a/contrib/src/boost/move/iterator.hpp b/contrib/src/boost/move/iterator.hpp new file mode 100644 index 0000000..1b39e26 --- /dev/null +++ b/contrib/src/boost/move/iterator.hpp @@ -0,0 +1,312 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file + +#ifndef BOOST_MOVE_ITERATOR_HPP +#define BOOST_MOVE_ITERATOR_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include +#include + +namespace boost { + +////////////////////////////////////////////////////////////////////////////// +// +// move_iterator +// +////////////////////////////////////////////////////////////////////////////// + +//! Class template move_iterator is an iterator adaptor with the same behavior +//! as the underlying iterator except that its dereference operator implicitly +//! converts the value returned by the underlying iterator's dereference operator +//! to an rvalue reference. Some generic algorithms can be called with move +//! iterators to replace copying with moving. +template +class move_iterator +{ + public: + typedef It iterator_type; + typedef typename boost::movelib::iterator_traits::value_type value_type; + #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_DOXYGEN_INVOKED) + typedef value_type && reference; + #else + typedef typename ::boost::move_detail::if_ + < ::boost::has_move_emulation_enabled + , ::boost::rv& + , value_type & >::type reference; + #endif + typedef It pointer; + typedef typename boost::movelib::iterator_traits::difference_type difference_type; + typedef typename boost::movelib::iterator_traits::iterator_category iterator_category; + + move_iterator() + {} + + explicit move_iterator(It i) + : m_it(i) + {} + + template + move_iterator(const move_iterator& u) + : m_it(u.base()) + {} + + iterator_type base() const + { return m_it; } + + reference operator*() const + { + #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) + return *m_it; + #else + return ::boost::move(*m_it); + #endif + } + + pointer operator->() const + { return m_it; } + + move_iterator& operator++() + { ++m_it; return *this; } + + move_iterator operator++(int) + { move_iterator tmp(*this); ++(*this); return tmp; } + + move_iterator& operator--() + { --m_it; return *this; } + + move_iterator operator--(int) + { move_iterator tmp(*this); --(*this); return tmp; } + + move_iterator operator+ (difference_type n) const + { return move_iterator(m_it + n); } + + move_iterator& operator+=(difference_type n) + { m_it += n; return *this; } + + move_iterator operator- (difference_type n) const + { return move_iterator(m_it - n); } + + move_iterator& operator-=(difference_type n) + { m_it -= n; return *this; } + + reference operator[](difference_type n) const + { + #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) + return m_it[n]; + #else + return ::boost::move(m_it[n]); + #endif + } + + friend bool operator==(const move_iterator& x, const move_iterator& y) + { return x.base() == y.base(); } + + friend bool operator!=(const move_iterator& x, const move_iterator& y) + { return x.base() != y.base(); } + + friend bool operator< (const move_iterator& x, const move_iterator& y) + { return x.base() < y.base(); } + + friend bool operator<=(const move_iterator& x, const move_iterator& y) + { return x.base() <= y.base(); } + + friend bool operator> (const move_iterator& x, const move_iterator& y) + { return x.base() > y.base(); } + + friend bool operator>=(const move_iterator& x, const move_iterator& y) + { return x.base() >= y.base(); } + + friend difference_type operator-(const move_iterator& x, const move_iterator& y) + { return x.base() - y.base(); } + + friend move_iterator operator+(difference_type n, const move_iterator& x) + { return move_iterator(x.base() + n); } + + private: + It m_it; +}; + +//is_move_iterator +namespace move_detail { + +template +struct is_move_iterator +{ + static const bool value = false; +}; + +template +struct is_move_iterator< ::boost::move_iterator > +{ + static const bool value = true; +}; + +} //namespace move_detail { + +////////////////////////////////////////////////////////////////////////////// +// +// move_iterator +// +////////////////////////////////////////////////////////////////////////////// + +//! +//! Returns: move_iterator(i). +template +inline move_iterator make_move_iterator(const It &it) +{ return move_iterator(it); } + +////////////////////////////////////////////////////////////////////////////// +// +// back_move_insert_iterator +// +////////////////////////////////////////////////////////////////////////////// + + +//! A move insert iterator that move constructs elements at the +//! back of a container +template // C models Container +class back_move_insert_iterator +{ + C* container_m; + + public: + typedef C container_type; + typedef typename C::value_type value_type; + typedef typename C::reference reference; + typedef typename C::pointer pointer; + typedef typename C::difference_type difference_type; + typedef std::output_iterator_tag iterator_category; + + explicit back_move_insert_iterator(C& x) : container_m(&x) { } + + back_move_insert_iterator& operator=(reference x) + { container_m->push_back(boost::move(x)); return *this; } + + back_move_insert_iterator& operator=(BOOST_RV_REF(value_type) x) + { reference rx = x; return this->operator=(rx); } + + back_move_insert_iterator& operator*() { return *this; } + back_move_insert_iterator& operator++() { return *this; } + back_move_insert_iterator& operator++(int) { return *this; } +}; + +//! +//! Returns: back_move_insert_iterator(x). +template // C models Container +inline back_move_insert_iterator back_move_inserter(C& x) +{ + return back_move_insert_iterator(x); +} + +////////////////////////////////////////////////////////////////////////////// +// +// front_move_insert_iterator +// +////////////////////////////////////////////////////////////////////////////// + +//! A move insert iterator that move constructs elements int the +//! front of a container +template // C models Container +class front_move_insert_iterator +{ + C* container_m; + +public: + typedef C container_type; + typedef typename C::value_type value_type; + typedef typename C::reference reference; + typedef typename C::pointer pointer; + typedef typename C::difference_type difference_type; + typedef std::output_iterator_tag iterator_category; + + explicit front_move_insert_iterator(C& x) : container_m(&x) { } + + front_move_insert_iterator& operator=(reference x) + { container_m->push_front(boost::move(x)); return *this; } + + front_move_insert_iterator& operator=(BOOST_RV_REF(value_type) x) + { reference rx = x; return this->operator=(rx); } + + front_move_insert_iterator& operator*() { return *this; } + front_move_insert_iterator& operator++() { return *this; } + front_move_insert_iterator& operator++(int) { return *this; } +}; + +//! +//! Returns: front_move_insert_iterator(x). +template // C models Container +inline front_move_insert_iterator front_move_inserter(C& x) +{ + return front_move_insert_iterator(x); +} + +////////////////////////////////////////////////////////////////////////////// +// +// insert_move_iterator +// +////////////////////////////////////////////////////////////////////////////// +template // C models Container +class move_insert_iterator +{ + C* container_m; + typename C::iterator pos_; + + public: + typedef C container_type; + typedef typename C::value_type value_type; + typedef typename C::reference reference; + typedef typename C::pointer pointer; + typedef typename C::difference_type difference_type; + typedef std::output_iterator_tag iterator_category; + + explicit move_insert_iterator(C& x, typename C::iterator pos) + : container_m(&x), pos_(pos) + {} + + move_insert_iterator& operator=(reference x) + { + pos_ = container_m->insert(pos_, ::boost::move(x)); + ++pos_; + return *this; + } + + move_insert_iterator& operator=(BOOST_RV_REF(value_type) x) + { reference rx = x; return this->operator=(rx); } + + move_insert_iterator& operator*() { return *this; } + move_insert_iterator& operator++() { return *this; } + move_insert_iterator& operator++(int) { return *this; } +}; + +//! +//! Returns: move_insert_iterator(x, it). +template // C models Container +inline move_insert_iterator move_inserter(C& x, typename C::iterator it) +{ + return move_insert_iterator(x, it); +} + +} //namespace boost { + +#include + +#endif //#ifndef BOOST_MOVE_ITERATOR_HPP diff --git a/contrib/src/boost/move/move.hpp b/contrib/src/boost/move/move.hpp new file mode 100644 index 0000000..62dddbc --- /dev/null +++ b/contrib/src/boost/move/move.hpp @@ -0,0 +1,35 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright David Abrahams, Vicente Botet 2009. +// (C) Copyright Ion Gaztanaga 2009-2012. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file +//! A general library header that includes +//! the rest of top-level headers. + +#ifndef BOOST_MOVE_MOVE_HPP +#define BOOST_MOVE_MOVE_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include + +#endif //#ifndef BOOST_MOVE_MOVE_HPP diff --git a/contrib/src/boost/move/traits.hpp b/contrib/src/boost/move/traits.hpp new file mode 100644 index 0000000..b48b8f6 --- /dev/null +++ b/contrib/src/boost/move/traits.hpp @@ -0,0 +1,77 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2009-2012. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file + +#ifndef BOOST_MOVE_TRAITS_HPP +#define BOOST_MOVE_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +#include +#endif +#include +#include + +namespace boost { + +//! If this trait yields to true +//! (has_trivial_destructor_after_move <T>::value == true) +//! means that if T is used as argument of a move construction/assignment, +//! there is no need to call T's destructor. +//! This optimization tipically is used to improve containers' performance. +//! +//! By default this trait is true if the type has trivial destructor, +//! every class should specialize this trait if it wants to improve performance +//! when inserted in containers. +template +struct has_trivial_destructor_after_move + : ::boost::move_detail::is_trivially_destructible +{}; + +//! By default this traits returns +//!
boost::is_nothrow_move_constructible::value && boost::is_nothrow_move_assignable::value 
. +//! Classes with non-throwing move constructor +//! and assignment can specialize this trait to obtain some performance improvements. +template +struct has_nothrow_move +{ + static const bool value = boost::move_detail::is_nothrow_move_constructible::value && + boost::move_detail::is_nothrow_move_assignable::value; +}; + +namespace move_detail { + +template +struct is_nothrow_move_constructible_or_uncopyable +{ + //The standard requires is_nothrow_move_constructible for move_if_noexcept + //but a user (usually in C++03) might specialize has_nothrow_move which includes it + static const bool value = is_nothrow_move_constructible::value || + has_nothrow_move::value || + !is_copy_constructible::value; +}; + +} //move_detail { +} //namespace boost { + +#include + +#endif //#ifndef BOOST_MOVE_TRAITS_HPP diff --git a/contrib/src/boost/move/utility.hpp b/contrib/src/boost/move/utility.hpp new file mode 100644 index 0000000..8f9c20b --- /dev/null +++ b/contrib/src/boost/move/utility.hpp @@ -0,0 +1,149 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file +//! This header includes core utilities from and defines +//! some more advanced utilities such as: + +#ifndef BOOST_MOVE_MOVE_UTILITY_HPP +#define BOOST_MOVE_MOVE_UTILITY_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include +#include + +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + namespace boost { + + ////////////////////////////////////////////////////////////////////////////// + // + // move_if_noexcept() + // + ////////////////////////////////////////////////////////////////////////////// + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && !has_move_emulation_enabled::value + , typename ::boost::move_detail::add_const::type & + >::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value + && ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value, rv&>::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { + return *static_cast* >(::boost::move_detail::addressof(x)); + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value + && ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value + , rv& + >::type + move_if_noexcept(rv& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value + && !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value + , typename ::boost::move_detail::add_const::type & + >::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value + && !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value + , typename ::boost::move_detail::add_const::type & + >::type + move_if_noexcept(rv& x) BOOST_NOEXCEPT + { + return x; + } + + } //namespace boost + +#else //#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + #include + + namespace boost{ + + using ::std::move_if_noexcept; + + } //namespace boost + + #else //!BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE + + namespace boost { + + ////////////////////////////////////////////////////////////////////////////// + // + // move_if_noexcept() + // + ////////////////////////////////////////////////////////////////////////////// + #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + //! This function provides a way to convert a reference into a rvalue reference + //! in compilers with rvalue references. For other compilers converts T & into + //! ::boost::rv & so that move emulation is activated. Reference + //! would be converted to rvalue reference only if input type is nothrow move + //! constructible or if it has no copy constructor. In all other cases const + //! reference would be returned + template + rvalue_reference_or_const_lvalue_reference move_if_noexcept(input_reference) noexcept; + + #else //BOOST_MOVE_DOXYGEN_INVOKED + + template + typename ::boost::move_detail::enable_if_c + < ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value, T&&>::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { return ::boost::move(x); } + + template + typename ::boost::move_detail::enable_if_c + < !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value, const T&>::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { return x; } + + #endif //BOOST_MOVE_DOXYGEN_INVOKED + + } //namespace boost { + + #endif //#if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + +#endif //BOOST_NO_CXX11_RVALUE_REFERENCES + +#include + +#endif //#ifndef BOOST_MOVE_MOVE_UTILITY_HPP diff --git a/contrib/src/boost/move/utility_core.hpp b/contrib/src/boost/move/utility_core.hpp new file mode 100644 index 0000000..7fd1ea1 --- /dev/null +++ b/contrib/src/boost/move/utility_core.hpp @@ -0,0 +1,317 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file +//! This header defines core utilities to ease the development +//! of move-aware functions. This header minimizes dependencies +//! from other libraries. + +#ifndef BOOST_MOVE_MOVE_UTILITY_CORE_HPP +#define BOOST_MOVE_MOVE_UTILITY_CORE_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include +#include +#include + +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + namespace boost { + + template + struct enable_move_utility_emulation + { + static const bool value = true; + }; + + ////////////////////////////////////////////////////////////////////////////// + // + // move() + // + ////////////////////////////////////////////////////////////////////////////// + + template + inline typename ::boost::move_detail::enable_if_and + < T & + , enable_move_utility_emulation + , has_move_emulation_disabled + >::type + move(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_and + < rv& + , enable_move_utility_emulation + , has_move_emulation_enabled + >::type + move(T& x) BOOST_NOEXCEPT + { + return *BOOST_MOVE_TO_RV_CAST(::boost::rv*, ::boost::move_detail::addressof(x) ); + } + + template + inline typename ::boost::move_detail::enable_if_and + < rv& + , enable_move_utility_emulation + , has_move_emulation_enabled + >::type + move(rv& x) BOOST_NOEXCEPT + { + return x; + } + + ////////////////////////////////////////////////////////////////////////////// + // + // forward() + // + ////////////////////////////////////////////////////////////////////////////// + + template + inline typename ::boost::move_detail::enable_if_and + < T & + , enable_move_utility_emulation + , ::boost::move_detail::is_rv + >::type + forward(const typename ::boost::move_detail::identity::type &x) BOOST_NOEXCEPT + { + return const_cast(x); + } + + template + inline typename ::boost::move_detail::enable_if_and + < const T & + , enable_move_utility_emulation + , ::boost::move_detail::is_not_rv + >::type + forward(const typename ::boost::move_detail::identity::type &x) BOOST_NOEXCEPT + { + return x; + } + + ////////////////////////////////////////////////////////////////////////////// + // + // move_if_not_lvalue_reference() + // + ////////////////////////////////////////////////////////////////////////////// + + template + inline typename ::boost::move_detail::enable_if_and + < T & + , enable_move_utility_emulation + , ::boost::move_detail::is_rv + >::type + move_if_not_lvalue_reference(const typename ::boost::move_detail::identity::type &x) BOOST_NOEXCEPT + { + return const_cast(x); + } + + template + inline typename ::boost::move_detail::enable_if_and + < typename ::boost::move_detail::add_lvalue_reference::type + , enable_move_utility_emulation + , ::boost::move_detail::is_not_rv + , ::boost::move_detail::or_ + < ::boost::move_detail::is_lvalue_reference + , has_move_emulation_disabled + > + >::type + move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference::type &x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_and + < rv& + , enable_move_utility_emulation + , ::boost::move_detail::is_not_rv + , ::boost::move_detail::and_ + < ::boost::move_detail::not_< ::boost::move_detail::is_lvalue_reference > + , has_move_emulation_enabled + > + >::type + move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference::type &x) BOOST_NOEXCEPT + { + return move(x); + } + + } //namespace boost + +#else //#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + #include + + namespace boost{ + + using ::std::move; + using ::std::forward; + + } //namespace boost + + #else //!BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE + + namespace boost { + + //! This trait's internal boolean `value` is false in compilers with rvalue references + //! and true in compilers without rvalue references. + //! + //! A user can specialize this trait for a type T to false to SFINAE out `move` and `forward` + //! so that the user can define a different move emulation for that type in namespace boost + //! (e.g. another Boost library for its types) and avoid any overload ambiguity. + template + struct enable_move_utility_emulation + { + static const bool value = false; + }; + + ////////////////////////////////////////////////////////////////////////////// + // + // move + // + ////////////////////////////////////////////////////////////////////////////// + + #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + //! This function provides a way to convert a reference into a rvalue reference + //! in compilers with rvalue references. For other compilers if `T` is Boost.Move + //! enabled type then it converts `T&` into ::boost::rv & so that + //! move emulation is activated, else it returns `T &`. + template + rvalue_reference move(input_reference) noexcept; + + #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) + + //Old move approach, lvalues could bind to rvalue references + template + inline typename ::boost::move_detail::remove_reference::type && move(T&& t) BOOST_NOEXCEPT + { return t; } + + #else //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES + + template + inline typename ::boost::move_detail::remove_reference::type && move(T&& t) BOOST_NOEXCEPT + { return static_cast::type &&>(t); } + + #endif //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES + + ////////////////////////////////////////////////////////////////////////////// + // + // forward + // + ////////////////////////////////////////////////////////////////////////////// + + + #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + //! This function provides limited form of forwarding that is usually enough for + //! in-place construction and avoids the exponential overloading for + //! achieve the limited forwarding in C++03. + //! + //! For compilers with rvalue references this function provides perfect forwarding. + //! + //! Otherwise: + //! * If input_reference binds to const ::boost::rv & then it output_reference is + //! ::boost::rv & + //! + //! * Else, output_reference is equal to input_reference. + template output_reference forward(input_reference) noexcept; + #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) + + //Old move approach, lvalues could bind to rvalue references + + template + inline T&& forward(typename ::boost::move_detail::identity::type&& t) BOOST_NOEXCEPT + { return t; } + + #else //Old move + + template + inline T&& forward(typename ::boost::move_detail::remove_reference::type& t) BOOST_NOEXCEPT + { return static_cast(t); } + + template + inline T&& forward(typename ::boost::move_detail::remove_reference::type&& t) BOOST_NOEXCEPT + { + //"boost::forward error: 'T' is a lvalue reference, can't forward as rvalue."; + BOOST_STATIC_ASSERT(!boost::move_detail::is_lvalue_reference::value); + return static_cast(t); + } + + #endif //BOOST_MOVE_DOXYGEN_INVOKED + + ////////////////////////////////////////////////////////////////////////////// + // + // move_if_not_lvalue_reference + // + ////////////////////////////////////////////////////////////////////////////// + + + #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + //! Effects: Calls `boost::move` if `input_reference` is not a lvalue reference. + //! Otherwise returns the reference + template output_reference move_if_not_lvalue_reference(input_reference) noexcept; + #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) + + //Old move approach, lvalues could bind to rvalue references + + template + inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::identity::type&& t) BOOST_NOEXCEPT + { return t; } + + #else //Old move + + template + inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference::type& t) BOOST_NOEXCEPT + { return static_cast(t); } + + template + inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference::type&& t) BOOST_NOEXCEPT + { + //"boost::forward error: 'T' is a lvalue reference, can't forward as rvalue."; + BOOST_STATIC_ASSERT(!boost::move_detail::is_lvalue_reference::value); + return static_cast(t); + } + + #endif //BOOST_MOVE_DOXYGEN_INVOKED + + } //namespace boost { + + #endif //#if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + +#endif //BOOST_NO_CXX11_RVALUE_REFERENCES + +#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + +namespace boost{ +namespace move_detail{ + +template +typename boost::move_detail::add_rvalue_reference::type declval(); + +} //namespace move_detail{ +} //namespace boost{ + +#endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + +#include + +#endif //#ifndef BOOST_MOVE_MOVE_UTILITY_CORE_HPP diff --git a/contrib/src/boost/mpl/always.hpp b/contrib/src/boost/mpl/always.hpp new file mode 100644 index 0000000..5fe7132 --- /dev/null +++ b/contrib/src/boost/mpl/always.hpp @@ -0,0 +1,38 @@ + +#ifndef BOOST_MPL_ALWAYS_HPP_INCLUDED +#define BOOST_MPL_ALWAYS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +namespace boost { namespace mpl { + +template< typename Value > struct always +{ + template< + BOOST_MPL_PP_DEFAULT_PARAMS(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, typename T, na) + > + struct apply + { + typedef Value type; + }; +}; + +BOOST_MPL_AUX_ARITY_SPEC(0, always) + +}} + +#endif // BOOST_MPL_ALWAYS_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/and.hpp b/contrib/src/boost/mpl/and.hpp new file mode 100644 index 0000000..454aaf2 --- /dev/null +++ b/contrib/src/boost/mpl/and.hpp @@ -0,0 +1,60 @@ + +#ifndef BOOST_MPL_AND_HPP_INCLUDED +#define BOOST_MPL_AND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# include +# include +# include +# include + +// agurt, 19/may/04: workaround a conflict with header's +// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(and)' +// has to be checked in a separate condition, otherwise GCC complains +// about 'and' being an alternative token +#if defined(_MSC_VER) && !defined(__clang__) +#ifndef __GCCXML__ +#if defined(and) +# pragma push_macro("and") +# undef and +# define and(x) +#endif +#endif +#endif + +# define BOOST_MPL_PREPROCESSED_HEADER and.hpp +# include + +#if defined(_MSC_VER) && !defined(__clang__) +#ifndef __GCCXML__ +#if defined(and) +# pragma pop_macro("and") +#endif +#endif +#endif + +#else + +# define AUX778076_OP_NAME and_ +# define AUX778076_OP_VALUE1 false +# define AUX778076_OP_VALUE2 true +# include + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AND_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/apply.hpp b/contrib/src/boost/mpl/apply.hpp new file mode 100644 index 0000000..581eb68 --- /dev/null +++ b/contrib/src/boost/mpl/apply.hpp @@ -0,0 +1,229 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_APPLY_HPP_INCLUDED +#define BOOST_MPL_APPLY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER apply.hpp +# include + +#else + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +# define AUX778076_APPLY_PARAMS(param) \ + BOOST_MPL_PP_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + ) \ + /**/ + +# define AUX778076_APPLY_DEF_PARAMS(param, value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + /**/ + +# define AUX778076_APPLY_N_PARAMS(n, param) \ + BOOST_MPL_PP_PARAMS(n, param) \ + /**/ + +# define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_MPL_PP_PARAMS(n, param) \ + /**/ + +# define AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(n, param, def) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ + /**/ + +# define AUX778076_APPLY_N_SPEC_PARAMS(n, param) \ + BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \ + /**/ + + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) +// real C++ version is already taken care of +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +namespace aux { +// apply_count_args +#define AUX778076_COUNT_ARGS_PREFIX apply +#define AUX778076_COUNT_ARGS_DEFAULT na +#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY +#include +} + + +template< + typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na) + > +struct apply + : aux::apply_chooser< + aux::apply_count_args< AUX778076_APPLY_PARAMS(T) >::value + >::template result_< F, AUX778076_APPLY_PARAMS(T) >::type +{ +}; + +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE + +# undef AUX778076_APPLY_N_SPEC_PARAMS +# undef AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS +# undef AUX778076_APPLY_N_COMMA_PARAMS +# undef AUX778076_APPLY_N_PARAMS +# undef AUX778076_APPLY_DEF_PARAMS +# undef AUX778076_APPLY_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_APPLY_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 + +# define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply,i_) +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + : BOOST_PP_CAT(apply_wrap,i_)< + typename lambda::type + AUX778076_APPLY_N_COMMA_PARAMS(i_, T) + > +{ +#else +{ + typedef typename BOOST_PP_CAT(apply_wrap,i_)< + typename lambda::type + AUX778076_APPLY_N_COMMA_PARAMS(i_, T) + >::type type; +#endif + BOOST_MPL_AUX_LAMBDA_SUPPORT( + BOOST_PP_INC(i_) + , BOOST_PP_CAT(apply,i_) + , (F AUX778076_APPLY_N_COMMA_PARAMS(i_,T)) + ) +}; + + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +/// workaround for ETI bug +template<> +struct BOOST_PP_CAT(apply,i_) +{ + typedef int type; +}; +#endif + +# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY +/// primary template (not a specialization!) +template< + typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) + > +struct apply + : BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > +{ +}; +#else +template< + typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) + > +struct apply< F AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(i_, T, na) > + : BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > +{ +}; +#endif + +# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) +namespace aux { + +template<> +struct apply_chooser +{ + template< + typename F, AUX778076_APPLY_PARAMS(typename T) + > + struct result_ + { + typedef BOOST_PP_CAT(apply,i_)< + F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) + > type; + }; +}; + +} // namespace aux +#endif + +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE + +# undef i_ + +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/mpl/apply_fwd.hpp b/contrib/src/boost/mpl/apply_fwd.hpp new file mode 100644 index 0000000..5f5fa78 --- /dev/null +++ b/contrib/src/boost/mpl/apply_fwd.hpp @@ -0,0 +1,107 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_APPLY_FWD_HPP_INCLUDED +#define BOOST_MPL_APPLY_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER apply_fwd.hpp +# include + +#else + +# include +# include +# include +# include +# include + +# include +# include +# include + +// agurt, 15/jan/02: top-level 'apply' template gives an ICE on MSVC +// (for known reasons) +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# define BOOST_MPL_CFG_NO_APPLY_TEMPLATE +#endif + +namespace boost { namespace mpl { + +// local macro, #undef-ined at the end of the header +# define AUX778076_APPLY_DEF_PARAMS(param, value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + /**/ + +# define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_MPL_PP_PARAMS(n, param) \ + /**/ + +# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +// forward declaration +template< + typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na) + > +struct apply; +#else +namespace aux { +template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser; +} +#endif + +# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + + +# undef AUX778076_APPLY_N_COMMA_PARAMS +# undef AUX778076_APPLY_DEF_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_APPLY_FWD_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply,i_); + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/mpl/apply_wrap.hpp b/contrib/src/boost/mpl/apply_wrap.hpp new file mode 100644 index 0000000..b807779 --- /dev/null +++ b/contrib/src/boost/mpl/apply_wrap.hpp @@ -0,0 +1,234 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_APPLY_WRAP_HPP_INCLUDED +#define BOOST_MPL_APPLY_WRAP_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER apply_wrap.hpp +# include + +#else + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +# define AUX778076_APPLY_WRAP_PARAMS(n, param) \ + BOOST_MPL_PP_PARAMS(n, param) \ + /**/ + +# define AUX778076_APPLY_WRAP_SPEC_PARAMS(n, param) \ + BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \ + /**/ + + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + + +# undef AUX778076_APPLY_WRAP_SPEC_PARAMS +# undef AUX778076_APPLY_WRAP_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_APPLY_WRAP_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 + +# define i_ BOOST_PP_FRAME_ITERATION(1) + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// MSVC version + +#define AUX778076_MSVC_DTW_NAME BOOST_PP_CAT(msvc_apply,i_) +#define AUX778076_MSVC_DTW_ORIGINAL_NAME apply +#define AUX778076_MSVC_DTW_ARITY i_ +#include + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap,i_) +{ + // Metafunction forwarding confuses vc6 + typedef typename BOOST_PP_CAT(msvc_apply,i_)::template result_< + AUX778076_APPLY_WRAP_PARAMS(i_, T) + >::type type; +}; + +# elif defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +// MWCW/Borland version + +template< + int N, typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap_impl,i_); + +#define BOOST_PP_ITERATION_PARAMS_2 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY - i_, )) +#include BOOST_PP_ITERATE() + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap,i_) + : BOOST_PP_CAT(apply_wrap_impl,i_)< + ::boost::mpl::aux::arity::value + , F + BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) + >::type +{ +}; + +# else +// ISO98 C++, with minor concession to vc7 + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) +#if i_ == 0 + , typename has_apply_ = typename aux::has_apply::type +#endif + > +struct BOOST_PP_CAT(apply_wrap,i_) +// metafunction forwarding confuses MSVC 7.0 +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1300) + : F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) > +{ +#else +{ + typedef typename F::template apply< + AUX778076_APPLY_WRAP_PARAMS(i_, T) + >::type type; +#endif +}; + +#if i_ == 0 && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +template< typename F > +struct BOOST_PP_CAT(apply_wrap,i_) + : F::apply +{ +}; +#endif + +# endif // workarounds + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +/// workaround for ETI bug +template<> +struct BOOST_PP_CAT(apply_wrap,i_) +{ + typedef int type; +}; +#endif + +# undef i_ + +///// iteration, depth == 2 + +#elif BOOST_PP_ITERATION_DEPTH() == 2 + +# define j_ BOOST_PP_FRAME_ITERATION(2) + +#if i_ == 0 && j_ == 0 \ + && defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) \ + && !defined(BOOST_MPL_CFG_NO_HAS_APPLY) + +template< typename F, bool F_has_apply > +struct apply_wrap_impl0_bcb { + typedef typename F::template apply< na > type; +}; + +template< typename F > +struct apply_wrap_impl0_bcb< F, true > { + typedef typename F::apply type; +}; + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap_impl,i_)< + BOOST_MPL_PP_ADD(i_, j_) + , F + BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) + > +{ + typedef apply_wrap_impl0_bcb< F, aux::has_apply< F >::value >::type type; +}; +#else + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap_impl,i_)< + BOOST_MPL_PP_ADD(i_, j_) + , F + BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) + > +{ + typedef typename F::template apply< + AUX778076_APPLY_WRAP_PARAMS(i_, T) +#if i_ == 0 && j_ == 0 +/// since the defaults are "lost", we have to pass *something* even for nullary +/// metafunction classes + na +#else + BOOST_PP_COMMA_IF(BOOST_PP_AND(i_, j_)) BOOST_MPL_PP_ENUM(j_, na) +#endif + > type; +}; + +#endif + +# undef j_ + +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/mpl/arg.hpp b/contrib/src/boost/mpl/arg.hpp new file mode 100644 index 0000000..f51adfa --- /dev/null +++ b/contrib/src/boost/mpl/arg.hpp @@ -0,0 +1,131 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_ARG_HPP_INCLUDED +#define BOOST_MPL_ARG_HPP_INCLUDED + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +#endif + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER arg.hpp +# include + +#else + +# include +# include +# include +# include +# include +# include + +# include +# include +# include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +// local macro, #undef-ined at the end of the header +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + /**/ +#else +# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ + BOOST_MPL_PP_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + ) \ + /**/ +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + + +# undef AUX778076_ARG_N_DEFAULT_PARAMS + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_ARG_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +#if i_ > 0 + +template<> struct arg +{ + BOOST_STATIC_CONSTANT(int, value = i_); + typedef arg next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) + > + struct apply + { + typedef BOOST_PP_CAT(U,i_) type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +#else + +template<> struct arg<-1> +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +#endif // i_ > 0 + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/mpl/arg_fwd.hpp b/contrib/src/boost/mpl/arg_fwd.hpp new file mode 100644 index 0000000..7346dc3 --- /dev/null +++ b/contrib/src/boost/mpl/arg_fwd.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_ARG_FWD_HPP_INCLUDED +#define BOOST_MPL_ARG_FWD_HPP_INCLUDED + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arg; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(arg) + +#endif // BOOST_MPL_ARG_FWD_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/assert.hpp b/contrib/src/boost/mpl/assert.hpp new file mode 100644 index 0000000..4d860a4 --- /dev/null +++ b/contrib/src/boost/mpl/assert.hpp @@ -0,0 +1,439 @@ + +#ifndef BOOST_MPL_ASSERT_HPP_INCLUDED +#define BOOST_MPL_ASSERT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include // make sure 'size_t' is placed into 'std' +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) +#include +#endif + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + || (BOOST_MPL_CFG_GCC != 0) \ + || BOOST_WORKAROUND(__IBMCPP__, <= 600) +# define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES +#endif + +#if BOOST_WORKAROUND(__MWERKS__, < 0x3202) \ + || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +# define BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER +#endif + +// agurt, 10/nov/06: use enums for Borland (which cannot cope with static constants) +// and GCC (which issues "unused variable" warnings when static constants are used +// at a function scope) +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + || (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0) +# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr } +#else +# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr) +#endif + + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +struct failed {}; + +// agurt, 24/aug/04: MSVC 7.1 workaround here and below: return/accept +// 'assert' by reference; can't apply it unconditionally -- apparently it +// degrades the quality of GCC diagnostics +#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) +# define AUX778076_ASSERT_ARG(x) x& +#else +# define AUX778076_ASSERT_ARG(x) x +#endif + +template< bool C > struct assert { typedef void* type; }; +template<> struct assert { typedef AUX778076_ASSERT_ARG(assert) type; }; + +template< bool C > +int assertion_failed( typename assert::type ); + +template< bool C > +struct assertion +{ + static int failed( assert ); +}; + +template<> +struct assertion +{ + static int failed( void* ); +}; + +struct assert_ +{ +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) + template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {}; +#endif + static assert_ const arg; + enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal }; +}; + + +#if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) + +bool operator==( failed, failed ); +bool operator!=( failed, failed ); +bool operator>( failed, failed ); +bool operator>=( failed, failed ); +bool operator<( failed, failed ); +bool operator<=( failed, failed ); + +#if defined(__EDG_VERSION__) +template< bool (*)(failed, failed), long x, long y > struct assert_relation {}; +# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation +#else +template< BOOST_MPL_AUX_NTTP_DECL(long, x), BOOST_MPL_AUX_NTTP_DECL(long, y), bool (*)(failed, failed) > +struct assert_relation {}; +# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation +#endif + +#else // BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES + +boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ ); +boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ ); +boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ ); +boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ ); +boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ ); +boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ ); + +template< assert_::relations r, long x, long y > struct assert_relation {}; + +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) + +template +struct extract_assert_pred; + +template +struct extract_assert_pred { typedef Pred type; }; + +template +struct eval_assert { + typedef typename extract_assert_pred::type P; + typedef typename P::type p_type; + typedef typename ::boost::mpl::if_c), + failed ************ P::************ + >::type type; +}; + +template +struct eval_assert_not { + typedef typename extract_assert_pred::type P; + typedef typename P::type p_type; + typedef typename ::boost::mpl::if_c), + failed ************ ::boost::mpl::not_

::************ + >::type type; +}; + +template< typename T > +T make_assert_arg(); + +#elif !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) + +template< bool > struct assert_arg_pred_impl { typedef int type; }; +template<> struct assert_arg_pred_impl { typedef void* type; }; + +template< typename P > struct assert_arg_pred +{ + typedef typename P::type p_type; + typedef typename assert_arg_pred_impl< p_type::value >::type type; +}; + +template< typename P > struct assert_arg_pred_not +{ + typedef typename P::type p_type; + BOOST_MPL_AUX_ASSERT_CONSTANT( bool, p = !p_type::value ); + typedef typename assert_arg_pred_impl

::type fun( const P& p ) + { + return p.first; + } + }; + + ////////////////////////////////////////////////////////////////////// + // array + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_begin + { + template + static BOOST_RANGE_DEDUCED_TYPENAME range_value::type* fun(T& t) + { + return t; + } + }; + + } // namespace 'range_detail' + + namespace range_adl_barrier + { + template< typename C > + inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type + begin( C& c ) + { + return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); + } + } +} // namespace 'boost' + + +#endif diff --git a/contrib/src/boost/range/detail/common.hpp b/contrib/src/boost/range/detail/common.hpp new file mode 100644 index 0000000..00b665b --- /dev/null +++ b/contrib/src/boost/range/detail/common.hpp @@ -0,0 +1,118 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_COMMON_HPP +#define BOOST_RANGE_DETAIL_COMMON_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// +// missing partial specialization workaround. +////////////////////////////////////////////////////////////////////////////// + +namespace boost +{ + namespace range_detail + { + // 1 = std containers + // 2 = std::pair + // 3 = const std::pair + // 4 = array + // 5 = const array + // 6 = char array + // 7 = wchar_t array + // 8 = char* + // 9 = const char* + // 10 = whar_t* + // 11 = const wchar_t* + // 12 = string + + typedef mpl::int_<1>::type std_container_; + typedef mpl::int_<2>::type std_pair_; + typedef mpl::int_<3>::type const_std_pair_; + typedef mpl::int_<4>::type array_; + typedef mpl::int_<5>::type const_array_; + typedef mpl::int_<6>::type char_array_; + typedef mpl::int_<7>::type wchar_t_array_; + typedef mpl::int_<8>::type char_ptr_; + typedef mpl::int_<9>::type const_char_ptr_; + typedef mpl::int_<10>::type wchar_t_ptr_; + typedef mpl::int_<11>::type const_wchar_t_ptr_; + typedef mpl::int_<12>::type string_; + + template< typename C > + struct range_helper + { + static C* c; + static C ptr; + + BOOST_STATIC_CONSTANT( bool, is_pair_ = sizeof( boost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_char_ptr_ = sizeof( boost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_const_char_ptr_ = sizeof( boost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_wchar_t_ptr_ = sizeof( boost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_const_wchar_t_ptr_ = sizeof( boost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_char_array_ = sizeof( boost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_wchar_t_array_ = sizeof( boost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_string_ = (boost::mpl::or_, boost::mpl::bool_ >::value )); + BOOST_STATIC_CONSTANT( bool, is_array_ = boost::is_array::value ); + + }; + + template< typename C > + class range + { + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_pair_, + boost::range_detail::std_pair_, + void >::type pair_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_array_, + boost::range_detail::array_, + pair_t >::type array_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_string_, + boost::range_detail::string_, + array_t >::type string_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_char_ptr_, + boost::range_detail::const_char_ptr_, + string_t >::type const_char_ptr_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_ptr_, + boost::range_detail::char_ptr_, + const_char_ptr_t >::type char_ptr_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_wchar_t_ptr_, + boost::range_detail::const_wchar_t_ptr_, + char_ptr_t >::type const_wchar_ptr_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_ptr_, + boost::range_detail::wchar_t_ptr_, + const_wchar_ptr_t >::type wchar_ptr_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_array_, + boost::range_detail::wchar_t_array_, + wchar_ptr_t >::type wchar_array_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_array_, + boost::range_detail::char_array_, + wchar_array_t >::type char_array_t; + public: + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::is_void::value, + boost::range_detail::std_container_, + char_array_t >::type type; + }; // class 'range' + } +} + +#endif + diff --git a/contrib/src/boost/range/detail/detail_str.hpp b/contrib/src/boost/range/detail/detail_str.hpp new file mode 100644 index 0000000..5ef7a34 --- /dev/null +++ b/contrib/src/boost/range/detail/detail_str.hpp @@ -0,0 +1,376 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_DETAIL_STR_HPP +#define BOOST_RANGE_DETAIL_DETAIL_STR_HPP + +#include // BOOST_MSVC +#include + +namespace boost +{ + + namespace range_detail + { + // + // iterator + // + + template<> + struct range_iterator_ + { + template< typename T > + struct pts + { + typedef BOOST_RANGE_DEDUCED_TYPENAME + remove_extent::type* type; + }; + }; + + template<> + struct range_iterator_ + { + template< typename S > + struct pts + { + typedef char* type; + }; + }; + + template<> + struct range_iterator_ + { + template< typename S > + struct pts + { + typedef const char* type; + }; + }; + + template<> + struct range_iterator_ + { + template< typename S > + struct pts + { + typedef wchar_t* type; + }; + }; + + template<> + struct range_iterator_ + { + template< typename S > + struct pts + { + typedef const wchar_t* type; + }; + }; + + + // + // const iterator + // + + template<> + struct range_const_iterator_ + { + template< typename T > + struct pts + { + typedef const BOOST_RANGE_DEDUCED_TYPENAME + remove_extent::type* type; + }; + }; + + template<> + struct range_const_iterator_ + { + template< typename S > + struct pts + { + typedef const char* type; + }; + }; + + template<> + struct range_const_iterator_ + { + template< typename S > + struct pts + { + typedef const char* type; + }; + }; + + template<> + struct range_const_iterator_ + { + template< typename S > + struct pts + { + typedef const wchar_t* type; + }; + }; + + template<> + struct range_const_iterator_ + { + template< typename S > + struct pts + { + typedef const wchar_t* type; + }; + }; + } +} + +#include +#include +#include +#include +#include + +namespace boost +{ + + namespace range_detail + { + // + // str_begin() + // + template<> + struct range_begin + { + static char* fun( char* s ) + { + return s; + } + }; + + template<> + struct range_begin + { + static const char* fun( const char* s ) + { + return s; + } + }; + + template<> + struct range_begin + { + + static wchar_t* fun( wchar_t* s ) + { + return s; + } + }; + + template<> + struct range_begin + { + static const wchar_t* fun( const wchar_t* s ) + { + return s; + } + }; + + template< typename C > + inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type + str_begin( C& c ) + { + return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME + range_detail::range::type >::fun( c ); + } + + // + // str_end() + // + + template<> + struct range_end + { + template< typename T, std::size_t sz > + static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] ) + { + return boost::range_detail::array_end( boost_range_array ); + } + }; + + template<> + struct range_end + { + template< typename T, std::size_t sz > + static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] ) + { + return boost::range_detail::array_end( boost_range_array ); + } + }; + + template<> + struct range_end + { + static char* fun( char* s ) + { + return boost::range_detail::str_end( s ); + } + }; + + template<> + struct range_end + { + static const char* fun( const char* s ) + { + return boost::range_detail::str_end( s ); + } + }; + + template<> + struct range_end + { + static wchar_t* fun( wchar_t* s ) + { + return boost::range_detail::str_end( s ); + } + }; + + + template<> + struct range_end + { + static const wchar_t* fun( const wchar_t* s ) + { + return boost::range_detail::str_end( s ); + } + }; + + template< typename C > + inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type + str_end( C& c ) + { + return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME + range_detail::range::type >::fun( c ); + } + + // + // size_type + // + + template<> + struct range_size_type_ + { + template< typename A > + struct pts + { + typedef std::size_t type; + }; + }; + + template<> + struct range_size_type_ + { + template< typename S > + struct pts + { + typedef std::size_t type; + }; + }; + + template<> + struct range_size_type_ + { + template< typename S > + struct pts + { + typedef std::size_t type; + }; + }; + + template<> + struct range_size_type_ + { + template< typename S > + struct pts + { + typedef std::size_t type; + }; + }; + + template<> + struct range_size_type_ + { + template< typename S > + struct pts + { + typedef std::size_t type; + }; + }; + + // + // value_type + // + + template<> + struct range_value_type_ + { + template< typename T > + struct pts + { + typedef char type; + }; + }; + + template<> + struct range_value_type_ + { + template< typename S > + struct pts + { + typedef char type; + }; + }; + + template<> + struct range_value_type_ + { + template< typename S > + struct pts + { + typedef const char type; + }; + }; + + template<> + struct range_value_type_ + { + template< typename S > + struct pts + { + typedef wchar_t type; + }; + }; + + template<> + struct range_value_type_ + { + template< typename S > + struct pts + { + typedef const wchar_t type; + }; + }; + + } // namespace 'range_detail' + +} // namespace 'boost' + + +#endif diff --git a/contrib/src/boost/range/detail/end.hpp b/contrib/src/boost/range/detail/end.hpp new file mode 100644 index 0000000..f2f7178 --- /dev/null +++ b/contrib/src/boost/range/detail/end.hpp @@ -0,0 +1,86 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_END_HPP +#define BOOST_RANGE_DETAIL_END_HPP + +#include // BOOST_MSVC +#include + +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + template< typename T > + struct range_end; + + ////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_end + { + template< typename C > + static BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type + fun( C& c ) + { + return c.end(); + }; + }; + + ////////////////////////////////////////////////////////////////////// + // pair + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_end + { + template< typename P > + static BOOST_RANGE_DEDUCED_TYPENAME range_iterator

::type + fun( const P& p ) + { + return p.second; + } + }; + + ////////////////////////////////////////////////////////////////////// + // array + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_end + { + template + static BOOST_RANGE_DEDUCED_TYPENAME remove_extent::type* fun(T& t) + { + return t + remove_extent::size; + } + }; + + } // namespace 'range_detail' + + namespace range_adl_barrier + { + template< typename C > + inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type + end( C& c ) + { + return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); + } + } // namespace range_adl_barrier + +} // namespace 'boost' + +#endif diff --git a/contrib/src/boost/range/detail/extract_optional_type.hpp b/contrib/src/boost/range/detail/extract_optional_type.hpp new file mode 100644 index 0000000..0381434 --- /dev/null +++ b/contrib/src/boost/range/detail/extract_optional_type.hpp @@ -0,0 +1,48 @@ +// Boost.Range library +// +// Copyright Arno Schoedl & Neil Groves 2009. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED +#define BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) + +// Defines extract_some_typedef which exposes T::some_typedef as +// extract_some_typedef::type if T::some_typedef exists. Otherwise +// extract_some_typedef is empty. +#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \ + BOOST_MPL_HAS_XXX_TRAIT_DEF(a_typedef) \ + template< typename C, bool B = BOOST_PP_CAT(has_, a_typedef)::value > \ + struct BOOST_PP_CAT(extract_, a_typedef) \ + {}; \ + template< typename C > \ + struct BOOST_PP_CAT(extract_, a_typedef)< C, true > \ + { \ + typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \ + }; + +#else + +#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \ + template< typename C > \ + struct BOOST_PP_CAT(extract_, a_typedef) \ + { \ + typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \ + }; + +#endif + +#endif // include guard diff --git a/contrib/src/boost/range/detail/has_member_size.hpp b/contrib/src/boost/range/detail/has_member_size.hpp new file mode 100644 index 0000000..0c639aa --- /dev/null +++ b/contrib/src/boost/range/detail/has_member_size.hpp @@ -0,0 +1,66 @@ +// Boost.Range library +// +// Copyright Neil Groves 2014. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_DETAIL_HAS_MEMBER_SIZE_HPP +#define BOOST_RANGE_DETAIL_HAS_MEMBER_SIZE_HPP + +#include +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + +template +class has_member_size_impl +{ +private: + template + class check + { + }; + + template + static boost::uint8_t f(check*); + + template + static boost::uint16_t f(...); + +public: + static const bool value = + (sizeof(f(0)) == sizeof(boost::uint8_t)); + + typedef typename mpl::if_c< + (sizeof(f(0)) == sizeof(boost::uint8_t)), + mpl::true_, + mpl::false_ + >::type type; +}; + +template +struct has_member_size +{ + typedef typename mpl::and_< + typename is_class::type, + typename has_member_size_impl::type + >::type type; + + static const bool value = + is_class::value && has_member_size_impl::value; +}; + + } // namespace range_detail +}// namespace boost + +#endif // include guard diff --git a/contrib/src/boost/range/detail/implementation_help.hpp b/contrib/src/boost/range/detail/implementation_help.hpp new file mode 100644 index 0000000..f35953f --- /dev/null +++ b/contrib/src/boost/range/detail/implementation_help.hpp @@ -0,0 +1,114 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_IMPLEMENTATION_HELP_HPP +#define BOOST_RANGE_DETAIL_IMPLEMENTATION_HELP_HPP + +#include +#include +#include +#include +#include + +#ifndef BOOST_NO_CWCHAR +#include +#endif + +namespace boost +{ + namespace range_detail + { + template + inline void boost_range_silence_warning( const T& ) { } + + ///////////////////////////////////////////////////////////////////// + // end() help + ///////////////////////////////////////////////////////////////////// + + inline const char* str_end( const char* s, const char* ) + { + return s + strlen( s ); + } + +#ifndef BOOST_NO_CWCHAR + inline const wchar_t* str_end( const wchar_t* s, const wchar_t* ) + { + return s + wcslen( s ); + } +#else + inline const wchar_t* str_end( const wchar_t* s, const wchar_t* ) + { + if( s == 0 || s[0] == 0 ) + return s; + while( *++s != 0 ) + ; + return s; + } +#endif + + template< class Char > + inline Char* str_end( Char* s ) + { + return const_cast( str_end( s, s ) ); + } + + template< class T, std::size_t sz > + inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz] ) + { + return boost_range_array + sz; + } + + template< class T, std::size_t sz > + inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz] ) + { + return boost_range_array + sz; + } + + ///////////////////////////////////////////////////////////////////// + // size() help + ///////////////////////////////////////////////////////////////////// + + template< class Char > + inline std::size_t str_size( const Char* const& s ) + { + return str_end( s ) - s; + } + + template< class T, std::size_t sz > + inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz] ) + { + boost_range_silence_warning( boost_range_array ); + return sz; + } + + template< class T, std::size_t sz > + inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[sz] ) + { + boost_range_silence_warning( boost_range_array ); + return sz; + } + + inline bool is_same_address(const void* l, const void* r) + { + return l == r; + } + + template + inline bool is_same_object(const T1& l, const T2& r) + { + return range_detail::is_same_address(&l, &r); + } + + } // namespace 'range_detail' + +} // namespace 'boost' + + +#endif diff --git a/contrib/src/boost/range/detail/misc_concept.hpp b/contrib/src/boost/range/detail/misc_concept.hpp new file mode 100644 index 0000000..74cb919 --- /dev/null +++ b/contrib/src/boost/range/detail/misc_concept.hpp @@ -0,0 +1,33 @@ +// Boost.Range library concept checks +// +// Copyright Neil Groves 2009. Use, modification and distribution +// are subject to the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED +#define BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED + +#include + +namespace boost +{ + namespace range_detail + { + template + class SameTypeConcept + { + public: + BOOST_CONCEPT_USAGE(SameTypeConcept) + { + same_type(a,b); + } + private: + template void same_type(T,T) {} + T1 a; + T2 b; + }; + } +} + +#endif // include guard diff --git a/contrib/src/boost/range/detail/msvc_has_iterator_workaround.hpp b/contrib/src/boost/range/detail/msvc_has_iterator_workaround.hpp new file mode 100644 index 0000000..62b67fd --- /dev/null +++ b/contrib/src/boost/range/detail/msvc_has_iterator_workaround.hpp @@ -0,0 +1,132 @@ +// Boost.Range library +// +// Copyright Eric Niebler 2014. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_MSVC_HAS_ITERATOR_WORKAROUND_HPP +#define BOOST_RANGE_DETAIL_MSVC_HAS_ITERATOR_WORKAROUND_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#ifndef BOOST_RANGE_MUTABLE_ITERATOR_HPP +# error This file should only be included from +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) +namespace boost +{ +namespace cb_details +{ + template + struct iterator; +} + +namespace python +{ + template + struct iterator; +} + +namespace type_erasure +{ + template< + class Traversal, + class T /*= _self*/, + class Reference /*= ::boost::use_default*/, + class DifferenceType /*= ::std::ptrdiff_t*/, + class ValueType /*= typename deduced >::type*/ + > + struct iterator; +} + +namespace unordered { namespace iterator_detail +{ + template + struct iterator; +}} + +namespace container { namespace container_detail +{ + template + class iterator; +}} + +namespace spirit { namespace lex { namespace lexertl +{ + template + class iterator; +}}} + +namespace range_detail +{ + template + struct has_iterator< ::boost::cb_details::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::cb_details::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::python::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::python::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::type_erasure::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::type_erasure::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::unordered::iterator_detail::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::unordered::iterator_detail::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::container::container_detail::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::container::container_detail::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::spirit::lex::lexertl::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::spirit::lex::lexertl::iterator const> + : mpl::false_ + {}; +} +} +#endif +#endif diff --git a/contrib/src/boost/range/detail/remove_extent.hpp b/contrib/src/boost/range/detail/remove_extent.hpp new file mode 100644 index 0000000..68e4597 --- /dev/null +++ b/contrib/src/boost/range/detail/remove_extent.hpp @@ -0,0 +1,157 @@ +// Boost.Range library +// +// Copyright Jonathan Turkanis 2005. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + + +#ifndef BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP +#define BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP + +#include // MSVC, NO_INTRINSIC_WCHAR_T, put size_t in std. +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + + template< typename Case1 = mpl::true_, + typename Type1 = mpl::void_, + typename Case2 = mpl::true_, + typename Type2 = mpl::void_, + typename Case3 = mpl::true_, + typename Type3 = mpl::void_, + typename Case4 = mpl::true_, + typename Type4 = mpl::void_, + typename Case5 = mpl::true_, + typename Type5 = mpl::void_, + typename Case6 = mpl::true_, + typename Type6 = mpl::void_, + typename Case7 = mpl::true_, + typename Type7 = mpl::void_, + typename Case8 = mpl::true_, + typename Type8 = mpl::void_, + typename Case9 = mpl::true_, + typename Type9 = mpl::void_, + typename Case10 = mpl::true_, + typename Type10 = mpl::void_, + typename Case11 = mpl::true_, + typename Type11 = mpl::void_, + typename Case12 = mpl::true_, + typename Type12 = mpl::void_, + typename Case13 = mpl::true_, + typename Type13 = mpl::void_, + typename Case14 = mpl::true_, + typename Type14 = mpl::void_, + typename Case15 = mpl::true_, + typename Type15 = mpl::void_, + typename Case16 = mpl::true_, + typename Type16 = mpl::void_, + typename Case17 = mpl::true_, + typename Type17 = mpl::void_, + typename Case18 = mpl::true_, + typename Type18 = mpl::void_, + typename Case19 = mpl::true_, + typename Type19 = mpl::void_, + typename Case20 = mpl::true_, + typename Type20 = mpl::void_> + struct select { + typedef typename + mpl::eval_if< + Case1, mpl::identity, mpl::eval_if< + Case2, mpl::identity, mpl::eval_if< + Case3, mpl::identity, mpl::eval_if< + Case4, mpl::identity, mpl::eval_if< + Case5, mpl::identity, mpl::eval_if< + Case6, mpl::identity, mpl::eval_if< + Case7, mpl::identity, mpl::eval_if< + Case8, mpl::identity, mpl::eval_if< + Case9, mpl::identity, mpl::if_< + Case10, Type10, mpl::void_ > > > > > > > > > + >::type result1; + typedef typename + mpl::eval_if< + Case11, mpl::identity, mpl::eval_if< + Case12, mpl::identity, mpl::eval_if< + Case13, mpl::identity, mpl::eval_if< + Case14, mpl::identity, mpl::eval_if< + Case15, mpl::identity, mpl::eval_if< + Case16, mpl::identity, mpl::eval_if< + Case17, mpl::identity, mpl::eval_if< + Case18, mpl::identity, mpl::eval_if< + Case19, mpl::identity, mpl::if_< + Case20, Type20, mpl::void_ > > > > > > > > > + > result2; + typedef typename + mpl::eval_if< + is_same, + result2, + mpl::identity + >::type type; + }; + + template + struct remove_extent { + static T* ar; + BOOST_STATIC_CONSTANT(std::size_t, size = sizeof(*ar) / sizeof((*ar)[0])); + + typedef typename + select< + is_same, bool, + is_same, char, + is_same, signed char, + is_same, unsigned char, + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + is_same, wchar_t, + #endif + is_same, short, + is_same, unsigned short, + is_same, int, + is_same, unsigned int, + is_same, long, + is_same, unsigned long, + is_same, float, + is_same, double, + is_same, long double + >::type result1; + typedef typename + select< + is_same, const bool, + is_same, const char, + is_same, const signed char, + is_same, const unsigned char, + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + is_same, const wchar_t, + #endif + is_same, const short, + is_same, const unsigned short, + is_same, const int, + is_same, const unsigned int, + is_same, const long, + is_same, const unsigned long, + is_same, const float, + is_same, const double, + is_same, const long double + > result2; + typedef typename + mpl::eval_if< + is_same, + result2, + mpl::identity + >::type type; + }; + + } // namespace 'range_detail' + +} // namespace 'boost' + + +#endif diff --git a/contrib/src/boost/range/detail/safe_bool.hpp b/contrib/src/boost/range/detail/safe_bool.hpp new file mode 100644 index 0000000..182e510 --- /dev/null +++ b/contrib/src/boost/range/detail/safe_bool.hpp @@ -0,0 +1,72 @@ +// This header intentionally has no include guards. +// +// Copyright (c) 2010 Neil Groves +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// This code utilises the experience gained during the evolution of +// +#ifndef BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP +#define BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP + +#include +#include + +namespace boost +{ + namespace range_detail + { + +template +class safe_bool +{ +public: + typedef safe_bool this_type; + +#if (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570)) || defined(__CINT_) + typedef bool unspecified_bool_type; + static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr) + { + return x; + } +#elif defined(_MANAGED) + static void unspecified_bool(this_type***) + { + } + typedef void(*unspecified_bool_type)(this_type***); + static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr) + { + return x ? unspecified_bool : 0; + } +#elif \ + ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \ + ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \ + ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) ) + + typedef bool (this_type::*unspecified_bool_type)() const; + + static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr) + { + return x ? &this_type::detail_safe_bool_member_fn : 0; + } +private: + bool detail_safe_bool_member_fn() const { return false; } +#else + typedef DataMemberPtr unspecified_bool_type; + static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr p) + { + return x ? p : 0; + } +#endif +private: + safe_bool(); + safe_bool(const safe_bool&); + void operator=(const safe_bool&); + ~safe_bool(); +}; + + } // namespace range_detail +} // namespace boost + +#endif // include guard diff --git a/contrib/src/boost/range/detail/sfinae.hpp b/contrib/src/boost/range/detail/sfinae.hpp new file mode 100644 index 0000000..5b2c61e --- /dev/null +++ b/contrib/src/boost/range/detail/sfinae.hpp @@ -0,0 +1,77 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_SFINAE_HPP +#define BOOST_RANGE_DETAIL_SFINAE_HPP + +#include +#include +#include +#include + + +namespace boost +{ + namespace range_detail + { + using type_traits::yes_type; + using type_traits::no_type; + + ////////////////////////////////////////////////////////////////////// + // string + ////////////////////////////////////////////////////////////////////// + + yes_type is_string_impl( const char* const ); + yes_type is_string_impl( const wchar_t* const ); + no_type is_string_impl( ... ); + + template< std::size_t sz > + yes_type is_char_array_impl( char BOOST_RANGE_ARRAY_REF()[sz] ); + template< std::size_t sz > + yes_type is_char_array_impl( const char BOOST_RANGE_ARRAY_REF()[sz] ); + no_type is_char_array_impl( ... ); + + template< std::size_t sz > + yes_type is_wchar_t_array_impl( wchar_t BOOST_RANGE_ARRAY_REF()[sz] ); + template< std::size_t sz > + yes_type is_wchar_t_array_impl( const wchar_t BOOST_RANGE_ARRAY_REF()[sz] ); + no_type is_wchar_t_array_impl( ... ); + + yes_type is_char_ptr_impl( char* const ); + no_type is_char_ptr_impl( ... ); + + yes_type is_const_char_ptr_impl( const char* const ); + no_type is_const_char_ptr_impl( ... ); + + yes_type is_wchar_t_ptr_impl( wchar_t* const ); + no_type is_wchar_t_ptr_impl( ... ); + + yes_type is_const_wchar_t_ptr_impl( const wchar_t* const ); + no_type is_const_wchar_t_ptr_impl( ... ); + + ////////////////////////////////////////////////////////////////////// + // pair + ////////////////////////////////////////////////////////////////////// + + template< typename Iterator > + yes_type is_pair_impl( const std::pair* ); + no_type is_pair_impl( ... ); + + ////////////////////////////////////////////////////////////////////// + // tags + ////////////////////////////////////////////////////////////////////// + + struct char_or_wchar_t_array_tag {}; + + } // namespace 'range_detail' + +} // namespace 'boost' + +#endif diff --git a/contrib/src/boost/range/detail/size_type.hpp b/contrib/src/boost/range/detail/size_type.hpp new file mode 100644 index 0000000..78a60a4 --- /dev/null +++ b/contrib/src/boost/range/detail/size_type.hpp @@ -0,0 +1,55 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_SIZE_TYPE_HPP +#define BOOST_RANGE_DETAIL_SIZE_TYPE_HPP + +#include + +////////////////////////////////////////////////////////////////////////////// +// missing partial specialization workaround. +////////////////////////////////////////////////////////////////////////////// + +namespace boost +{ + namespace range_detail + { + template< typename T > + struct range_size_type_ + { + template< typename C > + struct pts + { + typedef std::size_t type; + }; + }; + + template<> + struct range_size_type_ + { + template< typename C > + struct pts + { + typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type; + }; + }; + } + + template< typename C > + class range_size + { + typedef typename range_detail::range::type c_type; + public: + typedef typename range_detail::range_size_type_::BOOST_NESTED_TEMPLATE pts::type type; + }; +} + +#endif + diff --git a/contrib/src/boost/range/detail/str_types.hpp b/contrib/src/boost/range/detail/str_types.hpp new file mode 100644 index 0000000..f8cab19 --- /dev/null +++ b/contrib/src/boost/range/detail/str_types.hpp @@ -0,0 +1,38 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2006. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_STR_TYPES_HPP +#define BOOST_RANGE_DETAIL_STR_TYPES_HPP + +#include +#include + +namespace boost +{ + template< class T > + struct range_mutable_iterator + { + typedef T* type; + }; + + template< class T > + struct range_const_iterator + { + typedef const T* type; + }; + + template< class T > + struct range_size + { + typedef std::size_t type; + }; +} + +#endif diff --git a/contrib/src/boost/range/detail/value_type.hpp b/contrib/src/boost/range/detail/value_type.hpp new file mode 100644 index 0000000..2784514 --- /dev/null +++ b/contrib/src/boost/range/detail/value_type.hpp @@ -0,0 +1,72 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_VALUE_TYPE_HPP +#define BOOST_RANGE_DETAIL_VALUE_TYPE_HPP + +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// +// missing partial specialization workaround. +////////////////////////////////////////////////////////////////////////////// + +namespace boost +{ + namespace range_detail + { + template< typename T > + struct range_value_type_; + + template<> + struct range_value_type_ + { + template< typename C > + struct pts + { + typedef BOOST_RANGE_DEDUCED_TYPENAME C::value_type type; + }; + }; + + template<> + struct range_value_type_ + { + template< typename P > + struct pts + { + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::iterator_value< BOOST_RANGE_DEDUCED_TYPENAME P::first_type >::type type; + }; + }; + + template<> + struct range_value_type_ + { + template< typename T > + struct pts + { + typedef BOOST_DEDUCED_TYPENAME remove_extent::type type; + }; + }; + + } + + template< typename C > + class range_value + { + typedef BOOST_DEDUCED_TYPENAME range_detail::range::type c_type; + public: + typedef BOOST_DEDUCED_TYPENAME range_detail::range_value_type_::BOOST_NESTED_TEMPLATE pts::type type; + }; + +} + +#endif + diff --git a/contrib/src/boost/range/difference_type.hpp b/contrib/src/boost/range/difference_type.hpp new file mode 100644 index 0000000..6bb3c5f --- /dev/null +++ b/contrib/src/boost/range/difference_type.hpp @@ -0,0 +1,47 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DIFFERENCE_TYPE_HPP +#define BOOST_RANGE_DIFFERENCE_TYPE_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + template< class T, bool B = has_type >::value > + struct range_difference + { }; + + template< class T > + struct range_difference + : iterator_difference< + BOOST_DEDUCED_TYPENAME range_iterator::type + > + { }; + } + + template< class T > + struct range_difference + : range_detail::range_difference::type> + { }; +} + +#endif diff --git a/contrib/src/boost/range/distance.hpp b/contrib/src/boost/range/distance.hpp new file mode 100644 index 0000000..075f2d1 --- /dev/null +++ b/contrib/src/boost/range/distance.hpp @@ -0,0 +1,34 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2006. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DISTANCE_HPP +#define BOOST_RANGE_DISTANCE_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include + +namespace boost +{ + + template< class T > + inline BOOST_DEDUCED_TYPENAME range_difference::type + distance( const T& r ) + { + return std::distance( boost::begin( r ), boost::end( r ) ); + } + +} // namespace 'boost' + +#endif diff --git a/contrib/src/boost/range/empty.hpp b/contrib/src/boost/range/empty.hpp new file mode 100644 index 0000000..d57a30e --- /dev/null +++ b/contrib/src/boost/range/empty.hpp @@ -0,0 +1,34 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_EMPTY_HPP +#define BOOST_RANGE_EMPTY_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include + +namespace boost +{ + + template< class T > + inline bool empty( const T& r ) + { + return boost::begin( r ) == boost::end( r ); + } + +} // namespace 'boost' + + +#endif diff --git a/contrib/src/boost/range/end.hpp b/contrib/src/boost/range/end.hpp new file mode 100644 index 0000000..f2a3337 --- /dev/null +++ b/contrib/src/boost/range/end.hpp @@ -0,0 +1,128 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_END_HPP +#define BOOST_RANGE_END_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +#include +#else + +#include +#include +#include + +namespace boost +{ + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +namespace range_detail +{ +#endif + + ////////////////////////////////////////////////////////////////////// + // primary template + ////////////////////////////////////////////////////////////////////// + template< typename C > + inline BOOST_DEDUCED_TYPENAME range_iterator::type + range_end( C& c ) + { + // + // If you get a compile-error here, it is most likely because + // you have not implemented range_begin() properly in + // the namespace of C + // + return c.end(); + } + + ////////////////////////////////////////////////////////////////////// + // pair + ////////////////////////////////////////////////////////////////////// + + template< typename Iterator > + inline Iterator range_end( const std::pair& p ) + { + return p.second; + } + + template< typename Iterator > + inline Iterator range_end( std::pair& p ) + { + return p.second; + } + + ////////////////////////////////////////////////////////////////////// + // array + ////////////////////////////////////////////////////////////////////// + + template< typename T, std::size_t sz > + inline const T* range_end( const T (&a)[sz] ) + { + return range_detail::array_end( a ); + } + + template< typename T, std::size_t sz > + inline T* range_end( T (&a)[sz] ) + { + return range_detail::array_end( a ); + } + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +} // namespace 'range_detail' +#endif + +namespace range_adl_barrier +{ + +template< class T > +inline BOOST_DEDUCED_TYPENAME range_iterator::type end( T& r ) +{ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + using namespace range_detail; +#endif + return range_end( r ); +} + +template< class T > +inline BOOST_DEDUCED_TYPENAME range_iterator::type end( const T& r ) +{ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + using namespace range_detail; +#endif + return range_end( r ); +} + + } // namespace range_adl_barrier +} // namespace 'boost' + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +namespace boost +{ + namespace range_adl_barrier + { + template< class T > + inline BOOST_DEDUCED_TYPENAME range_iterator::type + const_end( const T& r ) + { + return boost::range_adl_barrier::end( r ); + } + } // namespace range_adl_barrier + using namespace range_adl_barrier; +} // namespace boost + +#endif + diff --git a/contrib/src/boost/range/functions.hpp b/contrib/src/boost/range/functions.hpp new file mode 100644 index 0000000..43c54b1 --- /dev/null +++ b/contrib/src/boost/range/functions.hpp @@ -0,0 +1,27 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2006. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_FUNCTIONS_HPP +#define BOOST_RANGE_FUNCTIONS_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include + +#endif + diff --git a/contrib/src/boost/range/has_range_iterator.hpp b/contrib/src/boost/range/has_range_iterator.hpp new file mode 100644 index 0000000..9eb58b3 --- /dev/null +++ b/contrib/src/boost/range/has_range_iterator.hpp @@ -0,0 +1,83 @@ +// Boost.Range library +// +// Copyright Neil Groves 2010. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +// Acknowledgments: +// Ticket #8341: Arno Schoedl - improved handling of has_range_iterator upon +// use-cases where T was const. +#ifndef BOOST_RANGE_HAS_ITERATOR_HPP_INCLUDED +#define BOOST_RANGE_HAS_ITERATOR_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(type) + + template + struct has_range_iterator_impl + : boost::mpl::false_ + { + }; + + template + struct has_range_iterator_impl< + T, + BOOST_DEDUCED_TYPENAME ::boost::enable_if< + BOOST_DEDUCED_TYPENAME mpl::eval_if, + has_type::type> >, + has_type > + >::type + >::type + > + : boost::mpl::true_ + { + }; + + template + struct has_range_const_iterator_impl + : boost::mpl::false_ + { + }; + + template + struct has_range_const_iterator_impl< + T, + BOOST_DEDUCED_TYPENAME ::boost::enable_if< + has_type > + >::type + > + : boost::mpl::true_ + { + }; + + } // namespace range_detail + + template + struct has_range_iterator + : range_detail::has_range_iterator_impl< + BOOST_DEDUCED_TYPENAME remove_reference::type> + {}; + + template + struct has_range_const_iterator + : range_detail::has_range_const_iterator_impl< + BOOST_DEDUCED_TYPENAME remove_reference::type> + {}; +} // namespace boost + +#endif // include guard + diff --git a/contrib/src/boost/range/iterator.hpp b/contrib/src/boost/range/iterator.hpp new file mode 100644 index 0000000..2956353 --- /dev/null +++ b/contrib/src/boost/range/iterator.hpp @@ -0,0 +1,74 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_ITERATOR_HPP +#define BOOST_RANGE_ITERATOR_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) + + namespace range_detail_vc7_1 + { + template< typename C, typename Sig = void(C) > + struct range_iterator + { + typedef BOOST_RANGE_DEDUCED_TYPENAME + mpl::eval_if_c< is_const::value, + range_const_iterator< typename remove_const::type >, + range_mutable_iterator >::type type; + }; + + template< typename C, typename T > + struct range_iterator< C, void(T[]) > + { + typedef T* type; + }; + } + + template< typename C, typename Enabler=void > + struct range_iterator + { + + typedef BOOST_RANGE_DEDUCED_TYPENAME + range_detail_vc7_1::range_iterator::type type; + + }; + +#else + + template< typename C, typename Enabler=void > + struct range_iterator + : mpl::if_c< + is_const::type>::value, + range_const_iterator::type>::type>, + range_mutable_iterator::type> + >::type + { + }; + +#endif + +} // namespace boost + +#endif diff --git a/contrib/src/boost/range/iterator_range.hpp b/contrib/src/boost/range/iterator_range.hpp new file mode 100644 index 0000000..dfcd4d2 --- /dev/null +++ b/contrib/src/boost/range/iterator_range.hpp @@ -0,0 +1,16 @@ +// Boost.Range library +// +// Copyright Neil Groves 2009. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_ITERATOR_RANGE_HPP_INCLUDED +#define BOOST_RANGE_ITERATOR_RANGE_HPP_INCLUDED + +#include "boost/range/iterator_range_core.hpp" +#include "boost/range/iterator_range_io.hpp" + +#endif // include guard diff --git a/contrib/src/boost/range/iterator_range_core.hpp b/contrib/src/boost/range/iterator_range_core.hpp new file mode 100644 index 0000000..a9e9fc0 --- /dev/null +++ b/contrib/src/boost/range/iterator_range_core.hpp @@ -0,0 +1,883 @@ +// Boost.Range library +// +// Copyright Neil Groves & Thorsten Ottosen & Pavol Droba 2003-2004. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +// Credits: +// 'michel' reported Trac 9072 which included a patch for allowing references +// to function types. +// +#ifndef BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED +#define BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED + +#include // Define __STL_CONFIG_H, if appropriate. +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) + #pragma warning( push ) + #pragma warning( disable : 4996 ) +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/*! \file + Defines the \c iterator_class and related functions. + \c iterator_range is a simple wrapper of iterator pair idiom. It provides + a rich subset of Container interface. +*/ + + +namespace boost +{ + namespace iterator_range_detail + { + // + // The functions adl_begin and adl_end are implemented in a separate + // class for gcc-2.9x + // + template + struct iterator_range_impl { + template< class ForwardRange > + static IteratorT adl_begin( ForwardRange& r ) + { + return IteratorT( boost::begin( r ) ); + } + + template< class ForwardRange > + static IteratorT adl_end( ForwardRange& r ) + { + return IteratorT( boost::end( r ) ); + } + }; + + template< class Left, class Right > + inline bool less_than( const Left& l, const Right& r ) + { + return std::lexicographical_compare( boost::begin(l), + boost::end(l), + boost::begin(r), + boost::end(r) ); + } + + template< class Left, class Right > + inline bool greater_than( const Left& l, const Right& r ) + { + return iterator_range_detail::less_than(r,l); + } + + template< class Left, class Right > + inline bool less_or_equal_than( const Left& l, const Right& r ) + { + return !iterator_range_detail::less_than(r,l); + } + + template< class Left, class Right > + inline bool greater_or_equal_than( const Left& l, const Right& r ) + { + return !iterator_range_detail::less_than(l,r); + } + + // This version is maintained since it is used in other boost libraries + // such as Boost.Assign + template< class Left, class Right > + inline bool equal(const Left& l, const Right& r) + { + return boost::equal(l, r); + } + +struct range_tag +{ +}; + +struct const_range_tag +{ +}; + +struct iterator_range_tag +{ +}; + +typedef char (&incrementable_t)[1]; +typedef char (&bidirectional_t)[2]; +typedef char (&random_access_t)[3]; + +incrementable_t test_traversal_tag(boost::incrementable_traversal_tag); +bidirectional_t test_traversal_tag(boost::bidirectional_traversal_tag); +random_access_t test_traversal_tag(boost::random_access_traversal_tag); + +template +struct pure_iterator_traversal_impl +{ + typedef boost::incrementable_traversal_tag type; +}; + +template<> +struct pure_iterator_traversal_impl +{ + typedef boost::bidirectional_traversal_tag type; +}; + +template<> +struct pure_iterator_traversal_impl +{ + typedef boost::random_access_traversal_tag type; +}; + +template +struct pure_iterator_traversal +{ + typedef + BOOST_DEDUCED_TYPENAME iterator_traversal::type + traversal_t; + BOOST_STATIC_CONSTANT( + std::size_t, + traversal_i = sizeof(iterator_range_detail::test_traversal_tag((traversal_t()))) + ); + typedef + BOOST_DEDUCED_TYPENAME pure_iterator_traversal_impl::type + type; +}; + +template +class iterator_range_base + : public iterator_range_tag +{ + typedef range_detail::safe_bool< + IteratorT iterator_range_base::* + > safe_bool_t; + + typedef iterator_range_base type; + +protected: + typedef iterator_range_impl impl; + +public: + typedef BOOST_DEDUCED_TYPENAME + safe_bool_t::unspecified_bool_type unspecified_bool_type; + + typedef BOOST_DEDUCED_TYPENAME + iterator_value::type value_type; + + typedef BOOST_DEDUCED_TYPENAME + iterator_difference::type difference_type; + + typedef std::size_t size_type; // note: must be unsigned + + // Needed because value-type is the same for + // const and non-const iterators + typedef BOOST_DEDUCED_TYPENAME + iterator_reference::type reference; + + //! const_iterator type + /*! + There is no distinction between const_iterator and iterator. + These typedefs are provides to fulfill container interface + */ + typedef IteratorT const_iterator; + //! iterator type + typedef IteratorT iterator; + +protected: + iterator_range_base() + : m_Begin() + , m_End() + { + } + + template + iterator_range_base(Iterator Begin, Iterator End) + : m_Begin(Begin) + , m_End(End) + { + } + +public: + IteratorT begin() const + { + return m_Begin; + } + + IteratorT end() const + { + return m_End; + } + + bool empty() const + { + return m_Begin == m_End; + } + + operator unspecified_bool_type() const + { + return safe_bool_t::to_unspecified_bool( + m_Begin != m_End, &iterator_range_base::m_Begin); + } + + bool operator!() const + { + return empty(); + } + + bool equal(const iterator_range_base& r) const + { + return m_Begin == r.m_Begin && m_End == r.m_End; + } + + reference front() const + { + BOOST_ASSERT(!empty()); + return *m_Begin; + } + + void drop_front() + { + BOOST_ASSERT(!empty()); + ++m_Begin; + } + + void drop_front(difference_type n) + { + BOOST_ASSERT(n >= difference_type()); + std::advance(this->m_Begin, n); + } + + // Deprecated + void pop_front() { drop_front(); } + +protected: + template + void assign(Iterator first, Iterator last) + { + m_Begin = first; + m_End = last; + } + + template + void assign(const SinglePassRange& r) + { + m_Begin = impl::adl_begin(r); + m_End = impl::adl_end(r); + } + + template + void assign(SinglePassRange& r) + { + m_Begin = impl::adl_begin(r); + m_End = impl::adl_end(r); + } + + IteratorT m_Begin; + IteratorT m_End; +}; + +template +class iterator_range_base + : public iterator_range_base +{ + typedef iterator_range_base base_type; + +protected: + iterator_range_base() + { + } + + template + iterator_range_base(Iterator first, Iterator last) + : base_type(first, last) + { + } + +public: + typedef BOOST_DEDUCED_TYPENAME base_type::difference_type difference_type; + typedef BOOST_DEDUCED_TYPENAME base_type::reference reference; + + reference back() const + { + BOOST_ASSERT(!this->empty()); + return *boost::prior(this->m_End); + } + + void drop_back() + { + BOOST_ASSERT(!this->empty()); + --this->m_End; + } + + void drop_back(difference_type n) + { + BOOST_ASSERT(n >= difference_type()); + std::advance(this->m_End, -n); + } + + // Deprecated + void pop_back() { drop_back(); } +}; + +template +class iterator_range_base + : public iterator_range_base +{ + typedef iterator_range_base< + IteratorT, bidirectional_traversal_tag> base_type; + +public: + typedef BOOST_DEDUCED_TYPENAME + boost::mpl::if_< + boost::mpl::or_< + boost::is_abstract< + BOOST_DEDUCED_TYPENAME base_type::value_type + >, + boost::is_array< + BOOST_DEDUCED_TYPENAME base_type::value_type + >, + boost::is_function< + BOOST_DEDUCED_TYPENAME base_type::value_type + > + >, + BOOST_DEDUCED_TYPENAME base_type::reference, + BOOST_DEDUCED_TYPENAME base_type::value_type + >::type abstract_value_type; + + // Rationale: + // typedef these here to reduce verbiage in the implementation of this + // type. + typedef BOOST_DEDUCED_TYPENAME base_type::difference_type difference_type; + typedef BOOST_DEDUCED_TYPENAME base_type::size_type size_type; + typedef BOOST_DEDUCED_TYPENAME base_type::reference reference; + +protected: + iterator_range_base() + { + } + + template + iterator_range_base(Iterator first, Iterator last) + : base_type(first, last) + { + } + +public: + reference operator[](difference_type at) const + { + BOOST_ASSERT(at >= 0); + BOOST_ASSERT(static_cast(at) < size()); + return this->m_Begin[at]; + } + + // + // When storing transform iterators, operator[]() + // fails because it returns by reference. Therefore + // operator()() is provided for these cases. + // + abstract_value_type operator()(difference_type at) const + { + BOOST_ASSERT(at >= 0); + BOOST_ASSERT(static_cast(at) < size()); + return this->m_Begin[at]; + } + + BOOST_DEDUCED_TYPENAME base_type::size_type size() const + { + return this->m_End - this->m_Begin; + } +}; + + } + +// iterator range template class -----------------------------------------// + + //! iterator_range class + /*! + An \c iterator_range delimits a range in a sequence by beginning and ending iterators. + An iterator_range can be passed to an algorithm which requires a sequence as an input. + For example, the \c toupper() function may be used most frequently on strings, + but can also be used on iterator_ranges: + + \code + boost::tolower( find( s, "UPPERCASE STRING" ) ); + \endcode + + Many algorithms working with sequences take a pair of iterators, + delimiting a working range, as an arguments. The \c iterator_range class is an + encapsulation of a range identified by a pair of iterators. + It provides a collection interface, + so it is possible to pass an instance to an algorithm requiring a collection as an input. + */ + template + class iterator_range + : public iterator_range_detail::iterator_range_base< + IteratorT, + BOOST_DEDUCED_TYPENAME iterator_range_detail::pure_iterator_traversal::type + > + { + typedef iterator_range_detail::iterator_range_base< + IteratorT, + BOOST_DEDUCED_TYPENAME iterator_range_detail::pure_iterator_traversal::type + > base_type; + + template + struct is_compatible_range_ + : is_convertible< + BOOST_DEDUCED_TYPENAME mpl::eval_if< + has_range_iterator, + range_iterator, + mpl::identity + >::type, + BOOST_DEDUCED_TYPENAME base_type::iterator + > + { + }; + + template + struct is_compatible_range + : mpl::and_< + mpl::not_< + is_convertible< + Source, + BOOST_DEDUCED_TYPENAME base_type::iterator + > + >, + is_compatible_range_ + > + { + }; + + protected: + typedef iterator_range_detail::iterator_range_impl impl; + + public: + typedef iterator_range type; + + iterator_range() + { + } + + template + iterator_range(Iterator first, Iterator last) + : base_type(first, last) + { + } + + template + iterator_range( + const SinglePassRange& r, + BOOST_DEDUCED_TYPENAME ::boost::enable_if< + is_compatible_range + >::type* = 0 + ) + : base_type(impl::adl_begin(r), impl::adl_end(r)) + { + } + + template + iterator_range( + SinglePassRange& r, + BOOST_DEDUCED_TYPENAME ::boost::enable_if< + is_compatible_range + >::type* = 0 + ) + : base_type(impl::adl_begin(r), impl::adl_end(r)) + { + } + + template + iterator_range(const SinglePassRange& r, + iterator_range_detail::const_range_tag) + : base_type(impl::adl_begin(r), impl::adl_end(r)) + { + } + + template + iterator_range(SinglePassRange& r, + iterator_range_detail::range_tag) + : base_type(impl::adl_begin(r), impl::adl_end(r)) + { + } + + template + iterator_range& operator=(const iterator_range& other) + { + this->assign(other.begin(), other.end()); + return *this; + } + + template + iterator_range& operator=(iterator_range& other) + { + this->assign(other.begin(), other.end()); + return *this; + } + + template + iterator_range& operator=(SinglePassRange& r) + { + this->assign(r); + return *this; + } + + template + iterator_range& operator=(const SinglePassRange& r) + { + this->assign(r); + return *this; + } + + iterator_range& advance_begin( + BOOST_DEDUCED_TYPENAME base_type::difference_type n) + { + std::advance(this->m_Begin, n); + return *this; + } + + iterator_range& advance_end( + BOOST_DEDUCED_TYPENAME base_type::difference_type n) + { + std::advance(this->m_End, n); + return *this; + } + + protected: + // + // Allow subclasses an easy way to access the + // base type + // + typedef iterator_range iterator_range_; + }; + +// iterator range free-standing operators ---------------------------// + + ///////////////////////////////////////////////////////////////////// + // comparison operators + ///////////////////////////////////////////////////////////////////// + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator==( const ForwardRange& l, const iterator_range& r ) + { + return boost::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator!=( const ForwardRange& l, const iterator_range& r ) + { + return !boost::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator<( const ForwardRange& l, const iterator_range& r ) + { + return iterator_range_detail::less_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator<=( const ForwardRange& l, const iterator_range& r ) + { + return iterator_range_detail::less_or_equal_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator>( const ForwardRange& l, const iterator_range& r ) + { + return iterator_range_detail::greater_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator>=( const ForwardRange& l, const iterator_range& r ) + { + return iterator_range_detail::greater_or_equal_than( l, r ); + } + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +#else + template< class Iterator1T, class Iterator2T > + inline bool + operator==( const iterator_range& l, const iterator_range& r ) + { + return boost::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator==( const iterator_range& l, const ForwardRange& r ) + { + return boost::equal( l, r ); + } + + + template< class Iterator1T, class Iterator2T > + inline bool + operator!=( const iterator_range& l, const iterator_range& r ) + { + return !boost::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator!=( const iterator_range& l, const ForwardRange& r ) + { + return !boost::equal( l, r ); + } + + + template< class Iterator1T, class Iterator2T > + inline bool + operator<( const iterator_range& l, const iterator_range& r ) + { + return iterator_range_detail::less_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator<( const iterator_range& l, const ForwardRange& r ) + { + return iterator_range_detail::less_than( l, r ); + } + + template< class Iterator1T, class Iterator2T > + inline bool + operator<=( const iterator_range& l, const iterator_range& r ) + { + return iterator_range_detail::less_or_equal_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator<=( const iterator_range& l, const ForwardRange& r ) + { + return iterator_range_detail::less_or_equal_than( l, r ); + } + + template< class Iterator1T, class Iterator2T > + inline bool + operator>( const iterator_range& l, const iterator_range& r ) + { + return iterator_range_detail::greater_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator>( const iterator_range& l, const ForwardRange& r ) + { + return iterator_range_detail::greater_than( l, r ); + } + + template< class Iterator1T, class Iterator2T > + inline bool + operator>=( const iterator_range& l, const iterator_range& r ) + { + return iterator_range_detail::greater_or_equal_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator>=( const iterator_range& l, const ForwardRange& r ) + { + return iterator_range_detail::greater_or_equal_than( l, r ); + } + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +// iterator range utilities -----------------------------------------// + + //! iterator_range construct helper + /*! + Construct an \c iterator_range from a pair of iterators + + \param Begin A begin iterator + \param End An end iterator + \return iterator_range object + */ + template< typename IteratorT > + inline iterator_range< IteratorT > + make_iterator_range( IteratorT Begin, IteratorT End ) + { + return iterator_range( Begin, End ); + } + + template + inline iterator_range + make_iterator_range_n(IteratorT first, IntegerT n) + { + return iterator_range(first, boost::next(first, n)); + } + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + template< typename Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( Range& r ) + { + return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + ( boost::begin( r ), boost::end( r ) ); + } + +#else + //! iterator_range construct helper + /*! + Construct an \c iterator_range from a \c Range containing the begin + and end iterators. + */ + template< class ForwardRange > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( ForwardRange& r ) + { + return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + ( r, iterator_range_detail::range_tag() ); + } + + template< class ForwardRange > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( const ForwardRange& r ) + { + return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + ( r, iterator_range_detail::const_range_tag() ); + } + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + namespace iterator_range_detail + { + template< class Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_range_impl( Range& r, + BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, + BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) + { + // + // Not worth the effort + // + //if( advance_begin == 0 && advance_end == 0 ) + // return make_iterator_range( r ); + // + + BOOST_DEDUCED_TYPENAME range_iterator::type + new_begin = boost::begin( r ), + new_end = boost::end( r ); + std::advance( new_begin, advance_begin ); + std::advance( new_end, advance_end ); + return make_iterator_range( new_begin, new_end ); + } + } + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + template< class Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( Range& r, + BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, + BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) + { + return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); + } + +#else + + template< class Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( Range& r, + BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, + BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) + { + return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); + } + + template< class Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( const Range& r, + BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, + BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) + { + return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); + } + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + //! copy a range into a sequence + /*! + Construct a new sequence of the specified type from the elements + in the given range + + \param Range An input range + \return New sequence + */ + template< typename SeqT, typename Range > + inline SeqT copy_range( const Range& r ) + { + return SeqT( boost::begin( r ), boost::end( r ) ); + } + +} // namespace 'boost' + +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) + #pragma warning( pop ) +#endif + +#endif + diff --git a/contrib/src/boost/range/iterator_range_io.hpp b/contrib/src/boost/range/iterator_range_io.hpp new file mode 100644 index 0000000..8c29400 --- /dev/null +++ b/contrib/src/boost/range/iterator_range_io.hpp @@ -0,0 +1,93 @@ +// Boost.Range library +// +// Copyright Neil Groves 2009. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED +#define BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED + +#include +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) + #pragma warning( push ) + #pragma warning( disable : 4996 ) +#endif + +// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch. +#ifndef BOOST_OLD_IOSTREAMS +# if defined(__STL_CONFIG_H) && \ + !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \ + /**/ +# define BOOST_OLD_IOSTREAMS +# endif +#endif // #ifndef BOOST_OLD_IOSTREAMS + +#ifndef _STLP_NO_IOSTREAMS +# ifndef BOOST_OLD_IOSTREAMS +# include +# else +# include +# endif +#endif // _STLP_NO_IOSTREAMS + +#include +#include +#include +#include + +namespace boost +{ + +#ifndef _STLP_NO_IOSTREAMS +# ifndef BOOST_OLD_IOSTREAMS + + //! iterator_range output operator + /*! + Output the range to an ostream. Elements are outputted + in a sequence without separators. + */ + template< typename IteratorT, typename Elem, typename Traits > + inline std::basic_ostream& operator<<( + std::basic_ostream& Os, + const iterator_range& r ) + { + std::copy( r.begin(), r.end(), + std::ostream_iterator< BOOST_DEDUCED_TYPENAME + iterator_value::type, + Elem, Traits>(Os) ); + return Os; + } + +# else + + //! iterator_range output operator + /*! + Output the range to an ostream. Elements are outputted + in a sequence without separators. + */ + template< typename IteratorT > + inline std::ostream& operator<<( + std::ostream& Os, + const iterator_range& r ) + { + std::copy( r.begin(), r.end(), std::ostream_iterator(Os)); + return Os; + } + +# endif +#endif // _STLP_NO_IOSTREAMS + +} // namespace boost + +#undef BOOST_OLD_IOSTREAMS + +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) + #pragma warning(pop) +#endif + +#endif // include guard diff --git a/contrib/src/boost/range/mutable_iterator.hpp b/contrib/src/boost/range/mutable_iterator.hpp new file mode 100644 index 0000000..b924666 --- /dev/null +++ b/contrib/src/boost/range/mutable_iterator.hpp @@ -0,0 +1,79 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_MUTABLE_ITERATOR_HPP +#define BOOST_RANGE_MUTABLE_ITERATOR_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include + +#include +#include +#include +#include +#include +#include + +namespace boost +{ + + ////////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////////// + + namespace range_detail + { + +BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator ) + +template< typename C > +struct range_mutable_iterator + : range_detail::extract_iterator< + BOOST_DEDUCED_TYPENAME remove_reference::type> +{}; + +////////////////////////////////////////////////////////////////////////// +// pair +////////////////////////////////////////////////////////////////////////// + +template< typename Iterator > +struct range_mutable_iterator< std::pair > +{ + typedef Iterator type; +}; + +////////////////////////////////////////////////////////////////////////// +// array +////////////////////////////////////////////////////////////////////////// + +template< typename T, std::size_t sz > +struct range_mutable_iterator< T[sz] > +{ + typedef T* type; +}; + + } // namespace range_detail + +template +struct range_mutable_iterator + : range_detail::range_mutable_iterator< + BOOST_DEDUCED_TYPENAME remove_reference::type + > +{ +}; + +} // namespace boost + +#include + +#endif diff --git a/contrib/src/boost/range/range_fwd.hpp b/contrib/src/boost/range/range_fwd.hpp new file mode 100644 index 0000000..0e6e00f --- /dev/null +++ b/contrib/src/boost/range/range_fwd.hpp @@ -0,0 +1,63 @@ +// Boost.Range library +// +// Copyright Neil Groves 2003-2004. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_RANGE_FWD_HPP_INCLUDED +#define BOOST_RANGE_RANGE_FWD_HPP_INCLUDED + +namespace boost +{ + +// Extension points + template + struct range_iterator; + + template + struct range_mutable_iterator; + + template + struct range_const_iterator; + +// Core classes + template + class iterator_range; + + template + class sub_range; + +// Meta-functions + template + struct range_category; + + template + struct range_difference; + + template + struct range_pointer; + + template + struct range_reference; + + template + struct range_reverse_iterator; + + template + struct range_size; + + template + struct range_value; + + template + struct has_range_iterator; + + template + struct has_range_const_iterator; + +} // namespace boost + +#endif // include guard diff --git a/contrib/src/boost/range/rbegin.hpp b/contrib/src/boost/range/rbegin.hpp new file mode 100644 index 0000000..6d66de9 --- /dev/null +++ b/contrib/src/boost/range/rbegin.hpp @@ -0,0 +1,65 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_RBEGIN_HPP +#define BOOST_RANGE_RBEGIN_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include + +namespace boost +{ + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +template< class C > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +rbegin( C& c ) +{ + return BOOST_DEDUCED_TYPENAME range_reverse_iterator::type( boost::end( c ) ); +} + +#else + +template< class C > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +rbegin( C& c ) +{ + typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type + iter_type; + return iter_type( boost::end( c ) ); +} + +template< class C > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +rbegin( const C& c ) +{ + typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type + iter_type; + return iter_type( boost::end( c ) ); +} + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +template< class T > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +const_rbegin( const T& r ) +{ + return boost::rbegin( r ); +} + +} // namespace 'boost' + +#endif + diff --git a/contrib/src/boost/range/rend.hpp b/contrib/src/boost/range/rend.hpp new file mode 100644 index 0000000..ef70407 --- /dev/null +++ b/contrib/src/boost/range/rend.hpp @@ -0,0 +1,65 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_REND_HPP +#define BOOST_RANGE_REND_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include + +namespace boost +{ + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +template< class C > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +rend( C& c ) +{ + return BOOST_DEDUCED_TYPENAME range_reverse_iterator::type( boost::begin( c ) ); +} + +#else + +template< class C > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +rend( C& c ) +{ + typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type + iter_type; + return iter_type( boost::begin( c ) ); +} + +template< class C > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +rend( const C& c ) +{ + typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type + iter_type; + return iter_type( boost::begin( c ) ); +} + +#endif + +template< class T > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +const_rend( const T& r ) +{ + return boost::rend( r ); +} + +} // namespace 'boost' + +#endif + diff --git a/contrib/src/boost/range/reverse_iterator.hpp b/contrib/src/boost/range/reverse_iterator.hpp new file mode 100644 index 0000000..0aa0130 --- /dev/null +++ b/contrib/src/boost/range/reverse_iterator.hpp @@ -0,0 +1,42 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_REVERSE_ITERATOR_HPP +#define BOOST_RANGE_REVERSE_ITERATOR_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include + + +namespace boost +{ + ////////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////////// + + template< typename T > + struct range_reverse_iterator + { + typedef reverse_iterator< + BOOST_DEDUCED_TYPENAME range_iterator< + BOOST_DEDUCED_TYPENAME remove_reference::type>::type > type; + }; + + +} // namespace boost + + +#endif diff --git a/contrib/src/boost/range/size.hpp b/contrib/src/boost/range/size.hpp new file mode 100644 index 0000000..7f38db8 --- /dev/null +++ b/contrib/src/boost/range/size.hpp @@ -0,0 +1,76 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_SIZE_HPP +#define BOOST_RANGE_SIZE_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + + template + inline typename ::boost::enable_if< + has_member_size, + typename range_size::type + >::type + range_calculate_size(const SinglePassRange& rng) + { + return rng.size(); + } + + template + inline typename disable_if< + has_member_size, + typename range_size::type + >::type + range_calculate_size(const SinglePassRange& rng) + { + return std::distance(boost::begin(rng), boost::end(rng)); + } + } + + template + inline typename range_size::type + size(const SinglePassRange& rng) + { +// Very strange things happen on some compilers that have the range concept +// asserts disabled. This preprocessor condition is clearly redundant on a +// working compiler but is vital for at least some compilers such as clang 4.2 +// but only on the Mac! +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT == 1 + BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept)); +#endif + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ + !BOOST_WORKAROUND(__GNUC__, < 3) \ + /**/ + using namespace range_detail; +#endif + + return range_calculate_size(rng); + } + +} // namespace 'boost' + +#endif diff --git a/contrib/src/boost/range/size_type.hpp b/contrib/src/boost/range/size_type.hpp new file mode 100644 index 0000000..f41c321 --- /dev/null +++ b/contrib/src/boost/range/size_type.hpp @@ -0,0 +1,95 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_SIZE_TYPE_HPP +#define BOOST_RANGE_SIZE_TYPE_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace boost +{ + namespace detail + { + + ////////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////////// + + template + class has_size_type + { + typedef char no_type; + struct yes_type { char dummy[2]; }; + + template + static yes_type test(BOOST_DEDUCED_TYPENAME C::size_type x); + + template + static no_type test(...); + + public: + static const bool value = sizeof(test(0)) == sizeof(yes_type); + }; + + template + struct range_size_ + { + typedef BOOST_DEDUCED_TYPENAME make_unsigned< + BOOST_DEDUCED_TYPENAME range_difference::type + >::type type; + }; + + template + struct range_size_< + C, + BOOST_DEDUCED_TYPENAME ::boost::enable_if, void>::type + > + { + typedef BOOST_DEDUCED_TYPENAME C::size_type type; + }; + + template >::value> + struct range_size + { }; + + template + struct range_size + : range_size_ + { }; + } + + template< class T > + struct range_size : + detail::range_size + { }; + + template< class T > + struct range_size : + detail::range_size + { }; + +} // namespace boost + + + +#endif diff --git a/contrib/src/boost/range/value_type.hpp b/contrib/src/boost/range/value_type.hpp new file mode 100644 index 0000000..5a3187e --- /dev/null +++ b/contrib/src/boost/range/value_type.hpp @@ -0,0 +1,30 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_VALUE_TYPE_HPP +#define BOOST_RANGE_VALUE_TYPE_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include + +#include + +namespace boost +{ + template< class T > + struct range_value : iterator_value< typename range_iterator::type > + { }; +} + +#endif diff --git a/contrib/src/boost/ref.hpp b/contrib/src/boost/ref.hpp new file mode 100644 index 0000000..17b56ec --- /dev/null +++ b/contrib/src/boost/ref.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_REF_HPP +#define BOOST_REF_HPP + +// The header file at this path is deprecated; +// use boost/core/ref.hpp instead. + +#include + +#endif diff --git a/contrib/src/boost/shared_ptr.hpp b/contrib/src/boost/shared_ptr.hpp new file mode 100644 index 0000000..d31978c --- /dev/null +++ b/contrib/src/boost/shared_ptr.hpp @@ -0,0 +1,19 @@ +#ifndef BOOST_SHARED_PTR_HPP_INCLUDED +#define BOOST_SHARED_PTR_HPP_INCLUDED + +// +// shared_ptr.hpp +// +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001-2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. +// + +#include + +#endif // #ifndef BOOST_SHARED_PTR_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/bad_weak_ptr.hpp b/contrib/src/boost/smart_ptr/bad_weak_ptr.hpp new file mode 100644 index 0000000..3e0a1b7 --- /dev/null +++ b/contrib/src/boost/smart_ptr/bad_weak_ptr.hpp @@ -0,0 +1,59 @@ +#ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED +#define BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/smart_ptr/bad_weak_ptr.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#ifdef __BORLANDC__ +# pragma warn -8026 // Functions with excep. spec. are not expanded inline +#endif + +namespace boost +{ + +// The standard library that comes with Borland C++ 5.5.1, 5.6.4 +// defines std::exception and its members as having C calling +// convention (-pc). When the definition of bad_weak_ptr +// is compiled with -ps, the compiler issues an error. +// Hence, the temporary #pragma option -pc below. + +#if defined(__BORLANDC__) && __BORLANDC__ <= 0x564 +# pragma option push -pc +#endif + +class bad_weak_ptr: public std::exception +{ +public: + + virtual char const * what() const throw() + { + return "tr1::bad_weak_ptr"; + } +}; + +#if defined(__BORLANDC__) && __BORLANDC__ <= 0x564 +# pragma option pop +#endif + +} // namespace boost + +#ifdef __BORLANDC__ +# pragma warn .8026 // Functions with excep. spec. are not expanded inline +#endif + +#endif // #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/lightweight_mutex.hpp b/contrib/src/boost/smart_ptr/detail/lightweight_mutex.hpp new file mode 100644 index 0000000..d46b193 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/lightweight_mutex.hpp @@ -0,0 +1,42 @@ +#ifndef BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/lightweight_mutex.hpp - lightweight mutex +// +// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// typedef boost::detail::lightweight_mutex; +// +// boost::detail::lightweight_mutex is a header-only implementation of +// a subset of the Mutex concept requirements: +// +// http://www.boost.org/doc/html/threads/concepts.html#threads.concepts.Mutex +// +// It maps to a CRITICAL_SECTION on Windows or a pthread_mutex on POSIX. +// + +#include + +#if !defined(BOOST_HAS_THREADS) +# include +#elif defined(BOOST_HAS_PTHREADS) +# include +#elif defined(BOOST_HAS_WINTHREADS) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# include +#else +// Use #define BOOST_DISABLE_THREADS to avoid the error +# error Unrecognized threading platform +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/lwm_nop.hpp b/contrib/src/boost/smart_ptr/detail/lwm_nop.hpp new file mode 100644 index 0000000..521a88e --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/lwm_nop.hpp @@ -0,0 +1,37 @@ +#ifndef BOOST_SMART_PTR_DETAIL_LWM_NOP_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_LWM_NOP_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/lwm_nop.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +namespace boost +{ + +namespace detail +{ + +class lightweight_mutex +{ +public: + + typedef lightweight_mutex scoped_lock; +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_LWM_NOP_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/lwm_pthreads.hpp b/contrib/src/boost/smart_ptr/detail/lwm_pthreads.hpp new file mode 100644 index 0000000..8eda518 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/lwm_pthreads.hpp @@ -0,0 +1,87 @@ +#ifndef BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/lwm_pthreads.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include + +namespace boost +{ + +namespace detail +{ + +class lightweight_mutex +{ +private: + + pthread_mutex_t m_; + + lightweight_mutex(lightweight_mutex const &); + lightweight_mutex & operator=(lightweight_mutex const &); + +public: + + lightweight_mutex() + { + +// HPUX 10.20 / DCE has a nonstandard pthread_mutex_init + +#if defined(__hpux) && defined(_DECTHREADS_) + BOOST_VERIFY( pthread_mutex_init( &m_, pthread_mutexattr_default ) == 0 ); +#else + BOOST_VERIFY( pthread_mutex_init( &m_, 0 ) == 0 ); +#endif + } + + ~lightweight_mutex() + { + BOOST_VERIFY( pthread_mutex_destroy( &m_ ) == 0 ); + } + + class scoped_lock; + friend class scoped_lock; + + class scoped_lock + { + private: + + pthread_mutex_t & m_; + + scoped_lock(scoped_lock const &); + scoped_lock & operator=(scoped_lock const &); + + public: + + scoped_lock(lightweight_mutex & m): m_(m.m_) + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + } + + ~scoped_lock() + { + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + } + }; +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/lwm_win32_cs.hpp b/contrib/src/boost/smart_ptr/detail/lwm_win32_cs.hpp new file mode 100644 index 0000000..a93cf09 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/lwm_win32_cs.hpp @@ -0,0 +1,119 @@ +#ifndef BOOST_SMART_PTR_DETAIL_LWM_WIN32_CS_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_LWM_WIN32_CS_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/lwm_win32_cs.hpp +// +// Copyright (c) 2002, 2003 Peter Dimov +// Copyright (c) Microsoft Corporation 2014 +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#ifdef BOOST_USE_WINDOWS_H +# include +#endif + +namespace boost +{ + +namespace detail +{ + +#ifndef BOOST_USE_WINDOWS_H + +struct critical_section +{ + struct critical_section_debug * DebugInfo; + long LockCount; + long RecursionCount; + void * OwningThread; + void * LockSemaphore; +#if defined(_WIN64) + unsigned __int64 SpinCount; +#else + unsigned long SpinCount; +#endif +}; + +#if BOOST_PLAT_WINDOWS_RUNTIME +extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSectionEx(critical_section *, unsigned long, unsigned long); +#else +extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(critical_section *); +#endif +extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(critical_section *); +extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(critical_section *); +extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(critical_section *); + +#else + +typedef ::CRITICAL_SECTION critical_section; + +#endif // #ifndef BOOST_USE_WINDOWS_H + +class lightweight_mutex +{ +private: + + critical_section cs_; + + lightweight_mutex(lightweight_mutex const &); + lightweight_mutex & operator=(lightweight_mutex const &); + +public: + + lightweight_mutex() + { +#if BOOST_PLAT_WINDOWS_RUNTIME + InitializeCriticalSectionEx(&cs_, 4000, 0); +#else + InitializeCriticalSection(&cs_); +#endif + } + + ~lightweight_mutex() + { + DeleteCriticalSection(&cs_); + } + + class scoped_lock; + friend class scoped_lock; + + class scoped_lock + { + private: + + lightweight_mutex & m_; + + scoped_lock(scoped_lock const &); + scoped_lock & operator=(scoped_lock const &); + + public: + + explicit scoped_lock(lightweight_mutex & m): m_(m) + { + EnterCriticalSection(&m_.cs_); + } + + ~scoped_lock() + { + LeaveCriticalSection(&m_.cs_); + } + }; +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_LWM_WIN32_CS_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/operator_bool.hpp b/contrib/src/boost/smart_ptr/detail/operator_bool.hpp new file mode 100644 index 0000000..c0289b8 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/operator_bool.hpp @@ -0,0 +1,64 @@ +// This header intentionally has no include guards. +// +// Copyright (c) 2001-2009, 2012 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR )\ + && !(defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5130)) + + explicit operator bool () const BOOST_NOEXCEPT + { + return px != 0; + } + +#elif ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__) + + operator bool () const BOOST_NOEXCEPT + { + return px != 0; + } + +#elif defined( _MANAGED ) + + static void unspecified_bool( this_type*** ) + { + } + + typedef void (*unspecified_bool_type)( this_type*** ); + + operator unspecified_bool_type() const BOOST_NOEXCEPT + { + return px == 0? 0: unspecified_bool; + } + +#elif \ + ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \ + ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \ + ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) ) + + typedef element_type * (this_type::*unspecified_bool_type)() const; + + operator unspecified_bool_type() const BOOST_NOEXCEPT + { + return px == 0? 0: &this_type::get; + } + +#else + + typedef element_type * this_type::*unspecified_bool_type; + + operator unspecified_bool_type() const BOOST_NOEXCEPT + { + return px == 0? 0: &this_type::px; + } + +#endif + + // operator! is redundant, but some compilers need it + bool operator! () const BOOST_NOEXCEPT + { + return px == 0; + } diff --git a/contrib/src/boost/smart_ptr/detail/quick_allocator.hpp b/contrib/src/boost/smart_ptr/detail/quick_allocator.hpp new file mode 100644 index 0000000..159bd5e --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/quick_allocator.hpp @@ -0,0 +1,199 @@ +#ifndef BOOST_SMART_PTR_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/quick_allocator.hpp +// +// Copyright (c) 2003 David Abrahams +// Copyright (c) 2003 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#include +#include +#include + +#include // ::operator new, ::operator delete +#include // std::size_t + +namespace boost +{ + +namespace detail +{ + +template union freeblock +{ + typedef typename boost::type_with_alignment::type aligner_type; + aligner_type aligner; + char bytes[size]; + freeblock * next; +}; + +template struct allocator_impl +{ + typedef freeblock block; + + // It may seem odd to use such small pages. + // + // However, on a typical Windows implementation that uses + // the OS allocator, "normal size" pages interact with the + // "ordinary" operator new, slowing it down dramatically. + // + // 512 byte pages are handled by the small object allocator, + // and don't interfere with ::new. + // + // The other alternative is to use much bigger pages (1M.) + // + // It is surprisingly easy to hit pathological behavior by + // varying the page size. g++ 2.96 on Red Hat Linux 7.2, + // for example, passionately dislikes 496. 512 seems OK. + +#if defined(BOOST_QA_PAGE_SIZE) + + enum { items_per_page = BOOST_QA_PAGE_SIZE / size }; + +#else + + enum { items_per_page = 512 / size }; // 1048560 / size + +#endif + +#ifdef BOOST_HAS_THREADS + + static lightweight_mutex & mutex() + { + static freeblock< sizeof( lightweight_mutex ), boost::alignment_of< lightweight_mutex >::value > fbm; + static lightweight_mutex * pm = new( &fbm ) lightweight_mutex; + return *pm; + } + + static lightweight_mutex * mutex_init; + +#endif + + static block * free; + static block * page; + static unsigned last; + + static inline void * alloc() + { +#ifdef BOOST_HAS_THREADS + lightweight_mutex::scoped_lock lock( mutex() ); +#endif + if(block * x = free) + { + free = x->next; + return x; + } + else + { + if(last == items_per_page) + { + // "Listen to me carefully: there is no memory leak" + // -- Scott Meyers, Eff C++ 2nd Ed Item 10 + page = ::new block[items_per_page]; + last = 0; + } + + return &page[last++]; + } + } + + static inline void * alloc(std::size_t n) + { + if(n != size) // class-specific new called for a derived object + { + return ::operator new(n); + } + else + { +#ifdef BOOST_HAS_THREADS + lightweight_mutex::scoped_lock lock( mutex() ); +#endif + if(block * x = free) + { + free = x->next; + return x; + } + else + { + if(last == items_per_page) + { + page = ::new block[items_per_page]; + last = 0; + } + + return &page[last++]; + } + } + } + + static inline void dealloc(void * pv) + { + if(pv != 0) // 18.4.1.1/13 + { +#ifdef BOOST_HAS_THREADS + lightweight_mutex::scoped_lock lock( mutex() ); +#endif + block * pb = static_cast(pv); + pb->next = free; + free = pb; + } + } + + static inline void dealloc(void * pv, std::size_t n) + { + if(n != size) // class-specific delete called for a derived object + { + ::operator delete(pv); + } + else if(pv != 0) // 18.4.1.1/13 + { +#ifdef BOOST_HAS_THREADS + lightweight_mutex::scoped_lock lock( mutex() ); +#endif + block * pb = static_cast(pv); + pb->next = free; + free = pb; + } + } +}; + +#ifdef BOOST_HAS_THREADS + +template + lightweight_mutex * allocator_impl::mutex_init = &allocator_impl::mutex(); + +#endif + +template + freeblock * allocator_impl::free = 0; + +template + freeblock * allocator_impl::page = 0; + +template + unsigned allocator_impl::last = allocator_impl::items_per_page; + +template +struct quick_allocator: public allocator_impl< sizeof(T), boost::alignment_of::value > +{ +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/shared_count.hpp b/contrib/src/boost/smart_ptr/detail/shared_count.hpp new file mode 100644 index 0000000..7996aa4 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/shared_count.hpp @@ -0,0 +1,709 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/shared_count.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#ifdef __BORLANDC__ +# pragma warn -8027 // Functions containing try are not expanded inline +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +// In order to avoid circular dependencies with Boost.TR1 +// we make sure that our include of doesn't try to +// pull in the TR1 headers: that's why we use this header +// rather than including directly: +#include // std::auto_ptr +#include // std::less + +#ifdef BOOST_NO_EXCEPTIONS +# include // std::bad_alloc +#endif + +#include + +#if defined( BOOST_SP_DISABLE_DEPRECATED ) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + +namespace boost +{ + +namespace movelib +{ + + template< class T, class D > class unique_ptr; + +} // namespace movelib + +namespace detail +{ + +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + +int const shared_count_id = 0x2C35F101; +int const weak_count_id = 0x298C38A4; + +#endif + +struct sp_nothrow_tag {}; + +template< class D > struct sp_inplace_tag +{ +}; + +template< class T > class sp_reference_wrapper +{ +public: + + explicit sp_reference_wrapper( T & t): t_( boost::addressof( t ) ) + { + } + + template< class Y > void operator()( Y * p ) const + { + (*t_)( p ); + } + +private: + + T * t_; +}; + +template< class D > struct sp_convert_reference +{ + typedef D type; +}; + +template< class D > struct sp_convert_reference< D& > +{ + typedef sp_reference_wrapper< D > type; +}; + +class weak_count; + +class shared_count +{ +private: + + sp_counted_base * pi_; + +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + int id_; +#endif + + friend class weak_count; + +public: + + shared_count(): pi_(0) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + } + + template explicit shared_count( Y * p ): pi_( 0 ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { +#ifndef BOOST_NO_EXCEPTIONS + + try + { + pi_ = new sp_counted_impl_p( p ); + } + catch(...) + { + boost::checked_delete( p ); + throw; + } + +#else + + pi_ = new sp_counted_impl_p( p ); + + if( pi_ == 0 ) + { + boost::checked_delete( p ); + boost::throw_exception( std::bad_alloc() ); + } + +#endif + } + +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) + template shared_count( Y * p, D d ): pi_(0) +#else + template shared_count( P p, D d ): pi_(0) +#endif +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) + typedef Y* P; +#endif +#ifndef BOOST_NO_EXCEPTIONS + + try + { + pi_ = new sp_counted_impl_pd(p, d); + } + catch(...) + { + d(p); // delete p + throw; + } + +#else + + pi_ = new sp_counted_impl_pd(p, d); + + if(pi_ == 0) + { + d(p); // delete p + boost::throw_exception(std::bad_alloc()); + } + +#endif + } + +#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) + + template< class P, class D > shared_count( P p, sp_inplace_tag ): pi_( 0 ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { +#ifndef BOOST_NO_EXCEPTIONS + + try + { + pi_ = new sp_counted_impl_pd< P, D >( p ); + } + catch( ... ) + { + D::operator_fn( p ); // delete p + throw; + } + +#else + + pi_ = new sp_counted_impl_pd< P, D >( p ); + + if( pi_ == 0 ) + { + D::operator_fn( p ); // delete p + boost::throw_exception( std::bad_alloc() ); + } + +#endif // #ifndef BOOST_NO_EXCEPTIONS + } + +#endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) + + template shared_count( P p, D d, A a ): pi_( 0 ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + typedef sp_counted_impl_pda impl_type; + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + typedef typename std::allocator_traits::template rebind_alloc< impl_type > A2; + +#else + + typedef typename A::template rebind< impl_type >::other A2; + +#endif + + A2 a2( a ); + +#ifndef BOOST_NO_EXCEPTIONS + + try + { +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + impl_type * pi = std::allocator_traits::allocate( a2, 1 ); + pi_ = pi; + std::allocator_traits::construct( a2, pi, p, d, a ); + +#else + + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); + +#endif + } + catch(...) + { + d( p ); + + if( pi_ != 0 ) + { + a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); + } + + throw; + } + +#else + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + impl_type * pi = std::allocator_traits::allocate( a2, 1 ); + pi_ = pi; + +#else + + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + +#endif + + if( pi_ != 0 ) + { +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + std::allocator_traits::construct( a2, pi, p, d, a ); + +#else + + ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); + +#endif + } + else + { + d( p ); + boost::throw_exception( std::bad_alloc() ); + } + +#endif + } + +#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) + + template< class P, class D, class A > shared_count( P p, sp_inplace_tag< D >, A a ): pi_( 0 ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + typedef sp_counted_impl_pda< P, D, A > impl_type; + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + typedef typename std::allocator_traits::template rebind_alloc< impl_type > A2; + +#else + + typedef typename A::template rebind< impl_type >::other A2; + +#endif + + A2 a2( a ); + +#ifndef BOOST_NO_EXCEPTIONS + + try + { +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + impl_type * pi = std::allocator_traits::allocate( a2, 1 ); + pi_ = pi; + std::allocator_traits::construct( a2, pi, p, a ); + +#else + + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + ::new( static_cast< void* >( pi_ ) ) impl_type( p, a ); + +#endif + } + catch(...) + { + D::operator_fn( p ); + + if( pi_ != 0 ) + { + a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); + } + + throw; + } + +#else + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + impl_type * pi = std::allocator_traits::allocate( a2, 1 ); + pi_ = pi; + +#else + + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + +#endif + + if( pi_ != 0 ) + { +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + std::allocator_traits::construct( a2, pi, p, a ); + +#else + + ::new( static_cast< void* >( pi_ ) ) impl_type( p, a ); + +#endif + } + else + { + D::operator_fn( p ); + boost::throw_exception( std::bad_alloc() ); + } + +#endif // #ifndef BOOST_NO_EXCEPTIONS + } + +#endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) + +#ifndef BOOST_NO_AUTO_PTR + + // auto_ptr is special cased to provide the strong guarantee + + template + explicit shared_count( std::auto_ptr & r ): pi_( new sp_counted_impl_p( r.get() ) ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { +#ifdef BOOST_NO_EXCEPTIONS + + if( pi_ == 0 ) + { + boost::throw_exception(std::bad_alloc()); + } + +#endif + + r.release(); + } + +#endif + +#if !defined( BOOST_NO_CXX11_SMART_PTR ) + + template + explicit shared_count( std::unique_ptr & r ): pi_( 0 ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + typedef typename sp_convert_reference::type D2; + + D2 d2( r.get_deleter() ); + pi_ = new sp_counted_impl_pd< typename std::unique_ptr::pointer, D2 >( r.get(), d2 ); + +#ifdef BOOST_NO_EXCEPTIONS + + if( pi_ == 0 ) + { + boost::throw_exception( std::bad_alloc() ); + } + +#endif + + r.release(); + } + +#endif + + template + explicit shared_count( boost::movelib::unique_ptr & r ): pi_( 0 ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + typedef typename sp_convert_reference::type D2; + + D2 d2( r.get_deleter() ); + pi_ = new sp_counted_impl_pd< typename boost::movelib::unique_ptr::pointer, D2 >( r.get(), d2 ); + +#ifdef BOOST_NO_EXCEPTIONS + + if( pi_ == 0 ) + { + boost::throw_exception( std::bad_alloc() ); + } + +#endif + + r.release(); + } + + ~shared_count() // nothrow + { + if( pi_ != 0 ) pi_->release(); +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + id_ = 0; +#endif + } + + shared_count(shared_count const & r): pi_(r.pi_) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + if( pi_ != 0 ) pi_->add_ref_copy(); + } + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + shared_count(shared_count && r): pi_(r.pi_) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + r.pi_ = 0; + } + +#endif + + explicit shared_count(weak_count const & r); // throws bad_weak_ptr when r.use_count() == 0 + shared_count( weak_count const & r, sp_nothrow_tag ); // constructs an empty *this when r.use_count() == 0 + + shared_count & operator= (shared_count const & r) // nothrow + { + sp_counted_base * tmp = r.pi_; + + if( tmp != pi_ ) + { + if( tmp != 0 ) tmp->add_ref_copy(); + if( pi_ != 0 ) pi_->release(); + pi_ = tmp; + } + + return *this; + } + + void swap(shared_count & r) // nothrow + { + sp_counted_base * tmp = r.pi_; + r.pi_ = pi_; + pi_ = tmp; + } + + long use_count() const // nothrow + { + return pi_ != 0? pi_->use_count(): 0; + } + + bool unique() const // nothrow + { + return use_count() == 1; + } + + bool empty() const // nothrow + { + return pi_ == 0; + } + + friend inline bool operator==(shared_count const & a, shared_count const & b) + { + return a.pi_ == b.pi_; + } + + friend inline bool operator<(shared_count const & a, shared_count const & b) + { + return std::less()( a.pi_, b.pi_ ); + } + + void * get_deleter( sp_typeinfo const & ti ) const + { + return pi_? pi_->get_deleter( ti ): 0; + } + + void * get_untyped_deleter() const + { + return pi_? pi_->get_untyped_deleter(): 0; + } +}; + + +class weak_count +{ +private: + + sp_counted_base * pi_; + +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + int id_; +#endif + + friend class shared_count; + +public: + + weak_count(): pi_(0) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(weak_count_id) +#endif + { + } + + weak_count(shared_count const & r): pi_(r.pi_) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(weak_count_id) +#endif + { + if(pi_ != 0) pi_->weak_add_ref(); + } + + weak_count(weak_count const & r): pi_(r.pi_) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(weak_count_id) +#endif + { + if(pi_ != 0) pi_->weak_add_ref(); + } + +// Move support + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + weak_count(weak_count && r): pi_(r.pi_) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(weak_count_id) +#endif + { + r.pi_ = 0; + } + +#endif + + ~weak_count() // nothrow + { + if(pi_ != 0) pi_->weak_release(); +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + id_ = 0; +#endif + } + + weak_count & operator= (shared_count const & r) // nothrow + { + sp_counted_base * tmp = r.pi_; + + if( tmp != pi_ ) + { + if(tmp != 0) tmp->weak_add_ref(); + if(pi_ != 0) pi_->weak_release(); + pi_ = tmp; + } + + return *this; + } + + weak_count & operator= (weak_count const & r) // nothrow + { + sp_counted_base * tmp = r.pi_; + + if( tmp != pi_ ) + { + if(tmp != 0) tmp->weak_add_ref(); + if(pi_ != 0) pi_->weak_release(); + pi_ = tmp; + } + + return *this; + } + + void swap(weak_count & r) // nothrow + { + sp_counted_base * tmp = r.pi_; + r.pi_ = pi_; + pi_ = tmp; + } + + long use_count() const // nothrow + { + return pi_ != 0? pi_->use_count(): 0; + } + + bool empty() const // nothrow + { + return pi_ == 0; + } + + friend inline bool operator==(weak_count const & a, weak_count const & b) + { + return a.pi_ == b.pi_; + } + + friend inline bool operator<(weak_count const & a, weak_count const & b) + { + return std::less()(a.pi_, b.pi_); + } +}; + +inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif +{ + if( pi_ == 0 || !pi_->add_ref_lock() ) + { + boost::throw_exception( boost::bad_weak_ptr() ); + } +} + +inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( r.pi_ ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif +{ + if( pi_ != 0 && !pi_->add_ref_lock() ) + { + pi_ = 0; + } +} + +} // namespace detail + +} // namespace boost + +#if defined( BOOST_SP_DISABLE_DEPRECATED ) +#pragma GCC diagnostic pop +#endif + +#ifdef __BORLANDC__ +# pragma warn .8027 // Functions containing try are not expanded inline +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_convertible.hpp b/contrib/src/boost/smart_ptr/detail/sp_convertible.hpp new file mode 100644 index 0000000..4bba9ed --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_convertible.hpp @@ -0,0 +1,92 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_convertible.hpp +// +// Copyright 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( BOOST_NO_SFINAE ) +# define BOOST_SP_NO_SP_CONVERTIBLE +#endif + +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ < 303 ) +# define BOOST_SP_NO_SP_CONVERTIBLE +#endif + +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x630 ) +# define BOOST_SP_NO_SP_CONVERTIBLE +#endif + +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + +namespace boost +{ + +namespace detail +{ + +template< class Y, class T > struct sp_convertible +{ + typedef char (&yes) [1]; + typedef char (&no) [2]; + + static yes f( T* ); + static no f( ... ); + + enum _vt { value = sizeof( (f)( static_cast(0) ) ) == sizeof(yes) }; +}; + +template< class Y, class T > struct sp_convertible< Y, T[] > +{ + enum _vt { value = false }; +}; + +template< class Y, class T > struct sp_convertible< Y[], T[] > +{ + enum _vt { value = sp_convertible< Y[1], T[1] >::value }; +}; + +template< class Y, std::size_t N, class T > struct sp_convertible< Y[N], T[] > +{ + enum _vt { value = sp_convertible< Y[1], T[1] >::value }; +}; + +struct sp_empty +{ +}; + +template< bool > struct sp_enable_if_convertible_impl; + +template<> struct sp_enable_if_convertible_impl +{ + typedef sp_empty type; +}; + +template<> struct sp_enable_if_convertible_impl +{ +}; + +template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value > +{ +}; + +} // namespace detail + +} // namespace boost + +#endif // !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base.hpp new file mode 100644 index 0000000..0addf07 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base.hpp @@ -0,0 +1,93 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base.hpp +// +// Copyright 2005-2013 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include + +#if defined( __clang__ ) && defined( __has_extension ) +# if __has_extension( __c_atomic__ ) +# define BOOST_SP_HAS_CLANG_C11_ATOMICS +# endif +#endif + +#if defined( BOOST_SP_DISABLE_THREADS ) +# include + +#elif defined( BOOST_SP_USE_STD_ATOMIC ) +# include + +#elif defined( BOOST_SP_USE_SPINLOCK ) +# include + +#elif defined( BOOST_SP_USE_PTHREADS ) +# include + +#elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 ) +# include + +#elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS ) +# include + +#elif defined( __SNC__ ) +# include + +#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) && !defined(__PATHSCALE__) +# include + +#elif defined(__HP_aCC) && defined(__ia64) +# include + +#elif defined( __GNUC__ ) && defined( __ia64__ ) && !defined( __INTEL_COMPILER ) && !defined(__PATHSCALE__) +# include + +#elif defined( __IBMCPP__ ) && defined( __powerpc ) +# include + +#elif defined( __MWERKS__ ) && defined( __POWERPC__ ) +# include + +#elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX ) +# include + +#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) +# include + +#elif defined( BOOST_SP_HAS_SYNC ) +# include + +#elif defined(__GNUC__) && ( defined( __sparcv9 ) || ( defined( __sparcv8 ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 402 ) ) ) +# include + +#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__) +# include + +#elif defined( _AIX ) +# include + +#elif !defined( BOOST_HAS_THREADS ) +# include + +#else +# include + +#endif + +#undef BOOST_SP_HAS_CLANG_C11_ATOMICS + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp new file mode 100644 index 0000000..cebc243 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp @@ -0,0 +1,151 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED + +// +// detail/sp_counted_base_acc_ia64.hpp - aC++ on HP-UX IA64 +// +// Copyright 2007 Baruch Zilber +// Copyright 2007 Boris Gubenko +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// + +#include +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( int * pw ) +{ + // ++*pw; + + _Asm_fetchadd(_FASZ_W, _SEM_REL, pw, +1, _LDHINT_NONE); +} + +inline int atomic_decrement( int * pw ) +{ + // return --*pw; + + int r = static_cast(_Asm_fetchadd(_FASZ_W, _SEM_REL, pw, -1, _LDHINT_NONE)); + if (1 == r) + { + _Asm_mf(); + } + + return r - 1; +} + +inline int atomic_conditional_increment( int * pw ) +{ + // if( *pw != 0 ) ++*pw; + // return *pw; + + int v = *pw; + + for (;;) + { + if (0 == v) + { + return 0; + } + + _Asm_mov_to_ar(_AREG_CCV, + v, + (_UP_CALL_FENCE | _UP_SYS_FENCE | _DOWN_CALL_FENCE | _DOWN_SYS_FENCE)); + int r = static_cast(_Asm_cmpxchg(_SZ_W, _SEM_ACQ, pw, v + 1, _LDHINT_NONE)); + if (r == v) + { + return r + 1; + } + + v = r; + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); // TODO use ld.acq here + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_aix.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_aix.hpp new file mode 100644 index 0000000..fe6c727 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_aix.hpp @@ -0,0 +1,143 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED + +// +// detail/sp_counted_base_aix.hpp +// based on: detail/sp_counted_base_w32.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// Copyright 2006 Michael van der Westhuizen +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// +// Thanks to Ben Hitchings for the #weak + (#shared != 0) +// formulation +// + +#include +#include +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( int32_t* pw ) +{ + // ++*pw; + + fetch_and_add( pw, 1 ); +} + +inline int32_t atomic_decrement( int32_t * pw ) +{ + // return --*pw; + + int32_t originalValue; + + __lwsync(); + originalValue = fetch_and_add( pw, -1 ); + __isync(); + + return (originalValue - 1); +} + +inline int32_t atomic_conditional_increment( int32_t * pw ) +{ + // if( *pw != 0 ) ++*pw; + // return *pw; + + int32_t tmp = fetch_and_add( pw, 0 ); + for( ;; ) + { + if( tmp == 0 ) return 0; + if( compare_and_swap( pw, &tmp, tmp + 1 ) ) return (tmp + 1); + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int32_t use_count_; // #shared + int32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return fetch_and_add( const_cast(&use_count_), 0 ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_clang.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_clang.hpp new file mode 100644 index 0000000..c66b985 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_clang.hpp @@ -0,0 +1,140 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_counted_base_clang.hpp - __c11 clang intrinsics +// +// Copyright (c) 2007, 2013, 2015 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +namespace boost +{ + +namespace detail +{ + +typedef _Atomic( boost::int_least32_t ) atomic_int_least32_t; + +inline void atomic_increment( atomic_int_least32_t * pw ) +{ + __c11_atomic_fetch_add( pw, 1, __ATOMIC_RELAXED ); +} + +inline boost::int_least32_t atomic_decrement( atomic_int_least32_t * pw ) +{ + return __c11_atomic_fetch_sub( pw, 1, __ATOMIC_ACQ_REL ); +} + +inline boost::int_least32_t atomic_conditional_increment( atomic_int_least32_t * pw ) +{ + // long r = *pw; + // if( r != 0 ) ++*pw; + // return r; + + boost::int_least32_t r = __c11_atomic_load( pw, __ATOMIC_RELAXED ); + + for( ;; ) + { + if( r == 0 ) + { + return r; + } + + if( __c11_atomic_compare_exchange_weak( pw, &r, r + 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED ) ) + { + return r; + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + atomic_int_least32_t use_count_; // #shared + atomic_int_least32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base() + { + __c11_atomic_init( &use_count_, 1 ); + __c11_atomic_init( &weak_count_, 1 ); + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return __c11_atomic_load( const_cast< atomic_int_least32_t* >( &use_count_ ), __ATOMIC_ACQUIRE ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp new file mode 100644 index 0000000..6c268e8 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp @@ -0,0 +1,171 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_cw_ppc.hpp - CodeWarrior on PowerPC +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// +// Thanks to Ben Hitchings for the #weak + (#shared != 0) +// formulation +// + +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( register long * pw ) +{ + register int a; + + asm + { +loop: + + lwarx a, 0, pw + addi a, a, 1 + stwcx. a, 0, pw + bne- loop + } +} + +inline long atomic_decrement( register long * pw ) +{ + register int a; + + asm + { + sync + +loop: + + lwarx a, 0, pw + addi a, a, -1 + stwcx. a, 0, pw + bne- loop + + isync + } + + return a; +} + +inline long atomic_conditional_increment( register long * pw ) +{ + register int a; + + asm + { +loop: + + lwarx a, 0, pw + cmpwi a, 0 + beq store + + addi a, a, 1 + +store: + + stwcx. a, 0, pw + bne- loop + } + + return a; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + long use_count_; // #shared + long weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp new file mode 100644 index 0000000..f6e3904 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp @@ -0,0 +1,158 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED + +// +// detail/sp_counted_base_gcc_ia64.hpp - g++ on IA64 +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2006 Peter Dimov +// Copyright 2005 Ben Hutchings +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// + +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( int * pw ) +{ + // ++*pw; + + int tmp; + + // No barrier is required here but fetchadd always has an acquire or + // release barrier associated with it. We choose release as it should be + // cheaper. + __asm__ ("fetchadd4.rel %0=%1,1" : + "=r"(tmp), "=m"(*pw) : + "m"( *pw )); +} + +inline int atomic_decrement( int * pw ) +{ + // return --*pw; + + int rv; + + __asm__ (" fetchadd4.rel %0=%1,-1 ;; \n" + " cmp.eq p7,p0=1,%0 ;; \n" + "(p7) ld4.acq %0=%1 " : + "=&r"(rv), "=m"(*pw) : + "m"( *pw ) : + "p7"); + + return rv; +} + +inline int atomic_conditional_increment( int * pw ) +{ + // if( *pw != 0 ) ++*pw; + // return *pw; + + int rv, tmp, tmp2; + + __asm__ ("0: ld4 %0=%3 ;; \n" + " cmp.eq p7,p0=0,%0 ;; \n" + "(p7) br.cond.spnt 1f \n" + " mov ar.ccv=%0 \n" + " add %1=1,%0 ;; \n" + " cmpxchg4.acq %2=%3,%1,ar.ccv ;; \n" + " cmp.ne p7,p0=%0,%2 ;; \n" + "(p7) br.cond.spnt 0b \n" + " mov %0=%1 ;; \n" + "1:" : + "=&r"(rv), "=&r"(tmp), "=&r"(tmp2), "=m"(*pw) : + "m"( *pw ) : + "ar.ccv", "p7"); + + return rv; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); // TODO use ld.acq here + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp new file mode 100644 index 0000000..545c8ae --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp @@ -0,0 +1,182 @@ +#ifndef BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED +#define BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_gcc_mips.hpp - g++ on MIPS +// +// Copyright (c) 2009, Spirent Communications, Inc. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// + +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( int * pw ) +{ + // ++*pw; + + int tmp; + + __asm__ __volatile__ + ( + "0:\n\t" + ".set push\n\t" + ".set mips2\n\t" + "ll %0, %1\n\t" + "addiu %0, 1\n\t" + "sc %0, %1\n\t" + ".set pop\n\t" + "beqz %0, 0b": + "=&r"( tmp ), "=m"( *pw ): + "m"( *pw ) + ); +} + +inline int atomic_decrement( int * pw ) +{ + // return --*pw; + + int rv, tmp; + + __asm__ __volatile__ + ( + "0:\n\t" + ".set push\n\t" + ".set mips2\n\t" + "ll %1, %2\n\t" + "addiu %0, %1, -1\n\t" + "sc %0, %2\n\t" + ".set pop\n\t" + "beqz %0, 0b\n\t" + "addiu %0, %1, -1": + "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ): + "m"( *pw ): + "memory" + ); + + return rv; +} + +inline int atomic_conditional_increment( int * pw ) +{ + // if( *pw != 0 ) ++*pw; + // return *pw; + + int rv, tmp; + + __asm__ __volatile__ + ( + "0:\n\t" + ".set push\n\t" + ".set mips2\n\t" + "ll %0, %2\n\t" + "beqz %0, 1f\n\t" + "addiu %1, %0, 1\n\t" + "sc %1, %2\n\t" + ".set pop\n\t" + "beqz %1, 0b\n\t" + "addiu %0, %0, 1\n\t" + "1:": + "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ): + "m"( *pw ): + "memory" + ); + + return rv; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp new file mode 100644 index 0000000..2e5bc0e --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp @@ -0,0 +1,182 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_gcc_ppc.hpp - g++ on PowerPC +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// +// Thanks to Ben Hitchings for the #weak + (#shared != 0) +// formulation +// + +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( int * pw ) +{ + // ++*pw; + + int tmp; + + __asm__ + ( + "0:\n\t" + "lwarx %1, 0, %2\n\t" + "addi %1, %1, 1\n\t" + "stwcx. %1, 0, %2\n\t" + "bne- 0b": + + "=m"( *pw ), "=&b"( tmp ): + "r"( pw ), "m"( *pw ): + "cc" + ); +} + +inline int atomic_decrement( int * pw ) +{ + // return --*pw; + + int rv; + + __asm__ __volatile__ + ( + "sync\n\t" + "0:\n\t" + "lwarx %1, 0, %2\n\t" + "addi %1, %1, -1\n\t" + "stwcx. %1, 0, %2\n\t" + "bne- 0b\n\t" + "isync": + + "=m"( *pw ), "=&b"( rv ): + "r"( pw ), "m"( *pw ): + "memory", "cc" + ); + + return rv; +} + +inline int atomic_conditional_increment( int * pw ) +{ + // if( *pw != 0 ) ++*pw; + // return *pw; + + int rv; + + __asm__ + ( + "0:\n\t" + "lwarx %1, 0, %2\n\t" + "cmpwi %1, 0\n\t" + "beq 1f\n\t" + "addi %1, %1, 1\n\t" + "1:\n\t" + "stwcx. %1, 0, %2\n\t" + "bne- 0b": + + "=m"( *pw ), "=&b"( rv ): + "r"( pw ), "m"( *pw ): + "cc" + ); + + return rv; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp new file mode 100644 index 0000000..c6d20ce --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp @@ -0,0 +1,167 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_counted_base_gcc_sparc.hpp - g++ on Sparc V8+ +// +// Copyright (c) 2006 Piotr Wyderski +// Copyright (c) 2006 Tomas Puverle +// Copyright (c) 2006 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// Thanks to Michael van der Westhuizen + +#include +#include // int32_t + +namespace boost +{ + +namespace detail +{ + +inline int32_t compare_and_swap( int32_t * dest_, int32_t compare_, int32_t swap_ ) +{ + __asm__ __volatile__( "cas [%1], %2, %0" + : "+r" (swap_) + : "r" (dest_), "r" (compare_) + : "memory" ); + + return swap_; +} + +inline int32_t atomic_fetch_and_add( int32_t * pw, int32_t dv ) +{ + // long r = *pw; + // *pw += dv; + // return r; + + for( ;; ) + { + int32_t r = *pw; + + if( __builtin_expect((compare_and_swap(pw, r, r + dv) == r), 1) ) + { + return r; + } + } +} + +inline void atomic_increment( int32_t * pw ) +{ + atomic_fetch_and_add( pw, 1 ); +} + +inline int32_t atomic_decrement( int32_t * pw ) +{ + return atomic_fetch_and_add( pw, -1 ); +} + +inline int32_t atomic_conditional_increment( int32_t * pw ) +{ + // long r = *pw; + // if( r != 0 ) ++*pw; + // return r; + + for( ;; ) + { + int32_t r = *pw; + + if( r == 0 ) + { + return r; + } + + if( __builtin_expect( ( compare_and_swap( pw, r, r + 1 ) == r ), 1 ) ) + { + return r; + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int32_t use_count_; // #shared + int32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return const_cast< int32_t const volatile & >( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp new file mode 100644 index 0000000..173dce5 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp @@ -0,0 +1,174 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_gcc_x86.hpp - g++ on 486+ or AMD64 +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// +// Thanks to Ben Hitchings for the #weak + (#shared != 0) +// formulation +// + +#include + +namespace boost +{ + +namespace detail +{ + +inline int atomic_exchange_and_add( int * pw, int dv ) +{ + // int r = *pw; + // *pw += dv; + // return r; + + int r; + + __asm__ __volatile__ + ( + "lock\n\t" + "xadd %1, %0": + "=m"( *pw ), "=r"( r ): // outputs (%0, %1) + "m"( *pw ), "1"( dv ): // inputs (%2, %3 == %1) + "memory", "cc" // clobbers + ); + + return r; +} + +inline void atomic_increment( int * pw ) +{ + //atomic_exchange_and_add( pw, 1 ); + + __asm__ + ( + "lock\n\t" + "incl %0": + "=m"( *pw ): // output (%0) + "m"( *pw ): // input (%1) + "cc" // clobbers + ); +} + +inline int atomic_conditional_increment( int * pw ) +{ + // int rv = *pw; + // if( rv != 0 ) ++*pw; + // return rv; + + int rv, tmp; + + __asm__ + ( + "movl %0, %%eax\n\t" + "0:\n\t" + "test %%eax, %%eax\n\t" + "je 1f\n\t" + "movl %%eax, %2\n\t" + "incl %2\n\t" + "lock\n\t" + "cmpxchgl %2, %0\n\t" + "jne 0b\n\t" + "1:": + "=m"( *pw ), "=&a"( rv ), "=&r"( tmp ): // outputs (%0, %1, %2) + "m"( *pw ): // input (%3) + "cc" // clobbers + ); + + return rv; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_nt.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_nt.hpp new file mode 100644 index 0000000..5c901f9 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_nt.hpp @@ -0,0 +1,108 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_nt.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +namespace boost +{ + +namespace detail +{ + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + long use_count_; // #shared + long weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + ++use_count_; + } + + bool add_ref_lock() // true on success + { + if( use_count_ == 0 ) return false; + ++use_count_; + return true; + } + + void release() // nothrow + { + if( --use_count_ == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + ++weak_count_; + } + + void weak_release() // nothrow + { + if( --weak_count_ == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return use_count_; + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_pt.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_pt.hpp new file mode 100644 index 0000000..a16d2d8 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_pt.hpp @@ -0,0 +1,137 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_pt.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include +#include + +namespace boost +{ + +namespace detail +{ + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + long use_count_; // #shared + long weak_count_; // #weak + (#shared != 0) + + mutable pthread_mutex_t m_; + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { +// HPUX 10.20 / DCE has a nonstandard pthread_mutex_init + +#if defined(__hpux) && defined(_DECTHREADS_) + BOOST_VERIFY( pthread_mutex_init( &m_, pthread_mutexattr_default ) == 0 ); +#else + BOOST_VERIFY( pthread_mutex_init( &m_, 0 ) == 0 ); +#endif + } + + virtual ~sp_counted_base() // nothrow + { + BOOST_VERIFY( pthread_mutex_destroy( &m_ ) == 0 ); + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + ++use_count_; + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + } + + bool add_ref_lock() // true on success + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + bool r = use_count_ == 0? false: ( ++use_count_, true ); + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + return r; + } + + void release() // nothrow + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + long new_use_count = --use_count_; + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + + if( new_use_count == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + ++weak_count_; + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + } + + void weak_release() // nothrow + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + long new_weak_count = --weak_count_; + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + + if( new_weak_count == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + long r = use_count_; + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + + return r; + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp new file mode 100644 index 0000000..56ed79f --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp @@ -0,0 +1,162 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_counted_base_gcc_sparc.hpp - g++ on Sparc V8+ +// +// Copyright (c) 2006 Piotr Wyderski +// Copyright (c) 2006 Tomas Puverle +// Copyright (c) 2006 Peter Dimov +// Copyright (c) 2011 Emil Dotchevski +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// Thanks to Michael van der Westhuizen + +#include +#include // uint32_t + +namespace boost +{ + +namespace detail +{ + +inline uint32_t compare_and_swap( uint32_t * dest_, uint32_t compare_, uint32_t swap_ ) +{ + return __builtin_cellAtomicCompareAndSwap32(dest_,compare_,swap_); +} + +inline uint32_t atomic_fetch_and_add( uint32_t * pw, uint32_t dv ) +{ + // long r = *pw; + // *pw += dv; + // return r; + + for( ;; ) + { + uint32_t r = *pw; + + if( __builtin_expect((compare_and_swap(pw, r, r + dv) == r), 1) ) + { + return r; + } + } +} + +inline void atomic_increment( uint32_t * pw ) +{ + (void) __builtin_cellAtomicIncr32( pw ); +} + +inline uint32_t atomic_decrement( uint32_t * pw ) +{ + return __builtin_cellAtomicDecr32( pw ); +} + +inline uint32_t atomic_conditional_increment( uint32_t * pw ) +{ + // long r = *pw; + // if( r != 0 ) ++*pw; + // return r; + + for( ;; ) + { + uint32_t r = *pw; + + if( r == 0 ) + { + return r; + } + + if( __builtin_expect( ( compare_and_swap( pw, r, r + 1 ) == r ), 1 ) ) + { + return r; + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + uint32_t use_count_; // #shared + uint32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return const_cast< uint32_t const volatile & >( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_spin.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_spin.hpp new file mode 100644 index 0000000..77734e7 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_spin.hpp @@ -0,0 +1,132 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_spin.hpp - spinlock pool atomic emulation +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include + +namespace boost +{ + +namespace detail +{ + +inline int atomic_exchange_and_add( int * pw, int dv ) +{ + spinlock_pool<1>::scoped_lock lock( pw ); + + int r = *pw; + *pw += dv; + return r; +} + +inline void atomic_increment( int * pw ) +{ + spinlock_pool<1>::scoped_lock lock( pw ); + ++*pw; +} + +inline int atomic_conditional_increment( int * pw ) +{ + spinlock_pool<1>::scoped_lock lock( pw ); + + int rv = *pw; + if( rv != 0 ) ++*pw; + return rv; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + spinlock_pool<1>::scoped_lock lock( &use_count_ ); + return use_count_; + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp new file mode 100644 index 0000000..cab8453 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp @@ -0,0 +1,137 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_counted_base_std_atomic.hpp - C++11 std::atomic +// +// Copyright (c) 2007, 2013 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( std::atomic_int_least32_t * pw ) +{ + pw->fetch_add( 1, std::memory_order_relaxed ); +} + +inline std::int_least32_t atomic_decrement( std::atomic_int_least32_t * pw ) +{ + return pw->fetch_sub( 1, std::memory_order_acq_rel ); +} + +inline std::int_least32_t atomic_conditional_increment( std::atomic_int_least32_t * pw ) +{ + // long r = *pw; + // if( r != 0 ) ++*pw; + // return r; + + std::int_least32_t r = pw->load( std::memory_order_relaxed ); + + for( ;; ) + { + if( r == 0 ) + { + return r; + } + + if( pw->compare_exchange_weak( r, r + 1, std::memory_order_relaxed, std::memory_order_relaxed ) ) + { + return r; + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + std::atomic_int_least32_t use_count_; // #shared + std::atomic_int_least32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return use_count_.load( std::memory_order_acquire ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_sync.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_sync.hpp new file mode 100644 index 0000000..fafed0e --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_sync.hpp @@ -0,0 +1,156 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_counted_base_sync.hpp - g++ 4.1+ __sync intrinsics +// +// Copyright (c) 2007 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +#if defined( __ia64__ ) && defined( __INTEL_COMPILER ) +# include +#endif + +namespace boost +{ + +namespace detail +{ + +#if INT_MAX >= 2147483647 + +typedef int sp_int32_t; + +#else + +typedef long sp_int32_t; + +#endif + +inline void atomic_increment( sp_int32_t * pw ) +{ + __sync_fetch_and_add( pw, 1 ); +} + +inline sp_int32_t atomic_decrement( sp_int32_t * pw ) +{ + return __sync_fetch_and_add( pw, -1 ); +} + +inline sp_int32_t atomic_conditional_increment( sp_int32_t * pw ) +{ + // long r = *pw; + // if( r != 0 ) ++*pw; + // return r; + + sp_int32_t r = *pw; + + for( ;; ) + { + if( r == 0 ) + { + return r; + } + + sp_int32_t r2 = __sync_val_compare_and_swap( pw, r, r + 1 ); + + if( r2 == r ) + { + return r; + } + else + { + r = r2; + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + sp_int32_t use_count_; // #shared + sp_int32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return const_cast< sp_int32_t const volatile & >( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp new file mode 100644 index 0000000..162f309 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp @@ -0,0 +1,151 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED + +// +// detail/sp_counted_base_vacpp_ppc.hpp - xlC(vacpp) on POWER +// based on: detail/sp_counted_base_w32.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// Copyright 2006 Michael van der Westhuizen +// Copyright 2012 IBM Corp. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// +// Thanks to Ben Hitchings for the #weak + (#shared != 0) +// formulation +// + +#include + +extern "builtin" void __lwsync(void); +extern "builtin" void __isync(void); +extern "builtin" int __fetch_and_add(volatile int* addr, int val); +extern "builtin" int __compare_and_swap(volatile int*, int*, int); + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( int *pw ) +{ + // ++*pw; + __lwsync(); + __fetch_and_add(pw, 1); + __isync(); +} + +inline int atomic_decrement( int *pw ) +{ + // return --*pw; + __lwsync(); + int originalValue = __fetch_and_add(pw, -1); + __isync(); + + return (originalValue - 1); +} + +inline int atomic_conditional_increment( int *pw ) +{ + // if( *pw != 0 ) ++*pw; + // return *pw; + + __lwsync(); + int v = *const_cast(pw); + for (;;) + // loop until state is known + { + if (v == 0) return 0; + if (__compare_and_swap(pw, &v, v + 1)) + { + __isync(); return (v + 1); + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + char pad[64] __attribute__((__aligned__(64))); + // pad to prevent false sharing +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return *const_cast(&use_count_); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_base_w32.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_base_w32.hpp new file mode 100644 index 0000000..4ba509c --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_base_w32.hpp @@ -0,0 +1,131 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_w32.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// +// Thanks to Ben Hitchings for the #weak + (#shared != 0) +// formulation +// + +#include +#include +#include + +namespace boost +{ + +namespace detail +{ + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + long use_count_; // #shared + long weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + BOOST_SP_INTERLOCKED_INCREMENT( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + for( ;; ) + { + long tmp = static_cast< long const volatile& >( use_count_ ); + if( tmp == 0 ) return false; + +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1200 ) + + // work around a code generation bug + + long tmp2 = tmp + 1; + if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp2, tmp ) == tmp2 - 1 ) return true; + +#else + + if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp + 1, tmp ) == tmp ) return true; + +#endif + } + } + + void release() // nothrow + { + if( BOOST_SP_INTERLOCKED_DECREMENT( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + BOOST_SP_INTERLOCKED_INCREMENT( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( BOOST_SP_INTERLOCKED_DECREMENT( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_counted_impl.hpp b/contrib/src/boost/smart_ptr/detail/sp_counted_impl.hpp new file mode 100644 index 0000000..1222f3c --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_counted_impl.hpp @@ -0,0 +1,271 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_impl.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#if defined(BOOST_SP_USE_STD_ALLOCATOR) && defined(BOOST_SP_USE_QUICK_ALLOCATOR) +# error BOOST_SP_USE_STD_ALLOCATOR and BOOST_SP_USE_QUICK_ALLOCATOR are incompatible. +#endif + +#include +#include + +#if defined(BOOST_SP_USE_QUICK_ALLOCATOR) +#include +#endif + +#if defined(BOOST_SP_USE_STD_ALLOCATOR) +#include // std::allocator +#endif + +#include // std::size_t + +namespace boost +{ + +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + +void sp_scalar_constructor_hook( void * px, std::size_t size, void * pn ); +void sp_scalar_destructor_hook( void * px, std::size_t size, void * pn ); + +#endif + +namespace detail +{ + +template class sp_counted_impl_p: public sp_counted_base +{ +private: + + X * px_; + + sp_counted_impl_p( sp_counted_impl_p const & ); + sp_counted_impl_p & operator= ( sp_counted_impl_p const & ); + + typedef sp_counted_impl_p this_type; + +public: + + explicit sp_counted_impl_p( X * px ): px_( px ) + { +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + boost::sp_scalar_constructor_hook( px, sizeof(X), this ); +#endif + } + + virtual void dispose() // nothrow + { +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + boost::sp_scalar_destructor_hook( px_, sizeof(X), this ); +#endif + boost::checked_delete( px_ ); + } + + virtual void * get_deleter( sp_typeinfo const & ) + { + return 0; + } + + virtual void * get_untyped_deleter() + { + return 0; + } + +#if defined(BOOST_SP_USE_STD_ALLOCATOR) + + void * operator new( std::size_t ) + { + return std::allocator().allocate( 1, static_cast(0) ); + } + + void operator delete( void * p ) + { + std::allocator().deallocate( static_cast(p), 1 ); + } + +#endif + +#if defined(BOOST_SP_USE_QUICK_ALLOCATOR) + + void * operator new( std::size_t ) + { + return quick_allocator::alloc(); + } + + void operator delete( void * p ) + { + quick_allocator::dealloc( p ); + } + +#endif +}; + +// +// Borland's Codeguard trips up over the -Vx- option here: +// +#ifdef __CODEGUARD__ +# pragma option push -Vx- +#endif + +template class sp_counted_impl_pd: public sp_counted_base +{ +private: + + P ptr; // copy constructor must not throw + D del; // copy constructor must not throw + + sp_counted_impl_pd( sp_counted_impl_pd const & ); + sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & ); + + typedef sp_counted_impl_pd this_type; + +public: + + // pre: d(p) must not throw + + sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d ) + { + } + + sp_counted_impl_pd( P p ): ptr( p ), del() + { + } + + virtual void dispose() // nothrow + { + del( ptr ); + } + + virtual void * get_deleter( sp_typeinfo const & ti ) + { + return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast( del ): 0; + } + + virtual void * get_untyped_deleter() + { + return &reinterpret_cast( del ); + } + +#if defined(BOOST_SP_USE_STD_ALLOCATOR) + + void * operator new( std::size_t ) + { + return std::allocator().allocate( 1, static_cast(0) ); + } + + void operator delete( void * p ) + { + std::allocator().deallocate( static_cast(p), 1 ); + } + +#endif + +#if defined(BOOST_SP_USE_QUICK_ALLOCATOR) + + void * operator new( std::size_t ) + { + return quick_allocator::alloc(); + } + + void operator delete( void * p ) + { + quick_allocator::dealloc( p ); + } + +#endif +}; + +template class sp_counted_impl_pda: public sp_counted_base +{ +private: + + P p_; // copy constructor must not throw + D d_; // copy constructor must not throw + A a_; // copy constructor must not throw + + sp_counted_impl_pda( sp_counted_impl_pda const & ); + sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & ); + + typedef sp_counted_impl_pda this_type; + +public: + + // pre: d( p ) must not throw + + sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a ) + { + } + + sp_counted_impl_pda( P p, A a ): p_( p ), d_( a ), a_( a ) + { + } + + virtual void dispose() // nothrow + { + d_( p_ ); + } + + virtual void destroy() // nothrow + { +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + typedef typename std::allocator_traits::template rebind_alloc< this_type > A2; + +#else + + typedef typename A::template rebind< this_type >::other A2; + +#endif + + A2 a2( a_ ); + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + std::allocator_traits::destroy( a2, this ); + +#else + + this->~this_type(); + +#endif + + a2.deallocate( this, 1 ); + } + + virtual void * get_deleter( sp_typeinfo const & ti ) + { + return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast( d_ ): 0; + } + + virtual void * get_untyped_deleter() + { + return &reinterpret_cast( d_ ); + } +}; + +#ifdef __CODEGUARD__ +# pragma option pop +#endif + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_disable_deprecated.hpp b/contrib/src/boost/smart_ptr/detail/sp_disable_deprecated.hpp new file mode 100644 index 0000000..f79bdf3 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_disable_deprecated.hpp @@ -0,0 +1,40 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_DISABLE_DEPRECATED_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_DISABLE_DEPRECATED_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/smart_ptr/detail/sp_disable_deprecated.hpp +// +// Copyright 2015 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#if defined( __GNUC__ ) && ( defined( __GXX_EXPERIMENTAL_CXX0X__ ) || ( __cplusplus >= 201103L ) ) + +# if defined( BOOST_GCC ) + +# if BOOST_GCC >= 40600 +# define BOOST_SP_DISABLE_DEPRECATED +# endif + +# elif defined( __clang__ ) && defined( __has_warning ) + +# if __has_warning( "-Wdeprecated-declarations" ) +# define BOOST_SP_DISABLE_DEPRECATED +# endif + +# endif + +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_DISABLE_DEPRECATED_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_has_sync.hpp b/contrib/src/boost/smart_ptr/detail/sp_has_sync.hpp new file mode 100644 index 0000000..16de21d --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_has_sync.hpp @@ -0,0 +1,69 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/smart_ptr/detail/sp_has_sync.hpp +// +// Copyright (c) 2008, 2009 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Defines the BOOST_SP_HAS_SYNC macro if the __sync_* intrinsics +// are available. +// + +#ifndef BOOST_SP_NO_SYNC + +#if defined( __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 ) + +# define BOOST_SP_HAS_SYNC + +#elif defined( __IBMCPP__ ) && ( __IBMCPP__ >= 1210 ) + +# define BOOST_SP_HAS_SYNC + +#elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) + +#define BOOST_SP_HAS_SYNC + +#if defined( __arm__ ) || defined( __armel__ ) +#undef BOOST_SP_HAS_SYNC +#endif + +#if defined( __hppa ) || defined( __hppa__ ) +#undef BOOST_SP_HAS_SYNC +#endif + +#if defined( __m68k__ ) +#undef BOOST_SP_HAS_SYNC +#endif + +#if defined( __sh__ ) +#undef BOOST_SP_HAS_SYNC +#endif + +#if defined( __sparc__ ) +#undef BOOST_SP_HAS_SYNC +#endif + +#if defined( __INTEL_COMPILER ) && !defined( __ia64__ ) && ( __INTEL_COMPILER < 1110 ) +#undef BOOST_SP_HAS_SYNC +#endif + +#if defined(__PATHSCALE__) && ((__PATHCC__ == 4) && (__PATHCC_MINOR__ < 9)) +#undef BOOST_SP_HAS_SYNC +#endif + +#endif + +#endif // #ifndef BOOST_SP_NO_SYNC + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_interlocked.hpp b/contrib/src/boost/smart_ptr/detail/sp_interlocked.hpp new file mode 100644 index 0000000..79cae14 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_interlocked.hpp @@ -0,0 +1,163 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/sp_interlocked.hpp +// +// Copyright 2005, 2014 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// + +#include + +// BOOST_SP_HAS_INTRIN_H + +// VC9 has intrin.h, but it collides with +#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600 + +# define BOOST_SP_HAS_INTRIN_H + +// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets. +#elif defined( __MINGW64_VERSION_MAJOR ) + +// MinGW-w64 provides intrin.h for both 32 and 64-bit targets. +# define BOOST_SP_HAS_INTRIN_H + +// Intel C++ on Windows on VC10+ stdlib +#elif defined( BOOST_INTEL_WIN ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520 + +# define BOOST_SP_HAS_INTRIN_H + +#endif + +#if defined( BOOST_USE_WINDOWS_H ) + +# include + +# define BOOST_SP_INTERLOCKED_INCREMENT InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd + +#elif defined( BOOST_USE_INTRIN_H ) || defined( BOOST_SP_HAS_INTRIN_H ) + +#include + +# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd + +#elif defined( _WIN32_WCE ) + +#if _WIN32_WCE >= 0x600 + +extern "C" long __cdecl _InterlockedIncrement( long volatile * ); +extern "C" long __cdecl _InterlockedDecrement( long volatile * ); +extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); +extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); +extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); + +# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd + +#else + +// under Windows CE we still have old-style Interlocked* functions + +extern "C" long __cdecl InterlockedIncrement( long* ); +extern "C" long __cdecl InterlockedDecrement( long* ); +extern "C" long __cdecl InterlockedCompareExchange( long*, long, long ); +extern "C" long __cdecl InterlockedExchange( long*, long ); +extern "C" long __cdecl InterlockedExchangeAdd( long*, long ); + +# define BOOST_SP_INTERLOCKED_INCREMENT InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd + +#endif + +#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) + +#if defined( __CLRCALL_PURE_OR_CDECL ) + +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long ); + +#else + +extern "C" long __cdecl _InterlockedIncrement( long volatile * ); +extern "C" long __cdecl _InterlockedDecrement( long volatile * ); +extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); +extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); +extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); + +# if defined( BOOST_MSVC ) && BOOST_MSVC == 1310 +//From MSDN, Visual Studio .NET 2003 spedific: To declare one of the interlocked functions +//for use as an intrinsic, the function must be declared with the leading underscore and +//the new function must appear in a #pragma intrinsic statement. +# pragma intrinsic( _InterlockedIncrement ) +# pragma intrinsic( _InterlockedDecrement ) +# pragma intrinsic( _InterlockedCompareExchange ) +# pragma intrinsic( _InterlockedExchange ) +# pragma intrinsic( _InterlockedExchangeAdd ) +# endif + +#endif + +# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd + +#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) + +namespace boost +{ + +namespace detail +{ + +extern "C" __declspec(dllimport) long __stdcall InterlockedIncrement( long volatile * ); +extern "C" __declspec(dllimport) long __stdcall InterlockedDecrement( long volatile * ); +extern "C" __declspec(dllimport) long __stdcall InterlockedCompareExchange( long volatile *, long, long ); +extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long volatile *, long ); +extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long volatile *, long ); + +} // namespace detail + +} // namespace boost + +# define BOOST_SP_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd + +#else + +# error "Interlocked intrinsics not available" + +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/sp_nullptr_t.hpp b/contrib/src/boost/smart_ptr/detail/sp_nullptr_t.hpp new file mode 100644 index 0000000..219ae80 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/sp_nullptr_t.hpp @@ -0,0 +1,45 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_nullptr_t.hpp +// +// Copyright 2013 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +namespace boost +{ + +namespace detail +{ + +#if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) ) + + typedef decltype(nullptr) sp_nullptr_t; + +#else + + typedef std::nullptr_t sp_nullptr_t; + +#endif + +} // namespace detail + +} // namespace boost + +#endif // !defined( BOOST_NO_CXX11_NULLPTR ) + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/spinlock.hpp b/contrib/src/boost/smart_ptr/detail/spinlock.hpp new file mode 100644 index 0000000..19f93d7 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/spinlock.hpp @@ -0,0 +1,65 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/spinlock.hpp +// +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// struct spinlock +// { +// void lock(); +// bool try_lock(); +// void unlock(); +// +// class scoped_lock; +// }; +// +// #define BOOST_DETAIL_SPINLOCK_INIT +// + +#include +#include + +#if defined( BOOST_SP_USE_STD_ATOMIC ) +# if !defined( __clang__ ) +# include +# else +// Clang (at least up to 3.4) can't compile spinlock_pool when +// using std::atomic, so substitute the __sync implementation instead. +# include +# endif + +#elif defined( BOOST_SP_USE_PTHREADS ) +# include + +#elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ ) +# include + +#elif defined( BOOST_SP_HAS_SYNC ) +# include + +#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# include + +#elif defined(BOOST_HAS_PTHREADS) +# include + +#elif !defined(BOOST_HAS_THREADS) +# include + +#else +# error Unrecognized threading platform +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/spinlock_gcc_arm.hpp b/contrib/src/boost/smart_ptr/detail/spinlock_gcc_arm.hpp new file mode 100644 index 0000000..24d08a8 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/spinlock_gcc_arm.hpp @@ -0,0 +1,121 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED + +// +// Copyright (c) 2008, 2011 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7S__) + +# define BOOST_SP_ARM_BARRIER "dmb" +# define BOOST_SP_ARM_HAS_LDREX + +#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) + +# define BOOST_SP_ARM_BARRIER "mcr p15, 0, r0, c7, c10, 5" +# define BOOST_SP_ARM_HAS_LDREX + +#else + +# define BOOST_SP_ARM_BARRIER "" + +#endif + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + int v_; + +public: + + bool try_lock() + { + int r; + +#ifdef BOOST_SP_ARM_HAS_LDREX + + __asm__ __volatile__( + "ldrex %0, [%2]; \n" + "cmp %0, %1; \n" + "strexne %0, %1, [%2]; \n" + BOOST_SP_ARM_BARRIER : + "=&r"( r ): // outputs + "r"( 1 ), "r"( &v_ ): // inputs + "memory", "cc" ); + +#else + + __asm__ __volatile__( + "swp %0, %1, [%2];\n" + BOOST_SP_ARM_BARRIER : + "=&r"( r ): // outputs + "r"( 1 ), "r"( &v_ ): // inputs + "memory", "cc" ); + +#endif + + return r == 0; + } + + void lock() + { + for( unsigned k = 0; !try_lock(); ++k ) + { + boost::detail::yield( k ); + } + } + + void unlock() + { + __asm__ __volatile__( BOOST_SP_ARM_BARRIER ::: "memory" ); + *const_cast< int volatile* >( &v_ ) = 0; + __asm__ __volatile__( BOOST_SP_ARM_BARRIER ::: "memory" ); + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} // namespace detail +} // namespace boost + +#define BOOST_DETAIL_SPINLOCK_INIT {0} + +#undef BOOST_SP_ARM_BARRIER +#undef BOOST_SP_ARM_HAS_LDREX + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/spinlock_nt.hpp b/contrib/src/boost/smart_ptr/detail/spinlock_nt.hpp new file mode 100644 index 0000000..1f399d0 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/spinlock_nt.hpp @@ -0,0 +1,89 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + bool locked_; + +public: + + inline bool try_lock() + { + if( locked_ ) + { + return false; + } + else + { + locked_ = true; + return true; + } + } + + inline void lock() + { + BOOST_ASSERT( !locked_ ); + locked_ = true; + } + + inline void unlock() + { + BOOST_ASSERT( locked_ ); + locked_ = false; + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} // namespace detail +} // namespace boost + +#define BOOST_DETAIL_SPINLOCK_INIT { false } + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/spinlock_pool.hpp b/contrib/src/boost/smart_ptr/detail/spinlock_pool.hpp new file mode 100644 index 0000000..39cf180 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/spinlock_pool.hpp @@ -0,0 +1,91 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_POOL_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_POOL_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/spinlock_pool.hpp +// +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// spinlock_pool<0> is reserved for atomic<>, when/if it arrives +// spinlock_pool<1> is reserved for shared_ptr reference counts +// spinlock_pool<2> is reserved for shared_ptr atomic access +// + +#include +#include +#include + +namespace boost +{ + +namespace detail +{ + +template< int M > class spinlock_pool +{ +private: + + static spinlock pool_[ 41 ]; + +public: + + static spinlock & spinlock_for( void const * pv ) + { +#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 + std::size_t i = reinterpret_cast< unsigned long long >( pv ) % 41; +#else + std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41; +#endif + return pool_[ i ]; + } + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( void const * pv ): sp_( spinlock_for( pv ) ) + { + sp_.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +template< int M > spinlock spinlock_pool< M >::pool_[ 41 ] = +{ + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT +}; + +} // namespace detail +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_POOL_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/spinlock_pt.hpp b/contrib/src/boost/smart_ptr/detail/spinlock_pt.hpp new file mode 100644 index 0000000..f9cabfc --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/spinlock_pt.hpp @@ -0,0 +1,79 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_PT_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_PT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + pthread_mutex_t v_; + +public: + + bool try_lock() + { + return pthread_mutex_trylock( &v_ ) == 0; + } + + void lock() + { + pthread_mutex_lock( &v_ ); + } + + void unlock() + { + pthread_mutex_unlock( &v_ ); + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} // namespace detail +} // namespace boost + +#define BOOST_DETAIL_SPINLOCK_INIT { PTHREAD_MUTEX_INITIALIZER } + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_PT_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/spinlock_std_atomic.hpp b/contrib/src/boost/smart_ptr/detail/spinlock_std_atomic.hpp new file mode 100644 index 0000000..a61c1cd --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/spinlock_std_atomic.hpp @@ -0,0 +1,83 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// Copyright (c) 2014 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + std::atomic_flag v_; + +public: + + bool try_lock() + { + return !v_.test_and_set( std::memory_order_acquire ); + } + + void lock() + { + for( unsigned k = 0; !try_lock(); ++k ) + { + boost::detail::yield( k ); + } + } + + void unlock() + { + v_ .clear( std::memory_order_release ); + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} // namespace detail +} // namespace boost + +#define BOOST_DETAIL_SPINLOCK_INIT { ATOMIC_FLAG_INIT } + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/spinlock_sync.hpp b/contrib/src/boost/smart_ptr/detail/spinlock_sync.hpp new file mode 100644 index 0000000..a7145c5 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/spinlock_sync.hpp @@ -0,0 +1,87 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_SYNC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_SYNC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#if defined( __ia64__ ) && defined( __INTEL_COMPILER ) +# include +#endif + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + int v_; + +public: + + bool try_lock() + { + int r = __sync_lock_test_and_set( &v_, 1 ); + return r == 0; + } + + void lock() + { + for( unsigned k = 0; !try_lock(); ++k ) + { + boost::detail::yield( k ); + } + } + + void unlock() + { + __sync_lock_release( &v_ ); + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} // namespace detail +} // namespace boost + +#define BOOST_DETAIL_SPINLOCK_INIT {0} + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_SYNC_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/spinlock_w32.hpp b/contrib/src/boost/smart_ptr/detail/spinlock_w32.hpp new file mode 100644 index 0000000..d34e4fc --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/spinlock_w32.hpp @@ -0,0 +1,113 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_W32_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_W32_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include + +// BOOST_COMPILER_FENCE + +#if defined(__INTEL_COMPILER) + +#define BOOST_COMPILER_FENCE __memory_barrier(); + +#elif defined( _MSC_VER ) && _MSC_VER >= 1310 + +extern "C" void _ReadWriteBarrier(); +#pragma intrinsic( _ReadWriteBarrier ) + +#define BOOST_COMPILER_FENCE _ReadWriteBarrier(); + +#elif defined(__GNUC__) + +#define BOOST_COMPILER_FENCE __asm__ __volatile__( "" : : : "memory" ); + +#else + +#define BOOST_COMPILER_FENCE + +#endif + +// + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + long v_; + +public: + + bool try_lock() + { + long r = BOOST_SP_INTERLOCKED_EXCHANGE( &v_, 1 ); + + BOOST_COMPILER_FENCE + + return r == 0; + } + + void lock() + { + for( unsigned k = 0; !try_lock(); ++k ) + { + boost::detail::yield( k ); + } + } + + void unlock() + { + BOOST_COMPILER_FENCE + *const_cast< long volatile* >( &v_ ) = 0; + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} // namespace detail +} // namespace boost + +#define BOOST_DETAIL_SPINLOCK_INIT {0} + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_W32_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/detail/yield_k.hpp b/contrib/src/boost/smart_ptr/detail/yield_k.hpp new file mode 100644 index 0000000..44d1836 --- /dev/null +++ b/contrib/src/boost/smart_ptr/detail/yield_k.hpp @@ -0,0 +1,177 @@ +#ifndef BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// yield_k.hpp +// +// Copyright (c) 2008 Peter Dimov +// Copyright (c) Microsoft Corporation 2014 +// +// void yield( unsigned k ); +// +// Typical use: +// +// for( unsigned k = 0; !try_lock(); ++k ) yield( k ); +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// + +#include +#include + +#if BOOST_PLAT_WINDOWS_RUNTIME +#include +#endif + +// BOOST_SMT_PAUSE + +#if defined(_MSC_VER) && _MSC_VER >= 1310 && ( defined(_M_IX86) || defined(_M_X64) ) + +extern "C" void _mm_pause(); + +#define BOOST_SMT_PAUSE _mm_pause(); + +#elif defined(__GNUC__) && ( defined(__i386__) || defined(__x86_64__) ) + +#define BOOST_SMT_PAUSE __asm__ __volatile__( "rep; nop" : : : "memory" ); + +#endif + +// + +#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) + +#if defined( BOOST_USE_WINDOWS_H ) +# include +#endif + +namespace boost +{ + +namespace detail +{ + +#if !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME +#if !BOOST_COMP_CLANG || !defined __MINGW32__ + extern "C" void __stdcall Sleep( unsigned long ms ); +#else +#include <_mingw.h> +#if !defined __MINGW64_VERSION_MAJOR + extern "C" void __stdcall Sleep( unsigned long ms ); +#else + extern "C" __declspec(dllimport) void __stdcall Sleep( unsigned long ms ); +#endif +#endif +#endif + +inline void yield( unsigned k ) +{ + if( k < 4 ) + { + } +#if defined( BOOST_SMT_PAUSE ) + else if( k < 16 ) + { + BOOST_SMT_PAUSE + } +#endif +#if !BOOST_PLAT_WINDOWS_RUNTIME + else if( k < 32 ) + { + Sleep( 0 ); + } + else + { + Sleep( 1 ); + } +#else + else + { + // Sleep isn't supported on the Windows Runtime. + std::this_thread::yield(); + } +#endif +} + +} // namespace detail + +} // namespace boost + +#elif defined( BOOST_HAS_PTHREADS ) + +#ifndef _AIX +#include +#else + // AIX's sched.h defines ::var which sometimes conflicts with Lambda's var + extern "C" int sched_yield(void); +#endif + +#include + +namespace boost +{ + +namespace detail +{ + +inline void yield( unsigned k ) +{ + if( k < 4 ) + { + } +#if defined( BOOST_SMT_PAUSE ) + else if( k < 16 ) + { + BOOST_SMT_PAUSE + } +#endif + else if( k < 32 || k & 1 ) + { + sched_yield(); + } + else + { + // g++ -Wextra warns on {} or {0} + struct timespec rqtp = { 0, 0 }; + + // POSIX says that timespec has tv_sec and tv_nsec + // But it doesn't guarantee order or placement + + rqtp.tv_sec = 0; + rqtp.tv_nsec = 1000; + + nanosleep( &rqtp, 0 ); + } +} + +} // namespace detail + +} // namespace boost + +#else + +namespace boost +{ + +namespace detail +{ + +inline void yield( unsigned ) +{ +} + +} // namespace detail + +} // namespace boost + +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED diff --git a/contrib/src/boost/smart_ptr/shared_ptr.hpp b/contrib/src/boost/smart_ptr/shared_ptr.hpp new file mode 100644 index 0000000..47bc33d --- /dev/null +++ b/contrib/src/boost/smart_ptr/shared_ptr.hpp @@ -0,0 +1,1077 @@ +#ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED +#define BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED + +// +// shared_ptr.hpp +// +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001-2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. +// + +#include // for broken compiler workarounds + +// In order to avoid circular dependencies with Boost.TR1 +// we make sure that our include of doesn't try to +// pull in the TR1 headers: that's why we use this header +// rather than including directly: +#include // std::auto_ptr + +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_SP_NO_ATOMIC_ACCESS) +#include +#endif + +#include // for std::swap +#include // for std::less +#include // for std::bad_cast +#include // for std::size_t + +#if !defined(BOOST_NO_IOSTREAM) +#if !defined(BOOST_NO_IOSFWD) +#include // for std::basic_ostream +#else +#include +#endif +#endif + +#if defined( BOOST_SP_DISABLE_DEPRECATED ) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + +namespace boost +{ + +template class shared_ptr; +template class weak_ptr; +template class enable_shared_from_this; +class enable_shared_from_raw; + +namespace movelib +{ + + template< class T, class D > class unique_ptr; + +} // namespace movelib + +namespace detail +{ + +// sp_element, element_type + +template< class T > struct sp_element +{ + typedef T type; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T > struct sp_element< T[] > +{ + typedef T type; +}; + +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + +template< class T, std::size_t N > struct sp_element< T[N] > +{ + typedef T type; +}; + +#endif + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +// sp_dereference, return type of operator* + +template< class T > struct sp_dereference +{ + typedef T & type; +}; + +template<> struct sp_dereference< void > +{ + typedef void type; +}; + +#if !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) + +template<> struct sp_dereference< void const > +{ + typedef void type; +}; + +template<> struct sp_dereference< void volatile > +{ + typedef void type; +}; + +template<> struct sp_dereference< void const volatile > +{ + typedef void type; +}; + +#endif // !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T > struct sp_dereference< T[] > +{ + typedef void type; +}; + +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + +template< class T, std::size_t N > struct sp_dereference< T[N] > +{ + typedef void type; +}; + +#endif + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +// sp_member_access, return type of operator-> + +template< class T > struct sp_member_access +{ + typedef T * type; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T > struct sp_member_access< T[] > +{ + typedef void type; +}; + +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + +template< class T, std::size_t N > struct sp_member_access< T[N] > +{ + typedef void type; +}; + +#endif + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +// sp_array_access, return type of operator[] + +template< class T > struct sp_array_access +{ + typedef void type; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T > struct sp_array_access< T[] > +{ + typedef T & type; +}; + +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + +template< class T, std::size_t N > struct sp_array_access< T[N] > +{ + typedef T & type; +}; + +#endif + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +// sp_extent, for operator[] index check + +template< class T > struct sp_extent +{ + enum _vt { value = 0 }; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T, std::size_t N > struct sp_extent< T[N] > +{ + enum _vt { value = N }; +}; + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +// enable_shared_from_this support + +template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe ) +{ + if( pe != 0 ) + { + pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); + } +} + +template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); + +#ifdef _MANAGED + +// Avoid C4793, ... causes native code generation + +struct sp_any_pointer +{ + template sp_any_pointer( T* ) {} +}; + +inline void sp_enable_shared_from_this( sp_any_pointer, sp_any_pointer, sp_any_pointer ) +{ +} + +#else // _MANAGED + +inline void sp_enable_shared_from_this( ... ) +{ +} + +#endif // _MANAGED + +#if !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_NO_AUTO_PTR ) + +// rvalue auto_ptr support based on a technique by Dave Abrahams + +template< class T, class R > struct sp_enable_if_auto_ptr +{ +}; + +template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > +{ + typedef R type; +}; + +#endif + +// sp_assert_convertible + +template< class Y, class T > inline void sp_assert_convertible() +{ +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + + // static_assert( sp_convertible< Y, T >::value ); + typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ]; + (void)sizeof( tmp ); + +#else + + T* p = static_cast< Y* >( 0 ); + (void)p; + +#endif +} + +// pointer constructor helper + +template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn ) +{ + boost::detail::shared_count( p ).swap( pn ); + boost::detail::sp_enable_shared_from_this( ppx, p, p ); +} + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) +{ + sp_assert_convertible< Y[], T[] >(); + boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); +} + +template< class T, std::size_t N, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) +{ + sp_assert_convertible< Y[N], T[N] >(); + boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); +} + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +// deleter constructor helper + +template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p ) +{ + boost::detail::sp_enable_shared_from_this( ppx, p, p ); +} + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * /*p*/ ) +{ + sp_assert_convertible< Y[], T[] >(); +} + +template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * /*p*/ ) +{ + sp_assert_convertible< Y[N], T[N] >(); +} + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +} // namespace detail + + +// +// shared_ptr +// +// An enhanced relative of scoped_ptr with reference counted copy semantics. +// The object pointed to is deleted when the last shared_ptr pointing to it +// is destroyed or reset. +// + +template class shared_ptr +{ +private: + + // Borland 5.5.1 specific workaround + typedef shared_ptr this_type; + +public: + + typedef typename boost::detail::sp_element< T >::type element_type; + + shared_ptr() BOOST_NOEXCEPT : px( 0 ), pn() // never throws in 1.30+ + { + } + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + + shared_ptr( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT : px( 0 ), pn() // never throws + { + } + +#endif + + template + explicit shared_ptr( Y * p ): px( p ), pn() // Y must be complete + { + boost::detail::sp_pointer_construct( this, p, pn ); + } + + // + // Requirements: D's copy constructor must not throw + // + // shared_ptr will release p by calling d(p) + // + + template shared_ptr( Y * p, D d ): px( p ), pn( p, d ) + { + boost::detail::sp_deleter_construct( this, p ); + } + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + + template shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, d ) + { + } + +#endif + + // As above, but with allocator. A's copy constructor shall not throw. + + template shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) + { + boost::detail::sp_deleter_construct( this, p ); + } + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + + template shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, d, a ) + { + } + +#endif + +// generated copy constructor, destructor are fine... + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +// ... except in C++0x, move disables the implicit copy + + shared_ptr( shared_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) + { + } + +#endif + + template + explicit shared_ptr( weak_ptr const & r ): pn( r.pn ) // may throw + { + boost::detail::sp_assert_convertible< Y, T >(); + + // it is now safe to copy r.px, as pn(r.pn) did not throw + px = r.px; + } + + template + shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag ) + BOOST_NOEXCEPT : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) + { + if( !pn.empty() ) + { + px = r.px; + } + } + + template +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + + shared_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + +#else + + shared_ptr( shared_ptr const & r ) + +#endif + BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) + { + boost::detail::sp_assert_convertible< Y, T >(); + } + + // aliasing + template< class Y > + shared_ptr( shared_ptr const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn ) + { + } + +#ifndef BOOST_NO_AUTO_PTR + + template + explicit shared_ptr( std::auto_ptr & r ): px(r.get()), pn() + { + boost::detail::sp_assert_convertible< Y, T >(); + + Y * tmp = r.get(); + pn = boost::detail::shared_count( r ); + + boost::detail::sp_deleter_construct( this, tmp ); + } + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + template + shared_ptr( std::auto_ptr && r ): px(r.get()), pn() + { + boost::detail::sp_assert_convertible< Y, T >(); + + Y * tmp = r.get(); + pn = boost::detail::shared_count( r ); + + boost::detail::sp_deleter_construct( this, tmp ); + } + +#elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + + template + explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr::type = 0 ): px( r.get() ), pn() + { + typedef typename Ap::element_type Y; + + boost::detail::sp_assert_convertible< Y, T >(); + + Y * tmp = r.get(); + pn = boost::detail::shared_count( r ); + + boost::detail::sp_deleter_construct( this, tmp ); + } + +#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_NO_AUTO_PTR + +#if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + template< class Y, class D > + shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn() + { + boost::detail::sp_assert_convertible< Y, T >(); + + typename std::unique_ptr< Y, D >::pointer tmp = r.get(); + pn = boost::detail::shared_count( r ); + + boost::detail::sp_deleter_construct( this, tmp ); + } + +#endif + + template< class Y, class D > + shared_ptr( boost::movelib::unique_ptr< Y, D > r ): px( r.get() ), pn() + { + boost::detail::sp_assert_convertible< Y, T >(); + + typename boost::movelib::unique_ptr< Y, D >::pointer tmp = r.get(); + pn = boost::detail::shared_count( r ); + + boost::detail::sp_deleter_construct( this, tmp ); + } + + // assignment + + shared_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT + { + this_type(r).swap(*this); + return *this; + } + +#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400) + + template + shared_ptr & operator=(shared_ptr const & r) BOOST_NOEXCEPT + { + this_type(r).swap(*this); + return *this; + } + +#endif + +#ifndef BOOST_NO_AUTO_PTR + + template + shared_ptr & operator=( std::auto_ptr & r ) + { + this_type( r ).swap( *this ); + return *this; + } + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + template + shared_ptr & operator=( std::auto_ptr && r ) + { + this_type( static_cast< std::auto_ptr && >( r ) ).swap( *this ); + return *this; + } + +#elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + + template + typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r ) + { + this_type( r ).swap( *this ); + return *this; + } + +#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_NO_AUTO_PTR + +#if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + template + shared_ptr & operator=( std::unique_ptr && r ) + { + this_type( static_cast< std::unique_ptr && >( r ) ).swap(*this); + return *this; + } + +#endif + + template + shared_ptr & operator=( boost::movelib::unique_ptr r ) + { + // this_type( static_cast< unique_ptr && >( r ) ).swap( *this ); + + boost::detail::sp_assert_convertible< Y, T >(); + + typename boost::movelib::unique_ptr< Y, D >::pointer p = r.get(); + + shared_ptr tmp; + + tmp.px = p; + tmp.pn = boost::detail::shared_count( r ); + + boost::detail::sp_deleter_construct( &tmp, p ); + + tmp.swap( *this ); + + return *this; + } + +// Move support + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + shared_ptr( shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn() + { + pn.swap( r.pn ); + r.px = 0; + } + + template +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + + shared_ptr( shared_ptr && r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + +#else + + shared_ptr( shared_ptr && r ) + +#endif + BOOST_NOEXCEPT : px( r.px ), pn() + { + boost::detail::sp_assert_convertible< Y, T >(); + + pn.swap( r.pn ); + r.px = 0; + } + + shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT + { + this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); + return *this; + } + + template + shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT + { + this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); + return *this; + } + +#endif + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + + shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT // never throws + { + this_type().swap(*this); + return *this; + } + +#endif + + void reset() BOOST_NOEXCEPT // never throws in 1.30+ + { + this_type().swap(*this); + } + + template void reset( Y * p ) // Y must be complete + { + BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors + this_type( p ).swap( *this ); + } + + template void reset( Y * p, D d ) + { + this_type( p, d ).swap( *this ); + } + + template void reset( Y * p, D d, A a ) + { + this_type( p, d, a ).swap( *this ); + } + + template void reset( shared_ptr const & r, element_type * p ) + { + this_type( r, p ).swap( *this ); + } + + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + typename boost::detail::sp_dereference< T >::type operator* () const + { + BOOST_ASSERT( px != 0 ); + return *px; + } + + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + typename boost::detail::sp_member_access< T >::type operator-> () const + { + BOOST_ASSERT( px != 0 ); + return px; + } + + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const + { + BOOST_ASSERT( px != 0 ); + BOOST_ASSERT( i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 ) ); + + return static_cast< typename boost::detail::sp_array_access< T >::type >( px[ i ] ); + } + + element_type * get() const BOOST_NOEXCEPT + { + return px; + } + +// implicit conversion to "bool" +#include + + bool unique() const BOOST_NOEXCEPT + { + return pn.unique(); + } + + long use_count() const BOOST_NOEXCEPT + { + return pn.use_count(); + } + + void swap( shared_ptr & other ) BOOST_NOEXCEPT + { + std::swap(px, other.px); + pn.swap(other.pn); + } + + template bool owner_before( shared_ptr const & rhs ) const BOOST_NOEXCEPT + { + return pn < rhs.pn; + } + + template bool owner_before( weak_ptr const & rhs ) const BOOST_NOEXCEPT + { + return pn < rhs.pn; + } + + void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_NOEXCEPT + { + return pn.get_deleter( ti ); + } + + void * _internal_get_untyped_deleter() const BOOST_NOEXCEPT + { + return pn.get_untyped_deleter(); + } + + bool _internal_equiv( shared_ptr const & r ) const BOOST_NOEXCEPT + { + return px == r.px && pn == r.pn; + } + +// Tasteless as this may seem, making all members public allows member templates +// to work in the absence of member template friends. (Matthew Langston) + +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + +private: + + template friend class shared_ptr; + template friend class weak_ptr; + + +#endif + + element_type * px; // contained pointer + boost::detail::shared_count pn; // reference counter + +}; // shared_ptr + +template inline bool operator==(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT +{ + return a.get() == b.get(); +} + +template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT +{ + return a.get() != b.get(); +} + +#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96 + +// Resolve the ambiguity between our op!= and the one in rel_ops + +template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT +{ + return a.get() != b.get(); +} + +#endif + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +template inline bool operator==( shared_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr const & p ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template inline bool operator!=( shared_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +template inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr const & p ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +#endif + +template inline bool operator<(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT +{ + return a.owner_before( b ); +} + +template inline void swap(shared_ptr & a, shared_ptr & b) BOOST_NOEXCEPT +{ + a.swap(b); +} + +template shared_ptr static_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT +{ + (void) static_cast< T* >( static_cast< U* >( 0 ) ); + + typedef typename shared_ptr::element_type E; + + E * p = static_cast< E* >( r.get() ); + return shared_ptr( r, p ); +} + +template shared_ptr const_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT +{ + (void) const_cast< T* >( static_cast< U* >( 0 ) ); + + typedef typename shared_ptr::element_type E; + + E * p = const_cast< E* >( r.get() ); + return shared_ptr( r, p ); +} + +template shared_ptr dynamic_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT +{ + (void) dynamic_cast< T* >( static_cast< U* >( 0 ) ); + + typedef typename shared_ptr::element_type E; + + E * p = dynamic_cast< E* >( r.get() ); + return p? shared_ptr( r, p ): shared_ptr(); +} + +template shared_ptr reinterpret_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT +{ + (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) ); + + typedef typename shared_ptr::element_type E; + + E * p = reinterpret_cast< E* >( r.get() ); + return shared_ptr( r, p ); +} + +// get_pointer() enables boost::mem_fn to recognize shared_ptr + +template inline typename shared_ptr::element_type * get_pointer(shared_ptr const & p) BOOST_NOEXCEPT +{ + return p.get(); +} + +// operator<< + +#if !defined(BOOST_NO_IOSTREAM) + +#if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( defined(__GNUC__) && (__GNUC__ < 3) ) + +template std::ostream & operator<< (std::ostream & os, shared_ptr const & p) +{ + os << p.get(); + return os; +} + +#else + +// in STLport's no-iostreams mode no iostream symbols can be used +#ifndef _STLP_NO_IOSTREAMS + +# if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300 && __SGI_STL_PORT) +// MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL +using std::basic_ostream; +template basic_ostream & operator<< (basic_ostream & os, shared_ptr const & p) +# else +template std::basic_ostream & operator<< (std::basic_ostream & os, shared_ptr const & p) +# endif +{ + os << p.get(); + return os; +} + +#endif // _STLP_NO_IOSTREAMS + +#endif // __GNUC__ < 3 + +#endif // !defined(BOOST_NO_IOSTREAM) + +// get_deleter + +namespace detail +{ + +#if ( defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) ) || \ + ( defined(__EDG_VERSION__) && BOOST_WORKAROUND(__EDG_VERSION__, <= 238) ) || \ + ( defined(__HP_aCC) && BOOST_WORKAROUND(__HP_aCC, <= 33500) ) + +// g++ 2.9x doesn't allow static_cast(void *) +// apparently EDG 2.38 and HP aCC A.03.35 also don't accept it + +template D * basic_get_deleter(shared_ptr const & p) +{ + void const * q = p._internal_get_deleter(BOOST_SP_TYPEID(D)); + return const_cast(static_cast(q)); +} + +#else + +template D * basic_get_deleter( shared_ptr const & p ) BOOST_NOEXCEPT +{ + return static_cast( p._internal_get_deleter(BOOST_SP_TYPEID(D)) ); +} + +#endif + +class esft2_deleter_wrapper +{ +private: + + shared_ptr deleter_; + +public: + + esft2_deleter_wrapper() + { + } + + template< class T > void set_deleter( shared_ptr const & deleter ) + { + deleter_ = deleter; + } + + template D* get_deleter() const BOOST_NOEXCEPT + { + return boost::detail::basic_get_deleter( deleter_ ); + } + + template< class T> void operator()( T* ) + { + BOOST_ASSERT( deleter_.use_count() <= 1 ); + deleter_.reset(); + } +}; + +} // namespace detail + +template D * get_deleter( shared_ptr const & p ) BOOST_NOEXCEPT +{ + D *del = boost::detail::basic_get_deleter(p); + + if(del == 0) + { + boost::detail::esft2_deleter_wrapper *del_wrapper = boost::detail::basic_get_deleter(p); +// The following get_deleter method call is fully qualified because +// older versions of gcc (2.95, 3.2.3) fail to compile it when written del_wrapper->get_deleter() + if(del_wrapper) del = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter(); + } + + return del; +} + +// atomic access + +#if !defined(BOOST_SP_NO_ATOMIC_ACCESS) + +template inline bool atomic_is_lock_free( shared_ptr const * /*p*/ ) BOOST_NOEXCEPT +{ + return false; +} + +template shared_ptr atomic_load( shared_ptr const * p ) +{ + boost::detail::spinlock_pool<2>::scoped_lock lock( p ); + return *p; +} + +template inline shared_ptr atomic_load_explicit( shared_ptr const * p, /*memory_order mo*/ int ) +{ + return atomic_load( p ); +} + +template void atomic_store( shared_ptr * p, shared_ptr r ) +{ + boost::detail::spinlock_pool<2>::scoped_lock lock( p ); + p->swap( r ); +} + +template inline void atomic_store_explicit( shared_ptr * p, shared_ptr r, /*memory_order mo*/ int ) +{ + atomic_store( p, r ); // std::move( r ) +} + +template shared_ptr atomic_exchange( shared_ptr * p, shared_ptr r ) +{ + boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); + + sp.lock(); + p->swap( r ); + sp.unlock(); + + return r; // return std::move( r ) +} + +template shared_ptr atomic_exchange_explicit( shared_ptr * p, shared_ptr r, /*memory_order mo*/ int ) +{ + return atomic_exchange( p, r ); // std::move( r ) +} + +template bool atomic_compare_exchange( shared_ptr * p, shared_ptr * v, shared_ptr w ) +{ + boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); + + sp.lock(); + + if( p->_internal_equiv( *v ) ) + { + p->swap( w ); + + sp.unlock(); + + return true; + } + else + { + shared_ptr tmp( *p ); + + sp.unlock(); + + tmp.swap( *v ); + return false; + } +} + +template inline bool atomic_compare_exchange_explicit( shared_ptr * p, shared_ptr * v, shared_ptr w, /*memory_order success*/ int, /*memory_order failure*/ int ) +{ + return atomic_compare_exchange( p, v, w ); // std::move( w ) +} + +#endif // !defined(BOOST_SP_NO_ATOMIC_ACCESS) + +// hash_value + +template< class T > struct hash; + +template< class T > std::size_t hash_value( boost::shared_ptr const & p ) BOOST_NOEXCEPT +{ + return boost::hash< T* >()( p.get() ); +} + +} // namespace boost + +#if defined( BOOST_SP_DISABLE_DEPRECATED ) +#pragma GCC diagnostic pop +#endif + +#endif // #ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED diff --git a/contrib/src/boost/static_assert.hpp b/contrib/src/boost/static_assert.hpp new file mode 100644 index 0000000..07d461d --- /dev/null +++ b/contrib/src/boost/static_assert.hpp @@ -0,0 +1,180 @@ +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/static_assert for documentation. + +/* + Revision history: + 02 August 2000 + Initial version. +*/ + +#ifndef BOOST_STATIC_ASSERT_HPP +#define BOOST_STATIC_ASSERT_HPP + +#include +#include + +#if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) +// +// This is horrible, but it seems to be the only we can shut up the +// "anonymous variadic macros were introduced in C99 [-Wvariadic-macros]" +// warning that get spewed out otherwise in non-C++11 mode. +// +#pragma GCC system_header +#endif + +#ifndef BOOST_NO_CXX11_STATIC_ASSERT +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__) +# else +# define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert( B, Msg ) +# endif +#else +# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) +#endif + +#ifdef __BORLANDC__ +// +// workaround for buggy integral-constant expression support: +#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS +#endif + +#if defined(__GNUC__) && (__GNUC__ == 3) && ((__GNUC_MINOR__ == 3) || (__GNUC_MINOR__ == 4)) +// gcc 3.3 and 3.4 don't produce good error messages with the default version: +# define BOOST_SA_GCC_WORKAROUND +#endif + +// +// If the compiler issues warnings about old C style casts, +// then enable this: +// +#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))) +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) ((__VA_ARGS__) == 0 ? false : true) +# else +# define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) == 0 ? false : true) +# endif +#else +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) (bool)(__VA_ARGS__) +# else +# define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x) +# endif +#endif + +#ifndef BOOST_NO_CXX11_STATIC_ASSERT +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__) +# else +# define BOOST_STATIC_ASSERT( B ) static_assert(B, #B) +# endif +#else + +namespace boost{ + +// HP aCC cannot deal with missing names for template value parameters +template struct STATIC_ASSERTION_FAILURE; + +template <> struct STATIC_ASSERTION_FAILURE { enum { value = 1 }; }; + +// HP aCC cannot deal with missing names for template value parameters +template struct static_assert_test{}; + +} + +// +// Implicit instantiation requires that all member declarations be +// instantiated, but that the definitions are *not* instantiated. +// +// It's not particularly clear how this applies to enum's or typedefs; +// both are described as declarations [7.1.3] and [7.2] in the standard, +// however some compilers use "delayed evaluation" of one or more of +// these when implicitly instantiating templates. We use typedef declarations +// by default, but try defining BOOST_USE_ENUM_STATIC_ASSERT if the enum +// version gets better results from your compiler... +// +// Implementation: +// Both of these versions rely on sizeof(incomplete_type) generating an error +// message containing the name of the incomplete type. We use +// "STATIC_ASSERTION_FAILURE" as the type name here to generate +// an eye catching error message. The result of the sizeof expression is either +// used as an enum initialiser, or as a template argument depending which version +// is in use... +// Note that the argument to the assert is explicitly cast to bool using old- +// style casts: too many compilers currently have problems with static_cast +// when used inside integral constant expressions. +// +#if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS) + +#if defined(BOOST_MSVC) && defined(BOOST_NO_CXX11_VARIADIC_MACROS) +#define BOOST_STATIC_ASSERT( B ) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST ( B ) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__) +#elif defined(BOOST_MSVC) +#define BOOST_STATIC_ASSERT(...) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST (__VA_ARGS__) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__) +#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && defined(BOOST_NO_CXX11_VARIADIC_MACROS) +// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error +// instead of warning in case of failure +# define BOOST_STATIC_ASSERT( B ) \ + typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \ + [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >::value ] +#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && !defined(BOOST_NO_CXX11_VARIADIC_MACROS) +// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error +// instead of warning in case of failure +# define BOOST_STATIC_ASSERT(...) \ + typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \ + [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >::value ] +#elif defined(__sgi) +// special version for SGI MIPSpro compiler +#define BOOST_STATIC_ASSERT( B ) \ + BOOST_STATIC_CONSTANT(bool, \ + BOOST_JOIN(boost_static_assert_test_, __LINE__) = ( B )); \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< \ + BOOST_JOIN(boost_static_assert_test_, __LINE__) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __LINE__) +#elif BOOST_WORKAROUND(__MWERKS__, <= 0x3003) +// special version for CodeWarrior <= 8.x +#define BOOST_STATIC_ASSERT( B ) \ + BOOST_STATIC_CONSTANT(int, \ + BOOST_JOIN(boost_static_assert_test_, __LINE__) = \ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >) ) +#else +// generic version +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT( ... ) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED +# else +# define BOOST_STATIC_ASSERT( B ) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED +# endif +#endif + +#else +// alternative enum based implementation: +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT( ... ) \ + enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ + = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( __VA_ARGS__ ) >) } +# else +# define BOOST_STATIC_ASSERT(B) \ + enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ + = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) } +# endif +#endif +#endif // defined(BOOST_NO_CXX11_STATIC_ASSERT) + +#endif // BOOST_STATIC_ASSERT_HPP + + diff --git a/contrib/src/boost/throw_exception.hpp b/contrib/src/boost/throw_exception.hpp new file mode 100644 index 0000000..aa977df --- /dev/null +++ b/contrib/src/boost/throw_exception.hpp @@ -0,0 +1,102 @@ +#ifndef UUID_AA15E74A856F11E08B8D93F24824019B +#define UUID_AA15E74A856F11E08B8D93F24824019B +#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/throw_exception.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2008-2009 Emil Dotchevski and Reverge Studios, Inc. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// http://www.boost.org/libs/utility/throw_exception.html +// + +#include +#include +#include + +#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) ) +# define BOOST_EXCEPTION_DISABLE +#endif + +#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1310 ) +# define BOOST_EXCEPTION_DISABLE +#endif + +#if !defined( BOOST_EXCEPTION_DISABLE ) +# include +#if !defined(BOOST_THROW_EXCEPTION_CURRENT_FUNCTION) +# include +# define BOOST_THROW_EXCEPTION_CURRENT_FUNCTION BOOST_CURRENT_FUNCTION +#endif +# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_THROW_EXCEPTION_CURRENT_FUNCTION,__FILE__,__LINE__) +#else +# define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x) +#endif + +namespace boost +{ +#ifdef BOOST_NO_EXCEPTIONS + +void throw_exception( std::exception const & e ); // user defined + +#else + +inline void throw_exception_assert_compatibility( std::exception const & ) { } + +template BOOST_NORETURN inline void throw_exception( E const & e ) +{ + //All boost exceptions are required to derive from std::exception, + //to ensure compatibility with BOOST_NO_EXCEPTIONS. + throw_exception_assert_compatibility(e); + +#ifndef BOOST_EXCEPTION_DISABLE + throw enable_current_exception(enable_error_info(e)); +#else + throw e; +#endif +} + +#endif + +#if !defined( BOOST_EXCEPTION_DISABLE ) + namespace + exception_detail + { + template + BOOST_NORETURN + void + throw_exception_( E const & x, char const * current_function, char const * file, int line ) + { + boost::throw_exception( + set_info( + set_info( + set_info( + enable_error_info(x), + throw_function(current_function)), + throw_file(file)), + throw_line(line))); + } + } +#endif +} // namespace boost + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/contrib/src/boost/type_traits/add_const.hpp b/contrib/src/boost/type_traits/add_const.hpp new file mode 100644 index 0000000..a9fb781 --- /dev/null +++ b/contrib/src/boost/type_traits/add_const.hpp @@ -0,0 +1,46 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ADD_CONST_HPP_INCLUDED +#define BOOST_TT_ADD_CONST_HPP_INCLUDED + +#include + +namespace boost { + +// * convert a type T to const type - add_const +// this is not required since the result is always +// the same as "T const", but it does suppress warnings +// from some compilers: + +#if defined(BOOST_MSVC) +// This bogus warning will appear when add_const is applied to a +// const volatile reference because we can't detect const volatile +// references with MSVC6. +# pragma warning(push) +# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored +#endif + + template struct add_const + { + typedef T const type; + }; + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + + template struct add_const + { + typedef T& type; + }; + +} // namespace boost + +#endif // BOOST_TT_ADD_CONST_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/add_lvalue_reference.hpp b/contrib/src/boost/type_traits/add_lvalue_reference.hpp new file mode 100644 index 0000000..41851a1 --- /dev/null +++ b/contrib/src/boost/type_traits/add_lvalue_reference.hpp @@ -0,0 +1,27 @@ +// Copyright 2010 John Maddock + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP +#define BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP + +#include + +namespace boost{ + +template struct add_lvalue_reference +{ + typedef typename boost::add_reference::type type; +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template struct add_lvalue_reference +{ + typedef T& type; +}; +#endif + +} + +#endif // BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP diff --git a/contrib/src/boost/type_traits/add_pointer.hpp b/contrib/src/boost/type_traits/add_pointer.hpp new file mode 100644 index 0000000..745f63a --- /dev/null +++ b/contrib/src/boost/type_traits/add_pointer.hpp @@ -0,0 +1,61 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ADD_POINTER_HPP_INCLUDED +#define BOOST_TT_ADD_POINTER_HPP_INCLUDED + +#include + +namespace boost { + +#if defined(__BORLANDC__) && (__BORLANDC__ < 0x5A0) +// +// For some reason this implementation stops Borlands compiler +// from dropping cv-qualifiers, it still fails with references +// to arrays for some reason though (shrug...) (JM 20021104) +// +template +struct add_pointer +{ + typedef T* type; +}; +template +struct add_pointer +{ + typedef T* type; +}; +template +struct add_pointer +{ + typedef T* type; +}; +template +struct add_pointer +{ + typedef T* type; +}; +template +struct add_pointer +{ + typedef T* type; +}; + +#else + +template +struct add_pointer +{ + typedef typename remove_reference::type no_ref_type; + typedef no_ref_type* type; +}; + +#endif + +} // namespace boost + +#endif // BOOST_TT_ADD_POINTER_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/add_reference.hpp b/contrib/src/boost/type_traits/add_reference.hpp new file mode 100644 index 0000000..526f259 --- /dev/null +++ b/contrib/src/boost/type_traits/add_reference.hpp @@ -0,0 +1,59 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ADD_REFERENCE_HPP_INCLUDED +#define BOOST_TT_ADD_REFERENCE_HPP_INCLUDED + +#include +#include + +namespace boost { + +namespace detail { + +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// + +template +struct add_reference_impl +{ + typedef T& type; +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct add_reference_impl +{ + typedef T&& type; +}; +#endif + +} // namespace detail + +template struct add_reference +{ + typedef typename boost::detail::add_reference_impl::type type; +}; +template struct add_reference +{ + typedef T& type; +}; + +// these full specialisations are always required: +template <> struct add_reference { typedef void type; }; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct add_reference { typedef void type; }; +template <> struct add_reference { typedef void type; }; +template <> struct add_reference { typedef void type; }; +#endif + +} // namespace boost + +#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/add_rvalue_reference.hpp b/contrib/src/boost/type_traits/add_rvalue_reference.hpp new file mode 100644 index 0000000..44ead34 --- /dev/null +++ b/contrib/src/boost/type_traits/add_rvalue_reference.hpp @@ -0,0 +1,64 @@ +// add_rvalue_reference.hpp ---------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP +#define BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP + +#include + +//----------------------------------------------------------------------------// + +#include +#include + +//----------------------------------------------------------------------------// +// // +// C++03 implementation of // +// 20.9.7.2 Reference modifications [meta.trans.ref] // +// Written by Vicente J. Botet Escriba // +// // +// If T names an object or function type then the member typedef type +// shall name T&&; otherwise, type shall name T. [ Note: This rule reflects +// the semantics of reference collapsing. For example, when a type T names +// a type T1&, the type add_rvalue_reference::type is not an rvalue +// reference. -end note ] +//----------------------------------------------------------------------------// + +namespace boost { + +namespace type_traits_detail { + + template + struct add_rvalue_reference_helper + { typedef T type; }; + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template + struct add_rvalue_reference_helper + { + typedef T&& type; + }; +#endif + + template + struct add_rvalue_reference_imp + { + typedef typename boost::type_traits_detail::add_rvalue_reference_helper + ::value == false && is_reference::value == false) >::type type; + }; + +} + +template struct add_rvalue_reference +{ + typedef typename boost::type_traits_detail::add_rvalue_reference_imp::type type; +}; + +} // namespace boost + +#endif // BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP + diff --git a/contrib/src/boost/type_traits/add_volatile.hpp b/contrib/src/boost/type_traits/add_volatile.hpp new file mode 100644 index 0000000..24f515c --- /dev/null +++ b/contrib/src/boost/type_traits/add_volatile.hpp @@ -0,0 +1,40 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ADD_VOLATILE_HPP_INCLUDED +#define BOOST_TT_ADD_VOLATILE_HPP_INCLUDED + +#include + +namespace boost { + +// * convert a type T to volatile type - add_volatile +// this is not required since the result is always +// the same as "T volatile", but it does suppress warnings +// from some compilers: + +#if defined(BOOST_MSVC) +// This bogus warning will appear when add_volatile is applied to a +// const volatile reference because we can't detect const volatile +// references with MSVC6. +# pragma warning(push) +# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored +#endif + +template struct add_volatile{ typedef T volatile type; }; + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +template struct add_volatile{ typedef T& type; }; + +} // namespace boost + +#endif // BOOST_TT_ADD_VOLATILE_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/alignment_of.hpp b/contrib/src/boost/type_traits/alignment_of.hpp new file mode 100644 index 0000000..7d960e3 --- /dev/null +++ b/contrib/src/boost/type_traits/alignment_of.hpp @@ -0,0 +1,119 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED +#define BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED + +#include +#include + +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4121 4512) // alignment is sensitive to packing +#endif +#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#pragma option push -Vx- -Ve- +#endif + +namespace boost { + +template struct alignment_of; + +// get the alignment of some arbitrary type: +namespace detail { + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4324) // structure was padded due to __declspec(align()) +#endif +template +struct alignment_of_hack +{ + char c; + T t; + alignment_of_hack(); +}; +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +template +struct alignment_logic +{ + BOOST_STATIC_CONSTANT(std::size_t, value = A < S ? A : S); +}; + + +template< typename T > +struct alignment_of_impl +{ +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) + // + // With MSVC both the native __alignof operator + // and our own logic gets things wrong from time to time :-( + // Using a combination of the two seems to make the most of a bad job: + // + BOOST_STATIC_CONSTANT(std::size_t, value = + (::boost::detail::alignment_logic< + sizeof(::boost::detail::alignment_of_hack) - sizeof(T), + __alignof(T) + >::value)); +#elif !defined(BOOST_ALIGNMENT_OF) + BOOST_STATIC_CONSTANT(std::size_t, value = + (::boost::detail::alignment_logic< + sizeof(::boost::detail::alignment_of_hack) - sizeof(T), + sizeof(T) + >::value)); +#else + // + // We put this here, rather than in the definition of + // alignment_of below, because MSVC's __alignof doesn't + // always work in that context for some unexplained reason. + // (See type_with_alignment tests for test cases). + // + BOOST_STATIC_CONSTANT(std::size_t, value = BOOST_ALIGNMENT_OF(T)); +#endif +}; + +} // namespace detail + +template struct alignment_of : public integral_constant::value>{}; + +// references have to be treated specially, assume +// that a reference is just a special pointer: +template struct alignment_of : public alignment_of{}; + +#ifdef __BORLANDC__ +// long double gives an incorrect value of 10 (!) +// unless we do this... +struct long_double_wrapper{ long double ld; }; +template<> struct alignment_of : public alignment_of{}; +#endif + +// void has to be treated specially: +template<> struct alignment_of : integral_constant{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template<> struct alignment_of : integral_constant{}; +template<> struct alignment_of : integral_constant{}; +template<> struct alignment_of : integral_constant{}; +#endif + +} // namespace boost + +#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#pragma option pop +#endif +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +#endif // BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED + diff --git a/contrib/src/boost/type_traits/composite_traits.hpp b/contrib/src/boost/type_traits/composite_traits.hpp new file mode 100644 index 0000000..985a4c5 --- /dev/null +++ b/contrib/src/boost/type_traits/composite_traits.hpp @@ -0,0 +1,29 @@ +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// defines traits classes for composite types: +// is_array, is_pointer, is_reference, is_member_pointer, is_enum, is_union. +// + +#ifndef BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED +#define BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED + + + + + diff --git a/contrib/src/boost/type_traits/conditional.hpp b/contrib/src/boost/type_traits/conditional.hpp new file mode 100644 index 0000000..b7e82db --- /dev/null +++ b/contrib/src/boost/type_traits/conditional.hpp @@ -0,0 +1,20 @@ +// (C) Copyright John Maddock 2010. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_CONDITIONAL_HPP_INCLUDED +#define BOOST_TT_CONDITIONAL_HPP_INCLUDED + +namespace boost { + +template struct conditional { typedef T type; }; +template struct conditional { typedef U type; }; + +} // namespace boost + + +#endif // BOOST_TT_CONDITIONAL_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/conversion_traits.hpp b/contrib/src/boost/type_traits/conversion_traits.hpp new file mode 100644 index 0000000..c8e5139 --- /dev/null +++ b/contrib/src/boost/type_traits/conversion_traits.hpp @@ -0,0 +1,17 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) +// Copyright 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED +#define BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED + +#include + +#endif // BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/declval.hpp b/contrib/src/boost/type_traits/declval.hpp new file mode 100644 index 0000000..a050012 --- /dev/null +++ b/contrib/src/boost/type_traits/declval.hpp @@ -0,0 +1,44 @@ +// declval.hpp -------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_TYPE_TRAITS_DECLVAL_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_DECLVAL_HPP_INCLUDED + +#include + +//----------------------------------------------------------------------------// + +#include + +//----------------------------------------------------------------------------// +// // +// C++03 implementation of // +// 20.2.4 Function template declval [declval] // +// Written by Vicente J. Botet Escriba // +// // +// 1 The library provides the function template declval to simplify the +// definition of expressions which occur as unevaluated operands. +// 2 Remarks: If this function is used, the program is ill-formed. +// 3 Remarks: The template parameter T of declval may be an incomplete type. +// [ Example: +// +// template +// decltype(static_cast(declval())) convert(From&&); +// +// declares a function template convert which only participates in overloading +// if the type From can be explicitly converted to type To. For another example +// see class template common_type (20.9.7.6). -end example ] +//----------------------------------------------------------------------------// + +namespace boost { + + template + typename add_rvalue_reference::type declval() BOOST_NOEXCEPT; // as unevaluated operand + +} // namespace boost + +#endif // BOOST_TYPE_TRAITS_DECLVAL_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/detail/config.hpp b/contrib/src/boost/type_traits/detail/config.hpp new file mode 100644 index 0000000..ebb1dd6 --- /dev/null +++ b/contrib/src/boost/type_traits/detail/config.hpp @@ -0,0 +1,72 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_CONFIG_HPP_INCLUDED +#define BOOST_TT_CONFIG_HPP_INCLUDED + +#ifndef BOOST_CONFIG_HPP +#include +#endif +#include +#include + +// +// whenever we have a conversion function with ellipses +// it needs to be declared __cdecl to suppress compiler +// warnings from MS and Borland compilers (this *must* +// appear before we include is_same.hpp below): +#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)) +# define BOOST_TT_DECL __cdecl +#else +# define BOOST_TT_DECL /**/ +#endif + +# if (BOOST_WORKAROUND(__MWERKS__, < 0x3000) \ + || BOOST_WORKAROUND(__IBMCPP__, < 600 ) \ + || BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) \ + || defined(__ghs) \ + || BOOST_WORKAROUND(__HP_aCC, < 60700) \ + || BOOST_WORKAROUND(MPW_CPLUS, BOOST_TESTED_AT(0x890)) \ + || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))) \ + && defined(BOOST_NO_IS_ABSTRACT) + +# define BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION 1 + +#endif + +#ifndef BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION +# define BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION 1 +#endif + +// +// define BOOST_TT_TEST_MS_FUNC_SIGS +// when we want to test __stdcall etc function types with is_function etc +// (Note, does not work with Borland, even though it does support __stdcall etc): +// +#if defined(_MSC_EXTENSIONS) && !defined(__BORLANDC__) +# define BOOST_TT_TEST_MS_FUNC_SIGS +#endif + +// +// define BOOST_TT_NO_CV_FUNC_TEST +// if tests for cv-qualified member functions don't +// work in is_member_function_pointer +// +#if BOOST_WORKAROUND(__MWERKS__, < 0x3000) || BOOST_WORKAROUND(__IBMCPP__, <= 600) +# define BOOST_TT_NO_CV_FUNC_TEST +#endif + +// +// Macros that have been deprecated, defined here for backwards compatibility: +// +#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(x) +#define BOOST_TT_BROKEN_COMPILER_SPEC(x) + +#endif // BOOST_TT_CONFIG_HPP_INCLUDED + + diff --git a/contrib/src/boost/type_traits/detail/has_binary_operator.hpp b/contrib/src/boost/type_traits/detail/has_binary_operator.hpp new file mode 100644 index 0000000..039a6bb --- /dev/null +++ b/contrib/src/boost/type_traits/detail/has_binary_operator.hpp @@ -0,0 +1,222 @@ +// (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// cannot include this header without getting warnings of the kind: +// gcc: +// warning: value computed is not used +// warning: comparison between signed and unsigned integer expressions +// msvc: +// warning C4018: '<' : signed/unsigned mismatch +// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data +// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect +// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) +// warning C4804: '<' : unsafe use of type 'bool' in operation +// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation +// cannot find another implementation -> declared as system header to suppress these warnings. +#if defined(__GNUC__) +# pragma GCC system_header +#elif defined(BOOST_MSVC) +# pragma warning ( push ) +# pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913) +# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +# pragma warning ( disable : 6334) +# endif +#endif + +namespace boost { +namespace detail { + +// This namespace ensures that argument-dependent name lookup does not mess things up. +namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) { + +// 1. a function to have an instance of type T without requiring T to be default +// constructible +template T &make(); + + +// 2. we provide our operator definition for types that do not have one already + +// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is +// found in the type's own namespace (our own operator is used) so that we have +// a means to know that our operator was used +struct no_operator { }; + +// this class allows implicit conversions and makes the following operator +// definition less-preferred than any other such operators that might be found +// via argument-dependent name lookup +struct any { template any(T const&); }; + +// when operator BOOST_TT_TRAIT_OP is not available, this one is used +no_operator operator BOOST_TT_TRAIT_OP (const any&, const any&); + + +// 3. checks if the operator returns void or not +// conditions: Lhs!=void and Rhs!=void + +// we first redefine "operator," so that we have no compilation error if +// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of +// (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if +// operator BOOST_TT_TRAIT_OP returns void or not: +// - operator BOOST_TT_TRAIT_OP returns void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t +// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int +struct returns_void_t { }; +template int operator,(const T&, returns_void_t); +template int operator,(const volatile T&, returns_void_t); + +// this intermediate trait has member value of type bool: +// - value==true -> operator BOOST_TT_TRAIT_OP returns void +// - value==false -> operator BOOST_TT_TRAIT_OP does not return void +template < typename Lhs, typename Rhs > +struct operator_returns_void { + // overloads of function returns_void make the difference + // yes_type and no_type have different size by construction + static ::boost::type_traits::yes_type returns_void(returns_void_t); + static ::boost::type_traits::no_type returns_void(int); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() BOOST_TT_TRAIT_OP make(),returns_void_t()))))); +}; + + +// 4. checks if the return type is Ret or Ret==dont_care +// conditions: Lhs!=void and Rhs!=void + +struct dont_care { }; + +template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > +struct operator_returns_Ret; + +template < typename Lhs, typename Rhs > +struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Lhs, typename Rhs > +struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Lhs, typename Rhs > +struct operator_returns_Ret < Lhs, Rhs, void, true > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Lhs, typename Rhs > +struct operator_returns_Ret < Lhs, Rhs, void, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Lhs, typename Rhs, typename Ret > +struct operator_returns_Ret < Lhs, Rhs, Ret, true > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +// otherwise checks if it is convertible to Ret using the sizeof trick +// based on overload resolution +// condition: Ret!=void and Ret!=dont_care and the operator does not return void +template < typename Lhs, typename Rhs, typename Ret > +struct operator_returns_Ret < Lhs, Rhs, Ret, false > { + static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret + static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise + + BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make() BOOST_TT_TRAIT_OP make()))==sizeof(::boost::type_traits::yes_type))); +}; + + +// 5. checks for operator existence +// condition: Lhs!=void and Rhs!=void + +// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other +// existing one; +// this is done with redefinition of "operator," that returns no_operator or has_operator +struct has_operator { }; +no_operator operator,(no_operator, has_operator); + +template < typename Lhs, typename Rhs > +struct operator_exists { + static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists + static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise + + BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((make() BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); +}; + + +// 6. main trait: to avoid any compilation error, this class behaves +// differently when operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the +// standard. +// Forbidden_if is a bool that is: +// - true when the operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the standard +// (would yield compilation error if used) +// - false otherwise +template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > +struct trait_impl1; + +template < typename Lhs, typename Rhs, typename Ret > +struct trait_impl1 < Lhs, Rhs, Ret, true > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Lhs, typename Rhs, typename Ret > +struct trait_impl1 < Lhs, Rhs, Ret, false > { + BOOST_STATIC_CONSTANT(bool, + value = (operator_exists < Lhs, Rhs >::value && operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value)); +}; + +// some specializations needs to be declared for the special void case +template < typename Rhs, typename Ret > +struct trait_impl1 < void, Rhs, Ret, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Lhs, typename Ret > +struct trait_impl1 < Lhs, void, Ret, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Ret > +struct trait_impl1 < void, void, Ret, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +// defines some typedef for convenience +template < typename Lhs, typename Rhs, typename Ret > +struct trait_impl { + typedef typename ::boost::remove_reference::type Lhs_noref; + typedef typename ::boost::remove_reference::type Rhs_noref; + typedef typename ::boost::remove_cv::type Lhs_nocv; + typedef typename ::boost::remove_cv::type Rhs_nocv; + typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; + typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; + BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value)); +}; + +} // namespace impl +} // namespace detail + +// this is the accessible definition of the trait to end user +template +struct BOOST_TT_TRAIT_NAME : public integral_constant::value)>{}; + +} // namespace boost + +#if defined(BOOST_MSVC) +# pragma warning ( pop ) +#endif diff --git a/contrib/src/boost/type_traits/detail/is_function_ptr_helper.hpp b/contrib/src/boost/type_traits/detail/is_function_ptr_helper.hpp new file mode 100644 index 0000000..3538e40 --- /dev/null +++ b/contrib/src/boost/type_traits/detail/is_function_ptr_helper.hpp @@ -0,0 +1,176 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED +#define BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED + +#if defined(BOOST_TT_PREPROCESSING_MODE) +// +// Hide these #include from dependency analysers as +// these are required in maintenance mode only: +// +#define PP1 +#include PP1 +#undef PP1 +#define PP1 +#include PP1 +#undef PP1 +#define PP1 +#include PP1 +#undef PP1 +#endif + +namespace boost { +namespace type_traits { + +template +struct is_function_ptr_helper +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +#if !defined(BOOST_TT_PREPROCESSING_MODE) +// preprocessor-generated part, don't edit by hand! + +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#else + +#undef BOOST_STATIC_CONSTANT +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (0, 25, "boost/type_traits/detail/is_function_ptr_helper.hpp")) +#include BOOST_PP_ITERATE() + +#endif // BOOST_TT_PREPROCESSING_MODE + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED + +///// iteration + +#else +#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) + +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#endif +#undef BOOST_PP_COUNTER +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/type_traits/detail/is_function_ptr_tester.hpp b/contrib/src/boost/type_traits/detail/is_function_ptr_tester.hpp new file mode 100644 index 0000000..4fe88e8 --- /dev/null +++ b/contrib/src/boost/type_traits/detail/is_function_ptr_tester.hpp @@ -0,0 +1,449 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED +#define BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED + +#include + +#if defined(BOOST_TT_PREPROCESSING_MODE) +// +// Hide include dependencies from analysers since they're +// only require in maintenance mode: +// +#define PP1 +#define PP2 +#define PP3 +#include PP1 +#include PP2 +#include PP3 +#undef PP1 +#undef PP2 +#undef PP3 +#endif + +namespace boost { +namespace type_traits { + +// Note it is acceptable to use ellipsis here, since the argument will +// always be a pointer type of some sort (JM 2005/06/04): +no_type BOOST_TT_DECL is_function_ptr_tester(...); + +#if !defined(BOOST_TT_PREPROCESSING_MODE) +// pre-processed code, don't edit, try GNU cpp with +// cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename + +template +yes_type is_function_ptr_tester(R (*)()); +template +yes_type is_function_ptr_tester(R (*)( ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)()); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)()); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)()); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0)); +template +yes_type is_function_ptr_tester(R (*)( T0 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); +#endif +#else + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (0, 25, "boost/type_traits/detail/is_function_ptr_tester.hpp")) +#include BOOST_PP_ITERATE() + +#endif // BOOST_TT_PREPROCESSING_MODE + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED + +///// iteration + +#else +#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) +#undef __stdcall +#undef __fastcall +#undef __cdecl + +template +yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); +@#endif +@#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); +@#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); +@#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); +@#endif + +#undef BOOST_PP_COUNTER +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp b/contrib/src/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp new file mode 100644 index 0000000..5698a74 --- /dev/null +++ b/contrib/src/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp @@ -0,0 +1,723 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED +#define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED + +#include + +#if defined(BOOST_TT_PREPROCESSING_MODE) +// +// Maintenance mode, hide include dependencies +// from trackers: +// +#define PPI +#include PPI +#undef PPI +#define PPI +#include PPI +#undef PPI +#define PPI +#include PPI +#undef PPI +#endif + +namespace boost { +namespace type_traits { + +template +struct is_mem_fun_pointer_impl +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +#if !defined(BOOST_TT_PREPROCESSING_MODE) +// pre-processed code, don't edit, try GNU cpp with +// cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif + +#else + +#undef BOOST_STATIC_CONSTANT +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_impl.hpp")) +#include BOOST_PP_ITERATE() + +#endif // BOOST_TT_PREPROCESSING_MODE + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED + +///// iteration + +#else +#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#endif + +@#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#endif +@#endif + +#undef BOOST_PP_COUNTER +#endif // BOOST_PP_IS_ITERATING + diff --git a/contrib/src/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp b/contrib/src/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp new file mode 100644 index 0000000..5e31693 --- /dev/null +++ b/contrib/src/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp @@ -0,0 +1,1800 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED +#define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED + +#include +#include + +#if defined(BOOST_TT_PREPROCESSING_MODE) +// +// Maintentance mode, hide include dependencies +// from dependency trackers: +// +#define PPI +#include PPI +#undef PPI +#define PPI +#include PPI +#undef PPI +#define +#include PPI +#undef +#endif + +namespace boost { +namespace type_traits { + +no_type BOOST_TT_DECL is_mem_fun_pointer_tester(...); + +#if !defined(BOOST_TT_PREPROCESSING_MODE) +// pre-processed code, don't edit, try GNU cpp with +// cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)()); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)()); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)()); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)()); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile); + +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); + +#endif + +#else + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_tester.hpp")) +#include BOOST_PP_ITERATE() + +#endif // BOOST_TT_PREPROCESSING_MODE + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED + +///// iteration + +#else +#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) +#undef __stdcall +#undef __fastcall +#undef __cdecl + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); + +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const volatile); +@#endif +@#ifdef BOOST_TT_TEST_MS_FUNC_SIGS // Other calling conventions used by MS compatible compilers: +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); + +@#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); + +@#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); + +@#endif + +#undef BOOST_PP_COUNTER +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/type_traits/detail/yes_no_type.hpp b/contrib/src/boost/type_traits/detail/yes_no_type.hpp new file mode 100644 index 0000000..f583730 --- /dev/null +++ b/contrib/src/boost/type_traits/detail/yes_no_type.hpp @@ -0,0 +1,26 @@ + +// (C) Copyright John Maddock and Steve Cleary 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// macros and helpers for working with integral-constant-expressions. + +#ifndef BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED +#define BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED + +namespace boost { +namespace type_traits { + +typedef char yes_type; +struct no_type +{ + char padding[8]; +}; + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/function_traits.hpp b/contrib/src/boost/type_traits/function_traits.hpp new file mode 100644 index 0000000..26d7e05 --- /dev/null +++ b/contrib/src/boost/type_traits/function_traits.hpp @@ -0,0 +1,174 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED +#define BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED + +#include +#include +#include + +namespace boost { + +namespace detail { + +template struct function_traits_helper; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 0); + typedef R result_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 1); + typedef R result_type; + typedef T1 arg1_type; + typedef T1 argument_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 2); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T1 first_argument_type; + typedef T2 second_argument_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 3); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 4); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 5); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 6); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 7); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 8); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 9); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; + typedef T9 arg9_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 10); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; + typedef T9 arg9_type; + typedef T10 arg10_type; +}; + +} // end namespace detail + +template +struct function_traits : + public boost::detail::function_traits_helper::type> +{ +}; + +} + +#endif // BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/has_minus.hpp b/contrib/src/boost/type_traits/has_minus.hpp new file mode 100644 index 0000000..5e13c16 --- /dev/null +++ b/contrib/src/boost/type_traits/has_minus.hpp @@ -0,0 +1,60 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_MINUS_HPP_INCLUDED +#define BOOST_TT_HAS_MINUS_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_minus +#define BOOST_TT_TRAIT_OP - +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + (! ::boost::is_integral< Rhs_noref >::value )\ + ) || \ + /* Lhs==void* and (Rhs==fundamental or Rhs==pointer) */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_void< Lhs_noptr >::value && \ + ( \ + ::boost::is_fundamental< Rhs_nocv >::value || \ + ::boost::is_pointer< Rhs_noref >::value\ + )\ + ) || \ + /* Rhs==void* and (Lhs==fundamental or Lhs==pointer) */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_void< Rhs_noptr >::value && \ + (\ + ::boost::is_fundamental< Lhs_nocv >::value || \ + ::boost::is_pointer< Lhs_noref >::value\ + )\ + ) ||\ + /* Lhs=fundamental and Rhs=pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + ) ||\ + /* two different pointers */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value && \ + (! ::boost::is_same< Lhs_nocv, Rhs_nocv >::value )\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/contrib/src/boost/type_traits/has_minus_assign.hpp b/contrib/src/boost/type_traits/has_minus_assign.hpp new file mode 100644 index 0000000..b53474e --- /dev/null +++ b/contrib/src/boost/type_traits/has_minus_assign.hpp @@ -0,0 +1,65 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_MINUS_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_MINUS_ASSIGN_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_minus_assign +#define BOOST_TT_TRAIT_OP -= +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + (! ::boost::is_integral< Rhs_noref >::value )\ + ) || \ + /* Lhs==void* and Rhs==fundamental */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_void< Lhs_noptr >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Rhs==void* and Lhs==fundamental */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_void< Rhs_noptr >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value\ + ) || \ + /* Lhs=fundamental and Rhs=pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + ) || \ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + ) || \ + /* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\ + (\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value || \ + ::boost::is_pointer< Lhs_noref >::value\ + ) && \ + (\ + ::boost::is_fundamental< Rhs_nocv >::value || \ + ::boost::is_pointer< Rhs_noref >::value\ + ) && \ + ::boost::is_const< Lhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/contrib/src/boost/type_traits/has_plus.hpp b/contrib/src/boost/type_traits/has_plus.hpp new file mode 100644 index 0000000..2d79328 --- /dev/null +++ b/contrib/src/boost/type_traits/has_plus.hpp @@ -0,0 +1,54 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_PLUS_HPP_INCLUDED +#define BOOST_TT_HAS_PLUS_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_plus +#define BOOST_TT_TRAIT_OP + +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + ) || \ + /* Lhs==void* and Rhs==fundamental */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_void< Lhs_noptr >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Rhs==void* and Lhs==fundamental */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_void< Rhs_noptr >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value\ + ) || \ + /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + (! ::boost::is_integral< Rhs_noref >::value )\ + ) || \ + /* Rhs==pointer and Lhs==fundamental and Lhs!=integral */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value && \ + (! ::boost::is_integral< Lhs_noref >::value )\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/contrib/src/boost/type_traits/has_plus_assign.hpp b/contrib/src/boost/type_traits/has_plus_assign.hpp new file mode 100644 index 0000000..5ef6f23 --- /dev/null +++ b/contrib/src/boost/type_traits/has_plus_assign.hpp @@ -0,0 +1,66 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_plus_assign +#define BOOST_TT_TRAIT_OP += +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + ) || \ + /* Lhs==void* and Rhs==fundamental */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_void< Lhs_noptr >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Rhs==void* and Lhs==fundamental */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_void< Rhs_noptr >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value\ + ) || \ + /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + (! ::boost::is_integral< Rhs_noref >::value )\ + ) || \ + /* Rhs==pointer and Lhs==fundamental and Lhs!=bool */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value && \ + (! ::boost::is_same< Lhs_nocv, bool >::value )\ + ) || \ + /* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\ + (\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value || \ + ::boost::is_pointer< Lhs_noref >::value\ + ) && \ + ( \ + ::boost::is_fundamental< Rhs_nocv >::value || \ + ::boost::is_pointer< Rhs_noref >::value\ + ) && \ + ::boost::is_const< Lhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/contrib/src/boost/type_traits/has_trivial_copy.hpp b/contrib/src/boost/type_traits/has_trivial_copy.hpp new file mode 100644 index 0000000..9d3265d --- /dev/null +++ b/contrib/src/boost/type_traits/has_trivial_copy.hpp @@ -0,0 +1,62 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED + +#include +#include +#include + +#if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 409)) || defined(BOOST_CLANG) || (defined(__SUNPRO_CC) && defined(BOOST_HAS_TRIVIAL_COPY)) +#include +#define BOOST_TT_TRIVIAL_CONSTRUCT_FIX && is_copy_constructible::value +#else +#define BOOST_TT_TRIVIAL_CONSTRUCT_FIX +#endif + +#ifdef BOOST_INTEL +#include +#include +#endif + +namespace boost { + +template struct has_trivial_copy +: public integral_constant::value +#endif +>{}; +// Arrays are not explicitly copyable: +template struct has_trivial_copy : public false_type{}; +template struct has_trivial_copy : public false_type{}; +// Are volatile types ever trivial? We don't really know, so assume not: +template struct has_trivial_copy : public false_type{}; + +template <> struct has_trivial_copy : public false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct has_trivial_copy : public false_type{}; +template <> struct has_trivial_copy : public false_type{}; +template <> struct has_trivial_copy : public false_type{}; +#endif + +template struct has_trivial_copy : public false_type{}; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template struct has_trivial_copy : public false_type{}; +#endif + +template struct has_trivial_copy_constructor : public has_trivial_copy{}; + +#undef BOOST_TT_TRIVIAL_CONSTRUCT_FIX + +} // namespace boost + +#endif // BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/has_trivial_destructor.hpp b/contrib/src/boost/type_traits/has_trivial_destructor.hpp new file mode 100644 index 0000000..763283d --- /dev/null +++ b/contrib/src/boost/type_traits/has_trivial_destructor.hpp @@ -0,0 +1,48 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED + +#include +#include + +#ifdef BOOST_HAS_TRIVIAL_DESTRUCTOR + +#if defined(BOOST_INTEL) || defined(BOOST_MSVC) +#include +#endif +#ifdef BOOST_HAS_SGI_TYPE_TRAITS +#include +#endif + +#if defined(__GNUC__) || defined(__clang) || defined(__SUNPRO_CC) +#include +#endif + +namespace boost { + +template struct has_trivial_destructor : public integral_constant{}; +#else +#include + +namespace boost{ + +template struct has_trivial_destructor : public integral_constant::value>{}; +#endif + +template <> struct has_trivial_destructor : public false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct has_trivial_destructor : public false_type{}; +template <> struct has_trivial_destructor : public false_type{}; +template <> struct has_trivial_destructor : public false_type{}; +#endif + +} // namespace boost + +#endif // BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/integral_constant.hpp b/contrib/src/boost/type_traits/integral_constant.hpp new file mode 100644 index 0000000..ae2448d --- /dev/null +++ b/contrib/src/boost/type_traits/integral_constant.hpp @@ -0,0 +1,106 @@ +// (C) Copyright John Maddock 2015. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP +#define BOOST_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP + +#include +#include + +#if (BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ + || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ + || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) ) + + +namespace boost{ + namespace mpl + { + template struct bool_; + template struct integral_c; + struct integral_c_tag; + } +} + +#else + +namespace mpl_{ + + template struct bool_; + template struct integral_c; + struct integral_c_tag; +} + +namespace boost +{ + namespace mpl + { + using ::mpl_::bool_; + using ::mpl_::integral_c; + using ::mpl_::integral_c_tag; + } +} + +#endif + +namespace boost{ + + template + struct integral_constant + { + typedef mpl::integral_c_tag tag; + typedef T value_type; + typedef integral_constant type; + static const T value = val; + // + // This helper function is just to disable type-punning + // warnings from GCC: + // + template + static U& dereference(U* p) { return *p; } + + operator const mpl::integral_c& ()const + { + static const char data[sizeof(long)] = { 0 }; + return dereference(reinterpret_cast*>(&data)); + } + BOOST_CONSTEXPR operator T()const { return val; } + }; + + template + T const integral_constant::value; + + template + struct integral_constant + { + typedef mpl::integral_c_tag tag; + typedef bool value_type; + typedef integral_constant type; + static const bool value = val; + // + // This helper function is just to disable type-punning + // warnings from GCC: + // + template + static T& dereference(T* p) { return *p; } + + operator const mpl::bool_& ()const + { + static const char data = 0; + return dereference(reinterpret_cast*>(&data)); + } + BOOST_CONSTEXPR operator bool()const { return val; } + }; + + template + bool const integral_constant::value; + + typedef integral_constant true_type; + typedef integral_constant false_type; + +} + +#endif diff --git a/contrib/src/boost/type_traits/integral_promotion.hpp b/contrib/src/boost/type_traits/integral_promotion.hpp new file mode 100644 index 0000000..0478f56 --- /dev/null +++ b/contrib/src/boost/type_traits/integral_promotion.hpp @@ -0,0 +1,181 @@ +// Copyright 2005 Alexander Nasonov. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef FILE_boost_type_traits_integral_promotion_hpp_INCLUDED +#define FILE_boost_type_traits_integral_promotion_hpp_INCLUDED + +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace type_traits { namespace detail { + +// 4.5/2 +template struct need_promotion : public boost::is_enum {}; + +// 4.5/1 +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; + + +// Specializations for non-standard types. +// Type is promoted if it's smaller then int. + +#define BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(T) \ + template<> struct need_promotion \ + : public integral_constant {}; + +// Same set of integral types as in boost/type_traits/is_integral.hpp. +// Please, keep in sync. +#if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ + || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300)) +// TODO: common macro for this #if. Or better yet, PP SEQ of non-standard types. +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int8 ) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int8 ) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int16 ) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int16) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int32 ) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int32) +#ifdef __BORLANDC__ +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int64) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE( __int64) +#endif +#endif + +#if defined(BOOST_HAS_LONG_LONG) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(boost::ulong_long_type) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(boost::long_long_type ) +#elif defined(BOOST_HAS_MS_INT64) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int64) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE( __int64) +#endif + +#undef BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE + + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +// 4.5/2 +template<> struct need_promotion : public true_type {}; +#endif + +// 4.5/3 (integral bit-field) is not supported. + +// 4.5/4 +template<> struct need_promotion : public true_type {}; + + +// Get promoted type by index and cv qualifiers. + +template struct promote_from_index; + +#define BOOST_TT_AUX_PROMOTE_FROM_INDEX(N,T) \ + template<> struct promote_from_index { typedef T type; }; \ + template<> struct promote_from_index { typedef T volatile type; }; \ + template<> struct promote_from_index { typedef T const type; }; \ + template<> struct promote_from_index { typedef T const volatile type; }; + + +BOOST_TT_AUX_PROMOTE_FROM_INDEX(1, int ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(2, unsigned int ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(3, long ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(4, unsigned long) + + +// WARNING: integral promotions to non-standard types +// long long and __int64 are not defined by the standard. +// Additional specialisations and overloads shouldn't +// introduce ambiguity, though. + +#if defined(BOOST_HAS_LONG_LONG) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(5, boost::long_long_type ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(6, boost::ulong_long_type) +#elif defined(BOOST_HAS_MS_INT64) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(7, __int64 ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(8, unsigned __int64) +#endif + +#undef BOOST_TT_AUX_PROMOTE_FROM_INDEX + + +// Define BOOST_TT_AUX_PROMOTED_INDEX_TESTER: +#if !defined(BOOST_MSVC) + +template +struct sized_type_for_promotion +{ + typedef char (&type)[N]; +}; + +#define BOOST_TT_AUX_PROMOTED_INDEX_TESTER(I,T) \ + sized_type_for_promotion::type promoted_index_tester(T); + +#else + +#define BOOST_TT_AUX_PROMOTED_INDEX_TESTER(I,T) \ + char (&promoted_index_tester(T))[I]; + +#endif + +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(1, int ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(2, unsigned int ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(3, long ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(4, unsigned long) + +#if defined(BOOST_HAS_LONG_LONG) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(5, boost::long_long_type ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(6, boost::ulong_long_type) +#elif defined(BOOST_HAS_MS_INT64) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(7, __int64 ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(8, unsigned __int64) +#endif + +#undef BOOST_TT_AUX_PROMOTED_INDEX_TESTER + + +// Get an index of promoted type for type T. +// Precondition: need_promotion +template +struct promoted_index +{ + static T testee; // undefined + BOOST_STATIC_CONSTANT(int, value = sizeof(promoted_index_tester(+testee)) ); + // Unary plus promotes testee LOOK HERE ---> ^ +}; + +template +struct integral_promotion_impl +{ + typedef BOOST_DEDUCED_TYPENAME promote_from_index< + (boost::type_traits::detail::promoted_index::value) + , (boost::is_const::value) + , (boost::is_volatile::value) + >::type type; +}; + +template struct integral_promotion { typedef T type; }; +template struct integral_promotion : public integral_promotion_impl{}; + +} } + +template struct integral_promotion +{ +private: + typedef boost::type_traits::detail::need_promotion::type> tag_type; +public: + typedef typename boost::type_traits::detail::integral_promotion::type type; +}; + +} + +#endif // #ifndef FILE_boost_type_traits_integral_promotion_hpp_INCLUDED + diff --git a/contrib/src/boost/type_traits/intrinsics.hpp b/contrib/src/boost/type_traits/intrinsics.hpp new file mode 100644 index 0000000..e2246be --- /dev/null +++ b/contrib/src/boost/type_traits/intrinsics.hpp @@ -0,0 +1,380 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_INTRINSICS_HPP_INCLUDED +#define BOOST_TT_INTRINSICS_HPP_INCLUDED + +#ifndef BOOST_TT_DISABLE_INTRINSICS + +#include + +#ifndef BOOST_TT_CONFIG_HPP_INCLUDED +#include +#endif + +// +// Helper macros for builtin compiler support. +// If your compiler has builtin support for any of the following +// traits concepts, then redefine the appropriate macros to pick +// up on the compiler support: +// +// (these should largely ignore cv-qualifiers) +// BOOST_IS_UNION(T) should evaluate to true if T is a union type +// BOOST_IS_POD(T) should evaluate to true if T is a POD type +// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty class type (and not a union) +// BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect +// BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy +// BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy +// BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy +// BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy +// BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect +// BOOST_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw +// BOOST_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw +// BOOST_HAS_NOTHROW_ASSIGN(T) should evaluate to true if t = u can not throw +// BOOST_HAS_VIRTUAL_DESTRUCTOR(T) should evaluate to true T has a virtual destructor +// BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T) should evaluate to true if T has a non-throwing move constructor. +// BOOST_IS_NOTHROW_MOVE_ASSIGN(T) should evaluate to true if T has a non-throwing move assignment operator. +// +// The following can also be defined: when detected our implementation is greatly simplified. +// +// BOOST_IS_ABSTRACT(T) true if T is an abstract type +// BOOST_IS_BASE_OF(T,U) true if T is a base class of U +// BOOST_IS_CLASS(T) true if T is a class type (and not a union) +// BOOST_IS_CONVERTIBLE(T,U) true if T is convertible to U +// BOOST_IS_ENUM(T) true is T is an enum +// BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type +// BOOST_ALIGNMENT_OF(T) should evaluate to the alignment requirements of type T. +// +// define BOOST_TT_DISABLE_INTRINSICS to prevent any intrinsics being used (mostly used when testing) +// + +#ifdef BOOST_HAS_SGI_TYPE_TRAITS + // Hook into SGI's __type_traits class, this will pick up user supplied + // specializations as well as SGI - compiler supplied specializations. +# include +# ifdef __NetBSD__ + // There are two different versions of type_traits.h on NetBSD on Spark + // use an implicit include via algorithm instead, to make sure we get + // the same version as the std lib: +# include +# else +# include +# endif +# define BOOST_IS_POD(T) ::boost::is_same< typename ::__type_traits::is_POD_type, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ::boost::is_same< typename ::__type_traits::has_trivial_default_constructor, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_COPY(T) ::boost::is_same< typename ::__type_traits::has_trivial_copy_constructor, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ::boost::is_same< typename ::__type_traits::has_trivial_assignment_operator, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) ::boost::is_same< typename ::__type_traits::has_trivial_destructor, ::__true_type>::value + +# ifdef __sgi +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +# endif +#endif + +#if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) + // Metrowerks compiler is acquiring intrinsic type traits support + // post version 8. We hook into the published interface to pick up + // user defined specializations as well as compiler intrinsics as + // and when they become available: +# include +# define BOOST_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union::value +# define BOOST_IS_POD(T) BOOST_STD_EXTENSION_NAMESPACE::is_POD::value +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_default_ctor::value +# define BOOST_HAS_TRIVIAL_COPY(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_copy_ctor::value +# define BOOST_HAS_TRIVIAL_ASSIGN(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_assignment::value +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_dtor::value +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\ + || (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500)) +// +// Note that even though these intrinsics rely on other type traits classes +// we do not #include those here as it produces cyclic dependencies and +// can cause the intrinsics to not even be used at all! +// +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T)) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ( ::boost::is_pod::value && ! ::boost::is_const::value && !::boost::is_volatile::value)) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::is_pod::value) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::has_trivial_constructor::value) +#if !defined(BOOST_INTEL) +# define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) || ::boost::has_trivial_copy::value) && !is_array::value) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) || ::boost::is_pod::value) +#elif (_MSC_VER >= 1900) +# define BOOST_HAS_NOTHROW_COPY(T) ((__is_nothrow_constructible(T, typename add_lvalue_reference::type>::type)) && !is_array::value) +# define BOOST_HAS_TRIVIAL_COPY(T) (__is_trivially_constructible(T, typename add_lvalue_reference::type>::type)) +#endif +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::has_trivial_assign::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_CONVERTIBLE(T,U) ((__is_convertible_to(T,U) || (is_same::value && !is_function::value)) && !__is_abstract(U)) +# define BOOST_IS_ENUM(T) __is_enum(T) +// This one fails if the default alignment has been changed with /Zp: +// # define BOOST_ALIGNMENT_OF(T) __alignof(T) + +# if defined(_MSC_VER) && (_MSC_VER >= 1700) +# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || boost::is_pod::value) && ! ::boost::is_volatile::value && ! ::boost::is_reference::value) +# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || boost::is_pod::value) && ! ::boost::is_const::value && !::boost::is_volatile::value && ! ::boost::is_reference::value) +# endif +#ifndef BOOST_NO_CXX11_FINAL +// This one doesn't quite always do the right thing on older VC++ versions +// we really need it when the final keyword is supporyted though: +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +#endif +#if _MSC_FULL_VER >= 180020827 +# define BOOST_IS_NOTHROW_MOVE_ASSIGN(T) (__is_nothrow_assignable(T&, T&&)) +# define BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T) (__is_nothrow_constructible(T, T&&)) +#endif +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(__DMC__) && (__DMC__ >= 0x848) +// For Digital Mars C++, www.digitalmars.com +# define BOOST_IS_UNION(T) (__typeinfo(T) & 0x400) +# define BOOST_IS_POD(T) (__typeinfo(T) & 0x800) +# define BOOST_IS_EMPTY(T) (__typeinfo(T) & 0x1000) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__typeinfo(T) & 0x10) +# define BOOST_HAS_TRIVIAL_COPY(T) (__typeinfo(T) & 0x20) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__typeinfo(T) & 0x40) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__typeinfo(T) & 0x8) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__typeinfo(T) & 0x80) +# define BOOST_HAS_NOTHROW_COPY(T) (__typeinfo(T) & 0x100) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__typeinfo(T) & 0x200) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) (__typeinfo(T) & 0x4) +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(BOOST_CLANG) && defined(__has_feature) && !defined(__CUDACC__) +// +// Note that these intrinsics are disabled for the CUDA meta-compiler as it appears +// to not support them, even though the underlying clang compiler does so. +// This is a rubbish fix as it basically stops type traits from working correctly, +// but maybe the best we can do for now. See https://svn.boost.org/trac/boost/ticket/10694 +// +// +// Note that even though these intrinsics rely on other type traits classes +// we do not #include those here as it produces cyclic dependencies and +// can cause the intrinsics to not even be used at all! +// +# include + +# if __has_feature(is_union) +# define BOOST_IS_UNION(T) __is_union(T) +# endif +# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod) +# define BOOST_IS_POD(T) __is_pod(T) +# endif +# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# endif +# if __has_feature(has_trivial_constructor) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# endif +# if __has_feature(has_trivial_copy) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value) +# endif +# if __has_feature(has_trivial_assign) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value && is_assignable::value) +# endif +# if __has_feature(has_trivial_destructor) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) && is_destructible::value) +# endif +# if __has_feature(has_nothrow_constructor) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) && is_default_constructible::value) +# endif +# if __has_feature(has_nothrow_copy) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value && is_copy_constructible::value) +# endif +# if __has_feature(has_nothrow_assign) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value && is_assignable::value) +# endif +# if __has_feature(has_virtual_destructor) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) +# endif +# if __has_feature(is_abstract) +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# endif +# if __has_feature(is_base_of) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# endif +# if __has_feature(is_class) +# define BOOST_IS_CLASS(T) __is_class(T) +# endif +# if __has_feature(is_convertible_to) +# define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U) +# endif +# if __has_feature(is_enum) +# define BOOST_IS_ENUM(T) __is_enum(T) +# endif +# if __has_feature(is_polymorphic) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# endif +# if __has_feature(has_trivial_move_constructor) +# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__has_trivial_move_constructor(T) && is_constructible::value && !::boost::is_volatile::value) +# endif +# if __has_feature(has_trivial_move_assign) +# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) (__has_trivial_move_assign(T) && is_assignable::value && !::boost::is_volatile::value) +# endif +# if (!defined(unix) && !defined(__unix__)) || defined(__LP64__) || !defined(__GNUC__) +// GCC sometimes lies about alignment requirements +// of type double on 32-bit unix platforms, use the +// old implementation instead in that case: +# define BOOST_ALIGNMENT_OF(T) __alignof(T) +# endif +# if __has_feature(is_final) +# define BOOST_IS_FINAL(T) __is_final(T) +# endif + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG) +// +// Note that even though these intrinsics rely on other type traits classes +// we do not #include those here as it produces cyclic dependencies and +// can cause the intrinsics to not even be used at all! +// + +#ifdef BOOST_INTEL +# define BOOST_INTEL_TT_OPTS || is_pod::value +#else +# define BOOST_INTEL_TT_OPTS +#endif + +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) __is_pod(T) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_INTEL_TT_OPTS) && !is_reference::value) +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value && ! ::boost::is_const::value && is_assignable::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS && is_destructible::value) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) && is_default_constructible::value BOOST_INTEL_TT_OPTS) +# define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_reference::value && is_copy_constructible::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_const::value && is_assignable::value) +#else +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value && ! ::boost::is_const::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_INTEL_TT_OPTS) +# define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_reference::value && !is_array::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_const::value && !is_array::value) +#endif +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_ENUM(T) __is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# if (!defined(unix) && !defined(__unix__)) || defined(__LP64__) + // GCC sometimes lies about alignment requirements + // of type double on 32-bit unix platforms, use the + // old implementation instead in that case: +# define BOOST_ALIGNMENT_OF(T) __alignof__(T) +# endif +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) +# define BOOST_IS_FINAL(T) __is_final(T) +# endif + +# if (__GNUC__ >= 5) && (__cplusplus >= 201103) +# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) (__is_trivially_assignable(T&, T&&) && is_assignable::value && !::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__is_trivially_constructible(T, T&&) && is_constructible::value && !::boost::is_volatile::value) +# endif + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) +# define BOOST_IS_UNION(T) __oracle_is_union(T) +# define BOOST_IS_POD(T) (__oracle_is_pod(T) && !is_function::value) +# define BOOST_IS_EMPTY(T) __oracle_is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__oracle_has_trivial_constructor(T) && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_COPY(T) (__oracle_has_trivial_copy(T) && !is_reference::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && ! ::boost::is_volatile::value && ! ::boost::is_const::value && is_assignable::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__oracle_has_trivial_destructor(T) && is_destructible::value) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) ((__oracle_has_nothrow_constructor(T) || __oracle_has_trivial_constructor(T) || __oracle_is_trivial(T)) && is_default_constructible::value) +// __oracle_has_nothrow_copy appears to behave the same as __oracle_has_nothrow_assign, disabled for now: +//# define BOOST_HAS_NOTHROW_COPY(T) ((__oracle_has_nothrow_copy(T) || __oracle_has_trivial_copy(T) || __oracle_is_trivial(T)) && !is_volatile::value && !is_reference::value && is_copy_constructible::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__oracle_has_nothrow_assign(T) || __oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && !is_volatile::value && !is_const::value && is_assignable::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __oracle_has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __oracle_is_abstract(T) +//# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __oracle_is_class(T) +# define BOOST_IS_ENUM(T) __oracle_is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __oracle_is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) __alignof__(T) +# define BOOST_IS_FINAL(T) __oracle_is_final(T) + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600) +# include +# include +# include + +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) __is_pod(T) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_ENUM(T) __is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) __alignof__(T) +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +# if defined(__CODEGEARC__) +# include +# include +# include +# include + +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) __is_pod(T) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T)) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_reference::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T)) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T)) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_void::value && !is_void::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible(T,U) || is_void::value) +# define BOOST_IS_ENUM(T) __is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) alignof(T) + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#endif // BOOST_TT_DISABLE_INTRINSICS + +#endif // BOOST_TT_INTRINSICS_HPP_INCLUDED + diff --git a/contrib/src/boost/type_traits/is_abstract.hpp b/contrib/src/boost/type_traits/is_abstract.hpp new file mode 100644 index 0000000..7715c5c --- /dev/null +++ b/contrib/src/boost/type_traits/is_abstract.hpp @@ -0,0 +1,149 @@ +#ifndef BOOST_TT_IS_ABSTRACT_CLASS_HPP +#define BOOST_TT_IS_ABSTRACT_CLASS_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// is_abstract_class.hpp: +// +// (C) Copyright 2002 Rani Sharoni (rani_sharoni@hotmail.com) and Robert Ramey +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org for updates, documentation, and revision history. +// + +// Compile type discovery whether given type is abstract class or not. +// +// Requires DR 337 to be supported by compiler +// (http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#337). +// +// +// Believed (Jan 2004) to work on: +// - GCC 3.4 +// - VC++ 7.1 +// - compilers with new EDG frontend (Intel C++ 7, Comeau 4.3.2) +// +// Doesn't work on: +// - VC++6, VC++7.0 and less +// - GCC 3.3.X and less +// - Borland C++ 6 and less +// +// +// History: +// - Originally written by Rani Sharoni, see +// http://groups.google.com/groups?selm=df893da6.0207110613.75b2fe90%40posting.google.com +// At this time supported by EDG (Intel C++ 7, Comeau 4.3.2) and VC7.1. +// - Adapted and added into Boost.Serialization library by Robert Ramey +// (starting with submission #10). +// - Jan 2004: GCC 3.4 fixed to support DR337 (Giovanni Bajo). +// - Jan 2004: modified to be part of Boost.TypeTraits (Pavel Vozenilek). +// - Nov 2004: Christoph Ludwig found that the implementation did not work with +// template types and gcc-3.4 or VC7.1, fix due to Christoph Ludwig +// and John Maddock. +// - Dec 2004: Added new config macro BOOST_NO_IS_ABSTRACT which causes the template +// to degrade gracefully, rather than trash the compiler (John Maddock). +// + +#include +#include +#ifndef BOOST_IS_ABSTRACT +#include +#include +#include +#ifdef BOOST_NO_IS_ABSTRACT +#include +#endif +#endif + +namespace boost { + +namespace detail{ + +#ifdef BOOST_IS_ABSTRACT +template +struct is_abstract_imp +{ + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_ABSTRACT(T)); +}; +#elif !defined(BOOST_NO_IS_ABSTRACT) +template +struct is_abstract_imp2 +{ + // Deduction fails if T is void, function type, + // reference type (14.8.2/2)or an abstract class type + // according to review status issue #337 + // + template + static type_traits::no_type check_sig(U (*)[1]); + template + static type_traits::yes_type check_sig(...); + // + // T must be a complete type, further if T is a template then + // it must be instantiated in order for us to get the right answer: + // + BOOST_STATIC_ASSERT(sizeof(T) != 0); + + // GCC2 won't even parse this template if we embed the computation + // of s1 in the computation of value. +#ifdef __GNUC__ + BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(is_abstract_imp2::template check_sig(0))); +#else +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(push) +#pragma warning(disable:6334) +#endif + BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(check_sig(0))); +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(pop) +#endif +#endif + + BOOST_STATIC_CONSTANT(bool, value = + (s1 == sizeof(type_traits::yes_type))); +}; + +template +struct is_abstract_select +{ + template + struct rebind + { + typedef is_abstract_imp2 type; + }; +}; +template <> +struct is_abstract_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_abstract_imp +{ + typedef is_abstract_select< ::boost::is_class::value> selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + + BOOST_STATIC_CONSTANT(bool, value = type::value); +}; + +#endif +} + +#ifndef BOOST_NO_IS_ABSTRACT +template struct is_abstract : public integral_constant::value> {}; +#else +template struct is_abstract : public integral_constant::value> {}; +#endif + +} // namespace boost + +#endif //BOOST_TT_IS_ABSTRACT_CLASS_HPP diff --git a/contrib/src/boost/type_traits/is_arithmetic.hpp b/contrib/src/boost/type_traits/is_arithmetic.hpp new file mode 100644 index 0000000..c23811e --- /dev/null +++ b/contrib/src/boost/type_traits/is_arithmetic.hpp @@ -0,0 +1,22 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED +#define BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED + +#include +#include + +namespace boost { + +template +struct is_arithmetic : public integral_constant::value || is_floating_point::value> {}; + +} // namespace boost + +#endif // BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_array.hpp b/contrib/src/boost/type_traits/is_array.hpp new file mode 100644 index 0000000..497dc49 --- /dev/null +++ b/contrib/src/boost/type_traits/is_array.hpp @@ -0,0 +1,43 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +// Some fixes for is_array are based on a newsgroup posting by Jonathan Lundquist. + + +#ifndef BOOST_TT_IS_ARRAY_HPP_INCLUDED +#define BOOST_TT_IS_ARRAY_HPP_INCLUDED + +#include +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) + template struct is_array : public integral_constant {}; +#else + template struct is_array : public false_type {}; +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) + template struct is_array : public true_type {}; + template struct is_array : public true_type{}; + template struct is_array : public true_type{}; + template struct is_array : public true_type{}; +#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + template struct is_array : public true_type{}; + template struct is_array : public true_type{}; + template struct is_array : public true_type{}; + template struct is_array : public true_type{}; +#endif +#endif + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_ARRAY_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_base_and_derived.hpp b/contrib/src/boost/type_traits/is_base_and_derived.hpp new file mode 100644 index 0000000..ee3dce5 --- /dev/null +++ b/contrib/src/boost/type_traits/is_base_and_derived.hpp @@ -0,0 +1,244 @@ + +// (C) Copyright Rani Sharoni 2003. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED +#define BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED + +#include +#include +#ifndef BOOST_IS_BASE_OF +#include +#include +#include +#include +#include +#endif +#include +#include + +namespace boost { + +namespace detail { + +#ifndef BOOST_IS_BASE_OF +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581)) \ + && !BOOST_WORKAROUND(__SUNPRO_CC , <= 0x540) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 243) \ + && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + + // The EDG version number is a lower estimate. + // It is not currently known which EDG version + // exactly fixes the problem. + +/************************************************************************* + +This version detects ambiguous base classes and private base classes +correctly, and was devised by Rani Sharoni. + +Explanation by Terje Slettebo and Rani Sharoni. + +Let's take the multiple base class below as an example, and the following +will also show why there's not a problem with private or ambiguous base +class: + +struct B {}; +struct B1 : B {}; +struct B2 : B {}; +struct D : private B1, private B2 {}; + +is_base_and_derived::value; + +First, some terminology: + +SC - Standard conversion +UDC - User-defined conversion + +A user-defined conversion sequence consists of an SC, followed by an UDC, +followed by another SC. Either SC may be the identity conversion. + +When passing the default-constructed Host object to the overloaded check_sig() +functions (initialization 8.5/14/4/3), we have several viable implicit +conversion sequences: + +For "static no_type check_sig(B const volatile *, int)" we have the conversion +sequences: + +C -> C const (SC - Qualification Adjustment) -> B const volatile* (UDC) +C -> D const volatile* (UDC) -> B1 const volatile* / B2 const volatile* -> + B const volatile* (SC - Conversion) + +For "static yes_type check_sig(D const volatile *, T)" we have the conversion +sequence: + +C -> D const volatile* (UDC) + +According to 13.3.3.1/4, in context of user-defined conversion only the +standard conversion sequence is considered when selecting the best viable +function, so it only considers up to the user-defined conversion. For the +first function this means choosing between C -> C const and C -> C, and it +chooses the latter, because it's a proper subset (13.3.3.2/3/2) of the +former. Therefore, we have: + +C -> D const volatile* (UDC) -> B1 const volatile* / B2 const volatile* -> + B const volatile* (SC - Conversion) +C -> D const volatile* (UDC) + +Here, the principle of the "shortest subsequence" applies again, and it +chooses C -> D const volatile*. This shows that it doesn't even need to +consider the multiple paths to B, or accessibility, as that possibility is +eliminated before it could possibly cause ambiguity or access violation. + +If D is not derived from B, it has to choose between C -> C const -> B const +volatile* for the first function, and C -> D const volatile* for the second +function, which are just as good (both requires a UDC, 13.3.3.2), had it not +been for the fact that "static no_type check_sig(B const volatile *, int)" is +not templated, which makes C -> C const -> B const volatile* the best choice +(13.3.3/1/4), resulting in "no". + +Also, if Host::operator B const volatile* hadn't been const, the two +conversion sequences for "static no_type check_sig(B const volatile *, int)", in +the case where D is derived from B, would have been ambiguous. + +See also +http://groups.google.com/groups?selm=df893da6.0301280859.522081f7%40posting. +google.com and links therein. + +*************************************************************************/ + +template +struct bd_helper +{ + // + // This VC7.1 specific workaround stops the compiler from generating + // an internal compiler error when compiling with /vmg (thanks to + // Aleksey Gurtovoy for figuring out the workaround). + // +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) + template + static type_traits::yes_type check_sig(D const volatile *, T); + static type_traits::no_type check_sig(B const volatile *, int); +#else + static type_traits::yes_type check_sig(D const volatile *, long); + static type_traits::no_type check_sig(B const volatile * const&, int); +#endif +}; + +template +struct is_base_and_derived_impl2 +{ +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(push) +#pragma warning(disable:6334) +#endif + // + // May silently do the wrong thing with incomplete types + // unless we trap them here: + // + BOOST_STATIC_ASSERT(sizeof(B) != 0); + BOOST_STATIC_ASSERT(sizeof(D) != 0); + + struct Host + { +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) + operator B const volatile *() const; +#else + operator B const volatile * const&() const; +#endif + operator D const volatile *(); + }; + + BOOST_STATIC_CONSTANT(bool, value = + sizeof(bd_helper::check_sig(Host(), 0)) == sizeof(type_traits::yes_type)); +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(pop) +#endif +}; + +#else + +// +// broken version: +// +template +struct is_base_and_derived_impl2 +{ + BOOST_STATIC_CONSTANT(bool, value = + (::boost::is_convertible::value)); +}; + +#define BOOST_BROKEN_IS_BASE_AND_DERIVED + +#endif + +template +struct is_base_and_derived_impl3 +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_base_and_derived_select +{ + template + struct rebind + { + typedef is_base_and_derived_impl3 type; + }; +}; + +template <> +struct is_base_and_derived_select +{ + template + struct rebind + { + typedef is_base_and_derived_impl2 type; + }; +}; + +template +struct is_base_and_derived_impl +{ + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + + typedef is_base_and_derived_select< + ::boost::is_class::value, + ::boost::is_class::value, + ::boost::is_same::value> selector; + typedef typename selector::template rebind binder; + typedef typename binder::type bound_type; + + BOOST_STATIC_CONSTANT(bool, value = bound_type::value); +}; +#else +template +struct is_base_and_derived_impl +{ + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + + BOOST_STATIC_CONSTANT(bool, value = (BOOST_IS_BASE_OF(B,D) && ! ::boost::is_same::value)); +}; +#endif +} // namespace detail + +template struct is_base_and_derived + : public integral_constant::value)> {}; + +template struct is_base_and_derived : public false_type{}; +template struct is_base_and_derived : public false_type{}; +template struct is_base_and_derived : public false_type{}; + +#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) +template struct is_base_and_derived : public true_type{}; +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_base_of.hpp b/contrib/src/boost/type_traits/is_base_of.hpp new file mode 100644 index 0000000..89f2f67 --- /dev/null +++ b/contrib/src/boost/type_traits/is_base_of.hpp @@ -0,0 +1,39 @@ + +// (C) Copyright Rani Sharoni 2003-2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_BASE_OF_HPP_INCLUDED +#define BOOST_TT_IS_BASE_OF_HPP_INCLUDED + +#include +#include +#include + +namespace boost { + + namespace detail{ + template + struct is_base_of_imp + { + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + BOOST_STATIC_CONSTANT(bool, value = ( + (::boost::detail::is_base_and_derived_impl::value) || + (::boost::is_same::value && ::boost::is_class::value))); + }; + } + + template struct is_base_of + : public integral_constant::value)> {}; + + template struct is_base_of : false_type{}; + template struct is_base_of : false_type{}; + template struct is_base_of : false_type{}; + +} // namespace boost + +#endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_class.hpp b/contrib/src/boost/type_traits/is_class.hpp new file mode 100644 index 0000000..e3a22d2 --- /dev/null +++ b/contrib/src/boost/type_traits/is_class.hpp @@ -0,0 +1,114 @@ +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000-2003. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_CLASS_HPP_INCLUDED +#define BOOST_TT_IS_CLASS_HPP_INCLUDED + +#include +#include +#include +#ifndef BOOST_IS_CLASS +# include + +#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION +# include +#else +# include +# include +# include +# include +# include +#endif + +#endif // BOOST_IS_CLASS + +namespace boost { + +namespace detail { + +#ifndef BOOST_IS_CLASS +#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION + +// This is actually the conforming implementation which works with +// abstract classes. However, enough compilers have trouble with +// it that most will use the one in +// boost/type_traits/object_traits.hpp. This implementation +// actually works with VC7.0, but other interactions seem to fail +// when we use it. + +// is_class<> metafunction due to Paul Mensonides +// (leavings@attbi.com). For more details: +// http://groups.google.com/groups?hl=en&selm=000001c1cc83%24e154d5e0%247772e50c%40c161550a&rnum=1 +#if defined(__GNUC__) && !defined(__EDG_VERSION__) + +template ::boost::type_traits::yes_type is_class_tester(void(U::*)(void)); +template ::boost::type_traits::no_type is_class_tester(...); + +template +struct is_class_impl +{ + + BOOST_STATIC_CONSTANT(bool, value = + sizeof(is_class_tester(0)) == sizeof(::boost::type_traits::yes_type) + && ! ::boost::is_union::value + ); +}; + +#else + +template +struct is_class_impl +{ + template static ::boost::type_traits::yes_type is_class_tester(void(U::*)(void)); + template static ::boost::type_traits::no_type is_class_tester(...); + + BOOST_STATIC_CONSTANT(bool, value = + sizeof(is_class_tester(0)) == sizeof(::boost::type_traits::yes_type) + && ! ::boost::is_union::value + ); +}; + +#endif + +#else + +template +struct is_class_impl +{ + BOOST_STATIC_CONSTANT(bool, value = + ! ::boost::is_union::value >::value + && ! ::boost::is_scalar::value + && ! ::boost::is_array::value + && ! ::boost::is_reference::value + && ! ::boost::is_void::value + && ! ::boost::is_function::value + ); +}; + +# endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION +# else // BOOST_IS_CLASS +template +struct is_class_impl +{ + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_CLASS(T)); +}; +# endif // BOOST_IS_CLASS + +} // namespace detail + +template struct is_class : public integral_constant::value> {}; +# ifdef __EDG_VERSION__ +template struct is_class : public is_class{}; +template struct is_class : public is_class{}; +template struct is_class : public is_class{}; +# endif + +} // namespace boost + +#endif // BOOST_TT_IS_CLASS_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_const.hpp b/contrib/src/boost/type_traits/is_const.hpp new file mode 100644 index 0000000..d9dd2aa --- /dev/null +++ b/contrib/src/boost/type_traits/is_const.hpp @@ -0,0 +1,46 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_CONST_HPP_INCLUDED +#define BOOST_TT_IS_CONST_HPP_INCLUDED + +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) + + template + struct is_const : public integral_constant {}; + +#else + + template + struct is_const : public false_type {}; + template struct is_const : public true_type{}; + template struct is_const : public true_type{}; + template struct is_const : public true_type{}; + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_CONST_HPP_INCLUDED + diff --git a/contrib/src/boost/type_traits/is_constructible.hpp b/contrib/src/boost/type_traits/is_constructible.hpp new file mode 100644 index 0000000..2017317 --- /dev/null +++ b/contrib/src/boost/type_traits/is_constructible.hpp @@ -0,0 +1,80 @@ + +// (C) Copyright John Maddock 2015. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED + +#include +#include + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) + +#include +#include +#include +#include + +namespace boost{ + + namespace detail{ + + struct is_constructible_imp + { + template()...))> + static boost::type_traits::yes_type test(int); + template + static boost::type_traits::no_type test(...); + + template()))> + static boost::type_traits::yes_type test1(int); + template + static boost::type_traits::no_type test1(...); + + template + static boost::type_traits::yes_type ref_test(T); + template + static boost::type_traits::no_type ref_test(...); + }; + + } + + template struct is_constructible : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)>{}; + template struct is_constructible : public integral_constant::value && sizeof(detail::is_constructible_imp::test1(0)) == sizeof(boost::type_traits::yes_type)>{}; + template struct is_constructible : public integral_constant(boost::declval())) == sizeof(boost::type_traits::yes_type)>{}; + template struct is_constructible : public integral_constant(boost::declval())) == sizeof(boost::type_traits::yes_type)>{}; + + template <> struct is_constructible : public false_type{}; + template <> struct is_constructible : public false_type{}; + template <> struct is_constructible : public false_type{}; + template <> struct is_constructible : public false_type{}; + + template struct is_constructible : public is_default_constructible{}; + +#else + +#include +#include + +namespace boost{ + + // We don't know how to implement this: + template struct is_constructible : public is_convertible{}; + template struct is_constructible : public is_default_constructible{}; + template <> struct is_constructible : public false_type{}; + template <> struct is_constructible : public false_type{}; + template <> struct is_constructible : public false_type{}; + template <> struct is_constructible : public false_type{}; + template struct is_constructible : public false_type{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template struct is_constructible : public false_type{}; +#endif +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_convertible.hpp b/contrib/src/boost/type_traits/is_convertible.hpp new file mode 100644 index 0000000..417ece2 --- /dev/null +++ b/contrib/src/boost/type_traits/is_convertible.hpp @@ -0,0 +1,488 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) +// Copyright 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED + +#include +#include +#ifndef BOOST_IS_CONVERTIBLE +#include +#include +#include +#include +#include +#if !defined(BOOST_NO_IS_ABSTRACT) +#include +#endif +#include +#include +#include + +#if defined(__MWERKS__) +#include +#endif +#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +# include +#endif +#elif defined(BOOST_MSVC) || defined(BOOST_INTEL) +#include +#include +#endif // BOOST_IS_CONVERTIBLE + +namespace boost { + +#ifndef BOOST_IS_CONVERTIBLE + +// is one type convertible to another? +// +// there are multiple versions of the is_convertible +// template, almost every compiler seems to require its +// own version. +// +// Thanks to Andrei Alexandrescu for the original version of the +// conversion detection technique! +// + +namespace detail { + +#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !(defined(BOOST_GCC) && (BOOST_GCC < 40700)) + + // This is a C++11 conforming version, place this first and use it wherever possible: + +# define BOOST_TT_CXX11_IS_CONVERTIBLE + + template + struct or_helper + { + static const bool value = (A::value || B::value || C::value); + }; + + template, boost::is_function, boost::is_array >::value> + struct is_convertible_basic_impl + { + // Nothing converts to function or array, but void converts to void: + static const bool value = is_void::value; + }; + + template + class is_convertible_basic_impl + { + typedef char one; + typedef int two; + + template + static void test_aux(To1); + + template + static decltype(test_aux(boost::declval()), one()) test(int); + + template + static two test(...); + + public: + static const bool value = sizeof(test(0)) == 1; + }; + +#elif defined(__BORLANDC__) && (__BORLANDC__ < 0x560) +// +// special version for Borland compilers +// this version breaks when used for some +// UDT conversions: +// +template +struct is_convertible_impl +{ +#pragma option push -w-8074 + // This workaround for Borland breaks the EDG C++ frontend, + // so we only use it for Borland. + template struct checker + { + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(T); + }; + + static typename add_lvalue_reference::type _m_from; + static bool const value = sizeof( checker::_m_check(_m_from) ) + == sizeof(::boost::type_traits::yes_type); +#pragma option pop +}; + +#elif defined(__GNUC__) || defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +// special version for gcc compiler + recent Borland versions +// note that this does not pass UDT's through (...) + +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(const T&); + template any_conversion(volatile T&); + template any_conversion(T&); +}; + +template struct checker +{ + static boost::type_traits::no_type _m_check(any_conversion ...); + static boost::type_traits::yes_type _m_check(T, int); +}; + +template +struct is_convertible_basic_impl +{ + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6))) + static bool const value = + sizeof( boost::detail::checker::_m_check(static_cast(_m_from), 0) ) + == sizeof(::boost::type_traits::yes_type); +#else + static bool const value = + sizeof( boost::detail::checker::_m_check(_m_from, 0) ) + == sizeof(::boost::type_traits::yes_type); +#endif +}; + +#elif (defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 245) && !defined(__ICL)) \ + || defined(__IBMCPP__) || defined(__HP_aCC) +// +// This is *almost* an ideal world implementation as it doesn't rely +// on undefined behaviour by passing UDT's through (...). +// Unfortunately it doesn't quite pass all the tests for most compilers (sigh...) +// Enable this for your compiler if is_convertible_test.cpp will compile it... +// +// Note we do not enable this for VC7.1, because even though it passes all the +// type_traits tests it is known to cause problems when instantiation occurs +// deep within the instantiation tree :-( +// +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(const T&); + template any_conversion(volatile T&); + // we need this constructor to catch references to functions + // (which can not be cv-qualified): + template any_conversion(T&); +}; + +template +struct is_convertible_basic_impl +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type) + ); +#else + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) + ); +#endif +}; + +#elif defined(__DMC__) + +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(const T&); + template any_conversion(volatile T&); + // we need this constructor to catch references to functions + // (which can not be cv-qualified): + template any_conversion(T&); +}; + +template +struct is_convertible_basic_impl +{ + // Using '...' doesn't always work on Digital Mars. This version seems to. + template + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion, float, T); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int, int); + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; + + // Static constants sometime cause the conversion of _m_from to To to be + // called. This doesn't happen with an enum. +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + enum { value = + sizeof( _m_check(static_cast(_m_from), 0, 0) ) == sizeof(::boost::type_traits::yes_type) + }; +#else + enum { value = + sizeof( _m_check(_m_from, 0, 0) ) == sizeof(::boost::type_traits::yes_type) + }; +#endif +}; + +#elif defined(__MWERKS__) +// +// CW works with the technique implemented above for EDG, except when From +// is a function type (or a reference to such a type), in which case +// any_conversion won't be accepted as a valid conversion. We detect this +// exceptional situation and channel it through an alternative algorithm. +// + +template +struct is_convertible_basic_impl_aux; + +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(const T&); + template any_conversion(volatile T&); + template any_conversion(T&); +}; + +template +struct is_convertible_basic_impl_aux +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type) + ); +#else + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) + ); +#endif +}; + +template +struct is_convertible_basic_impl_aux +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(static_cast(_m_from)) ) == sizeof(::boost::type_traits::yes_type) + ); +#else + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) + ); +#endif +}; + +template +struct is_convertible_basic_impl: + is_convertible_basic_impl_aux< + From,To, + ::boost::is_function::type>::value + > +{}; + +#else +// +// This version seems to work pretty well for a wide spectrum of compilers, +// however it does rely on undefined behaviour by passing UDT's through (...). +// + +//Workaround for old compilers like MSVC 7.1 to avoid +//forming a reference to an array of unknown bound +template +struct is_convertible_basic_impl_add_lvalue_reference + : add_lvalue_reference +{}; + +template +struct is_convertible_basic_impl_add_lvalue_reference +{ + typedef From type []; +}; + +template +struct is_convertible_basic_impl +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); + typedef typename is_convertible_basic_impl_add_lvalue_reference::type lvalue_type; + static lvalue_type _m_from; +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4244) +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(disable:6334) +#endif +#endif +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + typedef typename add_rvalue_reference::type rvalue_type; + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(static_cast(_m_from)) ) == sizeof(::boost::type_traits::yes_type) + ); +#else + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) + ); +#endif +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif +}; + +#endif // is_convertible_impl + +#if defined(__DMC__) +// As before, a static constant sometimes causes errors on Digital Mars. +template +struct is_convertible_impl +{ + enum { + value = ( ::boost::detail::is_convertible_basic_impl::value && ! ::boost::is_array::value && ! ::boost::is_function::value) + }; +}; +#elif !defined(__BORLANDC__) || __BORLANDC__ > 0x551 +template +struct is_convertible_impl +{ + BOOST_STATIC_CONSTANT(bool, value = ( ::boost::detail::is_convertible_basic_impl::value && !::boost::is_array::value && !::boost::is_function::value)); +}; +#endif + +template +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef is_convertible_impl type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef true_type type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_convertible_impl_dispatch_base +{ +#if !BOOST_WORKAROUND(__HP_aCC, < 60700) + typedef is_convertible_impl_select< + ::boost::is_arithmetic::value, + ::boost::is_arithmetic::value, +#if !defined(BOOST_NO_IS_ABSTRACT) && !defined(BOOST_TT_CXX11_IS_CONVERTIBLE) + // We need to filter out abstract types, only if we don't have a strictly conforming C++11 version: + ::boost::is_abstract::value +#else + false +#endif + > selector; +#else + typedef is_convertible_impl_select selector; +#endif + typedef typename selector::template rebind isc_binder; + typedef typename isc_binder::type type; +}; + +template +struct is_convertible_impl_dispatch + : public is_convertible_impl_dispatch_base::type +{}; + +// +// Now add the full and partial specialisations +// for void types, these are common to all the +// implementation above: +// +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS + +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; + +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; + +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; + +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; + +#else +template <> struct is_convertible_impl_dispatch : public true_type{}; +#endif // BOOST_NO_CV_VOID_SPECIALIZATIONS + +template struct is_convertible_impl_dispatch : public false_type{}; +template struct is_convertible_impl_dispatch : public false_type{}; + +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template struct is_convertible_impl_dispatch : public false_type{}; +template struct is_convertible_impl_dispatch : public false_type{}; +template struct is_convertible_impl_dispatch : public false_type{}; +template struct is_convertible_impl_dispatch : public false_type{}; +template struct is_convertible_impl_dispatch : public false_type{}; +template struct is_convertible_impl_dispatch : public false_type{}; +#endif + +} // namespace detail + +template +struct is_convertible : public integral_constant::value> {}; + +#else + +template +struct is_convertible : public integral_constant {}; + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_copy_constructible.hpp b/contrib/src/boost/type_traits/is_copy_constructible.hpp new file mode 100644 index 0000000..c688264 --- /dev/null +++ b/contrib/src/boost/type_traits/is_copy_constructible.hpp @@ -0,0 +1,187 @@ +// (C) Copyright Antony Polukhin 2013. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED + +#include +#include + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40900) + +#include + +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1800) + +namespace boost { + +template struct is_copy_constructible : public boost::is_constructible{}; + +template <> struct is_copy_constructible : public false_type{}; +template <> struct is_copy_constructible : public false_type{}; +template <> struct is_copy_constructible : public false_type{}; +template <> struct is_copy_constructible : public false_type{}; + +} // namespace boost + +#else +// +// Special version for VC12 which has a problem when a base class (such as non_copyable) has a deleted +// copy constructor. In this case the compiler thinks there really is a copy-constructor and tries to +// instantiate the deleted member. std::is_copy_constructible has the same issue (or at least returns +// an incorrect value, which just defers the issue into the users code) as well. We can at least fix +// boost::non_copyable as a base class as a special case: +// +#include +#include + +namespace boost { + + namespace detail + { + + template struct is_copy_constructible_imp : public boost::is_constructible{}; + template struct is_copy_constructible_imp : public false_type{}; + + } + + template struct is_copy_constructible : public detail::is_copy_constructible_imp::value>{}; + + template <> struct is_copy_constructible : public false_type{}; + template <> struct is_copy_constructible : public false_type{}; + template <> struct is_copy_constructible : public false_type{}; + template <> struct is_copy_constructible : public false_type{}; + +} // namespace boost + +#endif + +#else + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4181) +#endif + +namespace boost { + + namespace detail{ + + template + struct is_copy_constructible_impl2 { + + // Intel compiler has problems with SFINAE for copy constructors and deleted functions: + // + // error: function *function_name* cannot be referenced -- it is a deleted function + // static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval()))* = 0); + // ^ + // + // MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See: + // https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION) && !(defined(BOOST_MSVC) && _MSC_VER == 1800) + +#ifdef BOOST_NO_CXX11_DECLTYPE + template + static boost::type_traits::yes_type test(const T1&, boost::mpl::int_()))>* = 0); +#else + template + static boost::type_traits::yes_type test(const T1&, decltype(T1(boost::declval()))* = 0); +#endif + + static boost::type_traits::no_type test(...); +#else + template + static boost::type_traits::no_type test(const T1&, typename T1::boost_move_no_copy_constructor_or_assign* = 0); + static boost::type_traits::yes_type test(...); +#endif + + // If you see errors like this: + // + // `'T::T(const T&)' is private` + // `boost/type_traits/is_copy_constructible.hpp:68:5: error: within this context` + // + // then you are trying to call that macro for a structure defined like that: + // + // struct T { + // ... + // private: + // T(const T &); + // ... + // }; + // + // To fix that you must modify your structure: + // + // // C++03 and C++11 version + // struct T: private boost::noncopyable { + // ... + // private: + // T(const T &); + // ... + // }; + // + // // C++11 version + // struct T { + // ... + // private: + // T(const T &) = delete; + // ... + // }; + BOOST_STATIC_CONSTANT(bool, value = ( + sizeof(test( + boost::declval::type>() + )) == sizeof(boost::type_traits::yes_type) + && + !boost::is_rvalue_reference::value + && !boost::is_array::value + )); + }; + + template + struct is_copy_constructible_impl2 { + BOOST_STATIC_CONSTANT(bool, value = false); + }; + + template + struct is_copy_constructible_impl { + + BOOST_STATIC_CONSTANT(bool, value = ( + boost::detail::is_copy_constructible_impl2< + boost::is_base_and_derived::value, + T + >::value + )); + }; + + } // namespace detail + + template struct is_copy_constructible : public integral_constant::value>{}; + template <> struct is_copy_constructible : public false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS + template <> struct is_copy_constructible : public false_type{}; + template <> struct is_copy_constructible : public false_type{}; + template <> struct is_copy_constructible : public false_type{}; +#endif + +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif + +#endif // BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_default_constructible.hpp b/contrib/src/boost/type_traits/is_default_constructible.hpp new file mode 100644 index 0000000..7fd63f8 --- /dev/null +++ b/contrib/src/boost/type_traits/is_default_constructible.hpp @@ -0,0 +1,64 @@ + +// (C) Copyright John Maddock 2015. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED + +#include +#include + +#if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) + +#include + +namespace boost{ + + namespace detail{ + + struct is_default_constructible_imp + { + template + static boost::type_traits::yes_type test(int); + + template + static boost::type_traits::no_type test(...); + }; + + } + + template struct is_default_constructible : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)>{}; + template struct is_default_constructible : public is_default_constructible{}; + template struct is_default_constructible : public is_default_constructible{}; + template struct is_default_constructible : public integral_constant{}; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template struct is_default_constructible : public integral_constant{}; +#endif + template <> struct is_default_constructible : public integral_constant{}; + template <> struct is_default_constructible : public integral_constant{}; + template <> struct is_default_constructible : public integral_constant{}; + template <> struct is_default_constructible : public integral_constant{}; + +#else + +#include + +namespace boost{ + + // We don't know how to implement this, note we can not use has_trivial_constructor here + // because the correct implementation of that trait requires this one: + template struct is_default_constructible : public is_pod{}; + template <> struct is_default_constructible : public integral_constant{}; + template <> struct is_default_constructible : public integral_constant{}; + template <> struct is_default_constructible : public integral_constant{}; + template <> struct is_default_constructible : public integral_constant{}; + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_destructible.hpp b/contrib/src/boost/type_traits/is_destructible.hpp new file mode 100644 index 0000000..9f1e5d9 --- /dev/null +++ b/contrib/src/boost/type_traits/is_destructible.hpp @@ -0,0 +1,60 @@ + +// (C) Copyright John Maddock 2015. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED + +#include +#include + +#if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) + +#include +#include + +namespace boost{ + + namespace detail{ + + struct is_destructible_imp + { + template().~T())> + static boost::type_traits::yes_type test(int); + template + static boost::type_traits::no_type test(...); + }; + + } + + template struct is_destructible : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)>{}; + +#else + +#include +#include + +namespace boost{ + + // We don't know how to implement this: + template struct is_destructible : public integral_constant::value || is_class::value>{}; +#endif + + template <> struct is_destructible : public false_type{}; + template <> struct is_destructible : public false_type{}; + template <> struct is_destructible : public false_type{}; + template <> struct is_destructible : public false_type{}; + template struct is_destructible : public is_destructible{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template struct is_destructible : public is_destructible{}; +#endif + template struct is_destructible : public is_destructible{}; + template struct is_destructible : public is_destructible{}; + +} // namespace boost + +#endif // BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_enum.hpp b/contrib/src/boost/type_traits/is_enum.hpp new file mode 100644 index 0000000..eada480 --- /dev/null +++ b/contrib/src/boost/type_traits/is_enum.hpp @@ -0,0 +1,166 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_ENUM_HPP_INCLUDED +#define BOOST_TT_IS_ENUM_HPP_INCLUDED + +#include +#include +#ifndef BOOST_IS_ENUM +#include +#include +#include +#include +#include +#ifdef __GNUC__ +#include +#endif +#include +#if defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) +# include +# include +#endif +#endif + +namespace boost { + +#ifndef BOOST_IS_ENUM +#if !(defined(__BORLANDC__) && (__BORLANDC__ <= 0x551)) + +namespace detail { + +#if defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) + +template +struct is_class_or_union +{ + BOOST_STATIC_CONSTANT(bool, value = ::boost::is_class::value || ::boost::is_union::value); +}; + +#else + +template +struct is_class_or_union +{ +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))// we simply can't detect it this way. + BOOST_STATIC_CONSTANT(bool, value = false); +# else + template static ::boost::type_traits::yes_type is_class_or_union_tester(void(U::*)(void)); + +# if BOOST_WORKAROUND(__MWERKS__, <= 0x3000) // no SFINAE + static ::boost::type_traits::no_type is_class_or_union_tester(...); + BOOST_STATIC_CONSTANT( + bool, value = sizeof(is_class_or_union_tester(0)) == sizeof(::boost::type_traits::yes_type)); +# else + template + static ::boost::type_traits::no_type is_class_or_union_tester(...); + BOOST_STATIC_CONSTANT( + bool, value = sizeof(is_class_or_union_tester(0)) == sizeof(::boost::type_traits::yes_type)); +# endif +# endif +}; +#endif + +struct int_convertible +{ + int_convertible(int); +}; + +// Don't evaluate convertibility to int_convertible unless the type +// is non-arithmetic. This suppresses warnings with GCC. +template +struct is_enum_helper +{ + template struct type + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template <> +struct is_enum_helper +{ + template struct type + { + static const bool value = ::boost::is_convertible::type, ::boost::detail::int_convertible>::value; + }; +}; + +template struct is_enum_impl +{ + //typedef ::boost::add_reference ar_t; + //typedef typename ar_t::type r_type; + +#if defined(__GNUC__) + +#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION + + // We MUST check for is_class_or_union on conforming compilers in + // order to correctly deduce that noncopyable types are not enums + // (dwa 2002/04/15)... + BOOST_STATIC_CONSTANT(bool, selector = + ::boost::is_arithmetic::value + || ::boost::is_reference::value + || ::boost::is_function::value + || is_class_or_union::value + || is_array::value); +#else + // ...however, not checking is_class_or_union on non-conforming + // compilers prevents a dependency recursion. + BOOST_STATIC_CONSTANT(bool, selector = + ::boost::is_arithmetic::value + || ::boost::is_reference::value + || ::boost::is_function::value + || is_array::value); +#endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION + +#else // !defined(__GNUC__): + + BOOST_STATIC_CONSTANT(bool, selector = + ::boost::is_arithmetic::value + || ::boost::is_reference::value + || is_class_or_union::value + || is_array::value); + +#endif + +#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) + typedef ::boost::detail::is_enum_helper< + ::boost::detail::is_enum_impl::selector + > se_t; +#else + typedef ::boost::detail::is_enum_helper se_t; +#endif + + typedef typename se_t::template type helper; + BOOST_STATIC_CONSTANT(bool, value = helper::value); +}; + +} // namespace detail + +template struct is_enum : public integral_constant::value> {}; + +#else // __BORLANDC__ +// +// buggy is_convertible prevents working +// implementation of is_enum: +template struct is_enum : public integral_constant {}; + +#endif + +#else // BOOST_IS_ENUM + +template struct is_enum : public integral_constant {}; + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_ENUM_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_floating_point.hpp b/contrib/src/boost/type_traits/is_floating_point.hpp new file mode 100644 index 0000000..196c900 --- /dev/null +++ b/contrib/src/boost/type_traits/is_floating_point.hpp @@ -0,0 +1,30 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000-2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED + +#include + +namespace boost { + +//* is a type T a floating-point type described in the standard (3.9.1p8) + template struct is_floating_point : public false_type{}; + template struct is_floating_point : public is_floating_point{}; + template struct is_floating_point : public is_floating_point{}; + template struct is_floating_point : public is_floating_point{}; + template<> struct is_floating_point : public true_type{}; + template<> struct is_floating_point : public true_type{}; + template<> struct is_floating_point : public true_type{}; + +#if defined(BOOST_HAS_FLOAT128) + template<> struct is_floating_point<__float128> : public true_type{}; +#endif + +} // namespace boost + +#endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_function.hpp b/contrib/src/boost/type_traits/is_function.hpp new file mode 100644 index 0000000..f77c1f0 --- /dev/null +++ b/contrib/src/boost/type_traits/is_function.hpp @@ -0,0 +1,102 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_FUNCTION_HPP_INCLUDED +#define BOOST_TT_IS_FUNCTION_HPP_INCLUDED + +#include +#include + +#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS) +# include +#else +# include +# include +#endif + +// is a type a function? +// Please note that this implementation is unnecessarily complex: +// we could just use !is_convertible::value, +// except that some compilers erroneously allow conversions from +// function pointers to void*. + +namespace boost { + +#if !defined( __CODEGEARC__ ) + +namespace detail { + +#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS) +template +struct is_function_chooser +{ + template< typename T > struct result_ + : public false_type {}; +}; + +template <> +struct is_function_chooser +{ + template< typename T > struct result_ + : public ::boost::type_traits::is_function_ptr_helper {}; +}; + +template +struct is_function_impl + : public is_function_chooser< ::boost::is_reference::value > + ::BOOST_NESTED_TEMPLATE result_ +{ +}; + +#else + +template +struct is_function_impl +{ +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(push) +#pragma warning(disable:6334) +#endif + static T* t; + BOOST_STATIC_CONSTANT( + bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t)) + == sizeof(::boost::type_traits::yes_type) + ); +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(pop) +#endif +}; + +template +struct is_function_impl : public false_type +{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct is_function_impl : public false_type +{}; +#endif + +#endif + +} // namespace detail + +#endif // !defined( __CODEGEARC__ ) + +#if defined( __CODEGEARC__ ) +template struct is_function : integral_constant {}; +#else +template struct is_function : integral_constant::value> {}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template struct is_function : public false_type {}; +#endif +#endif +} // namespace boost + +#endif // BOOST_TT_IS_FUNCTION_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_fundamental.hpp b/contrib/src/boost/type_traits/is_fundamental.hpp new file mode 100644 index 0000000..f58767a --- /dev/null +++ b/contrib/src/boost/type_traits/is_fundamental.hpp @@ -0,0 +1,26 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED +#define BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED + +#include +#include + +namespace boost { + +//* is a type T a fundamental type described in the standard (3.9.1) +#if defined( __CODEGEARC__ ) +template struct is_fundamental : public integral_constant {}; +#else +template struct is_fundamental : public integral_constant::value || ::boost::is_void::value> {}; +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_integral.hpp b/contrib/src/boost/type_traits/is_integral.hpp new file mode 100644 index 0000000..7a7e54b --- /dev/null +++ b/contrib/src/boost/type_traits/is_integral.hpp @@ -0,0 +1,89 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_INTEGRAL_HPP_INCLUDED +#define BOOST_TT_IS_INTEGRAL_HPP_INCLUDED + +#include +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) + template + struct is_integral : public integral_constant {}; +#else + +template struct is_integral : public false_type {}; +template struct is_integral : public is_integral {}; +template struct is_integral : public is_integral{}; +template struct is_integral : public is_integral{}; + +//* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3) +// as an extension we include long long, as this is likely to be added to the +// standard at a later date +template<> struct is_integral : public true_type {}; +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; + +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; + +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +// If the following line fails to compile and you're using the Intel +// compiler, see http://lists.boost.org/MailArchives/boost-users/msg06567.php, +// and define BOOST_NO_INTRINSIC_WCHAR_T on the command line. +template<> struct is_integral : public true_type{}; +#endif + +// Same set of integral types as in boost/type_traits/integral_promotion.hpp. +// Please, keep in sync. -- Alexander Nasonov +#if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ + || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300)) +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; +template<> struct is_integral<__int8> : public true_type{}; +template<> struct is_integral<__int16> : public true_type{}; +template<> struct is_integral<__int32> : public true_type{}; +#ifdef __BORLANDC__ +template<> struct is_integral : public true_type{}; +template<> struct is_integral<__int64> : public true_type{}; +#endif +#endif + +# if defined(BOOST_HAS_LONG_LONG) +template<> struct is_integral< ::boost::ulong_long_type> : public true_type{}; +template<> struct is_integral< ::boost::long_long_type> : public true_type{}; +#elif defined(BOOST_HAS_MS_INT64) +template<> struct is_integral : public true_type{}; +template<> struct is_integral<__int64> : public true_type{}; +#endif + +#ifdef BOOST_HAS_INT128 +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; +#endif +#ifndef BOOST_NO_CXX11_CHAR16_T +template<> struct is_integral : public true_type{}; +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T +template<> struct is_integral : public true_type{}; +#endif + +#endif // non-CodeGear implementation + +} // namespace boost + +#endif // BOOST_TT_IS_INTEGRAL_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_lvalue_reference.hpp b/contrib/src/boost/type_traits/is_lvalue_reference.hpp new file mode 100644 index 0000000..e94d787 --- /dev/null +++ b/contrib/src/boost/type_traits/is_lvalue_reference.hpp @@ -0,0 +1,50 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_lvalue_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED +#define BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED + +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) + template struct is_lvalue_reference : public integral_constant{}; +#else + + template struct is_lvalue_reference : public false_type{}; + template struct is_lvalue_reference : public true_type{}; + +#if defined(BOOST_ILLEGAL_CV_REFERENCES) +// these are illegal specialisations; cv-qualifies applied to +// references have no effect according to [8.3.2p1], +// C++ Builder requires them though as it treats cv-qualified +// references as distinct types... + template struct is_lvalue_reference : public true_type{}; + template struct is_lvalue_reference : public true_type{}; + template struct is_lvalue_reference : public true_type{}; +#endif + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED + diff --git a/contrib/src/boost/type_traits/is_member_function_pointer.hpp b/contrib/src/boost/type_traits/is_member_function_pointer.hpp new file mode 100644 index 0000000..223197f --- /dev/null +++ b/contrib/src/boost/type_traits/is_member_function_pointer.hpp @@ -0,0 +1,120 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED +#define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED + +#include +#include + +#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) + // + // Note: we use the "workaround" version for MSVC because it works for + // __stdcall etc function types, where as the partial specialisation + // version does not do so. + // +# include +# include +# include +#else +# include +# include +# include +# include +#endif + +namespace boost { + +#if defined( __CODEGEARC__ ) +template struct is_member_function_pointer : public integral_constant {}; +#elif !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) + +template struct is_member_function_pointer + : public ::boost::integral_constant::type>::value>{}; + +#else + +namespace detail { + +#ifndef __BORLANDC__ + +template +struct is_mem_fun_pointer_select +{ + template struct result_ : public false_type{}; +}; + +template <> +struct is_mem_fun_pointer_select +{ + template struct result_ + { +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(push) +#pragma warning(disable:6334) +#endif + static T* make_t; + typedef result_ self_type; + + BOOST_STATIC_CONSTANT( + bool, value = ( + 1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t)) + )); +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(pop) +#endif + }; +}; + +template +struct is_member_function_pointer_impl + : public is_mem_fun_pointer_select< + ::boost::is_reference::value || ::boost::is_array::value>::template result_{}; + +template +struct is_member_function_pointer_impl : public false_type{}; + +#else // Borland C++ + +template +struct is_member_function_pointer_impl +{ + static T* m_t; + BOOST_STATIC_CONSTANT( + bool, value = + (1 == sizeof(type_traits::is_mem_fun_pointer_tester(m_t))) ); +}; + +template +struct is_member_function_pointer_impl +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +#endif + +template<> struct is_member_function_pointer_impl : public false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template<> struct is_member_function_pointer_impl : public false_type{}; +template<> struct is_member_function_pointer_impl : public false_type{}; +template<> struct is_member_function_pointer_impl : public false_type{}; +#endif + +} // namespace detail + +template +struct is_member_function_pointer + : public integral_constant::value>{}; + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_member_pointer.hpp b/contrib/src/boost/type_traits/is_member_pointer.hpp new file mode 100644 index 0000000..9757afc --- /dev/null +++ b/contrib/src/boost/type_traits/is_member_pointer.hpp @@ -0,0 +1,45 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED +#define BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED + +#include +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) +template struct is_member_pointer : public integral_constant{}; +#else +template struct is_member_pointer : public integral_constant::value>{}; +template struct is_member_pointer : public true_type{}; + +#if !BOOST_WORKAROUND(__MWERKS__,<=0x3003) && !BOOST_WORKAROUND(__IBMCPP__, <=600) +template struct is_member_pointer : public true_type{}; +template struct is_member_pointer : public true_type{}; +template struct is_member_pointer : public true_type{}; +#endif + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_pod.hpp b/contrib/src/boost/type_traits/is_pod.hpp new file mode 100644 index 0000000..9204c93 --- /dev/null +++ b/contrib/src/boost/type_traits/is_pod.hpp @@ -0,0 +1,58 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_POD_HPP_INCLUDED +#define BOOST_TT_IS_POD_HPP_INCLUDED + +#include +#include +#include +#include + +#ifdef __SUNPRO_CC +#include +#endif + +#include + +#ifndef BOOST_IS_POD +#define BOOST_INTERNAL_IS_POD(T) false +#else +#define BOOST_INTERNAL_IS_POD(T) BOOST_IS_POD(T) +#endif + +namespace boost { + +// forward declaration, needed by 'is_pod_array_helper' template below +template< typename T > struct is_POD; + +template struct is_pod +: public integral_constant::value || ::boost::is_void::value || BOOST_INTERNAL_IS_POD(T)> +{}; + +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template struct is_pod : public is_pod{}; +#endif + + +// the following help compilers without partial specialization support: +template<> struct is_pod : public true_type{}; + +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template<> struct is_pod : public true_type{}; +template<> struct is_pod : public true_type{}; +template<> struct is_pod : public true_type{}; +#endif + +template struct is_POD : public is_pod{}; + +} // namespace boost + +#undef BOOST_INTERNAL_IS_POD + +#endif // BOOST_TT_IS_POD_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_pointer.hpp b/contrib/src/boost/type_traits/is_pointer.hpp new file mode 100644 index 0000000..44b06c2 --- /dev/null +++ b/contrib/src/boost/type_traits/is_pointer.hpp @@ -0,0 +1,47 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_POINTER_HPP_INCLUDED +#define BOOST_TT_IS_POINTER_HPP_INCLUDED + +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) +template struct is_pointer : public integral_constant{}; +#else +template struct is_pointer : public false_type{}; +template struct is_pointer : public true_type{}; +template struct is_pointer : public true_type{}; +template struct is_pointer : public true_type{}; +template struct is_pointer : public true_type{}; + +#ifdef BOOST_MSVC +template struct is_pointer : public is_pointer{}; +template struct is_pointer : public is_pointer{}; +template struct is_pointer : public is_pointer{}; +#endif + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_POINTER_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_polymorphic.hpp b/contrib/src/boost/type_traits/is_polymorphic.hpp new file mode 100644 index 0000000..722d8b4 --- /dev/null +++ b/contrib/src/boost/type_traits/is_polymorphic.hpp @@ -0,0 +1,122 @@ +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_POLYMORPHIC_HPP +#define BOOST_TT_IS_POLYMORPHIC_HPP + +#include +#include +#ifndef BOOST_IS_POLYMORPHIC +#include +#endif +#include + +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) +#pragma warning(push) +#pragma warning(disable:4250) +#endif + +namespace boost{ + +#ifndef BOOST_IS_POLYMORPHIC + +namespace detail{ + +template +struct is_polymorphic_imp1 +{ +# if BOOST_WORKAROUND(__MWERKS__, <= 0x2407) // CWPro7 should return false always. + typedef char d1, (&d2)[2]; +# else + struct d1 : public T + { + d1(); +# if !defined(__GNUC__) // this raises warnings with some classes, and buys nothing with GCC + ~d1()throw(); +# endif + char padding[256]; + private: + // keep some picky compilers happy: + d1(const d1&); + d1& operator=(const d1&); + }; + struct d2 : public T + { + d2(); + virtual ~d2()throw(); +# if !defined(BOOST_MSVC) && !defined(__ICL) + // for some reason this messes up VC++ when T has virtual bases, + // probably likewise for compilers that use the same ABI: + struct unique{}; + virtual void unique_name_to_boost5487629(unique*); +# endif + char padding[256]; + private: + // keep some picky compilers happy: + d2(const d2&); + d2& operator=(const d2&); + }; +# endif + BOOST_STATIC_CONSTANT(bool, value = (sizeof(d2) == sizeof(d1))); +}; + +template struct is_polymorphic_imp1 : public is_polymorphic_imp1{}; +template struct is_polymorphic_imp1 : public is_polymorphic_imp1{}; +template struct is_polymorphic_imp1 : public is_polymorphic_imp1{}; + +template +struct is_polymorphic_imp2 +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_polymorphic_selector +{ + template + struct rebind + { + typedef is_polymorphic_imp2 type; + }; +}; + +template <> +struct is_polymorphic_selector +{ + template + struct rebind + { + typedef is_polymorphic_imp1 type; + }; +}; + +template +struct is_polymorphic_imp +{ + typedef is_polymorphic_selector< ::boost::is_class::value> selector; + typedef typename selector::template rebind binder; + typedef typename binder::type imp_type; + BOOST_STATIC_CONSTANT(bool, value = imp_type::value); +}; + +} // namespace detail + +template struct is_polymorphic : public integral_constant::value> {}; + +#else // BOOST_IS_POLYMORPHIC + +template struct is_polymorphic : public integral_constant {}; + +#endif + +} // namespace boost + +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) +#pragma warning(pop) +#endif + +#endif diff --git a/contrib/src/boost/type_traits/is_reference.hpp b/contrib/src/boost/type_traits/is_reference.hpp new file mode 100644 index 0000000..85f0a63 --- /dev/null +++ b/contrib/src/boost/type_traits/is_reference.hpp @@ -0,0 +1,30 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000, 2010. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_REFERENCE_HPP_INCLUDED +#define BOOST_TT_IS_REFERENCE_HPP_INCLUDED + +#include +#include + +namespace boost { + +template struct is_reference + : public + integral_constant< + bool, + ::boost::is_lvalue_reference::value || ::boost::is_rvalue_reference::value> +{}; + +} // namespace boost + +#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED + diff --git a/contrib/src/boost/type_traits/is_rvalue_reference.hpp b/contrib/src/boost/type_traits/is_rvalue_reference.hpp new file mode 100644 index 0000000..50e88ed --- /dev/null +++ b/contrib/src/boost/type_traits/is_rvalue_reference.hpp @@ -0,0 +1,25 @@ + +// (C) John Maddock 2010. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED +#define BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED + +#include +#include + +namespace boost { + +template struct is_rvalue_reference : public false_type {}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template struct is_rvalue_reference : public true_type {}; +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED + diff --git a/contrib/src/boost/type_traits/is_same.hpp b/contrib/src/boost/type_traits/is_same.hpp new file mode 100644 index 0000000..d16f4b2 --- /dev/null +++ b/contrib/src/boost/type_traits/is_same.hpp @@ -0,0 +1,41 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_SAME_HPP_INCLUDED +#define BOOST_TT_IS_SAME_HPP_INCLUDED + +#include + +namespace boost { + + + template struct is_same : public false_type {}; + template struct is_same : public true_type {}; +#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) +// without this, Borland's compiler gives the wrong answer for +// references to arrays: + template struct is_same : public true_type{}; +#endif + + +} // namespace boost + +#endif // BOOST_TT_IS_SAME_HPP_INCLUDED + diff --git a/contrib/src/boost/type_traits/is_scalar.hpp b/contrib/src/boost/type_traits/is_scalar.hpp new file mode 100644 index 0000000..3031440 --- /dev/null +++ b/contrib/src/boost/type_traits/is_scalar.hpp @@ -0,0 +1,27 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_SCALAR_HPP_INCLUDED +#define BOOST_TT_IS_SCALAR_HPP_INCLUDED + +#include +#include +#include +#include +#include + +namespace boost { + +template +struct is_scalar + : public integral_constant::value || ::boost::is_enum::value || ::boost::is_pointer::value || ::boost::is_member_pointer::value> +{}; + +} // namespace boost + +#endif // BOOST_TT_IS_SCALAR_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_signed.hpp b/contrib/src/boost/type_traits/is_signed.hpp new file mode 100644 index 0000000..70ca2e4 --- /dev/null +++ b/contrib/src/boost/type_traits/is_signed.hpp @@ -0,0 +1,163 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_SIGNED_HPP_INCLUDED +#define BOOST_TT_IS_SIGNED_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +#if !defined( __CODEGEARC__ ) + +#if !(defined(BOOST_MSVC) && BOOST_MSVC <= 1310) && \ + !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) &&\ + !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) + +namespace detail{ + +template +struct is_signed_values +{ + // + // Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's + // rather than "real" static constants simply doesn't work or give + // the correct answer. + // + typedef typename remove_cv::type no_cv_t; + static const no_cv_t minus_one = (static_cast(-1)); + static const no_cv_t zero = (static_cast(0)); +}; + +template +struct is_signed_helper +{ + typedef typename remove_cv::type no_cv_t; + BOOST_STATIC_CONSTANT(bool, value = (!(::boost::detail::is_signed_values::minus_one > boost::detail::is_signed_values::zero))); +}; + +template +struct is_signed_select_helper +{ + template + struct rebind + { + typedef is_signed_helper type; + }; +}; + +template <> +struct is_signed_select_helper +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_signed_impl +{ + typedef ::boost::detail::is_signed_select_helper< ::boost::is_integral::value || ::boost::is_enum::value> selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + BOOST_STATIC_CONSTANT(bool, value = type::value); +}; + +} + +template struct is_signed : public integral_constant::value> {}; + +#else + +template struct is_signed : public false_type{}; + +#endif + +#else //defined( __CODEGEARC__ ) + template struct is_signed : public integral_constant{}; +#endif + +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; + +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +#ifdef BOOST_HAS_LONG_LONG +template <> struct is_signed< ::boost::long_long_type> : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; + +template <> struct is_signed< ::boost::ulong_long_type> : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +#endif +#if defined(CHAR_MIN) +#if CHAR_MIN != 0 +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +#else +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +#endif +#endif +#if defined(WCHAR_MIN) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) +#if WCHAR_MIN != 0 +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +#else +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +#endif +#endif +} // namespace boost + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_union.hpp b/contrib/src/boost/type_traits/is_union.hpp new file mode 100644 index 0000000..c5e1a96 --- /dev/null +++ b/contrib/src/boost/type_traits/is_union.hpp @@ -0,0 +1,31 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_UNION_HPP_INCLUDED +#define BOOST_TT_IS_UNION_HPP_INCLUDED + +#include +#include + +namespace boost { + +#ifdef BOOST_IS_UNION +template struct is_union : public integral_constant {}; +#else +template struct is_union : public integral_constant {}; +#endif + +template struct is_union : public is_union{}; +template struct is_union : public is_union{}; +template struct is_union : public is_union{}; + +} // namespace boost + +#endif // BOOST_TT_IS_UNION_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_unsigned.hpp b/contrib/src/boost/type_traits/is_unsigned.hpp new file mode 100644 index 0000000..c4c54af --- /dev/null +++ b/contrib/src/boost/type_traits/is_unsigned.hpp @@ -0,0 +1,163 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_UNSIGNED_HPP_INCLUDED +#define BOOST_TT_IS_UNSIGNED_HPP_INCLUDED + +#include +#include +#include + +#include + +namespace boost { + +#if !defined( __CODEGEARC__ ) + +#if !(defined(BOOST_MSVC) && BOOST_MSVC <= 1310) &&\ + !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) &&\ + !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) + +namespace detail{ + +template +struct is_unsigned_values +{ + // + // Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's + // rather than "real" static constants simply doesn't work or give + // the correct answer. + // + typedef typename remove_cv::type no_cv_t; + static const no_cv_t minus_one = (static_cast(-1)); + static const no_cv_t zero = (static_cast(0)); +}; + +template +struct is_ununsigned_helper +{ + BOOST_STATIC_CONSTANT(bool, value = (::boost::detail::is_unsigned_values::minus_one > ::boost::detail::is_unsigned_values::zero)); +}; + +template +struct is_unsigned_select_helper +{ + template + struct rebind + { + typedef is_ununsigned_helper type; + }; +}; + +template <> +struct is_unsigned_select_helper +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_unsigned +{ + typedef ::boost::detail::is_unsigned_select_helper< ::boost::is_integral::value || ::boost::is_enum::value > selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + BOOST_STATIC_CONSTANT(bool, value = type::value); +}; + +} // namespace detail + +template struct is_unsigned : public integral_constant::value> {}; + +#else + +template struct is_unsigned : public false_type{}; + +#endif + +#else // defined( __CODEGEARC__ ) +template struct is_unsigned : public integral_constant {}; +#endif + +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; + +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned< short> : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned< int> : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned< long> : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +#ifdef BOOST_HAS_LONG_LONG +template <> struct is_unsigned< ::boost::ulong_long_type> : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; + +template <> struct is_unsigned< ::boost::long_long_type> : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +#endif +#if defined(CHAR_MIN) +#if CHAR_MIN == 0 +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +#else +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +#endif +#endif +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && defined(WCHAR_MIN) +#if WCHAR_MIN == 0 +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +#else +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +#endif +#endif +} // namespace boost + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_void.hpp b/contrib/src/boost/type_traits/is_void.hpp new file mode 100644 index 0000000..183f8ab --- /dev/null +++ b/contrib/src/boost/type_traits/is_void.hpp @@ -0,0 +1,26 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_VOID_HPP_INCLUDED +#define BOOST_TT_IS_VOID_HPP_INCLUDED + +#include + +namespace boost { + +template +struct is_void : public false_type {}; + +template<> struct is_void : public true_type {}; +template<> struct is_void : public true_type{}; +template<> struct is_void : public true_type{}; +template<> struct is_void : public true_type{}; + +} // namespace boost + +#endif // BOOST_TT_IS_VOID_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/is_volatile.hpp b/contrib/src/boost/type_traits/is_volatile.hpp new file mode 100644 index 0000000..cefe987 --- /dev/null +++ b/contrib/src/boost/type_traits/is_volatile.hpp @@ -0,0 +1,45 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_VOLATILE_HPP_INCLUDED +#define BOOST_TT_IS_VOLATILE_HPP_INCLUDED + +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) + + template + struct is_volatile : public integral_constant {}; + +#else + + template + struct is_volatile : public false_type {}; + template struct is_volatile : public true_type{}; + template struct is_volatile : public true_type{}; + template struct is_volatile : public true_type{}; + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_VOLATILE_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/make_signed.hpp b/contrib/src/boost/type_traits/make_signed.hpp new file mode 100644 index 0000000..0d2d5df --- /dev/null +++ b/contrib/src/boost/type_traits/make_signed.hpp @@ -0,0 +1,131 @@ + +// (C) Copyright John Maddock 2007. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_MAKE_SIGNED_HPP_INCLUDED +#define BOOST_TT_MAKE_SIGNED_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +template +struct make_signed +{ +private: + BOOST_STATIC_ASSERT_MSG(( ::boost::is_integral::value || ::boost::is_enum::value), "The template argument to make_signed must be an integer or enum type."); + BOOST_STATIC_ASSERT_MSG(!(::boost::is_same::type, bool>::value), "The template argument to make_signed must not be the type bool."); + + typedef typename remove_cv::type t_no_cv; + typedef typename conditional< + (::boost::is_signed::value + && ::boost::is_integral::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value), + T, + typename conditional< + (::boost::is_integral::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value), + typename conditional< + is_same::value, + signed char, + typename conditional< + is_same::value, + signed short, + typename conditional< + is_same::value, + int, + typename conditional< + is_same::value, + long, +#if defined(BOOST_HAS_LONG_LONG) +#ifdef BOOST_HAS_INT128 + typename conditional< + sizeof(t_no_cv) == sizeof(boost::long_long_type), + boost::long_long_type, + boost::int128_type + >::type +#else + boost::long_long_type +#endif +#elif defined(BOOST_HAS_MS_INT64) + __int64 +#else + long +#endif + >::type + >::type + >::type + >::type, + // Not a regular integer type: + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned char), + signed char, + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned short), + signed short, + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned int), + int, + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned long), + long, +#if defined(BOOST_HAS_LONG_LONG) +#ifdef BOOST_HAS_INT128 + typename conditional< + sizeof(t_no_cv) == sizeof(boost::long_long_type), + boost::long_long_type, + boost::int128_type + >::type +#else + boost::long_long_type +#endif +#elif defined(BOOST_HAS_MS_INT64) + __int64 +#else + long +#endif + >::type + >::type + >::type + >::type + >::type + >::type base_integer_type; + + // Add back any const qualifier: + typedef typename conditional< + is_const::value, + typename add_const::type, + base_integer_type + >::type const_base_integer_type; +public: + // Add back any volatile qualifier: + typedef typename conditional< + is_volatile::value, + typename add_volatile::type, + const_base_integer_type + >::type type; +}; + +} // namespace boost + +#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED + diff --git a/contrib/src/boost/type_traits/make_unsigned.hpp b/contrib/src/boost/type_traits/make_unsigned.hpp new file mode 100644 index 0000000..4b21eba --- /dev/null +++ b/contrib/src/boost/type_traits/make_unsigned.hpp @@ -0,0 +1,130 @@ + +// (C) Copyright John Maddock 2007. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_MAKE_UNSIGNED_HPP_INCLUDED +#define BOOST_TT_MAKE_UNSIGNED_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +template +struct make_unsigned +{ +private: + BOOST_STATIC_ASSERT_MSG((::boost::is_integral::value || ::boost::is_enum::value), "The template argument to make_unsigned must be an integer or enum type."); + BOOST_STATIC_ASSERT_MSG((! ::boost::is_same::type, bool>::value), "The template argument to make_unsigned must not be the type bool"); + + typedef typename remove_cv::type t_no_cv; + typedef typename conditional< + (::boost::is_unsigned::value && ::boost::is_integral::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value), + T, + typename conditional< + (::boost::is_integral::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value), + typename conditional< + is_same::value, + unsigned char, + typename conditional< + is_same::value, + unsigned short, + typename conditional< + is_same::value, + unsigned int, + typename conditional< + is_same::value, + unsigned long, +#if defined(BOOST_HAS_LONG_LONG) +#ifdef BOOST_HAS_INT128 + typename conditional< + sizeof(t_no_cv) == sizeof(boost::ulong_long_type), + boost::ulong_long_type, + boost::uint128_type + >::type +#else + boost::ulong_long_type +#endif +#elif defined(BOOST_HAS_MS_INT64) + unsigned __int64 +#else + unsigned long +#endif + >::type + >::type + >::type + >::type, + // Not a regular integer type: + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned char), + unsigned char, + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned short), + unsigned short, + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned int), + unsigned int, + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned long), + unsigned long, +#if defined(BOOST_HAS_LONG_LONG) +#ifdef BOOST_HAS_INT128 + typename conditional< + sizeof(t_no_cv) == sizeof(boost::ulong_long_type), + boost::ulong_long_type, + boost::uint128_type + >::type +#else + boost::ulong_long_type +#endif +#elif defined(BOOST_HAS_MS_INT64) + unsigned __int64 +#else + unsigned long +#endif + >::type + >::type + >::type + >::type + >::type + >::type base_integer_type; + + // Add back any const qualifier: + typedef typename conditional< + is_const::value, + typename add_const::type, + base_integer_type + >::type const_base_integer_type; +public: + // Add back any volatile qualifier: + typedef typename conditional< + is_volatile::value, + typename add_volatile::type, + const_base_integer_type + >::type type; +}; + +} // namespace boost + +#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED + diff --git a/contrib/src/boost/type_traits/remove_const.hpp b/contrib/src/boost/type_traits/remove_const.hpp new file mode 100644 index 0000000..b47f851 --- /dev/null +++ b/contrib/src/boost/type_traits/remove_const.hpp @@ -0,0 +1,33 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_REMOVE_CONST_HPP_INCLUDED +#define BOOST_TT_REMOVE_CONST_HPP_INCLUDED + +#include +#include +#include + +namespace boost { + + // convert a type T to a non-cv-qualified type - remove_const + template struct remove_const{ typedef T type; }; + template struct remove_const{ typedef T type; }; + +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) + template struct remove_const{ typedef T type[N]; }; +#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + template struct remove_const{ typedef T type[]; }; +#endif +#endif + +} // namespace boost + +#endif // BOOST_TT_REMOVE_CONST_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/remove_cv.hpp b/contrib/src/boost/type_traits/remove_cv.hpp new file mode 100644 index 0000000..b50607f --- /dev/null +++ b/contrib/src/boost/type_traits/remove_cv.hpp @@ -0,0 +1,40 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_REMOVE_CV_HPP_INCLUDED +#define BOOST_TT_REMOVE_CV_HPP_INCLUDED + +#include +#include +#include + +namespace boost { + + // convert a type T to a non-cv-qualified type - remove_cv +template struct remove_cv{ typedef T type; }; +template struct remove_cv{ typedef T type; }; +template struct remove_cv{ typedef T type; }; +template struct remove_cv{ typedef T type; }; + +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template struct remove_cv{ typedef T type[N]; }; +template struct remove_cv{ typedef T type[N]; }; +template struct remove_cv{ typedef T type[N]; }; +#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +template struct remove_cv{ typedef T type[]; }; +template struct remove_cv{ typedef T type[]; }; +template struct remove_cv{ typedef T type[]; }; +#endif +#endif + + +} // namespace boost + +#endif // BOOST_TT_REMOVE_CV_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/remove_pointer.hpp b/contrib/src/boost/type_traits/remove_pointer.hpp new file mode 100644 index 0000000..fb79e59 --- /dev/null +++ b/contrib/src/boost/type_traits/remove_pointer.hpp @@ -0,0 +1,77 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_REMOVE_POINTER_HPP_INCLUDED +#define BOOST_TT_REMOVE_POINTER_HPP_INCLUDED + +#include + +#if defined(BOOST_MSVC) +#include +#include +#endif + +namespace boost { + +#ifdef BOOST_MSVC + +namespace detail{ + + // + // We need all this crazy indirection because a type such as: + // + // T (*const)(U) + // + // Does not bind to a or partial specialization with VC10 and earlier + // + template + struct remove_pointer_imp + { + typedef T type; + }; + + template + struct remove_pointer_imp + { + typedef T type; + }; + + template + struct remove_pointer_imp3 + { + typedef typename remove_pointer_imp::type>::type type; + }; + + template + struct remove_pointer_imp3 + { + typedef T type; + }; + + template + struct remove_pointer_imp2 + { + typedef typename remove_pointer_imp3::value>::type type; + }; +} + +template struct remove_pointer{ typedef typename boost::detail::remove_pointer_imp2::type type; }; + +#else + +template struct remove_pointer{ typedef T type; }; +template struct remove_pointer{ typedef T type; }; +template struct remove_pointer{ typedef T type; }; +template struct remove_pointer{ typedef T type; }; +template struct remove_pointer{ typedef T type; }; + +#endif + +} // namespace boost + +#endif // BOOST_TT_REMOVE_POINTER_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/remove_reference.hpp b/contrib/src/boost/type_traits/remove_reference.hpp new file mode 100644 index 0000000..f75e677 --- /dev/null +++ b/contrib/src/boost/type_traits/remove_reference.hpp @@ -0,0 +1,54 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED +#define BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED + +#include +#include + +namespace boost { + + +namespace detail{ +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +template +struct remove_rvalue_ref +{ + typedef T type; +}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct remove_rvalue_ref +{ + typedef T type; +}; +#endif + +} // namespace detail + +template struct remove_reference{ typedef typename boost::detail::remove_rvalue_ref::type type; }; +template struct remove_reference{ typedef T type; }; + +#if defined(BOOST_ILLEGAL_CV_REFERENCES) +// these are illegal specialisations; cv-qualifies applied to +// references have no effect according to [8.3.2p1], +// C++ Builder requires them though as it treats cv-qualified +// references as distinct types... +template struct remove_reference{ typedef T type; }; +template struct remove_reference{ typedef T type; }; +template struct remove_reference{ typedef T type; }; +#endif + + +} // namespace boost + +#endif // BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED diff --git a/contrib/src/boost/type_traits/type_with_alignment.hpp b/contrib/src/boost/type_traits/type_with_alignment.hpp new file mode 100644 index 0000000..ffa054a --- /dev/null +++ b/contrib/src/boost/type_traits/type_with_alignment.hpp @@ -0,0 +1,261 @@ +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED +#define BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED + +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4121) // alignment is sensitive to packing +#endif + +#ifdef _MSC_VER +#include +#endif + +namespace boost { + namespace detail{ + +#ifndef __BORLANDC__ + + union max_align + { + char c; + short s; + int i; + long l; +#ifndef BOOST_NO_LONG_LONG + boost::long_long_type ll; +#endif +#ifdef BOOST_HAS_INT128 + boost::int128_type i128; +#endif + float f; + double d; + long double ld; +#ifdef BOOST_HAS_FLOAT128 + __float128 f128; +#endif + }; + +template struct long_double_alignment{ typedef long double type; }; +template struct long_double_alignment{ typedef boost::detail::max_align type; }; + +template struct double_alignment{ typedef double type; }; +template struct double_alignment{ typedef typename long_double_alignment::value >= Target>::type type; }; + +#ifndef BOOST_NO_LONG_LONG +template struct long_long_alignment{ typedef boost::long_long_type type; }; +template struct long_long_alignment{ typedef typename double_alignment::value >= Target>::type type; }; +#endif + +template struct long_alignment{ typedef long type; }; +#ifndef BOOST_NO_LONG_LONG +template struct long_alignment{ typedef typename long_long_alignment::value >= Target>::type type; }; +#else +template struct long_alignment{ typedef typename double_alignment::value >= Target>::type type; }; +#endif + +template struct int_alignment{ typedef int type; }; +template struct int_alignment{ typedef typename long_alignment::value >= Target>::type type; }; + +template struct short_alignment{ typedef short type; }; +template struct short_alignment{ typedef typename int_alignment::value >= Target>::type type; }; + +template struct char_alignment{ typedef char type; }; +template struct char_alignment{ typedef typename short_alignment::value >= Target>::type type; }; + +} + +template +struct type_with_alignment +{ + typedef typename boost::detail::char_alignment::value >= Align>::type type; +}; + +#if (defined(__GNUC__) || (defined (__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)) || defined(__clang__)) && !defined(BOOST_TT_DISABLE_INTRINSICS) +namespace tt_align_ns { +struct __attribute__((__aligned__(2))) a2 {}; +struct __attribute__((__aligned__(4))) a4 {}; +struct __attribute__((__aligned__(8))) a8 {}; +struct __attribute__((__aligned__(16))) a16 {}; +struct __attribute__((__aligned__(32))) a32 {}; +struct __attribute__((__aligned__(64))) a64 {}; +struct __attribute__((__aligned__(128))) a128 {}; +} + +template<> struct type_with_alignment<1> { public: typedef char type; }; +template<> struct type_with_alignment<2> { public: typedef tt_align_ns::a2 type; }; +template<> struct type_with_alignment<4> { public: typedef tt_align_ns::a4 type; }; +template<> struct type_with_alignment<8> { public: typedef tt_align_ns::a8 type; }; +template<> struct type_with_alignment<16> { public: typedef tt_align_ns::a16 type; }; +template<> struct type_with_alignment<32> { public: typedef tt_align_ns::a32 type; }; +template<> struct type_with_alignment<64> { public: typedef tt_align_ns::a64 type; }; +template<> struct type_with_alignment<128> { public: typedef tt_align_ns::a128 type; }; + +template<> struct is_pod< ::boost::tt_align_ns::a2> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a4> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a8> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a16> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a32> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a64> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a128> : public true_type{}; + +#endif +#if (defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && !defined(BOOST_TT_DISABLE_INTRINSICS) +// +// MSVC supports types which have alignments greater than the normal +// maximum: these are used for example in the types __m64 and __m128 +// to provide types with alignment requirements which match the SSE +// registers. Therefore we extend type_with_alignment<> to support +// such types, however, we have to be careful to use a builtin type +// whenever possible otherwise we break previously working code: +// see http://article.gmane.org/gmane.comp.lib.boost.devel/173011 +// for an example and test case. Thus types like a8 below will +// be used *only* if the existing implementation can't provide a type +// with suitable alignment. This does mean however, that type_with_alignment<> +// may return a type which cannot be passed through a function call +// by value (and neither can any type containing such a type like +// Boost.Optional). However, this only happens when we have no choice +// in the matter because no other "ordinary" type is available. +// +namespace tt_align_ns { +struct __declspec(align(8)) a8 { + char m[8]; + typedef a8 type; +}; +struct __declspec(align(16)) a16 { + char m[16]; + typedef a16 type; +}; +struct __declspec(align(32)) a32 { + char m[32]; + typedef a32 type; +}; +struct __declspec(align(64)) a64 +{ + char m[64]; + typedef a64 type; +}; +struct __declspec(align(128)) a128 { + char m[128]; + typedef a128 type; +}; +} + +template<> struct type_with_alignment<8> +{ + typedef boost::conditional< + ::boost::alignment_of::value < 8, + tt_align_ns::a8, + boost::detail::char_alignment<8, false> >::type t1; +public: + typedef t1::type type; +}; +template<> struct type_with_alignment<16> +{ + typedef boost::conditional< + ::boost::alignment_of::value < 16, + tt_align_ns::a16, + boost::detail::char_alignment<16, false> >::type t1; +public: + typedef t1::type type; +}; +template<> struct type_with_alignment<32> +{ + typedef boost::conditional< + ::boost::alignment_of::value < 32, + tt_align_ns::a32, + boost::detail::char_alignment<32, false> >::type t1; +public: + typedef t1::type type; +}; +template<> struct type_with_alignment<64> { + typedef boost::conditional< + ::boost::alignment_of::value < 64, + tt_align_ns::a64, + boost::detail::char_alignment<64, false> >::type t1; +public: + typedef t1::type type; +}; +template<> struct type_with_alignment<128> { + typedef boost::conditional< + ::boost::alignment_of::value < 128, + tt_align_ns::a128, + boost::detail::char_alignment<128, false> >::type t1; +public: + typedef t1::type type; +}; + +template<> struct is_pod< ::boost::tt_align_ns::a8> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a16> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a32> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a64> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a128> : public true_type{}; + +#endif + +#else + +// +// Borland specific version, we have this for two reasons: +// 1) The version above doesn't always compile (with the new test cases for example) +// 2) Because of Borlands #pragma option we can create types with alignments that are +// greater that the largest aligned builtin type. + +namespace tt_align_ns{ +#pragma option push -a16 +struct a2{ short s; }; +struct a4{ int s; }; +struct a8{ double s; }; +struct a16{ long double s; }; +#pragma option pop +} + +namespace detail { + +typedef ::boost::tt_align_ns::a16 max_align; + +} +//#if ! BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) +template <> struct is_pod< ::boost::tt_align_ns::a2> : public true_type{}; +template <> struct is_pod< ::boost::tt_align_ns::a4> : public true_type{}; +template <> struct is_pod< ::boost::tt_align_ns::a8> : public true_type{}; +template <> struct is_pod< ::boost::tt_align_ns::a16> : public true_type{}; +//#endif + +template struct type_with_alignment +{ + // We should never get to here, but if we do use the maximally + // aligned type: + // BOOST_STATIC_ASSERT(0); + typedef tt_align_ns::a16 type; +}; +template <> struct type_with_alignment<1>{ typedef char type; }; +template <> struct type_with_alignment<2>{ typedef tt_align_ns::a2 type; }; +template <> struct type_with_alignment<4>{ typedef tt_align_ns::a4 type; }; +template <> struct type_with_alignment<8>{ typedef tt_align_ns::a8 type; }; +template <> struct type_with_alignment<16>{ typedef tt_align_ns::a16 type; }; + +#endif + +} // namespace boost + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +#endif // BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED + + diff --git a/contrib/src/boost/utility.hpp b/contrib/src/boost/utility.hpp new file mode 100644 index 0000000..82177c8 --- /dev/null +++ b/contrib/src/boost/utility.hpp @@ -0,0 +1,21 @@ +// Boost utility.hpp header file -------------------------------------------// + +// Copyright 1999-2003 Aleksey Gurtovoy. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or a copy at .) + +// See for the library's home page. + +#ifndef BOOST_UTILITY_HPP +#define BOOST_UTILITY_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_UTILITY_HPP diff --git a/contrib/src/boost/utility/addressof.hpp b/contrib/src/boost/utility/addressof.hpp new file mode 100644 index 0000000..db4da80 --- /dev/null +++ b/contrib/src/boost/utility/addressof.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_UTILITY_ADDRESSOF_HPP +#define BOOST_UTILITY_ADDRESSOF_HPP + +// The header file at this path is deprecated; +// use boost/core/addressof.hpp instead. + +#include + +#endif diff --git a/contrib/src/boost/utility/base_from_member.hpp b/contrib/src/boost/utility/base_from_member.hpp new file mode 100644 index 0000000..fc0e13c --- /dev/null +++ b/contrib/src/boost/utility/base_from_member.hpp @@ -0,0 +1,171 @@ +// boost utility/base_from_member.hpp header file --------------------------// + +// Copyright 2001, 2003, 2004, 2012 Daryle Walker. Use, modification, and +// distribution are subject to the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or a copy at +// .) + +// See for the library's home page. + +#ifndef BOOST_UTILITY_BASE_FROM_MEMBER_HPP +#define BOOST_UTILITY_BASE_FROM_MEMBER_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +// Base-from-member arity configuration macro ------------------------------// + +// The following macro determines how many arguments will be in the largest +// constructor template of base_from_member. Constructor templates will be +// generated from one argument to this maximum. Code from other files can read +// this number if they need to always match the exact maximum base_from_member +// uses. The maximum constructor length can be changed by overriding the +// #defined constant. Make sure to apply the override, if any, for all source +// files during project compiling for consistency. + +// Contributed by Jonathan Turkanis + +#ifndef BOOST_BASE_FROM_MEMBER_MAX_ARITY +#define BOOST_BASE_FROM_MEMBER_MAX_ARITY 10 +#endif + + +// An iteration of a constructor template for base_from_member -------------// + +// A macro that should expand to: +// template < typename T1, ..., typename Tn > +// base_from_member( T1 x1, ..., Tn xn ) +// : member( x1, ..., xn ) +// {} +// This macro should only persist within this file. + +#define BOOST_PRIVATE_CTR_DEF( z, n, data ) \ + template < BOOST_PP_ENUM_PARAMS(n, typename T) > \ + explicit base_from_member( BOOST_PP_ENUM_BINARY_PARAMS(n, T, x) ) \ + : member( BOOST_PP_ENUM_PARAMS(n, x) ) \ + {} \ + /**/ + + +namespace boost +{ + +namespace detail +{ + +// Type-unmarking class template -------------------------------------------// + +// Type-trait to get the raw type, i.e. the type without top-level reference nor +// cv-qualification, from a type expression. Mainly for function arguments, any +// reference part is stripped first. + +// Contributed by Daryle Walker + +template < typename T > +struct remove_cv_ref +{ + typedef typename ::boost::remove_cv::type>::type type; + +}; // boost::detail::remove_cv_ref + +// Unmarked-type comparison class template ---------------------------------// + +// Type-trait to check if two type expressions have the same raw type. + +// Contributed by Daryle Walker, based on a work-around by Luc Danton + +template < typename T, typename U > +struct is_related + : public ::boost::is_same< + typename ::boost::detail::remove_cv_ref::type, + typename ::boost::detail::remove_cv_ref::type > +{}; + +// Enable-if-on-unidentical-unmarked-type class template -------------------// + +// Enable-if on the first two type expressions NOT having the same raw type. + +// Contributed by Daryle Walker, based on a work-around by Luc Danton + +#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES +template +struct enable_if_unrelated + : public ::boost::enable_if_c +{}; + +template +struct enable_if_unrelated + : public ::boost::disable_if< ::boost::detail::is_related > +{}; +#endif + +} // namespace boost::detail + + +// Base-from-member class template -----------------------------------------// + +// Helper to initialize a base object so a derived class can use this +// object in the initialization of another base class. Used by +// Dietmar Kuehl from ideas by Ron Klatcho to solve the problem of a +// base class needing to be initialized by a member. + +// Contributed by Daryle Walker + +template < typename MemberType, int UniqueID = 0 > +class base_from_member +{ +protected: + MemberType member; + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \ + !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ + !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && \ + !(defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 4)) + template ::type> + explicit BOOST_CONSTEXPR base_from_member( T&& ...x ) + BOOST_NOEXCEPT_IF( BOOST_NOEXCEPT_EXPR(::new ((void*) 0) MemberType( + static_cast(x)... )) ) // no std::is_nothrow_constructible... + : member( static_cast(x)... ) // ...nor std::forward needed + {} +#else + base_from_member() + : member() + {} + + BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY), + BOOST_PRIVATE_CTR_DEF, _ ) +#endif + +}; // boost::base_from_member + +template < typename MemberType, int UniqueID > +class base_from_member +{ +protected: + MemberType& member; + + explicit BOOST_CONSTEXPR base_from_member( MemberType& x ) + BOOST_NOEXCEPT + : member( x ) + {} + +}; // boost::base_from_member + +} // namespace boost + + +// Undo any private macros +#undef BOOST_PRIVATE_CTR_DEF + + +#endif // BOOST_UTILITY_BASE_FROM_MEMBER_HPP diff --git a/contrib/src/boost/utility/binary.hpp b/contrib/src/boost/utility/binary.hpp new file mode 100644 index 0000000..8cef146 --- /dev/null +++ b/contrib/src/boost/utility/binary.hpp @@ -0,0 +1,708 @@ +/*============================================================================= + Copyright (c) 2005 Matthew Calabrese + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_UTILITY_BINARY_HPP +#define BOOST_UTILITY_BINARY_HPP + +/*============================================================================= + + Binary Literal Utility + ______________________ + + + The following code works by converting the input bit pattern into a + Boost.Preprocessor sequence, then converting groupings of 3 bits each into + the corresponding octal digit, and finally concatenating all of the digits + together along with a leading zero. This yields a standard octal literal + with the desired value as specified in bits. + +==============================================================================*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BOOST_BINARY( bit_groupings ) \ + BOOST_BINARY_LITERAL_D( BOOST_PP_DEDUCE_D(), bit_groupings ) + +#define BOOST_BINARY_U( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, U ) + +#define BOOST_BINARY_L( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, L ) + +#define BOOST_BINARY_UL( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, UL ) + +#define BOOST_BINARY_LU( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, LU ) + +#define BOOST_BINARY_LL( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, LL ) + +#define BOOST_BINARY_ULL( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, ULL ) + +#define BOOST_BINARY_LLU( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, LLU ) + +#define BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, suffix ) \ + BOOST_SUFFIXED_BINARY_LITERAL_D( BOOST_PP_DEDUCE_D(), bit_groupings, suffix ) + +#define BOOST_SUFFIXED_BINARY_LITERAL_D( d, bit_groupings, suffix ) \ + BOOST_PP_CAT( BOOST_BINARY_LITERAL_D( d, bit_groupings ), suffix ) + +#define BOOST_BINARY_LITERAL_D( d, bit_groupings ) \ + BOOST_PP_SEQ_CAT \ + ( (0) BOOST_DETAIL_CREATE_BINARY_LITERAL_OCTAL_SEQUENCE( d, bit_groupings ) \ + ) + +#define BOOST_DETAIL_CREATE_BINARY_LITERAL_OCTAL_SEQUENCE( d, bit_groupings ) \ + BOOST_PP_SEQ_TRANSFORM \ + ( BOOST_DETAIL_TRIPLE_TO_OCTAL_OPERATION \ + , BOOST_PP_NIL \ + , BOOST_PP_IDENTITY( BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_TRIPLE_SEQUENCE )()\ + ( BOOST_DETAIL_COMPLETE_TRIPLE_SEQUENCE \ + ( \ + d \ + , BOOST_DETAIL_CREATE_BINARY_LITERAL_BIT_SEQUENCE( d, bit_groupings ) \ + ) \ + ) \ + ) + +#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_TRIPLE_SEQUENCE( bit_sequence ) \ + BOOST_PP_CAT \ + ( BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1 bit_sequence \ + , END_BIT \ + ) + +#define BOOST_DETAIL_BITS_PER_OCTIT 3 + +#define BOOST_DETAIL_COMPLETE_TRIPLE_SEQUENCE( d, incomplete_nibble_sequence ) \ + BOOST_PP_CAT \ + ( BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_ \ + , BOOST_PP_MOD_D( d \ + , BOOST_PP_SEQ_SIZE( incomplete_nibble_sequence ) \ + , BOOST_DETAIL_BITS_PER_OCTIT \ + ) \ + ) \ + incomplete_nibble_sequence + +#define BOOST_DETAIL_FIXED_COMPL( bit ) \ + BOOST_PP_CAT( BOOST_DETAIL_FIXED_COMPL_, bit ) + +#define BOOST_DETAIL_FIXED_COMPL_0 1 + +#define BOOST_DETAIL_FIXED_COMPL_1 0 + +#define BOOST_DETAIL_CREATE_BINARY_LITERAL_BIT_SEQUENCE( d, bit_groupings ) \ + BOOST_PP_EMPTY \ + BOOST_PP_CAT( BOOST_PP_WHILE_, d ) \ + ( BOOST_DETAIL_BINARY_LITERAL_PREDICATE \ + , BOOST_DETAIL_BINARY_LITERAL_OPERATION \ + , bit_groupings () \ + ) + +#define BOOST_DETAIL_BINARY_LITERAL_PREDICATE( d, state ) \ + BOOST_DETAIL_FIXED_COMPL( BOOST_DETAIL_IS_NULLARY_ARGS( state ) ) + +#define BOOST_DETAIL_BINARY_LITERAL_OPERATION( d, state ) \ + BOOST_DETAIL_SPLIT_AND_SWAP \ + ( BOOST_PP_CAT( BOOST_DETAIL_BINARY_LITERAL_ELEMENT_, state ) ) + +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_OPERATION( s, dummy_param, tuple ) \ + BOOST_DETAIL_TERNARY_TRIPLE_TO_OCTAL tuple + +#define BOOST_DETAIL_TERNARY_TRIPLE_TO_OCTAL( bit2, bit1, bit0 ) \ + BOOST_DETAIL_TRIPLE_TO_OCTAL_ ## bit2 ## bit1 ## bit0 + +#define BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_1 (0)(0) +#define BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_2 (0) +#define BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_0 + +#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1END_BIT + +#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1( bit ) \ + ( ( bit, BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_2 + +#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_2( bit ) \ + bit, BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_3 + +#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_3( bit ) \ + bit ) ) BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1 + +#define BOOST_DETAIL_SPLIT_AND_SWAP( params ) \ + BOOST_PP_IDENTITY( BOOST_DETAIL_SPLIT_AND_SWAP_PARAMS )()( params ) + +#define BOOST_DETAIL_SPLIT_AND_SWAP_PARAMS( first_param, second_param ) \ + second_param first_param + +#define BOOST_DETAIL_LEFT_OF_COMMA( params ) \ + BOOST_PP_IDENTITY( BOOST_DETAIL_FIRST_MACRO_PARAM )()( params ) + +#define BOOST_DETAIL_FIRST_MACRO_PARAM( first_param, second_param ) \ + first_param + +/* Begin derived concepts from Chaos by Paul Mensonides */ + +#define BOOST_DETAIL_IS_NULLARY_ARGS( param ) \ + BOOST_DETAIL_LEFT_OF_COMMA \ + ( BOOST_PP_CAT( BOOST_DETAIL_IS_NULLARY_ARGS_R_ \ + , BOOST_DETAIL_IS_NULLARY_ARGS_C param \ + ) \ + ) + +#define BOOST_DETAIL_IS_NULLARY_ARGS_C() \ + 1 + +#define BOOST_DETAIL_IS_NULLARY_ARGS_R_1 \ + 1, BOOST_PP_NIL + +#define BOOST_DETAIL_IS_NULLARY_ARGS_R_BOOST_DETAIL_IS_NULLARY_ARGS_C \ + 0, BOOST_PP_NIL + +/* End derived concepts from Chaos by Paul Mensonides */ + +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_000 0 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_001 1 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_010 2 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_011 3 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_100 4 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_101 5 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_110 6 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_111 7 + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0 (0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1 (1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00 (0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01 (0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10 (1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11 (1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00 (0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01 (0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10 (1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11 (1)(1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000 (0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001 (0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010 (0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011 (0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100 (1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101 (1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110 (1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111 (1)(1)(1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000 (0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001 (0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010 (0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011 (0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100 (0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101 (0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110 (0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111 (0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000 (1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001 (1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010 (1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011 (1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100 (1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101 (1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110 (1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111 (1)(1)(1)(1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000 (0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001 (0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010 (0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011 (0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100 (0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101 (0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110 (0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111 (0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000 (0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001 (0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010 (0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011 (0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100 (0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101 (0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110 (0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111 (0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000 (1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001 (1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010 (1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011 (1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100 (1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101 (1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110 (1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111 (1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000 (1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001 (1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010 (1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011 (1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100 (1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101 (1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110 (1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111 (1)(1)(1)(1)(1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000000 (0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000001 (0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000010 (0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000011 (0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000100 (0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000101 (0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000110 (0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000111 (0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001000 (0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001001 (0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001010 (0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001011 (0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001100 (0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001101 (0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001110 (0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001111 (0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010000 (0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010001 (0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010010 (0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010011 (0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010100 (0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010101 (0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010110 (0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010111 (0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011000 (0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011001 (0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011010 (0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011011 (0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011100 (0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011101 (0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011110 (0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011111 (0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100000 (1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100001 (1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100010 (1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100011 (1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100100 (1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100101 (1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100110 (1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100111 (1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101000 (1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101001 (1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101010 (1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101011 (1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101100 (1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101101 (1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101110 (1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101111 (1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110000 (1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110001 (1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110010 (1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110011 (1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110100 (1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110101 (1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110110 (1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110111 (1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111000 (1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111001 (1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111010 (1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111011 (1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111100 (1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111101 (1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111110 (1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111111 (1)(1)(1)(1)(1)(1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000000 (0)(0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000001 (0)(0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000010 (0)(0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000011 (0)(0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000100 (0)(0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000101 (0)(0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000110 (0)(0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000111 (0)(0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001000 (0)(0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001001 (0)(0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001010 (0)(0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001011 (0)(0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001100 (0)(0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001101 (0)(0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001110 (0)(0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001111 (0)(0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010000 (0)(0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010001 (0)(0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010010 (0)(0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010011 (0)(0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010100 (0)(0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010101 (0)(0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010110 (0)(0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010111 (0)(0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011000 (0)(0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011001 (0)(0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011010 (0)(0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011011 (0)(0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011100 (0)(0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011101 (0)(0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011110 (0)(0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011111 (0)(0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100000 (0)(1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100001 (0)(1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100010 (0)(1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100011 (0)(1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100100 (0)(1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100101 (0)(1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100110 (0)(1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100111 (0)(1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101000 (0)(1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101001 (0)(1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101010 (0)(1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101011 (0)(1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101100 (0)(1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101101 (0)(1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101110 (0)(1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101111 (0)(1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110000 (0)(1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110001 (0)(1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110010 (0)(1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110011 (0)(1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110100 (0)(1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110101 (0)(1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110110 (0)(1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110111 (0)(1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111000 (0)(1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111001 (0)(1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111010 (0)(1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111011 (0)(1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111100 (0)(1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111101 (0)(1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111110 (0)(1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111111 (0)(1)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000000 (1)(0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000001 (1)(0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000010 (1)(0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000011 (1)(0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000100 (1)(0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000101 (1)(0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000110 (1)(0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000111 (1)(0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001000 (1)(0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001001 (1)(0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001010 (1)(0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001011 (1)(0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001100 (1)(0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001101 (1)(0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001110 (1)(0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001111 (1)(0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010000 (1)(0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010001 (1)(0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010010 (1)(0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010011 (1)(0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010100 (1)(0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010101 (1)(0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010110 (1)(0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010111 (1)(0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011000 (1)(0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011001 (1)(0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011010 (1)(0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011011 (1)(0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011100 (1)(0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011101 (1)(0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011110 (1)(0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011111 (1)(0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100000 (1)(1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100001 (1)(1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100010 (1)(1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100011 (1)(1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100100 (1)(1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100101 (1)(1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100110 (1)(1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100111 (1)(1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101000 (1)(1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101001 (1)(1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101010 (1)(1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101011 (1)(1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101100 (1)(1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101101 (1)(1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101110 (1)(1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101111 (1)(1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110000 (1)(1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110001 (1)(1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110010 (1)(1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110011 (1)(1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110100 (1)(1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110101 (1)(1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110110 (1)(1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110111 (1)(1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111000 (1)(1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111001 (1)(1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111010 (1)(1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111011 (1)(1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111100 (1)(1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111101 (1)(1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111110 (1)(1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111111 (1)(1)(1)(1)(1)(1)(1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000000 (0)(0)(0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000001 (0)(0)(0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000010 (0)(0)(0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000011 (0)(0)(0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000100 (0)(0)(0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000101 (0)(0)(0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000110 (0)(0)(0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000111 (0)(0)(0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001000 (0)(0)(0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001001 (0)(0)(0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001010 (0)(0)(0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001011 (0)(0)(0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001100 (0)(0)(0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001101 (0)(0)(0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001110 (0)(0)(0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001111 (0)(0)(0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010000 (0)(0)(0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010001 (0)(0)(0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010010 (0)(0)(0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010011 (0)(0)(0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010100 (0)(0)(0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010101 (0)(0)(0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010110 (0)(0)(0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010111 (0)(0)(0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011000 (0)(0)(0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011001 (0)(0)(0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011010 (0)(0)(0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011011 (0)(0)(0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011100 (0)(0)(0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011101 (0)(0)(0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011110 (0)(0)(0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011111 (0)(0)(0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100000 (0)(0)(1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100001 (0)(0)(1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100010 (0)(0)(1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100011 (0)(0)(1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100100 (0)(0)(1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100101 (0)(0)(1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100110 (0)(0)(1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100111 (0)(0)(1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101000 (0)(0)(1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101001 (0)(0)(1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101010 (0)(0)(1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101011 (0)(0)(1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101100 (0)(0)(1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101101 (0)(0)(1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101110 (0)(0)(1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101111 (0)(0)(1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110000 (0)(0)(1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110001 (0)(0)(1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110010 (0)(0)(1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110011 (0)(0)(1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110100 (0)(0)(1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110101 (0)(0)(1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110110 (0)(0)(1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110111 (0)(0)(1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111000 (0)(0)(1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111001 (0)(0)(1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111010 (0)(0)(1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111011 (0)(0)(1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111100 (0)(0)(1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111101 (0)(0)(1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111110 (0)(0)(1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111111 (0)(0)(1)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000000 (0)(1)(0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000001 (0)(1)(0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000010 (0)(1)(0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000011 (0)(1)(0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000100 (0)(1)(0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000101 (0)(1)(0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000110 (0)(1)(0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000111 (0)(1)(0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001000 (0)(1)(0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001001 (0)(1)(0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001010 (0)(1)(0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001011 (0)(1)(0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001100 (0)(1)(0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001101 (0)(1)(0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001110 (0)(1)(0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001111 (0)(1)(0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010000 (0)(1)(0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010001 (0)(1)(0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010010 (0)(1)(0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010011 (0)(1)(0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010100 (0)(1)(0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010101 (0)(1)(0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010110 (0)(1)(0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010111 (0)(1)(0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011000 (0)(1)(0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011001 (0)(1)(0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011010 (0)(1)(0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011011 (0)(1)(0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011100 (0)(1)(0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011101 (0)(1)(0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011110 (0)(1)(0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011111 (0)(1)(0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100000 (0)(1)(1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100001 (0)(1)(1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100010 (0)(1)(1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100011 (0)(1)(1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100100 (0)(1)(1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100101 (0)(1)(1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100110 (0)(1)(1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100111 (0)(1)(1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101000 (0)(1)(1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101001 (0)(1)(1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101010 (0)(1)(1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101011 (0)(1)(1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101100 (0)(1)(1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101101 (0)(1)(1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101110 (0)(1)(1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101111 (0)(1)(1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110000 (0)(1)(1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110001 (0)(1)(1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110010 (0)(1)(1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110011 (0)(1)(1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110100 (0)(1)(1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110101 (0)(1)(1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110110 (0)(1)(1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110111 (0)(1)(1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111000 (0)(1)(1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111001 (0)(1)(1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111010 (0)(1)(1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111011 (0)(1)(1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111100 (0)(1)(1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111101 (0)(1)(1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111110 (0)(1)(1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111111 (0)(1)(1)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000000 (1)(0)(0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000001 (1)(0)(0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000010 (1)(0)(0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000011 (1)(0)(0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000100 (1)(0)(0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000101 (1)(0)(0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000110 (1)(0)(0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000111 (1)(0)(0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001000 (1)(0)(0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001001 (1)(0)(0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001010 (1)(0)(0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001011 (1)(0)(0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001100 (1)(0)(0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001101 (1)(0)(0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001110 (1)(0)(0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001111 (1)(0)(0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010000 (1)(0)(0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010001 (1)(0)(0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010010 (1)(0)(0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010011 (1)(0)(0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010100 (1)(0)(0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010101 (1)(0)(0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010110 (1)(0)(0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010111 (1)(0)(0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011000 (1)(0)(0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011001 (1)(0)(0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011010 (1)(0)(0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011011 (1)(0)(0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011100 (1)(0)(0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011101 (1)(0)(0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011110 (1)(0)(0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011111 (1)(0)(0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100000 (1)(0)(1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100001 (1)(0)(1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100010 (1)(0)(1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100011 (1)(0)(1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100100 (1)(0)(1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100101 (1)(0)(1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100110 (1)(0)(1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100111 (1)(0)(1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101000 (1)(0)(1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101001 (1)(0)(1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101010 (1)(0)(1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101011 (1)(0)(1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101100 (1)(0)(1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101101 (1)(0)(1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101110 (1)(0)(1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101111 (1)(0)(1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110000 (1)(0)(1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110001 (1)(0)(1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110010 (1)(0)(1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110011 (1)(0)(1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110100 (1)(0)(1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110101 (1)(0)(1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110110 (1)(0)(1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110111 (1)(0)(1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111000 (1)(0)(1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111001 (1)(0)(1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111010 (1)(0)(1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111011 (1)(0)(1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111100 (1)(0)(1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111101 (1)(0)(1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111110 (1)(0)(1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111111 (1)(0)(1)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000000 (1)(1)(0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000001 (1)(1)(0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000010 (1)(1)(0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000011 (1)(1)(0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000100 (1)(1)(0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000101 (1)(1)(0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000110 (1)(1)(0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000111 (1)(1)(0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001000 (1)(1)(0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001001 (1)(1)(0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001010 (1)(1)(0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001011 (1)(1)(0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001100 (1)(1)(0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001101 (1)(1)(0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001110 (1)(1)(0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001111 (1)(1)(0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010000 (1)(1)(0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010001 (1)(1)(0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010010 (1)(1)(0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010011 (1)(1)(0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010100 (1)(1)(0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010101 (1)(1)(0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010110 (1)(1)(0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010111 (1)(1)(0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011000 (1)(1)(0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011001 (1)(1)(0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011010 (1)(1)(0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011011 (1)(1)(0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011100 (1)(1)(0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011101 (1)(1)(0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011110 (1)(1)(0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011111 (1)(1)(0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100000 (1)(1)(1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100001 (1)(1)(1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100010 (1)(1)(1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100011 (1)(1)(1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100100 (1)(1)(1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100101 (1)(1)(1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100110 (1)(1)(1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100111 (1)(1)(1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101000 (1)(1)(1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101001 (1)(1)(1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101010 (1)(1)(1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101011 (1)(1)(1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101100 (1)(1)(1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101101 (1)(1)(1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101110 (1)(1)(1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101111 (1)(1)(1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110000 (1)(1)(1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110001 (1)(1)(1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110010 (1)(1)(1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110011 (1)(1)(1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110100 (1)(1)(1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110101 (1)(1)(1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110110 (1)(1)(1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110111 (1)(1)(1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111000 (1)(1)(1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111001 (1)(1)(1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111010 (1)(1)(1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111011 (1)(1)(1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111100 (1)(1)(1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111101 (1)(1)(1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111110 (1)(1)(1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111111 (1)(1)(1)(1)(1)(1)(1)(1), + +#endif diff --git a/contrib/src/boost/utility/declval.hpp b/contrib/src/boost/utility/declval.hpp new file mode 100644 index 0000000..229e9a3 --- /dev/null +++ b/contrib/src/boost/utility/declval.hpp @@ -0,0 +1,13 @@ +// declval.hpp -------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_UTILITY_DECLVAL_HPP +#define BOOST_UTILITY_DECLVAL_HPP + +#include + +#endif // BOOST_UTILITY_DECLVAL_HPP diff --git a/contrib/src/boost/utility/detail/result_of_iterate.hpp b/contrib/src/boost/utility/detail/result_of_iterate.hpp new file mode 100644 index 0000000..5192172 --- /dev/null +++ b/contrib/src/boost/utility/detail/result_of_iterate.hpp @@ -0,0 +1,221 @@ +// Boost result_of library + +// Copyright Douglas Gregor 2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Copyright Daniel Walker, Eric Niebler, Michel Morin 2008-2012. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or +// copy at http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org/libs/utility +#if !defined(BOOST_PP_IS_ITERATING) +# error Boost result_of - do not include this file! +#endif + +// CWPro8 requires an argument in a function type specialization +#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3002)) && BOOST_PP_ITERATION() == 0 +# define BOOST_RESULT_OF_ARGS void +#else +# define BOOST_RESULT_OF_ARGS BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T) +#endif + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) +template +struct tr1_result_of + : mpl::if_< + mpl::or_< is_pointer, is_member_function_pointer > + , boost::detail::tr1_result_of_impl< + typename remove_cv::type, + typename remove_cv::type(BOOST_RESULT_OF_ARGS), + (boost::detail::has_result_type::value)> + , boost::detail::tr1_result_of_impl< + F, + F(BOOST_RESULT_OF_ARGS), + (boost::detail::has_result_type::value)> >::type { }; +#endif + +#ifdef BOOST_RESULT_OF_USE_DECLTYPE +template +struct result_of + : detail::cpp0x_result_of { }; +#endif // BOOST_RESULT_OF_USE_DECLTYPE + +#ifdef BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK +template +struct result_of + : mpl::if_, detail::has_result >, + tr1_result_of, + detail::cpp0x_result_of >::type { }; +#endif // BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK + +#if defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK) + +namespace detail { + +template +struct cpp0x_result_of + : mpl::if_< + is_member_function_pointer + , detail::tr1_result_of_impl< + typename remove_cv::type, + typename remove_cv::type(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), false + > + , detail::cpp0x_result_of_impl< + F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)) + > + >::type +{}; + +#ifdef BOOST_NO_SFINAE_EXPR + +template +struct BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()); + +template +struct BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()) { + R operator()(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), T)) const; + typedef result_of_private_type const &(*pfn_t)(...); + operator pfn_t() const volatile; +}; + +template +struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION()); + +template +struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION()) + : BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()) +{}; + +template +struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION()) + : BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()) +{}; + +template +struct BOOST_PP_CAT(result_of_select_call_wrapper_type_, BOOST_PP_ITERATION()) + : mpl::eval_if< + is_class::type>, + result_of_wrap_callable_class, + mpl::identity::type> > + > +{}; + +template +struct BOOST_PP_CAT(result_of_is_callable_, BOOST_PP_ITERATION()) { + typedef typename BOOST_PP_CAT(result_of_select_call_wrapper_type_, BOOST_PP_ITERATION())::type wrapper_t; + static const bool value = ( + sizeof(result_of_no_type) == sizeof(detail::result_of_is_private_type( + (boost::declval()(BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval() BOOST_PP_INTERCEPT)), result_of_weird_type()) + )) + ); + typedef mpl::bool_ type; +}; + +template +struct cpp0x_result_of_impl + : lazy_enable_if< + BOOST_PP_CAT(result_of_is_callable_, BOOST_PP_ITERATION()) + , cpp0x_result_of_impl + > +{}; + +template +struct cpp0x_result_of_impl +{ + typedef decltype( + boost::declval()( + BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval() BOOST_PP_INTERCEPT) + ) + ) type; +}; + +#else // BOOST_NO_SFINAE_EXPR + +template +struct cpp0x_result_of_impl()( + BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval() BOOST_PP_INTERCEPT) + ) + )>::type> { + typedef decltype( + boost::declval()( + BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval() BOOST_PP_INTERCEPT) + ) + ) type; +}; + +#endif // BOOST_NO_SFINAE_EXPR + +} // namespace detail + +#else // defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK) + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) +template +struct result_of + : tr1_result_of { }; +#endif + +#endif // defined(BOOST_RESULT_OF_USE_DECLTYPE) + +#undef BOOST_RESULT_OF_ARGS + +#if BOOST_PP_ITERATION() >= 1 + +namespace detail { + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; +#endif + +} +#endif diff --git a/contrib/src/boost/utility/enable_if.hpp b/contrib/src/boost/utility/enable_if.hpp new file mode 100644 index 0000000..803bfca --- /dev/null +++ b/contrib/src/boost/utility/enable_if.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_UTILITY_ENABLE_IF_HPP +#define BOOST_UTILITY_ENABLE_IF_HPP + +// The header file at this path is deprecated; +// use boost/core/enable_if.hpp instead. + +#include + +#endif diff --git a/contrib/src/boost/utility/identity_type.hpp b/contrib/src/boost/utility/identity_type.hpp new file mode 100644 index 0000000..4a1f6c4 --- /dev/null +++ b/contrib/src/boost/utility/identity_type.hpp @@ -0,0 +1,46 @@ + +// Copyright (C) 2009-2012 Lorenzo Caminiti +// Distributed under the Boost Software License, Version 1.0 +// (see accompanying file LICENSE_1_0.txt or a copy at +// http://www.boost.org/LICENSE_1_0.txt) +// Home at http://www.boost.org/libs/utility/identity_type + +/** @file +Wrap type expressions with round parenthesis so they can be passed to macros +even if they contain commas. +*/ + +#ifndef BOOST_IDENTITY_TYPE_HPP_ +#define BOOST_IDENTITY_TYPE_HPP_ + +#include + +/** +@brief This macro allows to wrap the specified type expression within extra +round parenthesis so the type can be passed as a single macro parameter even if +it contains commas (not already wrapped within round parenthesis). + +@Params +@Param{parenthesized_type, +The type expression to be passed as macro parameter wrapped by a single set +of round parenthesis (...). +This type expression can contain an arbitrary number of commas. +} +@EndParams + +This macro works on any C++03 compiler (it does not use variadic macros). + +This macro must be prefixed by typename when used within templates. +Note that the compiler will not be able to automatically determine function +template parameters when they are wrapped with this macro (these parameters +need to be explicitly specified when calling the function template). + +On some compilers (like GCC), using this macro on abstract types requires to +add and remove a reference to the specified type. +*/ +#define BOOST_IDENTITY_TYPE(parenthesized_type) \ + /* must NOT prefix this with `::` to work with parenthesized syntax */ \ + boost::function_traits< void parenthesized_type >::arg1_type + +#endif // #include guard + diff --git a/contrib/src/boost/utility/result_of.hpp b/contrib/src/boost/utility/result_of.hpp new file mode 100644 index 0000000..206ae30 --- /dev/null +++ b/contrib/src/boost/utility/result_of.hpp @@ -0,0 +1,210 @@ +// Boost result_of library + +// Copyright Douglas Gregor 2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org/libs/utility +#ifndef BOOST_RESULT_OF_HPP +#define BOOST_RESULT_OF_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef BOOST_RESULT_OF_NUM_ARGS +# define BOOST_RESULT_OF_NUM_ARGS 16 +#endif + +// Use the decltype-based version of result_of by default if the compiler +// supports N3276 . +// The user can force the choice by defining BOOST_RESULT_OF_USE_DECLTYPE, +// BOOST_RESULT_OF_USE_TR1, or BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK but not more than one! +#if (defined(BOOST_RESULT_OF_USE_DECLTYPE) && defined(BOOST_RESULT_OF_USE_TR1)) || \ + (defined(BOOST_RESULT_OF_USE_DECLTYPE) && defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK)) || \ + (defined(BOOST_RESULT_OF_USE_TR1) && defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK)) +# error More than one of BOOST_RESULT_OF_USE_DECLTYPE, BOOST_RESULT_OF_USE_TR1 and \ + BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK cannot be defined at the same time. +#endif + +#if defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK) && defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE) +# error Cannot fallback to decltype if BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE is not defined. +#endif + +#ifndef BOOST_RESULT_OF_USE_TR1 +# ifndef BOOST_RESULT_OF_USE_DECLTYPE +# ifndef BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK +# ifndef BOOST_NO_CXX11_DECLTYPE_N3276 // this implies !defined(BOOST_NO_CXX11_DECLTYPE) +# define BOOST_RESULT_OF_USE_DECLTYPE +# else +# define BOOST_RESULT_OF_USE_TR1 +# endif +# endif +# endif +#endif + +namespace boost { + +template struct result_of; +template struct tr1_result_of; // a TR1-style implementation of result_of + +#if !defined(BOOST_NO_SFINAE) +namespace detail { + +BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type) + +// Work around a nvcc bug by only defining has_result when it's needed. +#ifdef BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK +BOOST_MPL_HAS_XXX_TEMPLATE_DEF(result) +#endif + +template struct tr1_result_of_impl; + +template struct cpp0x_result_of; + +#ifdef BOOST_NO_SFINAE_EXPR + +// There doesn't seem to be any other way to turn this off such that the presence of +// the user-defined operator,() below doesn't cause spurious warning all over the place, +// so unconditionally turn it off. +#if BOOST_MSVC +# pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used +#endif + +struct result_of_private_type {}; + +struct result_of_weird_type { + friend result_of_private_type operator,(result_of_private_type, result_of_weird_type); +}; + +typedef char result_of_yes_type; // sizeof(result_of_yes_type) == 1 +typedef char (&result_of_no_type)[2]; // sizeof(result_of_no_type) == 2 + +template +result_of_no_type result_of_is_private_type(T const &); +result_of_yes_type result_of_is_private_type(result_of_private_type); + +template +struct result_of_callable_class : C { + result_of_callable_class(); + typedef result_of_private_type const &(*pfn_t)(...); + operator pfn_t() const volatile; +}; + +template +struct result_of_wrap_callable_class { + typedef result_of_callable_class type; +}; + +template +struct result_of_wrap_callable_class { + typedef result_of_callable_class const type; +}; + +template +struct result_of_wrap_callable_class { + typedef result_of_callable_class volatile type; +}; + +template +struct result_of_wrap_callable_class { + typedef result_of_callable_class const volatile type; +}; + +template +struct result_of_wrap_callable_class { + typedef typename result_of_wrap_callable_class::type &type; +}; + +template struct cpp0x_result_of_impl; + +#else // BOOST_NO_SFINAE_EXPR + +template +struct result_of_always_void +{ + typedef void type; +}; + +template struct cpp0x_result_of_impl {}; + +#endif // BOOST_NO_SFINAE_EXPR + +template +struct result_of_void_impl +{ + typedef void type; +}; + +template +struct result_of_void_impl +{ + typedef R type; +}; + +template +struct result_of_void_impl +{ + typedef R type; +}; + +// Determine the return type of a function pointer or pointer to member. +template +struct result_of_pointer + : tr1_result_of_impl::type, FArgs, false> { }; + +template +struct tr1_result_of_impl +{ + typedef typename F::result_type type; +}; + +template +struct is_function_with_no_args : mpl::false_ {}; + +template +struct is_function_with_no_args : mpl::true_ {}; + +template +struct result_of_nested_result : F::template result +{}; + +template +struct tr1_result_of_impl + : mpl::if_, + result_of_void_impl, + result_of_nested_result >::type +{}; + +} // end namespace detail + +#define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_RESULT_OF_NUM_ARGS,)) +#include BOOST_PP_ITERATE() + +#else +# define BOOST_NO_RESULT_OF 1 +#endif + +} + +#endif // BOOST_RESULT_OF_HPP diff --git a/contrib/src/boost/uuid/detail/config.hpp b/contrib/src/boost/uuid/detail/config.hpp new file mode 100644 index 0000000..602d4ab --- /dev/null +++ b/contrib/src/boost/uuid/detail/config.hpp @@ -0,0 +1,74 @@ +/* + * Copyright Andrey Semashev 2013. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ +/*! + * \file uuid/detail/config.hpp + * + * \brief This header defines configuration macros for Boost.UUID. + */ + +#ifndef BOOST_UUID_DETAIL_CONFIG_HPP_INCLUDED_ +#define BOOST_UUID_DETAIL_CONFIG_HPP_INCLUDED_ + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if !defined(BOOST_UUID_NO_SIMD) + +#if defined(__GNUC__) && defined(__SSE2__) + +// GCC and its pretenders go here +#ifndef BOOST_UUID_USE_SSE2 +#define BOOST_UUID_USE_SSE2 +#endif + +#if defined(__SSE3__) && !defined(BOOST_UUID_USE_SSE3) +#define BOOST_UUID_USE_SSE3 +#endif + +#if defined(__SSE4_1__) && !defined(BOOST_UUID_USE_SSE41) +#define BOOST_UUID_USE_SSE41 +#endif + +#elif defined(_MSC_VER) + +#if (defined(_M_X64) || (defined(_M_IX86) && defined(_M_IX86_FP) && _M_IX86_FP >= 2)) && !defined(BOOST_UUID_USE_SSE2) +#define BOOST_UUID_USE_SSE2 +#endif + +#if defined(__AVX__) +#if !defined(BOOST_UUID_USE_SSE41) +#define BOOST_UUID_USE_SSE41 +#endif +#if !defined(BOOST_UUID_USE_SSE3) +#define BOOST_UUID_USE_SSE3 +#endif +#if !defined(BOOST_UUID_USE_SSE2) +#define BOOST_UUID_USE_SSE2 +#endif +#endif + +#endif + +// More advanced ISA extensions imply less advanced are also available +#if !defined(BOOST_UUID_USE_SSE3) && defined(BOOST_UUID_USE_SSE41) +#define BOOST_UUID_USE_SSE3 +#endif + +#if !defined(BOOST_UUID_USE_SSE2) && defined(BOOST_UUID_USE_SSE3) +#define BOOST_UUID_USE_SSE2 +#endif + +#if !defined(BOOST_UUID_NO_SIMD) && !defined(BOOST_UUID_USE_SSE41) && !defined(BOOST_UUID_USE_SSE3) && !defined(BOOST_UUID_USE_SSE2) +#define BOOST_UUID_NO_SIMD +#endif + +#endif // !defined(BOOST_UUID_NO_SIMD) + +#endif // BOOST_UUID_DETAIL_CONFIG_HPP_INCLUDED_ diff --git a/contrib/src/boost/uuid/detail/uuid_generic.hpp b/contrib/src/boost/uuid/detail/uuid_generic.hpp new file mode 100644 index 0000000..1c4d775 --- /dev/null +++ b/contrib/src/boost/uuid/detail/uuid_generic.hpp @@ -0,0 +1,51 @@ +/* + * Copyright Andy Tompkins 2006. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ +/*! + * \file uuid/detail/uuid_generic.hpp + * + * \brief This header contains generic implementation of \c boost::uuid operations. + */ + +#ifndef BOOST_UUID_DETAIL_UUID_GENERIC_HPP_INCLUDED_ +#define BOOST_UUID_DETAIL_UUID_GENERIC_HPP_INCLUDED_ + +#include + +namespace boost { +namespace uuids { + +inline bool uuid::is_nil() const BOOST_NOEXCEPT +{ + for (std::size_t i = 0; i < sizeof(data); ++i) + { + if (data[i] != 0U) + return false; + } + return true; +} + +inline void uuid::swap(uuid& rhs) BOOST_NOEXCEPT +{ + uuid tmp = *this; + *this = rhs; + rhs = tmp; +} + +inline bool operator== (uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT +{ + return memcmp(lhs.data, rhs.data, sizeof(lhs.data)) == 0; +} + +inline bool operator< (uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT +{ + return memcmp(lhs.data, rhs.data, sizeof(lhs.data)) < 0; +} + +} // namespace uuids +} // namespace boost + +#endif // BOOST_UUID_DETAIL_UUID_GENERIC_HPP_INCLUDED_ diff --git a/contrib/src/boost/uuid/detail/uuid_x86.hpp b/contrib/src/boost/uuid/detail/uuid_x86.hpp new file mode 100644 index 0000000..5c73670 --- /dev/null +++ b/contrib/src/boost/uuid/detail/uuid_x86.hpp @@ -0,0 +1,135 @@ +/* + * Copyright Andrey Semashev 2013. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ +/*! + * \file uuid/detail/uuid_x86.hpp + * + * \brief This header contains optimized SSE implementation of \c boost::uuid operations. + */ + +#ifndef BOOST_UUID_DETAIL_UUID_X86_HPP_INCLUDED_ +#define BOOST_UUID_DETAIL_UUID_X86_HPP_INCLUDED_ + +// MSVC does not always have immintrin.h (at least, not up to MSVC 10), so include the appropriate header for each instruction set +#if defined(BOOST_UUID_USE_SSE41) +#include +#elif defined(BOOST_UUID_USE_SSE3) +#include +#else +#include +#endif + +#if defined(BOOST_MSVC) && defined(_M_X64) && !defined(BOOST_UUID_USE_SSE3) && (BOOST_MSVC < 1900 /* Fixed in Visual Studio 2015 */ ) +// At least MSVC 9 (VS2008) and 12 (VS2013) have an optimizer bug that sometimes results in incorrect SIMD code +// generated in Release x64 mode. In particular, it affects operator==, where the compiler sometimes generates +// pcmpeqd with a memory opereand instead of movdqu followed by pcmpeqd. The problem is that uuid can be +// not aligned to 16 bytes and pcmpeqd causes alignment violation in this case. We cannot be sure that other +// MSVC versions are not affected so we apply the workaround for all versions, except VS2015 on up where +// the bug has been fixed. +// +// https://svn.boost.org/trac/boost/ticket/8509#comment:3 +// https://connect.microsoft.com/VisualStudio/feedbackdetail/view/981648#tabs +#define BOOST_UUID_DETAIL_MSVC_BUG981648 +#if BOOST_MSVC >= 1600 +extern "C" void _ReadWriteBarrier(void); +#pragma intrinsic(_ReadWriteBarrier) +#endif +#endif + +namespace boost { +namespace uuids { +namespace detail { + +BOOST_FORCEINLINE __m128i load_unaligned_si128(const uint8_t* p) BOOST_NOEXCEPT +{ +#if defined(BOOST_UUID_USE_SSE3) + return _mm_lddqu_si128(reinterpret_cast< const __m128i* >(p)); +#elif !defined(BOOST_UUID_DETAIL_MSVC_BUG981648) + return _mm_loadu_si128(reinterpret_cast< const __m128i* >(p)); +#elif BOOST_MSVC >= 1600 + __m128i mm = _mm_loadu_si128(reinterpret_cast< const __m128i* >(p)); + // Make sure this load doesn't get merged with the subsequent instructions + _ReadWriteBarrier(); + return mm; +#else + // VS2008 x64 doesn't respect _ReadWriteBarrier above, so we have to generate this crippled code to load unaligned data + return _mm_unpacklo_epi64(_mm_loadl_epi64(reinterpret_cast< const __m128i* >(p)), _mm_loadl_epi64(reinterpret_cast< const __m128i* >(p + 8))); +#endif +} + +} // namespace detail + +inline bool uuid::is_nil() const BOOST_NOEXCEPT +{ + __m128i mm = uuids::detail::load_unaligned_si128(data); +#if defined(BOOST_UUID_USE_SSE41) + return _mm_test_all_zeros(mm, mm) != 0; +#else + mm = _mm_cmpeq_epi8(mm, _mm_setzero_si128()); + return _mm_movemask_epi8(mm) == 0xFFFF; +#endif +} + +inline void uuid::swap(uuid& rhs) BOOST_NOEXCEPT +{ + __m128i mm_this = uuids::detail::load_unaligned_si128(data); + __m128i mm_rhs = uuids::detail::load_unaligned_si128(rhs.data); + _mm_storeu_si128(reinterpret_cast< __m128i* >(rhs.data), mm_this); + _mm_storeu_si128(reinterpret_cast< __m128i* >(data), mm_rhs); +} + +inline bool operator== (uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT +{ + __m128i mm_left = uuids::detail::load_unaligned_si128(lhs.data); + __m128i mm_right = uuids::detail::load_unaligned_si128(rhs.data); + + __m128i mm_cmp = _mm_cmpeq_epi32(mm_left, mm_right); + +#if defined(BOOST_UUID_USE_SSE41) + return _mm_test_all_ones(mm_cmp) != 0; +#else + return _mm_movemask_epi8(mm_cmp) == 0xFFFF; +#endif +} + +inline bool operator< (uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT +{ + __m128i mm_left = uuids::detail::load_unaligned_si128(lhs.data); + __m128i mm_right = uuids::detail::load_unaligned_si128(rhs.data); + + // To emulate lexicographical_compare behavior we have to perform two comparisons - the forward and reverse one. + // Then we know which bytes are equivalent and which ones are different, and for those different the comparison results + // will be opposite. Then we'll be able to find the first differing comparison result (for both forward and reverse ways), + // and depending on which way it is for, this will be the result of the operation. There are a few notes to consider: + // + // 1. Due to little endian byte order the first bytes go into the lower part of the xmm registers, + // so the comparison results in the least significant bits will actually be the most signigicant for the final operation result. + // This means we have to determine which of the comparison results have the least significant bit on, and this is achieved with + // the "(x - 1) ^ x" trick. + // 2. Because there is only signed comparison in SSE/AVX, we have to invert byte comparison results whenever signs of the corresponding + // bytes are different. I.e. in signed comparison it's -1 < 1, but in unsigned it is the opposite (255 > 1). To do that we XOR left and right, + // making the most significant bit of each byte 1 if the signs are different, and later apply this mask with another XOR to the comparison results. + // 3. pcmpgtw compares for "greater" relation, so we swap the arguments to get what we need. + + const __m128i mm_signs_mask = _mm_xor_si128(mm_left, mm_right); + + __m128i mm_cmp = _mm_cmpgt_epi8(mm_right, mm_left), mm_rcmp = _mm_cmpgt_epi8(mm_left, mm_right); + + mm_cmp = _mm_xor_si128(mm_signs_mask, mm_cmp); + mm_rcmp = _mm_xor_si128(mm_signs_mask, mm_rcmp); + + uint32_t cmp = static_cast< uint32_t >(_mm_movemask_epi8(mm_cmp)), rcmp = static_cast< uint32_t >(_mm_movemask_epi8(mm_rcmp)); + + cmp = (cmp - 1u) ^ cmp; + rcmp = (rcmp - 1u) ^ rcmp; + + return cmp < rcmp; +} + +} // namespace uuids +} // namespace boost + +#endif // BOOST_UUID_DETAIL_UUID_X86_HPP_INCLUDED_ diff --git a/contrib/src/boost/uuid/name_generator.hpp b/contrib/src/boost/uuid/name_generator.hpp new file mode 100644 index 0000000..2e5d8c1 --- /dev/null +++ b/contrib/src/boost/uuid/name_generator.hpp @@ -0,0 +1,125 @@ +// Boost name_generator.hpp header file ----------------------------------------------// + +// Copyright 2010 Andy Tompkins. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UUID_NAME_GENERATOR_HPP +#define BOOST_UUID_NAME_GENERATOR_HPP + +#include +#include +#include +#include +#include // for strlen, wcslen + +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std { + using ::strlen; + using ::wcslen; +} //namespace std +#endif //BOOST_NO_STDC_NAMESPACE + +namespace boost { +namespace uuids { + +// generate a name-based uuid +// TODO: add in common namesspace uuids +class name_generator { +public: + typedef uuid result_type; + + explicit name_generator(uuid const& namespace_uuid_) + : namespace_uuid(namespace_uuid_) + {} + + uuid operator()(const char* name) { + reset(); + process_characters(name, std::strlen(name)); + return sha_to_uuid(); + } + + uuid operator()(const wchar_t* name) { + reset(); + process_characters(name, std::wcslen(name)); + return sha_to_uuid(); + } + + template + uuid operator()(std::basic_string const& name) { + reset(); + process_characters(name.c_str(), name.length()); + return sha_to_uuid(); + } + + uuid operator()(void const* buffer, std::size_t byte_count) { + reset(); + sha.process_bytes(buffer, byte_count); + return sha_to_uuid(); + }; + +private: + // we convert all characters to uint32_t so that each + // character is 4 bytes reguardless of sizeof(char) or + // sizeof(wchar_t). We want the name string on any + // platform / compiler to generate the same uuid + // except for char + template + void process_characters(char_type const*const characters, size_t count) { + BOOST_ASSERT(sizeof(uint32_t) >= sizeof(char_type)); + + for (size_t i=0; i((c >> 0) & 0xFF)); + sha.process_byte(static_cast((c >> 8) & 0xFF)); + sha.process_byte(static_cast((c >> 16) & 0xFF)); + sha.process_byte(static_cast((c >> 24) & 0xFF)); + } + } + + void process_characters(char const*const characters, size_t count) { + sha.process_bytes(characters, count); + } + + void reset() + { + sha.reset(); + sha.process_bytes(namespace_uuid.begin(), namespace_uuid.size()); + } + + uuid sha_to_uuid() + { + unsigned int digest[5]; + + sha.get_digest(digest); + + uuid u; + for (int i=0; i<4; ++i) { + *(u.begin() + i*4+0) = static_cast((digest[i] >> 24) & 0xFF); + *(u.begin() + i*4+1) = static_cast((digest[i] >> 16) & 0xFF); + *(u.begin() + i*4+2) = static_cast((digest[i] >> 8) & 0xFF); + *(u.begin() + i*4+3) = static_cast((digest[i] >> 0) & 0xFF); + } + + // set variant + // must be 0b10xxxxxx + *(u.begin()+8) &= 0xBF; + *(u.begin()+8) |= 0x80; + + // set version + // must be 0b0101xxxx + *(u.begin()+6) &= 0x5F; //0b01011111 + *(u.begin()+6) |= 0x50; //0b01010000 + + return u; + } + +private: + uuid namespace_uuid; + detail::sha1 sha; +}; + +}} // namespace boost::uuids + +#endif // BOOST_UUID_NAME_GENERATOR_HPP diff --git a/contrib/src/boost/uuid/nil_generator.hpp b/contrib/src/boost/uuid/nil_generator.hpp new file mode 100644 index 0000000..c3c5818 --- /dev/null +++ b/contrib/src/boost/uuid/nil_generator.hpp @@ -0,0 +1,34 @@ +// Boost nil_generator.hpp header file ----------------------------------------------// + +// Copyright 2010 Andy Tompkins. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UUID_NIL_GENERATOR_HPP +#define BOOST_UUID_NIL_GENERATOR_HPP + +#include + +namespace boost { +namespace uuids { + +// generate a nil uuid +struct nil_generator { + typedef uuid result_type; + + uuid operator()() const { + // initialize to all zeros + uuid u = {{0}}; + return u; + } +}; + +inline uuid nil_uuid() { + return nil_generator()(); +} + +}} // namespace boost::uuids + +#endif // BOOST_UUID_NIL_GENERATOR_HPP + diff --git a/contrib/src/boost/uuid/random_generator.hpp b/contrib/src/boost/uuid/random_generator.hpp new file mode 100644 index 0000000..0f4a0ab --- /dev/null +++ b/contrib/src/boost/uuid/random_generator.hpp @@ -0,0 +1,119 @@ +// Boost random_generator.hpp header file ----------------------------------------------// + +// Copyright 2010 Andy Tompkins. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UUID_RANDOM_GENERATOR_HPP +#define BOOST_UUID_RANDOM_GENERATOR_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace uuids { + +// generate a random-based uuid +template +class basic_random_generator { +private: + typedef uniform_int distribution_type; + typedef variate_generator generator_type; + + struct null_deleter + { + void operator()(void const *) const {} + }; + +public: + typedef uuid result_type; + + // default constructor creates the random number generator + basic_random_generator() + : pURNG(new UniformRandomNumberGenerator) + , generator + ( pURNG.get() + , distribution_type + ( (std::numeric_limits::min)() + , (std::numeric_limits::max)() + ) + ) + { + // seed the random number generator + detail::seed(*pURNG); + } + + // keep a reference to a random number generator + // don't seed a given random number generator + explicit basic_random_generator(UniformRandomNumberGenerator& gen) + : pURNG(&gen, null_deleter()) + , generator + ( pURNG.get() + , distribution_type + ( (std::numeric_limits::min)() + , (std::numeric_limits::max)() + ) + ) + {} + + // keep a pointer to a random number generator + // don't seed a given random number generator + explicit basic_random_generator(UniformRandomNumberGenerator* pGen) + : pURNG(pGen, null_deleter()) + , generator + ( pURNG.get() + , distribution_type + ( (std::numeric_limits::min)() + , (std::numeric_limits::max)() + ) + ) + { + BOOST_ASSERT(pURNG); + } + + uuid operator()() + { + uuid u; + + int i=0; + unsigned long random_value = generator(); + for (uuid::iterator it=u.begin(); it!=u.end(); ++it, ++i) { + if (i==sizeof(unsigned long)) { + random_value = generator(); + i = 0; + } + + // static_cast gets rid of warnings of converting unsigned long to boost::uint8_t + *it = static_cast((random_value >> (i*8)) & 0xFF); + } + + // set variant + // must be 0b10xxxxxx + *(u.begin()+8) &= 0xBF; + *(u.begin()+8) |= 0x80; + + // set version + // must be 0b0100xxxx + *(u.begin()+6) &= 0x4F; //0b01001111 + *(u.begin()+6) |= 0x40; //0b01000000 + + return u; + } + +private: + shared_ptr pURNG; + generator_type generator; +}; + +typedef basic_random_generator random_generator; + +}} // namespace boost::uuids + +#endif //BOOST_UUID_RANDOM_GENERATOR_HPP diff --git a/contrib/src/boost/uuid/seed_rng.hpp b/contrib/src/boost/uuid/seed_rng.hpp new file mode 100644 index 0000000..5299b04 --- /dev/null +++ b/contrib/src/boost/uuid/seed_rng.hpp @@ -0,0 +1,317 @@ +// Boost seed_rng.hpp header file ----------------------------------------------// + +// Copyright 2007 Andy Tompkins. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Revision History +// 09 Nov 2007 - Initial Revision +// 25 Feb 2008 - moved to namespace boost::uuids::detail +// 28 Nov 2009 - disabled deprecated warnings for MSVC +// 28 Jul 2014 - fixed valgrind warnings and better entropy sources for MSVC + +// seed_rng models a UniformRandomNumberGenerator (see Boost.Random). +// Random number generators are hard to seed well. This is intended to provide +// good seed values for random number generators. +// It creates random numbers from a sha1 hash of data from a variary of sources, +// all of which are standard function calls. It produces random numbers slowly. +// Peter Dimov provided the details of sha1_random_digest_(). +// see http://archives.free.net.ph/message/20070507.175609.4c4f503a.en.html + +#ifndef BOOST_UUID_SEED_RNG_HPP +#define BOOST_UUID_SEED_RNG_HPP + +#include +#include // for memcpy +#include +#include // for time_t, time, clock_t, clock +#include // for rand +#include // for FILE, fopen, fread, fclose +#include +#include +//#include //forward declare boost::random::random_device + +// can't use boost::generator_iterator since boost::random number seed(Iter&, Iter) +// functions need a last iterator +//#include +# include + +#if defined(_MSC_VER) +# pragma warning(push) // Save warning settings. +# pragma warning(disable : 4996) // Disable deprecated std::fopen +# pragma comment(lib, "advapi32.lib") +#endif + +#if defined(BOOST_WINDOWS) +# include // for CryptAcquireContextA, CryptGenRandom, CryptReleaseContext +# include +# include +# include +#else +# include // for gettimeofday +# include // for pid_t +# include // for getpid() +#endif + +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std { + using ::memcpy; + using ::time_t; + using ::time; + using ::clock_t; + using ::clock; + using ::rand; + using ::FILE; + using ::fopen; + using ::fread; + using ::fclose; +} //namespace std +#endif + +// forward declare random number generators +namespace boost { namespace random { +class random_device; +}} //namespace boost::random + +namespace boost { +namespace uuids { +namespace detail { + +// should this be part of Boost.Random? +class seed_rng: private boost::noncopyable +{ +public: + typedef unsigned int result_type; + BOOST_STATIC_CONSTANT(bool, has_fixed_range = false); + +public: + // note: rd_ intentionally left uninitialized + seed_rng() BOOST_NOEXCEPT + : rd_index_(5) + , random_(NULL) + { +#if defined(BOOST_WINDOWS) + if (!boost::detail::winapi::CryptAcquireContextA( + &random_, + NULL, + NULL, + boost::detail::winapi::PROV_RSA_FULL_, + boost::detail::winapi::CRYPT_VERIFYCONTEXT_ | boost::detail::winapi::CRYPT_SILENT_)) + { + random_ = NULL; + } +#else + random_ = std::fopen( "/dev/urandom", "rb" ); +#endif + + std::memset(rd_, 0, sizeof(rd_)); + } + + ~seed_rng() BOOST_NOEXCEPT + { + if (random_) { +#if defined(BOOST_WINDOWS) + boost::detail::winapi::CryptReleaseContext(random_, 0); +#else + std::fclose(random_); +#endif + } + } + + result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const BOOST_NOEXCEPT + { + return (std::numeric_limits::min)(); + } + result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const BOOST_NOEXCEPT + { + return (std::numeric_limits::max)(); + } + + result_type operator()() + { + if (rd_index_ >= 5) { + //get new digest + sha1_random_digest_(); + + rd_index_ = 0; + } + + return rd_[rd_index_++]; + } + +private: + BOOST_STATIC_CONSTANT(std::size_t, internal_state_size = 5); + inline void ignore_size(size_t) {} + + static unsigned int * sha1_random_digest_state_() + { + static unsigned int state[ internal_state_size ]; + return state; + } + + void sha1_random_digest_() + { + boost::uuids::detail::sha1 sha; + + + if (random_) + { + // intentionally left uninitialized + unsigned char state[ 20 ]; +#if defined(BOOST_WINDOWS) + boost::detail::winapi::CryptGenRandom(random_, sizeof(state), state); +#else + ignore_size(std::fread( state, 1, sizeof(state), random_ )); +#endif + sha.process_bytes( state, sizeof( state ) ); + } + + { + // Getting enropy from some system specific sources +#if defined(BOOST_WINDOWS) + boost::detail::winapi::DWORD_ procid = boost::detail::winapi::GetCurrentProcessId(); + sha.process_bytes( (unsigned char const*)&procid, sizeof( procid ) ); + + boost::detail::winapi::DWORD_ threadid = boost::detail::winapi::GetCurrentThreadId(); + sha.process_bytes( (unsigned char const*)&threadid, sizeof( threadid ) ); + + boost::detail::winapi::LARGE_INTEGER_ ts; + ts.QuadPart = 0; + boost::detail::winapi::QueryPerformanceCounter( &ts ); + sha.process_bytes( (unsigned char const*)&ts, sizeof( ts ) ); + + std::time_t tm = std::time( 0 ); + sha.process_bytes( (unsigned char const*)&tm, sizeof( tm ) ); +#else + pid_t pid = getpid(); + sha.process_bytes( (unsigned char const*)&pid, sizeof( pid ) ); + + timeval ts; + gettimeofday(&ts, NULL); // We do not use `clock_gettime` to avoid linkage with -lrt + sha.process_bytes( (unsigned char const*)&ts, sizeof( ts ) ); +#endif + } + + + unsigned int * ps = sha1_random_digest_state_(); + sha.process_bytes( ps, internal_state_size * sizeof( unsigned int ) ); + sha.process_bytes( (unsigned char const*)&ps, sizeof( ps ) ); + + { + std::clock_t ck = std::clock(); + sha.process_bytes( (unsigned char const*)&ck, sizeof( ck ) ); + } + + { + unsigned int rn[] = + { static_cast(std::rand()) + , static_cast(std::rand()) + , static_cast(std::rand()) + }; + sha.process_bytes( (unsigned char const*)rn, sizeof( rn ) ); + } + + { + unsigned int * p = new unsigned int; + sha.process_bytes( (unsigned char const*)&p, sizeof( p ) ); + delete p; + + const seed_rng* this_ptr = this; + sha.process_bytes( (unsigned char const*)&this_ptr, sizeof( this_ptr ) ); + sha.process_bytes( (unsigned char const*)&std::rand, sizeof( void(*)() ) ); + } + + sha.process_bytes( (unsigned char const*)rd_, sizeof( rd_ ) ); + + unsigned int digest[ 5 ]; + sha.get_digest( digest ); + + for( int i = 0; i < 5; ++i ) + { + // harmless data race + ps[ i ] ^= digest[ i ]; + rd_[ i ] ^= digest[ i ]; + } + } + +private: + unsigned int rd_[5]; + int rd_index_; + +#if defined(BOOST_WINDOWS) + boost::detail::winapi::HCRYPTPROV_ random_; +#else + std::FILE * random_; +#endif +}; + +// almost a copy of boost::generator_iterator +// but default constructor sets m_g to NULL +template +class generator_iterator + : public iterator_facade< + generator_iterator + , typename Generator::result_type + , single_pass_traversal_tag + , typename Generator::result_type const& + > +{ + typedef iterator_facade< + generator_iterator + , typename Generator::result_type + , single_pass_traversal_tag + , typename Generator::result_type const& + > super_t; + + public: + generator_iterator() : m_g(NULL), m_value(0) {} + generator_iterator(Generator* g) : m_g(g), m_value((*m_g)()) {} + + void increment() + { + m_value = (*m_g)(); + } + + const typename Generator::result_type& + dereference() const + { + return m_value; + } + + bool equal(generator_iterator const& y) const + { + return this->m_g == y.m_g && this->m_value == y.m_value; + } + + private: + Generator* m_g; + typename Generator::result_type m_value; +}; + +// seed() seeds a random number generator with good seed values + +template +inline void seed(UniformRandomNumberGenerator& rng) +{ + seed_rng seed_gen; + generator_iterator begin(&seed_gen); + generator_iterator end; + rng.seed(begin, end); +} + +// random_device does not / can not be seeded +template <> +inline void seed(boost::random::random_device&) {} + +// random_device does not / can not be seeded +template <> +inline void seed(seed_rng&) {} + +}}} //namespace boost::uuids::detail + +#if defined(_MSC_VER) +#pragma warning(pop) // Restore warnings to previous state. +#endif + +#endif diff --git a/contrib/src/boost/uuid/sha1.hpp b/contrib/src/boost/uuid/sha1.hpp new file mode 100644 index 0000000..e695e13 --- /dev/null +++ b/contrib/src/boost/uuid/sha1.hpp @@ -0,0 +1,231 @@ +// boost/uuid/sha1.hpp header file ----------------------------------------------// + +// Copyright 2007 Andy Tompkins. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Revision History +// 29 May 2007 - Initial Revision +// 25 Feb 2008 - moved to namespace boost::uuids::detail +// 10 Jan 2012 - can now handle the full size of messages (2^64 - 1 bits) + +// This is a byte oriented implementation + +#ifndef BOOST_UUID_SHA1_H +#define BOOST_UUID_SHA1_H + +#include +#include +#include +#include +#include + +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std { + using ::size_t; +} // namespace std +#endif + +namespace boost { +namespace uuids { +namespace detail { + +BOOST_STATIC_ASSERT(sizeof(unsigned char)*8 == 8); +BOOST_STATIC_ASSERT(sizeof(unsigned int)*8 == 32); + +inline unsigned int left_rotate(unsigned int x, std::size_t n) +{ + return (x<> (32-n)); +} + +class sha1 +{ +public: + typedef unsigned int(&digest_type)[5]; +public: + sha1(); + + void reset(); + + void process_byte(unsigned char byte); + void process_block(void const* bytes_begin, void const* bytes_end); + void process_bytes(void const* buffer, std::size_t byte_count); + + void get_digest(digest_type digest); + +private: + void process_block(); + void process_byte_impl(unsigned char byte); + +private: + unsigned int h_[5]; + + unsigned char block_[64]; + + std::size_t block_byte_index_; + std::size_t bit_count_low; + std::size_t bit_count_high; +}; + +inline sha1::sha1() +{ + reset(); +} + +inline void sha1::reset() +{ + h_[0] = 0x67452301; + h_[1] = 0xEFCDAB89; + h_[2] = 0x98BADCFE; + h_[3] = 0x10325476; + h_[4] = 0xC3D2E1F0; + + block_byte_index_ = 0; + bit_count_low = 0; + bit_count_high = 0; +} + +inline void sha1::process_byte(unsigned char byte) +{ + process_byte_impl(byte); + + // size_t max value = 0xFFFFFFFF + //if (bit_count_low + 8 >= 0x100000000) { // would overflow + //if (bit_count_low >= 0x100000000-8) { + if (bit_count_low < 0xFFFFFFF8) { + bit_count_low += 8; + } else { + bit_count_low = 0; + + if (bit_count_high <= 0xFFFFFFFE) { + ++bit_count_high; + } else { + BOOST_THROW_EXCEPTION(std::runtime_error("sha1 too many bytes")); + } + } +} + +inline void sha1::process_byte_impl(unsigned char byte) +{ + block_[block_byte_index_++] = byte; + + if (block_byte_index_ == 64) { + block_byte_index_ = 0; + process_block(); + } +} + +inline void sha1::process_block(void const* bytes_begin, void const* bytes_end) +{ + unsigned char const* begin = static_cast(bytes_begin); + unsigned char const* end = static_cast(bytes_end); + for(; begin != end; ++begin) { + process_byte(*begin); + } +} + +inline void sha1::process_bytes(void const* buffer, std::size_t byte_count) +{ + unsigned char const* b = static_cast(buffer); + process_block(b, b+byte_count); +} + +inline void sha1::process_block() +{ + unsigned int w[80]; + for (std::size_t i=0; i<16; ++i) { + w[i] = (block_[i*4 + 0] << 24); + w[i] |= (block_[i*4 + 1] << 16); + w[i] |= (block_[i*4 + 2] << 8); + w[i] |= (block_[i*4 + 3]); + } + for (std::size_t i=16; i<80; ++i) { + w[i] = left_rotate((w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16]), 1); + } + + unsigned int a = h_[0]; + unsigned int b = h_[1]; + unsigned int c = h_[2]; + unsigned int d = h_[3]; + unsigned int e = h_[4]; + + for (std::size_t i=0; i<80; ++i) { + unsigned int f; + unsigned int k; + + if (i<20) { + f = (b & c) | (~b & d); + k = 0x5A827999; + } else if (i<40) { + f = b ^ c ^ d; + k = 0x6ED9EBA1; + } else if (i<60) { + f = (b & c) | (b & d) | (c & d); + k = 0x8F1BBCDC; + } else { + f = b ^ c ^ d; + k = 0xCA62C1D6; + } + + unsigned temp = left_rotate(a, 5) + f + e + k + w[i]; + e = d; + d = c; + c = left_rotate(b, 30); + b = a; + a = temp; + } + + h_[0] += a; + h_[1] += b; + h_[2] += c; + h_[3] += d; + h_[4] += e; +} + +inline void sha1::get_digest(digest_type digest) +{ + // append the bit '1' to the message + process_byte_impl(0x80); + + // append k bits '0', where k is the minimum number >= 0 + // such that the resulting message length is congruent to 56 (mod 64) + // check if there is enough space for padding and bit_count + if (block_byte_index_ > 56) { + // finish this block + while (block_byte_index_ != 0) { + process_byte_impl(0); + } + + // one more block + while (block_byte_index_ < 56) { + process_byte_impl(0); + } + } else { + while (block_byte_index_ < 56) { + process_byte_impl(0); + } + } + + // append length of message (before pre-processing) + // as a 64-bit big-endian integer + process_byte_impl( static_cast((bit_count_high>>24) & 0xFF) ); + process_byte_impl( static_cast((bit_count_high>>16) & 0xFF) ); + process_byte_impl( static_cast((bit_count_high>>8 ) & 0xFF) ); + process_byte_impl( static_cast((bit_count_high) & 0xFF) ); + process_byte_impl( static_cast((bit_count_low>>24) & 0xFF) ); + process_byte_impl( static_cast((bit_count_low>>16) & 0xFF) ); + process_byte_impl( static_cast((bit_count_low>>8 ) & 0xFF) ); + process_byte_impl( static_cast((bit_count_low) & 0xFF) ); + + // get final digest + digest[0] = h_[0]; + digest[1] = h_[1]; + digest[2] = h_[2]; + digest[3] = h_[3]; + digest[4] = h_[4]; +} + +}}} // namespace boost::uuids::detail + +#endif diff --git a/contrib/src/boost/uuid/string_generator.hpp b/contrib/src/boost/uuid/string_generator.hpp new file mode 100644 index 0000000..538ebe8 --- /dev/null +++ b/contrib/src/boost/uuid/string_generator.hpp @@ -0,0 +1,185 @@ +// Boost string_generator.hpp header file ----------------------------------------------// + +// Copyright 2010 Andy Tompkins. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UUID_STRING_GENERATOR_HPP +#define BOOST_UUID_STRING_GENERATOR_HPP + +#include +#include +#include // for strlen, wcslen +#include +#include // for find +#include +#include + +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std { + using ::strlen; + using ::wcslen; +} //namespace std +#endif //BOOST_NO_STDC_NAMESPACE + +namespace boost { +namespace uuids { + +// generate a uuid from a string +// lexical_cast works fine using uuid_io.hpp +// but this generator should accept more forms +// and be more efficient +// would like to accept the following forms: +// 0123456789abcdef0123456789abcdef +// 01234567-89ab-cdef-0123456789abcdef +// {01234567-89ab-cdef-0123456789abcdef} +// {0123456789abcdef0123456789abcdef} +// others? +struct string_generator { + typedef uuid result_type; + + template + uuid operator()(std::basic_string const& s) const { + return operator()(s.begin(), s.end()); + } + + uuid operator()(char const*const s) const { + return operator()(s, s+std::strlen(s)); + } + + uuid operator()(wchar_t const*const s) const { + return operator()(s, s+std::wcslen(s)); + } + + template + uuid operator()(CharIterator begin, CharIterator end) const + { + typedef typename std::iterator_traits::value_type char_type; + + // check open brace + char_type c = get_next_char(begin, end); + bool has_open_brace = is_open_brace(c); + char_type open_brace_char = c; + if (has_open_brace) { + c = get_next_char(begin, end); + } + + bool has_dashes = false; + + uuid u; + int i=0; + for (uuid::iterator it_byte=u.begin(); it_byte!=u.end(); ++it_byte, ++i) { + if (it_byte != u.begin()) { + c = get_next_char(begin, end); + } + + if (i == 4) { + has_dashes = is_dash(c); + if (has_dashes) { + c = get_next_char(begin, end); + } + } + + if (has_dashes) { + if (i == 6 || i == 8 || i == 10) { + if (is_dash(c)) { + c = get_next_char(begin, end); + } else { + throw_invalid(); + } + } + } + + *it_byte = get_value(c); + + c = get_next_char(begin, end); + *it_byte <<= 4; + *it_byte |= get_value(c); + } + + // check close brace + if (has_open_brace) { + c = get_next_char(begin, end); + check_close_brace(c, open_brace_char); + } + + return u; + } + +private: + template + typename std::iterator_traits::value_type + get_next_char(CharIterator& begin, CharIterator end) const { + if (begin == end) { + throw_invalid(); + } + return *begin++; + } + + unsigned char get_value(char c) const { + static char const*const digits_begin = "0123456789abcdefABCDEF"; + static char const*const digits_end = digits_begin + 22; + + static unsigned char const values[] = + { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,10,11,12,13,14,15 + , static_cast(-1) }; + + char const* d = std::find(digits_begin, digits_end, c); + return values[d - digits_begin]; + } + + unsigned char get_value(wchar_t c) const { + static wchar_t const*const digits_begin = L"0123456789abcdefABCDEF"; + static wchar_t const*const digits_end = digits_begin + 22; + + static unsigned char const values[] = + { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,10,11,12,13,14,15 + , static_cast(-1) }; + + wchar_t const* d = std::find(digits_begin, digits_end, c); + return values[d - digits_begin]; + } + + bool is_dash(char c) const { + return c == '-'; + } + + bool is_dash(wchar_t c) const { + return c == L'-'; + } + + // return closing brace + bool is_open_brace(char c) const { + return (c == '{'); + } + + bool is_open_brace(wchar_t c) const { + return (c == L'{'); + } + + void check_close_brace(char c, char open_brace) const { + if (open_brace == '{' && c == '}') { + //great + } else { + throw_invalid(); + } + } + + void check_close_brace(wchar_t c, wchar_t open_brace) const { + if (open_brace == L'{' && c == L'}') { + // great + } else { + throw_invalid(); + } + } + + void throw_invalid() const { + BOOST_THROW_EXCEPTION(std::runtime_error("invalid uuid string")); + } +}; + +}} // namespace boost::uuids + +#endif //BOOST_UUID_STRING_GENERATOR_HPP + diff --git a/contrib/src/boost/uuid/uuid.hpp b/contrib/src/boost/uuid/uuid.hpp new file mode 100644 index 0000000..d8593c0 --- /dev/null +++ b/contrib/src/boost/uuid/uuid.hpp @@ -0,0 +1,212 @@ +// Boost uuid.hpp header file ----------------------------------------------// + +// Copyright 2006 Andy Tompkins. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Revision History +// 06 Feb 2006 - Initial Revision +// 09 Nov 2006 - fixed variant and version bits for v4 guids +// 13 Nov 2006 - added serialization +// 17 Nov 2006 - added name-based guid creation +// 20 Nov 2006 - add fixes for gcc (from Tim Blechmann) +// 07 Mar 2007 - converted to header only +// 10 May 2007 - removed need for Boost.Thread +// - added better seed - thanks Peter Dimov +// - removed null() +// - replaced byte_count() and output_bytes() with size() and begin() and end() +// 11 May 2007 - fixed guid(ByteInputIterator first, ByteInputIterator last) +// - optimized operator>> +// 14 May 2007 - converted from guid to uuid +// 29 May 2007 - uses new implementation of sha1 +// 01 Jun 2007 - removed using namespace directives +// 09 Nov 2007 - moved implementation to uuid.ipp file +// 12 Nov 2007 - moved serialize code to uuid_serialize.hpp file +// 25 Feb 2008 - moved to namespace boost::uuids +// 19 Mar 2009 - changed to a POD, reorganized files +// 28 Nov 2009 - disabled deprecated warnings for MSVC +// 30 Nov 2009 - used BOOST_STATIC_CONSTANT +// 02 Dec 2009 - removed BOOST_STATIC_CONSTANT - not all compilers like it +// 29 Apr 2013 - added support for noexcept and constexpr, added optimizations for SSE/AVX + +#ifndef BOOST_UUID_HPP +#define BOOST_UUID_HPP + +#include +#include +#include +#ifndef BOOST_UUID_NO_TYPE_TRAITS +#include +#include +#endif + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if defined(_MSC_VER) +#pragma warning(push) // Save warning settings. +#pragma warning(disable : 4996) // Disable deprecated std::swap_ranges, std::equal +#endif + +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std { + using ::size_t; + using ::ptrdiff_t; +} //namespace std +#endif //BOOST_NO_STDC_NAMESPACE + +namespace boost { +namespace uuids { + +struct uuid +{ +public: + typedef uint8_t value_type; + typedef uint8_t& reference; + typedef uint8_t const& const_reference; + typedef uint8_t* iterator; + typedef uint8_t const* const_iterator; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + // This does not work on some compilers + // They seem to want the variable definec in + // a cpp file + //BOOST_STATIC_CONSTANT(size_type, static_size = 16); + static BOOST_CONSTEXPR size_type static_size() BOOST_NOEXCEPT { return 16; } + +public: + iterator begin() BOOST_NOEXCEPT { return data; } + const_iterator begin() const BOOST_NOEXCEPT { return data; } + iterator end() BOOST_NOEXCEPT { return data+size(); } + const_iterator end() const BOOST_NOEXCEPT { return data+size(); } + + BOOST_CONSTEXPR size_type size() const BOOST_NOEXCEPT { return static_size(); } + + bool is_nil() const BOOST_NOEXCEPT; + + enum variant_type + { + variant_ncs, // NCS backward compatibility + variant_rfc_4122, // defined in RFC 4122 document + variant_microsoft, // Microsoft Corporation backward compatibility + variant_future // future definition + }; + variant_type variant() const BOOST_NOEXCEPT + { + // variant is stored in octet 7 + // which is index 8, since indexes count backwards + unsigned char octet7 = data[8]; // octet 7 is array index 8 + if ( (octet7 & 0x80) == 0x00 ) { // 0b0xxxxxxx + return variant_ncs; + } else if ( (octet7 & 0xC0) == 0x80 ) { // 0b10xxxxxx + return variant_rfc_4122; + } else if ( (octet7 & 0xE0) == 0xC0 ) { // 0b110xxxxx + return variant_microsoft; + } else { + //assert( (octet7 & 0xE0) == 0xE0 ) // 0b111xxxx + return variant_future; + } + } + + enum version_type + { + version_unknown = -1, + version_time_based = 1, + version_dce_security = 2, + version_name_based_md5 = 3, + version_random_number_based = 4, + version_name_based_sha1 = 5 + }; + version_type version() const BOOST_NOEXCEPT + { + // version is stored in octet 9 + // which is index 6, since indexes count backwards + uint8_t octet9 = data[6]; + if ( (octet9 & 0xF0) == 0x10 ) { + return version_time_based; + } else if ( (octet9 & 0xF0) == 0x20 ) { + return version_dce_security; + } else if ( (octet9 & 0xF0) == 0x30 ) { + return version_name_based_md5; + } else if ( (octet9 & 0xF0) == 0x40 ) { + return version_random_number_based; + } else if ( (octet9 & 0xF0) == 0x50 ) { + return version_name_based_sha1; + } else { + return version_unknown; + } + } + + // note: linear complexity + void swap(uuid& rhs) BOOST_NOEXCEPT; + +public: + // or should it be array + uint8_t data[16]; +}; + +bool operator== (uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT; +bool operator< (uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT; + +inline bool operator!=(uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT +{ + return !(lhs == rhs); +} + +inline bool operator>(uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT +{ + return rhs < lhs; +} +inline bool operator<=(uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT +{ + return !(rhs < lhs); +} + +inline bool operator>=(uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT +{ + return !(lhs < rhs); +} + +inline void swap(uuid& lhs, uuid& rhs) BOOST_NOEXCEPT +{ + lhs.swap(rhs); +} + +// This is equivalent to boost::hash_range(u.begin(), u.end()); +inline std::size_t hash_value(uuid const& u) BOOST_NOEXCEPT +{ + std::size_t seed = 0; + for(uuid::const_iterator i=u.begin(), e=u.end(); i != e; ++i) + { + seed ^= static_cast(*i) + 0x9e3779b9 + (seed << 6) + (seed >> 2); + } + + return seed; +} + +}} //namespace boost::uuids + +#ifndef BOOST_UUID_NO_TYPE_TRAITS +// type traits specializations +namespace boost { + +template <> +struct is_pod : true_type {}; + +} // namespace boost +#endif + +#if defined(BOOST_UUID_USE_SSE2) +#include +#else +#include +#endif + +#if defined(_MSC_VER) +#pragma warning(pop) // Restore warnings to previous state. +#endif + +#endif // BOOST_UUID_HPP diff --git a/contrib/src/boost/uuid/uuid_generators.hpp b/contrib/src/boost/uuid/uuid_generators.hpp new file mode 100644 index 0000000..29d39cc --- /dev/null +++ b/contrib/src/boost/uuid/uuid_generators.hpp @@ -0,0 +1,19 @@ +// Boost uuid_generators.hpp header file ----------------------------------------------// + +// Copyright 2006 Andy Tompkins. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Revision History +// 06 Feb 2006 - Initial Revision + +#ifndef BOOST_UUID_GENERATORS_HPP +#define BOOST_UUID_GENERATORS_HPP + +#include +#include +#include +#include + +#endif //BOOST_UUID_GENERATORS_HPP diff --git a/contrib/src/boost/uuid/uuid_io.hpp b/contrib/src/boost/uuid/uuid_io.hpp new file mode 100644 index 0000000..1d30618 --- /dev/null +++ b/contrib/src/boost/uuid/uuid_io.hpp @@ -0,0 +1,198 @@ +// Boost uuid_io.hpp header file ----------------------------------------------// + +// Copyright 2009 Andy Tompkins. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Revision History +// 20 Mar 2009 - Initial Revision +// 28 Nov 2009 - disabled deprecated warnings for MSVC + +#ifndef BOOST_UUID_IO_HPP +#define BOOST_UUID_IO_HPP + +#include +#include +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) +#pragma warning(push) // Save warning settings. +#pragma warning(disable : 4996) // Disable deprecated std::ctype::widen, std::copy +#endif + +namespace boost { +namespace uuids { + +template + std::basic_ostream& operator<<(std::basic_ostream &os, uuid const& u) +{ + io::ios_flags_saver flags_saver(os); + io::basic_ios_fill_saver fill_saver(os); + + const typename std::basic_ostream::sentry ok(os); + if (ok) { + const std::streamsize width = os.width(0); + const std::streamsize uuid_width = 36; + const std::ios_base::fmtflags flags = os.flags(); + const typename std::basic_ios::char_type fill = os.fill(); + if (flags & (std::ios_base::right | std::ios_base::internal)) { + for (std::streamsize i=uuid_width; i(*i_data); + if (i == 3 || i == 5 || i == 7 || i == 9) { + os << os.widen('-'); + } + } + + if (flags & std::ios_base::left) { + for (std::streamsize s=uuid_width; s + std::basic_istream& operator>>(std::basic_istream &is, uuid &u) +{ + const typename std::basic_istream::sentry ok(is); + if (ok) { + unsigned char data[16]; + + typedef std::ctype ctype_t; + ctype_t const& ctype = std::use_facet(is.getloc()); + + ch xdigits[16]; + { + char szdigits[] = "0123456789ABCDEF"; + ctype.widen(szdigits, szdigits+16, xdigits); + } + ch*const xdigits_end = xdigits+16; + + ch c; + for (std::size_t i=0; i> c; + c = ctype.toupper(c); + + ch* f = std::find(xdigits, xdigits_end, c); + if (f == xdigits_end) { + is.setstate(std::ios_base::failbit); + break; + } + + unsigned char byte = static_cast(std::distance(&xdigits[0], f)); + + is >> c; + c = ctype.toupper(c); + f = std::find(xdigits, xdigits_end, c); + if (f == xdigits_end) { + is.setstate(std::ios_base::failbit); + break; + } + + byte <<= 4; + byte |= static_cast(std::distance(&xdigits[0], f)); + + data[i] = byte; + + if (is) { + if (i == 3 || i == 5 || i == 7 || i == 9) { + is >> c; + if (c != is.widen('-')) is.setstate(std::ios_base::failbit); + } + } + } + + if (is) { + std::copy(data, data+16, u.begin()); + } + } + return is; +} + +namespace detail { +inline char to_char(size_t i) { + if (i <= 9) { + return static_cast('0' + i); + } else { + return static_cast('a' + (i-10)); + } +} + +inline wchar_t to_wchar(size_t i) { + if (i <= 9) { + return static_cast(L'0' + i); + } else { + return static_cast(L'a' + (i-10)); + } +} + +} // namespace detail + +inline std::string to_string(uuid const& u) +{ + std::string result; + result.reserve(36); + + std::size_t i=0; + for (uuid::const_iterator it_data = u.begin(); it_data!=u.end(); ++it_data, ++i) { + const size_t hi = ((*it_data) >> 4) & 0x0F; + result += detail::to_char(hi); + + const size_t lo = (*it_data) & 0x0F; + result += detail::to_char(lo); + + if (i == 3 || i == 5 || i == 7 || i == 9) { + result += '-'; + } + } + return result; +} + +#ifndef BOOST_NO_STD_WSTRING +inline std::wstring to_wstring(uuid const& u) +{ + std::wstring result; + result.reserve(36); + + std::size_t i=0; + for (uuid::const_iterator it_data = u.begin(); it_data!=u.end(); ++it_data, ++i) { + const size_t hi = ((*it_data) >> 4) & 0x0F; + result += detail::to_wchar(hi); + + const size_t lo = (*it_data) & 0x0F; + result += detail::to_wchar(lo); + + if (i == 3 || i == 5 || i == 7 || i == 9) { + result += L'-'; + } + } + return result; +} + +#endif + +}} //namespace boost::uuids + +#if defined(_MSC_VER) +#pragma warning(pop) // Restore warnings to previous state. +#endif + +#endif // BOOST_UUID_IO_HPP diff --git a/contrib/src/boost/version.hpp b/contrib/src/boost/version.hpp new file mode 100644 index 0000000..fce02ec --- /dev/null +++ b/contrib/src/boost/version.hpp @@ -0,0 +1,32 @@ +// Boost version.hpp configuration header file ------------------------------// + +// (C) Copyright John maddock 1999. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for documentation + +#ifndef BOOST_VERSION_HPP +#define BOOST_VERSION_HPP + +// +// Caution: this is the only Boost header that is guaranteed +// to change with every Boost release. Including this header +// will cause a recompile every time a new Boost version is +// used. +// +// BOOST_VERSION % 100 is the patch level +// BOOST_VERSION / 100 % 1000 is the minor version +// BOOST_VERSION / 100000 is the major version + +#define BOOST_VERSION 106000 + +// +// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION +// but as a *string* in the form "x_y[_z]" where x is the major version +// number, y is the minor version number, and z is the patch level if not 0. +// This is used by to select which library version to link to. + +#define BOOST_LIB_VERSION "1_60" + +#endif diff --git a/contrib/src/easylogging++.h b/contrib/src/easylogging++.h new file mode 100644 index 0000000..9bf18fd --- /dev/null +++ b/contrib/src/easylogging++.h @@ -0,0 +1,6667 @@ +// +// Easylogging++ v9.80 +// Single-header only, cross-platform logging library for C++ applications +// +// Copyright (c) 2015 muflihun.com +// +// This library is released under the MIT Licence. +// http://easylogging.muflihun.com/licence.php +// +// easylogging@muflihun.com +// +// https://github.com/easylogging/easyloggingpp +// http://easylogging.muflihun.com +// http://muflihun.com +// +#ifndef EASYLOGGINGPP_H +#define EASYLOGGINGPP_H +// Compilers and C++0x/C++11 Evaluation +#if defined(__GNUC__) +# define ELPP_COMPILER_GCC 1 +# define ELPP_GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) +# if defined(__GXX_EXPERIMENTAL_CXX0X__) +# define ELPP_CXX0X 1 +# elif(ELPP_GCC_VERSION >= 40801) +# define ELPP_CXX11 1 +# endif // defined(__GXX_EXPERIMENTAL_CXX0X__) +#endif // defined(__GNUC__) +// Visual C++ +#if defined(_MSC_VER) +# define ELPP_COMPILER_MSVC 1 +# define ELPP_CRT_DBG_WARNINGS 1 +# if (_MSC_VER == 1600) +# define ELPP_CXX0X 1 +# elif(_MSC_VER >= 1700) +# define ELPP_CXX11 1 +# endif // (_MSC_VER == 1600) +#endif // defined(_MSC_VER) +// Clang++ +#if defined(__clang__) && (__clang__ == 1) +# define ELPP_COMPILER_CLANG 1 +# define ELPP_CLANG_VERSION (__clang_major__ * 10000 \ + + __clang_minor__ * 100 \ + + __clang_patchlevel__) +# if (ELPP_CLANG_VERSION >= 30300) +# define ELPP_CXX11 1 +# endif // (ELPP_CLANG_VERSION >= 30300) +#endif // defined(__clang__) && (__clang__ == 1) +// MinGW +#if defined(__MINGW32__) || defined(__MINGW64__) +# define ELPP_MINGW 1 +#endif // defined(__MINGW32__) || defined(__MINGW64__) +// Cygwin +#if defined(__CYGWIN__) && (__CYGWIN__ == 1) +# define ELPP_CYGWIN 1 +#endif // defined(__CYGWIN__) && (__CYGWIN__ == 1) +// Intel C++ +#if defined(__INTEL_COMPILER) +# define ELPP_COMPILER_INTEL 1 +#endif +// Operating System Evaluation +// Windows +#if defined(_WIN32) || defined(_WIN64) +# define ELPP_OS_WINDOWS 1 +#endif // defined(_WIN32) || defined(_WIN64) +// Linux +#if (defined(__linux) || defined(__linux__)) +# define ELPP_OS_LINUX 1 +#endif // (defined(__linux) || defined(__linux__)) +// Mac +#if defined(__APPLE__) +# define ELPP_OS_MAC 1 +#endif // defined(__APPLE__) +// FreeBSD +#if defined(__FreeBSD__) +# define ELPP_OS_FREEBSD 1 +#endif +// Solaris +#if defined(__sun) +# define ELPP_OS_SOLARIS 1 +#endif +// Unix +#if ((ELPP_OS_LINUX || ELPP_OS_MAC || ELPP_OS_FREEBSD || ELPP_OS_SOLARIS) && (!ELPP_OS_WINDOWS)) +# define ELPP_OS_UNIX 1 +#endif // ((ELPP_OS_LINUX || ELPP_OS_MAC || ELPP_OS_FREEBSD || ELPP_OS_SOLARIS) && (!ELPP_OS_WINDOWS)) +// Android +#if defined(__ANDROID__) +# define ELPP_OS_ANDROID 1 +#endif // defined(__ANDROID__) +// Evaluating Cygwin as *nix OS +#if !ELPP_OS_UNIX && !ELPP_OS_WINDOWS && ELPP_CYGWIN +# undef ELPP_OS_UNIX +# undef ELPP_OS_LINUX +# define ELPP_OS_UNIX 1 +# define ELPP_OS_LINUX 1 +#endif // !ELPP_OS_UNIX && !ELPP_OS_WINDOWS && ELPP_CYGWIN +#if !defined(ELPP_INTERNAL_DEBUGGING_OUT_INFO) +# define ELPP_INTERNAL_DEBUGGING_OUT_INFO std::cout +#endif // !defined(ELPP_INTERNAL_DEBUGGING_OUT) +#if !defined(ELPP_INTERNAL_DEBUGGING_OUT_ERROR) +# define ELPP_INTERNAL_DEBUGGING_OUT_ERROR std::cerr +#endif // !defined(ELPP_INTERNAL_DEBUGGING_OUT) +#if !defined(ELPP_INTERNAL_DEBUGGING_ENDL) +# define ELPP_INTERNAL_DEBUGGING_ENDL std::endl +#endif // !defined(ELPP_INTERNAL_DEBUGGING_OUT) +#if !defined(ELPP_INTERNAL_DEBUGGING_MSG) +# define ELPP_INTERNAL_DEBUGGING_MSG(msg) msg +#endif // !defined(ELPP_INTERNAL_DEBUGGING_OUT) +// Internal Assertions and errors +#if !defined(ELPP_DISABLE_ASSERT) +# if (defined(ELPP_DEBUG_ASSERT_FAILURE)) +# define ELPP_ASSERT(expr, msg) if (!(expr)) { \ + std::stringstream internalInfoStream; internalInfoStream << msg; \ + ELPP_INTERNAL_DEBUGGING_OUT_ERROR \ + << "EASYLOGGING++ ASSERTION FAILED (LINE: " << __LINE__ << ") [" #expr << "] WITH MESSAGE \"" \ + << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStream.str()) << "\"" << ELPP_INTERNAL_DEBUGGING_ENDL; base::utils::abort(1, \ + "ELPP Assertion failure, please define ELPP_DEBUG_ASSERT_FAILURE"); } +# else +# define ELPP_ASSERT(expr, msg) if (!(expr)) { \ + std::stringstream internalInfoStream; internalInfoStream << msg; \ + ELPP_INTERNAL_DEBUGGING_OUT_ERROR\ + << "ASSERTION FAILURE FROM EASYLOGGING++ (LINE: " \ + << __LINE__ << ") [" #expr << "] WITH MESSAGE \"" << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStream.str()) << "\"" \ + << ELPP_INTERNAL_DEBUGGING_ENDL; } +# endif // (defined(ELPP_DEBUG_ASSERT_FAILURE)) +#else +# define ELPP_ASSERT(x, y) +#endif //(!defined(ELPP_DISABLE_ASSERT) +#if ELPP_COMPILER_MSVC +# define ELPP_INTERNAL_DEBUGGING_WRITE_PERROR \ + { char buff[256]; strerror_s(buff, 256, errno); \ + ELPP_INTERNAL_DEBUGGING_OUT_ERROR << ": " << buff << " [" << errno << "]";} (void)0 +#else +# define ELPP_INTERNAL_DEBUGGING_WRITE_PERROR \ + ELPP_INTERNAL_DEBUGGING_OUT_ERROR << ": " << strerror(errno) << " [" << errno << "]"; (void)0 +#endif // ELPP_COMPILER_MSVC +#if defined(ELPP_DEBUG_ERRORS) +# if !defined(ELPP_INTERNAL_ERROR) +# define ELPP_INTERNAL_ERROR(msg, pe) { \ + std::stringstream internalInfoStream; internalInfoStream << " " << msg; \ + ELPP_INTERNAL_DEBUGGING_OUT_ERROR \ + << "ERROR FROM EASYLOGGING++ (LINE: " << __LINE__ << ") " \ + << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStream.str()) << ELPP_INTERNAL_DEBUGGING_ENDL; \ + if (pe) { ELPP_INTERNAL_DEBUGGING_OUT_ERROR << " "; ELPP_INTERNAL_DEBUGGING_WRITE_PERROR; }} (void)0 +# endif +#else +# undef ELPP_INTERNAL_INFO +# define ELPP_INTERNAL_ERROR(msg, pe) +#endif // defined(ELPP_DEBUG_ERRORS) +#if (defined(ELPP_DEBUG_INFO)) +# if !(defined(ELPP_INTERNAL_INFO_LEVEL)) +# define ELPP_INTERNAL_INFO_LEVEL 9 +# endif // !(defined(ELPP_INTERNAL_INFO_LEVEL)) +# if !defined(ELPP_INTERNAL_INFO) +# define ELPP_INTERNAL_INFO(lvl, msg) { if (lvl <= ELPP_INTERNAL_INFO_LEVEL) { \ + std::stringstream internalInfoStream; internalInfoStream << " " << msg; \ + ELPP_INTERNAL_DEBUGGING_OUT_INFO << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStream.str()) \ + << ELPP_INTERNAL_DEBUGGING_ENDL; }} +# endif +#else +# undef ELPP_INTERNAL_INFO +# define ELPP_INTERNAL_INFO(lvl, msg) +#endif // (defined(ELPP_DEBUG_INFO)) +#if defined(ELPP_STACKTRACE_ON_CRASH) +# if (ELPP_COMPILER_GCC && !ELPP_MINGW) +# define ELPP_STACKTRACE 1 +# else +# if ELPP_COMPILER_MSVC +# pragma message("Stack trace not available for this compiler") +# else +# warning "Stack trace not available for this compiler"; +# endif // ELPP_COMPILER_MSVC +# endif // ELPP_COMPILER_GCC +#endif // (defined(ELPP_STACKTRACE_ON_CRASH)) +// Miscellaneous macros +#define ELPP_UNUSED(x) (void)x +#if ELPP_OS_UNIX +// Log file permissions for unix-based systems +# define ELPP_LOG_PERMS S_IRUSR | S_IWUSR | S_IXUSR | S_IWGRP | S_IRGRP | S_IXGRP | S_IWOTH | S_IXOTH +#endif // ELPP_OS_UNIX +#if defined(ELPP_AS_DLL) && ELPP_COMPILER_MSVC +# if defined(ELPP_EXPORT_SYMBOLS) +# define ELPP_EXPORT __declspec(dllexport) +# else +# define ELPP_EXPORT __declspec(dllimport) +# endif // defined(ELPP_EXPORT_SYMBOLS) +#else +# define ELPP_EXPORT +#endif // defined(ELPP_AS_DLL) && ELPP_COMPILER_MSVC +// Some special functions that are VC++ specific +#undef STRTOK +#undef STRERROR +#undef STRCAT +#undef STRCPY +#if ELPP_CRT_DBG_WARNINGS +# define STRTOK(a, b, c) strtok_s(a, b, c) +# define STRERROR(a, b, c) strerror_s(a, b, c) +# define STRCAT(a, b, len) strcat_s(a, len, b) +# define STRCPY(a, b, len) strcpy_s(a, len, b) +#else +# define STRTOK(a, b, c) strtok(a, b) +# define STRERROR(a, b, c) strerror(c) +# define STRCAT(a, b, len) strcat(a, b) +# define STRCPY(a, b, len) strcpy(a, b) +#endif +// Compiler specific support evaluations +#if (!ELPP_MINGW && !ELPP_COMPILER_CLANG) || defined(ELPP_FORCE_USE_STD_THREAD) +# define ELPP_USE_STD_THREADING 1 +#endif // (!ELPP_MINGW && !ELPP_COMPILER_CLANG) || defined(ELPP_FORCE_USE_STD_THREAD) +#undef ELPP_FINAL +#if ELPP_COMPILER_INTEL || (ELPP_GCC_VERSION < 40702) +# define ELPP_FINAL +#else +# define ELPP_FINAL final +#endif // ELPP_COMPILER_INTEL || (ELPP_GCC_VERSION < 40702) +#if defined(ELPP_EXPERIMENTAL_ASYNC) +# define ELPP_ASYNC_LOGGING 1 +#else +# define ELPP_ASYNC_LOGGING 0 +#endif // defined(ELPP_EXPERIMENTAL_ASYNC) +#if defined(ELPP_THREAD_SAFE) || ELPP_ASYNC_LOGGING +# define ELPP_THREADING_ENABLED 1 +#endif // defined(ELPP_THREAD_SAFE) || ELPP_ASYNC_LOGGING +// Function macro ELPP_FUNC +#undef ELPP_FUNC +#if ELPP_COMPILER_MSVC // Visual C++ +# define ELPP_FUNC __FUNCSIG__ +#elif ELPP_COMPILER_GCC // GCC +# define ELPP_FUNC __PRETTY_FUNCTION__ +#elif ELPP_COMPILER_INTEL // Intel C++ +# define ELPP_FUNC __PRETTY_FUNCTION__ +#elif ELPP_COMPILER_CLANG // Clang++ +# define ELPP_FUNC __PRETTY_FUNCTION__ +#else +# if defined(__func__) +# define ELPP_FUNC __func__ +# else +# define ELPP_FUNC "" +# endif // defined(__func__) +#endif // defined(_MSC_VER) +#undef ELPP_VARIADIC_TEMPLATES_SUPPORTED +// Keep following line commented until features are fixed +#if ELPP_COMPILER_GCC || ELPP_COMPILER_CLANG || ELPP_COMPILER_INTEL || (ELPP_COMPILER_MSVC && _MSC_VER >= 1800) +# define ELPP_VARIADIC_TEMPLATES_SUPPORTED 1 +#endif // ELPP_COMPILER_GCC || ELPP_COMPILER_CLANG || ELPP_COMPILER_INTEL || (ELPP_COMPILER_MSVC && _MSC_VER >= 1800) +// Logging Enable/Disable macros +#if (!defined(ELPP_DISABLE_LOGS)) +# define ELPP_LOGGING_ENABLED 1 +#endif // (!defined(ELPP_DISABLE_LOGS)) +#if (!defined(ELPP_DISABLE_DEBUG_LOGS) && (ELPP_LOGGING_ENABLED) && ((defined(_DEBUG)) || (!defined(NDEBUG)))) +# define ELPP_DEBUG_LOG 1 +#else +# define ELPP_DEBUG_LOG 0 +#endif // (!defined(ELPP_DISABLE_DEBUG_LOGS) && (ELPP_LOGGING_ENABLED) && ((defined(_DEBUG)) || (!defined(NDEBUG)))) +#if (!defined(ELPP_DISABLE_INFO_LOGS) && (ELPP_LOGGING_ENABLED)) +# define ELPP_INFO_LOG 1 +#else +# define ELPP_INFO_LOG 0 +#endif // (!defined(ELPP_DISABLE_INFO_LOGS) && (ELPP_LOGGING_ENABLED)) +#if (!defined(ELPP_DISABLE_WARNING_LOGS) && (ELPP_LOGGING_ENABLED)) +# define ELPP_WARNING_LOG 1 +#else +# define ELPP_WARNING_LOG 0 +#endif // (!defined(ELPP_DISABLE_WARNING_LOGS) && (ELPP_LOGGING_ENABLED)) +#if (!defined(ELPP_DISABLE_ERROR_LOGS) && (ELPP_LOGGING_ENABLED)) +# define ELPP_ERROR_LOG 1 +#else +# define ELPP_ERROR_LOG 0 +#endif // (!defined(ELPP_DISABLE_ERROR_LOGS) && (ELPP_LOGGING_ENABLED)) +#if (!defined(ELPP_DISABLE_FATAL_LOGS) && (ELPP_LOGGING_ENABLED)) +# define ELPP_FATAL_LOG 1 +#else +# define ELPP_FATAL_LOG 0 +#endif // (!defined(ELPP_DISABLE_FATAL_LOGS) && (ELPP_LOGGING_ENABLED)) +#if (!defined(ELPP_DISABLE_TRACE_LOGS) && (ELPP_LOGGING_ENABLED)) +# define ELPP_TRACE_LOG 1 +#else +# define ELPP_TRACE_LOG 0 +#endif // (!defined(ELPP_DISABLE_TRACE_LOGS) && (ELPP_LOGGING_ENABLED)) +#if (!defined(ELPP_DISABLE_VERBOSE_LOGS) && (ELPP_LOGGING_ENABLED)) +# define ELPP_VERBOSE_LOG 1 +#else +# define ELPP_VERBOSE_LOG 0 +#endif // (!defined(ELPP_DISABLE_VERBOSE_LOGS) && (ELPP_LOGGING_ENABLED)) +#if (!(ELPP_CXX0X || ELPP_CXX11)) +# error "Easylogging++ 9.0+ is only compatible with C++0x (or higher) compliant compiler" +#endif // (!(ELPP_CXX0X || ELPP_CXX11)) +// Headers +#if defined(ELPP_SYSLOG) +# include +#endif // defined(ELPP_SYSLOG) +#include +#include +#include +#include +#include +#include +#include +#include +#if defined(ELPP_UNICODE) +# include +# if ELPP_OS_WINDOWS +# include +# endif // ELPP_OS_WINDOWS +#endif // defined(ELPP_UNICODE) +#if ELPP_STACKTRACE +# include +# include +#endif // ELPP_STACKTRACE +#if ELPP_OS_ANDROID +# include +#endif // ELPP_OS_ANDROID +#if ELPP_OS_UNIX +# include +# include +#elif ELPP_OS_WINDOWS +# include +# include +# if defined(WIN32_LEAN_AND_MEAN) +# if defined(ELPP_WINSOCK2) +# include +# else +# include +# endif // defined(ELPP_WINSOCK2) +# endif // defined(WIN32_LEAN_AND_MEAN) +#endif // ELPP_OS_UNIX +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if ELPP_THREADING_ENABLED +# if ELPP_USE_STD_THREADING +# include +# include +# else +# if ELPP_OS_UNIX +# include +# endif // ELPP_OS_UNIX +# endif // ELPP_USE_STD_THREADING +#endif // ELPP_THREADING_ENABLED +#if ELPP_ASYNC_LOGGING +# include +# include +# include +#endif // ELPP_ASYNC_LOGGING +#if defined(ELPP_STL_LOGGING) +// For logging STL based templates +# include +# include +# include +# include +# include +# include +# if defined(ELPP_LOG_STD_ARRAY) +# include +# endif // defined(ELPP_LOG_STD_ARRAY) +# if defined(ELPP_LOG_UNORDERED_MAP) +# include +# endif // defined(ELPP_LOG_UNORDERED_MAP) +# if defined(ELPP_LOG_UNORDERED_SET) +# include +# endif // defined(ELPP_UNORDERED_SET) +#endif // defined(ELPP_STL_LOGGING) +#if defined(ELPP_QT_LOGGING) +// For logging Qt based classes & templates +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#endif // defined(ELPP_QT_LOGGING) +#if defined(ELPP_BOOST_LOGGING) +// For logging boost based classes & templates +# include +# include +# include +# include +# include +# include +# include +# include +#endif // defined(ELPP_BOOST_LOGGING) +#if defined(ELPP_WXWIDGETS_LOGGING) +// For logging wxWidgets based classes & templates +# include +#endif // defined(ELPP_WXWIDGETS_LOGGING) +// Forward declarations +namespace el { +class Logger; +class LogMessage; +class PerformanceTrackingData; +class Loggers; +class Helpers; +template class Callback; +class LogDispatchCallback; +class PerformanceTrackingCallback; +class LogDispatchData; +namespace base { +class Storage; +class RegisteredLoggers; +class PerformanceTracker; +class MessageBuilder; +class Writer; +class PErrorWriter; +class LogDispatcher; +class DefaultLogBuilder; +class DefaultLogDispatchCallback; +#if ELPP_ASYNC_LOGGING +class AsyncLogDispatchCallback; +class AsyncDispatchWorker; +#endif // ELPP_ASYNC_LOGGING +class DefaultPerformanceTrackingCallback; +} // namespace base +} // namespace el +/// @brief Easylogging++ entry namespace +namespace el { +/// @brief Namespace containing base/internal functionality used by Easylogging++ +namespace base { +/// @brief Data types used by Easylogging++ +namespace type { +#undef ELPP_LITERAL +#undef ELPP_STRLEN +#undef ELPP_COUT +#if defined(ELPP_UNICODE) +# define ELPP_LITERAL(txt) L##txt +# define ELPP_STRLEN wcslen +# if defined ELPP_CUSTOM_COUT +# define ELPP_COUT ELPP_CUSTOM_COUT +# else +# define ELPP_COUT std::wcout +# endif // defined ELPP_CUSTOM_COUT +typedef wchar_t char_t; +typedef std::wstring string_t; +typedef std::wstringstream stringstream_t; +typedef std::wfstream fstream_t; +typedef std::wostream ostream_t; +#else +# define ELPP_LITERAL(txt) txt +# define ELPP_STRLEN strlen +# if defined ELPP_CUSTOM_COUT +# define ELPP_COUT ELPP_CUSTOM_COUT +# else +# define ELPP_COUT std::cout +# endif // defined ELPP_CUSTOM_COUT +typedef char char_t; +typedef std::string string_t; +typedef std::stringstream stringstream_t; +typedef std::fstream fstream_t; +typedef std::ostream ostream_t; +#endif // defined(ELPP_UNICODE) +#if defined(ELPP_CUSTOM_COUT_LINE) +# define ELPP_COUT_LINE(logLine) ELPP_CUSTOM_COUT_LINE(logLine) +#else +# define ELPP_COUT_LINE(logLine) logLine << std::flush +#endif // defined(ELPP_CUSTOM_COUT_LINE) +typedef unsigned short EnumType; +typedef std::shared_ptr StoragePointer; +typedef int VerboseLevel; +typedef std::shared_ptr LogDispatchCallbackPtr; +typedef std::shared_ptr PerformanceTrackingCallbackPtr; +} // namespace type +/// @brief Internal helper class that prevent copy constructor for class +/// +/// @detail When using this class simply inherit it privately +class NoCopy { +protected: + NoCopy(void) {} +private: + NoCopy(const NoCopy&); + NoCopy& operator=(const NoCopy&); +}; +/// @brief Internal helper class that makes all default constructors private. +/// +/// @detail This prevents initializing class making it static unless an explicit constructor is declared. +/// When using this class simply inherit it privately +class StaticClass { +private: + StaticClass(void); + StaticClass(const StaticClass&); + StaticClass& operator=(const StaticClass&); +}; +} // namespace base +/// @brief Represents enumeration for severity level used to determine level of logging +/// +/// @detail With Easylogging++, developers may disable or enable any level regardless of +/// what the severity is. Or they can choose to log using hierarchical logging flag +enum class Level : base::type::EnumType { + /// @brief Generic level that represents all the levels. Useful when setting global configuration for all levels + Global = 1, + /// @brief Information that can be useful to back-trace certain events - mostly useful than debug logs. + Trace = 2, + /// @brief Informational events most useful for developers to debug application + Debug = 4, + /// @brief Severe error information that will presumably abort application + Fatal = 8, + /// @brief Information representing errors in application but application will keep running + Error = 16, + /// @brief Useful when application has potentially harmful situtaions + Warning = 32, + /// @brief Information that can be highly useful and vary with verbose logging level. + Verbose = 64, + /// @brief Mainly useful to represent current progress of application + Info = 128, + /// @brief Represents unknown level + Unknown = 1010 +}; +/// @brief Static class that contains helper functions for el::Level +class LevelHelper : base::StaticClass { +public: + /// @brief Represents minimum valid level. Useful when iterating through enum. + static const base::type::EnumType kMinValid = static_cast(Level::Trace); + /// @brief Represents maximum valid level. This is used internally and you should not need it. + static const base::type::EnumType kMaxValid = static_cast(Level::Info); + /// @brief Casts level to int, useful for iterating through enum. + static base::type::EnumType castToInt(Level level) { + return static_cast(level); + } + /// @brief Casts int(ushort) to level, useful for iterating through enum. + static Level castFromInt(base::type::EnumType l) { + return static_cast(l); + } + /// @brief Converts level to associated const char* + /// @return Upper case string based level. + static const char* convertToString(Level level) { + // Do not use switch over strongly typed enums because Intel C++ compilers dont support them yet. + if (level == Level::Global) return "GLOBAL"; + if (level == Level::Debug) return "DEBUG"; + if (level == Level::Info) return "INFO"; + if (level == Level::Warning) return "WARNING"; + if (level == Level::Error) return "ERROR"; + if (level == Level::Fatal) return "FATAL"; + if (level == Level::Verbose) return "VERBOSE"; + if (level == Level::Trace) return "TRACE"; + return "UNKNOWN"; + } + /// @brief Converts from levelStr to Level + /// @param levelStr Upper case string based level. + /// Lower case is also valid but providing upper case is recommended. + static Level convertFromString(const char* levelStr) { + if ((strcmp(levelStr, "GLOBAL") == 0) || (strcmp(levelStr, "global") == 0)) + return Level::Global; + if ((strcmp(levelStr, "DEBUG") == 0) || (strcmp(levelStr, "debug") == 0)) + return Level::Debug; + if ((strcmp(levelStr, "INFO") == 0) || (strcmp(levelStr, "info") == 0)) + return Level::Info; + if ((strcmp(levelStr, "WARNING") == 0) || (strcmp(levelStr, "warning") == 0)) + return Level::Warning; + if ((strcmp(levelStr, "ERROR") == 0) || (strcmp(levelStr, "error") == 0)) + return Level::Error; + if ((strcmp(levelStr, "FATAL") == 0) || (strcmp(levelStr, "fatal") == 0)) + return Level::Fatal; + if ((strcmp(levelStr, "VERBOSE") == 0) || (strcmp(levelStr, "verbose") == 0)) + return Level::Verbose; + if ((strcmp(levelStr, "TRACE") == 0) || (strcmp(levelStr, "trace") == 0)) + return Level::Trace; + return Level::Unknown; + } + /// @brief Applies specified function to each level starting from startIndex + /// @param startIndex initial value to start the iteration from. This is passed as pointer and + /// is left-shifted so this can be used inside function (fn) to represent current level. + /// @param fn function to apply with each level. This bool represent whether or not to stop iterating through levels. + static inline void forEachLevel(base::type::EnumType* startIndex, const std::function& fn) { + base::type::EnumType lIndexMax = LevelHelper::kMaxValid; + do { + if (fn()) { + break; + } + *startIndex = static_cast(*startIndex << 1); + } while (*startIndex <= lIndexMax); + } +}; +/// @brief Represents enumeration of ConfigurationType used to configure or access certain aspect +/// of logging +enum class ConfigurationType : base::type::EnumType { + /// @brief Determines whether or not corresponding level and logger of logging is enabled + /// You may disable all logs by using el::Level::Global + Enabled = 1, + /// @brief Whether or not to write corresponding log to log file + ToFile = 2, + /// @brief Whether or not to write corresponding level and logger log to standard output. + /// By standard output meaning termnal, command prompt etc + ToStandardOutput = 4, + /// @brief Determines format of logging corresponding level and logger. + Format = 8, + /// @brief Determines log file (full path) to write logs to for correponding level and logger + Filename = 16, + /// @brief Specifies milliseconds width. Width can be within range (1-6) + MillisecondsWidth = 32, + /// @brief Determines whether or not performance tracking is enabled. + /// + /// @detail This does not depend on logger or level. Performance tracking always uses 'performance' logger + PerformanceTracking = 64, + /// @brief Specifies log file max size. + /// + /// @detail If file size of corresponding log file (for corresponding level) is >= specified size, log file will + /// be truncated and re-initiated. + MaxLogFileSize = 128, + /// @brief Specifies number of log entries to hold until we flush pending log data + LogFlushThreshold = 256, + /// @brief Represents unknown configuration + Unknown = 1010 +}; +/// @brief Static class that contains helper functions for el::ConfigurationType +class ConfigurationTypeHelper : base::StaticClass { +public: + /// @brief Represents minimum valid configuration type. Useful when iterating through enum. + static const base::type::EnumType kMinValid = static_cast(ConfigurationType::Enabled); + /// @brief Represents maximum valid configuration type. This is used internally and you should not need it. + static const base::type::EnumType kMaxValid = static_cast(ConfigurationType::MaxLogFileSize); + /// @brief Casts configuration type to int, useful for iterating through enum. + static base::type::EnumType castToInt(ConfigurationType configurationType) { + return static_cast(configurationType); + } + /// @brief Casts int(ushort) to configurationt type, useful for iterating through enum. + static ConfigurationType castFromInt(base::type::EnumType c) { + return static_cast(c); + } + /// @brief Converts configuration type to associated const char* + /// @returns Upper case string based configuration type. + static const char* convertToString(ConfigurationType configurationType) { + // Do not use switch over strongly typed enums because Intel C++ compilers dont support them yet. + if (configurationType == ConfigurationType::Enabled) return "ENABLED"; + if (configurationType == ConfigurationType::Filename) return "FILENAME"; + if (configurationType == ConfigurationType::Format) return "FORMAT"; + if (configurationType == ConfigurationType::ToFile) return "TO_FILE"; + if (configurationType == ConfigurationType::ToStandardOutput) return "TO_STANDARD_OUTPUT"; + if (configurationType == ConfigurationType::MillisecondsWidth) return "MILLISECONDS_WIDTH"; + if (configurationType == ConfigurationType::PerformanceTracking) return "PERFORMANCE_TRACKING"; + if (configurationType == ConfigurationType::MaxLogFileSize) return "MAX_LOG_FILE_SIZE"; + if (configurationType == ConfigurationType::LogFlushThreshold) return "LOG_FLUSH_THRESHOLD"; + return "UNKNOWN"; + } + /// @brief Converts from configStr to ConfigurationType + /// @param configStr Upper case string based configuration type. + /// Lower case is also valid but providing upper case is recommended. + static ConfigurationType convertFromString(const char* configStr) { + if ((strcmp(configStr, "ENABLED") == 0) || (strcmp(configStr, "enabled") == 0)) + return ConfigurationType::Enabled; + if ((strcmp(configStr, "TO_FILE") == 0) || (strcmp(configStr, "to_file") == 0)) + return ConfigurationType::ToFile; + if ((strcmp(configStr, "TO_STANDARD_OUTPUT") == 0) || (strcmp(configStr, "to_standard_output") == 0)) + return ConfigurationType::ToStandardOutput; + if ((strcmp(configStr, "FORMAT") == 0) || (strcmp(configStr, "format") == 0)) + return ConfigurationType::Format; + if ((strcmp(configStr, "FILENAME") == 0) || (strcmp(configStr, "filename") == 0)) + return ConfigurationType::Filename; + if ((strcmp(configStr, "MILLISECONDS_WIDTH") == 0) || (strcmp(configStr, "milliseconds_width") == 0)) + return ConfigurationType::MillisecondsWidth; + if ((strcmp(configStr, "PERFORMANCE_TRACKING") == 0) || (strcmp(configStr, "performance_tracking") == 0)) + return ConfigurationType::PerformanceTracking; + if ((strcmp(configStr, "MAX_LOG_FILE_SIZE") == 0) || (strcmp(configStr, "max_log_file_size") == 0)) + return ConfigurationType::MaxLogFileSize; + if ((strcmp(configStr, "LOG_FLUSH_THRESHOLD") == 0) || (strcmp(configStr, "log_flush_threshold") == 0)) + return ConfigurationType::LogFlushThreshold; + return ConfigurationType::Unknown; + } + /// @brief Applies specified function to each configuration type starting from startIndex + /// @param startIndex initial value to start the iteration from. This is passed by pointer and is left-shifted + /// so this can be used inside function (fn) to represent current configuration type. + /// @param fn function to apply with each configuration type. + /// This bool represent whether or not to stop iterating through configurations. + static inline void forEachConfigType(base::type::EnumType* startIndex, const std::function& fn) { + base::type::EnumType cIndexMax = ConfigurationTypeHelper::kMaxValid; + do { + if (fn()) { + break; + } + *startIndex = static_cast(*startIndex << 1); + } while (*startIndex <= cIndexMax); + } +}; +/// @brief Flags used while writing logs. This flags are set by user +enum class LoggingFlag : base::type::EnumType { + /// @brief Makes sure we have new line for each container log entry + NewLineForContainer = 1, + /// @brief Makes sure if -vmodule is used and does not specifies a module, then verbose + /// logging is allowed via that module. + AllowVerboseIfModuleNotSpecified = 2, + /// @brief When handling crashes by default, detailed crash reason will be logged as well + LogDetailedCrashReason = 4, + /// @brief Allows to disable application abortion when logged using FATAL level + DisableApplicationAbortOnFatalLog = 8, + /// @brief Flushes log with every log-entry (performance sensative) - Disabled by default + ImmediateFlush = 16, + /// @brief Enables strict file rolling + StrictLogFileSizeCheck = 32, + /// @brief Make terminal output colorful for supported terminals + ColoredTerminalOutput = 64, + /// @brief Supports use of multiple logging in same macro, e.g, CLOG(INFO, "default", "network") + MultiLoggerSupport = 128, + /// @brief Disables comparing performance tracker's checkpoints + DisablePerformanceTrackingCheckpointComparison = 256, + /// @brief Disable VModules + DisableVModules = 512, + /// @brief Disable VModules extensions + DisableVModulesExtensions = 1024, + /// @brief Enables hierarchical logging + HierarchicalLogging = 2048, + /// @brief Creates logger automatically when not available + CreateLoggerAutomatically = 4096, + /// @brief Adds spaces b/w logs that separated by left-shift operator + AutoSpacing = 8192, + /// @brief Preserves time format and does not convert it to sec, hour etc (performance tracking only) + FixedTimeFormat = 16384 +}; +namespace base { +/// @brief Namespace containing constants used internally. +namespace consts { + // Level log values - These are values that are replaced in place of %level format specifier + static const base::type::char_t* kInfoLevelLogValue = ELPP_LITERAL("INFO "); + static const base::type::char_t* kDebugLevelLogValue = ELPP_LITERAL("DEBUG"); + static const base::type::char_t* kWarningLevelLogValue = ELPP_LITERAL("WARN "); + static const base::type::char_t* kErrorLevelLogValue = ELPP_LITERAL("ERROR"); + static const base::type::char_t* kFatalLevelLogValue = ELPP_LITERAL("FATAL"); + static const base::type::char_t* kVerboseLevelLogValue = ELPP_LITERAL("VER"); + static const base::type::char_t* kTraceLevelLogValue = ELPP_LITERAL("TRACE"); + static const base::type::char_t* kInfoLevelShortLogValue = ELPP_LITERAL("I"); + static const base::type::char_t* kDebugLevelShortLogValue = ELPP_LITERAL("D"); + static const base::type::char_t* kWarningLevelShortLogValue = ELPP_LITERAL("W"); + static const base::type::char_t* kErrorLevelShortLogValue = ELPP_LITERAL("E"); + static const base::type::char_t* kFatalLevelShortLogValue = ELPP_LITERAL("F"); + static const base::type::char_t* kVerboseLevelShortLogValue = ELPP_LITERAL("V"); + static const base::type::char_t* kTraceLevelShortLogValue = ELPP_LITERAL("T"); + // Format specifiers - These are used to define log format + static const base::type::char_t* kAppNameFormatSpecifier = ELPP_LITERAL("%app"); + static const base::type::char_t* kLoggerIdFormatSpecifier = ELPP_LITERAL("%logger"); + static const base::type::char_t* kThreadIdFormatSpecifier = ELPP_LITERAL("%thread"); + static const base::type::char_t* kSeverityLevelFormatSpecifier = ELPP_LITERAL("%level"); + static const base::type::char_t* kSeverityLevelShortFormatSpecifier = ELPP_LITERAL("%levshort"); + static const base::type::char_t* kDateTimeFormatSpecifier = ELPP_LITERAL("%datetime"); + static const base::type::char_t* kLogFileFormatSpecifier = ELPP_LITERAL("%file"); + static const base::type::char_t* kLogFileBaseFormatSpecifier = ELPP_LITERAL("%fbase"); + static const base::type::char_t* kLogLineFormatSpecifier = ELPP_LITERAL("%line"); + static const base::type::char_t* kLogLocationFormatSpecifier = ELPP_LITERAL("%loc"); + static const base::type::char_t* kLogFunctionFormatSpecifier = ELPP_LITERAL("%func"); + static const base::type::char_t* kCurrentUserFormatSpecifier = ELPP_LITERAL("%user"); + static const base::type::char_t* kCurrentHostFormatSpecifier = ELPP_LITERAL("%host"); + static const base::type::char_t* kMessageFormatSpecifier = ELPP_LITERAL("%msg"); + static const base::type::char_t* kVerboseLevelFormatSpecifier = ELPP_LITERAL("%vlevel"); + static const char* kDateTimeFormatSpecifierForFilename = "%datetime"; + // Date/time + static const char* kDays[7] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; + static const char* kDaysAbbrev[7] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; + static const char* kMonths[12] = { "January", "February", "March", "Apri", "May", "June", "July", "August", + "September", "October", "November", "December" }; + static const char* kMonthsAbbrev[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; + static const char* kDefaultDateTimeFormat = "%Y-%M-%d %H:%m:%s,%g"; + static const char* kDefaultDateTimeFormatInFilename = "%Y-%M-%d_%H-%m"; + static const int kYearBase = 1900; + static const char* kAm = "AM"; + static const char* kPm = "PM"; + // Miscellaneous constants + static const char* kDefaultLoggerId = "default"; + static const char* kPerformanceLoggerId = "performance"; + static const char* kSysLogLoggerId = "syslog"; + static const char* kNullPointer = "nullptr"; + static const char kFormatSpecifierChar = '%'; +#if ELPP_VARIADIC_TEMPLATES_SUPPORTED + static const char kFormatSpecifierCharValue = 'v'; +#endif // ELPP_VARIADIC_TEMPLATES_SUPPORTED + static const unsigned int kMaxLogPerContainer = 100; + static const unsigned int kMaxLogPerCounter = 100000; + static const unsigned int kDefaultMillisecondsWidth = 3; + static const base::type::VerboseLevel kMaxVerboseLevel = 9; + static const char* kUnknownUser = "user"; + static const char* kUnknownHost = "unknown-host"; +#if defined(ELPP_DEFAULT_LOG_FILE) + static const char* kDefaultLogFile = ELPP_DEFAULT_LOG_FILE; +#else +# if ELPP_OS_UNIX +# if ELPP_OS_ANDROID + static const char* kDefaultLogFile = "logs/myeasylog.log"; +# else + static const char* kDefaultLogFile = "logs/myeasylog.log"; +# endif // ELPP_OS_ANDROID +# elif ELPP_OS_WINDOWS + static const char* kDefaultLogFile = "logs\\myeasylog.log"; +# endif // ELPP_OS_UNIX +#endif // defined(ELPP_DEFAULT_LOG_FILE) +#if !defined(ELPP_DISABLE_LOG_FILE_FROM_ARG) + static const char* kDefaultLogFileParam = "--default-log-file"; +#endif // !defined(ELPP_DISABLE_LOG_FILE_FROM_ARG) +#if defined(ELPP_LOGGING_FLAGS_FROM_ARG) + static const char* kLoggingFlagsParam = "--logging-flags"; +#endif // defined(ELPP_LOGGING_FLAGS_FROM_ARG) +#if ELPP_OS_WINDOWS + static const char* kFilePathSeperator = "\\"; +#else + static const char* kFilePathSeperator = "/"; +#endif // ELPP_OS_WINDOWS + static const char* kValidLoggerIdSymbols = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._"; + static const char* kConfigurationComment = "##"; + static const char* kConfigurationLevel = "*"; + static const char* kConfigurationLoggerId = "--"; + static const std::size_t kSourceFilenameMaxLength = 100; + static const std::size_t kSourceLineMaxLength = 10; + static const Level kPerformanceTrackerDefaultLevel = Level::Info; + const struct { + double value; + const base::type::char_t* unit; + } kTimeFormats[] = { + { 1000.0f, ELPP_LITERAL("mis") }, + { 1000.0f, ELPP_LITERAL("ms") }, + { 60.0f, ELPP_LITERAL("seconds") }, + { 60.0f, ELPP_LITERAL("minutes") }, + { 24.0f, ELPP_LITERAL("hours") }, + { 7.0f, ELPP_LITERAL("days") } + }; + static const int kTimeFormatsCount = sizeof(kTimeFormats) / sizeof(kTimeFormats[0]); + const struct { + int numb; + const char* name; + const char* brief; + const char* detail; + } kCrashSignals[] = { + // NOTE: Do not re-order, if you do please check CrashHandler(bool) constructor and CrashHandler::setHandler(..) + { SIGABRT, "SIGABRT", "Abnormal termination", + "Program was abnormally terminated." }, + { SIGFPE, "SIGFPE", "Erroneous arithmetic operation", + "Arithemetic operation issue such as division by zero or operation resulting in overflow." }, + { SIGILL, "SIGILL", "Illegal instruction", + "Generally due to a corruption in the code or to an attempt to execute data."}, + { SIGSEGV, "SIGSEGV", "Invalid access to memory", + "Program is trying to read an invalid (unallocated, deleted or corrupted) or inaccessible memory." }, + { SIGINT, "SIGINT", "Interactive attention signal", + "Interruption generated (generally) by user or operating system." }, + }; + static const int kCrashSignalsCount = sizeof(kCrashSignals) / sizeof(kCrashSignals[0]); +} // namespace consts +} // namespace base +typedef std::function PreRollOutCallback; +namespace base { +static inline void defaultPreRollOutCallback(const char*, std::size_t) {} +/// @brief Enum to represent timestamp unit +enum class TimestampUnit : base::type::EnumType { + Microsecond = 0, Millisecond = 1, Second = 2, Minute = 3, Hour = 4, Day = 5 +}; +/// @brief Format flags used to determine specifiers that are active for performance improvements. +enum class FormatFlags : base::type::EnumType { + DateTime = 1<<1, LoggerId = 1<<2, File = 1<<3, Line = 1<<4, Location = 1<<5, Function = 1<<6, + User = 1<<7, Host = 1<<8, LogMessage = 1<<9, VerboseLevel = 1<<10, AppName = 1<<11, ThreadId = 1<<12, + Level = 1<<13, FileBase = 1<<14, LevelShort = 1<<15 +}; +/// @brief A milliseconds width class containing actual width and offset for date/time +class MillisecondsWidth { +public: + MillisecondsWidth(void) { init(base::consts::kDefaultMillisecondsWidth); } + explicit MillisecondsWidth(int width) { init(width); } + bool operator==(const MillisecondsWidth& msWidth) { return m_width == msWidth.m_width && m_offset == msWidth.m_offset; } + int m_width; unsigned int m_offset; +private: + void init(int width) { + if (width < 1 || width > 6) { + width = base::consts::kDefaultMillisecondsWidth; + } + m_width = width; + switch (m_width) { + case 3: m_offset = 1000; break; + case 4: m_offset = 100; break; + case 5: m_offset = 10; break; + case 6: m_offset = 1; break; + default: m_offset = 1000; break; + } + } +}; +/// @brief Namespace containing utility functions/static classes used internally +namespace utils { +/// @brief Deletes memory safely and points to null +template +static inline +typename std::enable_if::value, void>::type +safeDelete(T*& pointer) { + if (pointer == nullptr) + return; + delete pointer; + pointer = nullptr; +} +/// @brief Gets value of const char* but if it is nullptr, a string nullptr is returned +static inline const char* charPtrVal(const char* pointer) { + return pointer == nullptr ? base::consts::kNullPointer : pointer; +} +/// @brief Aborts application due with user-defined status +static inline void abort(int status, const std::string& reason = std::string()) { + // Both status and reason params are there for debugging with tools like gdb etc + ELPP_UNUSED(status); + ELPP_UNUSED(reason); +#if defined(ELPP_COMPILER_MSVC) && defined(_M_IX86) && defined(_DEBUG) + // Ignore msvc critical error dialog - break instead (on debug mode) + _asm int 3 +#else + ::abort(); +#endif // defined(ELPP_COMPILER_MSVC) && defined(_M_IX86) && defined(_DEBUG) +} +/// @brief Bitwise operations for C++11 strong enum class. This casts e into Flag_T and returns value after bitwise operation +/// Use these function as

flag = bitwise::Or(MyEnum::val1, flag);
+namespace bitwise { +template +static inline base::type::EnumType And(Enum e, base::type::EnumType flag) { + return static_cast(flag) & static_cast(e); +} +template +static inline base::type::EnumType Not(Enum e, base::type::EnumType flag) { + return static_cast(flag) & ~(static_cast(e)); +} +template +static inline base::type::EnumType Or(Enum e, base::type::EnumType flag) { + return static_cast(flag) | static_cast(e); +} +} // namespace bitwise +template +static inline void addFlag(Enum e, base::type::EnumType* flag) { + *flag = base::utils::bitwise::Or(e, *flag); +} +template +static inline void removeFlag(Enum e, base::type::EnumType* flag) { + *flag = base::utils::bitwise::Not(e, *flag); +} +template +static inline bool hasFlag(Enum e, base::type::EnumType flag) { + return base::utils::bitwise::And(e, flag) > 0x0; +} +} // namespace utils +namespace threading { +#if ELPP_THREADING_ENABLED +# if !ELPP_USE_STD_THREADING +namespace internal { +/// @brief A mutex wrapper for compiler that dont yet support std::mutex +class Mutex : base::NoCopy { +public: + Mutex(void) { +# if ELPP_OS_UNIX + pthread_mutex_init(&m_underlyingMutex, nullptr); +# elif ELPP_OS_WINDOWS + InitializeCriticalSection(&m_underlyingMutex); +# endif // ELPP_OS_UNIX + } + + virtual ~Mutex(void) { +# if ELPP_OS_UNIX + pthread_mutex_destroy(&m_underlyingMutex); +# elif ELPP_OS_WINDOWS + DeleteCriticalSection(&m_underlyingMutex); +# endif // ELPP_OS_UNIX + } + + inline void lock(void) { +# if ELPP_OS_UNIX + pthread_mutex_lock(&m_underlyingMutex); +# elif ELPP_OS_WINDOWS + EnterCriticalSection(&m_underlyingMutex); +# endif // ELPP_OS_UNIX + } + + inline bool try_lock(void) { +# if ELPP_OS_UNIX + return (pthread_mutex_trylock(&m_underlyingMutex) == 0); +# elif ELPP_OS_WINDOWS + return TryEnterCriticalSection(&m_underlyingMutex); +# endif // ELPP_OS_UNIX + } + + inline void unlock(void) { +# if ELPP_OS_UNIX + pthread_mutex_unlock(&m_underlyingMutex); +# elif ELPP_OS_WINDOWS + LeaveCriticalSection(&m_underlyingMutex); +# endif // ELPP_OS_UNIX + } + +private: +# if ELPP_OS_UNIX + pthread_mutex_t m_underlyingMutex; +# elif ELPP_OS_WINDOWS + CRITICAL_SECTION m_underlyingMutex; +# endif // ELPP_OS_UNIX +}; +/// @brief Scoped lock for compiler that dont yet support std::lock_guard +template +class ScopedLock : base::NoCopy { +public: + explicit ScopedLock(M& mutex) { + m_mutex = &mutex; + m_mutex->lock(); + } + + virtual ~ScopedLock(void) { + m_mutex->unlock(); + } +private: + M* m_mutex; + ScopedLock(void); +}; +} // namespace internal +/// @brief Gets ID of currently running threading in windows systems. On unix, nothing is returned. +static inline std::string getCurrentThreadId(void) { + std::stringstream ss; +# if (ELPP_OS_WINDOWS) + ss << GetCurrentThreadId(); +# endif // (ELPP_OS_WINDOWS) + return ss.str(); +} +static inline void msleep(int) { + // No implementation for non std::thread version +} +typedef base::threading::internal::Mutex Mutex; +typedef base::threading::internal::ScopedLock ScopedLock; +# else +/// @brief Gets ID of currently running threading using std::this_thread::get_id() +static inline std::string getCurrentThreadId(void) { + std::stringstream ss; + ss << std::this_thread::get_id(); + return ss.str(); +} +static inline void msleep(int ms) { + // Only when async logging enabled - this is because async is strict on compiler +#if ELPP_ASYNC_LOGGING + std::this_thread::sleep_for(std::chrono::milliseconds(ms)); +#endif // ELPP_ASYNC_LOGGING +} +typedef std::mutex Mutex; +typedef std::lock_guard ScopedLock; +# endif // !ELPP_USE_STD_THREADING +#else +namespace internal { +/// @brief Mutex wrapper used when multi-threading is disabled. +class NoMutex : base::NoCopy { +public: + NoMutex(void) {} + inline void lock(void) {} + inline bool try_lock(void) { return true; } + inline void unlock(void) {} +}; +/// @brief Lock guard wrapper used when multi-threading is disabled. +template +class NoScopedLock : base::NoCopy { +public: + explicit NoScopedLock(Mutex&) { + } + virtual ~NoScopedLock(void) { + } +private: + NoScopedLock(void); +}; +} // namespace internal +static inline std::string getCurrentThreadId(void) { + return std::string(); +} +static inline void msleep(int) { + // No custom implementation +} +typedef base::threading::internal::NoMutex Mutex; +typedef base::threading::internal::NoScopedLock ScopedLock; +#endif // ELPP_THREADING_ENABLED +/// @brief Base of thread safe class, this class is inheritable-only +class ThreadSafe { +public: + virtual inline void acquireLock(void) ELPP_FINAL { m_mutex.lock(); } + virtual inline void releaseLock(void) ELPP_FINAL { m_mutex.unlock(); } + virtual inline base::threading::Mutex& lock(void) ELPP_FINAL { return m_mutex; } +protected: + ThreadSafe(void) {} + virtual ~ThreadSafe(void) {} +private: + base::threading::Mutex m_mutex; +}; +} // namespace threading +namespace utils { +class File : base::StaticClass { +public: + /// @brief Creates new out file stream for specified filename. + /// @return Pointer to newly created fstream or nullptr + static base::type::fstream_t* newFileStream(const std::string& filename) { + base::type::fstream_t *fs = new base::type::fstream_t(filename.c_str(), + base::type::fstream_t::out | base::type::fstream_t::app); +#if defined(ELPP_UNICODE) + std::locale elppUnicodeLocale(""); +#if ELPP_OS_WINDOWS + std::locale elppUnicodeLocaleWindows(elppUnicodeLocale, new std::codecvt_utf8_utf16); + elppUnicodeLocale = elppUnicodeLocaleWindows; +#endif + fs->imbue(elppUnicodeLocale); +#endif // defined(ELPP_UNICODE) + if (fs->is_open()) { + fs->flush(); + } else { + base::utils::safeDelete(fs); + ELPP_INTERNAL_ERROR("Bad file [" << filename << "]", true); + } + return fs; + } + + /// @brief Gets size of file provided in stream + static std::size_t getSizeOfFile(base::type::fstream_t* fs) { + if (fs == nullptr) { + return 0; + } + std::streampos currPos = fs->tellg(); + fs->seekg(0, fs->end); + std::size_t size = static_cast(fs->tellg()); + fs->seekg(currPos); + return size; + } + + /// @brief Determines whether or not provided path exist in current file system + static inline bool pathExists(const char* path, bool considerFile = false) { + if (path == nullptr) { + return false; + } +#if ELPP_OS_UNIX + ELPP_UNUSED(considerFile); + struct stat st; + return (stat(path, &st) == 0); +#elif ELPP_OS_WINDOWS + DWORD fileType = GetFileAttributesA(path); + if (fileType == INVALID_FILE_ATTRIBUTES) { + return false; + } + return considerFile ? true : ((fileType & FILE_ATTRIBUTE_DIRECTORY) == 0 ? false : true); +#endif // ELPP_OS_UNIX + } + + /// @brief Creates specified path on file system + /// @param path Path to create. + static bool createPath(const std::string& path) { + if (path.empty()) { + return false; + } + if (base::utils::File::pathExists(path.c_str())) { + return true; + } + int status = -1; + + char* currPath = const_cast(path.c_str()); + std::string builtPath = std::string(); +#if ELPP_OS_UNIX + if (path[0] == '/') { + builtPath = "/"; + } + currPath = STRTOK(currPath, base::consts::kFilePathSeperator, 0); +#elif ELPP_OS_WINDOWS + // Use secure functions API + char* nextTok_ = nullptr; + currPath = STRTOK(currPath, base::consts::kFilePathSeperator, &nextTok_); + ELPP_UNUSED(nextTok_); +#endif // ELPP_OS_UNIX + while (currPath != nullptr) { + builtPath.append(currPath); + builtPath.append(base::consts::kFilePathSeperator); +#if ELPP_OS_UNIX + status = mkdir(builtPath.c_str(), ELPP_LOG_PERMS); + currPath = STRTOK(nullptr, base::consts::kFilePathSeperator, 0); +#elif ELPP_OS_WINDOWS + status = _mkdir(builtPath.c_str()); + currPath = STRTOK(nullptr, base::consts::kFilePathSeperator, &nextTok_); +#endif // ELPP_OS_UNIX + } + if (status == -1) { + ELPP_INTERNAL_ERROR("Error while creating path [" << path << "]", true); + return false; + } + return true; + } + /// @brief Extracts path of filename with leading slash + static std::string extractPathFromFilename(const std::string& fullPath, + const char* seperator = base::consts::kFilePathSeperator) { + if ((fullPath == "") || (fullPath.find(seperator) == std::string::npos)) { + return fullPath; + } + std::size_t lastSlashAt = fullPath.find_last_of(seperator); + if (lastSlashAt == 0) { + return std::string(seperator); + } + return fullPath.substr(0, lastSlashAt + 1); + } + /// @brief builds stripped filename and puts it in buff + static void buildStrippedFilename(const char* filename, char buff[], + std::size_t limit = base::consts::kSourceFilenameMaxLength) { + std::size_t sizeOfFilename = strlen(filename); + if (sizeOfFilename >= limit) { + filename += (sizeOfFilename - limit); + if (filename[0] != '.' && filename[1] != '.') { // prepend if not already + filename += 3; // 3 = '..' + STRCAT(buff, "..", limit); + } + } + STRCAT(buff, filename, limit); + } + /// @brief builds base filename and puts it in buff + static void buildBaseFilename(const std::string& fullPath, char buff[], + std::size_t limit = base::consts::kSourceFilenameMaxLength, + const char* seperator = base::consts::kFilePathSeperator) { + const char *filename = fullPath.c_str(); + std::size_t lastSlashAt = fullPath.find_last_of(seperator); + filename += lastSlashAt ? lastSlashAt+1 : 0; + std::size_t sizeOfFilename = strlen(filename); + if (sizeOfFilename >= limit) { + filename += (sizeOfFilename - limit); + if (filename[0] != '.' && filename[1] != '.') { // prepend if not already + filename += 3; // 3 = '..' + STRCAT(buff, "..", limit); + } + } + STRCAT(buff, filename, limit); + } +}; +/// @brief String utilities helper class used internally. You should not use it. +class Str : base::StaticClass { +public: + /// @brief Checks if character is digit. Dont use libc implementation of it to prevent locale issues. + static inline bool isDigit(char c) { + return c >= '0' && c <= '9'; + } + + /// @brief Matches wildcards, '*' and '?' only supported. + static bool wildCardMatch(const char* str, const char* pattern) { + while (*pattern) { + switch (*pattern) { + case '?': + if (!*str) + return false; + ++str; + ++pattern; + break; + case '*': + if (wildCardMatch(str, pattern + 1)) + return true; + if (*str && wildCardMatch(str + 1, pattern)) + return true; + return false; + break; + default: + if (*str++ != *pattern++) + return false; + break; + } + } + return !*str && !*pattern; + } + + /// @brief Trims string from start + /// @param [in,out] str String to trim + static inline std::string& ltrim(std::string& str) { + str.erase(str.begin(), std::find_if(str.begin(), str.end(), std::not1(std::ptr_fun(&std::isspace)))); + return str; + } + + /// @brief Trim string from end + /// @param [in,out] str String to trim + static inline std::string& rtrim(std::string& str) { + str.erase(std::find_if(str.rbegin(), str.rend(), std::not1(std::ptr_fun(&std::isspace))).base(), str.end()); + return str; + } + + /// @brief Trims string from left and right + /// @param [in,out] str String to trim + static inline std::string& trim(std::string& str) { + return ltrim(rtrim(str)); + } + + /// @brief Determines whether or not str starts with specified string + /// @param str String to check + /// @param start String to check against + /// @return Returns true if starts with specified string, false otherwise + static inline bool startsWith(const std::string& str, const std::string& start) { + return (str.length() >= start.length()) && (str.compare(0, start.length(), start) == 0); + } + + /// @brief Determines whether or not str ends with specified string + /// @param str String to check + /// @param end String to check against + /// @return Returns true if ends with specified string, false otherwise + static inline bool endsWith(const std::string& str, const std::string& end) { + return (str.length() >= end.length()) && (str.compare(str.length() - end.length(), end.length(), end) == 0); + } + + /// @brief Replaces all instances of replaceWhat with 'replaceWith'. Original variable is changed for performance. + /// @param [in,out] str String to replace from + /// @param replaceWhat Character to replace + /// @param replaceWith Character to replace with + /// @return Modified version of str + static inline std::string& replaceAll(std::string& str, char replaceWhat, char replaceWith) { + std::replace(str.begin(), str.end(), replaceWhat, replaceWith); + return str; + } + + /// @brief Replaces all instances of 'replaceWhat' with 'replaceWith'. (String version) Replaces in place + /// @param str String to replace from + /// @param replaceWhat Character to replace + /// @param replaceWith Character to replace with + /// @return Modified (original) str + static inline std::string& replaceAll(std::string& str, const std::string& replaceWhat, // NOLINT + const std::string& replaceWith) { + if (replaceWhat == replaceWith) + return str; + std::size_t foundAt = std::string::npos; + while ((foundAt = str.find(replaceWhat, foundAt + 1)) != std::string::npos) { + str.replace(foundAt, replaceWhat.length(), replaceWith); + } + return str; + } + + static void replaceFirstWithEscape(base::type::string_t& str, const base::type::string_t& replaceWhat, // NOLINT + const base::type::string_t& replaceWith) { + std::size_t foundAt = base::type::string_t::npos; + while ((foundAt = str.find(replaceWhat, foundAt + 1)) != base::type::string_t::npos) { + if (foundAt > 0 && str[foundAt - 1] == base::consts::kFormatSpecifierChar) { + str.erase(foundAt > 0 ? foundAt - 1 : 0, 1); + ++foundAt; + } else { + str.replace(foundAt, replaceWhat.length(), replaceWith); + return; + } + } + } +#if defined(ELPP_UNICODE) + static void replaceFirstWithEscape(base::type::string_t& str, const base::type::string_t& replaceWhat, // NOLINT + const std::string& replaceWith) { + replaceFirstWithEscape(str, replaceWhat, base::type::string_t(replaceWith.begin(), replaceWith.end())); + } +#endif // defined(ELPP_UNICODE) + /// @brief Converts string to uppercase + /// @param str String to convert + /// @return Uppercase string + static inline std::string& toUpper(std::string& str) { + std::transform(str.begin(), str.end(), str.begin(), ::toupper); + return str; + } + + /// @brief Compares cstring equality - uses strcmp + static inline bool cStringEq(const char* s1, const char* s2) { + if (s1 == nullptr && s2 == nullptr) return true; + if (s1 == nullptr || s2 == nullptr) return false; + return strcmp(s1, s2) == 0; + } + + /// @brief Compares cstring equality (case-insensitive) - uses toupper(char) + /// Dont use strcasecmp because of CRT (VC++) + static bool cStringCaseEq(const char* s1, const char* s2) { + if (s1 == nullptr && s2 == nullptr) return true; + if (s1 == nullptr || s2 == nullptr) return false; + if (strlen(s1) != strlen(s2)) return false; + while (*s1 != '\0' && *s2 != '\0') { + if (::toupper(*s1) != ::toupper(*s2)) return false; + ++s1; + ++s2; + } + return true; + } + + /// @brief Returns true if c exist in str + static inline bool contains(const char* str, char c) { + for (; *str; ++str) { + if (*str == c) + return true; + } + return false; + } + + static inline char* convertAndAddToBuff(std::size_t n, int len, char* buf, const char* bufLim, bool zeroPadded = true) { + char localBuff[10] = ""; + char* p = localBuff + sizeof(localBuff) - 2; + if (n > 0) { + for (; n > 0 && p > localBuff && len > 0; n /= 10, --len) + *--p = static_cast(n % 10 + '0'); + } else { + *--p = '0'; + --len; + } + if (zeroPadded) + while (p > localBuff && len-- > 0) *--p = static_cast('0'); + return addToBuff(p, buf, bufLim); + } + + static inline char* addToBuff(const char* str, char* buf, const char* bufLim) { + while ((buf < bufLim) && ((*buf = *str++) != '\0')) + ++buf; + return buf; + } + + static inline char* clearBuff(char buff[], std::size_t lim) { + STRCPY(buff, "", lim); + ELPP_UNUSED(lim); // For *nix we dont have anything using lim in above STRCPY macro + return buff; + } + + /// @brief Converst wchar* to char* + /// NOTE: Need to free return value after use! + static char* wcharPtrToCharPtr(const wchar_t* line) { + std::size_t len_ = wcslen(line) + 1; + char* buff_ = static_cast(malloc(len_ + 1)); +# if ELPP_OS_UNIX || (ELPP_OS_WINDOWS && !ELPP_CRT_DBG_WARNINGS) + std::wcstombs(buff_, line, len_); +# elif ELPP_OS_WINDOWS + std::size_t convCount_ = 0; + mbstate_t mbState_; + ::memset(static_cast(&mbState_), 0, sizeof(mbState_)); + wcsrtombs_s(&convCount_, buff_, len_, &line, len_, &mbState_); +# endif // ELPP_OS_UNIX || (ELPP_OS_WINDOWS && !ELPP_CRT_DBG_WARNINGS) + return buff_; + } +}; +/// @brief Operating System helper static class used internally. You should not use it. +class OS : base::StaticClass { +public: +#if ELPP_OS_WINDOWS + /// @brief Gets environment variables for Windows based OS. + /// We are not using getenv(const char*) because of CRT deprecation + /// @param varname Variable name to get environment variable value for + /// @return If variable exist the value of it otherwise nullptr + static const char* getWindowsEnvironmentVariable(const char* varname) { + const DWORD bufferLen = 50; + static char buffer[bufferLen]; + if (GetEnvironmentVariableA(varname, buffer, bufferLen)) { + return buffer; + } + return nullptr; + } +#endif // ELPP_OS_WINDOWS +#if ELPP_OS_ANDROID + /// @brief Reads android property value + static inline std::string getProperty(const char* prop) { + char propVal[PROP_VALUE_MAX + 1]; + int ret = __system_property_get(prop, propVal); + return ret == 0 ? std::string() : std::string(propVal); + } + + /// @brief Reads android device name + static std::string getDeviceName(void) { + std::stringstream ss; + std::string manufacturer = getProperty("ro.product.manufacturer"); + std::string model = getProperty("ro.product.model"); + if (manufacturer.empty() || model.empty()) { + return std::string(); + } + ss << manufacturer << "-" << model; + return ss.str(); + } +#endif // ELPP_OS_ANDROID + + /// @brief Runs command on terminal and returns the output. + /// + /// @detail This is applicable only on unix based systems, for all other OS, an empty string is returned. + /// @param command Bash command + /// @return Result of bash output or empty string if no result found. + static const std::string getBashOutput(const char* command) { +#if (ELPP_OS_UNIX && !ELPP_OS_ANDROID && !ELPP_CYGWIN) + if (command == nullptr) { + return std::string(); + } + FILE* proc = nullptr; + if ((proc = popen(command, "r")) == nullptr) { + ELPP_INTERNAL_ERROR("\nUnable to run command [" << command << "]", true); + return std::string(); + } + char hBuff[4096]; + if (fgets(hBuff, sizeof(hBuff), proc) != nullptr) { + pclose(proc); + if (hBuff[strlen(hBuff) - 1] == '\n') { + hBuff[strlen(hBuff) - 1] = '\0'; + } + return std::string(hBuff); + } + return std::string(); +#else + ELPP_UNUSED(command); + return std::string(); +#endif // (ELPP_OS_UNIX && !ELPP_OS_ANDROID && !ELPP_CYGWIN) + } + + /// @brief Gets environment variable. This is cross-platform and CRT safe (for VC++) + /// @param variableName Environment variable name + /// @param defaultVal If no environment variable or value found the value to return by default + /// @param alternativeBashCommand If environment variable not found what would be alternative bash command + /// in order to look for value user is looking for. E.g, for 'user' alternative command will 'whoami' + static std::string getEnvironmentVariable(const char* variableName, const char* defaultVal, const char* alternativeBashCommand = nullptr) { +#if ELPP_OS_UNIX + const char* val = getenv(variableName); +#elif ELPP_OS_WINDOWS + const char* val = getWindowsEnvironmentVariable(variableName); +#endif // ELPP_OS_UNIX + if ((val == nullptr) || ((strcmp(val, "") == 0))) { +#if ELPP_OS_UNIX && defined(ELPP_FORCE_ENV_VAR_FROM_BASH) + // Try harder on unix-based systems + std::string valBash = base::utils::OS::getBashOutput(alternativeBashCommand); + if (valBash.empty()) { + return std::string(defaultVal); + } else { + return valBash; + } +#elif ELPP_OS_WINDOWS || ELPP_OS_UNIX + ELPP_UNUSED(alternativeBashCommand); + return std::string(defaultVal); +#endif // ELPP_OS_UNIX && defined(ELPP_FORCE_ENV_VAR_FROM_BASH) + } + return std::string(val); + } + /// @brief Gets current username. + static inline std::string currentUser(void) { +#if ELPP_OS_UNIX && !ELPP_OS_ANDROID + return getEnvironmentVariable("USER", base::consts::kUnknownUser, "whoami"); +#elif ELPP_OS_WINDOWS + return getEnvironmentVariable("USERNAME", base::consts::kUnknownUser); +#elif ELPP_OS_ANDROID + ELPP_UNUSED(base::consts::kUnknownUser); + return std::string("android"); +#else + return std::string(); +#endif // ELPP_OS_UNIX && !ELPP_OS_ANDROID + } + + /// @brief Gets current host name or computer name. + /// + /// @detail For android systems this is device name with its manufacturer and model seperated by hyphen + static inline std::string currentHost(void) { +#if ELPP_OS_UNIX && !ELPP_OS_ANDROID + return getEnvironmentVariable("HOSTNAME", base::consts::kUnknownHost, "hostname"); +#elif ELPP_OS_WINDOWS + return getEnvironmentVariable("COMPUTERNAME", base::consts::kUnknownHost); +#elif ELPP_OS_ANDROID + ELPP_UNUSED(base::consts::kUnknownHost); + return getDeviceName(); +#else + return std::string(); +#endif // ELPP_OS_UNIX && !ELPP_OS_ANDROID + } + /// @brief Whether or not terminal supports colors + static inline bool termSupportsColor(void) { + std::string term = getEnvironmentVariable("TERM", ""); + return term == "xterm" || term == "xterm-color" || term == "xterm-256color" || + term == "screen" || term == "linux" || term == "cygwin"; + } +}; +extern std::string s_currentUser; +extern std::string s_currentHost; +extern bool s_termSupportsColor; +#define ELPP_INITI_BASIC_DECLR \ + namespace el {\ + namespace base {\ + namespace utils {\ + std::string s_currentUser = el::base::utils::OS::currentUser(); \ + std::string s_currentHost = el::base::utils::OS::currentHost(); \ + bool s_termSupportsColor = el::base::utils::OS::termSupportsColor(); \ + }\ + }\ + } +/// @brief Contains utilities for cross-platform date/time. This class make use of el::base::utils::Str +class DateTime : base::StaticClass { +public: + /// @brief Cross platform gettimeofday for Windows and unix platform. This can be used to determine current millisecond. + /// + /// @detail For unix system it uses gettimeofday(timeval*, timezone*) and for Windows, a seperate implementation is provided + /// @param [in,out] tv Pointer that gets updated + static void gettimeofday(struct timeval* tv) { +#if ELPP_OS_WINDOWS + if (tv != nullptr) { +# if ELPP_COMPILER_MSVC || defined(_MSC_EXTENSIONS) + const unsigned __int64 delta_ = 11644473600000000Ui64; +# else + const unsigned __int64 delta_ = 11644473600000000ULL; +# endif // ELPP_COMPILER_MSVC || defined(_MSC_EXTENSIONS) + const double secOffSet = 0.000001; + const unsigned long usecOffSet = 1000000; + FILETIME fileTime; + GetSystemTimeAsFileTime(&fileTime); + unsigned __int64 present = 0; + present |= fileTime.dwHighDateTime; + present = present << 32; + present |= fileTime.dwLowDateTime; + present /= 10; // mic-sec + // Subtract the difference + present -= delta_; + tv->tv_sec = static_cast(present * secOffSet); + tv->tv_usec = static_cast(present % usecOffSet); + } +#else + ::gettimeofday(tv, nullptr); +#endif // ELPP_OS_WINDOWS + } + + /// @brief Gets current date and time with milliseconds. + /// @param format User provided date/time format + /// @param msWidth A pointer to base::MillisecondsWidth from configuration (non-null) + /// @returns string based date time in specified format. + static inline std::string getDateTime(const char* format, const base::MillisecondsWidth* msWidth) { + struct timeval currTime; + gettimeofday(&currTime); + struct ::tm timeInfo; + buildTimeInfo(&currTime, &timeInfo); + const int kBuffSize = 30; + char buff_[kBuffSize] = ""; + parseFormat(buff_, kBuffSize, format, &timeInfo, static_cast(currTime.tv_usec / msWidth->m_offset), msWidth); + return std::string(buff_); + } + + /// @brief Formats time to get unit accordingly, units like second if > 1000 or minutes if > 60000 etc + static base::type::string_t formatTime(unsigned long long time, base::TimestampUnit timestampUnit) { + double result = static_cast(time); + base::type::EnumType start = static_cast(timestampUnit); + const base::type::char_t* unit = base::consts::kTimeFormats[start].unit; + for (base::type::EnumType i = start; i < base::consts::kTimeFormatsCount - 1; ++i) { + if (result <= base::consts::kTimeFormats[i].value) { + break; + } + result /= base::consts::kTimeFormats[i].value; + unit = base::consts::kTimeFormats[i + 1].unit; + } + base::type::stringstream_t ss; + ss << result << " " << unit; + return ss.str(); + } + + /// @brief Gets time difference in milli/micro second depending on timestampUnit + static inline unsigned long long getTimeDifference(const struct timeval& endTime, const struct timeval& startTime, base::TimestampUnit timestampUnit) { + if (timestampUnit == base::TimestampUnit::Microsecond) { + return static_cast(static_cast(1000000 * endTime.tv_sec + endTime.tv_usec) - + static_cast(1000000 * startTime.tv_sec + startTime.tv_usec)); + } else { + return static_cast((((endTime.tv_sec - startTime.tv_sec) * 1000000) + (endTime.tv_usec - startTime.tv_usec)) / 1000); + } + } + +private: + static inline struct ::tm* buildTimeInfo(struct timeval* currTime, struct ::tm* timeInfo) { +#if ELPP_OS_UNIX + time_t rawTime = currTime->tv_sec; + ::localtime_r(&rawTime, timeInfo); + return timeInfo; +#else +# if ELPP_COMPILER_MSVC + ELPP_UNUSED(currTime); + time_t t; + _time64(&t); + localtime_s(timeInfo, &t); + return timeInfo; +# else + // For any other compilers that don't have CRT warnings issue e.g, MinGW or TDM GCC- we use different method + time_t rawTime = currTime->tv_sec; + struct tm* tmInf = localtime(&rawTime); + *timeInfo = *tmInf; + return timeInfo; +# endif // ELPP_COMPILER_MSVC +#endif // ELPP_OS_UNIX + } + static char* parseFormat(char* buf, std::size_t bufSz, const char* format, const struct tm* tInfo, + std::size_t msec, const base::MillisecondsWidth* msWidth) { + const char* bufLim = buf + bufSz; + for (; *format; ++format) { + if (*format == base::consts::kFormatSpecifierChar) { + switch (*++format) { + case base::consts::kFormatSpecifierChar: // Escape + break; + case '\0': // End + --format; + break; + case 'd': // Day + buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_mday, 2, buf, bufLim); + continue; + case 'a': // Day of week (short) + buf = base::utils::Str::addToBuff(base::consts::kDaysAbbrev[tInfo->tm_wday], buf, bufLim); + continue; + case 'A': // Day of week (long) + buf = base::utils::Str::addToBuff(base::consts::kDays[tInfo->tm_wday], buf, bufLim); + continue; + case 'M': // month + buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_mon + 1, 2, buf, bufLim); + continue; + case 'b': // month (short) + buf = base::utils::Str::addToBuff(base::consts::kMonthsAbbrev[tInfo->tm_mon], buf, bufLim); + continue; + case 'B': // month (long) + buf = base::utils::Str::addToBuff(base::consts::kMonths[tInfo->tm_mon], buf, bufLim); + continue; + case 'y': // year (two digits) + buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_year + base::consts::kYearBase, 2, buf, bufLim); + continue; + case 'Y': // year (four digits) + buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_year + base::consts::kYearBase, 4, buf, bufLim); + continue; + case 'h': // hour (12-hour) + buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_hour % 12, 2, buf, bufLim); + continue; + case 'H': // hour (24-hour) + buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_hour, 2, buf, bufLim); + continue; + case 'm': // minute + buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_min, 2, buf, bufLim); + continue; + case 's': // second + buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_sec, 2, buf, bufLim); + continue; + case 'z': // milliseconds + case 'g': + buf = base::utils::Str::convertAndAddToBuff(msec, msWidth->m_width, buf, bufLim); + continue; + case 'F': // AM/PM + buf = base::utils::Str::addToBuff((tInfo->tm_hour >= 12) ? base::consts::kPm : base::consts::kAm, buf, bufLim); + continue; + default: + continue; + } + } + if (buf == bufLim) break; + *buf++ = *format; + } + return buf; + } +}; +/// @brief Command line arguments for application if specified using el::Helpers::setArgs(..) or START_EASYLOGGINGPP(..) +class CommandLineArgs { +public: + CommandLineArgs(void) { + setArgs(0, static_cast(nullptr)); + } + CommandLineArgs(int argc, const char** argv) { + setArgs(argc, argv); + } + CommandLineArgs(int argc, char** argv) { + setArgs(argc, argv); + } + virtual ~CommandLineArgs(void) {} + /// @brief Sets arguments and parses them + inline void setArgs(int argc, const char** argv) { + setArgs(argc, const_cast(argv)); + } + /// @brief Sets arguments and parses them + inline void setArgs(int argc, char** argv) { + m_params.clear(); + m_paramsWithValue.clear(); + if (argc == 0 || argv == nullptr) { + return; + } + m_argc = argc; + m_argv = argv; + for (int i = 1; i < m_argc; ++i) { + const char* v = (strstr(m_argv[i], "=")); + if (v != nullptr && strlen(v) > 0) { + std::string key = std::string(m_argv[i]); + key = key.substr(0, key.find_first_of('=')); + if (hasParamWithValue(key.c_str())) { + ELPP_INTERNAL_INFO(1, "Skipping [" << key << "] arg since it already has value [" + << getParamValue(key.c_str()) << "]"); + } else { + m_paramsWithValue.insert(std::make_pair(key, std::string(v + 1))); + } + } + if (v == nullptr) { + if (hasParam(m_argv[i])) { + ELPP_INTERNAL_INFO(1, "Skipping [" << m_argv[i] << "] arg since it already exists"); + } else { + m_params.push_back(std::string(m_argv[i])); + } + } + } + } + /// @brief Returns true if arguments contain paramKey with a value (seperated by '=') + inline bool hasParamWithValue(const char* paramKey) const { + return m_paramsWithValue.find(std::string(paramKey)) != m_paramsWithValue.end(); + } + /// @brief Returns value of arguments + /// @see hasParamWithValue(const char*) + inline const char* getParamValue(const char* paramKey) const { + return m_paramsWithValue.find(std::string(paramKey))->second.c_str(); + } + /// @brief Return true if arguments has a param (not having a value) i,e without '=' + inline bool hasParam(const char* paramKey) const { + return std::find(m_params.begin(), m_params.end(), std::string(paramKey)) != m_params.end(); + } + /// @brief Returns true if no params available. This exclude argv[0] + inline bool empty(void) const { + return m_params.empty() && m_paramsWithValue.empty(); + } + /// @brief Returns total number of arguments. This exclude argv[0] + inline std::size_t size(void) const { + return m_params.size() + m_paramsWithValue.size(); + } + inline friend base::type::ostream_t& operator<<(base::type::ostream_t& os, const CommandLineArgs& c) { + for (int i = 1; i < c.m_argc; ++i) { + os << ELPP_LITERAL("[") << c.m_argv[i] << ELPP_LITERAL("]"); + if (i < c.m_argc - 1) { + os << ELPP_LITERAL(" "); + } + } + return os; + } + +private: + int m_argc; + char** m_argv; + std::map m_paramsWithValue; + std::vector m_params; +}; +/// @brief Abstract registry (aka repository) that provides basic interface for pointer repository specified by T_Ptr type. +/// +/// @detail Most of the functions are virtual final methods but anything implementing this abstract class should implement +/// unregisterAll() and deepCopy(const AbstractRegistry&) and write registerNew() method according to container +/// and few more methods; get() to find element, unregister() to unregister single entry. +/// Please note that this is thread-unsafe and should also implement thread-safety mechanisms in implementation. +template +class AbstractRegistry : public base::threading::ThreadSafe { +public: + typedef typename Container::iterator iterator; + typedef typename Container::const_iterator const_iterator; + + /// @brief Default constructor + AbstractRegistry(void) {} + + /// @brief Move constructor that is useful for base classes + AbstractRegistry(AbstractRegistry&& sr) { + if (this == &sr) { + return; + } + unregisterAll(); + m_list = std::move(sr.m_list); + } + + bool operator==(const AbstractRegistry& other) { + if (size() != other.size()) { + return false; + } + for (std::size_t i = 0; i < m_list.size(); ++i) { + if (m_list.at(i) != other.m_list.at(i)) { + return false; + } + } + return true; + } + + bool operator!=(const AbstractRegistry& other) { + if (size() != other.size()) { + return true; + } + for (std::size_t i = 0; i < m_list.size(); ++i) { + if (m_list.at(i) != other.m_list.at(i)) { + return true; + } + } + return false; + } + + /// @brief Assignment move operator + AbstractRegistry& operator=(AbstractRegistry&& sr) { + if (this == &sr) { + return *this; + } + unregisterAll(); + m_list = std::move(sr.m_list); + return *this; + } + + virtual ~AbstractRegistry(void) { + } + + /// @return Iterator pointer from start of repository + virtual inline iterator begin(void) ELPP_FINAL { + return m_list.begin(); + } + + /// @return Iterator pointer from end of repository + virtual inline iterator end(void) ELPP_FINAL { + return m_list.end(); + } + + + /// @return Constant iterator pointer from start of repository + virtual inline const_iterator cbegin(void) const ELPP_FINAL { + return m_list.cbegin(); + } + + /// @return End of repository + virtual inline const_iterator cend(void) const ELPP_FINAL { + return m_list.cend(); + } + + /// @return Whether or not repository is empty + virtual inline bool empty(void) const ELPP_FINAL { + return m_list.empty(); + } + + /// @return Size of repository + virtual inline std::size_t size(void) const ELPP_FINAL { + return m_list.size(); + } + + /// @brief Returns underlying container by reference + virtual inline Container& list(void) ELPP_FINAL { + return m_list; + } + + /// @brief Returns underlying container by constant reference. + virtual inline const Container& list(void) const ELPP_FINAL { + return m_list; + } + + /// @brief Unregisters all the pointers from current repository. + virtual void unregisterAll(void) = 0; + +protected: + virtual void deepCopy(const AbstractRegistry&) = 0; + void reinitDeepCopy(const AbstractRegistry& sr) { + unregisterAll(); + deepCopy(sr); + } + +private: + Container m_list; +}; + +/// @brief A pointer registry mechanism to manage memory and provide search functionalities. (non-predicate version) +/// +/// @detail NOTE: This is thread-unsafe implementation (although it contains lock function, it does not use these functions) +/// of AbstractRegistry. Any implementation of this class should be +/// explicitly (by using lock functions) +template +class Registry : public AbstractRegistry> { +public: + typedef typename Registry::iterator iterator; + typedef typename Registry::const_iterator const_iterator; + + Registry(void) {} + + /// @brief Copy constructor that is useful for base classes. Try to avoid this constructor, use move constructor. + Registry(const Registry& sr) : AbstractRegistry>() { + if (this == &sr) { + return; + } + this->reinitDeepCopy(sr); + } + + /// @brief Assignment operator that unregisters all the existing registeries and deeply copies each of repo element + /// @see unregisterAll() + /// @see deepCopy(const AbstractRegistry&) + Registry& operator=(const Registry& sr) { + if (this == &sr) { + return *this; + } + this->reinitDeepCopy(sr); + return *this; + } + + virtual ~Registry(void) { + unregisterAll(); + } + +protected: + virtual inline void unregisterAll(void) ELPP_FINAL { + if (!this->empty()) { + for (auto&& curr : this->list()) { + base::utils::safeDelete(curr.second); + } + this->list().clear(); + } + } + + /// @brief Registers new registry to repository. + virtual inline void registerNew(const T_Key& uniqKey, T_Ptr* ptr) ELPP_FINAL { + unregister(uniqKey); + this->list().insert(std::make_pair(uniqKey, ptr)); + } + + /// @brief Unregisters single entry mapped to specified unique key + inline void unregister(const T_Key& uniqKey) { + T_Ptr* existing = get(uniqKey); + if (existing != nullptr) { + base::utils::safeDelete(existing); + this->list().erase(uniqKey); + } + } + + /// @brief Gets pointer from repository. If none found, nullptr is returned. + inline T_Ptr* get(const T_Key& uniqKey) { + iterator it = this->list().find(uniqKey); + return it == this->list().end() + ? nullptr + : it->second; + } + +private: + virtual inline void deepCopy(const AbstractRegistry>& sr) ELPP_FINAL { + for (const_iterator it = sr.cbegin(); it != sr.cend(); ++it) { + registerNew(it->first, new T_Ptr(*it->second)); + } + } +}; + +/// @brief A pointer registry mechanism to manage memory and provide search functionalities. (predicate version) +/// +/// @detail NOTE: This is thread-unsafe implementation of AbstractRegistry. Any implementation of this class +/// should be made thread-safe explicitly +template +class RegistryWithPred : public AbstractRegistry> { +public: + typedef typename RegistryWithPred::iterator iterator; + typedef typename RegistryWithPred::const_iterator const_iterator; + + RegistryWithPred(void) { + } + + virtual ~RegistryWithPred(void) { + unregisterAll(); + } + + /// @brief Copy constructor that is useful for base classes. Try to avoid this constructor, use move constructor. + RegistryWithPred(const RegistryWithPred& sr) : AbstractRegistry>() { + if (this == &sr) { + return; + } + this->reinitDeepCopy(sr); + } + + /// @brief Assignment operator that unregisters all the existing registeries and deeply copies each of repo element + /// @see unregisterAll() + /// @see deepCopy(const AbstractRegistry&) + RegistryWithPred& operator=(const RegistryWithPred& sr) { + if (this == &sr) { + return *this; + } + this->reinitDeepCopy(sr); + return *this; + } + + friend inline base::type::ostream_t& operator<<(base::type::ostream_t& os, const RegistryWithPred& sr) { + for (const_iterator it = sr.list().begin(); it != sr.list().end(); ++it) { + os << ELPP_LITERAL(" ") << **it << ELPP_LITERAL("\n"); + } + return os; + } + +protected: + virtual inline void unregisterAll(void) ELPP_FINAL { + if (!this->empty()) { + for (auto&& curr : this->list()) { + base::utils::safeDelete(curr); + } + this->list().clear(); + } + } + + virtual void unregister(T_Ptr*& ptr) ELPP_FINAL { + if (ptr) { + iterator iter = this->begin(); + for (; iter != this->end(); ++iter) { + if (ptr == *iter) { + break; + } + } + if (iter != this->end() && *iter != nullptr) { + this->list().erase(iter); + base::utils::safeDelete(*iter); + } + } + } + + virtual inline void registerNew(T_Ptr* ptr) ELPP_FINAL { + this->list().push_back(ptr); + } + + /// @brief Gets pointer from repository with speicifed arguments. Arguments are passed to predicate + /// in order to validate pointer. + template + inline T_Ptr* get(const T& arg1, const T2 arg2) { + iterator iter = std::find_if(this->list().begin(), this->list().end(), Pred(arg1, arg2)); + if (iter != this->list().end() && *iter != nullptr) { + return *iter; + } + return nullptr; + } + +private: + virtual inline void deepCopy(const AbstractRegistry>& sr) { + for (const_iterator it = sr.list().begin(); it != sr.list().end(); ++it) { + registerNew(new T_Ptr(**it)); + } + } +}; + +} // namespace utils +} // namespace base +/// @brief Base of Easylogging++ friendly class +/// +/// @detail After inheriting this class publicly, implement pure-virtual function `void log(std::ostream&) const` +class Loggable { +public: + virtual ~Loggable(void) {} + virtual void log(el::base::type::ostream_t&) const = 0; +private: + friend inline el::base::type::ostream_t& operator<<(el::base::type::ostream_t& os, const Loggable& loggable) { + loggable.log(os); + return os; + } +}; +namespace base { +/// @brief Represents log format containing flags and date format. This is used internally to start initial log +class LogFormat : public Loggable { +public: + LogFormat(void) : + m_level(Level::Unknown), + m_userFormat(base::type::string_t()), + m_format(base::type::string_t()), + m_dateTimeFormat(std::string()), + m_flags(0x0) { + } + + LogFormat(Level level, const base::type::string_t& format) + : m_level(level), m_userFormat(format) { + parseFromFormat(m_userFormat); + } + + LogFormat(const LogFormat& logFormat) { + m_level = logFormat.m_level; + m_userFormat = logFormat.m_userFormat; + m_format = logFormat.m_format; + m_dateTimeFormat = logFormat.m_dateTimeFormat; + m_flags = logFormat.m_flags; + } + + LogFormat(LogFormat&& logFormat) { + m_level = std::move(logFormat.m_level); + m_userFormat = std::move(logFormat.m_userFormat); + m_format = std::move(logFormat.m_format); + m_dateTimeFormat = std::move(logFormat.m_dateTimeFormat); + m_flags = std::move(logFormat.m_flags); + } + + LogFormat& operator=(const LogFormat& logFormat) { + m_level = logFormat.m_level; + m_userFormat = logFormat.m_userFormat; + m_dateTimeFormat = logFormat.m_dateTimeFormat; + m_flags = logFormat.m_flags; + return *this; + } + + virtual ~LogFormat(void) { + } + + inline bool operator==(const LogFormat& other) { + return m_level == other.m_level && m_userFormat == other.m_userFormat && m_format == other.m_format && + m_dateTimeFormat == other.m_dateTimeFormat && m_flags == other.m_flags; + } + + /// @brief Updates format to be used while logging. + /// @param userFormat User provided format + void parseFromFormat(const base::type::string_t& userFormat) { + // We make copy because we will be changing the format + // i.e, removing user provided date format from original format + // and then storing it. + base::type::string_t formatCopy = userFormat; + m_flags = 0x0; + auto conditionalAddFlag = [&](const base::type::char_t* specifier, base::FormatFlags flag) { + std::size_t foundAt = base::type::string_t::npos; + while ((foundAt = formatCopy.find(specifier, foundAt + 1)) != base::type::string_t::npos){ + if (foundAt > 0 && formatCopy[foundAt - 1] == base::consts::kFormatSpecifierChar) { + if (hasFlag(flag)) { + // If we already have flag we remove the escape chars so that '%%' is turned to '%' + // even after specifier resolution - this is because we only replaceFirst specifier + formatCopy.erase(foundAt > 0 ? foundAt - 1 : 0, 1); + ++foundAt; + } + } else { + if (!hasFlag(flag)) addFlag(flag); + } + } + }; + conditionalAddFlag(base::consts::kAppNameFormatSpecifier, base::FormatFlags::AppName); + conditionalAddFlag(base::consts::kSeverityLevelFormatSpecifier, base::FormatFlags::Level); + conditionalAddFlag(base::consts::kSeverityLevelShortFormatSpecifier, base::FormatFlags::LevelShort); + conditionalAddFlag(base::consts::kLoggerIdFormatSpecifier, base::FormatFlags::LoggerId); + conditionalAddFlag(base::consts::kThreadIdFormatSpecifier, base::FormatFlags::ThreadId); + conditionalAddFlag(base::consts::kLogFileFormatSpecifier, base::FormatFlags::File); + conditionalAddFlag(base::consts::kLogFileBaseFormatSpecifier, base::FormatFlags::FileBase); + conditionalAddFlag(base::consts::kLogLineFormatSpecifier, base::FormatFlags::Line); + conditionalAddFlag(base::consts::kLogLocationFormatSpecifier, base::FormatFlags::Location); + conditionalAddFlag(base::consts::kLogFunctionFormatSpecifier, base::FormatFlags::Function); + conditionalAddFlag(base::consts::kCurrentUserFormatSpecifier, base::FormatFlags::User); + conditionalAddFlag(base::consts::kCurrentHostFormatSpecifier, base::FormatFlags::Host); + conditionalAddFlag(base::consts::kMessageFormatSpecifier, base::FormatFlags::LogMessage); + conditionalAddFlag(base::consts::kVerboseLevelFormatSpecifier, base::FormatFlags::VerboseLevel); + // For date/time we need to extract user's date format first + std::size_t dateIndex = std::string::npos; + if ((dateIndex = formatCopy.find(base::consts::kDateTimeFormatSpecifier)) != std::string::npos) { + while (dateIndex > 0 && formatCopy[dateIndex - 1] == base::consts::kFormatSpecifierChar) { + dateIndex = formatCopy.find(base::consts::kDateTimeFormatSpecifier, dateIndex + 1); + } + if (dateIndex != std::string::npos) { + addFlag(base::FormatFlags::DateTime); + updateDateFormat(dateIndex, formatCopy); + } + } + m_format = formatCopy; + updateFormatSpec(); + } + + inline Level level(void) const { + return m_level; + } + + inline const base::type::string_t& userFormat(void) const { + return m_userFormat; + } + + inline const base::type::string_t& format(void) const { + return m_format; + } + + inline const std::string& dateTimeFormat(void) const { + return m_dateTimeFormat; + } + + inline base::type::EnumType flags(void) const { + return m_flags; + } + + inline bool hasFlag(base::FormatFlags flag) const { + return base::utils::hasFlag(flag, m_flags); + } + + virtual void log(el::base::type::ostream_t& os) const { + os << m_format; + } + +protected: + /// @brief Updates date time format if available in currFormat. + /// @param index Index where %datetime, %date or %time was found + /// @param [in,out] currFormat current format that is being used to format + virtual void updateDateFormat(std::size_t index, base::type::string_t& currFormat) ELPP_FINAL { + if (hasFlag(base::FormatFlags::DateTime)) { + index += ELPP_STRLEN(base::consts::kDateTimeFormatSpecifier); + } + const base::type::char_t* ptr = currFormat.c_str() + index; + if ((currFormat.size() > index) && (ptr[0] == '{')) { + // User has provided format for date/time + ++ptr; + int count = 1; // Start by 1 in order to remove starting brace + std::stringstream ss; + for (; *ptr; ++ptr, ++count) { + if (*ptr == '}') { + ++count; // In order to remove ending brace + break; + } + ss << *ptr; + } + currFormat.erase(index, count); + m_dateTimeFormat = ss.str(); + } else { + // No format provided, use default + if (hasFlag(base::FormatFlags::DateTime)) { + m_dateTimeFormat = std::string(base::consts::kDefaultDateTimeFormat); + } + } + } + + /// @brief Updates %level from format. This is so that we dont have to do it at log-writing-time. It uses m_format and m_level + virtual void updateFormatSpec(void) ELPP_FINAL { + // Do not use switch over strongly typed enums because Intel C++ compilers dont support them yet. + if (m_level == Level::Debug) { + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, + base::consts::kDebugLevelLogValue); + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier, + base::consts::kDebugLevelShortLogValue); + } else if (m_level == Level::Info) { + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, + base::consts::kInfoLevelLogValue); + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier, + base::consts::kInfoLevelShortLogValue); + } else if (m_level == Level::Warning) { + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, + base::consts::kWarningLevelLogValue); + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier, + base::consts::kWarningLevelShortLogValue); + } else if (m_level == Level::Error) { + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, + base::consts::kErrorLevelLogValue); + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier, + base::consts::kErrorLevelShortLogValue); + } else if (m_level == Level::Fatal) { + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, + base::consts::kFatalLevelLogValue); + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier, + base::consts::kFatalLevelShortLogValue); + } else if (m_level == Level::Verbose) { + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, + base::consts::kVerboseLevelLogValue); + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier, + base::consts::kVerboseLevelShortLogValue); + } else if (m_level == Level::Trace) { + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, + base::consts::kTraceLevelLogValue); + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier, + base::consts::kTraceLevelShortLogValue); + } + if (hasFlag(base::FormatFlags::User)) { + std::string s = base::utils::s_currentUser; + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kCurrentUserFormatSpecifier, + base::utils::s_currentUser); + } + if (hasFlag(base::FormatFlags::Host)) { + base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kCurrentHostFormatSpecifier, + base::utils::s_currentHost); + } + // Ignore Level::Global and Level::Unknown + } + + inline void addFlag(base::FormatFlags flag) { + base::utils::addFlag(flag, &m_flags); + } + +private: + Level m_level; + base::type::string_t m_userFormat; + base::type::string_t m_format; + std::string m_dateTimeFormat; + base::type::EnumType m_flags; + friend class el::Logger; // To resolve loggerId format specifier easily +}; +} // namespace base +/// @brief Resolving function for format specifier +typedef std::function FormatSpecifierValueResolver; +/// @brief User-provided custom format specifier +/// @see el::Helpers::installCustomFormatSpecifier +/// @see FormatSpecifierValueResolver +class CustomFormatSpecifier { +public: + CustomFormatSpecifier(const char* formatSpecifier, const FormatSpecifierValueResolver& resolver) : + m_formatSpecifier(formatSpecifier), m_resolver(resolver) {} + inline const char* formatSpecifier(void) const { return m_formatSpecifier; } + inline const FormatSpecifierValueResolver& resolver(void) const { return m_resolver; } + inline bool operator==(const char* formatSpecifier) { + return strcmp(m_formatSpecifier, formatSpecifier) == 0; + } + +private: + const char* m_formatSpecifier; + FormatSpecifierValueResolver m_resolver; +}; +/// @brief Represents single configuration that has representing level, configuration type and a string based value. +/// +/// @detail String based value means any value either its boolean, integer or string itself, it will be embedded inside quotes +/// and will be parsed later. +/// +/// Consider some examples below: +/// * el::Configuration confEnabledInfo(el::Level::Info, el::ConfigurationType::Enabled, "true"); +/// * el::Configuration confMaxLogFileSizeInfo(el::Level::Info, el::ConfigurationType::MaxLogFileSize, "2048"); +/// * el::Configuration confFilenameInfo(el::Level::Info, el::ConfigurationType::Filename, "/var/log/my.log"); +class Configuration : public Loggable { +public: + Configuration(const Configuration& c) : + m_level(c.m_level), + m_configurationType(c.m_configurationType), + m_value(c.m_value) { + } + + Configuration& operator=(const Configuration& c) { + m_level = c.m_level; + m_configurationType = c.m_configurationType; + m_value = c.m_value; + return *this; + } + + virtual ~Configuration(void) { + } + + /// @brief Full constructor used to sets value of configuration + Configuration(Level level, ConfigurationType configurationType, const std::string& value) : + m_level(level), + m_configurationType(configurationType), + m_value(value) { + } + + /// @brief Gets level of current configuration + inline Level level(void) const { + return m_level; + } + + /// @brief Gets configuration type of current configuration + inline ConfigurationType configurationType(void) const { + return m_configurationType; + } + + /// @brief Gets string based configuration value + inline const std::string& value(void) const { + return m_value; + } + + /// @brief Set string based configuration value + /// @param value Value to set. Values have to be std::string; For boolean values use "true", "false", for any integral values + /// use them in quotes. They will be parsed when configuring + inline void setValue(const std::string& value) { + m_value = value; + } + + virtual inline void log(el::base::type::ostream_t& os) const { + os << LevelHelper::convertToString(m_level) + << ELPP_LITERAL(" ") << ConfigurationTypeHelper::convertToString(m_configurationType) + << ELPP_LITERAL(" = ") << m_value.c_str(); + } + + /// @brief Used to find configuration from configuration (pointers) repository. Avoid using it. + class Predicate { + public: + Predicate(Level level, ConfigurationType configurationType) : + m_level(level), + m_configurationType(configurationType) { + } + + inline bool operator()(const Configuration* conf) const { + return ((conf != nullptr) && (conf->level() == m_level) && (conf->configurationType() == m_configurationType)); + } + + private: + Level m_level; + ConfigurationType m_configurationType; + }; + +private: + Level m_level; + ConfigurationType m_configurationType; + std::string m_value; +}; + +/// @brief Thread-safe Configuration repository +/// +/// @detail This repository represents configurations for all the levels and configuration type mapped to a value. +class Configurations : public base::utils::RegistryWithPred { +public: + /// @brief Default constructor with empty repository + Configurations(void) : + m_configurationFile(std::string()), + m_isFromFile(false) { + } + + /// @brief Constructor used to set configurations using configuration file. + /// @param configurationFile Full path to configuration file + /// @param useDefaultsForRemaining Lets you set the remaining configurations to default. + /// @param base If provided, this configuration will be based off existing repository that this argument is pointing to. + /// @see parseFromFile(const std::string&, Configurations* base) + /// @see setRemainingToDefault() + Configurations(const std::string& configurationFile, bool useDefaultsForRemaining = true, Configurations* base = nullptr) : + m_configurationFile(configurationFile), + m_isFromFile(false) { + parseFromFile(configurationFile, base); + if (useDefaultsForRemaining) { + setRemainingToDefault(); + } + } + + virtual ~Configurations(void) { + } + + /// @brief Parses configuration from file. + /// @param configurationFile Full path to configuration file + /// @param base Configurations to base new configuration repository off. This value is used when you want to use + /// existing Configurations to base all the values and then set rest of configuration via configuration file. + /// @return True if successfully parsed, false otherwise. You may define 'ELPP_DEBUG_ASSERT_FAILURE' to make sure you + /// do not proceed without successful parse. + inline bool parseFromFile(const std::string& configurationFile, Configurations* base = nullptr) { + // We initial assertion with true because if we have assertion diabled, we want to pass this + // check and if assertion is enabled we will have values re-assigned any way. + bool assertionPassed = true; + ELPP_ASSERT((assertionPassed = base::utils::File::pathExists(configurationFile.c_str(), true)), + "Configuration file [" << configurationFile << "] does not exist!"); + if (!assertionPassed) { + return false; + } + bool success = Parser::parseFromFile(configurationFile, this, base); + m_isFromFile = success; + return success; + } + + /// @brief Parse configurations from configuration string. + /// + /// @detail This configuration string has same syntax as configuration file contents. Make sure all the necessary + /// new line characters are provided. + /// @param base Configurations to base new configuration repository off. This value is used when you want to use + /// existing Configurations to base all the values and then set rest of configuration via configuration text. + /// @return True if successfully parsed, false otherwise. You may define 'ELPP_DEBUG_ASSERT_FAILURE' to make sure you + /// do not proceed without successful parse. + inline bool parseFromText(const std::string& configurationsString, Configurations* base = nullptr) { + bool success = Parser::parseFromText(configurationsString, this, base); + if (success) { + m_isFromFile = false; + } + return success; + } + + /// @brief Sets configuration based-off an existing configurations. + /// @param base Pointer to existing configurations. + inline void setFromBase(Configurations* base) { + if (base == nullptr || base == this) { + return; + } + base::threading::ScopedLock scopedLock(base->lock()); + for (Configuration*& conf : base->list()) { + set(conf); + } + } + + /// @brief Determines whether or not specified configuration type exists in the repository. + /// + /// @detail Returns as soon as first level is found. + /// @param configurationType Type of configuration to check existence for. + bool hasConfiguration(ConfigurationType configurationType) { + base::type::EnumType lIndex = LevelHelper::kMinValid; + bool result = false; + LevelHelper::forEachLevel(&lIndex, [&](void) -> bool { + if (hasConfiguration(LevelHelper::castFromInt(lIndex), configurationType)) { + result = true; + } + return result; + }); + return result; + } + + /// @brief Determines whether or not specified configuration type exists for specified level + /// @param level Level to check + /// @param configurationType Type of configuration to check existence for. + inline bool hasConfiguration(Level level, ConfigurationType configurationType) { + base::threading::ScopedLock scopedLock(lock()); +#if ELPP_COMPILER_INTEL + // We cant specify template types here, Intel C++ throws compilation error + // "error: type name is not allowed" + return RegistryWithPred::get(level, configurationType) != nullptr; +#else + return RegistryWithPred::get(level, configurationType) != nullptr; +#endif // ELPP_COMPILER_INTEL + } + + /// @brief Sets value of configuration for specified level. + /// + /// @detail Any existing configuration for specified level will be replaced. Also note that configuration types + /// ConfigurationType::MillisecondsWidth and ConfigurationType::PerformanceTracking will be ignored if not set for + /// Level::Global because these configurations are not dependant on level. + /// @param level Level to set configuration for (el::Level). + /// @param configurationType Type of configuration (el::ConfigurationType) + /// @param value A string based value. Regardless of what the data type of configuration is, it will always be string + /// from users' point of view. This is then parsed later to be used internally. + /// @see Configuration::setValue(const std::string& value) + /// @see el::Level + /// @see el::ConfigurationType + inline void set(Level level, ConfigurationType configurationType, const std::string& value) { + base::threading::ScopedLock scopedLock(lock()); + unsafeSet(level, configurationType, value); // This is not unsafe anymore as we have locked mutex + if (level == Level::Global) { + unsafeSetGlobally(configurationType, value, false); // Again this is not unsafe either + } + } + + /// @brief Sets single configuration based on other single configuration. + /// @see set(Level level, ConfigurationType configurationType, const std::string& value) + inline void set(Configuration* conf) { + if (conf == nullptr) { + return; + } + set(conf->level(), conf->configurationType(), conf->value()); + } + + inline Configuration* get(Level level, ConfigurationType configurationType) { + base::threading::ScopedLock scopedLock(lock()); + return RegistryWithPred::get(level, configurationType); + } + + /// @brief Sets configuration for all levels. + /// @param configurationType Type of configuration + /// @param value String based value + /// @see Configurations::set(Level level, ConfigurationType configurationType, const std::string& value) + inline void setGlobally(ConfigurationType configurationType, const std::string& value) { + setGlobally(configurationType, value, false); + } + + /// @brief Clears repository so that all the configurations are unset + inline void clear(void) { + base::threading::ScopedLock scopedLock(lock()); + unregisterAll(); + } + + /// @brief Gets configuration file used in parsing this configurations. + /// + /// @detail If this repository was set manually or by text this returns empty string. + inline const std::string& configurationFile(void) const { + return m_configurationFile; + } + + /// @brief Sets configurations to "factory based" configurations. + void setToDefault(void) { + setGlobally(ConfigurationType::Enabled, std::string("true"), true); +#if !defined(ELPP_NO_DEFAULT_LOG_FILE) + setGlobally(ConfigurationType::Filename, std::string(base::consts::kDefaultLogFile), true); +#else + ELPP_UNUSED(base::consts::kDefaultLogFile); +#endif // !defined(ELPP_NO_DEFAULT_LOG_FILE) + setGlobally(ConfigurationType::ToFile, std::string("true"), true); + setGlobally(ConfigurationType::ToStandardOutput, std::string("true"), true); + setGlobally(ConfigurationType::MillisecondsWidth, std::string("3"), true); + setGlobally(ConfigurationType::PerformanceTracking, std::string("true"), true); + setGlobally(ConfigurationType::MaxLogFileSize, std::string("0"), true); + setGlobally(ConfigurationType::LogFlushThreshold, std::string("0"), true); + + setGlobally(ConfigurationType::Format, std::string("%datetime %level [%logger] %msg"), true); + set(Level::Debug, ConfigurationType::Format, std::string("%datetime %level [%logger] [%user@%host] [%func] [%loc] %msg")); + // INFO and WARNING are set to default by Level::Global + set(Level::Error, ConfigurationType::Format, std::string("%datetime %level [%logger] %msg")); + set(Level::Fatal, ConfigurationType::Format, std::string("%datetime %level [%logger] %msg")); + set(Level::Verbose, ConfigurationType::Format, std::string("%datetime %level-%vlevel [%logger] %msg")); + set(Level::Trace, ConfigurationType::Format, std::string("%datetime %level [%logger] [%func] [%loc] %msg")); + } + + /// @brief Lets you set the remaining configurations to default. + /// + /// @detail By remaining, it means that the level/type a configuration does not exist for. + /// This function is useful when you want to minimize chances of failures, e.g, if you have a configuration file that sets + /// configuration for all the configurations except for Enabled or not, we use this so that ENABLED is set to default i.e, + /// true. If you dont do this explicitley (either by calling this function or by using second param in Constructor + /// and try to access a value, an error is thrown + void setRemainingToDefault(void) { + base::threading::ScopedLock scopedLock(lock()); + unsafeSetIfNotExist(Level::Global, ConfigurationType::Enabled, std::string("true")); +#if !defined(ELPP_NO_DEFAULT_LOG_FILE) + unsafeSetIfNotExist(Level::Global, ConfigurationType::Filename, std::string(base::consts::kDefaultLogFile)); +#endif // !defined(ELPP_NO_DEFAULT_LOG_FILE) + unsafeSetIfNotExist(Level::Global, ConfigurationType::ToFile, std::string("true")); + unsafeSetIfNotExist(Level::Global, ConfigurationType::ToStandardOutput, std::string("true")); + unsafeSetIfNotExist(Level::Global, ConfigurationType::MillisecondsWidth, std::string("3")); + unsafeSetIfNotExist(Level::Global, ConfigurationType::PerformanceTracking, std::string("true")); + unsafeSetIfNotExist(Level::Global, ConfigurationType::MaxLogFileSize, std::string("0")); + unsafeSetIfNotExist(Level::Global, ConfigurationType::Format, std::string("%datetime %level [%logger] %msg")); + unsafeSetIfNotExist(Level::Debug, ConfigurationType::Format, + std::string("%datetime %level [%logger] [%user@%host] [%func] [%loc] %msg")); + // INFO and WARNING are set to default by Level::Global + unsafeSetIfNotExist(Level::Error, ConfigurationType::Format, std::string("%datetime %level [%logger] %msg")); + unsafeSetIfNotExist(Level::Fatal, ConfigurationType::Format, std::string("%datetime %level [%logger] %msg")); + unsafeSetIfNotExist(Level::Verbose, ConfigurationType::Format, std::string("%datetime %level-%vlevel [%logger] %msg")); + unsafeSetIfNotExist(Level::Trace, ConfigurationType::Format, std::string("%datetime %level [%logger] [%func] [%loc] %msg")); + } + + /// @brief Parser used internally to parse configurations from file or text. + /// + /// @detail This class makes use of base::utils::Str. + /// You should not need this unless you are working on some tool for Easylogging++ + class Parser : base::StaticClass { + public: + /// @brief Parses configuration from file. + /// @param configurationFile Full path to configuration file + /// @param sender Sender configurations pointer. Usually 'this' is used from calling class + /// @param base Configurations to base new configuration repository off. This value is used when you want to use + /// existing Configurations to base all the values and then set rest of configuration via configuration file. + /// @return True if successfully parsed, false otherwise. You may define '_STOP_ON_FIRSTELPP_ASSERTION' to make sure you + /// do not proceed without successful parse. + static bool parseFromFile(const std::string& configurationFile, Configurations* sender, Configurations* base = nullptr) { + sender->setFromBase(base); + std::ifstream fileStream_(configurationFile.c_str(), std::ifstream::in); + ELPP_ASSERT(fileStream_.is_open(), "Unable to open configuration file [" << configurationFile << "] for parsing."); + bool parsedSuccessfully = false; + std::string line = std::string(); + Level currLevel = Level::Unknown; + std::string currConfigStr = std::string(); + std::string currLevelStr = std::string(); + while (fileStream_.good()) { + std::getline(fileStream_, line); + parsedSuccessfully = parseLine(&line, &currConfigStr, &currLevelStr, &currLevel, sender); + ELPP_ASSERT(parsedSuccessfully, "Unable to parse configuration line: " << line); + } + return parsedSuccessfully; + } + + /// @brief Parse configurations from configuration string. + /// + /// @detail This configuration string has same syntax as configuration file contents. Make sure all the necessary + /// new line characters are provided. You may define '_STOP_ON_FIRSTELPP_ASSERTION' to make sure you + /// do not proceed without successful parse (This is recommended) + /// @param configurationsString + /// @param sender Sender configurations pointer. Usually 'this' is used from calling class + /// @param base Configurations to base new configuration repository off. This value is used when you want to use + /// existing Configurations to base all the values and then set rest of configuration via configuration text. + /// @return True if successfully parsed, false otherwise. + static bool parseFromText(const std::string& configurationsString, Configurations* sender, Configurations* base = nullptr) { + sender->setFromBase(base); + bool parsedSuccessfully = false; + std::stringstream ss(configurationsString); + std::string line = std::string(); + Level currLevel = Level::Unknown; + std::string currConfigStr = std::string(); + std::string currLevelStr = std::string(); + while (std::getline(ss, line)) { + parsedSuccessfully = parseLine(&line, &currConfigStr, &currLevelStr, &currLevel, sender); + ELPP_ASSERT(parsedSuccessfully, "Unable to parse configuration line: " << line); + } + return parsedSuccessfully; + } + + private: + friend class el::Loggers; + static void ignoreComments(std::string* line) { + std::size_t foundAt = 0; + std::size_t quotesStart = line->find("\""); + std::size_t quotesEnd = std::string::npos; + if (quotesStart != std::string::npos) { + quotesEnd = line->find("\"", quotesStart + 1); + while (quotesEnd != std::string::npos && line->at(quotesEnd - 1) == '\\') { + // Do not erase slash yet - we will erase it in parseLine(..) while loop + quotesEnd = line->find("\"", quotesEnd + 2); + } + } + if ((foundAt = line->find(base::consts::kConfigurationComment)) != std::string::npos) { + if (foundAt < quotesEnd) { + foundAt = line->find(base::consts::kConfigurationComment, quotesEnd + 1); + } + *line = line->substr(0, foundAt); + } + } + static inline bool isLevel(const std::string& line) { + return base::utils::Str::startsWith(line, std::string(base::consts::kConfigurationLevel)); + } + + static inline bool isComment(const std::string& line) { + return base::utils::Str::startsWith(line, std::string(base::consts::kConfigurationComment)); + } + + static inline bool isConfig(const std::string& line) { + std::size_t assignment = line.find('='); + return line != "" && + (line[0] >= 65 || line[0] <= 90 || line[0] >= 97 || line[0] <= 122) && + (assignment != std::string::npos) && + (line.size() > assignment); + } + + static bool parseLine(std::string* line, std::string* currConfigStr, std::string* currLevelStr, Level* currLevel, Configurations* conf) { + ConfigurationType currConfig = ConfigurationType::Unknown; + std::string currValue = std::string(); + *line = base::utils::Str::trim(*line); + if (isComment(*line)) return true; + ignoreComments(line); + *line = base::utils::Str::trim(*line); + if (line->empty()) { + // Comment ignored + return true; + } + if (isLevel(*line)) { + if (line->size() <= 2) { + return true; + } + *currLevelStr = line->substr(1, line->size() - 2); + *currLevelStr = base::utils::Str::toUpper(*currLevelStr); + *currLevelStr = base::utils::Str::trim(*currLevelStr); + *currLevel = LevelHelper::convertFromString(currLevelStr->c_str()); + return true; + } + if (isConfig(*line)) { + std::size_t assignment = line->find('='); + *currConfigStr = line->substr(0, assignment); + *currConfigStr = base::utils::Str::toUpper(*currConfigStr); + *currConfigStr = base::utils::Str::trim(*currConfigStr); + currConfig = ConfigurationTypeHelper::convertFromString(currConfigStr->c_str()); + currValue = line->substr(assignment + 1); + currValue = base::utils::Str::trim(currValue); + std::size_t quotesStart = currValue.find("\"", 0); + std::size_t quotesEnd = std::string::npos; + if (quotesStart != std::string::npos) { + quotesEnd = currValue.find("\"", quotesStart + 1); + while (quotesEnd != std::string::npos && currValue.at(quotesEnd - 1) == '\\') { + currValue = currValue.erase(quotesEnd - 1, 1); + quotesEnd = currValue.find("\"", quotesEnd + 2); + } + } + if (quotesStart != std::string::npos && quotesEnd != std::string::npos) { + // Quote provided - check and strip if valid + ELPP_ASSERT((quotesStart < quotesEnd), "Configuration error - No ending quote found in [" + << currConfigStr << "]"); + ELPP_ASSERT((quotesStart + 1 != quotesEnd), "Empty configuration value for [" << currConfigStr << "]"); + if ((quotesStart != quotesEnd) && (quotesStart + 1 != quotesEnd)) { + // Explicit check in case if assertion is disabled + currValue = currValue.substr(quotesStart + 1, quotesEnd - 1); + } + } + } + ELPP_ASSERT(*currLevel != Level::Unknown, "Unrecognized severity level [" << *currLevelStr << "]"); + ELPP_ASSERT(currConfig != ConfigurationType::Unknown, "Unrecognized configuration [" << *currConfigStr << "]"); + if (*currLevel == Level::Unknown || currConfig == ConfigurationType::Unknown) { + return false; // unrecognizable level or config + } + conf->set(*currLevel, currConfig, currValue); + return true; + } + }; + +private: + std::string m_configurationFile; + bool m_isFromFile; + friend class el::Loggers; + + /// @brief Unsafely sets configuration if does not already exist + void unsafeSetIfNotExist(Level level, ConfigurationType configurationType, const std::string& value) { + Configuration* conf = RegistryWithPred::get(level, configurationType); + if (conf == nullptr) { + unsafeSet(level, configurationType, value); + } + } + + /// @brief Thread unsafe set + void unsafeSet(Level level, ConfigurationType configurationType, const std::string& value) { + Configuration* conf = RegistryWithPred::get(level, configurationType); + if (conf == nullptr) { + registerNew(new Configuration(level, configurationType, value)); + } else { + conf->setValue(value); + } + if (level == Level::Global) { + unsafeSetGlobally(configurationType, value, false); + } + } + + /// @brief Sets configurations for all levels including Level::Global if includeGlobalLevel is true + /// @see Configurations::setGlobally(ConfigurationType configurationType, const std::string& value) + void setGlobally(ConfigurationType configurationType, const std::string& value, bool includeGlobalLevel) { + if (includeGlobalLevel) { + set(Level::Global, configurationType, value); + } + base::type::EnumType lIndex = LevelHelper::kMinValid; + LevelHelper::forEachLevel(&lIndex, [&](void) -> bool { + set(LevelHelper::castFromInt(lIndex), configurationType, value); + return false; // Do not break lambda function yet as we need to set all levels regardless + }); + } + + /// @brief Sets configurations (Unsafely) for all levels including Level::Global if includeGlobalLevel is true + /// @see Configurations::setGlobally(ConfigurationType configurationType, const std::string& value) + void unsafeSetGlobally(ConfigurationType configurationType, const std::string& value, bool includeGlobalLevel) { + if (includeGlobalLevel) { + unsafeSet(Level::Global, configurationType, value); + } + base::type::EnumType lIndex = LevelHelper::kMinValid; + LevelHelper::forEachLevel(&lIndex, [&](void) -> bool { + unsafeSet(LevelHelper::castFromInt(lIndex), configurationType, value); + return false; // Do not break lambda function yet as we need to set all levels regardless + }); + } +}; + +namespace base { +typedef std::shared_ptr FileStreamPtr; +typedef std::map LogStreamsReferenceMap; +/// @brief Configurations with data types. +/// +/// @detail el::Configurations have string based values. This is whats used internally in order to read correct configurations. +/// This is to perform faster while writing logs using correct configurations. +/// +/// This is thread safe and final class containing non-virtual destructor (means nothing should inherit this class) +class TypedConfigurations : public base::threading::ThreadSafe { +public: + /// @brief Constructor to initialize (construct) the object off el::Configurations + /// @param configurations Configurations pointer/reference to base this typed configurations off. + /// @param logStreamsReference Use ELPP->registeredLoggers()->logStreamsReference() + TypedConfigurations(Configurations* configurations, base::LogStreamsReferenceMap* logStreamsReference) { + m_configurations = configurations; + m_logStreamsReference = logStreamsReference; + build(m_configurations); + } + + TypedConfigurations(const TypedConfigurations& other) { + this->m_configurations = other.m_configurations; + this->m_logStreamsReference = other.m_logStreamsReference; + build(m_configurations); + } + + virtual ~TypedConfigurations(void) { + } + + const Configurations* configurations(void) const { + return m_configurations; + } + + inline bool enabled(Level level) { + return getConfigByVal(level, &m_enabledMap, "enabled"); + } + + inline bool toFile(Level level) { + return getConfigByVal(level, &m_toFileMap, "toFile"); + } + + inline const std::string& filename(Level level) { + return getConfigByRef(level, &m_filenameMap, "filename"); + } + + inline bool toStandardOutput(Level level) { + return getConfigByVal(level, &m_toStandardOutputMap, "toStandardOutput"); + } + + inline const base::LogFormat& logFormat(Level level) { + return getConfigByRef(level, &m_logFormatMap, "logFormat"); + } + + inline const base::MillisecondsWidth& millisecondsWidth(Level level = Level::Global) { + return getConfigByRef(level, &m_millisecondsWidthMap, "millisecondsWidth"); + } + + inline bool performanceTracking(Level level = Level::Global) { + return getConfigByVal(level, &m_performanceTrackingMap, "performanceTracking"); + } + + inline base::type::fstream_t* fileStream(Level level) { + return getConfigByRef(level, &m_fileStreamMap, "fileStream").get(); + } + + inline std::size_t maxLogFileSize(Level level) { + return getConfigByVal(level, &m_maxLogFileSizeMap, "maxLogFileSize"); + } + + inline std::size_t logFlushThreshold(Level level) { + return getConfigByVal(level, &m_logFlushThresholdMap, "logFlushThreshold"); + } + +private: + Configurations* m_configurations; + std::map m_enabledMap; + std::map m_toFileMap; + std::map m_filenameMap; + std::map m_toStandardOutputMap; + std::map m_logFormatMap; + std::map m_millisecondsWidthMap; + std::map m_performanceTrackingMap; + std::map m_fileStreamMap; + std::map m_maxLogFileSizeMap; + std::map m_logFlushThresholdMap; + base::LogStreamsReferenceMap* m_logStreamsReference; + + friend class el::Helpers; + friend class el::base::MessageBuilder; + friend class el::base::Writer; + friend class el::base::DefaultLogDispatchCallback; + friend class el::base::LogDispatcher; + + template + inline Conf_T getConfigByVal(Level level, const std::map* confMap, const char* confName) { + base::threading::ScopedLock scopedLock(lock()); + return unsafeGetConfigByVal(level, confMap, confName); // This is not unsafe anymore - mutex locked in scope + } + + template + inline Conf_T& getConfigByRef(Level level, std::map* confMap, const char* confName) { + base::threading::ScopedLock scopedLock(lock()); + return unsafeGetConfigByRef(level, confMap, confName); // This is not unsafe anymore - mutex locked in scope + } + + template + inline Conf_T unsafeGetConfigByVal(Level level, const std::map* confMap, const char* confName) { + ELPP_UNUSED(confName); + typename std::map::const_iterator it = confMap->find(level); + if (it == confMap->end()) { + try { + return confMap->at(Level::Global); + } catch (...) { + ELPP_INTERNAL_ERROR("Unable to get configuration [" << confName << "] for level [" + << LevelHelper::convertToString(level) << "]" + << std::endl << "Please ensure you have properly configured logger.", false); + return Conf_T(); + } + } + return it->second; + } + + template + inline Conf_T& unsafeGetConfigByRef(Level level, std::map* confMap, const char* confName) { + ELPP_UNUSED(confName); + typename std::map::iterator it = confMap->find(level); + if (it == confMap->end()) { + try { + return confMap->at(Level::Global); + } catch (...) { + ELPP_INTERNAL_ERROR("Unable to get configuration [" << confName << "] for level [" + << LevelHelper::convertToString(level) << "]" + << std::endl << "Please ensure you have properly configured logger.", false); + } + } + return it->second; + } + + template + void setValue(Level level, const Conf_T& value, std::map* confMap, bool includeGlobalLevel = true) { + // If map is empty and we are allowed to add into generic level (Level::Global), do it! + if (confMap->empty() && includeGlobalLevel) { + confMap->insert(std::make_pair(Level::Global, value)); + return; + } + // If same value exist in generic level already, dont add it to explicit level + typename std::map::iterator it = confMap->find(Level::Global); + if (it != confMap->end() && it->second == value) { + return; + } + // Now make sure we dont double up values if we really need to add it to explicit level + it = confMap->find(level); + if (it == confMap->end()) { + // Value not found for level, add new + confMap->insert(std::make_pair(level, value)); + } else { + // Value found, just update value + confMap->at(level) = value; + } + } + + void build(Configurations* configurations) { + base::threading::ScopedLock scopedLock(lock()); + auto getBool = [] (std::string boolStr) -> bool { // Pass by value for trimming + base::utils::Str::trim(boolStr); + return (boolStr == "TRUE" || boolStr == "true" || boolStr == "1"); + }; + std::vector withFileSizeLimit; + for (Configurations::const_iterator it = configurations->begin(); it != configurations->end(); ++it) { + Configuration* conf = *it; + // We cannot use switch on strong enums because Intel C++ dont support them yet + if (conf->configurationType() == ConfigurationType::Enabled) { + setValue(conf->level(), getBool(conf->value()), &m_enabledMap); + } else if (conf->configurationType() == ConfigurationType::ToFile) { + setValue(conf->level(), getBool(conf->value()), &m_toFileMap); + } else if (conf->configurationType() == ConfigurationType::ToStandardOutput) { + setValue(conf->level(), getBool(conf->value()), &m_toStandardOutputMap); + } else if (conf->configurationType() == ConfigurationType::Filename) { + // We do not yet configure filename but we will configure in another + // loop. This is because if file cannot be created, we will force ToFile + // to be false. Because configuring logger is not necessarily performance + // sensative operation, we can live with another loop; (by the way this loop + // is not very heavy either) + } else if (conf->configurationType() == ConfigurationType::Format) { + setValue(conf->level(), base::LogFormat(conf->level(), + base::type::string_t(conf->value().begin(), conf->value().end())), &m_logFormatMap); + } else if (conf->configurationType() == ConfigurationType::MillisecondsWidth) { + setValue(Level::Global, + base::MillisecondsWidth(static_cast(getULong(conf->value()))), &m_millisecondsWidthMap); + } else if (conf->configurationType() == ConfigurationType::PerformanceTracking) { + setValue(Level::Global, getBool(conf->value()), &m_performanceTrackingMap); + } else if (conf->configurationType() == ConfigurationType::MaxLogFileSize) { + setValue(conf->level(), static_cast(getULong(conf->value())), &m_maxLogFileSizeMap); +#if !defined(ELPP_NO_DEFAULT_LOG_FILE) + withFileSizeLimit.push_back(conf); +#endif // !defined(ELPP_NO_DEFAULT_LOG_FILE) + } else if (conf->configurationType() == ConfigurationType::LogFlushThreshold) { + setValue(conf->level(), static_cast(getULong(conf->value())), &m_logFlushThresholdMap); + } + } + // As mentioned early, we will now set filename configuration in separate loop to deal with non-existent files + for (Configurations::const_iterator it = configurations->begin(); it != configurations->end(); ++it) { + Configuration* conf = *it; + if (conf->configurationType() == ConfigurationType::Filename) { + insertFile(conf->level(), conf->value()); + } + } + for (std::vector::iterator conf = withFileSizeLimit.begin(); + conf != withFileSizeLimit.end(); ++conf) { + // This is not unsafe as mutex is locked in currect scope + unsafeValidateFileRolling((*conf)->level(), base::defaultPreRollOutCallback); + } + } + + unsigned long getULong(std::string confVal) { + bool valid = true; + base::utils::Str::trim(confVal); + valid = !confVal.empty() && std::find_if(confVal.begin(), confVal.end(), + [](char c) { return !base::utils::Str::isDigit(c); }) == confVal.end(); + if (!valid) { + valid = false; + ELPP_ASSERT(valid, "Configuration value not a valid integer [" << confVal << "]"); + return 0; + } + return atol(confVal.c_str()); + } + + std::string resolveFilename(const std::string& filename) { + std::string resultingFilename = filename; + std::size_t dateIndex = std::string::npos; + std::string dateTimeFormatSpecifierStr = std::string(base::consts::kDateTimeFormatSpecifierForFilename); + if ((dateIndex = resultingFilename.find(dateTimeFormatSpecifierStr.c_str())) != std::string::npos) { + while (dateIndex > 0 && resultingFilename[dateIndex - 1] == base::consts::kFormatSpecifierChar) { + dateIndex = resultingFilename.find(dateTimeFormatSpecifierStr.c_str(), dateIndex + 1); + } + if (dateIndex != std::string::npos) { + const char* ptr = resultingFilename.c_str() + dateIndex; + // Goto end of specifier + ptr += dateTimeFormatSpecifierStr.size(); + std::string fmt; + if ((resultingFilename.size() > dateIndex) && (ptr[0] == '{')) { + // User has provided format for date/time + ++ptr; + int count = 1; // Start by 1 in order to remove starting brace + std::stringstream ss; + for (; *ptr; ++ptr, ++count) { + if (*ptr == '}') { + ++count; // In order to remove ending brace + break; + } + ss << *ptr; + } + resultingFilename.erase(dateIndex + dateTimeFormatSpecifierStr.size(), count); + fmt = ss.str(); + } else { + fmt = std::string(base::consts::kDefaultDateTimeFormatInFilename); + } + base::MillisecondsWidth msWidth(3); + std::string now = base::utils::DateTime::getDateTime(fmt.c_str(), &msWidth); + base::utils::Str::replaceAll(now, '/', '-'); // Replace path element since we are dealing with filename + base::utils::Str::replaceAll(resultingFilename, dateTimeFormatSpecifierStr, now); + } + } + return resultingFilename; + } + + void insertFile(Level level, const std::string& fullFilename) { + std::string resolvedFilename = resolveFilename(fullFilename); + if (resolvedFilename.empty()) { + std::cerr << "Could not load empty file for logging, please re-check your configurations for level [" + << LevelHelper::convertToString(level) << "]"; + } + std::string filePath = base::utils::File::extractPathFromFilename(resolvedFilename, base::consts::kFilePathSeperator); + if (filePath.size() < resolvedFilename.size()) { + base::utils::File::createPath(filePath); + } + auto create = [&](Level level) { + base::LogStreamsReferenceMap::iterator filestreamIter = m_logStreamsReference->find(resolvedFilename); + base::type::fstream_t* fs = nullptr; + if (filestreamIter == m_logStreamsReference->end()) { + // We need a completely new stream, nothing to share with + fs = base::utils::File::newFileStream(resolvedFilename); + m_filenameMap.insert(std::make_pair(level, resolvedFilename)); + m_fileStreamMap.insert(std::make_pair(level, base::FileStreamPtr(fs))); + m_logStreamsReference->insert(std::make_pair(resolvedFilename, base::FileStreamPtr(m_fileStreamMap.at(level)))); + } else { + // Woops! we have an existing one, share it! + m_filenameMap.insert(std::make_pair(level, filestreamIter->first)); + m_fileStreamMap.insert(std::make_pair(level, base::FileStreamPtr(filestreamIter->second))); + fs = filestreamIter->second.get(); + } + if (fs == nullptr) { + // We display bad file error from newFileStream() + ELPP_INTERNAL_ERROR("Setting [TO_FILE] of [" + << LevelHelper::convertToString(level) << "] to FALSE", false); + setValue(level, false, &m_toFileMap); + } + }; + // If we dont have file conf for any level, create it for Level::Global first + // otherwise create for specified level + create(m_filenameMap.empty() && m_fileStreamMap.empty() ? Level::Global : level); + } + + bool unsafeValidateFileRolling(Level level, const PreRollOutCallback& PreRollOutCallback) { + base::type::fstream_t* fs = unsafeGetConfigByRef(level, &m_fileStreamMap, "fileStream").get(); + if (fs == nullptr) { + return true; + } + std::size_t maxLogFileSize = unsafeGetConfigByVal(level, &m_maxLogFileSizeMap, "maxLogFileSize"); + std::size_t currFileSize = base::utils::File::getSizeOfFile(fs); + if (maxLogFileSize != 0 && currFileSize >= maxLogFileSize) { + std::string fname = unsafeGetConfigByRef(level, &m_filenameMap, "filename"); + ELPP_INTERNAL_INFO(1, "Truncating log file [" << fname << "] as a result of configurations for level [" + << LevelHelper::convertToString(level) << "]"); + fs->close(); + PreRollOutCallback(fname.c_str(), currFileSize); + fs->open(fname, std::fstream::out | std::fstream::trunc); + return true; + } + return false; + } + + bool validateFileRolling(Level level, const PreRollOutCallback& PreRollOutCallback) { + base::threading::ScopedLock scopedLock(lock()); + return unsafeValidateFileRolling(level, PreRollOutCallback); + } +}; +/// @brief Class that keeps record of current line hit for occasional logging +class HitCounter { +public: + HitCounter(void) : + m_filename(""), + m_lineNumber(0), + m_hitCounts(0) { + } + + HitCounter(const char* filename, unsigned long int lineNumber) : + m_filename(filename), + m_lineNumber(lineNumber), + m_hitCounts(0) { + } + + HitCounter(const HitCounter& hitCounter) : + m_filename(hitCounter.m_filename), + m_lineNumber(hitCounter.m_lineNumber), + m_hitCounts(hitCounter.m_hitCounts) { + } + + HitCounter& operator=(const HitCounter& hitCounter) { + m_filename = hitCounter.m_filename; + m_lineNumber = hitCounter.m_lineNumber; + m_hitCounts = hitCounter.m_hitCounts; + return *this; + } + + virtual ~HitCounter(void) { + } + + /// @brief Resets location of current hit counter + inline void resetLocation(const char* filename, unsigned long int lineNumber) { + m_filename = filename; + m_lineNumber = lineNumber; + } + + /// @brief Validates hit counts and resets it if necessary + inline void validateHitCounts(std::size_t n) { + if (m_hitCounts >= base::consts::kMaxLogPerCounter) { + m_hitCounts = (n >= 1 ? base::consts::kMaxLogPerCounter % n : 0); + } + ++m_hitCounts; + } + + inline const char* filename(void) const { + return m_filename; + } + + inline unsigned long int lineNumber(void) const { + return m_lineNumber; + } + + inline std::size_t hitCounts(void) const { + return m_hitCounts; + } + + inline void increment(void) { + ++m_hitCounts; + } + + class Predicate { + public: + Predicate(const char* filename, unsigned long int lineNumber) + : m_filename(filename), + m_lineNumber(lineNumber) { + } + inline bool operator()(const HitCounter* counter) { + return ((counter != nullptr) && + (strcmp(counter->m_filename, m_filename) == 0) && + (counter->m_lineNumber == m_lineNumber)); + } + + private: + const char* m_filename; + unsigned long int m_lineNumber; + }; + +private: + const char* m_filename; + unsigned long int m_lineNumber; + std::size_t m_hitCounts; +}; +/// @brief Repository for hit counters used across the application +class RegisteredHitCounters : public base::utils::RegistryWithPred { +public: + /// @brief Validates counter for every N, i.e, registers new if does not exist otherwise updates original one + /// @return True if validation resulted in triggering hit. Meaning logs should be written everytime true is returned + bool validateEveryN(const char* filename, unsigned long int lineNumber, std::size_t n) { + base::threading::ScopedLock scopedLock(lock()); + base::HitCounter* counter = get(filename, lineNumber); + if (counter == nullptr) { + registerNew(counter = new base::HitCounter(filename, lineNumber)); + } + counter->validateHitCounts(n); + bool result = (n >= 1 && counter->hitCounts() != 0 && counter->hitCounts() % n == 0); + return result; + } + + /// @brief Validates counter for hits >= N, i.e, registers new if does not exist otherwise updates original one + /// @return True if validation resulted in triggering hit. Meaning logs should be written everytime true is returned + bool validateAfterN(const char* filename, unsigned long int lineNumber, std::size_t n) { + base::threading::ScopedLock scopedLock(lock()); + base::HitCounter* counter = get(filename, lineNumber); + if (counter == nullptr) { + registerNew(counter = new base::HitCounter(filename, lineNumber)); + } + // Do not use validateHitCounts here since we do not want to reset counter here + // Note the >= instead of > because we are incrementing + // after this check + if (counter->hitCounts() >= n) + return true; + counter->increment(); + return false; + } + + /// @brief Validates counter for hits are <= n, i.e, registers new if does not exist otherwise updates original one + /// @return True if validation resulted in triggering hit. Meaning logs should be written everytime true is returned + bool validateNTimes(const char* filename, unsigned long int lineNumber, std::size_t n) { + base::threading::ScopedLock scopedLock(lock()); + base::HitCounter* counter = get(filename, lineNumber); + if (counter == nullptr) { + registerNew(counter = new base::HitCounter(filename, lineNumber)); + } + counter->increment(); + // Do not use validateHitCounts here since we do not want to reset counter here + if (counter->hitCounts() <= n) + return true; + return false; + } + + /// @brief Gets hit counter registered at specified position + inline const base::HitCounter* getCounter(const char* filename, unsigned long int lineNumber) { + base::threading::ScopedLock scopedLock(lock()); + return get(filename, lineNumber); + } +}; +/// @brief Action to be taken for dispatching +enum class DispatchAction : base::type::EnumType { + None = 1, NormalLog = 2, SysLog = 4 +}; +} // namespace base +template +class Callback : protected base::threading::ThreadSafe { +public: + Callback(void) : m_enabled(true) {} + inline bool enabled(void) const { return m_enabled; } + inline void setEnabled(bool enabled) { + base::threading::ScopedLock scopedLock(lock()); + m_enabled = enabled; + } +protected: + virtual void handle(const T* handlePtr) = 0; +private: + bool m_enabled; +}; +class LogDispatchData { +public: + LogDispatchData() : m_logMessage(nullptr), m_dispatchAction(base::DispatchAction::None) {} + inline const LogMessage* logMessage(void) const { return m_logMessage; } + inline base::DispatchAction dispatchAction(void) const { return m_dispatchAction; } +private: + LogMessage* m_logMessage; + base::DispatchAction m_dispatchAction; + friend class base::LogDispatcher; + + inline void setLogMessage(LogMessage* logMessage) { m_logMessage = logMessage; } + inline void setDispatchAction(base::DispatchAction dispatchAction) { m_dispatchAction = dispatchAction; } +}; +class LogDispatchCallback : public Callback { +private: + friend class base::LogDispatcher; +}; +class PerformanceTrackingCallback : public Callback { +private: + friend class base::PerformanceTracker; +}; +class LogBuilder : base::NoCopy { +public: + virtual ~LogBuilder(void) { ELPP_INTERNAL_INFO(3, "Destroying log builder...")} + virtual base::type::string_t build(const LogMessage* logMessage, bool appendNewLine) const = 0; + void convertToColoredOutput(base::type::string_t* logLine, Level level) { + if (!base::utils::s_termSupportsColor) return; + const base::type::char_t* resetColor = ELPP_LITERAL("\x1b[0m"); + if (level == Level::Error || level == Level::Fatal) + *logLine = ELPP_LITERAL("\x1b[31m") + *logLine + resetColor; + else if (level == Level::Warning) + *logLine = ELPP_LITERAL("\x1b[33m") + *logLine + resetColor; + } +private: + friend class el::base::DefaultLogDispatchCallback; +}; +typedef std::shared_ptr LogBuilderPtr; +/// @brief Represents a logger holding ID and configurations we need to write logs +/// +/// @detail This class does not write logs itself instead its used by writer to read configuations from. +class Logger : public base::threading::ThreadSafe, public Loggable { +public: + Logger(const std::string& id, base::LogStreamsReferenceMap* logStreamsReference) : + m_id(id), + m_typedConfigurations(nullptr), + m_parentApplicationName(std::string()), + m_isConfigured(false), + m_logStreamsReference(logStreamsReference) { + initUnflushedCount(); + } + + Logger(const std::string& id, const Configurations& configurations, base::LogStreamsReferenceMap* logStreamsReference) : + m_id(id), + m_typedConfigurations(nullptr), + m_parentApplicationName(std::string()), + m_isConfigured(false), + m_logStreamsReference(logStreamsReference) { + initUnflushedCount(); + configure(configurations); + } + + Logger(const Logger& logger) { + base::utils::safeDelete(m_typedConfigurations); + m_id = logger.m_id; + m_typedConfigurations = logger.m_typedConfigurations; + m_parentApplicationName = logger.m_parentApplicationName; + m_isConfigured = logger.m_isConfigured; + m_configurations = logger.m_configurations; + m_unflushedCount = logger.m_unflushedCount; + m_logStreamsReference = logger.m_logStreamsReference; + } + + Logger& operator=(const Logger& logger) { + base::utils::safeDelete(m_typedConfigurations); + m_id = logger.m_id; + m_typedConfigurations = logger.m_typedConfigurations; + m_parentApplicationName = logger.m_parentApplicationName; + m_isConfigured = logger.m_isConfigured; + m_configurations = logger.m_configurations; + m_unflushedCount = logger.m_unflushedCount; + m_logStreamsReference = logger.m_logStreamsReference; + return *this; + } + + virtual ~Logger(void) { + base::utils::safeDelete(m_typedConfigurations); + } + + virtual inline void log(el::base::type::ostream_t& os) const { + os << m_id.c_str(); + } + + /// @brief Configures the logger using specified configurations. + void configure(const Configurations& configurations) { + m_isConfigured = false; // we set it to false in case if we fail + initUnflushedCount(); + if (m_typedConfigurations != nullptr) { + Configurations* c = const_cast(m_typedConfigurations->configurations()); + if (c->hasConfiguration(Level::Global, ConfigurationType::Filename)) { + // This check is definitely needed for cases like ELPP_NO_DEFAULT_LOG_FILE + flush(); + } + } + base::threading::ScopedLock scopedLock(lock()); + if (m_configurations != configurations) { + m_configurations.setFromBase(const_cast(&configurations)); + } + base::utils::safeDelete(m_typedConfigurations); + m_typedConfigurations = new base::TypedConfigurations(&m_configurations, m_logStreamsReference); + resolveLoggerFormatSpec(); + m_isConfigured = true; + } + + /// @brief Reconfigures logger using existing configurations + inline void reconfigure(void) { + ELPP_INTERNAL_INFO(1, "Reconfiguring logger [" << m_id << "]"); + configure(m_configurations); + } + + inline const std::string& id(void) const { + return m_id; + } + + inline const std::string& parentApplicationName(void) const { + return m_parentApplicationName; + } + + inline void setParentApplicationName(const std::string& parentApplicationName) { + m_parentApplicationName = parentApplicationName; + } + + inline Configurations* configurations(void) { + return &m_configurations; + } + + inline base::TypedConfigurations* typedConfigurations(void) { + return m_typedConfigurations; + } + + static inline bool isValidId(const std::string& id) { + for (std::string::const_iterator it = id.begin(); it != id.end(); ++it) { + if (!base::utils::Str::contains(base::consts::kValidLoggerIdSymbols, *it)) { + return false; + } + } + return true; + } + /// @brief Flushes logger to sync all log files for all levels + inline void flush(void) { + ELPP_INTERNAL_INFO(3, "Flushing logger [" << m_id << "] all levels"); + base::threading::ScopedLock scopedLock(lock()); + base::type::EnumType lIndex = LevelHelper::kMinValid; + LevelHelper::forEachLevel(&lIndex, [&](void) -> bool { + flush(LevelHelper::castFromInt(lIndex), nullptr); + return false; + }); + } + + inline void flush(Level level, base::type::fstream_t* fs) { + if (fs == nullptr && m_typedConfigurations->toFile(level)) { + fs = m_typedConfigurations->fileStream(level); + } + if (fs != nullptr) { + fs->flush(); + m_unflushedCount.find(level)->second = 0; + } + } + + inline bool isFlushNeeded(Level level) { + return ++m_unflushedCount.find(level)->second >= m_typedConfigurations->logFlushThreshold(level); + } + + inline LogBuilder* logBuilder(void) const { + return m_logBuilder.get(); + } + + inline void setLogBuilder(const LogBuilderPtr& logBuilder) { + m_logBuilder = logBuilder; + } + + inline bool enabled(Level level) const { + return m_typedConfigurations->enabled(level); + } + +#if ELPP_VARIADIC_TEMPLATES_SUPPORTED +# define LOGGER_LEVEL_WRITERS_SIGNATURES(FUNCTION_NAME)\ + template \ + inline void FUNCTION_NAME(const char*, const T&, const Args&...);\ + template \ + inline void FUNCTION_NAME(const T&); + + template + inline void verbose(int, const char*, const T&, const Args&...); + + template + inline void verbose(int, const T&); + + LOGGER_LEVEL_WRITERS_SIGNATURES(info) + LOGGER_LEVEL_WRITERS_SIGNATURES(debug) + LOGGER_LEVEL_WRITERS_SIGNATURES(warn) + LOGGER_LEVEL_WRITERS_SIGNATURES(error) + LOGGER_LEVEL_WRITERS_SIGNATURES(fatal) + LOGGER_LEVEL_WRITERS_SIGNATURES(trace) +# undef LOGGER_LEVEL_WRITERS_SIGNATURES +#endif // ELPP_VARIADIC_TEMPLATES_SUPPORTED +private: + std::string m_id; + base::TypedConfigurations* m_typedConfigurations; + base::type::stringstream_t m_stream; + std::string m_parentApplicationName; + bool m_isConfigured; + Configurations m_configurations; + std::map m_unflushedCount; + base::LogStreamsReferenceMap* m_logStreamsReference; + LogBuilderPtr m_logBuilder; + + friend class el::LogMessage; + friend class el::Loggers; + friend class el::Helpers; + friend class el::base::RegisteredLoggers; + friend class el::base::DefaultLogDispatchCallback; + friend class el::base::MessageBuilder; + friend class el::base::Writer; + friend class el::base::PErrorWriter; + friend class el::base::Storage; + friend class el::base::PerformanceTracker; + friend class el::base::LogDispatcher; + + Logger(void); + +#if ELPP_VARIADIC_TEMPLATES_SUPPORTED + template + void log_(Level, int, const char*, const T&, const Args&...); + + template + inline void log_(Level, int, const T&); + + template + void log(Level, const char*, const T&, const Args&...); + + template + inline void log(Level, const T&); +#endif // ELPP_VARIADIC_TEMPLATES_SUPPORTED + + void initUnflushedCount(void) { + m_unflushedCount.clear(); + base::type::EnumType lIndex = LevelHelper::kMinValid; + LevelHelper::forEachLevel(&lIndex, [&](void) -> bool { + m_unflushedCount.insert(std::make_pair(LevelHelper::castFromInt(lIndex), 0)); + return false; + }); + } + + inline base::type::stringstream_t& stream(void) { + return m_stream; + } + + void resolveLoggerFormatSpec(void) const { + base::type::EnumType lIndex = LevelHelper::kMinValid; + LevelHelper::forEachLevel(&lIndex, [&](void) -> bool { + base::LogFormat* logFormat = + const_cast(&m_typedConfigurations->logFormat(LevelHelper::castFromInt(lIndex))); + base::utils::Str::replaceFirstWithEscape(logFormat->m_format, base::consts::kLoggerIdFormatSpecifier, m_id); + return false; + }); + } +}; +namespace base { +/// @brief Loggers repository +class RegisteredLoggers : public base::utils::Registry { +public: + explicit RegisteredLoggers(const LogBuilderPtr& defaultLogBuilder) : + m_defaultLogBuilder(defaultLogBuilder) { + m_defaultConfigurations.setToDefault(); + } + + virtual ~RegisteredLoggers(void) { + flushAll(); + } + + inline void setDefaultConfigurations(const Configurations& configurations) { + base::threading::ScopedLock scopedLock(lock()); + m_defaultConfigurations.setFromBase(const_cast(&configurations)); + } + + inline Configurations* defaultConfigurations(void) { + return &m_defaultConfigurations; + } + + Logger* get(const std::string& id, bool forceCreation = true) { + base::threading::ScopedLock scopedLock(lock()); + Logger* logger_ = base::utils::Registry::get(id); + if (logger_ == nullptr && forceCreation) { + bool validId = Logger::isValidId(id); + if (!validId) { + ELPP_ASSERT(validId, "Invalid logger ID [" << id << "]. Not registering this logger."); + return nullptr; + } + logger_ = new Logger(id, m_defaultConfigurations, &m_logStreamsReference); + logger_->m_logBuilder = m_defaultLogBuilder; + registerNew(id, logger_); + } + return logger_; + } + + bool remove(const std::string& id) { + if (id == "default") { + return false; + } + Logger* logger = base::utils::Registry::get(id); + if (logger != nullptr) { + unregister(logger); + } + return true; + } + + inline bool has(const std::string& id) { + return get(id, false) != nullptr; + } + + inline void unregister(Logger*& logger) { + base::threading::ScopedLock scopedLock(lock()); + base::utils::Registry::unregister(logger->id()); + } + + inline base::LogStreamsReferenceMap* logStreamsReference(void) { + return &m_logStreamsReference; + } + + inline void flushAll(void) { + ELPP_INTERNAL_INFO(1, "Flushing all log files"); + base::threading::ScopedLock scopedLock(lock()); + for (base::LogStreamsReferenceMap::iterator it = m_logStreamsReference.begin(); + it != m_logStreamsReference.end(); ++it) { + if (it->second.get() == nullptr) continue; + it->second->flush(); + } + } + +private: + LogBuilderPtr m_defaultLogBuilder; + Configurations m_defaultConfigurations; + base::LogStreamsReferenceMap m_logStreamsReference; + friend class el::base::Storage; +}; +/// @brief Represents registries for verbose logging +class VRegistry : base::NoCopy, public base::threading::ThreadSafe { +public: + explicit VRegistry(base::type::VerboseLevel level, base::type::EnumType* pFlags) : m_level(level), m_pFlags(pFlags) { + } + + /// @brief Sets verbose level. Accepted range is 0-9 + inline void setLevel(base::type::VerboseLevel level) { + base::threading::ScopedLock scopedLock(lock()); + if (level < 0) + m_level = 0; + else if (level > 9) + m_level = base::consts::kMaxVerboseLevel; + else + m_level = level; + } + + inline base::type::VerboseLevel level(void) const { + return m_level; + } + + inline void clearModules(void) { + base::threading::ScopedLock scopedLock(lock()); + m_modules.clear(); + } + + void setModules(const char* modules) { + base::threading::ScopedLock scopedLock(lock()); + auto addSuffix = [](std::stringstream& ss, const char* sfx, const char* prev) { + if (prev != nullptr && base::utils::Str::endsWith(ss.str(), std::string(prev))) { + std::string chr(ss.str().substr(0, ss.str().size() - strlen(prev))); + ss.str(std::string("")); + ss << chr; + } + if (base::utils::Str::endsWith(ss.str(), std::string(sfx))) { + std::string chr(ss.str().substr(0, ss.str().size() - strlen(sfx))); + ss.str(std::string("")); + ss << chr; + } + ss << sfx; + }; + auto insert = [&](std::stringstream& ss, base::type::VerboseLevel level) { + if (!base::utils::hasFlag(LoggingFlag::DisableVModulesExtensions, *m_pFlags)) { + addSuffix(ss, ".h", nullptr); + m_modules.insert(std::make_pair(ss.str(), level)); + addSuffix(ss, ".c", ".h"); + m_modules.insert(std::make_pair(ss.str(), level)); + addSuffix(ss, ".cpp", ".c"); + m_modules.insert(std::make_pair(ss.str(), level)); + addSuffix(ss, ".cc", ".cpp"); + m_modules.insert(std::make_pair(ss.str(), level)); + addSuffix(ss, ".cxx", ".cc"); + m_modules.insert(std::make_pair(ss.str(), level)); + addSuffix(ss, ".-inl.h", ".cxx"); + m_modules.insert(std::make_pair(ss.str(), level)); + addSuffix(ss, ".hxx", ".-inl.h"); + m_modules.insert(std::make_pair(ss.str(), level)); + addSuffix(ss, ".hpp", ".hxx"); + m_modules.insert(std::make_pair(ss.str(), level)); + addSuffix(ss, ".hh", ".hpp"); + } + m_modules.insert(std::make_pair(ss.str(), level)); + }; + bool isMod = true; + bool isLevel = false; + std::stringstream ss; + int level = -1; + for (; *modules; ++modules) { + switch (*modules) { + case '=': + isLevel = true; + isMod = false; + break; + case ',': + isLevel = false; + isMod = true; + if (!ss.str().empty() && level != -1) { + insert(ss, level); + ss.str(std::string("")); + level = -1; + } + break; + default: + if (isMod) { + ss << *modules; + } else if (isLevel) { + if (isdigit(*modules)) { + level = static_cast(*modules) - 48; + } + } + break; + } + } + if (!ss.str().empty() && level != -1) { + insert(ss, level); + } + } + + bool allowed(base::type::VerboseLevel vlevel, const char* file) { + base::threading::ScopedLock scopedLock(lock()); + if (m_modules.empty() || file == nullptr) { + return vlevel <= m_level; + } else { + std::map::iterator it = m_modules.begin(); + for (; it != m_modules.end(); ++it) { + if (base::utils::Str::wildCardMatch(file, it->first.c_str())) { + return vlevel <= it->second; + } + } + if (base::utils::hasFlag(LoggingFlag::AllowVerboseIfModuleNotSpecified, *m_pFlags)) { + return true; + } + return false; + } + } + + inline const std::map& modules(void) const { + return m_modules; + } + + void setFromArgs(const base::utils::CommandLineArgs* commandLineArgs) { + if (commandLineArgs->hasParam("-v") || commandLineArgs->hasParam("--verbose") || + commandLineArgs->hasParam("-V") || commandLineArgs->hasParam("--VERBOSE")) { + setLevel(base::consts::kMaxVerboseLevel); + } else if (commandLineArgs->hasParamWithValue("--v")) { + setLevel(atoi(commandLineArgs->getParamValue("--v"))); + } else if (commandLineArgs->hasParamWithValue("--V")) { + setLevel(atoi(commandLineArgs->getParamValue("--V"))); + } else if ((commandLineArgs->hasParamWithValue("-vmodule")) && vModulesEnabled()) { + setModules(commandLineArgs->getParamValue("-vmodule")); + } else if (commandLineArgs->hasParamWithValue("-VMODULE") && vModulesEnabled()) { + setModules(commandLineArgs->getParamValue("-VMODULE")); + } + } + + /// @brief Whether or not vModules enabled + inline bool vModulesEnabled(void) { + return !base::utils::hasFlag(LoggingFlag::DisableVModules, *m_pFlags); + } + +private: + base::type::VerboseLevel m_level; + base::type::EnumType* m_pFlags; + std::map m_modules; +}; +} // namespace base +class LogMessage { +public: + LogMessage(Level level, const std::string& file, unsigned long int line, const std::string& func, + base::type::VerboseLevel verboseLevel, Logger* logger) : + m_level(level), m_file(file), m_line(line), m_func(func), + m_verboseLevel(verboseLevel), m_logger(logger), m_message(std::move(logger->stream().str())) { + } + inline Level level(void) const { return m_level; } + inline const std::string& file(void) const { return m_file; } + inline unsigned long int line(void) const { return m_line; } // NOLINT + inline const std::string& func(void) const { return m_func; } + inline base::type::VerboseLevel verboseLevel(void) const { return m_verboseLevel; } + inline Logger* logger(void) const { return m_logger; } + inline const base::type::string_t& message(void) const { return m_message; } +private: + Level m_level; + std::string m_file; + unsigned long int m_line; + std::string m_func; + base::type::VerboseLevel m_verboseLevel; + Logger* m_logger; + base::type::string_t m_message; +}; +namespace base { +#if ELPP_ASYNC_LOGGING +class AsyncLogItem { +public: + explicit AsyncLogItem(const LogMessage& logMessage, const LogDispatchData& data, const base::type::string_t& logLine) + : m_logMessage(logMessage), m_dispatchData(data), m_logLine(logLine) {} + virtual ~AsyncLogItem() {} + inline LogMessage* logMessage(void) { return &m_logMessage; } + inline LogDispatchData* data(void) { return &m_dispatchData; } + inline base::type::string_t logLine(void) { return m_logLine; } +private: + LogMessage m_logMessage; + LogDispatchData m_dispatchData; + base::type::string_t m_logLine; +}; +class AsyncLogQueue : public base::threading::ThreadSafe { +public: + virtual ~AsyncLogQueue() { + ELPP_INTERNAL_INFO(6, "~AsyncLogQueue"); + } + + inline AsyncLogItem next(void) { + base::threading::ScopedLock scopedLock(lock()); + AsyncLogItem result = m_queue.front(); + m_queue.pop(); + return result; + } + + inline void push(const AsyncLogItem& item) { + base::threading::ScopedLock scopedLock(lock()); + m_queue.push(item); + } + inline void pop(void) { + base::threading::ScopedLock scopedLock(lock()); + m_queue.pop(); + } + inline AsyncLogItem front(void) { + base::threading::ScopedLock scopedLock(lock()); + return m_queue.front(); + } + inline bool empty(void) { + base::threading::ScopedLock scopedLock(lock()); + return m_queue.empty(); + } +private: + std::queue m_queue; +}; +class IWorker { +public: + virtual ~IWorker() {} + virtual void start() = 0; +}; +#endif // ELPP_ASYNC_LOGGING +/// @brief Easylogging++ management storage +class Storage : base::NoCopy, public base::threading::ThreadSafe { +public: +#if ELPP_ASYNC_LOGGING + Storage(const LogBuilderPtr& defaultLogBuilder, base::IWorker* asyncDispatchWorker) : +#else + explicit Storage(const LogBuilderPtr& defaultLogBuilder) : +#endif // ELPP_ASYNC_LOGGING + m_registeredHitCounters(new base::RegisteredHitCounters()), + m_registeredLoggers(new base::RegisteredLoggers(defaultLogBuilder)), + m_flags(0x0), + m_vRegistry(new base::VRegistry(0, &m_flags)), +#if ELPP_ASYNC_LOGGING + m_asyncLogQueue(new base::AsyncLogQueue()), + m_asyncDispatchWorker(asyncDispatchWorker), +#endif // ELPP_ASYNC_LOGGING + m_preRollOutCallback(base::defaultPreRollOutCallback) { + // Register default logger + m_registeredLoggers->get(std::string(base::consts::kDefaultLoggerId)); + // Register performance logger and reconfigure format + Logger* performanceLogger = m_registeredLoggers->get(std::string(base::consts::kPerformanceLoggerId)); + performanceLogger->configurations()->setGlobally(ConfigurationType::Format, std::string("%datetime %level %msg")); + performanceLogger->reconfigure(); +#if defined(ELPP_SYSLOG) + // Register syslog logger and reconfigure format + Logger* sysLogLogger = m_registeredLoggers->get(std::string(base::consts::kSysLogLoggerId)); + sysLogLogger->configurations()->setGlobally(ConfigurationType::Format, std::string("%level: %msg")); + sysLogLogger->reconfigure(); +#else + ELPP_UNUSED(base::consts::kSysLogLoggerId); +#endif // defined(ELPP_SYSLOG) + addFlag(LoggingFlag::AllowVerboseIfModuleNotSpecified); +#if ELPP_ASYNC_LOGGING + installLogDispatchCallback(std::string("AsyncLogDispatchCallback")); +#else + installLogDispatchCallback(std::string("DefaultLogDispatchCallback")); +#endif // ELPP_ASYNC_LOGGING + installPerformanceTrackingCallback(std::string("DefaultPerformanceTrackingCallback")); + ELPP_INTERNAL_INFO(1, "Easylogging++ has been initialized"); +#if ELPP_ASYNC_LOGGING + m_asyncDispatchWorker->start(); +#endif // ELPP_ASYNC_LOGGING + } + + virtual ~Storage(void) { + ELPP_INTERNAL_INFO(4, "Destroying storage"); +#if ELPP_ASYNC_LOGGING + ELPP_INTERNAL_INFO(5, "Replacing log dispatch callback to synchronous"); + uninstallLogDispatchCallback(std::string("AsyncLogDispatchCallback")); + installLogDispatchCallback(std::string("DefaultLogDispatchCallback")); + ELPP_INTERNAL_INFO(5, "Destroying asyncDispatchWorker"); + base::utils::safeDelete(m_asyncDispatchWorker); + ELPP_INTERNAL_INFO(5, "Destroying asyncLogQueue"); + base::utils::safeDelete(m_asyncLogQueue); +#endif // ELPP_ASYNC_LOGGING + ELPP_INTERNAL_INFO(5, "Destroying registeredHitCounters"); + base::utils::safeDelete(m_registeredHitCounters); + ELPP_INTERNAL_INFO(5, "Destroying registeredLoggers"); + base::utils::safeDelete(m_registeredLoggers); + ELPP_INTERNAL_INFO(5, "Destroying vRegistry"); + base::utils::safeDelete(m_vRegistry); + } + + inline bool validateEveryNCounter(const char* filename, unsigned long int lineNumber, std::size_t occasion) { + return hitCounters()->validateEveryN(filename, lineNumber, occasion); + } + + inline bool validateAfterNCounter(const char* filename, unsigned long int lineNumber, std::size_t n) { // NOLINT + return hitCounters()->validateAfterN(filename, lineNumber, n); + } + + inline bool validateNTimesCounter(const char* filename, unsigned long int lineNumber, std::size_t n) { // NOLINT + return hitCounters()->validateNTimes(filename, lineNumber, n); + } + + inline base::RegisteredHitCounters* hitCounters(void) const { + return m_registeredHitCounters; + } + + inline base::RegisteredLoggers* registeredLoggers(void) const { + return m_registeredLoggers; + } + + inline base::VRegistry* vRegistry(void) const { + return m_vRegistry; + } + +#if ELPP_ASYNC_LOGGING + inline base::AsyncLogQueue* asyncLogQueue(void) const { + return m_asyncLogQueue; + } +#endif // ELPP_ASYNC_LOGGING + + inline const base::utils::CommandLineArgs* commandLineArgs(void) const { + return &m_commandLineArgs; + } + + inline void addFlag(LoggingFlag flag) { + base::utils::addFlag(flag, &m_flags); + } + + inline void removeFlag(LoggingFlag flag) { + base::utils::removeFlag(flag, &m_flags); + } + + inline bool hasFlag(LoggingFlag flag) const { + return base::utils::hasFlag(flag, m_flags); + } + + inline base::type::EnumType flags(void) const { + return m_flags; + } + + inline void setFlags(base::type::EnumType flags) { + m_flags = flags; + } + + inline void setPreRollOutCallback(const PreRollOutCallback& callback) { + m_preRollOutCallback = callback; + } + + inline void unsetPreRollOutCallback(void) { + m_preRollOutCallback = base::defaultPreRollOutCallback; + } + + inline PreRollOutCallback& preRollOutCallback(void) { + return m_preRollOutCallback; + } + + inline bool hasCustomFormatSpecifier(const char* formatSpecifier) { + base::threading::ScopedLock scopedLock(lock()); + return std::find(m_customFormatSpecifiers.begin(), m_customFormatSpecifiers.end(), + formatSpecifier) != m_customFormatSpecifiers.end(); + } + + inline void installCustomFormatSpecifier(const CustomFormatSpecifier& customFormatSpecifier) { + if (hasCustomFormatSpecifier(customFormatSpecifier.formatSpecifier())) { + return; + } + base::threading::ScopedLock scopedLock(lock()); + m_customFormatSpecifiers.push_back(customFormatSpecifier); + } + + inline bool uninstallCustomFormatSpecifier(const char* formatSpecifier) { + base::threading::ScopedLock scopedLock(lock()); + std::vector::iterator it = std::find(m_customFormatSpecifiers.begin(), + m_customFormatSpecifiers.end(), formatSpecifier); + if (it != m_customFormatSpecifiers.end() && strcmp(formatSpecifier, it->formatSpecifier()) == 0) { + m_customFormatSpecifiers.erase(it); + return true; + } + return false; + } + + const std::vector* customFormatSpecifiers(void) const { + return &m_customFormatSpecifiers; + } + + inline void setLoggingLevel(Level level) { + m_loggingLevel = level; + } + + template + inline bool installLogDispatchCallback(const std::string& id) { + return installCallback(id, &m_logDispatchCallbacks); + } + + template + inline void uninstallLogDispatchCallback(const std::string& id) { + uninstallCallback(id, &m_logDispatchCallbacks); + } + template + inline T* logDispatchCallback(const std::string& id) { + return callback(id, &m_logDispatchCallbacks); + } + + template + inline bool installPerformanceTrackingCallback(const std::string& id) { + return installCallback(id, &m_performanceTrackingCallbacks); + } + + template + inline void uninstallPerformanceTrackingCallback(const std::string& id) { + uninstallCallback(id, &m_performanceTrackingCallbacks); + } + + template + inline T* performanceTrackingCallback(const std::string& id) { + return callback(id, &m_performanceTrackingCallbacks); + } +private: + base::RegisteredHitCounters* m_registeredHitCounters; + base::RegisteredLoggers* m_registeredLoggers; + base::type::EnumType m_flags; + base::VRegistry* m_vRegistry; +#if ELPP_ASYNC_LOGGING + base::AsyncLogQueue* m_asyncLogQueue; + base::IWorker* m_asyncDispatchWorker; +#endif // ELPP_ASYNC_LOGGING + base::utils::CommandLineArgs m_commandLineArgs; + PreRollOutCallback m_preRollOutCallback; + std::map m_logDispatchCallbacks; + std::map m_performanceTrackingCallbacks; + std::vector m_customFormatSpecifiers; + Level m_loggingLevel; + + friend class el::Helpers; + friend class el::base::DefaultLogDispatchCallback; + friend class el::LogBuilder; + friend class el::base::MessageBuilder; + friend class el::base::Writer; + friend class el::base::PerformanceTracker; + friend class el::base::LogDispatcher; + + void setApplicationArguments(int argc, char** argv) { + m_commandLineArgs.setArgs(argc, argv); + m_vRegistry->setFromArgs(commandLineArgs()); + // default log file +#if !defined(ELPP_DISABLE_LOG_FILE_FROM_ARG) + if (m_commandLineArgs.hasParamWithValue(base::consts::kDefaultLogFileParam)) { + Configurations c; + c.setGlobally(ConfigurationType::Filename, std::string(m_commandLineArgs.getParamValue(base::consts::kDefaultLogFileParam))); + registeredLoggers()->setDefaultConfigurations(c); + for (base::RegisteredLoggers::iterator it = registeredLoggers()->begin(); + it != registeredLoggers()->end(); ++it) { + it->second->configure(c); + } + } +#endif // !defined(ELPP_DISABLE_LOG_FILE_FROM_ARG) +#if defined(ELPP_LOGGING_FLAGS_FROM_ARG) + if (m_commandLineArgs.hasParamWithValue(base::consts::kLoggingFlagsParam)) { + m_flags = atoi(m_commandLineArgs.getParamValue(base::consts::kLoggingFlagsParam)); + } +#endif // defined(ELPP_LOGGING_FLAGS_FROM_ARG) + } + + inline void setApplicationArguments(int argc, const char** argv) { + setApplicationArguments(argc, const_cast(argv)); + } + + template + inline bool installCallback(const std::string& id, std::map* mapT) { + if (mapT->find(id) == mapT->end()) { + mapT->insert(std::make_pair(id, TPtr(new T()))); + return true; + } + return false; + } + + template + inline void uninstallCallback(const std::string& id, std::map* mapT) { + if (mapT->find(id) != mapT->end()) { + mapT->erase(id); + } + } + + template + inline T* callback(const std::string& id, std::map* mapT) { + typename std::map::iterator iter = mapT->find(id); + if (iter != mapT->end()) { + return static_cast(iter->second.get()); + } + return nullptr; + } +}; +extern ELPP_EXPORT base::type::StoragePointer elStorage; +#define ELPP el::base::elStorage +class DefaultLogDispatchCallback : public LogDispatchCallback { +protected: + void handle(const LogDispatchData* data) { + m_data = data; + dispatch(std::move(m_data->logMessage()->logger()->logBuilder()->build(m_data->logMessage(), + m_data->dispatchAction() == base::DispatchAction::NormalLog))); + } +private: + const LogDispatchData* m_data; + void dispatch(base::type::string_t&& logLine) { + if (m_data->dispatchAction() == base::DispatchAction::NormalLog) { + if (m_data->logMessage()->logger()->m_typedConfigurations->toFile(m_data->logMessage()->level())) { + base::type::fstream_t* fs = m_data->logMessage()->logger()->m_typedConfigurations->fileStream(m_data->logMessage()->level()); + if (fs != nullptr) { + fs->write(logLine.c_str(), logLine.size()); + if (fs->fail()) { + ELPP_INTERNAL_ERROR("Unable to write log to file [" + << m_data->logMessage()->logger()->m_typedConfigurations->filename(m_data->logMessage()->level()) << "].\n" + << "Few possible reasons (could be something else):\n" << " * Permission denied\n" + << " * Disk full\n" << " * Disk is not writable", true); + } else { + if (ELPP->hasFlag(LoggingFlag::ImmediateFlush) || (m_data->logMessage()->logger()->isFlushNeeded(m_data->logMessage()->level()))) { + m_data->logMessage()->logger()->flush(m_data->logMessage()->level(), fs); + } + } + } else { + ELPP_INTERNAL_ERROR("Log file for [" << LevelHelper::convertToString(m_data->logMessage()->level()) << "] " + << "has not been configured but [TO_FILE] is configured to TRUE. [Logger ID: " + << m_data->logMessage()->logger()->id() << "]", false); + } + } + if (m_data->logMessage()->logger()->m_typedConfigurations->toStandardOutput(m_data->logMessage()->level())) { + if (ELPP->hasFlag(LoggingFlag::ColoredTerminalOutput)) + m_data->logMessage()->logger()->logBuilder()->convertToColoredOutput(&logLine, m_data->logMessage()->level()); + ELPP_COUT << ELPP_COUT_LINE(logLine); + } + } +#if defined(ELPP_SYSLOG) + else if (m_data->dispatchAction() == base::DispatchAction::SysLog) { + // Determine syslog priority + int sysLogPriority = 0; + if (m_data->logMessage()->level() == Level::Fatal) + sysLogPriority = LOG_EMERG; + else if (m_data->logMessage()->level() == Level::Error) + sysLogPriority = LOG_ERR; + else if (m_data->logMessage()->level() == Level::Warning) + sysLogPriority = LOG_WARNING; + else if (m_data->logMessage()->level() == Level::Info) + sysLogPriority = LOG_INFO; + else if (m_data->logMessage()->level() == Level::Debug) + sysLogPriority = LOG_DEBUG; + else + sysLogPriority = LOG_NOTICE; +# if defined(ELPP_UNICODE) + char* line = base::utils::Str::wcharPtrToCharPtr(logLine.c_str()); + syslog(sysLogPriority, "%s", line); + free(line); +# else + syslog(sysLogPriority, "%s", logLine.c_str()); +# endif + } +#endif // defined(ELPP_SYSLOG) + } +}; +#if ELPP_ASYNC_LOGGING +class AsyncLogDispatchCallback : public LogDispatchCallback { +protected: + void handle(const LogDispatchData* data) { + base::type::string_t logLine = data->logMessage()->logger()->logBuilder()->build(data->logMessage(), data->dispatchAction() == base::DispatchAction::NormalLog); + if (data->dispatchAction() == base::DispatchAction::NormalLog && data->logMessage()->logger()->typedConfigurations()->toStandardOutput(data->logMessage()->level())) { + if (ELPP->hasFlag(LoggingFlag::ColoredTerminalOutput)) + data->logMessage()->logger()->logBuilder()->convertToColoredOutput(&logLine, data->logMessage()->level()); + ELPP_COUT << ELPP_COUT_LINE(logLine); + } + // Save resources and only queue if we want to write to file otherwise just ignore handler + if (data->logMessage()->logger()->typedConfigurations()->toFile(data->logMessage()->level())) { + ELPP->asyncLogQueue()->push(AsyncLogItem(*(data->logMessage()), *data, logLine)); + } + } +}; +class AsyncDispatchWorker : public base::IWorker, public base::threading::ThreadSafe { +public: + AsyncDispatchWorker() { + setContinueRunning(false); + } + + virtual ~AsyncDispatchWorker() { + setContinueRunning(false); + ELPP_INTERNAL_INFO(6, "Stopping dispatch worker - Cleaning log queue"); + clean(); + ELPP_INTERNAL_INFO(6, "Log queue cleaned"); + } + + inline bool clean() { + std::mutex m; + std::unique_lock lk(m); + cv.wait(lk, []{ return !ELPP->asyncLogQueue()->empty(); }); + emptyQueue(); + lk.unlock(); + cv.notify_one(); + return ELPP->asyncLogQueue()->empty(); + } + + inline void emptyQueue() { + while (!ELPP->asyncLogQueue()->empty()) { + AsyncLogItem data = ELPP->asyncLogQueue()->next(); + handle(&data); + base::threading::msleep(100); + } + } + + virtual inline void start() { + base::threading::msleep(5000); // Wait extra few seconds + setContinueRunning(true); + std::thread t1(&AsyncDispatchWorker::runner, this); + t1.join(); + } + + void handle(AsyncLogItem* logItem) { + LogDispatchData* data = logItem->data(); + LogMessage* logMessage = logItem->logMessage(); + Logger* logger = logMessage->logger(); + base::TypedConfigurations* conf = logger->typedConfigurations(); + base::type::string_t logLine = logItem->logLine(); + if (data->dispatchAction() == base::DispatchAction::NormalLog) { + if (conf->toFile(logMessage->level())) { + base::type::fstream_t* fs = conf->fileStream(logMessage->level()); + if (fs != nullptr) { + fs->write(logLine.c_str(), logLine.size()); + if (fs->fail()) { + ELPP_INTERNAL_ERROR("Unable to write log to file [" + << conf->filename(logMessage->level()) << "].\n" + << "Few possible reasons (could be something else):\n" << " * Permission denied\n" + << " * Disk full\n" << " * Disk is not writable", true); + } else { + if (ELPP->hasFlag(LoggingFlag::ImmediateFlush) || (logger->isFlushNeeded(logMessage->level()))) { + logger->flush(logMessage->level(), fs); + } + } + } else { + ELPP_INTERNAL_ERROR("Log file for [" << LevelHelper::convertToString(logMessage->level()) << "] " + << "has not been configured but [TO_FILE] is configured to TRUE. [Logger ID: " << logger->id() << "]", false); + } + } + } +# if defined(ELPP_SYSLOG) + else if (data->dispatchAction() == base::DispatchAction::SysLog) { + // Determine syslog priority + int sysLogPriority = 0; + if (logMessage->level() == Level::Fatal) + sysLogPriority = LOG_EMERG; + else if (logMessage->level() == Level::Error) + sysLogPriority = LOG_ERR; + else if (logMessage->level() == Level::Warning) + sysLogPriority = LOG_WARNING; + else if (logMessage->level() == Level::Info) + sysLogPriority = LOG_INFO; + else if (logMessage->level() == Level::Debug) + sysLogPriority = LOG_DEBUG; + else + sysLogPriority = LOG_NOTICE; +# if defined(ELPP_UNICODE) + char* line = base::utils::Str::wcharPtrToCharPtr(logLine.c_str()); + syslog(sysLogPriority, "%s", line); + free(line); +# else + syslog(sysLogPriority, "%s", logLine.c_str()); +# endif + } +# endif // defined(ELPP_SYSLOG) + } + + void run() { + while (continueRunning()) { + emptyQueue(); + base::threading::msleep(10); // 10ms + } + } + + static void* runner(void *context) { + static_cast(context)->run(); + return NULL; + } + + void setContinueRunning(bool value) { + base::threading::ScopedLock scopedLock(m_continueRunningMutex); + m_continueRunning = value; + } + bool continueRunning(void) { + return m_continueRunning; + } +private: + std::condition_variable cv; + bool m_continueRunning; + base::threading::Mutex m_continueRunningMutex; +}; +#endif // ELPP_ASYNC_LOGGING +} // namespace base +namespace base { +class DefaultLogBuilder : public LogBuilder { +public: + base::type::string_t build(const LogMessage* logMessage, bool appendNewLine) const { + base::TypedConfigurations* tc = logMessage->logger()->typedConfigurations(); + const base::LogFormat* logFormat = &tc->logFormat(logMessage->level()); + base::type::string_t logLine = logFormat->format(); + char buff[base::consts::kSourceFilenameMaxLength + base::consts::kSourceLineMaxLength] = ""; + const char* bufLim = buff + sizeof(buff); + if (logFormat->hasFlag(base::FormatFlags::AppName)) { + // App name + base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kAppNameFormatSpecifier, + logMessage->logger()->parentApplicationName()); + } + if (logFormat->hasFlag(base::FormatFlags::ThreadId)) { + // Thread ID + base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kThreadIdFormatSpecifier, + base::threading::getCurrentThreadId()); + } + if (logFormat->hasFlag(base::FormatFlags::DateTime)) { + // DateTime + base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kDateTimeFormatSpecifier, + base::utils::DateTime::getDateTime(logFormat->dateTimeFormat().c_str(), + &tc->millisecondsWidth(logMessage->level()))); + } + if (logFormat->hasFlag(base::FormatFlags::Function)) { + // Function + base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kLogFunctionFormatSpecifier, logMessage->func()); + } + if (logFormat->hasFlag(base::FormatFlags::File)) { + // File + char* buf = base::utils::Str::clearBuff(buff, base::consts::kSourceFilenameMaxLength); + base::utils::File::buildStrippedFilename(logMessage->file().c_str(), buff); + buf = base::utils::Str::addToBuff(buff, buf, bufLim); + base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kLogFileFormatSpecifier, std::string(buff)); + } + if (logFormat->hasFlag(base::FormatFlags::FileBase)) { + // FileBase + char* buf = base::utils::Str::clearBuff(buff, base::consts::kSourceFilenameMaxLength); + base::utils::File::buildBaseFilename(logMessage->file(), buff); + buf = base::utils::Str::addToBuff(buff, buf, bufLim); + base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kLogFileBaseFormatSpecifier, std::string(buff)); + } + if (logFormat->hasFlag(base::FormatFlags::Line)) { + // Line + char* buf = base::utils::Str::clearBuff(buff, base::consts::kSourceLineMaxLength); + buf = base::utils::Str::convertAndAddToBuff(logMessage->line(), + base::consts::kSourceLineMaxLength, buf, bufLim, false); + base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kLogLineFormatSpecifier, std::string(buff)); + } + if (logFormat->hasFlag(base::FormatFlags::Location)) { + // Location + char* buf = base::utils::Str::clearBuff(buff, + base::consts::kSourceFilenameMaxLength + base::consts::kSourceLineMaxLength); + base::utils::File::buildStrippedFilename(logMessage->file().c_str(), buff); + buf = base::utils::Str::addToBuff(buff, buf, bufLim); + buf = base::utils::Str::addToBuff(":", buf, bufLim); + buf = base::utils::Str::convertAndAddToBuff(logMessage->line(), + base::consts::kSourceLineMaxLength, buf, bufLim, false); + base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kLogLocationFormatSpecifier, std::string(buff)); + } + if (logMessage->level() == Level::Verbose && logFormat->hasFlag(base::FormatFlags::VerboseLevel)) { + // Verbose level + char* buf = base::utils::Str::clearBuff(buff, 1); + buf = base::utils::Str::convertAndAddToBuff(logMessage->verboseLevel(), 1, buf, bufLim, false); + base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kVerboseLevelFormatSpecifier, std::string(buff)); + } + if (logFormat->hasFlag(base::FormatFlags::LogMessage)) { + // Log message + base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kMessageFormatSpecifier, logMessage->message()); + } +#if !defined(ELPP_DISABLE_CUSTOM_FORMAT_SPECIFIERS) + for (std::vector::const_iterator it = ELPP->customFormatSpecifiers()->begin(); + it != ELPP->customFormatSpecifiers()->end(); ++it) { + std::string fs(it->formatSpecifier()); + base::type::string_t wcsFormatSpecifier(fs.begin(), fs.end()); + base::utils::Str::replaceFirstWithEscape(logLine, wcsFormatSpecifier, std::string(it->resolver()())); + } +#endif // !defined(ELPP_DISABLE_CUSTOM_FORMAT_SPECIFIERS) + if (appendNewLine) logLine += ELPP_LITERAL("\n"); + return logLine; + } +}; +/// @brief Dispatches log messages +class LogDispatcher : base::NoCopy { +public: + LogDispatcher(bool proceed, LogMessage&& logMessage, base::DispatchAction dispatchAction) : + m_proceed(proceed), + m_logMessage(std::move(logMessage)), + m_dispatchAction(std::move(dispatchAction)) { + } + + void dispatch(void) { + if (m_proceed && m_dispatchAction == base::DispatchAction::None) { + m_proceed = false; + } + if (!m_proceed) { + return; + } + // We minimize the time of ELPP's lock - this lock is released after log is written + base::threading::ScopedLock scopedLock(ELPP->lock()); + base::TypedConfigurations* tc = m_logMessage.logger()->m_typedConfigurations; + if (ELPP->hasFlag(LoggingFlag::StrictLogFileSizeCheck)) { + tc->validateFileRolling(m_logMessage.level(), ELPP->preRollOutCallback()); + } + LogDispatchCallback* callback = nullptr; + LogDispatchData data; + for (const std::pair& h + : ELPP->m_logDispatchCallbacks) { + callback = h.second.get(); + if (callback != nullptr && callback->enabled()) { + data.setLogMessage(&m_logMessage); + data.setDispatchAction(m_dispatchAction); + callback->acquireLock(); + callback->handle(&data); + callback->releaseLock(); + } + } + } + +private: + bool m_proceed; + LogMessage m_logMessage; + base::DispatchAction m_dispatchAction; +}; +#if defined(ELPP_STL_LOGGING) +/// @brief Workarounds to write some STL logs +/// +/// @detail There is workaround needed to loop through some stl containers. In order to do that, we need iterable containers +/// of same type and provide iterator interface and pass it on to writeIterator(). +/// Remember, this is passed by value in constructor so that we dont change original containers. +/// This operation is as expensive as Big-O(std::min(class_.size(), base::consts::kMaxLogPerContainer)) +namespace workarounds { +/// @brief Abstract IterableContainer template that provides interface for iterable classes of type T +template +class IterableContainer { +public: + typedef typename Container::iterator iterator; + typedef typename Container::const_iterator const_iterator; + IterableContainer(void) {} + virtual ~IterableContainer(void) {} + iterator begin(void) { return getContainer().begin(); } + iterator end(void) { return getContainer().end(); } +private: + virtual Container& getContainer(void) = 0; +}; +/// @brief Implements IterableContainer and provides iterable std::priority_queue class +template, typename Comparator = std::less> +class IterablePriorityQueue : public IterableContainer, public std::priority_queue { +public: + IterablePriorityQueue(std::priority_queue queue_) { + std::size_t count_ = 0; + while (++count_ < base::consts::kMaxLogPerContainer && !queue_.empty()) { + this->push(queue_.top()); + queue_.pop(); + } + } +private: + inline Container& getContainer(void) { + return this->c; + } +}; +/// @brief Implements IterableContainer and provides iterable std::queue class +template> +class IterableQueue : public IterableContainer, public std::queue { +public: + IterableQueue(std::queue queue_) { + std::size_t count_ = 0; + while (++count_ < base::consts::kMaxLogPerContainer && !queue_.empty()) { + this->push(queue_.front()); + queue_.pop(); + } + } +private: + inline Container& getContainer(void) { + return this->c; + } +}; +/// @brief Implements IterableContainer and provides iterable std::stack class +template> +class IterableStack : public IterableContainer, public std::stack { +public: + IterableStack(std::stack stack_) { + std::size_t count_ = 0; + while (++count_ < base::consts::kMaxLogPerContainer && !stack_.empty()) { + this->push(stack_.top()); + stack_.pop(); + } + } +private: + inline Container& getContainer(void) { + return this->c; + } +}; +} // namespace workarounds +#endif // defined(ELPP_STL_LOGGING) +// Log message builder +class MessageBuilder { +public: + MessageBuilder(void) : m_logger(nullptr), m_containerLogSeperator(ELPP_LITERAL("")) {} + void initialize(Logger* logger) { + m_logger = logger; + m_containerLogSeperator = ELPP->hasFlag(LoggingFlag::NewLineForContainer) ? + ELPP_LITERAL("\n ") : ELPP_LITERAL(", "); + } + +# define ELPP_SIMPLE_LOG(LOG_TYPE)\ + inline MessageBuilder& operator<<(LOG_TYPE msg) {\ + m_logger->stream() << msg;\ + if (ELPP->hasFlag(LoggingFlag::AutoSpacing)) {\ + m_logger->stream() << " ";\ + }\ + return *this;\ + } + + inline MessageBuilder& operator<<(const std::string& msg) { + return operator<<(msg.c_str()); + } + ELPP_SIMPLE_LOG(char) + ELPP_SIMPLE_LOG(bool) + ELPP_SIMPLE_LOG(signed short) + ELPP_SIMPLE_LOG(unsigned short) + ELPP_SIMPLE_LOG(signed int) + ELPP_SIMPLE_LOG(unsigned int) + ELPP_SIMPLE_LOG(signed long) + ELPP_SIMPLE_LOG(unsigned long) + ELPP_SIMPLE_LOG(float) + ELPP_SIMPLE_LOG(double) + ELPP_SIMPLE_LOG(char*) + ELPP_SIMPLE_LOG(const char*) + ELPP_SIMPLE_LOG(const void*) + ELPP_SIMPLE_LOG(long double) + inline MessageBuilder& operator<<(const std::wstring& msg) { + return operator<<(msg.c_str()); + } + inline MessageBuilder& operator<<(const wchar_t* msg) { + if (msg == nullptr) { + m_logger->stream() << base::consts::kNullPointer; + return *this; + } +# if defined(ELPP_UNICODE) + m_logger->stream() << msg; +# else + char* buff_ = base::utils::Str::wcharPtrToCharPtr(msg); + m_logger->stream() << buff_; + free(buff_); +# endif + if (ELPP->hasFlag(LoggingFlag::AutoSpacing)) { + m_logger->stream() << " "; + } + return *this; + } + // ostream manipulators + inline MessageBuilder& operator<<(std::ostream& (*OStreamMani)(std::ostream&)) { + m_logger->stream() << OStreamMani; + return *this; + } +#define ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(temp) \ + template \ + inline MessageBuilder& operator<<(const temp& template_inst) { \ + return writeIterator(template_inst.begin(), template_inst.end(), template_inst.size()); \ + } +#define ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(temp) \ + template \ + inline MessageBuilder& operator<<(const temp& template_inst) { \ + return writeIterator(template_inst.begin(), template_inst.end(), template_inst.size()); \ + } +#define ELPP_ITERATOR_CONTAINER_LOG_THREE_ARG(temp) \ + template \ + inline MessageBuilder& operator<<(const temp& template_inst) { \ + return writeIterator(template_inst.begin(), template_inst.end(), template_inst.size()); \ + } +#define ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(temp) \ + template \ + inline MessageBuilder& operator<<(const temp& template_inst) { \ + return writeIterator(template_inst.begin(), template_inst.end(), template_inst.size()); \ + } +#define ELPP_ITERATOR_CONTAINER_LOG_FIVE_ARG(temp) \ + template \ + inline MessageBuilder& operator<<(const temp& template_inst) { \ + return writeIterator(template_inst.begin(), template_inst.end(), template_inst.size()); \ + } + +#if defined(ELPP_STL_LOGGING) + ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(std::vector) + ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(std::list) + ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(std::deque) + ELPP_ITERATOR_CONTAINER_LOG_THREE_ARG(std::set) + ELPP_ITERATOR_CONTAINER_LOG_THREE_ARG(std::multiset) + ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(std::map) + ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(std::multimap) + template + inline MessageBuilder& operator<<(const std::queue& queue_) { + base::workarounds::IterableQueue iterableQueue_ = + static_cast >(queue_); + return writeIterator(iterableQueue_.begin(), iterableQueue_.end(), iterableQueue_.size()); + } + template + inline MessageBuilder& operator<<(const std::stack& stack_) { + base::workarounds::IterableStack iterableStack_ = + static_cast >(stack_); + return writeIterator(iterableStack_.begin(), iterableStack_.end(), iterableStack_.size()); + } + template + inline MessageBuilder& operator<<(const std::priority_queue& priorityQueue_) { + base::workarounds::IterablePriorityQueue iterablePriorityQueue_ = + static_cast >(priorityQueue_); + return writeIterator(iterablePriorityQueue_.begin(), iterablePriorityQueue_.end(), iterablePriorityQueue_.size()); + } + template + inline MessageBuilder& operator<<(const std::pair& pair_) { + m_logger->stream() << ELPP_LITERAL("("); + operator << (static_cast(pair_.first)); + m_logger->stream() << ELPP_LITERAL(", "); + operator << (static_cast(pair_.second)); + m_logger->stream() << ELPP_LITERAL(")"); + return *this; + } + template + inline MessageBuilder& operator<<(const std::bitset& bitset_) { + m_logger->stream() << ELPP_LITERAL("["); + operator << (bitset_.to_string()); + m_logger->stream() << ELPP_LITERAL("]"); + return *this; + } +# if defined(ELPP_LOG_STD_ARRAY) + template + inline MessageBuilder& operator<<(const std::array& array) { + return writeIterator(array.begin(), array.end(), array.size()); + } +# endif // defined(ELPP_LOG_STD_ARRAY) +# if defined(ELPP_LOG_UNORDERED_MAP) + ELPP_ITERATOR_CONTAINER_LOG_FIVE_ARG(std::unordered_map) + ELPP_ITERATOR_CONTAINER_LOG_FIVE_ARG(std::unordered_multimap) +# endif // defined(ELPP_LOG_UNORDERED_MAP) +# if defined(ELPP_LOG_UNORDERED_SET) + ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(std::unordered_set) + ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(std::unordered_multiset) +# endif // defined(ELPP_LOG_UNORDERED_SET) +#endif // defined(ELPP_STL_LOGGING) +#if defined(ELPP_QT_LOGGING) + inline MessageBuilder& operator<<(const QString& msg) { +# if defined(ELPP_UNICODE) + m_logger->stream() << msg.toStdWString(); +# else + m_logger->stream() << msg.toStdString(); +# endif // defined(ELPP_UNICODE) + return *this; + } + inline MessageBuilder& operator<<(const QByteArray& msg) { + return operator << (QString(msg)); + } + inline MessageBuilder& operator<<(const QStringRef& msg) { + return operator<<(msg.toString()); + } + inline MessageBuilder& operator<<(qint64 msg) { +# if defined(ELPP_UNICODE) + m_logger->stream() << QString::number(msg).toStdWString(); +# else + m_logger->stream() << QString::number(msg).toStdString(); +# endif // defined(ELPP_UNICODE) + return *this; + } + inline MessageBuilder& operator<<(quint64 msg) { +# if defined(ELPP_UNICODE) + m_logger->stream() << QString::number(msg).toStdWString(); +# else + m_logger->stream() << QString::number(msg).toStdString(); +# endif // defined(ELPP_UNICODE) + return *this; + } + inline MessageBuilder& operator<<(QChar msg) { + m_logger->stream() << msg.toLatin1(); + return *this; + } + inline MessageBuilder& operator<<(const QLatin1String& msg) { + m_logger->stream() << msg.latin1(); + return *this; + } + ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QList) + ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QVector) + ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QQueue) + ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QSet) + ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QLinkedList) + ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QStack) + template + inline MessageBuilder& operator<<(const QPair& pair_) { + m_logger->stream() << ELPP_LITERAL("("); + operator << (static_cast(pair_.first)); + m_logger->stream() << ELPP_LITERAL(", "); + operator << (static_cast(pair_.second)); + m_logger->stream() << ELPP_LITERAL(")"); + return *this; + } + template + inline MessageBuilder& operator<<(const QMap& map_) { + m_logger->stream() << ELPP_LITERAL("["); + QList keys = map_.keys(); + typename QList::const_iterator begin = keys.begin(); + typename QList::const_iterator end = keys.end(); + int max_ = static_cast(base::consts::kMaxLogPerContainer); // to prevent warning + for (int index_ = 0; begin != end && index_ < max_; ++index_, ++begin) { + m_logger->stream() << ELPP_LITERAL("("); + operator << (static_cast(*begin)); + m_logger->stream() << ELPP_LITERAL(", "); + operator << (static_cast(map_.value(*begin))); + m_logger->stream() << ELPP_LITERAL(")"); + m_logger->stream() << ((index_ < keys.size() -1) ? m_containerLogSeperator : ELPP_LITERAL("")); + } + if (begin != end) { + m_logger->stream() << ELPP_LITERAL("..."); + } + m_logger->stream() << ELPP_LITERAL("]"); + return *this; + } + template + inline MessageBuilder& operator<<(const QMultiMap& map_) { + operator << (static_cast>(map_)); + return *this; + } + template + inline MessageBuilder& operator<<(const QHash& hash_) { + m_logger->stream() << ELPP_LITERAL("["); + QList keys = hash_.keys(); + typename QList::const_iterator begin = keys.begin(); + typename QList::const_iterator end = keys.end(); + int max_ = static_cast(base::consts::kMaxLogPerContainer); // prevent type warning + for (int index_ = 0; begin != end && index_ < max_; ++index_, ++begin) { + m_logger->stream() << ELPP_LITERAL("("); + operator << (static_cast(*begin)); + m_logger->stream() << ELPP_LITERAL(", "); + operator << (static_cast(hash_.value(*begin))); + m_logger->stream() << ELPP_LITERAL(")"); + m_logger->stream() << ((index_ < keys.size() -1) ? m_containerLogSeperator : ELPP_LITERAL("")); + } + if (begin != end) { + m_logger->stream() << ELPP_LITERAL("..."); + } + m_logger->stream() << ELPP_LITERAL("]"); + return *this; + } + template + inline MessageBuilder& operator<<(const QMultiHash& multiHash_) { + operator << (static_cast>(multiHash_)); + return *this; + } +#endif // defined(ELPP_QT_LOGGING) +#if defined(ELPP_BOOST_LOGGING) + ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(boost::container::vector) + ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(boost::container::stable_vector) + ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(boost::container::list) + ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(boost::container::deque) + ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(boost::container::map) + ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(boost::container::flat_map) + ELPP_ITERATOR_CONTAINER_LOG_THREE_ARG(boost::container::set) + ELPP_ITERATOR_CONTAINER_LOG_THREE_ARG(boost::container::flat_set) +#endif // defined(ELPP_BOOST_LOGGING) + +/// @brief Macro used internally that can be used externally to make containers easylogging++ friendly +/// +/// @detail This macro expands to write an ostream& operator<< for container. This container is expected to +/// have begin() and end() methods that return respective iterators +/// @param ContainerType Type of container e.g, MyList from WX_DECLARE_LIST(int, MyList); in wxwidgets +/// @param SizeMethod Method used to get size of container. +/// @param ElementInstance Instance of element to be fed out. Insance name is "elem". See WXELPP_ENABLED macro +/// for an example usage +#define MAKE_CONTAINERELPP_FRIENDLY(ContainerType, SizeMethod, ElementInstance) \ + el::base::type::ostream_t& operator<<(el::base::type::ostream_t& ss, const ContainerType& container) {\ + const el::base::type::char_t* sep = ELPP->hasFlag(el::LoggingFlag::NewLineForContainer) ? \ + ELPP_LITERAL("\n ") : ELPP_LITERAL(", ");\ + ContainerType::const_iterator elem = container.begin();\ + ContainerType::const_iterator endElem = container.end();\ + std::size_t size_ = container.SizeMethod; \ + ss << ELPP_LITERAL("[");\ + for (std::size_t i = 0; elem != endElem && i < el::base::consts::kMaxLogPerContainer; ++i, ++elem) { \ + ss << ElementInstance;\ + ss << ((i < size_ - 1) ? sep : ELPP_LITERAL(""));\ + }\ + if (elem != endElem) {\ + ss << ELPP_LITERAL("...");\ + }\ + ss << ELPP_LITERAL("]");\ + return ss;\ + } +#if defined(ELPP_WXWIDGETS_LOGGING) + ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(wxVector) +# define ELPP_WX_PTR_ENABLED(ContainerType) MAKE_CONTAINERELPP_FRIENDLY(ContainerType, size(), *(*elem)) +# define ELPP_WX_ENABLED(ContainerType) MAKE_CONTAINERELPP_FRIENDLY(ContainerType, size(), (*elem)) +# define ELPP_WX_HASH_MAP_ENABLED(ContainerType) MAKE_CONTAINERELPP_FRIENDLY(ContainerType, size(), \ + ELPP_LITERAL("(") << elem->first << ELPP_LITERAL(", ") << elem->second << ELPP_LITERAL(")") +#else +# define ELPP_WX_PTR_ENABLED(ContainerType) +# define ELPP_WX_ENABLED(ContainerType) +# define ELPP_WX_HASH_MAP_ENABLED(ContainerType) +#endif // defined(ELPP_WXWIDGETS_LOGGING) + // Other classes + template + ELPP_SIMPLE_LOG(const Class&) +#undef ELPP_SIMPLE_LOG +#undef ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG +#undef ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG +#undef ELPP_ITERATOR_CONTAINER_LOG_THREE_ARG +#undef ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG +#undef ELPP_ITERATOR_CONTAINER_LOG_FIVE_ARG +private: + Logger* m_logger; + const base::type::char_t* m_containerLogSeperator; + + template + inline MessageBuilder& writeIterator(Iterator begin_, Iterator end_, std::size_t size_) { + m_logger->stream() << ELPP_LITERAL("["); + for (std::size_t i = 0; begin_ != end_ && i < base::consts::kMaxLogPerContainer; ++i, ++begin_) { + operator << (*begin_); + m_logger->stream() << ((i < size_ - 1) ? m_containerLogSeperator : ELPP_LITERAL("")); + } + if (begin_ != end_) { + m_logger->stream() << ELPP_LITERAL("..."); + } + m_logger->stream() << ELPP_LITERAL("]"); + if (ELPP->hasFlag(LoggingFlag::AutoSpacing)) { + m_logger->stream() << " "; + } + return *this; + } +}; +/// @brief Writes nothing - Used when certain log is disabled +class NullWriter : base::NoCopy { +public: + NullWriter(void) {} + + // Null manipulator + inline NullWriter& operator<<(std::ostream& (*)(std::ostream&)) { + return *this; + } + + template + inline NullWriter& operator<<(const T&) { + return *this; + } +}; +/// @brief Main entry point of each logging +class Writer : base::NoCopy { +public: + Writer(Level level, const char* file, unsigned long int line, + const char* func, base::DispatchAction dispatchAction = base::DispatchAction::NormalLog, + base::type::VerboseLevel verboseLevel = 0) : + m_level(level), m_file(file), m_line(line), m_func(func), m_verboseLevel(verboseLevel), + m_proceed(false), m_dispatchAction(dispatchAction) { + } + + virtual ~Writer(void) { + processDispatch(); + } + + template + inline Writer& operator<<(const T& log) { +#if ELPP_LOGGING_ENABLED + if (m_proceed) { + m_messageBuilder << log; + } +#endif // ELPP_LOGGING_ENABLED + return *this; + } + + inline Writer& operator<<(std::ostream& (*log)(std::ostream&)) { +#if ELPP_LOGGING_ENABLED + if (m_proceed) { + m_messageBuilder << log; + } +#endif // ELPP_LOGGING_ENABLED + return *this; + } + + Writer& construct(Logger* logger, bool needLock = true) { + m_logger = logger; + initializeLogger(logger->id(), false, needLock); + m_messageBuilder.initialize(m_logger); + return *this; + } + + Writer& construct(int count, const char* loggerIds, ...) { + if (ELPP->hasFlag(LoggingFlag::MultiLoggerSupport)) { + va_list loggersList; + va_start(loggersList, loggerIds); + const char* id = loggerIds; + for (int i = 0; i < count; ++i) { + m_loggerIds.push_back(std::string(id)); + id = va_arg(loggersList, const char*); + } + va_end(loggersList); + initializeLogger(m_loggerIds.at(0)); + } else { + initializeLogger(std::string(loggerIds)); + } + m_messageBuilder.initialize(m_logger); + return *this; + } + + operator bool() { + return true; + } +protected: + Level m_level; + const char* m_file; + const unsigned long int m_line; + const char* m_func; + base::type::VerboseLevel m_verboseLevel; + Logger* m_logger; + bool m_proceed; + base::MessageBuilder m_messageBuilder; + base::DispatchAction m_dispatchAction; + std::vector m_loggerIds; + friend class el::Helpers; + + void initializeLogger(const std::string& loggerId, bool lookup = true, bool needLock = true) { + if (lookup) { + m_logger = ELPP->registeredLoggers()->get(loggerId, ELPP->hasFlag(LoggingFlag::CreateLoggerAutomatically)); + } + if (m_logger == nullptr) { + ELPP->acquireLock(); + if (!ELPP->registeredLoggers()->has(std::string(base::consts::kDefaultLoggerId))) { + // Somehow default logger has been unregistered. Not good! Register again + ELPP->registeredLoggers()->get(std::string(base::consts::kDefaultLoggerId)); + } + ELPP->releaseLock(); // Need to unlock it for next writer + Writer(Level::Debug, m_file, m_line, m_func).construct(1, base::consts::kDefaultLoggerId) + << "Logger [" << loggerId << "] is not registered yet!"; + m_proceed = false; + } else { + if (needLock) { + m_logger->acquireLock(); // This should not be unlocked by checking m_proceed because + // m_proceed can be changed by lines below + } + if (ELPP->hasFlag(LoggingFlag::HierarchicalLogging)) { + m_proceed = m_level == Level::Verbose ? m_logger->enabled(m_level) : + LevelHelper::castToInt(m_level) >= LevelHelper::castToInt(ELPP->m_loggingLevel); + } else { + m_proceed = m_logger->enabled(m_level); + } + } + } + + void processDispatch() { +#if ELPP_LOGGING_ENABLED + if (ELPP->hasFlag(LoggingFlag::MultiLoggerSupport)) { + bool firstDispatched = false; + base::type::string_t logMessage; + std::size_t i = 0; + do { + if (m_proceed) { + if (firstDispatched) { + m_logger->stream() << logMessage; + } else { + firstDispatched = true; + if (m_loggerIds.size() > 1) { + logMessage = m_logger->stream().str(); + } + } + triggerDispatch(); + } else if (m_logger != nullptr) { + m_logger->stream().str(ELPP_LITERAL("")); + m_logger->releaseLock(); + } + if (i + 1 < m_loggerIds.size()) { + initializeLogger(m_loggerIds.at(i + 1)); + } + } while (++i < m_loggerIds.size()); + } else { + if (m_proceed) { + triggerDispatch(); + } else if (m_logger != nullptr) { + m_logger->stream().str(ELPP_LITERAL("")); + m_logger->releaseLock(); + } + } +#else + if (m_logger != nullptr) { + m_logger->stream().str(ELPP_LITERAL("")); + m_logger->releaseLock(); + } +#endif // ELPP_LOGGING_ENABLED + } + + void triggerDispatch(void) { + if (m_proceed) { + base::LogDispatcher(m_proceed, LogMessage(m_level, m_file, m_line, m_func, m_verboseLevel, + m_logger), m_dispatchAction).dispatch(); + } + if (m_logger != nullptr) { + m_logger->stream().str(ELPP_LITERAL("")); + m_logger->releaseLock(); + } + if (m_proceed && m_level == Level::Fatal + && !ELPP->hasFlag(LoggingFlag::DisableApplicationAbortOnFatalLog)) { + base::Writer(Level::Warning, m_file, m_line, m_func).construct(1, base::consts::kDefaultLoggerId) + << "Aborting application. Reason: Fatal log at [" << m_file << ":" << m_line << "]"; + std::stringstream reasonStream; + reasonStream << "Fatal log at [" << m_file << ":" << m_line << "]" + << " If you wish to disable 'abort on fatal log' please use " + << "el::Helpers::addFlag(el::LoggingFlag::DisableApplicationAbortOnFatalLog)"; + base::utils::abort(1, reasonStream.str()); + } + m_proceed = false; + } +}; +class PErrorWriter : public base::Writer { +public: + PErrorWriter(Level level, const char* file, unsigned long int line, + const char* func, base::DispatchAction dispatchAction = base::DispatchAction::NormalLog, + base::type::VerboseLevel verboseLevel = 0) : + base::Writer(level, file, line, func, dispatchAction, verboseLevel) { + } + + virtual ~PErrorWriter(void) { + if (m_proceed) { +#if ELPP_COMPILER_MSVC + char buff[256]; + strerror_s(buff, 256, errno); + m_logger->stream() << ": " << buff << " [" << errno << "]"; +#else + m_logger->stream() << ": " << strerror(errno) << " [" << errno << "]"; +#endif + } + } +}; +} // namespace base +// Logging from Logger class. Why this is here? Because we have Storage and Writer class available +#if ELPP_VARIADIC_TEMPLATES_SUPPORTED + template + void Logger::log_(Level level, int vlevel, const char* s, const T& value, const Args&... args) { + base::MessageBuilder b; + b.initialize(this); + while (*s) { + if (*s == base::consts::kFormatSpecifierChar) { + if (*(s + 1) == base::consts::kFormatSpecifierChar) { + ++s; + } else { + if (*(s + 1) == base::consts::kFormatSpecifierCharValue) { + ++s; + b << value; + log_(level, vlevel, ++s, args...); + return; + } + } + } + b << *s++; + } + ELPP_INTERNAL_ERROR("Too many arguments provided. Unable to handle. Please provide more format specifiers", false); + } + template + inline void Logger::log_(Level level, int vlevel, const T& log) { + if (level == Level::Verbose) { + if (ELPP->vRegistry()->allowed(vlevel, __FILE__)) { + base::Writer(Level::Verbose, "FILE", 0, "FUNCTION", + base::DispatchAction::NormalLog, vlevel).construct(this, false) << log; + } else { + stream().str(ELPP_LITERAL("")); + } + } else { + base::Writer(level, "FILE", 0, "FUNCTION").construct(this, false) << log; + } + } + template + void Logger::log(Level level, const char* s, const T& value, const Args&... args) { + base::threading::ScopedLock scopedLock(lock()); + log_(level, 0, s, value, args...); + } + template + inline void Logger::log(Level level, const T& log) { + base::threading::ScopedLock scopedLock(lock()); + log_(level, 0, log); + } +# if ELPP_VERBOSE_LOG + template + inline void Logger::verbose(int vlevel, const char* s, const T& value, const Args&... args) { + base::threading::ScopedLock scopedLock(lock()); + log_(el::Level::Verbose, vlevel, s, value, args...); + } + template + inline void Logger::verbose(int vlevel, const T& log) { + base::threading::ScopedLock scopedLock(lock()); + log_(el::Level::Verbose, vlevel, log); + } +# else + template + inline void Logger::verbose(int, const char*, const T&, const Args&...) { + return; + } + template + inline void Logger::verbose(int, const T&) { + return; + } +# endif // ELPP_VERBOSE_LOG +# define LOGGER_LEVEL_WRITERS(FUNCTION_NAME, LOG_LEVEL)\ + template \ + inline void Logger::FUNCTION_NAME(const char* s, const T& value, const Args&... args) {\ + log(LOG_LEVEL, s, value, args...);\ + }\ + template \ + inline void Logger::FUNCTION_NAME(const T& value) {\ + log(LOG_LEVEL, value);\ + } +# define LOGGER_LEVEL_WRITERS_DISABLED(FUNCTION_NAME, LOG_LEVEL)\ + template \ + inline void Logger::FUNCTION_NAME(const char*, const T&, const Args&...) {\ + return;\ + }\ + template \ + inline void Logger::FUNCTION_NAME(const T&) {\ + return;\ + } + +# if ELPP_INFO_LOG + LOGGER_LEVEL_WRITERS(info, Level::Info) +# else + LOGGER_LEVEL_WRITERS_DISABLED(info, Level::Info) +# endif // ELPP_INFO_LOG +# if ELPP_DEBUG_LOG + LOGGER_LEVEL_WRITERS(debug, Level::Debug) +# else + LOGGER_LEVEL_WRITERS_DISABLED(debug, Level::Debug) +# endif // ELPP_DEBUG_LOG +# if ELPP_WARNING_LOG + LOGGER_LEVEL_WRITERS(warn, Level::Warning) +# else + LOGGER_LEVEL_WRITERS_DISABLED(warn, Level::Warning) +# endif // ELPP_WARNING_LOG +# if ELPP_ERROR_LOG + LOGGER_LEVEL_WRITERS(error, Level::Error) +# else + LOGGER_LEVEL_WRITERS_DISABLED(error, Level::Error) +# endif // ELPP_ERROR_LOG +# if ELPP_FATAL_LOG + LOGGER_LEVEL_WRITERS(fatal, Level::Fatal) +# else + LOGGER_LEVEL_WRITERS_DISABLED(fatal, Level::Fatal) +# endif // ELPP_FATAL_LOG +# if ELPP_TRACE_LOG + LOGGER_LEVEL_WRITERS(trace, Level::Trace) +# else + LOGGER_LEVEL_WRITERS_DISABLED(trace, Level::Trace) +# endif // ELPP_TRACE_LOG +# undef LOGGER_LEVEL_WRITERS +# undef LOGGER_LEVEL_WRITERS_DISABLED +#endif // ELPP_VARIADIC_TEMPLATES_SUPPORTED +#if ELPP_COMPILER_MSVC +# define ELPP_VARIADIC_FUNC_MSVC(variadicFunction, variadicArgs) variadicFunction variadicArgs +# define ELPP_VARIADIC_FUNC_MSVC_RUN(variadicFunction, ...) ELPP_VARIADIC_FUNC_MSVC(variadicFunction, (__VA_ARGS__)) +# define el_getVALength(...) ELPP_VARIADIC_FUNC_MSVC_RUN(el_resolveVALength, 0, ## __VA_ARGS__,\ + 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) +#else +# if ELPP_COMPILER_CLANG +# define el_getVALength(...) el_resolveVALength(0, __VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) +# else +# define el_getVALength(...) el_resolveVALength(0, ## __VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) +# endif // ELPP_COMPILER_CLANG +#endif // ELPP_COMPILER_MSVC +#define el_resolveVALength(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N +#define ELPP_WRITE_LOG(writer, level, dispatchAction, ...) \ + writer(level, __FILE__, __LINE__, ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) +#define ELPP_WRITE_LOG_IF(writer, condition, level, dispatchAction, ...) if (condition) \ + writer(level, __FILE__, __LINE__, ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) +#define ELPP_WRITE_LOG_EVERY_N(writer, occasion, level, dispatchAction, ...) \ + if (ELPP->validateEveryNCounter(__FILE__, __LINE__, occasion)) \ + writer(level, __FILE__, __LINE__, ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) +#define ELPP_WRITE_LOG_AFTER_N(writer, n, level, dispatchAction, ...) \ + if (ELPP->validateAfterNCounter(__FILE__, __LINE__, n)) \ + writer(level, __FILE__, __LINE__, ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) +#define ELPP_WRITE_LOG_N_TIMES(writer, n, level, dispatchAction, ...) \ + if (ELPP->validateNTimesCounter(__FILE__, __LINE__, n)) \ + writer(level, __FILE__, __LINE__, ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) +#undef ELPP_CURR_FILE_PERFORMANCE_LOGGER +#if defined(ELPP_PERFORMANCE_LOGGER) +# define ELPP_CURR_FILE_PERFORMANCE_LOGGER ELPP_PERFORMANCE_LOGGER +#else +# define ELPP_CURR_FILE_PERFORMANCE_LOGGER el::base::consts::kPerformanceLoggerId +#endif +class PerformanceTrackingData { +public: + enum class DataType : base::type::EnumType { + Checkpoint = 1, Complete = 2 + }; + // Do not use constructor, will run into multiple definition error, use init(PerformanceTracker*) + explicit PerformanceTrackingData(DataType dataType) : m_performanceTracker(nullptr), + m_dataType(dataType), m_file(""), m_line(0), m_func("") {} + inline const std::string* blockName(void) const; + inline const struct timeval* startTime(void) const; + inline const struct timeval* endTime(void) const; + inline const struct timeval* lastCheckpointTime(void) const; + inline const base::PerformanceTracker* performanceTracker(void) const { return m_performanceTracker; } + inline PerformanceTrackingData::DataType dataType(void) const { return m_dataType; } + inline bool firstCheckpoint(void) const { return m_firstCheckpoint; } + inline std::string checkpointId(void) const { return m_checkpointId; } + inline const char* file(void) const { return m_file; } + inline unsigned long int line(void) const { return m_line; } + inline const char* func(void) const { return m_func; } + inline const base::type::string_t* formattedTimeTaken() const { return &m_formattedTimeTaken; } + inline const std::string& loggerId(void) const; +private: + base::PerformanceTracker* m_performanceTracker; + base::type::string_t m_formattedTimeTaken; + PerformanceTrackingData::DataType m_dataType; + bool m_firstCheckpoint; + std::string m_checkpointId; + const char* m_file; + unsigned long int m_line; + const char* m_func; + inline void init(base::PerformanceTracker* performanceTracker, bool firstCheckpoint = false) { + m_performanceTracker = performanceTracker; + m_firstCheckpoint = firstCheckpoint; + } + + friend class el::base::PerformanceTracker; +}; +namespace base { +/// @brief Represents performanceTracker block of code that conditionally adds performance status to log +/// either when goes outside the scope of when checkpoint() is called +class PerformanceTracker : public base::threading::ThreadSafe, public Loggable { +public: + PerformanceTracker(const std::string& blockName, + base::TimestampUnit timestampUnit = base::TimestampUnit::Millisecond, + const std::string& loggerId = std::string(ELPP_CURR_FILE_PERFORMANCE_LOGGER), + bool scopedLog = true, Level level = base::consts::kPerformanceTrackerDefaultLevel) : + m_blockName(blockName), m_timestampUnit(timestampUnit), m_loggerId(loggerId), m_scopedLog(scopedLog), + m_level(level), m_hasChecked(false), m_lastCheckpointId(std::string()), m_enabled(false) { +#if !defined(ELPP_DISABLE_PERFORMANCE_TRACKING) && ELPP_LOGGING_ENABLED + // We store it locally so that if user happen to change configuration by the end of scope + // or before calling checkpoint, we still depend on state of configuraton at time of construction + el::Logger* loggerPtr = ELPP->registeredLoggers()->get(loggerId, false); + m_enabled = loggerPtr != nullptr && loggerPtr->m_typedConfigurations->performanceTracking(m_level); + if (m_enabled) { + base::utils::DateTime::gettimeofday(&m_startTime); + } +#endif // !defined(ELPP_DISABLE_PERFORMANCE_TRACKING) && ELPP_LOGGING_ENABLED + } + /// @brief Copy constructor + PerformanceTracker(const PerformanceTracker& t) : + m_blockName(t.m_blockName), m_timestampUnit(t.m_timestampUnit), m_loggerId(t.m_loggerId), m_scopedLog(t.m_scopedLog), + m_level(t.m_level), m_hasChecked(t.m_hasChecked), m_lastCheckpointId(t.m_lastCheckpointId), m_enabled(t.m_enabled), + m_startTime(t.m_startTime), m_endTime(t.m_endTime), m_lastCheckpointTime(t.m_lastCheckpointTime) { + } + virtual ~PerformanceTracker(void) { +#if !defined(ELPP_DISABLE_PERFORMANCE_TRACKING) && ELPP_LOGGING_ENABLED + if (m_enabled) { + base::threading::ScopedLock scopedLock(lock()); + if (m_scopedLog) { + base::utils::DateTime::gettimeofday(&m_endTime); + base::type::string_t formattedTime = getFormattedTimeTaken(); + PerformanceTrackingData data(PerformanceTrackingData::DataType::Complete); + data.init(this); + data.m_formattedTimeTaken = formattedTime; + PerformanceTrackingCallback* callback = nullptr; + for (const std::pair& h + : ELPP->m_performanceTrackingCallbacks) { + callback = h.second.get(); + if (callback != nullptr && callback->enabled()) { + callback->acquireLock(); + callback->handle(&data); + callback->releaseLock(); + } + } + } + } +#endif // !defined(ELPP_DISABLE_PERFORMANCE_TRACKING) + } + /// @brief A checkpoint for current performanceTracker block. + void checkpoint(const std::string& id = std::string(), const char* file = __FILE__, unsigned long int line = __LINE__, const char* func = "") { +#if !defined(ELPP_DISABLE_PERFORMANCE_TRACKING) && ELPP_LOGGING_ENABLED + if (m_enabled) { + base::threading::ScopedLock scopedLock(lock()); + base::utils::DateTime::gettimeofday(&m_endTime); + base::type::string_t formattedTime = m_hasChecked ? getFormattedTimeTaken(m_lastCheckpointTime) : ELPP_LITERAL(""); + PerformanceTrackingData data(PerformanceTrackingData::DataType::Checkpoint); + data.init(this); + data.m_checkpointId = id; + data.m_file = file; + data.m_line = line; + data.m_func = func; + data.m_formattedTimeTaken = formattedTime; + PerformanceTrackingCallback* callback = nullptr; + for (const std::pair& h + : ELPP->m_performanceTrackingCallbacks) { + callback = h.second.get(); + if (callback != nullptr && callback->enabled()) { + callback->acquireLock(); + callback->handle(&data); + callback->releaseLock(); + } + } + base::utils::DateTime::gettimeofday(&m_lastCheckpointTime); + m_hasChecked = true; + m_lastCheckpointId = id; + } +#endif // !defined(ELPP_DISABLE_PERFORMANCE_TRACKING) && ELPP_LOGGING_ENABLED + ELPP_UNUSED(id); + ELPP_UNUSED(file); + ELPP_UNUSED(line); + ELPP_UNUSED(func); + } + inline Level level(void) const { return m_level; } +private: + std::string m_blockName; + base::TimestampUnit m_timestampUnit; + std::string m_loggerId; + bool m_scopedLog; + Level m_level; + bool m_hasChecked; + std::string m_lastCheckpointId; + bool m_enabled; + struct timeval m_startTime, m_endTime, m_lastCheckpointTime; + + PerformanceTracker(void); + + friend class el::PerformanceTrackingData; + friend class base::DefaultPerformanceTrackingCallback; + + const inline base::type::string_t getFormattedTimeTaken() const { + return getFormattedTimeTaken(m_startTime); + } + + const base::type::string_t getFormattedTimeTaken(struct timeval startTime) const { + if (ELPP->hasFlag(LoggingFlag::FixedTimeFormat)) { + base::type::stringstream_t ss; + ss << base::utils::DateTime::getTimeDifference(m_endTime, + startTime, m_timestampUnit) << " " << base::consts::kTimeFormats[static_cast(m_timestampUnit)].unit; + return ss.str(); + } + return base::utils::DateTime::formatTime(base::utils::DateTime::getTimeDifference(m_endTime, + startTime, m_timestampUnit), m_timestampUnit); + } + + virtual inline void log(el::base::type::ostream_t& os) const { + os << getFormattedTimeTaken(); + } +}; +class DefaultPerformanceTrackingCallback : public PerformanceTrackingCallback { +protected: + void handle(const PerformanceTrackingData* data) { + m_data = data; + base::type::stringstream_t ss; + if (m_data->dataType() == PerformanceTrackingData::DataType::Complete) { + ss << ELPP_LITERAL("Executed [") << m_data->blockName()->c_str() << ELPP_LITERAL("] in [") << *m_data->formattedTimeTaken() << ELPP_LITERAL("]"); + } else { + ss << ELPP_LITERAL("Performance checkpoint"); + if (!m_data->checkpointId().empty()) { + ss << ELPP_LITERAL(" [") << m_data->checkpointId().c_str() << ELPP_LITERAL("]"); + } + ss << ELPP_LITERAL(" for block [") << m_data->blockName()->c_str() << ELPP_LITERAL("] : [") << *m_data->performanceTracker(); + if (!ELPP->hasFlag(LoggingFlag::DisablePerformanceTrackingCheckpointComparison) && m_data->performanceTracker()->m_hasChecked) { + ss << ELPP_LITERAL(" ([") << *m_data->formattedTimeTaken() << ELPP_LITERAL("] from "); + if (m_data->performanceTracker()->m_lastCheckpointId.empty()) { + ss << ELPP_LITERAL("last checkpoint"); + } else { + ss << ELPP_LITERAL("checkpoint '") << m_data->performanceTracker()->m_lastCheckpointId.c_str() << ELPP_LITERAL("'"); + } + ss << ELPP_LITERAL(")]"); + } else { + ss << ELPP_LITERAL("]"); + } + } + el::base::Writer(m_data->performanceTracker()->level(), m_data->file(), m_data->line(), m_data->func()).construct(1, m_data->loggerId().c_str()) << ss.str(); + } +private: + const PerformanceTrackingData* m_data; +}; +} // namespace base +inline const std::string* PerformanceTrackingData::blockName() const { + return const_cast(&m_performanceTracker->m_blockName); +} +inline const struct timeval* PerformanceTrackingData::startTime() const { + return const_cast(&m_performanceTracker->m_startTime); +} +inline const struct timeval* PerformanceTrackingData::endTime() const { + return const_cast(&m_performanceTracker->m_endTime); +} +inline const struct timeval* PerformanceTrackingData::lastCheckpointTime() const { + return const_cast(&m_performanceTracker->m_lastCheckpointTime); +} +inline const std::string& PerformanceTrackingData::loggerId(void) const { return m_performanceTracker->m_loggerId; } +namespace base { +/// @brief Contains some internal debugging tools like crash handler and stack tracer +namespace debug { +class StackTrace : base::NoCopy { +public: + static const std::size_t kMaxStack = 64; + static const std::size_t kStackStart = 2; // We want to skip c'tor and StackTrace::generateNew() + class StackTraceEntry { + public: + StackTraceEntry(std::size_t index, const char* loc, const char* demang, const char* hex, const char* addr) { + m_index = index; + m_location = std::string(loc); + m_demangled = std::string(demang); + m_hex = std::string(hex); + m_addr = std::string(addr); + } + StackTraceEntry(std::size_t index, char* loc) { + m_index = index; + m_location = std::string(loc); + } + std::size_t m_index; + std::string m_location; + std::string m_demangled; + std::string m_hex; + std::string m_addr; + friend std::ostream& operator<<(std::ostream& ss, const StackTraceEntry& si) { + ss << "[" << si.m_index << "] " << si.m_location << (si.m_demangled.empty() ? "" : ":") << si.m_demangled + << (si.m_hex.empty() ? "" : "+") << si.m_hex << si.m_addr; + return ss; + } + + private: + StackTraceEntry(void); + }; + + StackTrace(void) { + generateNew(); + } + + virtual ~StackTrace(void) { + } + + inline std::vector& getLatestStack(void) { + return m_stack; + } + + friend inline std::ostream& operator<<(std::ostream& os, const StackTrace& st) { + std::vector::const_iterator it = st.m_stack.begin(); + while (it != st.m_stack.end()) { + os << " " << *it++ << "\n"; + } + return os; + } + +private: + std::vector m_stack; + + void generateNew(void) { +#if ELPP_STACKTRACE + m_stack.clear(); + void* stack[kMaxStack]; + std::size_t size = backtrace(stack, kMaxStack); + char** strings = backtrace_symbols(stack, size); + if (size > kStackStart) { // Skip StackTrace c'tor and generateNew + for (std::size_t i = kStackStart; i < size; ++i) { + char* mangName = nullptr; + char* hex = nullptr; + char* addr = nullptr; + for (char* c = strings[i]; *c; ++c) { + switch (*c) { + case '(': + mangName = c; + break; + case '+': + hex = c; + break; + case ')': + addr = c; + break; + } + } + // Perform demangling if parsed properly + if (mangName != nullptr && hex != nullptr && addr != nullptr && mangName < hex) { + *mangName++ = '\0'; + *hex++ = '\0'; + *addr++ = '\0'; + int status = 0; + char* demangName = abi::__cxa_demangle(mangName, 0, 0, &status); + // if demangling is successful, output the demangled function name + if (status == 0) { + // Success (see http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.3/a01696.html) + StackTraceEntry entry(i - 1, strings[i], demangName, hex, addr); + m_stack.push_back(entry); + } else { + // Not successful - we will use mangled name + StackTraceEntry entry(i - 1, strings[i], mangName, hex, addr); + m_stack.push_back(entry); + } + free(demangName); + } else { + StackTraceEntry entry(i - 1, strings[i]); + m_stack.push_back(entry); + } + } + } + free(strings); +#else + ELPP_INTERNAL_INFO(1, "Stacktrace generation not supported for selected compiler"); +#endif // ELPP_STACKTRACE + } +}; +static std::string crashReason(int sig) { + std::stringstream ss; + bool foundReason = false; + for (int i = 0; i < base::consts::kCrashSignalsCount; ++i) { + if (base::consts::kCrashSignals[i].numb == sig) { + ss << "Application has crashed due to [" << base::consts::kCrashSignals[i].name << "] signal"; + if (ELPP->hasFlag(el::LoggingFlag::LogDetailedCrashReason)) { + ss << std::endl << + " " << base::consts::kCrashSignals[i].brief << std::endl << + " " << base::consts::kCrashSignals[i].detail; + } + foundReason = true; + } + } + if (!foundReason) { + ss << "Application has crashed due to unknown signal [" << sig << "]"; + } + return ss.str(); +} +/// @brief Logs reason of crash from sig +static void logCrashReason(int sig, bool stackTraceIfAvailable, Level level, const char* logger) { + std::stringstream ss; + ss << "CRASH HANDLED; "; + ss << crashReason(sig); +#if ELPP_STACKTRACE + if (stackTraceIfAvailable) { + ss << std::endl << " ======= Backtrace: =========" << std::endl << base::debug::StackTrace(); + } +#else + ELPP_UNUSED(stackTraceIfAvailable); +#endif // ELPP_STACKTRACE + ELPP_WRITE_LOG(el::base::Writer, level, base::DispatchAction::NormalLog, logger) << ss.str(); +} +static inline void crashAbort(int sig) { + base::utils::abort(sig); +} +/// @brief Default application crash handler +/// +/// @detail This function writes log using 'default' logger, prints stack trace for GCC based compilers and aborts program. +static inline void defaultCrashHandler(int sig) { + base::debug::logCrashReason(sig, true, Level::Fatal, base::consts::kDefaultLoggerId); + base::debug::crashAbort(sig); +} +/// @brief Handles unexpected crashes +class CrashHandler : base::NoCopy { +public: + typedef void (*Handler)(int); + + explicit CrashHandler(bool useDefault) { + if (useDefault) { + setHandler(defaultCrashHandler); + } + } + explicit CrashHandler(const Handler& cHandler) { + setHandler(cHandler); + } + void setHandler(const Handler& cHandler) { + m_handler = cHandler; +#if defined(ELPP_HANDLE_SIGABRT) + int i = 0; // SIGABRT is at base::consts::kCrashSignals[0] +#else + int i = 1; +#endif // defined(ELPP_HANDLE_SIGABRT) + for (; i < base::consts::kCrashSignalsCount; ++i) { + m_handler = signal(base::consts::kCrashSignals[i].numb, cHandler); + } + } + +private: + Handler m_handler; +}; +} // namespace debug +} // namespace base +extern base::debug::CrashHandler elCrashHandler; +#define MAKE_LOGGABLE(ClassType, ClassInstance, OutputStreamInstance) \ + el::base::type::ostream_t& operator<<(el::base::type::ostream_t& OutputStreamInstance, const ClassType& ClassInstance) +/// @brief Initializes syslog with process ID, options and facility. calls closelog() on d'tor +class SysLogInitializer { +public: + SysLogInitializer(const char* processIdent, int options = 0, int facility = 0) { +#if defined(ELPP_SYSLOG) + openlog(processIdent, options, facility); +#else + ELPP_UNUSED(processIdent); + ELPP_UNUSED(options); + ELPP_UNUSED(facility); +#endif // defined(ELPP_SYSLOG) + } + virtual ~SysLogInitializer(void) { +#if defined(ELPP_SYSLOG) + closelog(); +#endif // defined(ELPP_SYSLOG) + } +}; +#define ELPP_INITIALIZE_SYSLOG(id, opt, fac) el::SysLogInitializer elSyslogInit(id, opt, fac) +/// @brief Static helpers for developers +class Helpers : base::StaticClass { +public: + /// @brief Shares logging repository (base::Storage) + static inline void setStorage(base::type::StoragePointer storage) { + ELPP = storage; + } + /// @return Main storage repository + static inline base::type::StoragePointer storage() { + return ELPP; + } + /// @brief Sets application arguments and figures out whats active for logging and whats not. + static inline void setArgs(int argc, char** argv) { + ELPP->setApplicationArguments(argc, argv); + } + /// @copydoc setArgs(int argc, char** argv) + static inline void setArgs(int argc, const char** argv) { + ELPP->setApplicationArguments(argc, const_cast(argv)); + } + /// @brief Overrides default crash handler and installs custom handler. + /// @param crashHandler A functor with no return type that takes single int argument. + /// Handler is a typedef with specification: void (*Handler)(int) + static inline void setCrashHandler(const el::base::debug::CrashHandler::Handler& crashHandler) { + el::elCrashHandler.setHandler(crashHandler); + } + /// @brief Abort due to crash with signal in parameter + /// @param sig Crash signal + static inline void crashAbort(int sig, const char* sourceFile = "", unsigned int long line = 0) { + std::stringstream ss; + ss << base::debug::crashReason(sig).c_str(); + ss << " - [Called el::Helpers::crashAbort(" << sig << ")]"; + if (sourceFile != nullptr && strlen(sourceFile) > 0) { + ss << " - Source: " << sourceFile; + if (line > 0) + ss << ":" << line; + else + ss << " (line number not specified)"; + } + base::utils::abort(sig, ss.str()); + } + /// @brief Logs reason of crash as per sig + /// @param sig Crash signal + /// @param stackTraceIfAvailable Includes stack trace if available + /// @param level Logging level + /// @param logger Logger to use for logging + static inline void logCrashReason(int sig, bool stackTraceIfAvailable = false, + Level level = Level::Fatal, const char* logger = base::consts::kDefaultLoggerId) { + el::base::debug::logCrashReason(sig, stackTraceIfAvailable, level, logger); + } + /// @brief Installs pre rollout callback, this callback is triggered when log file is about to be rolled out + /// (can be useful for backing up) + static inline void installPreRollOutCallback(const PreRollOutCallback& callback) { + ELPP->setPreRollOutCallback(callback); + } + /// @brief Uninstalls pre rollout callback + static inline void uninstallPreRollOutCallback(void) { + ELPP->unsetPreRollOutCallback(); + } + /// @brief Installs post log dispatch callback, this callback is triggered when log is dispatched + template + static inline bool installLogDispatchCallback(const std::string& id) { + return ELPP->installLogDispatchCallback(id); + } + /// @brief Uninstalls log dispatch callback + template + static inline void uninstallLogDispatchCallback(const std::string& id) { + ELPP->uninstallLogDispatchCallback(id); + } + template + static inline T* logDispatchCallback(const std::string& id) { + return ELPP->logDispatchCallback(id); + } + /// @brief Installs post performance tracking callback, this callback is triggered when performance tracking is finished + template + static inline bool installPerformanceTrackingCallback(const std::string& id) { + return ELPP->installPerformanceTrackingCallback(id); + } + /// @brief Uninstalls post performance tracking handler + template + static inline void uninstallPerformanceTrackingCallback(const std::string& id) { + ELPP->uninstallPerformanceTrackingCallback(id); + } + template + static inline T* performanceTrackingCallback(const std::string& id) { + return ELPP->performanceTrackingCallback(id); + } + /// @brief Converts template to std::string - useful for loggable classes to log containers within log(std::ostream&) const + template + static std::string convertTemplateToStdString(const T& templ) { + el::Logger* logger = + ELPP->registeredLoggers()->get(el::base::consts::kDefaultLoggerId); + if (logger == nullptr) { + return std::string(); + } + base::MessageBuilder b; + b.initialize(logger); + logger->acquireLock(); + b << templ; +#if defined(ELPP_UNICODE) + std::string s = std::string(logger->stream().str().begin(), logger->stream().str().end()); +#else + std::string s = logger->stream().str(); +#endif // defined(ELPP_UNICODE) + logger->stream().str(ELPP_LITERAL("")); + logger->releaseLock(); + return s; + } + /// @brief Returns command line arguments (pointer) provided to easylogging++ + static inline const el::base::utils::CommandLineArgs* commandLineArgs(void) { + return ELPP->commandLineArgs(); + } + /// @brief Installs user defined format specifier and handler + static inline void installCustomFormatSpecifier(const CustomFormatSpecifier& customFormatSpecifier) { + ELPP->installCustomFormatSpecifier(customFormatSpecifier); + } + /// @brief Uninstalls user defined format specifier and handler + static inline bool uninstallCustomFormatSpecifier(const char* formatSpecifier) { + return ELPP->uninstallCustomFormatSpecifier(formatSpecifier); + } + /// @brief Returns true if custom format specifier is installed + static inline bool hasCustomFormatSpecifier(const char* formatSpecifier) { + return ELPP->hasCustomFormatSpecifier(formatSpecifier); + } + static inline void validateFileRolling(Logger* logger, Level level) { + if (logger == nullptr) return; + logger->m_typedConfigurations->validateFileRolling(level, ELPP->preRollOutCallback()); + } +}; +/// @brief Static helpers to deal with loggers and their configurations +class Loggers : base::StaticClass { +public: + /// @brief Gets existing or registers new logger + static inline Logger* getLogger(const std::string& identity, bool registerIfNotAvailable = true) { + base::threading::ScopedLock scopedLock(ELPP->lock()); + return ELPP->registeredLoggers()->get(identity, registerIfNotAvailable); + } + /// @brief Unregisters logger - use it only when you know what you are doing, you may unregister + /// loggers initialized / used by third-party libs. + static inline bool unregisterLogger(const std::string& identity) { + base::threading::ScopedLock scopedLock(ELPP->lock()); + return ELPP->registeredLoggers()->remove(identity); + } + /// @brief Whether or not logger with id is registered + static inline bool hasLogger(const std::string& identity) { + base::threading::ScopedLock scopedLock(ELPP->lock()); + return ELPP->registeredLoggers()->has(identity); + } + /// @brief Reconfigures specified logger with new configurations + static inline Logger* reconfigureLogger(Logger* logger, const Configurations& configurations) { + if (!logger) return nullptr; + logger->configure(configurations); + return logger; + } + /// @brief Reconfigures logger with new configurations after looking it up using identity + static inline Logger* reconfigureLogger(const std::string& identity, const Configurations& configurations) { + return Loggers::reconfigureLogger(Loggers::getLogger(identity), configurations); + } + /// @brief Reconfigures logger's single configuration + static inline Logger* reconfigureLogger(const std::string& identity, ConfigurationType configurationType, + const std::string& value) { + Logger* logger = Loggers::getLogger(identity); + if (logger == nullptr) { + return nullptr; + } + logger->configurations()->set(Level::Global, configurationType, value); + logger->reconfigure(); + return logger; + } + /// @brief Reconfigures all the existing loggers with new configurations + static inline void reconfigureAllLoggers(const Configurations& configurations) { + for (base::RegisteredLoggers::iterator it = ELPP->registeredLoggers()->begin(); + it != ELPP->registeredLoggers()->end(); ++it) { + Loggers::reconfigureLogger(it->second, configurations); + } + } + /// @brief Reconfigures single configuration for all the loggers + static inline void reconfigureAllLoggers(ConfigurationType configurationType, const std::string& value) { + reconfigureAllLoggers(Level::Global, configurationType, value); + } + /// @brief Reconfigures single configuration for all the loggers for specified level + static inline void reconfigureAllLoggers(Level level, ConfigurationType configurationType, + const std::string& value) { + for (base::RegisteredLoggers::iterator it = ELPP->registeredLoggers()->begin(); + it != ELPP->registeredLoggers()->end(); ++it) { + Logger* logger = it->second; + logger->configurations()->set(level, configurationType, value); + logger->reconfigure(); + } + } + /// @brief Sets default configurations. This configuration is used for future (and conditionally for existing) loggers + static inline void setDefaultConfigurations(const Configurations& configurations, bool reconfigureExistingLoggers = false) { + ELPP->registeredLoggers()->setDefaultConfigurations(configurations); + if (reconfigureExistingLoggers) { + Loggers::reconfigureAllLoggers(configurations); + } + } + /// @brief Returns current default + static inline const Configurations* defaultConfigurations(void) { + return ELPP->registeredLoggers()->defaultConfigurations(); + } + /// @brief Returns log stream reference pointer if needed by user + static inline const base::LogStreamsReferenceMap* logStreamsReference(void) { + return ELPP->registeredLoggers()->logStreamsReference(); + } + /// @brief Default typed configuration based on existing defaultConf + static base::TypedConfigurations defaultTypedConfigurations(void) { + return base::TypedConfigurations( + ELPP->registeredLoggers()->defaultConfigurations(), + ELPP->registeredLoggers()->logStreamsReference()); + } + /// @brief Populates all logger IDs in current repository. + /// @param [out] targetList List of fill up. + static inline std::vector* populateAllLoggerIds(std::vector* targetList) { + targetList->clear(); + for (base::RegisteredLoggers::iterator it = ELPP->registeredLoggers()->list().begin(); + it != ELPP->registeredLoggers()->list().end(); ++it) { + targetList->push_back(it->first); + } + return targetList; + } + /// @brief Sets configurations from global configuration file. + static void configureFromGlobal(const char* globalConfigurationFilePath) { + std::ifstream gcfStream(globalConfigurationFilePath, std::ifstream::in); + ELPP_ASSERT(gcfStream.is_open(), "Unable to open global configuration file [" << globalConfigurationFilePath + << "] for parsing."); + std::string line = std::string(); + std::stringstream ss; + Logger* logger = nullptr; + auto configure = [&](void) { + ELPP_INTERNAL_INFO(8, "Configuring logger: '" << logger->id() << "' with configurations \n" << ss.str() + << "\n--------------"); + Configurations c; + c.parseFromText(ss.str()); + logger->configure(c); + }; + while (gcfStream.good()) { + std::getline(gcfStream, line); + ELPP_INTERNAL_INFO(1, "Parsing line: " << line); + base::utils::Str::trim(line); + if (Configurations::Parser::isComment(line)) continue; + Configurations::Parser::ignoreComments(&line); + base::utils::Str::trim(line); + if (line.size() > 2 && base::utils::Str::startsWith(line, std::string(base::consts::kConfigurationLoggerId))) { + if (!ss.str().empty() && logger != nullptr) { + configure(); + } + ss.str(std::string("")); + line = line.substr(2); + base::utils::Str::trim(line); + if (line.size() > 1) { + ELPP_INTERNAL_INFO(1, "Getting logger: '" << line << "'"); + logger = getLogger(line); + } + } else { + ss << line << "\n"; + } + } + if (!ss.str().empty() && logger != nullptr) { + configure(); + } + } + /// @brief Configures loggers using command line arg. Ensure you have already set command line args, + /// @return False if invalid argument or argument with no value provided, true if attempted to configure logger. + /// If true is returned that does not mean it has been configured successfully, it only means that it + /// has attempeted to configure logger using configuration file provided in argument + static inline bool configureFromArg(const char* argKey) { +#if defined(ELPP_DISABLE_CONFIGURATION_FROM_PROGRAM_ARGS) + ELPP_UNUSED(argKey); +#else + if (!Helpers::commandLineArgs()->hasParamWithValue(argKey)) { + return false; + } + configureFromGlobal(Helpers::commandLineArgs()->getParamValue(argKey)); +#endif // defined(ELPP_DISABLE_CONFIGURATION_FROM_PROGRAM_ARGS) + return true; + } + /// @brief Flushes all loggers for all levels - Be careful if you dont know how many loggers are registered + static inline void flushAll(void) { + ELPP->registeredLoggers()->flushAll(); + } + /// @brief Adds logging flag used internally. + static inline void addFlag(LoggingFlag flag) { + ELPP->addFlag(flag); + } + /// @brief Removes logging flag used internally. + static inline void removeFlag(LoggingFlag flag) { + ELPP->removeFlag(flag); + } + /// @brief Determines whether or not certain flag is active + static inline bool hasFlag(LoggingFlag flag) { + return ELPP->hasFlag(flag); + } + /// @brief Adds flag and removes it when scope goes out + class ScopedAddFlag { + public: + ScopedAddFlag(LoggingFlag flag) : m_flag(flag) { Loggers::addFlag(m_flag); } + ~ScopedAddFlag(void) { Loggers::removeFlag(m_flag); } + private: + LoggingFlag m_flag; + }; + /// @brief Removes flag and add it when scope goes out + class ScopedRemoveFlag { + public: + ScopedRemoveFlag(LoggingFlag flag) : m_flag(flag) { Loggers::removeFlag(m_flag); } + ~ScopedRemoveFlag(void) { Loggers::addFlag(m_flag); } + private: + LoggingFlag m_flag; + }; + /// @brief Sets hierarchy for logging. Needs to enable logging flag (HierarchicalLogging) + static inline void setLoggingLevel(Level level) { + ELPP->setLoggingLevel(level); + } + /// @brief Sets verbose level on the fly + static inline void setVerboseLevel(base::type::VerboseLevel level) { + ELPP->vRegistry()->setLevel(level); + } + /// @brief Gets current verbose level + static inline base::type::VerboseLevel verboseLevel(void) { + return ELPP->vRegistry()->level(); + } + /// @brief Sets vmodules as specified (on the fly) + static inline void setVModules(const char* modules) { + if (ELPP->vRegistry()->vModulesEnabled()) { + ELPP->vRegistry()->setModules(modules); + } + } + /// @brief Clears vmodules + static inline void clearVModules(void) { + ELPP->vRegistry()->clearModules(); + } +}; +class VersionInfo : base::StaticClass { +public: + /// @brief Current version number + static inline const std::string version(void) { return std::string("9.80"); } + /// @brief Release date of current version + static inline const std::string releaseDate(void) { return std::string("08-01-2015 0850hrs"); } +}; +} // namespace el +#undef VLOG_IS_ON +/// @brief Determines whether verbose logging is on for specified level current file. +#define VLOG_IS_ON(verboseLevel) (ELPP->vRegistry()->allowed(verboseLevel, __FILE__)) +#undef TIMED_BLOCK +#undef TIMED_SCOPE +#undef TIMED_FUNC +#undef ELPP_MIN_UNIT +#if defined(ELPP_PERFORMANCE_MICROSECONDS) +# define ELPP_MIN_UNIT el::base::TimestampUnit::Microsecond +#else +# define ELPP_MIN_UNIT el::base::TimestampUnit::Millisecond +#endif // (defined(ELPP_PERFORMANCE_MICROSECONDS)) +/// @brief Performance tracked scope. Performance gets written when goes out of scope using +/// 'performance' logger. +/// +/// @detail Please note in order to check the performance at a certain time you can use obj.checkpoint(); +/// @see el::base::PerformanceTracker +/// @see el::base::PerformanceTracker::checkpoint +// Note: Do not surround this definition with null macro because of obj instance +#define TIMED_SCOPE(obj, blockname) el::base::PerformanceTracker obj(blockname, ELPP_MIN_UNIT) +#define TIMED_BLOCK(obj, blockName) for (struct { int i; el::base::PerformanceTracker timer; } obj = { 0, \ + el::base::PerformanceTracker(blockName, ELPP_MIN_UNIT) }; obj.i < 1; ++obj.i) +/// @brief Performance tracked function. Performance gets written when goes out of scope using +/// 'performance' logger. +/// +/// @detail Please note in order to check the performance at a certain time you can use obj.checkpoint(); +/// @see el::base::PerformanceTracker +/// @see el::base::PerformanceTracker::checkpoint +#define TIMED_FUNC(obj) TIMED_SCOPE(obj, ELPP_FUNC) +#undef PERFORMANCE_CHECKPOINT +#undef PERFORMANCE_CHECKPOINT_WITH_ID +#define PERFORMANCE_CHECKPOINT(obj) obj.checkpoint(std::string(), __FILE__, __LINE__, ELPP_FUNC) +#define PERFORMANCE_CHECKPOINT_WITH_ID(obj, id) obj.checkpoint(id, __FILE__, __LINE__, ELPP_FUNC) +#undef ELPP_COUNTER +#undef ELPP_COUNTER_POS +/// @brief Gets hit counter for file/line +#define ELPP_COUNTER (ELPP->hitCounters()->getCounter(__FILE__, __LINE__)) +/// @brief Gets hit counter position for file/line, -1 if not registered yet +#define ELPP_COUNTER_POS (ELPP_COUNTER == nullptr ? -1 : ELPP_COUNTER->hitCounts()) +// Undef levels to support LOG(LEVEL) +#undef INFO +#undef WARNING +#undef DEBUG +#undef ERROR +#undef FATAL +#undef TRACE +#undef VERBOSE +// Undef existing +#undef CINFO +#undef CWARNING +#undef CDEBUG +#undef CFATAL +#undef CERROR +#undef CTRACE +#undef CVERBOSE +#undef CINFO_IF +#undef CWARNING_IF +#undef CDEBUG_IF +#undef CERROR_IF +#undef CFATAL_IF +#undef CTRACE_IF +#undef CVERBOSE_IF +#undef CINFO_EVERY_N +#undef CWARNING_EVERY_N +#undef CDEBUG_EVERY_N +#undef CERROR_EVERY_N +#undef CFATAL_EVERY_N +#undef CTRACE_EVERY_N +#undef CVERBOSE_EVERY_N +#undef CINFO_AFTER_N +#undef CWARNING_AFTER_N +#undef CDEBUG_AFTER_N +#undef CERROR_AFTER_N +#undef CFATAL_AFTER_N +#undef CTRACE_AFTER_N +#undef CVERBOSE_AFTER_N +#undef CINFO_N_TIMES +#undef CWARNING_N_TIMES +#undef CDEBUG_N_TIMES +#undef CERROR_N_TIMES +#undef CFATAL_N_TIMES +#undef CTRACE_N_TIMES +#undef CVERBOSE_N_TIMES +// Normal logs +#if ELPP_INFO_LOG +# define CINFO(writer, dispatchAction, ...) ELPP_WRITE_LOG(writer, el::Level::Info, dispatchAction, __VA_ARGS__) +#else +# define CINFO(writer, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_INFO_LOG +#if ELPP_WARNING_LOG +# define CWARNING(writer, dispatchAction, ...) ELPP_WRITE_LOG(writer, el::Level::Warning, dispatchAction, __VA_ARGS__) +#else +# define CWARNING(writer, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_WARNING_LOG +#if ELPP_DEBUG_LOG +# define CDEBUG(writer, dispatchAction, ...) ELPP_WRITE_LOG(writer, el::Level::Debug, dispatchAction, __VA_ARGS__) +#else +# define CDEBUG(writer, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_DEBUG_LOG +#if ELPP_ERROR_LOG +# define CERROR(writer, dispatchAction, ...) ELPP_WRITE_LOG(writer, el::Level::Error, dispatchAction, __VA_ARGS__) +#else +# define CERROR(writer, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_ERROR_LOG +#if ELPP_FATAL_LOG +# define CFATAL(writer, dispatchAction, ...) ELPP_WRITE_LOG(writer, el::Level::Fatal, dispatchAction, __VA_ARGS__) +#else +# define CFATAL(writer, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_FATAL_LOG +#if ELPP_TRACE_LOG +# define CTRACE(writer, dispatchAction, ...) ELPP_WRITE_LOG(writer, el::Level::Trace, dispatchAction, __VA_ARGS__) +#else +# define CTRACE(writer, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_TRACE_LOG +#if ELPP_VERBOSE_LOG +# define CVERBOSE(writer, vlevel, dispatchAction, ...) if (VLOG_IS_ON(vlevel)) writer(\ + el::Level::Verbose, __FILE__, __LINE__, ELPP_FUNC, dispatchAction, vlevel).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) +#else +# define CVERBOSE(writer, vlevel, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_VERBOSE_LOG +// Conditional logs +#if ELPP_INFO_LOG +# define CINFO_IF(writer, condition_, dispatchAction, ...) \ + ELPP_WRITE_LOG_IF(writer, (condition_), el::Level::Info, dispatchAction, __VA_ARGS__) +#else +# define CINFO_IF(writer, condition_, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_INFO_LOG +#if ELPP_WARNING_LOG +# define CWARNING_IF(writer, condition_, dispatchAction, ...)\ + ELPP_WRITE_LOG_IF(writer, (condition_), el::Level::Warning, dispatchAction, __VA_ARGS__) +#else +# define CWARNING_IF(writer, condition_, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_WARNING_LOG +#if ELPP_DEBUG_LOG +# define CDEBUG_IF(writer, condition_, dispatchAction, ...)\ + ELPP_WRITE_LOG_IF(writer, (condition_), el::Level::Debug, dispatchAction, __VA_ARGS__) +#else +# define CDEBUG_IF(writer, condition_, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_DEBUG_LOG +#if ELPP_ERROR_LOG +# define CERROR_IF(writer, condition_, dispatchAction, ...)\ + ELPP_WRITE_LOG_IF(writer, (condition_), el::Level::Error, dispatchAction, __VA_ARGS__) +#else +# define CERROR_IF(writer, condition_, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_ERROR_LOG +#if ELPP_FATAL_LOG +# define CFATAL_IF(writer, condition_, dispatchAction, ...)\ + ELPP_WRITE_LOG_IF(writer, (condition_), el::Level::Fatal, dispatchAction, __VA_ARGS__) +#else +# define CFATAL_IF(writer, condition_, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_FATAL_LOG +#if ELPP_TRACE_LOG +# define CTRACE_IF(writer, condition_, dispatchAction, ...)\ + ELPP_WRITE_LOG_IF(writer, (condition_), el::Level::Trace, dispatchAction, __VA_ARGS__) +#else +# define CTRACE_IF(writer, condition_, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_TRACE_LOG +#if ELPP_VERBOSE_LOG +# define CVERBOSE_IF(writer, condition_, vlevel, dispatchAction, ...) if (VLOG_IS_ON(vlevel) && (condition_)) writer( \ + el::Level::Verbose, __FILE__, __LINE__, ELPP_FUNC, dispatchAction, vlevel).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) +#else +# define CVERBOSE_IF(writer, condition_, vlevel, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_VERBOSE_LOG +// Occasional logs +#if ELPP_INFO_LOG +# define CINFO_EVERY_N(writer, occasion, dispatchAction, ...)\ + ELPP_WRITE_LOG_EVERY_N(writer, occasion, el::Level::Info, dispatchAction, __VA_ARGS__) +#else +# define CINFO_EVERY_N(writer, occasion, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_INFO_LOG +#if ELPP_WARNING_LOG +# define CWARNING_EVERY_N(writer, occasion, dispatchAction, ...)\ + ELPP_WRITE_LOG_EVERY_N(writer, occasion, el::Level::Warning, dispatchAction, __VA_ARGS__) +#else +# define CWARNING_EVERY_N(writer, occasion, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_WARNING_LOG +#if ELPP_DEBUG_LOG +# define CDEBUG_EVERY_N(writer, occasion, dispatchAction, ...)\ + ELPP_WRITE_LOG_EVERY_N(writer, occasion, el::Level::Debug, dispatchAction, __VA_ARGS__) +#else +# define CDEBUG_EVERY_N(writer, occasion, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_DEBUG_LOG +#if ELPP_ERROR_LOG +# define CERROR_EVERY_N(writer, occasion, dispatchAction, ...)\ + ELPP_WRITE_LOG_EVERY_N(writer, occasion, el::Level::Error, dispatchAction, __VA_ARGS__) +#else +# define CERROR_EVERY_N(writer, occasion, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_ERROR_LOG +#if ELPP_FATAL_LOG +# define CFATAL_EVERY_N(writer, occasion, dispatchAction, ...)\ + ELPP_WRITE_LOG_EVERY_N(writer, occasion, el::Level::Fatal, dispatchAction, __VA_ARGS__) +#else +# define CFATAL_EVERY_N(writer, occasion, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_FATAL_LOG +#if ELPP_TRACE_LOG +# define CTRACE_EVERY_N(writer, occasion, dispatchAction, ...)\ + ELPP_WRITE_LOG_EVERY_N(writer, occasion, el::Level::Trace, dispatchAction, __VA_ARGS__) +#else +# define CTRACE_EVERY_N(writer, occasion, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_TRACE_LOG +#if ELPP_VERBOSE_LOG +# define CVERBOSE_EVERY_N(writer, occasion, vlevel, dispatchAction, ...)\ + CVERBOSE_IF(writer, ELPP->validateEveryNCounter(__FILE__, __LINE__, occasion), vlevel, dispatchAction, __VA_ARGS__) +#else +# define CVERBOSE_EVERY_N(writer, occasion, vlevel, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_VERBOSE_LOG +// After N logs +#if ELPP_INFO_LOG +# define CINFO_AFTER_N(writer, n, dispatchAction, ...)\ + ELPP_WRITE_LOG_AFTER_N(writer, n, el::Level::Info, dispatchAction, __VA_ARGS__) +#else +# define CINFO_AFTER_N(writer, n, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_INFO_LOG +#if ELPP_WARNING_LOG +# define CWARNING_AFTER_N(writer, n, dispatchAction, ...)\ + ELPP_WRITE_LOG_AFTER_N(writer, n, el::Level::Warning, dispatchAction, __VA_ARGS__) +#else +# define CWARNING_AFTER_N(writer, n, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_WARNING_LOG +#if ELPP_DEBUG_LOG +# define CDEBUG_AFTER_N(writer, n, dispatchAction, ...)\ + ELPP_WRITE_LOG_AFTER_N(writer, n, el::Level::Debug, dispatchAction, __VA_ARGS__) +#else +# define CDEBUG_AFTER_N(writer, n, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_DEBUG_LOG +#if ELPP_ERROR_LOG +# define CERROR_AFTER_N(writer, n, dispatchAction, ...)\ + ELPP_WRITE_LOG_AFTER_N(writer, n, el::Level::Error, dispatchAction, __VA_ARGS__) +#else +# define CERROR_AFTER_N(writer, n, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_ERROR_LOG +#if ELPP_FATAL_LOG +# define CFATAL_AFTER_N(writer, n, dispatchAction, ...)\ + ELPP_WRITE_LOG_AFTER_N(writer, n, el::Level::Fatal, dispatchAction, __VA_ARGS__) +#else +# define CFATAL_AFTER_N(writer, n, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_FATAL_LOG +#if ELPP_TRACE_LOG +# define CTRACE_AFTER_N(writer, n, dispatchAction, ...)\ + ELPP_WRITE_LOG_AFTER_N(writer, n, el::Level::Trace, dispatchAction, __VA_ARGS__) +#else +# define CTRACE_AFTER_N(writer, n, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_TRACE_LOG +#if ELPP_VERBOSE_LOG +# define CVERBOSE_AFTER_N(writer, n, vlevel, dispatchAction, ...)\ + CVERBOSE_IF(writer, ELPP->validateAfterNCounter(__FILE__, __LINE__, n), vlevel, dispatchAction, __VA_ARGS__) +#else +# define CVERBOSE_AFTER_N(writer, n, vlevel, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_VERBOSE_LOG +// N Times logs +#if ELPP_INFO_LOG +# define CINFO_N_TIMES(writer, n, dispatchAction, ...)\ + ELPP_WRITE_LOG_N_TIMES(writer, n, el::Level::Info, dispatchAction, __VA_ARGS__) +#else +# define CINFO_N_TIMES(writer, n, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_INFO_LOG +#if ELPP_WARNING_LOG +# define CWARNING_N_TIMES(writer, n, dispatchAction, ...)\ + ELPP_WRITE_LOG_N_TIMES(writer, n, el::Level::Warning, dispatchAction, __VA_ARGS__) +#else +# define CWARNING_N_TIMES(writer, n, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_WARNING_LOG +#if ELPP_DEBUG_LOG +# define CDEBUG_N_TIMES(writer, n, dispatchAction, ...)\ + ELPP_WRITE_LOG_N_TIMES(writer, n, el::Level::Debug, dispatchAction, __VA_ARGS__) +#else +# define CDEBUG_N_TIMES(writer, n, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_DEBUG_LOG +#if ELPP_ERROR_LOG +# define CERROR_N_TIMES(writer, n, dispatchAction, ...)\ + ELPP_WRITE_LOG_N_TIMES(writer, n, el::Level::Error, dispatchAction, __VA_ARGS__) +#else +# define CERROR_N_TIMES(writer, n, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_ERROR_LOG +#if ELPP_FATAL_LOG +# define CFATAL_N_TIMES(writer, n, dispatchAction, ...)\ + ELPP_WRITE_LOG_N_TIMES(writer, n, el::Level::Fatal, dispatchAction, __VA_ARGS__) +#else +# define CFATAL_N_TIMES(writer, n, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_FATAL_LOG +#if ELPP_TRACE_LOG +# define CTRACE_N_TIMES(writer, n, dispatchAction, ...)\ + ELPP_WRITE_LOG_N_TIMES(writer, n, el::Level::Trace, dispatchAction, __VA_ARGS__) +#else +# define CTRACE_N_TIMES(writer, n, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_TRACE_LOG +#if ELPP_VERBOSE_LOG +# define CVERBOSE_N_TIMES(writer, n, vlevel, dispatchAction, ...)\ + CVERBOSE_IF(writer, ELPP->validateNTimesCounter(__FILE__, __LINE__, n), vlevel, dispatchAction, __VA_ARGS__) +#else +# define CVERBOSE_N_TIMES(writer, n, vlevel, dispatchAction, ...) el::base::NullWriter() +#endif // ELPP_VERBOSE_LOG +// +// Custom Loggers - Requires (level, dispatchAction, loggerId/s) +// +// undef existing +#undef CLOG +#undef CLOG_VERBOSE +#undef CVLOG +#undef CLOG_IF +#undef CLOG_VERBOSE_IF +#undef CVLOG_IF +#undef CLOG_EVERY_N +#undef CVLOG_EVERY_N +#undef CLOG_AFTER_N +#undef CVLOG_AFTER_N +#undef CLOG_N_TIMES +#undef CVLOG_N_TIMES +// Normal logs +#define CLOG(LEVEL, ...)\ + C##LEVEL(el::base::Writer, el::base::DispatchAction::NormalLog, __VA_ARGS__) +#define CVLOG(vlevel, ...) CVERBOSE(el::base::Writer, vlevel, el::base::DispatchAction::NormalLog, __VA_ARGS__) +// Conditional logs +#define CLOG_IF(condition, LEVEL, ...)\ + C##LEVEL##_IF(el::base::Writer, condition, el::base::DispatchAction::NormalLog, __VA_ARGS__) +#define CVLOG_IF(condition, vlevel, ...)\ + CVERBOSE_IF(el::base::Writer, condition, vlevel, el::base::DispatchAction::NormalLog, __VA_ARGS__) +// Hit counts based logs +#define CLOG_EVERY_N(n, LEVEL, ...)\ + C##LEVEL##_EVERY_N(el::base::Writer, n, el::base::DispatchAction::NormalLog, __VA_ARGS__) +#define CVLOG_EVERY_N(n, vlevel, ...)\ + CVERBOSE_EVERY_N(el::base::Writer, n, vlevel, el::base::DispatchAction::NormalLog, __VA_ARGS__) +#define CLOG_AFTER_N(n, LEVEL, ...)\ + C##LEVEL##_AFTER_N(el::base::Writer, n, el::base::DispatchAction::NormalLog, __VA_ARGS__) +#define CVLOG_AFTER_N(n, vlevel, ...)\ + CVERBOSE_AFTER_N(el::base::Writer, n, vlevel, el::base::DispatchAction::NormalLog, __VA_ARGS__) +#define CLOG_N_TIMES(n, LEVEL, ...)\ + C##LEVEL##_N_TIMES(el::base::Writer, n, el::base::DispatchAction::NormalLog, __VA_ARGS__) +#define CVLOG_N_TIMES(n, vlevel, ...)\ + CVERBOSE_N_TIMES(el::base::Writer, n, vlevel, el::base::DispatchAction::NormalLog, __VA_ARGS__) +// +// Default Loggers macro using CLOG(), CLOG_VERBOSE() and CVLOG() macros +// +// undef existing +#undef LOG +#undef VLOG +#undef LOG_IF +#undef VLOG_IF +#undef LOG_EVERY_N +#undef VLOG_EVERY_N +#undef LOG_AFTER_N +#undef VLOG_AFTER_N +#undef LOG_N_TIMES +#undef VLOG_N_TIMES +#undef ELPP_CURR_FILE_LOGGER_ID +#if defined(ELPP_DEFAULT_LOGGER) +# define ELPP_CURR_FILE_LOGGER_ID ELPP_DEFAULT_LOGGER +#else +# define ELPP_CURR_FILE_LOGGER_ID el::base::consts::kDefaultLoggerId +#endif +#undef ELPP_TRACE +#define ELPP_TRACE CLOG(TRACE, ELPP_CURR_FILE_LOGGER_ID) +// Normal logs +#define LOG(LEVEL) CLOG(LEVEL, ELPP_CURR_FILE_LOGGER_ID) +#define VLOG(vlevel) CVLOG(vlevel, ELPP_CURR_FILE_LOGGER_ID) +// Conditional logs +#define LOG_IF(condition, LEVEL) CLOG_IF(condition, LEVEL, ELPP_CURR_FILE_LOGGER_ID) +#define VLOG_IF(condition, vlevel) CVLOG_IF(condition, vlevel, ELPP_CURR_FILE_LOGGER_ID) +// Hit counts based logs +#define LOG_EVERY_N(n, LEVEL) CLOG_EVERY_N(n, LEVEL, ELPP_CURR_FILE_LOGGER_ID) +#define VLOG_EVERY_N(n, vlevel) CVLOG_EVERY_N(n, vlevel, ELPP_CURR_FILE_LOGGER_ID) +#define LOG_AFTER_N(n, LEVEL) CLOG_AFTER_N(n, LEVEL, ELPP_CURR_FILE_LOGGER_ID) +#define VLOG_AFTER_N(n, vlevel) CVLOG_AFTER_N(n, vlevel, ELPP_CURR_FILE_LOGGER_ID) +#define LOG_N_TIMES(n, LEVEL) CLOG_N_TIMES(n, LEVEL, ELPP_CURR_FILE_LOGGER_ID) +#define VLOG_N_TIMES(n, vlevel) CVLOG_N_TIMES(n, vlevel, ELPP_CURR_FILE_LOGGER_ID) +// Generic PLOG() +#undef CPLOG +#undef CPLOG_IF +#undef PLOG +#undef PLOG_IF +#undef DCPLOG +#undef DCPLOG_IF +#undef DPLOG +#undef DPLOG_IF +#define CPLOG(LEVEL, ...)\ + C##LEVEL(el::base::PErrorWriter, el::base::DispatchAction::NormalLog, __VA_ARGS__) +#define CPLOG_IF(condition, LEVEL, ...)\ + C##LEVEL##_IF(el::base::PErrorWriter, condition, el::base::DispatchAction::NormalLog, __VA_ARGS__) +#define DCPLOG(LEVEL, ...)\ + if (ELPP_DEBUG_LOG) C##LEVEL(el::base::PErrorWriter, el::base::DispatchAction::NormalLog, __VA_ARGS__) +#define DCPLOG_IF(condition, LEVEL, ...)\ + C##LEVEL##_IF(el::base::PErrorWriter, (ELPP_DEBUG_LOG) && (condition), el::base::DispatchAction::NormalLog, __VA_ARGS__) +#define PLOG(LEVEL) CPLOG(LEVEL, ELPP_CURR_FILE_LOGGER_ID) +#define PLOG_IF(condition, LEVEL) CPLOG_IF(condition, LEVEL, ELPP_CURR_FILE_LOGGER_ID) +#define DPLOG(LEVEL) DCPLOG(LEVEL, ELPP_CURR_FILE_LOGGER_ID) +#define DPLOG_IF(condition, LEVEL) DCPLOG_IF(condition, LEVEL, ELPP_CURR_FILE_LOGGER_ID) +// Generic SYSLOG() +#undef CSYSLOG +#undef CSYSLOG_IF +#undef CSYSLOG_EVERY_N +#undef CSYSLOG_AFTER_N +#undef CSYSLOG_N_TIMES +#undef SYSLOG +#undef SYSLOG_IF +#undef SYSLOG_EVERY_N +#undef SYSLOG_AFTER_N +#undef SYSLOG_N_TIMES +#undef DCSYSLOG +#undef DCSYSLOG_IF +#undef DCSYSLOG_EVERY_N +#undef DCSYSLOG_AFTER_N +#undef DCSYSLOG_N_TIMES +#undef DSYSLOG +#undef DSYSLOG_IF +#undef DSYSLOG_EVERY_N +#undef DSYSLOG_AFTER_N +#undef DSYSLOG_N_TIMES +#if defined(ELPP_SYSLOG) +# define CSYSLOG(LEVEL, ...)\ + C##LEVEL(el::base::Writer, el::base::DispatchAction::SysLog, __VA_ARGS__) +# define CSYSLOG_IF(condition, LEVEL, ...)\ + C##LEVEL##_IF(el::base::Writer, condition, el::base::DispatchAction::SysLog, __VA_ARGS__) +# define CSYSLOG_EVERY_N(n, LEVEL, ...) C##LEVEL##_EVERY_N(el::base::Writer, n, el::base::DispatchAction::SysLog, __VA_ARGS__) +# define CSYSLOG_AFTER_N(n, LEVEL, ...) C##LEVEL##_AFTER_N(el::base::Writer, n, el::base::DispatchAction::SysLog, __VA_ARGS__) +# define CSYSLOG_N_TIMES(n, LEVEL, ...) C##LEVEL##_N_TIMES(el::base::Writer, n, el::base::DispatchAction::SysLog, __VA_ARGS__) +# define SYSLOG(LEVEL) CSYSLOG(LEVEL, el::base::consts::kSysLogLoggerId) +# define SYSLOG_IF(condition, LEVEL) CSYSLOG_IF(condition, LEVEL, el::base::consts::kSysLogLoggerId) +# define SYSLOG_EVERY_N(n, LEVEL) CSYSLOG_EVERY_N(n, LEVEL, el::base::consts::kSysLogLoggerId) +# define SYSLOG_AFTER_N(n, LEVEL) CSYSLOG_AFTER_N(n, LEVEL, el::base::consts::kSysLogLoggerId) +# define SYSLOG_N_TIMES(n, LEVEL) CSYSLOG_N_TIMES(n, LEVEL, el::base::consts::kSysLogLoggerId) +# define DCSYSLOG(LEVEL, ...) if (ELPP_DEBUG_LOG) C##LEVEL(el::base::Writer, el::base::DispatchAction::SysLog, __VA_ARGS__) +# define DCSYSLOG_IF(condition, LEVEL, ...)\ + C##LEVEL##_IF(el::base::Writer, (ELPP_DEBUG_LOG) && (condition), el::base::DispatchAction::SysLog, __VA_ARGS__) +# define DCSYSLOG_EVERY_N(n, LEVEL, ...)\ + if (ELPP_DEBUG_LOG) C##LEVEL##_EVERY_N(el::base::Writer, n, el::base::DispatchAction::SysLog, __VA_ARGS__) +# define DCSYSLOG_AFTER_N(n, LEVEL, ...)\ + if (ELPP_DEBUG_LOG) C##LEVEL##_AFTER_N(el::base::Writer, n, el::base::DispatchAction::SysLog, __VA_ARGS__) +# define DCSYSLOG_N_TIMES(n, LEVEL, ...)\ + if (ELPP_DEBUG_LOG) C##LEVEL##_EVERY_N(el::base::Writer, n, el::base::DispatchAction::SysLog, __VA_ARGS__) +# define DSYSLOG(LEVEL) DCSYSLOG(LEVEL, el::base::consts::kSysLogLoggerId) +# define DSYSLOG_IF(condition, LEVEL) DCSYSLOG_IF(condition, LEVEL, el::base::consts::kSysLogLoggerId) +# define DSYSLOG_EVERY_N(n, LEVEL) DCSYSLOG_EVERY_N(n, LEVEL, el::base::consts::kSysLogLoggerId) +# define DSYSLOG_AFTER_N(n, LEVEL) DCSYSLOG_AFTER_N(n, LEVEL, el::base::consts::kSysLogLoggerId) +# define DSYSLOG_N_TIMES(n, LEVEL) DCSYSLOG_N_TIMES(n, LEVEL, el::base::consts::kSysLogLoggerId) +#else +# define CSYSLOG(LEVEL, ...) el::base::NullWriter() +# define CSYSLOG_IF(condition, LEVEL, ...) el::base::NullWriter() +# define CSYSLOG_EVERY_N(n, LEVEL, ...) el::base::NullWriter() +# define CSYSLOG_AFTER_N(n, LEVEL, ...) el::base::NullWriter() +# define CSYSLOG_N_TIMES(n, LEVEL, ...) el::base::NullWriter() +# define SYSLOG(LEVEL) el::base::NullWriter() +# define SYSLOG_IF(condition, LEVEL) el::base::NullWriter() +# define SYSLOG_EVERY_N(n, LEVEL) el::base::NullWriter() +# define SYSLOG_AFTER_N(n, LEVEL) el::base::NullWriter() +# define SYSLOG_N_TIMES(n, LEVEL) el::base::NullWriter() +# define DCSYSLOG(LEVEL, ...) el::base::NullWriter() +# define DCSYSLOG_IF(condition, LEVEL, ...) el::base::NullWriter() +# define DCSYSLOG_EVERY_N(n, LEVEL, ...) el::base::NullWriter() +# define DCSYSLOG_AFTER_N(n, LEVEL, ...) el::base::NullWriter() +# define DCSYSLOG_N_TIMES(n, LEVEL, ...) el::base::NullWriter() +# define DSYSLOG(LEVEL) el::base::NullWriter() +# define DSYSLOG_IF(condition, LEVEL) el::base::NullWriter() +# define DSYSLOG_EVERY_N(n, LEVEL) el::base::NullWriter() +# define DSYSLOG_AFTER_N(n, LEVEL) el::base::NullWriter() +# define DSYSLOG_N_TIMES(n, LEVEL) el::base::NullWriter() +#endif // defined(ELPP_SYSLOG) +// +// Custom Debug Only Loggers - Requires (level, loggerId/s) +// +// undef existing +#undef DCLOG +#undef DCVLOG +#undef DCLOG_IF +#undef DCVLOG_IF +#undef DCLOG_EVERY_N +#undef DCVLOG_EVERY_N +#undef DCLOG_AFTER_N +#undef DCVLOG_AFTER_N +#undef DCLOG_N_TIMES +#undef DCVLOG_N_TIMES +// Normal logs +#define DCLOG(LEVEL, ...) if (ELPP_DEBUG_LOG) CLOG(LEVEL, __VA_ARGS__) +#define DCLOG_VERBOSE(vlevel, ...) if (ELPP_DEBUG_LOG) CLOG_VERBOSE(vlevel, __VA_ARGS__) +#define DCVLOG(vlevel, ...) if (ELPP_DEBUG_LOG) CVLOG(vlevel, __VA_ARGS__) +// Conditional logs +#define DCLOG_IF(condition, LEVEL, ...) if (ELPP_DEBUG_LOG) CLOG_IF(condition, LEVEL, __VA_ARGS__) +#define DCVLOG_IF(condition, vlevel, ...) if (ELPP_DEBUG_LOG) CVLOG_IF(condition, vlevel, __VA_ARGS__) +// Hit counts based logs +#define DCLOG_EVERY_N(n, LEVEL, ...) if (ELPP_DEBUG_LOG) CLOG_EVERY_N(n, LEVEL, __VA_ARGS__) +#define DCVLOG_EVERY_N(n, vlevel, ...) if (ELPP_DEBUG_LOG) CVLOG_EVERY_N(n, vlevel, __VA_ARGS__) +#define DCLOG_AFTER_N(n, LEVEL, ...) if (ELPP_DEBUG_LOG) CLOG_AFTER_N(n, LEVEL, __VA_ARGS__) +#define DCVLOG_AFTER_N(n, vlevel, ...) if (ELPP_DEBUG_LOG) CVLOG_AFTER_N(n, vlevel, __VA_ARGS__) +#define DCLOG_N_TIMES(n, LEVEL, ...) if (ELPP_DEBUG_LOG) CLOG_N_TIMES(n, LEVEL, __VA_ARGS__) +#define DCVLOG_N_TIMES(n, vlevel, ...) if (ELPP_DEBUG_LOG) CVLOG_N_TIMES(n, vlevel, __VA_ARGS__) +// +// Default Debug Only Loggers macro using CLOG(), CLOG_VERBOSE() and CVLOG() macros +// +// undef existing +#undef DLOG +#undef DVLOG +#undef DLOG_IF +#undef DVLOG_IF +#undef DLOG_EVERY_N +#undef DVLOG_EVERY_N +#undef DLOG_AFTER_N +#undef DVLOG_AFTER_N +#undef DLOG_N_TIMES +#undef DVLOG_N_TIMES +// Normal logs +#define DLOG(LEVEL) DCLOG(LEVEL, ELPP_CURR_FILE_LOGGER_ID) +#define DVLOG(vlevel) DCVLOG(vlevel, ELPP_CURR_FILE_LOGGER_ID) +// Conditional logs +#define DLOG_IF(condition, LEVEL) DCLOG_IF(condition, LEVEL, ELPP_CURR_FILE_LOGGER_ID) +#define DVLOG_IF(condition, vlevel) DCVLOG_IF(condition, vlevel, ELPP_CURR_FILE_LOGGER_ID) +// Hit counts based logs +#define DLOG_EVERY_N(n, LEVEL) DCLOG_EVERY_N(n, LEVEL, ELPP_CURR_FILE_LOGGER_ID) +#define DVLOG_EVERY_N(n, vlevel) DCVLOG_EVERY_N(n, vlevel, ELPP_CURR_FILE_LOGGER_ID) +#define DLOG_AFTER_N(n, LEVEL) DCLOG_AFTER_N(n, LEVEL, ELPP_CURR_FILE_LOGGER_ID) +#define DVLOG_AFTER_N(n, vlevel) DCVLOG_AFTER_N(n, vlevel, ELPP_CURR_FILE_LOGGER_ID) +#define DLOG_N_TIMES(n, LEVEL) DCLOG_N_TIMES(n, LEVEL, ELPP_CURR_FILE_LOGGER_ID) +#define DVLOG_N_TIMES(n, vlevel) DCVLOG_N_TIMES(n, vlevel, ELPP_CURR_FILE_LOGGER_ID) +// Check macros +#undef CCHECK +#undef CPCHECK +#undef CCHECK_EQ +#undef CCHECK_NE +#undef CCHECK_LT +#undef CCHECK_GT +#undef CCHECK_LE +#undef CCHECK_GE +#undef CCHECK_BOUNDS +#undef CCHECK_NOTNULL +#undef CCHECK_STRCASEEQ +#undef CCHECK_STRCASENE +#undef CHECK +#undef PCHECK +#undef CHECK_EQ +#undef CHECK_NE +#undef CHECK_LT +#undef CHECK_GT +#undef CHECK_LE +#undef CHECK_GE +#undef CHECK_BOUNDS +#undef CHECK_NOTNULL +#undef CHECK_STRCASEEQ +#undef CHECK_STRCASENE +#define CCHECK(condition, ...) CLOG_IF(!(condition), FATAL, __VA_ARGS__) << "Check failed: [" << #condition << "] " +#define CPCHECK(condition, ...) CPLOG_IF(!(condition), FATAL, __VA_ARGS__) << "Check failed: [" << #condition << "] " +#define CHECK(condition) CCHECK(condition, ELPP_CURR_FILE_LOGGER_ID) +#define PCHECK(condition) CPCHECK(condition, ELPP_CURR_FILE_LOGGER_ID) +#define CCHECK_EQ(a, b, ...) CCHECK(a == b, __VA_ARGS__) +#define CCHECK_NE(a, b, ...) CCHECK(a != b, __VA_ARGS__) +#define CCHECK_LT(a, b, ...) CCHECK(a < b, __VA_ARGS__) +#define CCHECK_GT(a, b, ...) CCHECK(a > b, __VA_ARGS__) +#define CCHECK_LE(a, b, ...) CCHECK(a <= b, __VA_ARGS__) +#define CCHECK_GE(a, b, ...) CCHECK(a >= b, __VA_ARGS__) +#define CCHECK_BOUNDS(val, min, max, ...) CCHECK(val >= min && val <= max, __VA_ARGS__) +#define CHECK_EQ(a, b) CCHECK_EQ(a, b, ELPP_CURR_FILE_LOGGER_ID) +#define CHECK_NE(a, b) CCHECK_NE(a, b, ELPP_CURR_FILE_LOGGER_ID) +#define CHECK_LT(a, b) CCHECK_LT(a, b, ELPP_CURR_FILE_LOGGER_ID) +#define CHECK_GT(a, b) CCHECK_GT(a, b, ELPP_CURR_FILE_LOGGER_ID) +#define CHECK_LE(a, b) CCHECK_LE(a, b, ELPP_CURR_FILE_LOGGER_ID) +#define CHECK_GE(a, b) CCHECK_GE(a, b, ELPP_CURR_FILE_LOGGER_ID) +#define CHECK_BOUNDS(val, min, max) CCHECK_BOUNDS(val, min, max, ELPP_CURR_FILE_LOGGER_ID) +namespace el { +namespace base { +namespace utils { +template +static T* checkNotNull(T* ptr, const char* name, const char* loggers, ...) { + CLOG_IF(ptr == nullptr, FATAL, loggers) << "Check failed: [" << name << " != nullptr]"; + return ptr; +} +} // namespace utils +} // namespace base +} // namespace el +#define CCHECK_NOTNULL(ptr, ...) el::base::utils::checkNotNull(ptr, #ptr, __VA_ARGS__) +#define CCHECK_STREQ(str1, str2, ...) CLOG_IF(!el::base::utils::Str::cStringEq(str1, str2), FATAL, __VA_ARGS__) \ + << "Check failed: [" << #str1 << " == " << #str2 << "] " +#define CCHECK_STRNE(str1, str2, ...) CLOG_IF(el::base::utils::Str::cStringEq(str1, str2), FATAL, __VA_ARGS__) \ + << "Check failed: [" << #str1 << " != " << #str2 << "] " +#define CCHECK_STRCASEEQ(str1, str2, ...) CLOG_IF(!el::base::utils::Str::cStringCaseEq(str1, str2), FATAL, __VA_ARGS__) \ + << "Check failed: [" << #str1 << " == " << #str2 << "] " +#define CCHECK_STRCASENE(str1, str2, ...) CLOG_IF(el::base::utils::Str::cStringCaseEq(str1, str2), FATAL, __VA_ARGS__) \ + << "Check failed: [" << #str1 << " != " << #str2 << "] " +#define CHECK_NOTNULL(ptr) CCHECK_NOTNULL(ptr, ELPP_CURR_FILE_LOGGER_ID) +#define CHECK_STREQ(str1, str2) CCHECK_STREQ(str1, str2, ELPP_CURR_FILE_LOGGER_ID) +#define CHECK_STRNE(str1, str2) CCHECK_STRNE(str1, str2, ELPP_CURR_FILE_LOGGER_ID) +#define CHECK_STRCASEEQ(str1, str2) CCHECK_STRCASEEQ(str1, str2, ELPP_CURR_FILE_LOGGER_ID) +#define CHECK_STRCASENE(str1, str2) CCHECK_STRCASENE(str1, str2, ELPP_CURR_FILE_LOGGER_ID) +#undef DCCHECK +#undef DCCHECK_EQ +#undef DCCHECK_NE +#undef DCCHECK_LT +#undef DCCHECK_GT +#undef DCCHECK_LE +#undef DCCHECK_GE +#undef DCCHECK_BOUNDS +#undef DCCHECK_NOTNULL +#undef DCCHECK_STRCASEEQ +#undef DCCHECK_STRCASENE +#undef DCPCHECK +#undef DCHECK +#undef DCHECK_EQ +#undef DCHECK_NE +#undef DCHECK_LT +#undef DCHECK_GT +#undef DCHECK_LE +#undef DCHECK_GE +#undef DCHECK_BOUNDS_ +#undef DCHECK_NOTNULL +#undef DCHECK_STRCASEEQ +#undef DCHECK_STRCASENE +#undef DPCHECK +#define DCCHECK(condition, ...) if (ELPP_DEBUG_LOG) CCHECK(condition, __VA_ARGS__) +#define DCCHECK_EQ(a, b, ...) if (ELPP_DEBUG_LOG) CCHECK_EQ(a, b, __VA_ARGS__) +#define DCCHECK_NE(a, b, ...) if (ELPP_DEBUG_LOG) CCHECK_NE(a, b, __VA_ARGS__) +#define DCCHECK_LT(a, b, ...) if (ELPP_DEBUG_LOG) CCHECK_LT(a, b, __VA_ARGS__) +#define DCCHECK_GT(a, b, ...) if (ELPP_DEBUG_LOG) CCHECK_GT(a, b, __VA_ARGS__) +#define DCCHECK_LE(a, b, ...) if (ELPP_DEBUG_LOG) CCHECK_LE(a, b, __VA_ARGS__) +#define DCCHECK_GE(a, b, ...) if (ELPP_DEBUG_LOG) CCHECK_GE(a, b, __VA_ARGS__) +#define DCCHECK_BOUNDS(val, min, max, ...) if (ELPP_DEBUG_LOG) CCHECK_BOUNDS(val, min, max, __VA_ARGS__) +#define DCCHECK_NOTNULL(ptr, ...) if (ELPP_DEBUG_LOG) CCHECK_NOTNULL(ptr, __VA_ARGS__) +#define DCCHECK_STREQ(str1, str2, ...) if (ELPP_DEBUG_LOG) CCHECK_STREQ(str1, str2, __VA_ARGS__) +#define DCCHECK_STRNE(str1, str2, ...) if (ELPP_DEBUG_LOG) CCHECK_STRNE(str1, str2, __VA_ARGS__) +#define DCCHECK_STRCASEEQ(str1, str2, ...) if (ELPP_DEBUG_LOG) CCHECK_STRCASEEQ(str1, str2, __VA_ARGS__) +#define DCCHECK_STRCASENE(str1, str2, ...) if (ELPP_DEBUG_LOG) CCHECK_STRCASENE(str1, str2, __VA_ARGS__) +#define DCPCHECK(condition, ...) if (ELPP_DEBUG_LOG) CPCHECK(condition, __VA_ARGS__) +#define DCHECK(condition) DCCHECK(condition, ELPP_CURR_FILE_LOGGER_ID) +#define DCHECK_EQ(a, b) DCCHECK_EQ(a, b, ELPP_CURR_FILE_LOGGER_ID) +#define DCHECK_NE(a, b) DCCHECK_NE(a, b, ELPP_CURR_FILE_LOGGER_ID) +#define DCHECK_LT(a, b) DCCHECK_LT(a, b, ELPP_CURR_FILE_LOGGER_ID) +#define DCHECK_GT(a, b) DCCHECK_GT(a, b, ELPP_CURR_FILE_LOGGER_ID) +#define DCHECK_LE(a, b) DCCHECK_LE(a, b, ELPP_CURR_FILE_LOGGER_ID) +#define DCHECK_GE(a, b) DCCHECK_GE(a, b, ELPP_CURR_FILE_LOGGER_ID) +#define DCHECK_BOUNDS(val, min, max) DCCHECK_BOUNDS(val, min, max, ELPP_CURR_FILE_LOGGER_ID) +#define DCHECK_NOTNULL(ptr) DCCHECK_NOTNULL(ptr, ELPP_CURR_FILE_LOGGER_ID) +#define DCHECK_STREQ(str1, str2) DCCHECK_STREQ(str1, str2, ELPP_CURR_FILE_LOGGER_ID) +#define DCHECK_STRNE(str1, str2) DCCHECK_STRNE(str1, str2, ELPP_CURR_FILE_LOGGER_ID) +#define DCHECK_STRCASEEQ(str1, str2) DCCHECK_STRCASEEQ(str1, str2, ELPP_CURR_FILE_LOGGER_ID) +#define DCHECK_STRCASENE(str1, str2) DCCHECK_STRCASENE(str1, str2, ELPP_CURR_FILE_LOGGER_ID) +#define DPCHECK(condition) DCPCHECK(condition, ELPP_CURR_FILE_LOGGER_ID) +#if defined(ELPP_DISABLE_DEFAULT_CRASH_HANDLING) +# define ELPP_USE_DEF_CRASH_HANDLER false +#else +# define ELPP_USE_DEF_CRASH_HANDLER true +#endif // defined(ELPP_DISABLE_DEFAULT_CRASH_HANDLING) +#define ELPP_CRASH_HANDLER_INIT +#define ELPP_INIT_EASYLOGGINGPP(val)\ + ELPP_INITI_BASIC_DECLR\ + namespace el {\ + namespace base {\ + el::base::type::StoragePointer elStorage(val);\ + }\ + el::base::debug::CrashHandler elCrashHandler(ELPP_USE_DEF_CRASH_HANDLER);\ + } + +#if ELPP_ASYNC_LOGGING +# define INITIALIZE_EASYLOGGINGPP\ + ELPP_INIT_EASYLOGGINGPP(new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder()),\ + new el::base::AsyncDispatchWorker()))\ + +#else +# define INITIALIZE_EASYLOGGINGPP\ + ELPP_INIT_EASYLOGGINGPP(new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder()))) +#endif // ELPP_ASYNC_LOGGING +#define INITIALIZE_NULL_EASYLOGGINGPP\ + ELPP_INITI_BASIC_DECLR\ + namespace el {\ + namespace base {\ + el::base::type::StoragePointer elStorage;\ + }\ + el::base::debug::CrashHandler elCrashHandler(ELPP_USE_DEF_CRASH_HANDLER);\ + } +// NOTE: no ELPP_INITI_BASIC_DECLR when sharing - causes double free corruption on external symbols +#define SHARE_EASYLOGGINGPP(initializedStorage)\ + namespace el {\ + namespace base {\ + el::base::type::StoragePointer elStorage(initializedStorage);\ + }\ + el::base::debug::CrashHandler elCrashHandler(ELPP_USE_DEF_CRASH_HANDLER);\ + } + +#if defined(ELPP_UNICODE) +# define START_EASYLOGGINGPP(argc, argv) el::Helpers::setArgs(argc, argv); std::locale::global(std::locale("")) +#else +# define START_EASYLOGGINGPP(argc, argv) el::Helpers::setArgs(argc, argv) +#endif // defined(ELPP_UNICODE) +#endif // EASYLOGGINGPP_H \ No newline at end of file diff --git a/contrib/src/inttypes/inttypes.h b/contrib/src/inttypes/inttypes.h deleted file mode 100755 index 2554277..0000000 --- a/contrib/src/inttypes/inttypes.h +++ /dev/null @@ -1,305 +0,0 @@ -// ISO C9x compliant inttypes.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// -// Copyright (c) 2006 Alexander Chemeris -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. The name of the author may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -#ifndef _MSC_INTTYPES_H_ // [ -#define _MSC_INTTYPES_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#include "stdint.h" - -// 7.8 Format conversion of integer types - -typedef struct { - intmax_t quot; - intmax_t rem; -} imaxdiv_t; - -// 7.8.1 Macros for format specifiers - -#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198 - -// The fprintf macros for signed integers are: -#define PRId8 "d" -#define PRIi8 "i" -#define PRIdLEAST8 "d" -#define PRIiLEAST8 "i" -#define PRIdFAST8 "d" -#define PRIiFAST8 "i" - -#define PRId16 "hd" -#define PRIi16 "hi" -#define PRIdLEAST16 "hd" -#define PRIiLEAST16 "hi" -#define PRIdFAST16 "hd" -#define PRIiFAST16 "hi" - -#define PRId32 "I32d" -#define PRIi32 "I32i" -#define PRIdLEAST32 "I32d" -#define PRIiLEAST32 "I32i" -#define PRIdFAST32 "I32d" -#define PRIiFAST32 "I32i" - -#define PRId64 "I64d" -#define PRIi64 "I64i" -#define PRIdLEAST64 "I64d" -#define PRIiLEAST64 "I64i" -#define PRIdFAST64 "I64d" -#define PRIiFAST64 "I64i" - -#define PRIdMAX "I64d" -#define PRIiMAX "I64i" - -#define PRIdPTR "Id" -#define PRIiPTR "Ii" - -// The fprintf macros for unsigned integers are: -#define PRIo8 "o" -#define PRIu8 "u" -#define PRIx8 "x" -#define PRIX8 "X" -#define PRIoLEAST8 "o" -#define PRIuLEAST8 "u" -#define PRIxLEAST8 "x" -#define PRIXLEAST8 "X" -#define PRIoFAST8 "o" -#define PRIuFAST8 "u" -#define PRIxFAST8 "x" -#define PRIXFAST8 "X" - -#define PRIo16 "ho" -#define PRIu16 "hu" -#define PRIx16 "hx" -#define PRIX16 "hX" -#define PRIoLEAST16 "ho" -#define PRIuLEAST16 "hu" -#define PRIxLEAST16 "hx" -#define PRIXLEAST16 "hX" -#define PRIoFAST16 "ho" -#define PRIuFAST16 "hu" -#define PRIxFAST16 "hx" -#define PRIXFAST16 "hX" - -#define PRIo32 "I32o" -#define PRIu32 "I32u" -#define PRIx32 "I32x" -#define PRIX32 "I32X" -#define PRIoLEAST32 "I32o" -#define PRIuLEAST32 "I32u" -#define PRIxLEAST32 "I32x" -#define PRIXLEAST32 "I32X" -#define PRIoFAST32 "I32o" -#define PRIuFAST32 "I32u" -#define PRIxFAST32 "I32x" -#define PRIXFAST32 "I32X" - -#define PRIo64 "I64o" -#define PRIu64 "I64u" -#define PRIx64 "I64x" -#define PRIX64 "I64X" -#define PRIoLEAST64 "I64o" -#define PRIuLEAST64 "I64u" -#define PRIxLEAST64 "I64x" -#define PRIXLEAST64 "I64X" -#define PRIoFAST64 "I64o" -#define PRIuFAST64 "I64u" -#define PRIxFAST64 "I64x" -#define PRIXFAST64 "I64X" - -#define PRIoMAX "I64o" -#define PRIuMAX "I64u" -#define PRIxMAX "I64x" -#define PRIXMAX "I64X" - -#define PRIoPTR "Io" -#define PRIuPTR "Iu" -#define PRIxPTR "Ix" -#define PRIXPTR "IX" - -// The fscanf macros for signed integers are: -#define SCNd8 "d" -#define SCNi8 "i" -#define SCNdLEAST8 "d" -#define SCNiLEAST8 "i" -#define SCNdFAST8 "d" -#define SCNiFAST8 "i" - -#define SCNd16 "hd" -#define SCNi16 "hi" -#define SCNdLEAST16 "hd" -#define SCNiLEAST16 "hi" -#define SCNdFAST16 "hd" -#define SCNiFAST16 "hi" - -#define SCNd32 "ld" -#define SCNi32 "li" -#define SCNdLEAST32 "ld" -#define SCNiLEAST32 "li" -#define SCNdFAST32 "ld" -#define SCNiFAST32 "li" - -#define SCNd64 "I64d" -#define SCNi64 "I64i" -#define SCNdLEAST64 "I64d" -#define SCNiLEAST64 "I64i" -#define SCNdFAST64 "I64d" -#define SCNiFAST64 "I64i" - -#define SCNdMAX "I64d" -#define SCNiMAX "I64i" - -#ifdef _WIN64 // [ -# define SCNdPTR "I64d" -# define SCNiPTR "I64i" -#else // _WIN64 ][ -# define SCNdPTR "ld" -# define SCNiPTR "li" -#endif // _WIN64 ] - -// The fscanf macros for unsigned integers are: -#define SCNo8 "o" -#define SCNu8 "u" -#define SCNx8 "x" -#define SCNX8 "X" -#define SCNoLEAST8 "o" -#define SCNuLEAST8 "u" -#define SCNxLEAST8 "x" -#define SCNXLEAST8 "X" -#define SCNoFAST8 "o" -#define SCNuFAST8 "u" -#define SCNxFAST8 "x" -#define SCNXFAST8 "X" - -#define SCNo16 "ho" -#define SCNu16 "hu" -#define SCNx16 "hx" -#define SCNX16 "hX" -#define SCNoLEAST16 "ho" -#define SCNuLEAST16 "hu" -#define SCNxLEAST16 "hx" -#define SCNXLEAST16 "hX" -#define SCNoFAST16 "ho" -#define SCNuFAST16 "hu" -#define SCNxFAST16 "hx" -#define SCNXFAST16 "hX" - -#define SCNo32 "lo" -#define SCNu32 "lu" -#define SCNx32 "lx" -#define SCNX32 "lX" -#define SCNoLEAST32 "lo" -#define SCNuLEAST32 "lu" -#define SCNxLEAST32 "lx" -#define SCNXLEAST32 "lX" -#define SCNoFAST32 "lo" -#define SCNuFAST32 "lu" -#define SCNxFAST32 "lx" -#define SCNXFAST32 "lX" - -#define SCNo64 "I64o" -#define SCNu64 "I64u" -#define SCNx64 "I64x" -#define SCNX64 "I64X" -#define SCNoLEAST64 "I64o" -#define SCNuLEAST64 "I64u" -#define SCNxLEAST64 "I64x" -#define SCNXLEAST64 "I64X" -#define SCNoFAST64 "I64o" -#define SCNuFAST64 "I64u" -#define SCNxFAST64 "I64x" -#define SCNXFAST64 "I64X" - -#define SCNoMAX "I64o" -#define SCNuMAX "I64u" -#define SCNxMAX "I64x" -#define SCNXMAX "I64X" - -#ifdef _WIN64 // [ -# define SCNoPTR "I64o" -# define SCNuPTR "I64u" -# define SCNxPTR "I64x" -# define SCNXPTR "I64X" -#else // _WIN64 ][ -# define SCNoPTR "lo" -# define SCNuPTR "lu" -# define SCNxPTR "lx" -# define SCNXPTR "lX" -#endif // _WIN64 ] - -#endif // __STDC_FORMAT_MACROS ] - -// 7.8.2 Functions for greatest-width integer types - -// 7.8.2.1 The imaxabs function -#define imaxabs _abs64 - -// 7.8.2.2 The imaxdiv function - -// This is modified version of div() function from Microsoft's div.c found -// in %MSVC.NET%\crt\src\div.c -#ifdef STATIC_IMAXDIV // [ -static -#else // STATIC_IMAXDIV ][ -_inline -#endif // STATIC_IMAXDIV ] -imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) -{ - imaxdiv_t result; - - result.quot = numer / denom; - result.rem = numer % denom; - - if (numer < 0 && result.rem > 0) { - // did division wrong; must fix up - ++result.quot; - result.rem -= denom; - } - - return result; -} - -// 7.8.2.3 The strtoimax and strtoumax functions -#define strtoimax _strtoi64 -#define strtoumax _strtoui64 - -// 7.8.2.4 The wcstoimax and wcstoumax functions -#define wcstoimax _wcstoi64 -#define wcstoumax _wcstoui64 - - -#endif // _MSC_INTTYPES_H_ ] diff --git a/contrib/src/inttypes/stdint.h b/contrib/src/inttypes/stdint.h deleted file mode 100755 index 59d0673..0000000 --- a/contrib/src/inttypes/stdint.h +++ /dev/null @@ -1,247 +0,0 @@ -// ISO C9x compliant stdint.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// -// Copyright (c) 2006-2008 Alexander Chemeris -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. The name of the author may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -#ifndef _MSC_STDINT_H_ // [ -#define _MSC_STDINT_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#include - -// For Visual Studio 6 in C++ mode and for many Visual Studio versions when -// compiling for ARM we should wrap include with 'extern "C++" {}' -// or compiler give many errors like this: -// error C2733: second C linkage of overloaded function 'wmemchr' not allowed -#ifdef __cplusplus -extern "C" { -#endif -# include -#ifdef __cplusplus -} -#endif - -// Define _W64 macros to mark types changing their size, like intptr_t. -#ifndef _W64 -# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 -# define _W64 __w64 -# else -# define _W64 -# endif -#endif - - -// 7.18.1 Integer types - -// 7.18.1.1 Exact-width integer types - -// Visual Studio 6 and Embedded Visual C++ 4 doesn't -// realize that, e.g. char has the same size as __int8 -// so we give up on __intX for them. -#if (_MSC_VER < 1300) - typedef signed char int8_t; - typedef signed short int16_t; - typedef signed int int32_t; - typedef unsigned char uint8_t; - typedef unsigned short uint16_t; - typedef unsigned int uint32_t; -#else - typedef signed __int8 int8_t; - typedef signed __int16 int16_t; - typedef signed __int32 int32_t; - typedef unsigned __int8 uint8_t; - typedef unsigned __int16 uint16_t; - typedef unsigned __int32 uint32_t; -#endif -typedef signed __int64 int64_t; -typedef unsigned __int64 uint64_t; - - -// 7.18.1.2 Minimum-width integer types -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -typedef int64_t int_least64_t; -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -typedef uint64_t uint_least64_t; - -// 7.18.1.3 Fastest minimum-width integer types -typedef int8_t int_fast8_t; -typedef int16_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef int64_t int_fast64_t; -typedef uint8_t uint_fast8_t; -typedef uint16_t uint_fast16_t; -typedef uint32_t uint_fast32_t; -typedef uint64_t uint_fast64_t; - -// 7.18.1.4 Integer types capable of holding object pointers -#ifdef _WIN64 // [ - typedef signed __int64 intptr_t; - typedef unsigned __int64 uintptr_t; -#else // _WIN64 ][ - typedef _W64 signed int intptr_t; - typedef _W64 unsigned int uintptr_t; -#endif // _WIN64 ] - -// 7.18.1.5 Greatest-width integer types -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; - - -// 7.18.2 Limits of specified-width integer types - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 - -// 7.18.2.1 Limits of exact-width integer types -#define INT8_MIN ((int8_t)_I8_MIN) -#define INT8_MAX _I8_MAX -#define INT16_MIN ((int16_t)_I16_MIN) -#define INT16_MAX _I16_MAX -#define INT32_MIN ((int32_t)_I32_MIN) -#define INT32_MAX _I32_MAX -#define INT64_MIN ((int64_t)_I64_MIN) -#define INT64_MAX _I64_MAX -#define UINT8_MAX _UI8_MAX -#define UINT16_MAX _UI16_MAX -#define UINT32_MAX _UI32_MAX -#define UINT64_MAX _UI64_MAX - -// 7.18.2.2 Limits of minimum-width integer types -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MIN INT64_MIN -#define INT_LEAST64_MAX INT64_MAX -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -// 7.18.2.3 Limits of fastest minimum-width integer types -#define INT_FAST8_MIN INT8_MIN -#define INT_FAST8_MAX INT8_MAX -#define INT_FAST16_MIN INT16_MIN -#define INT_FAST16_MAX INT16_MAX -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST32_MAX INT32_MAX -#define INT_FAST64_MIN INT64_MIN -#define INT_FAST64_MAX INT64_MAX -#define UINT_FAST8_MAX UINT8_MAX -#define UINT_FAST16_MAX UINT16_MAX -#define UINT_FAST32_MAX UINT32_MAX -#define UINT_FAST64_MAX UINT64_MAX - -// 7.18.2.4 Limits of integer types capable of holding object pointers -#ifdef _WIN64 // [ -# define INTPTR_MIN INT64_MIN -# define INTPTR_MAX INT64_MAX -# define UINTPTR_MAX UINT64_MAX -#else // _WIN64 ][ -# define INTPTR_MIN INT32_MIN -# define INTPTR_MAX INT32_MAX -# define UINTPTR_MAX UINT32_MAX -#endif // _WIN64 ] - -// 7.18.2.5 Limits of greatest-width integer types -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX -#define UINTMAX_MAX UINT64_MAX - -// 7.18.3 Limits of other integer types - -#ifdef _WIN64 // [ -# define PTRDIFF_MIN _I64_MIN -# define PTRDIFF_MAX _I64_MAX -#else // _WIN64 ][ -# define PTRDIFF_MIN _I32_MIN -# define PTRDIFF_MAX _I32_MAX -#endif // _WIN64 ] - -#define SIG_ATOMIC_MIN INT_MIN -#define SIG_ATOMIC_MAX INT_MAX - -#ifndef SIZE_MAX // [ -# ifdef _WIN64 // [ -# define SIZE_MAX _UI64_MAX -# else // _WIN64 ][ -# define SIZE_MAX _UI32_MAX -# endif // _WIN64 ] -#endif // SIZE_MAX ] - -// WCHAR_MIN and WCHAR_MAX are also defined in -#ifndef WCHAR_MIN // [ -# define WCHAR_MIN 0 -#endif // WCHAR_MIN ] -#ifndef WCHAR_MAX // [ -# define WCHAR_MAX _UI16_MAX -#endif // WCHAR_MAX ] - -#define WINT_MIN 0 -#define WINT_MAX _UI16_MAX - -#endif // __STDC_LIMIT_MACROS ] - - -// 7.18.4 Limits of other integer types - -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 - -// 7.18.4.1 Macros for minimum-width integer constants - -#define INT8_C(val) val##i8 -#define INT16_C(val) val##i16 -#define INT32_C(val) val##i32 -#define INT64_C(val) val##i64 - -#define UINT8_C(val) val##ui8 -#define UINT16_C(val) val##ui16 -#define UINT32_C(val) val##ui32 -#define UINT64_C(val) val##ui64 - -// 7.18.4.2 Macros for greatest-width integer constants -#define INTMAX_C INT64_C -#define UINTMAX_C UINT64_C - -#endif // __STDC_CONSTANT_MACROS ] - - -#endif // _MSC_STDINT_H_ ] diff --git a/contrib/src/jsmn/jsmn_test.c b/contrib/src/jsmn/jsmn_test.c deleted file mode 100644 index 308faf6..0000000 --- a/contrib/src/jsmn/jsmn_test.c +++ /dev/null @@ -1,364 +0,0 @@ -#include -#include -#include - -#include "jsmn.c" - -static int test_passed = 0; -static int test_failed = 0; - -/* Terminate current test with error */ -#define fail() return __LINE__ - -/* Successfull end of the test case */ -#define done() return 0 - -/* Check single condition */ -#define check(cond) do { if (!(cond)) fail(); } while (0) - -/* Test runner */ -static void test(int (*func)(void), const char *name) { - int r = func(); - if (r == 0) { - test_passed++; - } else { - test_failed++; - printf("FAILED: %s (at line %d)\n", name, r); - } -} - -#define TOKEN_EQ(t, tok_start, tok_end, tok_type) \ - ((t).start == tok_start \ - && (t).end == tok_end \ - && (t).type == (tok_type)) - -#define TOKEN_STRING(js, t, s) \ - (strncmp(js+(t).start, s, (t).end - (t).start) == 0 \ - && strlen(s) == (t).end - (t).start) - -#define TOKEN_PRINT(t) \ - printf("start: %d, end: %d, type: %d, size: %d\n", \ - (t).start, (t).end, (t).type, (t).size) - -int test_empty() { - const char *js; - int r; - jsmn_parser p; - jsmntok_t t[10]; - - js = "{}"; - jsmn_init(&p); - r = jsmn_parse(&p, js, t, 10); - check(r == JSMN_SUCCESS); - check(t[0].type == JSMN_OBJECT); - check(t[0].start == 0 && t[0].end == 2); - - js = "[]"; - jsmn_init(&p); - r = jsmn_parse(&p, js, t, 10); - check(r == JSMN_SUCCESS); - check(t[0].type == JSMN_ARRAY); - check(t[0].start == 0 && t[0].end == 2); - - js = "{\"a\":[]}"; - jsmn_init(&p); - r = jsmn_parse(&p, js, t, 10); - check(r == JSMN_SUCCESS); - check(t[0].type == JSMN_OBJECT && t[0].start == 0 && t[0].end == 8); - check(t[1].type == JSMN_STRING && t[1].start == 2 && t[1].end == 3); - check(t[2].type == JSMN_ARRAY && t[2].start == 5 && t[2].end == 7); - - js = "[{},{}]"; - jsmn_init(&p); - r = jsmn_parse(&p, js, t, 10); - check(r == JSMN_SUCCESS); - check(t[0].type == JSMN_ARRAY && t[0].start == 0 && t[0].end == 7); - check(t[1].type == JSMN_OBJECT && t[1].start == 1 && t[1].end == 3); - check(t[2].type == JSMN_OBJECT && t[2].start == 4 && t[2].end == 6); - return 0; -} - -int test_simple() { - const char *js; - int r; - jsmn_parser p; - jsmntok_t tokens[10]; - - js = "{\"a\": 0}"; - - jsmn_init(&p); - r = jsmn_parse(&p, js, tokens, 10); - check(r == JSMN_SUCCESS); - check(TOKEN_EQ(tokens[0], 0, 8, JSMN_OBJECT)); - check(TOKEN_EQ(tokens[1], 2, 3, JSMN_STRING)); - check(TOKEN_EQ(tokens[2], 6, 7, JSMN_PRIMITIVE)); - - check(TOKEN_STRING(js, tokens[0], js)); - check(TOKEN_STRING(js, tokens[1], "a")); - check(TOKEN_STRING(js, tokens[2], "0")); - - jsmn_init(&p); - js = "[\"a\":{},\"b\":{}]"; - r = jsmn_parse(&p, js, tokens, 10); - check(r == JSMN_SUCCESS); - - jsmn_init(&p); - js = "{\n \"Day\": 26,\n \"Month\": 9,\n \"Year\": 12\n }"; - r = jsmn_parse(&p, js, tokens, 10); - check(r == JSMN_SUCCESS); - - return 0; -} - -int test_primitive() { - int r; - jsmn_parser p; - jsmntok_t tok[10]; - const char *js; -#ifndef JSMN_STRICT - js = "\"boolVar\" : true"; - jsmn_init(&p); - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING - && tok[1].type == JSMN_PRIMITIVE); - check(TOKEN_STRING(js, tok[0], "boolVar")); - check(TOKEN_STRING(js, tok[1], "true")); - - js = "\"boolVar\" : false"; - jsmn_init(&p); - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING - && tok[1].type == JSMN_PRIMITIVE); - check(TOKEN_STRING(js, tok[0], "boolVar")); - check(TOKEN_STRING(js, tok[1], "false")); - - js = "\"intVar\" : 12345"; - jsmn_init(&p); - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING - && tok[1].type == JSMN_PRIMITIVE); - check(TOKEN_STRING(js, tok[0], "intVar")); - check(TOKEN_STRING(js, tok[1], "12345")); - - js = "\"floatVar\" : 12.345"; - jsmn_init(&p); - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING - && tok[1].type == JSMN_PRIMITIVE); - check(TOKEN_STRING(js, tok[0], "floatVar")); - check(TOKEN_STRING(js, tok[1], "12.345")); - - js = "\"nullVar\" : null"; - jsmn_init(&p); - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING - && tok[1].type == JSMN_PRIMITIVE); - check(TOKEN_STRING(js, tok[0], "nullVar")); - check(TOKEN_STRING(js, tok[1], "null")); -#endif - return 0; -} - -int test_string() { - int r; - jsmn_parser p; - jsmntok_t tok[10]; - const char *js; - - js = "\"strVar\" : \"hello world\""; - jsmn_init(&p); - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING - && tok[1].type == JSMN_STRING); - check(TOKEN_STRING(js, tok[0], "strVar")); - check(TOKEN_STRING(js, tok[1], "hello world")); - - js = "\"strVar\" : \"escapes: \\/\\r\\n\\t\\b\\f\\\"\\\\\""; - jsmn_init(&p); - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING - && tok[1].type == JSMN_STRING); - check(TOKEN_STRING(js, tok[0], "strVar")); - check(TOKEN_STRING(js, tok[1], "escapes: \\/\\r\\n\\t\\b\\f\\\"\\\\")); - - js = "\"strVar\" : \"\""; - jsmn_init(&p); - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING - && tok[1].type == JSMN_STRING); - check(TOKEN_STRING(js, tok[0], "strVar")); - check(TOKEN_STRING(js, tok[1], "")); - - return 0; -} - -int test_partial_string() { - int r; - jsmn_parser p; - jsmntok_t tok[10]; - const char *js; - - jsmn_init(&p); - js = "\"x\": \"va"; - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_ERROR_PART && tok[0].type == JSMN_STRING); - check(TOKEN_STRING(js, tok[0], "x")); - check(p.toknext == 1); - - js = "\"x\": \"valu"; - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_ERROR_PART && tok[0].type == JSMN_STRING); - check(TOKEN_STRING(js, tok[0], "x")); - check(p.toknext == 1); - - js = "\"x\": \"value\""; - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING - && tok[1].type == JSMN_STRING); - check(TOKEN_STRING(js, tok[0], "x")); - check(TOKEN_STRING(js, tok[1], "value")); - - js = "\"x\": \"value\", \"y\": \"value y\""; - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING - && tok[1].type == JSMN_STRING && tok[2].type == JSMN_STRING - && tok[3].type == JSMN_STRING); - check(TOKEN_STRING(js, tok[0], "x")); - check(TOKEN_STRING(js, tok[1], "value")); - check(TOKEN_STRING(js, tok[2], "y")); - check(TOKEN_STRING(js, tok[3], "value y")); - - return 0; -} - -int test_unquoted_keys() { -#ifndef JSMN_STRICT - int r; - jsmn_parser p; - jsmntok_t tok[10]; - const char *js; - - jsmn_init(&p); - js = "key1: \"value\"\nkey2 : 123"; - - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_SUCCESS && tok[0].type == JSMN_PRIMITIVE - && tok[1].type == JSMN_STRING && tok[2].type == JSMN_PRIMITIVE - && tok[3].type == JSMN_PRIMITIVE); - check(TOKEN_STRING(js, tok[0], "key1")); - check(TOKEN_STRING(js, tok[1], "value")); - check(TOKEN_STRING(js, tok[2], "key2")); - check(TOKEN_STRING(js, tok[3], "123")); -#endif - return 0; -} - -int test_partial_array() { - int r; - jsmn_parser p; - jsmntok_t tok[10]; - const char *js; - - jsmn_init(&p); - js = " [ 1, true, "; - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_ERROR_PART && tok[0].type == JSMN_ARRAY - && tok[1].type == JSMN_PRIMITIVE && tok[2].type == JSMN_PRIMITIVE); - - js = " [ 1, true, [123, \"hello"; - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_ERROR_PART && tok[0].type == JSMN_ARRAY - && tok[1].type == JSMN_PRIMITIVE && tok[2].type == JSMN_PRIMITIVE - && tok[3].type == JSMN_ARRAY && tok[4].type == JSMN_PRIMITIVE); - - js = " [ 1, true, [123, \"hello\"]"; - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_ERROR_PART && tok[0].type == JSMN_ARRAY - && tok[1].type == JSMN_PRIMITIVE && tok[2].type == JSMN_PRIMITIVE - && tok[3].type == JSMN_ARRAY && tok[4].type == JSMN_PRIMITIVE - && tok[5].type == JSMN_STRING); - /* check child nodes of the 2nd array */ - check(tok[3].size == 2); - - js = " [ 1, true, [123, \"hello\"]]"; - r = jsmn_parse(&p, js, tok, 10); - check(r == JSMN_SUCCESS && tok[0].type == JSMN_ARRAY - && tok[1].type == JSMN_PRIMITIVE && tok[2].type == JSMN_PRIMITIVE - && tok[3].type == JSMN_ARRAY && tok[4].type == JSMN_PRIMITIVE - && tok[5].type == JSMN_STRING); - check(tok[3].size == 2); - check(tok[0].size == 3); - return 0; -} - -int test_array_nomem() { - int i; - int r; - jsmn_parser p; - jsmntok_t toksmall[10], toklarge[10]; - const char *js; - - js = " [ 1, true, [123, \"hello\"]]"; - - for (i = 0; i < 6; i++) { - jsmn_init(&p); - memset(toksmall, 0, sizeof(toksmall)); - memset(toklarge, 0, sizeof(toklarge)); - r = jsmn_parse(&p, js, toksmall, i); - check(r == JSMN_ERROR_NOMEM); - - memcpy(toklarge, toksmall, sizeof(toksmall)); - - r = jsmn_parse(&p, js, toklarge, 10); - check(r == JSMN_SUCCESS); - - check(toklarge[0].type == JSMN_ARRAY && toklarge[0].size == 3); - check(toklarge[3].type == JSMN_ARRAY && toklarge[3].size == 2); - } - return 0; -} - -int test_objects_arrays() { - int i; - int r; - jsmn_parser p; - jsmntok_t tokens[10]; - const char *js; - - js = "[10}"; - jsmn_init(&p); - r = jsmn_parse(&p, js, tokens, 10); - check(r == JSMN_ERROR_INVAL); - - js = "[10]"; - jsmn_init(&p); - r = jsmn_parse(&p, js, tokens, 10); - check(r == JSMN_SUCCESS); - - js = "{\"a\": 1]"; - jsmn_init(&p); - r = jsmn_parse(&p, js, tokens, 10); - check(r == JSMN_ERROR_INVAL); - - js = "{\"a\": 1}"; - jsmn_init(&p); - r = jsmn_parse(&p, js, tokens, 10); - check(r == JSMN_SUCCESS); - - return 0; -} - -int main() { - test(test_empty, "general test for a empty JSON objects/arrays"); - test(test_simple, "general test for a simple JSON string"); - test(test_primitive, "test primitive JSON data types"); - test(test_string, "test string JSON data types"); - test(test_partial_string, "test partial JSON string parsing"); - test(test_partial_array, "test partial array reading"); - test(test_array_nomem, "test array reading with a smaller number of tokens"); - test(test_unquoted_keys, "test unquoted keys (like in JavaScript)"); - test(test_objects_arrays, "test objects and arrays"); - printf("\nPASSED: %d\nFAILED: %d\n", test_passed, test_failed); - return 0; -} - diff --git a/contrib/src/swi-pl/SWI-cpp.h b/contrib/src/swi-pl/SWI-cpp.h deleted file mode 100644 index 22c02a8..0000000 --- a/contrib/src/swi-pl/SWI-cpp.h +++ /dev/null @@ -1,1099 +0,0 @@ -/* $Id$ - - Part of SWI-Prolog - - Author: Jan Wielemaker - E-mail: J.Wielemaker@cs.vu.nl - WWW: http://www.swi-prolog.org - Copyright (C): 1985-2009, University of Amsterdam - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _SWI_CPP_H -#define _SWI_CPP_H - -#ifdef SWI_REINTERPRET_FOREIGN -# define PL_FOREIGN_TO_FUNCTION(f) reinterpret_cast(f) -#else -# define PL_FOREIGN_TO_FUNCTION(f) (void *)f -#endif - -#include -#include -#ifndef __APPLE__ -#include -#endif - -#ifdef __BORLANDC__ -#define __inline inline -#endif - -#ifdef _MSC_VER /* MSVC doesn't know throw doesn't return */ -#define PL_THROWN(value) return value; -#else -#define PL_THROWN(v) (void)0 -#endif - -class PlTerm; -class PlTermv; - - /******************************* - * PROLOG CONSTANTS * - *******************************/ - -class PlFunctor -{ -public: - functor_t functor; - - PlFunctor(const char *name, int arity) - { functor = PL_new_functor(PL_new_atom(name), arity); - } -}; - - -class PlAtom -{ -public: - atom_t handle; - - PlAtom(atom_t h) - { handle = h; - } - PlAtom(const char *text) - { handle = PL_new_atom(text); - } - PlAtom(const PlTerm &t); - - operator const char *(void) - { return PL_atom_chars(handle); - } - - int operator ==(const char *s) - { return strcmp(s, PL_atom_chars(handle)) == 0; - } - int operator ==(const PlAtom &a) - { return handle == a.handle; - } -}; - - /******************************* - * GENERIC PROLOG TERM * - *******************************/ - - -class PlTerm -{ -public: - term_t ref; - - PlTerm(); - PlTerm(term_t t) - { ref = t; - } - - /* C --> PlTerm */ - PlTerm(const char *text); - PlTerm(long val); - PlTerm(double val); - PlTerm(const PlAtom &a); - PlTerm(void *ptr); - - /* PlTerm --> C */ - operator term_t(void) const - { return ref; - } - operator char *(void) const; - operator long(void) const; - operator int(void) const; - operator double(void) const; - operator PlAtom(void) const; - operator void *(void) const; - - int type() - { return PL_term_type(ref); - } - - /* Compounds */ - PlTerm operator [](int index) const; - int arity(); - const char *name(); - - /* UNIFY */ - int operator =(const PlTerm &t2); /* term */ - int operator =(const PlAtom &a); /* atom */ - int operator =(const char *v); /* atom (from char *) */ - int operator =(long v); /* integer */ - int operator =(int v); /* integer */ - int operator =(double v); /* float */ - int operator =(const PlFunctor &f); /* functor */ - - /* Comparison standard order terms */ - int operator ==(const PlTerm &t2) - { return PL_compare(ref, t2.ref) == 0; - } - int operator !=(const PlTerm &t2) - { return PL_compare(ref, t2.ref) != 0; - } - int operator <(const PlTerm &t2) - { return PL_compare(ref, t2.ref) < 0; - } - int operator >(const PlTerm &t2) - { return PL_compare(ref, t2.ref) > 0; - } - int operator <=(const PlTerm &t2) - { return PL_compare(ref, t2.ref) <= 0; - } - int operator >=(const PlTerm &t2) - { return PL_compare(ref, t2.ref) >= 0; - } - /* comparison (long) */ - int operator ==(long v); - int operator !=(long v); - int operator <(long v); - int operator >(long v); - int operator <=(long v); - int operator >=(long v); - - /* comparison (string) */ - int operator ==(const char *s); - int operator ==(const PlAtom &a); -}; - - - /******************************* - * TERM VECTOR * - *******************************/ - -class PlTermv -{ -public: - term_t a0; - int size; - - PlTermv(int n) - { a0 = PL_new_term_refs(n); - size = n; - } - PlTermv(int n, term_t t0) - { a0 = t0; - size = n; - } - - /* create from args */ - PlTermv(PlTerm m0); - PlTermv(PlTerm m0, PlTerm m1); - PlTermv(PlTerm m0, PlTerm m1, PlTerm m2); - PlTermv(PlTerm m0, PlTerm m1, PlTerm m2, PlTerm m3); - PlTermv(PlTerm m0, PlTerm m1, PlTerm m2, PlTerm m3, PlTerm m4); - - PlTerm operator [](int n) const; -}; - - /******************************* - * SPECIALISED TERMS * - *******************************/ - -class PlCompound : public PlTerm -{ -public: - - PlCompound(const char *text); - PlCompound(const char *functor, const PlTermv &args); -}; - - -class PlString : public PlTerm -{ -public: - - PlString(const char *text); - PlString(const char *text, int len); -}; - - -class PlCodeList : public PlTerm -{ -public: - - PlCodeList(const char *text); -}; - - -class PlCharList : public PlTerm -{ -public: - - PlCharList(const char *text); -}; - - - /******************************* - * EXCEPTIONS * - *******************************/ - -class PlException : public PlTerm -{ -public: - PlException() - { term_t ex = PL_exception(0); - if ( ex ) - ref = ex; - else - PL_fatal_error("No exception"); - } - - PlException(const PlTerm &t) - { ref = t.ref; - } - - operator const char *(void); - - int plThrow() - { return PL_raise_exception(ref); - } - - void cppThrow(); -}; - - -class PlTypeError : public PlException -{ -public: - - PlTypeError(const PlTerm &t) : PlException(t) {} - - PlTypeError(const char *expected, PlTerm actual) : - PlException(PlCompound("error", - PlTermv(PlCompound("type_error", - PlTermv(expected, actual)), - PlTerm()))) - { - } -}; - - -class PlDomainError : public PlException -{ -public: - - PlDomainError(const PlTerm &t) : PlException(t) {} - - PlDomainError(const char *expected, PlTerm actual) : - PlException(PlCompound("error", - PlTermv(PlCompound("domain_error", - PlTermv(expected, actual)), - PlTerm()))) - { - } -}; - - -class PlResourceError : public PlException -{ -public: - PlResourceError() : PlException() {} - - PlResourceError(const PlTerm &t) : PlException(t) {} - - PlResourceError(const char *resource) : - PlException(PlCompound("error", - PlTermv(PlCompound("resource_error", - PlTermv(PlTerm(resource))), - PlTerm()))) - { - } -}; - - -class PlTermvDomainError : public PlException -{ -public: - - PlTermvDomainError(int size, int n) : - PlException(PlCompound("error", - PlTermv(PlCompound("domain_error", - PlTermv(PlCompound("argv", - size), - PlTerm((long)n))), - PlTerm()))) - { - } -}; - - - /******************************* - * PLTERM IMPLEMENTATION * - *******************************/ - -__inline -PlTerm::PlTerm() -{ if ( !(ref = PL_new_term_ref()) ) - throw PlResourceError(); -} - -__inline -PlTerm::PlTerm(const char *text) -{ if ( !(ref = PL_new_term_ref()) || - !PL_put_atom_chars(ref, text) ) - throw PlResourceError(); -} - -__inline -PlTerm::PlTerm(long val) -{ if ( !(ref = PL_new_term_ref()) || - !PL_put_integer(ref, val) ) - throw PlResourceError(); -} - -__inline -PlTerm::PlTerm(double val) -{ ref = PL_new_term_ref(); - - if ( !PL_put_float(ref, val) ) - throw PlResourceError(); -} - -__inline -PlTerm::PlTerm(const PlAtom &a) -{ if ( !(ref = PL_new_term_ref()) ) - throw PlResourceError(); - - PL_put_atom(ref, a.handle); -} - -__inline -PlTerm::PlTerm(void *ptr) -{ if ( !(ref = PL_new_term_ref()) || - !PL_put_pointer(ref, ptr) ) - throw PlResourceError(); -} - - /******************************* - * SPECIALISED IMPLEMENTATIONS * - *******************************/ - -__inline -PlString::PlString(const char *text) : PlTerm() -{ if ( !PL_put_string_chars(ref, text) ) - throw PlResourceError(); -} - -__inline -PlString::PlString(const char *text, int len) : PlTerm() -{ if ( !PL_put_string_nchars(ref, len, text) ) - throw PlResourceError(); -} - -__inline -PlCodeList::PlCodeList(const char *text) : PlTerm() -{ if ( !PL_put_list_codes(ref, text) ) - throw PlResourceError(); -} - -__inline -PlCharList::PlCharList(const char *text) : PlTerm() -{ if ( !PL_put_list_chars(ref, text) ) - throw PlResourceError(); -} - - - /******************************* - * LISTS * - *******************************/ - -class PlTail : public PlTerm -{ -public: - - PlTail(const PlTerm &l) - { if ( PL_is_variable(l.ref) || PL_is_list(l.ref) ) - { if ( !(ref = PL_copy_term_ref(l.ref)) ) - throw PlResourceError(); - } else - throw PlTypeError("list", l.ref); - } - - /* building */ - int append(const PlTerm &e) - { term_t tmp, ex; - - if ( (tmp = PL_new_term_ref()) && - PL_unify_list(ref, tmp, ref) && - PL_unify(tmp, e.ref) ) - { PL_reset_term_refs(tmp); - return TRUE; - } - - if ( (ex = PL_exception(0)) ) - throw PlResourceError(ex); - - return FALSE; - } - int close() - { return PL_unify_nil(ref); - } - - /* enumerating */ - int next(PlTerm &t) - { if ( PL_get_list(ref, t, ref) ) - return TRUE; - - if ( PL_get_nil(ref) ) - return FALSE; - - throw PlTypeError("list", ref); - PL_THROWN(FALSE); - } -}; - - - /******************************* - * REGISTER * - *******************************/ - - -class PlRegister -{ -public: - - PlRegister(const char *module, const char *name, int arity, - foreign_t (f)(term_t t0, int a, control_t ctx)) - { PL_register_foreign_in_module(module, name, arity, PL_FOREIGN_TO_FUNCTION(f), PL_FA_VARARGS); - } - - PlRegister(const char *module, const char *name, foreign_t (*f)(PlTerm a0)) - { PL_register_foreign_in_module(module, name, 1, PL_FOREIGN_TO_FUNCTION(f), 0); - } - PlRegister(const char *module, const char *name, foreign_t (*f)(PlTerm a0, PlTerm a1)) - { PL_register_foreign_in_module(module, name, 2, PL_FOREIGN_TO_FUNCTION(f), 0); - } - PlRegister(const char *module, const char *name, foreign_t (*f)(PlTerm a0, PlTerm a1, PlTerm a2)) - { PL_register_foreign_in_module(module, name, 3, PL_FOREIGN_TO_FUNCTION(f), 0); - } - - // for non-deterministic calls - PlRegister(const char *module, const char *name, int arity, - foreign_t (f)(term_t t0, int a, control_t ctx), short flags) - { PL_register_foreign_in_module(module, name, arity, PL_FOREIGN_TO_FUNCTION(f), flags); - } - -}; - - - /******************************* - * CALLING PROLOG * - *******************************/ - -class PlFrame -{ -public: - fid_t fid; - - PlFrame() - { fid = PL_open_foreign_frame(); - } - - ~PlFrame() - { PL_close_foreign_frame(fid); - } - - void rewind() - { PL_rewind_foreign_frame(fid); - } -}; - - -class PlQuery -{ -public: - qid_t qid; - - PlQuery(const char *name, const PlTermv &av) - { predicate_t p = PL_predicate(name, av.size, "user"); - - qid = PL_open_query((module_t)0, PL_Q_CATCH_EXCEPTION, p, av.a0); - if ( !qid ) - throw PlResourceError(); - } - PlQuery(const char *module, const char *name, const PlTermv &av) - { atom_t ma = PL_new_atom(module); - atom_t na = PL_new_atom(name); - module_t m = PL_new_module(ma); - predicate_t p = PL_pred(PL_new_functor(na, av.size), m); - - PL_unregister_atom(ma); - PL_unregister_atom(na); - - qid = PL_open_query(m, PL_Q_CATCH_EXCEPTION, p, av.a0); - if ( !qid ) - throw PlResourceError(); - } - - ~PlQuery() - { PL_cut_query(qid); - } - - int next_solution(); -}; - - -__inline int -PlCall(const char *predicate, const PlTermv &args) -{ PlQuery q(predicate, args); - return q.next_solution(); -} - -__inline int -PlCall(const char *module, const char *predicate, const PlTermv &args) -{ PlQuery q(module, predicate, args); - return q.next_solution(); -} - -__inline int -PlCall(const char *goal) -{ PlQuery q("call", PlTermv(PlCompound(goal))); - return q.next_solution(); -} - - - - /******************************* - * ATOM (BODY) * - *******************************/ - -__inline -PlAtom::PlAtom(const PlTerm &t) -{ atom_t a; - - if ( PL_get_atom(t.ref, &a) ) - handle = a; - else - throw PlTypeError("atom", t); -} - - - /******************************* - * TERM (BODY) * - *******************************/ - - /* PlTerm --> C */ - -__inline PlTerm::operator char *(void) const -{ char *s; - - if ( PL_get_chars(ref, &s, CVT_ALL|CVT_WRITE|BUF_RING) ) - return s; - - throw PlTypeError("text", ref); - PL_THROWN(NULL); -} - -__inline PlTerm::operator long(void) const -{ long v; - - if ( PL_get_long(ref, &v) ) - return v; - - throw PlTypeError("integer", ref); - PL_THROWN(0L); -} - -__inline PlTerm::operator int(void) const -{ int v; - - if ( PL_get_integer(ref, &v) ) - return v; - - throw PlTypeError("integer", ref); - PL_THROWN(0); -} - -__inline PlTerm::operator double(void) const -{ double v; - - if ( PL_get_float(ref, &v) ) - return v; - - throw PlTypeError("float", ref); - PL_THROWN(0.0); -} - -__inline PlTerm::operator PlAtom(void) const -{ atom_t v; - - if ( PL_get_atom(ref, &v) ) - return PlAtom(v); - - throw PlTypeError("atom", ref); - PL_THROWN((atom_t)0); -} - -__inline PlTerm::operator void *(void) const -{ void *ptr; - - if ( PL_get_pointer(ref, &ptr) ) - return ptr; - - throw PlTypeError("pointer", ref); - PL_THROWN(NULL); -} - - /* compounds */ - -__inline PlTerm -PlTerm::operator [](int index) const -{ PlTerm t; - - if ( PL_get_arg(index, ref, t.ref) ) - return t; - - if ( !PL_is_compound(ref) ) - throw PlTypeError("compound", ref); - else - { if ( !PL_put_integer(t.ref, index) ) - throw PlResourceError(); - - if ( index < 1 ) - throw PlDomainError("not_less_than_zero", t.ref); - else - throw PlDomainError("arity", t.ref); /* TBD: proper exception */ - } - PL_THROWN((term_t)0); -} - - -__inline int -PlTerm::arity() -{ atom_t name; - int arity; - - if ( PL_get_name_arity(ref, &name, &arity) ) - return arity; - - throw PlTypeError("compound", ref); - PL_THROWN(0); -} - - -__inline const char * -PlTerm::name() -{ atom_t name; - int arity; - - if ( PL_get_name_arity(ref, &name, &arity) ) - return PL_atom_chars(name); - - throw PlTypeError("compound", ref); - PL_THROWN(NULL); -} - - - /* Unification */ - -__inline int PlTerm::operator =(const PlTerm &t2) /* term = term */ -{ int rc = PL_unify(ref, t2.ref); - term_t ex; - - if ( !rc && (ex=PL_exception(0)) ) - throw PlResourceError(ex); - return rc; -} - -__inline int PlTerm::operator =(const PlAtom &a) /* term = atom */ -{ int rc = PL_unify_atom(ref, a.handle); - term_t ex; - - if ( !rc && (ex=PL_exception(0)) ) - throw PlResourceError(ex); - return rc; -} - -__inline int PlTerm::operator =(const char *v) /* term = atom */ -{ int rc = PL_unify_atom_chars(ref, v); - term_t ex; - - if ( !rc && (ex=PL_exception(0)) ) - throw PlResourceError(ex); - return rc; -} - -__inline int PlTerm::operator =(long v) -{ int rc = PL_unify_integer(ref, v); - term_t ex; - - if ( !rc && (ex=PL_exception(0)) ) - throw PlResourceError(ex); - return rc; -} - -__inline int PlTerm::operator =(int v) -{ int rc = PL_unify_integer(ref, v); - term_t ex; - - if ( !rc && (ex=PL_exception(0)) ) - throw PlResourceError(ex); - return rc; -} - -__inline int PlTerm::operator =(double v) -{ int rc = PL_unify_float(ref, v); - term_t ex; - - if ( !rc && (ex=PL_exception(0)) ) - throw PlResourceError(ex); - return rc; -} - -__inline int PlTerm::operator =(const PlFunctor &f) -{ int rc = PL_unify_functor(ref, f.functor); - term_t ex; - - if ( !rc && (ex=PL_exception(0)) ) - throw PlResourceError(ex); - return rc; -} - - /* comparison */ - - -__inline int PlTerm::operator ==(long v) -{ long v0; - - if ( PL_get_long(ref, &v0) ) - return v0 == v; - - throw PlTypeError("integer", ref); - PL_THROWN(0); -} - -__inline int PlTerm::operator !=(long v) -{ long v0; - - if ( PL_get_long(ref, &v0) ) - return v0 != v; - - throw PlTypeError("integer", ref); - PL_THROWN(0); -} - -__inline int PlTerm::operator <(long v) -{ long v0; - - if ( PL_get_long(ref, &v0) ) - return v0 < v; - - throw PlTypeError("integer", ref); - PL_THROWN(0); -} - -__inline int PlTerm::operator >(long v) -{ long v0; - - if ( PL_get_long(ref, &v0) ) - return v0 > v; - - throw PlTypeError("integer", ref); - PL_THROWN(0); -} - -__inline int PlTerm::operator <=(long v) -{ long v0; - - if ( PL_get_long(ref, &v0) ) - return v0 <= v; - - throw PlTypeError("integer", ref); - PL_THROWN(0); -} - -__inline int PlTerm::operator >=(long v) -{ long v0; - - if ( PL_get_long(ref, &v0) ) - return v0 >= v; - - throw PlTypeError("integer", ref); - PL_THROWN(0); -} - - /* comparison (string) */ - -__inline int PlTerm::operator ==(const char *s) -{ char *s0; - - if ( PL_get_chars(ref, &s0, CVT_ALL) ) - return strcmp(s0, s) == 0; - - throw PlTypeError("text", ref); - PL_THROWN(0); -} - - -__inline int PlTerm::operator ==(const PlAtom &a) -{ atom_t v; - - if ( PL_get_atom(ref, &v) ) - return v == a.handle; - - throw PlTypeError("atom", ref); - PL_THROWN(0); -} - - - /******************************* - * COMPPOUND (BODY) * - *******************************/ - - -__inline -PlCompound::PlCompound(const char *text) : PlTerm() -{ term_t t = PL_new_term_ref(); - - if ( !PL_chars_to_term(text, t) ) - throw PlException(t); - - PL_put_term(ref, t); -} - -__inline -PlCompound::PlCompound(const char *functor, const PlTermv &args) : PlTerm() -{ if ( !PL_cons_functor_v(ref, - PL_new_functor(PL_new_atom(functor), args.size), - args.a0) ) - throw PlResourceError(); -} - - /******************************* - * TERMV (BODY) * - *******************************/ - - -__inline PlTermv::PlTermv(PlTerm m0) -{ size = 1; - a0 = m0.ref; -} - -__inline PlTermv::PlTermv(PlTerm m0, PlTerm m1) -{ size = 2; - if ( !(a0 = PL_new_term_refs(2)) ) - throw PlResourceError(); - PL_put_term(a0+0, m0); - PL_put_term(a0+1, m1); -} - -__inline PlTermv::PlTermv(PlTerm m0, PlTerm m1, PlTerm m2) -{ size = 3; - if ( !(a0 = PL_new_term_refs(3)) ) - throw PlResourceError(); - PL_put_term(a0+0, m0); - PL_put_term(a0+1, m1); - PL_put_term(a0+2, m2); -} - -__inline PlTermv::PlTermv(PlTerm m0, PlTerm m1, PlTerm m2, PlTerm m3) -{ size = 4; - if ( !(a0 = PL_new_term_refs(4)) ) - throw PlResourceError(); - PL_put_term(a0+0, m0); - PL_put_term(a0+1, m1); - PL_put_term(a0+2, m2); - - PL_put_term(a0+3, m3); -} - -__inline PlTermv::PlTermv(PlTerm m0, PlTerm m1, PlTerm m2, - PlTerm m3, PlTerm m4) -{ size = 5; - if ( !(a0 = PL_new_term_refs(5)) ) - throw PlResourceError(); - PL_put_term(a0+0, m0); - PL_put_term(a0+1, m1); - PL_put_term(a0+2, m2); - PL_put_term(a0+3, m3); - PL_put_term(a0+4, m4); -} - - -__inline PlTerm -PlTermv::operator [](int n) const -{ if ( n < 0 || n >= size ) - throw PlTermvDomainError(size, n); - - return PlTerm(a0+n); -} - - - /******************************* - * EXCEPTIONS (BODY) * - *******************************/ - -__inline PlException::operator const char *(void) -{ PlFrame fr; -#ifdef USE_PRINT_MESSAGE - PlTermv av(2); - - av[0] = PlCompound("print_message", - PlTermv("error", ref)); - PlQuery q("$write_on_string", av); - if ( q.next_solution() ) - return (char *)av[1]; -#else - PlTermv av(2); - av[0] = PlTerm(ref); - PlQuery q("$messages", "message_to_string", av); - if ( q.next_solution() ) - return (char *)av[1]; -#endif - return "[ERROR: Failed to generate message. Internal error]\n"; -} - - -__inline void -PlException::cppThrow() -{ term_t a = PL_new_term_ref(); - atom_t name; - int arity; - - if ( PL_get_arg(1, ref, a) && - PL_get_name_arity(a, &name, &arity) ) - { const char *s = PL_atom_chars(name); - - if ( strcmp(s, "type_error") == 0 ) - throw PlTypeError(ref); - if ( strcmp(s, "domain_error") == 0 ) - throw PlDomainError(ref); - if ( strcmp(s, "resource_error") == 0 ) - throw PlResourceError(ref); - } - - throw *this; -} - - - /******************************* - * QUERY (BODY) * - *******************************/ - -__inline int -PlQuery::next_solution() -{ int rval; - - if ( !(rval = PL_next_solution(qid)) ) - { term_t ex; - - if ( (ex = PL_exception(qid)) ) - PlException(ex).cppThrow(); - } - return rval; -} - - - /******************************* - * ENGINE * - *******************************/ - -class PlError -{ -public: - char *message; - - PlError(const char *msg) - { message = new char[strlen(msg+1)]; - strcpy(message, msg); - } -}; - - -class PlEngine -{ -public: - - PlEngine(int argc, char **argv) - { if ( !PL_initialise(argc, argv) ) - throw PlError("failed to initialise"); - } - - PlEngine(char *av0) - { int ac = 0; - char **av = (char **)malloc(sizeof(char *) * 2); - - av[ac++] = av0; - - if ( !PL_initialise(1, av) ) - throw PlError("failed to initialise"); - } - - ~PlEngine() - { PL_cleanup(0); - } -}; - - - /******************************* - * REGISTER PREDICATES * - *******************************/ - -#ifndef PROLOG_MODULE -#define PROLOG_MODULE (const char*)NULL -#endif - -#define PREDICATE(name, arity) \ - static foreign_t \ - pl_ ## name ## __ ## arity(PlTermv _av); \ - static foreign_t \ - _pl_ ## name ## __ ## arity(term_t t0, int a, control_t c) \ - { try \ - { \ - return pl_ ## name ## __ ## arity(PlTermv(arity, t0)); \ - } catch ( PlException &ex ) \ - { return ex.plThrow(); \ - } \ - } \ - static PlRegister _x ## name ## __ ## arity(PROLOG_MODULE, #name, arity, \ - _pl_ ## name ## __ ## arity); \ - static foreign_t pl_ ## name ## __ ## arity(PlTermv _av) - - -#define PREDICATE_NONDET(name, arity) \ - static foreign_t \ - pl_ ## name ## __ ## arity(PlTermv _av, foreign_t handle); \ - static foreign_t \ - _pl_ ## name ## __ ## arity(term_t t0, int a, control_t c) \ - { try \ - { \ - return pl_ ## name ## __ ## arity(PlTermv(arity, t0), (foreign_t)c); \ - } catch ( PlException &ex ) \ - { return ex.plThrow(); \ - } \ - } \ - static PlRegister _x ## name ## __ ## arity(PROLOG_MODULE, #name, arity, \ - _pl_ ## name ## __ ## arity, \ - PL_FA_NONDETERMINISTIC | PL_FA_VARARGS); \ - static foreign_t pl_ ## name ## __ ## arity(PlTermv _av, foreign_t handle) - -#define A1 _av[0] -#define A2 _av[1] -#define A3 _av[2] -#define A4 _av[3] -#define A5 _av[4] -#define A6 _av[5] -#define A7 _av[6] -#define A8 _av[7] -#define A9 _av[8] -#define A10 _av[9] - -#endif /*_SWI_CPP_H*/ diff --git a/docs/BUILDING.md b/docs/BUILDING.md deleted file mode 100644 index 29721b4..0000000 --- a/docs/BUILDING.md +++ /dev/null @@ -1,467 +0,0 @@ -# Building from Source - - - -**Table of Contents** - -- [General](#general) -- [Build Dependencies](#build-dependencies) -- [Platform Notes](#platform-notes) - - [Mac OSX](#mac-osx) - - [Linux](#linux) - - [Windows](#windows) - - [iOS](#ios) - - [Raspberry Pi](#raspberry-pi) -- [Language Bindings](#language-bindings) - - [Java](#java) - - [CSharp](#csharp) - - [Important Note for Windows](#important-note-for-windows) -- [Optional Functionality](#optional-functionality) -- [About 32/64Bit Support](#about-3264bit-support) - - - -## General - -The source code is built using CMake, the process of building uscxml is -essentially the same on every platform: - -1. Read the [Platform Notes](#platforn-notes) below to prepare your system. -2. Checkout uscxml into a convenient directory: - - git clone git://github.com/tklab-tud/uscxml.git - -3. Create a new directory for an *out-of-source* build. I usually create sub-directories -in <USCXML_SRC>/build/. -4. Run cmake (or ccmake / CMake-GUI) to create the files required by your actual build-system. -5. Use your actual build-system or development environment to build uscxml. -6. Optionally build the [language bindings](#language-bindings) to embed the SCXML interpreter in another language. -7. Read the SCXML draft and have a look at the tests to get started. - -If you want to build for another IDE or build-system, just create a new -*out-of-source* build directory and start over with CMake. To get an idea of -supported IDEs and build-environments on your platform, type cmake --help -or run the CMake-GUI and look for the *Generators* section at the end of the -output. Default on Unices is Makefiles. - -Note: If you plan to use Eclipse CDT, you cannot have a build directory anywhere under -the source directory - just create the build directory anywhere else. This only applies to the Eclipse CDT -project generator. - -Note: You cannot build the language bindings with the Visual Studio project as it croaks when calling SWIG, -just have another build directory with the "NMake Makefiles" project generator. - -## Build Dependencies - -Overview of the uscxml dependencies. See the [Platform Notes](#platform-notes) for details. - -Note: We download pre-compiled versions of most dependencies at CMake configure-time. If you want -to provide you own libraries, remove them from <USCXML_SRC>/contrib/prebuilt/ and provide -your own. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Visual Studio 10
required -
- - -
PlatformDependencyVersionComment
EveryoneCMake
required
>= 2.8.6The build-system used for uscxml.
SWIG
optional
>= 2.0.6Generates language bindings to embed uSCXML in other target languages.
libevent
pre-compiled
>= 2.1.xEvent queues with callbacks and the HTTP server.
curl
pre-compiled / required
>= 7.29.0URL downloads.
v8
pre-compiled
svn checkoutECMAScript datamodel implementation.
SWI Prolog
pre-compiled for unices
>= 6.3.xProlog datamodel implementation.
glog
pre-compiled
>= 0.3.3Logging library.
Arabica
pre-compiled
>= git checkoutXML DOM / XPath / XML Events.
SQLite
optional
>= 3.7.15.2Persistence and sqlite invoker.
OpenSceneGraph
optional
>= 3.1.X3D invokers (scenegraph, osgconvert).
Doxygen
recommended
Used by make docs to generate documentation from source comments.
Mac OSXXCode
required
4.2.1 worksApples SDK with all the toolchains.
MacPorts
recommended
>= 2.0.3Build system for a wide selection of open-source packages.
libxml2
pre-installed
>= 2.6.16Actual XML parser used by Arabica.
Linuxlibxml2
required
>= 2.6.16Actual XML parser used by Arabica.
Windowsv10 pro worksAs a student, you can get your version through MSAA.
- -## Platform Notes - -The following sections will detail the preparation of the respective platforms to ultimately compile uscxml. - -## Mac OSX - -You will have to install CMake via Macports: - - # required dependencies - $ sudo port install cmake - - # optional dependencies for language bindings - $ sudo port install apache-ant swig-java swig-php swig-csharp - - # other optional dependencies - $ sudo port install lua swi-prolog-devel ffmpeg-devel libical expect libpurple OpenSceneGraph-devel protobuf-cpp - -The rest is pre-installed or downloaded at configure-time as pre-compiled libraries. -Just download the source and invoke CMake to create Makefiles or a Xcode project. - -### Console / Make - - $ cd - $ mkdir -p build/cli && cd build/cli - $ cmake ../.. - [...] - -- Build files have been written to: .../build/cli - $ make - -You can test whether everything works by starting the uscxml-browser with a test.scxml file: - - $ ./bin/uscxml-browser ../../test/uscxml/test-ecmascript.scxml - -### Xcode - - $ cd - $ mkdir -p build/xcode && cd build/xcode - $ cmake -G Xcode ../.. - [...] - -- Build files have been written to: .../build/xcode - $ open uscxml.xcodeproj - -You can of course reuse the same source directory for many build directories. - -## Linux - -Depending on your distribution, you will most likely have apt-get or yum available as package managers. -If you do not, I'll have to assume that you are knowledgable enough to resolve build dependencies on your own. - -### Preparing *apt-get based* distributions - -This would be all distributions based on Debian, like Ubuntu, Linux Mint and the like. - - # build system and compiler - $ sudo apt-get install git cmake cmake-curses-gui make g++ - - # uscxml required dependencies - $ sudo apt-get install libxml2-dev libcurl4-openssl-dev - -There may still be packages missing due to the set of dependencies among packages -in the various distributons. Try to run CMake and resolve dependencies until you -are satisfied. - -### Preparing *yum based* distributions - -This would be all distributions based on Redhat, e.g. Fedora. - - # build system and compiler - $ sudo yum install git cmake cmake-gui gcc-c++ - - # uscxml required dependencies - $ sudo yum install xml2-devel libcurl-devel - -### Fedora 20 - -Here is a complete walk-through to get uscxml running on Fedora 20, starting with the net installer. - - # get us git and the developer tools - $ sudo yum install git gcc-c++ cmake - - # uscxml required dependencies - $ sudo yum install libxml2-devel libcurl-devel - -This is sufficient to get uscxml to build. If you want some more functionality, install some more libraries: - - # SWI prolog datamodel - $ sudo yum install pl-devel - - # OpenAL invoker - $ sudo yum install openal-soft-devel libsndfile-devel - - # scenegraph and osgconvert invoker - $ sudo yum install OpenSceneGraph-devel mesa-libGL-devel - - # ffmpeg invoker (add repository from http://rpmfusion.org) - $ sudo yum install ffmpeg-devel ffmpeg-compat-devel - - # calendar invoker - $ sudo yum install libical-devel - - # expect invoker - $ sudo yum install expect-devel tk-devel - - # instant messaging invoker - $ sudo yum install libpurple-devel - -### Console / Make - -Instructions are a literal copy of building uscxml for MacOSX on the console from above: - - $ cd - $ mkdir -p build/cli && cd build/cli - $ cmake ../.. - [...] - -- Build files have been written to: .../build/cli - $ make - -You can test whether everything works by starting the uscxml-browser with a test.scxml file: - - $ ./bin/uscxml-browser ../../test/uscxml/test-ecmascript.scxml - -### Eclipse CDT - -Note: Eclipse does not like the project to be a subdirectory in the source. -You have to choose your build directory with the generated project accordingly. - - $ mkdir -p ~/Desktop/build/uscxml/eclipse && cd ~/Desktop/build/uscxml/eclipse - $ cmake -G "Eclipse CDT4 - Unix Makefiles" - [...] - -- Build files have been written to: .../build/uscxml/eclipse - -Now open Eclipse CDT and import the out-of-source directory as an existing project into workspace, leaving the "Copy projects -into workspace" checkbox unchecked. There are some more [detailed instruction](http://www.cmake.org/Wiki/Eclipse_CDT4_Generator) available -in the CMake wiki as well. - -## Windows - -Building from source on windows is somewhat more involved and instructions are necessarily in prose form. These -instructions were created using Windows 7 and MS Visual Studio 2010. - -### Prepare compilation - -1. Use git to **checkout** the source from git://github.com/tklab-tud/uscxml.git - into any convenient directory. - -2. Start the **CMake-GUI** and enter the checkout directory in the "Where is the source - code" text field. Choose any convenient directory to build the binaries in. - -3. Hit "**Configure**" and choose your toolchain and compiler - I only tested with - Visual Studio 10. Hit "Configure" again until there are no more red items in - the list. If these instructions are still correct and you did as described - above, you should be able to "Generate" the Visual Project Solution. - -Now you can generate the MS Visual Studio project file /uscxml.sln. -Just open it up to continue in your IDE. - -Note: We only tested with the MSVC compiler. You can try to compile -with MinGW but you would have to build all the dependent libraries as well. - -Note: We do no provide prebuilt dependencies for MSVC18.x (Visual Studio 2012 / 2013). -You can still use the bindings for C#, but not the native C++ libraries. - -## iOS - -We provide prebuilts and CMake toolchain files for iOS and the iOS simulator. The easiest way to get iOS binaries is -to run: - - $ pwd - - $ ./contrib/build-scripts/build-uscxml-ios.sh - -This will build uSCXML with the latest iOS SDK that is installed on your system. If you prefer an older SDK, you can -export IOS_SDK_VERSION=6.1 but you have to make sure it's actually installed. Have a look at the build -script and the toolchain files at contrib/cmake/CrossCompile-* if you run into issues. - -The build script above will build a universal binary for simulator and device, both in release and debug configuration. -If you just want a specific configuration for e.g. the simulator, you can invoke CMake yourself: - - $ pwd - - $ mkdir build/iossim && cd build/iossim - $ cmake -DCMAKE_TOOLCHAIN_FILE=../../contrib/cmake/CrossCompile-iOS-Sim.cmake ../.. - $ make -j4 - -Note: We did not compile the prebuilts for iOS with 64Bit yet. As such, you will not get binaries build for -arm64. The main culprit is, again, curl which assumes the size of an int to be the identical. - -## Raspberry Pi - -To compile uSCXML on Raspberry Pi you will need to, at a minimum, install the following packages. This assumes that -you run Raspberry, the Debian variant. - - $ sudo apt-get install cmake libxml2-dev libcurl4-gnutls-dev - -Now you can compile uSCXML like on any other platform: - - $ git clone --depth 1 https://github.com/tklab-tud/uscxml.git - $ mkdir -p uscxml/build/raspberry && cd uscxml/build/raspberry - $ cmake ../.. - $ make - -If you want an ECMAScript datamodel or LUA, you will need to install additional packages: - - # additional datamodels: ECMAScript, LUA, Prolog - $ sudo apt-get install libjavascriptcoregtk-3.0-dev liblua5.2-dev swi-prolog-nox - - # additional invokers - $ sudo apt-get install libical-dev libpurple-dev libopenal-dev libsndfile1-dev libopenscenegraph-dev - -Lastly, to get the language bindings install SWIG and the developer kits of the respective language. Older Java -versions will work as well (>= 1.5), just make sure JAVA_HOME is set correctly. - - # language bindings: Java, CSharp - $ sudo apt-get install swig ant oracle-java8-jdk mono-mcs - $ echo $JAVA_HOME - /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt - -Note: The version of the V8 JavaScript engine in Raspbian is not compatible with uSCXML. - -## Language Bindings - -In order to build any language bindings, you will need to have SWIG and the development kit of your target language -installed. The set of available language bindings is printed at the end of the CMake invocation: - - $ cmake - ... - -- Available custom elements ...... : respond file postpone fetch - -- Available language bindings .... : csharp java - -- General information: - ... - -### Java - -We are relying on CMake's [FindJNI.CMake](http://www.cmake.org/cmake/help/v2.8.12/cmake.html#module:FindJNI) module -to find the JNI headers and respective libraries. On unices, it's easiest to check whether jni.h is available -in JAVA_HOME: - - $ find $JAVA_HOME -name jni.h - /usr/lib/jvm/java-7-openjdk-i386/include/jni.h - -In addition, you will need apache's ant in the path or in $ENV{ANT_HOME}/bin: - - $ ant -version - Apache Ant(TM) version 1.8.2 compiled on September 22 2011 - -If both of these are given, you ought to get java as an available language binding and a new target called -java for your build system. If you used plain Makefiles (default on unices), you will get everything you need via: - - $ make && make java - $ ls lib/*.jnilib lib/*.jar - lib/libuscxmlNativeJava64.jnilib lib/uscxml.jar - -The uscxml.jar is to be added to your project's classpath, while the libuscxmlNativeJava64.jnilib -(or .so, .dll) needs to be loaded once via System.load() before you can use native objects. - -### CSharp - -For the CSharp bindings, we need to find either csc.exe from the Microsoft.NET framework or dmcs -from the mono project. We search the following places for these: - - $ENV{CSC_HOME}; $ENV{DMCS_HOME} - "C:/Windows/Microsoft.NET/Framework/v3.5" - "C:/Windows/Microsoft.NET/Framework/v4.0.30319" - -If we find one of those binaries (and SWIG obviously), we will enable the language bindings. - - $ which dmcs - /opt/local/bin/dmcs - -Again, if you used plain Makefiles, you will get everything you need via: - - $ make && make csharp - $ find lib -type f -iname *csharp* - lib/csharp/libuscxmlNativeCSharp.so - lib/uscxmlCSharp.dll - -The libuscxmlNativeCSharp.so has to be available to your C# runtime, either by installing it in -/usr/local/lib or (preferred) by using LD_PRELOAD or SetDllDirectory. See the -embedding examples. The uscxmlCSharp.dll contains the managed code portion and needs to be added -to your C# project as a reference. - -Note: You cannot use uSCXML with Xamarin Studio / Mono on Mac out of the box, as they still -have no 64Bit support. The last Macintosh without 64Bit support was the (late 2006) Mac Mini with an Intel Core Duo. - -### Important Note for Windows - -You cannot use CMake projects generated for Visual Studio to build the target language specific part of the -various bindings - you have to use nmake at a command prompt. Open a Visual Studio [x64 Win64] -Command Prompt (2010) and type: - - > cd c:\path\to\build\dir - > cmake -G"NMake Makefiles" c:\path\to\uscxml\source - ... - > nmake && nmake csharp && nmake java - ... - -## Optional Functionality - -At configure time, CMake will search for various libraries and conditionally compile only the part of uSCXML for -which libraries have been found. On unices, it is straight forward to add libraries and - if you installed them to -their default location - CMake will usually pick them up. On Windows, however, the process is more complicated. -While we try to search in the locations where the various installers saved the header files and libraries, there are -some of distributed only as an archive. - -If you want to give CMake the best chance of picking up these libraries, put them into the platform prebuilt path. -This path is located in <USCXML_SRC>/contrib/prebuilt/<PLATFORM>/<COMPILER>. For Windows 32bit, -with MSVC this path is <USCXML_SRC>/contrib/prebuilt/windows-x86/msvc. - -For instance, in order to enable the lua datamodel on windows, download the static lua libraries and save -the dll in <PREBUILT>/lib/lua52.lib and the header files directly in <PREBUILT>/include/. -When you run CMake for the first time, it will automatically create these paths for you. - -Note: Actually, we would have to differentiate the various MSVC versions as well: v16 (VS2010) and v18 (VS2012/13) -employ a different application binary interface (ABI). This is approach is taken e.g. in uMundo with msvc16 -vs msvc18, but not yet realized for uSCXML. - -## About 32/64Bit Support - -We do support both, 32 and 64Bit for Linux and Windows. On Macintosh, most prebuilt dependencies are compiled as -universal binaries with 32/64Bit but we build 64Bit binaries exclusively. The reason is that e.g. curl -cannot be compiled as a universal binary as its header files make assumptions about the size of an int. -Furthermore, most libraries used by invokers are provided by brew or Macports will be 64Bit only and fail to link. - -If you feel adventurous, you can uncomment set(CMAKE_OSX_ARCHITECTURES "i386;x86_64") in the topmost -CMakeLists.txt and fight your way through the linker errors. - \ No newline at end of file diff --git a/docs/COMPARISON.md b/docs/COMPARISON.md deleted file mode 100644 index 94e8d3b..0000000 --- a/docs/COMPARISON.md +++ /dev/null @@ -1,89 +0,0 @@ -# Comparison of SCXML Interpreters - -In this document, I will make an attempt to compare and measure the performance -of the various, freely available SCXML interpreters. If you are the author of -one of these interpreters and feel that I misrepresented your work, please do -not hesitate to contact me and I will reevaluate / correct any factual errors. - -This selection is based on the list of available implementations on the [SCXML -wiki](https://en.wikipedia.org/wiki/SCXML) page, plus a few interpreters I know -from the [W3C mailing list](https://lists.w3.org/Archives/Public/www-voice/) -and the [SCXML workshops](http://scxmlworkshop.de). I will list all -interpreters known to me, but only benchmark those that pass the W3C IRP tests -as is required for an actual SCXML interpreter. - -# Methodology - -The benchmarks were performed with a [huge -SCXML](https://github.com/tklab-tud/uscxml/tree/master/test/w3c/compound) file -containing all of the automatic W3C IRP tests that do not rely on timeouts to -pass. - -## scxmlcc - -| Platforms | Tested on | Tested | Website | -|---------------|---------------------|------------------|---------------| -| Linux only | Debian Jessie 64Bit | **No**: Subset of SCXML implemented is insufficient for SCXML IRP tests. | [http://scxmlcc.org](http://scxmlcc.org) | - -### How to build - - $ sudo apt-get install build-essential libboost-all-dev autorevision - $ git clone https://github.com/jp-embedded/scxmlcc.git - $ cd scxmlcc/src - $ make - -### Evaluation - - $ ./scxmlcc -i ./test-ecma-all.scxml |sort |uniq - warning: event asteriks not currently supported - warning: event tokens not currently supported - warning: parallel support is not fully implemented/tested - warning: unknown action type 'script' - warning: unknown item 'assign' in or - warning: unknown item 'assign' in - warning: unknown item 'cancel' in - warning: unknown item 'datamodel' in - warning: unknown item 'donedata' in - warning: unknown item 'foreach' in or - warning: unknown item 'if' in or - warning: unknown item 'invoke' in - warning: unknown item 'send' in or - warning: unknown item 'send' in - -The subset of SCXML implemented in scxmlcc is insufficient to run the -performance / compliance benchmarks. - -## SCXML Lab - -| Platforms | Tested on | Tested | Website | -|---------------|---------------------|-----------|---------------| -| HTML5 | Safari 9.0.3 | **No**: Subset of SCXML implemented is insufficient for SCXML IRP tests. | [http://www.ling.gu.se/~lager/Labs/SCXML-Lab/](http://www.ling.gu.se/~lager/Labs/SCXML-Lab/) | - -I pasted the file above into their web-frontend and got a validation-error - - Unexpected attribute 'datamodel' in . Hint: - Valid attributes are: 'id', 'initialstate', 'version', 'xmlns'. - -The datamodel is indeed not required for a compliant interpreter, but -we will not be able to pass any meaningful subset of the SCXML IRP tests -without support for a datamodel. - -## Legian - -| Platforms | Tested on | Tested | Website | -|---------------|---------------------|-----------|---------------| -| Java | Java(TM) SE (build 1.8.0_45-b14) | **No**: Subset of SCXML implemented is insufficient for SCXML IRP tests. | [https://github.com/pelatimtt/Legian](https://github.com/pelatimtt/Legian/) | - -Does not claim W3C compliance and will, therefore, not pass the compound IRP tests. - -## Qt SCXML Engine - -| Platforms | Tested on | Tested | Website | -|---------------|---------------------|-----------|---------------| -| Any | Mac OSX 10.11.3 with Macports 2.3.4 | **No**: Subset of SCXML implemented is insufficient for SCXML IRP tests. | [https://qt.gitorious.org/qt-labs/scxml](https://qt.gitorious.org/qt-labs/scxml/) | - -[No -support](https://qt.gitorious.org/qt-labs/scxml?p=qt-labs:scxml.git;a=blob_plain;f=doc/scxml.qdoc;hb=HEAD) -for <donedata>, <finalize>. Furthermore the -profile (now datamodel with finalized SCXML recommendation) -attribute is ignored. diff --git a/docs/CentOS.txt b/docs/CentOS.txt deleted file mode 100644 index 8a3424e..0000000 --- a/docs/CentOS.txt +++ /dev/null @@ -1,47 +0,0 @@ -Install CentOS -Minimal Profile -sudo yum install wget -sudo yum groupinstall "Development tools" - - -$ wget http://sourceforge.net/projects/boost/files/latest/download -$ tar xvjf boost* -$ cd boost* -$ ./bootstrap.sh -$ sudo ./b2 --layout=tagged install - -sudo yum install libtool-ltdl-devel libxml2-devel libpng-devel libjpeg-devel libtiff-devel libcurl-devel mesa-libGL-devel pcre-devel -sudo yum remove swig - -$ wget http://sourceforge.net/projects/openvrml/files/latest/download -$ tar xvjf openvrml* -$ cd openvrml* -$ ./configure --disable-render-text-node --disable-script-node-javascript --disable-script-node-java --disable-gl-renderer --disable-xembed --disable-player --disable-examples --disable-mozilla-plugin -$ sudo make install - -$ wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz -$ tar xvzf cmake-2.8.10.2.tar.gz -$ cd cmake-2.8.10 -$ ./configure -$ make install - -$ svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-3.1.5 OpenSceneGraph -$ cd OpenSceneGraph -$ mkdir build && cd build -$ cmake .. -$ make -j4 -$ sudo make install - -$ wget http://sourceforge.net/projects/swig/files/latest/download -$ tar xvjf swig* -$ cd swig* -$ ./configure -$ make -$ make install - -$ git clone git://github.com/tklab-tud/uscxml.git -$ cd uscxml -$ mkdir build && cd build -$ cmake .. -$ make - diff --git a/docs/EXTENSIONS.md b/docs/EXTENSIONS.md deleted file mode 100644 index 9eb1726..0000000 --- a/docs/EXTENSIONS.md +++ /dev/null @@ -1,185 +0,0 @@ -# Extensions - -## Invokers - -Most platform specific extensions are realized via special invokers. These are components that you can load via: - - - - - - - - - - - -When invoked, you can send them events via: - - - - - - -To get an idea which parameters can be passed for invoke and send, the source as linked below is the ultimate reference. - -Note: Every expr attribute is subject to evaluation by the datamodel. If you want to pass a literal string -with the ecmascript datamodel, you will have to 'quote' it. - -### FFMPEG - * [FFMPEGInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp) - -### Directory Monitor - * [DirMonInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp) - -Monitors a directory for modifications. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Invoke
type - dirmon
- DirectoryMonitor
- http://uscxml.tk.informatik.tu-darmstadt.de/#dirmon -
paramexprdefaultcomment
dirA valid system directorynoneAnything that evaluates to a valid directory with the given datamodel
recurse"true" or "false"falseWhether or not to monitor subdirectories as well.
suffix
suffixes
filename suffixesallA single or space-seperated list of suffixes of files that will get reported

Send
Will not accept anything yet.

Emitted Events
Example
-'invokeid' => "dirmon.vrml"
-'origintype' => "dirmon"
-'origin' => "#_dirmon.vrml"
-'name' => "file.existing"
-'data' ...
-    'file' ...
-        'atime' => "1361746741"
-        'ctime' => "1350452789"
-        'dir' => "/Users/sradomski/data"
-        'extension' => "wrl"
-        'mtime' => "1328012634"
-        'name' => "HARD_MP_VAL_035.wrl"
-        'path' => "/Users/sradomski/data/HARD_MP_VAL_035.wrl"
-        'relPath' => "/HARD_MP_VAL_035.wrl"
-        'size' => "1509110"
-
FieldDetails
nameOne of file.[existing|added|deleted|modified]
data.file.dirThe directory as passed per dir param to invoke.
data.file.pathThe full path to the file we found.
data.file.relPathThe relative path starting from data.file.dir to the file we found.
data.file.sizeFile size in bytes.
- -### 3D Scenegraph - * [OSGInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp) - -Accepts a simplified scenegraph XML notation as content and opens a set of windows with scenes. This invoker registers -as an event listener on the XML in the content and will allow changes to the scenegraph per ecmascript. - - * [OSGConverter.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGConverter.cpp) - -Transfer model files into other representations and make screenshots of models. - -### Heartbeat - * [HeartbeatInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp) - -Continuously sends events. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Invoke
type - heartbeat
- http://uscxml.tk.informatik.tu-darmstadt.de/#heartbeat -
paramexprdefaultcomment
intervale.g. '3s' or '1200ms'noneA time designation as defined in CSS2
eventnameThe name of the event to send in the given intervalDefaults to heartbeat.<interval>

Send
Will not accept anything yet.

Emitted Events
Example
-'invokeid' => "heartbeat"
-'origintype' => "heartbeat"
-'origin' => "#_heartbeat"
-'name' => "heartbeat.100ms"
-'data' => "undefined"
-
FieldDetails
nameOne of file.[existing|added|deleted|modified]
data.file.dirThe directory as passed per dir param to invoke.
data.file.pathThe full path to the file we found.
data.file.relPathThe relative path starting from data.file.dir to the file we found.
data.file.sizeFile size in bytes.
- -### HTTP Servlet - * [HTTPServletInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/http/HTTPServletInvoker.cpp) - -### SCXML - * [HTTPServletInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp) - -### uMundo Publish / Subscribe - * [UmundoInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp) - -## Elements - -### Fetch - * [FetchElement.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/element/fetch/FetchElement.cpp) - -### Postpone - * [PostponeElement.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/element/postpone/PostponeElement.cpp) - -### Response - * [ResponseElement.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/element/response/ResponseElement.cpp) - -## IO Processors - -### BasicHTTP - * [EventIOProcessor.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp) diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md deleted file mode 100644 index 8c585bf..0000000 --- a/docs/GETTING_STARTED.md +++ /dev/null @@ -1,132 +0,0 @@ -# Getting Started - -In order to use the interpreter, you need to #include "uscxml/Interpreter.h" and instantiate -objects of uscxml::Interpreter. - -### Non-Blocking Interpretation with SCXML from URL - Interpreter scxml = Interpreter::fromURL("http://www.example.com/fancy.scxml"); - scxml.start(); // non-blocking in own thread - -There are some cases, i.e. with graphical invokers, where the main thread is required in order -to react to UI events. You will have to deligate control flow from the main thread into the interpreter -every now and then: - - interpreter.runOnMainThread(25); - -This will perform a single iteration on the invoked components with a maximum of 25 frames per seconds -or return immediately. You will have to call this method every now and then if you are using e.g. the -scenegraph invoker. - -Note: Running the interpreter in its own thread via start is not exposed into the -language bindings. Just use the threading concepts native to your language to call step or -interpret as outlined below. - -### Blocking Interpretation with inline SCXML - Interpreter scxml = Interpreter::fromXML(""); - scxml.interpret(); // blocking - -When using blocking interpretation, it is assumed that it is running on the main thread and -it will call runOnMainThread between stable configurations. - -### Interleaved Interpretation with inline SCXML - Interpreter scxml = Interpreter::fromXML(""); - InterpreterState state; - do { - state = interpreter.step(ms); - } while(state != InterpreterState::USCXML_FINISHED) - -Using step, you can run a single macrostep of the interpreter and interleave -interpretation with the rest of your code. The step function will take an optional integer as -the time in milliseconds it will block and wait if no more events are available, default is to block -indefinitely until an event arrives or the interpreter finished. - -### Callbacks for an Interpreter - -You can register an InterpreterMonitor prior to start in order to receive -control-flow upon various events in the Interpreter. - - class StatusMonitor : public uscxml::InterpreterMonitor { - void onStableConfiguration(...) - void beforeCompletion(...) - void afterCompletion(...) - void beforeMicroStep(...) - void beforeTakingTransitions(...) - void beforeEnteringStates(...) - void afterEnteringStates(...) - void beforeExitingStates(...) - void afterExitingStates(...) - }; - - StatusMonitor statMon; - Interpreter scxml = Interpreter::fromXML(""); - scxml.addMonitor(&statMon); - scxml.start(); - -This will cause the interpreter to invoke the callbacks from the monitor whenever the corresponding -internal phase is reached. - -## Advanced Topics - -### Embedding uSCXML - -There are bindings for [Java](https://github.com/tklab-tud/uscxml/tree/master/embedding/java) and -[C#](https://github.com/tklab-tud/uscxml/tree/master/embedding/csharp) with some examples in the -embedding directory. The bindings consist of two parts each - -1. The C++ uscxml interpreter compiled as a loadable module for the target language and -2. A target language specific module (uscxml.jar / uscxmlCSharp.dll) with the wrapper classes. - -The first one is loaded by the target language (System.loadLibrary / SetDLLDirectory) while the second is to be -included in your actual project. Have a look at the examples in embedding and adapt the paths to reflect -your setup. See the [build instructions](https://github.com/tklab-tud/uscxml/blob/master/docs/BUILDING.md) for -details on how to build these. - -### Extending uSCXML - -The uSCXML interpreter can be extended by introducing new - -1. Data models as embedded scripting languages (e.g. ECMAScript, Prolog and XPath) -2. Invokers to represent external components that deliver and accept events (e.g. iCal, SceneGraph, DirectoryMonitor) -3. I/O-Processors to provide communication with external systems (e.g. BasicHTTP, SCXML). -4. Elements for Executable Content (e.g. <respond>, <fetch>, <postpone>). -5. Data model extionsions to establish callbacks from the data model into the host language. - -The basic approach to extend the interpreter is the same in all cases: - -1. Write a class inheriting the abstract base class (e.g. DataModelImpl, InvokerImpl, IOProcessorImpl, ExecutableContentImpl). -2. Instantiate your class and register it as a prototype at the Factory via one of its static register* methods. - 1. You can register at the global Factory Singleton via Factory::register*(prototypeInstance) - 2. Or provide a new Factory instance to selected interpreters as an in-between. -3. Write an interpreter using your new functionality. - -Note: Within the language bindings, you will have to inherit the base classes without the Impl -suffix. Have a look at the examples in embedding for examples. - -#### Ad-hoc Extensions - -Sometimes, it is more suited to provide an interpreter with an already instantiated extension (e.g. an -IOProcessor with an existing connection). In this case, it is somewhat awkward to register a prototype and -have all initialization in its create(Interpreter interpreter) method. While you can still dispatch -over the interpreter instance and access information from some global Interpreter->Data map, there is a -more straight-forward approach, e.g. in Java: - - Interpreter interpreter = Intepreter.fromURI(uri); - AdhocIOProcessor ioProc = new AdhocIOProcessor(Whatever youLike); - ioProc.setParameter1(something); - interpreter.addIOProcessor(ioProc); - -This will cause the interpreter to use the given instance for all send requests targeting one of the types -returned by ioProc.getNames() and not instantiate an instance via the factory. The instance can -deliver events into the interpreter via returnEvent(Event e, boolean toInternalQueue = false). The same -approach can be used for invokers: - - Interpreter interpreter = Intepreter.fromURI(uri); - TestAdhocInvoker invoker1 = new TestAdhocInvoker(Whatever youLike); - invoker1.setParameter1(something); - interpreter.setInvoker("invokeId", invoker1); - -This will cause the interpreter to use the given instance for a given invokeId and not instantiate via -the factory. Similarly, data models can be registered via interpreter.setDataModel(DataModel dm). - -Note: Providing ad-hoc extensions is only supported before the interpreter is started. If you change -instances with a running interpreter, the behavior is undefined. \ No newline at end of file diff --git a/docs/ISSUES.md b/docs/ISSUES.md deleted file mode 100644 index c5d4ac5..0000000 --- a/docs/ISSUES.md +++ /dev/null @@ -1,62 +0,0 @@ -# Open Issues - -## Ad-hoc extensions are deallocated by their interpreter - -If you register any ad-hoc extension with an interpreter, be it in C++ or a language binding, this extension's -instance belongs to the interpreter. This means i.e. that (i) the interpreter's destructor will -deallocate the extension instance, (ii) you cannot reuse it for another interpreter and (iii) you may not call -its destructor. - -For the language bindings, this means furthermore that you have to call swigReleaseOwnership() on the -extension instance to prevent the target language's memory management form calling the instances C++ native -destructor. The destructor can only be called once and the interpreter's destructor will do it. - -If allocating additional extension instances per interpreter is expensive, consider using aggregation as a "has a" -relationship with the expensive part. - -## Not all exceptions are propagated into the target languages - -Only exceptions raised during the following methods are propagated into the target language: - - Interpreter::fromXML - Interpreter::fromURI - Interpreter::step - Interpreter::interpret - -If you dig around in the exposed APIs, there are other methods that may raise exceptions (e.g. -interpreter.getDataModel().eval()). Be careful when calling these. Ultimately, all exceptions ought to be -propagated into the target language to be handled accordingly. We are currently evaluating different approaches to -do so. - -## Where is the Android Port? - -When I originally tried to compile the required libraries for uSCXML on Android (libevent, curl, libxml2), it would -not work out of the box and I postponed. If there is a demand for an Android port, I can have another look. uSCXML -itself is written in a subset of C++99 and ought to compile just fine. - -## UTF8 support - -Currently, we use std::string to represent all strings. This is not a problem as e.g. the ECMAScript -data models will just interpret these as character arrays and handle Unicode respectively. Though it is a problem if -you like to use non-ASCII characters e.g. in the id attribute of states. - -## Performance - -The performance of uSCXML depends on many things like the employed data model and the platform it runs on. Using a -MacBook Pro with an Intel i7 @2.4Ghz and the ECMAScript data model (test/uscxml/test-performance.scxml), we -achieve about 20.000 events/sec. On a Raspberry Pi, however, only 350 events/sec are achieved. - -If performance ought to be increased further, the first place to look would be most likely the employed DOM -implementation, which uses the rather expensive dynamic_cast somewhat too liberally. For a real -performance boost, the explicit SCXML DOM representation at runtime might be dropped in favor of some simple -structs representing the states and transitions. This has been no priority for us so far as even 350 events/sec is -plenty for our use-cases. - -## What about some code documentation? - -Up until recently, the APIs of uSCXML were still subject to rather substantial changes. If there is one thing worse -than no documentation, it is wrong documentation, so we did not document the source. Another stumbling block was the -fact that documentation would not show up in the language bindings. - -Both issues are resolved by now: The APIs have not changed substantially in about 8 month and the new version of SWIG -will allow doxygen comments to be show up in various target languages; so we will document somewhen soon. diff --git a/docs/NATIVE_CODE.md b/docs/NATIVE_CODE.md deleted file mode 100644 index c6f2416..0000000 --- a/docs/NATIVE_CODE.md +++ /dev/null @@ -1,204 +0,0 @@ -# Generating Native Code - -You can use the uscxml-transform tool to create native code from an -SCXML document. In this case, you will not use an instance of the -uscxml::Interpreter class, but instantiate an SCXML context from a -native description of the state-chart. - -## Embedding ANSI C - -To embed the control flow described within an SCXML document in most variances -of the C language, we provide a transformation onto ANSI C (C89) as a proper -subset of virtually any more modern C/C++ dialect. First, you need to transform -your SCXML state-chart onto ANSI C by invoking uscxml-transform: - - $ uscxml-transform -tc -i INPUT_FILE -o OUTPUT_FILE - -This transformation will create a single file that you can compile and link or -include directly. I advice to include the file into another compilation unit -and not to compile it directly, as it allows for more convenience and is -generally a more flexible approach. The file will contain: - -1. A set of pre-processor **macros** for convenience and definitions, all starting -with an USCXML_ prefix. Of special note are the following macros that -allow you to influence important characteristics of you state-machine. - - * **USCXML_NR_STATES_TYPE** / **USCXML_NR_TRANS_TYPE**: - - The type for unsigned integers that is of sufficient size to contain - the number of states / transitions of your largest state machine. The - transformation will automatically choose one of the uint*_t - types, though a popular extension, they are only available in C99 - (stdint.h). Also, if you like to reuse parts of the file (e.g. - the types below) in another compilation unit, you might need to - predefine them explicitly to a sufficient size. - - * **USCXML_MAX_NR_STATES_BYTES** / **USCXML_MAX_NR_TRANS_BYTES**: - - The minimial size for the bit-arrays as char[N] containing the - states and transitions in the various types and on the stack during a - microstep. It has to be larger or equal to the smallest positive - integer that, when multiplied by 8 is larger or equal to the number of - states and transitions repsectively. - - In other words, make sure that - states[USCXML_MAX_NR_STATES_BYTES] has room for one bit per - state and transitions[USCXML_MAX_NR_TRANS_BYTES] for one bit - per transition. - - * **USCXML_ELEM_X_IS_SET**: - - These macros are defined for DATA, PARAM and - DONEDATA and allow to iterate instances. For all of the - corresponding SCXML elements, a callback might be supplied with a set - of instances (e.g. invoke takes a set of <param> - elements). They are contained in a continuous memory region and can be - iterated by merely increasing the respective pointer. The macros allow - to check whether the pointer is still valid or whether there are no - more instances of the given structure. - - * There are some other macros defined, but they are rather for - micro-optimizations. Have a look at a generated file. - - -2. All compound data **types** (struct) to encode an SCXML state-machine. -These will refer to the macros above to require memory for a state-chart's -states and transitions, so make sure that the macros are set if you -conditionally include parts of the generated file and double-check that the -type definitions are the same in every compilation unit if you want to access -state-machines from other units (i.e. same value for macros above!). - -3. The actual **symbols** for one or many state-machines from the input SCXML -file. Their identifiers are all prefixed by an identifier derived from the -content of a given SCXML document. As such, if you transform any given SCXML -document twice, you might end up with duplicate symbols, yet again, the -state-chart's will be functionally identical as they contained the same content. - - In order for not having to guess the prefix when referring to any machine - in user-supplied application code, the tranformation will define three - additional macros: - - #ifndef USCXML_MACHINE - # define USCXML_MACHINE _uscxml_BC220711_machine - #endif - #define USCXML_MACHINE_0 _uscxml_BC220711_machine - #define USCXML_MACHINE_NAME_HERE _uscxml_BC220711_machine - - The first macro is useful if you only transformed a single SCXML - state-chart as it will always refer to the very first state-chart - encountered. If there is more than one SCXML state-chart within a document - (i.e. an invocation of nested machines) you can also refer to them by index - or their eventual name. - -4. Some **helper functions**, most notably bit operations for arbitrary length -bit arrays. - -5. The **micro-step function** uscxml_step, which will perform a -micro-step on a given context and delegate control flow accordingly. - -These elements are always contained and you can, selectively, disable their -inclusion by pre-defining respective macros (have a look at a generated source -file). - -Now in order to actually use an SCXML document to manage the control flow among -a set of functions, you will need to allocate and clear memory for a -uscxml_ctx structure, set its machine field to a -uscxml_machine structure and register user-supplied callbacks. - -### Context Callbacks - -An SCXML interpreter does more than to perform a series of microsteps for an -event over a set of states and transitions and there are quite a few -responsibilities not implemented in the generated ANSI C code. These will be -delegated to user-supplied code via callbacks if they are required for the interpretation of a given SCXML file. - -There is already a scaffolding providing most of the callbacks implemented in -the [test-c-machine.c](../test/src/test-c-machine.c) test file and you can just -isolate the StateMachine class contained within. It does everything -but custom invocations but requires linking with libuscxml for the -datamodel implementations and several other functions. Depending on the number -of SCXML language features you employ, you can get away with providing -considerably fewer callbacks as detailled below. - -1. **Event Queues**: - - A compliant interpreter is required to maintain two event queues, an - internal and an external one. These queues can grow to arbitrary size and - we made a decision, not to employ malloc for heap allocations in - the generated ANSI-C source. As such, it is the responsibility of the - user-supplied code to manage the queues via the following callbacks: - - | Callback | Comments | Required For | - |-|-|-| - | **dequeue_internal** | This callback is invoked whenever the interpreter needs an event from the internal event queue. It is passed an instance of a uscxml_ctx structure and is supposed to return an opaque pointer to an event. If the internal queue is empty, NULL is to be returned. | Dequeuing *internal* events | - | **dequeue_external** | This callback is functionally equivalent to uscxml_ctx.dequeue_internal but invoked, when an external event is to be dequeued. | Dequeuing *external* events | - | **exec_content_send** | Whenever there is an <send> element encountered in executable content, the generated ANSI C code will invoke this callback with a context and an uscxml_elem_send instance and the user code registered at the callback is expected to handle the send request as per SCXML recommendation. | Delivering events via <send> | - | **exec_content_raise** | This callback is invoked for any <raise> element processed as part of executable content and is expected to deliver an event to the internal event queue. | Delivering events via <raise> | - - The events themselves are represented as opaque pointers and the generated ANSI-C code will never access any of its members. - -2. **Transition Matching / Enabling** - - An event will match and enable a set of transitions. The generated ANSI C - source will already make sure that only valid sets of transitions can be - selected to constitute the optimal transition set for a microstep, but - user-supplied code will have to decide whether a transition is matched and - enabled. - - | Callback | Comments | Required For | - |-|-|-| - | **is_matched** | This callback receives a context, an uscxml_transition structure and the opaque event pointer. It is expected to return 0 for when the transition is not matched by the given event and 1 if it is. You can assume that non-spontaneous transitions are not checked for the null-event and vice versa. | Event name *matching* of a transition. | - | **is_enabled** | This callback receives a context and a uscxml_transition structure. It is expected to return 0 for when the transition is not enabled and 1 if it is. Only transitions with an actual condition attribute will be checked. | Determining *enabled* status of a transition. | - -3. **Invocations** - - The transformation will generate machine structures for all SCXML - state-charts found within a document, but will make no attempt to invoke - them automatically. Instead, the generated ANSI-C code will call upon the respective callback in the uscxml_ctx structure: - - | Callback | Comments | Required For | - |-|-|-| - | **invoke** | The call back is provided with a context and an uscxml_elem_invoke structure. This structure will contain all the information pertaining to the <invoke> element, with an additional optional member machine, which points to the uscxml_machine structure in case another, nested SCXML machine is to be invoked. It is your responsibility to create a uscxml_ctx for this new machine and run it or start any other type of invocation specified in the given structure. | Invoking external components via <invoke> | - -4. **Executable Content** - - In general, every instance of an element for executable content has a respective callback in the uscxml_ctx structure. There are a few examples, wherein an element is transformed onto control flow that will invoke multiple callbacks: - - | Callback | Comments | Required For | - |-|-|-| - | **exec_content_log** | | <log> | - | **exec_content_raise** | | <raise> | - | **exec_content_send** | | <send> | - | **is_true** | | <if> / <elseif> / <else> | - | **exec_content_foreach_init** **exec_content_foreach_next** **exec_content_foreach_done** | | <foreach> | - | **exec_content_assign** | | <assign> | - | **exec_content_init** | | <data> | - | **exec_content_cancel** | | <cancel> | - | **exec_content_script** | | <script> | - -5. **Done Events** - - Finally, there is a callback that is invoked if a <final> state is entered. - - | Callback | Comments | Required For | - |-|-|-| - | **raise_done_event** | The callback is provided with a context, the state for which a done event is to be raised and a uscxml_elem_donedata structure. | <final> | - - -### Inline SCXML - -An alternative to writing an external SCXML file is to embed the document into the actual C code as a comment: - - /** INLINE SCXML BEGIN - - - - enteredFoo(); - - - - INLINE SCXML END */ - -If you pass an arbitrary input file to uscxml_transform, it will realize that it does not constitute a proper SCXML document and attempt to isolate an actual SCXML state-chart by searching for the string literals INLINE SCXML BEGIN and INLINE SCXML END. Everything in between is isolated and treated as if it was a proper SCXML document. - -Here, you can also see a variation with the datamode="native" attribute. If this is given, the transformation will write any text child of executable content as an unescaped, verbatim string literal into the respective function, allowing you to address any of your C functions and variables directly. \ No newline at end of file diff --git a/docs/OVERVIEW.md b/docs/OVERVIEW.md deleted file mode 100644 index e930e80..0000000 --- a/docs/OVERVIEW.md +++ /dev/null @@ -1,48 +0,0 @@ -# uSCXML Developer Overview - -The core concept with uSCXML is a state chart and its syntax with regard to valid elements and attributes is given -in the [SCXML specification](http://www.w3.org/TR/scxml/). uSCXML is standards compliant with the exception of -transitions in history elements which were added rather recently. - -## Events - -To bring a state-chart to life it needs to receive events. After you instantiated and started SCXML interpreter it -will assume a stable configuration and wait for events. You can send events via interpreter.receive(Event). -An event consists (foremost) of the following attributes: - - std::string name; // the name of the event - std::string origin; // where the event originated - std::string origintype; // the type of the event's source - std::string content; // literal string content to be space-normalized - Data data; // complex, JSON-like event data (conflicts with literal string content) - -The first three attributes are available as simple attributes of the datamodel's _event object at runtime. If -content is given as a literal string, it will be represented as a space-normalized string in _event.data. The -more interesting case is to pass more complex data, in which case, you need to populate the data attribute. - -### Data - -The data attribute, as an instance of the Data class contains a nested tree of arbitrary content and can be used to -pass more complex data structures than space-normalized string literals into the interpreter as _event.data. - - std::map compound; // Associative array, key/value pairs - std::list array; // Simple array of things - Blob binary; // Binary data - Arabica::DOM::Node node; // A DOM node - std::string atom; // String literal or identifier/value, depending on type - Type type; // [VERBATIM | INTERPRETED], - -Not all datamodels support all types of data, e.g. neither the Prolog nor the Lua datamodel support binary data. -When in doubt, you will have to have a look at the setEvent(Event) method of the respective datamodel -implementation. The most complete datamodel's in terms of supported types are those with ECMAScript, supporting -Core Level 2 for XML data and TypedArrays to handle binary data. - -When you populate a data object, you can only ever set a single attribute. You can, for example, not set a key in the -compound and an index in the array and expect something meaningful at runtime. For nesting use compound and array, for -scalar data use atom, binary or node. - -### DOM Nodes in the Language Bindings - -We do not wrap DOM nodes into the target language but pass its serialized XML string representation to be reparsed in -the target languages. There are some examples in the embedding directory. In order to pass XML via an event, -the Data class in the language bindings support setXML(), which will accept a valid XML string. \ No newline at end of file diff --git a/docs/PUBLICATIONS.md b/docs/PUBLICATIONS.md deleted file mode 100644 index b417b9c..0000000 --- a/docs/PUBLICATIONS.md +++ /dev/null @@ -1,83 +0,0 @@ -# Publications - -### 2015 - -Stefan Radomski. **Formal verification for multimodal dialogs in pervasive -environments**. Ph.D. Thesis, Dec. 2015, Technische Universität Darmstadt, -tuprints. - -Dirk Schnelle-Walka and Stefan Radomski. **Modern standards for VoiceXML in -pervasive multimodal applications**. In International Journal of Mobile Human -Computer Interaction, Hershey, PA, USA, 2015. IGI Global. - -Dirk Schnelle-Walka, Stefan Radomski, J. Barnett, and Max Mühlhäuser. -**Proceedings of the 2nd EICS Workshop on Engineering Interactive Computer -Systems with SCXML**, July 2015. - -Dirk Schnelle-Walka, Stefan Radomski, and Max Mühlhäuser. **Modern standards -for VoiceXML in pervasive multimodal applications**. Emerging Perspectives on -the Design, Use, and Evaluation of Mobile and Handheld Devices, page 22, 2015. - -Dirk Schnelle-Walka, Stephan Radeck-Arneth, and Jürgen Striebinger. -**Multimodal dialog management in a smart home context with SCXML**. 2nd SCXML -Workshop on Engineering Interactive Computer Systems with SCXML, page 10, 2015. - -### 2014 - -Stefan Radomski, Tim Neubacher, and Dirk Schnelle-Walka. **From Harel to -Kripke: A provable datamodel for SCXML**. In EICS2014 Engineering Interactive -Systems with SCXML Workshop Proceedings, 2014. - -Stefan Radomski, Dirk Schnelle-Walka, Torbjörn Lager, Jim Barnett, Deborah -Dahl, and Max Mühlhäuser. **Proceedings of the 1st EICS Workshop on Engineering -Interactive Computer Systems with SCXML**, July 2014. - -Stefan Radomski, Dirk Schnelle-Walka, and Leif Singer. **A debugger for SCXML -documents**. In EICS’14 Workshop on Engineering Interactive Systems with SCXML, -2014. - -Dirk Schnelle-Walka, Stefan Radomski, Stephan Radeck-Arneth, and Max -Mühlhäuser. **Towards an information state update model approach for nonverbal -communication**. In 14th International Conference on Computers Helping People -with Special Needs. Springer, 2014. - -Dirk Schnelle-Walka, Stefan Radomski, and Max Mühlhäuser. **Multimodal fusion -and fission within W3C standards for nonverbal communication with blind -persons**. In 14th International Conference on Computers Helping People with -Special Needs. Springer, 2014. - -### 2013 - -Stefan Radomski and Dirk Schnelle-Walka. **Spatial audio with the W3C -architecture for multimodal interfaces**. In Workshop on Speech in Mobile and -Pervasive Environments 2013, in conjunction with mobileHCI, 2013. - -Stefan Radomski, Dirk Schnelle-Walka, and Stephan Radeck-Arneth. **A Prolog -datamodel for State Chart XML**. In Proceedings of the SIGDIAL 2013 Conference, -pages 127–131, 2013. - -Dirk Schnelle-Walka, Stefan Radomski, and Max Mühlhäuser. **JVoiceXML as a -modality component in the W3C multimodal architecture**. Journal on Multimodal -User Interfaces, pages 1–12, 2013. - -Dirk Schnelle-Walka, Stefan Radomski, and Stephan Radeck-Arneth. -**Probabilistic dialogue management**. In Proceedings of VikingPLoP 2013 -Conference, pages 114–125, 2013. - -### 2012 - -Stefan Radomski and Dirk Schnelle-Walka. **VoiceXML for pervasive -environments**. International Journal of Mobile Human Computer Interaction, -4(2):18–36, 2012. - -Dirk Schnelle-Walka and Stefan Radomski. **Entwicklung multimodaler Anwendungen -mit W3C Standards**. OBJEKTspektrum, 03:28–32, 2012. - -Dirk Schnelle-Walka and Stefan Radomski. **A pattern language for dialogue -management**. In Proceedings of VikingPLoP 2012 Conference, pages 122–141, 2012. - -### 2011 - -Dirk Schnelle-Walka and Stefan Radomski. **Augmenting VoiceXML with information -from pervasive environments**. In Proceedings of SiMPE 2011, Joint Workshop -with mobileHCI, 2011. diff --git a/docs/Performance_Microstep.png b/docs/Performance_Microstep.png deleted file mode 100644 index 50d30d5..0000000 Binary files a/docs/Performance_Microstep.png and /dev/null differ diff --git a/docs/Ubuntu-LTS.txt b/docs/Ubuntu-LTS.txt deleted file mode 100644 index 632b38a..0000000 --- a/docs/Ubuntu-LTS.txt +++ /dev/null @@ -1,55 +0,0 @@ -Install Ubuntu LTS 12 - -For core functionality without fancy plugins: - -$ sudo apt-get install cmake build-essential libxml2-dev libcurl4-openssl-dev - -For OpenSceneGraph invoker (version in repositories lacks vrml plugin): - -$ sudo apt-get install libpng12-dev libjpeg-dev libboost-all-dev libltdl-dev -$ sudo apt-get install libopenscenegraph-dev # just for the dependencies -$ sudo apt-get remove libopenscenegraph-dev - -$ wget http://sourceforge.net/projects/openvrml/files/latest/download -$ tar xvjf openvrml* -$ cd openvrml* -$ ./configure --disable-render-text-node --disable-script-node-javascript --disable-script-node-java --disable-gl-renderer --disable-xembed --disable-player --disable-examples --disable-mozilla-plugin -$ sudo make install -$ cd .. - -for mavericks: -PNG_CFLAGS="-I/opt/local/include" PNG_LIBS="-L/opt/local/lib" XML_CFLAGS="-I`xcrun --show-sdk-path`/usr/include/libxml2" XML_LIBS="-L`xcrun --show-sdk-path`/usr/lib" CPPFLAGS="--sysroot=`xcrun --show-sdk-path` -I/opt/local/include -I`xcrun --show-sdk-path`/usr/include/libxml2" LDFLAGS="--sysroot=`xcrun --show-sdk-path` -L/opt/local/lib -lboost_system-mt -lxml2 -lpng" ./configure --disable-render-text-node --disable-script-node-javascript --disable-script-node-java --disable-gl-renderer --disable-xembed --disable-player --disable-examples --disable-mozilla-plugin - - -$ sudo apt-get install git -$ git clone https://github.com/openscenegraph/osg -$ cd osg -$ nano src/osgPlugins/vrml/IndexedFaceSet.cpp # Edit line 207 and remove the else block - -$ mkdir build && cd build -$ cmake .. -$ make -j4 -$ sudo make install - -For ffmpeg invoker: - -Follow http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide for a version of recent version of ffmpeg -on ubuntu. The various libav* packages that come with the distribution are inadequate. - -Install uscxml: -$ git clone https://github.com/tklab-tud/uscxml.git -$ cd uscxml -$ mkdir build && cd build -$ cmake .. -$ make - -Now, to run the VRML server make sure there is an X-Server running for OpenGL to create contexts or run a virtual -X-Server in a framebuffer: - -XVFB_RUNNING=`ps ax |grep 'Xvfb :7' |grep -v grep` -if [ ! "${XVFB_RUNNING}" ]; then - Xvfb :7 -screen 0 800x600x24 & -fi -export DISPLAY=":7" - -$ bin/uscxml-browser -v -t8086 ../apps/samples/vrml/vrml-server.scxml --vrml-path=/scratch/vrml --tmp-path=/scratch/vrml-processed \ No newline at end of file diff --git a/embedding/csharp/uSCXMLEmbedding.sln b/embedding/csharp/uSCXMLEmbedding.sln deleted file mode 100644 index 6c3a244..0000000 --- a/embedding/csharp/uSCXMLEmbedding.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples", "uSCXMLEmbedding\Examples.csproj", "{A186DC8C-0655-49D4-A1DB-3C23A24DAA5E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A186DC8C-0655-49D4-A1DB-3C23A24DAA5E}.Debug|x86.ActiveCfg = Debug|x86 - {A186DC8C-0655-49D4-A1DB-3C23A24DAA5E}.Debug|x86.Build.0 = Debug|x86 - {A186DC8C-0655-49D4-A1DB-3C23A24DAA5E}.Release|x86.ActiveCfg = Release|x86 - {A186DC8C-0655-49D4-A1DB-3C23A24DAA5E}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/embedding/csharp/uSCXMLEmbedding.suo b/embedding/csharp/uSCXMLEmbedding.suo deleted file mode 100644 index b9b13c0..0000000 Binary files a/embedding/csharp/uSCXMLEmbedding.suo and /dev/null differ diff --git a/embedding/csharp/uSCXMLEmbedding/Examples.csproj b/embedding/csharp/uSCXMLEmbedding/Examples.csproj deleted file mode 100644 index 1ffc38b..0000000 --- a/embedding/csharp/uSCXMLEmbedding/Examples.csproj +++ /dev/null @@ -1,66 +0,0 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {A186DC8C-0655-49D4-A1DB-3C23A24DAA5E} - Exe - Properties - uSCXMLEmbedding - uSCXMLEmbedding - v4.0 - Client - 512 - - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - False - C:\Users\sradomski\Desktop\build\uscxml\lib\uscxmlCSharp.dll - - - - - - - - - - - - - - \ No newline at end of file diff --git a/embedding/csharp/uSCXMLEmbedding/Extensions/CustomDataModel.cs b/embedding/csharp/uSCXMLEmbedding/Extensions/CustomDataModel.cs deleted file mode 100644 index 65e517a..0000000 --- a/embedding/csharp/uSCXMLEmbedding/Extensions/CustomDataModel.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using org.uscxml; - -namespace embedding -{ - class CustomDataModel : DataModel - { - public override DataModel create(Interpreter interpreter) - { - CustomDataModel dm = new CustomDataModel(); - dm.swigCMemOwn = false; - return dm; - } - - public override void eval(string scriptElem, string expr) - { - // evaluate expr on the datamodel - } - - public override bool evalAsBool(string elem, string content) - { - return evalAsBool(content); - } - - public override bool evalAsBool(string expr) - { - // evaluate expr as bool - return false; - } - - public override void assign(string assignElem, string location, string content) - { - // set variable at location to content - } - - public override string evalAsString(string expr) - { - // evaluate given expr as a string (e.g. for ) - return ""; - } - - public override uint getLength(string expr) - { - // return the length of an expression for foreach - return 0; - } - - public override StringList getNames() - { - // name of this datamodel to be used in scxml element - StringList names = new StringList(); - names.add("simple"); - return names; - } - - public override Data getStringAsData(string content) - { - Data data = new Data(); - return data; - } - - public override void init(string dataElem, string location, string content) - { - // initialize variable at location to evaluated content - used for scxml data elements - } - - public override void setEvent(Event arg0) - { - // represent given event as _event in datamodel - } - - public override bool isDeclared(string expr) - { - // using an undeclared variable is an error.execution with some scxml constructs - - // determine whether the given expression is defined - return true; - } - - public override void setForeach(string item, string array, string index, uint iteration) - { - // called per foreach iteration, set datamodel variables accordingly - } - - public override bool validate(string location, string schema) - { - // primarily intended for xpath datamodel - return true; - } - } -} diff --git a/embedding/csharp/uSCXMLEmbedding/Extensions/CustomExecutableContent.cs b/embedding/csharp/uSCXMLEmbedding/Extensions/CustomExecutableContent.cs deleted file mode 100644 index ac79065..0000000 --- a/embedding/csharp/uSCXMLEmbedding/Extensions/CustomExecutableContent.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using org.uscxml; - -namespace embedding -{ - class CustomExecutableContent : ExecutableContent - { - public override string getLocalName() - { - return "custom"; - } - - public override void enterElement(string node) - { - Console.WriteLine("enterElement " + node); - } - - public override void exitElement(string node) - { - Console.WriteLine("exitElement " + node); - } - - public override ExecutableContent create(Interpreter interpreter) - { - CustomExecutableContent execContent = new CustomExecutableContent(); - execContent.swigCMemOwn = false; - return execContent; - } - - - } -} diff --git a/embedding/csharp/uSCXMLEmbedding/Extensions/CustomIOProc.cs b/embedding/csharp/uSCXMLEmbedding/Extensions/CustomIOProc.cs deleted file mode 100644 index 866c148..0000000 --- a/embedding/csharp/uSCXMLEmbedding/Extensions/CustomIOProc.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using org.uscxml; -using System.Xml; -using System.Xml.XPath; -using System.IO; - -namespace embedding -{ - class CustomIOProc : IOProcessor - { - public override IOProcessor create(Interpreter interpreter) - { - CustomIOProc ioProc = new CustomIOProc(); - ioProc.swigCMemOwn = false; - return ioProc; - } - - public override Data getDataModelVariables() - { - Data data = new Data(); - return data; - } - - public override StringList getNames() - { - StringList names = new StringList(); - names.add("custom"); - return names; - } - - public override void send(SendRequest req) - { - Console.WriteLine(req); - // send in s1.onentry - if ("This is some content!" == req.getContent()) - { - returnEvent(new Event("received1")); - return; - } - // send in s2.onentry - if (req.getParams().ContainsKey("foo") - && "bar" == (req.getParams()["foo"][0].getAtom())) - { - returnEvent(new Event("received2")); - return; - } - // send in s3 - if (req.getXML().Length > 0) - { - XmlReaderSettings set = new XmlReaderSettings(); - set.ConformanceLevel = ConformanceLevel.Fragment; - XPathDocument doc = new XPathDocument(XmlReader.Create(new StringReader(req.getXML()), set)); - XPathNavigator nav = doc.CreateNavigator(); - - Console.WriteLine("Root element :" + nav.SelectSingleNode("/").Value); - returnEvent(new Event("received3")); - return; - } - - } - } -} diff --git a/embedding/csharp/uSCXMLEmbedding/Extensions/CustomInterpreterMonitor.cs b/embedding/csharp/uSCXMLEmbedding/Extensions/CustomInterpreterMonitor.cs deleted file mode 100644 index 8009aa0..0000000 --- a/embedding/csharp/uSCXMLEmbedding/Extensions/CustomInterpreterMonitor.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using org.uscxml; - -namespace embedding -{ - class CustomInterpreterMonitor : InterpreterMonitor - { - public override void afterCompletion(Interpreter interpreter) { } - public override void afterMicroStep(Interpreter interpreter) { } - public override void beforeCompletion(Interpreter interpreter) { } - public override void beforeMicroStep(Interpreter interpreter) { } - public override void beforeProcessingEvent(Interpreter interpreter, Event arg1) { } - public override void onStableConfiguration(Interpreter interpreter) { } - public override void afterEnteringState(Interpreter interpreter, string stateId, string xpath, string state, bool moreComing) { } - public override void afterExecutingContent(Interpreter interpreter, string tagName, string xpath, string element) { } - public override void afterExitingState(Interpreter interpreter, string stateId, string xpath, string state, bool moreComing) { } - public override void afterInvoking(Interpreter interpreter, string xpath, string invokeid, string element) { } - public override void afterTakingTransition(Interpreter interpreter, string xpath, string source, StringList targets, string element, bool moreComing) { } - public override void afterUninvoking(Interpreter interpreter, string xpath, string invokeid, string element) { } - public override void beforeEnteringState(Interpreter interpreter, string stateId, string xpath, string state, bool moreComing) { } - public override void beforeExecutingContent(Interpreter interpreter, string tagName, string xpath, string element) { } - public override void beforeExitingState(Interpreter interpreter, string stateId, string xpath, string state, bool moreComing) { } - public override void beforeInvoking(Interpreter interpreter, string xpath, string invokeid, string element) { } - public override void beforeTakingTransition(Interpreter interpreter, string xpath, string source, StringList targets, string element, bool moreComing) { } - public override void beforeUninvoking(Interpreter interpreter, string xpath, string invokeid, string element) { } - - } -} diff --git a/embedding/csharp/uSCXMLEmbedding/Extensions/CustomInvoker.cs b/embedding/csharp/uSCXMLEmbedding/Extensions/CustomInvoker.cs deleted file mode 100644 index eac1311..0000000 --- a/embedding/csharp/uSCXMLEmbedding/Extensions/CustomInvoker.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using org.uscxml; -using System.Xml; -using System.Xml.XPath; -using System.IO; - -namespace embedding -{ - class CustomInvoker : Invoker - { - public override Invoker create(Interpreter interpreter) - { - CustomInvoker invoker = new CustomInvoker(); - invoker.swigCMemOwn = false; - return invoker; - } - - public override Data getDataModelVariables() - { - Data data = new Data(); - return data; - } - - public override StringList getNames() - { - StringList names = new StringList(); - names.add("custom"); - return names; - } - - public override void invoke(InvokeRequest req) - { - Console.WriteLine(req); - // send in s1.onentry - if ("Some string content" == req.getContent()) - { - returnEvent(new Event("received1")); - return; - } - } - - public override void send(SendRequest req) - { - Console.WriteLine(req); - // send in s2.onentry - if (req.getName() == "foo") - { - returnEvent(new Event("received2")); - return; - } - // send in s3 - if (req.getXML().Length > 0) - { - XmlReaderSettings set = new XmlReaderSettings(); - set.ConformanceLevel = ConformanceLevel.Fragment; - XPathDocument doc = new XPathDocument(XmlReader.Create(new StringReader(req.getXML()), set)); - XPathNavigator nav = doc.CreateNavigator(); - - Console.WriteLine("Root element :" + nav.SelectSingleNode("/").Value); - returnEvent(new Event("received3")); - return; - } - - } - } -} diff --git a/embedding/csharp/uSCXMLEmbedding/Properties/AssemblyInfo.cs b/embedding/csharp/uSCXMLEmbedding/Properties/AssemblyInfo.cs deleted file mode 100644 index 141c1cf..0000000 --- a/embedding/csharp/uSCXMLEmbedding/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("uSCXMLEmbedding")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("uSCXMLEmbedding")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5bcfdd5c-6567-40dd-b4ea-3a9d3c64076a")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/embedding/csharp/uSCXMLEmbedding/RunTests.cs b/embedding/csharp/uSCXMLEmbedding/RunTests.cs deleted file mode 100644 index 5b39c9f..0000000 --- a/embedding/csharp/uSCXMLEmbedding/RunTests.cs +++ /dev/null @@ -1,314 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Diagnostics; -using System.Runtime.InteropServices; - -namespace embedding -{ - using org.uscxml; - - class RunTests - { - [DllImport("kernel32.dll", CharSet = CharSet.Auto)] - private static extern void SetDllDirectory(string lpPathName); - - static void Main(string[] args) - { - - /* - * Make sure this path contains the uscxmlNativeCSharp.dll! - */ - if (System.Environment.Is64BitProcess) - { - SetDllDirectory("C:\\Users\\sradomski\\Desktop\\build\\uscxml64\\lib\\csharp"); - } - else - { - SetDllDirectory("C:\\Users\\sradomski\\Desktop\\build\\uscxml\\lib\\csharp"); - } - - int i = 1; - while (i-- > 0) - { - testData(); - testLifeCycle(); - testExecutableContent(); - testIOProcessor(); - testInvoker(); - } - Console.ReadKey(); - } - - public static void testData() { - byte[] origData = new byte[1024]; - for (int i = 0; i < origData.Length; i++) { - origData[i] = (byte)i; - } - - { - - Blob blob = new Blob(origData, "application/octet-stream"); - Debug.Assert(origData.Length == blob.getSize()); - - for (int i = 0; i < origData.Length; i++) { - Debug.Assert(origData[i] == blob.getData()[i]); - } - } - - Data data = new Data(origData, "application/octet-stream"); - Blob blob2 = data.getBinary(); - - byte[] newData = blob2.getData(); - - if (newData.Length == origData.Length); - for (int i = 0; i < origData.Length; i++) { - Debug.Assert(newData[i] == origData[i]); - } - - } - - public static void testInvoker() { - Console.WriteLine("testInvoker"); - CustomInvoker invoker = new CustomInvoker(); - // just register prototype at global factory - Factory.getInstance().registerInvoker(invoker); - - String xml = - "" + - " " + - " " + - " Some string content" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - ""; - - // parse and interpret - Interpreter interpreter = Interpreter.fromXML(xml, ""); - interpreter.interpret(); - - } - - public static void testIOProcessor() - { - Console.WriteLine("testIOProcessor"); - CustomIOProc ioproc = new CustomIOProc(); - // just register prototype at global factory - Factory.getInstance().registerIOProcessor(ioproc); - - String xml = - "" + - " " + - " " + - " " + - " This is some content!" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - ""; - - // parse and interpret - Interpreter interpreter = Interpreter.fromXML(xml, ""); - interpreter.interpret(); - - } - - public static void testExecutableContent() - { - Console.WriteLine("testExecutableContent"); - CustomExecutableContent execContent = new CustomExecutableContent(); - Factory.getInstance().registerExecutableContent(execContent); - - Interpreter interpreter = Interpreter.fromXML( - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " " + - " \n" + - " " + - "\n", "" - ); - interpreter.interpret(); - interpreter.Dispose(); - } - - public static void testLifeCycle() - { - Console.WriteLine("testLifeCycle"); - // syntactic xml parse error -> throws - try - { - String xml = " throws - try - { - String xml = ""; - Interpreter interpreter = Interpreter.fromXML(xml, ""); - Debug.Assert(interpreter.getState() == InterpreterState.USCXML_INSTANTIATED); - interpreter.step(); - Debug.Assert(false); - } - catch (InterpreterException e) - { -// Console.WriteLine(e); - } - - // request unknown datamodel - try - { - string xml = - "" + - " " + - " " + - " " + - " " + - ""; - Interpreter interpreter = Interpreter.fromXML(xml, ""); - Debug.Assert(interpreter.getState() == InterpreterState.USCXML_INSTANTIATED); - interpreter.step(); - Debug.Assert(false); - } - catch (InterpreterException e) - { -// Console.WriteLine(e); - } - - - try - { - // two microsteps - string xml = - "" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - ""; - - Interpreter interpreter = Interpreter.fromXML(xml, ""); - - Debug.Assert(interpreter.getState() == InterpreterState.USCXML_INSTANTIATED); - Debug.Assert(interpreter.step() == InterpreterState.USCXML_MICROSTEPPED); - Debug.Assert(interpreter.step() == InterpreterState.USCXML_MICROSTEPPED); - Debug.Assert(interpreter.step() == InterpreterState.USCXML_FINISHED); - - } - catch (InterpreterException e) - { - Console.WriteLine(e); - } - - - try - { - // single macrostep, multiple runs - string xml = - "" + - " " + - " " + - " " + - " " + - ""; - - Interpreter interpreter = Interpreter.fromXML(xml, ""); - Debug.Assert(interpreter.getState() == InterpreterState.USCXML_INSTANTIATED); - Debug.Assert(interpreter.step() == InterpreterState.USCXML_MICROSTEPPED); - Debug.Assert(interpreter.step() == InterpreterState.USCXML_FINISHED); - interpreter.reset(); - - Debug.Assert(interpreter.getState() == InterpreterState.USCXML_INSTANTIATED); - Debug.Assert(interpreter.step() == InterpreterState.USCXML_MICROSTEPPED); - Debug.Assert(interpreter.step() == InterpreterState.USCXML_FINISHED); - - } - catch (InterpreterException e) - { - Console.WriteLine(e); - } - - - try - { - // macrostep in between - string xml = - "" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - ""; - - Interpreter interpreter = Interpreter.fromXML(xml, ""); - Debug.Assert(interpreter.getState() == InterpreterState.USCXML_INSTANTIATED); - Debug.Assert(interpreter.step() == InterpreterState.USCXML_IDLE); - Debug.Assert(interpreter.step(true) == InterpreterState.USCXML_MACROSTEPPED); - Debug.Assert(interpreter.step() == InterpreterState.USCXML_MICROSTEPPED); - Debug.Assert(interpreter.step() == InterpreterState.USCXML_FINISHED); - - } - catch (InterpreterException e) - { - Console.WriteLine(e); - } - } - - } -} diff --git a/embedding/java/.classpath b/embedding/java/.classpath deleted file mode 100644 index 7d0462c..0000000 --- a/embedding/java/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/embedding/java/.gitignore b/embedding/java/.gitignore deleted file mode 100644 index 5e56e04..0000000 --- a/embedding/java/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin diff --git a/embedding/java/.project b/embedding/java/.project deleted file mode 100644 index 9aecdf8..0000000 --- a/embedding/java/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - uscxml - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/embedding/java/lib/js.jar b/embedding/java/lib/js.jar deleted file mode 100644 index 6f0dafb..0000000 Binary files a/embedding/java/lib/js.jar and /dev/null differ diff --git a/embedding/java/src/org/uscxml/datamodel/ecmascript/ECMAData.java b/embedding/java/src/org/uscxml/datamodel/ecmascript/ECMAData.java deleted file mode 100644 index 035da61..0000000 --- a/embedding/java/src/org/uscxml/datamodel/ecmascript/ECMAData.java +++ /dev/null @@ -1,110 +0,0 @@ -package org.uscxml.datamodel.ecmascript; - -import org.mozilla.javascript.Scriptable; -import org.uscxml.Data; - -public class ECMAData implements Scriptable { - - protected Data data; - protected Scriptable parent; - protected Scriptable prototype; - - public ECMAData(Data data) { - this.data = data; - } - - @Override - public String getClassName() { - return "Data"; - } - - public Object unwrap(Data data) { - if (data.getAtom().length() > 0) { - return data.getAtom(); - } - return new ECMAData(data); - - } - - @Override - public Object get(String name, Scriptable start) { - if (data.hasKey(name)) - return unwrap(data.at(name)); - return NOT_FOUND; - } - - @Override - public Object get(int index, Scriptable start) { - if (data.getArray().size() > index) - return unwrap(data.item(index)); - return NOT_FOUND; - } - - @Override - public boolean has(String name, Scriptable start) { - return data.hasKey(name); - } - - @Override - public boolean has(int index, Scriptable start) { - return data.getArray().size() > index; - } - - @Override - public void put(String name, Scriptable start, Object value) { - } - - @Override - public void put(int index, Scriptable start, Object value) { - } - - @Override - public void delete(String name) { - } - - @Override - public void delete(int index) { - } - - @Override - public Scriptable getPrototype() { - return prototype; - } - - @Override - public void setPrototype(Scriptable prototype) { - this.prototype = prototype; - } - - @Override - public Scriptable getParentScope() { - return parent; - } - - @Override - public void setParentScope(Scriptable parent) { - this.parent = parent; - } - - @Override - public Object[] getIds() { - return data.getCompound().keySet().toArray(); - } - - @Override - public Object getDefaultValue(Class hint) { - return "[object Data]"; - } - - @Override - public boolean hasInstance(Scriptable instance) { - Scriptable proto = instance.getPrototype(); - while (proto != null) { - if (proto.equals(this)) - return true; - proto = proto.getPrototype(); - } - return false; - } - -} diff --git a/embedding/java/src/org/uscxml/datamodel/ecmascript/ECMAEvent.java b/embedding/java/src/org/uscxml/datamodel/ecmascript/ECMAEvent.java deleted file mode 100644 index 45d93b8..0000000 --- a/embedding/java/src/org/uscxml/datamodel/ecmascript/ECMAEvent.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.uscxml.datamodel.ecmascript; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.mozilla.javascript.Scriptable; -import org.uscxml.Data; -import org.uscxml.Event; - -public class ECMAEvent implements Scriptable { - - protected Event event; - protected Scriptable parent; - protected Scriptable prototype; - - protected Map members = new HashMap(); - - public ECMAEvent(Event event) { - this.event = event; - - // copy event params to data - Data data = event.getData(); - Map> params = event.getParams(); - for (String key : params.keySet()) { - for (Data param : params.get(key)) { - data.put(key, param); - } - } - - members.put("type", event.getEventType()); - members.put("data", new ECMAData(data)); - members.put("sendid", event.getSendId()); - members.put("origin", event.getOrigin()); - members.put("originType", event.getOriginType()); - // add others as necessary - - } - - @Override - public String getClassName() { - return "Event"; - } - - @Override - public Object get(String name, Scriptable start) { - if (members.containsKey(name)) - return members.get(name); - return NOT_FOUND; - } - - @Override - public Object get(int index, Scriptable start) { - return NOT_FOUND; - } - - @Override - public boolean has(String name, Scriptable start) { - return (members.containsKey(name)); - } - - @Override - public boolean has(int index, Scriptable start) { - return false; - } - - @Override - public void put(String name, Scriptable start, Object value) { - } - - @Override - public void put(int index, Scriptable start, Object value) { - } - - @Override - public void delete(String name) { - } - - @Override - public void delete(int index) { - } - - @Override - public Scriptable getPrototype() { - return prototype; - } - - @Override - public void setPrototype(Scriptable prototype) { - this.prototype = prototype; - } - - @Override - public Scriptable getParentScope() { - return parent; - } - - @Override - public void setParentScope(Scriptable parent) { - this.parent = parent; - } - - @Override - public Object[] getIds() { - return members.keySet().toArray(); - } - - @Override - public Object getDefaultValue(Class hint) { - return "[object Event]"; - } - - @Override - public boolean hasInstance(Scriptable instance) { - Scriptable proto = instance.getPrototype(); - while (proto != null) { - if (proto.equals(this)) - return true; - proto = proto.getPrototype(); - } - - return false; - } - -} diff --git a/embedding/java/src/org/uscxml/datamodel/ecmascript/ECMAScriptDataModel.java b/embedding/java/src/org/uscxml/datamodel/ecmascript/ECMAScriptDataModel.java deleted file mode 100644 index ca53df3..0000000 --- a/embedding/java/src/org/uscxml/datamodel/ecmascript/ECMAScriptDataModel.java +++ /dev/null @@ -1,394 +0,0 @@ -package org.uscxml.datamodel.ecmascript; - -import java.lang.reflect.Method; -import java.util.Map; - -import org.mozilla.javascript.Callable; -import org.mozilla.javascript.Context; -import org.mozilla.javascript.EvaluatorException; -import org.mozilla.javascript.FunctionObject; -import org.mozilla.javascript.NativeJSON; -import org.mozilla.javascript.Scriptable; -import org.mozilla.javascript.ScriptableObject; -import org.mozilla.javascript.Undefined; -import org.uscxml.Data; -import org.uscxml.DataModel; -import org.uscxml.Event; -import org.uscxml.Interpreter; -import org.uscxml.NativeIOProcessor; -import org.uscxml.NativeInvoker; -import org.uscxml.StringList; - -public class ECMAScriptDataModel extends DataModel { - - public static boolean debug = true; - - private class NullCallable implements Callable { - @Override - public Object call(Context context, Scriptable scope, - Scriptable holdable, Object[] objects) { - return objects[1]; - } - } - - public Context ctx; - public Scriptable scope; - public Interpreter interpreter; - - public Data getScriptableAsData(Object object) { - Data data = new Data(); - - Scriptable s; - try { - s = (Scriptable) object; - String className = s.getClassName(); // ECMA class name - if (className.toLowerCase().equals("object")) { - ScriptableObject obj = (ScriptableObject) Context.toObject(s, - scope); - for (Object key : obj.getIds()) { - data.put(Context.toString(key), - getScriptableAsData(obj.get(key))); - } - } - } catch (ClassCastException e) { - if (object instanceof Boolean) { - data.setAtom(Context.toBoolean(object) ? "true" : "false"); - data.setType(Data.Type.INTERPRETED); - } else if (object instanceof String) { - data.setAtom((String) object); - data.setType(Data.Type.VERBATIM); - } else if (object instanceof Integer) { - data.setAtom(((Integer) object).toString()); - data.setType(Data.Type.INTERPRETED); - } else { - throw new RuntimeException("Unhandled ECMA type " - + object.getClass().getName()); - } - } - - return data; - } - - public ScriptableObject getDataAsScriptable(Data data) { - throw new UnsupportedOperationException("Not implemented"); - } - - public static boolean jsIn(String stateName) { - return true; - } - - @Override - public DataModel create(Interpreter interpreter) { - /** - * Called when an SCXML interpreter wants an instance of this datamodel - * Be careful to instantiate attributes of instance returned and not - * *this* - */ - - ECMAScriptDataModel newDM = new ECMAScriptDataModel(); - newDM.swigReleaseOwnership(); - newDM.interpreter = interpreter; - newDM.ctx = Context.enter(); - - try { - newDM.scope = newDM.ctx.initStandardObjects(); - } catch (Exception e) { - System.err.println(e); - } - - newDM.scope.put("_name", newDM.scope, interpreter.getName()); - newDM.scope.put("_sessionid", newDM.scope, interpreter.getSessionId()); - - // ioProcessors - { - Data ioProcs = new Data(); - Map ioProcNatives = interpreter.getIOProcessors(); - for (String key : ioProcNatives.keySet()) { - ioProcs.put(key, ioProcNatives.get(key).getDataModelVariables()); - } - newDM.scope - .put("_ioprocessors", newDM.scope, new ECMAData(ioProcs)); - } - - // invokers - { - Data invokers = new Data(); - Map invokersNatives = interpreter.getInvokers(); - for (String key : invokersNatives.keySet()) { - invokers.put(key, invokersNatives.get(key).getDataModelVariables()); - } - newDM.scope - .put("_invokers", newDM.scope, new ECMAData(invokers)); - } - - // In predicate (not working as static is required) see: - // http://stackoverflow.com/questions/3441947/how-do-i-call-a-method-of-a-java-instance-from-javascript/16479685#16479685 - try { - Class[] parameters = new Class[] { String.class }; - Method inMethod = ECMAScriptDataModel.class.getMethod("jsIn", - parameters); - FunctionObject inFunc = new FunctionObject("In", inMethod, - newDM.scope); - newDM.scope.put("In", newDM.scope, inFunc); - } catch (SecurityException e) { - System.err.println(e); - } catch (NoSuchMethodException e) { - System.err.println(e); - } - - return newDM; - } - - @Override - public StringList getNames() { - /** - * Register with the following names for the datamodel attribute at the - * scxml element. - */ - StringList ss = new StringList(); - ss.add("ecmascript"); - return ss; - } - - @Override - public boolean validate(String location, String schema) { - /** - * Validate the datamodel. This make more sense for XML datamodels and - * is pretty much unused but required as per draft. - */ - return true; - } - - @Override - public void setEvent(Event event) { - if (debug) { - System.out.println(interpreter.getName() + " setEvent"); - } - - /** - * Make the current event available as the variable _event in the - * datamodel. - */ - ECMAEvent ecmaEvent = new ECMAEvent(event); - scope.put("_event", scope, ecmaEvent); - } - - @Override - public Data getStringAsData(String content) { - if (debug) { - System.out.println(interpreter.getName() + " getStringAsData"); - } - - /** - * Evaluate the string as a value expression and transform it into a - * JSON-like Data structure - */ - if (content.length() == 0) { - return new Data(); - } - - // is it a json expression? - try { - Object json = NativeJSON.parse(ctx, scope, content, - new NullCallable()); - if (json != NativeJSON.NOT_FOUND) { - return getScriptableAsData(json); - } - } catch (org.mozilla.javascript.EcmaError e) { - System.err.println(e); - } - - // is it a function call or variable? - Object x = ctx.evaluateString(scope, content, "uscxml", 0, null); - if (x == Undefined.instance) { - // maybe a literal string? - x = ctx.evaluateString(scope, '"' + content + '"', "uscxml", 0, - null); - } - return getScriptableAsData(x); - } - - @Override - public long getLength(String expr) { - if (debug) { - System.out.println(interpreter.getName() + " getLength"); - } - - /** - * Return the length of the expression if it were an array, used by - * foreach element. - */ - - Object x = scope.get(expr, scope); - if (x == Undefined.instance) { - return 0; - } - - Scriptable result = Context.toObject(x, scope); - if (result.has("length", result)) { - return (long) Context.toNumber(result.get("length", result)); - } - return 0; - } - - @Override - public void setForeach(String item, String array, String index, - long iteration) { - if (debug) { - System.out.println(interpreter.getName() + " setForeach"); - } - - /** - * Prepare an iteration of the foreach element, by setting the variable - * in index to the current iteration and setting the variable in item to - * the current item from array. - */ - - try { - // get the array object - Scriptable arr = (Scriptable) scope.get(array, scope); - - if (arr.has((int) iteration, arr)) { - ctx.evaluateString(scope, item + '=' + array + '[' + iteration - + ']', "uscxml", 1, null); - if (index.length() > 0) { - ctx.evaluateString(scope, index + '=' + iteration, - "uscxml", 1, null); - } - } else { - handleException(""); - } - - } catch (ClassCastException e) { - System.err.println(e); - } - } - - @Override - public void eval(String scriptElem, String expr) { - if (debug) { - System.out.println(interpreter.getName() + " eval"); - } - - /** - * Evaluate the given expression in the datamodel. This is used foremost - * with script elements. - */ - ctx.evaluateString(scope, expr, "uscxml", 1, null); - - } - - @Override - public String evalAsString(String expr) { - if (debug) { - System.out.println(interpreter.getName() + " evalAsString: " + expr); - } - - /** - * Evaluate the expression as a string e.g. for the log element. - */ - if (!ctx.stringIsCompilableUnit(expr)) { - handleException(""); - return ""; - } - try { - Object result = ctx.evaluateString(scope, expr, "uscxml", 1, null); - return Context.toString(result); - } catch (IllegalStateException e) { - System.err.println(e); - handleException(""); - } catch (EvaluatorException e) { - System.err.println(e); - handleException(""); - } - return ""; - } - - @Override - public boolean evalAsBool(String elem, String expr) { - if (debug) { - System.out.println(interpreter.getName() + " evalAsBool"); - } - - /** - * Evaluate the expression as a boolean for cond attributes in if and - * transition elements. - */ - Object result = ctx.evaluateString(scope, expr, "uscxml", 1, null); - return Context.toBoolean(result); - } - - @Override - public boolean isDeclared(String expr) { - if (debug) { - System.out.println(interpreter.getName() + " isDeclared"); - } - - /** - * The interpreter is supposed to raise an error if we assign to an - * undeclared variable. This method is used to check whether a location - * from assign is declared. - */ - Object x = scope.get(expr, scope); - return x != Scriptable.NOT_FOUND; - } - - @Override - public void init(String dataElem, String location, String content) { - if (debug) { - System.out.println(interpreter.getName() + " init"); - } - - /** - * Called when we pass data elements. - */ - if (("null").equals(location)) - return; - - if (("null").equals(content) || content.length() == 0) { - scope.put(location, scope, Context.getUndefinedValue()); - return; - } - - try { - Object json = NativeJSON.parse(ctx, scope, content, - new NullCallable()); - if (json != NativeJSON.NOT_FOUND) { - scope.put(location, scope, json); - } else { - scope.put(location, scope, content); - } - } catch (org.mozilla.javascript.EcmaError e) { - scope.put(location, scope, content); - } - } - - @Override - public void assign(String assignElem, String location, String content) { - if (debug) { - System.out.println(interpreter.getName() + " assign"); - } - - /** - * Called when we evaluate assign elements - */ - if (("null").equals(location)) - return; - - if (("null").equals(content) || content.length() == 0) { - scope.put(location, scope, Context.getUndefinedValue()); - return; - } - - String expr = location + "=" + content; - ctx.evaluateString(scope, expr, "uscxml", 1, null); - } - - public void handleException(String cause) { - Event exceptionEvent = new Event(); - exceptionEvent.setName("error.execution"); - exceptionEvent.setEventType(Event.Type.PLATFORM); - - interpreter.receiveInternal(exceptionEvent); - } -} diff --git a/embedding/java/src/org/uscxml/tests/TestData.java b/embedding/java/src/org/uscxml/tests/TestData.java deleted file mode 100644 index d470d00..0000000 --- a/embedding/java/src/org/uscxml/tests/TestData.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.uscxml.tests; - -import java.io.StringWriter; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.uscxml.Blob; -import org.uscxml.Data; -import org.w3c.dom.Document; - -public class TestData { - - public static void main(String[] args) throws Exception { - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - { - Data data = Data.fromJSON("[1,2,3,4,5]"); - System.out.println(data); - } - { - Data data = Data.fromJSON("{ \"foo\": \"bar\", \"faz\": 12 }"); - System.out.println(data); - } - - { - Data data = new Data(); - - DocumentBuilderFactory factory = DocumentBuilderFactory - .newInstance(); - DocumentBuilder builder = factory.newDocumentBuilder(); - - Document document = builder.newDocument(); - document.appendChild(document.createElement("foo")); - - Transformer transformer = TransformerFactory.newInstance() - .newTransformer(); - StreamResult result = new StreamResult(new StringWriter()); - DOMSource source = new DOMSource(document); - transformer.transform(source, result); - - String xml = result.getWriter().toString(); - - data.setXML(xml); - System.out.println(data.getXML()); - } - - { - byte origData[] = new byte[1024]; - for (int i = 0; i < origData.length; i++) { - origData[i] = (byte) i; - } - - { - Blob blob = new Blob(origData, "application/octet-stream"); - if (origData.length != blob.getSize()) - throw new RuntimeException("Blob does not match"); - - for (int i = 0; i < origData.length; i++) { - if (origData[i] != blob.getData()[i]) - throw new RuntimeException("Blob mismatch at " + i); - } - } - - Data data = new Data(origData, "application/octet-stream"); - Blob blob = data.getBinary(); - System.out.println(blob.getSize()); - - byte newData[] = blob.getData(); - - if (newData.length != origData.length) - throw new RuntimeException("Arrays length does not match"); - for (int i = 0; i < origData.length; i++) { - if (newData[i] != origData[i]) - throw new RuntimeException("Mismatch at " + i); - } - - } - - } -} diff --git a/embedding/java/src/org/uscxml/tests/TestExceptions.java b/embedding/java/src/org/uscxml/tests/TestExceptions.java deleted file mode 100644 index b64d9e8..0000000 --- a/embedding/java/src/org/uscxml/tests/TestExceptions.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.uscxml.tests; - -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; - -public class TestExceptions { - - public static void main(String[] args) throws InterpreterException { - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - String xml = - "" + - " " + - " " + - " " + - " " + - ""; - - if (false) { - // datamodel not available before first step -> dies with segfault - Interpreter interpreter = Interpreter.fromXML(xml, ""); - System.out.println(interpreter.getDataModel().evalAsString("'FOO'")); - } - - if (false) { - // datamodel is available but syntactic ecmascript exception is not propagated - Interpreter interpreter = Interpreter.fromXML(xml, ""); - interpreter.step(); - System.out.println(interpreter.getDataModel().evalAsString("'FOO' / qwer")); - } - - - - } - -} diff --git a/embedding/java/src/org/uscxml/tests/TestLifecycle.java b/embedding/java/src/org/uscxml/tests/TestLifecycle.java deleted file mode 100644 index 7fd168f..0000000 --- a/embedding/java/src/org/uscxml/tests/TestLifecycle.java +++ /dev/null @@ -1,124 +0,0 @@ -package org.uscxml.tests; - -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; -import org.uscxml.InterpreterState; - -public class TestLifecycle { - public static void main(String[] args) { - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - // syntactic xml parse error -> throws - try { - String xml = " throws - try { - String xml = ""; - Interpreter interpreter = Interpreter.fromXML(xml, ""); - if (interpreter.getState() != InterpreterState.USCXML_INSTANTIATED) throw new RuntimeException(""); - interpreter.step(); - throw new RuntimeException(""); - } catch (InterpreterException e) { - System.err.println(e); - } - - // request unknown datamodel -> throws - try { - String xml = - "" + - " " + - " " + - " " + - " " + - ""; - Interpreter interpreter = Interpreter.fromXML(xml, ""); - if (interpreter.getState() != InterpreterState.USCXML_INSTANTIATED) throw new RuntimeException(""); - interpreter.step(); - throw new RuntimeException(""); - - } catch (InterpreterException e) { - System.err.println(e); - } - - try { - // two microsteps - String xml = - "" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - ""; - - Interpreter interpreter = Interpreter.fromXML(xml, ""); - - if (interpreter.getState() != InterpreterState.USCXML_INSTANTIATED) throw new RuntimeException(""); - if (interpreter.step() != InterpreterState.USCXML_MICROSTEPPED) throw new RuntimeException(""); - if (interpreter.step() != InterpreterState.USCXML_MICROSTEPPED) throw new RuntimeException(""); - if (interpreter.step() != InterpreterState.USCXML_FINISHED) throw new RuntimeException(""); - - } catch (InterpreterException e) { - System.err.println(e); - } - - try { - // single macrostep, multiple runs - String xml = - "" + - " " + - " " + - " " + - " " + - ""; - - Interpreter interpreter = Interpreter.fromXML(xml, ""); - if (interpreter.getState() != InterpreterState.USCXML_INSTANTIATED) throw new RuntimeException(""); - if (interpreter.step() != InterpreterState.USCXML_MICROSTEPPED) throw new RuntimeException(""); - if (interpreter.step() != InterpreterState.USCXML_FINISHED) throw new RuntimeException(""); - interpreter.reset(); - - if (interpreter.getState() != InterpreterState.USCXML_INSTANTIATED) throw new RuntimeException(""); - if (interpreter.step() != InterpreterState.USCXML_MICROSTEPPED) throw new RuntimeException(""); - if (interpreter.step() != InterpreterState.USCXML_FINISHED) throw new RuntimeException(""); - - } catch (InterpreterException e) { - System.err.println(e); - } - - try { - // macrostep in between - String xml = - "" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - ""; - - Interpreter interpreter = Interpreter.fromXML(xml, ""); - if (interpreter.getState() != InterpreterState.USCXML_INSTANTIATED) throw new RuntimeException(""); - if (interpreter.step() != InterpreterState.USCXML_IDLE) throw new RuntimeException(""); - if (interpreter.step(true) != InterpreterState.USCXML_MACROSTEPPED) throw new RuntimeException(""); - if (interpreter.step() != InterpreterState.USCXML_MICROSTEPPED) throw new RuntimeException(""); - if (interpreter.step() != InterpreterState.USCXML_FINISHED) throw new RuntimeException(""); - - } catch (InterpreterException e) { - System.err.println(e); - } - } -} diff --git a/embedding/java/src/org/uscxml/tests/TestValidation.java b/embedding/java/src/org/uscxml/tests/TestValidation.java deleted file mode 100644 index d42b47d..0000000 --- a/embedding/java/src/org/uscxml/tests/TestValidation.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.uscxml.tests; - -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; -import org.uscxml.IssueList; - -public class TestValidation { - - public static void main(String[] args) { - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - // invalid expression in transition - try { - String xml = - "" + - " " + - " " + - " " + - " " + - ""; - Interpreter interpreter = Interpreter.fromXML(xml, ""); - IssueList issues = interpreter.validate(); - for (int i = 0; i < issues.size(); i++) { - System.out.println(issues.get(i)); - } - - } catch (InterpreterException e) { - System.err.println(e); - } - - } - -} diff --git a/embedding/java/src/org/uscxml/tests/datamodel/TestData.json b/embedding/java/src/org/uscxml/tests/datamodel/TestData.json deleted file mode 100644 index a07a5d9..0000000 --- a/embedding/java/src/org/uscxml/tests/datamodel/TestData.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": 1, - "name": "Foo", - "price": 123, - "tags": [ "Bar", "Eek" ], - "stock": { - "warehouse": 300, - "retail": 20, - } -} diff --git a/embedding/java/src/org/uscxml/tests/datamodel/TestData.xml b/embedding/java/src/org/uscxml/tests/datamodel/TestData.xml deleted file mode 100644 index 882cd95..0000000 --- a/embedding/java/src/org/uscxml/tests/datamodel/TestData.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - Tove - Jani - Reminder - Don't forget me this weekend! - \ No newline at end of file diff --git a/embedding/java/src/org/uscxml/tests/datamodel/TestDataModelAccess.java b/embedding/java/src/org/uscxml/tests/datamodel/TestDataModelAccess.java deleted file mode 100644 index 0ed1c2e..0000000 --- a/embedding/java/src/org/uscxml/tests/datamodel/TestDataModelAccess.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.uscxml.tests.datamodel; - -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; -import org.uscxml.InterpreterState; - -public class TestDataModelAccess { - public static void main(String[] args) throws InterpreterException { - // load JNI library from build directory - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - { - // initializing and accessing complex data - String xml = - "" + - " " + - "" + - " " + - "
" + - " " + - "
" + - " " + - ""; - - Interpreter interpreter = Interpreter.fromXML(xml, ""); - InterpreterState state; - do { - state = interpreter.step(); - // after first microstep, data model is initialized and we can access cmplx1 - if (state == InterpreterState.USCXML_MICROSTEPPED) - System.out.println(interpreter.getDataModel().getStringAsData("cmplx1").toString()); - - } while (state != InterpreterState.USCXML_FINISHED && - state != InterpreterState.USCXML_DESTROYED); - } - - { - // initializing and accessing complex data via data.src - String xml = - "" + - " " + - " " + - " " + - " " + - "
" + - " " + - "
" + - " " + - ""; - - Interpreter interpreter = Interpreter.fromXML(xml, ""); - interpreter.setSourceURL(TestDataModelAccess.class.getResource("").toString()); - InterpreterState state; - do { - state = interpreter.step(); - // after first microstep, data model is initialized and we can access cmplx1 - if (state == InterpreterState.USCXML_MICROSTEPPED) - System.out.println(interpreter.getDataModel().getStringAsData("cmplx1").toString()); - - } while (state != InterpreterState.USCXML_FINISHED && - state != InterpreterState.USCXML_DESTROYED); - - } - } - -} diff --git a/embedding/java/src/org/uscxml/tests/datamodel/TestJavaScriptDataModel.java b/embedding/java/src/org/uscxml/tests/datamodel/TestJavaScriptDataModel.java deleted file mode 100644 index 590b0b2..0000000 --- a/embedding/java/src/org/uscxml/tests/datamodel/TestJavaScriptDataModel.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.uscxml.tests.datamodel; - -import org.uscxml.Factory; -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; -import org.uscxml.datamodel.ecmascript.ECMAScriptDataModel; - -public class TestJavaScriptDataModel { - - public static void main(String[] args) throws InterpreterException { - // load JNI library from build directory - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - // register java datamodel at factory - ECMAScriptDataModel datamodel = new ECMAScriptDataModel(); - Factory.getInstance().registerDataModel(datamodel); - - // instantiate interpreter with document from file - Interpreter interpreter = Interpreter - .fromURL("/Users/sradomski/Documents/TK/Code/uscxml/test/uscxml/java/test-ecmascript-datamodel.scxml"); - - // wait until interpreter has finished - while (true) - interpreter.interpret(); - } - -} diff --git a/embedding/java/src/org/uscxml/tests/datamodel/TestPlatformExtensions.java b/embedding/java/src/org/uscxml/tests/datamodel/TestPlatformExtensions.java deleted file mode 100644 index 34569e4..0000000 --- a/embedding/java/src/org/uscxml/tests/datamodel/TestPlatformExtensions.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.uscxml.tests.datamodel; - -import org.uscxml.Data; -import org.uscxml.DataModelExtension; -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; -import org.uscxml.InterpreterState; - -public class TestPlatformExtensions extends DataModelExtension { - - /* Currently only with ECMAScript datamodels! */ - - @Override - public String provides() { - return "_x.platform.pool"; - } - - @Override - public Data getValueOf(String member) { - return new Data(true); - } - - @Override - public void setValueOf(String member, Data data) { - System.out.println("Setting " + member + " to \n" + data); - } - - public static void main(String[] args) throws InterpreterException { - // load JNI library from build directory - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - TestPlatformExtensions ext = new TestPlatformExtensions(); - - String xml = - "" + - " " + - " " + - "
" + - " " + - " " + - " " + - ""; - - Interpreter interpreter = Interpreter.fromXML(xml, ""); - interpreter.addDataModelExtension(ext); - - InterpreterState state; - - do { - state = interpreter.step(); - } while (state != InterpreterState.USCXML_FINISHED && - state != InterpreterState.USCXML_DESTROYED); - - } - -} diff --git a/embedding/java/src/org/uscxml/tests/datamodel/TestW3CECMA.java b/embedding/java/src/org/uscxml/tests/datamodel/TestW3CECMA.java deleted file mode 100644 index 89fcddd..0000000 --- a/embedding/java/src/org/uscxml/tests/datamodel/TestW3CECMA.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.uscxml.tests.datamodel; - -import java.io.File; - -import org.uscxml.Capabilities; -import org.uscxml.Factory; -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; -import org.uscxml.InterpreterOptions; -import org.uscxml.datamodel.ecmascript.ECMAScriptDataModel; - -public class TestW3CECMA { - - public static String testDir = "/Users/sradomski/Documents/TK/Code/uscxml/test/w3c/ecma"; - - public static void main(String[] args) throws InterpreterException { - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - ECMAScriptDataModel datamodel = new ECMAScriptDataModel(); - Factory.getInstance().registerDataModel(datamodel); - -// while(true) { -// System.out.println("### test235 #####"); -// Interpreter interpreter = Interpreter.fromURI("/Users/sradomski/Documents/TK/Code/uscxml/test/w3c/ecma/test144.scxml"); -// interpreter.interpret(); -// } - - File dir = new File(testDir); - File[] filesList = dir.listFiles(); - for (File file : filesList) { - if (file.isFile() && file.getName().endsWith(".scxml")) { - System.out.println("### " + file.getName() + " #####"); - Interpreter interpreter = Interpreter.fromURL(file.getAbsolutePath()); - interpreter.setCapabilities(1); - interpreter.interpret(); - } - } - - } - -} diff --git a/embedding/java/src/org/uscxml/tests/execContent/TestCustomExecContent.java b/embedding/java/src/org/uscxml/tests/execContent/TestCustomExecContent.java deleted file mode 100644 index 4b2328a..0000000 --- a/embedding/java/src/org/uscxml/tests/execContent/TestCustomExecContent.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.uscxml.tests.execContent; - -import org.uscxml.ExecutableContent; -import org.uscxml.Factory; -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; - -public class TestCustomExecContent extends ExecutableContent { - - static int instanceId = 0; - public int id = 0; - - public TestCustomExecContent() { - id = instanceId++; - } - - @Override - public String getLocalName() { - return "custom"; - } - - @Override - public String getNamespace() { - return "http://www.w3.org/2005/07/scxml"; - } - - - @Override - public void enterElement(String node) { - System.out.println(id + " entering:" + node); - } - - @Override - public void exitElement(String node) { - System.out.println(id + " exiting:" + node); - } - - @Override - public boolean processChildren() { - return false; - } - - @Override - public ExecutableContent create(Interpreter interpreter) { - TestCustomExecContent execContent = new TestCustomExecContent(); - execContent.swigReleaseOwnership(); - return execContent; - } - - /** - * @param args - * @throws InterruptedException - * @throws InterpreterException - */ - public static void main(String[] args) throws InterruptedException, InterpreterException { - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - TestCustomExecContent execContent = new TestCustomExecContent(); - Factory.getInstance().registerExecutableContent(execContent); - - Interpreter interpreter = Interpreter.fromXML( - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " " + - " \n" + - " " + - "\n", "" - ); - interpreter.interpret(); - Thread.sleep(1000); - } - -} diff --git a/embedding/java/src/org/uscxml/tests/invoker/adhoc/TestAdhocInvoker.java b/embedding/java/src/org/uscxml/tests/invoker/adhoc/TestAdhocInvoker.java deleted file mode 100644 index 3714a53..0000000 --- a/embedding/java/src/org/uscxml/tests/invoker/adhoc/TestAdhocInvoker.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.uscxml.tests.invoker.adhoc; - -import org.uscxml.Data; -import org.uscxml.Event; -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; -import org.uscxml.InvokeRequest; -import org.uscxml.Invoker; -import org.uscxml.SendRequest; -import org.uscxml.StringList; - -public class TestAdhocInvoker extends Invoker { - - @Override - public StringList getNames() { - StringList ss = new StringList(); - ss.add("java"); - return ss; - } - - @Override - public Data getDataModelVariables() { - Data data = new Data(); - return data; - } - - @Override - public void send(SendRequest req) { - System.out.println(req); - if ("foo".equals(req.getName())) - returnEvent(new Event("received2"), true); // enqueue an external event - } - - @Override - public void invoke(InvokeRequest req) { - System.out.println(req); - if ("Some string content".equals(req.getContent())) { - returnEvent(new Event("received1")); // enqueue an external event - } - } - - @Override - public void uninvoke() { - System.out.println("uninvoke"); - } - - /** - * @param args - * @throws InterpreterException - */ - public static void main(String[] args) throws InterpreterException { - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - String xml = - "" + - " " + - " " + - " Some string content" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - ""; - - TestAdhocInvoker javainvoker1 = new TestAdhocInvoker(); - TestAdhocInvoker javainvoker2 = new TestAdhocInvoker(); - - // parse and interpret - Interpreter interpreter = Interpreter.fromXML(xml, ""); - interpreter.setInvoker("javainvoker1", javainvoker1); - interpreter.setInvoker("javainvoker2", javainvoker2); - interpreter.interpret(); - - } - -} diff --git a/embedding/java/src/org/uscxml/tests/invoker/factory/TestCustomInvoker.java b/embedding/java/src/org/uscxml/tests/invoker/factory/TestCustomInvoker.java deleted file mode 100644 index b883125..0000000 --- a/embedding/java/src/org/uscxml/tests/invoker/factory/TestCustomInvoker.java +++ /dev/null @@ -1,92 +0,0 @@ -package org.uscxml.tests.invoker.factory; - -import org.uscxml.Data; -import org.uscxml.Event; -import org.uscxml.Factory; -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; -import org.uscxml.InvokeRequest; -import org.uscxml.Invoker; -import org.uscxml.SendRequest; -import org.uscxml.StringList; - -public class TestCustomInvoker extends Invoker { - - @Override - public StringList getNames() { - StringList ss = new StringList(); - ss.add("java"); - return ss; - } - - @Override - public Data getDataModelVariables() { - Data data = new Data(); - return data; - } - - @Override - public void send(SendRequest req) { - System.out.println(req); - if ("foo".equals(req.getName())) - returnEvent(new Event("received2")); // enqueue an external event - } - - @Override - public void invoke(InvokeRequest req) { - System.out.println(req); - if ("Some string content".equals(req.getContent())) { - returnEvent(new Event("received1")); // enqueue an external event - } - } - - @Override - public void uninvoke() { - System.out.println("uninvoke"); - } - - @Override - public Invoker create(Interpreter interpreter) { - TestCustomInvoker invoker = new TestCustomInvoker(); - invoker.swigReleaseOwnership(); - return invoker; - } - - /** - * @param args - * @throws InterpreterException - */ - public static void main(String[] args) throws InterpreterException { - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - TestCustomInvoker invoker = new TestCustomInvoker(); - // just register prototype at global factory - Factory.getInstance().registerInvoker(invoker); - - String xml = - "" + - " " + - " " + - " Some string content" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - ""; - - // parse and interpret - Interpreter interpreter = Interpreter.fromXML(xml, ""); - interpreter.interpret(); - } - -} diff --git a/embedding/java/src/org/uscxml/tests/invoker/factory/vxml/TestVoiceXMLInvoker.java b/embedding/java/src/org/uscxml/tests/invoker/factory/vxml/TestVoiceXMLInvoker.java deleted file mode 100644 index 3d8a968..0000000 --- a/embedding/java/src/org/uscxml/tests/invoker/factory/vxml/TestVoiceXMLInvoker.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.uscxml.tests.invoker.factory.vxml; - -import java.io.IOException; -import java.net.URL; - -import org.uscxml.HTTPServer; -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; - -public class TestVoiceXMLInvoker { - - public static void main(String[] args) throws IOException, InterpreterException { - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - HTTPServer http = HTTPServer.getInstance(5080, 5081); - - URL jVoiceXMLDoc = new URL(new URL("file:"), "../../test/uscxml/test-jvoicexml.scxml"); - Interpreter interpreter = Interpreter.fromURL(jVoiceXMLDoc); - interpreter.interpret(); - } - -} diff --git a/embedding/java/src/org/uscxml/tests/ioprocessor/adhoc/TestAdhocIOProc.java b/embedding/java/src/org/uscxml/tests/ioprocessor/adhoc/TestAdhocIOProc.java deleted file mode 100644 index f816d0a..0000000 --- a/embedding/java/src/org/uscxml/tests/ioprocessor/adhoc/TestAdhocIOProc.java +++ /dev/null @@ -1,142 +0,0 @@ -package org.uscxml.tests.ioprocessor.adhoc; - -import java.io.IOException; -import java.io.StringReader; - -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.uscxml.Data; -import org.uscxml.Event; -import org.uscxml.Factory; -import org.uscxml.IOProcessor; -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; -import org.uscxml.SendRequest; -import org.uscxml.StringList; -import org.w3c.dom.Document; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -public class TestAdhocIOProc extends IOProcessor { - - public Interpreter interpreter; - - /** - * The types we will handle on a element - */ - @Override - public StringList getNames() { - StringList ss = new StringList(); - ss.add("java"); - return ss; - } - - /** - * Optional data we want to make available at - * _ioprocessors[this.getNames.front()] in the datamodel - */ - @Override - public Data getDataModelVariables() { - return new Data(); - } - - /** - * Send from the SCXML interpreter to this ioprocessor - */ - @Override - public void send(SendRequest req) { - System.out.println(req); - // send in s1.onentry - if ("This is some content!".equals(req.getContent())) { - returnEvent(new Event("received1")); - return; - } - // send in s2.onentry - if (req.getParams().containsKey("foo") - && "bar".equals(req.getParams().get("foo").get(0).getAtom())) { - returnEvent(new Event("received2")); - return; - } - // send in s3 - if (req.getXML().length() > 0) { - try { - DocumentBuilderFactory factory = DocumentBuilderFactory - .newInstance(); - Document doc = factory.newDocumentBuilder().parse( - new InputSource(new StringReader(req.getXML()))); - System.out.println("Root element :" - + doc.getDocumentElement().getNodeName()); - if ("this".equals(doc.getDocumentElement().getNodeName())) { - returnEvent(new Event("received3")); - return; - } - } catch (ParserConfigurationException e) { - e.printStackTrace(); - } catch (SAXException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - } - - /** - * Create a new instance of this - */ - @Override - public IOProcessor create(Interpreter interpreter) { - TestAdhocIOProc ioProc = new TestAdhocIOProc(); - ioProc.interpreter = interpreter; - ioProc.swigReleaseOwnership(); - return ioProc; - } - - /** - * @param args - * @throws InterpreterException - */ - public static void main(String[] args) throws InterpreterException { - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - String xml = - "" + - " " + - " " + - " " + - " This is some content!" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - ""; - - TestAdhocIOProc ioProc = new TestAdhocIOProc(); - - // parse and interpret - Interpreter interpreter = Interpreter.fromXML(xml, ""); - interpreter.addIOProcessor(ioProc); - interpreter.interpret(); - } - -} diff --git a/embedding/java/src/org/uscxml/tests/ioprocessor/adhoc/console/ConsoleFrame.java b/embedding/java/src/org/uscxml/tests/ioprocessor/adhoc/console/ConsoleFrame.java deleted file mode 100644 index 332151c..0000000 --- a/embedding/java/src/org/uscxml/tests/ioprocessor/adhoc/console/ConsoleFrame.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.uscxml.tests.ioprocessor.adhoc.console; - -import java.awt.Frame; - -import javax.swing.JLabel; -import javax.swing.JPanel; - -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; - -public class ConsoleFrame extends Frame { - private static final long serialVersionUID = 3682378173372160680L; - private ConsoleIOProc ioProc; - - public ConsoleFrame() throws InterpreterException { - super("Input Frame"); - JPanel p = new JPanel(); - JLabel label = new JLabel("Key Listener!"); - p.add(label); - add(p); - setSize(200, 100); - - // instantiate SCXML interpreter - final Interpreter interpreter = Interpreter.fromXML( - "" - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + "", ""); - - /** - * ConsoleIOProc will register as a keyboard listener and send events to the interpreter. - * - * This circumvents the factory and registers instances directly. You will have to promise - * that the ioProc instance exists for the complete lifetime of the interpreter, otherwise - * finalize() will call the C++ destructor and SegFaults will occur. - */ - ioProc = new ConsoleIOProc(this); - interpreter.addIOProcessor(ioProc); - - // Start the interpreter in a separate thread - Thread intrerpreterThread = new Thread(new Runnable() { - @Override - public void run() { - try { - interpreter.interpret(); - } catch (InterpreterException e) { - e.printStackTrace(); - } - } - }); - intrerpreterThread.start(); - - // show the user interface - setVisible(true); - } - - public static void main(String[] args) throws InterpreterException { - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - ConsoleFrame frame = new ConsoleFrame(); - } -} diff --git a/embedding/java/src/org/uscxml/tests/ioprocessor/adhoc/console/ConsoleIOProc.java b/embedding/java/src/org/uscxml/tests/ioprocessor/adhoc/console/ConsoleIOProc.java deleted file mode 100644 index cf818db..0000000 --- a/embedding/java/src/org/uscxml/tests/ioprocessor/adhoc/console/ConsoleIOProc.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.uscxml.tests.ioprocessor.adhoc.console; - -import java.awt.Frame; -import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; - -import org.uscxml.Data; -import org.uscxml.Event; -import org.uscxml.IOProcessor; -import org.uscxml.SendRequest; -import org.uscxml.StringList; - -public class ConsoleIOProc extends IOProcessor implements KeyListener { - - public ConsoleIOProc(Frame frame) { - super(); - frame.addKeyListener(this); - } - - /** IOProcessor */ - @Override - public StringList getNames() { - StringList ss = new StringList(); - ss.add("console"); - return ss; - } - - /** IOProcessor */ - @Override - public Data getDataModelVariables() { - // return anything for _ioprocessor['console'] - Data data = Data.fromJSON("{ foo: \"bar\", test: [1,2,3,4,5,6] }"); - return data; - } - - /** IOProcessor */ - @Override - public void send(SendRequest req) { - // interpreter wants to send something, just print on console - System.out.println(req); - } - - /** KeyListener */ - @Override - public void keyPressed(KeyEvent e) { - Event evt = new Event("key.pressed"); - evt.setData(keyEventToData(e)); - returnEvent(evt); - } - - /** KeyListener */ - @Override - public void keyReleased(KeyEvent e) { - Event evt = new Event("key.released"); - evt.setData(keyEventToData(e)); - returnEvent(evt); - } - - /** KeyListener */ - @Override - public void keyTyped(KeyEvent e) { - Event evt = new Event("key.typed"); - evt.setData(keyEventToData(e)); - returnEvent(evt); - } - - static Data keyEventToData(KeyEvent e) { - Data data = new Data(); - data.put("id", new Data(e.getID())); - data.put("keyChar", new Data(e.getKeyChar())); - data.put("keyLocation", new Data(e.getKeyLocation())); - data.put("modifiers", new Data(e.getModifiers())); - data.put("modifiersEx", new Data(e.getModifiersEx())); - data.put("when", new Data(e.getWhen())); - data.put("actionKey", new Data(e.isActionKey())); - data.put("altDown", new Data(e.isAltDown())); - data.put("altGraphDown", new Data(e.isAltGraphDown())); - data.put("ctrlDown", new Data(e.isControlDown())); - data.put("metaDown", new Data(e.isMetaDown())); - data.put("shiftDown", new Data(e.isShiftDown())); - - return data; - } -} \ No newline at end of file diff --git a/embedding/java/src/org/uscxml/tests/ioprocessor/factory/TestCustomIOProc.java b/embedding/java/src/org/uscxml/tests/ioprocessor/factory/TestCustomIOProc.java deleted file mode 100644 index 80e2e13..0000000 --- a/embedding/java/src/org/uscxml/tests/ioprocessor/factory/TestCustomIOProc.java +++ /dev/null @@ -1,143 +0,0 @@ -package org.uscxml.tests.ioprocessor.factory; - -import java.io.IOException; -import java.io.StringReader; - -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.uscxml.Data; -import org.uscxml.Event; -import org.uscxml.Factory; -import org.uscxml.IOProcessor; -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; -import org.uscxml.SendRequest; -import org.uscxml.StringList; -import org.w3c.dom.Document; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -public class TestCustomIOProc extends IOProcessor { - - public Interpreter interpreter; - - /** - * The types we will handle on a element - */ - @Override - public StringList getNames() { - StringList ss = new StringList(); - ss.add("java"); - return ss; - } - - /** - * Optional data we want to make available at - * _ioprocessors[this.getNames.front()] in the datamodel - */ - @Override - public Data getDataModelVariables() { - return new Data(); - } - - /** - * Send from the SCXML interpreter to this ioprocessor - */ - @Override - public void send(SendRequest req) { - System.out.println(req); - // send in s1.onentry - if ("This is some content!".equals(req.getContent())) { - returnEvent(new Event("received1")); - return; - } - // send in s2.onentry - if (req.getParams().containsKey("foo") - && "bar".equals(req.getParams().get("foo").get(0).getAtom())) { - returnEvent(new Event("received2")); - return; - } - // send in s3 - if (req.getXML().length() > 0) { - try { - DocumentBuilderFactory factory = DocumentBuilderFactory - .newInstance(); - Document doc = factory.newDocumentBuilder().parse( - new InputSource(new StringReader(req.getXML()))); - System.out.println("Root element :" - + doc.getDocumentElement().getNodeName()); - if ("this".equals(doc.getDocumentElement().getNodeName())) { - returnEvent(new Event("received3")); - return; - } - } catch (ParserConfigurationException e) { - e.printStackTrace(); - } catch (SAXException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - } - - /** - * Create a new instance of this - */ - @Override - public IOProcessor create(Interpreter interpreter) { - TestCustomIOProc ioProc = new TestCustomIOProc(); - ioProc.interpreter = interpreter; - ioProc.swigReleaseOwnership(); - return ioProc; - } - - /** - * @param args - * @throws InterpreterException - */ - public static void main(String[] args) throws InterpreterException { - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - TestCustomIOProc ioproc = new TestCustomIOProc(); - // just register prototype at global factory - Factory.getInstance().registerIOProcessor(ioproc); - - String xml = - "" + - " " + - " " + - " " + - " This is some content!" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - ""; - - // parse and interpret - Interpreter interpreter = Interpreter.fromXML(xml, ""); - interpreter.interpret(); - } - -} diff --git a/embedding/java/src/org/uscxml/tests/monitor/TestCustomMonitor.java b/embedding/java/src/org/uscxml/tests/monitor/TestCustomMonitor.java deleted file mode 100644 index 5db4ad4..0000000 --- a/embedding/java/src/org/uscxml/tests/monitor/TestCustomMonitor.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.uscxml.tests.monitor; - -import org.uscxml.Data; -import org.uscxml.Interpreter; -import org.uscxml.InterpreterException; -import org.uscxml.InterpreterMonitor; - -public class TestCustomMonitor extends InterpreterMonitor { - - @Override - public void afterEnteringState(Interpreter interpreter, String stateId, - String xpath, String state, boolean moreComing) { - System.out.println("Entered state " + stateId); - if ("s2".equals(stateId)) { - Data data = interpreter.getDataModel().getStringAsData("foo"); - System.out.println(data); - } - } - - public static void main(String[] args) throws InterpreterException { - System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); - - String xml = - "" + - " " + - " " + - " { foo: 'bar', baz: 'foo' }" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - ""; - - // parse and interpret - Interpreter interpreter = Interpreter.fromXML(xml, ""); - - TestCustomMonitor monitor = new TestCustomMonitor(); - interpreter.addMonitor(monitor); - - interpreter.interpret(); - } - -} diff --git a/installer/description.txt b/installer/description.txt deleted file mode 100644 index f255fba..0000000 --- a/installer/description.txt +++ /dev/null @@ -1,7 +0,0 @@ -uMundo is a publish/subscribe implementation from the Telecooperation Group at -the Technical University of Darmstadt. - -uMundo is continuously updated; everything we would write here would be -out-dated in a matter of weeks. As the only thing worse than no documentation -is wrong documentation, please have a look at the website at: -https://github.com/tklab-tud/umundo for current information. \ No newline at end of file diff --git a/installer/license.txt b/installer/license.txt deleted file mode 100644 index 220eb6f..0000000 --- a/installer/license.txt +++ /dev/null @@ -1,36 +0,0 @@ -Simplified BSD License - -Copyright (c) 2012, Telecooperation Group - TU Darmstadt All rights -reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. 2. -Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation -are those of the authors and should not be interpreted as representing -official policies, either expressed or implied, of the Telecooperation -Group. - -IMPORTANT! - -Please note that the various implementations used in uSCXML come with -their own licenses and are only packaged as a matter of convenience. diff --git a/installer/nsis/uscxml-logo.bmp b/installer/nsis/uscxml-logo.bmp deleted file mode 100644 index e2375f8..0000000 Binary files a/installer/nsis/uscxml-logo.bmp and /dev/null differ diff --git a/installer/packageMaker/readme.txt b/installer/packageMaker/readme.txt deleted file mode 100644 index 42cdae8..0000000 --- a/installer/packageMaker/readme.txt +++ /dev/null @@ -1,2 +0,0 @@ -Documentation and guides are available on github at: -https://github.com/tklab-tud/umundo \ No newline at end of file diff --git a/installer/packageMaker/welcome.txt b/installer/packageMaker/welcome.txt deleted file mode 100644 index 039b185..0000000 --- a/installer/packageMaker/welcome.txt +++ /dev/null @@ -1,3 +0,0 @@ -This package will install the uMundo publish/subscribe implementation -for MacOSX along with all libraries for cross-compilation on Android -and iOS. \ No newline at end of file diff --git a/src/bindings/CMakeLists.txt b/src/bindings/CMakeLists.txt deleted file mode 100644 index 89905ce..0000000 --- a/src/bindings/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -# if you build swig from sources on windows, this is where it will end up -# see also: http://www.swig.org/Doc2.0/Windows.html#Windows_mingw_msys -if (CMAKE_CROSSCOMPILING) - return() -endif() - -if (WIN32) - if(EXISTS "${PROJECT_BINARY_DIR}/../swig/") - LIST(APPEND CMAKE_PROGRAM_PATH "${PROJECT_BINARY_DIR}/../swig/") - elseif(EXISTS "${PROJECT_BINARY_DIR}/../../swig/") - LIST(APPEND CMAKE_PROGRAM_PATH "${PROJECT_BINARY_DIR}/../../swig/") - endif() - - file(GLOB POTENTIAL_SWIG "C:/Program Files/swig*" "C:/Program Files (x86)/swig*") - LIST(APPEND CMAKE_PROGRAM_PATH ${POTENTIAL_SWIG}) # swig.exe - # message(FATAL_ERROR "POTENTIAL_SWIG: ${POTENTIAL_SWIG}") - -endif() -LIST(APPEND CMAKE_PROGRAM_PATH $ENV{SWIG_DIR}) - -find_package(SWIG) - -if (SWIG_FOUND) - if(SWIG_VERSION VERSION_GREATER 2.0.4) - MARK_AS_ADVANCED(SWIG_DIR SWIG_EXECUTABLE SWIG_VERSION) - INCLUDE(${SWIG_USE_FILE}) - if (BUILD_BINDING_JAVA) - add_subdirectory(swig/java) - endif() - if (BUILD_BINDING_CSHARP) - add_subdirectory(swig/csharp) - endif() - if (BUILD_BINDING_PHP) - add_subdirectory(swig/php) - endif() - - if(SWIG_VERSION VERSION_LESS 3.0.0) - message(STATUS "SWIG version > 3.0 is recommended, found ${SWIG_VERSION}") - endif() - else() - message(STATUS "SWIG version 2.0.5 is required, found ${SWIG_VERSION} - skipping wrapper generation") - endif() -else() - message(STATUS "SWIG not found - skipping wrapper generation") -endif() -set(USCXML_LANGUAGE_BINDINGS ${USCXML_LANGUAGE_BINDINGS} PARENT_SCOPE) diff --git a/src/bindings/swig/csharp/CMakeLists.txt b/src/bindings/swig/csharp/CMakeLists.txt deleted file mode 100644 index 384507b..0000000 --- a/src/bindings/swig/csharp/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ -# generate JNI library and create a jar -# Make from within Eclipse fails miserably with the whole thing - -if (WIN32) - LIST(APPEND CMAKE_PROGRAM_PATH "C:/Windows/Microsoft.NET/Framework/v3.5") # CSharp compiler - LIST(APPEND CMAKE_PROGRAM_PATH "C:/Windows/Microsoft.NET/Framework/v4.0.30319") # CSharp compiler -endif() - -FIND_PROGRAM(DMCS_EXECUTABLE dmcs PATHS $ENV{DMCS_HOME} ENV PATH ) # Mono compiler -FIND_PROGRAM(CSC_EXECUTABLE csc PATHS $ENV{CSC_HOME} ENV PATH ) # CSharp compiler - -if (DMCS_EXECUTABLE OR CSC_EXECUTABLE) - - # unset all library suffixes as swig will hardcode a library without - SET(LIB_POSTFIX ${CMAKE_LIBRARY_POSTFIX}) - - SET(CMAKE_DEBUG_POSTFIX "") - SET(CMAKE_RELEASE_POSTFIX "") - SET(CMAKE_RELWITHDEBINFO_POSTFIX "") - SET(CMAKE_MINSIZEREL_POSTFIX "") - SET(CMAKE_LIBRARY_POSTFIX "") - - if (MSVC) - # MSVC does not include inttypes.h but SWIG needs it - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../msvc) - endif() - - include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - - SET(CMAKE_SWIG_FLAGS "") - SET(USCXML_CSHARP_NAMESPACE "org.uscxml") - SET(USCXML_CSHARP_DIR "org/uscxml") - - if (CMAKE_BUILD_TYPE STREQUAL "Debug") - list(APPEND CMAKE_SWIG_FLAGS "-DDEBUG") - endif() - - - # we need ; to produce a space with the package .. weird - SET_SOURCE_FILES_PROPERTIES(uscxml.i PROPERTIES SWIG_FLAGS "-w401;-namespace;${USCXML_CSHARP_NAMESPACE}") - SET_SOURCE_FILES_PROPERTIES(uscxml.i PROPERTIES CPLUSPLUS ON) - SET(CMAKE_SWIG_OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/${USCXML_CSHARP_DIR}") - - set(USCXML_LANGUAGE_BINDINGS "csharp ${USCXML_LANGUAGE_BINDINGS}") - - SWIG_ADD_MODULE(uscxmlNativeCSharp csharp uscxml.i) - set_target_properties(uscxmlNativeCSharp PROPERTIES FOLDER "Bindings") - set_target_properties(uscxmlNativeCSharp - PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/csharp${LIB_POSTFIX}" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/csharp${LIB_POSTFIX}" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/csharp${LIB_POSTFIX}" - ) - - set_target_properties(uscxmlNativeCSharp PROPERTIES COMPILE_FLAGS "-DSWIG") - swig_link_libraries(uscxmlNativeCSharp uscxml) - - # build managed code part - if (CSC_EXECUTABLE) - ADD_CUSTOM_TARGET(csharp - COMMAND ${CMAKE_COMMAND} -E - copy ${CMAKE_CURRENT_SOURCE_DIR}/org/uscxml/InterpreterException.cs ${PROJECT_BINARY_DIR}/src/bindings/swig/csharp/org/uscxml - COMMAND ${CSC_EXECUTABLE} - /target:library - /out:${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/uscxmlCSharp.dll - *.cs - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/src/bindings/swig/csharp/org/uscxml - COMMENT "Creating umundoCSharp.dll for C# ...") - else() - ADD_CUSTOM_TARGET(csharp - COMMAND ${CMAKE_COMMAND} -E - copy ${CMAKE_CURRENT_SOURCE_DIR}/org/uscxml/InterpreterException.cs ${PROJECT_BINARY_DIR}/src/bindings/swig/csharp/org/uscxml - COMMAND ${DMCS_EXECUTABLE} - -target:library - /out:${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/uscxmlCSharp.dll - *.cs - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/src/bindings/swig/csharp/org/uscxml - COMMENT "Creating umundoCSharp.dll for Mono ...") - endif() - - add_dependencies(csharp uscxmlNativeCSharp) - if (BUILD_TESTS) - add_dependencies(ALL_TESTS csharp) - endif() - set_target_properties(csharp PROPERTIES FOLDER "Bindings") - - set(USCXML_LANGUAGE_BINDINGS ${USCXML_LANGUAGE_BINDINGS} PARENT_SCOPE) -endif() \ No newline at end of file diff --git a/src/bindings/swig/csharp/org/uscxml/InterpreterException.cs b/src/bindings/swig/csharp/org/uscxml/InterpreterException.cs deleted file mode 100644 index 38430d8..0000000 --- a/src/bindings/swig/csharp/org/uscxml/InterpreterException.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace org.uscxml { - public class InterpreterException : System.ApplicationException { - public InterpreterException(string message) - : base(message) { - } - } -} \ No newline at end of file diff --git a/src/bindings/swig/csharp/uscxml.i b/src/bindings/swig/csharp/uscxml.i deleted file mode 100644 index fbc5f20..0000000 --- a/src/bindings/swig/csharp/uscxml.i +++ /dev/null @@ -1,429 +0,0 @@ -%module(directors="1", allprotected="1") uscxmlNativeCSharp - -// provide a macro for the header files -#define SWIGIMPORTED 1 - -%include -%include -%include -%include -%include "../stl_set.i" -%include "../stl_list.i" - -%include - -// these are needed at least for the templates to work -typedef uscxml::Blob Blob; -typedef uscxml::Data Data; -typedef uscxml::Event Event; -typedef uscxml::InvokeRequest InvokeRequest; -typedef uscxml::SendRequest SendRequest; -typedef uscxml::Invoker Invoker; -typedef uscxml::IOProcessor IOProcessor; -typedef uscxml::DataModel DataModel; -typedef uscxml::DataModelExtension DataModelExtension; -typedef uscxml::ExecutableContent ExecutableContent; -typedef uscxml::InvokerImpl InvokerImpl; -typedef uscxml::IOProcessorImpl IOProcessorImpl; -typedef uscxml::DataModelImpl DataModelImpl; -typedef uscxml::ExecutableContentImpl ExecutableContentImpl; -typedef uscxml::InterpreterIssue InterpreterIssue; - -%feature("director") uscxml::WrappedInvoker; -%feature("director") uscxml::WrappedDataModel; -%feature("director") uscxml::WrappedDataModelExtension; -%feature("director") uscxml::WrappedIOProcessor; -%feature("director") uscxml::WrappedExecutableContent; -%feature("director") uscxml::WrappedInterpreterMonitor; - -// disable warnings - -// unknown base class -#pragma SWIG nowarn=401 -// override symbols via extend -#pragma SWIG nowarn=302 -// ignoring overrided method -#pragma SWIG nowarn=516 -// pointer from director -#pragma SWIG nowarn=473 -// renamed params -> _params -#pragma SWIG nowarn=314 - -%csconst(1); - -%rename(equals) operator==; -%rename(isValid) operator bool; - - -//************************************************** -// This ends up in the generated wrapper code -//************************************************** - -%{ - -#include "../../../uscxml/Message.h" -#include "../../../uscxml/Factory.h" -#include "../../../uscxml/Interpreter.h" -#include "../../../uscxml/concurrency/BlockingQueue.h" -#include "../../../uscxml/server/HTTPServer.h" -//#include "../../../uscxml/debug/DebuggerServlet.h" - -#include "../wrapped/WrappedInvoker.h" -#include "../wrapped/WrappedDataModel.h" -#include "../wrapped/WrappedExecutableContent.h" -#include "../wrapped/WrappedIOProcessor.h" -#include "../wrapped/WrappedInterpreterMonitor.h" - -using namespace uscxml; -using namespace Arabica::DOM; - -// the wrapped* C++ classes get rid of DOM nodes and provide more easily wrapped base classes -#include "../wrapped/WrappedInvoker.cpp" -#include "../wrapped/WrappedDataModel.cpp" -#include "../wrapped/WrappedExecutableContent.cpp" -#include "../wrapped/WrappedIOProcessor.cpp" -#include "../wrapped/WrappedInterpreterMonitor.cpp" - -%} - -// see http://binf.gmu.edu/software/SWIG/CSharp.html#csharp_exceptions -%insert(runtime) %{ - // Code to handle throwing of C# CustomApplicationException from C/C++ code. - // The equivalent delegate to the callback, CSharpExceptionCallback_t, is CustomExceptionDelegate - // and the equivalent customExceptionCallback instance is customDelegate - typedef void (SWIGSTDCALL* CSharpExceptionCallback_t)(const char *); - CSharpExceptionCallback_t customExceptionCallback = NULL; - - extern "C" SWIGEXPORT - void SWIGSTDCALL CustomExceptionRegisterCallback(CSharpExceptionCallback_t customCallback) { - customExceptionCallback = customCallback; - } - - // Note that SWIG detects any method calls named starting with - // SWIG_CSharpSetPendingException for warning 845 - static void SWIG_CSharpSetPendingExceptionCustom(const char *msg) { - customExceptionCallback(msg); - } -%} - -%pragma(csharp) imclasscode=%{ - class CustomExceptionHelper { - // C# delegate for the C/C++ customExceptionCallback - public delegate void CustomExceptionDelegate(string message); - static CustomExceptionDelegate customDelegate = - new CustomExceptionDelegate(SetPendingCustomException); - - [System.Runtime.InteropServices.DllImport("$dllimport", EntryPoint="CustomExceptionRegisterCallback")] - public static extern - void CustomExceptionRegisterCallback(CustomExceptionDelegate customCallback); - - static void SetPendingCustomException(string message) { - SWIGPendingException.Set(new org.uscxml.InterpreterException(message)); - } - - static CustomExceptionHelper() { - CustomExceptionRegisterCallback(customDelegate); - } - } - static CustomExceptionHelper exceptionHelper = new CustomExceptionHelper(); -%} - - -%define WRAP_THROW_EXCEPTION( MATCH ) -%exception MATCH %{ -try { - $action -} catch (uscxml::Event& e) { - std::stringstream ss; - ss << std::endl << e; - SWIG_CSharpSetPendingExceptionCustom(ss.str().c_str()); -} -%} -%enddef - -WRAP_THROW_EXCEPTION(uscxml::Interpreter::fromXML); -WRAP_THROW_EXCEPTION(uscxml::Interpreter::fromURI); -WRAP_THROW_EXCEPTION(uscxml::Interpreter::step); -WRAP_THROW_EXCEPTION(uscxml::Interpreter::interpret); - - -%define WRAP_TO_STRING( CLASSNAME ) -%csmethodmodifiers CLASSNAME::ToString() "public override"; -%extend CLASSNAME { - virtual std::string ToString() { - std::stringstream ss; - ss << *self; - return ss.str(); - } -}; -%enddef - -WRAP_TO_STRING(uscxml::Event); -WRAP_TO_STRING(uscxml::Data); -WRAP_TO_STRING(uscxml::SendRequest); -WRAP_TO_STRING(uscxml::InvokeRequest); -WRAP_TO_STRING(uscxml::InterpreterIssue); - -%include "../uscxml_ignores.i" - -// InterpreterMonitor -> StateTransitionMonitor -%ignore uscxml::StateTransitionMonitor; - -//*********************************************** -// Beautify important classes -//*********************************************** - - -// byte[] signature for Blob get/setData -// see http://permalink.gmane.org/gmane.comp.programming.swig/5804 - -%csmethodmodifiers uscxml::Blob::setData(const char* data, size_t length) "private"; -%csmethodmodifiers uscxml::Blob::setMimeType(const std::string& mimeType) "private"; -%csmethodmodifiers uscxml::Blob::Blob(const char* data, size_t size, const std::string& mimeType) "private"; -%csmethodmodifiers uscxml::Blob::Blob(const char* data, size_t size) "private"; - -%typemap(cscode) uscxml::Blob %{ - public Blob(byte[] data, string mimeType) : this(uscxmlNativeCSharpPINVOKE.new_Blob__SWIG_2(data, (uint)data.Length, mimeType), true) { - if (uscxmlNativeCSharpPINVOKE.SWIGPendingException.Pending) throw uscxmlNativeCSharpPINVOKE.SWIGPendingException.Retrieve(); - } - -%} - -%typemap(imtype, out="System.IntPtr") const char *data "byte[]" -%typemap(cstype) const char *data "byte[]" -%typemap(in) const char *data %{ $1 = ($1_ltype)$input; %} -%typemap(csin) const char *data "$csinput" - -%typemap(imtype, out="System.IntPtr") char* getData "byte[]" -%typemap(cstype) char* getData "byte[]" - -%typemap(csout) char* getData %{ - { - byte[] ret = new byte[this.getSize()]; - System.IntPtr data = $imcall; - System.Runtime.InteropServices.Marshal.Copy(data, ret, 0, (int)this.getSize()); - return ret; - } -%} - -// make sure we do not get the default with SWIG_csharp_string_callback -%typemap(out) char* getData { - $result = (char *)result; -} - - - -%csmethodmodifiers uscxml::Event::getParamMap() "private"; -%csmethodmodifiers uscxml::Event::getParamMapKeys() "private"; -%csmethodmodifiers uscxml::Event::setParamMap(const std::map >&) "private"; -%csmethodmodifiers uscxml::Event::getNameListKeys() "private"; -%csmethodmodifiers uscxml::Interpreter::getIOProcessorKeys() "private"; -%csmethodmodifiers uscxml::Interpreter::getInvokerKeys() "private"; -%csmethodmodifiers uscxml::Interpreter::getInvokers() "private"; -%csmethodmodifiers uscxml::Interpreter::getIOProcessors() "private"; -%csmethodmodifiers uscxml::Data::getCompoundKeys() "private"; - -%include "../uscxml_beautify.i" - -%typemap(csimports) uscxml::Interpreter %{ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -%} - -%typemap(cscode) uscxml::Interpreter %{ - public Dictionary getIOProcessors() { - Dictionary ioProcs = new Dictionary(); - StringVector keys = getIOProcessorKeys(); - IOProcMap ioProcMap = getIOProcessorsNative(); - for (size_t i = 0; i < keys.Count; i++) { - ioProcs[keys[i]] = ioProcMap[keys[i]]; - } - return ioProcs; - } - - public Dictionary getInvokers() { - Dictionary invokers = new Dictionary(); - StringVector keys = getInvokerKeys(); - InvokerMap invokerMap = getInvokersNative(); - for (size_t i = 0; i < keys.Count; i++) { - invokers[keys[i]] = invokerMap[keys[i]]; - } - return invokers; - } - -%} - - -%rename(getCompoundNative) uscxml::Data::getCompound(); -%rename(getArrayNative) uscxml::Data::getArray(); -%rename(setCompoundNative) uscxml::Data::setCompound(const std::map&); -%rename(setArrayNative) uscxml::Data::setArray(const std::list&); -%csmethodmodifiers uscxml::Data::getCompound() "private"; -%csmethodmodifiers uscxml::Data::getArray() "private"; -%csmethodmodifiers uscxml::Data::setCompound(const std::map&) "private"; -%csmethodmodifiers uscxml::Data::setArray(const std::list&) "private"; -%csmethodmodifiers uscxml::Data::getCompoundKeys() "private"; - -%typemap(csimports) uscxml::Data %{ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -%} - -%typemap(cscode) uscxml::Data %{ - public Data(byte[] data, String mimeType) : this() { - setBinary(new Blob(data, mimeType)); - } - - public Data(List arr) : this() { - setArray(arr); - } - - public Data(Dictionary compound) : this() { - setCompound(compound); - } - - public Dictionary getCompound() { - Dictionary compound = new Dictionary(); - DataMap dataMap = getCompoundNative(); - StringVector dataMapKeys = getCompoundKeys(); - for (size_t i = 0; i < dataMapKeys.Count; i++) { - compound[dataMapKeys[i]] = dataMap[dataMapKeys[i]]; - } - return compound; - } - - public void setCompound(Dictionary compound) { - DataMap dataMap = new DataMap(); - foreach(KeyValuePair entry in compound) { - dataMap.Add(entry); - } - setCompoundNative(dataMap); - } - - public List getArray() { - List arr = new List(); - DataList dataList = getArrayNative(); - for (size_t i = 0; i < dataList.size(); i++) { - arr.Add(dataList.get(i)); - } - return arr; - } - - public void setArray(List arr) { - DataList dataList = new DataList(); - foreach (Data data in arr) { - dataList.add(data); - } - setArrayNative(dataList); - } - -%} - -%rename(getNameListNative) uscxml::Event::getNameList(); -%rename(getParamsNative) uscxml::Event::getParams(); -%rename(setNameListNative) uscxml::Event::setNameList(const std::map&); -%rename(setParamsNative) uscxml::Event::setParams(const std::multimap&); -%csmethodmodifiers uscxml::Event::getNameList() "private"; -%csmethodmodifiers uscxml::Event::getNameListKeys() "private"; -%csmethodmodifiers uscxml::Event::getParams() "private"; -%csmethodmodifiers uscxml::Event::setNameList(const std::map&) "private"; -%csmethodmodifiers uscxml::Event::setParams(const std::multimap&) "private"; - -%typemap(csimports) uscxml::Event %{ - using System; - using System.Collections.Generic; - using System.Runtime.InteropServices; -%} - -%typemap(cscode) uscxml::Event %{ - public Dictionary > getParams() { - Dictionary> parameters = new Dictionary>(); - ParamMap paramMap = getParamMap(); - - foreach (KeyValuePair entry in paramMap) { - DataList dataList = entry.Value; - List paramList = new List(); - for (size_t i = 0; i < dataList.size(); i++) { - Data data = dataList.get(i); - paramList.Add(data); - } - parameters.Add(entry.Key, paramList); - } - return parameters; - } - - public void setParams(Dictionary> parameters) { - ParamMap paramMap = new ParamMap(); - foreach(KeyValuePair> entry in parameters) { - DataList dataList = new DataList(); - foreach (Data data in entry.Value) { - dataList.add(data); - } - paramMap.Add(entry.Key, dataList); - } - setParamMap(paramMap); - } - - public Dictionary getNameList() { - Dictionary nameList = new Dictionary(); - DataMap nameListMap = getNameListNative(); - StringVector nameListMapKeys = getNameListKeys(); - for (size_t i = 0; i < nameListMapKeys.Count; i++) { - nameList[nameListMapKeys[i]] = nameListMap[nameListMapKeys[i]]; - } - return nameList; - } - - public void setNameList(Dictionary nameList) { - DataMap dataMap = new DataMap(); - foreach (KeyValuePair entry in nameList) { - dataMap.Add(entry); - } - setNameListNative(dataMap); - } -%} - -//*********************************************** -// Parse the header file to generate wrappers -//*********************************************** - -%include "../../../uscxml/Common.h" -%include "../../../uscxml/Factory.h" -%include "../../../uscxml/Message.h" -%include "../../../uscxml/Interpreter.h" -%include "../../../uscxml/concurrency/BlockingQueue.h" -%include "../../../uscxml/server/HTTPServer.h" -//%include "../../../uscxml/debug/DebuggerServlet.h" -%include "../../../uscxml/debug/InterpreterIssue.h" - -%include "../../../uscxml/messages/Blob.h" -%include "../../../uscxml/messages/Data.h" -%include "../../../uscxml/messages/Event.h" -%include "../../../uscxml/messages/InvokeRequest.h" -%include "../../../uscxml/messages/SendRequest.h" - -%include "../../../uscxml/plugins/DataModel.h" -%include "../../../uscxml/plugins/EventHandler.h" -%include "../../../uscxml/plugins/ExecutableContent.h" -%include "../../../uscxml/plugins/Invoker.h" -%include "../../../uscxml/plugins/IOProcessor.h" - -%include "../wrapped/WrappedInvoker.h" -%include "../wrapped/WrappedDataModel.h" -%include "../wrapped/WrappedExecutableContent.h" -%include "../wrapped/WrappedIOProcessor.h" -%include "../wrapped/WrappedInterpreterMonitor.h" - - -%template(IssueList) std::list; -%template(DataList) std::list; -%template(DataMap) std::map; -%template(StringSet) std::set; -%template(StringVector) std::vector; -%template(StringList) std::list; -%template(ParamMap) std::map >; -%template(IOProcMap) std::map; -%template(InvokerMap) std::map; -%template(ParentQueue) uscxml::concurrency::BlockingQueue; diff --git a/src/bindings/swig/java/CMakeLists.txt b/src/bindings/swig/java/CMakeLists.txt deleted file mode 100644 index de2a161..0000000 --- a/src/bindings/swig/java/CMakeLists.txt +++ /dev/null @@ -1,78 +0,0 @@ -# generate JNI library and create a jar -# Make from within Eclipse fails miserably with the whole thing - -find_package(JNI) -if(JNI_FOUND) - include_directories(${JNI_INCLUDE_DIRS}) -else() - message(STATUS "No JNI libraries found - not building Java wrappers") - return() -endif() - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - -SET(CMAKE_SWIG_FLAGS "") -SET(USCXML_JAVA_PACKAGE "org.uscxml") -SET(USCXML_JAVA_DIR "org/uscxml") - -# we need ; to produce a space with the package .. weird -SET_SOURCE_FILES_PROPERTIES(uscxml.i PROPERTIES SWIG_FLAGS "-w473;-package;${USCXML_JAVA_PACKAGE}") -SET_SOURCE_FILES_PROPERTIES(uscxml.i PROPERTIES CPLUSPLUS ON) -SET(CMAKE_SWIG_OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/${USCXML_JAVA_DIR}") - -SWIG_ADD_MODULE(uscxmlNativeJava java uscxml.i) -foreach(JNI_LIBRARY ${JNI_LIBRARIES}) - if (NOT ${JNI_LIBRARY} MATCHES ".*jawt.*") - SWIG_LINK_LIBRARIES(uscxmlNativeJava ${JNI_LIBRARY}) - endif() -endforeach() -set_target_properties(uscxmlNativeJava PROPERTIES FOLDER "Bindings") -set_target_properties(uscxmlNativeJava PROPERTIES COMPILE_FLAGS "-DSWIG") - -swig_link_libraries(uscxmlNativeJava uscxml) - -file(GLOB POTENTIAL_ANT "C:/Program Files/apache-ant**/bin" "C:/Program Files (x86)/apache-ant**/bin") - -FIND_PROGRAM(ANT_EXECUTABLE ant PATHS $ENV{ANT_HOME}/bin ${POTENTIAL_ANT} ENV PATH ) -if (ANT_EXECUTABLE) - set(USCXML_LANGUAGE_BINDINGS "java ${USCXML_LANGUAGE_BINDINGS}") - - set(JAR_EXCLUDE_DEBUG OFF) - set(JAR_EXCLUDE_JNI OFF) - - # include all the JNI libraries prepared from DIST_PREPARE builds on the various desktop platforms - if (DIST_PREPARE) - if (CMAKE_CROSSCOMPILING) - if (ANDROID) - find_program(PROTOBUF_PROTOC_EXECUTABLE NAMES protoc protoc.exe) - set(JAR_EXCLUDE_JNI ON) # JNI inside jar not allowed with Android - SET(JAR_JNI_ROOT_PATH ${PROJECT_SOURCE_DIR}/package/cross-compiled/android) - else() - SET(JAR_JNI_ROOT_PATH ${PROJECT_SOURCE_DIR}/package/cross-compiled/${CMAKE_CROSSCOMPILING_TARGET_LC}) - endif() - else() - SET(JAR_JNI_ROOT_PATH ${PROJECT_SOURCE_DIR}/package) - endif() - else() - # when not preparing a distribution, just put the jar into the libs - SET(JAR_JNI_ROOT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) - endif() - - ADD_CUSTOM_TARGET(java - COMMAND ${ANT_EXECUTABLE} - -Dlib.dir=${JAR_JNI_ROOT_PATH} - -Dsrc.dir=${PROJECT_SOURCE_DIR} - -Dbuild.dir=${PROJECT_BINARY_DIR} - -Dbuild.type=${CMAKE_BUILD_TYPE} - -Dexclude.debug=${JAR_EXCLUDE_DEBUG} - -Dexclude.jni=${JAR_EXCLUDE_JNI} - -f build-java.xml - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/contrib/java - COMMENT "Creating the jar ...") - - set_target_properties(java PROPERTIES FOLDER "Bindings") -else() - message(STATUS "Could not find ant binary - will not build jars") -endif() - -set(USCXML_LANGUAGE_BINDINGS ${USCXML_LANGUAGE_BINDINGS} PARENT_SCOPE) diff --git a/src/bindings/swig/java/org/uscxml/InterpreterException.java b/src/bindings/swig/java/org/uscxml/InterpreterException.java deleted file mode 100644 index b089566..0000000 --- a/src/bindings/swig/java/org/uscxml/InterpreterException.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.uscxml; - -public class InterpreterException extends Exception { - private static final long serialVersionUID = -3534919496547591015L; - - public InterpreterException(String msg) { - super(msg); - } -} diff --git a/src/bindings/swig/java/uscxml.i b/src/bindings/swig/java/uscxml.i deleted file mode 100644 index 23f6401..0000000 --- a/src/bindings/swig/java/uscxml.i +++ /dev/null @@ -1,448 +0,0 @@ -%module(directors="1", allprotected="1") uscxmlNativeJava - -// provide a macro for the header files -#define SWIGIMPORTED 1 - -%include -%include -%include -%include -%include "../stl_set.i" -%include "../stl_list.i" - -%include - -// these are needed at least for the templates to work -typedef uscxml::Blob Blob; -typedef uscxml::Data Data; -typedef uscxml::Event Event; -typedef uscxml::InvokeRequest InvokeRequest; -typedef uscxml::SendRequest SendRequest; -typedef uscxml::Invoker Invoker; -typedef uscxml::IOProcessor IOProcessor; -typedef uscxml::DataModel DataModel; -typedef uscxml::DataModelExtension DataModelExtension; -typedef uscxml::ExecutableContent ExecutableContent; -typedef uscxml::InvokerImpl InvokerImpl; -typedef uscxml::IOProcessorImpl IOProcessorImpl; -typedef uscxml::DataModelImpl DataModelImpl; -typedef uscxml::ExecutableContentImpl ExecutableContentImpl; -typedef uscxml::InterpreterIssue InterpreterIssue; - -%feature("director") uscxml::WrappedInvoker; -%feature("director") uscxml::WrappedDataModel; -%feature("director") uscxml::WrappedDataModelExtension; -%feature("director") uscxml::WrappedIOProcessor; -%feature("director") uscxml::WrappedExecutableContent; -%feature("director") uscxml::WrappedInterpreterMonitor; - -// disable warning related to unknown base class -#pragma SWIG nowarn=401 -// do not warn when we override symbols via extend -#pragma SWIG nowarn=302 -// do not warn when ignoring overrided method -#pragma SWIG nowarn=516 - -%javaconst(1); - -%rename(equals) operator==; // signature is wrong, still useful -%rename(isValid) operator bool; - -//************************************************** -// This ends up in the generated wrapper code -//************************************************** - -%{ - -#include "../../../uscxml/Message.h" -#include "../../../uscxml/Factory.h" -#include "../../../uscxml/Interpreter.h" -#include "../../../uscxml/concurrency/BlockingQueue.h" -#include "../../../uscxml/server/HTTPServer.h" -//#include "../../../uscxml/debug/DebuggerServlet.h" - -#include "../wrapped/WrappedInvoker.h" -#include "../wrapped/WrappedDataModel.h" -#include "../wrapped/WrappedExecutableContent.h" -#include "../wrapped/WrappedIOProcessor.h" -#include "../wrapped/WrappedInterpreterMonitor.h" - -using namespace uscxml; -using namespace Arabica::DOM; - -// the wrapped* C++ classes get rid of DOM nodes and provide more easily wrapped base classes -#include "../wrapped/WrappedInvoker.cpp" -#include "../wrapped/WrappedDataModel.cpp" -#include "../wrapped/WrappedExecutableContent.cpp" -#include "../wrapped/WrappedIOProcessor.cpp" -#include "../wrapped/WrappedInterpreterMonitor.cpp" - -%} - -%define WRAP_THROW_EXCEPTION( MATCH ) -%javaexception("org.uscxml.InterpreterException") MATCH { - try { - $action - } - catch ( uscxml::Event& e ) { - jclass eclass = jenv->FindClass("org/uscxml/InterpreterException"); - if ( eclass ) { - std::stringstream ss; - ss << std::endl << e; - jenv->ThrowNew( eclass, ss.str().c_str() ); - } - } -} -%enddef - -WRAP_THROW_EXCEPTION(uscxml::Interpreter::fromXML); -WRAP_THROW_EXCEPTION(uscxml::Interpreter::fromURL); -WRAP_THROW_EXCEPTION(uscxml::Interpreter::step); -WRAP_THROW_EXCEPTION(uscxml::Interpreter::interpret); - - -%define WRAP_HASHCODE( CLASSNAME ) -%extend CLASSNAME { - virtual int hashCode() { -/* std::cout << "Calc hashcode as " << (int)(size_t)self->getImpl().get() << std::endl << std::flush;*/ - return (int)(size_t)self->getImpl().get(); - } -}; -%enddef - -%define WRAP_TO_STRING( CLASSNAME ) -%extend CLASSNAME { - virtual std::string toString() { - std::stringstream ss; - ss << *self; - return ss.str(); - } -}; -%enddef - -WRAP_TO_STRING(uscxml::Event); -WRAP_TO_STRING(uscxml::Data); -WRAP_TO_STRING(uscxml::SendRequest); -WRAP_TO_STRING(uscxml::InvokeRequest); -WRAP_TO_STRING(uscxml::InterpreterIssue); - -WRAP_HASHCODE(uscxml::Interpreter); - -%include "../uscxml_ignores.i" - -#if 0 -// see http://swig.org/Doc2.0/Java.html#Java_date_marshalling -%define BEAUTIFY_NATIVE( MATCH, WRAPPER, NATIVE ) - -%rename WRAPPER NATIVE; - -%typemap(jstype) const MATCH & "WRAPPER" -%typemap(jstype) MATCH "WRAPPER" - -%typemap(javain, - pre=" NATIVE temp$javainput = $javainput.toNative();", - pgcppname="temp$javainput") const MATCH & - "$javaclassname.getCPtr(temp$javainput)" - - %typemap(javain, - pre=" NATIVE temp$javainput = $javainput.toNative();", - pgcppname="temp$javainput") MATCH - "$javaclassname.getCPtr(temp$javainput)" - -%typemap(javaout) const MATCH & { - NATIVE nativeData = new NATIVE($jnicall, $owner); - return new WRAPPER(nativeData); -} - -%typemap(javaout) MATCH { - NATIVE nativeData = new NATIVE($jnicall, $owner); - return new WRAPPER(nativeData); -} - -%typemap(javadirectorout) MATCH "NATIVE.getCPtr($javacall.toNative())" - -%typemap(javadirectorin) MATCH "WRAPPER.fromNative(new NATIVE($jniinput, false))"; -%typemap(javadirectorin) const MATCH & "WRAPPER.fromNative(new NATIVE($jniinput, false))"; - -%typemap(directorin,descriptor="L/org/uscxml/"##"WRAPPER;") const MATCH & "*(MATCH **)&$input = (MATCH *) &$1;" - -%typemap(directorout) MATCH ($&1_type argp) -%{ argp = *($&1_ltype*)&$input; - if (!argp) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Unexpected null return for type $1_type"); - return $null; - } - $result = *argp; %} - -%enddef - -/* -// not used as it will not work for directors :( -BEAUTIFY_NATIVE(uscxml::Data, Data, DataNative); -BEAUTIFY_NATIVE(uscxml::Event, Event, EventNative); -BEAUTIFY_NATIVE(uscxml::SendRequest, SendRequest, SendRequestNative); -BEAUTIFY_NATIVE(uscxml::InvokeRequest, InvokeRequest, InvokeRequestNative); -*/ -#endif - -// bytearray for Blob::data -// see: http://stackoverflow.com/questions/9934059/swig-technique-to-wrap-unsigned-binary-data - -%apply (char *STRING, size_t LENGTH) { (const char* data, size_t size) }; - -%typemap(jni) char* getData "jbyteArray" -%typemap(jtype) char* getData "byte[]" -%typemap(jstype) char* getData "byte[]" -%typemap(javaout) char* getData { - return $jnicall; -} - -%typemap(out) char* getData { - $result = JCALL1(NewByteArray, jenv, ((uscxml::Blob const *)arg1)->getSize()); - JCALL4(SetByteArrayRegion, jenv, $result, 0, ((uscxml::Blob const *)arg1)->getSize(), (jbyte *)$1); -} - -//*********************************************** -// Beautify important classes -//*********************************************** - -%javamethodmodifiers uscxml::Event::getParamMap() "private"; -%javamethodmodifiers uscxml::Event::getParamMapKeys() "private"; -%javamethodmodifiers uscxml::Event::setParamMap(const std::map >&) "private"; -%javamethodmodifiers uscxml::Event::getNameListKeys() "private"; -%javamethodmodifiers uscxml::Interpreter::getIOProcessorKeys() "private"; -%javamethodmodifiers uscxml::Interpreter::getInvokerKeys() "private"; -%javamethodmodifiers uscxml::Interpreter::getInvokers() "private"; -%javamethodmodifiers uscxml::Interpreter::getIOProcessors() "private"; -%javamethodmodifiers uscxml::Data::getCompoundKeys() "private"; - -%javamethodmodifiers uscxml::Blob::setData(const char* data, size_t length) "private"; -%javamethodmodifiers uscxml::Blob::setMimeType(const std::string& mimeType) "private"; - -%include "../uscxml_beautify.i" - - -%typemap(javaimports) uscxml::Interpreter %{ -import java.util.Map; -import java.util.HashMap; -import java.util.List; -import java.util.LinkedList; -import java.net.URL; -%} - -%typemap(javacode) uscxml::Interpreter %{ - public static Interpreter fromURL(URL uri) throws org.uscxml.InterpreterException { - return Interpreter.fromURL(uri.toString()); - } - - public Map getIOProcessors() { - Map ioProcs = new HashMap(); - StringVector keys = getIOProcessorKeys(); - IOProcMap ioProcMap = getIOProcessorsNative(); - for (size_t i = 0; i < keys.size(); i++) { - ioProcs.put(keys.get(i), ioProcMap.get(keys.get(i))); - } - return ioProcs; - } - - public Map getInvokers() { - Map invokers = new HashMap(); - StringVector keys = getInvokerKeys(); - InvokerMap invokerMap = getInvokersNative(); - for (size_t i = 0; i < keys.size(); i++) { - invokers.put(keys.get(i), invokerMap.get(keys.get(i))); - } - return invokers; - } - - @Override - public boolean equals(Object other) { - if (other instanceof Interpreter) { - return equals((Interpreter)other); - } - return hashCode() == other.hashCode(); - } -%} - -%rename(getCompoundNative) uscxml::Data::getCompound(); -%rename(getArrayNative) uscxml::Data::getArray(); -%rename(setCompoundNative) uscxml::Data::setCompound(const std::map&); -%rename(setArrayNative) uscxml::Data::setArray(const std::list&); -%javamethodmodifiers uscxml::Data::getCompound() "private"; -%javamethodmodifiers uscxml::Data::getArray() "private"; -%javamethodmodifiers uscxml::Data::setCompound(const std::map&) "private"; -%javamethodmodifiers uscxml::Data::setArray(const std::list&) "private"; -%javamethodmodifiers uscxml::Data::getCompoundKeys() "private"; - -%typemap(javaimports) uscxml::Data %{ -import java.util.Map; -import java.util.HashMap; -import java.util.List; -import java.util.LinkedList; -%} - -%typemap(javacode) uscxml::Data %{ - public Data(byte[] data, String mimeType) { - this(uscxmlNativeJavaJNI.new_Data__SWIG_0(), true); - setBinary(new Blob(data, mimeType)); - } - - public Data(Map compound) { - this(uscxmlNativeJavaJNI.new_Data__SWIG_0(), true); - setCompound(compound); - } - - public Data(List array) { - this(uscxmlNativeJavaJNI.new_Data__SWIG_0(), true); - setArray(array); - } - - public Map getCompound() { - Map compound = new HashMap(); - DataMap dataMap = getCompoundNative(); - StringVector dataMapKeys = getCompoundKeys(); - for (size_t i = 0; i < dataMapKeys.size(); i++) { - compound.put(dataMapKeys.get(i), dataMap.get(dataMapKeys.get(i))); - } - return compound; - } - - public void setCompound(Map compound) { - DataMap dataMap = new DataMap(); - for (String key : compound.keySet()) { - dataMap.set(key, compound.get(key)); - } - setCompoundNative(dataMap); - } - - public List getArray() { - List array = new LinkedList(); - DataList dataList = getArrayNative(); - for (size_t i = 0; i < dataList.size(); i++) { - array.add(dataList.get(i)); - } - return array; - } - - public void setArray(List array) { - DataList dataList = new DataList(); - for (Data data : array) { - dataList.add(data); - } - setArrayNative(dataList); - } - -%} - -%rename(getNameListNative) uscxml::Event::getNameList(); -%rename(getParamsNative) uscxml::Event::getParams(); -%rename(setNameListNative) uscxml::Event::setNameList(const std::map&); -%rename(setParamsNative) uscxml::Event::setParams(const std::multimap&); -%javamethodmodifiers uscxml::Event::getNameList() "private"; -%javamethodmodifiers uscxml::Event::getNameListKeys() "private"; -%javamethodmodifiers uscxml::Event::getParams() "private"; -%javamethodmodifiers uscxml::Event::setNameList(const std::map&) "private"; -%javamethodmodifiers uscxml::Event::setParams(const std::multimap&) "private"; - -%typemap(javaimports) uscxml::Event %{ -import java.util.Map; -import java.util.HashMap; -import java.util.List; -import java.util.LinkedList; -%} - -%typemap(javacode) uscxml::Event %{ - public Map> getParams() { - Map> params = new HashMap>(); - ParamMap paramMap = getParamMap(); - StringVector paramMapKeys = getParamMapKeys(); - - for (size_t i = 0; i < paramMapKeys.size(); i++) { - String key = paramMapKeys.get(i); - DataList dataList = paramMap.get(key); - - for (size_t j = 0; j < dataList.size(); j++) { - Data data = dataList.get(j); - if (!params.containsKey(key)) - params.put(key, new LinkedList()); - params.get(key).add(data); - } - } - return params; - } - - public void setParams(Map> params) { - ParamMap paramMap = new ParamMap(); - for (String key : params.keySet()) { - DataList datalist = new DataList(); - for (Data data : params.get(key)) { - datalist.add(data); - } - paramMap.set(key, datalist); - } - setParamMap(paramMap); - } - - public Map getNameList() { - Map namelist = new HashMap(); - StringVector nameMapKeys = getNameListKeys(); - DataMap nameMap = getNameListNative(); - - for (size_t i = 0; i < nameMapKeys.size(); i++) { - namelist.put(nameMapKeys.get(i), nameMap.get(nameMapKeys.get(i))); - } - return namelist; - } - - public void setNameList(Map namelist) { - DataMap nameListMap = new DataMap(); - for (String key : namelist.keySet()) { - nameListMap.set(key, namelist.get(key)); - } - setNameListNative(nameListMap); - } -%} - - -//*********************************************** -// Parse the header file to generate wrappers -//*********************************************** - -%include "../../../uscxml/Common.h" -%include "../../../uscxml/Factory.h" -%include "../../../uscxml/Message.h" -%include "../../../uscxml/Interpreter.h" -%include "../../../uscxml/concurrency/BlockingQueue.h" -%include "../../../uscxml/server/HTTPServer.h" -//%include "../../../uscxml/debug/DebuggerServlet.h" -%include "../../../uscxml/debug/InterpreterIssue.h" - -%include "../../../uscxml/messages/Blob.h" -%include "../../../uscxml/messages/Data.h" -%include "../../../uscxml/messages/Event.h" -%include "../../../uscxml/messages/InvokeRequest.h" -%include "../../../uscxml/messages/SendRequest.h" - -%include "../../../uscxml/plugins/DataModel.h" -%include "../../../uscxml/plugins/EventHandler.h" -%include "../../../uscxml/plugins/ExecutableContent.h" -%include "../../../uscxml/plugins/Invoker.h" -%include "../../../uscxml/plugins/IOProcessor.h" - -%include "../wrapped/WrappedInvoker.h" -%include "../wrapped/WrappedDataModel.h" -%include "../wrapped/WrappedExecutableContent.h" -%include "../wrapped/WrappedIOProcessor.h" -%include "../wrapped/WrappedInterpreterMonitor.h" - - -%template(IssueList) std::list; -%template(DataList) std::list; -%template(DataMap) std::map; -%template(StringSet) std::set; -%template(StringVector) std::vector; -%template(StringList) std::list; -%template(ParamMap) std::map >; -%template(IOProcMap) std::map; -%template(InvokerMap) std::map; -%template(ParentQueue) uscxml::concurrency::BlockingQueue; diff --git a/src/bindings/swig/msvc/inttypes.h b/src/bindings/swig/msvc/inttypes.h deleted file mode 100644 index eac641e..0000000 --- a/src/bindings/swig/msvc/inttypes.h +++ /dev/null @@ -1,304 +0,0 @@ -// ISO C9x compliant inttypes.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// -// Copyright (c) 2006 Alexander Chemeris -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. The name of the author may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -#ifndef _MSC_INTTYPES_H_ // [ -#define _MSC_INTTYPES_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#include "stdint.h" - -// 7.8 Format conversion of integer types - -typedef struct { - intmax_t quot; - intmax_t rem; -} imaxdiv_t; - -// 7.8.1 Macros for format specifiers - -#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198 - -// The fprintf macros for signed integers are: -#define PRId8 "d" -#define PRIi8 "i" -#define PRIdLEAST8 "d" -#define PRIiLEAST8 "i" -#define PRIdFAST8 "d" -#define PRIiFAST8 "i" - -#define PRId16 "hd" -#define PRIi16 "hi" -#define PRIdLEAST16 "hd" -#define PRIiLEAST16 "hi" -#define PRIdFAST16 "hd" -#define PRIiFAST16 "hi" - -#define PRId32 "I32d" -#define PRIi32 "I32i" -#define PRIdLEAST32 "I32d" -#define PRIiLEAST32 "I32i" -#define PRIdFAST32 "I32d" -#define PRIiFAST32 "I32i" - -#define PRId64 "I64d" -#define PRIi64 "I64i" -#define PRIdLEAST64 "I64d" -#define PRIiLEAST64 "I64i" -#define PRIdFAST64 "I64d" -#define PRIiFAST64 "I64i" - -#define PRIdMAX "I64d" -#define PRIiMAX "I64i" - -#define PRIdPTR "Id" -#define PRIiPTR "Ii" - -// The fprintf macros for unsigned integers are: -#define PRIo8 "o" -#define PRIu8 "u" -#define PRIx8 "x" -#define PRIX8 "X" -#define PRIoLEAST8 "o" -#define PRIuLEAST8 "u" -#define PRIxLEAST8 "x" -#define PRIXLEAST8 "X" -#define PRIoFAST8 "o" -#define PRIuFAST8 "u" -#define PRIxFAST8 "x" -#define PRIXFAST8 "X" - -#define PRIo16 "ho" -#define PRIu16 "hu" -#define PRIx16 "hx" -#define PRIX16 "hX" -#define PRIoLEAST16 "ho" -#define PRIuLEAST16 "hu" -#define PRIxLEAST16 "hx" -#define PRIXLEAST16 "hX" -#define PRIoFAST16 "ho" -#define PRIuFAST16 "hu" -#define PRIxFAST16 "hx" -#define PRIXFAST16 "hX" - -#define PRIo32 "I32o" -#define PRIu32 "I32u" -#define PRIx32 "I32x" -#define PRIX32 "I32X" -#define PRIoLEAST32 "I32o" -#define PRIuLEAST32 "I32u" -#define PRIxLEAST32 "I32x" -#define PRIXLEAST32 "I32X" -#define PRIoFAST32 "I32o" -#define PRIuFAST32 "I32u" -#define PRIxFAST32 "I32x" -#define PRIXFAST32 "I32X" - -#define PRIo64 "I64o" -#define PRIu64 "I64u" -#define PRIx64 "I64x" -#define PRIX64 "I64X" -#define PRIoLEAST64 "I64o" -#define PRIuLEAST64 "I64u" -#define PRIxLEAST64 "I64x" -#define PRIXLEAST64 "I64X" -#define PRIoFAST64 "I64o" -#define PRIuFAST64 "I64u" -#define PRIxFAST64 "I64x" -#define PRIXFAST64 "I64X" - -#define PRIoMAX "I64o" -#define PRIuMAX "I64u" -#define PRIxMAX "I64x" -#define PRIXMAX "I64X" - -#define PRIoPTR "Io" -#define PRIuPTR "Iu" -#define PRIxPTR "Ix" -#define PRIXPTR "IX" - -// The fscanf macros for signed integers are: -#define SCNd8 "d" -#define SCNi8 "i" -#define SCNdLEAST8 "d" -#define SCNiLEAST8 "i" -#define SCNdFAST8 "d" -#define SCNiFAST8 "i" - -#define SCNd16 "hd" -#define SCNi16 "hi" -#define SCNdLEAST16 "hd" -#define SCNiLEAST16 "hi" -#define SCNdFAST16 "hd" -#define SCNiFAST16 "hi" - -#define SCNd32 "ld" -#define SCNi32 "li" -#define SCNdLEAST32 "ld" -#define SCNiLEAST32 "li" -#define SCNdFAST32 "ld" -#define SCNiFAST32 "li" - -#define SCNd64 "I64d" -#define SCNi64 "I64i" -#define SCNdLEAST64 "I64d" -#define SCNiLEAST64 "I64i" -#define SCNdFAST64 "I64d" -#define SCNiFAST64 "I64i" - -#define SCNdMAX "I64d" -#define SCNiMAX "I64i" - -#ifdef _WIN64 // [ -# define SCNdPTR "I64d" -# define SCNiPTR "I64i" -#else // _WIN64 ][ -# define SCNdPTR "ld" -# define SCNiPTR "li" -#endif // _WIN64 ] - -// The fscanf macros for unsigned integers are: -#define SCNo8 "o" -#define SCNu8 "u" -#define SCNx8 "x" -#define SCNX8 "X" -#define SCNoLEAST8 "o" -#define SCNuLEAST8 "u" -#define SCNxLEAST8 "x" -#define SCNXLEAST8 "X" -#define SCNoFAST8 "o" -#define SCNuFAST8 "u" -#define SCNxFAST8 "x" -#define SCNXFAST8 "X" - -#define SCNo16 "ho" -#define SCNu16 "hu" -#define SCNx16 "hx" -#define SCNX16 "hX" -#define SCNoLEAST16 "ho" -#define SCNuLEAST16 "hu" -#define SCNxLEAST16 "hx" -#define SCNXLEAST16 "hX" -#define SCNoFAST16 "ho" -#define SCNuFAST16 "hu" -#define SCNxFAST16 "hx" -#define SCNXFAST16 "hX" - -#define SCNo32 "lo" -#define SCNu32 "lu" -#define SCNx32 "lx" -#define SCNX32 "lX" -#define SCNoLEAST32 "lo" -#define SCNuLEAST32 "lu" -#define SCNxLEAST32 "lx" -#define SCNXLEAST32 "lX" -#define SCNoFAST32 "lo" -#define SCNuFAST32 "lu" -#define SCNxFAST32 "lx" -#define SCNXFAST32 "lX" - -#define SCNo64 "I64o" -#define SCNu64 "I64u" -#define SCNx64 "I64x" -#define SCNX64 "I64X" -#define SCNoLEAST64 "I64o" -#define SCNuLEAST64 "I64u" -#define SCNxLEAST64 "I64x" -#define SCNXLEAST64 "I64X" -#define SCNoFAST64 "I64o" -#define SCNuFAST64 "I64u" -#define SCNxFAST64 "I64x" -#define SCNXFAST64 "I64X" - -#define SCNoMAX "I64o" -#define SCNuMAX "I64u" -#define SCNxMAX "I64x" -#define SCNXMAX "I64X" - -#ifdef _WIN64 // [ -# define SCNoPTR "I64o" -# define SCNuPTR "I64u" -# define SCNxPTR "I64x" -# define SCNXPTR "I64X" -#else // _WIN64 ][ -# define SCNoPTR "lo" -# define SCNuPTR "lu" -# define SCNxPTR "lx" -# define SCNXPTR "lX" -#endif // _WIN64 ] - -#endif // __STDC_FORMAT_MACROS ] - -// 7.8.2 Functions for greatest-width integer types - -// 7.8.2.1 The imaxabs function -#define imaxabs _abs64 - -// 7.8.2.2 The imaxdiv function - -// This is modified version of div() function from Microsoft's div.c found -// in %MSVC.NET%\crt\src\div.c -#ifdef STATIC_IMAXDIV // [ -static -#else // STATIC_IMAXDIV ][ -_inline -#endif // STATIC_IMAXDIV ] -imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) { - imaxdiv_t result; - - result.quot = numer / denom; - result.rem = numer % denom; - - if (numer < 0 && result.rem > 0) { - // did division wrong; must fix up - ++result.quot; - result.rem -= denom; - } - - return result; -} - -// 7.8.2.3 The strtoimax and strtoumax functions -#define strtoimax _strtoi64 -#define strtoumax _strtoui64 - -// 7.8.2.4 The wcstoimax and wcstoumax functions -#define wcstoimax _wcstoi64 -#define wcstoumax _wcstoui64 - - -#endif // _MSC_INTTYPES_H_ ] \ No newline at end of file diff --git a/src/bindings/swig/php/CMakeLists.txt b/src/bindings/swig/php/CMakeLists.txt deleted file mode 100644 index 802f3a2..0000000 --- a/src/bindings/swig/php/CMakeLists.txt +++ /dev/null @@ -1,100 +0,0 @@ -# generate PHP module - -find_package(PHP5) -if(PHP5_FOUND) - include_directories(${PHP5_INCLUDE_PATH}) -else() - message(STATUS "No PHP5 libraries found - not building php module") - return() -endif() - -# copied from cmake's FindPHP4.cmake and adapted -if(APPLE) - # this is a hack for now - set(PHP_MODULE_CXX_FLAGS "${CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS} -Wl") - foreach(symbol - __efree - __emalloc - __estrdup - __estrndup - __object_init - __object_init_ex - __zend_get_parameters_array_ex - __zend_list_find - __zval_copy_ctor - __zval_copy_ctor_func - _add_property_zval_ex - _alloc_globals - _compiler_globals - _convert_to_double - _convert_to_long - _convert_to_boolean - __convert_to_string - _gc_remove_zval_from_buffer - _call_user_function - _php_sprintf - _executor_globals - _zend_get_constant - _zend_lookup_class - _zend_register_long_constant - _zval_is_true - _zend_error - _zend_hash_find - __zend_hash_add_or_update - _zend_register_internal_class_ex - _zend_register_list_destructors_ex - _zend_register_resource - _zend_rsrc_list_get_rsrc_type - _zend_wrong_param_count - _zend_throw_exception - _zval_used_for_init - ) - set(PHP_MODULE_CXX_FLAGS - "${PHP_MODULE_CXX_FLAGS},-U,${symbol}") - endforeach() -endif() - -#message(FATAL_ERROR "PHP_LDFLAGS: ${PHP_LDFLAGS}") - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -include_directories(${PHP_INCLUDE_DIRS}) - -SET(CMAKE_SWIG_FLAGS "") - -# we need ; to produce a space with the package .. weird -SET_SOURCE_FILES_PROPERTIES(uscxml.i PROPERTIES CPLUSPLUS ON) - -SWIG_ADD_MODULE(uscxmlNativePHP php5 uscxml.i) -foreach(PHP_LIBRARY ${PHP_LIBRARIES}) -# SWIG_LINK_LIBRARIES(uscxmlNativePHP ${PHP_LIBRARY}) -endforeach() -SWIG_LINK_LIBRARIES(uscxmlNativePHP uscxml) - -if (APPLE) - set_target_properties(uscxmlNativePHP PROPERTIES LINK_FLAGS ${PHP_MODULE_CXX_FLAGS}) -endif() - -set(PHP_COMPILE_FLAGS "-DSWIG") - -if (PHP_ZTS_ENABLED) - # we are only building php bindings for unices anyhow - set(PHP_COMPILE_FLAGS "${PHP_COMPILE_FLAGS} -DZTS") - set(PHP_COMPILE_FLAGS "${PHP_COMPILE_FLAGS} -DPTHREADS") -endif() -if (PHP_DEBUG_ENABLED) - set(PHP_COMPILE_FLAGS "${PHP_COMPILE_FLAGS} -DZEND_DEBUG") -endif() - -ADD_CUSTOM_COMMAND( - TARGET uscxmlNativePHP - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_BINARY_DIR}/uscxmlNativePHP.php - ${PROJECT_SOURCE_DIR}/src/bindings/swig/php/uscxmlNativePHP.php -) - -set_target_properties(uscxmlNativePHP PROPERTIES COMPILE_FLAGS ${PHP_COMPILE_FLAGS}) -set_target_properties(uscxmlNativePHP PROPERTIES FOLDER "Bindings") - -set(USCXML_LANGUAGE_BINDINGS "php ${USCXML_LANGUAGE_BINDINGS}") -set(USCXML_LANGUAGE_BINDINGS ${USCXML_LANGUAGE_BINDINGS} PARENT_SCOPE) diff --git a/src/bindings/swig/php/test.php b/src/bindings/swig/php/test.php deleted file mode 100644 index 739c6a1..0000000 --- a/src/bindings/swig/php/test.php +++ /dev/null @@ -1,85 +0,0 @@ -addMonitor($monitor); -$interpreter->interpret(); - -// interleave interpreter execution with this thread -$interpreter = Interpreter::fromURL('https://raw.githubusercontent.com/tklab-tud/uscxml/master/test/uscxml/test-invoked.scxml'); -$parentQueue = new ParentQueue(); -$interpreter->setParentQueue($parentQueue); - -while($interpreter->step() > 0) { - $event = $parentQueue->pop(); - print("Name: " . $event->getName() . "\n"); - print("Type: " . $event->getType() . "\n"); - print("Origin: " . $event->getOrigin() . "\n"); - print("OriginType: " . $event->getOriginType() . "\n"); - print("Content " . strlen($event->getContent()) . " bytes: \n'" . $event->getContent() . "'\n"); - - $namelist = $event->getNameList(); - print("Namelist ".$namelist->size()." elements: \n"); - $keys = $event->getNameListKeys(); - for ($i = 0; $i < $keys->size(); $i++) { - print($keys->get($i) . "\t" . Data::toJSON($namelist->get($keys->get($i))) . "\n"); - } - - $params = $event->getParamMap(); - print("Params ". $params->size() ." elements: \n"); - $keys = $event->getParamMapKeys(); - for ($i = 0; $i < $keys->size(); $i++) { - print($keys->get($i)."\n"); - $paramList = $params->get($keys->get($i)); - for ($j = 0; $j < $paramList->size(); $j++) { - print("\t" . Data::toJSON($paramList->get($i)) . "\n"); - } - } - -} - -?> \ No newline at end of file diff --git a/src/bindings/swig/php/uscxml.i b/src/bindings/swig/php/uscxml.i deleted file mode 100644 index d737f96..0000000 --- a/src/bindings/swig/php/uscxml.i +++ /dev/null @@ -1,406 +0,0 @@ -%module(directors="1", allprotected="1") uscxmlNativePHP - -// provide a macro for the header files -#define SWIGIMPORTED 1 - -%include -%include -%include -%include -%include "../stl_set.i" -%include "../stl_list.i" - -//%include - -// these are needed at least for the templates to work -typedef uscxml::Blob Blob; -typedef uscxml::Data Data; -typedef uscxml::Event Event; -typedef uscxml::InvokeRequest InvokeRequest; -typedef uscxml::SendRequest SendRequest; -typedef uscxml::Invoker Invoker; -typedef uscxml::IOProcessor IOProcessor; -typedef uscxml::DataModel DataModel; -typedef uscxml::DataModelExtension DataModelExtension; -typedef uscxml::ExecutableContent ExecutableContent; -typedef uscxml::InvokerImpl InvokerImpl; -typedef uscxml::IOProcessorImpl IOProcessorImpl; -typedef uscxml::DataModelImpl DataModelImpl; -typedef uscxml::ExecutableContentImpl ExecutableContentImpl; -typedef uscxml::InterpreterIssue InterpreterIssue; - -%feature("director") uscxml::WrappedInvoker; -%feature("director") uscxml::WrappedDataModel; -%feature("director") uscxml::WrappedDataModelExtension; -%feature("director") uscxml::WrappedIOProcessor; -%feature("director") uscxml::WrappedExecutableContent; -%feature("director") uscxml::WrappedInterpreterMonitor; - -// disable warning related to unknown base class -#pragma SWIG nowarn=401 -// do not warn when we override symbols via extend -#pragma SWIG nowarn=302 -// do not warn when ignoring overrided method -#pragma SWIG nowarn=516 - -//%javaconst(1); - -%rename(equals) operator==; // signature is wrong, still useful -%rename(isValid) operator bool; - -//************************************************** -// This ends up in the generated wrapper code -//************************************************** - -%{ - -#include "../../../uscxml/Message.h" -#include "../../../uscxml/Factory.h" -#include "../../../uscxml/Interpreter.h" -#include "../../../uscxml/concurrency/BlockingQueue.h" -#include "../../../uscxml/server/HTTPServer.h" -//#include "../../../uscxml/debug/DebuggerServlet.h" - -#include "../wrapped/WrappedInvoker.h" -#include "../wrapped/WrappedDataModel.h" -#include "../wrapped/WrappedExecutableContent.h" -#include "../wrapped/WrappedIOProcessor.h" -#include "../wrapped/WrappedInterpreterMonitor.h" - -using namespace uscxml; -using namespace Arabica::DOM; - -// the wrapped* C++ classes get rid of DOM nodes and provide more easily wrapped base classes -#include "../wrapped/WrappedInvoker.cpp" -#include "../wrapped/WrappedDataModel.cpp" -#include "../wrapped/WrappedExecutableContent.cpp" -#include "../wrapped/WrappedIOProcessor.cpp" -#include "../wrapped/WrappedInterpreterMonitor.cpp" - -%} - -%insert("begin") %{ -void*** tsrm_ls; -%} - -#if 0 -%define WRAP_THROW_EXCEPTION( MATCH ) -%javaexception("org.uscxml.InterpreterException") MATCH { - try { - $action - } - catch ( uscxml::Event& e ) { - jclass eclass = jenv->FindClass("org/uscxml/InterpreterException"); - if ( eclass ) { - std::stringstream ss; - ss << std::endl << e; - jenv->ThrowNew( eclass, ss.str().c_str() ); - } - } -} -%enddef - -WRAP_THROW_EXCEPTION(uscxml::Interpreter::fromXML); -WRAP_THROW_EXCEPTION(uscxml::Interpreter::fromURL); -WRAP_THROW_EXCEPTION(uscxml::Interpreter::step); -WRAP_THROW_EXCEPTION(uscxml::Interpreter::interpret); -#endif - -%define WRAP_HASHCODE( CLASSNAME ) -%extend CLASSNAME { - virtual int hashCode() { -/* std::cout << "Calc hashcode as " << (int)(size_t)self->getImpl().get() << std::endl << std::flush;*/ - return (int)(size_t)self->getImpl().get(); - } -}; -%enddef - -%define WRAP_TO_STRING( CLASSNAME ) -%extend CLASSNAME { - virtual std::string toString() { - std::stringstream ss; - ss << *self; - return ss.str(); - } -}; -%enddef - -WRAP_TO_STRING(uscxml::Event); -WRAP_TO_STRING(uscxml::Data); -WRAP_TO_STRING(uscxml::SendRequest); -WRAP_TO_STRING(uscxml::InvokeRequest); -WRAP_TO_STRING(uscxml::InterpreterIssue); - -WRAP_HASHCODE(uscxml::Interpreter); - -%include "../uscxml_ignores.i" - -// bytearray for Blob::data -// see: http://stackoverflow.com/questions/9934059/swig-technique-to-wrap-unsigned-binary-data - -%apply (char *STRING, size_t LENGTH) { (const char* data, size_t size) }; - -#if 0 -%typemap(jni) char* getData "jbyteArray" -%typemap(jtype) char* getData "byte[]" -%typemap(jstype) char* getData "byte[]" -%typemap(javaout) char* getData { - return $jnicall; -} - -%typemap(out) char* getData { - $result = JCALL1(NewByteArray, jenv, ((uscxml::Blob const *)arg1)->getSize()); - JCALL4(SetByteArrayRegion, jenv, $result, 0, ((uscxml::Blob const *)arg1)->getSize(), (jbyte *)$1); -} -#endif - -//*********************************************** -// Beautify important classes -//*********************************************** - -#if 0 -%javamethodmodifiers uscxml::Event::getParamMap() "private"; -%javamethodmodifiers uscxml::Event::getParamMapKeys() "private"; -%javamethodmodifiers uscxml::Event::setParamMap(const std::map >&) "private"; -%javamethodmodifiers uscxml::Event::getNameListKeys() "private"; -%javamethodmodifiers uscxml::Interpreter::getIOProcessorKeys() "private"; -%javamethodmodifiers uscxml::Interpreter::getInvokerKeys() "private"; -%javamethodmodifiers uscxml::Interpreter::getInvokers() "private"; -%javamethodmodifiers uscxml::Interpreter::getIOProcessors() "private"; -%javamethodmodifiers uscxml::Data::getCompoundKeys() "private"; - -%javamethodmodifiers uscxml::Blob::setData(const char* data, size_t length) "private"; -%javamethodmodifiers uscxml::Blob::setMimeType(const std::string& mimeType) "private"; -#endif - -%include "../uscxml_beautify.i" - - -%typemap(javaimports) uscxml::Interpreter %{ -import java.util.Map; -import java.util.HashMap; -import java.util.List; -import java.util.LinkedList; -import java.net.URL; -%} - -%typemap(javacode) uscxml::Interpreter %{ - public static Interpreter fromURL(URL uri) throws org.uscxml.InterpreterException { - return Interpreter.fromURL(uri.toString()); - } - - public Map getIOProcessors() { - Map ioProcs = new HashMap(); - StringVector keys = getIOProcessorKeys(); - IOProcMap ioProcMap = getIOProcessorsNative(); - for (int i = 0; i < keys.size(); i++) { - ioProcs.put(keys.get(i), ioProcMap.get(keys.get(i))); - } - return ioProcs; - } - - public Map getInvokers() { - Map invokers = new HashMap(); - StringVector keys = getInvokerKeys(); - InvokerMap invokerMap = getInvokersNative(); - for (int i = 0; i < keys.size(); i++) { - invokers.put(keys.get(i), invokerMap.get(keys.get(i))); - } - return invokers; - } - - @Override - public boolean equals(Object other) { - if (other instanceof Interpreter) { - return equals((Interpreter)other); - } - return hashCode() == other.hashCode(); - } -%} - -#if 0 -%rename(getCompoundNative) uscxml::Data::getCompound(); -%rename(getArrayNative) uscxml::Data::getArray(); -%rename(setCompoundNative) uscxml::Data::setCompound(const std::map&); -%rename(setArrayNative) uscxml::Data::setArray(const std::list&); -%javamethodmodifiers uscxml::Data::getCompound() "private"; -%javamethodmodifiers uscxml::Data::getArray() "private"; -%javamethodmodifiers uscxml::Data::setCompound(const std::map&) "private"; -%javamethodmodifiers uscxml::Data::setArray(const std::list&) "private"; -%javamethodmodifiers uscxml::Data::getCompoundKeys() "private"; -#endif - -%typemap(javaimports) uscxml::Data %{ -import java.util.Map; -import java.util.HashMap; -import java.util.List; -import java.util.LinkedList; -%} - -%typemap(javacode) uscxml::Data %{ - public Data(byte[] data, String mimeType) { - this(uscxmlNativeJavaJNI.new_Data__SWIG_0(), true); - setBinary(new Blob(data, mimeType)); - } - - public Data(Map compound) { - this(uscxmlNativeJavaJNI.new_Data__SWIG_0(), true); - setCompound(compound); - } - - public Data(List array) { - this(uscxmlNativeJavaJNI.new_Data__SWIG_0(), true); - setArray(array); - } - - public Map getCompound() { - Map compound = new HashMap(); - DataMap dataMap = getCompoundNative(); - StringVector dataMapKeys = getCompoundKeys(); - for (int i = 0; i < dataMapKeys.size(); i++) { - compound.put(dataMapKeys.get(i), dataMap.get(dataMapKeys.get(i))); - } - return compound; - } - - public void setCompound(Map compound) { - DataMap dataMap = new DataMap(); - for (String key : compound.keySet()) { - dataMap.set(key, compound.get(key)); - } - setCompoundNative(dataMap); - } - - public List getArray() { - List array = new LinkedList(); - DataList dataList = getArrayNative(); - for (int i = 0; i < dataList.size(); i++) { - array.add(dataList.get(i)); - } - return array; - } - - public void setArray(List array) { - DataList dataList = new DataList(); - for (Data data : array) { - dataList.add(data); - } - setArrayNative(dataList); - } - -%} - -#if 0 -%rename(getNameListNative) uscxml::Event::getNameList(); -%rename(getParamsNative) uscxml::Event::getParams(); -%rename(setNameListNative) uscxml::Event::setNameList(const std::map&); -%rename(setParamsNative) uscxml::Event::setParams(const std::multimap&); -%javamethodmodifiers uscxml::Event::getNameList() "private"; -%javamethodmodifiers uscxml::Event::getNameListKeys() "private"; -%javamethodmodifiers uscxml::Event::getParams() "private"; -%javamethodmodifiers uscxml::Event::setNameList(const std::map&) "private"; -%javamethodmodifiers uscxml::Event::setParams(const std::multimap&) "private"; -#endif - -%typemap(javaimports) uscxml::Event %{ -import java.util.Map; -import java.util.HashMap; -import java.util.List; -import java.util.LinkedList; -%} - -%typemap(javacode) uscxml::Event %{ - public Map> getParams() { - Map> params = new HashMap>(); - ParamMap paramMap = getParamMap(); - StringVector paramMapKeys = getParamMapKeys(); - - for (int i = 0; i < paramMapKeys.size(); i++) { - String key = paramMapKeys.get(i); - DataList dataList = paramMap.get(key); - - for (int j = 0; j < dataList.size(); j++) { - Data data = dataList.get(j); - if (!params.containsKey(key)) - params.put(key, new LinkedList()); - params.get(key).add(data); - } - } - return params; - } - - public void setParams(Map> params) { - ParamMap paramMap = new ParamMap(); - for (String key : params.keySet()) { - DataList datalist = new DataList(); - for (Data data : params.get(key)) { - datalist.add(data); - } - paramMap.set(key, datalist); - } - setParamMap(paramMap); - } - - public Map getNameList() { - Map namelist = new HashMap(); - StringVector nameMapKeys = getNameListKeys(); - DataMap nameMap = getNameListNative(); - - for (int i = 0; i < nameMapKeys.size(); i++) { - namelist.put(nameMapKeys.get(i), nameMap.get(nameMapKeys.get(i))); - } - return namelist; - } - - public void setNameList(Map namelist) { - DataMap nameListMap = new DataMap(); - for (String key : namelist.keySet()) { - nameListMap.set(key, namelist.get(key)); - } - setNameListNative(nameListMap); - } -%} - - -//*********************************************** -// Parse the header file to generate wrappers -//*********************************************** - -%include "../../../uscxml/Common.h" -%include "../../../uscxml/Factory.h" -%include "../../../uscxml/Message.h" -%include "../../../uscxml/Interpreter.h" -%include "../../../uscxml/concurrency/BlockingQueue.h" -%include "../../../uscxml/server/HTTPServer.h" -//%include "../../../uscxml/debug/DebuggerServlet.h" -%include "../../../uscxml/debug/InterpreterIssue.h" - -%include "../../../uscxml/messages/Blob.h" -%include "../../../uscxml/messages/Data.h" -%include "../../../uscxml/messages/Event.h" -%include "../../../uscxml/messages/InvokeRequest.h" -%include "../../../uscxml/messages/SendRequest.h" - -%include "../../../uscxml/plugins/DataModel.h" -%include "../../../uscxml/plugins/EventHandler.h" -%include "../../../uscxml/plugins/ExecutableContent.h" -%include "../../../uscxml/plugins/Invoker.h" -%include "../../../uscxml/plugins/IOProcessor.h" - -%include "../wrapped/WrappedInvoker.h" -%include "../wrapped/WrappedDataModel.h" -%include "../wrapped/WrappedExecutableContent.h" -%include "../wrapped/WrappedIOProcessor.h" -%include "../wrapped/WrappedInterpreterMonitor.h" - - -%template(IssueList) std::list; -%template(DataList) std::list; -%template(DataMap) std::map; -%template(StringSet) std::set; -%template(StringVector) std::vector; -%template(StringList) std::list; -%template(ParamMap) std::map >; -%template(IOProcMap) std::map; -%template(InvokerMap) std::map; -%template(ParentQueue) uscxml::concurrency::BlockingQueue; diff --git a/src/bindings/swig/php/uscxmlNativePHP.php b/src/bindings/swig/php/uscxmlNativePHP.php deleted file mode 100644 index eac292b..0000000 --- a/src/bindings/swig/php/uscxmlNativePHP.php +++ /dev/null @@ -1,3121 +0,0 @@ -_cPtr,$value); - if ($var === 'rem') return imaxdiv_t_rem_set($this->_cPtr,$value); - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'quot') return imaxdiv_t_quot_get($this->_cPtr); - if ($var === 'rem') return imaxdiv_t_rem_get($this->_cPtr); - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if (function_exists('imaxdiv_t_'.$var.'_get')) return true; - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_imaxdiv_t') { - $this->_cPtr=$res; - return; - } - $this->_cPtr=new_imaxdiv_t(); - } -} - -class Factory { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($parentFactory_or_pluginPath,$parentFactory=null) { - if (is_resource($parentFactory_or_pluginPath) && get_resource_type($parentFactory_or_pluginPath) === '_p_uscxml__Factory') { - $this->_cPtr=$parentFactory_or_pluginPath; - return; - } - switch (func_num_args()) { - case 1: $this->_cPtr=new_Factory($parentFactory_or_pluginPath); break; - default: $this->_cPtr=new_Factory($parentFactory_or_pluginPath,$parentFactory); - } - } - - function registerIOProcessor($ioProcessor) { - Factory_registerIOProcessor($this->_cPtr,$ioProcessor); - } - - function registerDataModel($dataModel) { - Factory_registerDataModel($this->_cPtr,$dataModel); - } - - function registerInvoker($invoker) { - Factory_registerInvoker($this->_cPtr,$invoker); - } - - function registerExecutableContent($executableContent) { - Factory_registerExecutableContent($this->_cPtr,$executableContent); - } - - function hasDataModel($type) { - return Factory_hasDataModel($this->_cPtr,$type); - } - - function hasIOProcessor($type) { - return Factory_hasIOProcessor($this->_cPtr,$type); - } - - function hasInvoker($type) { - return Factory_hasInvoker($this->_cPtr,$type); - } - - function hasExecutableContent($localName,$nameSpace) { - return Factory_hasExecutableContent($this->_cPtr,$localName,$nameSpace); - } - - function listComponents() { - Factory_listComponents($this->_cPtr); - } - - static function getInstance() { - $r=Factory_getInstance(); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Factory($r); - } - return $r; - } - - static function setDefaultPluginPath($path) { - Factory_setDefaultPluginPath($path); - } - - static function getDefaultPluginPath() { - return Factory_getDefaultPluginPath(); - } -} - -class InterpreterOptions { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - $func = 'InterpreterOptions_'.$var.'_set'; - if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value); - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - $func = 'InterpreterOptions_'.$var.'_get'; - if (function_exists($func)) return call_user_func($func,$this->_cPtr); - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if (function_exists('InterpreterOptions_'.$var.'_get')) return true; - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__InterpreterOptions') { - $this->_cPtr=$res; - return; - } - $this->_cPtr=new_InterpreterOptions(); - } - - function isValid() { - return InterpreterOptions_isValid($this->_cPtr); - } - - static function printUsageAndExit($progName) { - InterpreterOptions_printUsageAndExit($progName); - } - - function getCapabilities() { - return InterpreterOptions_getCapabilities($this->_cPtr); - } -} - -class NameSpaceInfo { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__NameSpaceInfo') { - $this->_cPtr=$res; - return; - } - $this->_cPtr=new_NameSpaceInfo(); - } - - function getXMLPrefixForNS($ns) { - return NameSpaceInfo_getXMLPrefixForNS($this->_cPtr,$ns); - } -} - -class Interpreter { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - static function fromXML($xml,$sourceURL) { - $r=Interpreter_fromXML($xml,$sourceURL); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Interpreter($r); - } - return $r; - } - - static function fromURL($URL) { - $r=Interpreter_fromURL($URL); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Interpreter($r); - } - return $r; - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__Interpreter') { - $this->_cPtr=$res; - return; - } - $this->_cPtr=new_Interpreter(); - } - - function isValid() { - return Interpreter_isValid($this->_cPtr); - } - - function equals($other) { - return Interpreter_equals($this->_cPtr,$other); - } - - function writeTo($stream) { - Interpreter_writeTo($this->_cPtr,$stream); - } - - function reset() { - Interpreter_reset($this->_cPtr); - } - - function interpret() { - Interpreter_interpret($this->_cPtr); - } - - function step($waitForMS_or_blocking=null) { - switch (func_num_args()) { - case 0: $r=Interpreter_step($this->_cPtr); break; - default: $r=Interpreter_step($this->_cPtr,$waitForMS_or_blocking); - } - return $r; - } - - function validate() { - $r=Interpreter_validate($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new IssueList($r); - } - return $r; - } - - function getState() { - return Interpreter_getState($this->_cPtr); - } - - function addMonitor($monitor) { - Interpreter_addMonitor($this->_cPtr,$monitor); - } - - function removeMonitor($monitor) { - Interpreter_removeMonitor($this->_cPtr,$monitor); - } - - function setSourceURL($sourceURL) { - Interpreter_setSourceURL($this->_cPtr,$sourceURL); - } - - function getSourceURL() { - return Interpreter_getSourceURL($this->_cPtr); - } - - function getBaseURL($xpathExpr=null) { - switch (func_num_args()) { - case 0: $r=Interpreter_getBaseURL($this->_cPtr); break; - default: $r=Interpreter_getBaseURL($this->_cPtr,$xpathExpr); - } - return $r; - } - - function setNameSpaceInfo($nsInfo) { - Interpreter_setNameSpaceInfo($this->_cPtr,$nsInfo); - } - - function getNameSpaceInfo() { - $r=Interpreter_getNameSpaceInfo($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new NameSpaceInfo($r); - } - return $r; - } - - function getCmdLineOptions() { - $r=Interpreter_getCmdLineOptions($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function getDataModel() { - $r=Interpreter_getDataModel($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new NativeDataModel($r); - } - return $r; - } - - function getIOProcessorsNative() { - $r=Interpreter_getIOProcessorsNative($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new IOProcMap($r); - } - return $r; - } - - function getInvokersNative() { - $r=Interpreter_getInvokersNative($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new InvokerMap($r); - } - return $r; - } - - function addDataModelExtension($ext) { - Interpreter_addDataModelExtension($this->_cPtr,$ext); - } - - function setParentQueue($parentQueue) { - Interpreter_setParentQueue($this->_cPtr,$parentQueue); - } - - function setFactory($factory) { - Interpreter_setFactory($this->_cPtr,$factory); - } - - function getFactory() { - $r=Interpreter_getFactory($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Factory($r); - } - return $r; - } - - function receiveInternal($event) { - Interpreter_receiveInternal($this->_cPtr,$event); - } - - function receive($event,$toFront=false) { - Interpreter_receive($this->_cPtr,$event,$toFront); - } - - function getCurrentEvent() { - $r=Interpreter_getCurrentEvent($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Event($r); - } - return $r; - } - - function isInState($stateId) { - return Interpreter_isInState($this->_cPtr,$stateId); - } - - function setInitalConfiguration($states) { - Interpreter_setInitalConfiguration($this->_cPtr,$states); - } - - function setCapabilities($capabilities) { - Interpreter_setCapabilities($this->_cPtr,$capabilities); - } - - function setName($name) { - Interpreter_setName($this->_cPtr,$name); - } - - function getName() { - return Interpreter_getName($this->_cPtr); - } - - function getSessionId() { - return Interpreter_getSessionId($this->_cPtr); - } - - function hasLegalConfiguration() { - return Interpreter_hasLegalConfiguration($this->_cPtr); - } - - function isLegalConfiguration($config) { - return Interpreter_isLegalConfiguration($this->_cPtr,$config); - } - - function hashCode() { - return Interpreter_hashCode($this->_cPtr); - } - - function addIOProcessor($ioProc) { - Interpreter_addIOProcessor($this->_cPtr,$ioProc); - } - - function setDataModel($dataModel) { - Interpreter_setDataModel($this->_cPtr,$dataModel); - } - - function setInvoker($invokeId,$invoker) { - Interpreter_setInvoker($this->_cPtr,$invokeId,$invoker); - } - - function getBasicConfiguration() { - $r=Interpreter_getBasicConfiguration($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringVector($r); - } - return $r; - } - - function getConfiguration() { - $r=Interpreter_getConfiguration($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringVector($r); - } - return $r; - } - - function getIOProcessorKeys() { - $r=Interpreter_getIOProcessorKeys($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringVector($r); - } - return $r; - } - - function getInvokerKeys() { - $r=Interpreter_getInvokerKeys($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringVector($r); - } - return $r; - } -} - -class NativeInterpreterMonitor { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__InterpreterMonitor') { - $this->_cPtr=$res; - return; - } - $this->_cPtr=new_NativeInterpreterMonitor(); - } - - function beforeProcessingEvent($interpreter,$event) { - NativeInterpreterMonitor_beforeProcessingEvent($this->_cPtr,$interpreter,$event); - } - - function beforeMicroStep($interpreter) { - NativeInterpreterMonitor_beforeMicroStep($this->_cPtr,$interpreter); - } - - function afterMicroStep($interpreter) { - NativeInterpreterMonitor_afterMicroStep($this->_cPtr,$interpreter); - } - - function onStableConfiguration($interpreter) { - NativeInterpreterMonitor_onStableConfiguration($this->_cPtr,$interpreter); - } - - function beforeCompletion($interpreter) { - NativeInterpreterMonitor_beforeCompletion($this->_cPtr,$interpreter); - } - - function afterCompletion($interpreter) { - NativeInterpreterMonitor_afterCompletion($this->_cPtr,$interpreter); - } - - function reportIssue($interpreter,$issue) { - NativeInterpreterMonitor_reportIssue($this->_cPtr,$interpreter,$issue); - } - - function copyToInvokers($copy=null) { - switch (func_num_args()) { - case 0: $r=NativeInterpreterMonitor_copyToInvokers($this->_cPtr); break; - default: $r=NativeInterpreterMonitor_copyToInvokers($this->_cPtr,$copy); - } - return $r; - } -} - -class StateTransitionMonitor extends NativeInterpreterMonitor { - public $_cPtr=null; - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - NativeInterpreterMonitor::__set($var,$value); - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return NativeInterpreterMonitor::__get($var); - } - - function __isset($var) { - if ($var === 'thisown') return true; - return NativeInterpreterMonitor::__isset($var); - } - - function beforeTakingTransition($interpreter,$transition,$moreComing) { - StateTransitionMonitor_beforeTakingTransition($this->_cPtr,$interpreter,$transition,$moreComing); - } - - function onStableConfiguration($interpreter) { - StateTransitionMonitor_onStableConfiguration($this->_cPtr,$interpreter); - } - - function beforeProcessingEvent($interpreter,$event) { - StateTransitionMonitor_beforeProcessingEvent($this->_cPtr,$interpreter,$event); - } - - function beforeExitingState($interpreter,$state,$moreComing) { - StateTransitionMonitor_beforeExitingState($this->_cPtr,$interpreter,$state,$moreComing); - } - - function beforeEnteringState($interpreter,$state,$moreComing) { - StateTransitionMonitor_beforeEnteringState($this->_cPtr,$interpreter,$state,$moreComing); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__StateTransitionMonitor') { - $this->_cPtr=$res; - return; - } - $this->_cPtr=new_StateTransitionMonitor(); - } -} - -class HTTPServer { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - function __construct($h) { - $this->_cPtr=$h; - } - - const HTTPS = 0; - - const HTTP = HTTPServer_HTTP; - - const WebSockets = HTTPServer_WebSockets; - - static function getInstance($port=null,$wsPort=null,$sslConf=null) { - switch (func_num_args()) { - case 0: $r=HTTPServer_getInstance(); break; - case 1: $r=HTTPServer_getInstance($port); break; - default: $r=HTTPServer_getInstance($port,$wsPort,$sslConf); - } - if (!is_resource($r)) return $r; - return new HTTPServer($r); - } - - static function getBaseURL($type=null) { - switch (func_num_args()) { - case 0: $r=HTTPServer_getBaseURL(); break; - default: $r=HTTPServer_getBaseURL($type); - } - return $r; - } - - static function registerServlet($path,$servlet) { - return HTTPServer_registerServlet($path,$servlet); - } - - static function unregisterServlet($servlet) { - HTTPServer_unregisterServlet($servlet); - } -} - -abstract class HTTPServlet { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - function __construct($h) { - $this->_cPtr=$h; - } - - function httpRecvRequest($request) { - return HTTPServlet_httpRecvRequest($this->_cPtr,$request); - } - - function setURL($url) { - HTTPServlet_setURL($this->_cPtr,$url); - } - - function canAdaptPath() { - return HTTPServlet_canAdaptPath($this->_cPtr); - } -} - -abstract class WebSocketServlet { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - function __construct($h) { - $this->_cPtr=$h; - } - - function wsRecvRequest($conn,$frame) { - return WebSocketServlet_wsRecvRequest($this->_cPtr,$conn,$frame); - } - - function setURL($url) { - WebSocketServlet_setURL($this->_cPtr,$url); - } - - function canAdaptPath() { - return WebSocketServlet_canAdaptPath($this->_cPtr); - } -} - -class InterpreterIssue { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - $func = 'InterpreterIssue_'.$var.'_set'; - if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value); - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - $func = 'InterpreterIssue_'.$var.'_get'; - if (function_exists($func)) return call_user_func($func,$this->_cPtr); - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if (function_exists('InterpreterIssue_'.$var.'_get')) return true; - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - const USCXML_ISSUE_FATAL = 0; - - const USCXML_ISSUE_WARNING = InterpreterIssue_USCXML_ISSUE_WARNING; - - const USCXML_ISSUE_INFO = InterpreterIssue_USCXML_ISSUE_INFO; - - function __construct($msg,$node,$severity,$specRef=null) { - if (is_resource($msg) && get_resource_type($msg) === '_p_uscxml__InterpreterIssue') { - $this->_cPtr=$msg; - return; - } - switch (func_num_args()) { - case 3: $this->_cPtr=new_InterpreterIssue($msg,$node,$severity); break; - default: $this->_cPtr=new_InterpreterIssue($msg,$node,$severity,$specRef); - } - } - - function toString() { - return InterpreterIssue_toString($this->_cPtr); - } -} - -class Blob { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($other_or_data=null,$mimeType=null) { - if (is_resource($other_or_data) && get_resource_type($other_or_data) === '_p_uscxml__Blob') { - $this->_cPtr=$other_or_data; - return; - } - switch (func_num_args()) { - case 0: $this->_cPtr=new_Blob(); break; - case 1: $this->_cPtr=new_Blob($other_or_data); break; - default: $this->_cPtr=new_Blob($other_or_data,$mimeType); - } - } - - function isValid() { - return Blob_isValid($this->_cPtr); - } - - function equals($other) { - return Blob_equals($this->_cPtr,$other); - } - - static function fromBase64($base64,$mimeType=null) { - switch (func_num_args()) { - case 1: $r=Blob_fromBase64($base64); break; - default: $r=Blob_fromBase64($base64,$mimeType); - } - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Blob($r); - } - return $r; - } - - function base64() { - return Blob_base64($this->_cPtr); - } - - function md5() { - return Blob_md5($this->_cPtr); - } - - function getData() { - return Blob_getData($this->_cPtr); - } - - function getSize() { - return Blob_getSize($this->_cPtr); - } - - function getMimeType() { - return Blob_getMimeType($this->_cPtr); - } - - function setMimeType($mimeType) { - Blob_setMimeType($this->_cPtr,$mimeType); - } -} - -class Data { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - const VERBATIM = 0; - - const INTERPRETED = Data_INTERPRETED; - - function __construct($atom=null,$type=null) { - if (is_resource($atom) && get_resource_type($atom) === '_p_uscxml__Data') { - $this->_cPtr=$atom; - return; - } - switch (func_num_args()) { - case 0: $this->_cPtr=new_Data(); break; - case 1: $this->_cPtr=new_Data($atom); break; - default: $this->_cPtr=new_Data($atom,$type); - } - } - - function c_empty() { - return Data_c_empty($this->_cPtr); - } - - function merge($other) { - Data_merge($this->_cPtr,$other); - } - - function hasKey($key) { - return Data_hasKey($this->_cPtr,$key); - } - - function at($key) { - $r=Data_at($this->_cPtr,$key); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function item($index) { - $r=Data_item($this->_cPtr,$index); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function put($key_or_index,$data) { - Data_put($this->_cPtr,$key_or_index,$data); - } - - function equals($other) { - return Data_equals($this->_cPtr,$other); - } - - static function fromJSON($jsonString) { - $r=Data_fromJSON($jsonString); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - static function toJSON($data) { - return Data_toJSON($data); - } - - static function fromXML($xmlString) { - $r=Data_fromXML($xmlString); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function toXMLString() { - return Data_toXMLString($this->_cPtr); - } - - function getCompound() { - $r=Data_getCompound($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new DataMap($r); - } - return $r; - } - - function setCompound($compound) { - Data_setCompound($this->_cPtr,$compound); - } - - function getArray() { - $r=Data_getArray($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new DataList($r); - } - return $r; - } - - function setArray($array) { - Data_setArray($this->_cPtr,$array); - } - - function getAtom() { - return Data_getAtom($this->_cPtr); - } - - function setAtom($atom) { - Data_setAtom($this->_cPtr,$atom); - } - - function getBinary() { - $r=Data_getBinary($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Blob($r); - } - return $r; - } - - function setBinary($binary) { - Data_setBinary($this->_cPtr,$binary); - } - - function getType() { - return Data_getType($this->_cPtr); - } - - function setType($type) { - Data_setType($this->_cPtr,$type); - } - - function toString() { - return Data_toString($this->_cPtr); - } - - function getCompoundKeys() { - $r=Data_getCompoundKeys($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringVector($r); - } - return $r; - } - - function getXML() { - return Data_getXML($this->_cPtr); - } - - function setXML($xml) { - Data_setXML($this->_cPtr,$xml); - } -} - -class Event { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - const INTERNAL = 1; - - const EXTERNAL = 2; - - const PLATFORM = 3; - - function __construct($name=null,$type=null) { - if (is_resource($name) && get_resource_type($name) === '_p_uscxml__Event') { - $this->_cPtr=$name; - return; - } - switch (func_num_args()) { - case 0: $this->_cPtr=new_Event(); break; - case 1: $this->_cPtr=new_Event($name); break; - default: $this->_cPtr=new_Event($name,$type); - } - } - - function equals($other) { - return Event_equals($this->_cPtr,$other); - } - - function getName() { - return Event_getName($this->_cPtr); - } - - function setName($name) { - Event_setName($this->_cPtr,$name); - } - - function getEventType() { - return Event_getEventType($this->_cPtr); - } - - function setEventType($type) { - Event_setEventType($this->_cPtr,$type); - } - - function getOrigin() { - return Event_getOrigin($this->_cPtr); - } - - function setOrigin($origin) { - Event_setOrigin($this->_cPtr,$origin); - } - - function getOriginType() { - return Event_getOriginType($this->_cPtr); - } - - function setOriginType($originType) { - Event_setOriginType($this->_cPtr,$originType); - } - - function getDOM() { - return Event_getDOM($this->_cPtr); - } - - function getRaw() { - return Event_getRaw($this->_cPtr); - } - - function setRaw($raw) { - Event_setRaw($this->_cPtr,$raw); - } - - function getContent() { - return Event_getContent($this->_cPtr); - } - - function setContent($content) { - Event_setContent($this->_cPtr,$content); - } - - function getXML() { - return Event_getXML($this->_cPtr); - } - - function setXML($xml) { - Event_setXML($this->_cPtr,$xml); - } - - function getSendId() { - return Event_getSendId($this->_cPtr); - } - - function setSendId($sendId) { - Event_setSendId($this->_cPtr,$sendId); - } - - function getInvokeId() { - return Event_getInvokeId($this->_cPtr); - } - - function setInvokeId($invokeId) { - Event_setInvokeId($this->_cPtr,$invokeId); - } - - function getData() { - $r=Event_getData($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function setData($data) { - Event_setData($this->_cPtr,$data); - } - - static function fromXML($xmlString) { - $r=Event_fromXML($xmlString); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Event($r); - } - return $r; - } - - function toXMLString() { - return Event_toXMLString($this->_cPtr); - } - - function getNameList() { - $r=Event_getNameList($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new DataMap($r); - } - return $r; - } - - function setNameList($nameList) { - Event_setNameList($this->_cPtr,$nameList); - } - - function toString() { - return Event_toString($this->_cPtr); - } - - function getParamMap() { - $r=Event_getParamMap($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new ParamMap($r); - } - return $r; - } - - function getParamMapKeys() { - $r=Event_getParamMapKeys($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringVector($r); - } - return $r; - } - - function setParamMap($paramMap) { - Event_setParamMap($this->_cPtr,$paramMap); - } - - function getNameListKeys() { - $r=Event_getNameListKeys($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringVector($r); - } - return $r; - } -} - -class InvokeRequest extends Event { - public $_cPtr=null; - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - Event::__set($var,$value); - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return Event::__get($var); - } - - function __isset($var) { - if ($var === 'thisown') return true; - return Event::__isset($var); - } - - function __construct($event=null) { - if (is_resource($event) && get_resource_type($event) === '_p_uscxml__InvokeRequest') { - $this->_cPtr=$event; - return; - } - switch (func_num_args()) { - case 0: $this->_cPtr=new_InvokeRequest(); break; - default: $this->_cPtr=new_InvokeRequest($event); - } - } - - function getType() { - return InvokeRequest_getType($this->_cPtr); - } - - function setType($type) { - InvokeRequest_setType($this->_cPtr,$type); - } - - function getSource() { - return InvokeRequest_getSource($this->_cPtr); - } - - function setSource($src) { - InvokeRequest_setSource($this->_cPtr,$src); - } - - function isAutoForwarded() { - return InvokeRequest_isAutoForwarded($this->_cPtr); - } - - function setAutoForwarded($autoForward) { - InvokeRequest_setAutoForwarded($this->_cPtr,$autoForward); - } - - function toXMLString() { - return InvokeRequest_toXMLString($this->_cPtr); - } - - function toString() { - return InvokeRequest_toString($this->_cPtr); - } -} - -class SendRequest extends Event { - public $_cPtr=null; - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - Event::__set($var,$value); - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return Event::__get($var); - } - - function __isset($var) { - if ($var === 'thisown') return true; - return Event::__isset($var); - } - - function __construct($event=null) { - if (is_resource($event) && get_resource_type($event) === '_p_uscxml__SendRequest') { - $this->_cPtr=$event; - return; - } - switch (func_num_args()) { - case 0: $this->_cPtr=new_SendRequest(); break; - default: $this->_cPtr=new_SendRequest($event); - } - } - - function getTarget() { - return SendRequest_getTarget($this->_cPtr); - } - - function setTarget($target) { - SendRequest_setTarget($this->_cPtr,$target); - } - - function getType() { - return SendRequest_getType($this->_cPtr); - } - - function setType($type) { - SendRequest_setType($this->_cPtr,$type); - } - - function getDelayMs() { - return SendRequest_getDelayMs($this->_cPtr); - } - - function setDelayMs($delayMs) { - SendRequest_setDelayMs($this->_cPtr,$delayMs); - } - - function toXMLString() { - return SendRequest_toXMLString($this->_cPtr); - } - - function toString() { - return SendRequest_toString($this->_cPtr); - } -} - -abstract class NativeDataModelExtension { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - function __construct($h) { - $this->_cPtr=$h; - } - - function provides() { - return NativeDataModelExtension_provides($this->_cPtr); - } - - function getValueOf($member) { - $r=NativeDataModelExtension_getValueOf($this->_cPtr,$member); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function setValueOf($member,$data) { - NativeDataModelExtension_setValueOf($this->_cPtr,$member,$data); - } -} - -abstract class DataModelImpl { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - function __construct($h) { - $this->_cPtr=$h; - } - - function getNames() { - $r=DataModelImpl_getNames($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringList($r); - } - return $r; - } - - function validate($location,$schema) { - return DataModelImpl_validate($this->_cPtr,$location,$schema); - } - - function isLocation($expr) { - return DataModelImpl_isLocation($this->_cPtr,$expr); - } - - function isValidSyntax($expr) { - return DataModelImpl_isValidSyntax($this->_cPtr,$expr); - } - - function setEvent($event) { - DataModelImpl_setEvent($this->_cPtr,$event); - } - - function getStringAsData($content) { - $r=DataModelImpl_getStringAsData($this->_cPtr,$content); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function getLength($expr) { - return DataModelImpl_getLength($this->_cPtr,$expr); - } - - function setForeach($item,$array,$index,$iteration) { - DataModelImpl_setForeach($this->_cPtr,$item,$array,$index,$iteration); - } - - function pushContext() { - DataModelImpl_pushContext($this->_cPtr); - } - - function popContext() { - DataModelImpl_popContext($this->_cPtr); - } - - function evalAsString($expr) { - return DataModelImpl_evalAsString($this->_cPtr,$expr); - } - - function evalAsBool($scriptNode_or_expr,$expr=null) { - switch (func_num_args()) { - case 1: $r=DataModelImpl_evalAsBool($this->_cPtr,$scriptNode_or_expr); break; - default: $r=DataModelImpl_evalAsBool($this->_cPtr,$scriptNode_or_expr,$expr); - } - return $r; - } - - function isDeclared($expr) { - return DataModelImpl_isDeclared($this->_cPtr,$expr); - } - - function addExtension($ext) { - DataModelImpl_addExtension($this->_cPtr,$ext); - } - - function andExpressions($arg1) { - return DataModelImpl_andExpressions($this->_cPtr,$arg1); - } -} - -class NativeDataModel { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__DataModel') { - $this->_cPtr=$res; - return; - } - $this->_cPtr=new_NativeDataModel(); - } - - function isValid() { - return NativeDataModel_isValid($this->_cPtr); - } - - function equals($other) { - return NativeDataModel_equals($this->_cPtr,$other); - } - - function getNames() { - $r=NativeDataModel_getNames($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringList($r); - } - return $r; - } - - function validate($location,$schema) { - return NativeDataModel_validate($this->_cPtr,$location,$schema); - } - - function isLocation($expr) { - return NativeDataModel_isLocation($this->_cPtr,$expr); - } - - function isValidSyntax($expr) { - return NativeDataModel_isValidSyntax($this->_cPtr,$expr); - } - - function setEvent($event) { - NativeDataModel_setEvent($this->_cPtr,$event); - } - - function getStringAsData($content) { - $r=NativeDataModel_getStringAsData($this->_cPtr,$content); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function pushContext() { - NativeDataModel_pushContext($this->_cPtr); - } - - function popContext() { - NativeDataModel_popContext($this->_cPtr); - } - - function evalAsString($expr) { - return NativeDataModel_evalAsString($this->_cPtr,$expr); - } - - function evalAsBool($scriptNode,$expr) { - return NativeDataModel_evalAsBool($this->_cPtr,$scriptNode,$expr); - } - - function getLength($expr) { - return NativeDataModel_getLength($this->_cPtr,$expr); - } - - function setForeach($item,$array,$index,$iteration) { - NativeDataModel_setForeach($this->_cPtr,$item,$array,$index,$iteration); - } - - function assign($location,$data) { - NativeDataModel_assign($this->_cPtr,$location,$data); - } - - function init($location,$data) { - NativeDataModel_init($this->_cPtr,$location,$data); - } - - function isDeclared($expr) { - return NativeDataModel_isDeclared($this->_cPtr,$expr); - } - - function andExpressions($expressions) { - return NativeDataModel_andExpressions($this->_cPtr,$expressions); - } - - function addExtension($ext) { - NativeDataModel_addExtension($this->_cPtr,$ext); - } -} - -abstract class EventHandlerImpl { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - function __construct($h) { - $this->_cPtr=$h; - } - - function getNames() { - $r=EventHandlerImpl_getNames($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringList($r); - } - return $r; - } - - function setInvokeId($invokeId) { - EventHandlerImpl_setInvokeId($this->_cPtr,$invokeId); - } - - function setType($type) { - EventHandlerImpl_setType($this->_cPtr,$type); - } - - function getType() { - return EventHandlerImpl_getType($this->_cPtr); - } - - function getDataModelVariables() { - $r=EventHandlerImpl_getDataModelVariables($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function send($req) { - EventHandlerImpl_send($this->_cPtr,$req); - } - - function returnErrorExecution($arg1) { - EventHandlerImpl_returnErrorExecution($this->_cPtr,$arg1); - } - - function returnErrorCommunication($arg1) { - EventHandlerImpl_returnErrorCommunication($this->_cPtr,$arg1); - } - - function returnEvent($event,$internal=false) { - EventHandlerImpl_returnEvent($this->_cPtr,$event,$internal); - } -} - -class EventHandler { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($other=null) { - if (is_resource($other) && get_resource_type($other) === '_p_uscxml__EventHandler') { - $this->_cPtr=$other; - return; - } - switch (func_num_args()) { - case 0: $this->_cPtr=new_EventHandler(); break; - default: $this->_cPtr=new_EventHandler($other); - } - } - - function getNames() { - $r=EventHandler_getNames($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringList($r); - } - return $r; - } - - function getDataModelVariables() { - $r=EventHandler_getDataModelVariables($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function send($req) { - EventHandler_send($this->_cPtr,$req); - } - - function setInvokeId($invokeId) { - EventHandler_setInvokeId($this->_cPtr,$invokeId); - } - - function setType($type) { - EventHandler_setType($this->_cPtr,$type); - } - - function getType() { - return EventHandler_getType($this->_cPtr); - } -} - -abstract class ExecutableContentImpl { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - function __construct($h) { - $this->_cPtr=$h; - } - - function getLocalName() { - return ExecutableContentImpl_getLocalName($this->_cPtr); - } - - function getNamespace() { - return ExecutableContentImpl_getNamespace($this->_cPtr); - } - - function enterElement($node) { - ExecutableContentImpl_enterElement($this->_cPtr,$node); - } - - function exitElement($node) { - ExecutableContentImpl_exitElement($this->_cPtr,$node); - } - - function processChildren() { - return ExecutableContentImpl_processChildren($this->_cPtr); - } -} - -class NativeExecutableContent { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__ExecutableContent') { - $this->_cPtr=$res; - return; - } - $this->_cPtr=new_NativeExecutableContent(); - } - - function isValid() { - return NativeExecutableContent_isValid($this->_cPtr); - } - - function equals($other) { - return NativeExecutableContent_equals($this->_cPtr,$other); - } - - function getLocalName() { - return NativeExecutableContent_getLocalName($this->_cPtr); - } - - function getNamespace() { - return NativeExecutableContent_getNamespace($this->_cPtr); - } - - function enterElement($node) { - NativeExecutableContent_enterElement($this->_cPtr,$node); - } - - function exitElement($node) { - NativeExecutableContent_exitElement($this->_cPtr,$node); - } - - function processChildren() { - return NativeExecutableContent_processChildren($this->_cPtr); - } -} - -abstract class InvokerImpl extends EventHandlerImpl { - public $_cPtr=null; - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - EventHandlerImpl::__set($var,$value); - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return EventHandlerImpl::__get($var); - } - - function __isset($var) { - if ($var === 'thisown') return true; - return EventHandlerImpl::__isset($var); - } - function __construct($h) { - $this->_cPtr=$h; - } - - function invoke($req) { - InvokerImpl_invoke($this->_cPtr,$req); - } - - function uninvoke() { - InvokerImpl_uninvoke($this->_cPtr); - } - - function deleteOnUninvoke() { - return InvokerImpl_deleteOnUninvoke($this->_cPtr); - } -} - -class NativeInvoker extends EventHandler { - public $_cPtr=null; - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - EventHandler::__set($var,$value); - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return EventHandler::__get($var); - } - - function __isset($var) { - if ($var === 'thisown') return true; - return EventHandler::__isset($var); - } - - function __construct($other=null) { - if (is_resource($other) && get_resource_type($other) === '_p_uscxml__Invoker') { - $this->_cPtr=$other; - return; - } - switch (func_num_args()) { - case 0: $this->_cPtr=new_NativeInvoker(); break; - default: $this->_cPtr=new_NativeInvoker($other); - } - } - - function isValid() { - return NativeInvoker_isValid($this->_cPtr); - } - - function equals($other) { - return NativeInvoker_equals($this->_cPtr,$other); - } - - function invoke($req) { - NativeInvoker_invoke($this->_cPtr,$req); - } - - function uninvoke() { - NativeInvoker_uninvoke($this->_cPtr); - } - - function deleteOnUninvoke() { - return NativeInvoker_deleteOnUninvoke($this->_cPtr); - } -} - -abstract class IOProcessorImpl extends EventHandlerImpl { - public $_cPtr=null; - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - EventHandlerImpl::__set($var,$value); - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return EventHandlerImpl::__get($var); - } - - function __isset($var) { - if ($var === 'thisown') return true; - return EventHandlerImpl::__isset($var); - } - function __construct($h) { - $this->_cPtr=$h; - } -} - -class NativeIOProcessor extends EventHandler { - public $_cPtr=null; - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - EventHandler::__set($var,$value); - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return EventHandler::__get($var); - } - - function __isset($var) { - if ($var === 'thisown') return true; - return EventHandler::__isset($var); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__IOProcessor') { - $this->_cPtr=$res; - return; - } - $this->_cPtr=new_NativeIOProcessor(); - } - - function isValid() { - return NativeIOProcessor_isValid($this->_cPtr); - } - - function equals($other) { - return NativeIOProcessor_equals($this->_cPtr,$other); - } -} - -class Invoker extends InvokerImpl { - public $_cPtr=null; - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - InvokerImpl::__set($var,$value); - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return InvokerImpl::__get($var); - } - - function __isset($var) { - if ($var === 'thisown') return true; - return InvokerImpl::__isset($var); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__WrappedInvoker') { - $this->_cPtr=$res; - return; - } - if (get_class($this) === 'Invoker') { - $_this = null; - } else { - $_this = $this; - } - $this->_cPtr=new_Invoker($_this); - } - - function getNames() { - $r=Invoker_getNames($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringList($r); - } - return $r; - } - - function getDataModelVariables() { - $r=Invoker_getDataModelVariables($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function send($req) { - Invoker_send($this->_cPtr,$req); - } - - function invoke($req) { - Invoker_invoke($this->_cPtr,$req); - } - - function uninvoke() { - Invoker_uninvoke($this->_cPtr); - } - - function deleteOnUninvoke() { - return Invoker_deleteOnUninvoke($this->_cPtr); - } - - function create($interpreter) { - $r=Invoker_create($this->_cPtr,$interpreter); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Invoker($r); - } - return $r; - } -} - -class DataModelExtension extends NativeDataModelExtension { - public $_cPtr=null; - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - NativeDataModelExtension::__set($var,$value); - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return NativeDataModelExtension::__get($var); - } - - function __isset($var) { - if ($var === 'thisown') return true; - return NativeDataModelExtension::__isset($var); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__WrappedDataModelExtension') { - $this->_cPtr=$res; - return; - } - if (get_class($this) === 'DataModelExtension') { - $_this = null; - } else { - $_this = $this; - } - $this->_cPtr=new_DataModelExtension($_this); - } - - function provides() { - return DataModelExtension_provides($this->_cPtr); - } - - function getValueOf($member) { - $r=DataModelExtension_getValueOf($this->_cPtr,$member); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function setValueOf($member,$data) { - DataModelExtension_setValueOf($this->_cPtr,$member,$data); - } -} - -class DataModel extends DataModelImpl { - public $_cPtr=null; - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - DataModelImpl::__set($var,$value); - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return DataModelImpl::__get($var); - } - - function __isset($var) { - if ($var === 'thisown') return true; - return DataModelImpl::__isset($var); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__WrappedDataModel') { - $this->_cPtr=$res; - return; - } - if (get_class($this) === 'DataModel') { - $_this = null; - } else { - $_this = $this; - } - $this->_cPtr=new_DataModel($_this); - } - - function create($interpreter) { - $r=DataModel_create($this->_cPtr,$interpreter); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new DataModel($r); - } - return $r; - } - - function getNames() { - $r=DataModel_getNames($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringList($r); - } - return $r; - } - - function andExpressions($arg0) { - return DataModel_andExpressions($this->_cPtr,$arg0); - } - - function validate($location,$schema) { - return DataModel_validate($this->_cPtr,$location,$schema); - } - - function setEvent($event) { - DataModel_setEvent($this->_cPtr,$event); - } - - function getStringAsData($content) { - $r=DataModel_getStringAsData($this->_cPtr,$content); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function getLength($expr) { - return DataModel_getLength($this->_cPtr,$expr); - } - - function setForeach($item,$array,$index,$iteration) { - DataModel_setForeach($this->_cPtr,$item,$array,$index,$iteration); - } - - function pushContext() { - DataModel_pushContext($this->_cPtr); - } - - function popContext() { - DataModel_popContext($this->_cPtr); - } - - function evalAsString($expr) { - return DataModel_evalAsString($this->_cPtr,$expr); - } - - function isDeclared($expr) { - return DataModel_isDeclared($this->_cPtr,$expr); - } - - function isLocation($expr) { - return DataModel_isLocation($this->_cPtr,$expr); - } - - function evalAsBool($expr_or_node_or_elem,$expr_or_content=null) { - switch (func_num_args()) { - case 1: $this->_cPtr=DataModel_evalAsBool($this->_cPtr,$expr_or_node_or_elem); break; - default: $this->_cPtr=DataModel_evalAsBool($this->_cPtr,$expr_or_node_or_elem,$expr_or_content); - } - return $r; - } - - function init($dataElem,$location,$content) { - DataModel_init($this->_cPtr,$dataElem,$location,$content); - } - - function assign($assignElem,$location,$content) { - DataModel_assign($this->_cPtr,$assignElem,$location,$content); - } - - function c_eval($scriptElem,$expr) { - DataModel_c_eval($this->_cPtr,$scriptElem,$expr); - } -} - -class ExecutableContent extends ExecutableContentImpl { - public $_cPtr=null; - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - ExecutableContentImpl::__set($var,$value); - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return ExecutableContentImpl::__get($var); - } - - function __isset($var) { - if ($var === 'thisown') return true; - return ExecutableContentImpl::__isset($var); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__WrappedExecutableContent') { - $this->_cPtr=$res; - return; - } - if (get_class($this) === 'ExecutableContent') { - $_this = null; - } else { - $_this = $this; - } - $this->_cPtr=new_ExecutableContent($_this); - } - - function create($interpreter) { - $r=ExecutableContent_create($this->_cPtr,$interpreter); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new ExecutableContent($r); - } - return $r; - } - - function getLocalName() { - return ExecutableContent_getLocalName($this->_cPtr); - } - - function getNamespace() { - return ExecutableContent_getNamespace($this->_cPtr); - } - - function processChildren() { - return ExecutableContent_processChildren($this->_cPtr); - } - - function enterElement($node) { - ExecutableContent_enterElement($this->_cPtr,$node); - } - - function exitElement($node) { - ExecutableContent_exitElement($this->_cPtr,$node); - } -} - -class IOProcessor extends IOProcessorImpl { - public $_cPtr=null; - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - IOProcessorImpl::__set($var,$value); - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return IOProcessorImpl::__get($var); - } - - function __isset($var) { - if ($var === 'thisown') return true; - return IOProcessorImpl::__isset($var); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__WrappedIOProcessor') { - $this->_cPtr=$res; - return; - } - if (get_class($this) === 'IOProcessor') { - $_this = null; - } else { - $_this = $this; - } - $this->_cPtr=new_IOProcessor($_this); - } - - function create($interpreter) { - $r=IOProcessor_create($this->_cPtr,$interpreter); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new IOProcessor($r); - } - return $r; - } - - function getNames() { - $r=IOProcessor_getNames($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new StringList($r); - } - return $r; - } - - function getDataModelVariables() { - $r=IOProcessor_getDataModelVariables($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function send($req) { - IOProcessor_send($this->_cPtr,$req); - } -} - -class InterpreterMonitor extends NativeInterpreterMonitor { - public $_cPtr=null; - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - NativeInterpreterMonitor::__set($var,$value); - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return NativeInterpreterMonitor::__get($var); - } - - function __isset($var) { - if ($var === 'thisown') return true; - return NativeInterpreterMonitor::__isset($var); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__WrappedInterpreterMonitor') { - $this->_cPtr=$res; - return; - } - if (get_class($this) === 'InterpreterMonitor') { - $_this = null; - } else { - $_this = $this; - } - $this->_cPtr=new_InterpreterMonitor($_this); - } - - function beforeExitingState($interpreter,$stateId,$xpath,$state,$moreComing) { - InterpreterMonitor_beforeExitingState($this->_cPtr,$interpreter,$stateId,$xpath,$state,$moreComing); - } - - function afterExitingState($interpreter,$stateId,$xpath,$state,$moreComing) { - InterpreterMonitor_afterExitingState($this->_cPtr,$interpreter,$stateId,$xpath,$state,$moreComing); - } - - function beforeExecutingContent($interpreter,$tagName,$xpath,$element) { - InterpreterMonitor_beforeExecutingContent($this->_cPtr,$interpreter,$tagName,$xpath,$element); - } - - function afterExecutingContent($interpreter,$tagName,$xpath,$element) { - InterpreterMonitor_afterExecutingContent($this->_cPtr,$interpreter,$tagName,$xpath,$element); - } - - function beforeUninvoking($interpreter,$xpath,$invokeid,$element) { - InterpreterMonitor_beforeUninvoking($this->_cPtr,$interpreter,$xpath,$invokeid,$element); - } - - function afterUninvoking($interpreter,$xpath,$invokeid,$element) { - InterpreterMonitor_afterUninvoking($this->_cPtr,$interpreter,$xpath,$invokeid,$element); - } - - function beforeTakingTransition($interpreter,$xpath,$source,$targets,$element,$moreComing) { - InterpreterMonitor_beforeTakingTransition($this->_cPtr,$interpreter,$xpath,$source,$targets,$element,$moreComing); - } - - function afterTakingTransition($interpreter,$xpath,$source,$targets,$element,$moreComing) { - InterpreterMonitor_afterTakingTransition($this->_cPtr,$interpreter,$xpath,$source,$targets,$element,$moreComing); - } - - function beforeEnteringState($interpreter,$stateId,$xpath,$state,$moreComing) { - InterpreterMonitor_beforeEnteringState($this->_cPtr,$interpreter,$stateId,$xpath,$state,$moreComing); - } - - function afterEnteringState($interpreter,$stateId,$xpath,$state,$moreComing) { - InterpreterMonitor_afterEnteringState($this->_cPtr,$interpreter,$stateId,$xpath,$state,$moreComing); - } - - function beforeInvoking($interpreter,$xpath,$invokeid,$element) { - InterpreterMonitor_beforeInvoking($this->_cPtr,$interpreter,$xpath,$invokeid,$element); - } - - function afterInvoking($interpreter,$xpath,$invokeid,$element) { - InterpreterMonitor_afterInvoking($this->_cPtr,$interpreter,$xpath,$invokeid,$element); - } - - function reportIssue($interpreter,$issue) { - InterpreterMonitor_reportIssue($this->_cPtr,$interpreter,$issue); - } -} - -class IssueList { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function c_list($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_std__listT_uscxml__InterpreterIssue_t') { - $this->_cPtr=$res; - return; - } - return new IssueList(new_c_list()); - } - - function size() { - return IssueList_size($this->_cPtr); - } - - function c_empty() { - return IssueList_c_empty($this->_cPtr); - } - - function clear() { - IssueList_clear($this->_cPtr); - } - - function add($x) { - IssueList_add($this->_cPtr,$x); - } - - function get($i) { - $r=IssueList_get($this->_cPtr,$i); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new InterpreterIssue($r); - } - return $r; - } -} - -class DataList { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - function __construct($h) { - $this->_cPtr=$h; - } - - function size() { - return DataList_size($this->_cPtr); - } - - function c_empty() { - return DataList_c_empty($this->_cPtr); - } - - function clear() { - DataList_clear($this->_cPtr); - } - - function add($x) { - DataList_add($this->_cPtr,$x); - } - - function get($i) { - $r=DataList_get($this->_cPtr,$i); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } -} - -class DataMap { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($arg1=null) { - if (is_resource($arg1) && get_resource_type($arg1) === '_p_std__mapT_std__string_uscxml__Data_t') { - $this->_cPtr=$arg1; - return; - } - switch (func_num_args()) { - case 0: $this->_cPtr=new_DataMap(); break; - default: $this->_cPtr=new_DataMap($arg1); - } - } - - function size() { - return DataMap_size($this->_cPtr); - } - - function clear() { - DataMap_clear($this->_cPtr); - } - - function get($key) { - $r=DataMap_get($this->_cPtr,$key); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new Data($r); - } - return $r; - } - - function set($key,$x) { - DataMap_set($this->_cPtr,$key,$x); - } - - function del($key) { - DataMap_del($this->_cPtr,$key); - } - - function has_key($key) { - return DataMap_has_key($this->_cPtr,$key); - } - - function is_empty() { - return DataMap_is_empty($this->_cPtr); - } -} - -class StringSet { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($arg1=null) { - if (is_resource($arg1) && get_resource_type($arg1) === '_p_std__setT_std__string_t') { - $this->_cPtr=$arg1; - return; - } - switch (func_num_args()) { - case 0: $this->_cPtr=new_StringSet(); break; - default: $this->_cPtr=new_StringSet($arg1); - } - } - - function size() { - return StringSet_size($this->_cPtr); - } - - function c_empty() { - return StringSet_c_empty($this->_cPtr); - } - - function clear() { - StringSet_clear($this->_cPtr); - } - - function get($key) { - return StringSet_get($this->_cPtr,$key); - } - - function insert($key) { - StringSet_insert($this->_cPtr,$key); - } - - function del($key) { - StringSet_del($this->_cPtr,$key); - } - - function has_key($key) { - return StringSet_has_key($this->_cPtr,$key); - } -} - -class StringVector { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($n=null) { - if (is_resource($n) && get_resource_type($n) === '_p_std__vectorT_std__string_t') { - $this->_cPtr=$n; - return; - } - switch (func_num_args()) { - case 0: $this->_cPtr=new_StringVector(); break; - default: $this->_cPtr=new_StringVector($n); - } - } - - function size() { - return StringVector_size($this->_cPtr); - } - - function capacity() { - return StringVector_capacity($this->_cPtr); - } - - function reserve($n) { - StringVector_reserve($this->_cPtr,$n); - } - - function clear() { - StringVector_clear($this->_cPtr); - } - - function push($x) { - StringVector_push($this->_cPtr,$x); - } - - function is_empty() { - return StringVector_is_empty($this->_cPtr); - } - - function pop() { - return StringVector_pop($this->_cPtr); - } - - function get($i) { - return StringVector_get($this->_cPtr,$i); - } - - function set($i,$val) { - StringVector_set($this->_cPtr,$i,$val); - } -} - -class StringList { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - function __construct($h) { - $this->_cPtr=$h; - } - - function size() { - return StringList_size($this->_cPtr); - } - - function c_empty() { - return StringList_c_empty($this->_cPtr); - } - - function clear() { - StringList_clear($this->_cPtr); - } - - function add($x) { - StringList_add($this->_cPtr,$x); - } - - function get($i) { - return StringList_get($this->_cPtr,$i); - } -} - -class ParamMap { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($arg1=null) { - if (is_resource($arg1) && get_resource_type($arg1) === '_p_std__mapT_std__string_std__listT_uscxml__Data_t_t') { - $this->_cPtr=$arg1; - return; - } - switch (func_num_args()) { - case 0: $this->_cPtr=new_ParamMap(); break; - default: $this->_cPtr=new_ParamMap($arg1); - } - } - - function size() { - return ParamMap_size($this->_cPtr); - } - - function clear() { - ParamMap_clear($this->_cPtr); - } - - function get($key) { - $r=ParamMap_get($this->_cPtr,$key); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new DataList($r); - } - return $r; - } - - function set($key,$x) { - ParamMap_set($this->_cPtr,$key,$x); - } - - function del($key) { - ParamMap_del($this->_cPtr,$key); - } - - function has_key($key) { - return ParamMap_has_key($this->_cPtr,$key); - } - - function is_empty() { - return ParamMap_is_empty($this->_cPtr); - } -} - -class IOProcMap { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($arg1=null) { - if (is_resource($arg1) && get_resource_type($arg1) === '_p_std__mapT_std__string_uscxml__IOProcessor_t') { - $this->_cPtr=$arg1; - return; - } - switch (func_num_args()) { - case 0: $this->_cPtr=new_IOProcMap(); break; - default: $this->_cPtr=new_IOProcMap($arg1); - } - } - - function size() { - return IOProcMap_size($this->_cPtr); - } - - function clear() { - IOProcMap_clear($this->_cPtr); - } - - function get($key) { - $r=IOProcMap_get($this->_cPtr,$key); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new NativeIOProcessor($r); - } - return $r; - } - - function set($key,$x) { - IOProcMap_set($this->_cPtr,$key,$x); - } - - function del($key) { - IOProcMap_del($this->_cPtr,$key); - } - - function has_key($key) { - return IOProcMap_has_key($this->_cPtr,$key); - } - - function is_empty() { - return IOProcMap_is_empty($this->_cPtr); - } -} - -class InvokerMap { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($arg1=null) { - if (is_resource($arg1) && get_resource_type($arg1) === '_p_std__mapT_std__string_uscxml__Invoker_t') { - $this->_cPtr=$arg1; - return; - } - switch (func_num_args()) { - case 0: $this->_cPtr=new_InvokerMap(); break; - default: $this->_cPtr=new_InvokerMap($arg1); - } - } - - function size() { - return InvokerMap_size($this->_cPtr); - } - - function clear() { - InvokerMap_clear($this->_cPtr); - } - - function get($key) { - $r=InvokerMap_get($this->_cPtr,$key); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new NativeInvoker($r); - } - return $r; - } - - function set($key,$x) { - InvokerMap_set($this->_cPtr,$key,$x); - } - - function del($key) { - InvokerMap_del($this->_cPtr,$key); - } - - function has_key($key) { - return InvokerMap_has_key($this->_cPtr,$key); - } - - function is_empty() { - return InvokerMap_is_empty($this->_cPtr); - } -} - -class ParentQueue { - public $_cPtr=null; - protected $_pData=array(); - - function __set($var,$value) { - if ($var === 'thisown') return swig_uscxmlNativePHP_alter_newobject($this->_cPtr,$value); - $this->_pData[$var] = $value; - } - - function __get($var) { - if ($var === 'thisown') return swig_uscxmlNativePHP_get_newobject($this->_cPtr); - return $this->_pData[$var]; - } - - function __isset($var) { - if ($var === 'thisown') return true; - return array_key_exists($var, $this->_pData); - } - - function __construct($res=null) { - if (is_resource($res) && get_resource_type($res) === '_p_uscxml__concurrency__BlockingQueueT_uscxml__SendRequest_t') { - $this->_cPtr=$res; - return; - } - $this->_cPtr=new_ParentQueue(); - } - - function push($elem) { - ParentQueue_push($this->_cPtr,$elem); - } - - function push_front($elem) { - ParentQueue_push_front($this->_cPtr,$elem); - } - - function pop() { - $r=ParentQueue_pop($this->_cPtr); - if (is_resource($r)) { - $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); - if (class_exists($c)) return new $c($r); - return new SendRequest($r); - } - return $r; - } - - function clear() { - ParentQueue_clear($this->_cPtr); - } - - function isEmpty() { - return ParentQueue_isEmpty($this->_cPtr); - } -} - - -?> diff --git a/src/bindings/swig/stl_list.i b/src/bindings/swig/stl_list.i deleted file mode 100644 index aabd448..0000000 --- a/src/bindings/swig/stl_list.i +++ /dev/null @@ -1,49 +0,0 @@ -/* ----------------------------------------------------------------------------- - * See the LICENSE file for information on copyright, usage and redistribution - * of SWIG, and the README file for authors - http://www.swig.org/release.html. - * - * std_list.i - * ----------------------------------------------------------------------------- */ - -%include - -%{ -#include -#include -%} - -namespace std { - - template class list { - public: - typedef size_t size_type; - typedef T value_type; - typedef const value_type& const_reference; - list(); - size_type size() const; - %rename(isEmpty) empty; - bool empty() const; - void clear(); - %rename(add) push_back; - void push_back(const value_type& x); - %extend { - const_reference get(int i) throw (std::out_of_range) { - int size = int(self->size()); - int j; - if (i>=0 && i::const_iterator p; - p=self->begin(); - for (j=0; j - -// ------------------------------------------------------------------------ -// std::set -// ------------------------------------------------------------------------ - -%{ -#include -#include -#include -%} - -// exported class - -namespace std { - - template class set { - // add typemaps here - public: - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef V value_type; - set(); - set(const set &); - - unsigned int size() const; - bool empty() const; - void clear(); - %extend { - const V& get(const V& key) throw (std::out_of_range) { - std::set::iterator i = self->find(key); - if (i != self->end()) - return *i; - else - throw std::out_of_range("key not found"); - } - void insert(const V& key) { // Do NOT call this function 'set' ! - self->insert(key); - } - void del(const V& key) throw (std::out_of_range) { - std::set::iterator i = self->find(key); - if (i != self->end()) - self->erase(i); - else - throw std::out_of_range("key not found"); - } - bool has_key(const V& key) { - std::set::iterator i = self->find(key); - return i != self->end(); - } - } - }; - -} \ No newline at end of file diff --git a/src/bindings/swig/uscxml_beautify.i b/src/bindings/swig/uscxml_beautify.i deleted file mode 100644 index eb37fb1..0000000 --- a/src/bindings/swig/uscxml_beautify.i +++ /dev/null @@ -1,153 +0,0 @@ -%rename(NativeDataModel) DataModel; -%rename(DataModel) WrappedDataModel; -%rename(NativeDataModelExtension) DataModelExtension; -%rename(DataModelExtension) WrappedDataModelExtension; -%rename(NativeExecutableContent) ExecutableContent; -%rename(ExecutableContent) WrappedExecutableContent; -%rename(NativeInvoker) Invoker; -%rename(Invoker) WrappedInvoker; -%rename(NativeIOProcessor) IOProcessor; -%rename(IOProcessor) WrappedIOProcessor; -%rename(NativeInterpreterMonitor) InterpreterMonitor; -%rename(InterpreterMonitor) WrappedInterpreterMonitor; - -%rename(getInvokersNative) uscxml::Interpreter::getInvokers(); -%rename(getIOProcessorsNative) uscxml::Interpreter::getIOProcessors(); - -%extend uscxml::Event { - std::map > getParamMap() { - std::map > paramMap; - std::multimap::const_iterator paramPairIter = self->getParams().begin(); - while(paramPairIter != self->getParams().end()) { - paramMap[paramPairIter->first].push_back(paramPairIter->second); - paramPairIter++; - } - return paramMap; - } - - std::vector getParamMapKeys() { - std::vector keys; - for(std::multimap::const_iterator iter = self->getParams().begin(); - iter != self->getParams().end(); - iter = self->getParams().upper_bound(iter->first)) { - keys.push_back(iter->first); - } - return keys; - } - - void setParamMap(const std::map >& paramMap) { - std::multimap params; - std::map >::const_iterator mapIter = paramMap.begin(); - while(mapIter != paramMap.end()) { - std::list::const_iterator dataIter = mapIter->second.begin(); - while(dataIter != mapIter->second.end()) { - params.insert(std::make_pair(mapIter->first, *dataIter)); - dataIter++; - } - mapIter++; - } - self->setParams(params); - } - - std::vector getNameListKeys() { - std::vector keys; - std::map::const_iterator iter = self->getNameList().begin(); - while(iter != self->getNameList().end()) { - keys.push_back(iter->first); - iter++; - } - return keys; - } -}; - -%extend uscxml::Interpreter { - - void addIOProcessor(uscxml::WrappedIOProcessor* ioProc) { - self->addIOProcessor(boost::shared_ptr(ioProc)); - } - - void setDataModel(uscxml::WrappedDataModel* dataModel) { - self->setDataModel(boost::shared_ptr(dataModel)); - } - - void setInvoker(const std::string invokeId, uscxml::WrappedInvoker* invoker) { - self->setInvoker(invokeId, boost::shared_ptr(invoker)); - } - - std::vector getBasicConfiguration() { - Arabica::XPath::NodeSet nativeConfig = self->getBasicConfiguration(); - std::vector config; - for (int i = 0; i < nativeConfig.size(); i++) { - Arabica::DOM::Element elem(nativeConfig[i]); - config.push_back(elem.getAttribute("id")); - } - return config; - } - - std::vector getConfiguration() { - Arabica::XPath::NodeSet nativeConfig = self->getConfiguration(); - std::vector config; - for (int i = 0; i < nativeConfig.size(); i++) { - Arabica::DOM::Element elem(nativeConfig[i]); - config.push_back(elem.getAttribute("id")); - } - return config; - } - - std::vector getIOProcessorKeys() { - std::vector keys; - std::map::const_iterator iter = self->getIOProcessors().begin(); - while(iter != self->getIOProcessors().end()) { - keys.push_back(iter->first); - iter++; - } - return keys; - } - - std::vector getInvokerKeys() { - std::vector keys; - std::map::const_iterator iter = self->getInvokers().begin(); - while(iter != self->getInvokers().end()) { - keys.push_back(iter->first); - iter++; - } - return keys; - } - -}; - -%{ - #include - #include "uscxml/dom/NameSpacingParser.h" - -%} - -%extend uscxml::Data { - std::vector getCompoundKeys() { - std::vector keys; - std::map::const_iterator iter = self->compound.begin(); - while(iter != self->compound.end()) { - keys.push_back(iter->first); - iter++; - } - return keys; - } - - std::string getXML() { - if (!self->node) - return ""; - - std::stringstream ss; - ss << self->node; - return ss.str(); - } - - void setXML(const std::string& xml) { - NameSpacingParser parser = NameSpacingParser::fromXML(xml); - if (!parser.errorsReported()) { - self->node = parser.getDocument(); - } else { - LOG(ERROR) << "Cannot parse message as XML: " << parser.errors(); - } - } -}; diff --git a/src/bindings/swig/uscxml_ignores.i b/src/bindings/swig/uscxml_ignores.i deleted file mode 100644 index 69c7767..0000000 --- a/src/bindings/swig/uscxml_ignores.i +++ /dev/null @@ -1,228 +0,0 @@ -%ignore uscxml::NumAttr; -%ignore uscxml::SCXMLParser; -%ignore uscxml::InterpreterImpl; -%ignore uscxml::BlobImpl; -#if 0 -%ignore uscxml::EventHandlerImpl; -#endif - -%ignore create(); - -%ignore uscxml::EventHandlerImpl::setInterpreter(InterpreterImpl*); -%ignore uscxml::EventHandlerImpl::getInterpreter; -%ignore uscxml::EventHandlerImpl::setElement(const Arabica::DOM::Element&); -%ignore uscxml::EventHandlerImpl::getElement; -%ignore uscxml::EventHandlerImpl::runOnMainThread; - -%ignore uscxml::EventHandler::EventHandler(const boost::shared_ptr); -%ignore uscxml::EventHandler::EventHandler(EventHandler&); -%ignore uscxml::EventHandler::setInterpreter(InterpreterImpl*); -%ignore uscxml::EventHandler::getInterpreter; -%ignore uscxml::EventHandler::setElement(const Arabica::DOM::Element&); -%ignore uscxml::EventHandler::getElement; -%ignore uscxml::EventHandler::runOnMainThread; - -%ignore uscxml::NameSpaceInfo::NameSpaceInfo(const std::map&); -%ignore uscxml::NameSpaceInfo::NameSpaceInfo(const NameSpaceInfo&); -%ignore uscxml::NameSpaceInfo::setPrefix(Arabica::DOM::Element); -%ignore uscxml::NameSpaceInfo::setPrefix(Arabica::DOM::Attr); -%ignore uscxml::NameSpaceInfo::getNSContext; -%ignore uscxml::NameSpaceInfo::nsURL; -%ignore uscxml::NameSpaceInfo::xpathPrefix; -%ignore uscxml::NameSpaceInfo::xmlNSPrefix; -%ignore uscxml::NameSpaceInfo::nsToPrefix; -%ignore uscxml::NameSpaceInfo::nsInfo; - -// interpreter - -%ignore uscxml::Interpreter::Interpreter(const boost::shared_ptr); -%ignore uscxml::Interpreter::Interpreter(const Interpreter&); -%ignore uscxml::Interpreter::getDelayQueue(); -%ignore uscxml::Interpreter::fromURL(const URL&); -%ignore uscxml::Interpreter::fromDOM; -%ignore uscxml::Interpreter::fromClone; -%ignore uscxml::Interpreter::start(); -%ignore uscxml::Interpreter::stop(); -%ignore uscxml::Interpreter::isRunning(); -%ignore uscxml::Interpreter::setCmdLineOptions(std::map); -%ignore uscxml::Interpreter::setDataModel(const DataModel& dataModel); -%ignore uscxml::Interpreter::addIOProcessor(IOProcessor ioProc); -%ignore uscxml::Interpreter::setInvoker(const std::string& invokeId, Invoker invoker); -%ignore uscxml::Interpreter::getDocument; -%ignore uscxml::Interpreter::getImpl; -%ignore uscxml::Interpreter::runOnMainThread; -%ignore uscxml::Interpreter::getBaseURL(const Arabica::DOM::Node&); -%ignore uscxml::Interpreter::getHTTPServlet(); -%ignore uscxml::Interpreter::getNodeSetForXPath(const std::string&); -%ignore uscxml::Interpreter::isLegalConfiguration(const Arabica::XPath::NodeSet&); -%ignore uscxml::Interpreter::getInstances(); -%ignore uscxml::Interpreter::addInstance; - -// InterpreterIssues -%ignore uscxml::InterpreterIssue::node; - -// InterpreterMonitor - -%ignore uscxml::InterpreterMonitor::beforeExitingState(Interpreter, const Arabica::DOM::Element&, bool); -%ignore uscxml::InterpreterMonitor::afterExitingState(Interpreter, const Arabica::DOM::Element&, bool); -%ignore uscxml::InterpreterMonitor::beforeEnteringState(Interpreter, const Arabica::DOM::Element&, bool); -%ignore uscxml::InterpreterMonitor::afterEnteringState(Interpreter, const Arabica::DOM::Element&, bool); - -%ignore uscxml::InterpreterMonitor::beforeUninvoking(Interpreter, const Arabica::DOM::Element&, const std::string&); -%ignore uscxml::InterpreterMonitor::afterUninvoking(Interpreter, const Arabica::DOM::Element&, const std::string&); -%ignore uscxml::InterpreterMonitor::beforeInvoking(Interpreter, const Arabica::DOM::Element&, const std::string&); -%ignore uscxml::InterpreterMonitor::afterInvoking(Interpreter, const Arabica::DOM::Element&, const std::string&); - -%ignore uscxml::InterpreterMonitor::beforeTakingTransition(Interpreter, const Arabica::DOM::Element&, bool); -%ignore uscxml::InterpreterMonitor::afterTakingTransition(Interpreter, const Arabica::DOM::Element&, bool); - -%ignore uscxml::InterpreterMonitor::beforeExecutingContent(Interpreter, const Arabica::DOM::Element&); -%ignore uscxml::InterpreterMonitor::afterExecutingContent(Interpreter, const Arabica::DOM::Element&); - - -%ignore uscxml::InterpreterOptions::fromCmdLine(int, char**); -%ignore uscxml::InterpreterOptions::additionalParameters; -%ignore uscxml::InterpreterOptions::interpreters; - -// Invoker - -%ignore uscxml::Invoker::Invoker(const boost::shared_ptr); -%ignore uscxml::Invoker::setInterpreter(InterpreterImpl*); -%ignore uscxml::Invoker::getInterpreter; - -%ignore uscxml::InvokerImpl::create(InterpreterImpl*); -%ignore uscxml::WrappedInvoker::create(InterpreterImpl*); -%ignore uscxml::InvokerImpl::setInterpreter(InterpreterImpl*); -%ignore uscxml::InvokerImpl::getInterpreter; - - -// DataModel - -%ignore uscxml::DataModel::DataModel(const boost::shared_ptr); -%ignore uscxml::DataModel::DataModel(const DataModel&); -%ignore uscxml::DataModel::eval(const Arabica::DOM::Element&, const std::string&); -%ignore uscxml::DataModel::evalAsBool(const Arabica::DOM::Node&, const std::string&); -%ignore uscxml::DataModel::evalAsBool(const std::string&); -%ignore uscxml::DataModel::throwErrorExecution(const std::string&); -%ignore uscxml::DataModel::throwErrorPlatform(const std::string&); -%ignore uscxml::DataModel::init(const Arabica::DOM::Element&, const Arabica::DOM::Document&, const std::string&); -%ignore uscxml::DataModel::init(const Arabica::DOM::Element&, const Arabica::DOM::Node&, const std::string&); -%ignore uscxml::DataModel::assign(const Arabica::DOM::Element&, const Arabica::DOM::Document&, const std::string&); -%ignore uscxml::DataModel::assign(const Arabica::DOM::Element&, const Arabica::DOM::Node&, const std::string&); -%ignore uscxml::DataModel::replaceExpressions(std::string&); -%ignore uscxml::DataModel::setInterpreter(InterpreterImpl*); -%ignore uscxml::DataModel::getInterpreter; - -%ignore uscxml::DataModelImpl::create(InterpreterImpl*); -%ignore uscxml::DataModelImpl::throwErrorExecution(const std::string&); -%ignore uscxml::DataModelImpl::throwErrorPlatform(const std::string&); -%ignore uscxml::DataModelImpl::setInterpreter(InterpreterImpl*); -%ignore uscxml::DataModelImpl::getInterpreter; -%ignore uscxml::DataModelImpl::replaceExpressions(std::string&); -%ignore uscxml::DataModelImpl::init(const Arabica::DOM::Element&, const Arabica::DOM::Document&, const std::string&); -%ignore uscxml::DataModelImpl::init(const Arabica::DOM::Element&, const Arabica::DOM::Node&, const std::string&); -%ignore uscxml::DataModelImpl::init(const std::string&, const Data&); -%ignore uscxml::DataModelImpl::assign(const Arabica::DOM::Element&, const Arabica::DOM::Document&, const std::string&); -%ignore uscxml::DataModelImpl::assign(const Arabica::DOM::Element&, const Arabica::DOM::Node&, const std::string&); -%ignore uscxml::DataModelImpl::assign(const std::string&, const Data&); -%ignore uscxml::DataModelImpl::eval(const Arabica::DOM::Element&, const std::string&); -%ignore uscxml::DataModelImpl::evalAsBool(const Arabica::DOM::Node&, const std::string&); - -%ignore uscxml::WrappedDataModel::create(InterpreterImpl*); -%ignore uscxml::WrappedDataModel::init(const Arabica::DOM::Element&, const Arabica::DOM::Document&, const std::string&); -%ignore uscxml::WrappedDataModel::init(const Arabica::DOM::Element&, const Arabica::DOM::Node&, const std::string&); -%ignore uscxml::WrappedDataModel::init(const std::string&, const Data&); -%ignore uscxml::WrappedDataModel::assign(const Arabica::DOM::Element&, const Arabica::DOM::Document&, const std::string&); -%ignore uscxml::WrappedDataModel::assign(const Arabica::DOM::Element&, const Arabica::DOM::Node&, const std::string&); -%ignore uscxml::WrappedDataModel::assign(const std::string&, const Data&); -%ignore uscxml::WrappedDataModel::eval(const Arabica::DOM::Element&, const std::string&); -%ignore uscxml::WrappedDataModel::evalAsBool(const Arabica::DOM::Node&, const std::string&); - -%ignore uscxml::DataModelExtension::dm; - -// Executable Content - -%ignore uscxml::ExecutableContent::ExecutableContent(const boost::shared_ptr); -%ignore uscxml::ExecutableContent::ExecutableContent(const ExecutableContent&); -%ignore uscxml::ExecutableContent::setInterpreter(InterpreterImpl*); -%ignore uscxml::ExecutableContent::getInterpreter; -%ignore uscxml::ExecutableContent::enterElement(const Arabica::DOM::Node&); -%ignore uscxml::ExecutableContent::exitElement(const Arabica::DOM::Node&); - -%ignore uscxml::ExecutableContentImpl::create(InterpreterImpl*); -%ignore uscxml::ExecutableContentImpl::enterElement(const Arabica::DOM::Node&); -%ignore uscxml::ExecutableContentImpl::exitElement(const Arabica::DOM::Node&); -%ignore uscxml::ExecutableContentImpl::setInterpreter(InterpreterImpl*); -%ignore uscxml::ExecutableContentImpl::getInterpreter; - -%ignore uscxml::WrappedExecutableContent::create(InterpreterImpl*); -%ignore uscxml::WrappedExecutableContent::enterElement(const Arabica::DOM::Node&); -%ignore uscxml::WrappedExecutableContent::exitElement(const Arabica::DOM::Node&); - - -// IOProcessor - -%ignore uscxml::IOProcessorImpl::create(InterpreterImpl*); - -%ignore uscxml::IOProcessor::IOProcessor(const boost::shared_ptr); -%ignore uscxml::IOProcessor::IOProcessor(const IOProcessor&); - -%ignore uscxml::WrappedIOProcessor::create(InterpreterImpl*); - - -// Factory - -%ignore uscxml::Factory::createDataModel; -%ignore uscxml::Factory::createIOProcessor; -%ignore uscxml::Factory::createInvoker; -%ignore uscxml::Factory::createExecutableContent; -%ignore uscxml::Factory::getIOProcessors; - -// Event - -%ignore uscxml::Event::Event(const Arabica::DOM::Node&); -%ignore uscxml::Event::getStrippedDOM; -%ignore uscxml::Event::getFirstDOMElement; -%ignore uscxml::Event::dom; -%ignore uscxml::Event::getDOM(); -%ignore uscxml::Event::setDOM(const Arabica::DOM::Node&); -%ignore uscxml::Event::setDOM(const Arabica::DOM::Document&); -%ignore uscxml::Event::toDocument(); -%ignore uscxml::Event::getParams(); -%ignore uscxml::Event::getParam; -%ignore uscxml::Event::setParams; - -%ignore uscxml::SendRequest::fromXML; -%ignore uscxml::InvokeRequest::fromXML; -%ignore uscxml::InvokeRequest::elem; - -// HTTPServer - -%ignore uscxml::HTTPServer::wsSend; -%ignore uscxml::HTTPServer::wsBroadcast; -%ignore uscxml::HTTPServer::reply; - - -// Data - -%ignore uscxml::Data::toDocument; -%ignore uscxml::Data::Data(const Arabica::DOM::Node&); -%ignore uscxml::Data::Data(const char* data, size_t size, const std::string& mimeType, bool adopt); -%ignore uscxml::Data::Data(const char* data, size_t size, const std::string& mimeType); - -// Blob - -%ignore uscxml::Blob::Blob(size_t size); -%ignore uscxml::Blob::Blob(const char* data, size_t size, const std::string& mimeType, bool adopt); -%ignore uscxml::Blob::Blob(const boost::shared_ptr); - - -%ignore operator!=; -%ignore operator<; -%ignore operator=; -%ignore operator[]; -%ignore operator std::list; -%ignore operator std::string; -%ignore operator std::map; -%ignore operator<<; - diff --git a/src/bindings/swig/wrapped/WrappedDataModel.cpp b/src/bindings/swig/wrapped/WrappedDataModel.cpp deleted file mode 100644 index e0124eb..0000000 --- a/src/bindings/swig/wrapped/WrappedDataModel.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "WrappedDataModel.h" - -namespace uscxml { - -WrappedDataModelExtension::WrappedDataModelExtension() {} -WrappedDataModelExtension::~WrappedDataModelExtension() {} - -WrappedDataModel::WrappedDataModel() {} -WrappedDataModel::~WrappedDataModel() {} - -} \ No newline at end of file diff --git a/src/bindings/swig/wrapped/WrappedDataModel.h b/src/bindings/swig/wrapped/WrappedDataModel.h deleted file mode 100644 index efb4ef1..0000000 --- a/src/bindings/swig/wrapped/WrappedDataModel.h +++ /dev/null @@ -1,193 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef WRAPPEDDATAMODEL_H_DBAAD6AF -#define WRAPPEDDATAMODEL_H_DBAAD6AF - -#include -#include -#include -#include - -#include -#include - -#include "../../../uscxml/plugins/DataModel.h" -#include "../../../uscxml/Interpreter.h" - -namespace uscxml { - -class WrappedDataModelExtension : public DataModelExtension { -public: - WrappedDataModelExtension(); - virtual ~WrappedDataModelExtension(); - virtual std::string provides() { - return ""; - } - virtual Data getValueOf(const std::string& member) { - return Data(); - } - virtual void setValueOf(const std::string& member, const Data& data) { } -}; - -class WrappedDataModel : public DataModelImpl { -public: - - WrappedDataModel(); - virtual ~WrappedDataModel(); - - virtual WrappedDataModel* create(const Interpreter& interpreter) { - return new WrappedDataModel(); - } - - virtual boost::shared_ptr create(InterpreterInfo* interpreter) { - return boost::shared_ptr(create(_interpreter)); - } - - virtual boost::shared_ptr create(InterpreterImpl* interpreter) { - _interpreter = interpreter->shared_from_this(); - return boost::shared_ptr(create(_interpreter)); - } - - virtual std::list getNames() { - return std::list(); - }; - - virtual std::string andExpressions(std::list) { - return ""; - } - - virtual bool validate(const std::string& location, const std::string& schema) { - return true; - } - virtual void setEvent(const Event& event) {} - virtual Data getStringAsData(const std::string& content) { - Data data; - return data; - } - - // foreach - virtual uint32_t getLength(const std::string& expr) { - return 0; - } - virtual void setForeach(const std::string& item, - const std::string& array, - const std::string& index, - uint32_t iteration) {} - virtual void pushContext() {} - virtual void popContext() {} - - virtual void eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr) { - std::ostringstream ssEval; - ssEval << scriptElem; - eval(ssEval.str(), expr); - } - - virtual std::string evalAsString(const std::string& expr) { - return ""; - } - virtual bool evalAsBool(const std::string& expr) { - return evalAsBool("", expr); - } - - virtual bool evalAsBool(const Arabica::DOM::Element& node, const std::string& expr) { - std::ostringstream ssNode; - ssNode << node; - return evalAsBool(ssNode.str(), expr); - } - - virtual bool isDeclared(const std::string& expr) { - return false; - } - - virtual bool isLocation(const std::string& expr) { - return true; - } - - virtual void assign(const Arabica::DOM::Element& assignElem, - const Arabica::DOM::Node& node, - const std::string& content) { - // convert XML back into strings - std::string location; - if (assignElem.hasAttribute("location")) { - location = assignElem.getAttribute("location"); - } - - std::ostringstream ssAssign; - ssAssign << assignElem; - std::string tmp; - if (node) { - std::ostringstream ssContent; - ssContent << node; - tmp = ssContent.str(); - } else if (assignElem.hasAttribute("expr")) { - tmp = assignElem.getAttribute("expr"); - } else { - tmp = content; - } - assign(ssAssign.str(), location, tmp); - } - - virtual void assign(const std::string& location, const Data& data) { - init("", location, Data::toJSON(data)); - } - - virtual void init(const Arabica::DOM::Element& dataElem, - const Arabica::DOM::Node& node, - const std::string& content) { - // convert XML back into strings - std::string location; - if (dataElem.hasAttribute("id")) { - location = dataElem.getAttribute("id"); - } - std::ostringstream ssData; - if (dataElem) - ssData << dataElem; - std::string tmp; - if (node) { - std::ostringstream ssContent; - ssContent << node; - tmp = ssContent.str(); - } else if (dataElem.hasAttribute("expr")) { - tmp = dataElem.getAttribute("expr"); - } else { - tmp = content; - } - init(ssData.str(), location, tmp); - } - - virtual void init(const std::string& location, const Data& data) { - init("", location, Data::toJSON(data)); - } - - virtual bool evalAsBool(const std::string& elem, const std::string& content) { - return false; - } - virtual void init(const std::string& dataElem, const std::string& location, const std::string& content) {} - virtual void assign(const std::string& assignElem, const std::string& location, const std::string& content) {} - virtual void eval(const std::string& scriptElem, const std::string& expr) {} - -private: - Interpreter _interpreter; -}; - -} - -#endif /* end of include guard: WRAPPEDDATAMODEL_H_DBAAD6AF */ diff --git a/src/bindings/swig/wrapped/WrappedExecutableContent.cpp b/src/bindings/swig/wrapped/WrappedExecutableContent.cpp deleted file mode 100644 index a876754..0000000 --- a/src/bindings/swig/wrapped/WrappedExecutableContent.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "WrappedExecutableContent.h" - -namespace uscxml { - -WrappedExecutableContent::WrappedExecutableContent() {} -WrappedExecutableContent::~WrappedExecutableContent() {} - -} \ No newline at end of file diff --git a/src/bindings/swig/wrapped/WrappedExecutableContent.h b/src/bindings/swig/wrapped/WrappedExecutableContent.h deleted file mode 100644 index d194f0d..0000000 --- a/src/bindings/swig/wrapped/WrappedExecutableContent.h +++ /dev/null @@ -1,87 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef WRAPPEDEXECUTABLECONTENT_H_F690F480 -#define WRAPPEDEXECUTABLECONTENT_H_F690F480 - -#include -#include -#include - -#include -#include - -#include "../../../uscxml/Message.h" -#include "../../../uscxml/Factory.h" -#include "../../../uscxml/Interpreter.h" - -namespace uscxml { - -class WrappedExecutableContent : public ExecutableContentImpl { -public: - WrappedExecutableContent(); - virtual ~WrappedExecutableContent(); - - virtual WrappedExecutableContent* create(const Interpreter& interpreter) { - return new WrappedExecutableContent(); - } - - virtual boost::shared_ptr create(InterpreterImpl* interpreter) { - _interpreter = interpreter->shared_from_this(); - return boost::shared_ptr(create(_interpreter)); - } - - virtual std::string getLocalName() { - return ""; - } - - virtual std::string getNamespace() { - return "http://www.w3.org/2005/07/scxml"; - } - - virtual void enterElement(const Arabica::DOM::Element& node) { - std::ostringstream ssElement; - ssElement << node; - enterElement(ssElement.str()); - } - - virtual void exitElement(const Arabica::DOM::Element& node) { - std::ostringstream ssElement; - ssElement << node; - exitElement(ssElement.str()); - } - - virtual bool processChildren() { - return false; - } - - virtual void enterElement(const std::string& node) { - } - - virtual void exitElement(const std::string& node) { - } - -private: - Interpreter _interpreter; -}; - -} - - -#endif /* end of include guard: WRAPPEDEXECUTABLECONTENT_H_F690F480 */ diff --git a/src/bindings/swig/wrapped/WrappedIOProcessor.cpp b/src/bindings/swig/wrapped/WrappedIOProcessor.cpp deleted file mode 100644 index 2f39d80..0000000 --- a/src/bindings/swig/wrapped/WrappedIOProcessor.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "WrappedIOProcessor.h" - -namespace uscxml { - -WrappedIOProcessor::WrappedIOProcessor() {} -WrappedIOProcessor::~WrappedIOProcessor() {} - -} \ No newline at end of file diff --git a/src/bindings/swig/wrapped/WrappedIOProcessor.h b/src/bindings/swig/wrapped/WrappedIOProcessor.h deleted file mode 100644 index 0b5cfe8..0000000 --- a/src/bindings/swig/wrapped/WrappedIOProcessor.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef WRAPPEDIOPROCESSOR_H_AE98064A -#define WRAPPEDIOPROCESSOR_H_AE98064A - -#include -#include -#include -#include - -#include -#include - -#include "../../../uscxml/Message.h" -#include "../../../uscxml/Factory.h" -#include "../../../uscxml/Interpreter.h" - -namespace uscxml { - -class WrappedIOProcessor : public IOProcessorImpl { -public: - WrappedIOProcessor(); - virtual ~WrappedIOProcessor(); - - virtual WrappedIOProcessor* create(const Interpreter& interpreter) { - return new WrappedIOProcessor(); - } - - virtual boost::shared_ptr create(InterpreterImpl* interpreter) { - _interpreter = interpreter->shared_from_this(); - return boost::shared_ptr(create(_interpreter)); - } - - virtual std::list getNames() { - return std::list(); - }; - - virtual Data getDataModelVariables() { - Data data; - return data; - } - - virtual void send(const SendRequest& req) { - - } - -private: - Interpreter _interpreter; -}; - -} - - -#endif /* end of include guard: WRAPPEDIOPROCESSOR_H_AE98064A */ diff --git a/src/bindings/swig/wrapped/WrappedInterpreterMonitor.cpp b/src/bindings/swig/wrapped/WrappedInterpreterMonitor.cpp deleted file mode 100644 index 1c99101..0000000 --- a/src/bindings/swig/wrapped/WrappedInterpreterMonitor.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "WrappedInterpreterMonitor.h" - -namespace uscxml { - -WrappedInterpreterMonitor::WrappedInterpreterMonitor() {} -WrappedInterpreterMonitor::~WrappedInterpreterMonitor() {} - -} \ No newline at end of file diff --git a/src/bindings/swig/wrapped/WrappedInterpreterMonitor.h b/src/bindings/swig/wrapped/WrappedInterpreterMonitor.h deleted file mode 100644 index ed67f7b..0000000 --- a/src/bindings/swig/wrapped/WrappedInterpreterMonitor.h +++ /dev/null @@ -1,226 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef WRAPPEDINTERPRETERMONITOR_H_F5C83A0D -#define WRAPPEDINTERPRETERMONITOR_H_F5C83A0D - -#include -#include -#include -#include - -#include -#include - -#include "../../../uscxml/Message.h" -#include "../../../uscxml/Factory.h" -#include "../../../uscxml/Interpreter.h" -#include "../../../uscxml/dom/DOMUtils.h" - -namespace uscxml { - -class WrappedInterpreterMonitor : public InterpreterMonitor { -public: - WrappedInterpreterMonitor(); - virtual ~WrappedInterpreterMonitor(); - - virtual void beforeExitingState(Interpreter interpreter, - const Arabica::DOM::Element& state, - bool moreComing) { - std::stringstream ss; - ss << state; - beforeExitingState(interpreter, state.getAttribute("id"), DOMUtils::xPathForNode(state), ss.str(), moreComing); - } - virtual void beforeExitingState(Interpreter interpreter, - const std::string& stateId, - const std::string& xpath, - const std::string& state, - bool moreComing) {} - - - virtual void afterExitingState(Interpreter interpreter, - const Arabica::DOM::Element& state, - bool moreComing) { - std::stringstream ss; - ss << state; - afterExitingState(interpreter, state.getAttribute("id"), DOMUtils::xPathForNode(state), ss.str(), moreComing); - } - virtual void afterExitingState(Interpreter interpreter, - const std::string& stateId, - const std::string& xpath, - const std::string& state, - bool moreComing) { } - - - virtual void beforeExecutingContent(Interpreter interpreter, - const Arabica::DOM::Element& element) { - std::stringstream ss; - ss << element; - beforeExecutingContent(interpreter, element.getTagName(), DOMUtils::xPathForNode(element), ss.str()); - } - virtual void beforeExecutingContent(Interpreter interpreter, - const std::string& tagName, - const std::string& xpath, - const std::string& element) {} - - - virtual void afterExecutingContent(Interpreter interpreter, - const Arabica::DOM::Element& element) { - std::stringstream ss; - ss << element; - afterExecutingContent(interpreter, element.getTagName(), DOMUtils::xPathForNode(element), ss.str()); - } - virtual void afterExecutingContent(Interpreter interpreter, - const std::string& tagName, - const std::string& xpath, - const std::string& element) {} - - - virtual void beforeUninvoking(Interpreter interpreter, - const Arabica::DOM::Element& invokeElem, - const std::string& invokeid) { - std::stringstream ss; - ss << invokeElem; - beforeUninvoking(interpreter, DOMUtils::xPathForNode(invokeElem), invokeid, ss.str()); - } - virtual void beforeUninvoking(Interpreter interpreter, - const std::string& xpath, - const std::string& invokeid, - const std::string& element) {} - - - virtual void afterUninvoking(Interpreter interpreter, - const Arabica::DOM::Element& invokeElem, - const std::string& invokeid) { - std::stringstream ss; - ss << invokeElem; - afterUninvoking(interpreter, DOMUtils::xPathForNode(invokeElem), invokeid, ss.str()); - } - virtual void afterUninvoking(Interpreter interpreter, - const std::string& xpath, - const std::string& invokeid, - const std::string& element) {} - - - virtual void beforeTakingTransition(Interpreter interpreter, - const Arabica::DOM::Element& transition, - bool moreComing) { - Arabica::DOM::Node sourceState = interpreter.getImpl()->getSourceState(transition); - Arabica::XPath::NodeSet targetStates = interpreter.getImpl()->getTargetStates(transition); - - std::stringstream ss; - ss << transition; - - std::list targets; - for (int i = 0; i < targetStates.size(); i++) { - targets.push_back(ATTR_CAST(targetStates[i], "id")); - } - - beforeTakingTransition(interpreter, DOMUtils::xPathForNode(transition), ATTR_CAST(sourceState, "id"), targets, ss.str(), moreComing); - } - virtual void beforeTakingTransition(Interpreter interpreter, - const std::string& xpath, - const std::string& source, - const std::list& targets, - const std::string& element, - bool moreComing) {} - - virtual void afterTakingTransition(Interpreter interpreter, - const Arabica::DOM::Element& transition, - bool moreComing) { - Arabica::DOM::Node sourceState = interpreter.getImpl()->getSourceState(transition); - Arabica::XPath::NodeSet targetStates = interpreter.getImpl()->getTargetStates(transition); - - std::stringstream ss; - ss << transition; - - std::list targets; - for (int i = 0; i < targetStates.size(); i++) { - targets.push_back(ATTR_CAST(targetStates[i], "id")); - } - - afterTakingTransition(interpreter, DOMUtils::xPathForNode(transition), ATTR_CAST(sourceState, "id"), targets, ss.str(), moreComing); - } - virtual void afterTakingTransition(Interpreter interpreter, - const std::string& xpath, - const std::string& source, - const std::list& targets, - const std::string& element, - bool moreComing) {} - - - virtual void beforeEnteringState(Interpreter interpreter, - const Arabica::DOM::Element& state, - bool moreComing) { - std::stringstream ss; - ss << state; - beforeEnteringState(interpreter, state.getAttribute("id"), DOMUtils::xPathForNode(state), ss.str(), moreComing); - } - virtual void beforeEnteringState(Interpreter interpreter, - const std::string& stateId, - const std::string& xpath, - const std::string& state, - bool moreComing) {} - - - virtual void afterEnteringState(Interpreter interpreter, - const Arabica::DOM::Element& state, - bool moreComing) { - std::stringstream ss; - ss << state; - afterEnteringState(interpreter, state.getAttribute("id"), DOMUtils::xPathForNode(state), ss.str(), moreComing); - } - virtual void afterEnteringState(Interpreter interpreter, - const std::string& stateId, - const std::string& xpath, - const std::string& state, - bool moreComing) {} - - - virtual void beforeInvoking(Interpreter interpreter, - const Arabica::DOM::Element& invokeElem, - const std::string& invokeid) { - std::stringstream ss; - ss << invokeElem; - beforeInvoking(interpreter, DOMUtils::xPathForNode(invokeElem), invokeid, ss.str()); - } - virtual void beforeInvoking(Interpreter interpreter, - const std::string& xpath, - const std::string& invokeid, - const std::string& element) {} - - virtual void afterInvoking(Interpreter interpreter, - const Arabica::DOM::Element& invokeElem, - const std::string& invokeid) { - std::stringstream ss; - ss << invokeElem; - afterInvoking(interpreter, DOMUtils::xPathForNode(invokeElem), invokeid, ss.str()); - } - virtual void afterInvoking(Interpreter interpreter, - const std::string& xpath, - const std::string& invokeid, - const std::string& element) {} - - virtual void reportIssue(Interpreter interpreter, const InterpreterIssue& issue) {} -}; - -} - - -#endif /* end of include guard: WRAPPEDINTERPRETERMONITOR_H_F5C83A0D */ diff --git a/src/bindings/swig/wrapped/WrappedInvoker.cpp b/src/bindings/swig/wrapped/WrappedInvoker.cpp deleted file mode 100644 index 8187a9f..0000000 --- a/src/bindings/swig/wrapped/WrappedInvoker.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "WrappedInvoker.h" - -namespace uscxml { - -WrappedInvoker::WrappedInvoker() {} -WrappedInvoker::~WrappedInvoker() {} - -} \ No newline at end of file diff --git a/src/bindings/swig/wrapped/WrappedInvoker.h b/src/bindings/swig/wrapped/WrappedInvoker.h deleted file mode 100644 index 1220746..0000000 --- a/src/bindings/swig/wrapped/WrappedInvoker.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef WRAPPEDINVOKER_H_F9725D47 -#define WRAPPEDINVOKER_H_F9725D47 - -#include -#include -#include -#include - -#include -#include - -#include "../../../uscxml/Message.h" -#include "../../../uscxml/Factory.h" -#include "../../../uscxml/Interpreter.h" - -namespace uscxml { - -class WrappedInvoker : public InvokerImpl { -public: - WrappedInvoker(); - virtual ~WrappedInvoker(); - - virtual std::list getNames() { - return std::list(); - }; - - virtual Data getDataModelVariables() { - Data data; - return data; - } - - virtual void send(const SendRequest& req) {} - virtual void invoke(const InvokeRequest& req) {} - virtual void uninvoke() {} - - virtual bool deleteOnUninvoke() { - return false; - } - - virtual WrappedInvoker* create(const Interpreter& interpreter) { - return new WrappedInvoker(); - } - - virtual boost::shared_ptr create(InterpreterImpl* interpreter) { - _interpreter = interpreter->shared_from_this(); - return boost::shared_ptr(create(_interpreter)); - } - -private: - Interpreter _interpreter; - -}; - -} - -#endif /* end of include guard: WRAPPEDINVOKER_H_F9725D47 */ diff --git a/src/uscxml.h b/src/uscxml.h deleted file mode 100644 index d52ed66..0000000 --- a/src/uscxml.h +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef USCXML_H_2WZ0PBQH -#define USCXML_H_2WZ0PBQH - -#include "uscxml/Interpreter.h" - -#endif /* end of include guard: USCXML_H_2WZ0PBQH */ diff --git a/src/uscxml/CMakeLists.txt b/src/uscxml/CMakeLists.txt index e98aed6..5549b84 100644 --- a/src/uscxml/CMakeLists.txt +++ b/src/uscxml/CMakeLists.txt @@ -2,37 +2,13 @@ # Actual files of core library ############################################################ -file(GLOB_RECURSE USCXML_SERVER - server/*.cpp - server/*.h -) -source_group("Interpreter" FILES ${USCXML_SERVER}) -list (APPEND USCXML_FILES ${USCXML_SERVER}) - -file(GLOB_RECURSE USCXML_UTIL - util/*.cpp - util/*.hpp - util/*.c - util/*.h -) -source_group("Interpreter" FILES ${USCXML_UTIL}) -list (APPEND USCXML_FILES ${USCXML_UTIL}) - -file(GLOB_RECURSE USCXML_DOM - dom/*.cpp - dom/*.hpp - dom/*.c - dom/*.h +file(GLOB_RECURSE USCXML_INTERPRETERS + interpreter/*.cpp + interpreter/*.h ) -source_group("Interpreter" FILES ${USCXML_DOM}) -list (APPEND USCXML_FILES ${USCXML_DOM}) +source_group("Interpreter" FILES ${USCXML_INTERPRETERS}) +list (APPEND USCXML_FILES ${USCXML_INTERPRETERS}) -file(GLOB_RECURSE USCXML_CONCURRENCY - concurrency/*.cpp - concurrency/*.h -) -source_group("Interpreter" FILES ${USCXML_CONCURRENCY}) -list (APPEND USCXML_FILES ${USCXML_CONCURRENCY}) file(GLOB_RECURSE USCXML_MESSAGES messages/*.cpp @@ -41,36 +17,32 @@ file(GLOB_RECURSE USCXML_MESSAGES source_group("Interpreter" FILES ${USCXML_MESSAGES}) list (APPEND USCXML_FILES ${USCXML_MESSAGES}) -if (NOT BUILD_MINIMAL) - file(GLOB_RECURSE USCXML_DEBUG - debug/*.cpp - debug/*.h - ) - source_group("Interpreter" FILES ${USCXML_DEBUG}) - list (APPEND USCXML_FILES ${USCXML_DEBUG}) - - file(GLOB_RECURSE USCXML_TRANSFORM - transform/*.cpp - transform/*.h - ) - source_group("Interpreter" FILES ${USCXML_TRANSFORM}) - list (APPEND USCXML_TRANSFORM_FILES ${USCXML_TRANSFORM}) -endif() -file(GLOB_RECURSE USCXML_INTERPRETERS - interpreter/*.cpp - interpreter/*.h +file(GLOB_RECURSE USCXML_DEBUG + debug/*.cpp + debug/*.h ) -source_group("Interpreter" FILES ${USCXML_INTERPRETERS}) -list (APPEND USCXML_FILES ${USCXML_INTERPRETERS}) +source_group("Interpreter" FILES ${USCXML_DEBUG}) +list (APPEND USCXML_FILES ${USCXML_DEBUG}) + + +file(GLOB_RECURSE USCXML_MISC + util/*.cpp + util/*.hpp + util/*.c + util/*.h +) +source_group("Interpreter" FILES ${USCXML_MISC}) +list (APPEND USCXML_FILES ${USCXML_MISC}) + + +file(GLOB USCXML_SERVER + server/*.cpp + server/*.h +) +source_group("Interpreter" FILES ${USCXML_SERVER}) +list (APPEND USCXML_FILES ${USCXML_SERVER}) -if(APPLE OR IOS) - file(GLOB USCXML_APPLE - *.mm - ) - source_group("Interpreter" FILES ${USCXML_APPLE}) - list (APPEND USCXML_FILES ${USCXML_APPLE}) -endif() file(GLOB USCXML_CORE ${CMAKE_SOURCE_DIR}/contrib/src/jsmn/jsmn.c @@ -78,46 +50,38 @@ file(GLOB USCXML_CORE *.cpp *.h ) - source_group("Interpreter" FILES ${USCXML_CORE}) list (APPEND USCXML_FILES ${USCXML_CORE}) + file(GLOB USCXML_PLUGINS - plugins/DataModel.h - plugins/EventHandler.h - plugins/ExecutableContent.h - plugins/Invoker.h - plugins/IOProcessor.h + plugins/*.cpp + plugins/*.h ) + source_group("Interpreter" FILES ${USCXML_PLUGINS}) list (APPEND USCXML_FILES ${USCXML_PLUGINS}) -if (BUILD_AS_PLUGINS) - list (APPEND USCXML_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/plugins) - file(GLOB PLUMA - plugins/Pluma/*.cpp - plugins/Pluma/*.h - plugins/*.cpp - plugins/*.h - ) - source_group("Interpreter" FILES ${PLUMA}) - list (APPEND USCXML_FILES ${PLUMA}) - add_definitions("-DBUILD_AS_PLUGINS") -endif() +file(GLOB_RECURSE USCXML_TRANSFORM + transform/*.cpp + transform/*.h +) +source_group("Interpreter" FILES ${USCXML_TRANSFORM}) +list (APPEND USCXML_TRANSFORM_FILES ${USCXML_TRANSFORM}) add_subdirectory(plugins/datamodel) -add_subdirectory(plugins/element) -add_subdirectory(plugins/ioprocessor) +# add_subdirectory(plugins/element) add_subdirectory(plugins/invoker) +add_subdirectory(plugins/ioprocessor) -SET(USCXML_INVOKERS ${USCXML_INVOKERS} PARENT_SCOPE) -SET(USCXML_IOPROCESSORS ${USCXML_IOPROCESSORS} PARENT_SCOPE) -SET(USCXML_ELEMENTS ${USCXML_ELEMENTS} PARENT_SCOPE) -SET(USCXML_DATAMODELS ${USCXML_DATAMODELS} PARENT_SCOPE) -SET(USCXML_LANGUAGE_BINDINGS ${USCXML_LANGUAGE_BINDINGS} PARENT_SCOPE) - -set(USCXML_INCLUDE_DIRS ${USCXML_INCLUDE_DIRS} PARENT_SCOPE) -set(USCXML_OPT_LIBS ${USCXML_OPT_LIBS} PARENT_SCOPE) +# SET(USCXML_INVOKERS ${USCXML_INVOKERS} PARENT_SCOPE) +# SET(USCXML_IOPROCESSORS ${USCXML_IOPROCESSORS} PARENT_SCOPE) +# SET(USCXML_ELEMENTS ${USCXML_ELEMENTS} PARENT_SCOPE) +# SET(USCXML_DATAMODELS ${USCXML_DATAMODELS} PARENT_SCOPE) +# SET(USCXML_LANGUAGE_BINDINGS ${USCXML_LANGUAGE_BINDINGS} PARENT_SCOPE) +# +# set(USCXML_INCLUDE_DIRS ${USCXML_INCLUDE_DIRS} PARENT_SCOPE) +# set(USCXML_OPT_LIBS ${USCXML_OPT_LIBS} PARENT_SCOPE) set(USCXML_FILES ${USCXML_FILES} PARENT_SCOPE) set(USCXML_TRANSFORM_FILES ${USCXML_TRANSFORM_FILES} PARENT_SCOPE) -SET(PLUMA ${PLUMA} PARENT_SCOPE) \ No newline at end of file +# SET(PLUMA ${PLUMA} PARENT_SCOPE) \ No newline at end of file diff --git a/src/uscxml/Common.h b/src/uscxml/Common.h index 9d35222..5b29427 100644 --- a/src/uscxml/Common.h +++ b/src/uscxml/Common.h @@ -42,9 +42,11 @@ #endif #ifdef _WIN32 -#include +typedef unsigned __int32 uint32_t; + // see http://stackoverflow.com/questions/1372480/c-redefinition-header-files #define _WINSOCKAPI_ // stops windows.h including winsock.h +#include #define WIN32_LEAN_AND_MEAN #include #undef WIN32_LEAN_AND_MEAN @@ -52,6 +54,57 @@ #include #endif +#define PIMPL_OPERATORS(type) \ +\ +type() : _impl() { }\ +type(const std::shared_ptr impl) : _impl(impl) { }\ +type(const type& other) : _impl(other._impl) { }\ +virtual ~type() { };\ +\ +operator bool() const {\ + return !!_impl;\ +}\ +bool operator< (const type& other) const {\ + return _impl < other._impl;\ +}\ +bool operator==(const type& other) const {\ + return _impl == other._impl;\ +}\ +bool operator!=(const type& other) const {\ + return _impl != other._impl;\ +}\ +type& operator= (const type& other) {\ + _impl = other._impl;\ + return *this;\ +} + +#define PIMPL_OPERATORS2(type, base) \ +\ +type() : _impl() {}\ +type(std::shared_ptr const impl) : base(impl), _impl(impl) { }\ +type(const type& other) : base(other._impl), _impl(other._impl) { }\ +virtual ~type() {};\ +\ +operator bool() const {\ + return !!_impl;\ +}\ +bool operator< (const type& other) const {\ + return _impl < other._impl;\ +}\ +bool operator==(const type& other) const {\ + return _impl == other._impl;\ +}\ +bool operator!=(const type& other) const {\ + return _impl != other._impl;\ +}\ +type& operator= (const type& other) {\ + _impl = other._impl;\ + base::_impl = _impl;\ + return *this;\ +} + + + #if defined(_WIN32) inline int setenv(const char *name, const char *value, int overwrite) { int errcode = 0; diff --git a/src/uscxml/Convenience.cpp b/src/uscxml/Convenience.cpp deleted file mode 100644 index 6534636..0000000 --- a/src/uscxml/Convenience.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include -#include -#include -#include - -namespace uscxml { -bool isnan(double x) { - return x != x; -} - -bool isNumeric(const char* pszInput, int nNumberBase) { - std::string base = ".-0123456789ABCDEF"; - std::string input = pszInput; - return (input.find_first_not_of(base.substr(0, nNumberBase + 2)) == std::string::npos); -} - -bool isInteger(const char* pszInput, int nNumberBase) { - std::string base = "-0123456789ABCDEF"; - std::string input = pszInput; - return (input.find_first_not_of(base.substr(0, nNumberBase + 1)) == std::string::npos); -} - -bool iequals(const std::string& a, const std::string& b) { - // this impementation beats boost::iequals 2700ms vs 2100ms for test-performance.scxml - we don't care for non-ascii yet - unsigned int size = a.size(); - if (b.size() != size) - return false; - for (unsigned int i = 0; i < size; ++i) - if (tolower(a[i]) != tolower(b[i])) - return false; - return true; -} - -bool equals(const std::string& a, const std::string& b) { - unsigned int size = a.size(); - if (b.size() != size) - return false; - for (unsigned int i = 0; i < size; ++i) - if (a[i] != b[i]) - return false; - return true; -} - -bool stringIsTrue(const std::string& value) { - return (iequals(value, "on") || - iequals(value, "true") || - iequals(value, "1") || - iequals(value, "yes")); -} - -bool envVarIsTrue(const char* name) { - const char* value = getenv(name); - if (value == NULL) - return false; - return stringIsTrue(value); -} - -bool envVarIEquals(const char* name, const char* value) { - const char* envVarValue = getenv(name); - if (envVarValue == NULL) - return false; - return iequals(envVarValue, value); -} - -std::string escape(const std::string& a) { - std::stringstream b; - // see http://en.cppreference.com/w/cpp/language/escape - - std::string::const_iterator it = a.begin(); - while (it != a.end()) { - char c = *it++; - switch (c) { - case '\\': - b << '\\' << '\\'; - break; - case '\0': - b << '\\' << '0'; - break; - case '"': - b << '\\' << '"'; - break; - case '\a': - b << '\\' << 'a'; - break; - case '\b': - b << '\\' << 'b'; - break; - case '\f': - b << '\\' << 'f'; - break; - case '\n': - b << '\\' << 'n'; - break; - case '\r': - b << '\\' << 'r'; - break; - case '\t': - b << '\\' << 't'; - break; - case '\v': - b << '\\' << 'v'; - break; - default: - b << c; - } - } - - return b.str(); -} - -std::string unescape(const std::string& a) { - std::stringstream b; - // see http://en.cppreference.com/w/cpp/language/escape - - std::string::const_iterator it = a.begin(); - while (it != a.end()) { - char c = *it++; - if (c == '\\' && it != a.end()) { - switch (*it++) { - case '\\': - c = '\\'; - break; - case '0': - c = '\0'; - break; - case '"': - c = '"'; - break; - case 'a': - c = '\a'; - break; - case 'b': - c = '\b'; - break; - case 'f': - c = '\f'; - break; - case 'n': - c = '\n'; - break; - case 'r': - c = '\r'; - break; - case 't': - c = '\t'; - break; - case 'v': - c = '\v'; - break; - } - } - b << c; - } - - return b.str(); -} - -} diff --git a/src/uscxml/Convenience.h b/src/uscxml/Convenience.h deleted file mode 100644 index d715d3e..0000000 --- a/src/uscxml/Convenience.h +++ /dev/null @@ -1,230 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef CONVENIENCE_H_LU7GZ6CB -#define CONVENIENCE_H_LU7GZ6CB - -#include "uscxml/Common.h" -#include -#include -#include -#include - -namespace uscxml { -inline bool isnan(double x); - -// see http://stackoverflow.com/questions/228005/alternative-to-itoa-for-converting-integer-to-string-c -template std::string toStr(T tmp) { - std::ostringstream out; - out.precision(std::numeric_limits::digits10 + 1); - out << tmp; - return out.str(); -} - -template T strTo(std::string tmp) { - T output; - std::istringstream in(tmp); - in >> output; - return output; -} - -class USCXML_API NumAttr { -public: - NumAttr(const std::string& str) { - size_t valueStart = str.find_first_of("0123456789."); - if (valueStart != std::string::npos) { - size_t valueEnd = str.find_last_of("0123456789."); - if (valueEnd != std::string::npos) { - value = str.substr(valueStart, (valueEnd - valueStart) + 1); - size_t unitStart = str.find_first_not_of(" \t", valueEnd + 1); - if (unitStart != std::string::npos) { - size_t unitEnd = str.find_last_of(" \t"); - if (unitEnd != std::string::npos && unitEnd > unitStart) { - unit = str.substr(unitStart, unitEnd - unitStart); - } else { - unit = str.substr(unitStart, str.length() - unitStart); - } - } - } - } - } - - std::string value; - std::string unit; -}; - -bool isNumeric(const char* pszInput, int nNumberBase); -bool isInteger( const char* pszInput, int nNumberBase); -bool iequals(const std::string& a, const std::string& b); -bool equals(const std::string& a, const std::string& b); -bool stringIsTrue(const std::string& value); -bool envVarIsTrue(const char* name); -bool envVarIEquals(const char* name, const char* value); - -std::string escape(const std::string& a); -std::string unescape(const std::string& a); - -// see http://www.cplusplus.com/forum/general/27544/ - -// Little-endian operating systems: -//--------------------------------- -// Linux on x86, x64, Alpha and Itanium -// Mac OS on x86, x64 -// Solaris on x86, x64, PowerPC -// Tru64 on Alpha -// Windows on x86, x64 and Itanium - -// Big-endian operating systems: -//------------------------------ -// AIX on POWER -// AmigaOS on PowerPC and 680x0 -// HP-UX on Itanium and PA-RISC -// Linux on MIPS, SPARC, PA-RISC, POWER, PowerPC, and 680x0 -// Mac OS on PowerPC and 680x0 -// Solaris on SPARC - -/** -Detect endianness, see http://stackoverflow.com/questions/809902/64-bit-ntohl-in-c -union { - unsigned long long ull; - char c[8]; -} x; -x.ull = 0x0123456789abcdef; // may need special suffix for ULL. -*/ - -enum endianness { - little_endian, - big_endian, - network_endian = big_endian, - -#if defined(BOOST_LITTLE_ENDIAN) - host_endian = little_endian -#elif defined(BOOST_BIG_ENDIAN) - host_endian = big_endian -#else -#error "unable to determine system endianness" -#endif -}; - -namespace detail { - -template -struct swap_bytes { - inline T operator()(T val) { - throw std::out_of_range("data size"); - } -}; - -template -struct swap_bytes { - inline T operator()(T val) { - return val; - } -}; - -template -struct swap_bytes { // for 16 bit - inline T operator()(T val) { - return ((((val) >> 8) & 0xff) | (((val) & 0xff) << 8)); - } -}; - -template -struct swap_bytes { // for 32 bit - inline T operator()(T val) { -#if defined(_USE_BUILTIN_BSWAPS) && defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4) - return __builtin_bswap32(val); -#else - return ((((val) & 0xff000000) >> 24) | - (((val) & 0x00ff0000) >> 8) | - (((val) & 0x0000ff00) << 8) | - (((val) & 0x000000ff) << 24)); -#endif - } -}; - -template<> -struct swap_bytes { - inline float operator()(float val) { - uint32_t mem = swap_bytes()(*(uint32_t*)&val); - return *(float*)&mem; - } -}; - -template -struct swap_bytes { // for 64 bit - inline T operator()(T val) { -#if defined(_USE_BUILTIN_BSWAPS) && defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4) - return __builtin_bswap64(val); -#else - return ((((val) & 0xff00000000000000ull) >> 56) | - (((val) & 0x00ff000000000000ull) >> 40) | - (((val) & 0x0000ff0000000000ull) >> 24) | - (((val) & 0x000000ff00000000ull) >> 8 ) | - (((val) & 0x00000000ff000000ull) << 8 ) | - (((val) & 0x0000000000ff0000ull) << 24) | - (((val) & 0x000000000000ff00ull) << 40) | - (((val) & 0x00000000000000ffull) << 56)); -#endif - } -}; - -template<> -struct swap_bytes { - inline double operator()(double val) { - uint64_t mem = swap_bytes()(*(uint64_t*)&val); - return *(double*)&mem; - } -}; - -template -struct do_byte_swap { - inline T operator()(T value) { - return swap_bytes()(value); - } -}; -// specialisations when attempting to swap to the same endianess -template struct do_byte_swap { - inline T operator()(T value) { - return value; - } -}; -template struct do_byte_swap { - inline T operator()(T value) { - return value; - } -}; - -} // namespace detail - -template -inline T byte_swap(T value) { - // ensure the data is only 1, 2, 4 or 8 bytes - BOOST_STATIC_ASSERT(sizeof(T) == 1 || sizeof(T) == 2 || sizeof(T) == 4 || sizeof(T) == 8); - // ensure we're only swapping arithmetic types - BOOST_STATIC_ASSERT(boost::is_arithmetic::value); - - return detail::do_byte_swap()(value); -} - - -} - - -#endif /* end of include guard: CONVENIENCE_H_LU7GZ6CB */ diff --git a/src/uscxml/Factory.cpp b/src/uscxml/Factory.cpp deleted file mode 100644 index 9ff2148..0000000 --- a/src/uscxml/Factory.cpp +++ /dev/null @@ -1,756 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/config.h" - -#include "uscxml/Factory.h" -#include "uscxml/Message.h" -#include "uscxml/Interpreter.h" -#include - -#include "uscxml/server/InterpreterServlet.h" - -#include "uscxml/plugins/datamodel/null/NULLDataModel.h" - -// see http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system - -#ifdef BUILD_AS_PLUGINS -# include "uscxml/plugins/Plugins.h" -#else - -# include "uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h" -# include "uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.h" -# include "uscxml/plugins/invoker/scxml/USCXMLInvoker.h" - -# ifndef BUILD_MINIMAL -# include "uscxml/plugins/invoker/imap/IMAPInvoker.h" -# ifdef CURL_HAS_SMTP -# include "uscxml/plugins/invoker/smtp/SMTPInvoker.h" -# endif -# include "uscxml/plugins/invoker/xhtml/XHTMLInvoker.h" -# include "uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.h" -# include "uscxml/plugins/invoker/system/SystemInvoker.h" -# include "uscxml/plugins/invoker/http/HTTPServletInvoker.h" -# include "uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h" - -# include "uscxml/plugins/datamodel/xpath/XPathDataModel.h" -# include "uscxml/plugins/datamodel/promela/PromelaDataModel.h" - -# include "uscxml/plugins/element/file/FileElement.h" -# include "uscxml/plugins/element/fetch/FetchElement.h" -# include "uscxml/plugins/element/respond/RespondElement.h" -# include "uscxml/plugins/element/postpone/PostponeElement.h" - -# include "uscxml/plugins/ioprocessor/comet/CometIOProcessor.h" -# include "uscxml/plugins/invoker/vxml/VoiceXMLInvoker.h" - -# endif - - -#ifdef PROTOBUF_FOUND -//# include "uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.h" -#endif - -# if (defined UMUNDO_FOUND && defined PROTOBUF_FOUND) -# include "uscxml/plugins/invoker/umundo/UmundoInvoker.h" -#endif - -# ifdef OPENSCENEGRAPH_FOUND -# include "uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h" -# include "uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.h" -# endif - -# ifdef MILES_FOUND -# include "uscxml/plugins/invoker/miles/MilesSessionInvoker.h" -//# include "uscxml/plugins/invoker/miles/SpatialAudio.h" -# endif - -# ifdef FFMPEG_FOUND -# include "uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h" -# endif - -# ifdef LIBICAL_FOUND -# include "uscxml/plugins/invoker/calendar/CalendarInvoker.h" -# endif - -# ifdef LIBPURPLE_FOUND -# include "uscxml/plugins/invoker/im/IMInvoker.h" -# endif - -# if (defined EXPECT_FOUND && defined TCL_FOUND) -# include "uscxml/plugins/invoker/expect/ExpectInvoker.h" -# endif - -#ifdef OPENAL_FOUND -# include "uscxml/plugins/invoker/audio/OpenALInvoker.h" -#endif - -# ifdef CORELOCATION_FOUND -# include "uscxml/plugins/invoker/location/CoreLocation/LocationInvoker.h" -# endif - -# ifdef V8_FOUND -# include "uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h" -# endif - -# ifdef JSC_FOUND -# include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h" -# endif - -# ifdef SWI_FOUND -# include "uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h" -# endif - -# ifdef LUA_FOUND -# include "uscxml/plugins/datamodel/lua/LuaDataModel.h" -# endif - -# if 0 -# include "uscxml/plugins/element/mmi/MMIEvents.h" -# endif - -#endif - -#define ELEMENT_MMI_REGISTER(class)\ -class##Element* class = new class##Element(); \ -registerExecutableContent(class); - - -namespace uscxml { - -Factory::Factory(Factory* parentFactory) : _parentFactory(parentFactory) { -} - -Factory::Factory(const std::string& pluginPath, Factory* parentFactory) : _parentFactory(parentFactory), _pluginPath(pluginPath) { - registerPlugins(); -} - -Factory::Factory(const std::string& pluginPath) : _parentFactory(NULL), _pluginPath(pluginPath) { - registerPlugins(); -} - -void Factory::setDefaultPluginPath(const std::string& path) { - _defaultPluginPath = path; -} -std::string Factory::getDefaultPluginPath() { - return _defaultPluginPath; -} - -void Factory::registerPlugins() { - { - InterpreterHTTPServlet* ioProcessor = new InterpreterHTTPServlet(); - registerIOProcessor(ioProcessor); - } - { - InterpreterWebSocketServlet* ioProcessor = new InterpreterWebSocketServlet(); - registerIOProcessor(ioProcessor); - } - { - NULLDataModel* dataModel = new NULLDataModel(); - registerDataModel(dataModel); - } - -#ifdef BUILD_AS_PLUGINS - // these are part of core - - if (_pluginPath.length() == 0) { - // try to read USCXML_PLUGIN_PATH environment variable - _pluginPath = (getenv("USCXML_PLUGIN_PATH") != NULL ? getenv("USCXML_PLUGIN_PATH") : ""); - } - if (_pluginPath.length() > 0) { - pluma.acceptProviderType(); - pluma.acceptProviderType(); - pluma.acceptProviderType(); - pluma.acceptProviderType(); - pluma.loadFromFolder(_pluginPath); - - std::vector invokerProviders; - pluma.getProviders(invokerProviders); - for (std::vector::iterator it = invokerProviders.begin() ; it != invokerProviders.end() ; ++it) { - InvokerImpl* invoker = (*it)->create(); - registerInvoker(invoker); - } - - std::vector ioProcessorProviders; - pluma.getProviders(ioProcessorProviders); - for (std::vector::iterator it = ioProcessorProviders.begin() ; it != ioProcessorProviders.end() ; ++it) { - IOProcessorImpl* ioProcessor = (*it)->create(); - registerIOProcessor(ioProcessor); - } - - std::vector dataModelProviders; - pluma.getProviders(dataModelProviders); - for (std::vector::iterator it = dataModelProviders.begin() ; it != dataModelProviders.end() ; ++it) { - DataModelImpl* dataModel = (*it)->create(); - registerDataModel(dataModel); - } - - std::vector execContentProviders; - pluma.getProviders(execContentProviders); - for (std::vector::iterator it = execContentProviders.begin() ; it != execContentProviders.end() ; ++it) { - ExecutableContentImpl* execContent = (*it)->create(); - registerExecutableContent(execContent); - } - - } else { - LOG(WARNING) << "No path to plugins known, export USCXML_PLUGIN_PATH or pass path as parameter"; - } -#else - if (_pluginPath.length() > 0) - LOG(WARNING) << "Plugin path is given, but uscxml is compiled without support"; - -#ifndef BUILD_MINIMAL - -# if (defined UMUNDO_FOUND && defined PROTOBUF_FOUND) - { - UmundoInvoker* invoker = new UmundoInvoker(); - registerInvoker(invoker); - } -#if 0 - { - VoiceXMLInvoker* invoker = new VoiceXMLInvoker(); - registerInvoker(invoker); - } -#endif -#endif - -#ifdef MILES_FOUND - { - MilesSessionInvoker* invoker = new MilesSessionInvoker(); - registerInvoker(invoker); - } - // { - // SpatialAudio* invoker = new SpatialAudio(); - // registerInvoker(invoker); - // } -#endif - -#ifdef FFMPEG_FOUND - { - FFMPEGInvoker* invoker = new FFMPEGInvoker(); - registerInvoker(invoker); - } -#endif - -#ifdef LIBICAL_FOUND - { - CalendarInvoker* invoker = new CalendarInvoker(); - registerInvoker(invoker); - } -#endif - -#ifdef LIBPURPLE_FOUND - { - IMInvoker* invoker = new IMInvoker(); - registerInvoker(invoker); - } -#endif - -#if (defined EXPECT_FOUND && defined TCL_FOUND) - { - ExpectInvoker* invoker = new ExpectInvoker(); - registerInvoker(invoker); - } -#endif - -#if (defined OPENAL_FOUND && (defined LIBSNDFILE_FOUND || defined AUDIOTOOLBOX_FOUND)) - { - OpenALInvoker* invoker = new OpenALInvoker(); - registerInvoker(invoker); - } -#endif - -#ifdef OPENSCENEGRAPH_FOUND - { - OSGInvoker* invoker = new OSGInvoker(); - registerInvoker(invoker); - } - { - OSGConverter* invoker = new OSGConverter(); - registerInvoker(invoker); - } -#endif - -#if (defined V8_FOUND && defined BUILD_DM_ECMA) - { - V8DataModel* dataModel = new V8DataModel(); - registerDataModel(dataModel); - } -#endif - -#if (defined JSC_FOUND && defined BUILD_DM_ECMA) - { - JSCDataModel* dataModel = new JSCDataModel(); - registerDataModel(dataModel); - } -#endif - -#if (defined SWI_FOUND && defined BUILD_DM_PROLOG) - { - SWIDataModel* dataModel = new SWIDataModel(); - registerDataModel(dataModel); - } -#endif - -#if (defined LUA_FOUND && defined BUILD_DM_LUA) - { - LuaDataModel* dataModel = new LuaDataModel(); - registerDataModel(dataModel); - } -#endif - -#if (defined BUILD_DM_PROMELA) - { - PromelaDataModel* dataModel = new PromelaDataModel(); - registerDataModel(dataModel); - } -#endif - -#ifdef BUILD_DM_XPATH - { - XPathDataModel* dataModel = new XPathDataModel(); - registerDataModel(dataModel); - } -#endif - -#ifdef PROTOBUF_FOUND - { - // MMIHTTPIOProcessor* ioProcessor = new MMIHTTPIOProcessor(); - // registerIOProcessor(ioProcessor); - } -#endif - -#ifdef CURL_HAS_SMTP - { - SMTPInvoker* invoker = new SMTPInvoker(); - registerInvoker(invoker); - } -#endif - - - // these are always available when not building minimal - { - XHTMLInvoker* invoker = new XHTMLInvoker(); - registerInvoker(invoker); - } - { - IMAPInvoker* invoker = new IMAPInvoker(); - registerInvoker(invoker); - } - { - HTTPServletInvoker* invoker = new HTTPServletInvoker(); - registerInvoker(invoker); - } - { - HeartbeatInvoker* invoker = new HeartbeatInvoker(); - registerInvoker(invoker); - } - { - DirMonInvoker* invoker = new DirMonInvoker(); - registerInvoker(invoker); - } - { - SystemInvoker* invoker = new SystemInvoker(); - registerInvoker(invoker); - } - { - VoiceXMLInvoker* invoker = new VoiceXMLInvoker(); - registerInvoker(invoker); - } - - { - FetchElement* element = new FetchElement(); - registerExecutableContent(element); - } - { - RespondElement* element = new RespondElement(); - registerExecutableContent(element); - } - { - PostponeElement* element = new PostponeElement(); - registerExecutableContent(element); - } - { - FileElement* element = new FileElement(); - registerExecutableContent(element); - } - -#endif - - { - USCXMLInvoker* invoker = new USCXMLInvoker(); - registerInvoker(invoker); - } - - { - BasicHTTPIOProcessor* ioProcessor = new BasicHTTPIOProcessor(); - registerIOProcessor(ioProcessor); - } - - { - SCXMLIOProcessor* ioProcessor = new SCXMLIOProcessor(); - registerIOProcessor(ioProcessor); - } - -#endif -} - -Factory::~Factory() { -#ifdef BUILD_AS_PLUGINS - pluma.unloadAll(); -#endif -} - -#define LIST_COMPONENTS(type, name) \ -std::map::iterator iter = name.begin(); \ -while(iter != name.end()) { \ - std::list names = iter->second->getNames(); \ - std::list::iterator nameIter = names.begin(); \ - if (nameIter != names.end()) { \ - std::cout << "\t" << *nameIter; \ - nameIter++; \ - std::string seperator = ""; \ - if (nameIter != names.end()) { \ - std::cout << "\t("; \ - while(nameIter != names.end()) { \ - std::cout << seperator << *nameIter; \ - seperator = ", "; \ - nameIter++; \ - } \ - std::cout << ")"; \ - } \ - std::cout << std::endl; \ - } \ - iter++; \ -} - - -void Factory::listComponents() { - { - std::cout << "Available Datamodels:" << std::endl; - LIST_COMPONENTS(DataModelImpl, _dataModels); - std::cout << std::endl; - } - { - std::cout << "Available Invokers:" << std::endl; - LIST_COMPONENTS(InvokerImpl, _invokers); - std::cout << std::endl; - } - { - std::cout << "Available I/O Processors:" << std::endl; - LIST_COMPONENTS(IOProcessorImpl, _ioProcessors); - std::cout << std::endl; - } - { - std::cout << "Available Elements:" << std::endl; - std::map, ExecutableContentImpl*>::iterator iter = _executableContent.begin(); - while(iter != _executableContent.end()) { - std::cout << "\t" << iter->second->getNamespace() << " / " << iter->second->getLocalName() << std::endl; - iter++; - } - std::cout << std::endl; - } -} - -void Factory::registerIOProcessor(IOProcessorImpl* ioProcessor) { - std::list names = ioProcessor->getNames(); - std::list::iterator nameIter = names.begin(); - if (nameIter != names.end()) { - std::string canonicalName = *nameIter; - _ioProcessors[canonicalName] = ioProcessor; - while(nameIter != names.end()) { - _ioProcessorAliases[*nameIter] = canonicalName; - nameIter++; - } - } -} - -void Factory::registerDataModel(DataModelImpl* dataModel) { - std::list names = dataModel->getNames(); - std::list::iterator nameIter = names.begin(); - if (nameIter != names.end()) { - std::string canonicalName = *nameIter; - _dataModels[canonicalName] = dataModel; - while(nameIter != names.end()) { - _dataModelAliases[*nameIter] = canonicalName; - nameIter++; - } - } -} - -void Factory::registerInvoker(InvokerImpl* invoker) { - std::list names = invoker->getNames(); - std::list::iterator nameIter = names.begin(); - if (nameIter != names.end()) { - std::string canonicalName = *nameIter; - _invokers[canonicalName] = invoker; - while(nameIter != names.end()) { - _invokerAliases[*nameIter] = canonicalName; - nameIter++; - } - } -} - -void Factory::registerExecutableContent(ExecutableContentImpl* executableContent) { - std::string localName = executableContent->getLocalName(); - std::string nameSpace = executableContent->getNamespace(); - _executableContent[std::make_pair(localName, nameSpace)] = executableContent; -} - -std::map Factory::getIOProcessors() { - std::map ioProcs; - if (_parentFactory) { - ioProcs = _parentFactory->getIOProcessors(); - } - - std::map::iterator ioProcIter = _ioProcessors.begin(); - while(ioProcIter != _ioProcessors.end()) { - ioProcs.insert(std::make_pair(ioProcIter->first, ioProcIter->second)); - ioProcIter++; - } - - return ioProcs; -} - -bool Factory::hasInvoker(const std::string& type) { - if (_invokerAliases.find(type) != _invokerAliases.end()) { - return true; - } else if(_parentFactory) { - return _parentFactory->hasInvoker(type); - } - return false; -} - -boost::shared_ptr Factory::createInvoker(const std::string& type, InterpreterImpl* interpreter) { - - // do we have this type ourself? - if (_invokerAliases.find(type) != _invokerAliases.end()) { - std::string canonicalName = _invokerAliases[type]; - if (_invokers.find(canonicalName) != _invokers.end()) { - boost::shared_ptr invoker = _invokers[canonicalName]->create(interpreter); - invoker->setInterpreter(interpreter); - return invoker; - } - } - - // lookup in parent factory - if (_parentFactory) { - return _parentFactory->createInvoker(type, interpreter); - } else { - ERROR_EXECUTION_THROW("No Invoker named '" + type + "' known"); - } - - return boost::shared_ptr(); -} - - -bool Factory::hasDataModel(const std::string& type) { - if (_dataModelAliases.find(type) != _dataModelAliases.end()) { - return true; - } else if(_parentFactory) { - return _parentFactory->hasDataModel(type); - } - return false; -} - -boost::shared_ptr Factory::createDataModel(const std::string& type, InterpreterInfo* interpreter) { - - // do we have this type ourself? - if (_dataModelAliases.find(type) != _dataModelAliases.end()) { - std::string canonicalName = _dataModelAliases[type]; - if (_dataModels.find(canonicalName) != _dataModels.end()) { - boost::shared_ptr dataModel = _dataModels[canonicalName]->create(interpreter); - dataModel->setInterpreter(interpreter); - return dataModel; - } - } - - // lookup in parent factory - if (_parentFactory) { - return _parentFactory->createDataModel(type, interpreter); - } else { - ERROR_EXECUTION_THROW("No Datamodel name '" + type + "' known"); - } - - return boost::shared_ptr(); -} - - -bool Factory::hasIOProcessor(const std::string& type) { - if (_ioProcessorAliases.find(type) != _ioProcessorAliases.end()) { - return true; - } else if(_parentFactory) { - return _parentFactory->hasIOProcessor(type); - } - return false; -} - -boost::shared_ptr Factory::createIOProcessor(const std::string& type, InterpreterImpl* interpreter) { - // do we have this type ourself? - if (_ioProcessorAliases.find(type) != _ioProcessorAliases.end()) { - std::string canonicalName = _ioProcessorAliases[type]; - if (_ioProcessors.find(canonicalName) != _ioProcessors.end()) { - boost::shared_ptr ioProc = _ioProcessors[canonicalName]->create(interpreter); - ioProc->setInterpreter(interpreter); - return ioProc; - } - } - - // lookup in parent factory - if (_parentFactory) { - return _parentFactory->createIOProcessor(type, interpreter); - } else { - ERROR_EXECUTION_THROW("No IOProcessor named '" + type + "' known"); - } - - return boost::shared_ptr(); -} - -bool Factory::hasExecutableContent(const std::string& localName, const std::string& nameSpace) { - std::string actualNameSpace = (nameSpace.length() == 0 ? "http://www.w3.org/2005/07/scxml" : nameSpace); - if (_executableContent.find(std::make_pair(localName, actualNameSpace)) != _executableContent.end()) { - return true; - } else if(_parentFactory) { - return _parentFactory->hasExecutableContent(localName, nameSpace); - } - return false; -} - -boost::shared_ptr Factory::createExecutableContent(const std::string& localName, const std::string& nameSpace, InterpreterImpl* interpreter) { - // do we have this type in this factory? - std::string actualNameSpace = (nameSpace.length() == 0 ? "http://www.w3.org/2005/07/scxml" : nameSpace); - if (_executableContent.find(std::make_pair(localName, actualNameSpace)) != _executableContent.end()) { - boost::shared_ptr execContent = _executableContent[std::make_pair(localName, actualNameSpace)]->create(interpreter); - execContent->setInterpreter(interpreter); - return execContent; - } - - // lookup in parent factory - if (_parentFactory) { - return _parentFactory->createExecutableContent(localName, nameSpace, interpreter); - } else { - ERROR_EXECUTION_THROW("No Executable content name '" + localName + "' in namespace '" + actualNameSpace + "' known"); - } - - return boost::shared_ptr(); - -} - -void DataModelImpl::addExtension(DataModelExtension* ext) { - ERROR_EXECUTION_THROW("DataModel does not support extensions"); -} - -size_t DataModelImpl::replaceExpressions(std::string& content) { - std::stringstream ss; - size_t replacements = 0; - size_t indent = 0; - size_t pos = 0; - size_t start = std::string::npos; - size_t end = 0; - while (true) { - // find any of ${} - pos = content.find_first_of("${}", pos); - if (pos == std::string::npos) { - ss << content.substr(end, content.length() - end); - break; - } - if (content[pos] == '$') { - if (content.size() > pos && content[pos+1] == '{') { - pos++; - start = pos + 1; - // copy everything in between - ss << content.substr(end, (start - 2) - end); - } - } else if (content[pos] == '{' && start != std::string::npos) { - indent++; - } else if (content[pos] == '}' && start != std::string::npos) { - if (!indent) { - end = pos; - // we found a token to substitute - std::string expr = content.substr(start, end - start); - end++; - try { - Data data = getStringAsData(expr); -// if (data.type == Data::VERBATIM) { -// ss << "\"" << data.atom << "\""; -// } else { -// ss << data.atom; -// } - if (data.atom.length() > 0) { - ss << data.atom; - } else { - ss << Data::toJSON(data); - } - replacements++; - } catch (Event e) { - // insert unsubstituted - start -= 2; - ss << content.substr(start, end - start); - } - start = std::string::npos; - } else { - indent--; - } - } - pos++; - } - if (replacements) - content = ss.str(); - - return replacements; -} - - -Factory* Factory::getInstance() { - if (_instance == NULL) { - _instance = new Factory(Factory::_defaultPluginPath); - } - return _instance; -} - -void EventHandlerImpl::returnErrorExecution(const std::string& cause) { - ERROR_EXECUTION(exc, cause); - returnEvent(exc); -} - -void EventHandlerImpl::returnErrorCommunication(const std::string& cause) { - ERROR_COMMUNICATION(exc, cause); - returnEvent(exc); -} - -void EventHandlerImpl::returnEvent(Event& event, bool internal) { - if (event.invokeid.length() == 0) - event.invokeid = _invokeId; - if (event.eventType == 0) - event.eventType = (internal ? Event::INTERNAL : Event::EXTERNAL); - if (event.origin.length() == 0 && _invokeId.length() > 0) - event.origin = "#_" + _invokeId; - if (event.origintype.length() == 0) - event.origintype = _type; - - if (internal) { - _interpreter->receiveInternal(event); - } else { - _interpreter->receive(event); - } -} - -Factory* Factory::_instance = NULL; -std::string Factory::_defaultPluginPath; -} \ No newline at end of file diff --git a/src/uscxml/Factory.h b/src/uscxml/Factory.h deleted file mode 100644 index 4fdd322..0000000 --- a/src/uscxml/Factory.h +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef FACTORY_H_5WKLGPRB -#define FACTORY_H_5WKLGPRB - -#include "uscxml/Common.h" -#include "uscxml/InterpreterInfo.h" - -#include "uscxml/plugins/ExecutableContent.h" -#include "uscxml/plugins/EventHandler.h" -#include "uscxml/plugins/IOProcessor.h" -#include "uscxml/plugins/Invoker.h" -#include "uscxml/plugins/DataModel.h" - -#include - -#ifdef BUILD_AS_PLUGINS -#include "Pluma/Pluma.hpp" -#endif - -#include -#include -#include -#include - -namespace uscxml { - -class InterpreterImpl; - - -class USCXML_API Factory { -public: - Factory(Factory* parentFactory); - Factory(const std::string& pluginPath, Factory* parentFactory); - - void registerIOProcessor(IOProcessorImpl* ioProcessor); - void registerDataModel(DataModelImpl* dataModel); - void registerInvoker(InvokerImpl* invoker); - void registerExecutableContent(ExecutableContentImpl* executableContent); - - boost::shared_ptr createDataModel(const std::string& type, InterpreterInfo* interpreter); - boost::shared_ptr createIOProcessor(const std::string& type, InterpreterImpl* interpreter); - boost::shared_ptr createInvoker(const std::string& type, InterpreterImpl* interpreter); - boost::shared_ptr createExecutableContent(const std::string& localName, const std::string& nameSpace, InterpreterImpl* interpreter); - - bool hasDataModel(const std::string& type); - bool hasIOProcessor(const std::string& type); - bool hasInvoker(const std::string& type); - bool hasExecutableContent(const std::string& localName, const std::string& nameSpace); - - std::map getIOProcessors(); - - void listComponents(); - - static Factory* getInstance(); - - static void setDefaultPluginPath(const std::string& path); - static std::string getDefaultPluginPath(); - -protected: - std::map _dataModels; - std::map _dataModelAliases; - std::map _ioProcessors; - std::map _ioProcessorAliases; - std::map _invokers; - std::map _invokerAliases; - std::map, ExecutableContentImpl*> _executableContent; - -#ifdef BUILD_AS_PLUGINS - pluma::Pluma pluma; -#endif - - void registerPlugins(); - - Factory(const std::string&); - ~Factory(); - Factory* _parentFactory; - std::string _pluginPath; - static Factory* _instance; - static std::string _defaultPluginPath; - -}; - - -} - -#endif /* end of include guard: FACTORY_H_5WKLGPRB */ diff --git a/src/uscxml/Interpreter.cpp b/src/uscxml/Interpreter.cpp index 0fa366b..d6f61a2 100644 --- a/src/uscxml/Interpreter.cpp +++ b/src/uscxml/Interpreter.cpp @@ -20,126 +20,232 @@ #include "uscxml/config.h" #include "uscxml/Common.h" #include "uscxml/Interpreter.h" -#include "uscxml/URL.h" -#include "uscxml/UUID.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/dom/NameSpacingParser.h" -#include "uscxml/transform/FlatStateIdentifier.h" -#include "uscxml/transform/ChartToFSM.h" // only for testing +#include "uscxml/util/DOM.h" +#include "uscxml/util/URL.h" -#include "getopt.h" - -#include "uscxml/plugins/invoker/http/HTTPServletInvoker.h" -#include "uscxml/server/InterpreterServlet.h" -#include "uscxml/concurrency/DelayedEventQueue.h" - -#include -#include -#include - -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include "easylogging++.h" -#include #include -#include +#include #include #include +#include +#include -#include "uscxml/Factory.h" - -#if 0 -# define INTERPRETER_IMPL InterpreterDraft6 -# include "uscxml/interpreter/InterpreterDraft6.h" -#elif 1 -# define INTERPRETER_IMPL InterpreterRC -# include "uscxml/interpreter/InterpreterRC.h" -#else -# define INTERPRETER_IMPL InterpreterFast -# include "uscxml/interpreter/InterpreterFast.h" -#endif +#include "getopt.h" + +#include "easylogging++.h" +INITIALIZE_EASYLOGGINGPP #define VERBOSE 0 -/// valid interpreter state transitions -#define VALID_FROM_INSTANTIATED(newState) ( \ - newState == USCXML_MICROSTEPPED || \ - newState == USCXML_INITIALIZED || \ - newState == USCXML_DESTROYED\ -) - -#define VALID_FROM_FAULTED(newState) ( \ - newState == USCXML_DESTROYED\ -) - -#define VALID_FROM_INITIALIZED(newState) ( \ - newState == USCXML_MICROSTEPPED || \ - newState == USCXML_FINISHED || \ - newState == USCXML_DESTROYED \ -) - -#define VALID_FROM_MICROSTEPPED(newState) ( \ - newState == USCXML_DESTROYED || \ - newState == USCXML_MACROSTEPPED || \ - newState == USCXML_MICROSTEPPED || \ - newState == USCXML_FINISHED \ -) - -#define VALID_FROM_MACROSTEPPED(newState) ( \ - newState == USCXML_DESTROYED || \ - newState == USCXML_MICROSTEPPED || \ - newState == USCXML_MACROSTEPPED || \ - newState == USCXML_IDLE || \ - newState == USCXML_FINISHED \ -) - -#define VALID_FROM_IDLE(newState) ( \ - newState == USCXML_DESTROYED || \ - newState == USCXML_MICROSTEPPED || \ - newState == USCXML_MACROSTEPPED \ -) - -#define VALID_FROM_FINISHED(newState) ( \ - newState == USCXML_DESTROYED || \ - newState == USCXML_INSTANTIATED \ -) - -/// macro to catch exceptions in executeContent -#define CATCH_AND_DISTRIBUTE(msg) \ -catch (Event e) {\ - if (rethrow) {\ - throw(e);\ - } else {\ - LOG(ERROR) << msg << std::endl << e << std::endl;\ - e.name = "error.execution";\ - e.data.compound["cause"] = uscxml::Data(msg, uscxml::Data::VERBATIM); \ - e.eventType = Event::PLATFORM;\ - receiveInternal(e);\ - }\ +namespace uscxml { + +// msxml.h defines all the DOM types as well +//using namespace xercesc; + +static URL normalizeURL(const std::string url) { + URL absUrl(url); + + // this is required for _baseURL to be considered absolute! + if (absUrl.scheme() == "" || !absUrl.isAbsolute()) { + absUrl = URL::resolveWithCWD(absUrl); + } + if (absUrl.scheme() == "") { + absUrl = URL("file://" + url); + } + return absUrl; } -#define CATCH_AND_DISTRIBUTE2(msg, node) \ -catch (Event e) {\ - std::string xpathPos = DOMUtils::xPathForNode(node); \ - if (rethrow) {\ - throw(e);\ - } else {\ - LOG(ERROR) << msg << " " << xpathPos << ":" << std::endl << e << std::endl;\ - e.name = "error.execution";\ - e.data.compound["cause"] = uscxml::Data(msg, uscxml::Data::VERBATIM); \ - e.data.compound["xpath"] = uscxml::Data(xpathPos, uscxml::Data::VERBATIM); \ - e.eventType = Event::PLATFORM;\ - e.dom = node;\ - receiveInternal(e);\ - }\ +Interpreter Interpreter::fromXML(const std::string& xml, const std::string& baseURL) { + URL absUrl = normalizeURL(baseURL); + + std::shared_ptr interpreterImpl(new InterpreterImpl()); + Interpreter interpreter(interpreterImpl); + + std::unique_ptr parser(new xercesc::XercesDOMParser()); + std::unique_ptr errHandler(new xercesc::HandlerBase()); + + try { + parser->setValidationScheme(xercesc::XercesDOMParser::Val_Always); + parser->setDoNamespaces(true); + parser->useScanner(xercesc::XMLUni::fgWFXMLScanner); + + parser->setErrorHandler(errHandler.get()); + + xercesc::MemBufInputSource is((XMLByte*)xml.c_str(), xml.size(), X("fake")); + parser->parse(is); + + interpreterImpl->_document = parser->adoptDocument(); + interpreterImpl->_baseURL = absUrl; + InterpreterImpl::addInstance(interpreterImpl); + + } catch (const xercesc::SAXParseException& toCatch) { + ERROR_PLATFORM_THROW(X(toCatch.getMessage()).str()); + } catch (const xercesc::RuntimeException& toCatch) { + ERROR_PLATFORM_THROW(X(toCatch.getMessage()).str()); + } catch (const xercesc::XMLException& toCatch) { + ERROR_PLATFORM_THROW(X(toCatch.getMessage()).str()); + } catch (const xercesc::DOMException& toCatch) { + ERROR_PLATFORM_THROW(X(toCatch.getMessage()).str()); + } + + return interpreter; } -namespace uscxml { +Interpreter Interpreter::fromElement(xercesc::DOMElement* scxml, const std::string& baseURL) { + URL absUrl = normalizeURL(baseURL); + + std::shared_ptr interpreterImpl(new InterpreterImpl()); + Interpreter interpreter(interpreterImpl); + + // *copy* the given xercesc::DOM to get rid of event listeners + xercesc::DOMImplementation* implementation = xercesc::DOMImplementationRegistry::getDOMImplementation(X("core")); + interpreterImpl->_document = implementation->createDocument(); + + // we need to import the parent - to support xpath test150 + xercesc::DOMNode* newNode = interpreterImpl->_document->importNode(scxml, true); +// interpreterImpl->_document->adoptNode(newNode); + interpreterImpl->_document->appendChild(newNode); + +// std::cerr << *(interpreterImpl->_document); + + interpreterImpl->_baseURL = absUrl; + + InterpreterImpl::addInstance(interpreterImpl); + return interpreter; +} + +Interpreter Interpreter::fromDocument(xercesc::DOMDocument* dom, const std::string& baseURL, bool copy) { + URL absUrl = normalizeURL(baseURL); + + std::shared_ptr interpreterImpl(new InterpreterImpl()); + Interpreter interpreter(interpreterImpl); + + if (copy) { + // *copy* the given xercesc::DOM to get rid of event listeners + xercesc::DOMImplementation* implementation = xercesc::DOMImplementationRegistry::getDOMImplementation(X("core")); + interpreterImpl->_document = implementation->createDocument(); + + // we need to import the parent - to support xpath test150 + xercesc::DOMNode* newNode = interpreterImpl->_document->importNode(dom->getDocumentElement(), true); + interpreterImpl->_document->appendChild(newNode); + + } else { + interpreterImpl->_document = dom; + } + + interpreterImpl->_baseURL = absUrl; + + InterpreterImpl::addInstance(interpreterImpl); + return interpreter; +} + +Interpreter Interpreter::fromURL(const std::string& url) { + URL absUrl = normalizeURL(url); + + std::shared_ptr interpreterImpl(new InterpreterImpl()); + Interpreter interpreter(interpreterImpl); + + std::unique_ptr parser(new xercesc::XercesDOMParser()); + parser->setValidationScheme(xercesc::XercesDOMParser::Val_Always); + parser->setDoNamespaces(true); + + // we do not have a real schema anyway + parser->useScanner(xercesc::XMLUni::fgWFXMLScanner); + + std::unique_ptr errHandler(new xercesc::HandlerBase()); + parser->setErrorHandler(errHandler.get()); + + + try { + std::string tmp = absUrl; + parser->parse(tmp.c_str()); + interpreterImpl->_document = parser->adoptDocument(); + interpreterImpl->_baseURL = absUrl; + InterpreterImpl::addInstance(interpreterImpl); + } + + catch (const xercesc::SAXParseException& toCatch) { + LOG(ERROR) << X(toCatch.getMessage()); + } catch (const xercesc::RuntimeException& toCatch) { + LOG(ERROR) << X(toCatch.getMessage()); + } catch (const xercesc::XMLException& toCatch) { + LOG(ERROR) << X(toCatch.getMessage()); + } catch (const xercesc::DOMException& toCatch) { + LOG(ERROR) << X(toCatch.getMessage()); + } + + return interpreter; + +} + +std::recursive_mutex StateTransitionMonitor::_mutex; + +static void printNodeSet(const std::list nodes) { + std::string seperator; + for (auto nIter = nodes.begin(); nIter != nodes.end(); nIter++) { + std::cerr << seperator << (HAS_ATTR(*nIter, "id") ? ATTR(*nIter, "id") : DOMUtils::xPathForNode(*nIter)); + seperator = ", "; + } +} + +void StateTransitionMonitor::beforeTakingTransition(const xercesc::DOMElement* transition) { + std::lock_guard lock(_mutex); + std::cerr << "Transition: " << uscxml::DOMUtils::xPathForNode(transition) << std::endl; +} + +void StateTransitionMonitor::onStableConfiguration() { + std::lock_guard lock(_mutex); + std::cerr << "Stable Config: { "; + printNodeSet(_interpreter.getConfiguration()); + std::cerr << " }" << std::endl; +} + +void StateTransitionMonitor::beforeProcessingEvent(const uscxml::Event& event) { + std::lock_guard lock(_mutex); + switch (event.eventType) { + case uscxml::Event::INTERNAL: + std::cerr << "Internal Event: " << event.name << std::endl; + break; + case uscxml::Event::EXTERNAL: + std::cerr << "External Event: " << event.name << std::endl; + break; + case uscxml::Event::PLATFORM: + std::cerr << "Platform Event: " << event.name << std::endl; + break; + } +} + +void StateTransitionMonitor::beforeExecutingContent(const xercesc::DOMElement* element) { + std::lock_guard lock(_mutex); + std::cerr << "Executable Content: " << DOMUtils::xPathForNode(element) << std::endl; +} + +void StateTransitionMonitor::beforeExitingState(const xercesc::DOMElement* state) { + std::lock_guard lock(_mutex); + std::cerr << "Exiting: " << (HAS_ATTR(state, "id") ? ATTR(state, "id") : DOMUtils::xPathForNode(state)) << std::endl; +} -using namespace Arabica::XPath; -using namespace Arabica::DOM; +void StateTransitionMonitor::beforeEnteringState(const xercesc::DOMElement* state) { + std::lock_guard lock(_mutex); + std::cerr << "Entering: " << (HAS_ATTR(state, "id") ? ATTR(state, "id") : DOMUtils::xPathForNode(state)) << std::endl; + +} + +void StateTransitionMonitor::beforeMicroStep() { + std::lock_guard lock(_mutex); + std::cerr << "Config: {"; + printNodeSet(_interpreter.getConfiguration()); + std::cerr << "}" << std::endl; +} void InterpreterOptions::printUsageAndExit(const char* progName) { // remove path from program name @@ -169,7 +275,6 @@ void InterpreterOptions::printUsageAndExit(const char* progName) { #endif printf("\t-v : be verbose\n"); printf("\t-c : perform some sanity checks on the state-chart\n"); - printf("\t-d : enable debugging via HTTP\n"); printf("\t-lN : set loglevel to N\n"); printf("\t-tN : port for HTTP server\n"); printf("\t-sN : port for HTTPS server\n"); @@ -178,14 +283,6 @@ void InterpreterOptions::printUsageAndExit(const char* progName) { exit(1); } -unsigned int InterpreterOptions::getCapabilities() { - unsigned int capabilities = CAN_NOTHING; - if (withHTTP) - capabilities = capabilities | CAN_GENERIC_HTTP | CAN_BASIC_HTTP; - - return capabilities; -} - InterpreterOptions InterpreterOptions::fromCmdLine(int argc, char** argv) { InterpreterOptions options; optind = 0; @@ -201,7 +298,6 @@ InterpreterOptions InterpreterOptions::fromCmdLine(int argc, char** argv) { {"public-key", required_argument, 0, 0}, {"plugin-path", required_argument, 0, 'p'}, {"loglevel", required_argument, 0, 'l'}, - {"disable-http", no_argument, 0, 0}, {0, 0, 0, 0} }; @@ -234,13 +330,13 @@ InterpreterOptions InterpreterOptions::fromCmdLine(int argc, char** argv) { switch(option) { // cases without short option case 0: { - if (boost::equals(longOptions[optionInd].name, "disable-http")) { + if (iequals(longOptions[optionInd].name, "disable-http")) { currOptions->withHTTP = false; - } else if (boost::equals(longOptions[optionInd].name, "private-key")) { + } else if (iequals(longOptions[optionInd].name, "private-key")) { currOptions->privateKey = optarg; - } else if (boost::equals(longOptions[optionInd].name, "certificate")) { + } else if (iequals(longOptions[optionInd].name, "certificate")) { currOptions->certificate = optarg; - } else if (boost::equals(longOptions[optionInd].name, "public-key")) { + } else if (iequals(longOptions[optionInd].name, "public-key")) { currOptions->publicKey = optarg; } break; @@ -252,11 +348,8 @@ InterpreterOptions InterpreterOptions::fromCmdLine(int argc, char** argv) { case 'p': currOptions->pluginPath = optarg; break; - case 'd': - currOptions->withDebugger = true; - break; case 'c': - currOptions->checking = true; + currOptions->validate = true; break; case 't': currOptions->httpPort = strTo(optarg); @@ -298,3343 +391,11 @@ InterpreterOptions InterpreterOptions::fromCmdLine(int argc, char** argv) { DONE_PARSING_CMD: - if (options.interpreters.size() == 0 && !options.withDebugger) + if (options.interpreters.size() == 0) options.error = "No SCXML document to evaluate"; return options; } -void NameSpaceInfo::init(const std::map& namespaceInfo) { - nsInfo = namespaceInfo; - nsURL = ""; - if (nsContext) - delete nsContext; - nsContext = new Arabica::XPath::StandardNamespaceContext(); - - std::map::const_iterator nsIter = namespaceInfo.begin(); - while(nsIter != namespaceInfo.end()) { - std::string url = nsIter->first; - std::string prefix = nsIter->second; - if (iequals(url, "http://www.w3.org/2005/07/scxml")) { - nsURL = url; - if (prefix.size() == 0) { - xpathPrefix = "scxml:"; - nsContext->addNamespaceDeclaration(url, "scxml"); - } else { - xpathPrefix = prefix + ":"; - xmlNSPrefix = xpathPrefix; - nsContext->addNamespaceDeclaration(url, prefix); - nsToPrefix[url] = prefix; - } - } else { - nsContext->addNamespaceDeclaration(url, prefix); - nsToPrefix[url] = prefix; - } - nsIter++; - } -} - -void StateTransitionMonitor::beforeTakingTransition(uscxml::Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing) { - tthread::lock_guard lock(_mutex); - std::cerr << "Transition: " << uscxml::DOMUtils::xPathForNode(transition) << std::endl; -} - -void StateTransitionMonitor::onStableConfiguration(uscxml::Interpreter interpreter) { - tthread::lock_guard lock(_mutex); - std::cerr << "Config: {"; - printNodeSet(interpreter.getConfiguration()); - std::cerr << "}" << std::endl; -} - -void StateTransitionMonitor::beforeProcessingEvent(uscxml::Interpreter interpreter, const uscxml::Event& event) { - tthread::lock_guard lock(_mutex); - switch (event.eventType) { - case uscxml::Event::INTERNAL: - std::cerr << "Internal Event: " << event.name << std::endl; - break; - case uscxml::Event::EXTERNAL: - std::cerr << "External Event: " << event.name << std::endl; - break; - case uscxml::Event::PLATFORM: - std::cerr << "Platform Event: " << event.name << std::endl; - break; - } -} - -void StateTransitionMonitor::beforeExecutingContent(Interpreter interpreter, const Arabica::DOM::Element& element) { - tthread::lock_guard lock(_mutex); - std::cerr << "Executable Content: " << DOMUtils::xPathForNode(element) << std::endl; -} - -void StateTransitionMonitor::beforeExitingState(uscxml::Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - tthread::lock_guard lock(_mutex); - exitingStates.push_back(state); - if (!moreComing) { - std::cerr << "Exiting: {"; - printNodeSet(exitingStates); - std::cerr << "}" << std::endl; - exitingStates = Arabica::XPath::NodeSet(); - } -} - -void StateTransitionMonitor::beforeEnteringState(uscxml::Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - tthread::lock_guard lock(_mutex); - enteringStates.push_back(state); - if (!moreComing) { - std::cerr << "Entering: {"; - printNodeSet(enteringStates); - std::cerr << "}" << std::endl; - enteringStates = Arabica::XPath::NodeSet(); - } - -} - -void StateTransitionMonitor::beforeMicroStep(uscxml::Interpreter interpreter) { - tthread::lock_guard lock(_mutex); - std::cerr << "Config: {"; - printNodeSet(interpreter.getConfiguration()); - std::cerr << "}" << std::endl; -} - -void StateTransitionMonitor::printNodeSet(const Arabica::XPath::NodeSet& config) { - std::string seperator; - for (size_t i = 0; i < config.size(); i++) { - std::cerr << seperator << ATTR_CAST(config[i], "id"); - seperator = ", "; - } -} -tthread::recursive_mutex StateTransitionMonitor::_mutex; - -std::map > Interpreter::_instances; -tthread::recursive_mutex Interpreter::_instanceMutex; - -std::map > Interpreter::getInstances() { - tthread::lock_guard lock(_instanceMutex); - std::map >::iterator instIter = _instances.begin(); - while(instIter != _instances.end()) { - if (!instIter->second.lock()) { - _instances.erase(instIter++); - } else { - instIter++; - } - } - return _instances; -} - -void Interpreter::addInstance(boost::shared_ptr interpreterImpl) { - tthread::lock_guard lock(_instanceMutex); - assert(_instances.find(interpreterImpl->getSessionId()) == _instances.end()); - _instances[interpreterImpl->getSessionId()] = interpreterImpl; -} - -InterpreterImpl::InterpreterImpl() { - _state = USCXML_INSTANTIATED; - - _lastRunOnMainThread = 0; - _thread = NULL; - _isStarted = false; - _isRunning = false; - _sendQueue = NULL; - _parentQueue = NULL; - _topLevelFinalReached = false; - _stable = false; - _isInitialized = false; - _userSuppliedDataModel = false; - _domIsSetup = false; - _httpServlet = NULL; - _factory = NULL; - _sessionId = UUID::getUUID(); - _capabilities = CAN_BASIC_HTTP | CAN_GENERIC_HTTP; - _domEventListener._interpreter = this; - -#ifdef _WIN32 - WSADATA wsaData; - WSAStartup(MAKEWORD(2, 2), &wsaData); -#endif -} - -Interpreter Interpreter::fromDOM(const Arabica::DOM::Document& dom, const NameSpaceInfo& nameSpaceInfo, const std::string& sourceURL) { - tthread::lock_guard lock(_instanceMutex); - boost::shared_ptr interpreterImpl = boost::shared_ptr(new INTERPRETER_IMPL); - Interpreter interpreter(interpreterImpl); - - // *copy* the given DOM to get rid of event listeners - - DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - interpreterImpl->_document = domFactory.createDocument(dom.getNamespaceURI(), "", 0); - - Node child = dom.getFirstChild(); - while (child) { - Node newNode = interpreterImpl->_document.importNode(child, true); - interpreterImpl->_document.appendChild(newNode); - child = child.getNextSibling(); - } - - interpreterImpl->setNameSpaceInfo(nameSpaceInfo); - interpreterImpl->setupDOM(); - -// interpreterImpl->init(); - _instances[interpreterImpl->getSessionId()] = interpreterImpl; - return interpreter; -} - -Interpreter Interpreter::fromXML(const std::string& xml, const std::string& sourceURL) { - std::stringstream* ss = new std::stringstream(); - (*ss) << xml; - // we need an auto_ptr for arabica to assume ownership - std::auto_ptr ssPtr(ss); - Arabica::SAX::InputSource inputSource; - inputSource.setByteStream(ssPtr); - return fromInputSource(&inputSource, sourceURL); -} - - -Interpreter Interpreter::fromURL(const std::string& url) { - URL absUrl(url); - if (!absUrl.isAbsolute()) { - if (!absUrl.toAbsoluteCwd()) { - ERROR_COMMUNICATION_THROW("URL is not absolute or does not have file schema"); - } - } - - Interpreter interpreter; - - if (iequals(absUrl.scheme(), "file")) { - Arabica::SAX::InputSource inputSource; - inputSource.setSystemId(absUrl.asString()); - interpreter = fromInputSource(&inputSource, absUrl); - } else { - // use curl for everything !file - even for http as arabica won't follow redirects - std::stringstream ss; - ss << absUrl; - if (absUrl.downloadFailed()) { - ERROR_COMMUNICATION_THROW("Downloading SCXML document from '" + absUrl.asString() + "' failed"); - } - interpreter = fromXML(ss.str(), absUrl); - } - - // try to establish URL root for relative src attributes in document - if (!interpreter) { - ERROR_PLATFORM_THROW("Cannot create interpreter from URL '" + absUrl.asString() + "'"); - } - return interpreter; -} - -Interpreter Interpreter::fromInputSource(void* source, const std::string& sourceURL) { - tthread::lock_guard lock(_instanceMutex); - - Arabica::SAX::InputSource sourceRef = *(Arabica::SAX::InputSource*)source; - // remove old instances - std::map >::iterator instIter = _instances.begin(); - while(instIter != _instances.end()) { - if (!instIter->second.lock()) { - _instances.erase(instIter++); - } else { - instIter++; - } - } - - boost::shared_ptr interpreterImpl = boost::shared_ptr(new INTERPRETER_IMPL); - Interpreter interpreter(interpreterImpl); - _instances[interpreterImpl->getSessionId()] = interpreterImpl; - - NameSpacingParser parser; - if (parser.parse(sourceRef) && parser.getDocument() && parser.getDocument().hasChildNodes()) { - interpreterImpl->setNameSpaceInfo(parser.nameSpace); - interpreterImpl->_document = parser.getDocument(); - interpreterImpl->_sourceURL = sourceURL; - - interpreterImpl->setupDOM(); - } else { - if (parser.errorsReported()) { - ERROR_PLATFORM_THROW(parser.errors()) - } else { - ERROR_PLATFORM_THROW("Failed to create interpreter from " + sourceURL); -// interpreterImpl->setInterpreterState(USCXML_FAULTED, parser.errors()); - } - } - return interpreter; -} - -Interpreter Interpreter::fromClone(const Interpreter& other) { - tthread::lock_guard lock(_instanceMutex); - - boost::shared_ptr interpreterImpl = boost::shared_ptr(new INTERPRETER_IMPL); - interpreterImpl->cloneFrom(other.getImpl()); - Interpreter interpreter(interpreterImpl); - - addInstance(interpreterImpl); - return interpreter; -} - -void InterpreterImpl::writeTo(std::ostream& stream) { - stream << getDocument(); -} - -void InterpreterImpl::cloneFrom(InterpreterImpl* other) { - if (other->getDocument()) { - const Arabica::DOM::Document& otherDoc = other->_document; - DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - _document = domFactory.createDocument(otherDoc.getNamespaceURI(), "", 0); - - Node child = otherDoc.getFirstChild(); - while (child) { - Node newNode = _document.importNode(child, true); - _document.appendChild(newNode); - child = child.getNextSibling(); - } - - setNameSpaceInfo(other->_nsInfo); - - _baseURL = other->_baseURL; - _sourceURL = other->_sourceURL; - - setupDOM(); - } -} - -void InterpreterImpl::cloneFrom(boost::shared_ptr other) { - cloneFrom(other.get()); -} - -void InterpreterImpl::setName(const std::string& name) { - _name = name; -} - -InterpreterImpl::~InterpreterImpl() { - { - // make sure we are done with setting up with early abort - tthread::lock_guard lock(_mutex); - stop(); // unset started bit - - setInterpreterState(USCXML_DESTROYED); - - // unblock event queue - Event event; - event.name = "unblock.and.die"; - receive(event); - - } -// std::cerr << "stopped " << this << std::endl; -// tthread::lock_guard lock(_mutex); - if (_thread) { - _thread->join(); - delete(_thread); - } - - if (_sendQueue) - delete _sendQueue; - -} - -void InterpreterImpl::start() { - _isStarted = true; - _thread = new tthread::thread(InterpreterImpl::run, this); -} - -void InterpreterImpl::stop() { - _isStarted = false; -} - -void InterpreterImpl::join() { - stop(); - if (_thread != NULL) _thread->join(); -}; - -bool InterpreterImpl::isRunning() { - return _isRunning && !_topLevelFinalReached; -} - -void InterpreterImpl::run(void* instance) { - InterpreterImpl* interpreter = ((InterpreterImpl*)instance); - interpreter->_isRunning = true; - - try { - InterpreterState state; - while(interpreter->_isStarted) { - state = interpreter->step(-1); - - switch (state) { - case uscxml::USCXML_FINISHED: - case uscxml::USCXML_DESTROYED: - // return as we finished - goto DONE_THREAD; - default: - break; - } - } - } catch (Event e) { - LOG(ERROR) << e; - } catch(std::exception e) { - LOG(ERROR) << "InterpreterImpl::run catched an exception: " << e.what() << std::endl << "Unclean shutdown"; - } catch (...) { - LOG(ERROR) << "InterpreterImpl::run catched unknown exception"; - } -DONE_THREAD: - ((InterpreterImpl*)instance)->_isRunning = false; - ((InterpreterImpl*)instance)->_isStarted = false; -} - -void InterpreterImpl::exitInterpreter() { - NodeSet statesToExit = _configuration; - statesToExit.forward(false); - statesToExit.sort(); - - for (size_t i = 0; i < statesToExit.size(); i++) { - Arabica::XPath::NodeSet onExitElems = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "onexit", statesToExit[i]); - for (size_t j = 0; j < onExitElems.size(); j++) { - executeContent(Element(onExitElems[j])); - } - Arabica::XPath::NodeSet invokeElems = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", statesToExit[i]); - // TODO: we ought to cancel all remaining invokers just to be sure with the persist extension - for (size_t j = 0; j < invokeElems.size(); j++) { - cancelInvoke(Element(invokeElems[j])); - } - Element stateElem(statesToExit[i]); - if (isFinal(stateElem) && parentIsScxmlState(stateElem)) { - returnDoneEvent(statesToExit[i]); - } - } - _configuration = NodeSet(); -} - - -InterpreterState InterpreterImpl::interpret() { - InterpreterState state; - while(true) { - state = step(-1); - - switch (state) { - case uscxml::USCXML_FINISHED: - case uscxml::USCXML_DESTROYED: - // return as we finished - return state; - default: - - // process invokers on main thread - if(_thread == NULL) { - runOnMainThread(200); - } - - // process next step - break; - } - } - return state; -} - -// setup / fetch the documents initial transitions -NodeSet InterpreterImpl::getDocumentInitialTransitions() { - NodeSet initialTransitions; - - if (_startConfiguration.size() > 0) { - // we emulate entering a given configuration by creating a pseudo deep history - Element initHistory = _document.createElementNS(_nsInfo.nsURL, "history"); - _nsInfo.setPrefix(initHistory); - - initHistory.setAttribute("id", UUID::getUUID()); - initHistory.setAttribute("type", "deep"); - _scxml.insertBefore(initHistory, _scxml.getFirstChild()); - - std::string histId = ATTR(initHistory, "id"); - NodeSet histStates; - for (std::list::const_iterator stateIter = _startConfiguration.begin(); stateIter != _startConfiguration.end(); stateIter++) { - histStates.push_back(getState(*stateIter)); - } - _historyValue[histId] = histStates; - - Element initialElem = _document.createElementNS(_nsInfo.nsURL, "initial"); - _nsInfo.setPrefix(initialElem); - - initialElem.setAttribute("generated", "true"); - Element transitionElem = _document.createElementNS(_nsInfo.nsURL, "transition"); - _nsInfo.setPrefix(transitionElem); - - transitionElem.setAttribute("target", histId); - initialElem.appendChild(transitionElem); - _scxml.appendChild(initialElem); - initialTransitions.push_back(transitionElem); - - } else { - // try to get initial transition from initial element - initialTransitions = _xpath.evaluate("/" + _nsInfo.xpathPrefix + "scxml/"+ _nsInfo.xpathPrefix + "initial/" + _nsInfo.xpathPrefix + "transition", _scxml).asNodeSet(); - if (initialTransitions.size() == 0) { - Arabica::XPath::NodeSet initialStates; - // fetch per draft - initialStates = getInitialStates(); - assert(initialStates.size() > 0); - for (size_t i = 0; i < initialStates.size(); i++) { - Element initialElem = _document.createElementNS(_nsInfo.nsURL, "initial"); - _nsInfo.setPrefix(initialElem); - - initialElem.setAttribute("generated", "true"); - Element transitionElem = _document.createElementNS(_nsInfo.nsURL, "transition"); - _nsInfo.setPrefix(transitionElem); - - transitionElem.setAttribute("target", ATTR_CAST(initialStates[i], "id")); - initialElem.appendChild(transitionElem); - _scxml.appendChild(initialElem); - initialTransitions.push_back(transitionElem); - } - } - } - return initialTransitions; -} - -InterpreterState InterpreterImpl::step(int waitForMS) { - try { - tthread::lock_guard lock(_mutex); - - if (_state == USCXML_FINISHED || _state == USCXML_DESTROYED) { - return _state; - } - - NodeSet enabledTransitions; - - // setup document and interpreter - if (!_isInitialized) { - init(); // will throw - return _state; - } - - if (_configuration.size() == 0) { - // goto initial configuration - NodeSet initialTransitions = getDocumentInitialTransitions(); - assert(initialTransitions.size() > 0); -#if VERBOSE - std::cerr << _name << ": initialTransitions: " << std::endl; - for (size_t i = 0; i < initialTransitions.size(); i++) { - std::cerr << initialTransitions[i] << std::endl; - } - std::cerr << std::endl; -#endif - - // this is not mentionend in the standard, though it makes sense - for (size_t i = 0; i < initialTransitions.size(); i++) { - Element transition(initialTransitions[i]); - USCXML_MONITOR_CALLBACK3(beforeTakingTransition, transition, (i + 1 < enabledTransitions.size())) - executeContent(transition); - USCXML_MONITOR_CALLBACK3(afterTakingTransition, transition, (i + 1 < enabledTransitions.size())) - } - - enterStates(initialTransitions); - setInterpreterState(USCXML_MICROSTEPPED); - } - - assert(isLegalConfiguration(_configuration)); - - // are there spontaneous transitions? - if (!_stable) { - enabledTransitions = selectEventlessTransitions(); - if (!enabledTransitions.empty()) { - // test 403b - enabledTransitions.to_document_order(); - microstep(enabledTransitions); - - setInterpreterState(USCXML_MICROSTEPPED); - - // check whether we run in cycles - FlatStateIdentifier flat(_configuration, _alreadyEntered, _historyValue); - if (_microstepConfigurations.find(flat.getStateId()) != _microstepConfigurations.end()) { - USCXML_MONITOR_CALLBACK2(reportIssue, - InterpreterIssue("Reentering during microstep " + flat.getFlatActive() + " - possible endless loop", - Arabica::DOM::Node(), - InterpreterIssue::USCXML_ISSUE_WARNING)); - } - _microstepConfigurations.insert(flat.getStateId()); - - return _state; - } - _stable = true; - } - - // test415 - if (_topLevelFinalReached) - goto EXIT_INTERPRETER; - - // process internal event - if (!_internalQueue.empty()) { - _currEvent = _internalQueue.front(); - _internalQueue.pop_front(); - _stable = false; - - USCXML_MONITOR_CALLBACK2(beforeProcessingEvent, _currEvent) - - _dataModel.setEvent(_currEvent); - enabledTransitions = selectTransitions(_currEvent.name); - - if (!enabledTransitions.empty()) { - // test 403b - enabledTransitions.to_document_order(); - microstep(enabledTransitions); - } - - // test 319 - even if we do not enable transitions, consider it a microstep - setInterpreterState(USCXML_MICROSTEPPED); - return _state; - - } else { - _stable = true; - _microstepConfigurations.clear(); - } - - if (_state != USCXML_MACROSTEPPED && _state != USCXML_IDLE) - USCXML_MONITOR_CALLBACK(onStableConfiguration) - - setInterpreterState(USCXML_MACROSTEPPED); - - if (_topLevelFinalReached) - goto EXIT_INTERPRETER; - - - // when we reach a stable configuration, invoke - for (unsigned int i = 0; i < _statesToInvoke.size(); i++) { - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _statesToInvoke[i]); - for (unsigned int j = 0; j < invokes.size(); j++) { - Element invokeElem = Element(invokes[j]); - if (!HAS_ATTR(invokeElem, "persist") || !stringIsTrue(ATTR(invokeElem, "persist"))) { - invoke(invokeElem); - } - } - } - _statesToInvoke = NodeSet(); - - if (_externalQueue.isEmpty()) { - setInterpreterState(USCXML_IDLE); - - if (waitForMS < 0) { - // wait blockingly for an event forever - while(_externalQueue.isEmpty()) { - _condVar.wait(_mutex); - } - } - - if (waitForMS > 0) { - // wait given number of milliseconds max - uint64_t now = tthread::chrono::system_clock::now(); - uint64_t then = now + waitForMS; - while(_externalQueue.isEmpty() && now < then) { - _condVar.wait_for(_mutex, then - now); - now = tthread::chrono::system_clock::now(); - } - } - - if (_externalQueue.isEmpty()) { - return _state; - } - - if (_state == USCXML_FINISHED || _state == USCXML_DESTROYED) { - return _state; - } - - setInterpreterState(USCXML_MACROSTEPPED); - } - - _currEvent = _externalQueue.pop(); - _currEvent.eventType = Event::EXTERNAL; // make sure it is set to external - _stable = false; - - if (_topLevelFinalReached) - goto EXIT_INTERPRETER; - - USCXML_MONITOR_CALLBACK2(beforeProcessingEvent, _currEvent) - - if (iequals(_currEvent.name, "cancel.invoke." + _sessionId)) { - goto EXIT_INTERPRETER; - } - - try { - _dataModel.setEvent(_currEvent); - } catch (Event e) { - LOG(ERROR) << "Syntax error while setting external event:" << std::endl << e << std::endl << _currEvent; - } - - finalizeAndAutoForwardCurrentEvent(); - - // run internal processing until we reach a stable configuration again - enabledTransitions = selectTransitions(_currEvent.name); - if (!enabledTransitions.empty()) { - // test 403b - enabledTransitions.to_document_order(); - microstep(enabledTransitions); - } - - if (_topLevelFinalReached) - goto EXIT_INTERPRETER; - - return _state; - -EXIT_INTERPRETER: - USCXML_MONITOR_CALLBACK(beforeCompletion) - - exitInterpreter(); - if (_sendQueue) { - _sendQueue->stop(); - std::map >::iterator sendIter = _sendIds.begin(); - while(sendIter != _sendIds.end()) { - _sendQueue->cancelEvent(sendIter->first); - sendIter++; - } - _sendQueue->start(); - } - - USCXML_MONITOR_CALLBACK(afterCompletion) - - // assert(hasLegalConfiguration()); - setInterpreterState(USCXML_FINISHED); - _mutex.unlock(); - - // remove datamodel -// if(!_userSuppliedDataModel) -// _dataModel = DataModel(); - - return _state; - } catch (boost::bad_weak_ptr e) { - LOG(ERROR) << "Unclean shutdown " << std::endl << std::endl; - setInterpreterState(USCXML_DESTROYED); - return _state; - } - - // set datamodel to null from this thread - if(_dataModel) - _dataModel = DataModel(); - -} - -void InterpreterImpl::microstep(const Arabica::XPath::NodeSet& enabledTransitions) { - - USCXML_MONITOR_CALLBACK(beforeMicroStep) - - exitStates(enabledTransitions); - - for (size_t i = 0; i < enabledTransitions.size(); i++) { - Element transition(enabledTransitions[i]); - - USCXML_MONITOR_CALLBACK3(beforeTakingTransition, transition, (i + 1 < enabledTransitions.size())) - - executeContent(transition); - - USCXML_MONITOR_CALLBACK3(afterTakingTransition, transition, (i + 1 < enabledTransitions.size())) - } - - enterStates(enabledTransitions); - - USCXML_MONITOR_CALLBACK(afterMicroStep) - -} - -// process transitions until we are in a stable configuration again -void InterpreterImpl::stabilize() { - - NodeSet enabledTransitions; - _stable = false; - - if (_configuration.size() == 0) { - // goto initial configuration - NodeSet initialTransitions = getDocumentInitialTransitions(); - assert(initialTransitions.size() > 0); - enterStates(initialTransitions); - } - - std::set configurationsSeen; - - do { // process microsteps for enabled transitions until there are no more left - - enabledTransitions = selectEventlessTransitions(); - - if (enabledTransitions.size() == 0) { - if (_internalQueue.size() == 0) { - _stable = true; - } else { - _currEvent = _internalQueue.front(); - _internalQueue.pop_front(); -#if VERBOSE - std::cerr << "Received internal event " << _currEvent.name << std::endl; -#endif - - USCXML_MONITOR_CALLBACK2(beforeProcessingEvent, _currEvent) - - if (_dataModel) - _dataModel.setEvent(_currEvent); - enabledTransitions = selectTransitions(_currEvent.name); - } - } - - if (!enabledTransitions.empty()) { - // test 403b - enabledTransitions.to_document_order(); - microstep(enabledTransitions); - } - } while(!_internalQueue.empty() || !_stable); - - USCXML_MONITOR_CALLBACK(onStableConfiguration) - - // when we reach a stable configuration, invoke - for (unsigned int i = 0; i < _statesToInvoke.size(); i++) { - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _statesToInvoke[i]); - for (unsigned int j = 0; j < invokes.size(); j++) { - Element invokeElem = Element(invokes[j]); - if (!HAS_ATTR(invokeElem, "persist") || !stringIsTrue(ATTR(invokeElem, "persist"))) { - invoke(invokeElem); - } - } - } - _statesToInvoke = NodeSet(); -} - -#if 0 - -Arabica::XPath::NodeSet InterpreterImpl::selectTransitions(const std::string& event) { - Arabica::XPath::NodeSet enabledTransitions; - - NodeSet states; - for (unsigned int i = 0; i < _configuration.size(); i++) { - if (isAtomic(Element(_configuration[i]))) - states.push_back(_configuration[i]); - } - states.to_document_order(); - - unsigned int index = 0; - while(states.size() > index) { - NodeSet transitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", states[index]); - for (unsigned int k = 0; k < transitions.size(); k++) { - if (isEnabledTransition(Element(transitions[k]), event)) { - enabledTransitions.push_back(transitions[k]); - goto LOOP; - } - } - { - Node parent = states[index].getParentNode(); - if (parent) { - states.push_back(parent); - } - } -LOOP: - index++; - } - - enabledTransitions = removeConflictingTransitions(enabledTransitions); - return enabledTransitions; -} - - -Arabica::XPath::NodeSet InterpreterImpl::selectEventlessTransitions() { - Arabica::XPath::NodeSet enabledTransitions; - - NodeSet states; - for (unsigned int i = 0; i < _configuration.size(); i++) { - if (isAtomic(Element(_configuration[i]))) - states.push_back(_configuration[i]); - } - states.to_document_order(); - - unsigned int index = 0; - while(states.size() > index) { - bool foundTransition = false; - NodeSet transitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", states[index]); - for (unsigned int k = 0; k < transitions.size(); k++) { - Element transElem(transitions[k]); - if (!HAS_ATTR(transElem, "event") && hasConditionMatch(transElem)) { - enabledTransitions.push_back(transitions[k]); - foundTransition = true; - goto LOOP; - } - } - if (!foundTransition) { - Node parent = states[index].getParentNode(); - if (parent) { - states.push_back(parent); - } - } -LOOP: - index++; - } - -#if VERBOSE - std::cerr << "Enabled eventless transitions: " << std::endl; - for (size_t i = 0; i < enabledTransitions.size(); i++) { - std::cerr << enabledTransitions[i] << std::endl << "----" << std::endl; - } - std::cerr << std::endl; -#endif - - enabledTransitions = removeConflictingTransitions(enabledTransitions); - return enabledTransitions; -} - -#else - -Arabica::XPath::NodeSet InterpreterImpl::selectTransitions(const std::string& event) { - Arabica::XPath::NodeSet enabledTransitions; - - NodeSet atomicStates; - for (unsigned int i = 0; i < _configuration.size(); i++) { - if (isAtomic(Element(_configuration[i]))) - atomicStates.push_back(_configuration[i]); - } - atomicStates.to_document_order(); - - for (unsigned int i = 0; i < atomicStates.size(); i++) { - Element state(atomicStates[i]); - while(true) { - NodeSet transitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", state); - for (unsigned int k = 0; k < transitions.size(); k++) { - if (isEnabledTransition(Element(transitions[k]), event)) { - enabledTransitions.push_back(transitions[k]); - goto NEXT_ATOMIC; - } - } - if (state.getParentNode() && state.getParentNode().getNodeType() == Node_base::ELEMENT_NODE) { - state = Element(state.getParentNode()); - } else { - goto NEXT_ATOMIC; - } - } -NEXT_ATOMIC: - ; - } - -#if 0 - std::cerr << "Enabled transitions for '" << event << "': " << std::endl; - for (size_t i = 0; i < enabledTransitions.size(); i++) { - std::cerr << enabledTransitions[i] << std::endl << "----" << std::endl; - } - std::cerr << std::endl; -#endif - - enabledTransitions = removeConflictingTransitions(enabledTransitions); - -#if 0 - std::cerr << "Non-conflicting transitions for '" << event << "': " << std::endl; - for (size_t i = 0; i < enabledTransitions.size(); i++) { - std::cerr << enabledTransitions[i] << std::endl << "----" << std::endl; - } - std::cerr << std::endl; -#endif - - return enabledTransitions; -} - - -Arabica::XPath::NodeSet InterpreterImpl::selectEventlessTransitions() { - - Arabica::XPath::NodeSet enabledTransitions; - - NodeSet atomicStates; - for (unsigned int i = 0; i < _configuration.size(); i++) { - if (isAtomic(Element(_configuration[i]))) - atomicStates.push_back(_configuration[i]); - } - atomicStates.to_document_order(); - - for (unsigned int i = 0; i < atomicStates.size(); i++) { - Element state(atomicStates[i]); - while(true) { - NodeSet transitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", state); - for (unsigned int k = 0; k < transitions.size(); k++) { - Element transElem(transitions[k]); - if (!HAS_ATTR(transElem, "event") && hasConditionMatch(transElem)) { - enabledTransitions.push_back(transitions[k]); - goto NEXT_ATOMIC; - } - } - if (state.getParentNode() && state.getParentNode().getNodeType() == Node_base::ELEMENT_NODE) { - state = Element(state.getParentNode()); - } else { - goto NEXT_ATOMIC; - } - } -NEXT_ATOMIC: - ; - } - -#if 0 - std::cerr << "Enabled eventless transitions: " << std::endl; - for (size_t i = 0; i < enabledTransitions.size(); i++) { - std::cerr << enabledTransitions[i] << std::endl << "----" << std::endl; - } - std::cerr << std::endl; -#endif - - enabledTransitions = removeConflictingTransitions(enabledTransitions); - return enabledTransitions; -} - - -#endif - -bool InterpreterImpl::isEnabledTransition(const Element& transition, const std::string& event) { - std::string eventName; - if (HAS_ATTR(transition, "event")) { - eventName = ATTR(transition, "event"); - } else if(HAS_ATTR(transition, "eventexpr")) { - if (_dataModel) { - eventName = _dataModel.evalAsString(ATTR(transition, "eventexpr")); - } else { - LOG(ERROR) << "Transition has eventexpr attribute with no datamodel defined"; - return false; - } - } else { - return false; - } - - std::list eventNames = tokenize(eventName); - std::list::iterator eventIter = eventNames.begin(); - while(eventIter != eventNames.end()) { - if(nameMatch(*eventIter, event) && hasConditionMatch(transition)) { - return true; - } - eventIter++; - } - return false; -} - - -InterpreterState InterpreterImpl::getInterpreterState() { - return _state; -} - -void InterpreterImpl::setInterpreterState(InterpreterState newState) { - switch (_state) { - case USCXML_INSTANTIATED: - if (VALID_FROM_INSTANTIATED(newState)) - break; - assert(false); - break; - case USCXML_INITIALIZED: - if (VALID_FROM_INITIALIZED(newState)) - break; - assert(false); - break; - case USCXML_MICROSTEPPED: - if (VALID_FROM_MICROSTEPPED(newState)) - break; - assert(false); - break; - case USCXML_MACROSTEPPED: - if (VALID_FROM_MACROSTEPPED(newState)) - break; - assert(false); - break; - case USCXML_IDLE: - if (VALID_FROM_IDLE(newState)) - break; - assert(false); - break; - case USCXML_FINISHED: - if (VALID_FROM_FINISHED(newState)) - break; - assert(false); - break; - default: - assert(false); - break; - } - - _state = newState; -} - -bool InterpreterImpl::runOnMainThread(int fps, bool blocking) { - if (_state == USCXML_FINISHED || _state == USCXML_DESTROYED || !_isStarted) - return false; - - if (fps > 0) { - if (blocking && _lastRunOnMainThread > 0) { - uint64_t nextRun = _lastRunOnMainThread + (1000 / fps); - while(nextRun > tthread::timeStamp()) { - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(nextRun - tthread::timeStamp())); - } - } else { - _lastRunOnMainThread = tthread::timeStamp(); - return true; - } - } - - tthread::lock_guard lock(_mutex); - _lastRunOnMainThread = tthread::timeStamp(); - - { - tthread::lock_guard lock(_pluginMutex); - std::map::iterator ioProcessorIter = _ioProcessors.begin(); - while(ioProcessorIter != _ioProcessors.end()) { - ioProcessorIter->second.runOnMainThread(); - ioProcessorIter++; - } - std::map::iterator invokerIter = _invokers.begin(); - while(invokerIter != _invokers.end()) { - invokerIter->second.runOnMainThread(); - invokerIter++; - } - } - return (_thread != NULL); -} - -void InterpreterImpl::reset() { - tthread::lock_guard lock(_mutex); - - if (_sendQueue) { - _sendQueue->stop(); - std::map >::iterator sendIter = _sendIds.begin(); - while(sendIter != _sendIds.end()) { - _sendQueue->cancelEvent(sendIter->first); - _sendIds.erase(sendIter++); - } - _sendQueue->start(); - } - std::map::iterator invokeIter = _invokers.begin(); - while(invokeIter != _invokers.end()) { - invokeIter->second.uninvoke(); - _invokers.erase(invokeIter++); - } - - _externalQueue.clear(); - _internalQueue.clear(); - _historyValue.clear(); - - _currEvent = Event(); - _alreadyEntered = NodeSet(); - _configuration = NodeSet(); - _topLevelFinalReached = false; - _isInitialized = false; - _stable = false; - - _dataModel = DataModel(); - setInterpreterState(USCXML_INSTANTIATED); -} - -std::list InterpreterImpl::validate() { - return InterpreterIssue::forInterpreter(this); -} - -std::ostream& operator<< (std::ostream& os, const InterpreterIssue& issue) { - switch (issue.severity) { - case InterpreterIssue::USCXML_ISSUE_FATAL: - os << "Issue (FATAL) "; - break; - case InterpreterIssue::USCXML_ISSUE_WARNING: - os << "Issue (WARNING) "; - break; - case InterpreterIssue::USCXML_ISSUE_INFO: - os << "Issue (INFO) "; - break; - default: - break; - } - - if (issue.xPath.size() > 0) { - os << "at " << issue.xPath << ": "; - } else { - os << ": "; - } - os << issue.message; - return os; -} - -void InterpreterImpl::setupDOM() { - if (_domIsSetup) - return; - - if (!_document) { - ERROR_PLATFORM_THROW("Interpreter has no DOM"); - } - - resolveXIncludes(); - - // find scxml element - if (!_scxml) { - NodeList scxmls; - if (_nsInfo.nsURL.size() == 0) { - scxmls = _document.getElementsByTagName("scxml"); - } else { - scxmls = _document.getElementsByTagNameNS(_nsInfo.nsURL, "scxml"); - } - - if (scxmls.getLength() == 0) { - ERROR_PLATFORM_THROW("Cannot find SCXML element in DOM"); - } - - _scxml = (Arabica::DOM::Element)scxmls.item(0); - _baseURL[_scxml] = URL::asBaseURL(_sourceURL); - } - - _binding = (HAS_ATTR(_scxml, "binding") && iequals(ATTR(_scxml, "binding"), "late") ? LATE : EARLY); - - if (_nsInfo.getNSContext() != NULL) - _xpath.setNamespaceContext(*_nsInfo.getNSContext()); - - // normalize document - - // make sure every state has an id - not required per spec, but needed for us - Arabica::XPath::NodeSet states = getAllStates(); - for (size_t i = 0; i < states.size(); i++) { - Arabica::DOM::Element stateElem = Arabica::DOM::Element(states[i]); - if (!stateElem.hasAttribute("id")) { - stateElem.setAttribute("id", UUID::getUUID()); - } - // Issue 64 - we may not cache them as they may be in an embedded document - if (!isInEmbeddedDocument(stateElem)) - _cachedStates[ATTR(stateElem, "id")] = stateElem; - } - - // make sure every invoke has an idlocation or id - actually required! - Arabica::XPath::NodeSet invokes = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "invoke", _scxml).asNodeSet(); - for (size_t i = 0; i < invokes.size(); i++) { - Arabica::DOM::Element invokeElem = Arabica::DOM::Element(invokes[i]); - if (!invokeElem.hasAttribute("id") && !invokeElem.hasAttribute("idlocation")) { - invokeElem.setAttribute("id", UUID::getUUID()); - } - } - -#if 0 - // add an id to the scxml element - if (!_scxml.hasAttribute("id")) { - _scxml.setAttribute("id", UUID::getUUID()); - } -#endif - - // register for dom events to manage cached states - Arabica::DOM::Events::EventTarget eventTarget(_scxml); - eventTarget.addEventListener("DOMNodeInserted", _domEventListener, true); - eventTarget.addEventListener("DOMNodeRemoved", _domEventListener, true); - eventTarget.addEventListener("DOMSubtreeModified", _domEventListener, true); - _domIsSetup = true; -} - -void InterpreterImpl::resolveXIncludes() { - std::string xIncludeNS = _nsInfo.getXMLPrefixForNS("http://www.w3.org/2001/XInclude"); - - // no element in namespace for xinclude, don't bother searching - if (xIncludeNS.size() == 0) - return; - - std::map mergedNs = _nsInfo.nsInfo; - - std::list includeChain; - includeChain.push_back(_sourceURL); - - Arabica::XPath::NodeSet xincludes = _xpath.evaluate("//" + xIncludeNS + "include", _document.getDocumentElement()).asNodeSet(); - for (size_t i = 0; i < xincludes.size(); i++) { - // recursively resolve includes - resolveXIncludes(includeChain, mergedNs, xIncludeNS, URL::asBaseURL(_sourceURL), Element(xincludes[i])); - } - - // update NameSpaceInfo and reinit xpath resolver - _nsInfo = NameSpaceInfo(mergedNs); - _xpath.setNamespaceContext(*_nsInfo.getNSContext()); - -} - -void InterpreterImpl::resolveXIncludes(std::list includeChain, - std::map& mergedNS, - const std::string& xIncludeNS, - const URL& baseURL, - const Arabica::DOM::Element& xinclude) { - URL src = baseURL; - NodeSet newNodes; - - if (HAS_ATTR(xinclude, "href")) { - src = URL(ATTR(xinclude, "href")); - if (!src.isAbsolute()) { - if (!src.toAbsolute(baseURL)) { - LOG(ERROR) << "Cannot resolve relative URL '" << ATTR(xinclude, "href") << "' to absolute URL via base URL '" << baseURL << "', trying xi:fallback"; - goto TRY_WITH_FALLBACK; - } - } - - if (std::find(includeChain.begin(), includeChain.end(), src.asString()) != includeChain.end()) { - std::stringstream incErr; - incErr << ("Ignoring recursive inclusion of '" + src.asString() + " via:") << std::endl; - for (std::list::iterator incIter = includeChain.begin(); incIter != includeChain.end(); incIter++) { - incErr << " " << *incIter << std::endl; - } - LOG(ERROR) << incErr.str(); - return; - } - includeChain.push_back(src.asString()); - - if (HAS_ATTR(xinclude, "accept")) { - src.addOutHeader("Accept", ATTR_CAST(xinclude, "accept")); - } - - if (HAS_ATTR(xinclude, "accept-language")) { - src.addOutHeader("Accept-Language", ATTR_CAST(xinclude, "accept-language")); - } - - std::string includedContent; - try { - includedContent = src.getInContent(); - } catch (Event e) { - goto TRY_WITH_FALLBACK; - } - - if (HAS_ATTR(xinclude, "parse") && iequals(ATTR(xinclude, "parse"), "text")) { - // parse as text - Text textNode = _document.createTextNode(includedContent); - xinclude.getParentNode().insertBefore(textNode, xinclude); - goto REMOVE_AND_RECURSE; - } else { - // parse as XML - NameSpacingParser xiParser = NameSpacingParser::fromXML(includedContent); - if (xiParser.errorsReported()) { - ERROR_PLATFORM_THROW(xiParser.errors()); - } else { - // scxml namespace prefixed and non-profixed - if (mergedNS.find("http://www.w3.org/2005/07/scxml") != mergedNS.end() && xiParser.nameSpace.find("http://www.w3.org/2005/07/scxml") == xiParser.nameSpace.end()) { - LOG(WARNING) << ("Warning for '" + DOMUtils::xPathForNode(xinclude) + "': root document maps SCXML namespace to prefix '" + mergedNS["http://www.w3.org/2005/07/scxml"] + "', included document does not specify SCXML namespace at all"); - } - if (mergedNS.find("http://www.w3.org/2005/07/scxml") == mergedNS.end() && xiParser.nameSpace.find("http://www.w3.org/2005/07/scxml") != xiParser.nameSpace.end()) { - LOG(ERROR) << ("Error for '" + DOMUtils::xPathForNode(xinclude) + "': root document uses implicit SCXML namespace without prefix, included document does map it to prefix '" + xiParser.nameSpace["http://www.w3.org/2005/07/scxml"] + "', trying xi:fallback"); - goto TRY_WITH_FALLBACK; - - } - - // merge namespaces to prefix mappings - for (std::map::iterator nsIter = xiParser.nameSpace.begin(); nsIter != xiParser.nameSpace.end(); nsIter++) { - - // same nsURL but different prefix - if (mergedNS.find(nsIter->first) != mergedNS.end() && mergedNS[nsIter->first] != nsIter->second) { - LOG(ERROR) << ("Error for '" + DOMUtils::xPathForNode(xinclude) + "': Cannot map namespace '" + nsIter->first + "' to prefix '" + nsIter->second + "', it is already mapped to prefix '" + mergedNS[nsIter->first] + "', trying xi:fallback"); - goto TRY_WITH_FALLBACK; - } - - // same prefix but different nsURL - for (std::map::iterator currIter = mergedNS.begin(); currIter != mergedNS.end(); currIter++) { - if (currIter->second == nsIter->second && currIter->first != nsIter->first) { - LOG(ERROR) << ("Error for '" + DOMUtils::xPathForNode(xinclude) + "': Cannot assign prefix '" + nsIter->second + "' to namespace '" + nsIter->first + "' it is already a prefix for '" + currIter->first + "', trying xi:fallback"); - goto TRY_WITH_FALLBACK; - } - } - mergedNS[nsIter->first] = nsIter->second; - } - - // import DOM - Node imported = _document.importNode(xiParser.getDocument().getDocumentElement(), true); - newNodes.push_back(imported); - xinclude.getParentNode().insertBefore(imported, xinclude); - goto REMOVE_AND_RECURSE; - } - } - } else { - LOG(ERROR) << "No href attribute for xi:xinclude at '" << DOMUtils::xPathForNode(xinclude) << "', trying xi:fallback"; - goto TRY_WITH_FALLBACK; - } -TRY_WITH_FALLBACK: { - NodeSet fallbacks = DOMUtils::filterChildElements(xIncludeNS + "fallback", xinclude); - if (fallbacks.size() > 0) { - LOG(WARNING) << "Using xi:fallback for '" << DOMUtils::xPathForNode(xinclude) << "'"; - // move the fallbacks children in place - NodeList fallbackChildren = fallbacks[0].getChildNodes(); - while (fallbacks[0].getChildNodes().getLength() > 0) { - newNodes.push_back(fallbackChildren.item(0)); - xinclude.getParentNode().insertBefore(fallbackChildren.item(0), xinclude); - } - } else { - LOG(WARNING) << "No xi:fallback found for '" << DOMUtils::xPathForNode(xinclude) << "', document most likely incomplete"; - } - } -REMOVE_AND_RECURSE: - xinclude.getParentNode().removeChild(xinclude); - for (size_t i = 0; i < newNodes.size(); i++) { - _baseURL[newNodes[i]] = URL::asBaseURL(src); - Arabica::XPath::NodeSet xincludes = DOMUtils::filterChildElements(xIncludeNS + "include", newNodes[i], true); - for (size_t j = 0; j < xincludes.size(); j++) { - resolveXIncludes(includeChain, mergedNS, xIncludeNS, URL::asBaseURL(src), Element(xincludes[j])); - } - } -} - -void InterpreterImpl::init() { - // make sure we have a factory if none was set before - if (_factory == NULL) - _factory = Factory::getInstance(); - - // setup and normalize DOM - setupDOM(); - - // get our name or generate as UUID - if (_name.length() == 0) - _name = (HAS_ATTR(_scxml, "name") ? ATTR(_scxml, "name") : UUID::getUUID()); - - // setup event queue for delayed send - if (!_sendQueue) { - _sendQueue = new DelayedEventQueue(); - _sendQueue->start(); - } - - // start io processoes - setupIOProcessors(); - - // instantiate datamodel if not explicitly set - if (!_dataModel) { - if (HAS_ATTR(_scxml, "datamodel")) { - // might throw - _dataModel = _factory->createDataModel(ATTR(_scxml, "datamodel"), this); - for (std::set::iterator extIter = _dataModelExtensions.begin(); extIter != _dataModelExtensions.end(); extIter++) { - _dataModel.addExtension(*extIter); - } - } else { - _dataModel = _factory->createDataModel("null", this); - } - } - - _dataModel.assign("_x.args", _cmdLineOptions); - -// _running = true; -#if VERBOSE - std::cerr << "running " << this << std::endl; -#endif - - if (_binding == EARLY) { - // initialize all data elements - NodeSet dataElems = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "data", _scxml).asNodeSet(); - for (unsigned int i = 0; i < dataElems.size(); i++) { - // do not process data elements of nested documents from invokers - if (!getAncestorElement(dataElems[i], _nsInfo.xmlNSPrefix + "invoke")) - if (dataElems[i].getNodeType() == Node_base::ELEMENT_NODE) { - initializeData(Element(dataElems[i])); - } - } - } else { - // initialize current data elements - NodeSet topDataElems = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "data", DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "datamodel", _scxml)); - for (unsigned int i = 0; i < topDataElems.size(); i++) { - if (topDataElems[i].getNodeType() == Node_base::ELEMENT_NODE) - initializeData(Element(topDataElems[i])); - } - } - - // executeGlobalScriptElements - NodeSet globalScriptElems = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "script", _scxml); - for (unsigned int i = 0; i < globalScriptElems.size(); i++) { - executeContent(Element(globalScriptElems[i])); - } - - _isInitialized = true; - _stable = false; - setInterpreterState(USCXML_INITIALIZED); -} - -/** - * Called with a single data element from the topmost datamodel element. - */ -void InterpreterImpl::initializeData(const Element& data) { - - /// test 226/240 - initialize from invoke request - if (_invokeReq.params.find(ATTR(data, "id")) != _invokeReq.params.end()) { - try { - _dataModel.init(ATTR(data, "id"), _invokeReq.params.find(ATTR(data, "id"))->second); - } catch (Event e) { - LOG(ERROR) << "Syntax error when initializing data " << DOMUtils::xPathForNode(data) << " from parameters:" << std::endl << e << std::endl; - receiveInternal(e); - } - return; - } - if (_invokeReq.namelist.find(ATTR(data, "id")) != _invokeReq.namelist.end()) { - try { - _dataModel.init(ATTR(data, "id"), _invokeReq.namelist.find(ATTR(data, "id"))->second); - } catch (Event e) { - LOG(ERROR) << "Syntax error when initializing data " << DOMUtils::xPathForNode(data) << " from namelist:" << std::endl << e << std::endl; - receiveInternal(e); - } - return; - } - - try { - Arabica::DOM::Node dom; - std::string text; - processDOMorText(data, dom, text); - _dataModel.init(data, dom, text); - } catch (Event e) { - LOG(ERROR) << "Syntax error when initializing data " << DOMUtils::xPathForNode(data) << ":" << std::endl << e << std::endl; - receiveInternal(e); - } -} - -void InterpreterImpl::receiveInternal(const Event& event) { -#if VERBOSE - std::cerr << _name << " receiveInternal: " << event.name << std::endl; -#endif - _internalQueue.push_back(event); -// _condVar.notify_all(); -} - -void InterpreterImpl::receive(const Event& event, bool toFront) { -#if VERBOSE - std::cerr << _name << " receive: " << event.name << std::endl; -#endif - if (toFront) { - _externalQueue.push_front(event); - } else { - _externalQueue.push(event); - } - _condVar.notify_all(); -} - -void InterpreterImpl::internalDoneSend(const Arabica::DOM::Element& state, const Arabica::DOM::Element& doneData) { - if (!isState(state)) - return; - -// if (parentIsScxmlState(state)) -// return; - - Event event; - - if (doneData) { - processParamChilds(doneData, event.params); - Arabica::XPath::NodeSet contents = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", doneData); - if (contents.size() > 1) - LOG(ERROR) << "Only a single content element is allowed for send elements - using first one"; - if (contents.size() > 0) { - std::string expr; - processContentElement(Element(contents[0]), event.dom, event.content, expr); - if (expr.length() > 0) { - try { - event.content =_dataModel.evalAsString(expr); - } catch (Event e) { - e.name = "error.execution"; - e.dom = contents[0]; - receiveInternal(e); - } - } - } - } - - event.name = "done.state." + ATTR_CAST(state, "id"); // parent?! - receiveInternal(event); - -} - -void InterpreterImpl::processContentElement(const Arabica::DOM::Element& content, - Arabica::DOM::Node& dom, - std::string& text, - std::string& expr) { - if (HAS_ATTR(content, "expr")) { - expr = ATTR(content, "expr"); - } else if (content.hasChildNodes() || HAS_ATTR(content, "src") || HAS_ATTR(content, "srcexpr")) { - processDOMorText(content, dom, text); - } else { - LOG(ERROR) << "content element does not specify any content."; - } -} - -void InterpreterImpl::processDOMorText(const Arabica::DOM::Element& element, - Arabica::DOM::Node& dom, - std::string& text) { - // do we need to download? - if (HAS_ATTR(element, "src") || - (HAS_ATTR(element, "srcexpr"))) { - std::stringstream srcContent; - URL sourceURL(HAS_ATTR(element, "srcexpr") ? _dataModel.evalAsString(ATTR(element, "srcexpr")) : ATTR(element, "src")); - if (!sourceURL.toAbsolute(getBaseURLForNode(element))) { - LOG(ERROR) << LOCALNAME(element) << " element has relative src or srcexpr URL with no baseURL set."; - return; - } - if (_cachedURLs.find(sourceURL.asString()) != _cachedURLs.end() && false) { - srcContent << _cachedURLs[sourceURL.asString()]; - } else { - srcContent << sourceURL; - if (sourceURL.downloadFailed()) { - LOG(ERROR) << LOCALNAME(element) << " source cannot be downloaded"; - return; - } - _cachedURLs[sourceURL.asString()] = sourceURL; - } - if (srcContent.str().length() > 0) { - // try to parse as XML - NameSpacingParser parser; - std::stringstream* ss = new std::stringstream(); - (*ss) << srcContent.str(); - std::auto_ptr ssPtr(ss); - Arabica::SAX::InputSource inputSource; - inputSource.setByteStream(ssPtr); - - if (parser.parse(inputSource) && parser.getDocument()) { - Document doc = parser.getDocument(); - dom = doc.getDocumentElement(); - return; - } else { - text = srcContent.str(); - return; - } - } - } - - if (!element.hasChildNodes()) - return; - - /** - * Figure out whether the given element contains text, has one child or many childs - */ - bool hasTextContent = false; - bool hasOneChild = false; - Node theOneChild; - bool hasManyChilds = false; - - Node child = element.getFirstChild(); - while (child) { -// std::cerr << child.getNodeType() << std::endl; - if (child.getNodeType() == Node_base::TEXT_NODE || - child.getNodeType() == Node_base::CDATA_SECTION_NODE) { - std::string trimmed = child.getNodeValue(); - boost::trim(trimmed); - if (trimmed.length() > 0) { - hasTextContent = true; - } - } else { - if (hasOneChild) { - hasManyChilds = true; - hasOneChild = false; - break; - } - hasOneChild = true; - theOneChild = child; - } - child = child.getNextSibling(); - } - - if (hasOneChild) { - // if we have a single child, it will be the content of the dom - dom = theOneChild; - } else if (hasManyChilds) { - // if we have multiple childs - dom = element; - } else if(hasTextContent) { - child = element.getFirstChild(); - while(child) { - if ((child.getNodeType() == Node_base::TEXT_NODE || child.getNodeType() == Node_base::CDATA_SECTION_NODE)) { - text += child.getNodeValue(); - } - child = child.getNextSibling(); - } - // updated test 179 - conflicts with test 562 -// text = _dataModel.evalAsString(text); - } else { - LOG(ERROR) << LOCALNAME(element) << " has neither text nor element children."; - } -} - -void InterpreterImpl::processParamChilds(const Arabica::DOM::Element& element, std::multimap& params) { - NodeSet paramElems = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "param", element); - for (size_t i = 0; i < paramElems.size(); i++) { - try { - Element paramElem = Element(paramElems[i]); - if (!HAS_ATTR(paramElem, "name")) { - LOG(ERROR) << "param element is missing name attribute"; - continue; - } - Data paramValue; - if (HAS_ATTR(paramElem, "expr")) { - paramValue = _dataModel.getStringAsData(ATTR(paramElem, "expr")); - } else if(HAS_ATTR(paramElem, "location")) { - paramValue = _dataModel.getStringAsData(ATTR(paramElem, "location")); - } else { - LOG(ERROR) << "param element is missing expr or location or no datamodel is specified"; - continue; - } - std::string paramKey = ATTR(paramElem, "name"); - params.insert(std::make_pair(paramKey, paramValue)); - } catch(Event e) { - LOG(ERROR) << "Syntax error while processing params " << DOMUtils::xPathForNode(paramElems[i]) << ":" << std::endl << e << std::endl; - // test 343 - std::multimap::iterator paramIter = params.begin(); - while(paramIter != params.end()) { - params.erase(paramIter++); - } - e.name = "error.execution"; - receiveInternal(e); - break; - } - } -} - -void InterpreterImpl::send(const Arabica::DOM::Element& element) { - SendRequest sendReq; - // test 331 - sendReq.Event::eventType = Event::EXTERNAL; - sendReq.elem = element; - try { - // event - if (HAS_ATTR(element, "eventexpr")) { - sendReq.name = _dataModel.evalAsString(ATTR(element, "eventexpr")); - } else if (HAS_ATTR(element, "event")) { - sendReq.name = ATTR(element, "event"); - } - } catch (Event e) { - LOG(ERROR) << "Syntax error in send element eventexpr " << DOMUtils::xPathForNode(element) << ":" << std::endl << e << std::endl; - return; - } - try { - // target - if (HAS_ATTR(element, "targetexpr")) { - sendReq.target = _dataModel.evalAsString(ATTR(element, "targetexpr")); - } else if (HAS_ATTR(element, "target")) { - sendReq.target = ATTR(element, "target"); - } - } catch (Event e) { - LOG(ERROR) << "Syntax error in send element " << DOMUtils::xPathForNode(element) << " targetexpr:" << std::endl << e << std::endl; - return; - } - try { - // type - if (HAS_ATTR(element, "typeexpr")) { - sendReq.type = _dataModel.evalAsString(ATTR(element, "typeexpr")); - } else if (HAS_ATTR(element, "type")) { - sendReq.type = ATTR(element, "type"); - } - } catch (Event e) { - LOG(ERROR) << "Syntax error in send element " << DOMUtils::xPathForNode(element) << " typeexpr:" << std::endl << e << std::endl; - return; - } - try { - // id - if (HAS_ATTR(element, "id")) { - sendReq.sendid = ATTR(element, "id"); - } else { - /* - * The ids for and are subtly different. In a conformant - * SCXML document, they must be unique within the session, but in the case - * where the author does not provide them, the processor must generate a - * new unique ID not at load time but each time the element is executed. - * Furthermore the attribute 'idlocation' can be used to capture this - * automatically generated id. Finally note that the automatically generated - * id for has a special format. See 6.4.1 Attribute Details for - * details. The SCXML processor may generate all other ids in any format, - * as long as they are unique. - */ - - /** - * - * If 'idlocation' is present, the SCXML Processor must generate an id when - * the parent element is evaluated and store it in this location. - * See 3.14 IDs for details. - * - */ - sendReq.sendid = ATTR(getParentState(element), "id") + "." + UUID::getUUID(); - if (HAS_ATTR(element, "idlocation")) { - _dataModel.assign(ATTR(element, "idlocation"), Data(sendReq.sendid, Data::VERBATIM)); - } else { - sendReq.hideSendId = true; - } - } - } catch (Event e) { - LOG(ERROR) << "Syntax error in send element " << DOMUtils::xPathForNode(element) << " idlocation:" << std::endl << e << std::endl; - return; - } - - try { - // delay - std::string delay; - sendReq.delayMs = 0; - if (HAS_ATTR(element, "delayexpr")) { - delay = _dataModel.evalAsString(ATTR(element, "delayexpr")); - } else if (HAS_ATTR(element, "delay")) { - delay = ATTR(element, "delay"); - } - if (delay.size() > 0) { - boost::trim(delay); - - NumAttr delayAttr(delay); - if (iequals(delayAttr.unit, "ms")) { - sendReq.delayMs = strTo(delayAttr.value); - } else if (iequals(delayAttr.unit, "s")) { - sendReq.delayMs = strTo(delayAttr.value) * 1000; - } else if (delayAttr.unit.length() == 0) { // unit less delay is interpreted as milliseconds - sendReq.delayMs = strTo(delayAttr.value); - } else { - LOG(ERROR) << "Cannot make sense of delay value " << delay << ": does not end in 's' or 'ms'"; - } - } - } catch (Event e) { - LOG(ERROR) << "Syntax error in send element " << DOMUtils::xPathForNode(element) << " delayexpr:" << std::endl << e << std::endl; - return; - } - - try { - // namelist - if (HAS_ATTR(element, "namelist")) { - std::list names = tokenize(ATTR(element, "namelist")); - for (std::list::const_iterator nameIter = names.begin(); nameIter != names.end(); nameIter++) { - if (!_dataModel.isLocation(*nameIter)) { - LOG(ERROR) << "Error in send element " << DOMUtils::xPathForNode(element) << " namelist:" << std::endl << "'" << *nameIter << "' is not a location expression" << std::endl; - ERROR_EXECUTION2(err, "Location expression '" + *nameIter + "' in namelist is invalid", element); - receiveInternal(err); - return; - } - Data namelistValue = _dataModel.getStringAsData(*nameIter); - sendReq.namelist[*nameIter] = namelistValue; - sendReq.data.compound[*nameIter] = namelistValue; // this is questionable - } - } - } catch (Event e) { - LOG(ERROR) << "Syntax error in send element " << DOMUtils::xPathForNode(element) << " namelist:" << std::endl << e << std::endl; - return; - } - - try { - // params - processParamChilds(element, sendReq.params); - } catch (Event e) { - LOG(ERROR) << "Syntax error in send element " << DOMUtils::xPathForNode(element) << " param expr:" << std::endl << e << std::endl; - return; - } - try { - // content - NodeSet contents = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", element); - if (contents.size() > 1) - LOG(ERROR) << "Only a single content element is allowed for send elements " << DOMUtils::xPathForNode(element) << " - using first one"; - if (contents.size() > 0) { - std::string expr; - processContentElement(Element(contents[0]), sendReq.dom, sendReq.content, expr); - if (expr.length() > 0) { - try { - sendReq.data = _dataModel.getStringAsData(expr); - } catch (Event e) { - e.name = "error.execution"; - receiveInternal(e); - return; - } - // set as content if it's only an atom - if (sendReq.data.atom.length() > 0) { - sendReq.content = sendReq.data.atom; - } - } else if (sendReq.content.length() > 0) { - sendReq.data = Data::fromJSON(sendReq.content); - } - } - } catch (Event e) { - LOG(ERROR) << "Syntax error in send element " << DOMUtils::xPathForNode(element) << " content:" << std::endl << e << std::endl; - return; - } - - if (sendReq.dom) { - std::stringstream ss; - ss << sendReq.dom; - sendReq.xml = ss.str(); - _dataModel.replaceExpressions(sendReq.xml); - } - - assert(_sendIds.find(sendReq.sendid) == _sendIds.end()); - _sendIds[sendReq.sendid] = std::make_pair(this, sendReq); - if (sendReq.delayMs > 0) { - _sendQueue->addEvent(sendReq.sendid, InterpreterImpl::delayedSend, sendReq.delayMs, &_sendIds[sendReq.sendid]); - } else { - delayedSend(&_sendIds[sendReq.sendid], sendReq.name); - } -} - -void InterpreterImpl::delayedSend(void* userdata, std::string eventName) { - std::pair* data = (std::pair*)(userdata); - - InterpreterImpl* INSTANCE = data->first; - SendRequest sendReq = data->second; - - /** - * If neither the 'type' nor the 'typeexpr' is defined, the SCXML Processor - * must assume the default value of http://www.w3.org/TR/scxml/#SCXMLEventProcessor - */ - if (sendReq.type.length() == 0) - sendReq.type = "http://www.w3.org/TR/scxml/#SCXMLEventProcessor"; - - IOProcessor ioProc = INSTANCE->getIOProcessor(sendReq.type); - if (ioProc) { - try { - ioProc.send(sendReq); - } catch(Event e) { - throw e; - } catch (const std::exception &e) { - LOG(ERROR) << "Exception caught while sending event to ioprocessor " << sendReq.type << ": '" << e.what() << "'"; - } catch(...) { - LOG(ERROR) << "Exception caught while sending event to ioprocessor " << sendReq.type; - } - } else { - /** - * If the SCXML Processor does not support the type that is specified, it - * must place the event error.execution on the internal event queue. - */ - ERROR_EXECUTION(exc, "Unsupported type '" + sendReq.type + "' with send element"); - INSTANCE->receiveInternal(exc); - } - - assert(INSTANCE->_sendIds.find(sendReq.sendid) != INSTANCE->_sendIds.end()); - INSTANCE->_sendIds.erase(sendReq.sendid); -} - -void InterpreterImpl::invoke(const Arabica::DOM::Element& element) { - InvokeRequest invokeReq; - invokeReq.elem = element; - invokeReq.Event::eventType = Event::EXTERNAL; - try { - // type - if (HAS_ATTR(element, "typeexpr")) { - invokeReq.type = _dataModel.evalAsString(ATTR(element, "typeexpr")); - } else if (HAS_ATTR(element, "type")) { - invokeReq.type = ATTR(element, "type"); - } - - // src - std::string source; - if (HAS_ATTR(element, "srcexpr")) { - source = _dataModel.evalAsString(ATTR(element, "srcexpr")); - } else if (HAS_ATTR(element, "src")) { - source = ATTR(element, "src"); - } - if (source.length() > 0) { - URL srcURL(source); - if (!srcURL.toAbsolute(getBaseURLForNode(element))) { - LOG(ERROR) << "invoke element has relative src URL with no baseURL set."; - return; - } - invokeReq.src = srcURL.asString(); - } - - // id - try { - if (HAS_ATTR(element, "id")) { - invokeReq.invokeid = ATTR(element, "id"); - } else { - if (HAS_ATTR(_scxml, "flat") && stringIsTrue(ATTR(_scxml, "flat")) && HAS_ATTR(element, "parent")) { - invokeReq.invokeid = ATTR(element, "parent") + "." + UUID::getUUID(); - } else { - invokeReq.invokeid = ATTR(getParentState(element), "id") + "." + UUID::getUUID(); - } - if (HAS_ATTR(element, "idlocation")) { - _dataModel.assign(ATTR(element, "idlocation"), Data(invokeReq.invokeid, Data::VERBATIM)); - } - } - } catch (Event e) { - LOG(ERROR) << "Syntax error in invoke element idlocation:" << std::endl << e << std::endl; - return; - } - - // namelist - if (HAS_ATTR(element, "namelist")) { - std::list names = tokenize(ATTR(element, "namelist")); - for (std::list::const_iterator nameIter = names.begin(); nameIter != names.end(); nameIter++) { - if (!_dataModel.isLocation(*nameIter)) { - LOG(ERROR) << "Error in send element " << DOMUtils::xPathForNode(element) << " namelist:" << std::endl << "'" << *nameIter << "' is not a location expression" << std::endl; - ERROR_EXECUTION2(err, "Location expression '" + *nameIter + "' in namelist is invalid", element); - receiveInternal(err); - return; - } - Data namelistValue = _dataModel.getStringAsData(*nameIter); - invokeReq.namelist[*nameIter] = namelistValue; - invokeReq.data.compound[*nameIter] = namelistValue; - } - } - - // autoforward - if (HAS_ATTR(element, "autoforward")) { - if (iequals(ATTR(element, "autoforward"), "true")) { - invokeReq.autoForward = true; - } - } else { - invokeReq.autoForward = false; - } - - // params - processParamChilds(element, invokeReq.params); - - // content - try { - NodeSet contents = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", element); - if (contents.size() > 1) - LOG(ERROR) << "Only a single content element is allowed for send elements - using first one"; - if (contents.size() > 0) { - std::string expr; - processContentElement(Element(contents[0]), invokeReq.dom, invokeReq.content, expr); - if (expr.length() > 0) { - try { - invokeReq.data =_dataModel.getStringAsData(expr); - } catch (Event e) { - e.name = "error.execution"; - e.dom = contents[0]; - receiveInternal(e); - } - } else if (invokeReq.content.length() > 0) { - invokeReq.data = Data::fromJSON(invokeReq.content); - } - - } - } catch (Event e) { - LOG(ERROR) << "Syntax error in send element " << DOMUtils::xPathForNode(element) << " content:" << std::endl << e << std::endl; - return; - } - - if (invokeReq.dom) { - std::stringstream ss; - ss << invokeReq.dom; - invokeReq.xml = ss.str(); - _dataModel.replaceExpressions(invokeReq.xml); - } - - // test 422 - if (invokeReq.type.size() == 0) - invokeReq.type = "http://www.w3.org/TR/scxml/"; - - Invoker invoker; - // is there such an invoker already? - if (_invokers.find(invokeReq.invokeid) != _invokers.end()) { - invoker = _invokers[invokeReq.invokeid]; - } else { - try { - invoker = _factory->createInvoker(invokeReq.type, this); - invoker.setInvokeId(invokeReq.invokeid); - invoker.setInterpreter(this); - _invokers[invokeReq.invokeid] = invoker; - } catch (Event e) { - receiveInternal(e); - } - } - if (invoker) { - tthread::lock_guard lock(_pluginMutex); - try { - - if (!invoker.getElement()) - invoker.setElement(Element(element)); - - if (invoker.getType().size() == 0) - invoker.setType(invokeReq.type); - - try { - - USCXML_MONITOR_CALLBACK3(beforeInvoking, Arabica::DOM::Element(element), invokeReq.invokeid); - - invoker.invoke(invokeReq); - LOG(INFO) << "Added invoker " << invokeReq.type << " at " << invokeReq.invokeid; - - USCXML_MONITOR_CALLBACK3(afterInvoking, Arabica::DOM::Element(element), invokeReq.invokeid) - - // this is out of draft but so useful to know when an invoker started - if (HAS_ATTR(element, "callback")) { - std::string callback = ATTR(element, "callback"); - if (callback.size() > 0) { - Event invSuccess; - invSuccess.name = callback + "." + invokeReq.invokeid; - receive(invSuccess); - } - } - - - } catch(boost::bad_lexical_cast e) { - LOG(ERROR) << "Exception caught while sending invoke request to invoker " << invokeReq.invokeid << ": " << e.what(); - } catch (const std::exception &e) { - LOG(ERROR) << "Unknown exception caught while sending invoke request to invoker " << invokeReq.invokeid << ": " << e.what(); - } catch (Event &e) { - LOG(ERROR) << e; - } catch(...) { - LOG(ERROR) << "Unknown exception caught while sending invoke request to invoker " << invokeReq.invokeid; - } - try { -// _dataModel.assign("_invokers['" + invokeReq.invokeid + "']", invoker.getDataModelVariables()); - } catch (const std::exception &e) { - LOG(ERROR) << "Exception caught while assigning datamodel variables from invoker " << invokeReq.invokeid << ": " << e.what(); - } catch(...) { - LOG(ERROR) << "Exception caught while assigning datamodel variables from invoker " << invokeReq.invokeid; - } - } catch (...) { - LOG(ERROR) << "Invoker " << invokeReq.type << " threw an exception"; - } - } else { - LOG(ERROR) << "No invoker known for type " << invokeReq.type; - } - - } catch (Event e) { - LOG(ERROR) << "Syntax error in invoke element " << DOMUtils::xPathForNode(element) << ":" << std::endl << e << std::endl; - } -} - -void InterpreterImpl::cancelInvoke(const Arabica::DOM::Element& element) { - std::string invokeId; - if (HAS_ATTR(element, "idlocation")) { - invokeId = _dataModel.evalAsString(ATTR(element, "idlocation")); - } else if (HAS_ATTR(element, "id")) { - invokeId = ATTR(element, "id"); - } else { - assert(false); - } - if (_invokers.find(invokeId) != _invokers.end()) { - LOG(INFO) << "Removed invoker at " << invokeId; - try { - // TODO: this is datamodel specific! - //_dataModel.assign("_invokers['" + invokeId + "']", Data(std::string("''"), Data::INTERPRETED)); - } catch (Event e) { - LOG(ERROR) << "Syntax when removing invoker:" << std::endl << e << std::endl; - } - - USCXML_MONITOR_CALLBACK3(beforeUninvoking, Element(element), invokeId) - _invokers[invokeId].uninvoke(); - - /** - * This should not be necessary. Most invokers have their "clean-up" code in their - * destructor and not their uninvoke method - we need to refactor them all! - */ - if (_invokers[invokeId].deleteOnUninvoke()) - _invokers.erase(invokeId); - - USCXML_MONITOR_CALLBACK3(beforeUninvoking, Element(element), invokeId) - - } else { - LOG(ERROR) << "Cannot cancel invoke for id " << invokeId << ": no such invokation"; - } - //receiveInternal(Event("done.invoke." + invokeId, Event::PLATFORM)); -} - -bool InterpreterImpl::hasConditionMatch(const Arabica::DOM::Element& conditional) { - if (HAS_ATTR(conditional, "cond") && ATTR(conditional, "cond").length() > 0) { - try { - return _dataModel.evalAsBool(conditional, ATTR(conditional, "cond")); - } catch (Event e) { - LOG(ERROR) << "Syntax error in cond attribute of " << TAGNAME(conditional) << " element " << DOMUtils::xPathForNode(conditional) << ":" << std::endl << e << std::endl; - e.name = "error.execution"; - receiveInternal(e); - return false; - } - } - return true; // no condition is always true -} - - -void InterpreterImpl::executeContent(const NodeList& content, bool rethrow) { - for (unsigned int i = 0; i < content.getLength(); i++) { - const Arabica::DOM::Node& node = content.item(i); - if (node.getNodeType() != Node_base::ELEMENT_NODE) - continue; - try { - executeContent(Element(node), true); - } - CATCH_AND_DISTRIBUTE2("Error when executing content", content.item(i)); - } -} - -void InterpreterImpl::executeContent(const NodeSet& content, bool rethrow) { - for (unsigned int i = 0; i < content.size(); i++) { - const Arabica::DOM::Node& node = content[i]; - if (node.getNodeType() != Node_base::ELEMENT_NODE) - continue; - try { - executeContent(Element(node), true); - } - CATCH_AND_DISTRIBUTE2("Error when executing content", content[i]); - } -} - -void InterpreterImpl::executeContent(const Arabica::DOM::Element& content, bool rethrow) { - - if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "onentry") || - iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "onexit") || - iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "finalize") || - iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "transition")) { - // --- CONVENIENCE LOOP -------------------------- - NodeList executable = content.getChildNodes(); - for (size_t i = 0; i < executable.getLength(); i++) { - const Arabica::DOM::Node& childNode = executable.item(i); - if (childNode.getNodeType() != Node_base::ELEMENT_NODE) - continue; - executeContent(Element(childNode), rethrow); - } - return; - } - - USCXML_MONITOR_CALLBACK2(beforeExecutingContent, Element(content)) - - if (false) { - } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "raise")) { - // --- RAISE -------------------------- -#if 0 - if (HAS_ATTR(content, "event")) { - receiveInternal(Event(ATTR(content, "event"))); - } -#else - // Extension for donedata in flat documents - we need to send them internally - use raise - if (HAS_ATTR(content, "event")) { - Event raised(ATTR(content, "event")); - try { - // content - processParamChilds(content, raised.params); - NodeSet contents = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", content); - if (contents.size() > 1) - LOG(ERROR) << "Only a single content element is allowed for raise elements " << DOMUtils::xPathForNode(content) << " - using first one"; - if (contents.size() > 0) { - std::string expr; - processContentElement(Element(contents[0]), raised.dom, raised.content, expr); - if (expr.length() > 0) { - try { - raised.data = _dataModel.getStringAsData(expr); - } catch (Event e) { - e.name = "error.execution"; - receiveInternal(e); - } - // set as content if it's only an atom - if (raised.data.atom.length() > 0) { - raised.content = raised.data.atom; - } - } else if (raised.content.length() > 0) { - raised.data = Data::fromJSON(raised.content); - } - } - } catch (Event e) { - LOG(ERROR) << "Syntax error in send element " << DOMUtils::xPathForNode(content) << " content:" << std::endl << raised << std::endl; - return; - } - - if (raised.dom) { - std::stringstream ss; - ss << raised.dom; - raised.xml = ss.str(); - _dataModel.replaceExpressions(raised.xml); - } - receiveInternal(raised); - } -#endif - } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "if")) { - // --- IF / ELSEIF / ELSE -------------- - Arabica::DOM::Element ifElem = (Arabica::DOM::Element)content; -#if VERBOSE - if (HAS_ATTR(ifElem, "cond")) - std::cerr << ATTR(ifElem, "cond") << std::endl; -#endif - /** - * A block is everything up to or between elseifs and else. Those element - * determine whether the block is true and its executable content executed. - */ - if (ifElem.hasChildNodes()) { - bool blockIsTrue = hasConditionMatch(ifElem); - NodeList childs = ifElem.getChildNodes(); - for (unsigned int i = 0; i < childs.getLength(); i++) { - if (childs.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - Element childElem(childs.item(i)); - if (iequals(TAGNAME_CAST(childs.item(i)), _nsInfo.xmlNSPrefix + "elseif") || - iequals(TAGNAME_CAST(childs.item(i)), _nsInfo.xmlNSPrefix + "else")) { - if (blockIsTrue) { - // last block was true, break here - break; - } else { - // is this block the one to execute? - blockIsTrue = hasConditionMatch(childElem); - } - } else { - if (blockIsTrue) { - executeContent(childElem, rethrow); - } - } - } - } - } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "elseif")) { - LOG(ERROR) << "Found single elseif to evaluate!" << std::endl; - } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "else")) { - LOG(ERROR) << "Found single else to evaluate!" << std::endl; - } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "foreach")) { - // --- FOREACH -------------------------- - if (HAS_ATTR(content, "array") && HAS_ATTR(content, "item")) { - std::string array = ATTR(content, "array"); - std::string item = ATTR(content, "item"); - std::string index = (HAS_ATTR(content, "index") ? ATTR(content, "index") : ""); - uint32_t iterations = 0; - try { - iterations = _dataModel.getLength(array); - } - CATCH_AND_DISTRIBUTE2("Syntax error in array attribute of foreach element", content) - try { - _dataModel.pushContext(); // copy old and enter new context -// if (!_dataModel.isDeclared(item)) { -// _dataModel.init(item, Data()); -// } - for (uint32_t iteration = 0; iteration < iterations; iteration++) { - _dataModel.setForeach(item, array, index, iteration); - if (content.hasChildNodes()) - // execute content and have exception rethrown to break foreach - executeContent(content.getChildNodes(), rethrow); - } - _dataModel.popContext(); // leave stacked context - } - CATCH_AND_DISTRIBUTE2("Syntax error in foreach element", content) - } else { - LOG(ERROR) << "Expected array and item attributes with foreach element!" << std::endl; - } - } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "log")) { - // --- LOG -------------------------- - Arabica::DOM::Element logElem = (Arabica::DOM::Element)content; - if (logElem.hasAttribute("label")) { - std::cout << logElem.getAttribute("label") << ": "; - } - if (logElem.hasAttribute("expr")) { - try { - std::string msg = _dataModel.evalAsString(logElem.getAttribute("expr")); - std::cout << msg << std::endl; - } - CATCH_AND_DISTRIBUTE2("Syntax error in expr attribute of log element", content) - } else { - if (logElem.hasAttribute("label")) { - std::cout << std::endl; - } - } - } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "assign")) { - // --- ASSIGN -------------------------- - if (HAS_ATTR(content, "location")) { - try { - if (!_dataModel.isDeclared(ATTR(content, "location"))) { - // test 286, 331 - ERROR_EXECUTION_THROW("Assigning to undeclared location '" + ATTR(content, "location") + "' not allowed."); - } else { - Node dom; - std::string text; - processDOMorText(content, dom, text); - _dataModel.assign(Element(content), dom, text); - } - } - CATCH_AND_DISTRIBUTE2("Syntax error in attributes of assign element", content) - } - } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "validate")) { - // --- VALIDATE -------------------------- - std::string location = (HAS_ATTR(content, "location") ? ATTR(content, "location") : ""); - std::string schema = (HAS_ATTR(content, "schema") ? ATTR(content, "schema") : ""); - _dataModel.validate(location, schema); - } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "script")) { - // --- SCRIPT -------------------------- - if (HAS_ATTR(content, "src")) { - URL scriptUrl(ATTR(content, "src")); - - if (!scriptUrl.toAbsolute(getBaseURLForNode(content))) { - LOG(ERROR) << "Failed to convert relative script URL " << ATTR(content, "src") << " to absolute with base URL " << getBaseURLForNode(content); - return; - } - - std::stringstream srcContent; - try { - if (_cachedURLs.find(scriptUrl.asString()) != _cachedURLs.end() && false) { - srcContent << _cachedURLs[scriptUrl.asString()]; - } else { - srcContent << scriptUrl; - if (scriptUrl.downloadFailed()) { - LOG(ERROR) << "script element source cannot be downloaded"; - } - _cachedURLs[scriptUrl.asString()] = scriptUrl; - } - } catch (Event exception) { - // script failed to download - if (exception.name == "error.communication") { - throw exception; // terminate test329, test301 - } - receive(exception); - return; - } - - try { - _dataModel.eval((Element)content, srcContent.str()); - } - CATCH_AND_DISTRIBUTE("Syntax error while executing script element from '" + ATTR(content, "src") + "':") - } else { - if (content.hasChildNodes()) { - // search for the text node with the actual script - std::string scriptContent; - for (Node child = content.getFirstChild(); child; child = child.getNextSibling()) { - if (child.getNodeType() == Node_base::TEXT_NODE || child.getNodeType() == Node_base::CDATA_SECTION_NODE) - scriptContent += child.getNodeValue(); - } - if (scriptContent.size() > 0) { - try { - _dataModel.eval((Element)content, scriptContent); - } - CATCH_AND_DISTRIBUTE2("Syntax error while executing script element", content) - } - } - } - } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "send")) { - // --- SEND -------------------------- - try { - send(content); - } - CATCH_AND_DISTRIBUTE2("Error while sending content", content) - } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "cancel")) { - // --- CANCEL -------------------------- - std::string sendId; - try { - if (HAS_ATTR(content, "sendidexpr")) { - sendId = _dataModel.evalAsString(ATTR(content, "sendidexpr")); - } else if(HAS_ATTR(content, "sendid")) { - sendId = ATTR(content, "sendid"); - } else { - LOG(ERROR) << "Expected sendidexpr or sendid attribute in cancel element"; - return; - } - _sendQueue->cancelEvent(sendId); - { - tthread::lock_guard lock(_sendQueue->_mutex); - _sendIds.erase(sendId); // issue 68 - } - - } - CATCH_AND_DISTRIBUTE2("Syntax error while executing cancel element", content) - } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "invoke")) { - // --- INVOKE -------------------------- - } else { - // --- Custom Executable Content - ExecutableContent execContent; - if (_executableContent.find(content) == _executableContent.end()) { - _executableContent[content] = _factory->createExecutableContent(content.getLocalName(), content.getNamespaceURI(), this); - } - execContent = _executableContent[content]; - - execContent.enterElement(content); - if (execContent.processChildren()) { - NodeList executable = content.getChildNodes(); - for (size_t i = 0; i < executable.getLength(); i++) { - if (executable.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - executeContent(Element(executable.item(i)), rethrow); - } - } - execContent.exitElement(content); - } - - USCXML_MONITOR_CALLBACK2(afterExecutingContent, Element(content)) - -} - -void InterpreterImpl::finalizeAndAutoForwardCurrentEvent() { - for (std::map::iterator invokeIter = _invokers.begin(); - invokeIter != _invokers.end(); - invokeIter++) { - if (iequals(invokeIter->first, _currEvent.invokeid)) { - Arabica::XPath::NodeSet finalizes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "finalize", invokeIter->second.getElement()); - for (size_t k = 0; k < finalizes.size(); k++) { - Element finalizeElem = Element(finalizes[k]); - - bool hasChildElems = false; - Node child = finalizeElem.getFirstChild(); - while(child) { - if (child.getNodeType() == Node_base::ELEMENT_NODE) { - hasChildElems = true; - break; - } - child = child.getNextSibling(); - } - - if (hasChildElems) { - executeContent(finalizeElem); - } else { - // Specification 6.5.2: http://www.w3.org/TR/scxml/#N110EF - if (HAS_ATTR(invokeIter->second.getElement(), "namelist")) { - std::list names = tokenize(ATTR(invokeIter->second.getElement(), "namelist")); - for (std::list::iterator nameIter = names.begin(); nameIter != names.end(); nameIter++) { - if (_currEvent.data.compound.find(*nameIter) != _currEvent.data.compound.end()) { - _dataModel.assign(*nameIter, _currEvent.data.compound[*nameIter]); - } - } - } - - Arabica::XPath::NodeSet params = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "param", invokeIter->second.getElement()); - for (size_t l = 0; l < params.size(); l++) { - Element paramElem = Element(params[l]); - if (HAS_ATTR(paramElem, "location") && - _currEvent.data.compound.find(ATTR(paramElem, "location")) != _currEvent.data.compound.end()) { - std::string location = ATTR(paramElem, "location"); - _dataModel.assign(location, _currEvent.data.compound[location]); - } - } - - - } - } - } - if (HAS_ATTR(invokeIter->second.getElement(), "autoforward") && stringIsTrue(ATTR(invokeIter->second.getElement(), "autoforward"))) { - try { - // do not autoforward to invokers that send to #_parent from the SCXML IO Processor! - // Yes do so, see test229! - // if (!boost::equals(_currEvent.getOriginType(), "http://www.w3.org/TR/scxml/#SCXMLEventProcessor")) -// LOG(ERROR) << _sessionId << " auto forwards " << _currEvent.name << " to " << invokeIter->first << std::endl; - invokeIter->second.send(_currEvent); - } catch (const std::exception &e) { - LOG(ERROR) << "Exception caught while sending event to invoker " << invokeIter->first << ": " << e.what(); - } catch(...) { - LOG(ERROR) << "Exception caught while sending event to invoker " << invokeIter->first; - } - } - } -} - -void InterpreterImpl::returnDoneEvent(const Arabica::DOM::Node& state) { -// std::cerr << state << std::endl; - if (_parentQueue != NULL) { - Event done; - done.name = "done.invoke." + _sessionId; - _parentQueue->push(done); - } -} - -bool InterpreterImpl::parentIsScxmlState(const Arabica::DOM::Element& state) { - Arabica::DOM::Element parentElem = (Arabica::DOM::Element)state.getParentNode(); - if (iequals(TAGNAME(parentElem), _nsInfo.xmlNSPrefix + "scxml")) - return true; - return false; -} - -bool InterpreterImpl::isInFinalState(const Arabica::DOM::Element& state) { - if (isCompound(state)) { - Arabica::XPath::NodeSet childs = getChildStates(state); - for (size_t i = 0; i < childs.size(); i++) { - if (isFinal(Element(childs[i])) && isMember(childs[i], _configuration)) - return true; - } - } else if (isParallel(state)) { - Arabica::XPath::NodeSet childs = getChildStates(state); - for (size_t i = 0; i < childs.size(); i++) { - if (!isInFinalState(Element(childs[i]))) - return false; - } - return true; - } - return false; -} - -bool InterpreterImpl::isMember(const Arabica::DOM::Node& node, const Arabica::XPath::NodeSet& set) { - for (size_t i = 0; i < set.size(); i++) { - if (set[i] == node) - return true; - } - return false; -} - -Arabica::XPath::NodeSet InterpreterImpl::getChildStates(const Arabica::DOM::Node& state) { - Arabica::XPath::NodeSet childs; - - Arabica::DOM::NodeList childElems = state.getChildNodes(); - for (size_t i = 0; i < childElems.getLength(); i++) { - if (childElems.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - if (isState(Element(childElems.item(i)))) { - childs.push_back(childElems.item(i)); - } - } - return childs; -} - -Arabica::XPath::NodeSet InterpreterImpl::getChildStates(const Arabica::XPath::NodeSet& states) { - Arabica::XPath::NodeSet childs; - for (size_t i = 0; i < states.size(); i++) { - childs.push_back(getChildStates(states[i])); - } - return childs; -} - -Arabica::DOM::Element InterpreterImpl::getParentState(const Arabica::DOM::Node& element) { - Arabica::DOM::Node parent = element.getParentNode(); - while(parent && !isState(Element(parent))) { - parent = parent.getParentNode(); - } - return Element(parent); -} - -Arabica::DOM::Node InterpreterImpl::getAncestorElement(const Arabica::DOM::Node& node, const std::string tagName) { - Arabica::DOM::Node parent = node.getParentNode(); - while(parent) { - if (parent.getNodeType() == Node_base::ELEMENT_NODE && - iequals(TAGNAME_CAST(parent), tagName)) { - return parent; - } - parent = parent.getParentNode(); - } - return Arabica::DOM::Node(); -} - -/** - See: http://www.w3.org/TR/scxml/#LCCA - The Least Common Compound Ancestor is the or element s such that s is a proper ancestor - of all states on stateList and no descendant of s has this property. Note that there is guaranteed to be - such an element since the wrapper element is a common ancestor of all states. Note also that since - we are speaking of proper ancestor (parent or parent of a parent, etc.) the LCCA is never a member of stateList. -*/ - -#define VERBOSE_FIND_LCCA 0 -Arabica::DOM::Node InterpreterImpl::findLCCA(const Arabica::XPath::NodeSet& states) { -#if VERBOSE_FIND_LCCA - std::cerr << "findLCCA: "; - for (size_t i = 0; i < states.size(); i++) { - std::cerr << ATTR_CAST(states[i], "id") << ", "; - } - std::cerr << std::endl << std::flush; -#endif - - Arabica::XPath::NodeSet ancestors = getProperAncestors(states[0], Arabica::DOM::Node()); - Arabica::DOM::Node ancestor; - - for (size_t i = 0; i < ancestors.size(); i++) { - if (!isCompound(Element(ancestors[i]))) - continue; - for (size_t j = 0; j < states.size(); j++) { - -#if VERBOSE_FIND_LCCA - std::cerr << "Checking " << ATTR_CAST(states[j], "id") << " and " << ATTR_CAST(ancestors[i], "id") << std::endl; -#endif - - if (!isDescendant(states[j], ancestors[i])) - goto NEXT_ANCESTOR; - } - ancestor = ancestors[i]; - break; -NEXT_ANCESTOR: - ; - } - - // take uppermost root as ancestor - if (!ancestor) - ancestor = _scxml; - -#if VERBOSE_FIND_LCCA - std::cerr << " -> " << ATTR_CAST(ancestor, "id") << " " << ancestor.getLocalName() << std::endl; -#endif - return ancestor; -} - -Arabica::XPath::NodeSet InterpreterImpl::getStates(const std::list& stateIds) { - Arabica::XPath::NodeSet states; - std::list::const_iterator tokenIter = stateIds.begin(); - while(tokenIter != stateIds.end()) { - states.push_back(getState(*tokenIter)); - tokenIter++; - } - return states; -} - -Arabica::DOM::Element InterpreterImpl::getState(const std::string& stateId) { - - if (_cachedStates.find(stateId) != _cachedStates.end()) { - return _cachedStates[stateId]; - } - -#if 0 - std::list > stateStack; - stateStack.push_back(_scxml); - - - while(stateStack.size() > 0) { - Element curr = stateStack.front(); - stateStack.pop_front(); - - if (HAS_ATTR(curr, "id") && ATTR(curr, "id") == stateId) { - _cachedStates[stateId] = curr; - return curr; - } - - Arabica::XPath::NodeSet children = getChildStates(curr); - stateStack.insert(stateStack.end(), children.begin(), children.end()); - } - -#else - // first try atomic and compound states - NodeSet target = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "state[@id='" + stateId + "']", _scxml).asNodeSet(); - if (target.size() > 0) - goto FOUND; - - // now parallel states - target = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "parallel[@id='" + stateId + "']", _scxml).asNodeSet(); - if (target.size() > 0) - goto FOUND; - - // now final states - target = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "final[@id='" + stateId + "']", _scxml).asNodeSet(); - if (target.size() > 0) - goto FOUND; - - // now history states - target = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "history[@id='" + stateId + "']", _scxml).asNodeSet(); - if (target.size() > 0) - goto FOUND; - { - ERROR_EXECUTION_THROW("No state with id '" + stateId + "' found"); - } -FOUND: - if (target.size() > 0) { - for (size_t i = 0; i < target.size(); i++) { - Element targetElem(target[i]); - if (!isInEmbeddedDocument(targetElem)) { - _cachedStates[stateId] = targetElem; - return targetElem; - } - } - } -#endif - - // return the empty node - return Arabica::DOM::Element(); -} - -Arabica::XPath::NodeSet InterpreterImpl::getAllStates() { - NodeSet states; - states.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "state", _scxml).asNodeSet()); - states.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "parallel", _scxml).asNodeSet()); - states.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "final", _scxml).asNodeSet()); - states.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "history", _scxml).asNodeSet()); - return states; -} - -Arabica::DOM::Node InterpreterImpl::getSourceState(const Arabica::DOM::Element& transition) { - if (iequals(TAGNAME_CAST(transition.getParentNode()), _nsInfo.xmlNSPrefix + "initial")) - return transition.getParentNode().getParentNode(); - return transition.getParentNode(); -} - -/** - * In a conformant SCXML document, a compound state may specify either an "initial" - * attribute or an element, but not both. See 3.6 for a - * discussion of the difference between the two notations. If neither the "initial" - * attribute nor an element is specified, the SCXML Processor must use - * the first child state in document order as the default initial state. - */ -Arabica::XPath::NodeSet InterpreterImpl::getInitialStates(Arabica::DOM::Element state) { - if (!state) { - state = _scxml; - } - -#if VERBOSE - std::cerr << "Getting initial state of " << TAGNAME(state) << " " << ATTR(state, "id") << std::endl; -#endif - - if (isAtomic(state)) { - return Arabica::XPath::NodeSet(); - } - - assert(isCompound(state) || isParallel(state)); - - if (isParallel(state)) { - return getChildStates(state); - } - - // initial attribute at element - Arabica::DOM::Element stateElem = (Arabica::DOM::Element)state; - if (stateElem.hasAttribute("initial")) { - return getStates(tokenize(stateElem.getAttribute("initial"))); - } - - // initial element as child - but not the implicit generated one - NodeSet initElems = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "initial", state); - if(initElems.size() > 0 && !iequals(ATTR_CAST(initElems[0], "generated"), "true")) { - NodeSet initTrans = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", initElems[0]); - if (initTrans.size() > 0) { - return getTargetStates(Element(initTrans[0])); - } - } - - // first child state - Arabica::XPath::NodeSet initStates; - NodeList childs = state.getChildNodes(); - for (size_t i = 0; i < childs.getLength(); i++) { - if (childs.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - if (isState(Element(childs.item(i)))) { - initStates.push_back(childs.item(i)); - return initStates; - } - - } - // nothing found - return Arabica::XPath::NodeSet(); -} - -NodeSet InterpreterImpl::getReachableStates() { - /** Check which states are reachable */ - - NodeSet reachable; - reachable.push_back(_scxml); - - bool hasChanges = true; - - while (hasChanges) { - // iterate initials and transitions until stable, unneccerily iterates complete reachable set everytime - - hasChanges = false; - // reachable per initial attribute or document order - size will increase as we append new states - for (size_t i = 0; i < reachable.size(); i++) { - // get the state's initial states - Element state = Element(reachable[i]); - try { - NodeSet initials = getInitialStates(state); - for (size_t j = 0; j < initials.size(); j++) { - Element initial = Element(initials[j]); - if (!InterpreterImpl::isMember(initial, reachable)) { - reachable.push_back(initial); - hasChanges = true; - } - } - } catch (Event e) { - } - } - - // reachable per target attribute in transitions - for (size_t i = 0; i < reachable.size(); i++) { - Element state = Element(reachable[i]); - NodeSet transitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", state, false); - for (size_t j = 0; j < transitions.size(); j++) { - Element transition = Element(transitions[j]); - try { - NodeSet targets = getTargetStates(transition); - for (size_t k = 0; k < targets.size(); k++) { - Element target = Element(targets[k]); - if (!InterpreterImpl::isMember(target, reachable)) { - reachable.push_back(target); - hasChanges = true; - } - } - } catch (Event e) { - } - } - } - - // reachable via a reachable child state - for (size_t i = 0; i < reachable.size(); i++) { - Element state = Element(reachable[i]); - if (InterpreterImpl::isAtomic(state)) { - // iterate the states parents - Node parent = state.getParentNode(); - while(parent && parent.getNodeType() == Node_base::ELEMENT_NODE) { - Element parentElem = Element(parent); - if (!InterpreterImpl::isState(parentElem)) { - break; - } - if (!InterpreterImpl::isMember(parentElem, reachable)) { - reachable.push_back(parent); - hasChanges = true; - } - parent = parent.getParentNode(); - } - } - } - } - - - return reachable; -} - - -NodeSet InterpreterImpl::getTargetStates(const Arabica::DOM::Element& transition) { - if (_cachedTargets.find(transition) != _cachedTargets.end()) - return _cachedTargets[transition]; - - NodeSet targetStates; - - assert(boost::ends_with(TAGNAME(transition), "transition")); - - // if we are called with a state, process all its transitions - if (isState(transition) || (transition.getNodeType() == Node_base::ELEMENT_NODE && iequals(_nsInfo.xmlNSPrefix + "initial", TAGNAME(transition)))) { - NodeList childs = transition.getChildNodes(); - for (size_t i = 0; i < childs.getLength(); i++) { - if (childs.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - Element childElem = Element(childs.item(i)); - if (iequals(TAGNAME(childElem), _nsInfo.xmlNSPrefix + "transition")) { - targetStates.push_back(getTargetStates(childElem)); - } - } - _cachedTargets[transition] = targetStates; - return targetStates; - } - - std::string targetId = ((Arabica::DOM::Element)transition).getAttribute("target"); - std::list targetIds = tokenize(ATTR(transition, "target")); - for (std::list::const_iterator targetIter = targetIds.begin(); targetIter != targetIds.end(); targetIter++) { - Arabica::DOM::Node state = getState(*targetIter); - if (state) { - assert(HAS_ATTR_CAST(state, "id")); - targetStates.push_back(state); - } - } - _cachedTargets[transition] = targetStates; - return targetStates; -} - -NodeSet InterpreterImpl::getTargetStates(const Arabica::XPath::NodeSet& transitions) { - NodeSet targets; - for (unsigned int i = 0; i < transitions.size(); i++) { - targets.push_back(getTargetStates(Element(transitions[i]))); - } - return targets; -} - - -/* - * If state2 is null, returns the set of all ancestors of state1 in ancestry order - * (state1's parent followed by the parent's parent, etc. up to an including the - * element). If state2 is non-null, returns in ancestry order the set of all ancestors - * of state1, up to but not including state2. (A "proper ancestor" of a state is its - * parent, or the parent's parent, or the parent's parent's parent, etc.))If state2 is - * state1's parent, or equal to state1, or a descendant of state1, this returns the empty set. - */ - -NodeSet InterpreterImpl::getProperAncestors(const Arabica::DOM::Node& s1, - const Arabica::DOM::Node& s2) { - - std::pair, Arabica::DOM::Node > ancPair = std::make_pair(s1, s2); - if (_cachedProperAncestors.find(ancPair) != _cachedProperAncestors.end()) - return _cachedProperAncestors[ancPair]; - - NodeSet ancestors; - if (isState(Element(s1))) { - Arabica::DOM::Node node = s1; - while((node = node.getParentNode())) { - if (node.getNodeType() != Node_base::ELEMENT_NODE) - break; - - Element nodeElem(node); - if (!isState(nodeElem)) - break; -// if (iequals(TAGNAME(nodeElem), _nsInfo.xmlNSPrefix + "scxml")) // do not return scxml root itself - this is somewhat ill-defined -// break; - if (!iequals(TAGNAME(nodeElem), _nsInfo.xmlNSPrefix + "parallel") && - !iequals(TAGNAME(nodeElem), _nsInfo.xmlNSPrefix + "state") && - !iequals(TAGNAME(nodeElem), _nsInfo.xmlNSPrefix + "scxml")) - break; - if (node == s2) - break; - ancestors.push_back(node); - } - } - _cachedProperAncestors[ancPair] = ancestors; - return ancestors; -} - -bool InterpreterImpl::isDescendant(const Arabica::DOM::Node& s1, - const Arabica::DOM::Node& s2) { - if (!s1 || !s2) - return false; - - Arabica::DOM::Node parent = s1.getParentNode(); - while(parent) { - if (s2 == parent) - return true; - parent = parent.getParentNode(); - } - return false; -} - -bool InterpreterImpl::isTargetless(const Arabica::DOM::Element& transition) { - if (transition.hasAttribute("target")) { - return false; - } - return true; -} - -bool InterpreterImpl::isState(const Arabica::DOM::Element& state) { - if (!state) - return false; - - std::string tagName = LOCALNAME(state); - if (iequals("state", tagName)) - return true; - if (iequals("scxml", tagName)) - return true; - if (iequals("parallel", tagName)) - return true; -// if (iequals("history", tagName)) // this is no state, see mail to W3C list -// return true; - if (iequals("final", tagName)) - return true; - return false; -} - -bool InterpreterImpl::isFinal(const Arabica::DOM::Element& state) { - std::string tagName = LOCALNAME(state); - if (iequals("final", tagName)) - return true; - if (HAS_ATTR(state, "final") && iequals("true", ATTR(state, "final"))) - return true; - return false; -} - -bool InterpreterImpl::isInEmbeddedDocument(const Node& node) { - // a node is in an embedded document if there is a content element in its parents - Node parent = node; - while(parent) { - if(iequals(parent.getLocalName(), "content")) { - return true; - } - parent = parent.getParentNode(); - } - return false; -} - -bool InterpreterImpl::isInitial(const Arabica::DOM::Element& state) { - if (!isState(state)) - return false; - - Arabica::DOM::Node parentNode = state.getParentNode(); - if (parentNode.getNodeType() != Node_base::ELEMENT_NODE) - return false; - - Arabica::DOM::Element parent = (Element)parentNode; - if (!isState(parent)) - return true; // scxml element - - if (isMember(state, getInitialStates(parent))) - return true; // every nested node - -// if (isParallel(parent)) -// return true; - - return false; -} - -bool InterpreterImpl::isPseudoState(const Arabica::DOM::Element& state) { - std::string tagName = LOCALNAME(state); - if (iequals("initial", tagName)) - return true; - if (iequals("history", tagName)) - return true; - return false; -} - -bool InterpreterImpl::isTransitionTarget(const Arabica::DOM::Element& elem) { - return (isState(elem) || iequals(LOCALNAME(elem), "history")); -} - -bool InterpreterImpl::isAtomic(const Arabica::DOM::Element& state) { - if (iequals("final", LOCALNAME(state))) - return true; - - if (iequals("parallel", LOCALNAME(state))) - return false; - - Arabica::DOM::NodeList childs = state.getChildNodes(); - for (unsigned int i = 0; i < childs.getLength(); i++) { - if (childs.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - - if (isState(Element(childs.item(i)))) - return false; - } - return true; -} - -bool InterpreterImpl::isHistory(const Arabica::DOM::Element& state) { - if (iequals("history", LOCALNAME(state))) - return true; - return false; -} - -bool InterpreterImpl::isParallel(const Arabica::DOM::Element& state) { - if (!isState(state)) - return false; - if (iequals("parallel", LOCALNAME(state))) - return true; - return false; -} - - -bool InterpreterImpl::isCompound(const Arabica::DOM::Element& state) { - if (!isState(state)) - return false; - - if (iequals(LOCALNAME(state), "parallel")) // parallel is no compound state - return false; - - Arabica::DOM::NodeList childs = state.getChildNodes(); - for (unsigned int i = 0; i < childs.getLength(); i++) { - if (childs.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - if (isState(Element(childs.item(i)))) - return true; - } - return false; -} - -void InterpreterImpl::setupIOProcessors() { - tthread::lock_guard lock(_pluginMutex); - std::map ioProcs = _factory->getIOProcessors(); - std::map::iterator ioProcIter = ioProcs.begin(); - while(ioProcIter != ioProcs.end()) { - if (iequals(ioProcIter->first, "basichttp") && !(_capabilities & CAN_BASIC_HTTP)) { - ioProcIter++; - continue; - } - if (iequals(ioProcIter->first, "http") && !(_capabilities & CAN_GENERIC_HTTP)) { - ioProcIter++; - continue; - } - - // do not override if already set - if (_ioProcessors.find(ioProcIter->first) != _ioProcessors.end()) { - ioProcIter++; - continue; - } - - // this might throw error.execution - _ioProcessors[ioProcIter->first] = _factory->createIOProcessor(ioProcIter->first, this); - _ioProcessors[ioProcIter->first].setType(ioProcIter->first); - _ioProcessors[ioProcIter->first].setInterpreter(this); - - if (iequals(ioProcIter->first, "http")) { - // this is somewhat ugly - _httpServlet = static_cast(_ioProcessors[ioProcIter->first]._impl.get()); - } - - if (iequals(ioProcIter->first, "websocket")) { - // this is somewhat ugly - _wsServlet = static_cast(_ioProcessors[ioProcIter->first]._impl.get()); - } - - // register aliases - std::list names = _ioProcessors[ioProcIter->first].getNames(); - std::list::iterator nameIter = names.begin(); - while(nameIter != names.end()) { - // do not override - if (!boost::equal(*nameIter, ioProcIter->first) && _ioProcessors.find(*nameIter) == _ioProcessors.end()) - _ioProcessors[*nameIter] = _ioProcessors[ioProcIter->first]; - nameIter++; - } -#if 0 - try { - _dataModel.registerIOProcessor(ioProcIter->first, _ioProcessors[ioProcIter->first]); - } catch (Event e) { - LOG(ERROR) << "Syntax error when setting _ioprocessors:" << std::endl << e << std::endl; - } -#endif - ioProcIter++; - } -} - -IOProcessor InterpreterImpl::getIOProcessor(const std::string& type) { - tthread::lock_guard lock(_pluginMutex); - if (_ioProcessors.find(type) == _ioProcessors.end()) { - LOG(ERROR) << "No ioProcessor known for type " << type; - return IOProcessor(); - } - return _ioProcessors[type]; -} - -void InterpreterImpl::setCmdLineOptions(std::map params) { - std::map::iterator paramIter = params.begin(); - while (paramIter != params.end()) { - if (paramIter->second.length() > 0) { - _cmdLineOptions.compound[paramIter->first] = Data(paramIter->second, Data::VERBATIM); - } else { - _cmdLineOptions.compound[paramIter->first] = Data("true"); - } - paramIter++; - } -} - -bool InterpreterImpl::hasLegalConfiguration() { - return isLegalConfiguration(_configuration); -} - -bool InterpreterImpl::isLegalConfiguration(const std::list& config) { - NodeSet states; - for (std::list::const_iterator confIter = config.begin(); confIter != config.end(); confIter++) { - Element state = getState(*confIter); - if (!state) { - LOG(INFO) << "No state with id '" << *confIter << "'"; - return false; - } - states.push_back(state); - while((state = getParentState(state))) { - states.push_back(state); - }; - } - return isLegalConfiguration(states); -} - -/** - * See: http://www.w3.org/TR/scxml/#LegalStateConfigurations - */ -bool InterpreterImpl::isLegalConfiguration(const NodeSet& config) { - - // The configuration contains exactly one child of the element. - NodeSet scxmlChilds = getChildStates(_scxml); - Node foundScxmlChild; - for (size_t i = 0; i < scxmlChilds.size(); i++) { - if (isMember(scxmlChilds[i], config)) { - if (foundScxmlChild) { - LOG(ERROR) << "Invalid configuration: Multiple childs of scxml root are active '" << ATTR_CAST(foundScxmlChild, "id") << "' and '" << ATTR_CAST(scxmlChilds[i], "id") << "'"; - return false; - } - foundScxmlChild = scxmlChilds[i]; - } - } - if (!foundScxmlChild) { - LOG(ERROR) << "Invalid configuration: No childs of scxml root are active"; - - return false; - } - - // The configuration contains one or more atomic states. - bool foundAtomicState = false; - for (size_t i = 0; i < config.size(); i++) { - if (isAtomic(Element(config[i]))) { - foundAtomicState = true; - break; - } - } - if (!foundAtomicState) { - LOG(ERROR) << "Invalid configuration: No atomic state is active"; - return false; - } - - // the configuration contains no history pseudo-states - for (size_t i = 0; i < config.size(); i++) { - if (isHistory(Element(config[i]))) { - LOG(ERROR) << "Invalid configuration: history state " << ATTR_CAST(config[i], "id") << " is active"; - return false; - } - } - - - - // When the configuration contains an atomic state, it contains all of its and ancestors. - for (size_t i = 0; i < config.size(); i++) { - if (isAtomic(Element(config[i]))) { - Node parent = config[i]; - while(((parent = parent.getParentNode()) && parent.getNodeType() == Node_base::ELEMENT_NODE)) { - if (isState(Element(parent)) && - (iequals(LOCALNAME(parent), "state") || - iequals(LOCALNAME(parent), "parallel"))) { - if (!isMember(parent, config)) { - LOG(ERROR) << "Invalid configuration: atomic state '" << ATTR_CAST(config[i], "id") << "' is active, but parent '" << ATTR_CAST(parent, "id") << "' is not"; - return false; - } - } - } - } - } - - // When the configuration contains a non-atomic , it contains one and only one of the state's children - for (size_t i = 0; i < config.size(); i++) { - Element configElem(config[i]); - if (!isAtomic(configElem) && !isParallel(configElem)) { - Node foundChildState; - //std::cerr << config[i] << std::endl; - NodeSet childs = getChildStates(config[i]); - for (size_t j = 0; j < childs.size(); j++) { - //std::cerr << childs[j] << std::endl; - if (isMember(childs[j], config)) { - if (foundChildState) { - LOG(ERROR) << "Invalid configuration: Multiple childs of compound '" << ATTR_CAST(config[i], "id") - << "' are active '" << ATTR_CAST(foundChildState, "id") << "' and '" << ATTR_CAST(childs[j], "id") << "'"; - return false; - } - foundChildState = childs[j]; - } - } - if (!foundChildState) { - LOG(ERROR) << "Invalid configuration: No childs of compound '" << ATTR_CAST(config[i], "id") << "' are active"; - return false; - } - } - } - - // If the configuration contains a state, it contains all of its children - for (size_t i = 0; i < config.size(); i++) { - if (isParallel(Element(config[i]))) { - NodeSet childs = getChildStates(config[i]); - for (size_t j = 0; j < childs.size(); j++) { - if (!isMember(childs[j], config) && !isHistory(Element(childs[j]))) { - LOG(ERROR) << "Invalid configuration: Not all children of parallel '" << ATTR_CAST(config[i], "id") << "' are active i.e. '" << ATTR_CAST(childs[j], "id") << "' is not"; - return false; - } - } - } - } - - // everything worked out fine! - return true; -} - -bool InterpreterImpl::isInState(const std::string& stateId) { - if (HAS_ATTR(_scxml, "flat") && stringIsTrue(ATTR(_scxml, "flat"))) { - // extension for flattened SCXML documents - if (_configuration.size() > 0 && HAS_ATTR_CAST(_configuration[0], "id")) { - // all states are encoded in the current statename - FlatStateIdentifier flatId(ATTR_CAST(_configuration[0], "id")); - for (std::list::const_iterator iter = flatId.getActive().begin(); iter != flatId.getActive().end(); iter++) { - if (iequals(stateId, *iter)) - return true; - } - } - return false; - } else { - - for (size_t i = 0; i < _configuration.size(); i++) { - if (HAS_ATTR_CAST(_configuration[i], "id") && - iequals(ATTR_CAST(_configuration[i], "id"), stateId)) { - return true; - } - } - } - return false; -} - -const URL& InterpreterImpl::getBaseURLForNode(const Arabica::DOM::Node& node) { - Arabica::DOM::Node currNode = node; - while(currNode) { - if (_baseURL.find(currNode) != _baseURL.end()) { - // speed-up subsequent lookups - _baseURL[node] = _baseURL[currNode]; - // return baseurl - return _baseURL[currNode]; - } - currNode = currNode.getParentNode(); - } - return _baseURL[_scxml]; -} - -void InterpreterImpl::handleDOMEvent(Arabica::DOM::Events::Event& event) { - // clear targets - _cachedTargets.clear(); - - if (event.getType().compare("DOMAttrModified") == 0) // we do not care about other attributes - return; - - // remove modified states from cache - Node target = Arabica::DOM::Node(event.getTarget()); - NodeSet childs = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "state", target); - for (size_t i = 0; i < childs.size(); i++) { - if (HAS_ATTR_CAST(childs[i], "id")) { - _cachedStates.erase(ATTR_CAST(childs[i], "id")); - } - } - // it's more stress to search through all pairs, just have them recalculated - _cachedProperAncestors.clear(); -} - -void InterpreterImpl::DOMEventListener::handleEvent(Arabica::DOM::Events::Event& event) { - if (_interpreter) - _interpreter->handleDOMEvent(event); -} - -std::ostream& operator<< (std::ostream& os, const InterpreterState& interpreterState) { - os << "[" << InterpreterImpl::stateToString(interpreterState) << "]" << std::endl; - return os; -} - -std::string InterpreterImpl::stateToString(InterpreterState state) { - std::stringstream ss; - - switch(state) { - case USCXML_INSTANTIATED: - ss << "INSTANTIATED"; - break; - case USCXML_MICROSTEPPED: - ss << "MICROSTEPPED"; - break; - case USCXML_MACROSTEPPED: - ss << "MACROSTEPPED"; - break; - case USCXML_IDLE: - ss << "IDLE"; - break; - case USCXML_FINISHED: - ss << "FINISHED"; - break; - case USCXML_DESTROYED: - ss << "DESTROYED"; - break; - default: - ss << "INVALID"; - break; - } - - return ss.str(); -} - - } diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h index 81d12d0..fa5ab05 100644 --- a/src/uscxml/Interpreter.h +++ b/src/uscxml/Interpreter.h @@ -1,6 +1,6 @@ /** * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) * @copyright Simplified BSD * * @cond @@ -17,111 +17,28 @@ * @endcond */ -#ifndef RUNTIME_H_SQ1MBKGN -#define RUNTIME_H_SQ1MBKGN +#ifndef INTERPRETER_H_6CD5A168 +#define INTERPRETER_H_6CD5A168 -// this has to be the first include or MSVC will run amok -#include "uscxml/config.h" -#include "uscxml/Common.h" -#include "uscxml/util/String.h" - -#include // arabica xpath uses cerr without iostream -#include -#include #include +#include +#include -#include "uscxml/InterpreterInfo.h" - -#include -#include - -#include "uscxml/concurrency/BlockingQueue.h" -#include "uscxml/messages/Data.h" -#include "uscxml/messages/SendRequest.h" -#include "uscxml/debug/InterpreterIssue.h" -#include "uscxml/URL.h" - -#include "uscxml/plugins/DataModel.h" -#include "uscxml/plugins/IOProcessor.h" -#include "uscxml/plugins/Invoker.h" -#include "uscxml/plugins/ExecutableContent.h" - -#include "dom/DOMUtils.h" - -#ifndef TIME_BLOCK -# ifdef BUILD_PROFILING -# include "uscxml/concurrency/Timer.h" -# define TIME_BLOCK Measurement msm(&timer); -# else -# define TIME_BLOCK -# endif -#endif - -#define ERROR_PLATFORM_THROW(msg) \ - Event e; \ - e.name = "error.platform"; \ - e.data.compound["cause"] = Data(msg, Data::VERBATIM); \ - throw e; \ - - -#define USCXML_MONITOR_CATCH(callback) \ -catch (Event e) { \ - LOG(ERROR) << "Syntax error when calling " #callback " on monitors: " << std::endl << e << std::endl; \ -} catch (boost::bad_weak_ptr e) { \ - LOG(ERROR) << "Unclean shutdown " << std::endl << std::endl; \ -} catch (...) { \ - LOG(ERROR) << "An exception occurred when calling " #callback " on monitors"; \ -} \ -if (_state == USCXML_DESTROYED) { \ - throw boost::bad_weak_ptr(); \ -} \ - - -#define USCXML_MONITOR_CALLBACK(callback)\ -for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { \ - try { \ - (*monIter)->callback(shared_from_this()); \ - } \ - USCXML_MONITOR_CATCH(callback) \ -} - -#define USCXML_MONITOR_CALLBACK2(callback, arg1)\ -for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { \ - try { \ - (*monIter)->callback(shared_from_this(), arg1); \ - } \ - USCXML_MONITOR_CATCH(callback) \ -} - -#define USCXML_MONITOR_CALLBACK3(callback, arg1, arg2)\ -for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { \ - try { \ - (*monIter)->callback(shared_from_this(), arg1, arg2); \ - } \ - USCXML_MONITOR_CATCH(callback) \ -} +#include "Common.h" +#include "uscxml/interpreter/InterpreterImpl.h" +#include "uscxml/interpreter/InterpreterMonitor.h" // beware cyclic reference! +#include "uscxml/debug/InterpreterIssue.h" // beware cyclic reference! +#include namespace uscxml { -class HTTPServletInvoker; -class InterpreterMonitor; -class InterpreterHTTPServlet; -class InterpreterWebSocketServlet; -class Factory; -class DelayedEventQueue; - -enum Capabilities { - CAN_NOTHING = 0, - CAN_BASIC_HTTP = 1, - CAN_GENERIC_HTTP = 2, -}; +class InterpreterMonitor; // forward declare class USCXML_API InterpreterOptions { public: InterpreterOptions() : - withDebugger(false), verbose(false), - checking(false), + validate(false), withHTTP(true), withHTTPS(true), withWS(true), @@ -131,9 +48,8 @@ public: wsPort(5081) { } - bool withDebugger; bool verbose; - bool checking; + bool validate; bool withHTTP; bool withHTTPS; bool withWS; @@ -156,779 +72,90 @@ public: static void printUsageAndExit(const char* progName); static InterpreterOptions fromCmdLine(int argc, char** argv); - unsigned int getCapabilities(); - -}; - -enum InterpreterState { - USCXML_DESTROYED = -2, ///< destructor ran - users should never see this one - USCXML_FINISHED = -1, ///< machine reached a final configuration and is done - USCXML_IDLE = 0, ///< stable configuration and queues empty - USCXML_INITIALIZED = 1, ///< DOM is setup and all external components instantiated - USCXML_INSTANTIATED = 2, ///< nothing really, just instantiated - USCXML_MICROSTEPPED = 3, ///< processed one transition set - USCXML_MACROSTEPPED = 4, ///< processed all transition sets and reached a stable configuration -}; -USCXML_API std::ostream& operator<< (std::ostream& os, const InterpreterState& interpreterState); - -class USCXML_API InterpreterImpl : public InterpreterInfo, public boost::enable_shared_from_this { -public: - - typedef std::set::iterator monIter_t; - - enum Binding { - EARLY = 0, - LATE = 1 - }; - - virtual ~InterpreterImpl(); - - void cloneFrom(InterpreterImpl* other); - void cloneFrom(boost::shared_ptr other); - virtual void writeTo(std::ostream& stream); - - // TODO: We need to move the destructor to the implementations to make these pure virtual - virtual InterpreterState interpret(); - virtual InterpreterState step(int waitForMS = 0); - - void start(); ///< Start interpretation in a thread - void stop(); ///< Stop interpreter thread - void reset(); ///< Reset state machine - void join(); - bool isRunning(); - - InterpreterState getInterpreterState(); - - void addMonitor(InterpreterMonitor* monitor) { - _monitors.insert(monitor); - } - - void removeMonitor(InterpreterMonitor* monitor) { - _monitors.erase(monitor); - } - - void setSourceURL(std::string sourceURL) { - _sourceURL = URL(sourceURL); - if (_scxml) { - URL baseURL(sourceURL); - URL::toBaseURL(baseURL); - _baseURL[_scxml] = baseURL; - } - } - - std::string getSourceURL() { - return _sourceURL.asString(); - } - - std::string getBaseURL() { - return getBaseURLForNode(_scxml); - } - - std::string getBaseURL(const Arabica::DOM::Node& refNode) { - return getBaseURLForNode(refNode); - } - - std::string getBaseURL(const std::string& xpathExpr) { - Arabica::XPath::NodeSet roots = _xpath.evaluate(xpathExpr, _scxml).asNodeSet(); - if (roots.size() > 0) { - return getBaseURLForNode(roots[0]); - } - return ""; - } - - void setCmdLineOptions(std::map params); - Data getCmdLineOptions() { - return _cmdLineOptions; - } - - InterpreterHTTPServlet* getHTTPServlet() { - return _httpServlet; - } - - void setParentQueue(uscxml::concurrency::BlockingQueue* parentQueue) { - _parentQueue = parentQueue; - } - - void setFactory(Factory* factory) { - _factory = factory; - } - Factory* getFactory() { - return _factory; - } - - Arabica::XPath::NodeSet getNodeSetForXPath(const std::string& xpathExpr) { - return _xpath.evaluate(xpathExpr, _scxml).asNodeSet(); - } - - void setNameSpaceInfo(const NameSpaceInfo& nsInfo) { - _nsInfo = nsInfo; - _xpath.setNamespaceContext(*_nsInfo.getNSContext()); - } - NameSpaceInfo getNameSpaceInfo() const { - return _nsInfo; - } - - void receiveInternal(const Event& event); - void receive(const Event& event, bool toFront = false); - - Event getCurrentEvent() { - tthread::lock_guard lock(_mutex); - return _currEvent; - } - - virtual bool isInState(const std::string& stateId); - - Arabica::XPath::NodeSet getConfiguration() { - tthread::lock_guard lock(_mutex); - return _configuration; - } - - Arabica::XPath::NodeSet getBasicConfiguration() { - tthread::lock_guard lock(_mutex); - Arabica::XPath::NodeSet basicConfig; - for (size_t i = 0; i < _configuration.size(); i++) { - if (isAtomic(Arabica::DOM::Element(_configuration[i]))) - basicConfig.push_back(_configuration[i]); - } - return basicConfig; - } - - void setInitalConfiguration(const std::list& states) { - _startConfiguration = states; - } - void setInvokeRequest(const InvokeRequest& req) { - _invokeReq = req; - } - - virtual Arabica::DOM::Document getDocument() const { - return _document; - } - - void setCapabilities(unsigned int capabilities) { - _capabilities = capabilities; - } - - void setName(const std::string& name); - const std::string& getName() { - return _name; - } - const std::string& getSessionId() { - return _sessionId; - } - - DelayedEventQueue* getDelayQueue() { - return _sendQueue; - } - - void addIOProcessor(IOProcessor ioProc) { - std::list names = ioProc.getNames(); - - std::list::iterator nameIter = names.begin(); - while(nameIter != names.end()) { - _ioProcessors[*nameIter] = ioProc; - _ioProcessors[*nameIter].setType(names.front()); - _ioProcessors[*nameIter].setInterpreter(this); - - nameIter++; - } - } - - const std::map& getIOProcessors() { - return _ioProcessors; - } - - void setDataModel(const DataModel& dataModel) { - _userSuppliedDataModel = true; - _dataModel = dataModel; - } - DataModel getDataModel() { - return _dataModel; - } - - void addDataModelExtension(DataModelExtension* ext) { - _dataModelExtensions.insert(ext); - } - - void setInvoker(const std::string& invokeId, Invoker invoker) { - _dontDestructOnUninvoke.insert(invokeId); - _invokers[invokeId] = invoker; - _invokers[invokeId].setInterpreter(this); - _invokers[invokeId].setInvokeId(invokeId); - } - - const std::map& getInvokers() { - return _invokers; - } - - bool runOnMainThread(int fps, bool blocking = true); - - static bool isMember(const Arabica::DOM::Node& node, const Arabica::XPath::NodeSet& set); - - bool hasLegalConfiguration(); - bool isLegalConfiguration(const Arabica::XPath::NodeSet&); - bool isLegalConfiguration(const std::list&); - - static bool isState(const Arabica::DOM::Element& state); - static bool isPseudoState(const Arabica::DOM::Element& state); - static bool isTransitionTarget(const Arabica::DOM::Element& elem); - static bool isTargetless(const Arabica::DOM::Element& transition); - static bool isAtomic(const Arabica::DOM::Element& state); - static bool isFinal(const Arabica::DOM::Element& state); - static bool isHistory(const Arabica::DOM::Element& state); - static bool isParallel(const Arabica::DOM::Element& state); - static bool isCompound(const Arabica::DOM::Element& state); - static bool isDescendant(const Arabica::DOM::Node& s1, const Arabica::DOM::Node& s2); - static bool isInEmbeddedDocument(const Arabica::DOM::Node& node); - bool isInitial(const Arabica::DOM::Element& state); - - static std::string stateToString(InterpreterState state); - - Arabica::DOM::Element getState(const std::string& stateId); - Arabica::XPath::NodeSet getStates(const std::list& stateIds); - Arabica::XPath::NodeSet getAllStates(); - - Arabica::XPath::NodeSet getDocumentInitialTransitions(); - Arabica::XPath::NodeSet getInitialStates(Arabica::DOM::Element state = Arabica::DOM::Element()); - Arabica::XPath::NodeSet getReachableStates(); - - static Arabica::XPath::NodeSet getChildStates(const Arabica::DOM::Node& state); - static Arabica::XPath::NodeSet getChildStates(const Arabica::XPath::NodeSet& state); - static Arabica::DOM::Element getParentState(const Arabica::DOM::Node& element); - static Arabica::DOM::Node getAncestorElement(const Arabica::DOM::Node& node, const std::string tagName); - virtual Arabica::XPath::NodeSet getTargetStates(const Arabica::DOM::Element& transition); - virtual Arabica::XPath::NodeSet getTargetStates(const Arabica::XPath::NodeSet& transitions); - virtual Arabica::DOM::Node getSourceState(const Arabica::DOM::Element& transition); - - Arabica::DOM::Node findLCCA(const Arabica::XPath::NodeSet& states); - virtual Arabica::XPath::NodeSet getProperAncestors(const Arabica::DOM::Node& s1, const Arabica::DOM::Node& s2); - - virtual void handleDOMEvent(Arabica::DOM::Events::Event& event); - - std::vector getReachableTargets() { - - std::vector e; - tthread::lock_guard lock(_mutex); - Arabica::XPath::NodeSet possibleTransitions = DOMUtils::filterChildElements( "transition", _configuration, false); - - for( size_t i = 0; i < possibleTransitions.size(); i++ ) { - Arabica::DOM::Node transitions = possibleTransitions[ i ]; - Arabica::DOM::NamedNodeMap attributes = transitions.getAttributes(); - Arabica::DOM::Node events = attributes.getNamedItem("target"); - e.push_back( std::string( events.getNodeValue() ) ); - } - return e; - - } - - std::vector getEventDescriptors() { - - std::vector e; - tthread::lock_guard lock(_mutex); - Arabica::XPath::NodeSet possibleTransitions = DOMUtils::filterChildElements( "transition", _configuration, false); - - for( size_t i = 0; i < possibleTransitions.size(); i++ ) { - Arabica::DOM::Node transitions = possibleTransitions[ i ]; - Arabica::DOM::NamedNodeMap attributes = transitions.getAttributes(); - Arabica::DOM::Node events = attributes.getNamedItem("event"); - e.push_back( std::string( events.getNodeValue() ) ); - } - return e; - - } - -protected: - static void run(void*); // static method for thread to run - - class DOMEventListener : public Arabica::DOM::Events::EventListener { - public: - DOMEventListener() : _interpreter(NULL) {} - void handleEvent(Arabica::DOM::Events::Event& event); - InterpreterImpl* _interpreter; - }; - - InterpreterImpl(); - void init(); - void setupDOM(); - void resolveXIncludes(); - void resolveXIncludes(std::list includeChain, - std::map& mergedNS, - const std::string& xIncludeNS, - const URL& baseURL, - const Arabica::DOM::Element& xinclude); - virtual void setupIOProcessors(); - - std::list validate(); - - void initializeData(const Arabica::DOM::Element& data); - void finalizeAndAutoForwardCurrentEvent(); - void stabilize(); - void microstep(const Arabica::XPath::NodeSet& enabledTransitions); - void exitInterpreter(); - - virtual Arabica::XPath::NodeSet selectEventlessTransitions(); - virtual Arabica::XPath::NodeSet selectTransitions(const std::string& event); - virtual bool isEnabledTransition(const Arabica::DOM::Element& transition, const std::string& event); - - void setInterpreterState(InterpreterState newState); - - bool _stable; - tthread::thread* _thread; - tthread::recursive_mutex _mutex; - tthread::condition_variable _condVar; - tthread::recursive_mutex _pluginMutex; - - // to be overwritten by implementations - these ought to be pure, but impl destructor runs first - virtual void enterStates(const Arabica::XPath::NodeSet& enabledTransitions) {} - virtual void exitStates(const Arabica::XPath::NodeSet& enabledTransitions) {} - virtual Arabica::XPath::NodeSet removeConflictingTransitions(const Arabica::XPath::NodeSet& enabledTransitions) { - return enabledTransitions; - } - - InterpreterState _state; - - URL _sourceURL; - std::map, URL> _baseURL; // with xi:include, we might have different base URLs - Arabica::DOM::Document _document; - Arabica::DOM::Element _scxml; - Arabica::XPath::XPath _xpath; - NameSpaceInfo _nsInfo; - - bool _topLevelFinalReached; - bool _isInitialized; - bool _domIsSetup; - bool _userSuppliedDataModel; - std::set _dontDestructOnUninvoke; - - bool _isStarted; - bool _isRunning; - - InterpreterImpl::Binding _binding; - Arabica::XPath::NodeSet _configuration; - Arabica::XPath::NodeSet _alreadyEntered; - Arabica::XPath::NodeSet _statesToInvoke; - std::list _startConfiguration; - InvokeRequest _invokeReq; - - DataModel _dataModel; - std::map > _historyValue; - - std::list _internalQueue; - uscxml::concurrency::BlockingQueue _externalQueue; - uscxml::concurrency::BlockingQueue* _parentQueue; - DelayedEventQueue* _sendQueue; - - DOMEventListener _domEventListener; - - Event _currEvent; - Factory* _factory; - InterpreterHTTPServlet* _httpServlet; - InterpreterWebSocketServlet* _wsServlet; - std::set _monitors; - std::set _microstepConfigurations; - - long _lastRunOnMainThread; - std::string _name; - std::string _sessionId; - unsigned int _capabilities; - - Data _cmdLineOptions; - - virtual void executeContent(const Arabica::DOM::Element& content, bool rethrow = false); - virtual void executeContent(const Arabica::DOM::NodeList& content, bool rethrow = false); - virtual void executeContent(const Arabica::XPath::NodeSet& content, bool rethrow = false); - - void processContentElement(const Arabica::DOM::Element& element, - Arabica::DOM::Node& dom, - std::string& text, - std::string& expr); - void processParamChilds(const Arabica::DOM::Element& element, - std::multimap& params); - void processDOMorText(const Arabica::DOM::Element& element, - Arabica::DOM::Node& dom, - std::string& text); - - virtual void send(const Arabica::DOM::Element& element); - virtual void invoke(const Arabica::DOM::Element& element); - virtual void cancelInvoke(const Arabica::DOM::Element& element); - virtual void internalDoneSend(const Arabica::DOM::Element& state, const Arabica::DOM::Element& doneData); - static void delayedSend(void* userdata, std::string eventName); - void returnDoneEvent(const Arabica::DOM::Node& state); - - bool hasConditionMatch(const Arabica::DOM::Element& conditional); - bool isInFinalState(const Arabica::DOM::Element& state); - bool parentIsScxmlState(const Arabica::DOM::Element& state); - - IOProcessor getIOProcessor(const std::string& type); - const URL& getBaseURLForNode(const Arabica::DOM::Node& node); - - std::map _ioProcessors; - std::map > _sendIds; - std::map _invokers; - std::map, ExecutableContent> _executableContent; - std::set _dataModelExtensions; - - std::map, Arabica::DOM::Node >, Arabica::XPath::NodeSet > _cachedProperAncestors; - std::map, Arabica::XPath::NodeSet > _cachedTargets; - std::map > _cachedStates; - std::map _cachedURLs; - - friend class USCXMLInvoker; - friend class SCXMLIOProcessor; - friend class Interpreter; - friend class InterpreterIssue; }; class USCXML_API Interpreter { public: - static Interpreter fromDOM(const Arabica::DOM::Document& dom, - const NameSpaceInfo& nameSpaceInfo, - const std::string& sourceURL); + static Interpreter fromDocument(xercesc::DOMDocument* dom, + const std::string& baseURL, + bool copy = true); + static Interpreter fromElement(xercesc::DOMElement* element, + const std::string& baseURL); static Interpreter fromXML(const std::string& xml, - const std::string& sourceURL); + const std::string& baseURL); static Interpreter fromURL(const std::string& URL); static Interpreter fromClone(const Interpreter& other); - Interpreter() : _impl() {} // the empty, invalid interpreter - Interpreter(boost::shared_ptr const impl) : _impl(impl) { } - Interpreter(const Interpreter& other) : _impl(other._impl) { } - virtual ~Interpreter() {}; - - operator bool() const { - return (!!_impl && _impl->_state != USCXML_DESTROYED); - } - bool operator< (const Interpreter& other) const { - return _impl < other._impl; - } - bool operator==(const Interpreter& other) const { - return _impl == other._impl; - } - bool operator!=(const Interpreter& other) const { - return _impl != other._impl; - } - Interpreter& operator= (const Interpreter& other) { - _impl = other._impl; - return *this; - } - - virtual void writeTo(std::ostream& stream) { - TIME_BLOCK - return _impl->writeTo(stream); - } + PIMPL_OPERATORS(Interpreter); void reset() { -#ifdef BUILD_PROFILING - timer = Timer(); -#endif return _impl->reset(); } - std::vector getReachableTargets() { - return _impl->getReachableTargets(); - } - - std::vector getEventDescriptors() { - return _impl->getEventDescriptors(); - } - - void start() { - return _impl->start(); - } - void stop() { - return _impl->stop(); - } -// void join() { -// return _impl->join(); -// }; - bool isRunning() { - return _impl->isRunning(); - } - - void interpret() { - _impl->interpret(); - }; - - InterpreterState step(int waitForMS = 0) { - TIME_BLOCK - return _impl->step(waitForMS); - }; - - InterpreterState step(bool blocking) { - TIME_BLOCK - if (blocking) - return _impl->step(-1); - return _impl->step(0); + InterpreterState step(bool blocking = false) { + return _impl->step(blocking); }; - std::list validate() { - TIME_BLOCK - return _impl->validate(); - } - - InterpreterState getState() { - return _impl->getInterpreterState(); - } - - void addMonitor(InterpreterMonitor* monitor) { - return _impl->addMonitor(monitor); - } - - void removeMonitor(InterpreterMonitor* monitor) { - return _impl->removeMonitor(monitor); - } - - void setSourceURL(std::string sourceURL) { - return _impl->setSourceURL(sourceURL); - } - std::string getSourceURL() { - return _impl->getSourceURL(); - } - - std::string getBaseURL() { - return _impl->getBaseURL(); - } - std::string getBaseURL(const std::string& xpathExpr) { - return _impl->getBaseURL(xpathExpr); - } - std::string getBaseURL(const Arabica::DOM::Node& refNode) { - return _impl->getBaseURL(refNode); - } - - void setNameSpaceInfo(const NameSpaceInfo& nsInfo) { - _impl->setNameSpaceInfo(nsInfo); - } - NameSpaceInfo getNameSpaceInfo() const { - return _impl->getNameSpaceInfo(); - } - - void setCmdLineOptions(std::map params) { - return _impl->setCmdLineOptions(params); - } - Data getCmdLineOptions() { - return _impl->getCmdLineOptions(); + void cancel() { + return _impl->cancel(); } - InterpreterHTTPServlet* getHTTPServlet() { - return _impl->getHTTPServlet(); - } - - void setDataModel(const DataModel& dataModel) { - _impl->setDataModel(dataModel); - } - DataModel getDataModel() { - return _impl->getDataModel(); - } - - void addIOProcessor(IOProcessor ioProc) { - _impl->addIOProcessor(ioProc); - } - const std::map& getIOProcessors() { - return _impl->getIOProcessors(); - } - - void setInvoker(const std::string& invokeId, Invoker invoker) { - _impl->setInvoker(invokeId, invoker); - } - const std::map& getInvokers() { - return _impl->getInvokers(); - } - - void addDataModelExtension(DataModelExtension* ext) { - _impl->addDataModelExtension(ext); - } - - - void setParentQueue(uscxml::concurrency::BlockingQueue* parentQueue) { - return _impl->setParentQueue(parentQueue); - } - void setFactory(Factory* factory) { - return _impl->setFactory(factory); - } - Factory* getFactory() { - return _impl->getFactory(); - } - Arabica::XPath::NodeSet getNodeSetForXPath(const std::string& xpathExpr) { - TIME_BLOCK - return _impl->getNodeSetForXPath(xpathExpr); - } - - void inline receiveInternal(const Event& event) { - TIME_BLOCK - return _impl->receiveInternal(event); - } - void receive(const Event& event, bool toFront = false) { - TIME_BLOCK - return _impl->receive(event, toFront); - } - - Event getCurrentEvent() { - TIME_BLOCK - return _impl->getCurrentEvent(); - } - - bool isInState(const std::string& stateId) { - TIME_BLOCK + virtual bool isInState(const std::string& stateId) { return _impl->isInState(stateId); } - Arabica::XPath::NodeSet getConfiguration() { - TIME_BLOCK - return _impl->getConfiguration(); - } - - Arabica::XPath::NodeSet getBasicConfiguration() { - TIME_BLOCK - return _impl->getBasicConfiguration(); - } - - void setInitalConfiguration(const std::list& states) { - TIME_BLOCK - return _impl->setInitalConfiguration(states); - } - -// Arabica::DOM::Node getState(const std::string& stateId) { -// return _impl->getState(stateId); -// } -// Arabica::XPath::NodeSet getStates(const std::list& stateIds) { -// return _impl->getStates(stateIds); -// } -// Arabica::XPath::NodeSet getAllStates() { -// return _impl->getAllStates(); -// } - - Arabica::DOM::Document getDocument() const { - return _impl->getDocument(); - } - - void setCapabilities(unsigned int capabilities) { - return _impl->setCapabilities(capabilities); - } - - void setName(const std::string& name) { - return _impl->setName(name); + InterpreterState getState() { + return _impl->getState(); } - const std::string& getName() { - return _impl->getName(); - } - const std::string& getSessionId() { - return _impl->getSessionId(); - } - DelayedEventQueue* getDelayQueue() { - return _impl->getDelayQueue(); + std::list getConfiguration() { + return _impl->getConfiguration(); } - bool runOnMainThread(int fps, bool blocking = true) { - TIME_BLOCK - return _impl->runOnMainThread(fps, blocking); + virtual void receive(const Event& event) { + _impl->enqueueExternal(event); } - bool hasLegalConfiguration() { - TIME_BLOCK - return _impl->hasLegalConfiguration(); + void setActionLanguage(ActionLanguage actionLanguage) { + return _impl->setActionLanguage(actionLanguage); } - bool isLegalConfiguration(const Arabica::XPath::NodeSet& config) { - TIME_BLOCK - return _impl->isLegalConfiguration(config); + void setMonitor(InterpreterMonitor* monitor) { + return _impl->setMonitor(monitor); } - bool isLegalConfiguration(const std::list& config) { - TIME_BLOCK - return _impl->isLegalConfiguration(config); + std::list validate() { + return InterpreterIssue::forInterpreter(_impl.get()); } - boost::shared_ptr getImpl() const { + std::shared_ptr getImpl() const { return _impl; } - static std::map > getInstances(); - static void addInstance(boost::shared_ptr instance); - -#ifdef BUILD_PROFILING - Timer timer; -#endif - - protected: + std::shared_ptr _impl; - void setInvokeRequest(const InvokeRequest& req) { - return _impl->setInvokeRequest(req); - } - - // we use a void ptr here as Arabica::SAX::InputSource complicates includes - static Interpreter fromInputSource(void* source, const std::string& sourceURL); - - boost::shared_ptr _impl; - static std::map > _instances; - static tthread::recursive_mutex _instanceMutex; }; -class USCXML_API InterpreterMonitor { +class USCXML_API StateTransitionMonitor : public uscxml::InterpreterMonitor { public: - InterpreterMonitor() : _copyToInvokers(false) {} - virtual ~InterpreterMonitor() {} - - virtual void beforeProcessingEvent(Interpreter interpreter, const Event& event) {} - virtual void beforeMicroStep(Interpreter interpreter) {} - - virtual void beforeExitingState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) {} - virtual void afterExitingState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) {} - - virtual void beforeExecutingContent(Interpreter interpreter, const Arabica::DOM::Element& element) {} - virtual void afterExecutingContent(Interpreter interpreter, const Arabica::DOM::Element& element) {} - - virtual void beforeUninvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) {} - virtual void afterUninvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) {} - - virtual void beforeTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing) {} - virtual void afterTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing) {} + StateTransitionMonitor(Interpreter interpreter) : _interpreter(interpreter) {} + virtual ~StateTransitionMonitor() {} - virtual void beforeEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) {} - virtual void afterEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) {} - - virtual void beforeInvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) {} - virtual void afterInvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) {} - - virtual void afterMicroStep(Interpreter interpreter) {} - - virtual void onStableConfiguration(Interpreter interpreter) {} - - virtual void beforeCompletion(Interpreter interpreter) {} - virtual void afterCompletion(Interpreter interpreter) {} - - virtual void reportIssue(Interpreter interpreter, const InterpreterIssue& issue) {} - - void copyToInvokers(bool copy) { - _copyToInvokers = copy; - } - - bool copyToInvokers() { - return _copyToInvokers; - } - -protected: - bool _copyToInvokers; - -}; - -class StateTransitionMonitor : public uscxml::InterpreterMonitor { -public: - virtual void beforeTakingTransition(uscxml::Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing); - virtual void beforeExecutingContent(Interpreter interpreter, const Arabica::DOM::Element& element); - virtual void onStableConfiguration(uscxml::Interpreter interpreter); - virtual void beforeProcessingEvent(uscxml::Interpreter interpreter, const uscxml::Event& event); - virtual void beforeExitingState(uscxml::Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing); - virtual void beforeEnteringState(uscxml::Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing); - virtual void beforeMicroStep(uscxml::Interpreter interpreter); + virtual void beforeTakingTransition(const xercesc::DOMElement* transition); + virtual void beforeExecutingContent(const xercesc::DOMElement* element); + virtual void onStableConfiguration(); + virtual void beforeProcessingEvent(const uscxml::Event& event); + virtual void beforeExitingState(const xercesc::DOMElement* state); + virtual void beforeEnteringState(const xercesc::DOMElement* state); + virtual void beforeMicroStep(); protected: - static tthread::recursive_mutex _mutex; - void printNodeSet(const Arabica::XPath::NodeSet& config); - Arabica::XPath::NodeSet exitingStates; - Arabica::XPath::NodeSet enteringStates; + Interpreter _interpreter; + static std::recursive_mutex _mutex; }; } -#endif +#endif /* end of include guard: INTERPRETER_H_6CD5A168 */ diff --git a/src/uscxml/InterpreterInfo.h b/src/uscxml/InterpreterInfo.h deleted file mode 100644 index 190ac0c..0000000 --- a/src/uscxml/InterpreterInfo.h +++ /dev/null @@ -1,103 +0,0 @@ -/** - * @file - * @author 2012-2015 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef INTERPRETERINFO_H_CED68EFF -#define INTERPRETERINFO_H_CED68EFF - -#include - -#include "uscxml/plugins/IOProcessor.h" -#include "uscxml/plugins/Invoker.h" - -#include -#include - - -namespace uscxml { - -class USCXML_API NameSpaceInfo { -public: - NameSpaceInfo() : nsContext(NULL) { - init(std::map()); - } - - NameSpaceInfo(const std::map& nsInfo) : nsContext(NULL) { - init(nsInfo); - } - - NameSpaceInfo(const NameSpaceInfo& other) : nsContext(NULL) { - init(other.nsInfo); - } - - virtual ~NameSpaceInfo() { - if (nsContext) - delete nsContext; - } - - NameSpaceInfo& operator=( const NameSpaceInfo& other ) { - init(other.nsInfo); - return *this; - } - - void setPrefix(Arabica::DOM::Element element) { - if (nsURL.size() > 0) - element.setPrefix(nsToPrefix[nsURL]); - } - - void setPrefix(Arabica::DOM::Attr attribute) { - if (nsURL.size() > 0) - attribute.setPrefix(nsToPrefix[nsURL]); - } - - std::string getXMLPrefixForNS(const std::string& ns) const { - if (nsToPrefix.find(ns) != nsToPrefix.end() && nsToPrefix.at(ns).size()) - return nsToPrefix.at(ns) + ":"; - return ""; - } - - const Arabica::XPath::StandardNamespaceContext* getNSContext() { - return nsContext; - } - - std::string nsURL; // ough to be "http://www.w3.org/2005/07/scxml" but maybe empty - std::string xpathPrefix; // prefix mapped for xpath, "scxml" is _xmlNSPrefix is empty but _nsURL set - std::string xmlNSPrefix; // the actual prefix for elements in the xml file - std::map nsToPrefix; // prefixes for a given namespace - std::map nsInfo; // all xmlns mappings - -private: - Arabica::XPath::StandardNamespaceContext* nsContext; - - void init(const std::map& nsInfo); -}; - -class USCXML_API InterpreterInfo { -public: - virtual NameSpaceInfo getNameSpaceInfo() const = 0; - virtual const std::string& getName() = 0; - virtual const std::string& getSessionId() = 0; - virtual const std::map& getIOProcessors() = 0; - virtual bool isInState(const std::string& stateId) = 0; - virtual Arabica::DOM::Document getDocument() const = 0; - virtual const std::map& getInvokers() = 0; -}; - -} - -#endif /* end of include guard: INTERPRETERINFO_H_CED68EFF */ diff --git a/src/uscxml/Message.h b/src/uscxml/Message.h deleted file mode 100644 index 5732857..0000000 --- a/src/uscxml/Message.h +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef EVENT_H_XZAQ4HR -#define EVENT_H_XZAQ4HR - -#include "uscxml/messages/Blob.h" -#include "uscxml/messages/Data.h" -#include "uscxml/messages/Event.h" -#include "uscxml/messages/SendRequest.h" -#include "uscxml/messages/InvokeRequest.h" - - -#endif /* end of include guard: EVENT_H_XZAQ4HR */ diff --git a/src/uscxml/URL.cpp b/src/uscxml/URL.cpp deleted file mode 100644 index 8b02d53..0000000 --- a/src/uscxml/URL.cpp +++ /dev/null @@ -1,917 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include -#include "URL.h" -#include "UUID.h" - -#include - -#include "uscxml/config.h" -#include -#include - -#include /* defines FILENAME_MAX */ -#ifdef _WIN32 -#include -#include -#include -#include -#include -#define getcwd _getcwd -#else -#include -#include -#include -#endif - -#include "uscxml/messages/Event.h" - -#include // mkstemp -#ifdef HAS_UNISTD_H -#include // mkstemp legacy -#endif - -#include - -namespace uscxml { - -void URL::dump() { - std::cout << ">>>" << asString() << "<<< "; - std::cout << (isAbsolute() ? "absolute" : "relative") << std::endl; - std::cout << "[scheme]" << scheme(); - std::cout << "[host]" << host(); - std::cout << "[port]" << port(); - std::cout << "[path]" << path(); - std::cout << "[file]" << file() << std::endl; - std::cout << "[segmts " << pathComponents().size() << "]: "; - for (size_t i = 0; i < pathComponents().size(); i++) { - std::cout << pathComponents()[i] << ", "; - } - std::cout << std::endl << std::endl; -} - -std::string URL::tmpDir() { - // try hard to find a temporary directory - const char* tmpDir = NULL; - if (tmpDir == NULL) - tmpDir = getenv("TMPDIR"); - if (tmpDir == NULL) - tmpDir = getenv("TMP"); - if (tmpDir == NULL) - tmpDir = getenv("TEMP"); - if (tmpDir == NULL) - tmpDir = getenv("USERPROFILE"); - if (tmpDir == NULL) - tmpDir = "/tmp/"; - -#if 0 - char* tmpl = (char*)malloc(strlen(tmpDir) + 11); - char* writePtr = tmpl; - memcpy(writePtr, tmpDir, strlen(tmpDir)); - writePtr += strlen(tmpDir); - memcpy(writePtr, "scxmlXXXXXX", 11); - writePtr += 11; - tmpl[writePtr - tmpl] = 0; - return tmpl; -#endif - return tmpDir; -} - -std::map URL::mimeTypes; -std::string URL::getMimeType(const std::string extension, std::string magic) { - if (mimeTypes.empty()) { - mimeTypes["txt"] = "text/plain"; - mimeTypes["c"] = "text/plain"; - mimeTypes["h"] = "text/plain"; - mimeTypes["html"] = "text/html"; - mimeTypes["htm"] = "text/htm"; - mimeTypes["css"] = "text/css"; - mimeTypes["bmp"] = "image/bmp"; - mimeTypes["gif"] = "image/gif"; - mimeTypes["jpg"] = "image/jpeg"; - mimeTypes["jpeg"] = "image/jpeg"; - mimeTypes["mpg"] = "video/mpeg"; - mimeTypes["mov"] = "video/quicktime"; - mimeTypes["png"] = "image/png"; - mimeTypes["pdf"] = "application/pdf"; - mimeTypes["ps"] = "application/postscript"; - mimeTypes["tif"] = "image/tiff"; - mimeTypes["tiff"] = "image/tiff"; - } - - if (mimeTypes.find(extension) != mimeTypes.end()) { - return mimeTypes[extension]; - } - return "application/octet-stream"; -} - - -std::string URL::getTmpFilename(const std::string& suffix) { - std::string tmpFilename = tmpDir(); - if (tmpFilename.find_last_of(PATH_SEPERATOR) != tmpFilename.length() - 1) - tmpFilename += PATH_SEPERATOR; - - tmpFilename += UUID::getUUID(); - if (suffix.length() > 0) { - tmpFilename += "."; - tmpFilename += suffix; - } - return tmpFilename; -} - -#if (!defined APPLE && !defined IOS) -std::string URL::getResourceDir() { -#ifdef _WIN32 - TCHAR szPath[MAX_PATH]; - if (SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, szPath)) { - return szPath; - } else { - return getenv("APPDATA"); - } -#else - struct passwd* pw = getpwuid(getuid()); - std::string homedir(pw->pw_dir); - struct stat dirStat; - int err = 0; - - err = stat(std::string(homedir + PATH_SEPERATOR + ".config").c_str(), &dirStat); - if (err == ENOENT) { - err = mkdir(std::string(homedir + PATH_SEPERATOR + ".config").c_str(), S_IWUSR | S_IRUSR | S_IROTH); - } - - err = stat(std::string(homedir + PATH_SEPERATOR + ".config" + PATH_SEPERATOR + "uscxml").c_str(), &dirStat); - if (err != 0) { - std::cout << std::string(homedir + PATH_SEPERATOR + ".config" + PATH_SEPERATOR + "uscxml") << std::endl; - err = mkdir(std::string(homedir + PATH_SEPERATOR + ".config" + PATH_SEPERATOR + "uscxml").c_str(), - S_IWUSR | S_IRUSR | S_IROTH | S_IRGRP | S_IXUSR | S_IXOTH | S_IXGRP); - } - - err = stat(std::string(homedir + PATH_SEPERATOR + ".config" + PATH_SEPERATOR + "uscxml").c_str(), &dirStat); - if (err == 0) { - return homedir + PATH_SEPERATOR + ".config" + PATH_SEPERATOR + "uscxml"; - } - return ""; -#endif -} -#endif - -URLImpl::URLImpl(const std::string& url) : _handle(NULL), _isDownloaded(false), _hasFailed(false) { - if (url[0] == '/') { - _uri = Arabica::io::URI("file://" + url); - } else { - _uri = Arabica::io::URI(url); - } - std::stringstream ss(_uri.path()); - std::string item; - while(std::getline(ss, item, '/')) { - if (item.length() == 0) - continue; - _pathComponents.push_back(item); - } - -} - -URLImpl::~URLImpl() { - if (_handle != NULL) - curl_easy_cleanup(_handle); -} - -URLImpl::operator Data() const { - Data data; - data.compound["url"] = Data(asString(), Data::VERBATIM); - data.compound["host"] = Data(_uri.host(), Data::VERBATIM); - data.compound["scheme"] = Data(_uri.scheme(), Data::VERBATIM); - data.compound["path"] = Data(_uri.path(), Data::VERBATIM); - data.compound["port"] = Data(_uri.port(), Data::INTERPRETED); - data.compound["isAbsolute"] = Data(_uri.is_absolute()); - if (_statusCode.length() > 0) - data.compound["statusCode"] = Data(_statusCode, Data::VERBATIM); - if (_statusMsg.length() > 0) - data.compound["statusMsg"] = Data(_statusMsg, Data::VERBATIM); - - - std::vector::const_iterator pathIter = _pathComponents.begin(); - while(pathIter != _pathComponents.end()) { - data.compound["pathComponent"].array.push_back(Data(*pathIter, Data::VERBATIM)); - pathIter++; - } - - return data; -} - -CURL* URLImpl::getCurlHandle() { - if (_handle == NULL) { - _handle = curl_easy_init(); - if (_handle == NULL) - LOG(ERROR) << "curl_easy_init returned NULL, this is bad!"; - } - return _handle; -} - -size_t URLImpl::writeHandler(void *ptr, size_t size, size_t nmemb, void *userdata) { - URLImpl* url = (URLImpl*)userdata; - url->_rawInContent.write((char*)ptr, size * nmemb); - - monIter_t monIter = url->_monitors.begin(); - while(monIter != url->_monitors.end()) { - (*monIter)->contentChunkReceived(URL(url->shared_from_this()), std::string((char*)ptr, size * nmemb)); - monIter++; - } - - return size * nmemb; -} - -size_t URLImpl::headerHandler(void *ptr, size_t size, size_t nmemb, void *userdata) { - URLImpl* url = (URLImpl*)userdata; - url->_rawInHeader.write((char*)ptr, size * nmemb); - - monIter_t monIter = url->_monitors.begin(); - while(monIter != url->_monitors.end()) { - (*monIter)->headerChunkReceived(URL(url->shared_from_this()), std::string((char*)ptr, size * nmemb)); - monIter++; - } - - return size * nmemb; -} - -void URLImpl::downloadStarted() { -// LOG(INFO) << "Starting download of " << asString() << std::endl; - _rawInContent.str(""); - _rawInContent.clear(); - _rawInHeader.str(""); - _rawInHeader.clear(); - - _statusMsg = ""; - _statusCode = ""; - - monIter_t monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - (*monIter)->downloadStarted(URL(shared_from_this())); - monIter++; - } -} - -void URLImpl::downloadCompleted() { - tthread::lock_guard lock(_mutex); - - if (iequals(scheme(), "http")) { - // process header fields - std::string line; - while (std::getline(_rawInHeader, line)) { - size_t colon = line.find_first_of(":"); - size_t newline = line.find_first_of("\r\n"); - if (newline == std::string::npos) - newline = line.size(); - - if (colon == std::string::npos) { - _statusMsg = line.substr(0, newline); - if (_statusMsg.length() >= 11) - _statusCode = _statusMsg.substr(9, 3); - } else { - std::string key = line.substr(0, colon); - size_t firstChar = line.find_first_not_of(": ", colon, 2); - if (firstChar == std::string::npos) { - // nothing but spaces? - _inHeaders[line.substr(0, newline)] = ""; - } else { - std::string value = line.substr(firstChar, newline - firstChar); - _inHeaders[key] = value; - } - } - } - } - - _hasFailed = false; - _isDownloaded = true; - _condVar.notify_all(); - - monIter_t monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - (*monIter)->downloadCompleted(URL(shared_from_this())); - monIter++; - } -} - -void URLImpl::downloadFailed(CURLcode errorCode) { - tthread::lock_guard lock(_mutex); - - LOG(ERROR) << "Downloading " << asString() << " failed: " << curl_easy_strerror(errorCode); - - _error = curl_easy_strerror(errorCode); - _hasFailed = true; - _isDownloaded = false; - _condVar.notify_all(); - - monIter_t monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - (*monIter)->downloadFailed(URL(shared_from_this()), errorCode); - monIter++; - } - -} - -const std::string URLImpl::getInHeaderField(const std::string& key) { - std::map headerFields = getInHeaderFields(); - if (headerFields.find(key) != headerFields.end()) { - return headerFields[key]; - } - return ""; -} - -const std::string URLImpl::getStatusCode() { - if (!_isDownloaded) - download(true); - return _statusCode; -} - -const std::string URLImpl::getStatusMessage() { - if (!_isDownloaded) - download(true); - return _statusMsg; -} - - -const std::map URLImpl::getInHeaderFields() { - if (!_isDownloaded) - download(true); - - return _inHeaders; -} - -void URLImpl::setRequestType(const std::string& requestType) { - _requestType = requestType; -} - -void URLImpl::setOutContent(const std::string& content) { - _outContent = content; - _requestType = "POST"; -} - -const std::string URLImpl::getInContent(bool forceReload) { - if (!_isDownloaded) { - download(true); - } - return _rawInContent.str(); -} - -const std::string URLImpl::file() const { - if (_pathComponents.size() > 0 && !boost::ends_with(path(), "/")) { - return _pathComponents[_pathComponents.size() - 1]; - } - return ""; -} - -const void URLImpl::download(bool blocking) { - tthread::lock_guard lock(_mutex); - - if (_isDownloaded) - return; - - URL url(shared_from_this()); - URLFetcher::fetchURL(url); - - if (blocking) { - while(!_isDownloaded && !_hasFailed) { - _condVar.wait(_mutex); // wait for notification - } - if (_hasFailed) { - ERROR_COMMUNICATION(exc, _error); - exc.data = URL(shared_from_this()); - if (_error.length() > 0) - exc.data.compound["cause"] = Data(_error, Data::VERBATIM); - throw exc; - } - if (iequals(scheme(), "http")) { - if (_statusCode.size() > 0 && boost::lexical_cast(_statusCode) > 400) { - ERROR_COMMUNICATION(exc, _error); - exc.data = URL(shared_from_this()); - if (_error.length() > 0) - exc.data.compound["cause"] = Data(_error, Data::VERBATIM); - throw exc; - } - } - } -} - -const bool URLImpl::toAbsoluteCwd() { - char currPath[FILENAME_MAX]; - if (!getcwd(currPath, sizeof(currPath))) { - return false; - } - currPath[sizeof(currPath) - 1] = '\0'; /* not really required */ -#ifdef _WIN32 - return toAbsolute(std::string("file://" + std::string(currPath) + "/")); -#else - return toAbsolute(std::string("file://" + std::string(currPath) + "/")); -#endif -} - -std::string URLImpl::getLocalFilename(const std::string& suffix) { - if (_localFile.length() > 0) - return _localFile; - - if (_uri.scheme().compare("file") == 0) - return _uri.path(); - - // try hard to find a temporary directory - const char* tmpDir = NULL; - if (tmpDir == NULL) - tmpDir = getenv("TMPDIR"); - if (tmpDir == NULL) - tmpDir = getenv("TMP"); - if (tmpDir == NULL) - tmpDir = getenv("TEMP"); - if (tmpDir == NULL) - tmpDir = getenv("USERPROFILE"); - if (tmpDir == NULL) - tmpDir = "/tmp/"; - - char* tmpl = (char*)malloc(strlen(tmpDir) + 11 + suffix.length()); - char* writePtr = tmpl; - memcpy(writePtr, tmpDir, strlen(tmpDir)); - writePtr += strlen(tmpDir); - memcpy(writePtr, "scxmlXXXXXX", 11); - writePtr += 11; - memcpy(writePtr, suffix.c_str(), suffix.length()); - writePtr += suffix.length(); - tmpl[writePtr - tmpl] = 0; - -#ifdef _WIN32 - _mktemp_s(tmpl, strlen(tmpl) + 1); - int fd = _open(tmpl, _O_CREAT, _S_IREAD | _S_IWRITE); -#else - int fd = mkstemps(tmpl, suffix.length()); -#endif - if (fd < 0) { - LOG(ERROR) << "mkstemp " << tmpl << ": " << strerror(errno) << std::endl; - return ""; - } -#ifdef WIN32 - _close(fd); -#else - close(fd); -#endif - return std::string(tmpl); -} - -void URL::toBaseURL(URL& uri) { - uri = asBaseURL(uri); -} - -URL URL::asBaseURL(const URL& uri) { - std::string uriStr = uri.asString(); - std::string baseUriStr = uriStr.substr(0, uriStr.find_last_of("/\\") + 1); -#ifdef _WIN32 - if (baseUriStr.find("file://") == 0) { - baseUriStr = baseUriStr.substr(7); - } -#endif - return URL(baseUriStr); -} - - -const bool URLImpl::toAbsolute(const std::string& baseUrl) { - if (_uri.is_absolute()) - return true; - - std::string uriStr = _uri.as_string(); -// std::cout << "## bas # " << baseUrl << std::endl; -// std::cout << "## rel # " << _uri.as_string() << std::endl; - -#ifdef _WIN32 - if (baseUrl.find("file://") == 0 && false) { - _uri = Arabica::io::URI("file:///" + baseUrl.substr(7), _uri.as_string()); - } else { - _uri = Arabica::io::URI(baseUrl, _uri.as_string()); - } -#else - _uri = Arabica::io::URI(baseUrl, _uri.as_string()); -#endif -// std::cout << "## abs # " << _uri.as_string() << std::endl; - - if (!_uri.is_absolute()) - return false; - return true; -} - -boost::shared_ptr URLImpl::toLocalFile(const std::string& content, const std::string& suffix) { - boost::shared_ptr urlImpl = boost::shared_ptr(new URLImpl()); - urlImpl->_localFile = urlImpl->getLocalFilename(suffix); -#ifdef _WIN32 - urlImpl->_uri = std::string("file://") + urlImpl->_localFile; -#else - urlImpl->_uri = std::string("file://") + urlImpl->_localFile; -#endif - std::ofstream file(urlImpl->_localFile.c_str(), std::ios_base::out); - if(file.is_open()) { - file << content; - file.close(); - } else { - return boost::shared_ptr(); - } - - return urlImpl; -} - -const std::string URLImpl::asLocalFile(const std::string& suffix, bool reload) { - // this is already a local file - if (_uri.scheme().compare("file") == 0) - return _uri.path(); - - if (_localFile.length() > 0 && !reload) - return _localFile; - - if (_localFile.length() > 0) - remove(_localFile.c_str()); - - _localFile = getLocalFilename(suffix); - - std::ofstream file(_localFile.c_str(), std::ios_base::out); - if(file.is_open()) { - file << URL(this->shared_from_this()); - file.close(); - } else { - _localFile = ""; - } - - return _localFile; -} - -std::ostream & operator<<(std::ostream & stream, const URL& url) { - URL nonConstUrl = url; // this is a hack - stream << nonConstUrl.getInContent(); - return stream; -} - -URLFetcher::URLFetcher() { - _isStarted = false; - _envProxy = NULL; - _multiHandle = curl_multi_init(); - - // read proxy information from environment -// CURLOPT_PROXY; -// CURLOPT_PROXY_TRANSFER_MODE; -// CURLOPT_PROXYAUTH; -// CURLOPT_PROXYHEADER; -// CURLOPT_PROXYPASSWORD; -// CURLOPT_PROXYPORT; -// CURLOPT_PROXYTYPE; -// CURLOPT_PROXYUSERNAME; -// CURLOPT_PROXYUSERPWD; - - /* - see http://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html - e.g. 'socks5://bob:marley@localhost:12345' - */ - _envProxy = getenv("USCXML_PROXY"); - -#if 0 - bool unsupported = false; - CURLcode curlError; - - // exposed just in case - char* envProxyTransferMode = getenv("USCXML_PROXY_TRANSFER_MODE"); - char* envProxyAuth = getenv("USCXML_PROXYAUTH"); -// char* envProxyHeader = getenv("USCXML_PROXYHEADER"); // not available in older curl - char* envProxyPassword = getenv("USCXML_PROXYPASSWORD"); - char* envProxyPort = getenv("USCXML_PROXYPORT"); -// char* envProxyType = getenv("USCXML_PROXYTYPE"); // takes an int, have another look if needed - char* envProxyUsername = getenv("USCXML_PROXYUSERNAME"); - char* envProxyUserPwd = getenv("USCXML_PROXYUSERPWD"); - - /* Name of proxy to use. */ - if (envProxy) - (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXY, envProxy)) == CURLE_OK || - LOG(ERROR) << "Cannot set curl proxy: " << curl_easy_strerror(curlError); - - /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ - if (envProxyTransferMode) - (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXY_TRANSFER_MODE, envProxyTransferMode)) == CURLE_OK || - LOG(ERROR) << "Cannot set curl proxy transfer mode: " << curl_easy_strerror(curlError); - - /* Set this to a bitmask value to enable the particular authentications - methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. - Note that setting multiple bits may cause extra network round-trips. */ - if (envProxyAuth) - (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYAUTH, envProxyAuth)) == CURLE_OK || - LOG(ERROR) << "Cannot set curl proxy authentication: " << curl_easy_strerror(curlError); - -#if 0 - /* This points to a linked list of headers used for proxy requests only, - struct curl_slist kind */ - if (envProxyHeader && unsupported) - (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYHEADER, envProxyHeader)) == CURLE_OK || - LOG(ERROR) << "Cannot set curl proxy header: " << curl_easy_strerror(curlError); -#endif - - /* "name" and "pwd" to use with Proxy when fetching. */ - if (envProxyUsername) - (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYUSERNAME, envProxyUsername)) == CURLE_OK || - LOG(ERROR) << "Cannot set curl proxy username: " << curl_easy_strerror(curlError); - if (envProxyPassword) - (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYPASSWORD, envProxyPassword)) == CURLE_OK || - LOG(ERROR) << "Cannot set curl proxy password: " << curl_easy_strerror(curlError); - - /* Port of the proxy, can be set in the proxy string as well with: - "[host]:[port]" */ - if (envProxyPort) - (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYPORT, envProxyPort)) == CURLE_OK || - LOG(ERROR) << "Cannot set curl proxy port: " << curl_easy_strerror(curlError); - -#if 0 - /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), - CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */ - if (envProxyType && unsupported) - (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYTYPE, envProxyType)) == CURLE_OK || - LOG(ERROR) << "Cannot set curl proxy type: " << curl_easy_strerror(curlError); -#endif - - /* "user:password" to use with proxy. */ - if (envProxyUserPwd) - (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYUSERPWD, envProxyUserPwd)) == CURLE_OK || - LOG(ERROR) << "Cannot set curl proxy user password: " << curl_easy_strerror(curlError); -#endif - - start(); -} - -URLFetcher::~URLFetcher() { - stop(); - curl_multi_cleanup(_multiHandle); -} - -void URLFetcher::fetchURL(URL& url) { - URLFetcher* instance = getInstance(); - tthread::lock_guard lock(instance->_mutex); - - CURL* handle = url._impl->getCurlHandle(); - assert(handle != NULL); - if (handle == NULL) - return; - - if (instance->_handlesToURLs.find(handle) == instance->_handlesToURLs.end()) { - CURLcode curlError; - - (curlError = curl_easy_setopt(handle, CURLOPT_URL, url.asString().c_str())) == CURLE_OK || - LOG(ERROR) << "Cannot set url to " << url.asString() << ": " << curl_easy_strerror(curlError); - -// (curlError = curl_easy_setopt(handle, CURLOPT_NOSIGNAL, 1)) == CURLE_OK || -// LOG(ERROR) << "Cannot set curl to ignore signals: " << curl_easy_strerror(curlError); - -// (curlError = curl_easy_setopt(handle, CURLOPT_FORBID_REUSE, 1)) == CURLE_OK || -// LOG(ERROR) << "Cannot force noreuse: " << curl_easy_strerror(curlError); - -// (curlError = curl_easy_setopt(handle, CURLOPT_VERBOSE, 1)) == CURLE_OK || -// LOG(ERROR) << "Cannot set verbose: " << curl_easy_strerror(curlError); - - (curlError = curl_easy_setopt(handle, CURLOPT_WRITEDATA, url._impl.get())) == CURLE_OK || - LOG(ERROR) << "Cannot register this as write userdata: " << curl_easy_strerror(curlError); - - (curlError = curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, URLImpl::writeHandler)) == CURLE_OK || - LOG(ERROR) << "Cannot set write callback: " << curl_easy_strerror(curlError); - - (curlError = curl_easy_setopt(handle, CURLOPT_HEADERFUNCTION, URLImpl::headerHandler)) == CURLE_OK || - LOG(ERROR) << "Cannot request header from curl: " << curl_easy_strerror(curlError); - - (curlError = curl_easy_setopt(handle, CURLOPT_HEADERDATA, url._impl.get())) == CURLE_OK || - LOG(ERROR) << "Cannot register this as header userdata: " << curl_easy_strerror(curlError); - - (curlError = curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, false)) == CURLE_OK || - LOG(ERROR) << "Cannot forfeit peer verification: " << curl_easy_strerror(curlError); - - (curlError = curl_easy_setopt(handle, CURLOPT_USERAGENT, "uscxml/" USCXML_VERSION)) == CURLE_OK || - LOG(ERROR) << "Cannot set our user agent string: " << curl_easy_strerror(curlError); - - (curlError = curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, true)) == CURLE_OK || - LOG(ERROR) << "Cannot enable follow redirects: " << curl_easy_strerror(curlError); - - if (instance->_envProxy) - (curlError = curl_easy_setopt(handle, CURLOPT_PROXY, instance->_envProxy)) == CURLE_OK || - LOG(ERROR) << "Cannot set curl proxy: " << curl_easy_strerror(curlError); - - if (iequals(url._impl->_requestType, "post")) { - - (curlError = curl_easy_setopt(handle, CURLOPT_POST, 1)) == CURLE_OK || - LOG(ERROR) << "Cannot set request type to post for " << url.asString() << ": " << curl_easy_strerror(curlError); - - (curlError = curl_easy_setopt(handle, CURLOPT_COPYPOSTFIELDS, url._impl->_outContent.c_str())) == CURLE_OK || - LOG(ERROR) << "Cannot set post data " << url.asString() << ": " << curl_easy_strerror(curlError); - - // Disable "Expect: 100-continue" -// curl_slist* disallowed_headers = 0; -// disallowed_headers = curl_slist_append(disallowed_headers, "Expect:"); -// (curlError = curl_easy_setopt(handle, CURLOPT_HTTPHEADER, disallowed_headers)) == CURLE_OK || -// LOG(ERROR) << "Cannot disable Expect 100 header: " << curl_easy_strerror(curlError); - - struct curl_slist* headers = NULL; - std::map::iterator paramIter = url._impl->_outHeader.begin(); - while(paramIter != url._impl->_outHeader.end()) { -// char* key = curl_easy_escape(handle, paramIter->first.c_str(), paramIter->first.length()); -// char* value = curl_easy_escape(handle, paramIter->second.c_str(), paramIter->second.length()); - - const char* value = paramIter->second.c_str(); - - char* header = (char*)malloc(paramIter->first.size() + strlen(value) + 3); - sprintf(header,"%s: %s", paramIter->first.c_str(), value); - headers = curl_slist_append(headers, header); - -// curl_free(key); -// curl_free(value); - paramIter++; - } - - // Disable "Expect: 100-continue" - headers = curl_slist_append(headers, "Expect:"); - - (curlError = curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers)) == CURLE_OK || - LOG(ERROR) << "Cannot headers for " << url.asString() << ": " << curl_easy_strerror(curlError); - - //curl_slist_free_all(headers); - - - } else if (iequals(url._impl->_requestType, "get")) { - (curlError = curl_easy_setopt(handle, CURLOPT_HTTPGET, 1)) == CURLE_OK || - LOG(ERROR) << "Cannot set request type to get for " << url.asString() << ": " << curl_easy_strerror(curlError); - } - - url.downloadStarted(); - instance->_handlesToURLs[handle] = url; - assert(instance->_handlesToURLs.size() > 0); - - curl_multi_add_handle(instance->_multiHandle, handle); - instance->_condVar.notify_all(); - } -} - -void URLFetcher::breakURL(URL& url) { - URLFetcher* instance = getInstance(); - CURL* handle = url._impl->getCurlHandle(); - - tthread::lock_guard lock(instance->_mutex); - if (instance->_handlesToURLs.find(handle) != instance->_handlesToURLs.end()) { - url.downloadFailed(CURLE_OK); - curl_multi_remove_handle(instance->_multiHandle, handle); - instance->_handlesToURLs.erase(handle); - } -} - -void URLFetcher::start() { - tthread::lock_guard lock(_mutex); - if (!_isStarted) { - _isStarted = true; - _thread = new tthread::thread(URLFetcher::run, this); - } -} - -void URLFetcher::stop() { - tthread::lock_guard lock(_mutex); - if (_isStarted) { - _isStarted = false; - _thread->join(); - delete _thread; - } -} - -void URLFetcher::run(void* instance) { - URLFetcher* fetcher = (URLFetcher*)instance; - while(fetcher->_isStarted) { - fetcher->perform(); - } - LOG(ERROR) << "URLFetcher thread stopped!"; -} - -void URLFetcher::perform() { - - CURLMsg *msg; /* for picking up messages with the transfer status */ - int msgsLeft; /* how many messages are left */ - int stillRunning; - CURLMcode err; - - { - tthread::lock_guard lock(_mutex); - if (_handlesToURLs.empty()) { - _condVar.wait(_mutex); - } - err = curl_multi_perform(_multiHandle, &stillRunning); - if (err != CURLM_OK) { - LOG(WARNING) << "curl_multi_perform: " << curl_multi_strerror(err); - } - } - - do { - struct timeval timeout; - int rc; /* select() return code */ - - fd_set fdread, fdwrite, fdexcep; - FD_ZERO(&fdread); - FD_ZERO(&fdwrite); - FD_ZERO(&fdexcep); - - int maxfd = -1; - long curlTimeOut = -1; - - /* set a suitable timeout to play around with */ - timeout.tv_sec = 1; - timeout.tv_usec = 0; - - { - tthread::lock_guard lock(_mutex); - err = curl_multi_timeout(_multiHandle, &curlTimeOut); - if (err != CURLM_OK) { - LOG(WARNING) << "curl_multi_timeout: " << curl_multi_strerror(err); - } - } - - if(curlTimeOut >= 0) { - timeout.tv_sec = curlTimeOut / 1000; - if(timeout.tv_sec > 1) { - timeout.tv_sec = 1; - } else { - timeout.tv_usec = (curlTimeOut % 1000) * 1000; - } - } - - /* get file descriptors from the transfers */ - { - tthread::lock_guard lock(_mutex); - err = curl_multi_fdset(_multiHandle, &fdread, &fdwrite, &fdexcep, &maxfd); - if (err != CURLM_OK) { - LOG(WARNING) << "curl_multi_fdset: " << curl_multi_strerror(err); - } - } - - rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); - - switch(rc) { - case -1: - /* select error */ - break; - case 0: /* timeout */ - default: { /* action */ - tthread::lock_guard lock(_mutex); - err = curl_multi_perform(_multiHandle, &stillRunning); - if (err != CURLM_OK) { - LOG(WARNING) << "curl_multi_perform: " << curl_multi_strerror(err); - } - break; - } - } - - { - tthread::lock_guard lock(_mutex); - while ((msg = curl_multi_info_read(_multiHandle, &msgsLeft))) { - if (msg->msg == CURLMSG_DONE) { - switch (msg->data.result) { - case CURLE_OK: - _handlesToURLs[msg->easy_handle].downloadCompleted(); - err = curl_multi_remove_handle(_multiHandle, msg->easy_handle); - if (err != CURLM_OK) { - LOG(WARNING) << "curl_multi_remove_handle: " << curl_multi_strerror(err); - } - - _handlesToURLs.erase(msg->easy_handle); - break; - default: - _handlesToURLs[msg->easy_handle].downloadFailed(msg->data.result); - err = curl_multi_remove_handle(_multiHandle, msg->easy_handle); - if (err != CURLM_OK) { - LOG(WARNING) << "curl_multi_remove_handle: " << curl_multi_strerror(err); - } - - _handlesToURLs.erase(msg->easy_handle); - } - } else { - LOG(ERROR) << "Curl reports info on unfinished download?!"; - } - } - } - } while(stillRunning && _isStarted); -} - -URLFetcher* URLFetcher::_instance = NULL; - -URLFetcher* URLFetcher::getInstance() { - if (_instance == NULL) { - _instance = new URLFetcher(); - } - return _instance; -} - -} \ No newline at end of file diff --git a/src/uscxml/URL.h b/src/uscxml/URL.h deleted file mode 100644 index dacf0db..0000000 --- a/src/uscxml/URL.h +++ /dev/null @@ -1,336 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef URL_H_9DAEGSMV -#define URL_H_9DAEGSMV - -#include -#include -#include -#include -#include -#include - -#include "uscxml/messages/Data.h" -#include -#include - -#include "uscxml/concurrency/tinythread.h" - -// use arabica URL parser -#include - -namespace uscxml { - -class URL; - -class USCXML_API URLMonitor { -public: - virtual void downloadStarted(const URL& url) {}; - virtual void downloadCompleted(const URL& url) {}; - virtual void downloadFailed(const URL& url, int errorCode) {}; - virtual void headerChunkReceived(const URL& url, const std::string& headerChunk) {}; - virtual void contentChunkReceived(const URL& url, const std::string& contentChunk) {}; -}; - -class USCXML_API URLImpl : public boost::enable_shared_from_this { -public: - URLImpl(const std::string& url); - ~URLImpl(); - static boost::shared_ptr toLocalFile(const std::string& content, const std::string& suffix); - - static size_t writeHandler(void *ptr, size_t size, size_t nmemb, void *userdata); - static size_t headerHandler(void *ptr, size_t size, size_t nmemb, void *userdata); - - void addMonitor(URLMonitor* monitor) { - _monitors.insert(monitor); - } - void removeMonitor(URLMonitor* monitor) { - _monitors.erase(monitor); - } - - const bool isAbsolute() const { - return _uri.is_absolute(); - } - const std::string scheme() const { - return _uri.scheme(); - } - const std::string host() const { - return _uri.host(); - } - const std::string port() const { - return _uri.port(); - } - const std::string path() const { - return _uri.path(); - } - const std::string file() const; - const std::vector pathComponents() const { - return _pathComponents; - } - const std::string asString() const { - return _uri.as_string(); - } - - const bool toAbsoluteCwd(); - const bool toAbsolute(const std::string& baseUrl); - const std::string asLocalFile(const std::string& suffix, bool reload = false); - - void addOutHeader(const std::string& key, const std::string& value) { - _outHeader[key] = value; - } - void setOutContent(const std::string& content); - void setRequestType(const std::string& requestType); - - const std::map getInHeaderFields(); - const std::string getInHeaderField(const std::string& key); - const std::string getStatusCode(); - const std::string getStatusMessage(); - - - const std::string getInContent(bool forceReload = false); - const void download(bool blocking = false); - - void downloadStarted(); - void downloadCompleted(); - void downloadFailed(CURLcode errorCode); - - bool downloadFailed() { - return _hasFailed; - } - operator Data() const; - - friend class URLFetcher; - -protected: - URLImpl() : _handle(NULL), _isDownloaded(false), _hasFailed(false) {} - std::string getLocalFilename(const std::string& suffix); - - CURL* getCurlHandle(); - - std::string _outContent; - std::map _outHeader; - std::string _requestType; - - CURL* _handle; - std::stringstream _rawInContent; - std::stringstream _rawInHeader; - - std::string _statusCode; - std::string _statusMsg; - std::map _inHeaders; - - Arabica::io::URI _uri; - std::vector _pathComponents; - - bool _isDownloaded; - bool _hasFailed; - - std::string _localFile; - std::string _error; - - tthread::condition_variable _condVar; - tthread::recursive_mutex _mutex; - - std::set _monitors; - typedef std::set::iterator monIter_t; -}; - -class USCXML_API URL { -public: - URL() : _impl() {} - URL(const std::string url) : _impl(new URLImpl(url)) {} - URL(boost::shared_ptr const impl) : _impl(impl) { } - URL(const URL& other) : _impl(other._impl) { } - virtual ~URL() {}; - - operator bool() const { - return !!_impl; - } - bool operator< (const URL& other) const { - return _impl < other._impl; - } - bool operator==(const URL& other) const { - return _impl == other._impl; - } - bool operator!=(const URL& other) const { - return _impl != other._impl; - } - URL& operator= (const URL& other) { - _impl = other._impl; - return *this; - } - - const std::map getInHeaderFields() const { - return _impl->getInHeaderFields(); - } - const std::string getInHeaderField(const std::string& key) const { - return _impl->getInHeaderField(key); - } - const std::string getStatusCode() const { - return _impl->getStatusCode(); - } - const std::string getStatusMessage() const { - return _impl->getStatusMessage(); - } - - const std::string getInContent() const { - return _impl->getInContent(); - } - const void download(bool blocking = false) const { - return _impl->download(blocking); - } - - void addOutHeader(const std::string& key, const std::string& value) { - _impl->addOutHeader(key, value); - } - void setRequestType(const std::string& requestType) { - _impl->setRequestType(requestType); - } - void setOutContent(const std::string& content) { - _impl->setOutContent(content); - } - - const bool toAbsoluteCwd() { - return _impl->toAbsoluteCwd(); - } - const bool toAbsolute(const std::string& baseUrl) { - return _impl->toAbsolute(baseUrl); - } - const bool toAbsolute(const URL& baseUrl) { - return _impl->toAbsolute(baseUrl.asString()); - } - const std::string asLocalFile(const std::string& suffix, bool reload = false) { - return _impl->asLocalFile(suffix, reload); - } - - static URL asBaseURL(const URL& url); - static void toBaseURL(URL& uri); - - static std::string getResourceDir(); - static std::string getTmpFilename(const std::string& suffix = ""); - - static URL toLocalFile(const std::string& content, const std::string& suffix) { - boost::shared_ptr impl = URLImpl::toLocalFile(content, suffix); - return URL(impl); - } - - void dump(); - - void addMonitor(URLMonitor* monitor) { - _impl->addMonitor(monitor); - } - void removeMonitor(URLMonitor* monitor) { - _impl->removeMonitor(monitor); - } - - bool downloadFailed() { - return _impl->downloadFailed(); - } - - const bool isAbsolute() const { - return _impl->isAbsolute(); - } - const std::string scheme() const { - return _impl->scheme(); - } - const std::string host() const { - return _impl->host(); - } - const std::string port() const { - return _impl->port(); - } - const std::string path() const { - return _impl->path(); - } - const std::vector pathComponents() const { - return _impl->pathComponents(); - } - const std::string file() const { - return _impl->file(); - } - - const std::string asString() const { - if (_impl) - return _impl->asString(); - return ""; - } - - static std::string tmpDir(); - static std::map mimeTypes; - static std::string getMimeType(const std::string extension, std::string magic = ""); - - friend class URLFetcher; - friend USCXML_API std::ostream & operator<<(std::ostream &stream, const URL& p); - - operator Data() const { - return _impl->operator Data(); - } - - operator std::string() const { - return asString(); - } - -protected: - void downloadStarted() { - return _impl->downloadStarted(); - } - void downloadCompleted() { - return _impl->downloadCompleted(); - } - void downloadFailed(CURLcode errorCode) { - return _impl->downloadFailed(errorCode); - } - - boost::shared_ptr _impl; -}; - -class USCXML_API URLFetcher { -public: - URLFetcher(); - ~URLFetcher(); - - static void fetchURL(URL& url); - static void breakURL(URL& url); - - void start(); - void stop(); - -protected: - static URLFetcher* _instance; - static URLFetcher* getInstance(); - - static void run(void* instance); - void perform(); - - tthread::thread* _thread; - tthread::condition_variable _condVar; - tthread::recursive_mutex _mutex; - bool _isStarted; - - std::map _handlesToURLs; - CURLM* _multiHandle; - char* _envProxy; -}; - -USCXML_API std::ostream& operator<< (std::ostream &stream, const URL& p); - -} - -#endif /* end of include guard: URL_H_9DAEGSMV */ diff --git a/src/uscxml/URL.mm b/src/uscxml/URL.mm deleted file mode 100644 index 3bd1607..0000000 --- a/src/uscxml/URL.mm +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "URL.h" -#include "Foundation/Foundation.h" - -#ifdef __has_feature -# if __has_feature(objc_arc) -# define(HAS_AUTORELEASE_POOL) -# endif -#endif - -namespace uscxml { - -std::string URL::getResourceDir() { - std::string path; -#if HAS_AUTORELEASE_POOL - @autoreleasepool { -#else - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; -#endif - NSString *resourcePath = [[NSBundle mainBundle] resourcePath]; - path = [resourcePath cStringUsingEncoding:NSUTF8StringEncoding]; - -#if HAS_AUTORELEASE_POOL - } -#else - [pool drain]; -#endif - return path; -} - -} diff --git a/src/uscxml/UUID.cpp b/src/uscxml/UUID.cpp deleted file mode 100644 index 34e3e75..0000000 --- a/src/uscxml/UUID.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "UUID.h" -#include -#include - -namespace uscxml { -boost::uuids::random_generator UUID::uuidGen; - -std::string UUID::getUUID() { - boost::uuids::uuid uuid = uuidGen(); - std::ostringstream os; - os << uuid; - return os.str(); -} - -bool UUID::isUUID(const std::string& uuid) { - if (uuid.size() != 36) - return false; - - if (uuid[8] != '-' || uuid[13] != '-' || uuid[18] != '-' || uuid[23] != '-') - return false; - - for (size_t i = 0; i < 36; i++) { - if (i == 8 || i == 13 || i == 18 || i ==23) - continue; - - char c = uuid[i]; - if (c == 'a' || - c == 'b' || - c == 'c' || - c == 'd' || - c == 'e' || - c == 'f' || - c == '0' || - c == '1' || - c == '2' || - c == '3' || - c == '4' || - c == '5' || - c == '6' || - c == '7' || - c == '8' || - c == '9') { - continue; - } else { - return false; - } - } - return true; -} - -} \ No newline at end of file diff --git a/src/uscxml/UUID.h b/src/uscxml/UUID.h deleted file mode 100644 index 873d963..0000000 --- a/src/uscxml/UUID.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef UUID_H_8X65R2EI -#define UUID_H_8X65R2EI - -#include "uscxml/Common.h" -#include -#include - -namespace uscxml { - -class USCXML_API UUID { -public: - static std::string getUUID(); - static bool isUUID(const std::string& uuid); - static boost::uuids::random_generator uuidGen; -}; - -} - - -#endif /* end of include guard: UUID_H_8X65R2EI */ diff --git a/src/uscxml/concurrency/BlockingQueue.h b/src/uscxml/concurrency/BlockingQueue.h deleted file mode 100644 index e53de25..0000000 --- a/src/uscxml/concurrency/BlockingQueue.h +++ /dev/null @@ -1,79 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef BLOCKINGQUEUE_H_4LEVMY0N -#define BLOCKINGQUEUE_H_4LEVMY0N - -#include "uscxml/Common.h" -#include "uscxml/concurrency/tinythread.h" -#include - -namespace uscxml { -namespace concurrency { - -template -class BlockingQueue { -public: - BlockingQueue() {} - virtual ~BlockingQueue() { - } - - virtual void push(const T& elem) { - tthread::lock_guard lock(_mutex); - _queue.push_back(elem); - _cond.notify_all(); - } - - virtual void push_front(const T& elem) { - tthread::lock_guard lock(_mutex); - _queue.push_front(elem); - _cond.notify_all(); - } - - virtual T pop() { - tthread::lock_guard lock(_mutex); -// std::cout << "Popping from " << this << std::endl; - while (_queue.empty()) { - _cond.wait(_mutex); - } - T ret = _queue.front(); - _queue.pop_front(); - return ret; - } - - virtual void clear() { - tthread::lock_guard lock(_mutex); - _queue.clear(); - } - - virtual bool isEmpty() { - tthread::lock_guard lock(_mutex); - return _queue.empty(); - } - -protected: - tthread::mutex _mutex; - tthread::condition_variable _cond; - std::list _queue; -}; - -} -} - -#endif /* end of include guard: BLOCKINGQUEUE_H_4LEVMY0N */ diff --git a/src/uscxml/concurrency/DelayedEventQueue.cpp b/src/uscxml/concurrency/DelayedEventQueue.cpp deleted file mode 100644 index 897e99d..0000000 --- a/src/uscxml/concurrency/DelayedEventQueue.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "DelayedEventQueue.h" -#include "uscxml/messages/Event.h" - -#include - -#include -#include "event2/thread.h" - -namespace uscxml { - -DelayedEventQueue::DelayedEventQueue() { -#ifndef _WIN32 - evthread_use_pthreads(); -#else - evthread_use_windows_threads(); -#endif - _eventLoop = event_base_new(); - _thread = NULL; - _isStarted = false; -} - -DelayedEventQueue::~DelayedEventQueue() { -// std::cout << "Deleting DelayedEventQueue" << std::endl; - stop(); - if (_thread && _isStarted) - _thread->join(); - if(_eventLoop) - event_base_free(_eventLoop); -} - -void DelayedEventQueue::run(void* instance) { - DelayedEventQueue* INSTANCE = (DelayedEventQueue*)instance; - int result; - while(INSTANCE->_isStarted) { -// #ifndef EVLOOP_NO_EXIT_ON_EMPTY -// result = event_base_dispatch(INSTANCE->_eventLoop); -// #else - result = event_base_loop(INSTANCE->_eventLoop, EVLOOP_NO_EXIT_ON_EMPTY); -//#endif - (void)result; - } -} - -void DelayedEventQueue::addEvent(std::string eventId, int fd, short opMask, void (*callback)(void*, const std::string eventId), void* userData, bool persist) { - if(_callbackData.find(eventId) != _callbackData.end()) { - cancelEvent(eventId); - } - - if (persist) - opMask |= EV_PERSIST; - - struct event* event = event_new(_eventLoop, fd, opMask, DelayedEventQueue::fileCallback, &_callbackData[eventId]); - - _callbackData[eventId].eventId = eventId; - _callbackData[eventId].userData = userData; - _callbackData[eventId].eventQueue = this; - _callbackData[eventId].callback = callback; - _callbackData[eventId].event = event; - _callbackData[eventId].persist = false; - - event_add(event, NULL); - -} - -void DelayedEventQueue::addEvent(std::string eventId, void (*callback)(void*, const std::string eventId), uint32_t delayMs, void* userData, bool persist) { - if(_callbackData.find(eventId) != _callbackData.end()) { - cancelEvent(eventId); - } - - struct timeval delay = {delayMs / 1000, (delayMs % 1000) * 1000}; - struct event* event = event_new(_eventLoop, -1, (persist ? EV_PERSIST : 0), DelayedEventQueue::timerCallback, &_callbackData[eventId]); - - _callbackData[eventId].eventId = eventId; - _callbackData[eventId].userData = userData; - _callbackData[eventId].eventQueue = this; - _callbackData[eventId].callback = callback; - _callbackData[eventId].event = event; - _callbackData[eventId].persist = persist; - - event_add(event, &delay); -} - -void DelayedEventQueue::cancelAllEvents() { - tthread::lock_guard lock(_mutex); - while(_callbackData.size() > 0) { - event_del(_callbackData[_callbackData.begin()->first].event); - event_free(_callbackData[_callbackData.begin()->first].event); - _callbackData.erase(_callbackData.begin()); - } -} - -void DelayedEventQueue::cancelEvent(std::string eventId) { - tthread::lock_guard lock(_mutex); - - if(_callbackData.find(eventId) != _callbackData.end()) { - event_del(_callbackData[eventId].event); - event_free(_callbackData[eventId].event); - _callbackData.erase(eventId); - } -} - -void DelayedEventQueue::start() { - _isStarted = true; - _thread = new tthread::thread(DelayedEventQueue::run, this); -} - -void DelayedEventQueue::stop() { - if (_isStarted) { - _isStarted = false; - event_base_loopbreak(_eventLoop); - } - if (_thread) { - _thread->join(); - delete _thread; - _thread = NULL; - } -} - -void DelayedEventQueue::dummyCallback(evutil_socket_t fd, short what, void *arg) { -} - -void DelayedEventQueue::fileCallback(evutil_socket_t fd, short what, void *arg) { - struct callbackData *data = (struct callbackData*)arg; - tthread::lock_guard lock(data->eventQueue->_mutex); - std::string eventId = data->eventId; // copy eventId - data->callback(data->userData, eventId); -} - -void DelayedEventQueue::timerCallback(evutil_socket_t fd, short what, void *arg) { - struct callbackData *data = (struct callbackData*)arg; - tthread::lock_guard lock(data->eventQueue->_mutex); - - std::string eventId = data->eventId; // copy eventId - try { - data->callback(data->userData, eventId); - } catch (Event e) { - LOG(ERROR) << "Exception thrown when executing delayed event:" << std::endl << e << std::endl; - } catch (...) { - LOG(ERROR) << "Exception thrown when executing delayed event" << std::endl; - } - if (!data->persist) { - event_free(data->event); - data->eventQueue->_callbackData.erase(data->eventId); - } -} - -} \ No newline at end of file diff --git a/src/uscxml/concurrency/DelayedEventQueue.h b/src/uscxml/concurrency/DelayedEventQueue.h deleted file mode 100644 index 7c2789f..0000000 --- a/src/uscxml/concurrency/DelayedEventQueue.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef DELAYEDEVENTQUEUE_H_JA6WRBVP -#define DELAYEDEVENTQUEUE_H_JA6WRBVP - -#include "uscxml/concurrency/tinythread.h" - - -#include "uscxml/Common.h" -#include "event2/util.h" // for evutil_socket_t -#include - -#include - -#include -#include - -namespace uscxml { - -class USCXML_API DelayedEventQueue { -public: - - enum OpMask { - DEQ_READ = EV_READ, - DEQ_WRITE = EV_WRITE, - DEQ_SIGNAL = EV_SIGNAL - }; - - struct callbackData { - void *userData; - void (*callback)(void*, const std::string eventId); - std::string eventId; - bool persist; - struct event *event; - DelayedEventQueue* eventQueue; - }; - - DelayedEventQueue(); - virtual ~DelayedEventQueue(); - - void addEvent(std::string eventId, int fd, short opMask, void (*callback)(void*, const std::string eventId), void* userData, bool persist = true); - void addEvent(std::string eventId, void (*callback)(void*, const std::string eventId), uint32_t delayMs, void* userData, bool persist = false); - void cancelEvent(std::string eventId); - void cancelAllEvents(); - - void start(); - void stop(); - static void run(void*); - - bool isEmpty() { - return _callbackData.empty(); - } - - static void timerCallback(evutil_socket_t fd, short what, void *arg); - static void fileCallback(evutil_socket_t fd, short what, void *arg); - static void dummyCallback(evutil_socket_t fd, short what, void *arg); - - bool _isStarted; - tthread::thread* _thread; - tthread::recursive_mutex _mutex; - - std::map _callbackData; - struct event_base* _eventLoop; -}; - -} - - -#endif /* end of include guard: DELAYEDEVENTQUEUE_H_JA6WRBVP */ diff --git a/src/uscxml/concurrency/EventBase.cpp b/src/uscxml/concurrency/EventBase.cpp deleted file mode 100644 index ec25181..0000000 --- a/src/uscxml/concurrency/EventBase.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "EventBase.h" - -namespace uscxml { - -std::map > EventBase::_eventBases; -tthread::recursive_mutex EventBase::_instanceMutex; - -boost::shared_ptr EventBase::get(const std::string& name) { - tthread::lock_guard lock(_instanceMutex); - - std::map >::iterator instIter = _eventBases.begin(); - while(instIter != _eventBases.end()) { - if (!instIter->second.lock()) { - _eventBases.erase(instIter++); - } else { - instIter++; - } - } - - instIter = _eventBases.find(name); - boost::shared_ptr instance = instIter->second.lock(); - if (instance) - return instance; - - instance = boost::shared_ptr(new EventBase()); - _eventBases.insert(std::make_pair(name, instance)); - - return instance; -} - -EventBase::EventBase() { - base = event_base_new(); - _isStarted = true; - _thread = new tthread::thread(EventBase::run, this); -} - -void EventBase::run(void* arg) { - EventBase* INSTANCE = (EventBase*)arg; - int result; - - while(INSTANCE->_isStarted) { - result = event_base_loop(INSTANCE->base, EVLOOP_NO_EXIT_ON_EMPTY); - (void)result; - } -} - -EventBase::~EventBase() { - _isStarted = false; - event_base_loopbreak(base); - _thread->join(); - event_base_free(base); - delete _thread; -} - -} \ No newline at end of file diff --git a/src/uscxml/concurrency/EventBase.h b/src/uscxml/concurrency/EventBase.h deleted file mode 100644 index 22bd664..0000000 --- a/src/uscxml/concurrency/EventBase.h +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef EVENTBASE_H_C479DA74 -#define EVENTBASE_H_C479DA74 - -#include "uscxml/Common.h" -#include "uscxml/concurrency/tinythread.h" - -extern "C" { -#include -#include -#include -} - -#include -#include -#include -#include - -namespace uscxml { - -class USCXML_API EventBase { -public: - EventBase(); - virtual ~EventBase(); - - static boost::shared_ptr get(const std::string& name); - struct event_base* base; - -protected: - - static void run(void*); - - tthread::thread* _thread; - bool _isStarted; - - static std::map > _eventBases; - static tthread::recursive_mutex _instanceMutex; - -}; - -} - -#endif /* end of include guard: EVENTBASE_H_C479DA74 */ diff --git a/src/uscxml/concurrency/Timer.cpp b/src/uscxml/concurrency/Timer.cpp deleted file mode 100644 index 77b712f..0000000 --- a/src/uscxml/concurrency/Timer.cpp +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2013 Alex Reece. -// -// A cross platform monotonic timer. - -// see https://github.com/awreece/monotonic_timer - -#include "uscxml/config.h" -#ifdef HAS_UNISTD_H -#include -#endif -#include "Timer.h" - -#define NANOS_PER_SECF 1000000000.0 -#define USECS_PER_SEC 1000000 - -#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK) -// If we have it, use clock_gettime and CLOCK_MONOTONIC. - -#include - -double uscxml::Timer::monotonic_seconds() { - struct timespec time; - // Note: Make sure to link with -lrt to define clock_gettime. - clock_gettime(CLOCK_MONOTONIC, &time); - return ((double) time.tv_sec) + ((double) time.tv_nsec / (NANOS_PER_SECF)); -} - -#elif defined(__APPLE__) -// If we don't have CLOCK_MONOTONIC, we might be on a Mac. There we instead -// use mach_absolute_time(). - -#include - -static mach_timebase_info_data_t info; -static void __attribute__((constructor)) init_info() { - mach_timebase_info(&info); -} - -double uscxml::Timer::monotonic_seconds() { - uint64_t time = mach_absolute_time(); - double dtime = (double) time; - dtime *= (double) info.numer; - dtime /= (double) info.denom; - return dtime / NANOS_PER_SECF; -} - -#elif defined(_MSC_VER) -// On Windows, use QueryPerformanceCounter and QueryPerformanceFrequency. - -#define NOMINMAX -#include - -static double PCFreq = 0.0; -__int64 CounterStart = 0; - -double uscxml::Timer::monotonic_seconds() { - if (CounterStart == 0) { - // Accoring to http://stackoverflow.com/a/1739265/447288, this will - // properly initialize the QueryPerformanceCounter. - - LARGE_INTEGER li; - int has_qpc = QueryPerformanceFrequency(&li); - - PCFreq = ((double) li.QuadPart) / 1000.0; - } - LARGE_INTEGER li; - QueryPerformanceCounter(&li); - return double(li.QuadPart - CounterStart)/PCFreq; -} - -#else -// Fall back to rdtsc. The reason we don't use clock() is this scary message -// from the man page: -// "On several other implementations, the value returned by clock() also -// includes the times of any children whose status has been collected via -// wait(2) (or another wait-type call)." -// -// Also, clock() only has microsecond accuracy. -// -// This whitepaper offered excellent advice on how to use rdtscp for -// profiling: http://download.intel.com/embedded/software/IA/324264.pdf -// -// Unfortunately, we can't follow its advice exactly with our semantics, -// so we're just going to use rdtscp with cpuid. -// -// Note that rdtscp will only be available on new processors. - -#include - -static inline uint64_t rdtsc() { - uint32_t hi, lo; - asm volatile("rdtscp\n" - "movl %%edx, %0\n" - "movl %%eax, %1\n" - "cpuid" - : "=r" (hi), "=r" (lo) : : "%rax", "%rbx", "%rcx", "%rdx"); - return (((uint64_t)hi) << 32) | (uint64_t)lo; -} - -static uint64_t rdtsc_per_sec = 0; -static void __attribute__((constructor)) init_rdtsc_per_sec() { - uint64_t before, after; - - before = rdtsc(); - usleep(USECS_PER_SEC); - after = rdtsc(); - - rdtsc_per_sec = after - before; -} - -double uscxml::Timer::monotonic_seconds() { - return (double) rdtsc() / (double) rdtsc_per_sec; -} - -#endif diff --git a/src/uscxml/concurrency/Timer.h b/src/uscxml/concurrency/Timer.h deleted file mode 100644 index 1ecfeb2..0000000 --- a/src/uscxml/concurrency/Timer.h +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2013 Alex Reece. -// -// A cross platform monotonic timer. - -// see https://github.com/awreece/monotonic_timer - -#ifndef MONOTONIC_TIMER_H_ -#define MONOTONIC_TIMER_H_ - -#include "uscxml/Common.h" - -// Returns seconds since some unspecified start time (guaranteed to be -// monotonicly increasing). - -// Copyright 2015 Stefan Radomski. - -namespace uscxml { - -class USCXML_API Timer { -public: - - static double monotonic_seconds(); - - Timer() { - invocations = 0; - elapsed = 0; - } - - void start() { - if (invocations == 0) { - started = monotonic_seconds(); - } - invocations++; - } - - void reset() { - elapsed = 0; - } - - void stop() { - if (invocations == 0) - return; - - invocations--; - if (invocations == 0) { - elapsed += monotonic_seconds() - started; - } - } - - ~Timer() { - } - double elapsed; - -protected: - size_t invocations; - double started; -}; - -class USCXML_API Measurement { -public: - Measurement(Timer* timer) : timer(timer) { - timer->start(); - } - - ~Measurement() { - timer->stop(); - } - -protected: - Timer* timer; -}; - -} -#endif // MONOTONIC_TIMER_H_ diff --git a/src/uscxml/concurrency/tinythread.cpp b/src/uscxml/concurrency/tinythread.cpp deleted file mode 100644 index d46cda3..0000000 --- a/src/uscxml/concurrency/tinythread.cpp +++ /dev/null @@ -1,335 +0,0 @@ -/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- -Copyright (c) 2010-2012 Marcus Geelnard - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. This version was altered! - - 3. This notice may not be removed or altered from any source - distribution. -*/ - -#include -#include "tinythread.h" - -#if defined(_TTHREAD_POSIX_) -#include -#include -#elif defined(_TTHREAD_WIN32_) -#include -#endif - -namespace tthread { - -unsigned long long int timeStamp() { - unsigned long long int time = 0; -#ifdef WIN32 - FILETIME tv; - GetSystemTimeAsFileTime(&tv); - time = (((unsigned long long int) tv.dwHighDateTime) << 32) + tv.dwLowDateTime; - time /= 10000; -#else - struct timeval tv; - gettimeofday(&tv, NULL); - time += tv.tv_sec * 1000; - time += tv.tv_usec / 1000; -#endif - return time; -} - -//------------------------------------------------------------------------------ -// condition_variable -//------------------------------------------------------------------------------ -// NOTE 1: The Win32 implementation of the condition_variable class is based on -// the corresponding implementation in GLFW, which in turn is based on a -// description by Douglas C. Schmidt and Irfan Pyarali: -// http://www.cs.wustl.edu/~schmidt/win32-cv-1.html -// -// NOTE 2: Windows Vista actually has native support for condition variables -// (InitializeConditionVariable, WakeConditionVariable, etc), but we want to -// be portable with pre-Vista Windows versions, so TinyThread++ does not use -// Vista condition variables. -//------------------------------------------------------------------------------ - -#if defined(_TTHREAD_WIN32_) -#define _CONDITION_EVENT_ONE 0 -#define _CONDITION_EVENT_ALL 1 -#endif - -#if defined(_TTHREAD_WIN32_) -condition_variable::condition_variable() : mWaitersCount(0) { - mEvents[_CONDITION_EVENT_ONE] = CreateEvent(NULL, FALSE, FALSE, NULL); - mEvents[_CONDITION_EVENT_ALL] = CreateEvent(NULL, TRUE, FALSE, NULL); - InitializeCriticalSection(&mWaitersCountLock); -} -#endif - -#if defined(_TTHREAD_WIN32_) -condition_variable::~condition_variable() { - CloseHandle(mEvents[_CONDITION_EVENT_ONE]); - CloseHandle(mEvents[_CONDITION_EVENT_ALL]); - DeleteCriticalSection(&mWaitersCountLock); -} -#endif - -#if defined(_TTHREAD_WIN32_) -void condition_variable::_wait(unsigned int ms) { - if (ms <= 0) - ms = INFINITE; - // Wait for either event to become signaled due to notify_one() or - // notify_all() being called - int result = WaitForMultipleObjects(2, mEvents, FALSE, ms); - if (result == WAIT_FAILED) { - LPVOID lpMsgBuf; - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - (LPTSTR) &lpMsgBuf, - 0, - NULL); -// UM_LOG_ERR("%s", lpMsgBuf); - LocalFree(lpMsgBuf); - - } - - // Check if we are the last waiter - EnterCriticalSection(&mWaitersCountLock); - -- mWaitersCount; - bool lastWaiter = (result == (WAIT_OBJECT_0 + _CONDITION_EVENT_ALL)) && - (mWaitersCount == 0); - LeaveCriticalSection(&mWaitersCountLock); - - // If we are the last waiter to be notified to stop waiting, reset the event - if(lastWaiter) - ResetEvent(mEvents[_CONDITION_EVENT_ALL]); -} -#endif - -#if defined(_TTHREAD_WIN32_) -void condition_variable::notify_one() { - // Are there any waiters? - EnterCriticalSection(&mWaitersCountLock); - bool haveWaiters = (mWaitersCount > 0); - LeaveCriticalSection(&mWaitersCountLock); - - // If we have any waiting threads, send them a signal - if(haveWaiters) - SetEvent(mEvents[_CONDITION_EVENT_ONE]); -} -#endif - -#if defined(_TTHREAD_WIN32_) -void condition_variable::notify_all() { - // Are there any waiters? - EnterCriticalSection(&mWaitersCountLock); - bool haveWaiters = (mWaitersCount > 0); - LeaveCriticalSection(&mWaitersCountLock); - - // If we have any waiting threads, send them a signal - if(haveWaiters) - SetEvent(mEvents[_CONDITION_EVENT_ALL]); -} -#endif - - -//------------------------------------------------------------------------------ -// POSIX pthread_t to unique thread::id mapping logic. -// Note: Here we use a global thread safe std::map to convert instances of -// pthread_t to small thread identifier numbers (unique within one process). -// This method should be portable across different POSIX implementations. -//------------------------------------------------------------------------------ - -#if defined(_TTHREAD_POSIX_) -static thread::id _pthread_t_to_ID(const pthread_t &aHandle) { - static mutex idMapLock; - static std::map idMap; - static unsigned long int idCount(1); - - lock_guard guard(idMapLock); - if(idMap.find(aHandle) == idMap.end()) - idMap[aHandle] = idCount ++; - return thread::id(idMap[aHandle]); -} -#endif // _TTHREAD_POSIX_ - - -//------------------------------------------------------------------------------ -// thread -//------------------------------------------------------------------------------ - -/// Information to pass to the new thread (what to run). -struct _thread_start_info { - void (*mFunction)(void *); ///< Pointer to the function to be executed. - void * mArg; ///< Function argument for the thread function. - thread * mThread; ///< Pointer to the thread object. -}; - -// Thread wrapper function. -#if defined(_TTHREAD_WIN32_) -unsigned WINAPI thread::wrapper_function(void * aArg) -#elif defined(_TTHREAD_POSIX_) -void * thread::wrapper_function(void * aArg) -#endif -{ - // Get thread startup information - _thread_start_info * ti = (_thread_start_info *) aArg; - - try { - // Call the actual client thread function - ti->mFunction(ti->mArg); - } catch(...) { - // Uncaught exceptions will terminate the application (default behavior - // according to C++11) - std::terminate(); - } - - // The thread is no longer executing - lock_guard guard(ti->mThread->mDataMutex); - ti->mThread->mNotAThread = true; - - // The thread is responsible for freeing the startup information - delete ti; - - return 0; -} - -thread::thread(void (*aFunction)(void *), void * aArg) { - // Serialize access to this thread structure - lock_guard guard(mDataMutex); - - // Fill out the thread startup information (passed to the thread wrapper, - // which will eventually free it) - _thread_start_info * ti = new _thread_start_info; - ti->mFunction = aFunction; - ti->mArg = aArg; - ti->mThread = this; - - // The thread is now alive - mNotAThread = false; - - // Create the thread -#if defined(_TTHREAD_WIN32_) - mHandle = (HANDLE) _beginthreadex(0, 0, wrapper_function, (void *) ti, 0, &mWin32ThreadID); -#elif defined(_TTHREAD_POSIX_) - if(pthread_create(&mHandle, NULL, wrapper_function, (void *) ti) != 0) - mHandle = 0; -#endif - - // Did we fail to create the thread? - if(!mHandle) { - mNotAThread = true; - delete ti; - } -} - -thread::~thread() { - if(joinable()) - std::terminate(); -} - -void thread::join() { - if(joinable()) { -#if defined(_TTHREAD_WIN32_) - WaitForSingleObject(mHandle, INFINITE); - CloseHandle(mHandle); -#elif defined(_TTHREAD_POSIX_) - pthread_join(mHandle, NULL); -#endif - } -} - -bool thread::joinable() const { - mDataMutex.lock(); - bool result = !mNotAThread; - mDataMutex.unlock(); - return result; -} - -void thread::detach() { - mDataMutex.lock(); - if(!mNotAThread) { -#if defined(_TTHREAD_WIN32_) - CloseHandle(mHandle); -#elif defined(_TTHREAD_POSIX_) - pthread_detach(mHandle); -#endif - mNotAThread = true; - } - mDataMutex.unlock(); -} - -thread::id thread::get_id() const { - if(!joinable()) - return id(); -#if defined(_TTHREAD_WIN32_) - return id((unsigned long int) mWin32ThreadID); -#elif defined(_TTHREAD_POSIX_) - return _pthread_t_to_ID(mHandle); -#endif -} - -unsigned thread::hardware_concurrency() { -#if defined(_TTHREAD_WIN32_) - SYSTEM_INFO si; - GetSystemInfo(&si); - return (int) si.dwNumberOfProcessors; -#elif defined(_SC_NPROCESSORS_ONLN) - return (int) sysconf(_SC_NPROCESSORS_ONLN); -#elif defined(_SC_NPROC_ONLN) - return (int) sysconf(_SC_NPROC_ONLN); -#else - // The standard requires this function to return zero if the number of - // hardware cores could not be determined. - return 0; -#endif -} - - -//------------------------------------------------------------------------------ -// this_thread -//------------------------------------------------------------------------------ - -thread::id this_thread::get_id() { -#if defined(_TTHREAD_WIN32_) - return thread::id((unsigned long int) GetCurrentThreadId()); -#elif defined(_TTHREAD_POSIX_) - return _pthread_t_to_ID(pthread_self()); -#endif -} - -namespace chrono { -namespace system_clock { -uint64_t now() { - uint64_t time = 0; -#ifdef _WIN32 - FILETIME tv; - GetSystemTimeAsFileTime(&tv); - time = (((uint64_t) tv.dwHighDateTime) << 32) + tv.dwLowDateTime; - time /= 10000; -#else - struct timeval tv; - gettimeofday(&tv, NULL); - time += tv.tv_sec * 1000; - time += tv.tv_usec / 1000; -#endif - return time; -} -} -} - -} diff --git a/src/uscxml/concurrency/tinythread.h b/src/uscxml/concurrency/tinythread.h deleted file mode 100644 index e5e5e25..0000000 --- a/src/uscxml/concurrency/tinythread.h +++ /dev/null @@ -1,726 +0,0 @@ -/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- -Copyright (c) 2010-2012 Marcus Geelnard - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. This version was altered! - - 3. This notice may not be removed or altered from any source - distribution. -*/ - -#ifndef _TINYTHREAD_H_ -#define _TINYTHREAD_H_ - -#include "uscxml/Common.h" -//#include - -/// @file -/// @mainpage TinyThread++ API Reference -/// -/// @section intro_sec Introduction -/// TinyThread++ is a minimal, portable implementation of basic threading -/// classes for C++. -/// -/// They closely mimic the functionality and naming of the C++11 standard, and -/// should be easily replaceable with the corresponding std:: variants. -/// -/// @section port_sec Portability -/// The Win32 variant uses the native Win32 API for implementing the thread -/// classes, while for other systems, the POSIX threads API (pthread) is used. -/// -/// @section class_sec Classes -/// In order to mimic the threading API of the C++11 standard, subsets of -/// several classes are provided. The fundamental classes are: -/// @li tthread::thread -/// @li tthread::mutex -/// @li tthread::recursive_mutex -/// @li tthread::condition_variable -/// @li tthread::lock_guard -/// @li tthread::fast_mutex -/// -/// @section misc_sec Miscellaneous -/// The following special keywords are available: #thread_local. -/// -/// For more detailed information (including additional classes), browse the -/// different sections of this documentation. A good place to start is: -/// tinythread.h. - -// Which platform are we on? -#if !defined(_TTHREAD_PLATFORM_DEFINED_) -#if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__) -#define _TTHREAD_WIN32_ -#include -#else -#define _TTHREAD_POSIX_ -#endif -#define _TTHREAD_PLATFORM_DEFINED_ -#endif - -// Platform specific includes -#if defined(_TTHREAD_WIN32_) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#define __UNDEF_LEAN_AND_MEAN -#endif -#include -#ifdef __UNDEF_LEAN_AND_MEAN -#undef WIN32_LEAN_AND_MEAN -#undef __UNDEF_LEAN_AND_MEAN -#endif -#else -#include -#include -#include -#include -#include -#include -#endif - -// Generic includes -#include - -/// TinyThread++ version (major number). -#define TINYTHREAD_VERSION_MAJOR 1 -/// TinyThread++ version (minor number). -#define TINYTHREAD_VERSION_MINOR 1 -/// TinyThread++ version (full version). -#define TINYTHREAD_VERSION (TINYTHREAD_VERSION_MAJOR * 100 + TINYTHREAD_VERSION_MINOR) - -// Do we have a fully featured C++11 compiler? -#if (__cplusplus > 199711L) || (defined(__STDCXX_VERSION__) && (__STDCXX_VERSION__ >= 201001L)) -#define _TTHREAD_CPP11_ -#endif - -// ...at least partial C++11? -#if defined(_TTHREAD_CPP11_) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__) -#define _TTHREAD_CPP11_PARTIAL_ -#endif - -// Macro for disabling assignments of objects. -#ifdef _TTHREAD_CPP11_PARTIAL_ -#define _TTHREAD_DISABLE_ASSIGNMENT(name) \ - name(const name&) = delete; \ - name& operator=(const name&) = delete; -#else -#define _TTHREAD_DISABLE_ASSIGNMENT(name) \ - name(const name&); \ - name& operator=(const name&); -#endif - -/// @def thread_local -/// Thread local storage keyword. -/// A variable that is declared with the @c thread_local keyword makes the -/// value of the variable local to each thread (known as thread-local storage, -/// or TLS). Example usage: -/// @code -/// // This variable is local to each thread. -/// thread_local int variable; -/// @endcode -/// @note The @c thread_local keyword is a macro that maps to the corresponding -/// compiler directive (e.g. @c __declspec(thread)). While the C++11 standard -/// allows for non-trivial types (e.g. classes with constructors and -/// destructors) to be declared with the @c thread_local keyword, most pre-C++11 -/// compilers only allow for trivial types (e.g. @c int). So, to guarantee -/// portable code, only use trivial types for thread local storage. -/// @note This directive is currently not supported on Mac OS X (it will give -/// a compiler error), since compile-time TLS is not supported in the Mac OS X -/// executable format. Also, some older versions of MinGW (before GCC 4.x) do -/// not support this directive. -/// @hideinitializer - -#if !defined(_TTHREAD_CPP11_) && !defined(thread_local) -#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_CC) || defined(__IBMCPP__) -#define thread_local __thread -#else -#define thread_local __declspec(thread) -#endif -#endif - - -/// Main name space for TinyThread++. -/// This namespace is more or less equivalent to the @c std namespace for the -/// C++11 thread classes. For instance, the tthread::mutex class corresponds to -/// the std::mutex class. -namespace tthread { - -unsigned long long int timeStamp(); - -/// Mutex class. -/// This is a mutual exclusion object for synchronizing access to shared -/// memory areas for several threads. The mutex is non-recursive (i.e. a -/// program may deadlock if the thread that owns a mutex object calls lock() -/// on that object). -/// @see recursive_mutex - -class USCXML_API mutex { -public: - /// Constructor. - mutex() -#if defined(_TTHREAD_WIN32_) - : mAlreadyLocked(false) -#endif - { -#if defined(_TTHREAD_WIN32_) - InitializeCriticalSection(&mHandle); -#else - pthread_mutex_init(&mHandle, NULL); -#endif - } - - /// Destructor. - ~mutex() { -#if defined(_TTHREAD_WIN32_) - DeleteCriticalSection(&mHandle); -#else - pthread_mutex_destroy(&mHandle); -#endif - } - - /// Lock the mutex. - /// The method will block the calling thread until a lock on the mutex can - /// be obtained. The mutex remains locked until @c unlock() is called. - /// @see lock_guard - inline void lock() { -#if defined(_TTHREAD_WIN32_) - EnterCriticalSection(&mHandle); - while(mAlreadyLocked) Sleep(1000); // Simulate deadlock... - mAlreadyLocked = true; -#else - pthread_mutex_lock(&mHandle); -#endif - } - - /// Try to lock the mutex. - /// The method will try to lock the mutex. If it fails, the function will - /// return immediately (non-blocking). - /// @return @c true if the lock was acquired, or @c false if the lock could - /// not be acquired. - inline bool try_lock() { -#if defined(_TTHREAD_WIN32_) - bool ret = (TryEnterCriticalSection(&mHandle) ? true : false); - if(ret && mAlreadyLocked) { - LeaveCriticalSection(&mHandle); - ret = false; - } - return ret; -#else - return (pthread_mutex_trylock(&mHandle) == 0) ? true : false; -#endif - } - - /// Unlock the mutex. - /// If any threads are waiting for the lock on this mutex, one of them will - /// be unblocked. - inline void unlock() { -#if defined(_TTHREAD_WIN32_) - mAlreadyLocked = false; - LeaveCriticalSection(&mHandle); -#else - pthread_mutex_unlock(&mHandle); -#endif - } - - //_TTHREAD_DISABLE_ASSIGNMENT(mutex) - -private: -#if defined(_TTHREAD_WIN32_) - CRITICAL_SECTION mHandle; - bool mAlreadyLocked; -#else - pthread_mutex_t mHandle; -#endif - - friend class condition_variable; -}; - -/// Recursive mutex class. -/// This is a mutual exclusion object for synchronizing access to shared -/// memory areas for several threads. The mutex is recursive (i.e. a thread -/// may lock the mutex several times, as long as it unlocks the mutex the same -/// number of times). -/// @see mutex -class USCXML_API recursive_mutex { -public: - /// Constructor. - recursive_mutex() { -#if defined(_TTHREAD_WIN32_) - InitializeCriticalSection(&mHandle); -#else - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&mHandle, &attr); -#endif - } - - /// Destructor. - ~recursive_mutex() { -#if defined(_TTHREAD_WIN32_) - DeleteCriticalSection(&mHandle); -#else - pthread_mutex_destroy(&mHandle); -#endif - } - - /// Lock the mutex. - /// The method will block the calling thread until a lock on the mutex can - /// be obtained. The mutex remains locked until @c unlock() is called. - /// @see lock_guard - inline void lock() { -#if defined(_TTHREAD_WIN32_) - EnterCriticalSection(&mHandle); -#else - pthread_mutex_lock(&mHandle); -#endif - } - - /// Try to lock the mutex. - /// The method will try to lock the mutex. If it fails, the function will - /// return immediately (non-blocking). - /// @return @c true if the lock was acquired, or @c false if the lock could - /// not be acquired. - inline bool try_lock() { -#if defined(_TTHREAD_WIN32_) - return TryEnterCriticalSection(&mHandle) ? true : false; -#else - return (pthread_mutex_trylock(&mHandle) == 0) ? true : false; -#endif - } - - /// Unlock the mutex. - /// If any threads are waiting for the lock on this mutex, one of them will - /// be unblocked. - inline void unlock() { -#if defined(_TTHREAD_WIN32_) - LeaveCriticalSection(&mHandle); -#else - pthread_mutex_unlock(&mHandle); -#endif - } - - //_TTHREAD_DISABLE_ASSIGNMENT(recursive_mutex) - -private: -#if defined(_TTHREAD_WIN32_) - CRITICAL_SECTION mHandle; -#else - pthread_mutex_t mHandle; -#endif - - friend class condition_variable; -}; - -/// Lock guard class. -/// The constructor locks the mutex, and the destructor unlocks the mutex, so -/// the mutex will automatically be unlocked when the lock guard goes out of -/// scope. Example usage: -/// @code -/// mutex m; -/// int counter; -/// -/// void increment() -/// { -/// lock_guard guard(m); -/// ++ counter; -/// } -/// @endcode - -template -class USCXML_API lock_guard { -public: - typedef T mutex_type; - - lock_guard() : mMutex(0) {} - - /// The constructor locks the mutex. - explicit lock_guard(mutex_type &aMutex) { - mMutex = &aMutex; - mMutex->lock(); - } - - /// The destructor unlocks the mutex. - ~lock_guard() { - if(mMutex) - mMutex->unlock(); - } - -private: - mutex_type * mMutex; -}; - -/// Condition variable class. -/// This is a signalling object for synchronizing the execution flow for -/// several threads. Example usage: -/// @code -/// // Shared data and associated mutex and condition variable objects -/// int count; -/// mutex m; -/// condition_variable cond; -/// -/// // Wait for the counter to reach a certain number -/// void wait_counter(int targetCount) -/// { -/// lock_guard guard(m); -/// while(count < targetCount) -/// cond.wait(m); -/// } -/// -/// // Increment the counter, and notify waiting threads -/// void increment() -/// { -/// lock_guard guard(m); -/// ++ count; -/// cond.notify_all(); -/// } -/// @endcode -class USCXML_API condition_variable { -public: - /// Constructor. -#if defined(_TTHREAD_WIN32_) - condition_variable(); -#else - condition_variable() { - pthread_cond_init(&mHandle, NULL); - } -#endif - - /// Destructor. -#if defined(_TTHREAD_WIN32_) - ~condition_variable(); -#else - ~condition_variable() { - pthread_cond_destroy(&mHandle); - } -#endif - - /// Wait for the condition. - /// The function will block the calling thread until the condition variable - /// is woken by @c notify_one(), @c notify_all() or a spurious wake up. - /// @param[in] aMutex A mutex that will be unlocked when the wait operation - /// starts, an locked again as soon as the wait operation is finished. - template - inline void wait(_mutexT &aMutex) { -#if defined(_TTHREAD_WIN32_) - // Increment number of waiters - EnterCriticalSection(&mWaitersCountLock); - ++ mWaitersCount; - LeaveCriticalSection(&mWaitersCountLock); - - // Release the mutex while waiting for the condition (will decrease - // the number of waiters when done)... - aMutex.unlock(); - _wait(0); - aMutex.lock(); -#else - pthread_cond_wait(&mHandle, &aMutex.mHandle); -#endif - } - - template - inline void wait_for(_mutexT &aMutex, unsigned int ms) { -#if defined(_TTHREAD_WIN32_) - // Increment number of waiters - EnterCriticalSection(&mWaitersCountLock); - ++ mWaitersCount; - LeaveCriticalSection(&mWaitersCountLock); - - // Release the mutex while waiting for the condition (will decrease - // the number of waiters when done)... - aMutex.unlock(); - _wait(ms); - aMutex.lock(); -#else - struct timeval tv; - gettimeofday(&tv, NULL); - - struct timespec ts; - ts.tv_sec = tv.tv_sec + (ms / 1000); - ts.tv_nsec = (tv.tv_usec * 1000); // convert tv microseconds to nanoseconds - ts.tv_nsec += (ms % 1000) * 1000000; // add millisecond part of wait time - pthread_cond_timedwait(&mHandle, &aMutex.mHandle, &ts); -#endif - } - - /// Notify one thread that is waiting for the condition. - /// If at least one thread is blocked waiting for this condition variable, - /// one will be woken up. - /// @note Only threads that started waiting prior to this call will be - /// woken up. -#if defined(_TTHREAD_WIN32_) - void notify_one(); -#else - inline void notify_one() { - pthread_cond_signal(&mHandle); - } -#endif - - /// Notify all threads that are waiting for the condition. - /// All threads that are blocked waiting for this condition variable will - /// be woken up. - /// @note Only threads that started waiting prior to this call will be - /// woken up. -#if defined(_TTHREAD_WIN32_) - void notify_all(); -#else - inline void notify_all() { - pthread_cond_broadcast(&mHandle); - } -#endif - - //_TTHREAD_DISABLE_ASSIGNMENT(condition_variable) - -private: -#if defined(_TTHREAD_WIN32_) - void _wait(unsigned int ms); - HANDLE mEvents[2]; ///< Signal and broadcast event HANDLEs. - unsigned int mWaitersCount; ///< Count of the number of waiters. - CRITICAL_SECTION mWaitersCountLock; ///< Serialize access to mWaitersCount. -#else - pthread_cond_t mHandle; -#endif -}; - - -/// Thread class. -class USCXML_API thread { -public: -#if defined(_TTHREAD_WIN32_) - typedef HANDLE native_handle_type; -#else - typedef pthread_t native_handle_type; -#endif - - class id; - - /// Default constructor. - /// Construct a @c thread object without an associated thread of execution - /// (i.e. non-joinable). - thread() : mHandle(0), mNotAThread(true) -#if defined(_TTHREAD_WIN32_) - , mWin32ThreadID(0) -#endif - {} - - /// Thread starting constructor. - /// Construct a @c thread object with a new thread of execution. - /// @param[in] aFunction A function pointer to a function of type: - /// void fun(void * arg) - /// @param[in] aArg Argument to the thread function. - /// @note This constructor is not fully compatible with the standard C++ - /// thread class. It is more similar to the pthread_create() (POSIX) and - /// CreateThread() (Windows) functions. - thread(void (*aFunction)(void *), void * aArg); - - /// Destructor. - /// @note If the thread is joinable upon destruction, @c std::terminate() - /// will be called, which terminates the process. It is always wise to do - /// @c join() before deleting a thread object. - ~thread(); - - /// Wait for the thread to finish (join execution flows). - /// After calling @c join(), the thread object is no longer associated with - /// a thread of execution (i.e. it is not joinable, and you may not join - /// with it nor detach from it). - void join(); - - /// Check if the thread is joinable. - /// A thread object is joinable if it has an associated thread of execution. - bool joinable() const; - - /// Detach from the thread. - /// After calling @c detach(), the thread object is no longer assicated with - /// a thread of execution (i.e. it is not joinable). The thread continues - /// execution without the calling thread blocking, and when the thread - /// ends execution, any owned resources are released. - void detach(); - - /// Return the thread ID of a thread object. - id get_id() const; - - /// Get the native handle for this thread. - /// @note Under Windows, this is a @c HANDLE, and under POSIX systems, this - /// is a @c pthread_t. - inline native_handle_type native_handle() { - return mHandle; - } - - /// Determine the number of threads which can possibly execute concurrently. - /// This function is useful for determining the optimal number of threads to - /// use for a task. - /// @return The number of hardware thread contexts in the system. - /// @note If this value is not defined, the function returns zero (0). - static unsigned hardware_concurrency(); - - //_TTHREAD_DISABLE_ASSIGNMENT(thread) - -private: - native_handle_type mHandle; ///< Thread handle. - mutable mutex mDataMutex; ///< Serializer for access to the thread private data. - bool mNotAThread; ///< True if this object is not a thread of execution. -#if defined(_TTHREAD_WIN32_) - unsigned int mWin32ThreadID; ///< Unique thread ID (filled out by _beginthreadex). -#endif - - // This is the internal thread wrapper function. -#if defined(_TTHREAD_WIN32_) - static unsigned WINAPI wrapper_function(void * aArg); -#else - static void * wrapper_function(void * aArg); -#endif -}; - -/// Thread ID. -/// The thread ID is a unique identifier for each thread. -/// @see thread::get_id() -class USCXML_API thread::id { -public: - /// Default constructor. - /// The default constructed ID is that of thread without a thread of - /// execution. - id() : mId(0) {}; - - id(unsigned long int aId) : mId(aId) {}; - - id(const id& aId) : mId(aId.mId) {}; - - inline id & operator=(const id &aId) { - mId = aId.mId; - return *this; - } - - inline friend bool operator==(const id &aId1, const id &aId2) { - return (aId1.mId == aId2.mId); - } - - inline friend bool operator!=(const id &aId1, const id &aId2) { - return (aId1.mId != aId2.mId); - } - - inline friend bool operator<=(const id &aId1, const id &aId2) { - return (aId1.mId <= aId2.mId); - } - - inline friend bool operator<(const id &aId1, const id &aId2) { - return (aId1.mId < aId2.mId); - } - - inline friend bool operator>=(const id &aId1, const id &aId2) { - return (aId1.mId >= aId2.mId); - } - - inline friend bool operator>(const id &aId1, const id &aId2) { - return (aId1.mId > aId2.mId); - } - - inline friend std::ostream& operator <<(std::ostream &os, const id &obj) { - os << obj.mId; - return os; - } - -private: - unsigned long int mId; -}; - - -// Related to - minimal to be able to support chrono. -typedef long long __intmax_t; - -/// Minimal implementation of the @c ratio class. This class provides enough -/// functionality to implement some basic @c chrono classes. -template <__intmax_t N, __intmax_t D = 1> class ratio { -public: - static double _as_double() { - return double(N) / double(D); - } -}; - -/// Minimal implementation of the @c chrono namespace. -/// The @c chrono namespace provides types for specifying time intervals. -namespace chrono { -/// Duration template class. This class provides enough functionality to -/// implement @c this_thread::sleep_for(). -template > class USCXML_API duration { -private: - _Rep rep_; -public: - typedef _Rep rep; - typedef _Period period; - - /// Construct a duration object with the given duration. - template - explicit duration(const _Rep2& r) : rep_(r) {}; - - /// Return the value of the duration object. - rep count() const { - return rep_; - } -}; - -// Standard duration types. -typedef duration<__intmax_t, ratio<1, 1000000000> > nanoseconds; ///< Duration with the unit nanoseconds. -typedef duration<__intmax_t, ratio<1, 1000000> > microseconds; ///< Duration with the unit microseconds. -typedef duration<__intmax_t, ratio<1, 1000> > milliseconds; ///< Duration with the unit milliseconds. -typedef duration<__intmax_t> seconds; ///< Duration with the unit seconds. -typedef duration<__intmax_t, ratio<60> > minutes; ///< Duration with the unit minutes. -typedef duration<__intmax_t, ratio<3600> > hours; ///< Duration with the unit hours. - -namespace system_clock { -uint64_t now(); -} - -} - -/// The namespace @c this_thread provides methods for dealing with the -/// calling thread. -namespace this_thread { -/// Return the thread ID of the calling thread. -thread::id get_id(); - -/// Yield execution to another thread. -/// Offers the operating system the opportunity to schedule another thread -/// that is ready to run on the current processor. -inline void yield() { -#if defined(_TTHREAD_WIN32_) - Sleep(0); -#else - sched_yield(); -#endif -} - -/// Blocks the calling thread for a period of time. -/// @param[in] aTime Minimum time to put the thread to sleep. -/// Example usage: -/// @code -/// // Sleep for 100 milliseconds -/// this_thread::sleep_for(chrono::milliseconds(100)); -/// @endcode -/// @note Supported duration types are: nanoseconds, microseconds, -/// milliseconds, seconds, minutes and hours. -template void sleep_for(const chrono::duration<_Rep, _Period>& aTime) { -#if defined(_TTHREAD_WIN32_) - Sleep(int(double(aTime.count()) * (1000.0 * _Period::_as_double()) + 0.5)); -#else - usleep(int(double(aTime.count()) * (1000000.0 * _Period::_as_double()) + 0.5)); -#endif -} -} - -} - -// Define/macro cleanup -#undef _TTHREAD_DISABLE_ASSIGNMENT - -#endif // _TINYTHREAD_H_ diff --git a/src/uscxml/debug/Breakpoint.cpp b/src/uscxml/debug/Breakpoint.cpp deleted file mode 100644 index d7eb2af..0000000 --- a/src/uscxml/debug/Breakpoint.cpp +++ /dev/null @@ -1,266 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/debug/Breakpoint.h" -#include "uscxml/Interpreter.h" -#include "uscxml/dom/DOMUtils.h" - -namespace uscxml { - -Breakpoint::Breakpoint(const Data& data) { - enabled = true; - subject = UNDEF_SUBJECT; - when = UNDEF_WHEN; - action = UNDEF_ACTION; - - if (data.hasKey("when")) { - if (false) { - } else if (data.at("when").atom == "before") { - when = BEFORE; - } else if (data.at("when").atom == "after") { - when = AFTER; - } else if (data.at("when").atom == "on") { - when = ON; - } - } - - if (data.hasKey("action")) { - if (false) { - } else if (data.at("action").atom == "enter") { - action = ENTER; - } else if (data.at("action").atom == "exit") { - action = EXIT; - } else if (data.at("action").atom == "invoke") { - action = INVOKE; - } else if (data.at("action").atom == "cancel") { - action = UNINVOKE; - } - } - - if (data.hasKey("subject")) { - if (false) { - } else if (data.at("subject").atom == "state") { - subject = STATE; - } else if (data.at("subject").atom == "transition") { - subject = TRANSITION; - } else if (data.at("subject").atom == "stable") { - subject = STABLE; - } else if (data.at("subject").atom == "microstep") { - subject = MICROSTEP; - } else if (data.at("subject").atom == "event") { - subject = EVENT; - } else if (data.at("subject").atom == "invoker") { - subject = INVOKER; - } else if (data.at("subject").atom == "executable") { - subject = EXECUTABLE; - } - } - - if (data.hasKey("condition")) - condition = data.at("condition").atom; - - if (data.hasKey("invokeId")) - invokeId = data.at("invokeId").atom; - - if (data.hasKey("invokeType")) - invokeType = data.at("invokeType").atom; - - if (data.hasKey("eventName")) - eventName = data.at("eventName").atom; - - if (data.hasKey("executableName")) - executableName = data.at("executableName").atom; - - if (data.hasKey("executableXPath")) - executableXPath = data.at("executableXPath").atom; - - if (data.hasKey("stateId")) - stateId = data.at("stateId").atom; - - if (data.hasKey("transSourceId")) - transSourceId = data.at("transSourceId").atom; - - if (data.hasKey("transTargetId")) - transTargetId = data.at("transTargetId").atom; - -} - -Data Breakpoint::toData() const { - Data data; - - switch (subject) { - case STATE: - data.compound["subject"] = Data("state", Data::VERBATIM); - break; - case TRANSITION: - data.compound["subject"] = Data("transition", Data::VERBATIM); - break; - case STABLE: - data.compound["subject"] = Data("stable", Data::VERBATIM); - break; - case MICROSTEP: - data.compound["subject"] = Data("microstep", Data::VERBATIM); - break; - case EVENT: - data.compound["subject"] = Data("event", Data::VERBATIM); - break; - case INVOKER: - data.compound["subject"] = Data("invoker", Data::VERBATIM); - break; - case EXECUTABLE: - data.compound["subject"] = Data("executable", Data::VERBATIM); - break; - default: - break; - } - - switch (when) { - case AFTER: - data.compound["when"] = Data("after", Data::VERBATIM); - break; - case BEFORE: - data.compound["when"] = Data("before", Data::VERBATIM); - break; - case ON: - data.compound["when"] = Data("on", Data::VERBATIM); - break; - default: - break; - } - - switch (action) { - case ENTER: - data.compound["action"] = Data("enter", Data::VERBATIM); - break; - case EXIT: - data.compound["action"] = Data("exit", Data::VERBATIM); - break; - case INVOKE: - data.compound["action"] = Data("invoke", Data::VERBATIM); - break; - case UNINVOKE: - data.compound["action"] = Data("cancel", Data::VERBATIM); - break; - default: - break; - } - - if (invokeId.length() > 0) - data.compound["invokeId"] = Data(invokeId, Data::VERBATIM); - - if (invokeType.length() > 0) - data.compound["invokeType"] = Data(invokeType, Data::VERBATIM); - - if (eventName.length() > 0) - data.compound["eventName"] = Data(eventName, Data::VERBATIM); - - if (executableName.length() > 0) - data.compound["executableName"] = Data(executableName, Data::VERBATIM); - - if (executableXPath.length() > 0) { - data.compound["executableXPath"] = Data(executableXPath, Data::VERBATIM); - } - - if (element) - data.compound["xpath"] = Data(DOMUtils::xPathForNode(element, "*"), Data::VERBATIM); - - if (stateId.length() > 0) - data.compound["stateId"] = Data(stateId, Data::VERBATIM); - - if (transSourceId.length() > 0) - data.compound["transSourceId"] = Data(transSourceId, Data::VERBATIM); - - if (transTargetId.length() > 0) - data.compound["transTargetId"] = Data(transTargetId, Data::VERBATIM); - - if (condition.length() > 0) - data.compound["condition"] = Data(condition, Data::VERBATIM); - - return data; -} - -bool Breakpoint::matches(Interpreter interpreter, const Breakpoint& other) const { - // would we match the given breakpoint? - - if (subject != UNDEF_SUBJECT && - other.subject != subject) - return false; // subject does not match - - if (when != UNDEF_WHEN && - other.when != when) - return false; // time does not match - - if (action != UNDEF_ACTION && - other.action != action) - return false; // action does not match - - // when we have a qualifier it has to match - if(invokeId.length() > 0 && invokeId != other.invokeId) { - return false; - } - - if(invokeType.length() > 0 && invokeType != other.invokeType) { - return false; - } - - if(stateId.length() > 0 && stateId != other.stateId) { - return false; - } - - if(eventName.length() > 0 && !nameMatch(eventName, other.eventName)) { - return false; - } - - if(executableName.length() > 0 && executableName != other.executableName) { - return false; - } - - if(executableXPath.length()) { - Arabica::XPath::NodeSet nodes; - try { - nodes = interpreter.getNodeSetForXPath(executableXPath); - } catch (...) { - return false; - } - return InterpreterImpl::isMember(other.element, nodes); - } - - if(transSourceId.length() > 0 && transSourceId != other.transSourceId) { - return false; - } - - if(transTargetId.length() > 0 && transTargetId != other.transTargetId) { - return false; - } - - if (condition.length() > 0) { - try { - DataModel dm = interpreter.getDataModel(); - if (!dm || !dm.evalAsBool(condition)) { - return false; - } - } catch (...) { - return false; - } - } - - return true; -} - -} \ No newline at end of file diff --git a/src/uscxml/debug/Breakpoint.h b/src/uscxml/debug/Breakpoint.h deleted file mode 100644 index d7df03d..0000000 --- a/src/uscxml/debug/Breakpoint.h +++ /dev/null @@ -1,95 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef BREAKPOINT_H_VR7K7T1X -#define BREAKPOINT_H_VR7K7T1X - -#include // for string -#include "uscxml/Common.h" // for USCXML_API -#include "uscxml/Interpreter.h" -#include "DOM/Element.hpp" // for Element -#include "uscxml/messages/Data.h" // for Data - -namespace uscxml { - -class USCXML_API Breakpoint { -public: - - enum When { - UNDEF_WHEN, AFTER, BEFORE, ON - }; - - enum Subject { - UNDEF_SUBJECT, STATE, TRANSITION, STABLE, MICROSTEP, EVENT, INVOKER, EXECUTABLE - }; - - enum Action { - UNDEF_ACTION, ENTER, EXIT, INVOKE, UNINVOKE - }; - - Breakpoint() { - subject = UNDEF_SUBJECT; - when = UNDEF_WHEN; - action = UNDEF_ACTION; - } - Breakpoint(const Data& data); - - // would we match the given breakpoint as well? - bool matches(Interpreter interpreter, const Breakpoint& other) const; - - Data toData() const; - - bool operator<(const Breakpoint& other) const { - return (toData() < other.toData()); - } - - operator bool() { - return (subject != UNDEF_SUBJECT || - when != UNDEF_WHEN || - action != UNDEF_ACTION); - } - - mutable bool enabled; - - When when; - Subject subject; - Action action; - - Arabica::DOM::Element element; - - std::string invokeId; - std::string invokeType; - - std::string eventName; - - std::string executableName; - std::string executableXPath; - - std::string stateId; - std::string transSourceId; - std::string transTargetId; - - std::string condition; -}; - -} - - - -#endif /* end of include guard: BREAKPOINT_H_VR7K7T1X */ diff --git a/src/uscxml/debug/Complexity.cpp b/src/uscxml/debug/Complexity.cpp deleted file mode 100644 index 232260c..0000000 --- a/src/uscxml/debug/Complexity.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/** -* @file -* @author 2012-2015 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) -* @copyright Simplified BSD -* -* @cond -* This program is free software: you can redistribute it and/or modify -* it under the terms of the FreeBSD license as published by the FreeBSD -* project. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -* -* You should have received a copy of the FreeBSD license along with this -* program. If not, see . -* @endcond -*/ - -#include "Complexity.h" -#include "uscxml/dom/DOMUtils.h" - -#include - -namespace uscxml { - -using namespace Arabica::DOM; -using namespace Arabica::XPath; - -std::list > > Complexity::getAllConfigurations(const Arabica::DOM::Element& root) { - - std::list > > allConfigurations; - std::string nsPrefix = (root.getPrefix().size() > 0 ? root.getPrefix() + ":" : ""); - std::string localName = root.getLocalName(); - bool isAtomic = true; - - NodeList children = root.getChildNodes(); - for (size_t i = 0; i < children.getLength(); i++) { - if (children.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - Element childElem(children.item(i)); - if (childElem.getTagName() == nsPrefix + "state" || - childElem.getTagName() == nsPrefix + "parallel" || - childElem.getTagName() == nsPrefix + "final") { - // nested child state - std::list > > nestedConfigurations = getAllConfigurations(childElem); - isAtomic = false; - if (localName == "parallel" && allConfigurations.size() > 0) { - // for every nested configuration, every new nested is valid - std::list > > combinedConfigurations; - for (std::list > >::iterator existIter = allConfigurations.begin(); existIter != allConfigurations.end(); existIter++) { - std::set > existingConfig = *existIter; - - for (std::list > >::iterator newIter = nestedConfigurations.begin(); newIter != nestedConfigurations.end(); newIter++) { - - std::set > newConfig = *newIter; - std::set > combinedSet; - combinedSet.insert(existingConfig.begin(), existingConfig.end()); - combinedSet.insert(newConfig.begin(), newConfig.end()); - - combinedConfigurations.push_back(combinedSet); - } - } - allConfigurations = combinedConfigurations; - } else { - // just add nested configurations and this - for (std::list > >::iterator newIter = nestedConfigurations.begin(); newIter != nestedConfigurations.end(); newIter++) { - std::set > newConfig = *newIter; - if (localName != "scxml") - newConfig.insert(root); - allConfigurations.push_back(newConfig); - } - } - } - } - - if (isAtomic) { - std::set > soleConfig; - soleConfig.insert(root); - allConfigurations.push_back(soleConfig); - } - return allConfigurations; -} - -std::map Complexity::getTransitionHistogramm(const Arabica::DOM::Element& root) { - std::map histogram; - std::string nameSpace; - - std::list > > allConfig = Complexity::getAllConfigurations(root); - - // for every legal configuration, count the transitions - for (std::list > >::iterator confIter = allConfig.begin(); confIter != allConfig.end(); confIter++) { - NodeSet configNodeSet; - std::set > config = *confIter; - for (std::set >::iterator elemIter = config.begin(); elemIter != config.end(); elemIter++) { - configNodeSet.push_back(*elemIter); - if (nameSpace.size() == 0 && elemIter->getPrefix().size() > 0) - nameSpace = elemIter->getPrefix() + ":"; - } - NodeSet transitions = DOMUtils::filterChildElements(nameSpace + "transition", configNodeSet); - histogram[transitions.size()]++; - } - - return histogram; -} - - -uint64_t Complexity::stateMachineComplexity(InterpreterImpl* interpreter, Variant variant) { - Arabica::DOM::Element root = interpreter->getDocument().getDocumentElement(); - - Arabica::XPath::NodeSet reachable; - - if (variant & IGNORE_UNREACHABLE) { - reachable = interpreter->getReachableStates(); - } - - Complexity complexity = calculateStateMachineComplexity(root, reachable); - uint64_t value = complexity.value; - - if (!(variant & IGNORE_HISTORY)) { - for (std::list::const_iterator histIter = complexity.history.begin(); histIter != complexity.history.end(); histIter++) { - value *= *histIter; - } - } - - if (!(variant & IGNORE_NESTED_DATA)) { - bool ignoreNestedData = false; - if (root.getLocalName() == "scxml" && (!HAS_ATTR_CAST(root, "binding") || boost::to_lower_copy(ATTR_CAST(root, "binding")) == "early")) { - ignoreNestedData = true; - } - - if (!ignoreNestedData) { - uint64_t power = complexity.nestedData; - while(power--) { - value *= 2; - } - } - } - - return value; -} - -Complexity Complexity::calculateStateMachineComplexity(const Arabica::DOM::Element& root, const Arabica::XPath::NodeSet& reachable) { - Complexity complexity; - - bool hasFlatHistory = false; - bool hasDeepHistory = false; - bool hasNestedData = false; - - Arabica::DOM::NodeList childElems = root.getChildNodes(); - for (size_t i = 0; i < childElems.getLength(); i++) { - if (childElems.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - Element childElem = Element(childElems.item(i)); - if (InterpreterImpl::isHistory(childElem)) { - if (HAS_ATTR(childElem, "type") && ATTR(childElem, "type") == "deep") { - hasDeepHistory = true; - } else { - hasFlatHistory = true; - } - } - if (!hasNestedData && childElem.getLocalName() == "datamodel") { - Arabica::DOM::NodeList dataElemChilds = childElem.getChildNodes(); - for (size_t j = 0; j < dataElemChilds.getLength(); j++) { - if (dataElemChilds.item(j).getLocalName() == "data") - hasNestedData = true; - } - } - } - - if (hasNestedData) - complexity.nestedData++; - - if (reachable.size() > 0 && !InterpreterImpl::isMember(root, reachable)) { - return 0; - } else if (InterpreterImpl::isCompound(root) || TAGNAME(root) == "scxml") { - // compounds can be in any of the child state -> add - NodeSet childs = InterpreterImpl::getChildStates(root); - for (size_t i = 0; i < childs.size(); i++) { - complexity += calculateStateMachineComplexity(Element(childs[i]), reachable); - } - if (hasFlatHistory) { - complexity.history.push_back(childs.size()); - } - if (hasDeepHistory) { - complexity.history.push_back(complexity.value); - } - } else if (InterpreterImpl::isParallel(root)) { - // parallels are in all states -> multiply - NodeSet childs = InterpreterImpl::getChildStates(root); - complexity.value = 1; - for (size_t i = 0; i < childs.size(); i++) { - complexity *= calculateStateMachineComplexity(Element(childs[i]), reachable); - } - if (hasDeepHistory) { - complexity.history.push_back(complexity.value); - } - - } else if (InterpreterImpl::isAtomic(root)) { - return 1; - } - - return complexity; -} - -} \ No newline at end of file diff --git a/src/uscxml/debug/Complexity.h b/src/uscxml/debug/Complexity.h deleted file mode 100644 index de05692..0000000 --- a/src/uscxml/debug/Complexity.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * @file - * @author 2012-2015 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef COMPLEXITY_H_F972C065 -#define COMPLEXITY_H_F972C065 - -#include "uscxml/Common.h" // for USCXML_API -#include "uscxml/Interpreter.h" - -namespace uscxml { - -class USCXML_API Complexity { -public: - - enum Variant { - IGNORE_NOTHING = 0x0000, - IGNORE_HISTORY = 0x0001, - IGNORE_NESTED_DATA = 0x0002, - IGNORE_UNREACHABLE = 0x0004, - }; - - Complexity() : value(0), nestedData(0) {} - Complexity(uint64_t value) : value(value), nestedData(0) {} - - Complexity& operator+=(const Complexity& rhs) { - value += rhs.value; - nestedData += rhs.nestedData; - history.insert(history.end(), rhs.history.begin(), rhs.history.end()); - return *this; - } - - Complexity& operator*=(const Complexity& rhs) { - value *= rhs.value; - nestedData += rhs.nestedData; - history.insert(history.end(), rhs.history.begin(), rhs.history.end()); - return *this; - } - - static uint64_t stateMachineComplexity(const Interpreter& interpreter, Complexity::Variant variant = IGNORE_NOTHING) { - return stateMachineComplexity(interpreter.getImpl().get()); - } - static uint64_t stateMachineComplexity(InterpreterImpl* interpreter, Complexity::Variant variant = IGNORE_NOTHING); - - static std::list > > getAllConfigurations(const Arabica::DOM::Element& root); - static std::map getTransitionHistogramm(const Arabica::DOM::Element& root); - -protected: - static Complexity calculateStateMachineComplexity(const Arabica::DOM::Element& root, const Arabica::XPath::NodeSet& reachable); - - uint64_t value; - uint64_t nestedData; - std::list history; -}; - -inline Complexity::Variant operator | ( Complexity::Variant lhs, Complexity::Variant rhs ) { - // Cast to int first otherwise we'll just end up recursing - return static_cast< Complexity::Variant >( static_cast< int >( lhs ) | static_cast< int >( rhs ) ); -} - -} - -#endif /* end of include guard: COMPLEXITY_H_F972C065 */ diff --git a/src/uscxml/debug/DebugSession.cpp b/src/uscxml/debug/DebugSession.cpp deleted file mode 100644 index 6e81563..0000000 --- a/src/uscxml/debug/DebugSession.cpp +++ /dev/null @@ -1,378 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/debug/DebugSession.h" -#include "uscxml/debug/Debugger.h" - -namespace uscxml { - -void DebugSession::checkBreakpoints(const std::list qualifiedBreakpoints) { - std::list::const_iterator qualifiedBreakpointIter = qualifiedBreakpoints.begin(); - - if (!_breakpointsEnabled) - return; - - while(qualifiedBreakpointIter != qualifiedBreakpoints.end()) { - const Breakpoint& qualifiedBreakpoint = *qualifiedBreakpointIter++; - - // check if one of the user-supplied breakpoints match - bool userBreakpointMatched = false; - Data replyData; - - if (_skipTo) { - if (_skipTo.matches(_interpreter, qualifiedBreakpoint)) { - replyData.compound["breakpoint"] = _skipTo.toData(); - replyData.compound["qualified"] = qualifiedBreakpoint.toData(); - breakExecution(replyData); - _skipTo = Breakpoint(); - } - continue; - } - - std::set::const_iterator breakpointIter = _breakPoints.begin(); - while(breakpointIter != _breakPoints.end()) { - const Breakpoint& breakpoint = *breakpointIter++; - if (!breakpoint.enabled) - continue; - if (breakpoint.matches(_interpreter, qualifiedBreakpoint)) { - // do we have a condition? - - replyData.compound["breakpoint"] = breakpoint.toData(); - replyData.compound["qualified"] = qualifiedBreakpoint.toData(); - - userBreakpointMatched = true; - breakExecution(replyData); - } - } - if (_isStepping && !userBreakpointMatched) { - replyData.compound["qualified"] = qualifiedBreakpoint.toData(); - breakExecution(replyData); - - } - } -} - -void DebugSession::breakExecution(Data replyData) { - tthread::lock_guard lock(_mutex); - - Arabica::XPath::NodeSet basicConf = _interpreter.getBasicConfiguration(); - for (size_t i = 0; i < basicConf.size(); i++) { - Arabica::DOM::Element element = Arabica::DOM::Element(basicConf[i]); - if (element.hasAttribute("id")) { - replyData.compound["basicStates"].array.push_back(Data(element.getAttribute("id"), Data::VERBATIM)); - } - } - - Arabica::XPath::NodeSet activeConf = _interpreter.getConfiguration(); - for (size_t i = 0; i < activeConf.size(); i++) { - Arabica::DOM::Element element = Arabica::DOM::Element(activeConf[i]); - if (element.hasAttribute("id")) { - replyData.compound["activeStates"].array.push_back(Data(element.getAttribute("id"), Data::VERBATIM)); - } - } - - replyData.compound["replyType"] = Data("breakpoint", Data::VERBATIM); - _debugger->pushData(shared_from_this(), replyData); - _resumeCond.wait(_mutex); -} - -Data DebugSession::debugPrepare(const Data& data) { - Data replyData; - - if (!data.hasKey("xml") && !data.hasKey("url")) { - replyData.compound["status"] = Data("failure", Data::VERBATIM); - replyData.compound["reason"] = Data("No XML or URL given", Data::VERBATIM); - return replyData; - } - - debugStop(data); - - _isAttached = false; - - if (data.hasKey("xml")) { - _interpreter = Interpreter::fromXML(data.at("xml").atom, ""); - } else if (data.hasKey("url")) { - _interpreter = Interpreter::fromURL(data.at("url").atom); - } else { - _interpreter = Interpreter(); - } - - if (_interpreter) { - // register ourself as a monitor - _interpreter.addMonitor(_debugger); - _debugger->attachSession(_interpreter, shared_from_this()); - if (data.hasKey("url")) { - // this allows to resolve relative external reources - _interpreter.setSourceURL(data.at("url").atom); - } - replyData.compound["status"] = Data("success", Data::VERBATIM); - } else { - replyData.compound["status"] = Data("failure", Data::VERBATIM); - } - - return replyData; -} - -Data DebugSession::debugAttach(const Data& data) { - Data replyData; - _isAttached = true; - - if (!data.hasKey("attach")) { - replyData.compound["status"] = Data("failure", Data::VERBATIM); - replyData.compound["reason"] = Data("No id to attach to given", Data::VERBATIM); - return replyData; - } - - std::string interpreterId = data.at("attach").atom; - bool interpreterFound = false; - - // find interpreter for sessionid - std::map > instances = Interpreter::getInstances(); - for (std::map >::iterator instIter = instances.begin(); - instIter != instances.end(); - instIter++) { - - boost::shared_ptr instance = instIter->second.lock(); - if (instance && instance->getSessionId() == interpreterId) { - _interpreter = instance; - _debugger->attachSession(_interpreter, shared_from_this()); - interpreterFound = true; - break; - } - } - - if (!interpreterFound) { - replyData.compound["status"] = Data("failure", Data::VERBATIM); - replyData.compound["reason"] = Data("No interpreter with given id found", Data::VERBATIM); - } else { - replyData.compound["xml"].node = _interpreter.getDocument(); - replyData.compound["status"] = Data("success", Data::VERBATIM); - } - - return replyData; -} - -Data DebugSession::debugDetach(const Data& data) { - Data replyData; - _isAttached = false; - - _debugger->detachSession(_interpreter); - replyData.compound["status"] = Data("success", Data::VERBATIM); - return replyData; -} - -Data DebugSession::debugStart(const Data& data) { - Data replyData; - - if (_isAttached) { - replyData.compound["reason"] = Data("Already started when attached", Data::VERBATIM); - replyData.compound["status"] = Data("failure", Data::VERBATIM); - } else if (!_interpreter) { - replyData.compound["reason"] = Data("No interpreter attached or loaded", Data::VERBATIM); - replyData.compound["status"] = Data("failure", Data::VERBATIM); - } else { - _interpreter.start(); - replyData.compound["status"] = Data("success", Data::VERBATIM); - } - - return replyData; -} - -Data DebugSession::debugStop(const Data& data) { - Data replyData; - - if (_interpreter) { - // detach from old intepreter - _debugger->detachSession(_interpreter); - } - - if (_interpreter && !_isAttached) - _interpreter.stop(); - // unblock - _resumeCond.notify_all(); - - _skipTo = Breakpoint(); - replyData.compound["status"] = Data("success", Data::VERBATIM); - - // calls destructor - _interpreter = Interpreter(); - - return replyData; -} - -Data DebugSession::debugStep(const Data& data) { - tthread::lock_guard lock(_mutex); - - stepping(true); - _resumeCond.notify_one(); - - Data replyData; - if (_interpreter) { - // register ourself as a monitor - if (!_interpreter.isRunning()) - _interpreter.start(); - replyData.compound["status"] = Data("success", Data::VERBATIM); - } else { - replyData.compound["status"] = Data("failure", Data::VERBATIM); - } - return replyData; -} - -Data DebugSession::debugResume(const Data& data) { - tthread::lock_guard lock(_mutex); - - stepping(false); - - Data replyData; - replyData.compound["status"] = Data("success", Data::VERBATIM); - - _resumeCond.notify_one(); - return replyData; -} - - -Data DebugSession::debugPause(const Data& data) { - tthread::lock_guard lock(_mutex); - - _skipTo = Breakpoint(); - stepping(true); - - Data replyData; - replyData.compound["status"] = Data("success", Data::VERBATIM); - - return replyData; -} - -Data DebugSession::skipToBreakPoint(const Data& data) { - tthread::lock_guard lock(_mutex); - - _skipTo = Breakpoint(data); - - Data replyData; - replyData.compound["status"] = Data("success", Data::VERBATIM); - - _resumeCond.notify_one(); - return replyData; -} - -Data DebugSession::addBreakPoint(const Data& data) { - Breakpoint breakpoint(data); - - Data replyData; - if (_breakPoints.find(breakpoint) == _breakPoints.end()) { - _breakPoints.insert(breakpoint); - replyData.compound["status"] = Data("success", Data::VERBATIM); - - } else { - replyData.compound["reason"] = Data("Breakpoint already exists", Data::VERBATIM); - replyData.compound["status"] = Data("failure", Data::VERBATIM); - } - return replyData; -} - -Data DebugSession::removeBreakPoint(const Data& data) { - Breakpoint breakpoint(data); - - Data replyData; - if (_breakPoints.find(breakpoint) != _breakPoints.end()) { - _breakPoints.erase(breakpoint); - replyData.compound["status"] = Data("success", Data::VERBATIM); - } else { - replyData.compound["reason"] = Data("No such breakpoint", Data::VERBATIM); - replyData.compound["status"] = Data("failure", Data::VERBATIM); - } - return replyData; -} - -Data DebugSession::enableBreakPoint(const Data& data) { - Breakpoint breakpoint(data); - - Data replyData; - if (_breakPoints.find(breakpoint) != _breakPoints.end()) { - _breakPoints.find(breakpoint)->enabled = true; - replyData.compound["status"] = Data("success", Data::VERBATIM); - } else { - replyData.compound["reason"] = Data("No such breakpoint", Data::VERBATIM); - replyData.compound["status"] = Data("failure", Data::VERBATIM); - } - - return replyData; -} -Data DebugSession::disableBreakPoint(const Data& data) { - Breakpoint breakpoint(data); - - Data replyData; - if (_breakPoints.find(breakpoint) != _breakPoints.end()) { - _breakPoints.find(breakpoint)->enabled = false; - replyData.compound["status"] = Data("success", Data::VERBATIM); - } else { - replyData.compound["reason"] = Data("No such breakpoint", Data::VERBATIM); - replyData.compound["status"] = Data("failure", Data::VERBATIM); - } - - return replyData; -} -Data DebugSession::enableAllBreakPoints() { - Data replyData; - - _breakpointsEnabled = true; - replyData.compound["status"] = Data("success", Data::VERBATIM); - - return replyData; -} -Data DebugSession::disableAllBreakPoints() { - Data replyData; - - _breakpointsEnabled = false; - replyData.compound["status"] = Data("success", Data::VERBATIM); - - return replyData; -} - -Data DebugSession::debugEval(const Data& data) { - Data replyData; - - if (!data.hasKey("expression")) { - replyData.compound["status"] = Data("failure", Data::VERBATIM); - replyData.compound["reason"] = Data("No expression given", Data::VERBATIM); - return replyData; - } - - std::string expr = data.at("expression").atom; - - if (!_interpreter) { - replyData.compound["status"] = Data("failure", Data::VERBATIM); - replyData.compound["reason"] = Data("No interpreter running", Data::VERBATIM); - } else if (!_interpreter.getDataModel()) { - replyData.compound["status"] = Data("failure", Data::VERBATIM); - replyData.compound["reason"] = Data("No datamodel available", Data::VERBATIM); - } else { - try { - replyData.compound["eval"] = _interpreter.getDataModel().getStringAsData(expr); - } catch (Event e) { - replyData.compound["eval"] = e.data; - replyData.compound["eval"].compound["error"] = Data(e.name, Data::VERBATIM); - } - replyData.compound["status"] = Data("success", Data::VERBATIM); - } - return replyData; -} - - -} \ No newline at end of file diff --git a/src/uscxml/debug/DebugSession.h b/src/uscxml/debug/DebugSession.h deleted file mode 100644 index 1fb4f4d..0000000 --- a/src/uscxml/debug/DebugSession.h +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef DEBUGSESSION_H_M8YHEGV6 -#define DEBUGSESSION_H_M8YHEGV6 - -#include "uscxml/debug/Breakpoint.h" -#include "uscxml/Interpreter.h" -#include - -namespace uscxml { - -class Debugger; - -class USCXML_API DebugSession : public boost::enable_shared_from_this { -public: - DebugSession() { - _isStepping = false; - _isAttached = false; - _breakpointsEnabled = true; - _markedForDeletion = false; - _debugger = NULL; - } - - void stepping(bool enable) { - _isStepping = enable; - } - - void checkBreakpoints(const std::list qualifiedBreakpoints); - - Data debugPrepare(const Data& data); - Data debugAttach(const Data& data); - Data debugDetach(const Data& data); - Data debugStart(const Data& data); - Data debugStop(const Data& data); - Data debugStep(const Data& data); - Data debugResume(const Data& data); - Data debugPause(const Data& data); - Data skipToBreakPoint(const Data& data); - Data addBreakPoint(const Data& data); - Data removeBreakPoint(const Data& data); - Data enableBreakPoint(const Data& data); - Data disableBreakPoint(const Data& data); - Data enableAllBreakPoints(); - Data disableAllBreakPoints(); - Data debugEval(const Data& data); - - void setDebugger(Debugger* debugger) { - _debugger = debugger; - } - - Interpreter getInterpreter() { - return _interpreter; - } - - void markForDeletion(bool mark) { - _markedForDeletion = mark; - } - -protected: - void breakExecution(Data replyData); - - bool _isStepping; - bool _isAttached; - bool _breakpointsEnabled; - - tthread::condition_variable _resumeCond; - tthread::recursive_mutex _runMutex; - tthread::recursive_mutex _mutex; - - bool _markedForDeletion; - Debugger* _debugger; - Interpreter _interpreter; - std::set _breakPoints; - Breakpoint _skipTo; - -}; - - -} - - -#endif /* end of include guard: DEBUGSESSION_H_M8YHEGV6 */ diff --git a/src/uscxml/debug/Debugger.cpp b/src/uscxml/debug/Debugger.cpp deleted file mode 100644 index f8b13fe..0000000 --- a/src/uscxml/debug/Debugger.cpp +++ /dev/null @@ -1,256 +0,0 @@ -/** -* @file -* @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) -* @copyright Simplified BSD -* -* @cond -* This program is free software: you can redistribute it and/or modify -* it under the terms of the FreeBSD license as published by the FreeBSD -* project. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -* -* You should have received a copy of the FreeBSD license along with this -* program. If not, see . -* @endcond -*/ - -#include "uscxml/debug/Debugger.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/debug/DebugSession.h" - -namespace uscxml { - -void Debugger::afterCompletion(Interpreter interpreter) { - boost::shared_ptr session = getSession(interpreter); - if (!session) - return; - - Data msg; - msg.compound["replyType"] = Data("finished", Data::VERBATIM); - pushData(session, msg); -} - -std::list getQualifiedStateBreakpoints(Interpreter interpreter, const Arabica::DOM::Element& state, Breakpoint breakpointTemplate) { - std::list breakpoints; - - Breakpoint bp = breakpointTemplate; // copy base as template - bp.stateId = ATTR(state, "id"); - bp.element = state; - bp.subject = Breakpoint::STATE; - breakpoints.push_back(bp); - - return breakpoints; -} - -std::list getQualifiedInvokeBreakpoints(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string invokeId, Breakpoint breakpointTemplate) { - std::list breakpoints; - - Breakpoint bp = breakpointTemplate; // copy base as template - bp.subject = Breakpoint::INVOKER; - bp.element = invokeElem; - bp.invokeId = invokeId; - - if (HAS_ATTR(invokeElem, "type")) { - bp.invokeType = ATTR(invokeElem, "type"); - } else if (HAS_ATTR(invokeElem, "typeexpr")) { - bp.invokeType = interpreter.getDataModel().evalAsString(ATTR(invokeElem, "typeexpr")); - } - - breakpoints.push_back(bp); - - return breakpoints; -} - -std::list getQualifiedTransBreakpoints(Interpreter interpreter, const Arabica::DOM::Element& transition, Breakpoint breakpointTemplate) { - std::list breakpoints; - - Arabica::DOM::Element source(interpreter.getImpl()->getSourceState(transition)); - Arabica::XPath::NodeSet targets = interpreter.getImpl()->getTargetStates(transition); - - for (size_t j = 0; j < targets.size(); j++) { - Arabica::DOM::Element target(targets[j]); - - Breakpoint bp = breakpointTemplate; // copy base as template - bp.element = transition; - bp.transSourceId = ATTR(source, "id"); - bp.transTargetId = ATTR(target, "id"); - bp.subject = Breakpoint::TRANSITION; - - breakpoints.push_back(bp); - } - - return breakpoints; -} - -void Debugger::beforeTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing) { - handleTransition(interpreter, transition, Breakpoint::BEFORE); -} -void Debugger::afterTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing) { - handleTransition(interpreter, transition, Breakpoint::AFTER); -} -void Debugger::beforeExecutingContent(Interpreter interpreter, const Arabica::DOM::Element& content) { - handleExecutable(interpreter, Arabica::DOM::Element(content), Breakpoint::BEFORE); -} -void Debugger::afterExecutingContent(Interpreter interpreter, const Arabica::DOM::Element& content) { - handleExecutable(interpreter, Arabica::DOM::Element(content), Breakpoint::AFTER); -} -void Debugger::beforeExitingState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - handleState(interpreter, state, Breakpoint::BEFORE, Breakpoint::EXIT); -} -void Debugger::afterExitingState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - handleState(interpreter, state, Breakpoint::AFTER, Breakpoint::EXIT); -} -void Debugger::beforeEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - handleState(interpreter, state, Breakpoint::BEFORE, Breakpoint::ENTER); -} -void Debugger::afterEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - handleState(interpreter, state, Breakpoint::AFTER, Breakpoint::ENTER); -} -void Debugger::beforeUninvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) { - handleInvoke(interpreter, invokeElem, invokeid, Breakpoint::BEFORE, Breakpoint::UNINVOKE); -} -void Debugger::afterUninvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) { - handleInvoke(interpreter, invokeElem, invokeid, Breakpoint::AFTER, Breakpoint::UNINVOKE); -} -void Debugger::beforeInvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) { - handleInvoke(interpreter, invokeElem, invokeid, Breakpoint::BEFORE, Breakpoint::INVOKE); -} -void Debugger::afterInvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) { - handleInvoke(interpreter, invokeElem, invokeid, Breakpoint::AFTER, Breakpoint::INVOKE); -} -void Debugger::onStableConfiguration(Interpreter interpreter) { - handleStable(interpreter, Breakpoint::ON); -} -void Debugger::beforeMicroStep(Interpreter interpreter) { - handleMicrostep(interpreter, Breakpoint::BEFORE); -} -void Debugger::afterMicroStep(Interpreter interpreter) { - handleMicrostep(interpreter, Breakpoint::AFTER); -} -void Debugger::beforeProcessingEvent(Interpreter interpreter, const Event& event) { - handleEvent(interpreter, event, Breakpoint::BEFORE); -} - -void Debugger::handleExecutable(Interpreter interpreter, - const Arabica::DOM::Element& execContentElem, - Breakpoint::When when) { - if (!interpreter.isRunning()) - return; - boost::shared_ptr session = getSession(interpreter); - if (!session) - return; - - std::list breakpoints; - - Breakpoint breakpoint; - breakpoint.when = when; - breakpoint.element = execContentElem; - breakpoint.executableName = execContentElem.getLocalName(); - breakpoint.subject = Breakpoint::EXECUTABLE; - breakpoints.push_back(breakpoint); - - session->checkBreakpoints(breakpoints); - -} - -void Debugger::handleEvent(Interpreter interpreter, const Event& event, Breakpoint::When when) { - if (!interpreter.isRunning()) - return; - boost::shared_ptr session = getSession(interpreter); - if (!session) - return; - - std::list breakpoints; - - Breakpoint breakpoint; - breakpoint.when = when; - breakpoint.eventName = event.name; - breakpoint.subject = Breakpoint::EVENT; - breakpoints.push_back(breakpoint); - - session->checkBreakpoints(breakpoints); - -} - -void Debugger::handleStable(Interpreter interpreter, Breakpoint::When when) { - if (!interpreter.isRunning()) - return; - boost::shared_ptr session = getSession(interpreter); - if (!session) - return; - - std::list breakpoints; - - Breakpoint breakpoint; - breakpoint.when = when; - breakpoint.subject = Breakpoint::STABLE; - breakpoints.push_back(breakpoint); - - session->checkBreakpoints(breakpoints); -} - -void Debugger::handleMicrostep(Interpreter interpreter, Breakpoint::When when) { - if (!interpreter.isRunning()) - return; - boost::shared_ptr session = getSession(interpreter); - if (!session) - return; - - std::list breakpoints; - - Breakpoint breakpoint; - breakpoint.when = when; - breakpoint.subject = Breakpoint::MICROSTEP; - breakpoints.push_back(breakpoint); - - session->checkBreakpoints(breakpoints); -} - -void Debugger::handleTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, Breakpoint::When when) { - if (!interpreter.isRunning()) - return; - boost::shared_ptr session = getSession(interpreter); - if (!session) - return; - - Breakpoint breakpointTemplate; - breakpointTemplate.when = when; - std::list qualifiedBreakpoints = getQualifiedTransBreakpoints(interpreter, transition, breakpointTemplate); - session->checkBreakpoints(qualifiedBreakpoints); -} - -void Debugger::handleState(Interpreter interpreter, const Arabica::DOM::Element& state, Breakpoint::When when, Breakpoint::Action action) { - if (!interpreter.isRunning()) - return; - boost::shared_ptr session = getSession(interpreter); - if (!session) - return; - - Breakpoint breakpointTemplate; - breakpointTemplate.when = when; - breakpointTemplate.action = action; - std::list qualifiedBreakpoints = getQualifiedStateBreakpoints(interpreter, state, breakpointTemplate); - session->checkBreakpoints(qualifiedBreakpoints); - -} - -void Debugger::handleInvoke(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeId, Breakpoint::When when, Breakpoint::Action action) { - if (!interpreter.isRunning()) - return; - boost::shared_ptr session = getSession(interpreter); - if (!session) - return; - - Breakpoint breakpointTemplate; - breakpointTemplate.when = when; - breakpointTemplate.action = action; - std::list qualifiedBreakpoints = getQualifiedInvokeBreakpoints(interpreter, invokeElem, invokeId, breakpointTemplate); - session->checkBreakpoints(qualifiedBreakpoints); - -} - - -} \ No newline at end of file diff --git a/src/uscxml/debug/Debugger.h b/src/uscxml/debug/Debugger.h deleted file mode 100644 index 03846e5..0000000 --- a/src/uscxml/debug/Debugger.h +++ /dev/null @@ -1,105 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef DEBUGGERMONITOR_H_Z050WPFH -#define DEBUGGERMONITOR_H_Z050WPFH - -#include "uscxml/messages/Data.h" // for Data -#include "uscxml/messages/Event.h" // for Event -#include "uscxml/Interpreter.h" -#include "uscxml/debug/Breakpoint.h" - -namespace uscxml { - -class DebugSession; - -class USCXML_API Debugger : public InterpreterMonitor { -public: - Debugger() { - } - virtual ~Debugger() {} - - virtual void attachSession(Interpreter interpreter, boost::shared_ptr session) { - tthread::lock_guard lock(_sessionMutex); - _sessionForInterpreter[interpreter] = session; - } - - virtual void detachSession(Interpreter interpreter) { - tthread::lock_guard lock(_sessionMutex); - _sessionForInterpreter.erase(interpreter); - } - - virtual boost::shared_ptr getSession(Interpreter interpreter) { - tthread::lock_guard lock(_sessionMutex); - if (_sessionForInterpreter.find(interpreter) != _sessionForInterpreter.end()) - return _sessionForInterpreter[interpreter]; - return boost::shared_ptr(); - } - - virtual void pushData(boost::shared_ptr session, Data pushData) = 0; - - // InterpreterMonitor - virtual void beforeProcessingEvent(Interpreter interpreter, const Event& event); - virtual void beforeMicroStep(Interpreter interpreter); - virtual void beforeExitingState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing); - virtual void afterExitingState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing); - virtual void beforeExecutingContent(Interpreter interpreter, const Arabica::DOM::Element& element); - virtual void afterExecutingContent(Interpreter interpreter, const Arabica::DOM::Element& element); - virtual void beforeUninvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid); - virtual void afterUninvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid); - virtual void beforeTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing); - virtual void afterTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing); - virtual void beforeEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing); - virtual void afterEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing); - virtual void beforeInvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid); - virtual void afterInvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid); - virtual void afterMicroStep(Interpreter interpreter); - virtual void onStableConfiguration(Interpreter interpreter); - virtual void beforeCompletion(Interpreter interpreter) {} - virtual void afterCompletion(Interpreter interpreter); - -protected: - - void handleTransition(Interpreter interpreter, - const Arabica::DOM::Element& transition, - Breakpoint::When when); - void handleState(Interpreter interpreter, - const Arabica::DOM::Element& state, - Breakpoint::When when, - Breakpoint::Action action); - void handleInvoke(Interpreter interpreter, - const Arabica::DOM::Element& invokeElem, - const std::string& invokeId, - Breakpoint::When when, - Breakpoint::Action action); - void handleExecutable(Interpreter interpreter, - const Arabica::DOM::Element& execContentElem, - Breakpoint::When when); - void handleStable(Interpreter interpreter, Breakpoint::When when); - void handleMicrostep(Interpreter interpreter, Breakpoint::When when); - void handleEvent(Interpreter interpreter, const Event& event, Breakpoint::When when); - - tthread::recursive_mutex _sessionMutex; - std::map > _sessionForInterpreter; -}; - -} - - -#endif /* end of include guard: DEBUGGERMONITOR_H_Z050WPFH */ diff --git a/src/uscxml/debug/DebuggerServlet.cpp b/src/uscxml/debug/DebuggerServlet.cpp deleted file mode 100644 index 64426ff..0000000 --- a/src/uscxml/debug/DebuggerServlet.cpp +++ /dev/null @@ -1,262 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/debug/DebuggerServlet.h" -#include "uscxml/debug/DebugSession.h" -#include "uscxml/UUID.h" -#include - -namespace uscxml { - -void DebuggerServlet::pushData(boost::shared_ptr session, Data pushData) { - std::cout << "trying to push " << pushData.at("replyType").atom << std::endl; - - if (!session) { - if (_sendQueues.size() > 0) // logging is not aware of its interpreter - _sendQueues.begin()->second.push(pushData); - } else { - _sendQueues[session].push(pushData); - } - - serverPushData(session); -} - -void DebuggerServlet::serverPushData(boost::shared_ptr session) { - if (_sendQueues[session].isEmpty()) - return; - - if (!_clientConns[session]) - return; - - Data reply = _sendQueues[session].pop(); - std::cout << "pushing " << reply.at("replyType").atom << std::endl; - returnData(_clientConns[session], reply); - _clientConns[session] = HTTPServer::Request(); -} - -void DebuggerServlet::returnData(const HTTPServer::Request& request, Data replyData) { - HTTPServer::Reply reply(request); - - if (!replyData.hasKey("status")) { - replyData.compound["status"] = Data("success", Data::VERBATIM); - } - - std::cout << "<- " << replyData << std::endl; - - reply.content = Data::toJSON(replyData); - reply.headers["Access-Control-Allow-Origin"] = "*"; - reply.headers["Content-Type"] = "application/json"; - HTTPServer::reply(reply); -} - -bool DebuggerServlet::isCORS(const HTTPServer::Request& request) { - return (request.data.at("type").atom == "options" && - request.data.at("header").hasKey("Origin") && - request.data.at("header").hasKey("Access-Control-Request-Method")); -} - -void DebuggerServlet::handleCORS(const HTTPServer::Request& request) { - HTTPServer::Reply corsReply(request); - if (request.data.at("header").hasKey("Origin")) { - corsReply.headers["Access-Control-Allow-Origin"] = request.data.at("header").at("Origin").atom; - } else { - corsReply.headers["Access-Control-Allow-Origin"] = "*"; - } - if (request.data.at("header").hasKey("Access-Control-Request-Method")) - corsReply.headers["Access-Control-Allow-Methods"] = request.data.at("header").at("Access-Control-Request-Method").atom; - if (request.data.at("header").hasKey("Access-Control-Request-Headers")) - corsReply.headers["Access-Control-Allow-Headers"] = request.data.at("header").at("Access-Control-Request-Headers").atom; - - // std::cout << "CORS!" << std::endl << request << std::endl; - HTTPServer::reply(corsReply); -} - -bool DebuggerServlet::httpRecvRequest(const HTTPServer::Request& request) { - if (!request.data.hasKey("path")) - return false; // returnError(request); - - if (isCORS(request)) { - handleCORS(request); - return true; - } - - std::cout << request.data["path"] << ": " << request.data["content"] << std::endl; - - Data replyData; - // process request that don't need a session - if (false) { - } else if (boost::starts_with(request.data.at("path").atom, "/debug/connect")) { - processConnect(request); - return true; - } else if (boost::starts_with(request.data.at("path").atom, "/debug/sessions")) { - processListSessions(request); - return true; - } - - // get session or return error - if (false) { - } else if (!request.data.at("content").hasKey("session")) { - replyData.compound["status"] = Data("failure", Data::VERBATIM); - replyData.compound["reason"] = Data("No session given", Data::VERBATIM); - } else if (_sessionForId.find(request.data.at("content").at("session").atom) == _sessionForId.end()) { - replyData.compound["status"] = Data("failure", Data::VERBATIM); - replyData.compound["reason"] = Data("No such session", Data::VERBATIM); - } - if (!replyData.empty()) { - returnData(request, replyData); - return true; - } - - boost::shared_ptr session = _sessionForId[request.data.at("content").at("session").atom]; - - if (false) { - } else if (boost::starts_with(request.data.at("path").atom, "/debug/poll")) { - // save long-standing client poll - _clientConns[session] = request; - serverPushData(session); - - } else if (boost::starts_with(request.data.at("path").atom, "/debug/disconnect")) { - processDisconnect(request); - - } else if (boost::starts_with(request.data.at("path").atom, "/debug/breakpoint/enable/all")) { - replyData = session->enableAllBreakPoints(); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/breakpoint/disable/all")) { - replyData = session->disableAllBreakPoints(); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/breakpoint/skipto")) { - replyData = session->skipToBreakPoint(request.data["content"]); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/breakpoint/add")) { - replyData = session->addBreakPoint(request.data["content"]); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/breakpoint/remove")) { - replyData = session->removeBreakPoint(request.data["content"]); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/breakpoint/enable")) { - replyData = session->enableBreakPoint(request.data["content"]); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/breakpoint/disable")) { - replyData = session->disableBreakPoint(request.data["content"]); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/stop")) { - replyData = session->debugStop(request.data["content"]); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/prepare")) { - replyData = session->debugPrepare(request.data["content"]); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/attach")) { - replyData = session->debugAttach(request.data["content"]); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/start")) { - replyData = session->debugStart(request.data["content"]); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/step")) { - replyData = session->debugStep(request.data["content"]); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/pause")) { - replyData = session->debugPause(request.data["content"]); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/resume")) { - replyData = session->debugResume(request.data["content"]); - } else if (boost::starts_with(request.data.at("path").atom, "/debug/eval")) { - replyData = session->debugEval(request.data["content"]); - } - - if (!replyData.empty()) { - returnData(request, replyData); - return true; - } - - return true; -} - -// someone connected, create a new session -void DebuggerServlet::processConnect(const HTTPServer::Request& request) { - tthread::lock_guard lock(_mutex); - std::string sessionId = UUID::getUUID(); - - _sessionForId[sessionId] = boost::shared_ptr(new DebugSession()); - _sessionForId[sessionId]->setDebugger(this); - - Data replyData; - replyData.compound["session"] = Data(sessionId, Data::VERBATIM); - replyData.compound["status"] = Data("success", Data::VERBATIM); - returnData(request, replyData); -} - -void DebuggerServlet::processDisconnect(const HTTPServer::Request& request) { - tthread::lock_guard lock(_mutex); - - Data replyData; - - if (!request.data.at("content").hasKey("session")) { - replyData.compound["status"] = Data("failure", Data::VERBATIM); - replyData.compound["reason"] = Data("No session given", Data::VERBATIM); - returnData(request, replyData); - } - - std::string sessionId = request.data.at("content").at("session").atom; - - if (_sessionForId.find(sessionId) == _sessionForId.end()) { - replyData.compound["status"] = Data("failure", Data::VERBATIM); - replyData.compound["reason"] = Data("No such session", Data::VERBATIM); - } else { - replyData.compound["status"] = Data("success", Data::VERBATIM); - detachSession(_sessionForId[sessionId]->getInterpreter()); - _sessionForId[sessionId]->debugStop(request.data["content"]); - _clientConns.erase(_sessionForId[sessionId]); - _sendQueues.erase(_sessionForId[sessionId]); - _sessionForId.erase(sessionId); - } - - returnData(request, replyData); -} - -void DebuggerServlet::processListSessions(const HTTPServer::Request& request) { - Data replyData; - - std::map > instances = Interpreter::getInstances(); - for (std::map >::iterator instIter = instances.begin(); - instIter != instances.end(); - instIter++) { - - boost::shared_ptr instance = instIter->second.lock(); - if (instance) { - Data sessionData; - sessionData.compound["name"] = Data(instance->getName(), Data::VERBATIM); - sessionData.compound["id"] = Data(instance->getSessionId(), Data::VERBATIM); - sessionData.compound["source"] = Data(instance->getSourceURL(), Data::VERBATIM); - sessionData.compound["xml"].node = instance->getDocument(); - - replyData.compound["sessions"].array.push_back(sessionData); - } - } - - replyData.compound["status"] = Data("success", Data::VERBATIM); - returnData(request, replyData); -} - -void DebuggerServlet::send(google::LogSeverity severity, const char* full_filename, - const char* base_filename, int line, - const struct ::tm* tm_time, - const char* message, size_t message_len) { - - // _sendQueue is thread-safe, not sure about ToString though - - LogMessage msg(severity, - full_filename, - base_filename, - line, - tm_time, - std::string(message, message_len), - ToString(severity, base_filename, line, tm_time, message, message_len)); - msg.compound["replyType"] = Data("log", Data::VERBATIM); - pushData(boost::shared_ptr(), msg); -} - - -} \ No newline at end of file diff --git a/src/uscxml/debug/DebuggerServlet.h b/src/uscxml/debug/DebuggerServlet.h deleted file mode 100644 index 8abe741..0000000 --- a/src/uscxml/debug/DebuggerServlet.h +++ /dev/null @@ -1,106 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef DEBUGGERSERVLET_H_ATUMDA3G -#define DEBUGGERSERVLET_H_ATUMDA3G - -#include "uscxml/Common.h" -#include - -#include "uscxml/server/HTTPServer.h" - -#include "uscxml/debug/Debugger.h" -#include "uscxml/concurrency/tinythread.h" - -namespace uscxml { - -class USCXML_API DebuggerServlet : public Debugger, public HTTPServlet, public google::LogSink { -public: - class LogMessage : public Data { - public: - LogMessage(google::LogSeverity severity, const char* full_filename, - const char* base_filename, int line, - const struct ::tm* tm_time, - std::string message, std::string formatted) { - - compound["severity"] = severity; - compound["fullFilename"] = Data(full_filename, Data::VERBATIM); - compound["baseFilename"] = Data(base_filename, Data::VERBATIM); - compound["line"] = line; - compound["message"] = Data(message, Data::VERBATIM); - compound["time"] = Data(mktime((struct ::tm*)tm_time), Data::INTERPRETED); - compound["formatted"] = Data(formatted, Data::VERBATIM); - } - }; - - virtual ~DebuggerServlet() {} - - // from Debugger - virtual void addBreakpoint(const Breakpoint& breakpoint) {}; - - bool isCORS(const HTTPServer::Request& request); - void handleCORS(const HTTPServer::Request& request); - - bool httpRecvRequest(const HTTPServer::Request& request); - void setURL(const std::string& url) { - _url = url; - } - - void pushData(boost::shared_ptr session, Data pushData); - void returnData(const HTTPServer::Request& request, Data replyData); - - void processDisconnect(const HTTPServer::Request& request); - void processConnect(const HTTPServer::Request& request); - void processListSessions(const HTTPServer::Request& request); - -// void processDebugPrepare(const HTTPServer::Request& request); -// void processDebugAttach(const HTTPServer::Request& request); -// void processDebugStart(const HTTPServer::Request& request); -// void processDebugStop(const HTTPServer::Request& request); - -// void processDebugEval(const HTTPServer::Request& request); -// void processDebugStart(const HTTPServer::Request& request); -// void processDebugStop(const HTTPServer::Request& request); -// void processDebugStep(const HTTPServer::Request& request); -// void processDebugResume(const HTTPServer::Request& request); -// void processDebugPause(const HTTPServer::Request& request); -// void processAddBreakPoint(const HTTPServer::Request& request); -// void processRemoveBreakPoint(const HTTPServer::Request& request); -// void processPoll(const HTTPServer::Request& request); - - // Logsink - virtual void send(google::LogSeverity severity, const char* full_filename, - const char* base_filename, int line, - const struct ::tm* tm_time, - const char* message, size_t message_len); - -protected: - void serverPushData(boost::shared_ptr); - - std::string _url; - std::map, HTTPServer::Request> _clientConns; - std::map, concurrency::BlockingQueue > _sendQueues; - std::map > _sessionForId; - - tthread::recursive_mutex _mutex; -}; - -} - -#endif /* end of include guard: DEBUGGERSERVLET_H_ATUMDA3G */ diff --git a/src/uscxml/debug/InterpreterIssue.cpp b/src/uscxml/debug/InterpreterIssue.cpp index 1bb14f6..ce61af6 100644 --- a/src/uscxml/debug/InterpreterIssue.cpp +++ b/src/uscxml/debug/InterpreterIssue.cpp @@ -20,67 +20,128 @@ #include #include "InterpreterIssue.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/debug/Complexity.h" +#include "uscxml/util/DOM.h" +#include "uscxml/util/String.h" +#include "uscxml/util/Predicates.h" +//#include "uscxml/debug/Complexity.h" #include "uscxml/Interpreter.h" -#include "uscxml/Factory.h" +#include "uscxml/plugins/Factory.h" -#include -#include +#include namespace uscxml { -using namespace Arabica::XPath; -using namespace Arabica::DOM; +using namespace xercesc; -InterpreterIssue::InterpreterIssue(const std::string& msg, Arabica::DOM::Node node, IssueSeverity severity, const std::string& specRef) : message(msg), node(node), severity(severity), specRef(specRef) { +InterpreterIssue::InterpreterIssue(const std::string& msg, DOMNode* node, IssueSeverity severity, const std::string& specRef) : message(msg), node(node), severity(severity), specRef(specRef) { if (node) xPath = DOMUtils::xPathForNode(node); } // find all elements in the SCXML namespace in one traversal -void assembleNodeSets(const std::string nsPrefix, const Node& node, std::map >& sets) { - NodeList childs = node.getChildNodes(); - for (unsigned int i = 0; i < childs.getLength(); i++) { - if (childs.item(i).getNodeType() != Node_base::ELEMENT_NODE) +void assembleNodeSets(const std::string nsPrefix, DOMNode* node, std::map >& sets) { + DOMNodeList* childs = node->getChildNodes(); + for (unsigned int i = 0; i < childs->getLength(); i++) { + if (childs->item(i)->getNodeType() != DOMNode::ELEMENT_NODE) continue; // std::cout << TAGNAME(childs.item(i)) << std::endl; - if (TAGNAME_CAST(childs.item(i)).find(nsPrefix) == 0) { + if (TAGNAME_CAST(childs->item(i)).find(nsPrefix) == 0) { // correct namespace, insert via localname - sets[LOCALNAME_CAST(childs.item(i))].push_back(childs.item(i)); + sets[LOCALNAME_CAST(childs->item(i))].push_back(static_cast(childs->item(i))); } - assembleNodeSets(nsPrefix, childs.item(i), sets); + assembleNodeSets(nsPrefix, childs->item(i), sets); } } +std::list > getAllConfigurations(const DOMElement* root) { + std::list > allConfigurations; + std::string nsPrefix = X(root->getPrefix()); + std::string localName = X(root->getLocalName()); + bool isAtomic = true; + + std::cout << *root; + + DOMNodeList* children = root->getChildNodes(); + for (size_t i = 0; i < children->getLength(); i++) { + if (children->item(i)->getNodeType() != DOMNode::ELEMENT_NODE) + continue; + DOMElement* childElem = static_cast(children->item(i)); + std::cout << *childElem; + + if (XMLString::compareIString(childElem->getTagName(), X(nsPrefix + "state")) == 0 || + XMLString::compareIString(childElem->getTagName(), X(nsPrefix + "parallel")) == 0 || + XMLString::compareIString(childElem->getTagName(), X(nsPrefix + "final")) == 0) { + // nested child state + std::list > nestedConfigurations = getAllConfigurations(childElem); + isAtomic = false; + if (localName == "parallel" && allConfigurations.size() > 0) { + // for every nested configuration, every new nested is valid + std::list > combinedConfigurations; + for (auto existIter = allConfigurations.begin(); existIter != allConfigurations.end(); existIter++) { + std::set existingConfig = *existIter; + + for (auto newIter = nestedConfigurations.begin(); newIter != nestedConfigurations.end(); newIter++) { + + std::set newConfig = *newIter; + std::set combinedSet; + combinedSet.insert(existingConfig.begin(), existingConfig.end()); + combinedSet.insert(newConfig.begin(), newConfig.end()); + + combinedConfigurations.push_back(combinedSet); + } + } + allConfigurations = combinedConfigurations; + } else { + // just add nested configurations and this + for (auto newIter = nestedConfigurations.begin(); newIter != nestedConfigurations.end(); newIter++) { + std::set newConfig = *newIter; + if (localName != "scxml") + newConfig.insert(root); + allConfigurations.push_back(newConfig); + } + } + } + } + + if (isAtomic) { + std::set soleConfig; + soleConfig.insert(root); + allConfigurations.push_back(soleConfig); + } + return allConfigurations; + +} /** * Can the given states ever appear in an active configuration? */ -bool hasLegalCompletion(const NodeSet& states) { +bool hasLegalCompletion(const std::list& states) { if (states.size() < 2) return true; // iterate every pair - for (unsigned int outer = 0; outer < states.size() - 1; outer++) { - Element s1(states[outer]); - for (unsigned int inner = outer + 1; inner < states.size(); inner++) { - Element s2(states[inner]); - Node parent; + for (auto outer = states.begin(); outer != states.end(); outer++) { + DOMElement* s1 = *outer; + for (auto inner = outer; inner != states.end(); inner++) { + if (inner == outer) + continue; + + DOMElement* s2 = *inner; + DOMNode* parent; // ok to be directly ancestorally related - if (InterpreterImpl::isDescendant(s1, s2) || InterpreterImpl::isDescendant(s2, s1)) + if (DOMUtils::isDescendant(s1, s2) || DOMUtils::isDescendant(s2, s1)) goto NEXT_PAIR; // find least common ancestor - parent = s1.getParentNode(); - while(parent && parent.getNodeType() == Node_base::ELEMENT_NODE) { - if (InterpreterImpl::isDescendant(s2, parent)) { - if (InterpreterImpl::isParallel(Element(parent))) + parent = s1->getParentNode(); + while(parent && parent->getNodeType() == DOMNode::ELEMENT_NODE) { + if (DOMUtils::isDescendant(s2, parent)) { + if (isParallel(static_cast(parent))) goto NEXT_PAIR; } - parent = parent.getParentNode(); + parent = parent->getParentNode(); } return false; @@ -100,91 +161,90 @@ std::list InterpreterIssue::forInterpreter(InterpreterImpl* in std::list issues; if (!interpreter->_scxml) { - InterpreterIssue issue("No SCXML element to be found", Node(), InterpreterIssue::USCXML_ISSUE_FATAL); + InterpreterIssue issue("No SCXML element to be found", NULL, InterpreterIssue::USCXML_ISSUE_FATAL); issues.push_back(issue); return issues; } - std::map > seenStates; + std::map seenStates; // get some aliases - Element& _scxml = interpreter->_scxml; - NameSpaceInfo& _nsInfo = interpreter->_nsInfo; + DOMElement* _scxml = interpreter->_scxml; Factory* _factory = interpreter->_factory; DataModel& _dataModel = interpreter->_dataModel; + std::string xmlNSPrefix = interpreter->_xmlPrefix; + std::map > nodeSets; + assembleNodeSets(xmlNSPrefix, _scxml, nodeSets); - std::map > nodeSets; - assembleNodeSets(_nsInfo.xmlNSPrefix, _scxml, nodeSets); - - NodeSet scxmls = nodeSets["scxml"]; + std::list scxmls = nodeSets["scxml"]; scxmls.push_back(_scxml); - NodeSet reachable = interpreter->getReachableStates(); - - NodeSet& states = nodeSets["state"]; - NodeSet& parallels = nodeSets["parallel"]; - NodeSet& transitions = nodeSets["transition"]; - NodeSet& initials = nodeSets["initial"]; - NodeSet& finals = nodeSets["final"]; - NodeSet& onEntries = nodeSets["onentry"]; - NodeSet& onExits = nodeSets["onexit"]; - NodeSet& histories = nodeSets["history"]; - - NodeSet& raises = nodeSets["raise"]; - NodeSet& ifs = nodeSets["if"]; - NodeSet& elseIfs = nodeSets["elseif"]; - NodeSet& elses = nodeSets["else"]; - NodeSet& foreachs = nodeSets["foreach"]; - NodeSet& logs = nodeSets["log"]; - - NodeSet& dataModels = nodeSets["datamodel"]; - NodeSet& datas = nodeSets["data"]; - NodeSet& assigns = nodeSets["assign"]; - NodeSet& doneDatas = nodeSets["donedata"]; - NodeSet& contents = nodeSets["content"]; - NodeSet& params = nodeSets["param"]; - NodeSet& scripts = nodeSets["script"]; - - NodeSet& sends = nodeSets["send"]; - NodeSet& cancels = nodeSets["cancel"]; - NodeSet& invokes = nodeSets["invoke"]; - NodeSet& finalizes = nodeSets["finalize"]; - - NodeSet allStates; - allStates.push_back(states); - allStates.push_back(parallels); - allStates.push_back(histories); - allStates.push_back(finals); - - NodeSet allExecContents; - allExecContents.push_back(raises); - allExecContents.push_back(ifs); - allExecContents.push_back(elseIfs); - allExecContents.push_back(elses); - allExecContents.push_back(foreachs); - allExecContents.push_back(logs); - allExecContents.push_back(sends); - allExecContents.push_back(assigns); - allExecContents.push_back(scripts); - allExecContents.push_back(cancels); - - NodeSet allElements; - allElements.push_back(scxmls); - allElements.push_back(allStates); - allElements.push_back(allExecContents); - allElements.push_back(transitions); - allElements.push_back(initials); - allElements.push_back(onEntries); - allElements.push_back(onExits); - allElements.push_back(dataModels); - allElements.push_back(datas); - allElements.push_back(doneDatas); - allElements.push_back(contents); - allElements.push_back(params); - allElements.push_back(invokes); - allElements.push_back(finalizes); + std::list reachable = getReachableStates(_scxml); + + std::list& states = nodeSets["state"]; + std::list& parallels = nodeSets["parallel"]; + std::list& transitions = nodeSets["transition"]; + std::list& initials = nodeSets["initial"]; + std::list& finals = nodeSets["final"]; + std::list& onEntries = nodeSets["onentry"]; + std::list& onExits = nodeSets["onexit"]; + std::list& histories = nodeSets["history"]; + + std::list& raises = nodeSets["raise"]; + std::list& ifs = nodeSets["if"]; + std::list& elseIfs = nodeSets["elseif"]; + std::list& elses = nodeSets["else"]; + std::list& foreachs = nodeSets["foreach"]; + std::list& logs = nodeSets["log"]; + + std::list& dataModels = nodeSets["datamodel"]; + std::list& datas = nodeSets["data"]; + std::list& assigns = nodeSets["assign"]; + std::list& doneDatas = nodeSets["donedata"]; + std::list& contents = nodeSets["content"]; + std::list& params = nodeSets["param"]; + std::list& scripts = nodeSets["script"]; + + std::list& sends = nodeSets["send"]; + std::list& cancels = nodeSets["cancel"]; + std::list& invokes = nodeSets["invoke"]; + std::list& finalizes = nodeSets["finalize"]; + + std::list allStates; + allStates.insert(allStates.end(), states.begin(), states.end()); + allStates.insert(allStates.end(), parallels.begin(), parallels.end()); + allStates.insert(allStates.end(), histories.begin(), histories.end()); + allStates.insert(allStates.end(), finals.begin(), finals.end()); + + std::list allExecContents; + allExecContents.insert(allExecContents.end(), raises.begin(), raises.end()); + allExecContents.insert(allExecContents.end(), ifs.begin(), ifs.end()); + allExecContents.insert(allExecContents.end(), elseIfs.begin(), elseIfs.end()); + allExecContents.insert(allExecContents.end(), elses.begin(), elses.end()); + allExecContents.insert(allExecContents.end(), foreachs.begin(), foreachs.end()); + allExecContents.insert(allExecContents.end(), logs.begin(), logs.end()); + allExecContents.insert(allExecContents.end(), sends.begin(), sends.end()); + allExecContents.insert(allExecContents.end(), assigns.begin(), assigns.end()); + allExecContents.insert(allExecContents.end(), scripts.begin(), scripts.end()); + allExecContents.insert(allExecContents.end(), cancels.begin(), cancels.end()); + + std::list allElements; + allElements.insert(allElements.end(), scxmls.begin(), scxmls.end()); + allElements.insert(allElements.end(), allStates.begin(), allStates.end()); + allElements.insert(allElements.end(), allExecContents.begin(), allExecContents.end()); + allElements.insert(allElements.end(), transitions.begin(), transitions.end()); + allElements.insert(allElements.end(), initials.begin(), initials.end()); + allElements.insert(allElements.end(), onEntries.begin(), onEntries.end()); + allElements.insert(allElements.end(), onExits.begin(), onExits.end()); + allElements.insert(allElements.end(), dataModels.begin(), dataModels.end()); + allElements.insert(allElements.end(), datas.begin(), datas.end()); + allElements.insert(allElements.end(), doneDatas.begin(), doneDatas.end()); + allElements.insert(allElements.end(), contents.begin(), contents.end()); + allElements.insert(allElements.end(), params.begin(), params.end()); + allElements.insert(allElements.end(), invokes.begin(), invokes.end()); + allElements.insert(allElements.end(), finalizes.begin(), finalizes.end()); std::set execContentSet; @@ -278,10 +338,10 @@ std::list InterpreterIssue::forInterpreter(InterpreterImpl* in } - for (size_t i = 0; i < allStates.size(); i++) { - Element state = Element(allStates[i]); + for (auto stateIter = allStates.begin(); stateIter != allStates.end(); stateIter++) { + DOMElement* state = static_cast(*stateIter); - if (InterpreterImpl::isMember(state, finals) && !HAS_ATTR(state, "id")) // id is not required for finals + if (DOMUtils::isMember(state, finals) && !HAS_ATTR(state, "id")) // id is not required for finals continue; // check for existance of id attribute - this not actually required! @@ -299,13 +359,13 @@ std::list InterpreterIssue::forInterpreter(InterpreterImpl* in // check for valid transition with history states if (LOCALNAME(state) == "history") { - NodeSet transitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", state, false); + std::list transitions = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "transition", state, false); if (transitions.size() > 1) { issues.push_back(InterpreterIssue("History pseudo-state with id '" + stateId + "' has multiple transitions", state, InterpreterIssue::USCXML_ISSUE_FATAL)); } else if (transitions.size() == 0) { issues.push_back(InterpreterIssue("History pseudo-state with id '" + stateId + "' has no default transition", state, InterpreterIssue::USCXML_ISSUE_FATAL)); } else { - Element transition = Element(transitions[0]); + DOMElement* transition = static_cast(transitions.front()); if (HAS_ATTR(transition, "cond")) { issues.push_back(InterpreterIssue("Transition in history pseudo-state '" + stateId + "' must not have a condition", transition, InterpreterIssue::USCXML_ISSUE_FATAL)); } @@ -315,16 +375,16 @@ std::list InterpreterIssue::forInterpreter(InterpreterImpl* in if (!HAS_ATTR(transition, "target")) { issues.push_back(InterpreterIssue("Transition in history pseudo-state '" + stateId + "' has no target", transition, InterpreterIssue::USCXML_ISSUE_FATAL)); } else { - NodeSet targetStates = interpreter->getTargetStates(transition); - for (size_t j = 0; j < targetStates.size(); j++) { - Element target = Element(targetStates[j]); + std::list targetStates = getTargetStates(transition, _scxml); + for (auto tIter = targetStates.begin(); tIter != targetStates.end(); tIter++) { + DOMElement* target = *tIter; if (HAS_ATTR(state, "type") && ATTR(state, "type") == "deep") { - if (!InterpreterImpl::isDescendant(target, state.getParentNode())) { - issues.push_back(InterpreterIssue("Transition in deep history pseudo-state '" + stateId + "' has invalid target state '" + ATTR(target, "id") + "'", transition, InterpreterIssue::USCXML_ISSUE_FATAL)); + if (!DOMUtils::isDescendant(target, state->getParentNode())) { + issues.push_back(InterpreterIssue("Transition in deep history pseudo-state '" + stateId + "' has illegal target state '" + ATTR(target, "id") + "'", transition, InterpreterIssue::USCXML_ISSUE_FATAL)); } } else { - if (target.getParentNode() != state.getParentNode()) { - issues.push_back(InterpreterIssue("Transition in shallow history pseudo-state '" + stateId + "' has invalid target state '" + ATTR(target, "id") + "'", transition, InterpreterIssue::USCXML_ISSUE_FATAL)); + if (target->getParentNode() != state->getParentNode()) { + issues.push_back(InterpreterIssue("Transition in shallow history pseudo-state '" + stateId + "' has illegal target state '" + ATTR(target, "id") + "'", transition, InterpreterIssue::USCXML_ISSUE_FATAL)); } } } @@ -333,7 +393,7 @@ std::list InterpreterIssue::forInterpreter(InterpreterImpl* in } // check whether state is reachable - if (!InterpreterImpl::isMember(state, reachable) && !InterpreterImpl::isInEmbeddedDocument(state)) { + if (!DOMUtils::isMember(state, reachable) && !isInEmbeddedDocument(state)) { issues.push_back(InterpreterIssue("State with id '" + stateId + "' is unreachable", state, InterpreterIssue::USCXML_ISSUE_FATAL)); } @@ -345,8 +405,8 @@ std::list InterpreterIssue::forInterpreter(InterpreterImpl* in seenStates[ATTR(state, "id")] = state; } - for (size_t i = 0; i < transitions.size(); i++) { - Element transition = Element(transitions[i]); + for (auto tIter = transitions.begin(); tIter != transitions.end(); tIter++) { + DOMElement* transition = *tIter; // check for valid target if (HAS_ATTR(transition, "target")) { @@ -365,16 +425,14 @@ std::list InterpreterIssue::forInterpreter(InterpreterImpl* in } // check for redundancy of transition - for (size_t i = 0; i < allStates.size(); i++) { - Element state = Element(allStates[i]); - NodeSet transitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", state, false); - - transitions.to_document_order(); + for (auto stateIter = allStates.begin(); stateIter != allStates.end(); stateIter++) { + DOMElement* state = *stateIter; + std::list transitions = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "transition", state, false); - for (size_t j = 1; j < transitions.size(); j++) { - Element transition = Element(transitions[j]); - for (size_t k = 0; k < j; k++) { - Element earlierTransition = Element(transitions[k]); + for (auto tIter = transitions.begin(); tIter != transitions.end(); tIter++) { + DOMElement* transition = *tIter; + for (auto t2Iter = transitions.begin(); t2Iter != tIter; t2Iter++) { + DOMElement* earlierTransition = *t2Iter; // will the earlier transition always be enabled when the later is? if (!HAS_ATTR(earlierTransition, "cond")) { @@ -410,16 +468,18 @@ NEXT_TRANSITION: // check for useless history elements { - for (size_t i = 0; i < histories.size(); i++) { - Element history = Element(histories[i]); - if (!history.getParentNode() || history.getParentNode().getNodeType() != Node_base::ELEMENT_NODE) + for (auto histIter = histories.begin(); histIter != histories.end(); histIter++) { + DOMElement* history = *histIter; + + if (!history->getParentNode() || history->getParentNode()->getNodeType() != DOMNode::ELEMENT_NODE) continue; // syntax check will have catched this - Element parent(history.getParentNode()); - if (InterpreterImpl::isAtomic(parent)) { + + DOMElement* parent = static_cast(history->getParentNode()); + if (isAtomic(parent)) { issues.push_back(InterpreterIssue("Useless history '" + ATTR(history, "id") + "' in atomic state", history, InterpreterIssue::USCXML_ISSUE_INFO)); continue; } - std::list > > configs = Complexity::getAllConfigurations(parent); + std::list > configs = getAllConfigurations(parent); if (configs.size() <= 1) { issues.push_back(InterpreterIssue("Useless history '" + ATTR(history, "id") + "' in state with single legal configuration", history, InterpreterIssue::USCXML_ISSUE_INFO)); continue; @@ -429,19 +489,24 @@ NEXT_TRANSITION: // check for valid initial attribute { - NodeSet withInitialAttr; - withInitialAttr.push_back(allStates); + std::list withInitialAttr; + withInitialAttr.insert(withInitialAttr.end(), allStates.begin(), allStates.end()); withInitialAttr.push_back(_scxml); - for (size_t i = 0; i < withInitialAttr.size(); i++) { - Element state = Element(withInitialAttr[i]); + for (auto stateIter = withInitialAttr.begin(); stateIter != withInitialAttr.end(); stateIter++) { + DOMElement* state = *stateIter; if (HAS_ATTR(state, "initial")) { - NodeSet childs; - childs.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "state", state, true)); - childs.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "parallel", state, true)); - childs.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "final", state, true)); - childs.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "history", state, true)); + std::list childs; + std::list tmp; + tmp = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "state", state, true); + childs.insert(childs.end(), tmp.begin(), tmp.end()); + tmp = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "parallel", state, true); + childs.insert(childs.end(), tmp.begin(), tmp.end()); + tmp = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "final", state, true); + childs.insert(childs.end(), tmp.begin(), tmp.end()); + tmp = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "history", state, true); + childs.insert(childs.end(), tmp.begin(), tmp.end()); std::list intials = tokenize(ATTR(state, "initial")); for (std::list::iterator initIter = intials.begin(); initIter != intials.end(); initIter++) { @@ -450,7 +515,7 @@ NEXT_TRANSITION: continue; } // value of the 'initial' attribute [..] must be descendants of the containing or element - if (!InterpreterImpl::isMember(seenStates[*initIter], childs)) { + if (!DOMUtils::isMember(seenStates[*initIter], childs)) { issues.push_back(InterpreterIssue("Initial attribute references non-child state '" + *initIter + "'", state, InterpreterIssue::USCXML_ISSUE_FATAL)); } } @@ -460,37 +525,37 @@ NEXT_TRANSITION: // check for legal configuration of target sets { - std::map, std::string > targetIdSets; - for (size_t i = 0; i < transitions.size(); i++) { - Element transition = Element(transitions[i]); + std::map targetIdSets; + for (auto iter = transitions.begin(); iter != transitions.end(); iter++) { + DOMElement* transition = *iter; if (HAS_ATTR(transition, "target")) { targetIdSets[transition] = ATTR(transition, "target"); } } - for (size_t i = 0; i < initials.size(); i++) { - Element initial = Element(initials[i]); + for (auto iter = initials.begin(); iter != initials.end(); iter++) { + DOMElement* initial = *iter; if (HAS_ATTR(initial, "target")) { targetIdSets[initial] = ATTR(initial, "target"); } } - for (size_t i = 0; i < allStates.size(); i++) { - Element state = Element(allStates[i]); + for (auto iter = allStates.begin(); iter != allStates.end(); iter++) { + DOMElement* state = *iter; if (HAS_ATTR(state, "initial")) { targetIdSets[state] = ATTR(state, "initial"); } } - for (std::map, std::string >::iterator setIter = targetIdSets.begin(); + for (auto setIter = targetIdSets.begin(); setIter != targetIdSets.end(); setIter++) { - NodeSet targets; + std::list targets; std::list targetIds = tokenize(setIter->second); - for (std::list::iterator tgtIter = targetIds.begin(); tgtIter != targetIds.end(); tgtIter++) { + for (auto tgtIter = targetIds.begin(); tgtIter != targetIds.end(); tgtIter++) { if (seenStates.find(*tgtIter) == seenStates.end()) goto NEXT_SET; targets.push_back(seenStates[*tgtIter]); @@ -505,21 +570,21 @@ NEXT_SET: // check for valid initial transition { - NodeSet initTrans; -// initTrans.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", histories, true)); + std::list initTrans; + + for (auto iter = initials.begin(); iter != initials.end(); iter++) { + DOMElement* initial = *iter; - for (size_t i = 0; i < initials.size(); i++) { - Element initial = Element(initials[i]); - NodeSet initTransitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", initial, true); + std::list initTransitions = DOMUtils::filterChildElements(XML_PREFIX(initial).str() + "transition", initial, true); if (initTransitions.size() != 1) { issues.push_back(InterpreterIssue("Initial element must define exactly one transition", initial, InterpreterIssue::USCXML_ISSUE_FATAL)); } - initTrans.push_back(initTransitions); + initTrans.insert(initTrans.end(), initTransitions.begin(), initTransitions.end()); } - for (size_t i = 0; i < initTrans.size(); i++) { - Element transition = Element(initTrans[i]); + for (auto iter = initTrans.begin(); iter != initTrans.end(); iter++) { + DOMElement* transition = *iter; /* In a conformant SCXML document, this transition must not contain 'cond' or 'event' attributes, and must specify a non-null 'target' * whose value is a valid state specification consisting solely of descendants of the containing state @@ -532,22 +597,29 @@ NEXT_SET: issues.push_back(InterpreterIssue("Initial transition cannot be eventful", transition, InterpreterIssue::USCXML_ISSUE_FATAL)); } - if (!transition.getParentNode() || !transition.getParentNode().getParentNode() || transition.getParentNode().getParentNode().getNodeType() != Node_base::ELEMENT_NODE) + if (!transition->getParentNode() || + !transition->getParentNode()->getParentNode() || + transition->getParentNode()->getParentNode()->getNodeType() != DOMNode::ELEMENT_NODE) continue; // syntax will catch this one - Element state(transition.getParentNode().getParentNode()); - if (!InterpreterImpl::isState(state)) + DOMElement* state = static_cast(transition->getParentNode()->getParentNode()); + if (!isState(state)) continue; // syntax will catch this one - NodeSet childs; - childs.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "state", state, true)); - childs.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "parallel", state, true)); - childs.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "final", state, true)); - childs.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "history", state, true)); + std::list childs; + std::list tmp; + tmp = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "state", state, true); + childs.insert(childs.end(), tmp.begin(), tmp.end()); + tmp = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "parallel", state, true); + childs.insert(childs.end(), tmp.begin(), tmp.end()); + tmp = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "final", state, true); + childs.insert(childs.end(), tmp.begin(), tmp.end()); + tmp = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "history", state, true); + childs.insert(childs.end(), tmp.begin(), tmp.end()); std::list intials = tokenize(ATTR(transition, "target")); for (std::list::iterator initIter = intials.begin(); initIter != intials.end(); initIter++) { // the 'target' of a inside an or element: all the states must be descendants of the containing or element - if (!InterpreterImpl::isMember(seenStates[*initIter], childs)) { + if (!DOMUtils::isMember(seenStates[*initIter], childs)) { issues.push_back(InterpreterIssue("Target of initial transition references non-child state '" + *initIter + "'", transition, InterpreterIssue::USCXML_ISSUE_FATAL)); } } @@ -557,8 +629,8 @@ NEXT_SET: // check that all invokers exists { - for (size_t i = 0; i < invokes.size(); i++) { - Element invoke = Element(invokes[i]); + for (auto iter = invokes.begin(); iter != invokes.end(); iter++) { + DOMElement* invoke = *iter; if (HAS_ATTR(invoke, "type") && !_factory->hasInvoker(ATTR(invoke, "type"))) { // unknown at factory - adhoc extension? if (HAS_ATTR(invoke, "id") && interpreter->_invokers.find(ATTR(invoke, "id")) != interpreter->_invokers.end()) @@ -580,10 +652,10 @@ NEXT_SET: // check that all io processors exists { - for (size_t i = 0; i < sends.size(); i++) { - Element send = Element(sends[i]); + for (auto iter = sends.begin(); iter != sends.end(); iter++) { + DOMElement* send = *iter; if (HAS_ATTR(send, "type") && !_factory->hasIOProcessor(ATTR(send, "type"))) { - if (interpreter->_ioProcessors.find(ATTR(send, "type")) != interpreter->_ioProcessors.end()) + if (interpreter->_ioProcs.find(ATTR(send, "type")) != interpreter->_ioProcs.end()) continue; // not an issue, available ad-hoc issues.push_back(InterpreterIssue("Send to unknown IO Processor '" + ATTR(send, "type") + "'", send, InterpreterIssue::USCXML_ISSUE_FATAL)); @@ -594,23 +666,24 @@ NEXT_SET: // check that all custom executable content is known { - NodeSet allExecContentContainers; - allExecContentContainers.push_back(onEntries); - allExecContentContainers.push_back(onExits); - allExecContentContainers.push_back(transitions); - allExecContentContainers.push_back(finalizes); - - for (size_t i = 0; i < allExecContentContainers.size(); i++) { - Element block = Element(allExecContentContainers[i]); - NodeSet execContents = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, block); - for (size_t j = 0; j < execContents.size(); j++) { - Element execContent = Element(execContents[j]); + std::list allExecContentContainers; + allExecContentContainers.insert(allExecContentContainers.end(), onEntries.begin(), onEntries.end()); + allExecContentContainers.insert(allExecContentContainers.end(), onExits.begin(), onExits.end()); + allExecContentContainers.insert(allExecContentContainers.end(), transitions.begin(), transitions.end()); + allExecContentContainers.insert(allExecContentContainers.end(), finalizes.begin(), finalizes.end()); + + for (auto bIter = allExecContentContainers.begin(); bIter != allExecContentContainers.end(); bIter++) { + DOMElement* block = *bIter; + std::list execContents = DOMUtils::filterChildType(DOMNode::ELEMENT_NODE, block); + for (auto ecIter = execContents.begin(); ecIter != execContents.end(); ecIter++) { + DOMElement* execContent = static_cast(*ecIter); // SCXML specific executable content, always available - if (InterpreterImpl::isMember(execContent, allExecContents)) { + if (DOMUtils::isMember(execContent, allExecContents)) { continue; } - if (!_factory->hasExecutableContent(execContent.getLocalName(), execContent.getNamespaceURI())) { - issues.push_back(InterpreterIssue("Executable content element '" + execContent.getLocalName() + "' in namespace '" + execContent.getNamespaceURI() + "' unknown", execContent, InterpreterIssue::USCXML_ISSUE_FATAL)); + + if (!_factory->hasExecutableContent(X(execContent->getLocalName()), X(execContent->getNamespaceURI()))) { + issues.push_back(InterpreterIssue("Executable content element '" + (std::string)X(execContent->getLocalName()) + "' in namespace '" + (std::string)X(execContent->getNamespaceURI()) + "' unknown", execContent, InterpreterIssue::USCXML_ISSUE_FATAL)); continue; } } @@ -619,8 +692,8 @@ NEXT_SET: // check that all SCXML elements have valid parents and required attributes { - for (size_t i = 0; i < allElements.size(); i++) { - Element element = Element(allElements[i]); + for (auto iter = allElements.begin(); iter != allElements.end(); iter++) { + DOMElement* element = *iter; std::string localName = LOCALNAME(element); if (reqAttr.find(localName) != reqAttr.end()) { @@ -638,12 +711,12 @@ NEXT_SET: if (localName == "scxml") // can be anywhere: , , continue; - if (!element.getParentNode() || element.getParentNode().getNodeType() != Node_base::ELEMENT_NODE) { + if (!element->getParentNode() || element->getParentNode()->getNodeType() != DOMNode::ELEMENT_NODE) { issues.push_back(InterpreterIssue("Parent of " + localName + " is no element", element, InterpreterIssue::USCXML_ISSUE_WARNING)); continue; } - Element parent = Element(element.getParentNode()); + DOMElement* parent = static_cast(element->getParentNode()); std::string parentName = LOCALNAME(parent); if (validParents[localName].find(parentName) == validParents[localName].end()) { @@ -655,55 +728,55 @@ NEXT_SET: // check attribute constraints { - for (size_t i = 0; i < initials.size(); i++) { - Element initial = Element(initials[i]); - if (initial.getParentNode() && initial.getParentNode().getNodeType() == Node_base::ELEMENT_NODE) { - Element state(initial.getParentNode()); + for (auto iter = initials.begin(); iter != initials.end(); iter++) { + DOMElement* initial = *iter; + if (initial->getParentNode() && initial->getParentNode()->getNodeType() == DOMNode::ELEMENT_NODE) { + DOMElement* state = static_cast(initial->getParentNode()); if (HAS_ATTR(state, "initial")) { issues.push_back(InterpreterIssue("State with initial attribute cannot have child ", state, InterpreterIssue::USCXML_ISSUE_WARNING)); } - if (InterpreterImpl::isAtomic(state)) { + if (isAtomic(state)) { issues.push_back(InterpreterIssue("Atomic state cannot have child ", state, InterpreterIssue::USCXML_ISSUE_WARNING)); } } } - for (size_t i = 0; i < allStates.size(); i++) { - Element state = Element(allStates[i]); - if (InterpreterImpl::isAtomic(state) && HAS_ATTR(state, "initial")) { + for (auto iter = allStates.begin(); iter != allStates.end(); iter++) { + DOMElement* state = *iter; + if (isAtomic(state) && HAS_ATTR(state, "initial")) { issues.push_back(InterpreterIssue("Atomic state cannot have initial attribute ", state, InterpreterIssue::USCXML_ISSUE_WARNING)); } } - for (size_t i = 0; i < assigns.size(); i++) { - Element assign = Element(assigns[i]); - if (HAS_ATTR(assign, "expr") && assign.getChildNodes().getLength() > 0) { + for (auto iter = assigns.begin(); iter != assigns.end(); iter++) { + DOMElement* assign = *iter; + if (HAS_ATTR(assign, "expr") && assign->getChildNodes()->getLength() > 0) { issues.push_back(InterpreterIssue("Assign element cannot have expr attribute and children", assign, InterpreterIssue::USCXML_ISSUE_WARNING)); } } - for (size_t i = 0; i < contents.size(); i++) { - Element content = Element(contents[i]); - if (HAS_ATTR(content, "expr") && content.getChildNodes().getLength() > 0) { + for (auto iter = contents.begin(); iter != contents.end(); iter++) { + DOMElement* content = *iter; + if (HAS_ATTR(content, "expr") && content->getChildNodes()->getLength() > 0) { issues.push_back(InterpreterIssue("Content element cannot have expr attribute and children", content, InterpreterIssue::USCXML_ISSUE_WARNING)); } } - for (size_t i = 0; i < params.size(); i++) { - Element param = Element(params[i]); + for (auto iter = params.begin(); iter != params.end(); iter++) { + DOMElement* param = *iter; if (HAS_ATTR(param, "expr") && HAS_ATTR(param, "location")) { issues.push_back(InterpreterIssue("Param element cannot have both expr and location attribute", param, InterpreterIssue::USCXML_ISSUE_WARNING)); } } - for (size_t i = 0; i < scripts.size(); i++) { - Element script = Element(scripts[i]); - if (HAS_ATTR(script, "src") && script.getChildNodes().getLength() > 0) { + for (auto iter = scripts.begin(); iter != scripts.end(); iter++) { + DOMElement* script = *iter; + if (HAS_ATTR(script, "src") && script->getChildNodes()->getLength() > 0) { issues.push_back(InterpreterIssue("Script element cannot have src attribute and children", script, InterpreterIssue::USCXML_ISSUE_WARNING)); } } - for (size_t i = 0; i < sends.size(); i++) { - Element send = Element(sends[i]); + for (auto iter = sends.begin(); iter != sends.end(); iter++) { + DOMElement* send = *iter; if (HAS_ATTR(send, "event") && HAS_ATTR(send, "eventexpr")) { issues.push_back(InterpreterIssue("Send element cannot have both event and eventexpr attribute", send, InterpreterIssue::USCXML_ISSUE_WARNING)); } @@ -723,8 +796,8 @@ NEXT_SET: issues.push_back(InterpreterIssue("Send element cannot have delay with target _internal", send, InterpreterIssue::USCXML_ISSUE_WARNING)); } - NodeSet contentChilds = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", send, false); - NodeSet paramChilds = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "param", send, false); + std::list contentChilds = DOMUtils::filterChildElements(XML_PREFIX(send).str() + "content", send, false); + std::list paramChilds = DOMUtils::filterChildElements(XML_PREFIX(send).str() + "param", send, false); if (HAS_ATTR(send, "namelist") && contentChilds.size() > 0) { issues.push_back(InterpreterIssue("Send element cannot have namelist attribute and content child", send, InterpreterIssue::USCXML_ISSUE_WARNING)); @@ -735,15 +808,15 @@ NEXT_SET: } } - for (size_t i = 0; i < cancels.size(); i++) { - Element cancel = Element(cancels[i]); + for (auto iter = cancels.begin(); iter != cancels.end(); iter++) { + DOMElement* cancel = *iter; if (HAS_ATTR(cancel, "sendid") && HAS_ATTR(cancel, "sendidexpr")) { issues.push_back(InterpreterIssue("Cancel element cannot have both sendid and eventexpr sendidexpr", cancel, InterpreterIssue::USCXML_ISSUE_WARNING)); } } - for (size_t i = 0; i < invokes.size(); i++) { - Element invoke = Element(invokes[i]); + for (auto iter = invokes.begin(); iter != invokes.end(); iter++) { + DOMElement* invoke = *iter; if (HAS_ATTR(invoke, "type") && HAS_ATTR(invoke, "typeexpr")) { issues.push_back(InterpreterIssue("Invoke element cannot have both type and typeexpr attribute", invoke, InterpreterIssue::USCXML_ISSUE_WARNING)); } @@ -753,18 +826,18 @@ NEXT_SET: if (HAS_ATTR(invoke, "id") && HAS_ATTR(invoke, "idlocation")) { issues.push_back(InterpreterIssue("Invoke element cannot have both id and idlocation attribute", invoke, InterpreterIssue::USCXML_ISSUE_WARNING)); } - if (HAS_ATTR(invoke, "namelist") && DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "param", invoke, false).size() > 0) { + if (HAS_ATTR(invoke, "namelist") && DOMUtils::filterChildElements(XML_PREFIX(invoke).str() + "param", invoke, false).size() > 0) { issues.push_back(InterpreterIssue("Invoke element cannot have namelist attribute and param child", invoke, InterpreterIssue::USCXML_ISSUE_WARNING)); } - if (HAS_ATTR(invoke, "src") && DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", invoke, false).size() > 0) { + if (HAS_ATTR(invoke, "src") && DOMUtils::filterChildElements(XML_PREFIX(invoke).str() + "content", invoke, false).size() > 0) { issues.push_back(InterpreterIssue("Invoke element cannot have src attribute and content child", invoke, InterpreterIssue::USCXML_ISSUE_WARNING)); } } - for (size_t i = 0; i < doneDatas.size(); i++) { - Element donedata = Element(doneDatas[i]); - if (DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", donedata, false).size() > 0 && - DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "param", donedata, false).size() > 0) { + for (auto iter = doneDatas.begin(); iter != doneDatas.end(); iter++) { + DOMElement* donedata = *iter; + if (DOMUtils::filterChildElements(XML_PREFIX(donedata).str() + "content", donedata, false).size() > 0 && + DOMUtils::filterChildElements(XML_PREFIX(donedata).str() + "param", donedata, false).size() > 0) { issues.push_back(InterpreterIssue("Donedata element cannot have param child and content child", donedata, InterpreterIssue::USCXML_ISSUE_WARNING)); } @@ -798,15 +871,15 @@ NEXT_SET: // test all scripts for valid syntax { - for (size_t i = 0; i < scripts.size(); i++) { - Element script = Element(scripts[i]); + for (auto iter = scripts.begin(); iter != scripts.end(); iter++) { + DOMElement* script = *iter; - if (script.hasChildNodes()) { + if (script->hasChildNodes()) { // search for the text node with the actual script std::string scriptContent; - for (Node child = script.getFirstChild(); child; child = child.getNextSibling()) { - if (child.getNodeType() == Node_base::TEXT_NODE || child.getNodeType() == Node_base::CDATA_SECTION_NODE) - scriptContent += child.getNodeValue(); + for (DOMNode* child = script->getFirstChild(); child; child = child->getNextSibling()) { + if (child->getNodeType() == DOMNode::TEXT_NODE || child->getNodeType() == DOMNode::CDATA_SECTION_NODE) + scriptContent += (std::string)X(child->getNodeValue()); } if (!_dataModel.isValidSyntax(scriptContent)) { @@ -818,13 +891,13 @@ NEXT_SET: // test the various attributes with datamodel expressions for valid syntax { - NodeSet withCondAttrs; - withCondAttrs.push_back(transitions); - withCondAttrs.push_back(ifs); - withCondAttrs.push_back(elseIfs); + std::list withCondAttrs; + withCondAttrs.insert(withCondAttrs.end(), transitions.begin(), transitions.end()); + withCondAttrs.insert(withCondAttrs.end(), ifs.begin(), ifs.end()); + withCondAttrs.insert(withCondAttrs.end(), elseIfs.begin(), elseIfs.end()); - for (size_t i = 0; i < withCondAttrs.size(); i++) { - Element condAttr = Element(withCondAttrs[i]); + for (auto iter = withCondAttrs.begin(); iter != withCondAttrs.end(); iter++) { + DOMElement* condAttr = *iter; if (HAS_ATTR(condAttr, "cond")) { if (!_dataModel.isValidSyntax(ATTR(condAttr, "cond"))) { issues.push_back(InterpreterIssue("Syntax error in cond attribute", condAttr, InterpreterIssue::USCXML_ISSUE_WARNING)); @@ -835,17 +908,17 @@ NEXT_SET: } { - NodeSet withExprAttrs; - withExprAttrs.push_back(logs); - withExprAttrs.push_back(datas); - withExprAttrs.push_back(assigns); - withExprAttrs.push_back(contents); - withExprAttrs.push_back(params); - - for (size_t i = 0; i < withExprAttrs.size(); i++) { - Element withExprAttr = Element(withExprAttrs[i]); + std::list withExprAttrs; + withExprAttrs.insert(withExprAttrs.end(), logs.begin(), logs.end()); + withExprAttrs.insert(withExprAttrs.end(), datas.begin(), datas.end()); + withExprAttrs.insert(withExprAttrs.end(), assigns.begin(), assigns.end()); + withExprAttrs.insert(withExprAttrs.end(), contents.begin(), contents.end()); + withExprAttrs.insert(withExprAttrs.end(), params.begin(), params.end()); + + for (auto iter = withExprAttrs.begin(); iter != withExprAttrs.end(); iter++) { + DOMElement* withExprAttr = *iter; if (HAS_ATTR(withExprAttr, "expr")) { - if (InterpreterImpl::isMember(withExprAttr, datas) || InterpreterImpl::isMember(withExprAttr, assigns)) { + if (DOMUtils::isMember(withExprAttr, datas) || DOMUtils::isMember(withExprAttr, assigns)) { if (!_dataModel.isValidSyntax("foo = " + ATTR(withExprAttr, "expr"))) { // TODO: this is ECMAScripty! issues.push_back(InterpreterIssue("Syntax error in expr attribute", withExprAttr, InterpreterIssue::USCXML_ISSUE_WARNING)); continue; @@ -861,8 +934,8 @@ NEXT_SET: } { - for (size_t i = 0; i < foreachs.size(); i++) { - Element foreach = Element(foreachs[i]); + for (auto iter = foreachs.begin(); iter != foreachs.end(); iter++) { + DOMElement* foreach = *iter; if (HAS_ATTR(foreach, "array")) { if (!_dataModel.isValidSyntax(ATTR(foreach, "array"))) { issues.push_back(InterpreterIssue("Syntax error in array attribute", foreach, InterpreterIssue::USCXML_ISSUE_WARNING)); @@ -882,8 +955,8 @@ NEXT_SET: } { - for (size_t i = 0; i < sends.size(); i++) { - Element send = Element(sends[i]); + for (auto iter = sends.begin(); iter != sends.end(); iter++) { + DOMElement* send = *iter; if (HAS_ATTR(send, "eventexpr")) { if (!_dataModel.isValidSyntax(ATTR(send, "eventexpr"))) { issues.push_back(InterpreterIssue("Syntax error in eventexpr attribute", send, InterpreterIssue::USCXML_ISSUE_WARNING)); @@ -914,8 +987,8 @@ NEXT_SET: } { - for (size_t i = 0; i < invokes.size(); i++) { - Element invoke = Element(invokes[i]); + for (auto iter = invokes.begin(); iter != invokes.end(); iter++) { + DOMElement* invoke = *iter; if (HAS_ATTR(invoke, "typeexpr")) { if (!_dataModel.isValidSyntax(ATTR(invoke, "typeexpr"))) { issues.push_back(InterpreterIssue("Syntax error in typeexpr attribute", invoke, InterpreterIssue::USCXML_ISSUE_WARNING)); @@ -938,8 +1011,8 @@ NEXT_SET: } { - for (size_t i = 0; i < cancels.size(); i++) { - Element cancel = Element(cancels[i]); + for (auto iter = cancels.begin(); iter != cancels.end(); iter++) { + DOMElement* cancel = *iter; if (HAS_ATTR(cancel, "sendidexpr")) { if (!_dataModel.isValidSyntax(ATTR(cancel, "sendidexpr"))) { issues.push_back(InterpreterIssue("Syntax error in sendidexpr attribute", cancel, InterpreterIssue::USCXML_ISSUE_WARNING)); @@ -955,5 +1028,29 @@ NEXT_SET: return issues; } +std::ostream& operator<< (std::ostream& os, const InterpreterIssue& issue) { + switch (issue.severity) { + case InterpreterIssue::USCXML_ISSUE_FATAL: + os << "Issue (FATAL) "; + break; + case InterpreterIssue::USCXML_ISSUE_WARNING: + os << "Issue (WARNING) "; + break; + case InterpreterIssue::USCXML_ISSUE_INFO: + os << "Issue (INFO) "; + break; + default: + break; + } + + if (issue.xPath.size() > 0) { + os << "at " << issue.xPath << ": "; + } else { + os << ": "; + } + os << issue.message; + return os; +} + } \ No newline at end of file diff --git a/src/uscxml/debug/InterpreterIssue.h b/src/uscxml/debug/InterpreterIssue.h index 61b3b6a..f72a7a4 100644 --- a/src/uscxml/debug/InterpreterIssue.h +++ b/src/uscxml/debug/InterpreterIssue.h @@ -23,7 +23,7 @@ #include "uscxml/Common.h" #include #include -#include +#include namespace uscxml { @@ -37,17 +37,17 @@ public: USCXML_ISSUE_INFO }; - InterpreterIssue(const std::string& msg, Arabica::DOM::Node node, IssueSeverity severity, const std::string& specRef = ""); + InterpreterIssue(const std::string& msg, xercesc::DOMNode* node, IssueSeverity severity, const std::string& specRef = ""); std::string xPath; std::string message; - Arabica::DOM::Node node; + xercesc::DOMNode* node; IssueSeverity severity; std::string specRef; private: static std::list forInterpreter(InterpreterImpl* interpreter); - friend class InterpreterImpl; + friend class Interpreter; }; USCXML_API std::ostream& operator<< (std::ostream& os, const InterpreterIssue& issue); diff --git a/src/uscxml/debug/SCXMLDotWriter.cpp b/src/uscxml/debug/SCXMLDotWriter.cpp deleted file mode 100644 index 56de37a..0000000 --- a/src/uscxml/debug/SCXMLDotWriter.cpp +++ /dev/null @@ -1,888 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/Common.h" -#include "uscxml/UUID.h" -#include "SCXMLDotWriter.h" -#include "../transform/FlatStateIdentifier.h" -#include "uscxml/dom/DOMUtils.h" -#include // replace_all -#include - -namespace uscxml { - -using namespace Arabica::DOM; -using namespace Arabica::XPath; - -SCXMLDotWriter::SCXMLDotWriter() { - _iteration = 0; - _indentation = 0; -} - -SCXMLDotWriter::SCXMLDotWriter(Interpreter interpreter, - const std::list& stateAnchors, - const Element& transition) { - _interpreter = interpreter; - _xmlNSPrefix = _interpreter.getNameSpaceInfo().xmlNSPrefix; - _transition = transition; - _anchors = stateAnchors; - - NodeList scxmlElems = interpreter.getDocument().getElementsByTagName("scxml"); - _scxml = (Element)scxmlElems.item(0); - _isFlat = HAS_ATTR(_scxml, "flat") && stringIsTrue(ATTR(_scxml, "flat")); - - if (_anchors.size() == 0) { - StateAnchor anchor; - anchor.element = _scxml; - _anchors.push_back(anchor); - } - - for (std::list::iterator anchIter = _anchors.begin(); anchIter != _anchors.end(); anchIter++) { - if (!anchIter->element) - anchIter->element = _scxml; - if (anchIter->childDepth >= 0 && anchIter->transDepth == -1) - anchIter->transDepth = anchIter->childDepth; - - _portType = anchIter->type; - assembleGraph(anchIter->element, anchIter->childDepth, anchIter->transDepth + 1); - } - - _iteration = 0; - _indentation = 0; -} - -SCXMLDotWriter::~SCXMLDotWriter() { - -} - -void SCXMLDotWriter::onStableConfiguration(Interpreter interpreter) { - std::ostringstream fileSS; - fileSS << interpreter.getName() << "." << std::setw(6) << std::setfill('0') << _iteration++ << ".dot"; - toDot(fileSS.str(), interpreter); -} - -void SCXMLDotWriter::afterCompletion(Interpreter interpreter) { - std::ostringstream fileSS; - fileSS << interpreter.getName() << "." << std::setw(6) << std::setfill('0') << _iteration++ << ".dot"; - toDot(fileSS.str(), interpreter); -} - -void SCXMLDotWriter::beforeMicroStep(Interpreter interpreter) { -// std::ostringstream fileSS; -// fileSS << interpreter.getName() << "." << std::setw(6) << std::setfill('0') << _iteration++ << ".dot"; -// toDot(fileSS.str(), interpreter); -} - -void SCXMLDotWriter::beforeTakingTransition(Interpreter interpreter, - const Element& transition, - bool moreComing) { - std::ostringstream fileSS; - fileSS << interpreter.getName() << "." << std::setw(6) << std::setfill('0') << _iteration++ << ".dot"; - toDot(fileSS.str(), interpreter, transition); -} - -std::string SCXMLDotWriter::getPrefix() { - std::string prefix = ""; - for (size_t i = 0; i < _indentation; i++) - prefix += " "; - return prefix; -} - -void SCXMLDotWriter::writeTo(std::ostream& os) { - os << "digraph {" << std::endl; - os << " rankdir=LR;" << std::endl; - os << " fontsize=10;" << std::endl; - // outfile << " splines=ortho;" << std::endl; - // outfile << " splines=false;" << std::endl; - // outfile << " nodesep=1.0;" << std::endl; - - _indentation++; - writeStateElement(os, _scxml); - - // write edges at end of file - for(std::set::iterator edgeIter = _edges.begin(); edgeIter != _edges.end(); edgeIter++) { - if (edgeIter->from == edgeIter->to) - continue; - if (_histories.find(edgeIter->to) != _histories.end()) { - if (_histories.find(edgeIter->to)->second.from == _histories.find(edgeIter->to)->second.to) - continue; - } - - os << getPrefix() << "\"" << portEscape(edgeIter->from) << "\""; - if (edgeIter->fromPort.size() > 0) { - os << std::string(":\"") + portEscape(edgeIter->fromPort) + "\":e"; - } else { - os << ":__name"; - } - os << " -> "; - - if (_histories.find(edgeIter->to) != _histories.end()) { - os << getPrefix() << "\"" << portEscape(_histories.find(edgeIter->to)->second.to) << "\""; - if (_histories.find(edgeIter->to)->second.toPort.size() > 0) { - os << std::string(":\"") + portEscape(_histories.find(edgeIter->to)->second.toPort) + "\""; - } else { - os << ":__name"; - } - - } else { - os << getPrefix() << "\"" << portEscape(edgeIter->to) << "\""; - if (edgeIter->toPort.size() > 0) { - os << std::string(":\"") + portEscape(edgeIter->toPort) + "\""; - } else { - os << ":__name"; - } - } - - if (edgeIter->type == EDGE_INITAL) { - os << ":nw [style=\"dashed\", color=\"black\"]"; - } else { - os << " [color=\"black\"]"; - } - os << std::endl; - - } - - _indentation--; - - os << "}" << std::endl; - -} - -void SCXMLDotWriter::toDot(const std::string& filename, - Interpreter interpreter, - const std::list& stateAnchors, - const Element& transition) { - - std::ofstream outfile(filename.c_str()); - SCXMLDotWriter writer(interpreter, stateAnchors, transition); - writer.writeTo(outfile); - -} - -/** - * Walk the subset of the graph that is reachable and remember the nodes - */ -void SCXMLDotWriter::assembleGraph(const Element& state, int32_t childDepth, int32_t transDepth) { - std::string nodeId = idForNode(state); - - // this node is neither included per child, nor per transition - if (childDepth <= 0 && transDepth <= 0) { - return; - } - - // been here - if (_graph.find(nodeId) != _graph.end()) - return; - - _graph[nodeId].node = state; - _graph[nodeId].portType = _portType; - - - if (childDepth == 0 && transDepth == 0) { - _graph[nodeId].isBorder = true; - } - - - NodeSet childElems = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, state); - for (size_t i = 0; i < childElems.size(); i++) { - Element childElem(childElems[i]); - - // remember histories we passed - if (iequals(TAGNAME(childElem), "history")) { - _histories[ATTR(childElem, "id")].to = ATTR(state, "id"); - _histories[ATTR(childElem, "id")].toPort = ATTR(childElem, "id"); - } - - // follow transitions - if (iequals(TAGNAME(childElem), "transition")) { - _graph[nodeId].transitions.push_back(childElem); - NodeSet targetStates = _interpreter.getImpl()->getTargetStates(childElem); - for (size_t j = 0; j < targetStates.size(); j++) { - std::string remoteNodeId = idForNode(targetStates[j]); - _graph[nodeId].targets.insert(std::make_pair(remoteNodeId, childElem)); - - // recurse along the transition targets, no weight from child depth - assembleGraph((Element)targetStates[j], 0, transDepth - 1); - } - if (targetStates.size() == 0) - _graph[nodeId].targets.insert(std::make_pair(nodeId, childElem)); - - std::list eventNames; - if (HAS_ATTR(childElem, "event")) - eventNames = tokenize(ATTR(childElem, "event")); - if (eventNames.size() == 0) - _graph[nodeId].events.insert(std::make_pair("", childElem)); - for (std::list::iterator evIter = eventNames.begin(); evIter != eventNames.end(); evIter++) { - _graph[nodeId].events.insert(std::make_pair(*evIter, childElem)); - } - } - - // follow childs - if (InterpreterImpl::isState(Element(childElem))) { - if (_interpreter.getImpl()->isInitial(Element(childElem))) { - // add to initial states if it is initial - _graph[nodeId].initialchilds.insert(idForNode(childElem)); - } else if (_interpreter.getImpl()->isParallel(Element(state))) { - // add to initial states if we are parallel - _graph[nodeId].initialchilds.insert(idForNode(childElem)); - } - // in any case, it is a child state - _graph[nodeId].childs.insert(idForNode(childElem)); - - // recurse (do we really need to?) - assembleGraph(childElem, childDepth - 1, transDepth); - } - - } -} - - -/** - * Walk the complete graph and draw reachable subset - */ -void SCXMLDotWriter::writeStateElement(std::ostream& os, const Element& stateElem) { - std::string stateId = idForNode(stateElem); - - if (_knownIds.find(stateId) != _knownIds.end()) - return; - _knownIds.insert(stateId); - - std::list > invisParents; - bool isVisible = (_graph.find(stateId) != _graph.end()); - - bool subgraph = InterpreterImpl::isCompound(stateElem) || InterpreterImpl::isParallel(stateElem); - bool fatherIsParallel = (stateElem.getParentNode() && - stateElem.getParentNode().getNodeType() == Node_base::ELEMENT_NODE && - InterpreterImpl::isParallel(Element(stateElem.getParentNode()))); - - if (subgraph) { - _indentation++; - os << std::endl; - os << getPrefix() << "subgraph \"cluster_" << portEscape(stateId) << "\" {" << std::endl; - _indentation++; - os << getPrefix() << "fontsize=14" << std::endl; - os << getPrefix() << "label=<" << nameForNode(stateElem) << ">" << std::endl; - // os << getPrefix() << "rank=\"same\"" << std::endl; - os << getPrefix() << "labeljust=l" << std::endl; - - os << getPrefix() << (fatherIsParallel ? "style=dashed" : "style=solid") << std::endl; - - // os << getPrefix() << "ranksep=\"equally\"" << std::endl; - - } - - if (isVisible) { - // this state is visible! - const DotState& dotState = _graph.find(stateId)->second; - - // is this a subgraph? - - os << std::endl; - os << getPrefix() << "\"" << portEscape(stateId) << "\" [" << std::endl; - _indentation++; - - os << getPrefix() << "fontsize=10," << std::endl; - os << getPrefix() << "shape=plaintext," << std::endl; - os << getPrefix() << (fatherIsParallel ? "style=dashed," : "style=solid,") << std::endl; - - // is the current state in the basic configuration? - if (InterpreterImpl::isMember(stateElem, _interpreter.getBasicConfiguration())) - os << getPrefix() << "color=red, penwidth=3," << std::endl; - - // is the current state in the basic configuration? - if (dotState.isBorder) - os << getPrefix() << "color=blue," << std::endl; - - // is this state final? - if (_interpreter.getImpl()->isFinal(stateElem)) { - os << getPrefix() << "shape=doublecircle," << std::endl; - os << getPrefix() << "color=black," << std::endl; - os << getPrefix() << "penwidth=2," << std::endl; - os << getPrefix() << "label=<
" << nameForNode(stateElem) << "
>" << std::endl; - _indentation--; - os << getPrefix() << "];" << std::endl; - - return; - } - - // is the state initial? - bool isInitial = _interpreter.getImpl()->isInitial(stateElem); - // if (isInitial) - // os << getPrefix() << "style=filled, fillcolor=lightgrey, " << std::endl; - - DotState::mmap_s_e_t::const_iterator destIterF, destIterB; - //std::list outPorts; // count unique keys - - int nrOutPorts = 0; - - switch (dotState.portType) { - case PORT_TARGET: // outports are per target - for(DotState::mmap_s_e_t::const_iterator it = dotState.targets.begin(), end = dotState.targets.end(); - it != end; - it = dotState.targets.upper_bound(it->first)) { - nrOutPorts++; - } - break; - case PORT_EVENT: // outports are per event - for(DotState::mmap_s_e_t::const_iterator it = dotState.events.begin(), end = dotState.events.end(); - it != end; - it = dotState.events.upper_bound(it->first)) { - nrOutPorts++; - } - break; - case PORT_TRANSITION: - nrOutPorts = dotState.transitions.size(); -// for (size_t i = 0; i < dotState.transitions.size(); i++) { -// outPorts.push_back(idForNode(dotState.transitions[i])); -// } - break; - } - - os << getPrefix() << "label = < " << std::endl; - - /* - - - - - -
step
foo.error.port
bar
baz
- */ - - std::string details = getDetailedLabel(stateElem); - std::string stateLabel = nameForNode(stateElem); - int stateLines = 0; - - std::string::size_type start = 0; - while ((start = stateLabel.find("" << std::endl; - os << " " << stateLabel << "" << std::endl; - - switch (dotState.portType) { - case PORT_TARGET: // outports are per target - writePerTargetPorts(os, dotState, stateLines); - break; - case PORT_EVENT: // outports are per event - writePerEventPorts(os, dotState, stateLines); - break; - case PORT_TRANSITION: - writePerTransitionPorts(os, dotState, stateLines); - break; - } - - - // write details of the state - if (details.size() > 0) { - os << " " << std::endl; - os << details << std::endl; - os << " " << std::endl; - } - - // write history states - NodeSet histories = DOMUtils::filterChildElements(_xmlNSPrefix + "history", stateElem); - for (size_t i = 0; i < histories.size(); i++) { - os << " history: " << ATTR_CAST(histories[i], "id") << "" << std::endl; - - } - - os << "" << std::endl << getPrefix() << ">" << std::endl; - - _indentation--; - os << getPrefix() << "];" << std::endl; - - for (std::set::iterator initIter = dotState.initialchilds.begin(); initIter != dotState.initialchilds.end(); initIter++) { - std::string destId = *initIter; - DotEdge edge(stateId, destId); - edge.type = EDGE_INITAL; - if (_graph.find(destId) != _graph.end()) - _edges.insert(edge); - } - - } - - // recurse into children and search others to draw - NodeSet childElems = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, stateElem); - for (size_t i = 0; i < childElems.size(); i++) { - Element childElem(childElems[i]); - if (InterpreterImpl::isState(Element(childElem))) { - writeStateElement(os, childElem); - } - } - - if (subgraph) { - _indentation--; - os << getPrefix() << "} #" << stateId << std::endl; - _indentation--; - } -} - -void SCXMLDotWriter::writePerTransitionPorts(std::ostream& os, const DotState& dotState, int stateLines) { - // TODO: Not implemented -} - -void SCXMLDotWriter::writePerEventPorts(std::ostream& os, const DotState& dotState, int stateLines) { - // std::multimap > events; // key is event name, value is transitions that react - - std::string stateId = idForNode(dotState.node); - DotState::mmap_s_e_t::const_iterator destIterF, destIterB; - - for(DotState::mmap_s_e_t::const_iterator it = dotState.events.begin(), end = dotState.events.end(); - it != end; - it = dotState.events.upper_bound(it->first)) { - os << " first) << "\" align=\"right\">" << it->first << "" << std::endl; - } - -} - -std::string SCXMLDotWriter::htmlLabelForId(const std::string& stateId, int minRows) { - FlatStateIdentifier flatId(stateId); - - std::list::const_iterator listIter; - std::stringstream labelSS; - std::string seperator; - - labelSS << "active: "; - labelSS << "{"; - for (listIter = flatId.getActive().begin(); listIter != flatId.getActive().end(); listIter++) { - labelSS << seperator << *listIter; - seperator = ", "; - } - labelSS << "}"; - - if (flatId.getVisited().size() > 0) { - minRows--; - - labelSS << "
init: "; - - labelSS << "{"; - seperator = ""; - for (listIter = flatId.getVisited().begin(); listIter != flatId.getVisited().end(); listIter++) { - labelSS << seperator << *listIter; - seperator = ", "; - } - labelSS << "}"; - } - - if (flatId.getHistory().size() > 0) { - minRows--; - - seperator = ""; - std::string histSeperator = "
"; - - labelSS << "
history: "; - - std::map >::const_iterator histIter; - for (histIter = flatId.getHistory().begin(); histIter != flatId.getHistory().end(); histIter++) { - labelSS << histSeperator << histIter->first << ": {"; - - for (listIter = histIter->second.begin(); listIter != histIter->second.end(); listIter++) { - labelSS << seperator << *listIter; - seperator = ", "; - } - labelSS << "}"; - seperator = ""; - } - } - return labelSS.str(); -} - - -void SCXMLDotWriter::writePerTargetPorts(std::ostream& os, const DotState& dotState, int stateLines) { - // std::multimap > targets; // key is remote node, transition is element - - int nrOutports = 0; - std::string stateId = idForNode(dotState.node); - - typedef DotState::mmap_s_e_t iter_t; - - // we need to count outports first for vertical padding - for(iter_t::const_iterator targetIter = dotState.targets.begin(), end = dotState.targets.end(); - targetIter != end; - targetIter = dotState.targets.upper_bound(targetIter->first)) { - nrOutports++; - } - - for(iter_t::const_iterator targetIter = dotState.targets.begin(), end = dotState.targets.end(); - targetIter != end; - targetIter = dotState.targets.upper_bound(targetIter->first)) { - - // gather all events that activate the transition - std::string targetId = targetIter->first; - - std::set eventNames; - - DotEdge edge(stateId, targetId); - edge.fromPort = targetId; - - std::pair targetKeyRange = dotState.targets.equal_range(targetId); - for (iter_t::const_iterator transIter = targetKeyRange.first; transIter != targetKeyRange.second; ++transIter) { - const Element& transElem = transIter->second; - - std::list events = tokenize(ATTR(transElem, "event")); - eventNames.insert(events.begin(), events.end()); - - if (events.size() == 0) { - // spontaneous transition - eventNames.insert("#"); - edge.type = EDGE_SPONTANEOUS; - } - } - - if (_graph.find(targetId) != _graph.end()) - _edges.insert(edge); - - std::stringstream outPortSS; - outPortSS << (_isFlat ? htmlLabelForId(targetId) : "" + targetId + "" ); - - if (_isFlat) { - outPortSS << "
events: {"; - } else { - outPortSS << "
{"; - } - - std::string seperator; - for (std::set::const_iterator eventIter = eventNames.begin(); eventIter != eventNames.end(); eventIter++) { - outPortSS << seperator << *eventIter << std::endl; - seperator = ", "; - } - outPortSS << "}"; - - if (nrOutports == 1) { - int missing = stateLines - nrOutports; - while (_isFlat && missing-- >= 1) { - outPortSS << "
"; - } - } - - os << " " << outPortSS.str() << "" << std::endl; - - } -} - -std::string SCXMLDotWriter::getDetailedLabel(const Element& elem, int indentation) { - - /* - - - - - - - - -
onEntry
Details - Nested Content -
- */ - - std::list content; - - NodeList childElems = elem.getChildNodes(); - for (size_t i = 0; i < childElems.getLength(); i++) { - if (childElems.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - Element elem = Element(childElems.item(i)); - - if (InterpreterImpl::isState(elem) || - iequals(TAGNAME(elem), "transition") || - iequals(TAGNAME(elem), "initial") || - false) - continue; - - struct ElemDetails details; - details.name = "" + TAGNAME(elem) + ":"; - - if (iequals(TAGNAME(elem), "history")) { - continue; - } - - // provide details for special elements here - - // param --------- - if (iequals(TAGNAME(elem), "param")) { - if (HAS_ATTR(elem, "name")) - details.name += " " + ATTR(elem, "name") + " = "; - if (HAS_ATTR(elem, "expr")) - details.name += ATTR(elem, "expr"); - if (HAS_ATTR(elem, "location")) - details.name += ATTR(elem, "location"); - } - - // data --------- - if (iequals(TAGNAME(elem), "data")) { - if (HAS_ATTR(elem, "id")) - details.name += " " + ATTR(elem, "id"); - if (HAS_ATTR(elem, "src")) - details.name += ATTR(elem, "src"); - if (HAS_ATTR(elem, "expr")) - details.name += " = " + ATTR(elem, "expr"); - NodeList grandChildElems = elem.getChildNodes(); - for (size_t j = 0; j < grandChildElems.getLength(); j++) { - if (grandChildElems.item(j).getNodeType() == Node_base::TEXT_NODE) { - details.name += dotEscape(grandChildElems.item(j).getNodeValue()); - } - } - } - - // invoke --------- - if (iequals(TAGNAME(elem), "invoke")) { - if (HAS_ATTR(elem, "type")) - details.name += "
type = " + ATTR(elem, "type"); - if (HAS_ATTR(elem, "typeexpr")) - details.name += "
type = " + ATTR(elem, "typeexpr"); - if (HAS_ATTR(elem, "src")) - details.name += "
src = " + ATTR(elem, "src"); - if (HAS_ATTR(elem, "srcexpr")) - details.name += "
src = " + ATTR(elem, "srcexpr"); - if (HAS_ATTR(elem, "id")) - details.name += "
id = " + ATTR(elem, "id"); - if (HAS_ATTR(elem, "idlocation")) - details.name += "
id = " + ATTR(elem, "idlocation"); - } - - // send --------- - if (iequals(TAGNAME(elem), "raise")) { - if (HAS_ATTR(elem, "event ")) - details.name += "
event = " + ATTR(elem, "event"); - } - - // send --------- - if (iequals(TAGNAME(elem), "send")) { - if (HAS_ATTR(elem, "id")) - details.name += "
id = " + ATTR(elem, "id"); - if (HAS_ATTR(elem, "type")) - details.name += "
type = " + ATTR(elem, "type"); - if (HAS_ATTR(elem, "typeexpr")) - details.name += "
type = " + ATTR(elem, "typeexpr"); - if (HAS_ATTR(elem, "event")) - details.name += "
event = " + ATTR(elem, "event"); - if (HAS_ATTR(elem, "eventexpr")) - details.name += "
event = " + ATTR(elem, "eventexpr"); - if (HAS_ATTR(elem, "target")) - details.name += "
target = " + ATTR(elem, "target"); - if (HAS_ATTR(elem, "targetexpr")) - details.name += "
target = " + ATTR(elem, "targetexpr"); - if (HAS_ATTR(elem, "delay")) - details.name += "
delay = " + ATTR(elem, "delay"); - if (HAS_ATTR(elem, "delayexpr")) - details.name += "
delay = " + ATTR(elem, "delayexpr"); - } - - // cancel --------- - if (iequals(TAGNAME(elem), "cancel")) { - if (HAS_ATTR(elem, "sendid")) - details.name += " " + ATTR(elem, "sendid"); - } - - // script --------- - if (iequals(TAGNAME(elem), "script")) { - details.name += " "; - if (HAS_ATTR(elem, "src")) - details.name += ATTR(elem, "src"); - NodeList grandChildElems = childElems.item(i).getChildNodes(); - for (size_t j = 0; j < grandChildElems.getLength(); j++) { - if (grandChildElems.item(j).getNodeType() == Node_base::TEXT_NODE) { - details.name += dotEscape(grandChildElems.item(j).getNodeValue()); - } - } - } - - // if --------- - if (iequals(TAGNAME(elem), "if")) { - if (HAS_ATTR(elem, "cond")) - details.name += " cond = " + dotEscape(ATTR(elem, "cond")); - } - - // elseif --------- - if (iequals(TAGNAME(elem), "elseif")) { - if (HAS_ATTR(elem, "cond")) - details.name += " cond = " + dotEscape(ATTR(elem, "cond")); - } - - // log --------- - if (iequals(TAGNAME(elem), "log")) { - details.name += " "; - if (HAS_ATTR(elem, "label")) - details.name += ATTR(elem, "label") + " = "; - if (HAS_ATTR(elem, "expr")) - details.name += ATTR(elem, "expr"); - } - - // foreach --------- - if (iequals(TAGNAME(elem), "foreach")) { - if (HAS_ATTR(elem, "item")) - details.name += "
  item = " + ATTR(elem, "item"); - if (HAS_ATTR(elem, "array")) - details.name += "
  array = " + ATTR(elem, "array"); - if (HAS_ATTR(elem, "index")) - details.name += "
  index = " + ATTR(elem, "index"); - } - - // recurse - details.content = getDetailedLabel((Element)childElems.item(i), indentation + 1); - content.push_back(details); - } - - std::stringstream ssContent; - - if (content.size() > 0) { - ssContent << ""; - - std::list::iterator contentIter = content.begin(); - while(contentIter != content.end()) { - ssContent << ""; -// ssContent << ""; - ssContent << ""; - ssContent << ""; - - if (contentIter->content.size() > 0) { - ssContent << ""; -// ssContent << ""; - ssContent << ""; - ssContent << ""; - } - contentIter++; - - } - ssContent << "
" << contentIter->name << "" << contentIter->name << "
" << contentIter->details << "" << contentIter->content << "
"; - } - return ssContent.str(); -} - -std::string SCXMLDotWriter::portEscape(const std::string& text) { - std::string escaped(text); - boost::replace_all(escaped, ".", "-"); - boost::replace_all(escaped, "{", "-"); - boost::replace_all(escaped, "}", "-"); - boost::replace_all(escaped, ":", "-"); - return escaped; -} - -std::string SCXMLDotWriter::dotEscape(const std::string& text) { - std::string escaped(text); - boost::replace_all(escaped, " ", " "); - boost::replace_all(escaped, "\t", "   "); - boost::replace_all(escaped, "<", "<"); - boost::replace_all(escaped, ">", ">"); - boost::replace_all(escaped, "\"", """); - boost::replace_all(escaped, "\n", "
"); - - return escaped; -} - -std::string SCXMLDotWriter::colorForIndent(int indent) { - int color = 255 - (16 * indent); - std::stringstream ss; - ss << std::hex << color; - ss << std::hex << color; - ss << std::hex << color; - return ss.str(); -} - -std::string SCXMLDotWriter::nameForNode(const Node& node) { - std::string elemName; - if (node.getNodeType() == Node_base::ELEMENT_NODE) { - Element elem = (Element)node; - - if (InterpreterImpl::isFinal(elem) && _isFlat) { - // ignore visited and history with final elements - FlatStateIdentifier flatId(elem.getAttribute("id")); - return "" + flatId.getActive().front() + ""; - } - - if (elem.hasAttribute("id") && _isFlat) { - elemName = htmlLabelForId(elem.getAttribute("id")); - if (elemName.size() > 0) - return elemName; - } else if (elem.getTagName() == "scxml") { - if (elem.hasAttribute("name") && !UUID::isUUID(elem.getAttribute("name"))) { - elemName += elem.getAttribute("name"); - } else if (elem.hasAttribute("id") && !UUID::isUUID(elem.getAttribute("id"))) { - elemName += elem.getAttribute("id"); - } - } else if (InterpreterImpl::isCompound(elem)) { - elemName = "Compound: " + elem.getAttribute("id"); - } else if (InterpreterImpl::isParallel(elem)) { - elemName = "Parallel: " + elem.getAttribute("id"); - } else if (elem.hasAttribute("id")) { - elemName += elem.getAttribute("id"); - } - } - - if (elemName.size() == 0) - elemName = boost::lexical_cast(node.getLocalName()); - - return "" + elemName + ""; - -} - -std::string SCXMLDotWriter::idForNode(const Node& node) { - std::string elemId; - - // try to get the id as the name or id attribute - if (node.getNodeType() == Node_base::ELEMENT_NODE) { - Element elem = (Element)node; - -// if (InterpreterImpl::isFinal(elem) && _isFlat) { -// // ignore visited and history with final elements -// FlatStateIdentifier flatId(elem.getAttribute("id")); -// -// std::stringstream activeSS; -// activeSS << "active-"; -// for (std::list::const_iterator activeIter = flatId.getActive().begin(); activeIter != flatId.getActive().end(); activeIter++) { -// activeSS << *activeIter << "-"; -// } -// return activeSS.str(); -// } - - if (elem.hasAttribute("name")) { - elemId = elem.getAttribute("name"); - } else if (elem.hasAttribute("id")) { - elemId = elem.getAttribute("id"); - } - } - - // no luck, create id from position in tree - if (elemId.size() == 0) { - Node tmpParent = node; - Node tmpIndex; - do { - if (tmpParent.getNodeType() != Node_base::ELEMENT_NODE) - continue; - - tmpIndex = tmpParent; - int index = 0; - - while((tmpIndex = tmpIndex.getPreviousSibling())) - index++; - - std::stringstream ssElemId; - ssElemId << TAGNAME_CAST(tmpParent) << index << "."; - elemId = ssElemId.str() + elemId; - } while ((tmpParent = tmpParent.getParentNode())); -// elemId = ssElemId.str(); - } - return elemId; -} - -} \ No newline at end of file diff --git a/src/uscxml/debug/SCXMLDotWriter.h b/src/uscxml/debug/SCXMLDotWriter.h deleted file mode 100644 index f6c8b3d..0000000 --- a/src/uscxml/debug/SCXMLDotWriter.h +++ /dev/null @@ -1,201 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef SCXMLDOTWRITER_H_AOP0OHXX -#define SCXMLDOTWRITER_H_AOP0OHXX - -#include "uscxml/Interpreter.h" -#include -#include -#include -#include - -#undef max -#include - -namespace uscxml { - -class Interpreter; - - - -/** - * This writer, added as a monitor will output .dot files. - * - * # create a set of pdfs form the dot files - * $ dot -Tpdf -O *.dot - * or - * $ find . -name "*.dot" -exec dot -Tpdf -O {} \; - * - * # create a movie from the pdfs - * $ dot -Tgif -O *.dot - * or - * $ find . -name "*.dot" -exec dot -Tgif -O {} \; - * - * $ ffmpeg -r 3 -i .%06d.dot.gif -r 25 movie.mpg - * $ convert -delay 20 *.gif animated.gif - * - * # unflatten can be used to create more compact graphs - * find . -name "*.dot" -exec unflatten -f -l2 -o {}.flat.dot {} \; - */ -class USCXML_API SCXMLDotWriter : public InterpreterMonitor { -public: - - enum PortType { - PORT_TARGET, - PORT_EVENT, - PORT_TRANSITION - }; - - struct StateAnchor { - StateAnchor() : childDepth(std::numeric_limits::max()), transDepth(std::numeric_limits::max()), type(PORT_TARGET) {} - Arabica::DOM::Element element; - int32_t childDepth; - int32_t transDepth; - - PortType type; - - operator bool() const { - return childDepth != -1 || transDepth != -1 || element; - } - }; - - struct ElemDetails { - std::string name; - std::string details; - std::string content; - }; - - struct DotState { - DotState() : isBorder(false), portType(PORT_TARGET) {} - Arabica::DOM::Element node; - Arabica::XPath::NodeSet transitions; - std::multimap > targets; // key is remote node, transition is element - std::multimap > events; // key is event name, value is transitions that react - - bool isBorder; - PortType portType; - - std::set childs; - std::set initialchilds; - - typedef std::multimap > mmap_s_e_t; - }; - - enum EdgeType { - EDGE_INITAL, - EDGE_TRANSIION, - EDGE_SPONTANEOUS - }; - - struct DotEdge { - DotEdge() : type(EDGE_TRANSIION) {} - DotEdge(const std::string& from, const std::string& to) : type(EDGE_TRANSIION), from(from), to(to) { - } - - bool operator< (const DotEdge& other) const { - return from + fromPort + to + toPort > other.from + other.fromPort + other.to + other.toPort; - } - - EdgeType type; - std::string from; - std::string fromCompass; - std::string fromPort; - std::string to; - std::string toPort; - std::string toCompass; - }; - - SCXMLDotWriter(); - ~SCXMLDotWriter(); - - virtual void onStableConfiguration(Interpreter interpreter); - virtual void afterCompletion(Interpreter interpreter); - virtual void beforeTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing); - virtual void beforeMicroStep(Interpreter interpreter); - - static std::string htmlLabelForId(const std::string& stateId, int minRows = 0); - - static void toDot(const std::string& filename, - Interpreter interpreter, - const Arabica::DOM::Element& transition = Arabica::DOM::Element()) { - std::list emptyAnchors = std::list(); - toDot(filename, interpreter, emptyAnchors, transition); - } - - - static void toDot(const std::string& filename, - Interpreter interpreter, - const std::list& stateAnchors, - const Arabica::DOM::Element& transition = Arabica::DOM::Element()); - - void writeTo(std::ostream& os); - - std::string getDetailedLabel(const Arabica::DOM::Element& elem, int indentation = 0); - std::string colorForIndent(int indent); - - std::string idForNode(const Arabica::DOM::Node& node); - std::string nameForNode(const Arabica::DOM::Node& node); - std::string getPrefix(); - - static std::string dotEscape(const std::string& text); - static std::string portEscape(const std::string& text); - -protected: - - SCXMLDotWriter(Interpreter interpreter, - const std::list& stateAnchors, - const Arabica::DOM::Element& transition); - - void assembleGraph(const Arabica::DOM::Element& start, - int32_t childDepth = std::numeric_limits::max(), - int32_t transDepth = std::numeric_limits::max()); - void writeStateElement(std::ostream& os, const Arabica::DOM::Element& state); - - void writePerTransitionPorts(std::ostream& os, const DotState& dotState, int stateLines = 0); - void writePerEventPorts(std::ostream& os, const DotState& dotState, int stateLines = 0); - void writePerTargetPorts(std::ostream& os, const DotState& dotState, int stateLines = 0); - - void writeUnknownNode(std::ostream& os, const std::string& targetId); - - int _iteration; - std::set _knownIds; - std::set _unknownNodes; - int _indentation; - - std::map _graph; - std::set _edges; - - // these are only set in ephemeral instances per monitor call - Arabica::DOM::Element _transition; - Arabica::DOM::Element _scxml; - Interpreter _interpreter; - bool _isFlat; - - std::string _xmlNSPrefix; - std::list _anchors; - std::map _histories; - - PortType _portType; - -}; - -} - -#endif /* end of include guard: SCXMLDOTWRITER_H_AOP0OHXX */ diff --git a/src/uscxml/dom/DOMUtils.cpp b/src/uscxml/dom/DOMUtils.cpp deleted file mode 100644 index 137d0ef..0000000 --- a/src/uscxml/dom/DOMUtils.cpp +++ /dev/null @@ -1,288 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/Common.h" -#include "uscxml/UUID.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/Convenience.h" - -#include -#include - -namespace uscxml { - -using namespace Arabica::XPath; -using namespace Arabica::DOM; - -bool DOMUtils::attributeIsTrue(const::std::string& value) { - return stringIsTrue(value.c_str()); -} - -std::string DOMUtils::idForNode(const Arabica::DOM::Node& node) { - std::string nodeId; - std::string seperator; - Arabica::DOM::Node curr = node; - while(curr) { - switch (curr.getNodeType()) { - case Arabica::DOM::Node_base::ELEMENT_NODE: { - Arabica::DOM::Element elem = Arabica::DOM::Element(curr); - if (HAS_ATTR(elem, "id") && !UUID::isUUID(ATTR(elem, "id"))) { - std::string elementId = ATTR(elem, "id"); - boost::replace_all(elementId, ".", "_"); - boost::replace_all(elementId, ",", "_"); - nodeId.insert(0, elementId + seperator); - seperator = "_"; - return nodeId; - } else { - Arabica::DOM::Node sibling = curr.getPreviousSibling(); - int index = 0; - while(sibling) { - if (sibling.getNodeType() == Arabica::DOM::Node_base::ELEMENT_NODE) { - if (iequals(TAGNAME_CAST(sibling), TAGNAME(elem))) { - index++; - } - } - sibling = sibling.getPreviousSibling(); - } - nodeId.insert(0, TAGNAME(elem) + toStr(index) + seperator); - seperator = "_"; - } - break; - } - case Arabica::DOM::Node_base::DOCUMENT_NODE: - return nodeId; - } - - curr = curr.getParentNode(); - } - return nodeId; -} - -std::string DOMUtils::xPathForNode(const Arabica::DOM::Node& node, const std::string& ns) { - std::string xPath; - std::string nsPrefix; - - if (ns.size() > 0) { - nsPrefix = ns + ":"; - } - - if (!node || node.getNodeType() != Arabica::DOM::Node_base::ELEMENT_NODE) - return xPath; - - Arabica::DOM::Node curr = node; - while(curr) { - switch (curr.getNodeType()) { - case Arabica::DOM::Node_base::ELEMENT_NODE: { - Arabica::DOM::Element elem = Arabica::DOM::Element(curr); - if (HAS_ATTR(elem, "id") && !UUID::isUUID(ATTR(elem, "id"))) { - // we assume ids to be unique and return immediately - if (ns == "*") { - xPath.insert(0, "//*[local-name() = \"" + TAGNAME(elem) + "\"][@id=\"" + ATTR(elem, "id") + "\"]"); - } else { - xPath.insert(0, "//" + nsPrefix + TAGNAME(elem) + "[@id=\"" + ATTR(elem, "id") + "\"]"); - } - return xPath; - } else { - // check previous siblings to count our index - Arabica::DOM::Node sibling = curr.getPreviousSibling(); - int index = 1; // xpath indices start at 1 - while(sibling) { - if (sibling.getNodeType() == Arabica::DOM::Node_base::ELEMENT_NODE) { - if (iequals(TAGNAME_CAST(sibling), TAGNAME(elem))) { - index++; - } - } - sibling = sibling.getPreviousSibling(); - } - if (ns == "*") { - xPath.insert(0, "/*[local-name() = \"" + TAGNAME(elem) + "\"][" + toStr(index) + "]"); - } else { - xPath.insert(0, "/" + nsPrefix + TAGNAME(elem) + "[" + toStr(index) + "]"); - } - } - break; - } - case Arabica::DOM::Node_base::DOCUMENT_NODE: - return xPath; - default: - LOG(ERROR) << "Only nodes of type element supported for now"; - return ""; - break; - } - curr = curr.getParentNode(); - } - return xPath; -} - -NodeSet DOMUtils::inPostFixOrder(const std::set& elements, - const Element& root, - const bool includeEmbeddedDoc) { - NodeSet nodes; - inPostFixOrder(elements, root, includeEmbeddedDoc, nodes); - return nodes; -} - -void DOMUtils::inPostFixOrder(const std::set& elements, - const Element& root, - const bool includeEmbeddedDoc, - NodeSet& nodes) { - NodeList children = root.getChildNodes(); - for (size_t i = 0; i < children.getLength(); i++) { - if (children.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - Arabica::DOM::Element childElem(children.item(i)); - if (!includeEmbeddedDoc && LOCALNAME(childElem) == "scxml") - continue; - inPostFixOrder(elements, childElem, includeEmbeddedDoc, nodes); - - } - for (size_t i = 0; i < children.getLength(); i++) { - if (children.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - Arabica::DOM::Element childElem(children.item(i)); - if (!includeEmbeddedDoc && LOCALNAME(childElem) == "scxml") - continue; - - if (elements.find(TAGNAME(childElem)) != elements.end()) { - nodes.push_back(childElem); - } - } -} - -NodeSet DOMUtils::inDocumentOrder(const std::set& elements, - const Element& root, - const bool includeEmbeddedDoc) { - NodeSet nodes; - inDocumentOrder(elements, root, includeEmbeddedDoc, nodes); - return nodes; -} - -void DOMUtils::inDocumentOrder(const std::set& elements, - const Element& root, - const bool includeEmbeddedDoc, - NodeSet& nodes) { - if (elements.find(TAGNAME(root)) != elements.end()) { - nodes.push_back(root); - } - - NodeList children = root.getChildNodes(); - for (size_t i = 0; i < children.getLength(); i++) { - if (children.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - if (!includeEmbeddedDoc && LOCALNAME_CAST(children.item(i)) == "scxml") - continue; - Arabica::DOM::Element childElem(children.item(i)); - inDocumentOrder(elements, childElem, includeEmbeddedDoc, nodes); - } -} - -std::list > DOMUtils::getElementsByType(const Arabica::DOM::Node& root, Arabica::DOM::Node_base::Type type) { - std::list > result; - std::list > stack; - std::list >::iterator stackIter; - - if (!root) - return result; - - stack.push_back(root); - while(stack.size() > 0) { -// for(stackIter = stack.begin(); stackIter != stack.end(); stackIter++) { -// std::cout << stackIter->getNodeType() << " " << stackIter->getLocalName() << " " << stackIter->getNodeValue() << std::endl; -// } -// std::cout << std::endl; - - Arabica::DOM::Node currNode = stack.back(); - if (currNode.hasChildNodes()) { - stack.push_back(currNode.getFirstChild()); - continue; - } - - // roll back stack and pop everyone without next sibling - do { - currNode = stack.back(); - if (currNode.getNodeType() == type) - result.push_back(currNode); - stack.pop_back(); - if (currNode.getNextSibling()) { - stack.push_back(currNode.getNextSibling()); - break; - } - } while(stack.size() > 0); - } - return result; -} - - -NodeSet DOMUtils::filterChildElements(const std::string& tagName, const NodeSet& nodeSet, bool recurse) { - NodeSet filteredChildElems; - for (unsigned int i = 0; i < nodeSet.size(); i++) { - filteredChildElems.push_back(filterChildElements(tagName, nodeSet[i], recurse)); - } - return filteredChildElems; -} - -NodeSet DOMUtils::filterChildElements(const std::string& tagName, const Node& node, bool recurse) { - NodeSet filteredChildElems; - - if (!node) - return filteredChildElems; - - NodeList childs = node.getChildNodes(); - for (unsigned int i = 0; i < childs.getLength(); i++) { - if (childs.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - // std::cerr << TAGNAME(childs.item(i)) << std::endl; - if(iequals(TAGNAME_CAST(childs.item(i)), tagName)) { - filteredChildElems.push_back(childs.item(i)); - } - if (recurse) { - filteredChildElems.push_back(filterChildElements(tagName, childs.item(i), recurse)); - } - } - return filteredChildElems; -} - - -NodeSet DOMUtils::filterChildType(const Node_base::Type type, const NodeSet& nodeSet, bool recurse) { - NodeSet filteredChildType; - for (unsigned int i = 0; i < nodeSet.size(); i++) { - filteredChildType.push_back(filterChildType(type, nodeSet[i], recurse)); - } - return filteredChildType; -} - -NodeSet DOMUtils::filterChildType(const Node_base::Type type, const Node& node, bool recurse) { - NodeSet filteredChildTypes; - - if (!node) - return filteredChildTypes; - - NodeList childs = node.getChildNodes(); - for (unsigned int i = 0; i < childs.getLength(); i++) { - if (childs.item(i).getNodeType() == type) - filteredChildTypes.push_back(childs.item(i)); - if (recurse) { - filteredChildTypes.push_back(filterChildType(type, childs.item(i), recurse)); - } - } - return filteredChildTypes; -} - - -} \ No newline at end of file diff --git a/src/uscxml/dom/DOMUtils.h b/src/uscxml/dom/DOMUtils.h deleted file mode 100644 index 5c61f6d..0000000 --- a/src/uscxml/dom/DOMUtils.h +++ /dev/null @@ -1,111 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef DOMUTILS_H_WK0WAEA7 -#define DOMUTILS_H_WK0WAEA7 - -#include "uscxml/Common.h" -#include -#include -#include -#include // operator<< for nodes -#include - -#define TAGNAME_CAST(elem) ((Arabica::DOM::Element)elem).getTagName() -#define LOCALNAME_CAST(elem) ((Arabica::DOM::Element)elem).getLocalName() -#define ATTR_CAST(elem, attr) ((Arabica::DOM::Element)elem).getAttribute(attr) -#define ATTR_NODE_CAST(elem, attr) ((Arabica::DOM::Element)elem).getAttributeNode(attr) -#define HAS_ATTR_CAST(elem, attr) ((Arabica::DOM::Element)elem).hasAttribute(attr) - -#define TAGNAME(elem) elem.getTagName() -#define LOCALNAME(elem) elem.getLocalName() -#define ATTR(elem, attr) elem.getAttribute(attr) -#define ATTR_NODE(elem, attr) elem.getAttributeNode(attr) -#define HAS_ATTR(elem, attr) elem.hasAttribute(attr) - -namespace uscxml { - -class USCXML_API DOMUtils { -public: - - static std::string xPathForNode(const Arabica::DOM::Node& node, const std::string& ns = ""); - static std::list > getElementsByType(const Arabica::DOM::Node& root, Arabica::DOM::Node_base::Type type); - static std::string idForNode(const Arabica::DOM::Node& node); - // deprecated, use stringIsTrue from Convenience.h instead - DEPRECATED static bool attributeIsTrue(const::std::string& value); - - static Arabica::XPath::NodeSet inPostFixOrder(const std::string& element, - const Arabica::DOM::Element& root, - const bool includeEmbeddedDoc = false) { - std::set elements; - elements.insert(element); - return inPostFixOrder(elements, root, includeEmbeddedDoc); - } - - static Arabica::XPath::NodeSet inPostFixOrder(const std::set& elements, - const Arabica::DOM::Element& root, - const bool includeEmbeddedDoc = false); - - static Arabica::XPath::NodeSet inDocumentOrder(const std::string& element, - const Arabica::DOM::Element& root, - const bool includeEmbeddedDoc = false) { - std::set elements; - elements.insert(element); - return inDocumentOrder(elements, root, includeEmbeddedDoc); - } - - static Arabica::XPath::NodeSet inDocumentOrder(const std::set& elements, - const Arabica::DOM::Element& root, - const bool includeEmbeddedDoc = false); - - static Arabica::XPath::NodeSet filterChildElements(const std::string& tagname, - const Arabica::DOM::Node& node, - bool recurse = false); - - static Arabica::XPath::NodeSet filterChildElements(const std::string& tagName, - const Arabica::XPath::NodeSet& nodeSet, - bool recurse = false); - - static Arabica::XPath::NodeSet filterChildType(const Arabica::DOM::Node_base::Type type, - const Arabica::DOM::Node& node, - bool recurse = false); - - static Arabica::XPath::NodeSet filterChildType(const Arabica::DOM::Node_base::Type type, - const Arabica::XPath::NodeSet& nodeSet, - bool recurse = false); - -protected: - static void inPostFixOrder(const std::set& elements, - const Arabica::DOM::Element& root, - const bool includeEmbeddedDoc, - Arabica::XPath::NodeSet& nodes); - - static void inDocumentOrder(const std::set& elements, - const Arabica::DOM::Element& root, - const bool includeEmbeddedDoc, - Arabica::XPath::NodeSet& nodes); - - -}; - - -} - - -#endif /* end of include guard: DOMUTILS_H_WK0WAEA7 */ diff --git a/src/uscxml/dom/NameSpacingParser.cpp b/src/uscxml/dom/NameSpacingParser.cpp deleted file mode 100644 index 0e26b55..0000000 --- a/src/uscxml/dom/NameSpacingParser.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file - * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/dom/NameSpacingParser.h" -#include -#include -#include - -namespace uscxml { - -using namespace Arabica::XPath; -using namespace Arabica::DOM; - -NameSpacingParser NameSpacingParser::fromFile(const std::string& file) { - Arabica::SAX::InputSource inputSource; - inputSource.setSystemId(file); - return fromInputSource(inputSource); -} - -NameSpacingParser NameSpacingParser::fromXML(const std::string& xml) { - std::stringstream* ss = new std::stringstream(); - (*ss) << xml; - // we need an auto_ptr for arabica to assume ownership - std::auto_ptr ssPtr(ss); - Arabica::SAX::InputSource inputSource; - inputSource.setByteStream(ssPtr); - return fromInputSource(inputSource); -} - -NameSpacingParser NameSpacingParser::fromInputSource(Arabica::SAX::InputSource& source) { - NameSpacingParser parser; - if(!parser.parse(source) || !parser.getDocument().hasChildNodes()) { - if(parser._errorHandler.errorsReported()) { -// LOG(ERROR) << "could not parse input:"; -// LOG(ERROR) << parser._errorHandler.errors() << std::endl; - } else { - Arabica::SAX::InputSourceResolver resolver(source, Arabica::default_string_adaptor()); - if (!resolver.resolve()) { - LOG(ERROR) << source.getSystemId() << ": no such file"; - } - } - } - return parser; -} - -NameSpacingParser::NameSpacingParser() { - setErrorHandler(_errorHandler); -} - -void NameSpacingParser::startPrefixMapping(const std::string& prefix, const std::string& uri) { - nameSpace.insert(std::make_pair(uri, prefix)); -} - - -} \ No newline at end of file diff --git a/src/uscxml/dom/NameSpacingParser.h b/src/uscxml/dom/NameSpacingParser.h deleted file mode 100644 index 1aa85a2..0000000 --- a/src/uscxml/dom/NameSpacingParser.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - * @file - * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef NAMESPACINGPARSER_H_BD6902F6 -#define NAMESPACINGPARSER_H_BD6902F6 - -#include "uscxml/Common.h" -#include -#include -#include // operator<< for nodes -#include -#include -#include - -namespace uscxml { - -class ScriptEntityResolver : public Arabica::SAX::EntityResolver { - virtual InputSourceT resolveEntity(const std::string& publicId, const std::string& systemId) { - Arabica::SAX::InputSource is; - return is; - } -}; - -class USCXML_API NameSpacingParser : public Arabica::SAX2DOM::Parser { -public: - NameSpacingParser(); - NameSpacingParser(const NameSpacingParser& other) {} - static NameSpacingParser fromFile(const std::string& file); - static NameSpacingParser fromXML(const std::string& xml); - static NameSpacingParser fromInputSource(Arabica::SAX::InputSource& source); - - void startPrefixMapping(const std::string& prefix, const std::string& uri); - - std::map nameSpace; - - virtual bool errorsReported() { - return _errorHandler.errorsReported(); - } - - virtual const std::string& errors() { - return _errorHandler.errors(); - } - -private: - Arabica::SAX::CatchErrorHandler _errorHandler; -}; - -} - - -#endif /* end of include guard: NAMESPACINGPARSER_H_BD6902F6 */ diff --git a/src/uscxml/interpreter/ContentExecutorImpl.cpp b/src/uscxml/interpreter/ContentExecutorImpl.cpp new file mode 100644 index 0000000..6a06bec --- /dev/null +++ b/src/uscxml/interpreter/ContentExecutorImpl.cpp @@ -0,0 +1,649 @@ +/** + * @file + * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#include "ContentExecutorImpl.h" +#include "uscxml/util/String.h" +#include "uscxml/util/Predicates.h" +#include "uscxml/util/UUID.h" +#include "uscxml/util/URL.h" +#include "uscxml/messages/Data.h" + +#include +#include +#include + +#include "easylogging++.h" + +namespace uscxml { + +using namespace xercesc; + +void BasicContentExecutorImpl::processRaise(xercesc::DOMElement* content) { + Event raised(ATTR(content, "event")); + _callbacks->enqueueInternal(raised); +} + +void BasicContentExecutorImpl::processSend(xercesc::DOMElement* element) { + Event sendEvent; + std::string target; + std::string type = "http://www.w3.org/TR/scxml/#SCXMLEventProcessor"; // default + uint32_t delayMs = 0; + + // test 331 + sendEvent.eventType = Event::EXTERNAL; + + // test 228 + std::string invokeId = _callbacks->getInvokeId(); + if (invokeId.size() > 0) { + sendEvent.invokeid = invokeId; + } + + try { + // event + if (HAS_ATTR(element, "eventexpr")) { + sendEvent.name = _callbacks->evalAsData(ATTR(element, "eventexpr")).atom; + } else if (HAS_ATTR(element, "event")) { + sendEvent.name = ATTR(element, "event"); + } + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in send element eventexpr", element); + } + + try { + // target + if (HAS_ATTR(element, "targetexpr")) { + target = _callbacks->evalAsData(ATTR(element, "targetexpr")).atom; + } else if (HAS_ATTR(element, "target")) { + target = ATTR(element, "target"); + } + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in send element targetexpr", element); + } + + try { + // type + if (HAS_ATTR(element, "typeexpr")) { + type = _callbacks->evalAsData(ATTR(element, "typeexpr")).atom; + } else if (HAS_ATTR(element, "type")) { + type = ATTR(element, "type"); + } + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in send element typeexpr", element); + } + + try { + // id + if (HAS_ATTR(element, "id")) { + sendEvent.sendid = ATTR(element, "id"); + } else { + /* + * The ids for and are subtly different. In a conformant + * SCXML document, they must be unique within the session, but in the case + * where the author does not provide them, the processor must generate a + * new unique ID not at load time but each time the element is executed. + * Furthermore the attribute 'idlocation' can be used to capture this + * automatically generated id. Finally note that the automatically generated + * id for has a special format. See 6.4.1 Attribute Details for + * details. The SCXML processor may generate all other ids in any format, + * as long as they are unique. + */ + + /** + * + * If 'idlocation' is present, the SCXML Processor must generate an id when + * the parent element is evaluated and store it in this location. + * See 3.14 IDs for details. + * + */ + sendEvent.sendid = ATTR(getParentState(element), "id") + "." + UUID::getUUID(); + if (HAS_ATTR(element, "idlocation")) { + _callbacks->assign(ATTR(element, "idlocation"), Data(sendEvent.sendid, Data::VERBATIM)); + } else { + sendEvent.hideSendId = true; + } + } + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in send element idlocation", element); + } + + try { + // delay + std::string delay; + if (HAS_ATTR(element, "delayexpr")) { + delay = _callbacks->evalAsData(ATTR(element, "delayexpr")); + } else if (HAS_ATTR(element, "delay")) { + delay = ATTR(element, "delay"); + } + if (delay.size() > 0) { + NumAttr delayAttr(delay); + if (iequals(delayAttr.unit, "ms")) { + delayMs = strTo(delayAttr.value); + } else if (iequals(delayAttr.unit, "s")) { + delayMs = strTo(delayAttr.value) * 1000; + } else if (delayAttr.unit.length() == 0) { // unit less delay is interpreted as milliseconds + delayMs = strTo(delayAttr.value); + } else { + LOG(ERROR) << "Cannot make sense of delay value " << delay << ": does not end in 's' or 'ms'"; + } + } + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in send element delayexpr", element); + } + + try { + // namelist + processNameLists(sendEvent.namelist, element); + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in send element namelist", element); + } + + + try { + // params + processParams(sendEvent.params, element); + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in send element param expr", element); + } + + try { + // content + std::list contents = DOMUtils::filterChildElements(XML_PREFIX(element).str() + "content", element); + if (contents.size() > 0) { + sendEvent.data = elementAsData(contents.front()); + } + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in send element content", element); + } + + // if (sendReq->dom) { + // std::stringstream ss; + // ss << sendReq->dom; + // sendReq->xml = ss.str(); + // _dataModel.replaceExpressions(sendReq->xml); + // } + + // assert(_sendIds.find(sendReq->sendid) == _sendIds.end()); + // _sendIds[sendReq->sendid] = std::make_pair(this, sendReq); + + try { + _callbacks->checkValidSendType(type, target); + } catch (ErrorEvent e) { + e.data.compound["xpath"] = uscxml::Data(DOMUtils::xPathForNode(element), uscxml::Data::VERBATIM); + // test 332 + e.sendid = sendEvent.sendid; + throw e; + } + _callbacks->enqueue(type, target, delayMs, sendEvent); + +} + +void BasicContentExecutorImpl::processCancel(xercesc::DOMElement* content) { + std::string sendid; + if (HAS_ATTR(content, "sendid")) { + sendid = ATTR(content, "sendid"); + } else if (HAS_ATTR(content, "sendidexpr")) { + sendid = _callbacks->evalAsData(ATTR(content, "sendidexpr")).atom; + } else { + ERROR_EXECUTION_THROW2("Cancel element has neither sendid nor sendidexpr attribute", content); + + } + _callbacks->cancelDelayed(sendid); +} + +void BasicContentExecutorImpl::processIf(xercesc::DOMElement* content) { + bool blockIsTrue = _callbacks->isTrue(ATTR(content, "cond")); + + DOMNodeList* children = content->getChildNodes(); + for (unsigned int i = 0; i < children->getLength(); i++) { + if (children->item(i)->getNodeType() != DOMNode::ELEMENT_NODE) + continue; + + DOMElement* childElem = dynamic_cast(children->item(i)); + + if (iequals(TAGNAME(childElem), XML_PREFIX(content).str() + "elseif")) { + if (blockIsTrue) { + // last block was true, break here + break; + } + blockIsTrue = _callbacks->isTrue(ATTR(childElem, "cond")); + continue; + } + if (iequals(TAGNAME(childElem), XML_PREFIX(content).str() + "else")) { + if (blockIsTrue) { + // last block was true, break here + break; + } + blockIsTrue = true; + continue; + } + + // current block is true + if (blockIsTrue) { + // we do now that the prefix of content is correct + process(childElem, XML_PREFIX(content)); + } + } +} + +void BasicContentExecutorImpl::processAssign(xercesc::DOMElement* content) { + std::string location = ATTR(content, "location"); + _callbacks->assign(location, elementAsData(content)); +} + +void BasicContentExecutorImpl::processForeach(xercesc::DOMElement* content) { + std::string array = ATTR(content, "array"); + std::string item = ATTR(content, "item"); + std::string index = (HAS_ATTR(content, "index") ? ATTR(content, "index") : ""); + + uint32_t iterations = 0; + iterations = _callbacks->getLength(array); + + for (uint32_t iteration = 0; iteration < iterations; iteration++) { + _callbacks->setForeach(item, array, index, iteration); + + DOMNodeList* children = content->getChildNodes(); + for (unsigned int i = 0; i < children->getLength(); i++) { + if (children->item(i)->getNodeType() != DOMNode::ELEMENT_NODE) + continue; + process(dynamic_cast(children->item(i)), XML_PREFIX(content)); + } + } +} + +void BasicContentExecutorImpl::processLog(xercesc::DOMElement* content) { + std::string label = ATTR(content, "label"); + std::string expr = ATTR(content, "expr"); + + Data d = _callbacks->evalAsData(expr); + if (label.size() > 0) { + std::cout << label << ": "; + } + std::cout << d << std::endl; +} + +void BasicContentExecutorImpl::processScript(xercesc::DOMElement* content) { + // download as necessary + std::string scriptContent(X(content->getTextContent())); + _callbacks->evalAsData(scriptContent); + +} + +void BasicContentExecutorImpl::process(xercesc::DOMElement* block, const X& xmlPrefix) { + std::string tagName = TAGNAME(block); + + + if (iequals(tagName, xmlPrefix.str() + "onentry") || + iequals(tagName, xmlPrefix.str() + "onexit") || + iequals(tagName, xmlPrefix.str() + "transition")) { + + DOMNodeList* children = block->getChildNodes(); + try { + for(auto i = 0; i < children->getLength(); i++) { + if (children->item(i)->getNodeType() != DOMNode::ELEMENT_NODE) + continue; + // process any child eleents + process(dynamic_cast(children->item(i)), xmlPrefix); + } + } catch (Event e) { + // there has been an error in an executable content block + // we do not care - parent scope has to handle it! + throw e; + } + return; + } + + if (iequals(tagName, xmlPrefix.str() + "finalize")) { + std::list childElems = DOMUtils::filterChildType(DOMNode::ELEMENT_NODE, block, false); + if(childElems.size() > 0) { + for(auto elemIter = childElems.begin(); elemIter != childElems.end(); elemIter++) { + process(static_cast(*elemIter), xmlPrefix); + } + } else { + // issue 67 - empty finalize element + DOMNode* parent = block->getParentNode(); + if (parent && parent->getNodeType() == DOMNode::ELEMENT_NODE) { + DOMElement* invokeElem = static_cast(parent); + if (iequals(X(invokeElem->getTagName()).str(), xmlPrefix.str() + "invoke")) { + // we are the empth finalize element of an invoke + // Specification 6.5.2: http://www.w3.org/TR/scxml/#N110EF + + const Event& event = _callbacks->getCurrentEvent(); + std::list names = tokenize(ATTR(invokeElem, "namelist")); + for (std::list::iterator nameIter = names.begin(); nameIter != names.end(); nameIter++) { + if (event.namelist.find(*nameIter) != event.namelist.end()) { + // scxml i/o proc keeps a dedicated namelist + _callbacks->assign(*nameIter, event.namelist.at(*nameIter)); + } else if (event.data.compound.find(*nameIter) != event.data.compound.end()) { + // this is where it would end up with non scxml i/o processors + _callbacks->assign(*nameIter, event.data.compound.at(*nameIter)); + } + } + } + } + + } + return; + } + + try { + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), beforeExecutingContent, block); + + if (false) { + } else if (iequals(tagName, xmlPrefix.str() + "raise")) { + processRaise(block); + } else if (iequals(tagName, xmlPrefix.str() + "send")) { + processSend(block); + } else if (iequals(tagName, xmlPrefix.str() + "cancel")) { + processCancel(block); + } else if (iequals(tagName, xmlPrefix.str() + "if")) { + processIf(block); + } else if (iequals(tagName, xmlPrefix.str() + "assign")) { + processAssign(block); + } else if (iequals(tagName, xmlPrefix.str() + "foreach")) { + processForeach(block); + } else if (iequals(tagName, xmlPrefix.str() + "log")) { + processLog(block); + } else if (iequals(tagName, xmlPrefix.str() + "script")) { + processScript(block); + } else { + LOG(ERROR) << tagName; + assert(false); + } + } catch (ErrorEvent exc) { + + Event e(exc); + _callbacks->enqueueInternal(e); + LOG(ERROR) << exc << std::endl; + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), afterExecutingContent, block); + + throw e; // will be catched in microstepper + + } + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), afterExecutingContent, block); + +} + +void BasicContentExecutorImpl::invoke(xercesc::DOMElement* element) { + std::string type; + std::string source; + bool autoForward = false; + Event invokeEvent; + + // type + if (HAS_ATTR(element, "typeexpr")) { + type = _callbacks->evalAsData(ATTR(element, "typeexpr")).atom; + } else if (HAS_ATTR(element, "type")) { + type = ATTR(element, "type"); + } else { + // test 422 + type = "http://www.w3.org/TR/scxml/"; + } + + // src + if (HAS_ATTR(element, "srcexpr")) { + source = _callbacks->evalAsData(ATTR(element, "srcexpr")).atom; + } else if (HAS_ATTR(element, "src")) { + source = ATTR(element, "src"); + } + if (source.length() > 0) { + // absolutize url + } + + // id + try { + if (HAS_ATTR(element, "id")) { + invokeEvent.invokeid = ATTR(element, "id"); + } else { + invokeEvent.invokeid = ATTR(getParentState(element), "id") + "." + UUID::getUUID(); + if (HAS_ATTR(element, "idlocation")) { + _callbacks->assign(ATTR(element, "idlocation"), Data(invokeEvent.invokeid, Data::VERBATIM)); + } + } + // we need the invokeid to uninvoke - TODO: This is leaking! + char* invokeId = (char*)malloc(invokeEvent.invokeid.size() + 1); + memcpy(invokeId, invokeEvent.invokeid.c_str(), invokeEvent.invokeid.size()); + invokeId[invokeEvent.invokeid.size()] = 0; + + element->setUserData(X("invokeid"), (void*)invokeId, NULL); + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in invoke element idlocation", element); + } + + try { + // namelist + processNameLists(invokeEvent.namelist, element); + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in send element namelist", element); + } + + + try { + // params + processParams(invokeEvent.params, element); + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in send element param expr", element); + } + + try { + // content + std::list contents = DOMUtils::filterChildElements(XML_PREFIX(element).str() + "content", element); + if (contents.size() > 0) { + Data d = elementAsData(contents.front()); + if (d.type == Data::INTERPRETED && d.atom.size() > 0) { + // immediately evaluate! + invokeEvent.data = _callbacks->evalAsData(d.atom); + } else { + invokeEvent.data = d; + } + } + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in send element content", element); + } + + // autoforward + if (HAS_ATTR(element, "autoforward")) { + if (iequals(ATTR(element, "autoforward"), "true")) { + autoForward = true; + } + } + + // finalize + DOMElement* finalize = NULL; + std::list finalizes = DOMUtils::filterChildElements(XML_PREFIX(element).str() + "finalize", element); + if (finalizes.size() > 0) { + finalize = finalizes.front(); + } + + USCXML_MONITOR_CALLBACK2(_callbacks->getMonitor(), beforeUninvoking, element, invokeEvent.invokeid); + _callbacks->invoke(type, source, autoForward, finalize, invokeEvent); + USCXML_MONITOR_CALLBACK2(_callbacks->getMonitor(), afterUninvoking, element, invokeEvent.invokeid); +} + +void BasicContentExecutorImpl::uninvoke(xercesc::DOMElement* invoke) { + // TODO: DANGER This is the real danger here + char* invokeId = (char*)invoke->getUserData(X("invokeid")); + assert(invokeId != NULL); + + USCXML_MONITOR_CALLBACK2(_callbacks->getMonitor(), beforeUninvoking, invoke, invokeId); + _callbacks->uninvoke(invokeId); + USCXML_MONITOR_CALLBACK2(_callbacks->getMonitor(), afterUninvoking, invoke, invokeId); + + free(invokeId); +} + +void BasicContentExecutorImpl::raiseDoneEvent(xercesc::DOMElement* state, xercesc::DOMElement* doneData) { + + Event doneEvent; + doneEvent.name = "done.state."; + doneEvent.name += HAS_ATTR(state, "id") ? ATTR(state, "id") : DOMUtils::idForNode(state); + + if (doneData != NULL) { + try { + try { + // namelist + processNameLists(doneEvent.namelist, doneData); + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in donedata element namelist", doneData); + } + + + try { + // params + processParams(doneEvent.params, doneData); + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in donedata element param expr", doneData); + } + + try { + // content + std::list contents = DOMUtils::filterChildElements(XML_PREFIX(doneData).str() + "content", doneData); + if (contents.size() > 0) { + doneEvent.data = elementAsData(contents.front()); + } + } catch (Event e) { + ERROR_EXECUTION_THROW2("Syntax error in donedata element content", doneData); + } + + } catch (ErrorEvent exc) { + // clean out data test488 (needed?) + doneEvent.data = Data(); + + Event e(exc); + _callbacks->enqueueInternal(e); + // std::cout << exc << std::endl; + // throw e; + } + } + + _callbacks->enqueueInternal(doneEvent); + +} + +void BasicContentExecutorImpl::processNameLists(std::map& nameMap, DOMElement* element) { + if (HAS_ATTR(element, "namelist")) { + std::list names = tokenize(ATTR(element, "namelist")); + for (std::list::const_iterator nameIter = names.begin(); nameIter != names.end(); nameIter++) { + nameMap[*nameIter] = _callbacks->evalAsData(*nameIter); + } + } +} + +void BasicContentExecutorImpl::processParams(std::multimap& paramMap, DOMElement* element) { + std::list params = DOMUtils::filterChildElements(XML_PREFIX(element).str() + "param", element); + for (auto paramIter = params.begin(); paramIter != params.end(); paramIter++) { + std::string name = ATTR(*paramIter, "name"); + Data d; + if (HAS_ATTR(*paramIter, "expr")) { + d = _callbacks->evalAsData(ATTR(*paramIter, "expr")); + } else if (HAS_ATTR(*paramIter, "location")) { + d = _callbacks->evalAsData(ATTR(*paramIter, "location")); + } else { + d = elementAsData(*paramIter); + } + paramMap.insert(make_pair(name, d)); + } +} + +Data BasicContentExecutorImpl::elementAsData(xercesc::DOMElement* element) { + if (HAS_ATTR(element, "expr")) { +// return _callbacks->evalAsData(ATTR(element, "expr")); + if (LOCALNAME(element) == "content") { + // test 528 + return _callbacks->evalAsData(ATTR(element, "expr")); + } else { + // test 326 + return Data(ATTR(element, "expr"), Data::INTERPRETED); + } + } + + if (HAS_ATTR(element, "src")) { + // remote content from URL + + // test 446, test 552, test 558 + std::string src = ATTR(element, "src"); + URL url(ATTR(element, "src")); + if (!url.isAbsolute()) { + url = URL::resolve(url, _callbacks->getBaseURL()); + } + + std::string content = url.getInContent(); + + // make an attempt to parse as XML + try { + xercesc::XercesDOMParser* parser = new xercesc::XercesDOMParser(); + parser->setValidationScheme(xercesc::XercesDOMParser::Val_Always); + parser->setDoNamespaces(true); + parser->useScanner(xercesc::XMLUni::fgWFXMLScanner); + + xercesc::ErrorHandler* errHandler = new xercesc::HandlerBase(); + parser->setErrorHandler(errHandler); + + std::string tmp = url; + xercesc::MemBufInputSource is((XMLByte*)content.c_str(), content.size(), X("fake")); + + parser->parse(is); + + Data d; + xercesc::DOMDocument* doc = parser->adoptDocument(); + d.adoptedDoc = std::make_shared(doc); + d.node = doc->getDocumentElement(); + return d; + + } catch (...) { + // just ignore and return as an interpreted string below + } + try { + Data d = _callbacks->getAsData(content); + if (!d.empty()) + return d; + } catch(...) {} + + return Data(spaceNormalize(content), Data::VERBATIM); + + } else { + // local content in document + + std::list elementChildren = DOMUtils::filterChildType(DOMNode::ELEMENT_NODE, element); + if (elementChildren.size() == 1) { + return Data(elementChildren.front()); + } else if (elementChildren.size() > 1) { + return Data(element); + } + + std::list textChildren = DOMUtils::filterChildType(DOMNode::TEXT_NODE, element); + if (textChildren.size() > 0) { + std::stringstream contentSS; + for (auto textIter = textChildren.begin(); textIter != textChildren.end(); textIter++) { + contentSS << X((*textIter)->getNodeValue()); + } + try { + Data d = _callbacks->getAsData(contentSS.str()); + if (!d.empty()) + return d; + } catch(...) {} + + return Data(spaceNormalize(contentSS.str()), Data::VERBATIM); + } + } + + LOG(WARNING) << "Element " << DOMUtils::xPathForNode(element) << " did not yield any data"; + return Data(); +} + +} \ No newline at end of file diff --git a/src/uscxml/interpreter/ContentExecutorImpl.h b/src/uscxml/interpreter/ContentExecutorImpl.h new file mode 100644 index 0000000..c0d28a2 --- /dev/null +++ b/src/uscxml/interpreter/ContentExecutorImpl.h @@ -0,0 +1,143 @@ +/** + * @file + * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + + +#ifndef CONTENTEXECUTORIMPL_H_13F2884F +#define CONTENTEXECUTORIMPL_H_13F2884F + +#include "uscxml/Common.h" +#include "uscxml/util/DOM.h" +#include "uscxml/messages/Data.h" +#include "uscxml/messages/Event.h" +#include "uscxml/interpreter/InterpreterMonitor.h" +#include +#include + +namespace uscxml { + +class USCXML_API ContentExecutorCallbacks { +public: + virtual void enqueueInternal(const Event& event) = 0; + virtual void enqueueExternal(const Event& event) = 0; + virtual void enqueueExternalDelayed(const Event& event, size_t delayMs, const std::string& eventUUID) = 0; + virtual void cancelDelayed(const std::string& eventId) = 0; + + virtual bool isTrue(const std::string& expr) = 0; + virtual size_t getLength(const std::string& expr) = 0; + + virtual void setForeach(const std::string& item, + const std::string& array, + const std::string& index, + uint32_t iteration) = 0; + + virtual Data evalAsData(const std::string& expr) = 0; + virtual Data getAsData(const std::string& expr) = 0; + virtual void assign(const std::string& location, const Data& data) = 0; + + + virtual std::string getInvokeId() = 0; + virtual std::string getBaseURL() = 0; + virtual bool checkValidSendType(const std::string& type, const std::string& target) = 0; + virtual void enqueue(const std::string& type, const std::string& target, size_t delayMs, const Event& sendEvent) = 0; + virtual void invoke(const std::string& type, const std::string& src, bool autoForward, xercesc::DOMElement* finalize, const Event& invokeEvent) = 0; + virtual void uninvoke(const std::string& invokeId) = 0; + + virtual const Event& getCurrentEvent() = 0; + + /** Monitoring */ + virtual InterpreterMonitor* getMonitor() = 0; + +}; + +class USCXML_API ContentExecutorImpl { +public: + ContentExecutorImpl(ContentExecutorCallbacks* callbacks) : _callbacks(callbacks) {} + + virtual void process(xercesc::DOMElement* block, const X& xmlPrefix) = 0; + + virtual void invoke(xercesc::DOMElement* invoke) = 0; + virtual void uninvoke(xercesc::DOMElement* invoke) = 0; + + virtual void raiseDoneEvent(xercesc::DOMElement* state, xercesc::DOMElement* doneData) = 0; + virtual Data elementAsData(xercesc::DOMElement* element) = 0; + +protected: + ContentExecutorCallbacks* _callbacks; + +}; + +class USCXML_API BasicContentExecutorImpl : public ContentExecutorImpl { +public: + BasicContentExecutorImpl(ContentExecutorCallbacks* callbacks) : ContentExecutorImpl(callbacks) {} + virtual ~BasicContentExecutorImpl() {} + + void processRaise(xercesc::DOMElement* content); + void processSend(xercesc::DOMElement* element); + void processCancel(xercesc::DOMElement* content); + void processIf(xercesc::DOMElement* content); + void processAssign(xercesc::DOMElement* content); + void processForeach(xercesc::DOMElement* content); + void processLog(xercesc::DOMElement* content); + void processScript(xercesc::DOMElement* content); + + virtual void process(xercesc::DOMElement* block, const X& xmlPrefix); + + virtual void invoke(xercesc::DOMElement* invoke); + virtual void uninvoke(xercesc::DOMElement* invoke); + virtual void raiseDoneEvent(xercesc::DOMElement* state, xercesc::DOMElement* doneData); + + virtual Data elementAsData(xercesc::DOMElement* element); + +protected: + void processNameLists(std::map& nameMap, xercesc::DOMElement* element); + void processParams(std::multimap& paramMap, xercesc::DOMElement* element); + +}; + +class USCXML_API ContentExecutor { +public: + PIMPL_OPERATORS(ContentExecutor) + + virtual void process(xercesc::DOMElement* block, const X& xmlPrefix) { + _impl->process(block, xmlPrefix); + } + + virtual void invoke(xercesc::DOMElement* invoke) { + _impl->invoke(invoke); + } + + virtual void uninvoke(xercesc::DOMElement* invoke) { + _impl->uninvoke(invoke); + } + + virtual Data elementAsData(xercesc::DOMElement* element) { + return _impl->elementAsData(element); + } + + virtual void raiseDoneEvent(xercesc::DOMElement* state, xercesc::DOMElement* doneData) { + return _impl->raiseDoneEvent(state, doneData); + } + +protected: + std::shared_ptr _impl; +}; + +} + +#endif /* end of include guard: CONTENTEXECUTORIMPL_H_13F2884F */ diff --git a/src/uscxml/interpreter/EventQueueImpl.cpp b/src/uscxml/interpreter/EventQueueImpl.cpp new file mode 100644 index 0000000..345da69 --- /dev/null +++ b/src/uscxml/interpreter/EventQueueImpl.cpp @@ -0,0 +1,189 @@ +/** + * @file + * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#include "EventQueueImpl.h" +#include // for evutil_socket_t +#include +#include + +#include + +namespace uscxml { + +EventQueueImpl::EventQueueImpl() { +} +EventQueueImpl::~EventQueueImpl() { +} + +Event EventQueueImpl::dequeue(bool blocking) { + std::lock_guard lock(_mutex); + if (blocking) { + while (_queue.empty()) { + _cond.wait(_mutex); + } + } + if (_queue.size() > 0) { + Event event = _queue.front(); + _queue.pop_front(); +// LOG(ERROR) << event.name; + return event; + } + return Event(); + +} + +void EventQueueImpl::enqueue(const Event& event) { + std::lock_guard lock(_mutex); + _queue.push_back(event); + _cond.notify_all(); +} + +static void dummyCallback(evutil_socket_t fd, short what, void *arg) { + timeval tv; + tv.tv_sec = 365 * 24 * 3600; + tv.tv_usec = 0; + event *ev = *(event **)arg; + evtimer_add(ev, &tv); +} + +DelayedEventQueueImpl::DelayedEventQueueImpl(DelayedEventQueueCallbacks* callbacks) { + _callbacks = callbacks; +#ifndef _WIN32 + evthread_use_pthreads(); +#else + evthread_use_windows_threads(); +#endif + _eventLoop = event_base_new(); + + // see here: https://github.com/named-data/ndn.cxx/blob/master/scheduler/scheduler.cc + // and here: https://www.mail-archive.com/libevent-users@seul.org/msg01676.html + timeval tv; + tv.tv_sec = 365 * 24 * 3600; + tv.tv_usec = 0; + _dummyEvent = evtimer_new(_eventLoop, dummyCallback, &_dummyEvent); + evtimer_add(_dummyEvent, &tv); + + _thread = NULL; + _isStarted = false; + start(); +} + +DelayedEventQueueImpl::~DelayedEventQueueImpl() { + stop(); + evtimer_del(_dummyEvent); + event_free(_dummyEvent); + event_base_free(_eventLoop); +} + +void DelayedEventQueueImpl::timerCallback(evutil_socket_t fd, short what, void *arg) { + struct callbackData *data = (struct callbackData*)arg; + std::lock_guard lock(data->eventQueue->_mutex); + + if (data->eventQueue->_callbackData.find(data->eventUUID) == data->eventQueue->_callbackData.end()) + return; + + event_free(data->event); + data->eventQueue->_callbacks->eventReady(data->userData, data->eventUUID); + data->eventQueue->_callbackData.erase(data->eventUUID); +} + +void DelayedEventQueueImpl::enqueueDelayed(const Event& event, size_t delayMs, const std::string& eventUUID) { + std::lock_guard lock(_mutex); + if(_callbackData.find(eventUUID) != _callbackData.end()) { + cancelDelayed(eventUUID); + } + + _callbackData[eventUUID].eventUUID = eventUUID; + _callbackData[eventUUID].userData = event; + _callbackData[eventUUID].eventQueue = this; + + struct timeval delay = {static_cast(delayMs / 1000), static_cast((delayMs % 1000) * 1000)}; + struct event* e = event_new(_eventLoop, -1, 0, timerCallback, &_callbackData[eventUUID]); + + _callbackData[eventUUID].event = e; + + event_add(e, &delay); +} + +void DelayedEventQueueImpl::cancelAllDelayed() { + std::lock_guard lock(_mutex); + + while(_callbackData.size() > 0) { + std::pair item = *_callbackData.begin(); + Event data = item.second.userData; + event_del(item.second.event); + event_free(item.second.event); + _callbackData.erase(item.first); + } + +} + +void DelayedEventQueueImpl::cancelDelayed(const std::string& eventId) { + std::lock_guard lock(_mutex); + + if(_callbackData.find(eventId) != _callbackData.end()) { + event_del(_callbackData[eventId].event); + event_free(_callbackData[eventId].event); + _callbackData.erase(eventId); + } +} + +void DelayedEventQueueImpl::run(void* instance) { + DelayedEventQueueImpl* INSTANCE = (DelayedEventQueueImpl*)instance; + int result; + while(INSTANCE->_isStarted) { + /** + * EVLOOP_NO_EXIT_ON_EMPTY was removed in libevent2.1 - we are + * using the event in the far future approach to get blocking + * behavior back (see comments in contructor) + */ + + // #ifndef EVLOOP_NO_EXIT_ON_EMPTY +// result = event_base_dispatch(INSTANCE->_eventLoop); + // #else + // TODO: this is polling when no events are enqueued + result = event_base_loop(INSTANCE->_eventLoop, EVLOOP_ONCE); +// assert(false); // NON-BLOCKING?! + //#endif + (void)result; + } +} + +void DelayedEventQueueImpl::start() { + if (_isStarted) { + return; + } + _isStarted = true; + _thread = new std::thread(DelayedEventQueueImpl::run, this); +} + +void DelayedEventQueueImpl::stop() { + if (_isStarted) { + _isStarted = false; + event_base_loopbreak(_eventLoop); + cancelAllDelayed(); + } + if (_thread) { + _thread->join(); + delete _thread; + _thread = NULL; + } +} + +} \ No newline at end of file diff --git a/src/uscxml/interpreter/EventQueueImpl.h b/src/uscxml/interpreter/EventQueueImpl.h new file mode 100644 index 0000000..10543c9 --- /dev/null +++ b/src/uscxml/interpreter/EventQueueImpl.h @@ -0,0 +1,125 @@ +/** + * @file + * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#ifndef EVENTSOURCE_H_775AB206 +#define EVENTSOURCE_H_775AB206 + +#include "uscxml/Common.h" +#include "uscxml/messages/Event.h" +#include +#include +#include +#include +#include +#include + +#include + + +namespace uscxml { + +class USCXML_API EventQueueImpl { +public: + EventQueueImpl(); + virtual ~EventQueueImpl(); + virtual Event dequeue(bool blocking); + virtual void enqueue(const Event& event); + +protected: + std::list _queue; + std::recursive_mutex _mutex; + std::condition_variable_any _cond; + +}; + +class USCXML_API DelayedEventQueueCallbacks { +public: + virtual void eventReady(Event& event, const std::string& eventId) = 0; +}; + +class USCXML_API DelayedEventQueueImpl : public EventQueueImpl { +public: + DelayedEventQueueImpl(DelayedEventQueueCallbacks* callbacks); + virtual ~DelayedEventQueueImpl(); + virtual void enqueueDelayed(const Event& event, size_t delayMs, const std::string& eventUUID); + virtual void cancelDelayed(const std::string& eventId); + virtual void cancelAllDelayed(); + +protected: + struct callbackData { + Event userData; + std::string eventUUID; + bool persist; + struct event *event; + DelayedEventQueueImpl* eventQueue; + }; + + bool _isStarted; + std::thread* _thread; + + std::map _callbackData; + struct event_base* _eventLoop; + struct event* _dummyEvent; + + static void run(void* instance); + void start(); + void stop(); + + static void timerCallback(evutil_socket_t fd, short what, void *arg); + DelayedEventQueueCallbacks* _callbacks; +}; + +class USCXML_API EventQueue { +public: + PIMPL_OPERATORS(EventQueue) + + virtual Event dequeue(bool blocking) { + return _impl->dequeue(blocking); + } + virtual void enqueue(const Event& event) { + return _impl->enqueue(event); + } + +protected: + std::shared_ptr _impl; + +}; + +class USCXML_API DelayedEventQueue : public EventQueue { +public: + PIMPL_OPERATORS2(DelayedEventQueue, EventQueue) + + void enqueueDelayed(const Event& event, size_t delayMs, const std::string& eventUUID) { + _impl->enqueueDelayed(event, delayMs, eventUUID); + } + void cancelDelayed(const std::string& eventUUID) { + return _impl->cancelDelayed(eventUUID); + } + + void cancelAllDelayed() { + return _impl->cancelAllDelayed(); + } + +protected: + std::shared_ptr _impl; +}; + +} + +#endif /* end of include guard: EVENTSOURCE_H_775AB206 */ diff --git a/src/uscxml/interpreter/InterpreterDraft6.cpp b/src/uscxml/interpreter/InterpreterDraft6.cpp deleted file mode 100644 index 6084641..0000000 --- a/src/uscxml/interpreter/InterpreterDraft6.cpp +++ /dev/null @@ -1,573 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "InterpreterDraft6.h" -#include "uscxml/concurrency/DelayedEventQueue.h" - -#include -#include "uscxml/UUID.h" -#include "uscxml/dom/DOMUtils.h" - -#define VERBOSE 0 - -namespace uscxml { - -using namespace Arabica::XPath; -using namespace Arabica::DOM; - -// see: http://www.w3.org/TR/scxml/#AlgorithmforSCXMLInterpretation - - -Arabica::XPath::NodeSet InterpreterDraft6::removeConflictingTransitions(const Arabica::XPath::NodeSet& enabledTransitions) { - Arabica::XPath::NodeSet filteredTransitions; - for (unsigned int i = 0; i < enabledTransitions.size(); i++) { - Element t(enabledTransitions[i]); - if (!isTargetless(t)) { - for (unsigned int j = 0; j < filteredTransitions.size(); j++) { - if (j == i) - continue; - Element t2(filteredTransitions[j]); - if (isPreemptingTransition(t2, t)) { -#if 0 - std::cout << "#####" << std::endl << "Transition " << std::endl - << t2 << std::endl << " preempts " << std::endl << t << std::endl << "#####" << std::endl; -#endif - goto LOOP; - } - } - } -#if 0 - std::cout << "----" << "Enabling Transition " << std::endl << t << std::endl; -#endif - - filteredTransitions.push_back(t); -LOOP: - ; - } - return filteredTransitions; -} - - - -/** - * Is t1 preempting t2? - */ -bool InterpreterDraft6::isPreemptingTransition(const Element& t1, const Element& t2) { - assert(t1); - assert(t2); - -#if 0 - std::cout << "Checking preemption: " << std::endl << t1 << std::endl << t2 << std::endl; -#endif - - if (t1 == t2) - return false; - if (isTargetless(t1)) - return false; // targetless transitions do not preempt any other transitions - if (isWithinParallel(t1) && isCrossingBounds(t2)) - return true; // transitions within a single child of preempt transitions that cross child boundaries - if (isCrossingBounds(t1)) - return true; // transitions that cross child boundaries preempt all other transitions - - return false; -} - -bool InterpreterDraft6::isCrossingBounds(const Element& transition) { - if (!isTargetless(transition) && !isWithinParallel(transition)) - return true; - return false; -} - -bool InterpreterDraft6::isWithinParallel(const Element& transition) { - if (isTargetless(transition)) - return false; - - if (_transWithinParallel.find(transition) != _transWithinParallel.end()) - return _transWithinParallel[transition]; - - Node source; - if (HAS_ATTR(transition, "type") && iequals(ATTR(transition, "type"), "internal")) { - source = getSourceState(transition); - } else { - source = getSourceState(transition).getParentNode(); - } - NodeSet targets = getTargetStates(transition); - targets.push_back(source); - - Node lcpa = findLCPA(targets); - _transWithinParallel[transition] = lcpa; - - return _transWithinParallel[transition]; -} - -Node InterpreterDraft6::findLCPA(const Arabica::XPath::NodeSet& states) { - Arabica::XPath::NodeSet ancestors = getProperAncestors(states[0], Node()); - Node ancestor; - for (size_t i = 0; i < ancestors.size(); i++) { - if (!isParallel(Element(ancestors[i]))) - continue; - for (size_t j = 0; j < states.size(); j++) { - if (!isDescendant(states[j], ancestors[i]) && (states[j] != ancestors[i])) - goto NEXT_ANCESTOR; - } - ancestor = ancestors[i]; - break; -NEXT_ANCESTOR: - ; - } - return ancestor; -} - - - -void InterpreterDraft6::exitStates(const Arabica::XPath::NodeSet& enabledTransitions) { - NodeSet statesToExit; - -#if VERBOSE - std::cout << _name << ": Enabled exit transitions: " << std::endl; - for (size_t i = 0; i < enabledTransitions.size(); i++) { - std::cout << enabledTransitions[i] << std::endl; - } - std::cout << std::endl; -#endif - - for (size_t i = 0; i < enabledTransitions.size(); i++) { - Element t = ((Element)enabledTransitions[i]); - if (!isTargetless(t)) { - Node ancestor; - Node source = getSourceState(t); -// std::cout << t << std::endl << TAGNAME(t) << std::endl; - NodeSet tStates = getTargetStates(t); - bool isInternal = (HAS_ATTR(t, "type") && iequals(ATTR(t, "type"), "internal")); // external is default - bool allDescendants = true; - for (size_t j = 0; j < tStates.size(); j++) { - if (!isDescendant(tStates[j], source)) { - allDescendants = false; - break; - } - } - if (isInternal && allDescendants && isCompound(Element(source))) { - ancestor = source; - } else { - NodeSet tmpStates; - tmpStates.push_back(source); - tmpStates.insert(tmpStates.end(), tStates.begin(), tStates.end()); -#if 0 - std::cout << _name << ": tmpStates: "; - for (size_t i = 0; i < tmpStates.size(); i++) { - std::cout << ATTR(tmpStates[i], "id") << ", "; - } - std::cout << std::endl; -#endif - ancestor = findLCCA(tmpStates); - } -#if 0 - std::cout << _name << ": Ancestor: " << ATTR(ancestor, "id") << std::endl;; -#endif - for (size_t j = 0; j < _configuration.size(); j++) { - if (isDescendant(_configuration[j], ancestor)) - statesToExit.push_back(_configuration[j]); - } - } - } - // remove statesToExit from _statesToInvoke - std::list > tmp; - for (size_t i = 0; i < _statesToInvoke.size(); i++) { - if (!isMember(_statesToInvoke[i], statesToExit)) { - tmp.push_back(_statesToInvoke[i]); - } - } - _statesToInvoke = NodeSet(); - _statesToInvoke.insert(_statesToInvoke.end(), tmp.begin(), tmp.end()); - - statesToExit.forward(false); - statesToExit.sort(); - -#if 0 - std::cout << _name << ": States to exit: "; - for (size_t i = 0; i < statesToExit.size(); i++) { - std::cout << LOCALNAME(statesToExit[i]) << ":" << ATTR(statesToExit[i], "id") << ", "; - } - std::cout << std::endl; -#endif - - for (size_t i = 0; i < statesToExit.size(); i++) { - NodeSet histories = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "history", statesToExit[i]); - for (size_t j = 0; j < histories.size(); j++) { - Element historyElem = (Element)histories[j]; - std::string historyType = (historyElem.hasAttribute("type") ? historyElem.getAttribute("type") : "shallow"); - NodeSet historyNodes; - for (size_t k = 0; k < _configuration.size(); k++) { - if (iequals(historyType, "deep")) { - if (isAtomic(Element(_configuration[k])) && isDescendant(_configuration[k], statesToExit[i])) - historyNodes.push_back(_configuration[k]); - } else { - if (_configuration[k].getParentNode() == statesToExit[i]) - historyNodes.push_back(_configuration[k]); - } - } - _historyValue[historyElem.getAttribute("id")] = historyNodes; -#if VERBOSE - std::cout << _name << ": History node " << ATTR(historyElem, "id") << " contains: "; - for (size_t i = 0; i < historyNodes.size(); i++) { - std::cout << ATTR_CAST(historyNodes[i], "id") << ", "; - } - std::cout << std::endl; -#endif - - } - } - - for (size_t i = 0; i < statesToExit.size(); i++) { - USCXML_MONITOR_CALLBACK3(beforeExitingState, Element(statesToExit[i]), (i + 1 < statesToExit.size())) - - NodeSet onExits = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "onExit", statesToExit[i]); - for (size_t j = 0; j < onExits.size(); j++) { - Element onExitElem = (Element)onExits[j]; - executeContent(onExitElem); - } - - USCXML_MONITOR_CALLBACK3(afterExitingState, Element(statesToExit[i]), (i + 1 < statesToExit.size())) - - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", statesToExit[i]); - for (size_t j = 0; j < invokes.size(); j++) { - Element invokeElem = (Element)invokes[j]; - if (HAS_ATTR(invokeElem, "persist") && stringIsTrue(ATTR(invokeElem, "persist"))) { - // extension for flattened SCXML documents, we will need an explicit uninvoke element - } else { - cancelInvoke(invokeElem); - } - } - - // remove statesToExit[i] from _configuration - test409 - tmp.clear(); - for (size_t j = 0; j < _configuration.size(); j++) { - if (_configuration[j] != statesToExit[i]) { - tmp.push_back(_configuration[j]); - } - } - _configuration = NodeSet(); - _configuration.insert(_configuration.end(), tmp.begin(), tmp.end()); - } -} - -void InterpreterDraft6::enterStates(const Arabica::XPath::NodeSet& enabledTransitions) { - NodeSet statesToEnter; - NodeSet statesForDefaultEntry; - // initialize the temporary table for default content in history states - NodeSet defaultHistoryContent; - -#if VERBOSE - std::cout << _name << ": Enabled enter transitions: " << std::endl; - for (size_t i = 0; i < enabledTransitions.size(); i++) { - std::cout << "\t" << enabledTransitions[i] << std::endl; - } - std::cout << std::endl; -#endif - - for (size_t i = 0; i < enabledTransitions.size(); i++) { - Element transition = ((Element)enabledTransitions[i]); - if (!isTargetless(transition)) { - std::string transitionType = (iequals(transition.getAttribute("type"), "internal") ? "internal" : "external"); - NodeSet tStates = getTargetStates(transition); - -#if VERBOSE - std::cout << _name << ": Target States: "; - for (size_t i = 0; i < tStates.size(); i++) { - std::cout << ATTR_CAST(tStates[i], "id") << ", "; - } - std::cout << std::endl; -#endif - - Node ancestor; - Node source = getSourceState(transition); -#if VERBOSE - std::cout << _name << ": Source States: " << ATTR_CAST(source, "id") << std::endl; -#endif - assert(source); - - bool allDescendants = true; - for (size_t j = 0; j < tStates.size(); j++) { - if (!isDescendant(tStates[j], source)) { - allDescendants = false; - break; - } - } - if (iequals(transitionType, "internal") && - isCompound(Element(source)) && - allDescendants) { - ancestor = source; - } else { - NodeSet tmpStates; - tmpStates.push_back(source); - tmpStates.insert(tmpStates.end(), tStates.begin(), tStates.end()); - - ancestor = findLCCA(tmpStates); - } - -#if VERBOSE - std::cout << _name << ": Ancestor: " << ATTR_CAST(ancestor, "id") << std::endl; -#endif - - for (size_t j = 0; j < tStates.size(); j++) { - addStatesToEnter(Element(tStates[j]), statesToEnter, statesForDefaultEntry, defaultHistoryContent); - } - -#if VERBOSE - std::cout << _name << ": States to enter: "; - for (size_t i = 0; i < statesToEnter.size(); i++) { - std::cout << LOCALNAME(statesToEnter[i]) << ":" << ATTR_CAST(statesToEnter[i], "id") << ", "; - } - std::cout << std::endl; -#endif - - for (size_t j = 0; j < tStates.size(); j++) { - NodeSet ancestors = getProperAncestors(tStates[j], ancestor); - -#if VERBOSE - std::cout << _name << ": Proper Ancestors of " << ATTR_CAST(tStates[j], "id") << " and " << ATTR_CAST(ancestor, "id") << ": "; - for (size_t i = 0; i < ancestors.size(); i++) { - std::cout << ATTR_CAST(ancestors[i], "id") << ", "; - } - std::cout << std::endl; -#endif - - for (size_t k = 0; k < ancestors.size(); k++) { - statesToEnter.push_back(ancestors[k]); - if(isParallel(Element(ancestors[k]))) { - NodeSet childs = getChildStates(ancestors[k]); - for (size_t l = 0; l < childs.size(); l++) { - bool someIsDescendant = false; - for (size_t m = 0; m < statesToEnter.size(); m++) { - if (isDescendant(statesToEnter[m], childs[l])) { - someIsDescendant = true; - break; - } - } - if (!someIsDescendant) { - addStatesToEnter(Element(childs[l]), statesToEnter, statesForDefaultEntry, defaultHistoryContent); - } - } - } - } - } - } - } - statesToEnter.to_document_order(); - -#if VERBOSE - std::cout << _name << ": States to enter: "; - for (size_t i = 0; i < statesToEnter.size(); i++) { - std::cout << ATTR_CAST(statesToEnter[i], "id") << ", "; - } - std::cout << std::endl; -#endif - - for (size_t i = 0; i < statesToEnter.size(); i++) { - Element stateElem = (Element)statesToEnter[i]; - - // extension for flattened interpreters - for (unsigned int k = 0; k < statesToEnter.size(); k++) { - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", statesToEnter[k]); - for (unsigned int j = 0; j < invokes.size(); j++) { - Element invokeElem = Element(invokes[j]); - if (HAS_ATTR(invokeElem, "persist") && stringIsTrue(ATTR(invokeElem, "persist"))) { - invoke(invokeElem); - } - } - } - - USCXML_MONITOR_CALLBACK3(beforeEnteringState, stateElem, (i + 1 < statesToEnter.size())) - - // extension for flattened SCXML documents, we will need an explicit uninvoke element - NodeSet uninvokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "uninvoke", statesToEnter[i]); - for (size_t j = 0; j < uninvokes.size(); j++) { - Element uninvokeElem = (Element)uninvokes[j]; - cancelInvoke(uninvokeElem); - } - - _configuration.push_back(stateElem); - _statesToInvoke.push_back(stateElem); - - if (_binding == LATE && !isMember(stateElem, _alreadyEntered)) { - NodeSet dataModelElems = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "datamodel", stateElem); - if(dataModelElems.size() > 0 && _dataModel) { - Arabica::XPath::NodeSet dataElems = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "data", dataModelElems[0]); - for (size_t j = 0; j < dataElems.size(); j++) { - if (dataElems[j].getNodeType() == Node_base::ELEMENT_NODE) - initializeData(Element(dataElems[j])); - } - } - _alreadyEntered.push_back(stateElem); - } - // execute onentry executable content - NodeSet onEntryElems = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "onEntry", stateElem); - executeContent(onEntryElems, false); - - USCXML_MONITOR_CALLBACK3(afterEnteringState, stateElem, (i + 1 < statesToEnter.size())) - - if (isMember(stateElem, statesForDefaultEntry)) { - // execute initial transition content for compound states - Arabica::XPath::NodeSet transitions = _xpath.evaluate("" + _nsInfo.xpathPrefix + "initial/" + _nsInfo.xpathPrefix + "transition", stateElem).asNodeSet(); - for (size_t j = 0; j < transitions.size(); j++) { - executeContent(Element(transitions[j])); - } - } - -#if 0 - // not working yet - if (isMember(stateElem, defaultHistoryContent)) { - // execute history transition - Arabica::XPath::NodeSet transitions = _xpath.evaluate("" + _nsInfo.xpathPrefix + "history/" + _nsInfo.xpathPrefix + "transition", stateElem).asNodeSet(); - for (size_t j = 0; j < transitions.size(); j++) { - executeContent(transitions[j]); - } - } -#endif - if (isFinal(stateElem)) { - - Arabica::DOM::Element doneData; - Arabica::XPath::NodeSet doneDatas = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "donedata", stateElem); - if (doneDatas.size() > 0) { - // only process first donedata element - doneData = Element(doneDatas[0]); - } - - internalDoneSend(stateElem, doneData); - Node parent = stateElem.getParentNode(); - - if (parent.getNodeType() == Node_base::ELEMENT_NODE && - parent.getParentNode().getNodeType() == Node_base::ELEMENT_NODE && - isParallel(Element(parent.getParentNode()))) { - Element grandParent = (Element)parent.getParentNode(); - - Arabica::XPath::NodeSet childs = getChildStates(grandParent); - bool inFinalState = true; - for (size_t j = 0; j < childs.size(); j++) { - if (!isInFinalState(Element(childs[j]))) { - inFinalState = false; - break; - } - } - if (inFinalState) { - internalDoneSend(Element(parent), Arabica::DOM::Element()); - } - } - } - } - for (size_t i = 0; i < _configuration.size(); i++) { - Element stateElem = (Element)_configuration[i]; - if (isFinal(stateElem) && parentIsScxmlState(stateElem)) { - _topLevelFinalReached = true; - } - } -} - -void InterpreterDraft6::addStatesToEnter(const Element& state, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry, - Arabica::XPath::NodeSet& defaultHistoryContent) { - std::string stateId = ((Element)state).getAttribute("id"); - -#if VERBOSE - std::cout << "Adding state to enter: " << stateId << std::endl; -#endif - if (isHistory(state)) { - if (_historyValue.find(stateId) != _historyValue.end()) { - Arabica::XPath::NodeSet historyValue = _historyValue[stateId]; - -#if VERBOSE - std::cout << "History State " << ATTR(state, "id") << ": "; - for (size_t i = 0; i < historyValue.size(); i++) { - std::cout << ATTR_CAST(historyValue[i], "id") << ", "; - } - std::cout << std::endl; -#endif - - for (size_t i = 0; i < historyValue.size(); i++) { - addStatesToEnter(Element(historyValue[i]), statesToEnter, statesForDefaultEntry, defaultHistoryContent); - NodeSet ancestors = getProperAncestors(historyValue[i], state); - -#if VERBOSE - std::cout << "Proper Ancestors: "; - for (size_t j = 0; j < ancestors.size(); j++) { - std::cout << ATTR_CAST(ancestors[j], "id") << ", "; - } - std::cout << std::endl; -#endif - - for (size_t j = 0; j < ancestors.size(); j++) { - statesToEnter.push_back(ancestors[j]); - } - } - } else { - defaultHistoryContent.push_back(getParentState(state)); - NodeSet transitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", state); - for (size_t i = 0; i < transitions.size(); i++) { - NodeSet targets = getTargetStates(Element(transitions[i])); - for (size_t j = 0; j < targets.size(); j++) { - addStatesToEnter(Element(targets[j]), statesToEnter, statesForDefaultEntry, defaultHistoryContent); - - // Modifications from chris nuernberger - NodeSet ancestors = getProperAncestors(targets[j], state); - for (size_t k = 0; k < ancestors.size(); k++) { - statesToEnter.push_back(ancestors[k]); - } - } - } - } - } else { - statesToEnter.push_back(state); - if (isCompound(state)) { - statesForDefaultEntry.push_back(state); - - NodeSet tStates = getInitialStates(state); - for (size_t i = 0; i < tStates.size(); i++) { - addStatesToEnter(Element(tStates[i]), statesToEnter, statesForDefaultEntry, defaultHistoryContent); - } - - // addStatesToEnter(getInitialState(state), statesToEnter, statesForDefaultEntry); - // NodeSet tStates = getTargetStates(getInitialState(state)); - - } else if(isParallel(state)) { - NodeSet childStates = getChildStates(state); - for (size_t i = 0; i < childStates.size(); i++) { - addStatesToEnter(Element(childStates[i]), statesToEnter, statesForDefaultEntry, defaultHistoryContent); - } - } - } -} - -void InterpreterDraft6::handleDOMEvent(Arabica::DOM::Events::Event& event) { - InterpreterImpl::handleDOMEvent(event); - - // remove modified states from cache - if (event.getType().compare("DOMAttrModified") == 0) // we do not care about attributes - return; - Node target = Arabica::DOM::Node(event.getTarget()); - NodeSet transitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", target, true); - for (size_t i = 0; i < transitions.size(); i++) { - const Element transElem = Element(transitions[i]); - if (_transWithinParallel.find(transElem) != _transWithinParallel.end()) - _transWithinParallel.erase(transElem); - } -} - - -} \ No newline at end of file diff --git a/src/uscxml/interpreter/InterpreterDraft6.h b/src/uscxml/interpreter/InterpreterDraft6.h deleted file mode 100644 index 6a1275b..0000000 --- a/src/uscxml/interpreter/InterpreterDraft6.h +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef INTERPRETERDRAFT6_H_JAXK9FE1 -#define INTERPRETERDRAFT6_H_JAXK9FE1 - -#include "uscxml/Interpreter.h" - -namespace uscxml { - -class USCXML_API InterpreterDraft6 : public InterpreterImpl { -public: - virtual ~InterpreterDraft6() {}; - -protected: - - void enterStates(const Arabica::XPath::NodeSet& enabledTransitions); - void addStatesToEnter(const Arabica::DOM::Element& state, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry, - Arabica::XPath::NodeSet& defaultHistoryContent); - - void exitStates(const Arabica::XPath::NodeSet& enabledTransitions); - - Arabica::XPath::NodeSet removeConflictingTransitions(const Arabica::XPath::NodeSet& enabledTransitions); - bool isPreemptingTransition(const Arabica::DOM::Element& t1, const Arabica::DOM::Element& t2); - - bool isCrossingBounds(const Arabica::DOM::Element& transition); - bool isWithinParallel(const Arabica::DOM::Element& transition); - Arabica::DOM::Node findLCPA(const Arabica::XPath::NodeSet& states); - - std::map, bool> _transWithinParallel; // this is costly to calculate - - virtual void handleDOMEvent(Arabica::DOM::Events::Event& event); - -}; - -} - -#endif /* end of include guard: INTERPRETERDRAFT6_H_JAXK9FE1 */ diff --git a/src/uscxml/interpreter/InterpreterFast.cpp b/src/uscxml/interpreter/InterpreterFast.cpp deleted file mode 100644 index ab5dce0..0000000 --- a/src/uscxml/interpreter/InterpreterFast.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @file - * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "InterpreterFast.h" - -#include "uscxml/Factory.h" -#include "uscxml/concurrency/DelayedEventQueue.h" - -#include -#include "uscxml/UUID.h" -#include "uscxml/dom/DOMUtils.h" - -namespace uscxml { - -using namespace Arabica::XPath; -using namespace Arabica::DOM; - - -void InterpreterFast::handleDOMEvent(Arabica::DOM::Events::Event& event) { - InterpreterImpl::handleDOMEvent(event); - - if (event.getType().compare("DOMAttrModified") == 0) // we do not care about attributes - return; - -} -} \ No newline at end of file diff --git a/src/uscxml/interpreter/InterpreterFast.h b/src/uscxml/interpreter/InterpreterFast.h deleted file mode 100644 index 5838dc0..0000000 --- a/src/uscxml/interpreter/InterpreterFast.h +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @file - * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef INTERPRETERFAST_H_224A5F07 -#define INTERPRETERFAST_H_224A5F07 - -#include "uscxml/Interpreter.h" - -namespace uscxml { - -class InterpreterFast : public InterpreterImpl { -protected: - virtual void setupSets(); - virtual void handleDOMEvent(Arabica::DOM::Events::Event& event); - -private: - - /* TODO: use post-order and document-order per STL comparator (sorted std::set?) */ - - std::vector > _states; - std::vector > _transitions; - - std::vector > _conflictingTransitions; - std::vector > _exitSets; - std::vector > _targetSets; - -}; - -} - -#endif /* end of include guard: INTERPRETERFAST_H_224A5F07 */ diff --git a/src/uscxml/interpreter/InterpreterImpl.cpp b/src/uscxml/interpreter/InterpreterImpl.cpp new file mode 100644 index 0000000..ba75ab8 --- /dev/null +++ b/src/uscxml/interpreter/InterpreterImpl.cpp @@ -0,0 +1,361 @@ +/** + * @file + * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#include "uscxml/Common.h" +#include "uscxml/util/UUID.h" +#include "uscxml/Interpreter.h" +#include "uscxml/messages/Event.h" +#include "uscxml/util/String.h" +#include "uscxml/util/Predicates.h" + +#include "easylogging++.h" + +#include + +#include +#include +#include +#include + +#include "uscxml/interpreter/MicroStepFast.h" + +#define VERBOSE 0 + +namespace uscxml { + +using namespace xercesc; + +std::map > InterpreterImpl::_instances; +std::recursive_mutex InterpreterImpl::_instanceMutex; + +std::map > InterpreterImpl::getInstances() { + std::lock_guard lock(_instanceMutex); + std::map >::iterator instIter = _instances.begin(); + while(instIter != _instances.end()) { + if (!instIter->second.lock()) { + _instances.erase(instIter++); + } else { + instIter++; + } + } + return _instances; +} + +void InterpreterImpl::addInstance(std::shared_ptr interpreterImpl) { + std::lock_guard lock(_instanceMutex); + assert(_instances.find(interpreterImpl->getSessionId()) == _instances.end()); + _instances[interpreterImpl->getSessionId()] = interpreterImpl; +} + +InterpreterImpl::InterpreterImpl() : _isInitialized(false), _document(NULL), _scxml(NULL), _state(USCXML_INSTANTIATED), _monitor(NULL) { + try { + xercesc::XMLPlatformUtils::Initialize(); + } catch (const xercesc::XMLException& toCatch) { + ERROR_PLATFORM_THROW("Cannot initialize XercesC: " + X(toCatch.getMessage()).str()); + } + + _sessionId = UUID::getUUID(); + _factory = Factory::getInstance(); +} + + +InterpreterImpl::~InterpreterImpl() { + if (_delayQueue) + _delayQueue.cancelAllDelayed(); + if (_document) + delete _document; + { + std::lock_guard lock(_instanceMutex); + _instances.erase(getSessionId()); + } +} + +void InterpreterImpl::cancel() { + _microStepper.markAsCancelled(); + Event unblock; + enqueueExternal(unblock); +} + + +void InterpreterImpl::setupDOM() { + + if (!_document) { + ERROR_PLATFORM_THROW("Interpreter has no XML document"); + } + + if (!_scxml) { + // find scxml element + DOMNodeList* scxmls = NULL; + + // proper namespace + scxmls = _document->getElementsByTagNameNS(X("http://www.w3.org/2005/07/scxml"), X("scxml")); + if (scxmls->getLength() > 0) + goto SCXML_STOP_SEARCH; + + // no namespace + scxmls = _document->getElementsByTagName(X("scxml")); + if (scxmls->getLength() > 0) + goto SCXML_STOP_SEARCH; + +SCXML_STOP_SEARCH: + if (scxmls->getLength() == 0) { + ERROR_PLATFORM_THROW("Cannot find SCXML element in DOM"); + return; + } + + _scxml = dynamic_cast(scxmls->item(0)); + + _xmlPrefix = _scxml->getPrefix(); + _xmlNS = _scxml->getNamespaceURI(); + if (_xmlPrefix) { + _xmlPrefix = std::string(_xmlPrefix) + ":"; + } + if (HAS_ATTR(_scxml, "name")) { + _name = ATTR(_scxml, "name"); + } else { + _name = _baseURL.pathComponents().back(); + } + + _binding = (HAS_ATTR(_scxml, "binding") && iequals(ATTR(_scxml, "binding"), "late") ? LATE : EARLY); + + } + +} + +void InterpreterImpl::init() { + + if (_isInitialized) + return; + + setupDOM(); + + // register io processors + std::map ioProcs = _factory->getIOProcessors(); + for (auto ioProcIter = ioProcs.begin(); ioProcIter != ioProcs.end(); ioProcIter++) { + + // do not override if already set + if (_ioProcs.find(ioProcIter->first) != _ioProcs.end()) { + ioProcIter++; + continue; + } + + // this might throw error.execution + _ioProcs[ioProcIter->first] = _factory->createIOProcessor(ioProcIter->first, this); + + // register aliases + std::list names = _ioProcs[ioProcIter->first].getNames(); + for (auto nameIter = names.begin(); nameIter != names.end(); nameIter++) { + // do not override + if (!iequals(*nameIter, ioProcIter->first) && _ioProcs.find(*nameIter) == _ioProcs.end()) { + _ioProcs[*nameIter] = _ioProcs[ioProcIter->first]; + } + } + + } + + if (!_microStepper) { + _microStepper = MicroStep(std::shared_ptr(new MicroStepFast(this))); + } + _microStepper.init(_scxml); + + if (!_dataModel) { + _dataModel = _factory->createDataModel(HAS_ATTR(_scxml, "datamodel") ? ATTR(_scxml, "datamodel") : "null", this); + } + if (!_execContent) { + _execContent = ContentExecutor(std::shared_ptr(new BasicContentExecutorImpl(this))); + } + + if (!_externalQueue) { + _externalQueue = EventQueue(std::shared_ptr(new EventQueueImpl())); + } + if (!_internalQueue) { + _internalQueue = EventQueue(std::shared_ptr(new EventQueueImpl())); + } + if (!_delayQueue) { + _delayQueue = DelayedEventQueue(std::shared_ptr(new DelayedEventQueueImpl(this))); + } + + _isInitialized = true; +} + +void InterpreterImpl::initData(xercesc::DOMElement* root) { + std::string id = ATTR(root, "id"); + Data d; + try { + if (Event::getParam(_invokeReq.params, id, d)) { + _dataModel.init(id, d); + } else if (_invokeReq.namelist.find(id) != _invokeReq.namelist.end()) { + _dataModel.init(id, _invokeReq.namelist[id]); + } else { + _dataModel.init(id, _execContent.elementAsData(root)); + } + } catch(ErrorEvent e) { + // test 277 + enqueueInternal(e); + } +} + +void InterpreterImpl::assign(const std::string& location, const Data& data) { + _dataModel.assign(location, data); +} + +bool InterpreterImpl::isMatched(const Event& event, const std::string& eventDesc) { + return nameMatch(eventDesc, event.name); +} + +bool InterpreterImpl::isTrue(const std::string& expr) { + try { + return _dataModel.evalAsBool(expr); + } catch (ErrorEvent e) { + // test 244: deliver error execution + + LOG(ERROR) << e; + + // test 344 + enqueueInternal(e); + // test 245: undefined is false + return false; + + } +} + + +bool InterpreterImpl::checkValidSendType(const std::string& type, const std::string& target) { + + // this is the responsibility of the calling method + assert(type.size() > 0); + + if (_ioProcs.find(type) == _ioProcs.end()) { + ERROR_EXECUTION_THROW("Type '" + type + "' not supported for sending"); + } + + if (!_ioProcs[type].isValidTarget(target)) { + ERROR_COMMUNICATION_THROW("Target '" + target + "' not supported in send"); + } + + return true; +} + +Event InterpreterImpl::dequeueExternal(bool blocking) { + _currEvent = _externalQueue.dequeue(blocking); + if (_currEvent) { + _dataModel.setEvent(_currEvent); + +// LOG(ERROR) << e.name; + + // test 233 + if (_currEvent.invokeid.size() > 0 && + _invokers.find(_currEvent.invokeid) != _invokers.end() && + _invokers[_currEvent.invokeid].getFinalize() != NULL) { + _execContent.process(_invokers[_currEvent.invokeid].getFinalize(), _xmlPrefix); + } + + for (auto invIter = _invokers.begin(); invIter != _invokers.end(); invIter++) { + // test 229 + if (_autoForwarders.find(invIter->first) != _autoForwarders.end()) { + invIter->second.eventFromSCXML(_currEvent); + } + } + } + return _currEvent; +} + +void InterpreterImpl::enqueue(const std::string& type, const std::string& target, size_t delayMs, const Event& sendEvent) { + std::lock_guard lock(_delayMutex); + + assert(sendEvent.uuid.length() > 0); + assert(_delayedEventTargets.find(sendEvent.uuid) == _delayedEventTargets.end()); + + _delayedEventTargets[sendEvent.uuid] = std::tuple(sendEvent.sendid, type, target); + if (delayMs == 0) { + Event copy(sendEvent); + return eventReady(copy, sendEvent.uuid); + } else { + return _delayQueue.enqueueDelayed(sendEvent, delayMs, sendEvent.uuid); + } +} + +void InterpreterImpl::cancelDelayed(const std::string& sendId) { + std::lock_guard lock(_delayMutex); + + // we need to find the uuids for the given sendid + for (auto evIter = _delayedEventTargets.begin(); evIter != _delayedEventTargets.end();) { + // inline deletion for maps: http://stackoverflow.com/a/263958/990120 + if (std::get<0>(evIter->second) == sendId) { + _delayQueue.cancelDelayed(evIter->first); + evIter = _delayedEventTargets.erase(evIter); + } else { + evIter++; + } + } +} + +void InterpreterImpl::eventReady(Event& sendEvent, const std::string& eventUUID) { + std::lock_guard lock(_delayMutex); + + // we only arrive here after the delay already passed! + assert(_delayedEventTargets.find(eventUUID) != _delayedEventTargets.end()); + + std::string type = std::get<1>(_delayedEventTargets[eventUUID]); + std::string target = std::get<2>(_delayedEventTargets[eventUUID]); + + // test 172 + if (type.size() == 0) { + type = "http://www.w3.org/TR/scxml/#SCXMLEventProcessor"; + } + + _delayedEventTargets.erase(eventUUID); + + if (_ioProcs.find(type) != _ioProcs.end()) { + _ioProcs[type].eventFromSCXML(target, sendEvent); + } else { + ERROR_PLATFORM_THROW("No IO processor " + type + " known"); + } +} + +void InterpreterImpl::invoke(const std::string& type, const std::string& src, bool autoForward, xercesc::DOMElement* finalize, const Event& invokeEvent) { + + std::string tmp; + if (src.size() > 0) { + URL url(src); + if (!url.isAbsolute()) { + url = URL::resolve(url, _baseURL); + } + tmp = (std::string)url; + } + + std::shared_ptr invokerImpl = _factory->createInvoker(type, this); + invokerImpl->setFinalize(finalize); + _invokers[invokeEvent.invokeid] = invokerImpl; + _invokers[invokeEvent.invokeid].invoke(tmp, invokeEvent); + + if (autoForward) { + _autoForwarders.insert(invokeEvent.invokeid); + } +} + +void InterpreterImpl::uninvoke(const std::string& invokeId) { + if (_invokers.find(invokeId) != _invokers.end()) { + _invokers[invokeId].uninvoke(); + _autoForwarders.erase(invokeId); + } + +} + +} diff --git a/src/uscxml/interpreter/InterpreterImpl.h b/src/uscxml/interpreter/InterpreterImpl.h new file mode 100644 index 0000000..7c64779 --- /dev/null +++ b/src/uscxml/interpreter/InterpreterImpl.h @@ -0,0 +1,290 @@ +/** + * @file + * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#ifndef INTERPRETERIMPL_H_29D5BEBA +#define INTERPRETERIMPL_H_29D5BEBA + +#include +#include +#include +#include +#include + +#include "uscxml/Common.h" +#include "uscxml/util/URL.h" +#include "uscxml/plugins/Factory.h" +#include "uscxml/plugins/DataModel.h" +#include "uscxml/interpreter/MicroStepImpl.h" +#include "uscxml/interpreter/ContentExecutorImpl.h" +#include "uscxml/interpreter/EventQueueImpl.h" +#include "uscxml/util/DOM.h" +#include + +namespace uscxml { + +class InterpreterMonitor; +class InterpreterIssue; + +class USCXML_API ActionLanguage { +public: + MicroStep microStepper; + DataModel dataModel; + ContentExecutor execContent; +}; + +class USCXML_API InterpreterImpl : + public MicroStepCallbacks, + public DataModelCallbacks, + public ContentExecutorCallbacks, + public DelayedEventQueueCallbacks +// public std::enable_shared_from_this +{ +public: + enum Binding { + EARLY = 0, + LATE = 1 + }; + + InterpreterImpl(); + virtual ~InterpreterImpl(); + + void cloneFrom(InterpreterImpl* other); + void cloneFrom(std::shared_ptr other); + + virtual InterpreterState step(bool blocking) { + if (!_isInitialized) { + init(); + _state = USCXML_INITIALIZED; + } else { + _state = _microStepper.step(blocking); + } + return _state; + } + + virtual void reset() {///< Reset state machine + _microStepper.reset(); + _isInitialized = false; + _state = USCXML_INSTANTIATED; +// _dataModel.reset(); +// _eventQueue.reset(); +// _contentExecutor.reset(); + } + + virtual void cancel(); ///< Cancel and finalize state machine + + InterpreterState getState() { + return _state; + } + + std::list getConfiguration() { + return _microStepper.getConfiguration(); + } + + void setMonitor(InterpreterMonitor* monitor) { + _monitor = monitor; + } + + /** + MicrostepCallbacks + */ + virtual Event dequeueInternal() { + _currEvent = _internalQueue.dequeue(false); + if (_currEvent) + _dataModel.setEvent(_currEvent); + return _currEvent; + } + virtual Event dequeueExternal(bool blocking); + virtual bool isTrue(const std::string& expr); + + virtual void raiseDoneEvent(xercesc::DOMElement* state, xercesc::DOMElement* doneData) { + _execContent.raiseDoneEvent(state, doneData); + } + + virtual void process(xercesc::DOMElement* block) { + _execContent.process(block, _xmlPrefix); + } + + virtual bool isMatched(const Event& event, const std::string& eventDesc); + virtual void initData(xercesc::DOMElement* element); + + virtual void invoke(xercesc::DOMElement* invoke) { + _execContent.invoke(invoke); + } + + virtual void uninvoke(xercesc::DOMElement* invoke) { + _execContent.uninvoke(invoke); + } + + virtual InterpreterMonitor* getMonitor() { + return _monitor; + } + + /** + DataModelCallbacks + */ + virtual const std::string& getName() { + return _name; + } + virtual const std::string& getSessionId() { + return _sessionId; + } + virtual const std::map& getIOProcessors() { + return _ioProcs; + } + virtual const std::map& getInvokers() { + return _invokers; + } + + virtual bool isInState(const std::string& stateId) { + return _microStepper.isInState(stateId); + } + virtual xercesc::DOMDocument* getDocument() const { + return _document; + } + + /** + ContentExecutorCallbacks + */ + + virtual void enqueueInternal(const Event& event) { + return _internalQueue.enqueue(event); + } + virtual void enqueueExternal(const Event& event) { + return _externalQueue.enqueue(event); + } + virtual void enqueueExternalDelayed(const Event& event, size_t delayMs, const std::string& eventUUID) { + return _delayQueue.enqueueDelayed(event, delayMs, eventUUID); + } + virtual void cancelDelayed(const std::string& eventId); + + virtual size_t getLength(const std::string& expr) { + return _dataModel.getLength(expr); + } + + virtual void setForeach(const std::string& item, + const std::string& array, + const std::string& index, + uint32_t iteration) { + return _dataModel.setForeach(item, array, index, iteration); + } + virtual Data evalAsData(const std::string& expr) { + return _dataModel.evalAsData(expr); + } + + virtual Data getAsData(const std::string& expr) { + return _dataModel.getAsData(expr); + } + + virtual void assign(const std::string& location, const Data& data); + + virtual std::string getInvokeId() { + return _invokeId; + } + virtual std::string getBaseURL() { + return _baseURL; + } + + virtual bool checkValidSendType(const std::string& type, const std::string& target); + virtual void invoke(const std::string& type, const std::string& src, bool autoForward, xercesc::DOMElement* finalize, const Event& invokeEvent); + virtual void uninvoke(const std::string& invokeId); + virtual void enqueue(const std::string& type, const std::string& target, size_t delayMs, const Event& sendEvent); + + virtual const Event& getCurrentEvent() { + return _currEvent; + } + + /** + DelayedEventQueueCallbacks + */ + + virtual void eventReady(Event& event, const std::string& eventUUID); + + /** --- */ + + void setActionLanguage(const ActionLanguage& al) { + _execContent = al.execContent; + _microStepper = al.microStepper; + _dataModel = al.dataModel; + } + + static std::map > getInstances(); + + virtual xercesc::DOMDocument* getDocument() { + return _document; + } + +protected: + static void addInstance(std::shared_ptr instance); + + Binding _binding; + + std::string _sessionId; + std::string _name; + std::string _invokeId; // TODO: Never set! + + bool _isInitialized; + xercesc::DOMDocument* _document; + xercesc::DOMElement* _scxml; + + std::map > _delayedEventTargets; + + virtual void init(); + + static std::map > _instances; + static std::recursive_mutex _instanceMutex; + std::recursive_mutex _delayMutex; + + friend class Interpreter; + friend class InterpreterIssue; + friend class TransformerImpl; + friend class USCXMLInvoker; + friend class SCXMLIOProcessor; + + X _xmlPrefix; + X _xmlNS; + Factory* _factory; + + URL _baseURL; + + MicroStep _microStepper; + DataModel _dataModel; + ContentExecutor _execContent; + + InterpreterState _state; + + EventQueue _internalQueue; + EventQueue _externalQueue; + EventQueue _parentQueue; + DelayedEventQueue _delayQueue; + + Event _currEvent; + Event _invokeReq; + + std::map _ioProcs; + std::map _invokers; + std::set _autoForwarders; + InterpreterMonitor* _monitor; + +private: + void setupDOM(); +}; + +} + +#endif /* end of include guard: INTERPRETERIMPL_H_29D5BEBA */ diff --git a/src/uscxml/interpreter/InterpreterMonitor.h b/src/uscxml/interpreter/InterpreterMonitor.h new file mode 100644 index 0000000..6ebdb35 --- /dev/null +++ b/src/uscxml/interpreter/InterpreterMonitor.h @@ -0,0 +1,95 @@ +/** + * @file + * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#ifndef INTERPRETERMONITOR_H_4BA77097 +#define INTERPRETERMONITOR_H_4BA77097 + +#include "uscxml/Common.h" +#include "uscxml/messages/Event.h" +#include "uscxml/debug/InterpreterIssue.h" + +#include + +#define USCXML_MONITOR_CATCH(callback) \ +catch (Event e) { LOG(ERROR) << "Syntax error when calling " #callback " on monitors: " << std::endl << e << std::endl; } \ +catch (std::bad_weak_ptr e) { LOG(ERROR) << "Unclean shutdown " << std::endl; } \ +catch (...) { LOG(ERROR) << "An exception occurred when calling " #callback " on monitors"; } \ +if (_state == USCXML_DESTROYED) { throw std::bad_weak_ptr(); } + +#define USCXML_MONITOR_CALLBACK(callback, function) \ +if (callback) { callback->function(); } + +#define USCXML_MONITOR_CALLBACK1(callback, function, arg1) \ +if (callback) { callback->function(arg1); } + +#define USCXML_MONITOR_CALLBACK2(callback, function, arg1, arg2) \ +if (callback) { callback->function(arg1, arg2); } + +namespace uscxml { + +class USCXML_API InterpreterMonitor { +public: + InterpreterMonitor() : _copyToInvokers(false) {} + virtual ~InterpreterMonitor() {} + + virtual void beforeProcessingEvent(const Event& event) {} + virtual void beforeMicroStep() {} + + virtual void beforeExitingState(const xercesc::DOMElement* state) {} + virtual void afterExitingState(const xercesc::DOMElement* state) {} + + virtual void beforeExecutingContent(const xercesc::DOMElement* execContent) {} + virtual void afterExecutingContent(const xercesc::DOMElement* execContent) {} + + virtual void beforeUninvoking(const xercesc::DOMElement* invokeElem, const std::string& invokeid) {} + virtual void afterUninvoking(const xercesc::DOMElement* invokeElem, const std::string& invokeid) {} + + virtual void beforeTakingTransition(const xercesc::DOMElement* transition) {} + virtual void afterTakingTransition(const xercesc::DOMElement* transition) {} + + virtual void beforeEnteringState(const xercesc::DOMElement* state) {} + virtual void afterEnteringState(const xercesc::DOMElement* state) {} + + virtual void beforeInvoking(const xercesc::DOMElement* invokeElem, const std::string& invokeid) {} + virtual void afterInvoking(const xercesc::DOMElement* invokeElem, const std::string& invokeid) {} + + virtual void afterMicroStep() {} + virtual void onStableConfiguration() {} + + virtual void beforeCompletion() {} + virtual void afterCompletion() {} + + virtual void reportIssue(const InterpreterIssue& issue) {} + + void copyToInvokers(bool copy) { + _copyToInvokers = copy; + } + + bool copyToInvokers() { + return _copyToInvokers; + } + +protected: + bool _copyToInvokers; + +}; + +} + +#endif /* end of include guard: INTERPRETERMONITOR_H_4BA77097 */ diff --git a/src/uscxml/interpreter/InterpreterRC.cpp b/src/uscxml/interpreter/InterpreterRC.cpp deleted file mode 100644 index b594c18..0000000 --- a/src/uscxml/interpreter/InterpreterRC.cpp +++ /dev/null @@ -1,661 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "InterpreterRC.h" - -#include "uscxml/Factory.h" -#include "uscxml/concurrency/DelayedEventQueue.h" - -#include -#include "uscxml/UUID.h" -#include "uscxml/dom/DOMUtils.h" - -#define VERBOSE 0 -#define VERBOSE_STATE_SELECTION 0 -#define VERBOSE_FIND_LCCA 0 - -namespace uscxml { - -using namespace Arabica::XPath; -using namespace Arabica::DOM; - -#if 1 -size_t padding = 0; -std::string getPadding() { - std::string pad = ""; - for (size_t i = 0; i < padding; i++) { - pad += " "; - } - return pad; -} -#endif - -Arabica::XPath::NodeSet InterpreterRC::removeConflictingTransitions(const Arabica::XPath::NodeSet& enabledTransitions) { - Arabica::XPath::NodeSet filteredTransitions; - for (unsigned int i = 0; i < enabledTransitions.size(); i++) { - Element t1(enabledTransitions[i]); - bool t1Preempted = false; - Arabica::XPath::NodeSet transitionsToRemove; - - for (unsigned int j = 0; j < filteredTransitions.size(); j++) { - Element t2(filteredTransitions[j]); - if (hasIntersection(computeExitSet(t1), computeExitSet(t2))) { - if (isDescendant(getSourceState(t1), getSourceState(t2))) { - transitionsToRemove.push_back(t2); - } else { - t1Preempted = true; - break; - } - } - } - - if (!t1Preempted) { - // remove transitionsToRemove from DOMUtils::filteredTransitions - std::list > tmp; - for (size_t i = 0; i < filteredTransitions.size(); i++) { - if (!isMember(filteredTransitions[i], transitionsToRemove)) { - tmp.push_back(filteredTransitions[i]); - } - } - filteredTransitions = NodeSet(); - filteredTransitions.insert(filteredTransitions.end(), tmp.begin(), tmp.end()); - - filteredTransitions.push_back(t1); - } - } - return filteredTransitions; -} - -bool InterpreterRC::hasIntersection(const Arabica::XPath::NodeSet& nodeSet1, const Arabica::XPath::NodeSet& nodeSet2) { - for (unsigned int i = 0; i < nodeSet1.size(); i++) { - for (unsigned int j = 0; j < nodeSet2.size(); j++) { - if (nodeSet1[i] == nodeSet2[j]) - return true; - } - } - return false; -} - - -void InterpreterRC::exitStates(const Arabica::XPath::NodeSet& enabledTransitions) { - NodeSet statesToExit = computeExitSet(enabledTransitions); - -#if VERBOSE_STATE_SELECTION - std::cout << "exitStates: "; - for (size_t i = 0; i < statesToExit.size(); i++) { - std::cout << ATTR_CAST(statesToExit[i], "id") << " "; - } - std::cout << std::endl; -#endif - - // remove statesToExit from _statesToInvoke - std::list > tmp; - for (size_t i = 0; i < _statesToInvoke.size(); i++) { - if (!isMember(_statesToInvoke[i], statesToExit)) { - tmp.push_back(_statesToInvoke[i]); - } - } - _statesToInvoke = NodeSet(); - _statesToInvoke.insert(_statesToInvoke.end(), tmp.begin(), tmp.end()); - - statesToExit.forward(false); - statesToExit.sort(); - - - for (size_t i = 0; i < statesToExit.size(); i++) { - NodeSet histories = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "history", statesToExit[i]); - for (size_t j = 0; j < histories.size(); j++) { - Element historyElem = (Element)histories[j]; - std::string historyType = (historyElem.hasAttribute("type") ? historyElem.getAttribute("type") : "shallow"); - NodeSet historyNodes; - for (size_t k = 0; k < _configuration.size(); k++) { - if (iequals(historyType, "deep")) { - if (isAtomic(Element(_configuration[k])) && isDescendant(_configuration[k], statesToExit[i])) - historyNodes.push_back(_configuration[k]); - } else { - if (_configuration[k].getParentNode() == statesToExit[i]) - historyNodes.push_back(_configuration[k]); - } - } - _historyValue[historyElem.getAttribute("id")] = historyNodes; - } - } - - for (size_t i = 0; i < statesToExit.size(); i++) { - USCXML_MONITOR_CALLBACK3(beforeExitingState, Element(statesToExit[i]), (i + 1 < statesToExit.size())) - - NodeSet onExits = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "onExit", statesToExit[i]); - for (size_t j = 0; j < onExits.size(); j++) { - Element onExitElem = (Element)onExits[j]; - executeContent(onExitElem); - } - - USCXML_MONITOR_CALLBACK3(afterExitingState, Element(statesToExit[i]), (i + 1 < statesToExit.size())) - - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", statesToExit[i]); - for (size_t j = 0; j < invokes.size(); j++) { - Element invokeElem = (Element)invokes[j]; - if (HAS_ATTR(invokeElem, "persist") && stringIsTrue(ATTR(invokeElem, "persist"))) { - } else { - cancelInvoke(invokeElem); - } - } - - // remove statesToExit[i] from _configuration - test409 - tmp.clear(); - for (size_t j = 0; j < _configuration.size(); j++) { - if (_configuration[j] != statesToExit[i]) { - tmp.push_back(_configuration[j]); - } - } - _configuration = NodeSet(); - _configuration.insert(_configuration.end(), tmp.begin(), tmp.end()); - } -} - -/* -function computeExitSet(transitions) - statesToExit = new OrderedSet - for t in transitions: - if(t.target): - domain = getTransitionDomain(t) - for s in configuration: - if isDescendant(s,domain): - statesToExit.add(s) - return statesToExit -*/ -Arabica::XPath::NodeSet InterpreterRC::computeExitSet(const Arabica::XPath::NodeSet& transitions) { - - NodeSet statesToExit; - for (unsigned int i = 0; i < transitions.size(); i++) { - Element t(transitions[i]); - if (!isTargetless(t)) { - Arabica::DOM::Node domain = getTransitionDomain(t); - if (!domain) - continue; - for (unsigned int j = 0; j < _configuration.size(); j++) { - const Node& s = _configuration[j]; - if (isDescendant(s, domain)) { - statesToExit.push_back(s); - } - } - } - } -#if VERBOSE - std::cout << "computeExitSet: "; - for (size_t i = 0; i < statesToExit.size(); i++) { - std::cout << ATTR_CAST(statesToExit[i], "id") << " "; - } - std::cout << std::endl; -#endif - - return statesToExit; -} - -Arabica::XPath::NodeSet InterpreterRC::computeExitSet(const Arabica::DOM::Node& transition) { -// if (_exitSet.find(transition) != _exitSet.end()) // speed up removeConflicting -// return _exitSet[transition]; - - Arabica::XPath::NodeSet transitions; - transitions.push_back(transition); - - Arabica::XPath::NodeSet exitSet = computeExitSet(transitions); - //_exitSet[transition] = exitSet; - -#if 0 - std::cerr << "Exit set for transition '" << transition << "': " << std::endl; - for (size_t i = 0; i < exitSet.size(); i++) { - std::cerr << ATTR_CAST(exitSet[i], "id") << std::endl << "----" << std::endl; - } - std::cerr << std::endl; -#endif - return exitSet; -} - -void InterpreterRC::enterStates(const Arabica::XPath::NodeSet& enabledTransitions) { - NodeSet statesToEnter; - NodeSet statesForDefaultEntry; - // initialize the temporary table for default content in history states - std::map > defaultHistoryContent; - - computeEntrySet(enabledTransitions, statesToEnter, statesForDefaultEntry, defaultHistoryContent); - statesToEnter.to_document_order(); - -#if VERBOSE_STATE_SELECTION - std::cout << "enterStates: "; - for (size_t i = 0; i < statesToEnter.size(); i++) { - std::cout << ATTR_CAST(statesToEnter[i], "id") << " "; - } - std::cout << std::endl; -#endif - - for (size_t i = 0; i < statesToEnter.size(); i++) { - Element s = (Element)statesToEnter[i]; - - USCXML_MONITOR_CALLBACK3(beforeEnteringState, s, i + 1 < statesToEnter.size()) - - _configuration.push_back(s); - _statesToInvoke.push_back(s); - - if (_binding == LATE && !isMember(s, _alreadyEntered)) { - NodeSet dataModelElems = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "datamodel", s); - if(dataModelElems.size() > 0 && _dataModel) { - Arabica::XPath::NodeSet dataElems = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "data", dataModelElems[0]); - for (size_t j = 0; j < dataElems.size(); j++) { - if (dataElems[j].getNodeType() == Node_base::ELEMENT_NODE) - initializeData(Element(dataElems[j])); - } - } - _alreadyEntered.push_back(s); - } - // execute onentry executable content - NodeSet onEntryElems = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "onEntry", s); - executeContent(onEntryElems, false); - - if (isMember(s, statesForDefaultEntry)) { - // execute initial transition content for compound states - Arabica::XPath::NodeSet transitions = _xpath.evaluate("" + _nsInfo.xpathPrefix + "initial/" + _nsInfo.xpathPrefix + "transition", s).asNodeSet(); - if (transitions.size() > 0) { - executeContent(transitions); - } - } - - USCXML_MONITOR_CALLBACK3(afterEnteringState, s, i + 1 < statesToEnter.size()) - - if (HAS_ATTR(_scxml, "flat") && stringIsTrue(ATTR(_scxml, "flat"))) { - // extension for flattened interpreters - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", s); - for (unsigned int j = 0; j < invokes.size(); j++) { - Element invokeElem = Element(invokes[j]); - if (HAS_ATTR(invokeElem, "persist") && stringIsTrue(ATTR(invokeElem, "persist"))) { - invoke(invokeElem); - } - } - - // extension for flattened SCXML documents, we will need an explicit uninvoke element - NodeSet uninvokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "uninvoke", s); - for (size_t j = 0; j < uninvokes.size(); j++) { - Element uninvokeElem = (Element)uninvokes[j]; - cancelInvoke(uninvokeElem); - } - } - -// std::cout << "HIST?: " << ATTR(s, "id") << std::endl; - if (defaultHistoryContent.find(ATTR(s, "id")) != defaultHistoryContent.end()) { - executeContent(Element(defaultHistoryContent[ATTR(s, "id")])); - } - - if (isFinal(s)) { - Element parent = (Element)s.getParentNode(); - - Arabica::DOM::Element doneData; - Arabica::XPath::NodeSet doneDatas = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "donedata", s); - if (doneDatas.size() > 0) { - // only process first donedata element - doneData = Element(doneDatas[0]); - } - - if (parentIsScxmlState(s)) { - _topLevelFinalReached = true; - } else { - internalDoneSend(parent, doneData); - Element grandParent = (Element)parent.getParentNode(); - -// internalDoneSend(parent, Arabica::DOM::Element()); - - if (isParallel(grandParent)) { - Arabica::XPath::NodeSet childs = getChildStates(grandParent); - bool inFinalState = true; - for (size_t j = 0; j < childs.size(); j++) { - if (!isInFinalState(Element(childs[j]))) { - inFinalState = false; - break; - } - } - if (inFinalState) { - internalDoneSend(grandParent, Arabica::DOM::Element()); - } - } - } - } - } -} - -/* -procedure computeEntrySet(transitions, statesToEnter, statesForDefaultEntry, defaultHistoryContent) - for t in transitions: - for s in t.target: - addDescendantStatesToEnter(s,statesToEnter,statesForDefaultEntry, defaultHistoryContent) - ancestor = getTransitionDomain(t) - for s in getEffectiveTargetStates(t)): - addAncestorStatesToEnter(s, ancestor, statesToEnter, statesForDefaultEntry, defaultHistoryContent) -*/ - -void InterpreterRC::computeEntrySet(const Arabica::XPath::NodeSet& transitions, - NodeSet& statesToEnter, - NodeSet& statesForDefaultEntry, - std::map >& defaultHistoryContent) { - - // add all descendants in a dedicated first step - for (size_t i = 0; i < transitions.size(); i++) { - Element t(transitions[i]); - - NodeSet targets = getTargetStates(t); - for (size_t j = 0; j < targets.size(); j++) { - Element s = Element(targets[j]); - addDescendantStatesToEnter(s, statesToEnter, statesForDefaultEntry, defaultHistoryContent); - } - } - - // only now add the ancestors - for (size_t i = 0; i < transitions.size(); i++) { - Element t(transitions[i]); - Element ancestor = Element(getTransitionDomain(t)); - NodeSet effectiveTargetStates = getEffectiveTargetStates(t); - - for (size_t j = 0; j < effectiveTargetStates.size(); j++) { - Element s = Element(effectiveTargetStates[j]); - addAncestorStatesToEnter(s, ancestor, statesToEnter, statesForDefaultEntry, defaultHistoryContent); - } - - } -} - -/* -function getEffectiveTargetStates(transition) - effectiveTargets = new OrderedSet() - for s in transition.target - if isHistoryState(s): - if historyValue[s.id]: - effectiveTargets.union(historyValue[s.id]) - else: - effectiveTargets.union(getEffectiveTargetStates(s.transition)) - else: - effectiveTargets.add(s) - return effectiveTargets -*/ - -Arabica::XPath::NodeSet InterpreterRC::getEffectiveTargetStates(const Arabica::DOM::Element& transition) { - NodeSet effectiveTargets; - - NodeSet targets; - if (isState(transition)) { - targets = getInitialStates(transition); - return targets; - } else { - targets = getTargetStates(transition); - } - - for (size_t j = 0; j < targets.size(); j++) { - Element s = Element(targets[j]); - if (isHistory(s)) { - if (_historyValue.find(ATTR(s, "id")) != _historyValue.end()) { - targets.push_back(_historyValue[ATTR(s, "id")]); - } else { - NodeSet histTrans = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", s); - // TODO: what if there are many history transitions? - if (histTrans.size() > 0) - targets.push_back(getEffectiveTargetStates(Element(histTrans[0]))); - } - } else { - effectiveTargets.push_back(s); - } - } - - return effectiveTargets; -} - -void InterpreterRC::computeEntrySet(const Arabica::DOM::Node& transition, - NodeSet& statesToEnter, - NodeSet& statesForDefaultEntry, - std::map >& defaultHistoryContent) { - Arabica::XPath::NodeSet transitions; - transitions.push_back(transition); - computeEntrySet(transitions, statesToEnter, statesForDefaultEntry, defaultHistoryContent); -} - - -/* -procedure addDescendantStatesToEnter(state,statesToEnter,statesForDefaultEntry, defaultHistoryContent): - if isHistoryState(state): - if historyValue[state.id]: - for s in historyValue[state.id]: - addDescendantStatesToEnter(s,statesToEnter,statesForDefaultEntry, defaultHistoryContent) - addAncestorStatesToEnter(s, state.parent, statesToEnter, statesForDefaultEntry, defaultHistoryContent) - else: - defaultHistoryContent[state.parent.id] = state.transition.content - for s in state.transition.target: - addDescendantStatesToEnter(s,statesToEnter,statesForDefaultEntry, defaultHistoryContent) - addAncestorStatesToEnter(s, state.parent, statesToEnter, statesForDefaultEntry, defaultHistoryContent) - else: - statesToEnter.add(state) - if isCompoundState(state): - statesForDefaultEntry.add(state) - for s in getEffectiveTargetStates(state.initial.transition): - addDescendantStatesToEnter(s,statesToEnter,statesForDefaultEntry, defaultHistoryContent) - addAncestorStatesToEnter(s, state, statesToEnter, statesForDefaultEntry, defaultHistoryContent) - else: - if isParallelState(state): - for child in getChildStates(state): - if not statesToEnter.some(lambda s: isDescendant(s,child)): - addDescendantStatesToEnter(child,statesToEnter,statesForDefaultEntry, defaultHistoryContent) -*/ -void InterpreterRC::addDescendantStatesToEnter(const Arabica::DOM::Element& state, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry, - std::map >& defaultHistoryContent) { - -#if VERBOSE_STATE_SELECTION - std::cout << getPadding() << "addDescendantStatesToEnter: " << ATTR(state, "id") << std::endl; - padding++; -#endif - - if (isHistory(state)) { - - /* - if historyValue[state.id]: - for s in historyValue[state.id]: - addDescendantStatesToEnter(s,statesToEnter,statesForDefaultEntry, defaultHistoryContent) - addAncestorStatesToEnter(s, state.parent, statesToEnter, statesForDefaultEntry, defaultHistoryContent) - else: - defaultHistoryContent[state.parent.id] = state.transition.content - for s in state.transition.target: - addDescendantStatesToEnter(s,statesToEnter,statesForDefaultEntry, defaultHistoryContent) - addAncestorStatesToEnter(s, state.parent, statesToEnter, statesForDefaultEntry, defaultHistoryContent) - */ - std::string stateId = ATTR(state, "id"); - if (_historyValue.find(stateId) != _historyValue.end()) { - const Arabica::XPath::NodeSet& historyValue = _historyValue[stateId]; - for (size_t i = 0; i < historyValue.size(); i++) { - const Element& s = Element(historyValue[i]); - addDescendantStatesToEnter(s,statesToEnter,statesForDefaultEntry, defaultHistoryContent); - addAncestorStatesToEnter(s, getParentState(s), statesToEnter, statesForDefaultEntry, defaultHistoryContent); - } - - } else { - NodeSet transitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", state); - if (transitions.size() > 0) { - // TODO: what if there are many history transitions? -// std::cout << "HIST: " << ATTR_CAST(getParentState(state), "id") << std::endl; - defaultHistoryContent[ATTR_CAST(getParentState(state), "id")] = transitions[0]; - } - - for (size_t i = 0; i < transitions.size(); i++) { - NodeSet targets = getTargetStates(Element(transitions[i])); - for (size_t j = 0; j < targets.size(); j++) { - const Element& s = Element(targets[i]); - addDescendantStatesToEnter(s,statesToEnter,statesForDefaultEntry, defaultHistoryContent); - addAncestorStatesToEnter(s, getParentState(s), statesToEnter, statesForDefaultEntry, defaultHistoryContent); - } - } - } - } else { - /* - statesToEnter.add(state) - if isCompoundState(state): - statesForDefaultEntry.add(state) - for s in getEffectiveTargetStates(state.initial.transition): - addDescendantStatesToEnter(s,statesToEnter,statesForDefaultEntry, defaultHistoryContent) - addAncestorStatesToEnter(s, state, statesToEnter, statesForDefaultEntry, defaultHistoryContent) - else: - if isParallelState(state): - for child in getChildStates(state): - if not statesToEnter.some(lambda s: isDescendant(s,child)): - addDescendantStatesToEnter(child,statesToEnter,statesForDefaultEntry, defaultHistoryContent) - */ - - if (!isMember(state, statesToEnter)) { // adding an existing element invalidates old reference -#if VERBOSE_STATE_SELECTION - std::cout << getPadding() << "adding: " << ATTR_CAST(state, "id") << std::endl; -#endif - statesToEnter.push_back(state); - } - - if (isCompound(state)) { - statesForDefaultEntry.push_back(state); - - // test 579 - initial leads to history still fails - NodeSet targets = getEffectiveTargetStates(Element(state)); - for (size_t i = 0; i < targets.size(); i++) { - const Element& s = Element(targets[i]); - addDescendantStatesToEnter(s, statesToEnter, statesForDefaultEntry, defaultHistoryContent); - } - - for (size_t i = 0; i < targets.size(); i++) { - const Element& s = Element(targets[i]); - addAncestorStatesToEnter(s, state, statesToEnter, statesForDefaultEntry, defaultHistoryContent); - } - - } else if(isParallel(state)) { - NodeSet childStates = getChildStates(state); - - for (size_t i = 0; i < childStates.size(); i++) { - const Element& child = Element(childStates[i]); - - for (size_t j = 0; j < statesToEnter.size(); j++) { - const Node& s = statesToEnter[j]; - if (isDescendant(s, child)) { - goto BREAK_LOOP; - } - - } - addDescendantStatesToEnter(child,statesToEnter,statesForDefaultEntry, defaultHistoryContent); -BREAK_LOOP: - ; - } - } - } - padding--; -} - -/* -procedure addAncestorStatesToEnter(state, ancestor, statesToEnter, statesForDefaultEntry, defaultHistoryContent) - for anc in getProperAncestors(state,ancestor): - statesToEnter.add(anc) - if isParallelState(anc): - for child in getChildStates(anc): - if not statesToEnter.some(lambda s: isDescendant(s,child)): - addDescendantStatesToEnter(child,statesToEnter,statesForDefaultEntry, defaultHistoryContent) -*/ -void InterpreterRC::addAncestorStatesToEnter(const Arabica::DOM::Element& state, - const Arabica::DOM::Element& ancestor, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry, - std::map >& defaultHistoryContent) { - -#if VERBOSE_STATE_SELECTION - std::cout << getPadding() << "addAncestorStatesToEnter: " << ATTR(state, "id") << " - " << ATTR(ancestor, "id") << std::endl; - padding++; -#endif - - NodeSet ancestors = getProperAncestors(state, ancestor); - for (size_t i = 0; i < ancestors.size(); i++) { - const Node& anc = ancestors[i]; -#if VERBOSE_STATE_SELECTION - std::cout << getPadding() << "adding: " << ATTR_CAST(anc, "id") << std::endl; -#endif - - statesToEnter.push_back(anc); - - if (isParallel(Element(anc))) { - NodeSet childStates = getChildStates(anc); - for (size_t j = 0; j < childStates.size(); j++) { - const Element& child = Element(childStates[j]); - for (size_t k = 0; k < statesToEnter.size(); k++) { - const Node& s = statesToEnter[k]; - if (isDescendant(s, child)) { - goto BREAK_LOOP; - } - } - addDescendantStatesToEnter(child,statesToEnter,statesForDefaultEntry, defaultHistoryContent); -BREAK_LOOP: - ; - } - } - } - padding--; -} - -/* -function getTransitionDomain(t) - tstates = getEffectiveTargetStates(t) - if not tstates: - return null - elif t.type == "internal" and isCompoundState(t.source) and tstates.every(lambda s: isDescendant(s,t.source)): - return t.source - else: - return findLCCA([t.source].append(tstates)) -*/ -Arabica::DOM::Node InterpreterRC::getTransitionDomain(const Arabica::DOM::Element& transition) { - NodeSet tStates = getEffectiveTargetStates(transition); - if (tStates.size() == 0) { - return Arabica::DOM::Node(); // null - } - std::string transitionType = (HAS_ATTR(transition, "type") ? ATTR(transition, "type") : "external"); - Node source = getSourceState(transition); - - if (iequals(transitionType, "internal") && isCompound(Element(source))) { - for (size_t i = 0; i < tStates.size(); i++) { - const Node& s = tStates[i]; - if (!isDescendant(s, source)) - goto BREAK_LOOP; - } - return source; - } - -BREAK_LOOP: - Arabica::XPath::NodeSet states; - states.push_back(source); - states.push_back(tStates); - return findLCCA(states); -} - -void InterpreterRC::handleDOMEvent(Arabica::DOM::Events::Event& event) { - InterpreterImpl::handleDOMEvent(event); - - if (event.getType().compare("DOMAttrModified") == 0) // we do not care about attributes - return; - -// Node target = Arabica::DOM::Node(event.getTarget()); -// NodeSet transitions = DOMUtils::DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", target, true); -// if (transitions.size() > 0) - _exitSet.clear(); - -} -} \ No newline at end of file diff --git a/src/uscxml/interpreter/InterpreterRC.h b/src/uscxml/interpreter/InterpreterRC.h deleted file mode 100644 index 36aca3d..0000000 --- a/src/uscxml/interpreter/InterpreterRC.h +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef INTERPRETERRC_H_WLJEI019 -#define INTERPRETERRC_H_WLJEI019 - -#include "uscxml/Interpreter.h" - -namespace uscxml { - -class InterpreterRC : public InterpreterImpl { -protected: - void enterStates(const Arabica::XPath::NodeSet& enabledTransitions); - void exitStates(const Arabica::XPath::NodeSet& enabledTransitions); - Arabica::XPath::NodeSet removeConflictingTransitions(const Arabica::XPath::NodeSet& enabledTransitions); - - bool hasIntersection(const Arabica::XPath::NodeSet& nodeSet1, const Arabica::XPath::NodeSet& nodeSet2); - - Arabica::XPath::NodeSet computeExitSet(const Arabica::XPath::NodeSet& transitions); - Arabica::XPath::NodeSet computeExitSet(const Arabica::DOM::Node& transition); - - void computeEntrySet(const Arabica::XPath::NodeSet& transitions, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry, - std::map >& defaultHistoryContent); - void computeEntrySet(const Arabica::DOM::Node& transition, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry, - std::map >& defaultHistoryContent); - - Arabica::DOM::Node getTransitionDomain(const Arabica::DOM::Element& transition); - Arabica::XPath::NodeSet getEffectiveTargetStates(const Arabica::DOM::Element& transition); - - void addDescendantStatesToEnter(const Arabica::DOM::Element& state, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry, - std::map >& defaultHistoryContent); - - void addAncestorStatesToEnter(const Arabica::DOM::Element& state, - const Arabica::DOM::Element& ancestor, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry, - std::map >& defaultHistoryContent); - virtual void handleDOMEvent(Arabica::DOM::Events::Event& event); - -private: - std::map, Arabica::XPath::NodeSet > _exitSet; -}; - -} - -#endif /* end of include guard: INTERPRETERRC_H_WLJEI019 */ diff --git a/src/uscxml/interpreter/MicroStepFast.cpp b/src/uscxml/interpreter/MicroStepFast.cpp new file mode 100644 index 0000000..fbddbc9 --- /dev/null +++ b/src/uscxml/interpreter/MicroStepFast.cpp @@ -0,0 +1,1149 @@ +/** + * @file + * @author 2012-2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#undef USCXML_VERBOSE + +#include "MicroStepFast.h" +#include "uscxml/util/DOM.h" +#include "uscxml/util/String.h" +#include "uscxml/util/Predicates.h" +#include "uscxml/util/Convenience.h" +#include "uscxml/interpreter/InterpreterMonitor.h" + +#include + +#define BIT_ANY_SET(b) (!b.none()) +#define BIT_HAS(idx, bitset) (bitset[idx]) +#define BIT_HAS_AND(bitset1, bitset2) bitset1.intersects(bitset2) +#define BIT_SET_AT(idx, bitset) bitset[idx] = true; +#define BIT_CLEAR(idx, bitset) bitset[idx] = false; + +#define USCXML_GET_TRANS(i) (*_transitions[i]) +#define USCXML_GET_STATE(i) (*_states[i]) + +#define USCXML_CTX_PRISTINE 0x00 +#define USCXML_CTX_SPONTANEOUS 0x01 +#define USCXML_CTX_INITIALIZED 0x02 +#define USCXML_CTX_TOP_LEVEL_FINAL 0x04 +#define USCXML_CTX_TRANSITION_FOUND 0x08 +#define USCXML_CTX_FINISHED 0x10 +#define USCXML_CTX_STABLE 0x20 // only needed to signal onStable once + +#define USCXML_TRANS_SPONTANEOUS 0x01 +#define USCXML_TRANS_TARGETLESS 0x02 +#define USCXML_TRANS_INTERNAL 0x04 +#define USCXML_TRANS_HISTORY 0x08 +#define USCXML_TRANS_INITIAL 0x10 + +#define USCXML_STATE_ATOMIC 0x01 +#define USCXML_STATE_PARALLEL 0x02 +#define USCXML_STATE_COMPOUND 0x03 +#define USCXML_STATE_FINAL 0x04 +#define USCXML_STATE_HISTORY_DEEP 0x05 +#define USCXML_STATE_HISTORY_SHALLOW 0x06 +#define USCXML_STATE_INITIAL 0x07 +#define USCXML_STATE_HAS_HISTORY 0x80 /* highest bit */ +#define USCXML_STATE_MASK(t) (t & 0x7F) /* mask highest bit */ + +#define USCXML_NUMBER_STATES _states.size() +#define USCXML_NUMBER_TRANS _transitions.size() + +#ifdef __GNUC__ +# define likely(x) (__builtin_expect(!!(x), 1)) +# define unlikely(x) (__builtin_expect(!!(x), 0)) +#else +# define likely(x) (x) +# define unlikely(x) (x) +#endif + +namespace uscxml { + +using namespace xercesc; + +MicroStepFast::MicroStepFast(MicroStepCallbacks* callbacks) + : MicroStepImpl(callbacks), _flags(USCXML_CTX_PRISTINE), _isInitialized(false), _isCancelled(false) { +} + +MicroStepFast::~MicroStepFast() { + for (size_t i = 0; i < _states.size(); i++) { + delete(_states[i]); + } + for (size_t i = 0; i < _transitions.size(); i++) { + delete(_transitions[i]); + } +} + +void MicroStepFast::resortStates(DOMNode* node, const X& xmlPrefix) { + if (node->getNodeType() != DOMNode::ELEMENT_NODE) + return; + + /** + initials + deep histories + shallow histories + everything else + */ + + DOMElement* element = dynamic_cast(node); + + // shallow history states to top + DOMNode* child = element->getFirstChild(); + while(child) { + resortStates(child, xmlPrefix); + if (child->getNodeType() == DOMNode::ELEMENT_NODE && + TAGNAME_CAST(child) == xmlPrefix.str() + "history" && + (!HAS_ATTR(element, "type") || iequals(ATTR(element, "type"), "shallow"))) { + + DOMNode* tmp = child->getNextSibling(); + if (child != element->getFirstChild()) { + element->insertBefore(child, element->getFirstChild()); + } + child = tmp; + } else { + child = child->getNextSibling(); + } + } + + // deep history states to top + child = element->getFirstChild(); + while(child) { + resortStates(child, xmlPrefix); + if (child->getNodeType() == DOMNode::ELEMENT_NODE && + TAGNAME_CAST(child) == xmlPrefix.str() + "history" && + HAS_ATTR(element, "type") && + iequals(ATTR(element, "type"), "deep")) { + + DOMNode* tmp = child->getNextSibling(); + if (child != element->getFirstChild()) { + element->insertBefore(child, element->getFirstChild()); + } + child = tmp; + } else { + child = child->getNextSibling(); + } + } + + // initial states on top of histories even + child = element->getFirstChild(); + while(child) { + resortStates(child, xmlPrefix); + if (child->getNodeType() == DOMNode::ELEMENT_NODE && LOCALNAME_CAST(child) == "initial") { + DOMNode* tmp = child->getNextSibling(); + if (child != element->getFirstChild()) { + element->insertBefore(child, element->getFirstChild()); + } + child = tmp; + } else { + child = child->getNextSibling(); + } + } +} + +void MicroStepFast::init(xercesc::DOMElement* scxml) { + + _scxml = scxml; + _binding = (HAS_ATTR(_scxml, "binding") && iequals(ATTR(_scxml, "binding"), "late") ? LATE : EARLY); + _xmlPrefix = _scxml->getPrefix(); + _xmlNS = _scxml->getNamespaceURI(); + if (_xmlPrefix) { + _xmlPrefix = std::string(_xmlPrefix) + ":"; + } + + resortStates(_scxml, _xmlPrefix); + + // TODO: https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/transform/ChartToC.cpp#L244 + + + /** -- All things states -- */ + + std::set elements; + elements.insert(_xmlPrefix.str() + "state"); + elements.insert(_xmlPrefix.str() + "parallel"); + elements.insert(_xmlPrefix.str() + "scxml"); + elements.insert(_xmlPrefix.str() + "initial"); + elements.insert(_xmlPrefix.str() + "final"); + elements.insert(_xmlPrefix.str() + "history"); + + std::list tmp; + size_t i, j; + + tmp = DOMUtils::inDocumentOrder(elements, _scxml); + _states.resize(tmp.size()); + _configuration.resize(tmp.size()); + _history.resize(tmp.size()); + _initializedData.resize(tmp.size()); + _invocations.resize(tmp.size()); + + for (i = 0; i < _states.size(); i++) { + _states[i] = new State(); + _states[i]->documentOrder = i; + _states[i]->element = tmp.front(); + _states[i]->element->setUserData(X("uscxmlState"), _states[i], NULL); + _states[i]->completion.resize(_states.size()); + _states[i]->ancestors.resize(_states.size()); + _states[i]->children.resize(_states.size()); + tmp.pop_front(); + } + assert(tmp.size() == 0); + + if (_binding == Binding::EARLY && _states.size() > 0) { + // add all data elements to the first state + std::list dataModels = DOMUtils::filterChildElements(_xmlPrefix.str() + "datamodel", _states[0]->element, true); + dataModels.erase(std::remove_if(dataModels.begin(), + dataModels.end(), + [](DOMElement* elem) { + return isInEmbeddedDocument(elem); + }), + dataModels.end()); + + _states[0]->data = DOMUtils::filterChildElements(_xmlPrefix.str() + "data", dataModels, false); + } + + for (i = 0; i < _states.size(); i++) { + // collect states with an id attribute + if (HAS_ATTR(_states[i]->element, "id")) { + _stateIds[ATTR(_states[i]->element, "id")] = i; + } + + // check for executable content and datamodels + if (_states[i]->element->getChildElementCount() > 0) { + _states[i]->onEntry = DOMUtils::filterChildElements(_xmlPrefix.str() + "onentry", _states[i]->element); + _states[i]->onExit = DOMUtils::filterChildElements(_xmlPrefix.str() + "onexit", _states[i]->element); + _states[i]->invoke = DOMUtils::filterChildElements(_xmlPrefix.str() + "invoke", _states[i]->element); + + if (i == 0) { + // have global scripts as onentry of + _states[i]->onEntry = DOMUtils::filterChildElements(_xmlPrefix.str() + "script", _states[i]->element, false); + } + + std::list doneDatas = DOMUtils::filterChildElements(_xmlPrefix.str() + "donedata", _states[i]->element); + if (doneDatas.size() > 0) { + _states[i]->doneData = doneDatas.front(); + } + + if (_binding == Binding::LATE) { + std::list dataModels = DOMUtils::filterChildElements(_xmlPrefix.str() + "datamodel", _states[i]->element); + if (dataModels.size() > 0) { + _states[i]->data = DOMUtils::filterChildElements(_xmlPrefix.str() + "data", dataModels, false); + } + } + } + + + // set the states type + if (false) { + } else if (iequals(TAGNAME(_states[i]->element), _xmlPrefix.str() + "initial")) { + _states[i]->type = USCXML_STATE_INITIAL; + } else if (isFinal(_states[i]->element)) { + _states[i]->type = USCXML_STATE_FINAL; + } else if (isHistory(_states[i]->element)) { + if (HAS_ATTR(_states[i]->element, "type") && iequals(ATTR(_states[i]->element, "type"), "deep")) { + _states[i]->type = USCXML_STATE_HISTORY_DEEP; + } else { + _states[i]->type = USCXML_STATE_HISTORY_SHALLOW; + } + } else if (isAtomic(_states[i]->element)) { + _states[i]->type = USCXML_STATE_ATOMIC; + } else if (isParallel(_states[i]->element)) { + _states[i]->type = USCXML_STATE_PARALLEL; + } else if (isCompound(_states[i]->element)) { + _states[i]->type = USCXML_STATE_COMPOUND; + } else { // + _states[i]->type = USCXML_STATE_COMPOUND; + } + + // establish the states' completion + std::list completion = getCompletion(_states[i]->element); + for (j = 0; j < _states.size(); j++) { + if (!completion.empty() && _states[j]->element == completion.front()) { + _states[i]->completion[j] = true; + completion.pop_front(); + } else { + _states[i]->completion[j] = false; + } + } + assert(completion.size() == 0); + + // this is set when establishing the completion + if (_states[i]->element->getUserData(X("hasHistoryChild")) == _states[i]) { + _states[i]->type |= USCXML_STATE_HAS_HISTORY; + } + + // establish the states' ancestors + DOMNode* parent = _states[i]->element->getParentNode(); + if (parent && parent->getNodeType() == DOMNode::ELEMENT_NODE) { + State* uscxmlState = (State*)parent->getUserData(X("uscxmlState")); + // parent + _states[i]->parent = uscxmlState->documentOrder; + } + + while(parent && parent->getNodeType() == DOMNode::ELEMENT_NODE) { + State* uscxmlState = (State*)parent->getUserData(X("uscxmlState")); + + // ancestors + BIT_SET_AT(uscxmlState->documentOrder, _states[i]->ancestors); + + // children + BIT_SET_AT(i, uscxmlState->children); + parent = parent->getParentNode(); + } + } + + + /** -- All things transitions -- */ + + tmp = DOMUtils::inPostFixOrder(_xmlPrefix.str() + "transition", _scxml); + _transitions.resize(tmp.size()); + + for (i = 0; i < _transitions.size(); i++) { + _transitions[i] = new Transition(); + _transitions[i]->element = tmp.front(); + _transitions[i]->conflicts.resize(_transitions.size()); + _transitions[i]->exitSet.resize(_states.size()); + _transitions[i]->target.resize(_states.size()); + tmp.pop_front(); + } + + for (i = 0; i < _transitions.size(); i++) { + + // establish the transitions' exit set + std::list exitList = getExitSet(_transitions[i]->element, _scxml); + for (j = 0; j < _states.size(); j++) { + if (!exitList.empty() && _states[j]->element == exitList.front()) { + _transitions[i]->exitSet[j] = true; + exitList.pop_front(); + } else { + _transitions[i]->exitSet[j] = false; + } + } + assert(exitList.size() == 0); + + // establish the transitions' conflict set + for (j = 0; j < _transitions.size(); j++) { + if (conflicts(_transitions[i]->element, _transitions[j]->element, _scxml)) { + _transitions[i]->conflicts[j] = true; + } else { + _transitions[i]->conflicts[j] = false; + } + } + + // establish the transitions' target set + std::list targets = tokenize(ATTR(_transitions[i]->element, "target")); + for (auto tIter = targets.begin(); tIter != targets.end(); tIter++) { + if (_stateIds.find(*tIter) != _stateIds.end()) { + _transitions[i]->target[_stateIds[*tIter]] = true; + } + } + + // the transition's source + State* uscxmlState = (State*)(_transitions[i]->element->getParentNode()->getUserData(X("uscxmlState"))); + _transitions[i]->source = uscxmlState->documentOrder; + + + // the transition's type + if (!HAS_ATTR(_transitions[i]->element, "target")) { + _transitions[i]->type |= USCXML_TRANS_TARGETLESS; + } + + if (HAS_ATTR(_transitions[i]->element, "type") && iequals(ATTR(_transitions[i]->element, "type"), "internal")) { + _transitions[i]->type |= USCXML_TRANS_INTERNAL; + } + + if (!HAS_ATTR(_transitions[i]->element, "event")) { + _transitions[i]->type |= USCXML_TRANS_SPONTANEOUS; + } + + if (iequals(TAGNAME_CAST(_transitions[i]->element->getParentNode()), _xmlPrefix.str() + "history")) { + _transitions[i]->type |= USCXML_TRANS_HISTORY; + } + + if (iequals(TAGNAME_CAST(_transitions[i]->element->getParentNode()), _xmlPrefix.str() + "initial")) { + _transitions[i]->type |= USCXML_TRANS_INITIAL; + } + + + // the transitions event and condition + _transitions[i]->event = (HAS_ATTR(_transitions[i]->element, "event") ? ATTR(_transitions[i]->element, "event") : ""); + _transitions[i]->cond = (HAS_ATTR(_transitions[i]->element, "cond") ? ATTR(_transitions[i]->element, "cond") : ""); + + // is there executable content? + if (_transitions[i]->element->getChildElementCount() > 0) { + _transitions[i]->onTrans = _transitions[i]->element; + } + + } + _isInitialized = true; +} + +void MicroStepFast::markAsCancelled() { + _isCancelled = true; +} + +InterpreterState MicroStepFast::step(bool blocking) { + if (!_isInitialized) { + init(_scxml); + return USCXML_INITIALIZED; + } + + size_t i, j, k; + + boost::dynamic_bitset<> exitSet(_states.size(), false); + boost::dynamic_bitset<> entrySet(_states.size(), false); + boost::dynamic_bitset<> targetSet(_states.size(), false); + boost::dynamic_bitset<> tmpStates(_states.size(), false); + + boost::dynamic_bitset<> conflicts(_transitions.size(), false); + boost::dynamic_bitset<> transSet(_transitions.size(), false); + +#ifdef USCXML_VERBOSE + std::cerr << "Config: "; + printStateNames(_configuration); +#endif + + if (_flags & USCXML_CTX_FINISHED) + return USCXML_FINISHED; + + if (_flags & USCXML_CTX_TOP_LEVEL_FINAL) { + USCXML_MONITOR_CALLBACK(_callbacks->getMonitor(), beforeCompletion); + + /* exit all remaining states */ + i = USCXML_NUMBER_STATES; + while(i-- > 0) { + if (BIT_HAS(i, _configuration)) { + /* call all on exit handlers */ + for (auto exitIter = USCXML_GET_STATE(i).onExit.begin(); exitIter != USCXML_GET_STATE(i).onExit.end(); exitIter++) { + try { + _callbacks->process(*exitIter); + } catch (...) { + // do nothing and continue with next block + } + } + /* Leave configuration intact */ +// BIT_CLEAR(i, _configuration); + } + + if (BIT_HAS(i, _invocations)) { + /* cancel all invokers */ + if (USCXML_GET_STATE(i).invoke.size() > 0) { + for (auto invIter = USCXML_GET_STATE(i).invoke.begin(); invIter != USCXML_GET_STATE(i).invoke.end(); invIter++) { + _callbacks->uninvoke(*invIter); + } + } + BIT_CLEAR(i, _invocations); + } + } + + _flags |= USCXML_CTX_FINISHED; + + USCXML_MONITOR_CALLBACK(_callbacks->getMonitor(), afterCompletion); + + return USCXML_FINISHED; + } + + + if (_flags == USCXML_CTX_PRISTINE) { + + targetSet |= USCXML_GET_STATE(0).completion; + _flags |= USCXML_CTX_SPONTANEOUS | USCXML_CTX_INITIALIZED; + USCXML_MONITOR_CALLBACK(_callbacks->getMonitor(), beforeMicroStep); + + goto ESTABLISH_ENTRYSET; + } + + if (_flags & USCXML_CTX_SPONTANEOUS) { + _event = Event(); + goto SELECT_TRANSITIONS; + } + + + if ((_event = _callbacks->dequeueInternal())) { + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), beforeProcessingEvent, _event); + goto SELECT_TRANSITIONS; + } + + /* manage invocations */ + for (i = 0; i < USCXML_NUMBER_STATES; i++) { + /* uninvoke */ + if (!BIT_HAS(i, _configuration) && BIT_HAS(i, _invocations)) { + if (USCXML_GET_STATE(i).invoke.size() > 0) { + for (auto invIter = USCXML_GET_STATE(i).invoke.begin(); invIter != USCXML_GET_STATE(i).invoke.end(); invIter++) { + _callbacks->uninvoke(*invIter); + } + } + BIT_CLEAR(i, _invocations) + } + /* invoke */ + if (BIT_HAS(i, _configuration) && !BIT_HAS(i, _invocations)) { + if (USCXML_GET_STATE(i).invoke.size() > 0) { + for (auto invIter = USCXML_GET_STATE(i).invoke.begin(); invIter != USCXML_GET_STATE(i).invoke.end(); invIter++) { + try { + _callbacks->invoke(*invIter); + } catch (...) { + } + } + } + BIT_SET_AT(i, _invocations) + } + } + + // we dequeued all internal events and ought to signal stable configuration + if (!(_flags & USCXML_CTX_STABLE)) { + USCXML_MONITOR_CALLBACK(_callbacks->getMonitor(), onStableConfiguration); + _microstepConfigurations.clear(); + _flags |= USCXML_CTX_STABLE; + } + + if ((_event = _callbacks->dequeueExternal(blocking))) { + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), beforeProcessingEvent, _event); + goto SELECT_TRANSITIONS; + } + + if (_isCancelled) { + // finalize and exit + _flags |= USCXML_CTX_TOP_LEVEL_FINAL; + return USCXML_CANCELLED; + } + +// if (blocking) // we received the empty event to unblock +// return USCXML_IDLE; // we return IDLE nevertheless + + return USCXML_IDLE; + +SELECT_TRANSITIONS: + + // we read an event - unset stable to signal onstable again later + _flags &= ~USCXML_CTX_STABLE; + + for (i = 0; i < _transitions.size(); i++) { + /* never select history or initial transitions automatically */ + if unlikely(USCXML_GET_TRANS(i).type & (USCXML_TRANS_HISTORY | USCXML_TRANS_INITIAL)) + continue; + + /* is the transition active? */ + if (BIT_HAS(USCXML_GET_TRANS(i).source, _configuration)) { + /* is it non-conflicting? */ + if (!BIT_HAS(i, conflicts)) { + /* is it spontaneous with an event or vice versa? */ + if ((USCXML_GET_TRANS(i).event.size() == 0 && !_event) || + (USCXML_GET_TRANS(i).event.size() != 0 && _event)) { + /* is it enabled? */ + if ((!_event || _callbacks->isMatched(_event, USCXML_GET_TRANS(i).event)) && + (USCXML_GET_TRANS(i).cond.size() == 0 || _callbacks->isTrue(USCXML_GET_TRANS(i).cond))) { + + /* remember that we found a transition */ + _flags |= USCXML_CTX_TRANSITION_FOUND; + + /* transitions that are pre-empted */ + conflicts |= USCXML_GET_TRANS(i).conflicts; + + /* states that are directly targeted (resolve as entry-set later) */ + targetSet |= USCXML_GET_TRANS(i).target; + + /* states that will be left */ + exitSet |= USCXML_GET_TRANS(i).exitSet; + + BIT_SET_AT(i, transSet); + } + } + } + } + } + +#ifdef USCXML_VERBOSE + std::cerr << "Complete Exit: "; + printStateNames(exitSet); +#endif + + exitSet &= _configuration; + + if (_flags & USCXML_CTX_TRANSITION_FOUND) { + // trigger more sppontaneuous transitions + _flags |= USCXML_CTX_SPONTANEOUS; + _flags &= ~USCXML_CTX_TRANSITION_FOUND; + } else { + // spontaneuous transitions are exhausted + _flags &= ~USCXML_CTX_SPONTANEOUS; + return USCXML_MACROSTEPPED; + } + + USCXML_MONITOR_CALLBACK(_callbacks->getMonitor(), beforeMicroStep); + +#ifdef USCXML_VERBOSE + std::cerr << "Targets: "; + printStateNames(targetSet); +#endif + +#ifdef USCXML_VERBOSE + std::cerr << "Exiting: "; + printStateNames(exitSet); +#endif + +#ifdef USCXML_VERBOSE + std::cerr << "History: "; + printStateNames(_history); +#endif + + + /* REMEMBER_HISTORY: */ + for (i = 0; i < _states.size(); i++) { + if unlikely(USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_HISTORY_SHALLOW || + USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_HISTORY_DEEP) { + /* a history state whose parent is about to be exited */ + if unlikely(BIT_HAS(USCXML_GET_STATE(i).parent, exitSet)) { + tmpStates = USCXML_GET_STATE(i).completion; + + /* set those states who were enabled */ + tmpStates &= _configuration; + + /* clear current history with completion mask */ + _history &= ~(USCXML_GET_STATE(i).completion); + + /* set history */ + _history |= tmpStates; + + } + } + } + +ESTABLISH_ENTRYSET: + /* calculate new entry set */ + entrySet = targetSet; + + /* iterate for ancestors */ + i = entrySet.find_first(); + while(i != boost::dynamic_bitset<>::npos) { + entrySet |= USCXML_GET_STATE(i).ancestors; + i = entrySet.find_next(i); + } + + /* iterate for descendants */ + i = entrySet.find_first(); + while(i != boost::dynamic_bitset<>::npos) { + + + switch (USCXML_STATE_MASK(USCXML_GET_STATE(i).type)) { + case USCXML_STATE_FINAL: + case USCXML_STATE_ATOMIC: + break; + + case USCXML_STATE_PARALLEL: { + entrySet |= USCXML_GET_STATE(i).completion; + break; + } + + case USCXML_STATE_HISTORY_SHALLOW: + case USCXML_STATE_HISTORY_DEEP: { + if (!BIT_HAS_AND(USCXML_GET_STATE(i).completion, _history) && + !BIT_HAS(USCXML_GET_STATE(i).parent, _configuration)) { + + /* nothing set for history, look for a default transition */ + for (j = 0; j < _transitions.size(); j++) { + if unlikely(USCXML_GET_TRANS(j).source == i) { + entrySet |= USCXML_GET_TRANS(j).target; + + if(USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_HISTORY_DEEP && + !BIT_HAS_AND(USCXML_GET_TRANS(j).target, USCXML_GET_STATE(i).children)) { + for (k = i + 1; k < _states.size(); k++) { + if (BIT_HAS(k, USCXML_GET_TRANS(j).target)) { + entrySet |= USCXML_GET_STATE(k).ancestors; + break; + } + } + } + BIT_SET_AT(j, transSet); + break; + } + /* Note: SCXML mandates every history to have a transition! */ + } + } else { + tmpStates = USCXML_GET_STATE(i).completion; + tmpStates &= _history; + entrySet |= tmpStates; + + if (USCXML_GET_STATE(i).type == (USCXML_STATE_HAS_HISTORY | USCXML_STATE_HISTORY_DEEP)) { + /* a deep history state with nested histories -> more completion */ + for (j = i + 1; j < USCXML_NUMBER_STATES; j++) { + if (BIT_HAS(j, USCXML_GET_STATE(i).completion) && + BIT_HAS(j, entrySet) && + (USCXML_GET_STATE(j).type & USCXML_STATE_HAS_HISTORY)) { + for (k = j + 1; k < USCXML_NUMBER_STATES; k++) { + /* add nested history to entry_set */ + if ((USCXML_STATE_MASK(USCXML_GET_STATE(k).type) == USCXML_STATE_HISTORY_DEEP || + USCXML_STATE_MASK(USCXML_GET_STATE(k).type) == USCXML_STATE_HISTORY_SHALLOW) && + BIT_HAS(k, USCXML_GET_STATE(j).children)) { + /* a nested history state */ + BIT_SET_AT(k, entrySet); + } + } + } + } + } + } + break; + } + + case USCXML_STATE_INITIAL: { + for (j = 0; j < USCXML_NUMBER_TRANS; j++) { + if (USCXML_GET_TRANS(j).source == i) { + BIT_SET_AT(j, transSet); + BIT_CLEAR(i, entrySet); + entrySet |= USCXML_GET_TRANS(j).target; + for (k = i + 1; k < USCXML_NUMBER_STATES; k++) { + if (BIT_HAS(k, USCXML_GET_TRANS(j).target)) { + entrySet |= USCXML_GET_STATE(k).ancestors; + } + } + } + } + break; + } + case USCXML_STATE_COMPOUND: { /* we need to check whether one child is already in entry_set */ + if (!BIT_HAS_AND(entrySet, USCXML_GET_STATE(i).children) && + (!BIT_HAS_AND(_configuration, USCXML_GET_STATE(i).children) || + BIT_HAS_AND(exitSet, USCXML_GET_STATE(i).children))) { + entrySet |= USCXML_GET_STATE(i).completion; + if (!BIT_HAS_AND(USCXML_GET_STATE(i).completion, USCXML_GET_STATE(i).children)) { + /* deep completion */ + for (j = i + 1; j < USCXML_NUMBER_STATES; j++) { + if (BIT_HAS(j, USCXML_GET_STATE(i).completion)) { + entrySet |= USCXML_GET_STATE(j).ancestors; + break; /* completion of compound is single state */ + } + } + } + } + break; + } + } + i = entrySet.find_next(i); + + } + + +#ifdef USCXML_VERBOSE + std::cerr << "Transitions: " << transSet << std::endl; +#endif + + /* EXIT_STATES: */ + /* we cannot use find_first due to ordering */ + i = USCXML_NUMBER_STATES; + while(i-- > 0) { + if (BIT_HAS(i, exitSet) && BIT_HAS(i, _configuration)) { + + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), beforeExitingState, USCXML_GET_STATE(i).element); + + /* call all on exit handlers */ + for (auto exitIter = USCXML_GET_STATE(i).onExit.begin(); exitIter != USCXML_GET_STATE(i).onExit.end(); exitIter++) { + try { + _callbacks->process(*exitIter); + } catch (...) { + // do nothing and continue with next block + } + } + BIT_CLEAR(i, _configuration); + + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), afterExitingState, USCXML_GET_STATE(i).element); + + } + } + + /* TAKE_TRANSITIONS: */ + i = transSet.find_first(); + while(i != boost::dynamic_bitset<>::npos) { + if ((USCXML_GET_TRANS(i).type & (USCXML_TRANS_HISTORY | USCXML_TRANS_INITIAL)) == 0) { + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), beforeTakingTransition, USCXML_GET_TRANS(i).element); + + if (USCXML_GET_TRANS(i).onTrans != NULL) { + + /* call executable content in non-history, non-initial transition */ + try { + _callbacks->process(USCXML_GET_TRANS(i).onTrans); + } catch (...) { + // do nothing and continue with next block + } + } + + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), afterTakingTransition, USCXML_GET_TRANS(i).element); + + } + i = transSet.find_next(i); + } + +#ifdef USCXML_VERBOSE + std::cerr << "Entering: "; + printStateNames(entrySet); +#endif + + + /* ENTER_STATES: */ + i = entrySet.find_first(); + while(i != boost::dynamic_bitset<>::npos) { + + if (BIT_HAS(i, _configuration)) { + // already active + i = entrySet.find_next(i); + continue; + } + + /* these are no proper states */ + if unlikely(USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_HISTORY_DEEP || + USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_HISTORY_SHALLOW || + USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_INITIAL) { + i = entrySet.find_next(i); + continue; + } + + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), beforeEnteringState, USCXML_GET_STATE(i).element); + + BIT_SET_AT(i, _configuration); + + /* initialize data */ + if (!BIT_HAS(i, _initializedData)) { + for (auto dataIter = USCXML_GET_STATE(i).data.begin(); dataIter != USCXML_GET_STATE(i).data.end(); dataIter++) { + _callbacks->initData(*dataIter); + } + BIT_SET_AT(i, _initializedData); + } + + /* call all on entry handlers */ + for (auto entryIter = USCXML_GET_STATE(i).onEntry.begin(); entryIter != USCXML_GET_STATE(i).onEntry.end(); entryIter++) { + try { + _callbacks->process(*entryIter); + } catch (...) { + // do nothing and continue with next block + } + } + + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), afterEnteringState, USCXML_GET_STATE(i).element); + + /* take history and initial transitions */ + for (j = 0; j < USCXML_NUMBER_TRANS; j++) { + if unlikely(BIT_HAS(j, transSet) && + (USCXML_GET_TRANS(j).type & (USCXML_TRANS_HISTORY | USCXML_TRANS_INITIAL)) && + USCXML_GET_STATE(USCXML_GET_TRANS(j).source).parent == i) { + + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), beforeTakingTransition, USCXML_GET_TRANS(j).element); + + /* call executable content in transition */ + if (USCXML_GET_TRANS(j).onTrans != NULL) { + try { + _callbacks->process(USCXML_GET_TRANS(j).onTrans); + } catch (...) { + // do nothing and continue with next block + } + } + + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), afterTakingTransition, USCXML_GET_TRANS(j).element); + + } + } + + /* handle final states */ + if unlikely(USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_FINAL) { + if unlikely(USCXML_GET_STATE(i).ancestors.count() == 1 && BIT_HAS(0, USCXML_GET_STATE(i).ancestors)) { + // only the topmost scxml is an ancestor + _flags |= USCXML_CTX_TOP_LEVEL_FINAL; + } else { + /* raise done event */ + _callbacks->raiseDoneEvent(USCXML_GET_STATE(USCXML_GET_STATE(i).parent).element, USCXML_GET_STATE(i).doneData); + } + + /** + * are we the last final state to leave a parallel state?: + * 1. Gather all parallel states in our ancestor chain + * 2. Find all states for which these parallels are ancestors + * 3. Iterate all active final states and remove their ancestors + * 4. If a state remains, not all children of a parallel are final + */ + for (j = 0; j < USCXML_NUMBER_STATES; j++) { + if unlikely(USCXML_STATE_MASK(USCXML_GET_STATE(j).type) == USCXML_STATE_PARALLEL && + BIT_HAS(j, USCXML_GET_STATE(i).ancestors)) { + tmpStates.reset(); + k = _configuration.find_first(); + while (k != boost::dynamic_bitset<>::npos) { + if (BIT_HAS(j, USCXML_GET_STATE(k).ancestors)) { + if (USCXML_STATE_MASK(USCXML_GET_STATE(k).type) == USCXML_STATE_FINAL) { + tmpStates ^= USCXML_GET_STATE(k).ancestors; + } else { + BIT_SET_AT(k, tmpStates); + } + } + k = _configuration.find_next(k); + } + if (!tmpStates.any()) { + // raise done for state j + _callbacks->raiseDoneEvent(USCXML_GET_STATE(j).element, USCXML_GET_STATE(j).doneData); + } + } + } + } + } + USCXML_MONITOR_CALLBACK(_callbacks->getMonitor(), afterMicroStep); + + // are we running in circles? + if (_microstepConfigurations.find(_configuration) != _microstepConfigurations.end()) { + USCXML_MONITOR_CALLBACK1(_callbacks->getMonitor(), + reportIssue, + InterpreterIssue("Reentering same configuration during microstep - possible endless loop", + NULL, + InterpreterIssue::USCXML_ISSUE_WARNING)); + } + _microstepConfigurations.insert(_configuration); + + return USCXML_MICROSTEPPED; +} + +void MicroStepFast::reset() { + _isCancelled = false; + _flags = USCXML_CTX_PRISTINE; + _configuration.reset(); + _history.reset(); + _initializedData.reset(); + _invocations.reset(); + +} + +bool MicroStepFast::isInState(const std::string& stateId) { +#ifdef USCXML_VERBOSE + printStateNames(_configuration); +#endif + if (_stateIds.find(stateId) == _stateIds.end()) + return false; + return _configuration[_stateIds[stateId]]; +} + +std::list MicroStepFast::getConfiguration() { + std::list config; + size_t i = _configuration.find_first(); + while(i != boost::dynamic_bitset<>::npos) { + config.push_back(_states[i]->element); + i = _configuration.find_next(i); + } + return config; +} + + +std::list MicroStepFast::getHistoryCompletion(const DOMElement* history) { + std::set elements; + elements.insert(_xmlPrefix.str() + "history"); + std::list histories = DOMUtils::inPostFixOrder(elements, _scxml); + + std::list covered; + std::list perParentcovered; + const DOMNode* parent = NULL; + + std::list completion; + + + if (parent != history->getParentNode()) { + covered.insert(covered.end(), perParentcovered.begin(), perParentcovered.end()); + perParentcovered.clear(); + parent = history->getParentNode(); + } + + bool deep = (HAS_ATTR(history, "type") && iequals(ATTR(history, "type"), "deep")); + + for (size_t j = 0; j < _states.size(); j++) { + if (_states[j]->element == history) + continue; + + if (DOMUtils::isDescendant((DOMNode*)_states[j]->element, history->getParentNode()) && isHistory(_states[j]->element)) { + ((DOMElement*)history)->setUserData(X("hasHistoryChild"), _states[j], NULL); + } + + if (DOMUtils::isMember(_states[j]->element, covered)) + continue; + + if (deep) { + if (DOMUtils::isDescendant(_states[j]->element, history->getParentNode()) && !isHistory(_states[j]->element)) { + completion.push_back(_states[j]->element); + } + } else { + if (_states[j]->element->getParentNode() == history->getParentNode() && !isHistory(_states[j]->element)) { + completion.push_back(_states[j]->element); + } + } + } + + return completion; +} + +#ifdef USCXML_VERBOSE +/** + * Print name of states contained in a (debugging). + */ +void MicroStepFast::printStateNames(const boost::dynamic_bitset<>& a) { + size_t i; + const char* seperator = ""; + for (i = 0; i < a.size(); i++) { + if (BIT_HAS(i, a)) { + std::cerr << seperator << (HAS_ATTR(USCXML_GET_STATE(i).element, X("id")) ? ATTR(USCXML_GET_STATE(i).element, X("id")) : "UNK"); + seperator = ", "; + } + } + std::cerr << std::endl; +} +#endif + +std::list MicroStepFast::getCompletion(const DOMElement* state) { + + if (isHistory(state)) { + // we already did in setHistoryCompletion + return getHistoryCompletion(state); + + } else if (isParallel(state)) { + return getChildStates(state); + + } else if (HAS_ATTR(state, "initial")) { + return getStates(tokenize(ATTR(state, "initial")), _scxml); + + } else { + std::list completion; + + std::list initElems = DOMUtils::filterChildElements(_xmlPrefix.str() + "initial", state); + if(initElems.size() > 0) { + // initial element is first child + completion.push_back(initElems.front()); + } else { + // first child state + DOMNodeList* children = state->getChildNodes(); + for (size_t i = 0; i < children->getLength(); i++) { + if (children->item(i)->getNodeType() != DOMNode::ELEMENT_NODE) + continue; + if (isState(dynamic_cast(children->item(i)))) { + completion.push_back(dynamic_cast(children->item(i))); + break; + } + } + } + return completion; + } + +} + + +#if 0 +/** + * See: http://www.w3.org/TR/scxml/#LegalStateConfigurations + */ +bool MicroStepFast::hasLegalConfiguration() { + + // The configuration contains exactly one child of the element. + std::list scxmlChilds = getChildStates(_scxml, true); + DOMNode* foundScxmlChild; + for (auto sIter = scxmlChilds.begin(); sIter != scxmlChilds.end(); sIter++) { + DOMElement* state = *sIter; + if (isMember(state, config)) { + if (foundScxmlChild) { + LOG(ERROR) << "Invalid configuration: Multiple childs of scxml root are active '" << ATTR_CAST(foundScxmlChild, "id") << "' and '" << ATTR_CAST(scxmlChilds[i], "id") << "'"; + return false; + } + foundScxmlChild = scxmlChilds[i]; + } + } + if (!foundScxmlChild) { + LOG(ERROR) << "Invalid configuration: No childs of scxml root are active"; + + return false; + } + + // The configuration contains one or more atomic states. + bool foundAtomicState = false; + for (size_t i = 0; i < config.size(); i++) { + if (isAtomic(Element(config[i]))) { + foundAtomicState = true; + break; + } + } + if (!foundAtomicState) { + LOG(ERROR) << "Invalid configuration: No atomic state is active"; + return false; + } + + // the configuration contains no history pseudo-states + for (size_t i = 0; i < config.size(); i++) { + if (isHistory(Element(config[i]))) { + LOG(ERROR) << "Invalid configuration: history state " << ATTR_CAST(config[i], "id") << " is active"; + return false; + } + } + + + + // When the configuration contains an atomic state, it contains all of its and ancestors. + for (size_t i = 0; i < config.size(); i++) { + if (isAtomic(Element(config[i]))) { + Node parent = config[i]; + while(((parent = parent.getParentNode()) && parent.getNodeType() == Node_base::ELEMENT_NODE)) { + if (isState(Element(parent)) && + (iequals(LOCALNAME(parent), "state") || + iequals(LOCALNAME(parent), "parallel"))) { + if (!isMember(parent, config)) { + LOG(ERROR) << "Invalid configuration: atomic state '" << ATTR_CAST(config[i], "id") << "' is active, but parent '" << ATTR_CAST(parent, "id") << "' is not"; + return false; + } + } + } + } + } + + // When the configuration contains a non-atomic , it contains one and only one of the state's children + for (size_t i = 0; i < config.size(); i++) { + Element configElem(config[i]); + if (!isAtomic(configElem) && !isParallel(configElem)) { + Node foundChildState; + //std::cerr << config[i] << std::endl; + NodeSet childs = getChildStates(config[i]); + for (size_t j = 0; j < childs.size(); j++) { + //std::cerr << childs[j] << std::endl; + if (isMember(childs[j], config)) { + if (foundChildState) { + LOG(ERROR) << "Invalid configuration: Multiple childs of compound '" << ATTR_CAST(config[i], "id") + << "' are active '" << ATTR_CAST(foundChildState, "id") << "' and '" << ATTR_CAST(childs[j], "id") << "'"; + return false; + } + foundChildState = childs[j]; + } + } + if (!foundChildState) { + LOG(ERROR) << "Invalid configuration: No childs of compound '" << ATTR_CAST(config[i], "id") << "' are active"; + return false; + } + } + } + + // If the configuration contains a state, it contains all of its children + for (size_t i = 0; i < config.size(); i++) { + if (isParallel(Element(config[i]))) { + NodeSet childs = getChildStates(config[i]); + for (size_t j = 0; j < childs.size(); j++) { + if (!isMember(childs[j], config) && !isHistory(Element(childs[j]))) { + LOG(ERROR) << "Invalid configuration: Not all children of parallel '" << ATTR_CAST(config[i], "id") << "' are active i.e. '" << ATTR_CAST(childs[j], "id") << "' is not"; + return false; + } + } + } + } + + // everything worked out fine! + return true; +} +#endif + +} \ No newline at end of file diff --git a/src/uscxml/interpreter/MicroStepFast.h b/src/uscxml/interpreter/MicroStepFast.h new file mode 100644 index 0000000..c41be80 --- /dev/null +++ b/src/uscxml/interpreter/MicroStepFast.h @@ -0,0 +1,127 @@ +/** + * @file + * @author 2012-2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#ifndef INTERPRETERFAST_H_DA55E52B +#define INTERPRETERFAST_H_DA55E52B + +//#define USCXML_VERBOSE 1 + +#include +#include +#include "MicroStepImpl.h" + +#include + +namespace uscxml { + +class MicroStepFast : public MicroStepImpl { +public: + MicroStepFast(MicroStepCallbacks* callbacks); + virtual ~MicroStepFast(); + + virtual InterpreterState step(bool blocking); + virtual void reset(); + virtual bool isInState(const std::string& stateId); + virtual std::list getConfiguration(); + void markAsCancelled(); + +protected: + class Transition { + public: + Transition() : element(NULL), source(0), onTrans(NULL), type(0) {} + + xercesc::DOMElement* element; + boost::dynamic_bitset<> conflicts; + boost::dynamic_bitset<> exitSet; + + uint32_t source; + boost::dynamic_bitset<> target; + + xercesc::DOMElement* onTrans; + + std::string event; + std::string cond; + + unsigned char type; + + }; + + class State { + public: + State() : element(NULL), parent(0), documentOrder(0), doneData(NULL), type(0) {} + + xercesc::DOMElement* element; + boost::dynamic_bitset<> completion; + boost::dynamic_bitset<> children; + boost::dynamic_bitset<> ancestors; + uint32_t parent; + uint32_t documentOrder; + + std::list data; + std::list invoke; + std::list onEntry; + std::list onExit; + xercesc::DOMElement* doneData; + + unsigned char type; + }; + + virtual void init(xercesc::DOMElement* scxml); + + std::list getCompletion(const xercesc::DOMElement* state); + + unsigned char _flags; + std::map _stateIds; + + std::vector _states; + std::vector _transitions; + std::list _globalScripts; + + boost::dynamic_bitset<> _configuration; + boost::dynamic_bitset<> _invocations; + boost::dynamic_bitset<> _history; + boost::dynamic_bitset<> _initializedData; + + std::set > _microstepConfigurations; + + Binding _binding; + xercesc::DOMElement* _scxml; + X _xmlPrefix; + X _xmlNS; + + bool _isInitialized; + bool _isCancelled; + Event _event; // we do not care about the event's representation + +private: + std::list getHistoryCompletion(const xercesc::DOMElement* state); + void resortStates(xercesc::DOMNode* node, const X& xmlPrefix); + +// bool hasLegalConfiguration(); + +#ifdef USCXML_VERBOSE + void printStateNames(const boost::dynamic_bitset<>& bitset); +#endif + +}; + +} + +#endif /* end of include guard: INTERPRETERFAST_H_DA55E52B */ + diff --git a/src/uscxml/interpreter/MicroStepImpl.h b/src/uscxml/interpreter/MicroStepImpl.h new file mode 100644 index 0000000..71c03b5 --- /dev/null +++ b/src/uscxml/interpreter/MicroStepImpl.h @@ -0,0 +1,127 @@ +/** + * @file + * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#ifndef MICROSTEPIMPL_H_98233709 +#define MICROSTEPIMPL_H_98233709 + +#include +#include +#include +#include +#include + +#include "uscxml/Common.h" +#include "uscxml/messages/Event.h" +#include "uscxml/interpreter/InterpreterMonitor.h" +#include "uscxml/util/DOM.h" +#include + +namespace uscxml { + +enum InterpreterState { + + + USCXML_FINISHED = -2, ///< machine reached a final configuration and is done + USCXML_INTERRUPTED = -1, ///< machine received the empty event on the external queue + USCXML_UNDEF = 0, ///< not an actual state + USCXML_IDLE = 1, ///< stable configuration and queues empty + USCXML_INITIALIZED = 2, ///< DOM is setup and all external components instantiated + USCXML_INSTANTIATED = 3, ///< nothing really, just instantiated + USCXML_MICROSTEPPED = 4, ///< processed one transition set + USCXML_MACROSTEPPED = 5, ///< processed all transition sets and reached a stable configuration + USCXML_CANCELLED = 6, ///< machine was cancelled, step once more to finalize +}; + +class USCXML_API MicroStepCallbacks { +public: + /** Event Queues / Matching */ + virtual Event dequeueInternal() = 0; + virtual Event dequeueExternal(bool blocking) = 0; + virtual bool isMatched(const Event& event, const std::string& eventDesc) = 0; + virtual void raiseDoneEvent(xercesc::DOMElement* state, xercesc::DOMElement* doneData) = 0; + + /** Datamodel */ + virtual bool isTrue(const std::string& expr) = 0; + virtual void initData(xercesc::DOMElement* element) = 0; + + /** Executable Content */ + virtual void process(xercesc::DOMElement* block) = 0; + + /** Invocations */ + virtual void invoke(xercesc::DOMElement* invoke) = 0; + virtual void uninvoke(xercesc::DOMElement* invoke) = 0; + + /** Monitoring */ + virtual InterpreterMonitor* getMonitor() = 0; +}; + +class USCXML_API MicroStepImpl { +public: + enum Binding { + EARLY = 0, + LATE = 1 + }; + + MicroStepImpl(MicroStepCallbacks* callbacks) : _callbacks(callbacks) {} + + virtual InterpreterState step(bool blocking) = 0; + virtual void reset() = 0; ///< Reset state machine + virtual bool isInState(const std::string& stateId) = 0; + virtual std::list getConfiguration() = 0; + + virtual void init(xercesc::DOMElement* scxml) = 0; + virtual void markAsCancelled() = 0; + +protected: + MicroStepCallbacks* _callbacks; + +}; + +class USCXML_API MicroStep { +public: + PIMPL_OPERATORS(MicroStep) + + virtual InterpreterState step(bool blocking) { + return _impl->step(blocking); + } + virtual void reset() { + return _impl->reset(); + } + virtual bool isInState(const std::string& stateId) { + return _impl->isInState(stateId); + } + + std::list getConfiguration() { + return _impl->getConfiguration(); + } + + virtual void init(xercesc::DOMElement* scxml) { + _impl->init(scxml); + } + + virtual void markAsCancelled() { + _impl->markAsCancelled(); + } +protected: + std::shared_ptr _impl; +}; + +} + +#endif /* end of include guard: MICROSTEPIMPL_H_98233709 */ diff --git a/src/uscxml/messages/Blob.h b/src/uscxml/messages/Blob.h index 835c73a..9bbf0f7 100644 --- a/src/uscxml/messages/Blob.h +++ b/src/uscxml/messages/Blob.h @@ -21,7 +21,7 @@ #define BLOB_H_E1B6D2C3 #include -#include +#include #include "uscxml/Common.h" @@ -65,36 +65,17 @@ protected: class USCXML_API Blob { public: - Blob() : _impl() {} - Blob(const boost::shared_ptr impl) : _impl(impl) { } - Blob(const Blob& other) : _impl(other._impl) { } - Blob(size_t size) : _impl(boost::shared_ptr(new BlobImpl(size))) {} + PIMPL_OPERATORS(Blob) + + Blob(size_t size) : _impl(std::shared_ptr(new BlobImpl(size))) {} Blob(const char* data, size_t size, const std::string& mimeType = "application/octet-stream", bool adopt = false) : - _impl(boost::shared_ptr(new BlobImpl(data, size, mimeType, adopt))) {} - virtual ~Blob() {}; - - operator bool() const { - return !!_impl; - } - bool operator< (const Blob& other) const { - return _impl < other._impl; - } - bool operator==(const Blob& other) const { - return _impl == other._impl; - } - bool operator!=(const Blob& other) const { - return _impl != other._impl; - } - Blob& operator= (const Blob& other) { - _impl = other._impl; - return *this; - } + _impl(std::shared_ptr(new BlobImpl(data, size, mimeType, adopt))) {} static Blob fromBase64(const std::string base64, const std::string& mimeType = "application/octet-stream") { - return Blob(boost::shared_ptr(BlobImpl::fromBase64(base64, mimeType))); + return Blob(std::shared_ptr(BlobImpl::fromBase64(base64, mimeType))); } std::string base64() const { @@ -124,7 +105,7 @@ public: #ifdef SWIGIMPORTED protected: #endif - boost::shared_ptr _impl; + std::shared_ptr _impl; }; diff --git a/src/uscxml/messages/Data.cpp b/src/uscxml/messages/Data.cpp index b555ed8..089de96 100644 --- a/src/uscxml/messages/Data.cpp +++ b/src/uscxml/messages/Data.cpp @@ -22,25 +22,21 @@ #include -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/dom/NameSpacingParser.h" -#include -#include -#include +#include "uscxml/util/DOM.h" -#include "glog/logging.h" +#include "easylogging++.h" #ifdef HAS_STRING_H #include #endif extern "C" { -#include "jsmn.h" // minimal json parser +#include "jsmn/jsmn.h" // minimal json parser } namespace uscxml { -Data::Data(const char* data, size_t size, const std::string& mimeType, bool adopt) : binary(data, size, mimeType, adopt) {} +Data::Data(const char* data, size_t size, const std::string& mimeType, bool adopt) : node(NULL), binary(data, size, mimeType, adopt) {} void Data::merge(const Data& other) { if (other.compound.size() > 0) { @@ -76,103 +72,6 @@ void Data::merge(const Data& other) { } } -Data::Data(const Arabica::DOM::Node& dom) { - // we may need to convert some keys to arrays if we have the same name as an element - std::map > arrays; -// Interpreter::dump(dom); - - if (dom.hasAttributes()) { - Arabica::DOM::NamedNodeMap attributes = dom.getAttributes(); - for (size_t i = 0; i < attributes.getLength(); i++) { - Arabica::DOM::Node attribute = attributes.item(i); -// Interpreter::dump(attribute); - - assert(attribute.getNodeType() == Arabica::DOM::Node_base::ATTRIBUTE_NODE); - std::string key = attribute.getLocalName(); - std::string value = attribute.getNodeValue(); - compound[key] = Data(value, VERBATIM); - } - } - - if (dom.hasChildNodes()) { - Arabica::DOM::NodeList children = dom.getChildNodes(); - for (size_t i = 0; i < children.getLength(); i++) { - Arabica::DOM::Node child = children.item(i); -// Interpreter::dump(child); - std::string key; - switch (child.getNodeType()) { - case Arabica::DOM::Node_base::ELEMENT_NODE: - key = TAGNAME_CAST(child); - break; - case Arabica::DOM::Node_base::ATTRIBUTE_NODE: - key = ((Arabica::DOM::Attr)child).getName(); - break; - case Arabica::DOM::Node_base::TEXT_NODE: - default: - break; - } - if (key.length() == 0) - continue; - - if (compound.find(key) != compound.end()) { - // we already have such a key .. make it an array after we processed all children - arrays[key].push_back(Data(child)); - } else { - compound[key] = Data(child); - } - } - } else { - atom = dom.getNodeValue(); - type = VERBATIM; - } - - std::map >::iterator arrayIter = arrays.begin(); - while(arrayIter != arrays.end()) { - assert(compound.find(arrayIter->first) != compound.end()); - Data arrayData; - arrays[arrayIter->first].push_front(compound[arrayIter->first]); - arrayData.array = arrays[arrayIter->first]; - compound[arrayIter->first] = arrayData; - } -} - -Arabica::DOM::Document Data::toDocument() { - Arabica::DOM::DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - Arabica::DOM::Document document = domFactory.createDocument("http://www.w3.org/2005/07/scxml", "message", 0); - Arabica::DOM::Element scxmlMsg = document.getDocumentElement(); - scxmlMsg.setPrefix("scxml"); - scxmlMsg.setAttribute("version", "1.0"); - - if (compound.size() > 0 || array.size() > 0) { - Arabica::DOM::Element payloadElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "payload"); - payloadElem.setPrefix("scxml"); - - scxmlMsg.appendChild(payloadElem); - - // we do not support nested attibutes - if (compound.size() > 0) { - std::map::iterator compoundIter = compound.begin(); - while(compoundIter != compound.end()) { - if (compoundIter->second.atom.size() > 0) { - Arabica::DOM::Element propertyElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "property"); - propertyElem.setPrefix("scxml"); - - propertyElem.setAttribute("name", compoundIter->first); - Arabica::DOM::Text textElem = document.createTextNode(compoundIter->second.atom); - propertyElem.appendChild(textElem); - payloadElem.appendChild(propertyElem); - } - compoundIter++; - } - } - } - return document; -} - -Data Data::fromXML(const std::string& xmlString) { - return Data(); -} - Data Data::fromJSON(const std::string& jsonString) { Data data; @@ -300,10 +199,14 @@ Data Data::fromJSON(const std::string& jsonString) { } std::ostream& operator<< (std::ostream& os, const Data& data) { - os << Data::toJSON(data); + os << data.asJSON(); return os; } +std::string Data::asJSON() const { + return Data::toJSON(*this); +} + std::string Data::toJSON(const Data& data) { std::stringstream os; std::string indent; diff --git a/src/uscxml/messages/Data.h b/src/uscxml/messages/Data.h index c2e7dcf..55b9f64 100644 --- a/src/uscxml/messages/Data.h +++ b/src/uscxml/messages/Data.h @@ -22,13 +22,13 @@ #include #include - -#include +#include #include "uscxml/Common.h" -#include "uscxml/Convenience.h" +#include "uscxml/util/Convenience.h" #include "uscxml/messages/Blob.h" -#include + +#include namespace uscxml { @@ -41,22 +41,12 @@ public: INTERPRETED, }; - Data() : type(INTERPRETED) {} + Data() : node(NULL), type(INTERPRETED) {} - // TODO: default INTERPRETED is unfortunate - Data(const std::string& atom, Type type) : atom(atom), type(type) {} Data(const char* data, size_t size, const std::string& mimeType, bool adopt = false); // convenience constructors - Data(short atom) : atom(toStr(atom)), type(INTERPRETED) {} - Data(int atom) : atom(toStr(atom)), type(INTERPRETED) {} - Data(unsigned int atom) : atom(toStr(atom)), type(INTERPRETED) {} - Data(long atom) : atom(toStr(atom)), type(INTERPRETED) {} - Data(unsigned long atom) : atom(toStr(atom)), type(INTERPRETED) {} - Data(long long int atom) : atom(toStr(atom)), type(INTERPRETED) {} - Data(float atom) : atom(toStr(atom)), type(INTERPRETED) {} - Data(double atom) : atom(toStr(atom)), type(INTERPRETED) {} - Data(bool atom) : type(INTERPRETED) { + Data(bool atom) : node(NULL), type(VERBATIM) { if (atom) { this->atom = "true"; } else { @@ -64,18 +54,18 @@ public: } } - template Data(T value, Type type) : atom(toStr(value)), type(type) {} + Data(xercesc::DOMNode* node) : node(node), type(VERBATIM) {} + + // template Data(T value, Type type = INTERPRETED) : atom(toStr(value)), type(type) {} -#if 0 - // constructor for arbitrary types, skip if type is subclass though (C++11) // we will have to drop this constructor as it interferes with operator Data() and requires C++11 template Data(T value, typename std::enable_if::value>::type* = nullptr) - : atom(toStr(value)), type(INTERPRETED) {} -#endif - + : node(NULL), atom(toStr(value)), type(VERBATIM) {} + template + Data(T value, Type type, typename std::enable_if::value>::type* = nullptr) + : node(NULL), atom(toStr(value)), type(type) {} - explicit Data(const Arabica::DOM::Node& dom); ~Data() {} bool empty() const { @@ -84,9 +74,20 @@ public: } bool operator<(const Data& other) const { - std::string thisJSON = Data::toJSON(*this); - std::string otherJSON = Data::toJSON(other); - return (thisJSON < otherJSON); + if (other.atom != atom) + return other.atom < atom; + if (other.array != array) + return other.array < array; + if (other.compound != compound) + return other.compound < compound; + if (other.node != node) + return other.node < node; + if (other.binary != binary) + return other.binary < binary; + if (other.type != type) + return other.type < type; + + return false; } void merge(const Data& other); @@ -150,27 +151,7 @@ public: } bool operator==(const Data &other) const { - if (other.atom.size() != atom.size()) - return false; - if (other.type != type) - return false; - if (other.binary != binary) - return false; - if (other.array.size() != array.size()) - return false; - if (other.compound.size() != compound.size()) - return false; - - if (other.atom != atom) - return false; - if (other.array != array) - return false; - if (other.compound != compound) - return false; - if (other.node != node) - return false; - - return true; + return (*this < other || other < *this); } bool operator!=(const Data &other) const { @@ -191,13 +172,8 @@ public: static Data fromJSON(const std::string& jsonString); static std::string toJSON(const Data& data); - static Data fromXML(const std::string& xmlString); - Arabica::DOM::Document toDocument(); - std::string toXMLString() { - std::stringstream ss; - ss << toDocument(); - return ss.str(); - } + std::string asJSON() const; + std::map getCompound() { return compound; @@ -238,7 +214,8 @@ public: protected: #endif - Arabica::DOM::Node node; + xercesc::DOMNode* node; + std::shared_ptr adoptedDoc; std::map compound; std::list array; std::string atom; @@ -246,7 +223,6 @@ protected: Type type; protected: - Arabica::DOM::Document toNode(const Arabica::DOM::Document& factory, const Data& data); friend USCXML_API std::ostream& operator<< (std::ostream& os, const Data& data); }; diff --git a/src/uscxml/messages/Event.cpp b/src/uscxml/messages/Event.cpp index f247542..c4aa642 100644 --- a/src/uscxml/messages/Event.cpp +++ b/src/uscxml/messages/Event.cpp @@ -18,116 +18,17 @@ */ #include "uscxml/messages/Event.h" -#include "uscxml/dom/DOMUtils.h" -#include -#include -#include +#include "uscxml/util/DOM.h" namespace uscxml { -//Arabica::DOM::Node Event::getFirstDOMElement() const { -// return getFirstDOMElement(dom); -//} -// -//Arabica::DOM::Document Event::getStrippedDOM() const { -// return getStrippedDOM(dom); -//} - -//Arabica::DOM::Node Event::getFirstDOMElement(const Arabica::DOM::Document dom) { -// Arabica::DOM::Node data = dom.getDocumentElement().getFirstChild(); -// while (data) { -// if (data.getNodeType() == Arabica::DOM::Node_base::TEXT_NODE) { -// std::string trimmed = boost::trim_copy(data.getNodeValue()); -// if (trimmed.length() == 0) { -// data = data.getNextSibling(); -// continue; -// } -// } -// break; -// } -// return data; -//} -// -//Arabica::DOM::Document Event::getStrippedDOM(const Arabica::DOM::Document dom) { -// Arabica::DOM::DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); -// Arabica::DOM::Document document = domFactory.createDocument("", "", 0); -// if (dom) { -// document.getDocumentElement().appendChild(document.importNode(getFirstDOMElement(dom), true)); -// } -// return document; -//} - -std::string Event::toXMLString() { - std::stringstream ss; - ss << toDocument(); - return ss.str(); -} - -Arabica::DOM::Document Event::toDocument() { - Arabica::DOM::DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - Arabica::DOM::Document document = data.toDocument(); - Arabica::DOM::Element scxmlMsg = document.getDocumentElement(); - - - scxmlMsg.setAttribute("source", origin); - scxmlMsg.setAttribute("name", name); - - return document; -} - - -Event Event::fromXML(const std::string& xmlString) { - Arabica::SAX2DOM::Parser eventParser; - Arabica::SAX::CatchErrorHandler errorHandler; - eventParser.setErrorHandler(errorHandler); - - std::istringstream is(xmlString); - Arabica::SAX::InputSource inputSource; - inputSource.setByteStream(is); - - Event event; - if(eventParser.parse(inputSource) && eventParser.getDocument().hasChildNodes()) { - Arabica::DOM::Element scxmlMsg = eventParser.getDocument().getDocumentElement(); - if (HAS_ATTR(scxmlMsg, "name")) - event.name = ATTR(scxmlMsg, "name"); - if (HAS_ATTR(scxmlMsg, "sendid")) - event.sendid = ATTR(scxmlMsg, "sendid"); - - Arabica::DOM::NodeList payloads = scxmlMsg.getElementsByTagName("scxml:payload"); - if (payloads.getLength() > 0) { - Arabica::DOM::Node payload = payloads.item(0); - if (payload.getNodeType() == Arabica::DOM::Node_base::ELEMENT_NODE) { - Arabica::DOM::Element payloadElem = (Arabica::DOM::Element)payload; - Arabica::DOM::NodeList properties = payloadElem.getElementsByTagName("scxml:property"); - if (properties.getLength() > 0) { - for (size_t i = 0; i < properties.getLength(); i++) { - if (HAS_ATTR_CAST(properties.item(i), "name")) { - std::string key = ATTR_CAST(properties.item(i), "name"); - std::string value; - Arabica::DOM::NodeList childs = properties.item(i).getChildNodes(); - for (size_t j = 0; j < childs.getLength(); j++) { - if (childs.item(j).getNodeType() == Arabica::DOM::Node_base::TEXT_NODE) { - value = childs.item(j).getNodeValue(); - break; - } - } - event.data.compound[key] = Data(value, Data::VERBATIM); - } - } - } - } - } - } - return event; -} - std::ostream& operator<< (std::ostream& os, const Event& event) { std::string indent; for (size_t i = 0; i < _dataIndentation; i++) { indent += " "; } - os << indent << (event.eventType == Event::EXTERNAL ? "External" : "Internal") << " Event " << (event.dom ? "with DOM attached" : "") << std::endl; +// os << indent << (event.eventType == Event::EXTERNAL ? "External" : "Internal") << " Event " << (event.dom ? "with DOM attached" : "") << std::endl; if (event.name.size() > 0) os << indent << " name: " << event.name << std::endl; @@ -135,8 +36,8 @@ std::ostream& operator<< (std::ostream& os, const Event& event) { os << indent << " origin: " << event.origin << std::endl; if (event.origintype.size() > 0) os << indent << " origintype: " << event.origintype << std::endl; - if (event.content.size() > 0) - os << indent << " content: '" << event.content << "'" << std::endl; +// if (event.content.size() > 0) +// os << indent << " content: '" << event.content << "'" << std::endl; if (event.params.size() > 0) { std::multimap::const_iterator paramIter = event.params.begin(); os << indent << " params:" << std::endl; diff --git a/src/uscxml/messages/Event.h b/src/uscxml/messages/Event.h index 94bc386..8b7bb91 100644 --- a/src/uscxml/messages/Event.h +++ b/src/uscxml/messages/Event.h @@ -21,28 +21,35 @@ #define EVENT_H_6174D929 #include "uscxml/messages/Data.h" +#include "uscxml/util/UUID.h" + +#define ERROR_PLATFORM_THROW(msg) \ + ErrorEvent e; \ + e.name = "error.platform"; \ + e.data.compound["cause"] = Data(msg, Data::VERBATIM); \ + throw e; \ #define ERROR_EXECUTION(identifier, cause) \ - uscxml::Event identifier; \ + uscxml::ErrorEvent identifier; \ identifier.data.compound["cause"] = uscxml::Data(cause, uscxml::Data::VERBATIM); \ identifier.name = "error.execution"; \ identifier.eventType = uscxml::Event::PLATFORM; #define ERROR_EXECUTION2(identifier, cause, node) \ - uscxml::Event identifier; \ + uscxml::ErrorEvent identifier; \ identifier.data.compound["cause"] = uscxml::Data(cause, uscxml::Data::VERBATIM); \ identifier.name = "error.execution"; \ identifier.data.compound["xpath"] = uscxml::Data(DOMUtils::xPathForNode(node), uscxml::Data::VERBATIM); \ identifier.eventType = uscxml::Event::PLATFORM; #define ERROR_COMMUNICATION(identifier, cause) \ - uscxml::Event identifier; \ + uscxml::ErrorEvent identifier; \ identifier.data.compound["cause"] = uscxml::Data(cause, uscxml::Data::VERBATIM); \ identifier.name = "error.communication"; \ identifier.eventType = uscxml::Event::PLATFORM; #define ERROR_COMMUNICATION2(identifier, cause, node) \ - uscxml::Event identifier; \ + uscxml::ErrorEvent identifier; \ identifier.data.compound["cause"] = uscxml::Data(cause, uscxml::Data::VERBATIM); \ identifier.name = "error.communication"; \ identifier.data.compound["xpath"] = uscxml::Data(DOMUtils::xPathForNode(node), uscxml::Data::VERBATIM); \ @@ -82,9 +89,8 @@ public: PLATFORM = 3 }; - Event() : eventType(INTERNAL), hideSendId(false) {} + Event() : eventType(INTERNAL), hideSendId(false), uuid(UUID::getUUID()) {} Event(const std::string& name, Type type = INTERNAL) : name(name), eventType(type), hideSendId(false) {} - Event(const Arabica::DOM::Node& xmlString) : eventType(INTERNAL), hideSendId(false) {}; bool operator< (const Event& other) const { return this < &other; } @@ -99,105 +105,8 @@ public: return !(*this == other); } - std::string getName() const { - return name; - } - void setName(const std::string& name) { - this->name = name; - } - - Type getEventType() const { - return eventType; - } - void setEventType(const Type type) { - this->eventType = type; - } - - std::string getOrigin() const { - return origin; - } - void setOrigin(const std::string& origin) { - this->origin = origin; - } - - std::string getOriginType() const { - return origintype; - } - void setOriginType(const std::string& originType) { - this->origintype = originType; - } - - Arabica::DOM::Node getDOM() const { - return dom; - } - void setDOM(const Arabica::DOM::Node& dom) { - this->dom = dom; - } - -// Arabica::DOM::Node getFirstDOMElement() const; -// Arabica::DOM::Document getStrippedDOM() const; -// -// static Arabica::DOM::Node getFirstDOMElement(const Arabica::DOM::Document dom); -// static Arabica::DOM::Document getStrippedDOM(const Arabica::DOM::Document dom); - - std::string getRaw() const { - return raw; - } - void setRaw(const std::string& raw) { - this->raw = raw; - } - - std::string getContent() const { - return content; - } - void setContent(const std::string& content) { - this->content = content; - } - - std::string getXML() const { - return xml; - } - void setXML(const std::string& xml) { - this->xml = xml; - } - - std::string getSendId() const { - return sendid; - } - void setSendId(const std::string& sendId) { - this->sendid = sendId; - } - - std::string getInvokeId() const { - return invokeid; - } - void setInvokeId(const std::string& invokeId) { - this->invokeid = invokeId; - } - - Data getData() const { - return data; - } - void setData(const Data& data) { - this->data = data; - } - - static Event fromXML(const std::string& xmlString); - Arabica::DOM::Document toDocument(); - std::string toXMLString(); - - std::map& getNameList() { - return namelist; - } - std::multimap& getParams() { - return params; - } - - void setNameList(const std::map& nameList) { - this->namelist = nameList; - } - void setParams(const std::multimap& params) { - this->params = params; + operator bool() { + return name.size() > 0; } typedef std::multimap params_t; @@ -225,7 +134,7 @@ public: template static bool getParam(const params_t& params, const std::string& name, T& target) { if (params.find(name) != params.end()) { - target = boost::lexical_cast(params.find(name)->second.atom); + target = strTo(params.find(name)->second.atom); return true; } return false; @@ -252,7 +161,7 @@ public: if (params.find(name) != params.end()) { std::pair rangeIter = params.equal_range(name); while(rangeIter.first != rangeIter.second) { - target.push_back(boost::lexical_cast(rangeIter.first->second.atom)); + target.push_back(strTo(rangeIter.first->second.atom)); rangeIter.first++; } return true; @@ -260,31 +169,35 @@ public: return false; } - -#ifdef SWIGIMPORTED -protected: -#endif - std::string raw; - std::string xml; std::string name; Type eventType; std::string origin; std::string origintype; - Arabica::DOM::Node dom; std::string sendid; - bool hideSendId; + bool hideSendId; // sendid is assumed to be undef with some ecma tests std::string invokeid; Data data; - std::string content; std::map namelist; std::multimap params; + std::string uuid; // the sendid is not necessarily unique! friend USCXML_API std::ostream& operator<< (std::ostream& os, const Event& event); }; USCXML_API std::ostream& operator<< (std::ostream& os, const Event& event); + +class USCXML_API ErrorEvent : public Event { +public: + ErrorEvent() : Event() {} + ErrorEvent(const std::string& msg) : Event("error.platform") { + data.compound["msg"] = msg; + } +}; + } + + #endif /* end of include guard: EVENT_H_6174D929 */ diff --git a/src/uscxml/messages/InvokeRequest.cpp b/src/uscxml/messages/InvokeRequest.cpp deleted file mode 100644 index e56a6ff..0000000 --- a/src/uscxml/messages/InvokeRequest.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/messages/InvokeRequest.h" -#include -#include -#include - -namespace uscxml { - -std::string InvokeRequest::toXMLString() { - std::stringstream ss; - ss << toDocument(); - return ss.str(); -} - -Arabica::DOM::Document InvokeRequest::toDocument() { - Arabica::DOM::DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - Arabica::DOM::Document document = Event::toDocument(); - Arabica::DOM::Element scxmlMsg = document.getDocumentElement(); - - scxmlMsg.setAttribute("invokeid", invokeid); - - return document; -} - -InvokeRequest InvokeRequest::fromXML(const std::string& xmlString) { - Event::fromXML(xmlString); - return InvokeRequest(); -} - -std::ostream& operator<< (std::ostream& os, const InvokeRequest& invokeReq) { - - std::string indent; - for (size_t i = 0; i < _dataIndentation; i++) { - indent += " "; - } - - os << indent << "InvokeReq" << (invokeReq.autoForward ? " with autoforward" : "") << std::endl; - - if (invokeReq.type.size() > 0) - os << indent << " type: " << invokeReq.type << std::endl; - - if (invokeReq.src.size() > 0) - os<< indent << " src: " << invokeReq.src << std::endl; - -#if 0 - if (invokeReq.namelist.size() > 0) { - os << indent << " namelist: " << std::endl; - InvokeRequest::namelist_t::const_iterator namelistIter = invokeReq.namelist.begin(); - while(namelistIter != invokeReq.namelist.end()) { - os << indent << " " << namelistIter->first << ": " << namelistIter->second << std::endl; - namelistIter++; - } - } - - if (invokeReq.params.size() > 0) { - os << indent << " params: " << std::endl; - InvokeRequest::params_t::const_iterator paramIter = invokeReq.params.begin(); - while(paramIter != invokeReq.params.end()) { - os << indent << " " << paramIter->first << ": " << paramIter->second << std::endl; - paramIter++; - } - } - - if (invokeReq.content.size() > 0) - os << indent << " content: " << invokeReq.content << std::endl; -#endif - - _dataIndentation++; - os << (Event)invokeReq; - _dataIndentation--; - return os; - -} - -} \ No newline at end of file diff --git a/src/uscxml/messages/InvokeRequest.h b/src/uscxml/messages/InvokeRequest.h deleted file mode 100644 index 6f597fe..0000000 --- a/src/uscxml/messages/InvokeRequest.h +++ /dev/null @@ -1,73 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef INVOKEREQUEST_H_BAF058E2 -#define INVOKEREQUEST_H_BAF058E2 - -#include "uscxml/messages/Event.h" - -namespace uscxml { - -class USCXML_API InvokeRequest : public Event { -public: - InvokeRequest(Event event) : Event(event) {} - InvokeRequest() {} - - std::string getType() { - return type; - } - void setType(const std::string& type) { - this->type = type; - } - - std::string getSource() { - return src; - } - void setSource(const std::string& src) { - this->src = src; - } - - bool isAutoForwarded() { - return autoForward; - } - void setAutoForwarded(bool autoForward) { - this->autoForward = autoForward; - } - - static InvokeRequest fromXML(const std::string& xmlString); - Arabica::DOM::Document toDocument(); - std::string toXMLString(); - -#ifdef SWIGIMPORTED -protected: -#endif - std::string type; - std::string src; - bool autoForward; - Arabica::DOM::Element elem; - - friend USCXML_API std::ostream& operator<< (std::ostream& os, const InvokeRequest& sendReq); - -}; - -USCXML_API std::ostream& operator<< (std::ostream& os, const InvokeRequest& invokeReq); - -} - -#endif /* end of include guard: INVOKEREQUEST_H_BAF058E2 */ diff --git a/src/uscxml/messages/MMIMessages.cpp b/src/uscxml/messages/MMIMessages.cpp deleted file mode 100644 index 814be5f..0000000 --- a/src/uscxml/messages/MMIMessages.cpp +++ /dev/null @@ -1,549 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include // MSVC will croak with operator+ on strings if this is not first - -#include "MMIMessages.h" - -#include -#include -#include -#include - -#include - -#include - -#define TO_EVENT_OPERATOR(type, name, base)\ -type::operator Event() const { \ - Event ev = base::operator Event();\ - ev.setName(name);\ - if (representation == MMI_AS_XML) \ - ev.setDOM(toXML());\ - return ev;\ -} - -#define FIND_MSG_ELEM(elem, doc) \ -Element elem; \ -if (encapsulateInMMI) { \ - elem = Element(doc.getDocumentElement().getFirstChild()); \ -} else { \ - elem = Element(doc.getDocumentElement()); \ -} - -#define FROM_XML(clazz, enumType, base) \ -clazz clazz::fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter) { \ - clazz event = base::fromXML(node, interpreter); \ - event.type = enumType; \ - return event; \ -} - -#define STRING_ATTR_OR_EXPR(element, name)\ -(element.hasAttributeNS(nameSpace, "name##Expr") && interpreter ? \ - interpreter->getDataModel().evalAsString(element.getAttributeNS(nameSpace, "name##Expr")) : \ - (element.hasAttributeNS(nameSpace, #name) ? element.getAttributeNS(nameSpace, #name) : "") \ -) - -#define FIND_EVENT_NODE(node)\ -if (node.getNodeType() == Node_base::DOCUMENT_NODE) \ - node = node.getFirstChild(); \ -while (node) {\ - if (node.getNodeType() == Node_base::ELEMENT_NODE) {\ - if (boost::iequals(node.getLocalName(), "MMI")) {\ - node = node.getFirstChild();\ - continue;\ - } else {\ - break;\ - }\ - }\ - node = node.getNextSibling();\ -}\ - - -namespace uscxml { - -using namespace Arabica::DOM; - -std::string MMIEvent::nameSpace = "http://www.w3.org/2008/04/mmi-arch"; - -MMIEvent::Type MMIEvent::getType(Arabica::DOM::Node node) { - if (!node || node.getNodeType() != Arabica::DOM::Node_base::ELEMENT_NODE) - return INVALID; - - // MMI container? - if (boost::iequals(node.getLocalName(), "MMI")) { - node = node.getFirstChild(); - if (!node) - return INVALID; - while(node.getNodeType() != Arabica::DOM::Node_base::ELEMENT_NODE) { - node = node.getNextSibling(); - if (!node) - return INVALID; - } - } - - if (boost::iequals(node.getLocalName(), "NEWCONTEXTREQUEST")) - return NEWCONTEXTREQUEST; - if (boost::iequals(node.getLocalName(), "NEWCONTEXTRESPONSE")) - return NEWCONTEXTRESPONSE; - if (boost::iequals(node.getLocalName(), "PREPAREREQUEST")) - return PREPAREREQUEST; - if (boost::iequals(node.getLocalName(), "PREPARERESPONSE")) - return PREPARERESPONSE; - if (boost::iequals(node.getLocalName(), "STARTREQUEST")) - return STARTREQUEST; - if (boost::iequals(node.getLocalName(), "STARTRESPONSE")) - return STARTRESPONSE; - if (boost::iequals(node.getLocalName(), "DONENOTIFICATION")) - return DONENOTIFICATION; - if (boost::iequals(node.getLocalName(), "CANCELREQUEST")) - return CANCELREQUEST; - if (boost::iequals(node.getLocalName(), "CANCELRESPONSE")) - return CANCELRESPONSE; - if (boost::iequals(node.getLocalName(), "PAUSEREQUEST")) - return PAUSEREQUEST; - if (boost::iequals(node.getLocalName(), "PAUSERESPONSE")) - return PAUSERESPONSE; - if (boost::iequals(node.getLocalName(), "RESUMEREQUEST")) - return RESUMEREQUEST; - if (boost::iequals(node.getLocalName(), "RESUMERESPONSE")) - return RESUMERESPONSE; - if (boost::iequals(node.getLocalName(), "EXTENSIONNOTIFICATION")) - return EXTENSIONNOTIFICATION; - if (boost::iequals(node.getLocalName(), "CLEARCONTEXTREQUEST")) - return CLEARCONTEXTREQUEST; - if (boost::iequals(node.getLocalName(), "CLEARCONTEXTRESPONSE")) - return CLEARCONTEXTRESPONSE; - if (boost::iequals(node.getLocalName(), "STATUSREQUEST")) - return STATUSREQUEST; - if (boost::iequals(node.getLocalName(), "STATUSRESPONSE")) - return STATUSRESPONSE; - return INVALID; -} - -Arabica::DOM::Document MMIEvent::toXML(bool encapsulateInMMI) const { - Arabica::DOM::DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - Document doc = domFactory.createDocument(nameSpace, "", 0); - Element msgElem = doc.createElementNS(nameSpace, tagName); - msgElem.setAttributeNS(nameSpace, "Source", source); - msgElem.setAttributeNS(nameSpace, "Target", target); - msgElem.setAttributeNS(nameSpace, "RequestID", requestId); - - if (dataDOM) { - Element dataElem = doc.createElementNS(nameSpace, "Data"); - Node importNode = doc.importNode(dataDOM, true); - dataElem.appendChild(importNode); - msgElem.appendChild(dataElem); - } else if (data.size() > 0) { - Element dataElem = doc.createElementNS(nameSpace, "Data"); - Text textElem = doc.createTextNode(data); - dataElem.appendChild(textElem); - msgElem.appendChild(dataElem); - } - - if (encapsulateInMMI) { - Element mmiElem = doc.createElementNS(nameSpace, "mmi"); - mmiElem.appendChild(msgElem); - doc.appendChild(mmiElem); - } else { - doc.appendChild(msgElem); - } - return doc; -} - -Arabica::DOM::Document ContentRequest::toXML(bool encapsulateInMMI) const { - Document doc = ContextualizedRequest::toXML(encapsulateInMMI); - FIND_MSG_ELEM(msgElem, doc); - - if (contentURL.href.size() > 0) { - Element contentURLElem = doc.createElementNS(nameSpace, "ContentURL"); - contentURLElem.setAttributeNS(nameSpace, "href", contentURL.href); - contentURLElem.setAttributeNS(nameSpace, "fetchtimeout", contentURL.fetchTimeout); - contentURLElem.setAttributeNS(nameSpace, "max-age", contentURL.maxAge); - msgElem.appendChild(contentURLElem); - } else if (contentDOM) { - Element contentElem = doc.createElementNS(nameSpace, "Content"); - Node importNode = doc.importNode(contentDOM, true); - contentElem.appendChild(importNode); - msgElem.appendChild(contentElem); - } else if (content.size() > 0) { - Element contentElem = doc.createElementNS(nameSpace, "Content"); - Text textElem = doc.createTextNode(content); - contentElem.appendChild(textElem); - msgElem.appendChild(contentElem); - } - return doc; -} - -Arabica::DOM::Document ContextualizedRequest::toXML(bool encapsulateInMMI) const { - Document doc = MMIEvent::toXML(encapsulateInMMI); - FIND_MSG_ELEM(msgElem, doc); - msgElem.setAttributeNS(nameSpace, "Context", context); - return doc; -} - -Arabica::DOM::Document ExtensionNotification::toXML(bool encapsulateInMMI) const { - Document doc = ContextualizedRequest::toXML(encapsulateInMMI); - FIND_MSG_ELEM(msgElem, doc); - msgElem.setAttributeNS(nameSpace, "Name", name); - return doc; -} - -Arabica::DOM::Document StatusResponse::toXML(bool encapsulateInMMI) const { - Document doc = ContextualizedRequest::toXML(encapsulateInMMI); - FIND_MSG_ELEM(msgElem, doc); - if (status == ALIVE) { - msgElem.setAttributeNS(nameSpace, "Status", "alive"); - } else if(status == DEAD) { - msgElem.setAttributeNS(nameSpace, "Status", "dead"); - } else if(status == FAILURE) { - msgElem.setAttributeNS(nameSpace, "Status", "failure"); - } else if(status == SUCCESS) { - msgElem.setAttributeNS(nameSpace, "Status", "success"); - } - return doc; -} - -Arabica::DOM::Document StatusInfoResponse::toXML(bool encapsulateInMMI) const { - Document doc = StatusResponse::toXML(encapsulateInMMI); - FIND_MSG_ELEM(msgElem, doc); - - Element statusInfoElem = doc.createElementNS(nameSpace, "StatusInfo"); - Text statusInfoText = doc.createTextNode(statusInfo); - statusInfoElem.appendChild(statusInfoText); - msgElem.appendChild(statusInfoElem); - - return doc; -} - -Arabica::DOM::Document StatusRequest::toXML(bool encapsulateInMMI) const { - Document doc = ContextualizedRequest::toXML(encapsulateInMMI); - FIND_MSG_ELEM(msgElem, doc); - - if (automaticUpdate) { - msgElem.setAttributeNS(nameSpace, "RequestAutomaticUpdate", "true"); - } else { - msgElem.setAttributeNS(nameSpace, "RequestAutomaticUpdate", "false"); - } - - return doc; -} - - - -MMIEvent MMIEvent::fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter) { - MMIEvent msg; - - FIND_EVENT_NODE(node); - - Element msgElem(node); - msg.source = STRING_ATTR_OR_EXPR(msgElem, Source); - msg.target = STRING_ATTR_OR_EXPR(msgElem, Target); - msg.requestId = STRING_ATTR_OR_EXPR(msgElem, RequestID); - msg.tagName = msgElem.getLocalName(); - - Element dataElem; - - // search for data element - node = msgElem.getFirstChild(); - while (node) { - if (node.getNodeType() == Node_base::ELEMENT_NODE) - dataElem = Element(node); - if (dataElem && boost::iequals(dataElem.getLocalName(), "data")) - break; - node = node.getNextSibling(); - } - - if (dataElem && boost::iequals(dataElem.getLocalName(), "data") && dataElem.getFirstChild()) { - Arabica::DOM::Node dataChild = dataElem.getFirstChild(); - std::stringstream ss; - - while (dataChild) { - if (dataChild.getNodeType() == Arabica::DOM::Node_base::ELEMENT_NODE) - msg.dataDOM = dataChild; - ss << dataChild; - dataChild = dataChild.getNextSibling(); - } - msg.data = ss.str(); - } - - return msg; -} - -FROM_XML(NewContextRequest, NEWCONTEXTREQUEST, MMIEvent) - -FROM_XML(PauseRequest, PAUSEREQUEST, ContextualizedRequest) -FROM_XML(ResumeRequest, RESUMEREQUEST, ContextualizedRequest) -FROM_XML(ClearContextRequest, CLEARCONTEXTREQUEST, ContextualizedRequest) -FROM_XML(CancelRequest, CANCELREQUEST, ContextualizedRequest) - -FROM_XML(PrepareRequest, PREPAREREQUEST, ContentRequest) -FROM_XML(StartRequest, STARTREQUEST, ContentRequest) - -FROM_XML(PrepareResponse, PREPARERESPONSE, StatusInfoResponse) -FROM_XML(StartResponse, STARTRESPONSE, StatusInfoResponse) -FROM_XML(CancelResponse, CANCELRESPONSE, StatusInfoResponse) -FROM_XML(PauseResponse, PAUSERESPONSE, StatusInfoResponse) -FROM_XML(ResumeResponse, RESUMERESPONSE, StatusInfoResponse) -FROM_XML(ClearContextResponse, CLEARCONTEXTRESPONSE, StatusInfoResponse) -FROM_XML(NewContextResponse, NEWCONTEXTRESPONSE, StatusInfoResponse) -FROM_XML(DoneNotification, DONENOTIFICATION, StatusInfoResponse) - - -ContextualizedRequest ContextualizedRequest::fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter) { - ContextualizedRequest msg(MMIEvent::fromXML(node, interpreter)); - FIND_EVENT_NODE(node); - - Element msgElem(node); - msg.context = STRING_ATTR_OR_EXPR(msgElem, Context); - return msg; -} - -ExtensionNotification ExtensionNotification::fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter) { - ExtensionNotification msg(ContextualizedRequest::fromXML(node, interpreter)); - FIND_EVENT_NODE(node); - - Element msgElem(node); - msg.name = STRING_ATTR_OR_EXPR(msgElem, Name); - msg.type = EXTENSIONNOTIFICATION; - return msg; -} - -ContentRequest ContentRequest::fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter) { - ContentRequest msg(ContextualizedRequest::fromXML(node, interpreter)); - FIND_EVENT_NODE(node); - - Element msgElem(node); - Element contentElem; - - node = msgElem.getFirstChild(); - while (node) { - if (node.getNodeType() == Node_base::ELEMENT_NODE) { - contentElem = Element(node); - if (boost::iequals(contentElem.getLocalName(), "content") || - boost::iequals(contentElem.getLocalName(), "contentURL")) - break; - } - node = node.getNextSibling(); - } - - if (contentElem) { - if(boost::iequals(contentElem.getLocalName(), "content")) { - Arabica::DOM::Node contentChild = contentElem.getFirstChild(); - std::stringstream ss; - - while (contentChild) { - if (contentChild.getNodeType() == Arabica::DOM::Node_base::ELEMENT_NODE) - msg.contentDOM = contentChild; - ss << contentChild; - contentChild = contentChild.getNextSibling(); - } - msg.content = ss.str(); - - } else if(boost::iequals(contentElem.getLocalName(), "contentURL")) { - msg.contentURL.href = STRING_ATTR_OR_EXPR(contentElem, href); - msg.contentURL.maxAge = STRING_ATTR_OR_EXPR(contentElem, max-age); - msg.contentURL.fetchTimeout = STRING_ATTR_OR_EXPR(contentElem, fetchtimeout); - } - } - - //msg.content = msgElem.getAttributeNS(nameSpace, "Context"); - return msg; -} - -StatusResponse StatusResponse::fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter) { - StatusResponse msg(ContextualizedRequest::fromXML(node, interpreter)); - FIND_EVENT_NODE(node); - - Element msgElem(node); - std::string status = STRING_ATTR_OR_EXPR(msgElem, Status); - - if (boost::iequals(status, "ALIVE")) { - msg.status = ALIVE; - } else if(boost::iequals(status, "DEAD")) { - msg.status = DEAD; - } else if(boost::iequals(status, "FAILURE")) { - msg.status = FAILURE; - } else if(boost::iequals(status, "SUCCESS")) { - msg.status = SUCCESS; - } else { - msg.status = INVALID; - } - msg.type = STATUSRESPONSE; - return msg; -} - -StatusInfoResponse StatusInfoResponse::fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter) { - StatusInfoResponse msg(StatusResponse::fromXML(node, interpreter)); - FIND_EVENT_NODE(node); - - Element msgElem(node); - Element statusInfoElem; - - node = msgElem.getFirstChild(); - while (node) { - if (node.getNodeType() == Node_base::ELEMENT_NODE) { - statusInfoElem = Element(node); - if (statusInfoElem && boost::iequals(statusInfoElem.getLocalName(), "statusInfo")) - break; - } - node = node.getNextSibling(); - } - - if (statusInfoElem && boost::iequals(statusInfoElem.getLocalName(), "statusInfo")) { - node = statusInfoElem.getFirstChild(); - while (node) { - if (node.getNodeType() == Node_base::TEXT_NODE) { - msg.statusInfo = node.getNodeValue(); - break; - } - node = node.getNextSibling(); - } - } - return msg; -} - - -StatusRequest StatusRequest::fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter) { - StatusRequest msg(ContextualizedRequest::fromXML(node, interpreter)); - FIND_EVENT_NODE(node); - - Element msgElem(node); - std::string autoUpdate = STRING_ATTR_OR_EXPR(msgElem, RequestAutomaticUpdate); - - if (boost::iequals(autoUpdate, "true")) { - msg.automaticUpdate = true; - } else if(boost::iequals(autoUpdate, "on")) { - msg.automaticUpdate = true; - } else if(boost::iequals(autoUpdate, "yes")) { - msg.automaticUpdate = true; - } else if(boost::iequals(autoUpdate, "1")) { - msg.automaticUpdate = true; - } else { - msg.automaticUpdate = false; - } - msg.type = STATUSREQUEST; - return msg; -} - - - -#ifdef MMI_WITH_OPERATOR_EVENT - -TO_EVENT_OPERATOR(NewContextRequest, "mmi.request.newcontext", MMIEvent); -TO_EVENT_OPERATOR(PauseRequest, "mmi.request.pause", ContextualizedRequest); -TO_EVENT_OPERATOR(ResumeRequest, "mmi.request.resume", ContextualizedRequest); -TO_EVENT_OPERATOR(CancelRequest, "mmi.request.cancel", ContextualizedRequest); -TO_EVENT_OPERATOR(ClearContextRequest, "mmi.request.clearcontext", ContextualizedRequest); -TO_EVENT_OPERATOR(StatusRequest, "mmi.request.status", ContextualizedRequest); - -TO_EVENT_OPERATOR(PrepareRequest, "mmi.request.prepare", ContentRequest); -TO_EVENT_OPERATOR(StartRequest, "mmi.request.start", ContentRequest); - -TO_EVENT_OPERATOR(PrepareResponse, "mmi.response.prepare", StatusInfoResponse); -TO_EVENT_OPERATOR(StartResponse, "mmi.response.start", StatusInfoResponse); -TO_EVENT_OPERATOR(CancelResponse, "mmi.response.cancel", StatusInfoResponse); -TO_EVENT_OPERATOR(PauseResponse, "mmi.response.pause", StatusInfoResponse); -TO_EVENT_OPERATOR(ResumeResponse, "mmi.response.resume", StatusInfoResponse); -TO_EVENT_OPERATOR(ClearContextResponse, "mmi.response.clearcontext", StatusInfoResponse); -TO_EVENT_OPERATOR(NewContextResponse, "mmi.response.newcontext", StatusInfoResponse); -TO_EVENT_OPERATOR(DoneNotification, "mmi.notification.done", StatusInfoResponse); - - -MMIEvent::operator Event() const { - Event ev; - ev.setOriginType("mmi.event"); - ev.setOrigin(source); - - if (representation == MMI_AS_DATA) { - if (dataDOM) { - ev.data.node = dataDOM; - } else { - ev.data = Data::fromJSON(data); - if (ev.data.empty()) { - ev.content = data; - } - } - } - return ev; -} - -ContextualizedRequest::operator Event() const { - Event ev = MMIEvent::operator Event(); - // do we want to represent the context? It's the interpreters name already - return ev; -} - -ExtensionNotification::operator Event() const { - Event ev = ContextualizedRequest::operator Event(); - if (name.length() > 0) { - ev.setName(name); - } else { - ev.setName("mmi.notification.extension"); - } - return ev; -} - -ContentRequest::operator Event() const { - Event ev = ContextualizedRequest::operator Event(); - if (representation == MMI_AS_DATA) { - if (content.length() > 0) - ev.data.compound["content"] = Data(content, Data::VERBATIM); - if (contentURL.fetchTimeout.length() > 0) - ev.data.compound["contentURL"].compound["fetchTimeout"] = Data(contentURL.fetchTimeout, Data::VERBATIM); - if (contentURL.href.length() > 0) - ev.data.compound["contentURL"].compound["href"] = Data(contentURL.href, Data::VERBATIM); - if (contentURL.maxAge.length() > 0) - ev.data.compound["contentURL"].compound["maxAge"] = Data(contentURL.maxAge, Data::VERBATIM); - } - return ev; -} - -StatusResponse::operator Event() const { - Event ev = ContextualizedRequest::operator Event(); - ev.setName("mmi.response.status"); - - if (representation == MMI_AS_DATA) { - switch (status) { - case ALIVE: - ev.data.compound["status"] = Data("alive", Data::VERBATIM); - break; - case DEAD: - ev.data.compound["status"] = Data("dead", Data::VERBATIM); - break; - case SUCCESS: - ev.data.compound["status"] = Data("success", Data::VERBATIM); - break; - case FAILURE: - ev.data.compound["status"] = Data("failure", Data::VERBATIM); - break; - default: - ev.data.compound["status"] = Data("invalid", Data::VERBATIM); - } - } else { - ev.dom = toXML(); - } - - return ev; -} - -#endif - - -} \ No newline at end of file diff --git a/src/uscxml/messages/MMIMessages.h b/src/uscxml/messages/MMIMessages.h deleted file mode 100644 index 3538816..0000000 --- a/src/uscxml/messages/MMIMessages.h +++ /dev/null @@ -1,414 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef MMIEVENT_H_OS0SE7H5 -#define MMIEVENT_H_OS0SE7H5 - -#define MMI_WITH_OPERATOR_EVENT 1 - -#include -#include -#include -#include - -namespace uscxml { - -class MMIEvent { -public: - enum Type { - NEWCONTEXTREQUEST, - NEWCONTEXTRESPONSE, - PREPAREREQUEST, - PREPARERESPONSE, - STARTREQUEST, - STARTRESPONSE, - DONENOTIFICATION, - CANCELREQUEST, - CANCELRESPONSE, - PAUSEREQUEST, - PAUSERESPONSE, - RESUMEREQUEST, - RESUMERESPONSE, - EXTENSIONNOTIFICATION, - CLEARCONTEXTREQUEST, - CLEARCONTEXTRESPONSE, - STATUSREQUEST, - STATUSRESPONSE, - INVALID - }; - - enum RepresentationType { - MMI_AS_DATA, - MMI_AS_XML - }; - static Type getType(Arabica::DOM::Node node); - - virtual Arabica::DOM::Document toXML(bool encapsulateInMMI = true) const; - static MMIEvent fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - // conversion operator - operator Event() const; -#endif - - std::string source; - std::string target; - std::string data; - Arabica::DOM::Node dataDOM; - std::string requestId; - - std::string tagName; - Type type; - RepresentationType representation; - - static std::string nameSpace; - -protected: - MMIEvent() : representation(MMI_AS_DATA) {} -}; - -class NewContextRequest : public MMIEvent { -public: - NewContextRequest() { - tagName = "NewContextRequest"; - type = NEWCONTEXTREQUEST; - } - NewContextRequest(const MMIEvent& father) : MMIEvent(father) {} - static NewContextRequest fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif - - std::string token; ///< special token for server-less modality components -}; - -class ContextualizedRequest : public MMIEvent { -public: - virtual Arabica::DOM::Document toXML(bool encapsulateInMMI = true) const; - static ContextualizedRequest fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif - - std::string context; -protected: - ContextualizedRequest() {} - ContextualizedRequest(const MMIEvent& father) : MMIEvent(father) {} -}; - -class PauseRequest : public ContextualizedRequest { -public: - PauseRequest() { - tagName = "PauseRequest"; - type = PAUSEREQUEST; - } - PauseRequest(const ContextualizedRequest& father) : ContextualizedRequest(father) {} - static PauseRequest fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif - -}; -class ResumeRequest : public ContextualizedRequest { -public: - ResumeRequest() { - tagName = "ResumeRequest"; - type = RESUMEREQUEST; - } - ResumeRequest(const ContextualizedRequest& father) : ContextualizedRequest(father) {} - static ResumeRequest fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif - -}; -class CancelRequest : public ContextualizedRequest { -public: - CancelRequest() { - tagName = "CancelRequest"; - type = CANCELREQUEST; - } - CancelRequest(const ContextualizedRequest& father) : ContextualizedRequest(father) {} - static CancelRequest fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif - -}; -class ClearContextRequest : public ContextualizedRequest { -public: - ClearContextRequest() { - tagName = "ClearContextRequest"; - type = CLEARCONTEXTREQUEST; - } - ClearContextRequest(const ContextualizedRequest& father) : ContextualizedRequest(father) {} - static ClearContextRequest fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif - -}; -class StatusRequest : public ContextualizedRequest { -public: - StatusRequest() { - tagName = "StatusRequest"; - type = STARTREQUEST; - } - virtual Arabica::DOM::Document toXML(bool encapsulateInMMI = true) const; - static StatusRequest fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif - - bool automaticUpdate; -protected: - StatusRequest(const ContextualizedRequest& father) : ContextualizedRequest(father) {} -}; - -class ContentRequest : public ContextualizedRequest { -public: - struct ContentURL { - std::string href; - std::string maxAge; - std::string fetchTimeout; - }; - - virtual Arabica::DOM::Document toXML(bool encapsulateInMMI = true) const; - static ContentRequest fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif - - std::string content; - Arabica::DOM::Node contentDOM; - ContentURL contentURL; -protected: - ContentRequest() {} - ContentRequest(const ContextualizedRequest& father) : ContextualizedRequest(father) {} -}; - -class PrepareRequest : public ContentRequest { -public: - PrepareRequest() { - tagName = "PrepareRequest"; - type = PREPAREREQUEST; - } - PrepareRequest(const ContentRequest& father) : ContentRequest(father) {} - static PrepareRequest fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif -}; - -class StartRequest : public ContentRequest { -public: - StartRequest() { - tagName = "StartRequest"; - type = STARTREQUEST; - } - StartRequest(const ContentRequest& father) : ContentRequest(father) {} - static StartRequest fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif - -}; - -class ExtensionNotification : public ContextualizedRequest { -public: - ExtensionNotification() { - tagName = "ExtensionNotification"; - type = EXTENSIONNOTIFICATION; - } - virtual Arabica::DOM::Document toXML(bool encapsulateInMMI = true) const; - static ExtensionNotification fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif - - std::string name; -protected: - ExtensionNotification(const ContextualizedRequest& father) : ContextualizedRequest(father) {} - -}; - -class StatusResponse : public ContextualizedRequest { -public: - enum Status { - INVALID = 0, - ALIVE = 1, - DEAD = 2, - SUCCESS = 3, - FAILURE = 4 - }; - - StatusResponse() { - tagName = "StatusResponse"; - type = STATUSRESPONSE; - status = INVALID; - } - virtual Arabica::DOM::Document toXML(bool encapsulateInMMI = true) const; - static StatusResponse fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif - - Status status; -protected: - StatusResponse(const ContextualizedRequest& father) : ContextualizedRequest(father) {} -}; - -class StatusInfoResponse : public StatusResponse { -public: - virtual Arabica::DOM::Document toXML(bool encapsulateInMMI = true) const; - StatusInfoResponse(const StatusResponse& father) : StatusResponse(father) {} - static StatusInfoResponse fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - std::string statusInfo; -protected: - StatusInfoResponse() {} -}; - -class PrepareResponse : public StatusInfoResponse { -public: - PrepareResponse() { - tagName = "PrepareResponse"; - type = PREPARERESPONSE; - } - PrepareResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {} - static PrepareResponse fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif - -}; - -class StartResponse : public StatusInfoResponse { -public: - StartResponse() { - tagName = "StartResponse"; - type = STARTRESPONSE; - } - StartResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {} - static StartResponse fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif -}; - -class CancelResponse : public StatusInfoResponse { -public: - CancelResponse() { - tagName = "CancelResponse"; - type = CANCELRESPONSE; - } - CancelResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {} - static CancelResponse fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif -}; - -class PauseResponse : public StatusInfoResponse { -public: - PauseResponse() { - tagName = "PauseResponse"; - type = PAUSERESPONSE; - } - PauseResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {} - static PauseResponse fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif -}; - -class ResumeResponse : public StatusInfoResponse { -public: - ResumeResponse() { - tagName = "ResumeResponse"; - type = RESUMERESPONSE; - } - ResumeResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {} - static ResumeResponse fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif -}; - -class ClearContextResponse : public StatusInfoResponse { -public: - ClearContextResponse() { - tagName = "ClearContextResponse"; - type = CLEARCONTEXTRESPONSE; - } - ClearContextResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {} - static ClearContextResponse fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif -}; - -class NewContextResponse : public StatusInfoResponse { -public: - NewContextResponse() { - tagName = "NewContextResponse"; - type = NEWCONTEXTRESPONSE; - } - NewContextResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {} - static NewContextResponse fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif -}; - -class DoneNotification : public StatusInfoResponse { -public: - DoneNotification() { - tagName = "DoneNotification"; - type = DONENOTIFICATION; - } - DoneNotification(const StatusInfoResponse& father) : StatusInfoResponse(father) {} - static DoneNotification fromXML(Arabica::DOM::Node node, InterpreterImpl* interpreter = NULL); - -#ifdef MMI_WITH_OPERATOR_EVENT - operator Event() const; -#endif -}; - -} - -#endif /* end of include guard: MMIEVENT_H_OS0SE7H5 */ diff --git a/src/uscxml/messages/SendRequest.cpp b/src/uscxml/messages/SendRequest.cpp deleted file mode 100644 index 4759d29..0000000 --- a/src/uscxml/messages/SendRequest.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/messages/SendRequest.h" -#include -#include -#include - -namespace uscxml { - -std::string SendRequest::toXMLString() { - std::stringstream ss; - ss << toDocument(); - return ss.str(); -} - -Arabica::DOM::Document SendRequest::toDocument() { - Arabica::DOM::DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - Arabica::DOM::Document document = Event::toDocument(); - Arabica::DOM::Element scxmlMsg = document.getDocumentElement(); - - // add params and namelist - if (params.size() > 0 || namelist.size() > 0) { - Arabica::DOM::NodeList payload = scxmlMsg.getElementsByTagName("scxml:payload"); - if (payload.getLength() == 0) { - Arabica::DOM::Element payloadElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "payload"); - payloadElem.setPrefix("scxml"); - - scxmlMsg.appendChild(payloadElem); - } - Arabica::DOM::Node payloadElem = scxmlMsg.getElementsByTagName("scxml:payload").item(0); - - // add parameters - std::multimap::iterator paramIter = params.begin(); - while(paramIter != params.end()) { - Arabica::DOM::Element propertyElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "property"); - propertyElem.setPrefix("scxml"); - - propertyElem.setAttribute("name", paramIter->first); - // this is simplified - Data might be more elaborate than a simple string atom - Arabica::DOM::Text textElem = document.createTextNode(paramIter->second.atom); - propertyElem.appendChild(textElem); - payloadElem.appendChild(propertyElem); - paramIter++; - } - - // add namelist elements - std::map::iterator namelistIter = namelist.begin(); - while(namelistIter != namelist.end()) { - Arabica::DOM::Element propertyElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "property"); - propertyElem.setPrefix("scxml"); - - propertyElem.setAttribute("name", namelistIter->first); - // this is simplified - Data might be more elaborate than a simple string atom - Arabica::DOM::Text textElem = document.createTextNode(namelistIter->second.atom); - propertyElem.appendChild(textElem); - payloadElem.appendChild(propertyElem); - namelistIter++; - } - - } - - scxmlMsg.setAttribute("sendid", sendid); - - return document; -} - -SendRequest SendRequest::fromXML(const std::string& xmlString) { - Event::fromXML(xmlString); - return SendRequest(); -} - -std::ostream& operator<< (std::ostream& os, const SendRequest& sendReq) { - - std::string indent; - for (size_t i = 0; i < _dataIndentation; i++) { - indent += " "; - } - - os << indent << "SendReq" << std::endl; - - if (sendReq.target.size() > 0) - os << indent << " target: " << sendReq.target << std::endl; - - if (sendReq.type.size() > 0) - os << indent << " type: " << sendReq.type << std::endl; - - if (sendReq.delayMs > 0) - os<< indent << " delay: " << sendReq.delayMs << std::endl; -#if 0 - if (sendReq.namelist.size() > 0) { - os << indent << " namelist: " << std::endl; - SendRequest::namelist_t::const_iterator namelistIter = sendReq.namelist.begin(); - while(namelistIter != sendReq.namelist.end()) { - os << indent << " " << namelistIter->first << ": " << namelistIter->second << std::endl; - namelistIter++; - } - } - - if (sendReq.params.size() > 0) { - os << indent << " params: " << std::endl; - SendRequest::params_t::const_iterator paramIter = sendReq.params.begin(); - while(paramIter != sendReq.params.end()) { - os << indent << " " << paramIter->first << ": " << paramIter->second << std::endl; - paramIter++; - } - } - - if (sendReq.content.size() > 0) - os << indent << " content: " << sendReq.content << std::endl; -#endif - _dataIndentation++; - os << (Event)sendReq; - _dataIndentation--; - return os; - -} - -} \ No newline at end of file diff --git a/src/uscxml/messages/SendRequest.h b/src/uscxml/messages/SendRequest.h deleted file mode 100644 index 369fc65..0000000 --- a/src/uscxml/messages/SendRequest.h +++ /dev/null @@ -1,73 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef SENDREQUEST_H_86B0F6A0 -#define SENDREQUEST_H_86B0F6A0 - -#include "uscxml/messages/Event.h" - -namespace uscxml { - -class USCXML_API SendRequest : public Event { -public: - SendRequest() : delayMs(0) {} - SendRequest(Event event) : Event(event) {} - - std::string getTarget() { - return target; - } - void setTarget(const std::string& target) { - this->target = target; - } - - std::string getType() { - return type; - } - void setType(const std::string& type) { - this->type = type; - } - - uint32_t getDelayMs() { - return delayMs; - } - void setDelayMs(uint32_t delayMs) { - this->delayMs = delayMs; - } - - static SendRequest fromXML(const std::string& xmlString); - Arabica::DOM::Document toDocument(); - std::string toXMLString(); - -#ifdef SWIGIMPORTED -protected: -#endif - std::string target; - std::string type; - uint32_t delayMs; - Arabica::DOM::Element elem; - - friend USCXML_API std::ostream& operator<< (std::ostream& os, const SendRequest& sendReq); - -}; - -USCXML_API std::ostream& operator<< (std::ostream& os, const SendRequest& sendReq); - -} - -#endif /* end of include guard: SENDREQUEST_H_86B0F6A0 */ diff --git a/src/uscxml/pch.h b/src/uscxml/pch.h deleted file mode 100644 index c69abce..0000000 --- a/src/uscxml/pch.h +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/Common.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include \ No newline at end of file diff --git a/src/uscxml/plugins/DataModel.h b/src/uscxml/plugins/DataModel.h index 5cbd0c8..b08f934 100644 --- a/src/uscxml/plugins/DataModel.h +++ b/src/uscxml/plugins/DataModel.h @@ -20,10 +20,9 @@ #ifndef DATAMODEL_H_F1F776F9 #define DATAMODEL_H_F1F776F9 -#include "uscxml/config.h" #include "uscxml/Common.h" -#include "uscxml/InterpreterInfo.h" -#include "uscxml/plugins/EventHandler.h" +#include "uscxml/plugins/Invoker.h" +#include "uscxml/plugins/IOProcessor.h" #ifndef TIME_BLOCK # ifdef BUILD_PROFILING @@ -35,17 +34,27 @@ #endif #include -#include #include +#include #include -#include "DOM/Document.hpp" +#include namespace uscxml { class InterpreterImpl; class DataModelImpl; +class USCXML_API DataModelCallbacks { +public: + virtual const std::string& getName() = 0; + virtual const std::string& getSessionId() = 0; + virtual const std::map& getIOProcessors() = 0; + virtual bool isInState(const std::string& stateId) = 0; + virtual xercesc::DOMDocument* getDocument() const = 0; + virtual const std::map& getInvokers() = 0; +}; + class USCXML_API DataModelExtension { public: DataModelExtension() : dm(NULL) {} @@ -59,16 +68,13 @@ public: class USCXML_API DataModelImpl { public: virtual ~DataModelImpl() {} - virtual boost::shared_ptr create(InterpreterInfo* interpreter) = 0; + virtual std::shared_ptr create(DataModelCallbacks* interpreter) = 0; virtual std::list getNames() = 0; - virtual bool validate(const std::string& location, const std::string& schema) = 0; - virtual bool isLocation(const std::string& expr) = 0; virtual bool isValidSyntax(const std::string& expr) { return true; // overwrite when datamodel supports it } virtual void setEvent(const Event& event) = 0; - virtual Data getStringAsData(const std::string& content) = 0; size_t replaceExpressions(std::string& content); @@ -78,19 +84,10 @@ public: const std::string& array, const std::string& index, uint32_t iteration) = 0; - virtual void pushContext() = 0; - virtual void popContext() = 0; - - virtual void eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr) = 0; - virtual std::string evalAsString(const std::string& expr) = 0; - - virtual bool evalAsBool(const Arabica::DOM::Element& scriptNode, - const std::string& expr) = 0; - virtual bool evalAsBool(const std::string& expr) { - return evalAsBool(Arabica::DOM::Element(), expr); - } + virtual Data getAsData(const std::string& content) = 0; + virtual Data evalAsData(const std::string& content) = 0; + virtual bool evalAsBool(const std::string& expr) = 0; virtual bool isDeclared(const std::string& expr) = 0; @@ -107,18 +104,11 @@ public: * * */ - virtual void assign(const Arabica::DOM::Element& assignElem, - const Arabica::DOM::Node& node, - const std::string& content) = 0; virtual void assign(const std::string& location, const Data& data) = 0; - - virtual void init(const Arabica::DOM::Element& dataElem, - const Arabica::DOM::Node& node, - const std::string& content) = 0; virtual void init(const std::string& location, const Data& data) = 0; - virtual void setInterpreter(InterpreterInfo* interpreter) { - _interpreter = interpreter; + virtual void setCallbacks(DataModelCallbacks* callbacks) { + _callbacks = callbacks; } virtual void addExtension(DataModelExtension* ext); @@ -127,14 +117,14 @@ public: } protected: - InterpreterInfo* _interpreter; + DataModelCallbacks* _callbacks; }; class USCXML_API DataModel { public: DataModel() : _impl() {} - DataModel(const boost::shared_ptr impl) : _impl(impl) { } + DataModel(const std::shared_ptr impl) : _impl(impl) { } DataModel(const DataModel& other) : _impl(other._impl) { } virtual ~DataModel() {}; @@ -160,14 +150,6 @@ public: return _impl->getNames(); } - virtual bool validate(const std::string& location, const std::string& schema) { - TIME_BLOCK - return _impl->validate(location, schema); - } - virtual bool isLocation(const std::string& expr) { - TIME_BLOCK - return _impl->isLocation(expr); - } virtual bool isValidSyntax(const std::string& expr) { TIME_BLOCK return _impl->isValidSyntax(expr); @@ -177,38 +159,19 @@ public: TIME_BLOCK return _impl->setEvent(event); } - virtual Data getStringAsData(const std::string& content) { + virtual Data getAsData(const std::string& content) { TIME_BLOCK - return _impl->getStringAsData(content); + return _impl->getAsData(content); } - - virtual void pushContext() { + virtual Data evalAsData(const std::string& content) { TIME_BLOCK - return _impl->pushContext(); - } - virtual void popContext() { - TIME_BLOCK - return _impl->popContext(); + return _impl->evalAsData(content); } - virtual void eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr) { - TIME_BLOCK - return _impl->eval(scriptElem, expr); - } - virtual std::string evalAsString(const std::string& expr) { - TIME_BLOCK - return _impl->evalAsString(expr); - } virtual bool evalAsBool(const std::string& expr) { TIME_BLOCK return _impl->evalAsBool(expr); } - virtual bool evalAsBool(const Arabica::DOM::Element& scriptNode, - const std::string& expr) { - TIME_BLOCK - return _impl->evalAsBool(scriptNode, expr); - } virtual uint32_t getLength(const std::string& expr) { TIME_BLOCK @@ -222,23 +185,11 @@ public: return _impl->setForeach(item, array, index, iteration); } - virtual void assign(const Arabica::DOM::Element& assignElem, - const Arabica::DOM::Node& node, - const std::string& content) { - TIME_BLOCK - return _impl->assign(assignElem, node, content); - } virtual void assign(const std::string& location, const Data& data) { TIME_BLOCK return _impl->assign(location, data); } - virtual void init(const Arabica::DOM::Element& dataElem, - const Arabica::DOM::Node& node, - const std::string& content) { - TIME_BLOCK - return _impl->init(dataElem, node, content); - } virtual void init(const std::string& location, const Data& data) { TIME_BLOCK return _impl->init(location, data); @@ -259,9 +210,9 @@ public: return _impl->andExpressions(expressions); } - virtual void setInterpreter(InterpreterInfo* interpreter) { + virtual void setCallbacks(DataModelCallbacks* callbacks) { TIME_BLOCK - _impl->setInterpreter(interpreter); + _impl->setCallbacks(callbacks); } virtual void addExtension(DataModelExtension* ext) { @@ -274,7 +225,7 @@ public: #endif protected: - boost::shared_ptr _impl; + std::shared_ptr _impl; }; diff --git a/src/uscxml/plugins/EventHandler.h b/src/uscxml/plugins/EventHandler.h index 91703fc..401afec 100644 --- a/src/uscxml/plugins/EventHandler.h +++ b/src/uscxml/plugins/EventHandler.h @@ -21,14 +21,15 @@ #define EVENTHANDLER_H_2801243E #include "uscxml/Common.h" +#include "uscxml/messages/Data.h" +#include "uscxml/messages/Event.h" #include -#include #include +#include #include -#include "DOM/Document.hpp" -#include "uscxml/messages/SendRequest.h" +#include namespace uscxml { @@ -36,54 +37,19 @@ class InterpreterImpl; class USCXML_API EventHandlerImpl { public: + EventHandlerImpl() {} virtual ~EventHandlerImpl() {} virtual std::list getNames() = 0; - - virtual void setInterpreter(InterpreterImpl* interpreter) { - _interpreter = interpreter; - } - void setInvokeId(const std::string& invokeId) { - _invokeId = invokeId; - } - void setType(const std::string& type) { - _type = type; - } - std::string getType() { - return _type; - } - - void setElement(const Arabica::DOM::Element& element) { - _element = element; - } - - Arabica::DOM::Element getElement() { - return _element; - } - virtual Data getDataModelVariables() = 0; - virtual void send(const SendRequest& req) = 0; - - virtual void runOnMainThread() {}; - void returnErrorExecution(const std::string&); - void returnErrorCommunication(const std::string&); - void returnEvent(Event& event, bool internal = false); protected: InterpreterImpl* _interpreter; - Arabica::DOM::Element _element; - std::string _invokeId; - std::string _type; - - }; class USCXML_API EventHandler { public: - EventHandler() : _impl() {} - EventHandler(boost::shared_ptr const impl) : _impl(impl) { } - EventHandler(const EventHandler& other) : _impl(other._impl) { } - virtual ~EventHandler() {}; + PIMPL_OPERATORS(EventHandler); virtual std::list getNames() { return _impl->getNames(); @@ -92,37 +58,9 @@ public: virtual Data getDataModelVariables() const { return _impl->getDataModelVariables(); }; - virtual void send(const SendRequest& req) { - return _impl->send(req); - }; - virtual void runOnMainThread() { - return _impl->runOnMainThread(); - } - - void setInterpreter(InterpreterImpl* interpreter) { - _impl->setInterpreter(interpreter); - } - void setInvokeId(const std::string& invokeId) { - _impl->setInvokeId(invokeId); - } - - void setType(const std::string& type) { - _impl->setType(type); - } - std::string getType() { - return _impl->getType(); - } - - void setElement(const Arabica::DOM::Element& element) { - _impl->setElement(element); - } - - Arabica::DOM::Element getElement() { - return _impl->getElement(); - } protected: - boost::shared_ptr _impl; + std::shared_ptr _impl; friend class InterpreterImpl; }; diff --git a/src/uscxml/plugins/ExecutableContent.h b/src/uscxml/plugins/ExecutableContent.h index 6df197c..0190820 100644 --- a/src/uscxml/plugins/ExecutableContent.h +++ b/src/uscxml/plugins/ExecutableContent.h @@ -21,10 +21,10 @@ #define EXECUTABLECONTENT_H_1E028A2D #include "uscxml/Common.h" -#include #include +#include #include -#include "DOM/Document.hpp" +#include "xercesc/dom/DOM.hpp" namespace uscxml { @@ -34,7 +34,7 @@ class USCXML_API ExecutableContentImpl { public: ExecutableContentImpl() {}; virtual ~ExecutableContentImpl() {}; - virtual boost::shared_ptr create(InterpreterImpl* interpreter) = 0; + virtual std::shared_ptr create(InterpreterImpl* interpreter) = 0; virtual void setInterpreter(InterpreterImpl* interpreter) { _interpreter = interpreter; @@ -44,8 +44,8 @@ public: virtual std::string getNamespace() { return "http://www.w3.org/2005/07/scxml"; ///< The namespace of the element. } - virtual void enterElement(const Arabica::DOM::Element& node) = 0; ///< Invoked when entering the element as part of evaluating executable content. - virtual void exitElement(const Arabica::DOM::Element& node) = 0; ///< Invoked when exiting the element as part of evaluating executable content. + virtual void enterElement(xercesc::DOMElement* node) = 0; ///< Invoked when entering the element as part of evaluating executable content. + virtual void exitElement(xercesc::DOMElement* node) = 0; ///< Invoked when exiting the element as part of evaluating executable content. virtual bool processChildren() = 0; ///< Whether or not the interpreter should process this elements children. protected: @@ -55,7 +55,7 @@ protected: class USCXML_API ExecutableContent { public: ExecutableContent() : _impl() {} - ExecutableContent(boost::shared_ptr const impl) : _impl(impl) { } + ExecutableContent(std::shared_ptr const impl) : _impl(impl) { } ExecutableContent(const ExecutableContent& other) : _impl(other._impl) { } virtual ~ExecutableContent() {}; @@ -86,17 +86,17 @@ public: std::string getNamespace() { return _impl->getNamespace(); } - void enterElement(const Arabica::DOM::Element& node) { + void enterElement(xercesc::DOMElement* node) { return _impl->enterElement(node); } - void exitElement(const Arabica::DOM::Element& node) { + void exitElement(xercesc::DOMElement* node) { return _impl->exitElement(node); } bool processChildren() { return _impl->processChildren(); } protected: - boost::shared_ptr _impl; + std::shared_ptr _impl; }; diff --git a/src/uscxml/plugins/Factory.cpp b/src/uscxml/plugins/Factory.cpp new file mode 100644 index 0000000..7c68a30 --- /dev/null +++ b/src/uscxml/plugins/Factory.cpp @@ -0,0 +1,476 @@ +/** + * @file + * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#include "uscxml/config.h" + +#include "uscxml/plugins/Factory.h" +#include "uscxml/messages/Data.h" +#include "uscxml/Interpreter.h" +#include + +// see http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system + +// we will always include these in a build +#include "uscxml/plugins/datamodel/null/NULLDataModel.h" +#include "uscxml/plugins/invoker/scxml/USCXMLInvoker.h" +#include "uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.h" +#include "uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h" + +# ifdef V8_FOUND +# include "uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h" +# endif + +# ifdef JSC_FOUND +# include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h" +# endif + +# ifdef LUA_FOUND +# include "uscxml/plugins/datamodel/lua/LuaDataModel.h" +# endif + + +namespace uscxml { + +Factory::Factory(Factory* parentFactory) : _parentFactory(parentFactory) { +} + +Factory::Factory(const std::string& pluginPath, Factory* parentFactory) : _parentFactory(parentFactory), _pluginPath(pluginPath) { + registerPlugins(); +} + +Factory::Factory(const std::string& pluginPath) : _parentFactory(NULL), _pluginPath(pluginPath) { + registerPlugins(); +} + +void Factory::setDefaultPluginPath(const std::string& path) { + _defaultPluginPath = path; +} +std::string Factory::getDefaultPluginPath() { + return _defaultPluginPath; +} + +void Factory::registerPlugins() { + + { + USCXMLInvoker* invoker = new USCXMLInvoker(); + registerInvoker(invoker); + } + + { + SCXMLIOProcessor* ioProcessor = new SCXMLIOProcessor(); + registerIOProcessor(ioProcessor); + } + + { + BasicHTTPIOProcessor* ioProcessor = new BasicHTTPIOProcessor(); + registerIOProcessor(ioProcessor); + } + + { + NULLDataModel* dataModel = new NULLDataModel(); + registerDataModel(dataModel); + } + +#ifdef V8_FOUND + { + V8DataModel* dataModel = new V8DataModel(); + registerDataModel(dataModel); + } +#endif + +#ifdef JSC_FOUND + { + JSCDataModel* dataModel = new JSCDataModel(); + registerDataModel(dataModel); + } +#endif + +#ifdef LUA_FOUND + { + LuaDataModel* dataModel = new LuaDataModel(); + registerDataModel(dataModel); + } +#endif + + +} + +Factory::~Factory() { +#ifdef BUILD_AS_PLUGINS + pluma.unloadAll(); +#endif +} + +#define LIST_COMPONENTS(type, name) \ +std::map::iterator iter = name.begin(); \ +while(iter != name.end()) { \ + std::list names = iter->second->getNames(); \ + std::list::iterator nameIter = names.begin(); \ + if (nameIter != names.end()) { \ + std::cout << "\t" << *nameIter; \ + nameIter++; \ + std::string seperator = ""; \ + if (nameIter != names.end()) { \ + std::cout << "\t("; \ + while(nameIter != names.end()) { \ + std::cout << seperator << *nameIter; \ + seperator = ", "; \ + nameIter++; \ + } \ + std::cout << ")"; \ + } \ + std::cout << std::endl; \ + } \ + iter++; \ +} + + +void Factory::listComponents() { + { + std::cout << "Available Datamodels:" << std::endl; + LIST_COMPONENTS(DataModelImpl, _dataModels); + std::cout << std::endl; + } + { + std::cout << "Available Invokers:" << std::endl; + LIST_COMPONENTS(InvokerImpl, _invokers); + std::cout << std::endl; + } + { + std::cout << "Available I/O Processors:" << std::endl; + LIST_COMPONENTS(IOProcessorImpl, _ioProcessors); + std::cout << std::endl; + } + { + std::cout << "Available Elements:" << std::endl; + std::map, ExecutableContentImpl*>::iterator iter = _executableContent.begin(); + while(iter != _executableContent.end()) { + std::cout << "\t" << iter->second->getNamespace() << " / " << iter->second->getLocalName() << std::endl; + iter++; + } + std::cout << std::endl; + } +} + +void Factory::registerIOProcessor(IOProcessorImpl* ioProcessor) { + std::list names = ioProcessor->getNames(); + std::list::iterator nameIter = names.begin(); + if (nameIter != names.end()) { + std::string canonicalName = *nameIter; + _ioProcessors[canonicalName] = ioProcessor; + while(nameIter != names.end()) { + _ioProcessorAliases[*nameIter] = canonicalName; + nameIter++; + } + } +} + +void Factory::registerDataModel(DataModelImpl* dataModel) { + std::list names = dataModel->getNames(); + std::list::iterator nameIter = names.begin(); + if (nameIter != names.end()) { + std::string canonicalName = *nameIter; + _dataModels[canonicalName] = dataModel; + while(nameIter != names.end()) { + _dataModelAliases[*nameIter] = canonicalName; + nameIter++; + } + } +} + +void Factory::registerInvoker(InvokerImpl* invoker) { + std::list names = invoker->getNames(); + std::list::iterator nameIter = names.begin(); + if (nameIter != names.end()) { + std::string canonicalName = *nameIter; + _invokers[canonicalName] = invoker; + while(nameIter != names.end()) { + _invokerAliases[*nameIter] = canonicalName; + nameIter++; + } + } +} + +void Factory::registerExecutableContent(ExecutableContentImpl* executableContent) { + std::string localName = executableContent->getLocalName(); + std::string nameSpace = executableContent->getNamespace(); + _executableContent[std::make_pair(localName, nameSpace)] = executableContent; +} + +std::map Factory::getIOProcessors() { + std::map ioProcs; + if (_parentFactory) { + ioProcs = _parentFactory->getIOProcessors(); + } + + std::map::iterator ioProcIter = _ioProcessors.begin(); + while(ioProcIter != _ioProcessors.end()) { + ioProcs.insert(std::make_pair(ioProcIter->first, ioProcIter->second)); + ioProcIter++; + } + + return ioProcs; +} + +bool Factory::hasInvoker(const std::string& type) { + if (_invokerAliases.find(type) != _invokerAliases.end()) { + return true; + } else if(_parentFactory) { + return _parentFactory->hasInvoker(type); + } + return false; +} + +std::shared_ptr Factory::createInvoker(const std::string& type, InterpreterImpl* interpreter) { + + // do we have this type ourself? + if (_invokerAliases.find(type) != _invokerAliases.end()) { + std::string canonicalName = _invokerAliases[type]; + if (_invokers.find(canonicalName) != _invokers.end()) { + std::shared_ptr invoker = _invokers[canonicalName]->create(interpreter); + return invoker; + } + } + + // lookup in parent factory + if (_parentFactory) { + return _parentFactory->createInvoker(type, interpreter); + } else { + ERROR_EXECUTION_THROW("No Invoker named '" + type + "' known"); + } + + return std::shared_ptr(); +} + + +bool Factory::hasDataModel(const std::string& type) { + if (_dataModelAliases.find(type) != _dataModelAliases.end()) { + return true; + } else if(_parentFactory) { + return _parentFactory->hasDataModel(type); + } + return false; +} + +std::shared_ptr Factory::createDataModel(const std::string& type, DataModelCallbacks* callbacks) { + + // do we have this type ourself? + if (_dataModelAliases.find(type) != _dataModelAliases.end()) { + std::string canonicalName = _dataModelAliases[type]; + if (_dataModels.find(canonicalName) != _dataModels.end()) { + std::shared_ptr dataModel = _dataModels[canonicalName]->create(callbacks); + dataModel->setCallbacks(callbacks); + return dataModel; + } + } + + // lookup in parent factory + if (_parentFactory) { + return _parentFactory->createDataModel(type, callbacks); + } else { + ERROR_EXECUTION_THROW("No Datamodel name '" + type + "' known"); + } + + return std::shared_ptr(); +} + + +bool Factory::hasIOProcessor(const std::string& type) { + if (_ioProcessorAliases.find(type) != _ioProcessorAliases.end()) { + return true; + } else if(_parentFactory) { + return _parentFactory->hasIOProcessor(type); + } + return false; +} + +std::shared_ptr Factory::createIOProcessor(const std::string& type, InterpreterImpl* interpreter) { + // do we have this type ourself? + if (_ioProcessorAliases.find(type) != _ioProcessorAliases.end()) { + std::string canonicalName = _ioProcessorAliases[type]; + if (_ioProcessors.find(canonicalName) != _ioProcessors.end()) { + std::shared_ptr ioProc = _ioProcessors[canonicalName]->create(interpreter); +// ioProc->setInterpreter(interpreter); + return ioProc; + } + } + + // lookup in parent factory + if (_parentFactory) { + return _parentFactory->createIOProcessor(type, interpreter); + } else { + ERROR_EXECUTION_THROW("No IOProcessor named '" + type + "' known"); + } + + return std::shared_ptr(); +} + +bool Factory::hasExecutableContent(const std::string& localName, const std::string& nameSpace) { + std::string actualNameSpace = (nameSpace.length() == 0 ? "http://www.w3.org/2005/07/scxml" : nameSpace); + if (_executableContent.find(std::make_pair(localName, actualNameSpace)) != _executableContent.end()) { + return true; + } else if(_parentFactory) { + return _parentFactory->hasExecutableContent(localName, nameSpace); + } + return false; +} + +std::shared_ptr Factory::createExecutableContent(const std::string& localName, const std::string& nameSpace, InterpreterImpl* interpreter) { + // do we have this type in this factory? + std::string actualNameSpace = (nameSpace.length() == 0 ? "http://www.w3.org/2005/07/scxml" : nameSpace); + if (_executableContent.find(std::make_pair(localName, actualNameSpace)) != _executableContent.end()) { + std::shared_ptr execContent = _executableContent[std::make_pair(localName, actualNameSpace)]->create(interpreter); + execContent->setInterpreter(interpreter); + return execContent; + } + + // lookup in parent factory + if (_parentFactory) { + return _parentFactory->createExecutableContent(localName, nameSpace, interpreter); + } else { + ERROR_EXECUTION_THROW("No Executable content name '" + localName + "' in namespace '" + actualNameSpace + "' known"); + } + + return std::shared_ptr(); + +} + +void DataModelImpl::addExtension(DataModelExtension* ext) { + ERROR_EXECUTION_THROW("DataModel does not support extensions"); +} + +size_t DataModelImpl::replaceExpressions(std::string& content) { + std::stringstream ss; + size_t replacements = 0; + size_t indent = 0; + size_t pos = 0; + size_t start = std::string::npos; + size_t end = 0; + while (true) { + // find any of ${} + pos = content.find_first_of("${}", pos); + if (pos == std::string::npos) { + ss << content.substr(end, content.length() - end); + break; + } + if (content[pos] == '$') { + if (content.size() > pos && content[pos+1] == '{') { + pos++; + start = pos + 1; + // copy everything in between + ss << content.substr(end, (start - 2) - end); + } + } else if (content[pos] == '{' && start != std::string::npos) { + indent++; + } else if (content[pos] == '}' && start != std::string::npos) { + if (!indent) { + end = pos; + // we found a token to substitute + std::string expr = content.substr(start, end - start); + end++; + try { + Data data = getAsData(expr); +// if (data.type == Data::VERBATIM) { +// ss << "\"" << data.atom << "\""; +// } else { +// ss << data.atom; +// } + if (data.atom.length() > 0) { + ss << data.atom; + } else { + ss << Data::toJSON(data); + } + replacements++; + } catch (Event e) { + // insert unsubstituted + start -= 2; + ss << content.substr(start, end - start); + } + start = std::string::npos; + } else { + indent--; + } + } + pos++; + } + if (replacements) + content = ss.str(); + + return replacements; +} + + +Factory* Factory::getInstance() { + if (_instance == NULL) { + _instance = new Factory(Factory::_defaultPluginPath); + } + return _instance; +} + +//void EventHandlerImpl::returnErrorExecution(const std::string& cause) { +// ERROR_EXECUTION(exc, cause); +// returnEvent(exc); +//} +// +//void EventHandlerImpl::returnErrorCommunication(const std::string& cause) { +// ERROR_COMMUNICATION(exc, cause); +// returnEvent(exc); +//} + +void IOProcessorImpl::eventToSCXML(Event& event, + const std::string& type, + const std::string& origin, + bool internal) { + if (event.eventType == 0) + event.eventType = (internal ? Event::INTERNAL : Event::EXTERNAL); + if (event.origin.length() == 0 && origin.length() > 0) + event.origin = origin; + if (event.origintype.length() == 0) + event.origintype = type; + + if (internal) { + _interpreter->enqueueInternal(event); + } else { + _interpreter->enqueueExternal(event); + } +} + +void InvokerImpl::eventToSCXML(Event& event, + const std::string& type, + const std::string& invokeId, + bool internal) { + if (event.invokeid.length() == 0) + event.invokeid = invokeId; + if (event.eventType == 0) + event.eventType = (internal ? Event::INTERNAL : Event::EXTERNAL); + if (event.origin.length() == 0 && invokeId.length() > 0) + event.origin = "#_" + invokeId; + if (event.origintype.length() == 0) + event.origintype = type; + + if (internal) { + _interpreter->enqueueInternal(event); + } else { + _interpreter->enqueueExternal(event); + } +} + +Factory* Factory::_instance = NULL; +std::string Factory::_defaultPluginPath; +} \ No newline at end of file diff --git a/src/uscxml/plugins/Factory.h b/src/uscxml/plugins/Factory.h new file mode 100644 index 0000000..0ce2af9 --- /dev/null +++ b/src/uscxml/plugins/Factory.h @@ -0,0 +1,102 @@ +/** + * @file + * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#ifndef FACTORY_H_5WKLGPRB +#define FACTORY_H_5WKLGPRB + +#include "uscxml/Common.h" + +#include "uscxml/plugins/ExecutableContent.h" +#include "uscxml/plugins/EventHandler.h" +#include "uscxml/plugins/IOProcessor.h" +#include "uscxml/plugins/Invoker.h" +#include "uscxml/plugins/DataModel.h" + +#include + +#ifdef BUILD_AS_PLUGINS +#include "Pluma/Pluma.hpp" +#endif + +#include +#include +#include +#include + +namespace uscxml { + +class InterpreterImpl; + +class USCXML_API Factory { +public: + Factory(Factory* parentFactory); + Factory(const std::string& pluginPath, Factory* parentFactory); + + void registerIOProcessor(IOProcessorImpl* ioProcessor); + void registerDataModel(DataModelImpl* dataModel); + void registerInvoker(InvokerImpl* invoker); + void registerExecutableContent(ExecutableContentImpl* executableContent); + + std::shared_ptr createDataModel(const std::string& type, DataModelCallbacks* callbacks); + std::shared_ptr createIOProcessor(const std::string& type, InterpreterImpl* interpreter); + std::shared_ptr createInvoker(const std::string& type, InterpreterImpl* interpreter); + std::shared_ptr createExecutableContent(const std::string& localName, const std::string& nameSpace, InterpreterImpl* interpreter); + + bool hasDataModel(const std::string& type); + bool hasIOProcessor(const std::string& type); + bool hasInvoker(const std::string& type); + bool hasExecutableContent(const std::string& localName, const std::string& nameSpace); + + std::map getIOProcessors(); + + void listComponents(); + + static Factory* getInstance(); + + static void setDefaultPluginPath(const std::string& path); + static std::string getDefaultPluginPath(); + +protected: + std::map _dataModels; + std::map _dataModelAliases; + std::map _ioProcessors; + std::map _ioProcessorAliases; + std::map _invokers; + std::map _invokerAliases; + std::map, ExecutableContentImpl*> _executableContent; + +#ifdef BUILD_AS_PLUGINS + pluma::Pluma pluma; +#endif + + void registerPlugins(); + + Factory(const std::string&); + ~Factory(); + Factory* _parentFactory; + std::string _pluginPath; + static Factory* _instance; + static std::string _defaultPluginPath; + +}; + + +} + +#endif /* end of include guard: FACTORY_H_5WKLGPRB */ diff --git a/src/uscxml/plugins/IOProcessor.h b/src/uscxml/plugins/IOProcessor.h index c770719..c7d90e5 100644 --- a/src/uscxml/plugins/IOProcessor.h +++ b/src/uscxml/plugins/IOProcessor.h @@ -22,6 +22,7 @@ #include "uscxml/Common.h" #include "uscxml/plugins/EventHandler.h" +#include "uscxml/messages/Event.h" namespace uscxml { @@ -29,38 +30,30 @@ class InterpreterImpl; class USCXML_API IOProcessorImpl : public EventHandlerImpl { public: - IOProcessorImpl() {}; - virtual ~IOProcessorImpl() {}; - virtual boost::shared_ptr create(InterpreterImpl* interpreter) = 0; + + virtual std::shared_ptr create(InterpreterImpl* interpreter) = 0; + virtual void eventFromSCXML(const std::string& target, const Event& event) = 0; + virtual bool isValidTarget(const std::string& target) = 0; + +protected: + void eventToSCXML(Event& event, const std::string& type, const std::string& origin, bool internal = false); + }; class USCXML_API IOProcessor : public EventHandler { public: - IOProcessor() : _impl() {} - IOProcessor(boost::shared_ptr const impl) : EventHandler(impl), _impl(impl) { } - IOProcessor(const IOProcessor& other) : EventHandler(other._impl), _impl(other._impl) { } - virtual ~IOProcessor() {}; + PIMPL_OPERATORS2(IOProcessor, EventHandler) - operator bool() const { - return !!_impl; + virtual void eventFromSCXML(const std::string& target, const Event& event) { + _impl->eventFromSCXML(target, event); } - bool operator< (const IOProcessor& other) const { - return _impl < other._impl; - } - bool operator==(const IOProcessor& other) const { - return _impl == other._impl; - } - bool operator!=(const IOProcessor& other) const { - return _impl != other._impl; - } - IOProcessor& operator= (const IOProcessor& other) { - _impl = other._impl; - EventHandler::_impl = _impl; - return *this; + + virtual bool isValidTarget(const std::string& target) { + return _impl->isValidTarget(target); } protected: - boost::shared_ptr _impl; + std::shared_ptr _impl; friend class InterpreterImpl; }; diff --git a/src/uscxml/plugins/Invoker.h b/src/uscxml/plugins/Invoker.h index b9b767b..c22b7e3 100644 --- a/src/uscxml/plugins/Invoker.h +++ b/src/uscxml/plugins/Invoker.h @@ -23,64 +23,63 @@ #include "uscxml/Common.h" #include "uscxml/plugins/EventHandler.h" -#include "uscxml/messages/InvokeRequest.h" +#include "uscxml/messages/Event.h" namespace uscxml { -class InterpreterImpl; +class Interpreter; class USCXML_API InvokerImpl : public EventHandlerImpl { public: + InvokerImpl() : _finalize(NULL) {}; virtual ~InvokerImpl() {} - virtual void invoke(const InvokeRequest& req) = 0; - virtual void uninvoke() {} + virtual std::list getNames() = 0; - virtual bool deleteOnUninvoke() { - return true; + virtual void invoke(const std::string& source, const Event& invokeEvent) = 0; + virtual void uninvoke() = 0; + + virtual void eventFromSCXML(const Event& event) = 0; + + virtual std::shared_ptr create(InterpreterImpl* interpreter) = 0; + virtual xercesc::DOMElement* getFinalize() { + return _finalize; + } + virtual void setFinalize(xercesc::DOMElement* finalize) { + _finalize = finalize; + } + virtual void setInvokeId(const std::string& invokeId) { + _invokeId = invokeId; } - virtual boost::shared_ptr create(InterpreterImpl* interpreter) = 0; +protected: + void eventToSCXML(Event& event, const std::string& type, const std::string& invokeId, bool internal = false); + + xercesc::DOMElement* _finalize; + std::string _invokeId; + }; class USCXML_API Invoker : public EventHandler { public: - Invoker() : _impl() {} - Invoker(boost::shared_ptr const impl) : EventHandler(impl), _impl(impl) { } - Invoker(const Invoker& other) : EventHandler(other._impl), _impl(other._impl) { } - virtual ~Invoker() {}; + PIMPL_OPERATORS2(Invoker, EventHandler); - operator bool() const { - return !!_impl; - } - bool operator< (const Invoker& other) const { - return _impl < other._impl; - } - bool operator==(const Invoker& other) const { - return _impl == other._impl; - } - bool operator!=(const Invoker& other) const { - return _impl != other._impl; - } - Invoker& operator= (const Invoker& other) { - _impl = other._impl; - EventHandler::_impl = _impl; - return *this; - } - - virtual void invoke(InvokeRequest& req) { - _impl->invoke(req); + virtual void invoke(const std::string& source, const Event& invokeEvent) { + _impl->invoke(source, invokeEvent); } virtual void uninvoke() { _impl->uninvoke(); } - virtual bool deleteOnUninvoke() { - return _impl->deleteOnUninvoke(); + virtual void eventFromSCXML(const Event& event) { + _impl->eventFromSCXML(event); } + virtual xercesc::DOMElement* getFinalize() { + return _impl->getFinalize(); + } protected: - boost::shared_ptr _impl; + std::shared_ptr _impl; }; diff --git a/src/uscxml/plugins/Plugins.cpp b/src/uscxml/plugins/Plugins.cpp deleted file mode 100644 index b2643f7..0000000 --- a/src/uscxml/plugins/Plugins.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "Plugins.h" - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_PROVIDER_SOURCE(DataModelImpl, 1, 1); -PLUMA_PROVIDER_SOURCE(IOProcessorImpl, 1, 1); -PLUMA_PROVIDER_SOURCE(InvokerImpl, 1, 1); -PLUMA_PROVIDER_SOURCE(ExecutableContentImpl, 1, 1); -#endif - -} \ No newline at end of file diff --git a/src/uscxml/plugins/Plugins.h b/src/uscxml/plugins/Plugins.h deleted file mode 100644 index 537d3fe..0000000 --- a/src/uscxml/plugins/Plugins.h +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef PLUGINS_H_M6G1NF1E -#define PLUGINS_H_M6G1NF1E - -#include -#include "uscxml/Factory.h" - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_PROVIDER_HEADER(IOProcessorImpl); -PLUMA_PROVIDER_HEADER(InvokerImpl); -PLUMA_PROVIDER_HEADER(ExecutableContentImpl); -PLUMA_PROVIDER_HEADER(DataModelImpl); -#endif - -} - -#endif /* end of include guard: PLUGINS_H_M6G1NF1E */ diff --git a/src/uscxml/plugins/Pluma/Config.hpp b/src/uscxml/plugins/Pluma/Config.hpp deleted file mode 100755 index efd98c9..0000000 --- a/src/uscxml/plugins/Pluma/Config.hpp +++ /dev/null @@ -1,141 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - - -//////////////////////////////////////////////////////////// -// -// Based on SFML configuration header -// SFML Config.hpp: -// http://www.sfml-dev.org/documentation/2.0/Config_8hpp-source.htm -// -// Acknowledgements to Simple and Fast Multimedia Library -// http://www.sfml-dev.org/ -// -//////////////////////////////////////////////////////////// - - -#ifndef PLUMA_CONFIG_HPP -#define PLUMA_CONFIG_HPP - - -//////////////////////////////////////////////////////////// -// Identify the operating system -//////////////////////////////////////////////////////////// -#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) - - // Windows - #define PLUMA_SYS_WINDOWS - #ifndef WIN32_LEAN_AND_MEAN - #define WIN32_LEAN_AND_MEAN - #endif - #ifndef NOMINMAX - #define NOMINMAX - #endif - -#elif defined(linux) || defined(__linux) - - // Linux - #define PLUMA_SYS_LINUX - -#elif defined(__APPLE__) || defined(MACOSX) || defined(macintosh) || defined(Macintosh) - - // MacOS - #define PLUMA_SYS_MACOS - -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) - - // FreeBSD - #define PLUMA_SYS_FREEBSD - -#else - - // Unsupported system - #error This operating system is not supported by this library - -#endif - - - -//////////////////////////////////////////////////////////// -// Define library file extension based on OS -//////////////////////////////////////////////////////////// -#ifdef PLUMA_SYS_WINDOWS - #define PLUMA_LIB_EXTENSION "dll" -#elif defined(PLUMA_SYS_MACOS) - #define PLUMA_LIB_EXTENSION "dylib" -#elif defined(PLUMA_SYS_LINUX) || defined(PLUMA_SYS_FREEBSD) - #define PLUMA_LIB_EXTENSION "so" -#else - // unknown library file type - #error Unknown library file extension for this operating system -#endif - - -//////////////////////////////////////////////////////////// -// Define portable import / export macros -//////////////////////////////////////////////////////////// -#if defined(PLUMA_SYS_WINDOWS) - - #ifndef PLUMA_STATIC - - // Windows platforms - #ifdef PLUMA_EXPORTS - - // From DLL side, we must export - #define PLUMA_API __declspec(dllexport) - - #else - - // From client application side, we must import - #define PLUMA_API __declspec(dllimport) - - #endif - - // For Visual C++ compilers, we also need to turn off this annoying C4251 warning. - // You can read lots ot different things about it, but the point is the code will - // just work fine, and so the simplest way to get rid of this warning is to disable it - #ifdef _MSC_VER - - #pragma warning(disable : 4251) - - #endif - - #else - - // No specific directive needed for static build - #define PLUMA_API - - #endif - -#else - - // Other platforms don't need to define anything - #define PLUMA_API - -#endif - - - - -#endif // PLUMA_CONFIG_HPP diff --git a/src/uscxml/plugins/Pluma/Connector.hpp b/src/uscxml/plugins/Pluma/Connector.hpp deleted file mode 100755 index 3c227e7..0000000 --- a/src/uscxml/plugins/Pluma/Connector.hpp +++ /dev/null @@ -1,86 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - -#ifndef PLUMA_CONNECTOR_HPP -#define PLUMA_CONNECTOR_HPP - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include -#include - - -///////////////////////////////////////////////////////////////// -// Define portable import/export macros for Plugin registration -///////////////////////////////////////////////////////////////// -#if defined(PLUMA_SYS_WINDOWS) - - #ifndef PLUMA_STATIC_PLUGIN - - // Windows platforms - #ifndef PLUGIN_IMPORTS - - // From DLL side, we must export - #ifdef __cplusplus - #define PLUMA_CONNECTOR extern "C" __declspec(dllexport) - #else - #define PLUMA_CONNECTOR __declspec(dllexport) - #endif - - #else - - // From client application side, we must import - #ifdef __cplusplus - #define PLUMA_CONNECTOR extern "C" __declspec(dllimport) - #else - #define PLUMA_CONNECTOR __declspec(dllimport) - #endif - - #endif - - #else - - // Only define the extern "C" for static build - #ifdef __cplusplus - #define PLUMA_CONNECTOR extern "C" - #else - #define PLUMA_CONNECTOR - #endif - - #endif - -#else - - // Only define the extern "C" for other platforms - #ifdef __cplusplus - #define PLUMA_CONNECTOR extern "C" - #else - #define PLUMA_CONNECTOR - #endif - -#endif - - -#endif // PLUMA_CONNECTOR_HPP diff --git a/src/uscxml/plugins/Pluma/DLibrary.cpp b/src/uscxml/plugins/Pluma/DLibrary.cpp deleted file mode 100644 index 0cbf309..0000000 --- a/src/uscxml/plugins/Pluma/DLibrary.cpp +++ /dev/null @@ -1,105 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include -#include -#include - - -namespace pluma { - -//////////////////////////////////////////////////////////// -DLibrary* DLibrary::load(const std::string& path) { - if ( path.empty() ) { - fprintf(stderr, "Failed to load library: Empty path\n"); - return NULL; - } - void* handle = NULL; - - // load library - OS dependent operation -#ifdef PLUMA_SYS_WINDOWS - handle = ::LoadLibraryA(path.c_str()); - if (!handle) { - fprintf(stderr, "Failed to load library \"%s\".\n", path.c_str()); - return NULL; - } -#else - handle = ::dlopen(path.c_str(), RTLD_NOW); - if (!handle) { - const char* errorString = ::dlerror(); - fprintf(stderr, "Failed to load library \"%s\".", path.c_str()); - if(errorString) fprintf(stderr, " OS returned error: \"%s\".", errorString); - fprintf(stderr, "\n"); - return NULL; - } -#endif - // return a DLibrary with the DLL handle - return new DLibrary(handle); -} - - -//////////////////////////////////////////////////////////// -DLibrary::~DLibrary() { - if (handle) { -#ifdef PLUMA_SYS_WINDOWS - ::FreeLibrary( (HMODULE)handle ); -#else - ::dlclose(handle); -#endif - } -} - - -//////////////////////////////////////////////////////////// -void* DLibrary::getSymbol(const std::string& symbol) { - if (!handle) { - fprintf(stderr, "Cannot inspect library symbols, library isn't loaded.\n"); - return NULL; - } - void* res; -#ifdef PLUMA_SYS_WINDOWS - res = (void*)(::GetProcAddress((HMODULE)handle, symbol.c_str())); -#else - res = (void*)(::dlsym(handle, symbol.c_str())); -#endif - if (!res) { - fprintf(stderr, "Library symbol \"%s\" not found.\n", symbol.c_str()); - return NULL; - } - return res; -} - - -//////////////////////////////////////////////////////////// -DLibrary::DLibrary(void* handle): - handle(handle) { - // Nothing to do -} - -} // namespace pluma - diff --git a/src/uscxml/plugins/Pluma/DLibrary.hpp b/src/uscxml/plugins/Pluma/DLibrary.hpp deleted file mode 100755 index 1bb9bac..0000000 --- a/src/uscxml/plugins/Pluma/DLibrary.hpp +++ /dev/null @@ -1,123 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - -#ifndef PLUMA_DYNAMIC_LIBRARY_HPP -#define PLUMA_DYNAMIC_LIBRARY_HPP - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include -#include - -// include OS dependent support for DLL -#ifdef PLUMA_SYS_WINDOWS - #include -#else - #include -#endif - - - -namespace pluma{ - -//////////////////////////////////////////////////////////// -/// \brief Manages a Dynamic Linking Library. -/// -//////////////////////////////////////////////////////////// -class DLibrary{ - - -public: - - //////////////////////////////////////////////////////////// - /// \brief Load a library. - /// - /// \param path Path to the library. - /// - /// \return Pointer to the loaded library, or NULL if failed. - /// - //////////////////////////////////////////////////////////// - static DLibrary* load(const std::string& path); - - //////////////////////////////////////////////////////////// - /// \brief Destructor. - /// - /// Close and free the opened library (if any). - /// - //////////////////////////////////////////////////////////// - ~DLibrary(); - - //////////////////////////////////////////////////////////// - /// \brief Get a symbol from the library. - /// - /// \param symbol Symbol that we're looking for. - /// - /// \return Pointer to what the symbol refers to, or NULL if - /// the symbol is not found. - /// - //////////////////////////////////////////////////////////// - void* getSymbol(const std::string& symbol); - - -private: - - //////////////////////////////////////////////////////////// - /// \brief Default constructor. - /// - /// Library instances cannot be created, use load instead. - /// - /// \see load - /// - //////////////////////////////////////////////////////////// - DLibrary(); - - //////////////////////////////////////////////////////////// - /// \brief Constructor via library handle. - /// - /// Used on load function. - /// - /// \see load - /// - //////////////////////////////////////////////////////////// - DLibrary(void* handle); - - - -//////////////////////////////////////////////////////////// -// Member data -//////////////////////////////////////////////////////////// - - -private: - - void* handle; ///< Library handle. - -}; - - -} // namespace pluma - - -#endif // PLUMA_DYNAMIC_LIBRARY_HPP diff --git a/src/uscxml/plugins/Pluma/Dir.cpp b/src/uscxml/plugins/Pluma/Dir.cpp deleted file mode 100644 index 73271ea..0000000 --- a/src/uscxml/plugins/Pluma/Dir.cpp +++ /dev/null @@ -1,103 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include -#include -#include -#include - - -namespace pluma { - -namespace dir { - - -//////////////////////////////////////////////////////////// -void listFiles(std::list& list, const std::string& folder, const std::string& extension, bool recursive) { - DIR* dir; - DIR* subDir; - struct dirent *ent; - // try to open top folder - dir = opendir(folder.c_str()); - if (dir == NULL) { - // could not open directory - fprintf(stderr, "Could not open \"%s\" directory.\n", folder.c_str()); - return; - } else { - // close, we'll process it next - closedir(dir); - } - // enqueue top folder - std::queue folders; - folders.push(folder); - - // run while has queued folders - while (!folders.empty()) { - std::string currFolder = folders.front(); - folders.pop(); - dir = opendir(currFolder.c_str()); - if (dir == NULL) continue; - // iterate through all the files and directories - while ((ent = readdir (dir)) != NULL) { - std::string name(ent->d_name); - // ignore "." and ".." directories - if ( name.compare(".") == 0 || name.compare("..") == 0) continue; - // add path to the file name - std::string path = currFolder; - path.append("/"); - path.append(name); - // check if it's a folder by trying to open it - subDir = opendir(path.c_str()); - if (subDir != NULL) { - // it's a folder: close, we can process it later - closedir(subDir); - if (recursive) folders.push(path); - } else { - // it's a file - if (extension.empty()) { - list.push_back(path); - } else { - // check file extension - size_t lastDot = name.find_last_of('.'); - std::string ext = name.substr(lastDot+1); - if (ext.compare(extension) == 0) { - // match - list.push_back(path); - } - } // endif (extension test) - } // endif (folder test) - } // endwhile (nextFile) - closedir(dir); - } // endwhile (queued folders) - -} // end listFiles - - -} // namespace dir - -} // namespace pluma diff --git a/src/uscxml/plugins/Pluma/Dir.hpp b/src/uscxml/plugins/Pluma/Dir.hpp deleted file mode 100755 index a94c477..0000000 --- a/src/uscxml/plugins/Pluma/Dir.hpp +++ /dev/null @@ -1,64 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - -#ifndef PLUMA_DIRECTORY_HPP -#define PLUMA_DIRECTORY_HPP - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include -#include -#include - - -namespace pluma{ - -namespace dir{ - -//////////////////////////////////////////////////////////// -/// \brief List files of a directory. -/// -/// \param list The output files list. -/// \param folder The folder where to search in -/// \param extension A file extension filter, -/// empty extension will match all files. -/// \param recursive If true it will list files in -/// sub directories as well. -/// -//////////////////////////////////////////////////////////// -void listFiles( - std::list& list, - const std::string& folder, - const std::string& extension = "", - bool recursive = false -); - - -} // namespace dir - -} // namespace pluma - - -#endif // PLUMA_DIRECTORY_HPP diff --git a/src/uscxml/plugins/Pluma/Host.cpp b/src/uscxml/plugins/Pluma/Host.cpp deleted file mode 100644 index 73979a6..0000000 --- a/src/uscxml/plugins/Pluma/Host.cpp +++ /dev/null @@ -1,179 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include -#include - - -namespace pluma { - -//////////////////////////////////////////////////////////// -Host::Host() { - // Nothing to do -} - - -//////////////////////////////////////////////////////////// -bool Host::add(Provider* provider) { - if (provider == NULL) { - fprintf(stderr, "Trying to add a null provider.\n"); - return false; - } - if (!validateProvider(provider)) { - delete provider; - return false; - } - addRequests[ provider->plumaGetType() ].push_back(provider); - return true; -} - - -//////////////////////////////////////////////////////////// -Host::~Host() { - clearProviders(); - // map frees itself -} - - -//////////////////////////////////////////////////////////// -void Host::clearProviders() { - ProvidersMap::iterator it; - for (it = knownTypes.begin() ; it != knownTypes.end() ; ++it) { - std::list& providers = it->second.providers; - std::list::iterator provIt; - for (provIt = providers.begin() ; provIt != providers.end() ; ++provIt) { - delete *provIt; - } - std::list().swap(providers); - } -} - - -//////////////////////////////////////////////////////////// -bool Host::knows(const std::string& type) const { - return knownTypes.find(type) != knownTypes.end(); -} - - -//////////////////////////////////////////////////////////// -unsigned int Host::getVersion(const std::string& type) const { - ProvidersMap::const_iterator it = knownTypes.find(type); - if (it != knownTypes.end()) - return it->second.version; - return 0; -} - - -//////////////////////////////////////////////////////////// -unsigned int Host::getLowestVersion(const std::string& type) const { - ProvidersMap::const_iterator it = knownTypes.find(type); - if (it != knownTypes.end()) - return it->second.lowestVersion; - return 0; -} - - -//////////////////////////////////////////////////////////// -void Host::registerType(const std::string& type, unsigned int version, unsigned int lowestVersion) { - if (!knows(type)) { - ProviderInfo pi; - pi.version = version; - pi.lowestVersion = lowestVersion; - knownTypes[type] = pi; - } -} - - -//////////////////////////////////////////////////////////// -const std::list* Host::getProviders(const std::string& type) const { - ProvidersMap::const_iterator it = knownTypes.find(type); - if (it != knownTypes.end()) - return &it->second.providers; - return NULL; -} - - -//////////////////////////////////////////////////////////// -bool Host::validateProvider(Provider* provider) const { - const std::string& type = provider->plumaGetType(); - if ( !knows(type) ) { - fprintf(stderr, "%s provider type isn't registered.\n", type.c_str()); - return false; - } - if (!provider->isCompatible(*this)) { - fprintf(stderr, "Incompatible %s provider version.\n", type.c_str()); - return false; - } - return true; -} - - -//////////////////////////////////////////////////////////// -bool Host::registerProvider(Provider* provider) { - if (!validateProvider(provider)) { - delete provider; - return false; - } - knownTypes[ provider->plumaGetType() ].providers.push_back(provider); - return true; -} - - -//////////////////////////////////////////////////////////// -void Host::cancelAddictions() { - TempProvidersMap::iterator it; - for( it = addRequests.begin() ; it != addRequests.end() ; ++it) { - std::list lst = it->second; - std::list::iterator providerIt; - for (providerIt = lst.begin() ; providerIt != lst.end() ; ++providerIt) { - delete *providerIt; - } - } - // clear map - TempProvidersMap().swap(addRequests); -} - - -//////////////////////////////////////////////////////////// -bool Host::confirmAddictions() { - if (addRequests.empty()) return false; - TempProvidersMap::iterator it; - for( it = addRequests.begin() ; it != addRequests.end() ; ++it) { - std::list lst = it->second; - std::list::iterator providerIt; - for (providerIt = lst.begin() ; providerIt != lst.end() ; ++providerIt) { - knownTypes[it->first].providers.push_back(*providerIt); - } - } - // clear map - TempProvidersMap().swap(addRequests); - return true; -} - - -} //namespace pluma diff --git a/src/uscxml/plugins/Pluma/Host.hpp b/src/uscxml/plugins/Pluma/Host.hpp deleted file mode 100755 index cf049f5..0000000 --- a/src/uscxml/plugins/Pluma/Host.hpp +++ /dev/null @@ -1,212 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - -#ifndef PLUMA_HOST_HPP -#define PLUMA_HOST_HPP - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include -#include - -#include -#include -#include - -namespace pluma{ - -//////////////////////////////////////////////////////////// -/// \brief Manages providers. -/// -//////////////////////////////////////////////////////////// -class PLUMA_API Host{ -friend class PluginManager; -friend class Provider; - - -public: - - //////////////////////////////////////////////////////////// - /// \brief Add provider. - /// - /// Provider type and version are checked. Only known and - /// valid provider types are accepted. - /// - /// \param provider Provider to be added. - /// - /// \return True if the provider is accepted. - /// - //////////////////////////////////////////////////////////// - bool add(Provider* provider); - - -private: - - //////////////////////////////////////////////////////////// - /// \brief Default constructor. - /// - /// New Host instances are not publicly allowed. - /// - //////////////////////////////////////////////////////////// - Host(); - - //////////////////////////////////////////////////////////// - /// \brief Destructor. - /// - /// Clears all hosted providers - /// - //////////////////////////////////////////////////////////// - ~Host(); - - //////////////////////////////////////////////////////////// - /// \brief Ckeck if a provider type is registered. - /// - /// \param type Provider type id. - /// - /// \return True if the type is registered - /// - //////////////////////////////////////////////////////////// - bool knows(const std::string& type) const; - - //////////////////////////////////////////////////////////// - /// \brief Get version of a type of providers. - /// - /// \param type Provider type. - /// - /// \return The version of the provider type. - /// - //////////////////////////////////////////////////////////// - unsigned int getVersion(const std::string& type) const; - - //////////////////////////////////////////////////////////// - /// \brief Get lowest compatible version of a type of providers. - /// - /// \param type Provider type. - /// - /// \return The lowest compatible version of the provider type. - /// - //////////////////////////////////////////////////////////// - unsigned int getLowestVersion(const std::string& type) const; - - //////////////////////////////////////////////////////////// - /// \brief Register a type of providers. - /// - /// \param type Provider type. - /// \param version Current version of that provider type. - /// \param lowestVersion Lowest compatible version of that provider type. - /// - //////////////////////////////////////////////////////////// - void registerType(const std::string& type, unsigned int version, unsigned int lowestVersion); - - //////////////////////////////////////////////////////////// - /// \brief Get providers of a certain type. - /// - /// \param type Provider type. - /// - /// \return Pointer to the list of providers of that \a type, - /// or NULL if \a type is not registered. - /// - //////////////////////////////////////////////////////////// - const std::list* getProviders(const std::string& type) const; - - //////////////////////////////////////////////////////////// - /// \brief Clears all hosted providers. - /// - //////////////////////////////////////////////////////////// - void clearProviders(); - - //////////////////////////////////////////////////////////// - /// \brief Validate provider type and version. - /// - /// \return True if the provider is acceptable. - /// - //////////////////////////////////////////////////////////// - bool validateProvider(Provider* provider) const; - - //////////////////////////////////////////////////////////// - /// \brief Clearly add a provider. - /// - /// Provider type and version are checked. Only known and - /// valid provider types are accepted. - /// If acepted, provider is directly stored. - /// - /// \param provider Provider to be added. - /// - /// \return True if the provider is accepted. - /// - //////////////////////////////////////////////////////////// - bool registerProvider(Provider* provider); - - //////////////////////////////////////////////////////////// - /// \brief Previous add calls are canceled. - /// - /// Added providers are not stored. - /// - /// \see add - /// - //////////////////////////////////////////////////////////// - void cancelAddictions(); - - //////////////////////////////////////////////////////////// - /// \brief Previous add calls are confirmed. - /// - /// Added providers are finally stored. - /// - /// \return True if something was stored. - /// - /// \see add - /// - //////////////////////////////////////////////////////////// - bool confirmAddictions(); - - - -//////////////////////////////////////////////////////////// -// Member data -//////////////////////////////////////////////////////////// - -private: - - //////////////////////////////////////////////////////////// - /// \brief Structure with information about a provider type. - /// - //////////////////////////////////////////////////////////// - struct ProviderInfo{ - unsigned int version; - unsigned int lowestVersion; - std::list providers; - }; - - typedef std::map ProvidersMap; - typedef std::map > TempProvidersMap; - - ProvidersMap knownTypes; ///< Map of registered types. - TempProvidersMap addRequests; ///< Temporarily added providers - -}; - -} // namespace pluma - -#endif // PLUMA_HOST_HPP diff --git a/src/uscxml/plugins/Pluma/PluginManager.cpp b/src/uscxml/plugins/Pluma/PluginManager.cpp deleted file mode 100644 index 22e0438..0000000 --- a/src/uscxml/plugins/Pluma/PluginManager.cpp +++ /dev/null @@ -1,201 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include -#include -#include -#include - -namespace pluma { - -//////////////////////////////////////////////////////////// -PluginManager::PluginManager() { - // Nothing to do -} - - -//////////////////////////////////////////////////////////// -PluginManager::~PluginManager() { - unloadAll(); -} - - -//////////////////////////////////////////////////////////// -bool PluginManager::load(const std::string& path) { - std::string plugName = getPluginName(path); - std::string realPath = resolvePathExtension(path); - DLibrary* lib = DLibrary::load(realPath); - if (!lib) return false; - - fnRegisterPlugin* registerFunction; - registerFunction = reinterpret_cast(lib->getSymbol("pluginConnect")); - - if(!registerFunction) { - fprintf(stderr, "Failed to initialize plugin \"%s\": pluginConnect function not found\n", plugName.c_str()); - delete lib; - return false; - } - // try to initialize plugin: - if (!registerFunction(host)) { - // plugin decided to fail - fprintf(stderr, "Self registry failed on plugin \"%s\".\n", plugName.c_str()); - host.cancelAddictions(); - delete lib; - return false; - } - // Store the library if addictions are confirmed - if (host.confirmAddictions()) - libraries[plugName] = lib; - else { - // otherwise nothing was registered - fprintf(stderr, "Nothing registered by plugin \"%s\".\n", plugName.c_str()); - delete lib; - return false; - } - return true; -} - - -//////////////////////////////////////////////////////////// -bool PluginManager::load(const std::string& folder, const std::string& pluginName) { - if (folder.empty()) - return load(pluginName); - else if (folder[folder.size()-1] == '/' || folder[folder.size()-1] == '\\') - return load(folder + pluginName); - return load(folder + '/' + pluginName); -} - - -//////////////////////////////////////////////////////////// -int PluginManager::loadFromFolder(const std::string& folder, bool recursive) { - std::list files; - dir::listFiles(files, folder, PLUMA_LIB_EXTENSION, recursive); - // try to load every library - int res = 0; - std::list::const_iterator it; - for (it = files.begin() ; it != files.end() ; ++it) { - if ( load(*it) ) ++res; - } - return res; -} - - -//////////////////////////////////////////////////////////// -bool PluginManager::unload(const std::string& pluginName) { - std::string plugName = getPluginName(pluginName); - LibMap::iterator it = libraries.find(plugName); - if( it != libraries.end() ) { - delete it->second; - libraries.erase(it); - return true; - } - return false; -} - - -//////////////////////////////////////////////////////////// -void PluginManager::unloadAll() { - - host.clearProviders(); - LibMap::iterator it; - for (it = libraries.begin() ; it != libraries.end() ; ++it) { - delete it->second; - } - libraries.clear(); -} - - -//////////////////////////////////////////////////////////// -std::string PluginManager::getPluginName(const std::string& path) { - size_t lastDash = path.find_last_of("/\\"); - size_t lastDot = path.find_last_of('.'); - if (lastDash == std::string::npos) lastDash = 0; - else ++lastDash; - if (lastDot < lastDash || lastDot == std::string::npos) { - // path without extension - lastDot = path.length(); - } - return path.substr(lastDash, lastDot-lastDash); -} - - -//////////////////////////////////////////////////////////// -std::string PluginManager::resolvePathExtension(const std::string& path) { - size_t lastDash = path.find_last_of("/\\"); - size_t lastDot = path.find_last_of('.'); - if (lastDash == std::string::npos) lastDash = 0; - else ++lastDash; - if (lastDot < lastDash || lastDot == std::string::npos) { - // path without extension, add it - return path + "." + PLUMA_LIB_EXTENSION; - } - return path; -} - - -//////////////////////////////////////////////////////////// -void PluginManager::registerType(const std::string& type, unsigned int version, unsigned int lowestVersion) { - host.registerType(type, version, lowestVersion); -} - - -//////////////////////////////////////////////////////////// -bool PluginManager::addProvider(Provider* provider) { - if (provider == NULL) { - fprintf(stderr, "Trying to add null provider\n"); - return false; - } - return host.registerProvider(provider); -} - - -//////////////////////////////////////////////////////////// -void PluginManager::getLoadedPlugins(std::vector& pluginNames) const { - pluginNames.reserve(pluginNames.size()+libraries.size()); - LibMap::const_iterator it; - for(it = libraries.begin() ; it != libraries.end() ; ++it) { - pluginNames.push_back(&(it->first)); - } -} - - -//////////////////////////////////////////////////////////// -bool PluginManager::isLoaded(const std::string& pluginName) const { - return libraries.find(getPluginName(pluginName)) != libraries.end(); -} - - -//////////////////////////////////////////////////////////// -const std::list* PluginManager::getProviders(const std::string& type) const { - return host.getProviders(type); -} - - - -} // namespace pluma - diff --git a/src/uscxml/plugins/Pluma/PluginManager.hpp b/src/uscxml/plugins/Pluma/PluginManager.hpp deleted file mode 100755 index e5ddf06..0000000 --- a/src/uscxml/plugins/Pluma/PluginManager.hpp +++ /dev/null @@ -1,245 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - -#ifndef PLUMA_PLUGIN_MANAGER_HPP -#define PLUMA_PLUGIN_MANAGER_HPP - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include -#include - -#include -#include - -namespace pluma{ -class DLibrary; - -//////////////////////////////////////////////////////////// -/// \brief Manages loaded plugins. -/// -//////////////////////////////////////////////////////////// -class PLUMA_API PluginManager{ - - -public: - - //////////////////////////////////////////////////////////// - /// \brief Destructor. - /// - //////////////////////////////////////////////////////////// - ~PluginManager(); - - //////////////////////////////////////////////////////////// - /// \brief Load a plugin given it's path - /// - /// \param path Path for the plugin, including plugin name. File extension - /// may be included, but is discouraged for better cross platform code. - /// If file extension isn't present on the path, Pluma will deduce it - /// from the operating system. - /// - /// \return True if the plugin is successfully loaded. - /// - /// \see load(const std::string&, const std::string&) - /// \see loadFromFolder - /// \see unload - /// \see unloadAll - /// - //////////////////////////////////////////////////////////// - bool load(const std::string& path); - - - //////////////////////////////////////////////////////////// - /// \brief Load a plugin from a given folder - /// - /// \param folder The folder path. - /// \param pluginName Name of the plugin. File extension - /// may be included, but is discouraged for better cross platform code. - /// If file extension is omitted, Pluma will deduce it - /// from the operating system. - /// - /// \return True if the plugin is successfully loaded. - /// - /// \see load(const std::string&) - /// \see loadFromFolder - /// \see unload - /// \see unloadAll - /// - //////////////////////////////////////////////////////////// - bool load(const std::string& folder, const std::string& pluginName); - - //////////////////////////////////////////////////////////// - /// \brief Load all plugins from a given folder - /// - /// \param folder Path for the folder where the plug-ins are. - /// \param recursive If true it will search on sub-folders as well - /// - /// \return Number of successfully loaded plug-ins. - /// - /// \see load(const std::string&, const std::string&) - /// \see load(const std::string&) - /// \see unload - /// \see unloadAll - /// - //////////////////////////////////////////////////////////// - int loadFromFolder(const std::string& folder, bool recursive = false); - - //////////////////////////////////////////////////////////// - /// \brief Unload a plugin. - /// - /// \param pluginName Name or path of the plugin. - /// - /// \return True if the plugin is successfully unloaded, - /// false if no such plugin exists on the manager. - /// - /// \see load(const std::string&, const std::string&) - /// \see load(const std::string&) - /// \see loadFromFolder - /// \see unloadAll - /// - //////////////////////////////////////////////////////////// - bool unload(const std::string& pluginName); - - //////////////////////////////////////////////////////////// - /// \brief Unload all loaded plugins. - /// - /// \see load(const std::string&, const std::string&) - /// \see load(const std::string&) - /// \see loadFromFolder - /// \see unload - /// - //////////////////////////////////////////////////////////// - void unloadAll(); - - //////////////////////////////////////////////////////////// - /// \brief Directly add a new provider. - /// - /// \param provider Provider. - /// - //////////////////////////////////////////////////////////// - bool addProvider(Provider* provider); - - //////////////////////////////////////////////////////////// - /// \brief Get the name of all loaded plugins. - /// - /// \param pluginNames A vector to fill with the plugins names. - /// - //////////////////////////////////////////////////////////// - void getLoadedPlugins(std::vector& pluginNames) const; - - //////////////////////////////////////////////////////////// - /// \brief Check if a plug-in is loaded. - /// - /// \param pluginName the plug-in tname o check. - /// - //////////////////////////////////////////////////////////// - bool isLoaded(const std::string& pluginName) const; - - -protected: - - //////////////////////////////////////////////////////////// - /// \brief Default constructor. - /// - /// PluginManager cannot be publicly instantiated. - /// - //////////////////////////////////////////////////////////// - PluginManager(); - - //////////////////////////////////////////////////////////// - /// \brief Register a provider type - /// - /// \param type Provider type. - /// \param version Current version of that provider type. - /// \param lowestVersion Lowest compatible version of that provider type. - /// - /// \see Host::registerType - /// - //////////////////////////////////////////////////////////// - void registerType(const std::string& type, unsigned int version, unsigned int lowestVersion); - - //////////////////////////////////////////////////////////// - /// \brief Get providers of a certain type. - /// - /// \param type Provider type. - /// - /// \return Pointer to the list of providers of that \a type, - /// or NULL if \a type is not registered. - /// - /// \see Host::getProviders - /// - //////////////////////////////////////////////////////////// - const std::list* getProviders(const std::string& type) const; - - -private: - - //////////////////////////////////////////////////////////// - /// \brief Get the plugin name (without extension) from its path - /// - /// \param path Plugin path. - /// - /// \return Name of the plugin. - /// - /// \see resolvePathExtension - /// \see load(const std::string&, const std::string&) - /// \see load(const std::string&) - /// \see unload - /// - //////////////////////////////////////////////////////////// - static std::string getPluginName(const std::string& path); - - //////////////////////////////////////////////////////////// - /// \brief If the plugin path omits it's extension, this method returns - /// the path plus the OS specific dll extension. - /// Return a copy of the path otherwise. - /// - /// \param path Plugin path. - /// - /// \return Path with extension. - /// - /// \see getPluginName - /// \see load(const std::string&, const std::string&) - /// \see load(const std::string&) - /// \see unload - /// - //////////////////////////////////////////////////////////// - static std::string resolvePathExtension(const std::string& path); - - -private: - - /// Signature for the plugin's registration function - typedef bool fnRegisterPlugin(Host&); - typedef std::map LibMap; - - LibMap libraries; ///< Map containing the loaded libraries - Host host; ///< Host app proxy, holding all providers - -}; - -} // namespace pluma - -#endif // PLUMA_PLUGIN_MANAGER_HPP diff --git a/src/uscxml/plugins/Pluma/Pluma.hpp b/src/uscxml/plugins/Pluma/Pluma.hpp deleted file mode 100755 index a9d614e..0000000 --- a/src/uscxml/plugins/Pluma/Pluma.hpp +++ /dev/null @@ -1,171 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - -#ifndef PLUMA_PLUMA_HPP -#define PLUMA_PLUMA_HPP - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include -#include -#include - -//////////////////////////////////////////////////////////// -// Andy macro to convert parameter to string -//////////////////////////////////////////////////////////// -#define PLUMA_2STRING(X) #X - -//////////////////////////////////////////////////////////// -// Macro that helps host applications defining -// their provider classes -//////////////////////////////////////////////////////////// -#define PLUMA_PROVIDER_HEADER(TYPE)\ -PLUMA_PROVIDER_HEADER_BEGIN(TYPE)\ -virtual TYPE* create() const = 0;\ -PLUMA_PROVIDER_HEADER_END - -//////////////////////////////////////////////////////////// -// Macro that generate first part of the provider definition -//////////////////////////////////////////////////////////// -#define PLUMA_PROVIDER_HEADER_BEGIN(TYPE)\ -class TYPE##Provider: public pluma::Provider{\ -private:\ - friend class pluma::Pluma;\ - static const unsigned int PLUMA_INTERFACE_VERSION;\ - static const unsigned int PLUMA_INTERFACE_LOWEST_VERSION;\ - static const std::string PLUMA_PROVIDER_TYPE;\ - std::string plumaGetType() const{ return PLUMA_PROVIDER_TYPE; }\ -public:\ - unsigned int getVersion() const{ return PLUMA_INTERFACE_VERSION; } - -//////////////////////////////////////////////////////////// -// Macro that generate last part of the provider definition -//////////////////////////////////////////////////////////// -#define PLUMA_PROVIDER_HEADER_END }; - -//////////////////////////////////////////////////////////// -// Macro that generate the provider declaration -//////////////////////////////////////////////////////////// -#define PLUMA_PROVIDER_SOURCE(TYPE, Version, LowestVersion)\ -const std::string TYPE##Provider::PLUMA_PROVIDER_TYPE = PLUMA_2STRING( TYPE );\ -const unsigned int TYPE##Provider::PLUMA_INTERFACE_VERSION = Version;\ -const unsigned int TYPE##Provider::PLUMA_INTERFACE_LOWEST_VERSION = LowestVersion; - - -//////////////////////////////////////////////////////////// -// Macro that helps plugins generating their provider implementations -// PRE: SPECIALIZED_TYPE must inherit from BASE_TYPE -//////////////////////////////////////////////////////////// -#define PLUMA_INHERIT_PROVIDER(SPECIALIZED_TYPE, BASE_TYPE)\ -class SPECIALIZED_TYPE##Provider: public BASE_TYPE##Provider{\ -public:\ - BASE_TYPE * create() const{ return new SPECIALIZED_TYPE (); }\ -}; - - -namespace pluma{ - -//////////////////////////////////////////////////////////// -/// \brief Pluma plugins management -/// -//////////////////////////////////////////////////////////// -class Pluma: public PluginManager{ - -public: - //////////////////////////////////////////////////////////// - /// \brief Default Constructor - /// - //////////////////////////////////////////////////////////// - Pluma(); - - //////////////////////////////////////////////////////////// - /// \brief Tell Pluma to accept a certain type of providers - /// - /// A Pluma object is able to accept multiple types of providers. - /// When a plugin is loaded, it tries to register it's providers - /// implementations. Those are only accepted by the host - /// application if it's accepting providers of that kind. - /// - /// \tparam ProviderType type of provider. - /// - //////////////////////////////////////////////////////////// - template - void acceptProviderType(); - - //////////////////////////////////////////////////////////// - /// \brief Get the stored providers of a certain type. - /// - /// Providers are added at the end of the \a providers vector. - /// - /// \tparam ProviderType type of provider to be returned. - /// \param[out] providers Vector to fill with the existing - /// providers. - /// - //////////////////////////////////////////////////////////// - template - void getProviders(std::vector& providers); -}; - -#include - -} - - -#endif // PLUMA_PLUMA_HPP - - -//////////////////////////////////////////////////////////// -/// \class pluma::Pluma -/// -/// Pluma is the main class of Pluma library. Allows hosting -/// applications to load/unload dlls in runtime (plugins), and -/// to get providers of shared interface objects. -/// -/// Example: -/// \code -/// pluma::Pluma pluma; -/// // Tell it to accept providers of the type DeviceProvider -/// pluma.acceptProviderType(); -/// // Load some dll -/// pluma.load("plugins/standard_devices"); -/// // Get device providers into a vector -/// std::vector providers; -/// pluma.getProviders(providers); -/// // create a Device from the first provider -/// if (!providers.empty()){ -/// Device* myDevice = providers.first()->create(); -/// // do something with myDevice -/// std::cout << device->getDescription() << std::endl; -/// // (...) -/// delete myDevice; -/// } -/// \endcode -/// -/// It is also possible to add local providers, providers that -/// are defined directly on the host application. That can -/// be useful to provide and use default implementations of certain -/// interfaces, along with plugin implementations. -/// -//////////////////////////////////////////////////////////// diff --git a/src/uscxml/plugins/Pluma/Pluma.inl b/src/uscxml/plugins/Pluma/Pluma.inl deleted file mode 100755 index c3b6ce7..0000000 --- a/src/uscxml/plugins/Pluma/Pluma.inl +++ /dev/null @@ -1,52 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - - -//////////////////////////////////////////////////////////// -inline Pluma::Pluma(){ - // Nothing to do -} - - -//////////////////////////////////////////////////////////// -template -void Pluma::acceptProviderType(){ - PluginManager::registerType( - ProviderType::PLUMA_PROVIDER_TYPE, - ProviderType::PLUMA_INTERFACE_VERSION, - ProviderType::PLUMA_INTERFACE_LOWEST_VERSION - ); -} - - -//////////////////////////////////////////////////////////// -template -void Pluma::getProviders(std::vector& providers){ - const std::list* lst = PluginManager::getProviders(ProviderType::PLUMA_PROVIDER_TYPE); - if (!lst) return; - providers.reserve(providers.size() + lst->size()); - std::list::const_iterator it; - for (it = lst->begin() ; it != lst->end() ; ++it) - providers.push_back(static_cast(*it)); -} diff --git a/src/uscxml/plugins/Pluma/Provider.cpp b/src/uscxml/plugins/Pluma/Provider.cpp deleted file mode 100644 index 7691eb1..0000000 --- a/src/uscxml/plugins/Pluma/Provider.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include -#include - - -namespace pluma { - -//////////////////////////////////////////////////////////// -Provider::~Provider() { - // Nothing to do -} - - -//////////////////////////////////////////////////////////// -bool Provider::isCompatible(const Host& host) const { - // check compatibility with host - const std::string& type = this->plumaGetType(); - if (!host.knows(type)) return false; - unsigned int lowest = host.getLowestVersion(type); - unsigned int current = host.getVersion(type); - unsigned int myVersion = this->getVersion(); - return lowest <= myVersion && myVersion <= current; -} - -} // namespace pluma diff --git a/src/uscxml/plugins/Pluma/Provider.hpp b/src/uscxml/plugins/Pluma/Provider.hpp deleted file mode 100755 index d01e7f4..0000000 --- a/src/uscxml/plugins/Pluma/Provider.hpp +++ /dev/null @@ -1,204 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// Pluma - Plug-in Management Framework -// Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// -//////////////////////////////////////////////////////////// - -#ifndef PLUMA_PROVIDER_HPP -#define PLUMA_PROVIDER_HPP - -//////////////////////////////////////////////////////////// -// Headers -//////////////////////////////////////////////////////////// -#include -#include - - -namespace pluma{ -class Host; - -//////////////////////////////////////////////////////////// -/// \brief Interface to provide applications with objects from plugins. -/// -//////////////////////////////////////////////////////////// -class PLUMA_API Provider{ -friend class Host; - - -public: - - //////////////////////////////////////////////////////////// - /// \brief Destructor. - /// - //////////////////////////////////////////////////////////// - virtual ~Provider(); - - //////////////////////////////////////////////////////////// - /// \brief Get provider version. - /// - /// \return Version number. - /// - //////////////////////////////////////////////////////////// - virtual unsigned int getVersion() const = 0; - - //////////////////////////////////////////////////////////// - /// \brief Check compatibility with host. - /// - /// The same provider may be compiled with different versions - /// on host side and on plugins side. This function checks if - /// a plugin provider is compatible with the current version of - /// the same provider type on the host side. - /// - /// \param host Host, proxy of host application. - /// - /// \return True if it's compatible with \a host. - /// - //////////////////////////////////////////////////////////// - bool isCompatible(const Host& host) const; - - -private: - - //////////////////////////////////////////////////////////// - /// \brief Get provider type. - /// - /// Each provider defined on the host application is identified by - /// a unique type. Those types are automatically managed internally by - /// pluma. - /// - /// \return Provider type id. - /// - //////////////////////////////////////////////////////////// - virtual std::string plumaGetType() const = 0; - -}; - -} // namespace pluma - - -#endif // PLUMA_PROVIDER_HPP - - -//////////////////////////////////////////////////////////// -/// \class pluma::Provider -/// The plugin specific implementations are unknown at the host side, -/// only their shared interfaces are known. Then, host app needs a generic -/// way of create interface objects. That's what provider classes are for. -/// It is the factory design pattern -/// (http://www.oodesign.com/factory-pattern.html) -/// -/// Shared interfaces define their provider types (by inheriting from -/// pluma::Provider). Hosts then use those tipes to get objects from the -/// plugins. -/// Plugins derive the shared interface providers so that they can provide -/// host with specific implementations of the shared interface. -/// Those specific providers are given to the host through a connect function. -/// -/// -/// Example: A host app uses objects of type Device. A certain plugin -/// defines a Keyboard, witch is a Device. -/// The Host will use DeviceProviders to create objects of type Device. -/// The plugin will provide host specifically with a KeyboardProvider. -/// Other plugins may provide host with other derived DeviceProvider types. -/// -/// Device hpp (shared): -/// \code -/// #include -/// class Device{ -/// public: -/// virtual std::string getDescription() const = 0; -/// }; -/// // create DevicedProvider class -/// PLUMA_PROVIDER_HEADER(Device); -/// \endcode -/// -/// Device cpp (shared): -/// \code -/// #include "Device.hpp" -/// generate DevicedProvider with version 6, and compatible with at least v.3 -/// PLUMA_PROVIDER_SOURCE(Device, 6, 3); -/// \endcode -/// -/// -///
-/// Keyboard code on the plugin side: -/// \code -/// #include -/// #include "Device.hpp" -/// -/// class Keyboard: public Device{ -/// public: -/// std::string getDescription() const{ -/// return "keyboard"; -/// } -/// }; -/// -/// // create KeyboardProvider, it implements DeviceProvider -/// PLUMA_INHERIT_PROVIDER(Keyboard, Device); -/// \endcode -/// -/// plugin connector: -/// \code -/// #include -/// #include "Keyboard.hpp" -/// -/// PLUMA_CONNECTOR -/// bool pluginConnect(pluma::Host& host){ -/// // add a keyboard provider to host -/// host.add( new KeyboardProvider() ); -/// return true; -/// } -/// \endcode -/// -/// -/// Host application code: -/// \code -/// #include -/// -/// #include "Device.hpp" -/// #include -/// #include -/// -/// int main(){ -/// -/// pluma::Pluma plugins; -/// // Tell plugins manager to accept providers of the type DeviceProvider -/// plugins.acceptProviderType(); -/// // Load library "standard_devices" from folder "plugins" -/// plugins.load("plugins", "standard_devices"); -/// -/// // Get device providers into a vector -/// std::vector providers; -/// plugins.getProviders(providers); -/// -/// // create a Device from the first provider -/// if (!providers.empty()){ -/// Device* myDevice = providers.first()->create(); -/// // do something with myDevice -/// std::cout << device->getDescription() << std::endl; -/// // and delete it in the end -/// delete myDevice; -/// } -/// return 0; -/// } -/// \endcode -/// -//////////////////////////////////////////////////////////// diff --git a/src/uscxml/plugins/Pluma/uce-dirent.h b/src/uscxml/plugins/Pluma/uce-dirent.h deleted file mode 100644 index bafd4e4..0000000 --- a/src/uscxml/plugins/Pluma/uce-dirent.h +++ /dev/null @@ -1,671 +0,0 @@ -/* - * uce-dirent.h - operating system independent dirent implementation - * - * Copyright (C) 1998-2002 Toni Ronkko - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * ``Software''), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * - * May 28 1998, Toni Ronkko - * - * $Id: uce-dirent.h,v 1.7 2002/05/13 10:48:35 tr Exp $ - * - * $Log: uce-dirent.h,v $ - * Revision 1.7 2002/05/13 10:48:35 tr - * embedded some source code directly to the header so that no source - * modules need to be included in the MS Visual C project using the - * interface, removed all the dependencies to other headers of the `uce' - * library so that the header can be made public - * - * Revision 1.6 2002/04/12 16:22:04 tr - * Unified Compiling Environment (UCE) replaced `std' library - * - * Revision 1.5 2001/07/20 16:33:40 tr - * moved to `std' library and re-named defines accordingly - * - * Revision 1.4 2001/07/10 16:47:18 tronkko - * revised comments - * - * Revision 1.3 2001/01/11 13:16:43 tr - * using ``uce-machine.h'' for finding out defines such as `FREEBSD' - * - * Revision 1.2 2000/10/08 16:00:41 tr - * copy of FreeBSD man page - * - * Revision 1.1 2000/07/10 05:53:16 tr - * Initial revision - * - * Revision 1.2 1998/07/19 18:29:14 tr - * Added error reporting capabilities and some asserts. - * - * Revision 1.1 1998/07/04 16:27:51 tr - * Initial revision - * - * - * MSVC 1.0 scans automatic dependencies incorrectly when your project - * contains this very header. The problem is that MSVC cannot handle - * include directives inside #if..#endif block those are never entered. - * Since this header ought to compile in many different operating systems, - * there had to be several conditional blocks that are compiled only in - * operating systems for what they were designed for. MSVC 1.0 cannot - * handle inclusion of sys/dir.h in a part that is compiled only in Apollo - * operating system. To fix the problem you need to insert DIR.H into - * SYSINCL.DAT located in MSVC\BIN directory and restart visual C++. - * Consult manuals for more informaton about the problem. - * - * Since many UNIX systems have dirent.h we assume to have one also. - * However, if your UNIX system does not have dirent.h you can download one - * for example at: http://ftp.uni-mannheim.de/ftp/GNU/dirent/dirent.tar.gz. - * You can also see if you have one of dirent.h, direct.h, dir.h, ndir.h, - * sys/dir.h and sys/ndir.h somewhere. Try defining HAVE_DIRENT_H, - * HAVE_DIRECT_H, HAVE_DIR_H, HAVE_NDIR_H, HAVE_SYS_DIR_H and - * HAVE_SYS_NDIR_H according to the files found. - */ -#ifndef DIRENT_H -#define DIRENT_H -#define DIRENT_H_INCLUDED - -/* find out platform */ -#if defined(MSDOS) /* MS-DOS */ -#elif defined(__MSDOS__) /* Turbo C/Borland */ -# define MSDOS -#elif defined(__DOS__) /* Watcom */ -# define MSDOS -#endif - -#if defined(WIN32) /* MS-Windows */ -#elif defined(__NT__) /* Watcom */ -# define WIN32 -#elif defined(_WIN32) /* Microsoft */ -# define WIN32 -#elif defined(__WIN32__) /* Borland */ -# define WIN32 -#endif - -/* - * See what kind of dirent interface we have unless autoconf has already - * determinated that. - */ -#if !defined(HAVE_DIRENT_H) && !defined(HAVE_DIRECT_H) && !defined(HAVE_SYS_DIR_H) && !defined(HAVE_NDIR_H) && !defined(HAVE_SYS_NDIR_H) && !defined(HAVE_DIR_H) -# if defined(_MSC_VER) /* Microsoft C/C++ */ -/* no dirent.h */ -# elif defined(__BORLANDC__) /* Borland C/C++ */ -# define HAVE_DIRENT_H -# define VOID_CLOSEDIR -# elif defined(__TURBOC__) /* Borland Turbo C */ -/* no dirent.h */ -# elif defined(__WATCOMC__) /* Watcom C/C++ */ -# define HAVE_DIRECT_H -# elif defined(__apollo) /* Apollo */ -# define HAVE_SYS_DIR_H -# elif defined(__hpux) /* HP-UX */ -# define HAVE_DIRENT_H -# elif defined(__alpha) || defined(__alpha__) /* Alpha OSF1 */ -# error "not implemented" -# elif defined(__sgi) /* Silicon Graphics */ -# define HAVE_DIRENT_H -# elif defined(sun) || defined(_sun) /* Sun Solaris */ -# define HAVE_DIRENT_H -# elif defined(__FreeBSD__) /* FreeBSD */ -# define HAVE_DIRENT_H -# elif defined(__linux__) /* Linux */ -# define HAVE_DIRENT_H -# elif defined(__GNUC__) /* GNU C/C++ */ -# define HAVE_DIRENT_H -# else -# error "not implemented" -# endif -#endif - -/* include proper interface headers */ -#if defined(HAVE_DIRENT_H) -# include -# ifdef FREEBSD -# define NAMLEN(dp) ((int)((dp)->d_namlen)) -# else -# define NAMLEN(dp) ((int)(strlen((dp)->d_name))) -# endif - -#elif defined(HAVE_NDIR_H) -# include -# define NAMLEN(dp) ((int)((dp)->d_namlen)) - -#elif defined(HAVE_SYS_NDIR_H) -# include -# define NAMLEN(dp) ((int)((dp)->d_namlen)) - -#elif defined(HAVE_DIRECT_H) -# include -# define NAMLEN(dp) ((int)((dp)->d_namlen)) - -#elif defined(HAVE_DIR_H) -# include -# define NAMLEN(dp) ((int)((dp)->d_namlen)) - -#elif defined(HAVE_SYS_DIR_H) -# include -# include -# ifndef dirent -# define dirent direct -# endif -# define NAMLEN(dp) ((int)((dp)->d_namlen)) - -#elif defined(MSDOS) || defined(WIN32) - -/* figure out type of underlaying directory interface to be used */ -# if defined(WIN32) -# define DIRENT_WIN32_INTERFACE -# elif defined(MSDOS) -# define DIRENT_MSDOS_INTERFACE -# else -# error "missing native dirent interface" -# endif - -/*** WIN32 specifics ***/ -# if defined(DIRENT_WIN32_INTERFACE) -# include -# if !defined(DIRENT_MAXNAMLEN) -# define DIRENT_MAXNAMLEN (MAX_PATH) -# endif - - -/*** MS-DOS specifics ***/ -# elif defined(DIRENT_MSDOS_INTERFACE) -# include - -/* Borland defines file length macros in dir.h */ -# if defined(__BORLANDC__) -# include -# if !defined(DIRENT_MAXNAMLEN) -# define DIRENT_MAXNAMLEN ((MAXFILE)+(MAXEXT)) -# endif -# if !defined(_find_t) -# define _find_t find_t -# endif - -/* Turbo C defines ffblk structure in dir.h */ -# elif defined(__TURBOC__) -# include -# if !defined(DIRENT_MAXNAMLEN) -# define DIRENT_MAXNAMLEN ((MAXFILE)+(MAXEXT)) -# endif -# define DIRENT_USE_FFBLK - -/* MSVC */ -# elif defined(_MSC_VER) -# if !defined(DIRENT_MAXNAMLEN) -# define DIRENT_MAXNAMLEN (12) -# endif - -/* Watcom */ -# elif defined(__WATCOMC__) -# if !defined(DIRENT_MAXNAMLEN) -# if defined(__OS2__) || defined(__NT__) -# define DIRENT_MAXNAMLEN (255) -# else -# define DIRENT_MAXNAMLEN (12) -# endif -# endif - -# endif -# endif - -/*** generic MS-DOS and MS-Windows stuff ***/ -# if !defined(NAME_MAX) && defined(DIRENT_MAXNAMLEN) -# define NAME_MAX DIRENT_MAXNAMLEN -# endif -# if NAME_MAX < DIRENT_MAXNAMLEN -# error "assertion failed: NAME_MAX >= DIRENT_MAXNAMLEN" -# endif - - -/* - * Substitute for real dirent structure. Note that `d_name' field is a - * true character array although we have it copied in the implementation - * dependent data. We could save some memory if we had declared `d_name' - * as a pointer refering the name within implementation dependent data. - * We have not done that since some code may rely on sizeof(d_name) to be - * something other than four. Besides, directory entries are typically so - * small that it takes virtually no time to copy them from place to place. - */ -typedef struct dirent { - char d_name[NAME_MAX + 1]; - - /*** Operating system specific part ***/ -# if defined(DIRENT_WIN32_INTERFACE) /*WIN32*/ - WIN32_FIND_DATA data; -# elif defined(DIRENT_MSDOS_INTERFACE) /*MSDOS*/ -# if defined(DIRENT_USE_FFBLK) - struct ffblk data; -# else - struct _find_t data; -# endif -# endif -} dirent; - -/* DIR substitute structure containing directory name. The name is - * essential for the operation of ``rewinndir'' function. */ -typedef struct DIR { - char *dirname; /* directory being scanned */ - dirent current; /* current entry */ - int dirent_filled; /* is current un-processed? */ - - /*** Operating system specific part ***/ -# if defined(DIRENT_WIN32_INTERFACE) - HANDLE search_handle; -# elif defined(DIRENT_MSDOS_INTERFACE) -# endif -} DIR; - -# ifdef __cplusplus -extern "C" { -# endif - -/* supply prototypes for dirent functions */ -static DIR *opendir (const char *dirname); -static struct dirent *readdir (DIR *dirp); -static int closedir (DIR *dirp); -static void rewinddir (DIR *dirp); - -/* - * Implement dirent interface as static functions so that the user does not - * need to change his project in any way to use dirent function. With this - * it is sufficient to include this very header from source modules using - * dirent functions and the functions will be pulled in automatically. - */ -#include -#include -#include -#include -#include - -/* use ffblk instead of _find_t if requested */ -#if defined(DIRENT_USE_FFBLK) -# define _A_ARCH (FA_ARCH) -# define _A_HIDDEN (FA_HIDDEN) -# define _A_NORMAL (0) -# define _A_RDONLY (FA_RDONLY) -# define _A_SUBDIR (FA_DIREC) -# define _A_SYSTEM (FA_SYSTEM) -# define _A_VOLID (FA_LABEL) -# define _dos_findnext(dest) findnext(dest) -# define _dos_findfirst(name,flags,dest) findfirst(name,dest,flags) -#endif - -static int _initdir (DIR *p); -static const char *_getdirname (const struct dirent *dp); -static void _setdirname (struct DIR *dirp); - -/* - * - * open directory stream for reading - * DIR *opendir (const char *dirname); - * - * Open named directory stream for read and return pointer to the - * internal working area that is used for retrieving individual directory - * entries. The internal working area has no fields of your interest. - * - * Returns a pointer to the internal working area or NULL in case the - * directory stream could not be opened. Global `errno' variable will set - * in case of error as follows: - * - * - * [EACESS |Permission denied. - * [EMFILE |Too many open files used by the process. - * [ENFILE |Too many open files in system. - * [ENOENT |Directory does not exist. - * [ENOMEM |Insufficient memory. - * [ENOTDIR |dirname does not refer to directory. This value is not - * reliable on MS-DOS and MS-Windows platforms. Many - * implementations return ENOENT even when the name refers to a - * file.] - *
- *
- */ -static DIR * -opendir( - const char *dirname) { - DIR *dirp; - assert (dirname != NULL); - - dirp = (DIR*)malloc (sizeof (struct DIR)); - if (dirp != NULL) { - char *p; - - /* allocate room for directory name */ - dirp->dirname = (char*) malloc (strlen (dirname) + 1 + strlen ("\\*.*")); - if (dirp->dirname == NULL) { - /* failed to duplicate directory name. errno set by malloc() */ - free (dirp); - return NULL; - } - /* Copy directory name while appending directory separator and "*.*". - * Directory separator is not appended if the name already ends with - * drive or directory separator. Directory separator is assumed to be - * '/' or '\' and drive separator is assumed to be ':'. */ - strcpy (dirp->dirname, dirname); - p = strchr (dirp->dirname, '\0'); - if (dirp->dirname < p && - *(p - 1) != '\\' && *(p - 1) != '/' && *(p - 1) != ':') { - strcpy (p++, "/"); - } -# ifdef DIRENT_WIN32_INTERFACE - strcpy (p, "*"); /*scan files with and without extension in win32*/ -# else - strcpy (p, "*.*"); /*scan files with and without extension in DOS*/ -# endif - - /* open stream */ - if (_initdir (dirp) == 0) { - /* initialization failed */ - free (dirp->dirname); - free (dirp); - return NULL; - } - } - return dirp; -} - - -/* - * - * read a directory entry - * struct dirent *readdir (DIR *dirp); - * - * Read individual directory entry and return pointer to a structure - * containing the name of the entry. Individual directory entries returned - * include normal files, sub-directories, pseudo-directories "." and ".." - * and also volume labels, hidden files and system files in MS-DOS and - * MS-Windows. You might want to use stat(2) function to determinate which - * one are you dealing with. Many dirent implementations already contain - * equivalent information in dirent structure but you cannot depend on - * this. - * - * The dirent structure contains several system dependent fields that - * generally have no interest to you. The only interesting one is char - * d_name[] that is also portable across different systems. The d_name - * field contains the name of the directory entry without leading path. - * While d_name is portable across different systems the actual storage - * capacity of d_name varies from system to system and there is no portable - * way to find out it at compile time as different systems define the - * capacity of d_name with different macros and some systems do not define - * capacity at all (besides actual declaration of the field). If you really - * need to find out storage capacity of d_name then you might want to try - * NAME_MAX macro. The NAME_MAX is defined in POSIX standard althought - * there are many MS-DOS and MS-Windows implementations those do not define - * it. There are also systems that declare d_name as "char d_name[1]" and - * then allocate suitable amount of memory at run-time. Thanks to Alain - * Decamps (Alain.Decamps@advalvas.be) for pointing it out to me. - * - * This all leads to the fact that it is difficult to allocate space - * for the directory names when the very same program is being compiled on - * number of operating systems. Therefore I suggest that you always - * allocate space for directory names dynamically. - * - * - * Returns a pointer to a structure containing name of the directory entry - * in `d_name' field or NULL if there was an error. In case of an error the - * global `errno' variable will set as follows: - * - * - * [EBADF |dir parameter refers to an invalid directory stream. This value - * is not set reliably on all implementations.] - *
- *
- */ -static struct dirent * -readdir (DIR *dirp) { - assert (dirp != NULL); - if (dirp == NULL) { - errno = EBADF; - return NULL; - } - -#if defined(DIRENT_WIN32_INTERFACE) - if (dirp->search_handle == INVALID_HANDLE_VALUE) { - /* directory stream was opened/rewound incorrectly or it ended normally */ - errno = EBADF; - return NULL; - } -#endif - - if (dirp->dirent_filled != 0) { - /* - * Directory entry has already been retrieved and there is no need to - * retrieve a new one. Directory entry will be retrieved in advance - * when the user calls readdir function for the first time. This is so - * because real dirent has separate functions for opening and reading - * the stream whereas Win32 and DOS dirents open the stream - * automatically when we retrieve the first file. Therefore, we have to - * save the first file when opening the stream and later we have to - * return the saved entry when the user tries to read the first entry. - */ - dirp->dirent_filled = 0; - } else { - /* fill in entry and return that */ -#if defined(DIRENT_WIN32_INTERFACE) - if (FindNextFile (dirp->search_handle, &dirp->current.data) == FALSE) { - /* Last file has been processed or an error occured */ - FindClose (dirp->search_handle); - dirp->search_handle = INVALID_HANDLE_VALUE; - errno = ENOENT; - return NULL; - } - -# elif defined(DIRENT_MSDOS_INTERFACE) - if (_dos_findnext (&dirp->current.data) != 0) { - /* _dos_findnext and findnext will set errno to ENOENT when no - * more entries could be retrieved. */ - return NULL; - } -# endif - - _setdirname (dirp); - assert (dirp->dirent_filled == 0); - } - return &dirp->current; -} - - -/* - * - * close directory stream. - * int closedir (DIR *dirp); - * - * Close directory stream opened by the `opendir' function. Close of - * directory stream invalidates the DIR structure as well as previously read - * dirent entry. - * - * The function typically returns 0 on success and -1 on failure but - * the function may be declared to return void on same systems. At least - * Borland C/C++ and some UNIX implementations use void as a return type. - * The dirent wrapper tries to define VOID_CLOSEDIR whenever closedir is - * known to return nothing. The very same definition is made by the GNU - * autoconf if you happen to use it. - * - * The global `errno' variable will set to EBADF in case of error. - * - */ -static int -closedir (DIR *dirp) { - int retcode = 0; - - /* make sure that dirp points to legal structure */ - assert (dirp != NULL); - if (dirp == NULL) { - errno = EBADF; - return -1; - } - - /* free directory name and search handles */ - if (dirp->dirname != NULL) free (dirp->dirname); - -#if defined(DIRENT_WIN32_INTERFACE) - if (dirp->search_handle != INVALID_HANDLE_VALUE) { - if (FindClose (dirp->search_handle) == FALSE) { - /* Unknown error */ - retcode = -1; - errno = EBADF; - } - } -#endif - - /* clear dirp structure to make sure that it cannot be used anymore*/ - memset (dirp, 0, sizeof (*dirp)); -# if defined(DIRENT_WIN32_INTERFACE) - dirp->search_handle = INVALID_HANDLE_VALUE; -# endif - - free (dirp); - return retcode; -} - - -/* - * - * rewind directory stream to the beginning - * void rewinddir (DIR *dirp); - * - * Rewind directory stream to the beginning so that the next call of - * readdir() returns the very first directory entry again. However, note - * that next call of readdir() may not return the same directory entry as it - * did in first time. The directory stream may have been affected by newly - * created files. - * - * Almost every dirent implementation ensure that rewinddir will update - * the directory stream to reflect any changes made to the directory entries - * since the previous ``opendir'' or ``rewinddir'' call. Keep an eye on - * this if your program depends on the feature. I know at least one dirent - * implementation where you are required to close and re-open the stream to - * see the changes. - * - * Returns nothing. If something went wrong while rewinding, you will - * notice it later when you try to retrieve the first directory entry. - */ -static void -rewinddir (DIR *dirp) { - /* make sure that dirp is legal */ - assert (dirp != NULL); - if (dirp == NULL) { - errno = EBADF; - return; - } - assert (dirp->dirname != NULL); - - /* close previous stream */ -#if defined(DIRENT_WIN32_INTERFACE) - if (dirp->search_handle != INVALID_HANDLE_VALUE) { - if (FindClose (dirp->search_handle) == FALSE) { - /* Unknown error */ - errno = EBADF; - } - } -#endif - - /* re-open previous stream */ - if (_initdir (dirp) == 0) { - /* initialization failed but we cannot deal with error. User will notice - * error later when she tries to retrieve first directory enty. */ - /*EMPTY*/; - } -} - - -/* - * Open native directory stream object and retrieve first file. - * Be sure to close previous stream before opening new one. - */ -static int -_initdir (DIR *dirp) { - assert (dirp != NULL); - assert (dirp->dirname != NULL); - dirp->dirent_filled = 0; - -# if defined(DIRENT_WIN32_INTERFACE) - /* Open stream and retrieve first file */ - dirp->search_handle = FindFirstFile (dirp->dirname, &dirp->current.data); - if (dirp->search_handle == INVALID_HANDLE_VALUE) { - /* something went wrong but we don't know what. GetLastError() could - * give us more information about the error, but then we should map - * the error code into errno. */ - errno = ENOENT; - return 0; - } - -# elif defined(DIRENT_MSDOS_INTERFACE) - if (_dos_findfirst (dirp->dirname, - _A_SUBDIR | _A_RDONLY | _A_ARCH | _A_SYSTEM | _A_HIDDEN, - &dirp->current.data) != 0) { - /* _dos_findfirst and findfirst will set errno to ENOENT when no - * more entries could be retrieved. */ - return 0; - } -# endif - - /* initialize DIR and it's first entry */ - _setdirname (dirp); - dirp->dirent_filled = 1; - return 1; -} - - -/* - * Return implementation dependent name of the current directory entry. - */ -static const char * -_getdirname (const struct dirent *dp) { -#if defined(DIRENT_WIN32_INTERFACE) - return dp->data.cFileName; - -#elif defined(DIRENT_USE_FFBLK) - return dp->data.ff_name; - -#else - return dp->data.name; -#endif -} - - -/* - * Copy name of implementation dependent directory entry to the d_name field. - */ -static void -_setdirname (struct DIR *dirp) { - /* make sure that d_name is long enough */ - assert (strlen (_getdirname (&dirp->current)) <= NAME_MAX); - - strncpy (dirp->current.d_name, - _getdirname (&dirp->current), - NAME_MAX); - dirp->current.d_name[NAME_MAX] = '\0'; /*char d_name[NAME_MAX+1]*/ -} - -# ifdef __cplusplus -} -# endif -# define NAMLEN(dp) ((int)(strlen((dp)->d_name))) - -#else -# error "missing dirent interface" -#endif - - -#endif /*DIRENT_H*/ - diff --git a/src/uscxml/plugins/datamodel/CMakeLists.txt b/src/uscxml/plugins/datamodel/CMakeLists.txt index 2570dda..b004a33 100644 --- a/src/uscxml/plugins/datamodel/CMakeLists.txt +++ b/src/uscxml/plugins/datamodel/CMakeLists.txt @@ -1,99 +1,3 @@ -if (BUILD_DM_ECMA) - if (JSC_FOUND) - set(USCXML_DATAMODELS "ecmascript(JSC) ${USCXML_DATAMODELS}") - # JavaScriptCore ecmascript datamodel - file(GLOB JSC_DATAMODEL - ecmascript/JavaScriptCore/*.cpp - ecmascript/JavaScriptCore/*.h - ecmascript/*.cpp - ecmascript/*.h - ) - file(GLOB_RECURSE JSC_DOM - ecmascript/JavaScriptCore/dom/*.cpp - ecmascript/JavaScriptCore/dom/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("JavaScriptCore" FILES ${JSC_DATAMODEL}) - source_group("dom" FILES ${JSC_DOM}) - - add_library( - datamodel_jsc SHARED - ${JSC_DATAMODEL} - ${JSC_DOM} - "../Plugins.cpp") - target_link_libraries(datamodel_jsc uscxml ${JSC_LIBRARY}) - set_target_properties(datamodel_jsc PROPERTIES FOLDER "Plugin DataModel") - set_target_properties(datamodel_jsc PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(datamodel_jsc PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${JSC_DATAMODEL}) - list (APPEND USCXML_FILES ${JSC_DOM}) - list (APPEND USCXML_OPT_LIBS ${JSC_LIBRARY}) - endif() - - elseif(V8_FOUND) - - # GOOGLE V8 ecmascript datamodel - set(USCXML_DATAMODELS "ecmascript(V8) ${USCXML_DATAMODELS}") - # set(ENV{V8_SRC} ${CMAKE_SOURCE_DIR}/../v8) - if (V8_FOUND AND BUILD_DM_ECMA) - file(GLOB V8_DATAMODEL - ecmascript/v8/*.cpp - ecmascript/v8/*.h - ecmascript/*.cpp - ecmascript/*.h - ) - file(GLOB_RECURSE V8_DOM - ecmascript/v8/dom/*.cpp - ecmascript/v8/dom/*.h - ) - - if (BUILD_AS_PLUGINS) - source_group("V8" FILES ${V8_DATAMODEL}) - source_group("dom" FILES ${V8_DOM}) - - add_library( - datamodel_v8 SHARED - ${V8_DATAMODEL} - ${V8_DOM} - "../Plugins.cpp") - target_link_libraries(datamodel_v8 uscxml ${V8_LIBRARY}) - set_target_properties(datamodel_v8 PROPERTIES FOLDER "Plugin DataModel") - set_target_properties(datamodel_v8 PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(datamodel_v8 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${V8_DATAMODEL}) - list (APPEND USCXML_FILES ${V8_DOM}) - endif() - endif() - elseif(SPIDERMONKEY_FOUND) - set(USCXML_DATAMODELS "ecmascript(SpiderMonkey) ${USCXML_DATAMODELS}") - # set(ENV{V8_SRC} ${CMAKE_SOURCE_DIR}/../v8) - file(GLOB SPIDERMONKEY_DATAMODEL - ecmascript/SpiderMonkey/*.cpp - ecmascript/SpiderMonkey/*.h - ecmascript/*.cpp - ecmascript/*.h - ) - - if (BUILD_AS_PLUGINS) - source_group("SpiderMonkey" FILES ${SPIDERMONKEY_DATAMODEL}) - - add_library( - datamodel_spidermonkey SHARED - ${SPIDERMONKEY_DATAMODEL} - "../Plugins.cpp") - target_link_libraries(datamodel_spidermonkey uscxml ${SPIDERMONKEY_LIBRARY}) - set_target_properties(datamodel_spidermonkey PROPERTIES FOLDER "Plugin DataModel") - set_target_properties(datamodel_spidermonkey PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(datamodel_spidermonkey PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${SPIDERMONKEY_DATAMODEL}) - endif() - endif() -endif() - - # NULL datamodel (not useful as plugin) set(USCXML_DATAMODELS "null ${USCXML_DATAMODELS}") @@ -104,115 +8,109 @@ file(GLOB NULL_DATAMODEL list (APPEND USCXML_FILES ${NULL_DATAMODEL}) -# Lua datamodel +if (JSC_FOUND) + set(USCXML_DATAMODELS "ecmascript(JSC) ${USCXML_DATAMODELS}") + # JavaScriptCore ecmascript datamodel + file(GLOB JSC_DATAMODEL + ecmascript/JavaScriptCore/*.cpp + ecmascript/JavaScriptCore/*.h + ecmascript/*.cpp + ecmascript/*.h + ) + list (APPEND USCXML_FILES ${JSC_DATAMODEL}) + list (APPEND USCXML_OPT_LIBS ${JSC_LIBRARY}) +endif() + + +if (V8_FOUND) + set(USCXML_DATAMODELS "ecmascript(V8) ${USCXML_DATAMODELS}") + # JavaScriptCore ecmascript datamodel + file(GLOB V8_DATAMODEL + ecmascript/v8/*.cpp + ecmascript/v8/*.h + ecmascript/*.cpp + ecmascript/*.h + ) + list (APPEND USCXML_FILES ${V8_DATAMODEL}) + list (APPEND USCXML_OPT_LIBS ${V8_LIBRARY}) +endif() + -if (BUILD_DM_LUA AND LUA_FOUND AND NOT BUILD_MINIMAL) +if (LUA_FOUND) set(USCXML_DATAMODELS "lua ${USCXML_DATAMODELS}") + # Lua ecmascript datamodel file(GLOB LUA_DATAMODEL lua/*.cpp lua/*.h ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${LUA_DATAMODEL}) - add_library(datamodel_lua SHARED ${LUA_DATAMODEL} "../Plugins.cpp") - target_link_libraries(datamodel_lua - uscxml - ${LUA_LIBRARIES} - ) - set_target_properties(datamodel_lua PROPERTIES FOLDER "Plugin DataModel") - set_target_properties(datamodel_lua PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(datamodel_lua PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${LUA_DATAMODEL}) - endif() + list (APPEND USCXML_FILES ${LUA_DATAMODEL}) + list (APPEND USCXML_OPT_LIBS ${LUA_LIBRARY}) endif() -# XPath datamodel - -if (BUILD_DM_XPATH AND NOT BUILD_MINIMAL) - set(USCXML_DATAMODELS "xpath ${USCXML_DATAMODELS}") - file(GLOB XPATH_DATAMODEL - xpath/*.cpp - xpath/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${XPATH_DATAMODEL}) - add_library(datamodel_xpath SHARED ${XPATH_DATAMODEL} "../Plugins.cpp") - target_link_libraries(datamodel_xpath uscxml) - set_target_properties(datamodel_xpath PROPERTIES FOLDER "Plugin DataModel") - set_target_properties(datamodel_xpath PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(datamodel_xpath PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${XPATH_DATAMODEL}) +find_package(SWIG) +if (NOT SWIG_FOUND) + message(STATUS "No swig binary found, not generating DOM classes") +elseif(SWIG_VERSION VERSION_LESS 3.0.8) + message(STATUS "SWIG version > 3.0.8 is recommended, found ${SWIG_VERSION} - skipping DOM generation") +else() + if (JSC_FOUND) + add_custom_target(jsc-bindings + COMMAND ${SWIG_EXECUTABLE} + -I${XercesC_INCLUDE_DIRS} + -I${PROJECT_SOURCE_DIR}/src + -I${CMAKE_BINARY_DIR} + -javascript + -jsc + -c++ + -o ${CMAKE_CURRENT_SOURCE_DIR}/ecmascript/JavaScriptCore/JSCDOM.cpp.inc + ecmascript/JavaScriptCore/bindings.i + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Creating the DOM for JavaScriptCore ...") + + # list (APPEND JSC_DATAMODEL ${CMAKE_CURRENT_SOURCE_DIR}/ecmascript/JavaScriptCore/JSCDOM.cpp.inc) + set_target_properties(jsc-bindings PROPERTIES FOLDER "Bindings") endif() -endif() -# SWI PROLOG datamodel - -if (SWI_FOUND AND BUILD_DM_PROLOG AND NOT BUILD_MINIMAL) - set(USCXML_DATAMODELS "prolog ${USCXML_DATAMODELS}") - - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/prolog/swi/SWIConfig.h.in ${CMAKE_BINARY_DIR}/uscxml/SWIConfig.h) - -# message(FATAL_ERROR "SWI_INCLUDE_DIR: ${SWI_INCLUDE_DIR}") - - # if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") - # set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -read_only_relocs suppress") - # set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -read_only_relocs suppress") - # set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -read_only_relocs suppress") - # set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -read_only_relocs suppress") - # endif() - file(GLOB_RECURSE SWI_DATAMODEL - prolog/swi/*.cpp - prolog/swi/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${SWI_DATAMODEL}) - add_library( - datamodel_swi SHARED - ${SWI_DATAMODEL} - "../Plugins.cpp") - target_link_libraries(datamodel_swi - uscxml - ${GMP_LIBRARY} - ${CURSES_LIBRARIES} - ${SWI_LIBRARY}) - set_target_properties(datamodel_swi PROPERTIES FOLDER "Plugin DataModel") - set_target_properties(datamodel_swi PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(datamodel_swi PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${SWI_DATAMODEL}) + if (V8_FOUND) + add_custom_target(v8-bindings + COMMAND ${SWIG_EXECUTABLE} + -I${XercesC_INCLUDE_DIRS} + -I${PROJECT_SOURCE_DIR}/src + -I${CMAKE_BINARY_DIR} + -javascript + -v8 + -c++ + -o ${CMAKE_CURRENT_SOURCE_DIR}/ecmascript/v8/V8DOM.cpp.inc + ecmascript/v8/bindings.i + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Creating the DOM for V8 ...") + + # list (APPEND V8_DATAMODEL ${CMAKE_CURRENT_SOURCE_DIR}/ecmascript/v8/V8DOM.cpp.inc) + set_target_properties(v8-bindings PROPERTIES FOLDER "Bindings") + endif() -endif() - -# Promela datamodel - -if (BUILD_DM_PROMELA AND NOT BUILD_MINIMAL) - set(USCXML_DATAMODELS "promela ${USCXML_DATAMODELS}") - - file(GLOB_RECURSE PROMELA_DATAMODEL - promela/*.cpp - promela/*.c - promela/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES PROMELA_DATAMODEL) - add_library( - datamodel_promela SHARED - ${PROMELA_DATAMODEL} - "../Plugins.cpp") - target_link_libraries(datamodel_promela uscxml) - set_target_properties(datamodel_promela PROPERTIES FOLDER "Plugin DataModel") - set_target_properties(datamodel_promela PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(datamodel_promela PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${PROMELA_DATAMODEL}) + if (LUA_FOUND) + add_custom_target(lua-bindings + COMMAND ${SWIG_EXECUTABLE} + -I${XercesC_INCLUDE_DIRS} + -I${PROJECT_SOURCE_DIR}/src + -I${CMAKE_BINARY_DIR} + -lua + -c++ + -o ${CMAKE_CURRENT_SOURCE_DIR}/lua/LuaDOM.cpp.inc + lua/bindings.i + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Creating the DOM for Lua ...") + + # list (APPEND V8_DATAMODEL ${CMAKE_CURRENT_SOURCE_DIR}/ecmascript/v8/V8DOM.cpp.inc) + set_target_properties(lua-bindings PROPERTIES FOLDER "Bindings") endif() endif() + set(USCXML_INCLUDE_DIRS ${USCXML_INCLUDE_DIRS} PARENT_SCOPE) set(USCXML_FILES ${USCXML_FILES} PARENT_SCOPE) set(USCXML_DATAMODELS ${USCXML_DATAMODELS} PARENT_SCOPE) diff --git a/src/uscxml/plugins/datamodel/common/bindings/dom/defines.i b/src/uscxml/plugins/datamodel/common/bindings/dom/defines.i new file mode 100644 index 0000000..0ef7f0e --- /dev/null +++ b/src/uscxml/plugins/datamodel/common/bindings/dom/defines.i @@ -0,0 +1,247 @@ +/* + * Copyright 2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * defines.i - This file contains all directives included + * verbatim into the C++ output file + */ + +%{ +#include "xercesc/sax/InputSource.hpp" +#include "xercesc/sax/SAXException.hpp" +#include "xercesc/sax/SAXParseException.hpp" +#include "xercesc/sax/Locator.hpp" +#include "xercesc/sax/HandlerBase.hpp" +#include "xercesc/sax2/Attributes.hpp" +#include "xercesc/sax2/ContentHandler.hpp" +#include "xercesc/sax2/LexicalHandler.hpp" +#include "xercesc/sax2/DefaultHandler.hpp" +#include "xercesc/sax2/SAX2XMLReader.hpp" +#include "xercesc/sax2/XMLReaderFactory.hpp" +#include "xercesc/util/PlatformUtils.hpp" +#include "xercesc/util/TransService.hpp" +#include "xercesc/util/XMLString.hpp" +#include "xercesc/util/XMLUri.hpp" +#include "xercesc/util/QName.hpp" +#include "xercesc/util/HexBin.hpp" +#include "xercesc/util/Base64.hpp" +#include "xercesc/parsers/AbstractDOMParser.hpp" +#include "xercesc/parsers/XercesDOMParser.hpp" +#include "xercesc/parsers/SAXParser.hpp" +#include "xercesc/dom/DOM.hpp" +#include "xercesc/framework/LocalFileInputSource.hpp" +#include "xercesc/framework/MemBufInputSource.hpp" +#include "xercesc/framework/StdInInputSource.hpp" +#include "xercesc/framework/URLInputSource.hpp" +#include "xercesc/framework/XMLGrammarDescription.hpp" +#include "xercesc/framework/XMLDTDDescription.hpp" +#include "xercesc/framework/XMLSchemaDescription.hpp" +#include "xercesc/util/NameIdPool.hpp" +#include "xercesc/util/XMLEnumerator.hpp" +#include "xercesc/framework/XMLValidator.hpp" +#include "xercesc/validators/common/Grammar.hpp" +#include "xercesc/validators/DTD/DTDAttDef.hpp" +#include "xercesc/validators/DTD/DTDAttDefList.hpp" +#include "xercesc/validators/DTD/DTDGrammar.hpp" +#include "xercesc/validators/DTD/DTDValidator.hpp" +#include "xercesc/validators/schema/SchemaGrammar.hpp" +#include "xercesc/validators/schema/SchemaValidator.hpp" +#include "xercesc/validators/schema/SchemaAttDefList.hpp" +#include "xercesc/validators/schema/SchemaAttDef.hpp" +#include "xercesc/framework/XMLFormatter.hpp" +#include "xercesc/framework/MemBufFormatTarget.hpp" +#include "xercesc/framework/LocalFileFormatTarget.hpp" +#include "xercesc/framework/StdOutFormatTarget.hpp" +#include "xercesc/framework/Wrapper4InputSource.hpp" +#include "xercesc/framework/psvi/PSVIHandler.hpp" + +// for resolving XMLExceptions +#include "xercesc/util/ArrayIndexOutOfBoundsException.hpp" +#include "xercesc/util/EmptyStackException.hpp" +#include "xercesc/util/IllegalArgumentException.hpp" +#include "xercesc/util/InvalidCastException.hpp" +#include "xercesc/util/IOException.hpp" +#include "xercesc/util/NoSuchElementException.hpp" +#include "xercesc/util/NullPointerException.hpp" +#include "xercesc/util/NumberFormatException.hpp" +#include "xercesc/util/ParseException.hpp" +#include "xercesc/util/RuntimeException.hpp" +#include "xercesc/util/SchemaDateTimeException.hpp" +#include "xercesc/util/TranscodingException.hpp" +#include "xercesc/util/UnexpectedEOFException.hpp" +#include "xercesc/util/UnsupportedEncodingException.hpp" +#include "xercesc/util/UTFDataFormatException.hpp" +#include "xercesc/util/XMLNetAccessor.hpp" +#include "xercesc/internal/XSerializationException.hpp" +#include "xercesc/validators/datatype/InvalidDatatypeFacetException.hpp" +#include "xercesc/validators/datatype/InvalidDatatypeValueException.hpp" +#include "xercesc/validators/schema/identity/XPathException.hpp" + +XERCES_CPP_NAMESPACE_USE + +// we initialize the static UTF-8 transcoding info +// these are used by the typemaps to convert between +// Xerces internal UTF-16 and Perl's internal UTF-8 +static XMLCh* UTF8_ENCODING = NULL; +static XMLTranscoder* UTF8_TRANSCODER = NULL; + +static bool DEBUG_UTF8_OUT = 0; +static bool DEBUG_UTF8_IN = 0; + +%} + +/* + * Import the language specific includes + */ + +#ifdef SWIGPERL +%include "interface/Perl/defines.i" +%include "interface/Perl/transcode.i" +%include "interface/Perl/errors.i" +#endif + + +// These get wrapped by SWIG so that we can modify them from the scripting language +bool DEBUG_UTF8_OUT; +bool DEBUG_UTF8_IN; + +/* + +%{ +XMLException* +copyXMLException(const XMLException& e) +{ + if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgArrayIndexOutOfBoundsException_Name) + { + return (XMLException*)((ArrayIndexOutOfBoundsException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgEmptyStackException_Name) + { + return (XMLException*)((EmptyStackException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgIllegalArgumentException_Name) + { + return (XMLException*)((IllegalArgumentException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgInvalidCastException_Name) + { + return (XMLException*)((InvalidCastException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgIOException_Name) + { + return (XMLException*)((IOException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgNoSuchElementException_Name) + { + return (XMLException*)((NoSuchElementException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgNullPointerException_Name) + { + return (XMLException*)((NullPointerException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgNumberFormatException_Name) + { + return (XMLException*)((NumberFormatException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgParseException_Name) + { + return (XMLException*)((ParseException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgXMLPlatformUtilsException_Name) + { + return (XMLException*)((XMLPlatformUtilsException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgRuntimeException_Name) + { + return (XMLException*)((RuntimeException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgSchemaDateTimeException_Name) + { + return (XMLException*)((SchemaDateTimeException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgTranscodingException_Name) + { + return (XMLException*)((TranscodingException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgUnexpectedEOFException_Name) + { + return (XMLException*)((UnexpectedEOFException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgUnsupportedEncodingException_Name) + { + return (XMLException*)((UnsupportedEncodingException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgUTFDataFormatException_Name) + { + return (XMLException*)((UTFDataFormatException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgNetAccessorException_Name) + { + return (XMLException*)((NetAccessorException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgMalformedURLException_Name) + { + return (XMLException*)((MalformedURLException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgXSerializationException_Name) + { + return (XMLException*)((XSerializationException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgInvalidDatatypeFacetException_Name) + { + return (XMLException*)((InvalidDatatypeFacetException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgInvalidDatatypeValueException_Name) + { + return (XMLException*)((InvalidDatatypeValueException*)&e)->duplicate(); + } + else if(e.getType() == XERCES_CPP_NAMESPACE::XMLUni::fgXPathException_Name) + { + return (XMLException*)((XPathException*)&e)->duplicate(); + } + else + { + SWIG_Perl_SetErrorf("Unknown Exception type: %d", e.getType()); + } +} + +void +makeXMLException(const XMLException& e){ + SV *error = ERRSV; + SWIG_MakePtr(error, (void *) copyXMLException(e), SWIGTYPE_p_XERCES_CPP_NAMESPACE__XMLException, SWIG_SHADOW|0); +} + +void +makeDOMException(const DOMException& e){ + SV *error = ERRSV; + SWIG_MakePtr(error, (void *) new DOMException(e), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, SWIG_SHADOW|0); +} + +void +makeSAXNotRecognizedException(const SAXNotRecognizedException& e){ + SV *error = ERRSV; + SWIG_MakePtr(error, (void *) new SAXNotRecognizedException(e), SWIGTYPE_p_XERCES_CPP_NAMESPACE__SAXNotRecognizedException, SWIG_SHADOW|0); +} + +void +makeSAXNotSupportedException(const SAXNotSupportedException& e){ + SV *error = ERRSV; + SWIG_MakePtr(error, (void *) new SAXNotSupportedException(e), SWIGTYPE_p_XERCES_CPP_NAMESPACE__SAXNotSupportedException, SWIG_SHADOW|0); +} + +%} + +*/ \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/common/bindings/dom/dom.i b/src/uscxml/plugins/datamodel/common/bindings/dom/dom.i new file mode 100644 index 0000000..abe808b --- /dev/null +++ b/src/uscxml/plugins/datamodel/common/bindings/dom/dom.i @@ -0,0 +1,125 @@ +/* + * Copyright 2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * All DOM classes and their related SWIG alterations go in this interface file + */ + +/* + * the DOM classes gets a special exception handler + * 'goto fail' must be called - either explicitly, or via SWIG_croak() + * to ensure that any variable cleanup is done - to avoid memory leaks. + * By making these macros, it reduces the code size dramatically + */ +/* +%{ +#define CATCH_DOM_EXCEPTION \ + catch (const XMLException& e) \ + { \ + makeXMLException(e); \ + goto fail; \ + } \ + catch (const DOMException& e) \ + { \ + makeDOMException(e); \ + goto fail; \ + } \ + catch (...) \ + { \ + SWIG_croak("Handling Unknown exception"); \ + goto fail; \ + } +%} + +%exception { + try + { + $action + } + CATCH_DOM_EXCEPTION +} +*/ +// Introduced in DOM Level 1 +%include "xercesc/dom/DOMException.hpp" +%include "xercesc/dom/DOMNode.hpp" +%include "xercesc/dom/DOMAttr.hpp" +%include "xercesc/dom/DOMElement.hpp" +%include "xercesc/dom/DOMEntity.hpp" +%include "xercesc/dom/DOMDocumentType.hpp" +%include "xercesc/dom/DOMCharacterData.hpp" +%include "xercesc/dom/DOMComment.hpp" +%include "xercesc/dom/DOMText.hpp" +%include "xercesc/dom/DOMCDATASection.hpp" +%include "xercesc/dom/DOMNodeList.hpp" +%include "xercesc/dom/DOMNamedNodeMap.hpp" +%include "xercesc/dom/DOMDocumentFragment.hpp" +%include "xercesc/dom/DOMDocumentType.hpp" +%include "xercesc/dom/DOMEntityReference.hpp" +%include "xercesc/dom/DOMNotation.hpp" +%include "xercesc/dom/DOMProcessingInstruction.hpp" + +// Introduced in DOM Level 2 +/* +%include "xercesc/dom/DOMDocumentRange.hpp" +%include "xercesc/dom/DOMDocumentTraversal.hpp" +%include "xercesc/dom/DOMNodeIterator.hpp" +%include "xercesc/dom/DOMNodeFilter.hpp" +%include "xercesc/dom/DOMRange.hpp" +%include "xercesc/dom/DOMRangeException.hpp" +%include "xercesc/dom/DOMTreeWalker.hpp" +%include "xercesc/dom/DOMDocumentTraversal.hpp" + +%ignore XERCES_CPP_NAMESPACE::DOMImplementation::loadDOMExceptionMsg; +*/ + +/* + * Introduced in DOM Level 3 + */ +/* +%include "xercesc/dom/DOMImplementationLS.hpp" +%include "xercesc/dom/DOMImplementation.hpp" +%include "xercesc/dom/DOMImplementationSource.hpp" +%include "xercesc/dom/DOMImplementationRegistry.hpp" + +%include "xercesc/dom/DOMErrorHandler.hpp" +%include "xercesc/dom/DOMEntityResolver.hpp" +%include "xercesc/dom/DOMDocument.hpp" +%include "xercesc/dom/DOMLocator.hpp" + +// DOMBuiler +%include "xercesc/dom/DOMInputSource.hpp" +%include "xercesc/framework/Wrapper4InputSource.hpp" +%include "xercesc/framework/Wrapper4DOMInputSource.hpp" +%include "xercesc/dom/DOMBuilder.hpp" + +// DOMWriter +%import "xercesc/framework/XMLFormatter.hpp" +%include "xercesc/framework/StdOutFormatTarget.hpp" +%include "xercesc/framework/LocalFileFormatTarget.hpp" +%include "xercesc/framework/MemBufFormatTarget.hpp" +%include "xercesc/dom/DOMWriter.hpp" +%include "xercesc/dom/DOMWriterFilter.hpp" +*/ + +%extend XERCES_CPP_NAMESPACE::DOMNode { + bool operator==(const DOMNode *other) { + return self->isSameNode(other); + } + bool operator!=(const DOMNode *other) { + return !self->isSameNode(other); + } +}; + diff --git a/src/uscxml/plugins/datamodel/common/bindings/dom/ignore.i b/src/uscxml/plugins/datamodel/common/bindings/dom/ignore.i new file mode 100644 index 0000000..a4a6194 --- /dev/null +++ b/src/uscxml/plugins/datamodel/common/bindings/dom/ignore.i @@ -0,0 +1,392 @@ +// Operators we don't want to wrap +%ignore operator =; +%ignore operator new; +%ignore operator delete; +%ignore operator <<; + + +// both of these static variables cause trouble +// the transcoding service is only useful to C++ anyway. +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::fgTransService; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::fgNetAccessor; + +// these are other static variables that are useless to Perl +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::fgUserPanicHandler; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::fgDefaultPanicHandler; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::fgMemoryManager; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::fgDefaulPanicHandler; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::fgArrayMemoryManager; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::fgAtomicMutex; + +// these are methods that are useless in Perl +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::curFilePos; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::closeFile; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::fileSize; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::openFile; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::openFileToWrite; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::openStdInHandle; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::readFileBuffer; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::writeBufferToFile; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::resetFile; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::getFullPath; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::getCurrentDirectory; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::isAnySlash; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::removeDotSlash; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::removeDotDotSlash; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::isRelative; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::weavePaths; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::getCurrentMillis; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::closeMutex; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::lockMutex; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::makeMutex; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::unlockMutex; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::loadMsgSet; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::compareAndSwap; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::atomicIncrement; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::atomicDecrement; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::recognizeNEL; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::isNELRecognized; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::strictIANAEncoding; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::isStrictIANAEncoding; +%ignore XERCES_CPP_NAMESPACE::XMLPlatformUtils::alignPointerForNewBlockAllocation; + +%ignore PerlErrorCallbackHandler::warning(const SAXParseException&); +%ignore PerlErrorCallbackHandler::error(const SAXParseException&); +%ignore PerlErrorCallbackHandler::fatalError(const SAXParseException&); + +// ignore the char* versions of ALL constructors +%ignore XERCES_CPP_NAMESPACE::DOMBuilder::parseURI(const char *const ); +%ignore MemBufInputSource(const XMLByte* const, const unsigned int, const char* const, + const bool foo=false, + MemoryManager* const foo=XMLPlatformUtils::fgMemoryManager); + +%ignore XMLURL(const XMLURL&,const char* const, + MemoryManager* const foo=XMLPlatformUtils::fgMemoryManager); +%ignore XMLURL(const char* const, + MemoryManager* const foo=XMLPlatformUtils::fgMemoryManager); +%ignore XMLURL(const XMLCh* const, const char* const, + MemoryManager* const foo=XMLPlatformUtils::fgMemoryManager); +%ignore URLInputSource(const XMLCh* const, const char* const, + MemoryManager* const foo=XMLPlatformUtils::fgMemoryManager); +%ignore URLInputSource(const XMLCh* const, const char* const, const char* const, + MemoryManager* const foo=XMLPlatformUtils::fgMemoryManager); +%ignore XMLFormatter( + const char* const outEncoding + , const char* const docVersion + , XMLFormatTarget* const target + , const EscapeFlags escapeFlags = NoEscapes + , const UnRepFlags unrepFlags = UnRep_Fail + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + +%ignore XMLFormatter( + const char* const outEncoding + , XMLFormatTarget* const target + , const EscapeFlags escapeFlags = NoEscapes + , const UnRepFlags unrepFlags = UnRep_Fail + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + +%ignore XERCES_CPP_NAMESPACE::AttributeList::getValue(const char* const) const; +%ignore setExternalSchemaLocation(const char* const); +%ignore setExternalNoNamespaceSchemaLocation(const char* const); + +/* + * Ignore these char* methods for all Parsers + */ +%ignore loadGrammar(const char* const systemId, + const short grammarType, + const bool toCache = false); + + +%ignore parse(const char* const); +%ignore parseFirst(const char *const,XMLPScanToken&,const bool); + +/* + * We need these constructors to always adopt the input strings + * unfortunately, the default is set to FALSE, so we must ignore + * all constructors that use the default, and explicitly set it + * in a typemap. While we are at it, we also ignore the constructor + * that sets the MemoryManager + */ +%ignore MemBufInputSource(const XMLByte* const, const unsigned int, const XMLCh* const); +%ignore MemBufInputSource(const XMLByte* const, const unsigned int, const XMLCh* const, + const bool, MemoryManager *const); +%ignore Wrapper4InputSource(InputSource* const); +%ignore Wrapper4InputSource(InputSource* const, const bool adoptFlag + , MemoryManager* const); +%ignore Wrapper4DOMInputSource( + DOMInputSource* const inputSource + , const bool + , MemoryManager* const); +%ignore Wrapper4DOMInputSource( + DOMInputSource* const inputSource); + +// These are odd cases. We want access to skip the method with the +// memory manager argument, but we want access to the optional argument +// *after* the memory manager. So we just ignore the method that doesn't +// include the memory manager - since our typemap defaults that argument +// they are redundant +%ignore createDOMBuilder(short const,const XMLCh* const); +%ignore SAXParser(XMLValidator* const); +%ignore createXMLReader(); + +/* + * ignore the constructors which set the MemoryManager + */ +%ignore createDocument(const XMLCh *,const XMLCh *,DOMDocumentType *,MemoryManager *const); +%ignore createDocument(MemoryManager *const); +%ignore createDOMWriter(MemoryManager *const); +%ignore XMLFormatter( + const XMLCh* const + , const XMLCh* const + , XMLFormatTarget* const + , const EscapeFlags + , const UnRepFlags + , MemoryManager* const); +%ignore XMLFormatter( + const XMLCh* const + , XMLFormatTarget* const + , const EscapeFlags + , const UnRepFlags + , MemoryManager* const); +%ignore LocalFileFormatTarget(const XMLCh* const, MemoryManager* const); +%ignore LocalFileFormatTarget(const char* const, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); +%ignore MemBufFormatTarget(int, MemoryManager* const); +%ignore XercesDOMParser(XMLValidator* const, MemoryManager* const); +%ignore URLInputSource(const XMLURL&, MemoryManager *const); +%ignore URLInputSource(const XMLCh* const, MemoryManager *const); +%ignore URLInputSource(const XMLCh* const, const XMLCh* const,MemoryManager *const); +%ignore URLInputSource(const XMLCh* const, const XMLCh* const, const XMLCh* const,MemoryManager *const); +%ignore StdInInputSource(MemoryManager* const); +%ignore LocalFileInputSource(const XMLCh* const,MemoryManager* const); +%ignore LocalFileInputSource(const XMLCh* const,const XMLCh* const,MemoryManager* const); +%ignore XMLUri(MemoryManager* const); +%ignore XMLUri(const XMLCh* const,MemoryManager* const); +%ignore XMLUri(const XMLUri* const,const XMLCh* const,MemoryManager* const); +%ignore XMLURL(MemoryManager* const); +%ignore XMLURL(const XMLCh* const,MemoryManager* const); +%ignore XMLURL(const XMLCh* const,const XMLCh* const,MemoryManager* const); +%ignore XMLNotationDecl(MemoryManager* const); +%ignore XMLNotationDecl( + const XMLCh* const + , const XMLCh* const + , const XMLCh* const + , const XMLCh* const + , MemoryManager* const + ); +%ignore getAttTypeString(const AttTypes + , MemoryManager* const); +%ignore getDefAttTypeString(const DefAttTypes + , MemoryManager* const); + +%ignore DTDGrammar(MemoryManager *const); +%ignore SchemaValidator(XMLErrorReporter *const,MemoryManager *const); +%ignore SchemaGrammar(MemoryManager *const); +%ignore QName(MemoryManager* const); +%ignore QName + ( + const XMLCh* const prefix + , const XMLCh* const localPart + , const unsigned int uriId + , MemoryManager* const + ); +%ignore QName + ( + const XMLCh* const rawName + , const unsigned int uriId + , MemoryManager* const + ); + + +// changing the locale and the NLS home is probably useful +// but changing the panic manager and memory manager is not +%ignore Initialize(const char* const + , const char* const + , PanicHandler* const + , MemoryManager* const); +%ignore Initialize(const char* const + , const char* const + , PanicHandler* const); + +// this constructor has a single XMLCh that interfers with another bool constructor +%ignore DTDEntityDecl( + const XMLCh* const + , const XMLCh + , const bool fromIntSubset = false + , const bool specialChar = false); + +/* + * Perl won't need to create exceptions + */ + +%ignore DOMException(); +%ignore DOMException( + short code + , const XMLCh* message + , MemoryManager* const memoryManager = XMLPlatformUtils::fgMemoryManager + ); + +%ignore DOMException(const DOMException &other); + +%ignore DOMRangeException(); +%ignore DOMRangeException( + RangeExceptionCode code + , const XMLCh* message + , MemoryManager* const memoryManager + ); +%ignore DOMRangeException(const DOMRangeException &other); + +%ignore SAXException(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) ; +%ignore SAXException(const XMLCh* const msg, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) ; +%ignore SAXException(const char* const msg, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) ; +%ignore SAXException(const SAXException& toCopy) ; + +%ignore SAXNotSupportedException(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) ; +%ignore SAXNotSupportedException(const XMLCh* const msg, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) ; +%ignore SAXNotSupportedException(const char* const msg, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) ; + +%ignore SAXNotRecognizedException(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) ; +%ignore SAXNotRecognizedException(const XMLCh* const msg, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) ; +%ignore SAXNotRecognizedException(const char* const msg, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) ; + +%ignore SAXParseException(const XMLCh* const message, const Locator& locator, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); +%ignore SAXParseException + ( + const XMLCh* const message + , const XMLCh* const publicId + , const XMLCh* const systemId + , const XMLSSize_t lineNumber + , const XMLSSize_t columnNumber + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); +%ignore SAXParseException(const SAXParseException& toCopy); + +/* + * methods not needed by the XMLValidator interfaces + */ +%ignore XERCES_CPP_NAMESPACE::XMLValidator::emitError; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::checkRootElement; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::reinitMsgMutex; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::reinitMsgLoader; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::setErrorReporter; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::setScannerInfo; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::handlesSchema; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::handlesDTD; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::validateElement; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::validateAttrValue; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::requiresNamespaces; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::reset; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::postParseValidation; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::preContentValidation; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::faultInAttr; +%ignore XERCES_CPP_NAMESPACE::XMLValidator::checkContent; + +// ignore all the constructors for the Grammar components +%ignore XERCES_CPP_NAMESPACE::DTDAttDef::DTDAttDef; +%ignore XERCES_CPP_NAMESPACE::DTDElementDecl::DTDElementDecl; +%ignore XERCES_CPP_NAMESPACE::DTDEntityDecl::DTDEntityDecl; +%ignore XERCES_CPP_NAMESPACE::SchemaElementDecl::SchemaElementDecl; +%ignore XERCES_CPP_NAMESPACE::SchemaAttDef::SchemaAttDef; +%ignore XERCES_CPP_NAMESPACE::DTDAttDefList::DTDAttDefList; +%ignore XERCES_CPP_NAMESPACE::SchemaAttDefList::SchemaAttDefList; + +// desperate attempt to get this working +// FIXME +%ignore SchemaAttDefList + ( + RefHash2KeysTableOf* const listToUse, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + +%ignore DTDAttDefList + ( + RefHashTableOf* const listToUse, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + +/* + * methods not needed by the public Parser interfaces + * + * this is probably because I'm not using AdvDocHandlers and things + * that want to control the parsing process, but until someone asks + * for them, I'm going to leave them out. + */ + +// XMLEntityHandler interface +%ignore endInputSource; +%ignore expandSystemId; +%ignore resetEntities; +%ignore resolveEntity; +%ignore startInputSource; + +// XMLDocumentHandler interface. +%ignore docCharacters; +%ignore docComment; +%ignore docPI; +%ignore endDocument; +%ignore endElement; +%ignore endEntityReference; +%ignore ignorableWhitespace; +%ignore resetDocument; +%ignore startDocument; +%ignore startElement; +%ignore startEntityReference; +%ignore XMLDecl; + +// depricated methods - don't ask me to include these +%ignore getDoValidation; +%ignore setDoValidation; +%ignore attDef; +%ignore doctypeComment; +%ignore doctypeDecl; +%ignore doctypePI; +%ignore doctypeWhitespace; +%ignore elementDecl; +%ignore endAttList; +%ignore endIntSubset; +%ignore endExtSubset; +%ignore entityDecl; +%ignore resetDocType; +%ignore notationDecl; +%ignore startAttList; +%ignore startIntSubset; +%ignore startExtSubset; +%ignore TextDecl; + +// const methods +%ignore getDocumentHandler() const; +%ignore getErrorHandler() const; +%ignore getEntityResolver() const; +%ignore getXMLEntityResolver() const; +%ignore getPSVIHandler() const; + +%ignore getContentSpec() const; +%ignore getBaseName() const; +%ignore getElementName() const; +%ignore findAttDef(unsigned long const,XMLCh const *const) const; +%ignore findAttDef(XMLCh const *const,XMLCh const *const) const; +%ignore getAttDef(unsigned int) const; +%ignore getAttDef(XMLCh const *const) const; +%ignore getAttDef(XMLCh const *const,int const) const; +%ignore getElemDecl(unsigned int const) const; +%ignore getElemDecl(unsigned int const,XMLCh const *const,XMLCh const *const,unsigned int) const; +%ignore getNotationDecl(XMLCh const *const) const; +%ignore getEntityDecl(XMLCh const *const) const; +%ignore getEntityDeclPool() const; +%ignore getAttWildCard() const; +%ignore getAnnotation() const; +%ignore getAnnotation(void const *const) const; +%ignore getAnnotations() const; +%ignore findAttDefLocalPart(unsigned long const,XMLCh const *const) const; +%ignore getBaseAttDecl() const; +%ignore getFilter() const; +%ignore getPrefix() const; +%ignore getLocalPart() const; +%ignore getRawName() const; diff --git a/src/uscxml/plugins/datamodel/common/bindings/dom/typemaps-general.i b/src/uscxml/plugins/datamodel/common/bindings/dom/typemaps-general.i new file mode 100644 index 0000000..d82e508 --- /dev/null +++ b/src/uscxml/plugins/datamodel/common/bindings/dom/typemaps-general.i @@ -0,0 +1,169 @@ +/* + * Copyright 2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Scripting languages are not going to change the default memory manager + * so we always default this argument + */ +/*%typemap(in,numinputs=0) XERCES_CPP_NAMESPACE::MemoryManager* const manager "$1 = XERCES_CPP_NAMESPACE::XMLPlatformUtils::fgMemoryManager;"*/ + +/* + * MemBufInputSource::MemBufInputSource() + * + * ALWAYS ADOPT BUFFER (I.E. MAKE A COPY OF IT) SINCE IT IS TAKEN FROM + * THE SCRIPTING LANGUAGE, AND WHO KNOWS WHAT WILL HAPPEN TO IT AFTER + * IT IS GIVEN TO THE + * CONSTRUCTOR + */ + +// %typemap(in,numinputs=0) (unsigned int byteCount) "$1 = 0;" + +/* + * These arguments are used to indicate that Xerces-C should + * adopt a resource being passed as an argument. We should + * *always* tell Xerces-C to adopt. + */ +/*%typemap(in,numinputs=0) const bool adoptFlag "$1 = true;" // for Wrapper4InputSource + // and Wrapper4DOMInputSource +%typemap(in,numinputs=0) const bool adoptBuffer "$1 = true;" // for MemBufInputSource +*/ +// SAX2XMLReader::setProperty() should refuse the option to set the +// security manager + +/*%extend XERCES_CPP_NAMESPACE::SAX2XMLReader { +%typemap(check) (const XMLCh* const name, void* value) { + if (XMLString::compareIStringASCII($1, XMLUni::fgXercesSecurityManager) == 0) { + makeSAXNotSupportedException(SAXNotSupportedException("Setting security manager not supported")); + goto fail; + } +} +} +*/ +/* + * Enable conversion of void* => XMLCh* in setProperty() + * + * The in typemap converts the void* to an XMLCh* + * + * The freearg typemap deletes the transcoded string + * + */ +/*%typemap(in) (void* value) { + // now check the value + if ($input == &PL_sv_undef) { + SWIG_Perl_NullRef("perl-string",$argnum,"$symname"); + goto fail; + } else { + // we convert *everything* into a string that isn't undef + $1 = Perl2XMLString($input); + } +} + +%typemap(freearg) void * %{ + delete[] $1; +%} +*/ +/* + * Dynamic Casts + * + * This very cool SWIG feature enables use to return the correct object + * type to Perl when a C++ method is defined as returning a base class + * object. We define a method that tells what type subclass the object + * is in. + */ + +/* + * Grammar* + */ + +/*%typemap(out) XERCES_CPP_NAMESPACE::Grammar * = SWIGTYPE *DYNAMIC; + +DYNAMIC_CAST(SWIGTYPE_p_XERCES_CPP_NAMESPACE__Grammar, Grammar_dynamic_cast); + +%{ +static swig_type_info * +Grammar_dynamic_cast(void **ptr) { + Grammar **nptr = (Grammar **) ptr; + if (*nptr == NULL) { + return NULL; + } + short int type = (*nptr)->getGrammarType(); + if (type == Grammar::DTDGrammarType) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DTDGrammar; + } + if (type == Grammar::SchemaGrammarType) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__SchemaGrammar; + } + return NULL; +} +%} +*/ + +/* + * DOM_Node* + */ + +%typemap(out) XERCES_CPP_NAMESPACE::DOMNode * = SWIGTYPE *DYNAMIC; + +DYNAMIC_CAST(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, DOMNode_dynamic_cast); + +%{ +static swig_type_info * +DOMNode_dynamic_cast(void **ptr) { + DOMNode **nptr = (DOMNode **) ptr; + if (*nptr == NULL) { + return NULL; + } + short int type = (*nptr)->getNodeType(); + if (type == DOMNode::TEXT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText; + } + if (type == DOMNode::PROCESSING_INSTRUCTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction; + } + if (type == DOMNode::DOCUMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocument; + } + if (type == DOMNode::ELEMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement; + } + if (type == DOMNode::ENTITY_REFERENCE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference; + } + if (type == DOMNode::CDATA_SECTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection; + } + if (type == DOMNode::CDATA_SECTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection; + } + if (type == DOMNode::COMMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment; + } + if (type == DOMNode::DOCUMENT_TYPE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType; + } + if (type == DOMNode::ENTITY_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity; + } + if (type == DOMNode::ATTRIBUTE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr; + } + if (type == DOMNode::NOTATION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation; + } + return NULL; +} +%} + diff --git a/src/uscxml/plugins/datamodel/common/bindings/event.i b/src/uscxml/plugins/datamodel/common/bindings/event.i new file mode 100644 index 0000000..b7ef165 --- /dev/null +++ b/src/uscxml/plugins/datamodel/common/bindings/event.i @@ -0,0 +1,22 @@ +/* + * we will have to manage these by hand + */ + +%ignore uscxml::Event::data; // too ambituous +%ignore uscxml::Event::namelist; // not needed +%ignore uscxml::Event::params; // not needed +%ignore uscxml::Event::uuid; // only for internal use + +%ignore uscxml::Event::hideSendId; // not needed +%ignore uscxml::Event::sendid; // supposed to be undef not empty string +%ignore uscxml::Event::invokeid; // supposed to be undef not empty string + +%ignore uscxml::Event::eventtype; // not an enum but a string +%ignore uscxml::Event::origin; // supposed to be undef not empty string +%ignore uscxml::Event::origintype; // supposed to be undef not empty string + +%{ +using uscxml::Data; +%} + +%include "uscxml/messages/Event.h" diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp deleted file mode 100644 index 402152d..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "JSCDOM.h" - -namespace Arabica { -namespace DOM { - -JSCDOM::JSCDOM() { - nsInfo = NULL; - xpath = NULL; - storage = NULL; -} - -JSCDOM::~JSCDOM() { - if (nsInfo) - delete(nsInfo); - if (xpath) - delete(xpath); - if (storage) - delete(storage); - -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp.inc b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp.inc new file mode 100644 index 0000000..11a8863 --- /dev/null +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp.inc @@ -0,0 +1,9576 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 3.0.8 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ +template class SwigValueWrapper { + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } +}; + +template T SwigValueInit() { + return T(); +} +#endif + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + + +#define SWIG_AsCharPtrAndSize(val, cptr, psize, alloc) SWIG_JSC_AsCharPtrAndSize(context, val, cptr, psize, alloc) +#define SWIG_FromCharPtrAndSize(cptr, size) SWIG_JSC_FromCharPtrAndSize(context, cptr, size) +#define SWIG_FromCharPtr(cptr) SWIG_JSC_FromCharPtr(context, cptr) + + +#define SWIG_JSC_FROM_DECL_ARGS(arg1) (JSContextRef context, arg1) +#define SWIG_JSC_FROM_CALL_ARGS(arg1) (context, arg1) +#define SWIG_JSC_AS_DECL_ARGS(arg1, arg2) (JSContextRef context, arg1, arg2) +#define SWIG_JSC_AS_CALL_ARGS(arg1, arg2) (context, arg1, arg2) + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + +#include +#include +#include +#include +#include +#include + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast(r) (r) +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (equiv != 0 && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = SWIG_TypeNameComp(nb, ne, tb, te); + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +} + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + size_t l = 0; + size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + char d = *(c++); + unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +/* ---------------------------------------------------------------------------- + * Errors and exceptions + * + * ---------------------------------------------------------------------------*/ + +#define SWIG_Error(code, msg) SWIG_JSC_exception(context, exception, code, msg) +#define SWIG_exception(code, msg) SWIG_JSC_exception(context, exception, code, msg) +#define SWIG_fail goto fail + +SWIGRUNTIME void SWIG_Javascript_Raise(JSContextRef context, JSValueRef *exception, const char* type) { + JSStringRef message = JSStringCreateWithUTF8CString(type); + JSValueRef error_arguments[1]; + JSObjectRef exception_object; + JSValueRef exception_value; + exception_value = JSValueMakeString(context, message); + /* Converting the result to an object will let JavascriptCore add + "sourceURL" (file) and "line" (number) and "message" to the exception, + instead of just returning a raw string. This is extremely important for debugging your errors. + Using JSObjectMakeError is better than JSValueToObject because the latter only populates + "sourceURL" and "line", but not "message" or any others I don't know about. + */ + error_arguments[0] = exception_value; + exception_object = JSObjectMakeError(context, 1, error_arguments, NULL); + + /* Return the exception_object */ + *exception = exception_object; + + JSStringRelease(message); +} + +SWIGRUNTIME void SWIG_JSC_exception(JSContextRef context, JSValueRef *exception, int code, const char* msg) { + SWIG_Javascript_Raise(context, exception, msg); +} + +/* ---------------------------------------------------------------------------- + * The parent class of all Proxies + * + * ---------------------------------------------------------------------------*/ + +typedef struct { + bool swigCMemOwn; + void *swigCObject; + swig_type_info *info; +} SwigPrivData; + +SWIGRUNTIME JSValueRef _wrap_SwigObject_disown(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + JSValueRef jsresult; + + JSObjectRef obj = JSValueToObject(context, thisObject, NULL); + SwigPrivData *cdata = (SwigPrivData *) JSObjectGetPrivate(obj); + + cdata->swigCMemOwn = false; + + jsresult = JSValueMakeUndefined(context); + return jsresult; +} + +SWIGRUNTIME JSValueRef _wrap_SwigObject_getCPtr(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + JSValueRef jsresult; + long result; + + JSObjectRef obj = JSValueToObject(context, thisObject, NULL); + SwigPrivData *cdata = (SwigPrivData*) JSObjectGetPrivate(obj); + + result = (long) cdata->swigCObject; + jsresult = JSValueMakeNumber(context, result); + + return jsresult; +} + +SWIGRUNTIME JSValueRef _wrap_SwigObject_equals(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + JSValueRef jsresult; + bool result; + + JSObjectRef obj = JSValueToObject(context, thisObject, NULL); + SwigPrivData *cdata = (SwigPrivData*) JSObjectGetPrivate(obj); + + JSObjectRef obj2 = JSValueToObject(context, argv[0], NULL); + SwigPrivData *cdata2 = (SwigPrivData*) JSObjectGetPrivate(obj2); + + result = (cdata->swigCObject == cdata2->swigCObject); + jsresult = JSValueMakeBoolean(context, result); + + return jsresult; +} + +SWIGRUNTIME JSStaticValue _SwigObject_values[] = { + { + 0, 0, 0, 0 + } +}; + +SWIGRUNTIME JSStaticFunction _SwigObject_functions[] = { + { + "disown",_wrap_SwigObject_disown, kJSPropertyAttributeNone + }, + { + "equals",_wrap_SwigObject_equals, kJSPropertyAttributeNone + }, + { + "getCPtr",_wrap_SwigObject_getCPtr, kJSPropertyAttributeNone + }, + { + 0, 0, 0 + } +}; + +SWIGRUNTIME JSClassDefinition _SwigObject_objectDefinition; + +SWIGRUNTIME JSClassRef _SwigObject_classRef; + + +SWIGRUNTIME int SWIG_JSC_ConvertInstancePtr(JSContextRef context, JSObjectRef objRef, void** ptr, swig_type_info *info, int flags) { + SwigPrivData *cdata; + + cdata = (SwigPrivData *) JSObjectGetPrivate(objRef); + if(cdata == NULL) { + return SWIG_ERROR; + } + if(cdata->info != info) { + bool type_valid = false; + swig_cast_info *t = info->cast; + while(t != NULL) { + if(t->type == cdata->info) { + type_valid = true; + break; + } + t = t->next; + } + if(!type_valid) { + return SWIG_TypeError; + } + } + + *ptr = cdata->swigCObject; + + if(flags & SWIG_POINTER_DISOWN) { + cdata->swigCMemOwn = false; + } + + return SWIG_OK; +} + +SWIGRUNTIME int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, void** ptr, swig_type_info *info, int flags) { + JSObjectRef objRef; + + /* special case: JavaScript null => C NULL pointer */ + if(JSValueIsNull(context, valRef)) { + *ptr=0; + return SWIG_OK; + } + + if(!JSValueIsObject(context, valRef)) { + return SWIG_TypeError; + } + + objRef = JSValueToObject(context, valRef, NULL); + if(objRef == NULL) { + return SWIG_ERROR; + } + + return SWIG_JSC_ConvertInstancePtr(context, objRef, ptr, info, flags); +} + +SWIGRUNTIME JSObjectRef SWIG_JSC_NewPointerObj(JSContextRef context, void *ptr, swig_type_info *info, int flags) { + JSClassRef classRef; + JSObjectRef result; + SwigPrivData *cdata; + + if (ptr == NULL) { + // HACK: it is not possible to use JSValueToObject (causing seg-fault) + // This static cast turned out to be a workaround + // In future, we should change the interface of this method + // to return JSValueRef instead of JSObjectRef. + return (JSObjectRef) JSValueMakeNull(context); + } + + if(info->clientdata == NULL) { + classRef = _SwigObject_classRef; + } else { + classRef = (JSClassRef) info->clientdata; + } + + result = JSObjectMake(context, classRef, NULL); + + cdata = (SwigPrivData*) malloc(sizeof(SwigPrivData)); + cdata->swigCObject = ptr; + cdata->swigCMemOwn = (flags & SWIG_POINTER_OWN) ? 1 : 0; + cdata->info = info; + + JSObjectSetPrivate(result, cdata); + + return result; +} + +#define SWIG_ConvertPtr(obj, ptr, info, flags) SWIG_JSC_ConvertPtr(context, obj, ptr, info, flags) +#define SWIG_NewPointerObj(ptr, info, flags) SWIG_JSC_NewPointerObj(context, ptr, info, flags) + +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_JSC_ConvertInstancePtr(context, obj, pptr, type, flags) +#define SWIG_NewInstanceObj(thisvalue, type, flags) SWIG_JSC_NewPointerObj(context, thisvalue, type, flags) + +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_JSC_ConvertPtr(context, obj, pptr, type, 0) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_JSC_NewPointerObj(context, ptr, type, 0) + +/* ---------------------------------------------------------------------------- + * A class for packed data + * + * ---------------------------------------------------------------------------*/ + +typedef struct { + void *data; + size_t size; + swig_type_info *type; +} SwigPackedData; + +SWIGRUNTIME JSStaticValue _SwigPackedData_values[] = { + { + 0, 0, 0, 0 + } +}; +SWIGRUNTIME JSStaticFunction _SwigPackedData_functions[] = { + { + 0, 0, 0 + } +}; +SWIGRUNTIME JSClassDefinition _SwigPackedData_objectDefinition; +SWIGRUNTIME JSClassRef _SwigPackedData_classRef; + +SWIGRUNTIMEINLINE +int SwigJSCPacked_Check(JSContextRef context, JSValueRef valRef) { + return JSValueIsObjectOfClass(context, valRef, _SwigPackedData_classRef); +} + +SWIGRUNTIME +swig_type_info* SwigJSCPacked_UnpackData(JSContextRef context, JSValueRef valRef, void *ptr, size_t size) { + if (SwigJSCPacked_Check(context, valRef)) { + JSObjectRef objRef = JSValueToObject(context, valRef, NULL); + SwigPackedData *sobj = (SwigPackedData *) JSObjectGetPrivate(objRef); + if (sobj->size != size) return 0; + memcpy(ptr, sobj->data, size); + return sobj->type; + } else { + return 0; + } +} + +SWIGRUNTIME +int SWIG_JSC_ConvertPacked(JSContextRef context, JSValueRef valRef, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = SwigJSCPacked_UnpackData(context, valRef, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +SWIGRUNTIME +JSValueRef SWIG_JSC_NewPackedObj(JSContextRef context, void *data, size_t size, swig_type_info *type) { + + JSClassRef classRef = _SwigObject_classRef; + JSObjectRef result = JSObjectMake(context, classRef, NULL); + + SwigPackedData* cdata = (SwigPackedData*) malloc(sizeof(SwigPackedData)); + cdata->data = data; + cdata->size = size; + cdata->type = type; + + JSObjectSetPrivate(result, cdata); + + return result; +} + +/* SwigPackedData wrappers */ +SWIGRUNTIME +void _wrap_SwigPackedData_delete(JSObjectRef obj) +{ + SwigPackedData* cdata = (SwigPackedData*) JSObjectGetPrivate(obj); + if (cdata) { + free(cdata->data); + } +} + +/* for C++ member pointers, ie, member methods */ + +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_JSC_ConvertPacked(context, obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_JSC_NewPackedObj(context, ptr, sz, type) + + +/* --------------------------------------------------------------------------- + * Support for IN/OUTPUT typemaps (see Lib/typemaps/inoutlist.swg) + * + * ---------------------------------------------------------------------------*/ +SWIGRUNTIME +unsigned int SWIGJSC_ArrayLength(JSContextRef context, JSObjectRef arr) { + static JSStringRef LENGTH = 0; + JSValueRef exception = NULL; + JSValueRef js_length; + double length; + + if (LENGTH == 0) { + LENGTH = JSStringCreateWithUTF8CString("length"); + } + + js_length = JSObjectGetProperty(context, arr, LENGTH, &exception); + if (exception == 0 && JSValueIsNumber(context, js_length)) { + length = JSValueToNumber(context, js_length, 0); + return (unsigned int) length; + } else { + return 0; + } +} + +SWIGRUNTIME +JSValueRef SWIGJSC_AppendOutput(JSContextRef context, JSValueRef value, JSValueRef obj) { + JSObjectRef arr; + unsigned int length; + + if (JSValueIsUndefined(context, value)) { + arr = JSObjectMakeArray(context, 0, 0, 0); + } else { + arr = JSValueToObject(context, value, 0); + } + + length = SWIGJSC_ArrayLength(context, arr); + JSObjectSetPropertyAtIndex(context, arr, length, obj, 0); + return arr; +} + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_Data swig_types[0] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr swig_types[1] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection swig_types[2] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData swig_types[3] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment swig_types[4] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocument swig_types[5] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentFragment swig_types[6] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType swig_types[7] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement swig_types[8] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity swig_types[9] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference swig_types[10] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException swig_types[11] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap swig_types[12] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode swig_types[13] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList swig_types[14] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation swig_types[15] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction swig_types[16] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText swig_types[17] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMTypeInfo swig_types[18] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMUserDataHandler swig_types[19] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__MemoryManager swig_types[20] +#define SWIGTYPE_p_bool swig_types[21] +#define SWIGTYPE_p_char swig_types[22] +#define SWIGTYPE_p_int16_t swig_types[23] +#define SWIGTYPE_p_int32_t swig_types[24] +#define SWIGTYPE_p_int64_t swig_types[25] +#define SWIGTYPE_p_namelist_t swig_types[26] +#define SWIGTYPE_p_params_t swig_types[27] +#define SWIGTYPE_p_size_t swig_types[28] +#define SWIGTYPE_p_ssize_t swig_types[29] +#define SWIGTYPE_p_std__listT_Data_t swig_types[30] +#define SWIGTYPE_p_std__multimapT_std__string_Data_t swig_types[31] +#define SWIGTYPE_p_uint16_t swig_types[32] +#define SWIGTYPE_p_uint32_t swig_types[33] +#define SWIGTYPE_p_uint64_t swig_types[34] +#define SWIGTYPE_p_unsigned_char swig_types[35] +#define SWIGTYPE_p_uscxml__ErrorEvent swig_types[36] +#define SWIGTYPE_p_uscxml__Event swig_types[37] +#define SWIGTYPE_p_void swig_types[38] +static swig_type_info *swig_types[40]; +static swig_module_info swig_module = {swig_types, 39, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + + + +#define SWIGVERSION 0x030008 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) (void *)((const void *)(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) + + +#include + + +SWIGINTERNINLINE JSValueRef + SWIG_From_int SWIG_JSC_FROM_DECL_ARGS(int value) +{ + return JSValueMakeNumber(context, value); +} + + +#include + + +#include "xercesc/sax/InputSource.hpp" +#include "xercesc/sax/SAXException.hpp" +#include "xercesc/sax/SAXParseException.hpp" +#include "xercesc/sax/Locator.hpp" +#include "xercesc/sax/HandlerBase.hpp" +#include "xercesc/sax2/Attributes.hpp" +#include "xercesc/sax2/ContentHandler.hpp" +#include "xercesc/sax2/LexicalHandler.hpp" +#include "xercesc/sax2/DefaultHandler.hpp" +#include "xercesc/sax2/SAX2XMLReader.hpp" +#include "xercesc/sax2/XMLReaderFactory.hpp" +#include "xercesc/util/PlatformUtils.hpp" +#include "xercesc/util/TransService.hpp" +#include "xercesc/util/XMLString.hpp" +#include "xercesc/util/XMLUri.hpp" +#include "xercesc/util/QName.hpp" +#include "xercesc/util/HexBin.hpp" +#include "xercesc/util/Base64.hpp" +#include "xercesc/parsers/AbstractDOMParser.hpp" +#include "xercesc/parsers/XercesDOMParser.hpp" +#include "xercesc/parsers/SAXParser.hpp" +#include "xercesc/dom/DOM.hpp" +#include "xercesc/framework/LocalFileInputSource.hpp" +#include "xercesc/framework/MemBufInputSource.hpp" +#include "xercesc/framework/StdInInputSource.hpp" +#include "xercesc/framework/URLInputSource.hpp" +#include "xercesc/framework/XMLGrammarDescription.hpp" +#include "xercesc/framework/XMLDTDDescription.hpp" +#include "xercesc/framework/XMLSchemaDescription.hpp" +#include "xercesc/util/NameIdPool.hpp" +#include "xercesc/util/XMLEnumerator.hpp" +#include "xercesc/framework/XMLValidator.hpp" +#include "xercesc/validators/common/Grammar.hpp" +#include "xercesc/validators/DTD/DTDAttDef.hpp" +#include "xercesc/validators/DTD/DTDAttDefList.hpp" +#include "xercesc/validators/DTD/DTDGrammar.hpp" +#include "xercesc/validators/DTD/DTDValidator.hpp" +#include "xercesc/validators/schema/SchemaGrammar.hpp" +#include "xercesc/validators/schema/SchemaValidator.hpp" +#include "xercesc/validators/schema/SchemaAttDefList.hpp" +#include "xercesc/validators/schema/SchemaAttDef.hpp" +#include "xercesc/framework/XMLFormatter.hpp" +#include "xercesc/framework/MemBufFormatTarget.hpp" +#include "xercesc/framework/LocalFileFormatTarget.hpp" +#include "xercesc/framework/StdOutFormatTarget.hpp" +#include "xercesc/framework/Wrapper4InputSource.hpp" +#include "xercesc/framework/psvi/PSVIHandler.hpp" + +// for resolving XMLExceptions +#include "xercesc/util/ArrayIndexOutOfBoundsException.hpp" +#include "xercesc/util/EmptyStackException.hpp" +#include "xercesc/util/IllegalArgumentException.hpp" +#include "xercesc/util/InvalidCastException.hpp" +#include "xercesc/util/IOException.hpp" +#include "xercesc/util/NoSuchElementException.hpp" +#include "xercesc/util/NullPointerException.hpp" +#include "xercesc/util/NumberFormatException.hpp" +#include "xercesc/util/ParseException.hpp" +#include "xercesc/util/RuntimeException.hpp" +#include "xercesc/util/SchemaDateTimeException.hpp" +#include "xercesc/util/TranscodingException.hpp" +#include "xercesc/util/UnexpectedEOFException.hpp" +#include "xercesc/util/UnsupportedEncodingException.hpp" +#include "xercesc/util/UTFDataFormatException.hpp" +#include "xercesc/util/XMLNetAccessor.hpp" +#include "xercesc/internal/XSerializationException.hpp" +#include "xercesc/validators/datatype/InvalidDatatypeFacetException.hpp" +#include "xercesc/validators/datatype/InvalidDatatypeValueException.hpp" +#include "xercesc/validators/schema/identity/XPathException.hpp" + +XERCES_CPP_NAMESPACE_USE + +// we initialize the static UTF-8 transcoding info +// these are used by the typemaps to convert between +// Xerces internal UTF-16 and Perl's internal UTF-8 +static XMLCh* UTF8_ENCODING = NULL; +static XMLTranscoder* UTF8_TRANSCODER = NULL; + +static bool DEBUG_UTF8_OUT = 0; +static bool DEBUG_UTF8_IN = 0; + + + +SWIGINTERN int +SWIG_AsVal_double SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, double *val) +{ + if(!JSValueIsNumber(context, obj)) { + return SWIG_TypeError; + } + if(val) *val = JSValueToNumber(context, obj, NULL); + + return SWIG_OK; +} + + +#include + + +#include + + +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; +} + + +SWIGINTERN int +SWIG_AsVal_long SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, long* val) +{ + if (!JSValueIsNumber(context, obj)) { + return SWIG_TypeError; + } + if(val) *val = (long) JSValueToNumber(context, obj, NULL); + + return SWIG_OK; +} + + +SWIGINTERN +int SWIG_AsVal_bool SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, bool *val) +{ + if(!JSValueIsBoolean(context, obj)) { + return SWIG_ERROR; + } + if (val) *val = JSValueToBoolean(context, obj); + return SWIG_OK; +} + + +SWIGINTERNINLINE +JSValueRef SWIG_From_bool SWIG_JSC_FROM_DECL_ARGS(bool value) +{ + return JSValueMakeBoolean(context, value); +} + + +static swig_type_info * +DOMNode_dynamic_cast(void **ptr) { + DOMNode **nptr = (DOMNode **) ptr; + if (*nptr == NULL) { + return NULL; + } + short int type = (*nptr)->getNodeType(); + if (type == DOMNode::TEXT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText; + } + if (type == DOMNode::PROCESSING_INSTRUCTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction; + } + if (type == DOMNode::DOCUMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocument; + } + if (type == DOMNode::ELEMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement; + } + if (type == DOMNode::ENTITY_REFERENCE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference; + } + if (type == DOMNode::CDATA_SECTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection; + } + if (type == DOMNode::CDATA_SECTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection; + } + if (type == DOMNode::COMMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment; + } + if (type == DOMNode::DOCUMENT_TYPE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType; + } + if (type == DOMNode::ENTITY_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity; + } + if (type == DOMNode::ATTRIBUTE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr; + } + if (type == DOMNode::NOTATION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation; + } + return NULL; +} + + +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +SWIGINTERN int +SWIG_AsVal_short SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, short *val) +{ + long v; + int res = SWIG_AsVal_long SWIG_JSC_AS_CALL_ARGS(obj, &v); + if (SWIG_IsOK(res)) { + if ((v < SHRT_MIN || v > SHRT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (short)(v); + } + } + return res; +} + + +SWIGINTERNINLINE JSValueRef +SWIG_From_long SWIG_JSC_FROM_DECL_ARGS(long value) +{ + return JSValueMakeNumber(context, value); +} + + +SWIGINTERNINLINE JSValueRef +SWIG_From_short SWIG_JSC_FROM_DECL_ARGS(short value) +{ + return SWIG_From_long SWIG_JSC_FROM_CALL_ARGS(value); +} + + +SWIGINTERNINLINE JSValueRef +SWIG_From_unsigned_SS_long SWIG_JSC_FROM_DECL_ARGS(unsigned long value) +{ + return (value > LONG_MAX) ? + JSValueMakeNumber(context, value) : JSValueMakeNumber(context, (long)(value)); +} + + +SWIGINTERNINLINE JSValueRef +SWIG_From_size_t SWIG_JSC_FROM_DECL_ARGS(size_t value) +{ + return SWIG_From_unsigned_SS_long SWIG_JSC_FROM_CALL_ARGS((unsigned long)(value)); +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, unsigned long *val) +{ + long longVal; + if(!JSValueIsNumber(context, obj)) { + return SWIG_TypeError; + } + + longVal = (long) JSValueToNumber(context, obj, NULL); + + if(longVal < 0) { + return SWIG_OverflowError; + } + + if(val) *val = longVal; + + return SWIG_OK; +} + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, size_t *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long SWIG_JSC_AS_CALL_ARGS(obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); + return res; +} + + +using uscxml::Data; + + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERN int +SWIG_JSC_AsCharPtrAndSize(JSContextRef context, JSValueRef valRef, char** cptr, size_t* psize, int *alloc) +{ + if(JSValueIsString(context, valRef)) { + JSStringRef js_str = JSValueToStringCopy(context, valRef, NULL); + size_t len = JSStringGetMaximumUTF8CStringSize(js_str); + char* cstr = (char*) (new char[len]); + /* JSStringGetUTF8CString returns the length including 0-terminator */ + len = JSStringGetUTF8CString(js_str, cstr, len); + + if(alloc) *alloc = SWIG_NEWOBJ; + if(psize) *psize = len; + if(cptr) *cptr = cstr; + + return SWIG_OK; + } else { + if(JSValueIsObject(context, valRef)) { + JSObjectRef obj = JSValueToObject(context, valRef, NULL); + // try if the object is a wrapped char[] + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + return SWIG_TypeError; + } else { + return SWIG_TypeError; + } + } +} + + +SWIGINTERN int +SWIG_AsPtr_std_string SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, std::string **val) +{ + char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; + if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { + if (buf) { + if (val) *val = new std::string(buf, size - 1); + if (alloc == SWIG_NEWOBJ) delete[] buf; + return SWIG_NEWOBJ; + } else { + if (val) *val = 0; + return SWIG_OLDOBJ; + } + } else { + static int init = 0; + static swig_type_info* descriptor = 0; + if (!init) { + descriptor = SWIG_TypeQuery("std::string" " *"); + init = 1; + } + if (descriptor) { + std::string *vptr; + int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); + if (SWIG_IsOK(res) && val) *val = vptr; + return res; + } + } + return SWIG_ERROR; +} + + +SWIGINTERN int +SWIG_AsVal_int SWIG_JSC_AS_DECL_ARGS(JSValueRef obj, int *val) +{ + long v; + int res = SWIG_AsVal_long SWIG_JSC_AS_CALL_ARGS(obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (int)(v); + } + } + return res; +} + + +SWIGINTERNINLINE JSValueRef +SWIG_JSC_FromCharPtrAndSize(JSContextRef context, const char* carray, size_t size) +{ + if (carray) { + if (size > INT_MAX) { + // TODO: handle extra long strings + //swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + //return pchar_descriptor ? + // SWIG_InternalNewPointerObj(%const_cast(carray,char *), pchar_descriptor, 0) : SWIG_Py_Void(); + return JSValueMakeUndefined(context); + } else { + JSStringRef jsstring; + JSValueRef result; + if(size < 2) { + char c[2]; + int i; + for(i=0;iswigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMException * arg1 = (XERCES_CPP_NAMESPACE::DOMException *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMException_getMessage(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMException_getMessage."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_getMessage" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMException const *)arg1)->getMessage(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static bool _wrap_DOMException_code_set(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + short arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + short val2 ; + int ecode2 = 0 ; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_code_set" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + ecode2 = SWIG_AsVal_short SWIG_JSC_AS_CALL_ARGS(value, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMException_code_set" "', argument " "2"" of type '" "short""'"); + } + arg2 = (short)(val2); + if (arg1) (arg1)->code = arg2; + + + + + return true; + + goto fail; +fail: + return false; +} + + +static JSValueRef _wrap_DOMException_code_get(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + short result; + + JSValueRef jsresult; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_code_get" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + result = (short) ((arg1)->code); + jsresult = SWIG_From_short SWIG_JSC_FROM_CALL_ARGS((short)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static bool _wrap_DOMException_msg_set(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_msg_set" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + + arg2 = JS2XMLString(value, context); + + if (arg1) (arg1)->msg = (XMLCh const *)arg2; + + + delete[] arg2; + + + + return true; + + goto fail; +fail: + return false; +} + + +static JSValueRef _wrap_DOMException_msg_get(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_msg_get" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + result = (XMLCh *) ((arg1)->msg); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMException_staticValues[] = { + { + "INDEX_SIZE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INDEX_SIZE_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOMSTRING_SIZE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_DOMSTRING_SIZE_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "HIERARCHY_REQUEST_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_HIERARCHY_REQUEST_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "WRONG_DOCUMENT_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_WRONG_DOCUMENT_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "INVALID_CHARACTER_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_CHARACTER_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "NO_DATA_ALLOWED_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NO_DATA_ALLOWED_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "NO_MODIFICATION_ALLOWED_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NO_MODIFICATION_ALLOWED_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "NOT_FOUND_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NOT_FOUND_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "NOT_SUPPORTED_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NOT_SUPPORTED_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "INUSE_ATTRIBUTE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INUSE_ATTRIBUTE_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "INVALID_STATE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_STATE_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "SYNTAX_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_SYNTAX_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "INVALID_MODIFICATION_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_MODIFICATION_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "NAMESPACE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NAMESPACE_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "INVALID_ACCESS_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_ACCESS_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "VALIDATION_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_VALIDATION_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "TYPE_MISMATCH_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_TYPE_MISMATCH_ERR, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMException_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMException_values[] = { + { + "code", _wrap_DOMException_code_get, _wrap_DOMException_code_set, kJSPropertyAttributeNone + }, + + + { + "msg", _wrap_DOMException_msg_get, _wrap_DOMException_msg_set, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMException_functions[] = { + { + "getMessage", _wrap_DOMException_getMessage, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSClassDefinition _exports_DOMNode_classDefinition; + +static JSClassDefinition _exports_DOMNode_objectDefinition; + +static JSClassRef _exports_DOMNode_classRef; + + +static void _wrap_delete_DOMNode(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMNode * arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_ELEMENT_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::ELEMENT_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_ATTRIBUTE_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::ATTRIBUTE_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_TEXT_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::TEXT_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_CDATA_SECTION_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::CDATA_SECTION_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_ENTITY_REFERENCE_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::ENTITY_REFERENCE_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_ENTITY_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::ENTITY_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_PROCESSING_INSTRUCTION_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::PROCESSING_INSTRUCTION_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_COMMENT_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::COMMENT_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_TYPE_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_TYPE_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_FRAGMENT_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_FRAGMENT_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_NOTATION_NODE(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::NOTATION_NODE)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_DISCONNECTED(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_DISCONNECTED)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_PRECEDING(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_PRECEDING)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_FOLLOWING(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_FOLLOWING)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_CONTAINS(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_CONTAINS)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_CONTAINED_BY(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_CONTAINED_BY)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getNodeName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNodeName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNodeName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNodeName(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getNodeValue(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNodeValue."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNodeValue" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNodeValue(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getNodeType(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode::NodeType result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNodeType."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNodeType" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode::NodeType)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNodeType(); + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getParentNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getParentNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getParentNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getParentNode(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getChildNodes(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNodeList *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getChildNodes."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getChildNodes" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNodeList *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getChildNodes(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getFirstChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getFirstChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getFirstChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getFirstChild(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getLastChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getLastChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getLastChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getLastChild(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getPreviousSibling(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getPreviousSibling."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getPreviousSibling" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getPreviousSibling(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getNextSibling(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNextSibling."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNextSibling" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNextSibling(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getAttributes(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getAttributes."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getAttributes" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getAttributes(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getOwnerDocument(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMDocument *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getOwnerDocument."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getOwnerDocument" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMDocument *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getOwnerDocument(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocument, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_cloneNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_cloneNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_cloneNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + ecode2 = SWIG_AsVal_bool SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMNode_cloneNode" "', argument " "2"" of type '" "bool""'"); + } + arg2 = (bool)(val2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->cloneNode(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_insertBefore(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg3 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_insertBefore."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_insertBefore" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_insertBefore" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DOMNode_insertBefore" "', argument " "3"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg3 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp3); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->insertBefore(arg2,arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_replaceChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg3 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_replaceChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_replaceChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_replaceChild" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DOMNode_replaceChild" "', argument " "3"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg3 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp3); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->replaceChild(arg2,arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_removeChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_removeChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_removeChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_removeChild" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->removeChild(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_appendChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_appendChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_appendChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_appendChild" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->appendChild(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_hasChildNodes(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_hasChildNodes."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_hasChildNodes" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->hasChildNodes(); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_setNodeValue(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_setNodeValue."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_setNodeValue" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->setNodeValue((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_normalize(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_normalize."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_normalize" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + (arg1)->normalize(); + jsresult = JSValueMakeUndefined(context); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_isSupported(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_isSupported."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_isSupported" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isSupported((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getNamespaceURI(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNamespaceURI."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNamespaceURI" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNamespaceURI(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getLocalName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getLocalName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getLocalName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getLocalName(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_setPrefix(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_setPrefix."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_setPrefix" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->setPrefix((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_hasAttributes(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_hasAttributes."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_hasAttributes" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->hasAttributes(); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_isSameNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_isSameNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_isSameNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_isSameNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isSameNode((XERCES_CPP_NAMESPACE::DOMNode const *)arg2); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_isEqualNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_isEqualNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_isEqualNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_isEqualNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isEqualNode((XERCES_CPP_NAMESPACE::DOMNode const *)arg2); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_setUserData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *arg3 = (void *) 0 ; + XERCES_CPP_NAMESPACE::DOMUserDataHandler *arg4 = (XERCES_CPP_NAMESPACE::DOMUserDataHandler *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *result = 0 ; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_setUserData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_setUserData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + res3 = SWIG_ConvertPtr(argv[1],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DOMNode_setUserData" "', argument " "3"" of type '" "void *""'"); + } + res4 = SWIG_ConvertPtr(argv[2], &argp4,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DOMNode_setUserData" "', argument " "4"" of type '" "XERCES_CPP_NAMESPACE::DOMUserDataHandler *""'"); + } + arg4 = (XERCES_CPP_NAMESPACE::DOMUserDataHandler *)(argp4); + result = (void *)(arg1)->setUserData((XMLCh const *)arg2,arg3,arg4); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + + + delete[] arg2; + + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getUserData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getUserData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getUserData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (void *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getUserData((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getBaseURI(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getBaseURI."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getBaseURI" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getBaseURI(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_compareDocumentPosition(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + short result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_compareDocumentPosition."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_compareDocumentPosition" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_compareDocumentPosition" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (short)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->compareDocumentPosition((XERCES_CPP_NAMESPACE::DOMNode const *)arg2); + jsresult = SWIG_From_short SWIG_JSC_FROM_CALL_ARGS((short)(result)); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getTextContent(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getTextContent."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getTextContent" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getTextContent(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_setTextContent(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_setTextContent."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_setTextContent" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->setTextContent((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_lookupPrefix(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_lookupPrefix."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_lookupPrefix" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->lookupPrefix((XMLCh const *)arg2); + + jsresult = XMLString2JS(result, context); + + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_isDefaultNamespace(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_isDefaultNamespace."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_isDefaultNamespace" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isDefaultNamespace((XMLCh const *)arg2); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_lookupNamespaceURI(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_lookupNamespaceURI."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_lookupNamespaceURI" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->lookupNamespaceURI((XMLCh const *)arg2); + + jsresult = XMLString2JS(result, context); + + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_getFeature(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getFeature."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getFeature" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (void *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getFeature((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNode_release(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_release."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_release" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + (arg1)->release(); + jsresult = JSValueMakeUndefined(context); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMNode_staticValues[] = { + { + "ELEMENT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_ELEMENT_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "ATTRIBUTE_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_ATTRIBUTE_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "TEXT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_TEXT_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "CDATA_SECTION_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_CDATA_SECTION_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "ENTITY_REFERENCE_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_ENTITY_REFERENCE_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "ENTITY_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_ENTITY_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "PROCESSING_INSTRUCTION_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_PROCESSING_INSTRUCTION_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "COMMENT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_COMMENT_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_TYPE_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_TYPE_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_FRAGMENT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_FRAGMENT_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "NOTATION_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_NOTATION_NODE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_POSITION_DISCONNECTED", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_DISCONNECTED, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_POSITION_PRECEDING", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_PRECEDING, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_POSITION_FOLLOWING", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_FOLLOWING, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_POSITION_CONTAINS", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_CONTAINS, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_POSITION_CONTAINED_BY", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_CONTAINED_BY, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNode_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMNode_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNode_functions[] = { + { + "getNodeName", _wrap_DOMNode_getNodeName, kJSPropertyAttributeNone + }, + + + { + "getNodeValue", _wrap_DOMNode_getNodeValue, kJSPropertyAttributeNone + }, + + + { + "getNodeType", _wrap_DOMNode_getNodeType, kJSPropertyAttributeNone + }, + + + { + "getParentNode", _wrap_DOMNode_getParentNode, kJSPropertyAttributeNone + }, + + + { + "getChildNodes", _wrap_DOMNode_getChildNodes, kJSPropertyAttributeNone + }, + + + { + "getFirstChild", _wrap_DOMNode_getFirstChild, kJSPropertyAttributeNone + }, + + + { + "getLastChild", _wrap_DOMNode_getLastChild, kJSPropertyAttributeNone + }, + + + { + "getPreviousSibling", _wrap_DOMNode_getPreviousSibling, kJSPropertyAttributeNone + }, + + + { + "getNextSibling", _wrap_DOMNode_getNextSibling, kJSPropertyAttributeNone + }, + + + { + "getAttributes", _wrap_DOMNode_getAttributes, kJSPropertyAttributeNone + }, + + + { + "getOwnerDocument", _wrap_DOMNode_getOwnerDocument, kJSPropertyAttributeNone + }, + + + { + "cloneNode", _wrap_DOMNode_cloneNode, kJSPropertyAttributeNone + }, + + + { + "insertBefore", _wrap_DOMNode_insertBefore, kJSPropertyAttributeNone + }, + + + { + "replaceChild", _wrap_DOMNode_replaceChild, kJSPropertyAttributeNone + }, + + + { + "removeChild", _wrap_DOMNode_removeChild, kJSPropertyAttributeNone + }, + + + { + "appendChild", _wrap_DOMNode_appendChild, kJSPropertyAttributeNone + }, + + + { + "hasChildNodes", _wrap_DOMNode_hasChildNodes, kJSPropertyAttributeNone + }, + + + { + "setNodeValue", _wrap_DOMNode_setNodeValue, kJSPropertyAttributeNone + }, + + + { + "normalize", _wrap_DOMNode_normalize, kJSPropertyAttributeNone + }, + + + { + "isSupported", _wrap_DOMNode_isSupported, kJSPropertyAttributeNone + }, + + + { + "getNamespaceURI", _wrap_DOMNode_getNamespaceURI, kJSPropertyAttributeNone + }, + + + { + "getLocalName", _wrap_DOMNode_getLocalName, kJSPropertyAttributeNone + }, + + + { + "setPrefix", _wrap_DOMNode_setPrefix, kJSPropertyAttributeNone + }, + + + { + "hasAttributes", _wrap_DOMNode_hasAttributes, kJSPropertyAttributeNone + }, + + + { + "isSameNode", _wrap_DOMNode_isSameNode, kJSPropertyAttributeNone + }, + + + { + "isEqualNode", _wrap_DOMNode_isEqualNode, kJSPropertyAttributeNone + }, + + + { + "setUserData", _wrap_DOMNode_setUserData, kJSPropertyAttributeNone + }, + + + { + "getUserData", _wrap_DOMNode_getUserData, kJSPropertyAttributeNone + }, + + + { + "getBaseURI", _wrap_DOMNode_getBaseURI, kJSPropertyAttributeNone + }, + + + { + "compareDocumentPosition", _wrap_DOMNode_compareDocumentPosition, kJSPropertyAttributeNone + }, + + + { + "getTextContent", _wrap_DOMNode_getTextContent, kJSPropertyAttributeNone + }, + + + { + "setTextContent", _wrap_DOMNode_setTextContent, kJSPropertyAttributeNone + }, + + + { + "lookupPrefix", _wrap_DOMNode_lookupPrefix, kJSPropertyAttributeNone + }, + + + { + "isDefaultNamespace", _wrap_DOMNode_isDefaultNamespace, kJSPropertyAttributeNone + }, + + + { + "lookupNamespaceURI", _wrap_DOMNode_lookupNamespaceURI, kJSPropertyAttributeNone + }, + + + { + "getFeature", _wrap_DOMNode_getFeature, kJSPropertyAttributeNone + }, + + + { + "release", _wrap_DOMNode_release, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMNode(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMNode can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMAttr_classDefinition; + +static JSClassDefinition _exports_DOMAttr_objectDefinition; + +static JSClassRef _exports_DOMAttr_classRef; + + +static void _wrap_delete_DOMAttr(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMAttr * arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMAttr_getName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getName(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMAttr_getSpecified(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getSpecified."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getSpecified" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getSpecified(); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMAttr_getValue(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getValue."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getValue" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getValue(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMAttr_setValue(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_setValue."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_setValue" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->setValue((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMAttr_getOwnerElement(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getOwnerElement."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getOwnerElement" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getOwnerElement(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMAttr_isId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_isId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_isId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->isId(); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMAttr_getSchemaTypeInfo(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMTypeInfo *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getSchemaTypeInfo."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getSchemaTypeInfo" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMTypeInfo *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getSchemaTypeInfo(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMTypeInfo, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMAttr_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMAttr_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMAttr_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMAttr_functions[] = { + { + "getName", _wrap_DOMAttr_getName, kJSPropertyAttributeNone + }, + + + { + "getSpecified", _wrap_DOMAttr_getSpecified, kJSPropertyAttributeNone + }, + + + { + "getValue", _wrap_DOMAttr_getValue, kJSPropertyAttributeNone + }, + + + { + "setValue", _wrap_DOMAttr_setValue, kJSPropertyAttributeNone + }, + + + { + "getOwnerElement", _wrap_DOMAttr_getOwnerElement, kJSPropertyAttributeNone + }, + + + { + "isId", _wrap_DOMAttr_isId, kJSPropertyAttributeNone + }, + + + { + "getSchemaTypeInfo", _wrap_DOMAttr_getSchemaTypeInfo, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMAttr(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMAttr can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMElement_classDefinition; + +static JSClassDefinition _exports_DOMElement_objectDefinition; + +static JSClassRef _exports_DOMElement_classRef; + + +static void _wrap_delete_DOMElement(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMElement * arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMElement_getTagName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getTagName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getTagName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getTagName(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getAttribute(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getAttribute."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttribute((XMLCh const *)arg2); + + jsresult = XMLString2JS(result, context); + + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getAttributeNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getAttributeNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getAttributeNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XERCES_CPP_NAMESPACE::DOMAttr *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttributeNode((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getElementsByTagName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNodeList *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getElementsByTagName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getElementsByTagName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XERCES_CPP_NAMESPACE::DOMNodeList *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getElementsByTagName((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setAttribute(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setAttribute."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + (arg1)->setAttribute((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setAttributeNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setAttributeNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setAttributeNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMElement_setAttributeNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMAttr *)(arg1)->setAttributeNode(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_removeAttributeNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_removeAttributeNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_removeAttributeNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMElement_removeAttributeNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMAttr *)(arg1)->removeAttributeNode(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_removeAttribute(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_removeAttribute."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_removeAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->removeAttribute((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getAttributeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getAttributeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + + jsresult = XMLString2JS(result, context); + + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setAttributeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + XMLCh *arg4 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setAttributeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + + arg4 = JS2XMLString(argv[2], context); + + (arg1)->setAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3,(XMLCh const *)arg4); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + delete[] arg3; + + + delete[] arg4; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_removeAttributeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_removeAttributeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_removeAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + (arg1)->removeAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getAttributeNodeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getAttributeNodeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getAttributeNodeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (XERCES_CPP_NAMESPACE::DOMAttr *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttributeNodeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setAttributeNodeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setAttributeNodeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setAttributeNodeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMElement_setAttributeNodeNS" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMAttr *)(arg1)->setAttributeNodeNS(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getElementsByTagNameNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNodeList *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getElementsByTagNameNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getElementsByTagNameNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (XERCES_CPP_NAMESPACE::DOMNodeList *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getElementsByTagNameNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_hasAttribute(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_hasAttribute."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_hasAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->hasAttribute((XMLCh const *)arg2); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_hasAttributeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_hasAttributeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_hasAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->hasAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setIdAttribute(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val3 ; + int ecode3 = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setIdAttribute."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setIdAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + ecode3 = SWIG_AsVal_bool SWIG_JSC_AS_CALL_ARGS(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMElement_setIdAttribute" "', argument " "3"" of type '" "bool""'"); + } + arg3 = (bool)(val3); + (arg1)->setIdAttribute((XMLCh const *)arg2,arg3); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setIdAttributeNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val4 ; + int ecode4 = 0 ; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setIdAttributeNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setIdAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + ecode4 = SWIG_AsVal_bool SWIG_JSC_AS_CALL_ARGS(argv[2], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DOMElement_setIdAttributeNS" "', argument " "4"" of type '" "bool""'"); + } + arg4 = (bool)(val4); + (arg1)->setIdAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3,arg4); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + delete[] arg3; + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_setIdAttributeNode(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setIdAttributeNode."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setIdAttributeNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMElement_setIdAttributeNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp2); + ecode3 = SWIG_AsVal_bool SWIG_JSC_AS_CALL_ARGS(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMElement_setIdAttributeNode" "', argument " "3"" of type '" "bool""'"); + } + arg3 = (bool)(val3); + (arg1)->setIdAttributeNode((XERCES_CPP_NAMESPACE::DOMAttr const *)arg2,arg3); + jsresult = JSValueMakeUndefined(context); + + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getSchemaTypeInfo(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMTypeInfo *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getSchemaTypeInfo."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getSchemaTypeInfo" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMTypeInfo *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getSchemaTypeInfo(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMTypeInfo, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getFirstElementChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getFirstElementChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getFirstElementChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getFirstElementChild(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getLastElementChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getLastElementChild."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getLastElementChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getLastElementChild(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getPreviousElementSibling(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getPreviousElementSibling."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getPreviousElementSibling" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getPreviousElementSibling(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getNextElementSibling(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getNextElementSibling."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getNextElementSibling" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getNextElementSibling(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMElement_getChildElementCount(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLSize_t result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getChildElementCount."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getChildElementCount" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = ((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getChildElementCount(); + jsresult = SWIG_From_size_t SWIG_JSC_FROM_CALL_ARGS((size_t)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMElement_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMElement_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMElement_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMElement_functions[] = { + { + "getTagName", _wrap_DOMElement_getTagName, kJSPropertyAttributeNone + }, + + + { + "getAttribute", _wrap_DOMElement_getAttribute, kJSPropertyAttributeNone + }, + + + { + "getAttributeNode", _wrap_DOMElement_getAttributeNode, kJSPropertyAttributeNone + }, + + + { + "getElementsByTagName", _wrap_DOMElement_getElementsByTagName, kJSPropertyAttributeNone + }, + + + { + "setAttribute", _wrap_DOMElement_setAttribute, kJSPropertyAttributeNone + }, + + + { + "setAttributeNode", _wrap_DOMElement_setAttributeNode, kJSPropertyAttributeNone + }, + + + { + "removeAttributeNode", _wrap_DOMElement_removeAttributeNode, kJSPropertyAttributeNone + }, + + + { + "removeAttribute", _wrap_DOMElement_removeAttribute, kJSPropertyAttributeNone + }, + + + { + "getAttributeNS", _wrap_DOMElement_getAttributeNS, kJSPropertyAttributeNone + }, + + + { + "setAttributeNS", _wrap_DOMElement_setAttributeNS, kJSPropertyAttributeNone + }, + + + { + "removeAttributeNS", _wrap_DOMElement_removeAttributeNS, kJSPropertyAttributeNone + }, + + + { + "getAttributeNodeNS", _wrap_DOMElement_getAttributeNodeNS, kJSPropertyAttributeNone + }, + + + { + "setAttributeNodeNS", _wrap_DOMElement_setAttributeNodeNS, kJSPropertyAttributeNone + }, + + + { + "getElementsByTagNameNS", _wrap_DOMElement_getElementsByTagNameNS, kJSPropertyAttributeNone + }, + + + { + "hasAttribute", _wrap_DOMElement_hasAttribute, kJSPropertyAttributeNone + }, + + + { + "hasAttributeNS", _wrap_DOMElement_hasAttributeNS, kJSPropertyAttributeNone + }, + + + { + "setIdAttribute", _wrap_DOMElement_setIdAttribute, kJSPropertyAttributeNone + }, + + + { + "setIdAttributeNS", _wrap_DOMElement_setIdAttributeNS, kJSPropertyAttributeNone + }, + + + { + "setIdAttributeNode", _wrap_DOMElement_setIdAttributeNode, kJSPropertyAttributeNone + }, + + + { + "getSchemaTypeInfo", _wrap_DOMElement_getSchemaTypeInfo, kJSPropertyAttributeNone + }, + + + { + "getFirstElementChild", _wrap_DOMElement_getFirstElementChild, kJSPropertyAttributeNone + }, + + + { + "getLastElementChild", _wrap_DOMElement_getLastElementChild, kJSPropertyAttributeNone + }, + + + { + "getPreviousElementSibling", _wrap_DOMElement_getPreviousElementSibling, kJSPropertyAttributeNone + }, + + + { + "getNextElementSibling", _wrap_DOMElement_getNextElementSibling, kJSPropertyAttributeNone + }, + + + { + "getChildElementCount", _wrap_DOMElement_getChildElementCount, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMElement(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMElement can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMEntity_classDefinition; + +static JSClassDefinition _exports_DOMEntity_objectDefinition; + +static JSClassRef _exports_DOMEntity_classRef; + + +static void _wrap_delete_DOMEntity(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMEntity * arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMEntity_getPublicId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getPublicId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getPublicId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getPublicId(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMEntity_getSystemId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getSystemId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getSystemId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getSystemId(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMEntity_getNotationName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getNotationName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getNotationName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getNotationName(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMEntity_getInputEncoding(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getInputEncoding."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getInputEncoding" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getInputEncoding(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMEntity_getXmlEncoding(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getXmlEncoding."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getXmlEncoding" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getXmlEncoding(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMEntity_getXmlVersion(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getXmlVersion."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getXmlVersion" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getXmlVersion(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMEntity_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMEntity_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMEntity_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMEntity_functions[] = { + { + "getPublicId", _wrap_DOMEntity_getPublicId, kJSPropertyAttributeNone + }, + + + { + "getSystemId", _wrap_DOMEntity_getSystemId, kJSPropertyAttributeNone + }, + + + { + "getNotationName", _wrap_DOMEntity_getNotationName, kJSPropertyAttributeNone + }, + + + { + "getInputEncoding", _wrap_DOMEntity_getInputEncoding, kJSPropertyAttributeNone + }, + + + { + "getXmlEncoding", _wrap_DOMEntity_getXmlEncoding, kJSPropertyAttributeNone + }, + + + { + "getXmlVersion", _wrap_DOMEntity_getXmlVersion, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMEntity(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMEntity can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMDocumentType_classDefinition; + +static JSClassDefinition _exports_DOMDocumentType_objectDefinition; + +static JSClassRef _exports_DOMDocumentType_classRef; + + +static void _wrap_delete_DOMDocumentType(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMDocumentType * arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMDocumentType_getName(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getName."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getName(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMDocumentType_getEntities(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getEntities."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getEntities" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getEntities(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMDocumentType_getNotations(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getNotations."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getNotations" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getNotations(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMDocumentType_getPublicId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getPublicId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getPublicId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getPublicId(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMDocumentType_getSystemId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getSystemId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getSystemId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getSystemId(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMDocumentType_getInternalSubset(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getInternalSubset."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getInternalSubset" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getInternalSubset(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMDocumentType_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMDocumentType_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMDocumentType_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMDocumentType_functions[] = { + { + "getName", _wrap_DOMDocumentType_getName, kJSPropertyAttributeNone + }, + + + { + "getEntities", _wrap_DOMDocumentType_getEntities, kJSPropertyAttributeNone + }, + + + { + "getNotations", _wrap_DOMDocumentType_getNotations, kJSPropertyAttributeNone + }, + + + { + "getPublicId", _wrap_DOMDocumentType_getPublicId, kJSPropertyAttributeNone + }, + + + { + "getSystemId", _wrap_DOMDocumentType_getSystemId, kJSPropertyAttributeNone + }, + + + { + "getInternalSubset", _wrap_DOMDocumentType_getInternalSubset, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMDocumentType(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMDocumentType can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMCharacterData_classDefinition; + +static JSClassDefinition _exports_DOMCharacterData_objectDefinition; + +static JSClassRef _exports_DOMCharacterData_classRef; + + +static void _wrap_delete_DOMCharacterData(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMCharacterData * arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMCharacterData_getData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_getData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_getData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMCharacterData const *)arg1)->getData(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_getLength(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLSize_t result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_getLength."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_getLength" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + result = ((XERCES_CPP_NAMESPACE::DOMCharacterData const *)arg1)->getLength(); + jsresult = SWIG_From_size_t SWIG_JSC_FROM_CALL_ARGS((size_t)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_substringData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLSize_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_substringData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_substringData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMCharacterData_substringData" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + ecode3 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMCharacterData_substringData" "', argument " "3"" of type '" "XMLSize_t""'"); + } + arg3 = (XMLSize_t)(val3); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMCharacterData const *)arg1)->substringData(arg2,arg3); + + jsresult = XMLString2JS(result, context); + + + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_appendData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_appendData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_appendData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->appendData((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_insertData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_insertData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_insertData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMCharacterData_insertData" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + + arg3 = JS2XMLString(argv[1], context); + + (arg1)->insertData(arg2,(XMLCh const *)arg3); + jsresult = JSValueMakeUndefined(context); + + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_deleteData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLSize_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_deleteData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_deleteData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMCharacterData_deleteData" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + ecode3 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMCharacterData_deleteData" "', argument " "3"" of type '" "XMLSize_t""'"); + } + arg3 = (XMLSize_t)(val3); + (arg1)->deleteData(arg2,arg3); + jsresult = JSValueMakeUndefined(context); + + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_replaceData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLSize_t arg3 ; + XMLCh *arg4 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_replaceData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_replaceData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMCharacterData_replaceData" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + ecode3 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMCharacterData_replaceData" "', argument " "3"" of type '" "XMLSize_t""'"); + } + arg3 = (XMLSize_t)(val3); + + arg4 = JS2XMLString(argv[2], context); + + (arg1)->replaceData(arg2,arg3,(XMLCh const *)arg4); + jsresult = JSValueMakeUndefined(context); + + + + + delete[] arg4; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMCharacterData_setData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_setData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_setData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->setData((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMCharacterData_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMCharacterData_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMCharacterData_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMCharacterData_functions[] = { + { + "getData", _wrap_DOMCharacterData_getData, kJSPropertyAttributeNone + }, + + + { + "getLength", _wrap_DOMCharacterData_getLength, kJSPropertyAttributeNone + }, + + + { + "substringData", _wrap_DOMCharacterData_substringData, kJSPropertyAttributeNone + }, + + + { + "appendData", _wrap_DOMCharacterData_appendData, kJSPropertyAttributeNone + }, + + + { + "insertData", _wrap_DOMCharacterData_insertData, kJSPropertyAttributeNone + }, + + + { + "deleteData", _wrap_DOMCharacterData_deleteData, kJSPropertyAttributeNone + }, + + + { + "replaceData", _wrap_DOMCharacterData_replaceData, kJSPropertyAttributeNone + }, + + + { + "setData", _wrap_DOMCharacterData_setData, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMCharacterData(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMCharacterData can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMComment_classDefinition; + +static JSClassDefinition _exports_DOMComment_objectDefinition; + +static JSClassRef _exports_DOMComment_classRef; + + +static void _wrap_delete_DOMComment(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMComment * arg1 = (XERCES_CPP_NAMESPACE::DOMComment *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSStaticValue _exports_DOMComment_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMComment_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMComment_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMComment_functions[] = { + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMComment(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMComment can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMText_classDefinition; + +static JSClassDefinition _exports_DOMText_objectDefinition; + +static JSClassRef _exports_DOMText_classRef; + + +static void _wrap_delete_DOMText(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMText * arg1 = (XERCES_CPP_NAMESPACE::DOMText *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMText_splitText(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + XMLSize_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMText *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_splitText."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_splitText" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMText_splitText" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + result = (XERCES_CPP_NAMESPACE::DOMText *)(arg1)->splitText(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMText_getIsElementContentWhitespace(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_getIsElementContentWhitespace."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_getIsElementContentWhitespace" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMText const *)arg1)->getIsElementContentWhitespace(); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMText_getWholeText(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_getWholeText."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_getWholeText" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMText const *)arg1)->getWholeText(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMText_replaceWholeText(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMText *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_replaceWholeText."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_replaceWholeText" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XERCES_CPP_NAMESPACE::DOMText *)(arg1)->replaceWholeText((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMText_isIgnorableWhitespace(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_isIgnorableWhitespace."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_isIgnorableWhitespace" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMText const *)arg1)->isIgnorableWhitespace(); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMText_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMText_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMText_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMText_functions[] = { + { + "splitText", _wrap_DOMText_splitText, kJSPropertyAttributeNone + }, + + + { + "getIsElementContentWhitespace", _wrap_DOMText_getIsElementContentWhitespace, kJSPropertyAttributeNone + }, + + + { + "getWholeText", _wrap_DOMText_getWholeText, kJSPropertyAttributeNone + }, + + + { + "replaceWholeText", _wrap_DOMText_replaceWholeText, kJSPropertyAttributeNone + }, + + + { + "isIgnorableWhitespace", _wrap_DOMText_isIgnorableWhitespace, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMText(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMText can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMCDATASection_classDefinition; + +static JSClassDefinition _exports_DOMCDATASection_objectDefinition; + +static JSClassRef _exports_DOMCDATASection_classRef; + + +static void _wrap_delete_DOMCDATASection(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMCDATASection * arg1 = (XERCES_CPP_NAMESPACE::DOMCDATASection *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSStaticValue _exports_DOMCDATASection_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMCDATASection_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMCDATASection_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMCDATASection_functions[] = { + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMCDATASection(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMCDATASection can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMNodeList_classDefinition; + +static JSClassDefinition _exports_DOMNodeList_objectDefinition; + +static JSClassRef _exports_DOMNodeList_classRef; + + +static void _wrap_delete_DOMNodeList(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMNodeList * arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMNodeList_item(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNodeList *arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *) 0 ; + XMLSize_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNodeList_item."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNodeList_item" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNodeList const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMNodeList_item" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNodeList const *)arg1)->item(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNodeList_getLength(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNodeList *arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLSize_t result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNodeList_getLength."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNodeList_getLength" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNodeList const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *)(argp1); + result = ((XERCES_CPP_NAMESPACE::DOMNodeList const *)arg1)->getLength(); + jsresult = SWIG_From_size_t SWIG_JSC_FROM_CALL_ARGS((size_t)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMNodeList_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNodeList_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMNodeList_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNodeList_functions[] = { + { + "item", _wrap_DOMNodeList_item, kJSPropertyAttributeNone + }, + + + { + "getLength", _wrap_DOMNodeList_getLength, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMNodeList(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMNodeList can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMNamedNodeMap_classDefinition; + +static JSClassDefinition _exports_DOMNamedNodeMap_objectDefinition; + +static JSClassRef _exports_DOMNamedNodeMap_classRef; + + +static void _wrap_delete_DOMNamedNodeMap(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMNamedNodeMap * arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMNamedNodeMap_setNamedItem(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_setNamedItem."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_setNamedItem" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNamedNodeMap_setNamedItem" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->setNamedItem(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_item(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLSize_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_item."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_item" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + ecode2 = SWIG_AsVal_size_t SWIG_JSC_AS_CALL_ARGS(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMNamedNodeMap_item" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->item(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_getNamedItem(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_getNamedItem."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_getNamedItem" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->getNamedItem((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_getLength(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLSize_t result; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_getLength."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_getLength" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + result = ((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->getLength(); + jsresult = SWIG_From_size_t SWIG_JSC_FROM_CALL_ARGS((size_t)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_removeNamedItem(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_removeNamedItem."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_removeNamedItem" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->removeNamedItem((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_getNamedItemNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_getNamedItemNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_getNamedItemNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->getNamedItemNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_setNamedItemNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_setNamedItemNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_setNamedItemNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNamedNodeMap_setNamedItemNS" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->setNamedItemNS(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNamedNodeMap_removeNamedItemNS(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + JSValueRef jsresult; + + if(argc != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_removeNamedItemNS."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_removeNamedItemNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + + arg3 = JS2XMLString(argv[1], context); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->removeNamedItemNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMNamedNodeMap_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNamedNodeMap_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMNamedNodeMap_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNamedNodeMap_functions[] = { + { + "setNamedItem", _wrap_DOMNamedNodeMap_setNamedItem, kJSPropertyAttributeNone + }, + + + { + "item", _wrap_DOMNamedNodeMap_item, kJSPropertyAttributeNone + }, + + + { + "getNamedItem", _wrap_DOMNamedNodeMap_getNamedItem, kJSPropertyAttributeNone + }, + + + { + "getLength", _wrap_DOMNamedNodeMap_getLength, kJSPropertyAttributeNone + }, + + + { + "removeNamedItem", _wrap_DOMNamedNodeMap_removeNamedItem, kJSPropertyAttributeNone + }, + + + { + "getNamedItemNS", _wrap_DOMNamedNodeMap_getNamedItemNS, kJSPropertyAttributeNone + }, + + + { + "setNamedItemNS", _wrap_DOMNamedNodeMap_setNamedItemNS, kJSPropertyAttributeNone + }, + + + { + "removeNamedItemNS", _wrap_DOMNamedNodeMap_removeNamedItemNS, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMNamedNodeMap(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMNamedNodeMap can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMDocumentFragment_classDefinition; + +static JSClassDefinition _exports_DOMDocumentFragment_objectDefinition; + +static JSClassRef _exports_DOMDocumentFragment_classRef; + + +static void _wrap_delete_DOMDocumentFragment(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMDocumentFragment * arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentFragment *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSStaticValue _exports_DOMDocumentFragment_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMDocumentFragment_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMDocumentFragment_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMDocumentFragment_functions[] = { + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMDocumentFragment(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMDocumentFragment can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMEntityReference_classDefinition; + +static JSClassDefinition _exports_DOMEntityReference_objectDefinition; + +static JSClassRef _exports_DOMEntityReference_classRef; + + +static void _wrap_delete_DOMEntityReference(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMEntityReference * arg1 = (XERCES_CPP_NAMESPACE::DOMEntityReference *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSStaticValue _exports_DOMEntityReference_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMEntityReference_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMEntityReference_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMEntityReference_functions[] = { + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMEntityReference(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMEntityReference can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMNotation_classDefinition; + +static JSClassDefinition _exports_DOMNotation_objectDefinition; + +static JSClassRef _exports_DOMNotation_classRef; + + +static void _wrap_delete_DOMNotation(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMNotation * arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMNotation_getPublicId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNotation *arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNotation_getPublicId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNotation_getPublicId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNotation const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNotation const *)arg1)->getPublicId(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMNotation_getSystemId(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMNotation *arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNotation_getSystemId."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNotation_getSystemId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNotation const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNotation const *)arg1)->getSystemId(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMNotation_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNotation_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMNotation_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMNotation_functions[] = { + { + "getPublicId", _wrap_DOMNotation_getPublicId, kJSPropertyAttributeNone + }, + + + { + "getSystemId", _wrap_DOMNotation_getSystemId, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMNotation(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMNotation can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_DOMProcessingInstruction_classDefinition; + +static JSClassDefinition _exports_DOMProcessingInstruction_objectDefinition; + +static JSClassRef _exports_DOMProcessingInstruction_classRef; + + +static void _wrap_delete_DOMProcessingInstruction(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + XERCES_CPP_NAMESPACE::DOMProcessingInstruction * arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSValueRef _wrap_DOMProcessingInstruction_getTarget(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMProcessingInstruction *arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMProcessingInstruction_getTarget."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMProcessingInstruction_getTarget" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *)arg1)->getTarget(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMProcessingInstruction_getData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMProcessingInstruction *arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + JSValueRef jsresult; + + if(argc != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMProcessingInstruction_getData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMProcessingInstruction_getData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *)arg1)->getData(); + + jsresult = XMLString2JS(result, context); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_DOMProcessingInstruction_setData(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + XERCES_CPP_NAMESPACE::DOMProcessingInstruction *arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMProcessingInstruction_setData."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMProcessingInstruction_setData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMProcessingInstruction *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *)(argp1); + + arg2 = JS2XMLString(argv[0], context); + + (arg1)->setData((XMLCh const *)arg2); + jsresult = JSValueMakeUndefined(context); + + + delete[] arg2; + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSStaticValue _exports_DOMProcessingInstruction_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMProcessingInstruction_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_DOMProcessingInstruction_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_DOMProcessingInstruction_functions[] = { + { + "getTarget", _wrap_DOMProcessingInstruction_getTarget, kJSPropertyAttributeNone + }, + + + { + "getData", _wrap_DOMProcessingInstruction_getData, kJSPropertyAttributeNone + }, + + + { + "setData", _wrap_DOMProcessingInstruction_setData, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSObjectRef _wrap_new_veto_DOMProcessingInstruction(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + SWIG_exception(SWIG_ERROR, "Class DOMProcessingInstruction can not be instantiated"); + return 0; +} + + +static JSClassDefinition _exports_Event_classDefinition; + +static JSClassDefinition _exports_Event_objectDefinition; + +static JSClassRef _exports_Event_classRef; + + +static JSValueRef _wrap_uscxml_Event_INTERNAL(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(uscxml::Event::INTERNAL)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_uscxml_Event_EXTERNAL(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(uscxml::Event::EXTERNAL)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_uscxml_Event_PLATFORM(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + JSValueRef jsresult; + + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(uscxml::Event::PLATFORM)); + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSObjectRef _wrap_new_Event__SWIG_0(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + uscxml::Event *result; + result = (uscxml::Event *)new uscxml::Event(); + + + return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_p_uscxml__Event, SWIG_POINTER_OWN); + + goto fail; +fail: + return NULL; +} + + +static JSObjectRef _wrap_new_Event__SWIG_1(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + std::string *arg1 = 0 ; + uscxml::Event::Type arg2 ; + int res1 = SWIG_OLDOBJ ; + int val2 ; + int ecode2 = 0 ; + uscxml::Event *result; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Event" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int SWIG_JSC_AS_CALL_ARGS(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Event" "', argument " "2"" of type '" "uscxml::Event::Type""'"); + } + arg2 = (uscxml::Event::Type)(val2); + result = (uscxml::Event *)new uscxml::Event((std::string const &)*arg1,arg2); + + if (SWIG_IsNewObj(res1)) delete arg1; + + + return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_p_uscxml__Event, SWIG_POINTER_OWN); + + goto fail; +fail: + return NULL; +} + + +static JSObjectRef _wrap_new_Event__SWIG_2(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + uscxml::Event *result; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Event" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (uscxml::Event *)new uscxml::Event((std::string const &)*arg1); + + if (SWIG_IsNewObj(res1)) delete arg1; + + return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_p_uscxml__Event, SWIG_POINTER_OWN); + + goto fail; +fail: + return NULL; +} + + +static JSObjectRef _wrap_new_Event(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + JSObjectRef thisObject = NULL; + + // switch all cases by means of series of if-returns. + + if(argc == 0) { + thisObject = _wrap_new_Event__SWIG_0(context, NULL, argc, argv, exception); + if(thisObject != NULL) { + *exception=0; return thisObject; + } /* reset exception and return */ + } + + if(argc == 2) { + thisObject = _wrap_new_Event__SWIG_1(context, NULL, argc, argv, exception); + if(thisObject != NULL) { + *exception=0; return thisObject; + } /* reset exception and return */ + } + + if(argc == 1) { + thisObject = _wrap_new_Event__SWIG_2(context, NULL, argc, argv, exception); + if(thisObject != NULL) { + *exception=0; return thisObject; + } /* reset exception and return */ + } + + + // default: + SWIG_exception_fail(SWIG_ERROR, "Illegal arguments for construction of $jsname"); + +fail: + return thisObject; +} + + +static JSValueRef _wrap_Event_operator_equal_to(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + uscxml::Event *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Event_operator_equal_to."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_operator_equal_to" "', argument " "1"" of type '" "uscxml::Event const *""'"); + } + arg1 = (uscxml::Event *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_uscxml__Event, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_operator_equal_to" "', argument " "2"" of type '" "uscxml::Event const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_operator_equal_to" "', argument " "2"" of type '" "uscxml::Event const &""'"); + } + arg2 = (uscxml::Event *)(argp2); + result = (bool)((uscxml::Event const *)arg1)->operator ==((uscxml::Event const &)*arg2); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static JSValueRef _wrap_Event_operator_not_equal_to(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + uscxml::Event *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Event_operator_not_equal_to."); + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_operator_not_equal_to" "', argument " "1"" of type '" "uscxml::Event const *""'"); + } + arg1 = (uscxml::Event *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_uscxml__Event, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_operator_not_equal_to" "', argument " "2"" of type '" "uscxml::Event const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_operator_not_equal_to" "', argument " "2"" of type '" "uscxml::Event const &""'"); + } + arg2 = (uscxml::Event *)(argp2); + result = (bool)((uscxml::Event const *)arg1)->operator !=((uscxml::Event const &)*arg2); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static int _wrap_Event_getParam__SWIG_0(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception, JSValueRef* p_result) +{ + uscxml::Event::params_t *arg1 = 0 ; + std::string *arg2 = 0 ; + Data *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Event_getParam__SWIG_0."); + + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_std__multimapT_std__string_Data_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + arg1 = (uscxml::Event::params_t *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(argv[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_Data, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_getParam" "', argument " "3"" of type '" "Data &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "3"" of type '" "Data &""'"); + } + arg3 = (Data *)(argp3); + result = (bool)uscxml::Event::getParam((std::multimap< std::string,Data > const &)*arg1,(std::string const &)*arg2,*arg3); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + if (SWIG_IsNewObj(res2)) delete arg2; + + + *p_result = jsresult; + return SWIG_OK; + + goto fail; +fail: + return SWIG_TypeError; +} + + +static int _wrap_Event_getParam__SWIG_1(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception, JSValueRef* p_result) +{ + uscxml::Event::params_t *arg1 = 0 ; + std::string *arg2 = 0 ; + std::list< Data > *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Event_getParam__SWIG_1."); + + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_std__multimapT_std__string_Data_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + arg1 = (uscxml::Event::params_t *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(argv[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_std__listT_Data_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_getParam" "', argument " "3"" of type '" "std::list< Data > &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "3"" of type '" "std::list< Data > &""'"); + } + arg3 = (std::list< Data > *)(argp3); + result = (bool)uscxml::Event::getParam((std::multimap< std::string,Data > const &)*arg1,(std::string const &)*arg2,*arg3); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + if (SWIG_IsNewObj(res2)) delete arg2; + + + *p_result = jsresult; + return SWIG_OK; + + goto fail; +fail: + return SWIG_TypeError; +} + + +static int _wrap_Event_getParam__SWIG_3(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception, JSValueRef* p_result) +{ + uscxml::Event::params_t *arg1 = 0 ; + std::string *arg2 = 0 ; + bool *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool result; + + JSValueRef jsresult; + + if(argc != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Event_getParam__SWIG_3."); + + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_std__multimapT_std__string_Data_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + arg1 = (uscxml::Event::params_t *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(argv[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_bool, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_getParam" "', argument " "3"" of type '" "bool &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "3"" of type '" "bool &""'"); + } + arg3 = (bool *)(argp3); + result = (bool)uscxml::Event::getParam((std::multimap< std::string,Data > const &)*arg1,(std::string const &)*arg2,*arg3); + jsresult = SWIG_From_bool SWIG_JSC_FROM_CALL_ARGS((bool)(result)); + + if (SWIG_IsNewObj(res2)) delete arg2; + + + *p_result = jsresult; + return SWIG_OK; + + goto fail; +fail: + return SWIG_TypeError; +} + + +static JSValueRef _wrap_Event__wrap_Event_getParam(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + JSValueRef jsresult; + int res; + + if(argc == 3) { + res = _wrap_Event_getParam__SWIG_0(context, function, thisObject, argc, argv, exception, &jsresult); + if(res == SWIG_OK) { + *exception = 0; return jsresult; + } + } + + if(argc == 3) { + res = _wrap_Event_getParam__SWIG_1(context, function, thisObject, argc, argv, exception, &jsresult); + if(res == SWIG_OK) { + *exception = 0; return jsresult; + } + } + + if(argc == 3) { + res = _wrap_Event_getParam__SWIG_3(context, function, thisObject, argc, argv, exception, &jsresult); + if(res == SWIG_OK) { + *exception = 0; return jsresult; + } + } + + + SWIG_exception_fail(SWIG_ERROR, "Illegal arguments for function getParam."); + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static bool _wrap_Event_raw_set(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_raw_set" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(value, &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_raw_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_raw_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->raw = *arg2; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + return true; + + goto fail; +fail: + return false; +} + + +static JSValueRef _wrap_Event_raw_get(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + + JSValueRef jsresult; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_raw_get" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + result = (std::string *) & ((arg1)->raw); + jsresult = SWIG_From_std_string SWIG_JSC_FROM_CALL_ARGS((std::string)(*result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static bool _wrap_Event_name_set(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_name_set" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(value, &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->name = *arg2; + + if (SWIG_IsNewObj(res2)) delete arg2; + + + return true; + + goto fail; +fail: + return false; +} + + +static JSValueRef _wrap_Event_name_get(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + + JSValueRef jsresult; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_name_get" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + result = (std::string *) & ((arg1)->name); + jsresult = SWIG_From_std_string SWIG_JSC_FROM_CALL_ARGS((std::string)(*result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static bool _wrap_Event_eventType_set(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + uscxml::Event::Type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_eventType_set" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + ecode2 = SWIG_AsVal_int SWIG_JSC_AS_CALL_ARGS(value, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Event_eventType_set" "', argument " "2"" of type '" "uscxml::Event::Type""'"); + } + arg2 = (uscxml::Event::Type)(val2); + if (arg1) (arg1)->eventType = arg2; + + + + + return true; + + goto fail; +fail: + return false; +} + + +static JSValueRef _wrap_Event_eventType_get(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uscxml::Event::Type result; + + JSValueRef jsresult; + + res1 = SWIG_ConvertPtr(thisObject, &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_eventType_get" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + result = (uscxml::Event::Type) ((arg1)->eventType); + jsresult = SWIG_From_int SWIG_JSC_FROM_CALL_ARGS((int)(result)); + + + return jsresult; + + goto fail; +fail: + return JSValueMakeUndefined(context); +} + + +static void _wrap_delete_Event(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + uscxml::Event * arg1 = (uscxml::Event *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSStaticValue _exports_Event_staticValues[] = { + { + "INTERNAL", _wrap_uscxml_Event_INTERNAL, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "EXTERNAL", _wrap_uscxml_Event_EXTERNAL, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "PLATFORM", _wrap_uscxml_Event_PLATFORM, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_Event_staticFunctions[] = { + { + "getParam", _wrap_Event__wrap_Event_getParam, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_Event_values[] = { + { + "raw", _wrap_Event_raw_get, _wrap_Event_raw_set, kJSPropertyAttributeNone + }, + + + { + "name", _wrap_Event_name_get, _wrap_Event_name_set, kJSPropertyAttributeNone + }, + + + { + "eventType", _wrap_Event_eventType_get, _wrap_Event_eventType_set, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_Event_functions[] = { + { + "operator_equal_to", _wrap_Event_operator_equal_to, kJSPropertyAttributeNone + }, + + + { + "operator_not_equal_to", _wrap_Event_operator_not_equal_to, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0 + } +}; + + +static JSClassDefinition _exports_ErrorEvent_classDefinition; + +static JSClassDefinition _exports_ErrorEvent_objectDefinition; + +static JSClassRef _exports_ErrorEvent_classRef; + + +static JSObjectRef _wrap_new_ErrorEvent__SWIG_0(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + uscxml::ErrorEvent *result; + result = (uscxml::ErrorEvent *)new uscxml::ErrorEvent(); + + + return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_p_uscxml__ErrorEvent, SWIG_POINTER_OWN); + + goto fail; +fail: + return NULL; +} + + +static JSObjectRef _wrap_new_ErrorEvent__SWIG_1(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + uscxml::ErrorEvent *result; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string SWIG_JSC_AS_CALL_ARGS(argv[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ErrorEvent" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ErrorEvent" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (uscxml::ErrorEvent *)new uscxml::ErrorEvent((std::string const &)*arg1); + + if (SWIG_IsNewObj(res1)) delete arg1; + + return SWIG_JSC_NewPointerObj(context, result, SWIGTYPE_p_uscxml__ErrorEvent, SWIG_POINTER_OWN); + + goto fail; +fail: + return NULL; +} + + +static JSObjectRef _wrap_new_ErrorEvent(JSContextRef context, JSObjectRef ctorObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception) +{ + JSObjectRef thisObject = NULL; + + // switch all cases by means of series of if-returns. + + if(argc == 0) { + thisObject = _wrap_new_ErrorEvent__SWIG_0(context, NULL, argc, argv, exception); + if(thisObject != NULL) { + *exception=0; return thisObject; + } /* reset exception and return */ + } + + if(argc == 1) { + thisObject = _wrap_new_ErrorEvent__SWIG_1(context, NULL, argc, argv, exception); + if(thisObject != NULL) { + *exception=0; return thisObject; + } /* reset exception and return */ + } + + + // default: + SWIG_exception_fail(SWIG_ERROR, "Illegal arguments for construction of $jsname"); + +fail: + return thisObject; +} + + +static void _wrap_delete_ErrorEvent(JSObjectRef thisObject) +{ + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject); + if(t) { + if (t->swigCMemOwn) { + uscxml::ErrorEvent * arg1 = (uscxml::ErrorEvent *)t->swigCObject; + delete arg1; + } + /* remove the private data to make sure that it isn't accessed elsewhere */ + JSObjectSetPrivate(thisObject, NULL); + free(t); + } +} + + +static JSStaticValue _exports_ErrorEvent_staticValues[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_ErrorEvent_staticFunctions[] = { + { + 0, 0, 0 + } +}; + +static JSStaticValue _exports_ErrorEvent_values[] = { + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction _exports_ErrorEvent_functions[] = { + { + 0, 0, 0 + } +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static void *_p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMText(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMText *) ((XERCES_CPP_NAMESPACE::DOMCDATASection *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMText *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMComment *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMCharacterData *) (XERCES_CPP_NAMESPACE::DOMText *) ((XERCES_CPP_NAMESPACE::DOMCDATASection *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMElementTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMElement *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMDocumentFragmentTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMDocumentFragment *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMAttrTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMAttr *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMDocumentTypeTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMDocumentType *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCharacterDataTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMCharacterData *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) (XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMText *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) (XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMComment *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMProcessingInstructionTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMEntityTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMEntity *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMEntityReferenceTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMEntityReference *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) (XERCES_CPP_NAMESPACE::DOMCharacterData *)(XERCES_CPP_NAMESPACE::DOMText *) ((XERCES_CPP_NAMESPACE::DOMCDATASection *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMNotationTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMNotation *) x)); +} +static void *_p_uscxml__ErrorEventTo_p_uscxml__Event(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((uscxml::Event *) ((uscxml::ErrorEvent *) x)); +} +static swig_type_info _swigt__p_Data = {"_p_Data", "Data *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMAttr = {"_p_XERCES_CPP_NAMESPACE__DOMAttr", "XERCES_CPP_NAMESPACE::DOMAttr *|p_XERCES_CPP_NAMESPACE__DOMAttr", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection = {"_p_XERCES_CPP_NAMESPACE__DOMCDATASection", "p_XERCES_CPP_NAMESPACE__DOMCDATASection", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData = {"_p_XERCES_CPP_NAMESPACE__DOMCharacterData", "XERCES_CPP_NAMESPACE::DOMCharacterData *|p_XERCES_CPP_NAMESPACE__DOMCharacterData", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMComment = {"_p_XERCES_CPP_NAMESPACE__DOMComment", "p_XERCES_CPP_NAMESPACE__DOMComment", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMDocument = {"_p_XERCES_CPP_NAMESPACE__DOMDocument", "XERCES_CPP_NAMESPACE::DOMDocument *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment = {"_p_XERCES_CPP_NAMESPACE__DOMDocumentFragment", "p_XERCES_CPP_NAMESPACE__DOMDocumentFragment", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType = {"_p_XERCES_CPP_NAMESPACE__DOMDocumentType", "XERCES_CPP_NAMESPACE::DOMDocumentType *|p_XERCES_CPP_NAMESPACE__DOMDocumentType", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMElement = {"_p_XERCES_CPP_NAMESPACE__DOMElement", "p_XERCES_CPP_NAMESPACE__DOMElement|XERCES_CPP_NAMESPACE::DOMElement *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMEntity = {"_p_XERCES_CPP_NAMESPACE__DOMEntity", "XERCES_CPP_NAMESPACE::DOMEntity *|p_XERCES_CPP_NAMESPACE__DOMEntity", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference = {"_p_XERCES_CPP_NAMESPACE__DOMEntityReference", "p_XERCES_CPP_NAMESPACE__DOMEntityReference", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMException = {"_p_XERCES_CPP_NAMESPACE__DOMException", "p_XERCES_CPP_NAMESPACE__DOMException|XERCES_CPP_NAMESPACE::DOMException *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap = {"_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap", "p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap|XERCES_CPP_NAMESPACE::DOMNamedNodeMap *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNode = {"_p_XERCES_CPP_NAMESPACE__DOMNode", "XERCES_CPP_NAMESPACE::DOMNode *|p_XERCES_CPP_NAMESPACE__DOMNode", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNodeList = {"_p_XERCES_CPP_NAMESPACE__DOMNodeList", "p_XERCES_CPP_NAMESPACE__DOMNodeList|XERCES_CPP_NAMESPACE::DOMNodeList *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNotation = {"_p_XERCES_CPP_NAMESPACE__DOMNotation", "XERCES_CPP_NAMESPACE::DOMNotation *|p_XERCES_CPP_NAMESPACE__DOMNotation", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction = {"_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction", "XERCES_CPP_NAMESPACE::DOMProcessingInstruction *|p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMText = {"_p_XERCES_CPP_NAMESPACE__DOMText", "XERCES_CPP_NAMESPACE::DOMText *|p_XERCES_CPP_NAMESPACE__DOMText", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMTypeInfo = {"_p_XERCES_CPP_NAMESPACE__DOMTypeInfo", "XERCES_CPP_NAMESPACE::DOMTypeInfo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler = {"_p_XERCES_CPP_NAMESPACE__DOMUserDataHandler", "XERCES_CPP_NAMESPACE::DOMUserDataHandler *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__MemoryManager = {"_p_XERCES_CPP_NAMESPACE__MemoryManager", "XERCES_CPP_NAMESPACE::MemoryManager *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int16_t = {"_p_int16_t", "XMLInt16 *|int16_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int32_t = {"_p_int32_t", "int32_t *|XMLInt32 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int64_t = {"_p_int64_t", "int64_t *|XMLInt64 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_namelist_t = {"_p_namelist_t", "namelist_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_params_t = {"_p_params_t", "params_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *|XMLSize_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ssize_t = {"_p_ssize_t", "ssize_t *|XMLSSize_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__listT_Data_t = {"_p_std__listT_Data_t", "std::list< Data > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__multimapT_std__string_Data_t = {"_p_std__multimapT_std__string_Data_t", "uscxml::Event::params_t *|std::multimap< std::string,Data > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint16_t = {"_p_uint16_t", "XMLUInt16 *|UTF16Ch *|XMLCh *|uint16_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint32_t = {"_p_uint32_t", "uint32_t *|XMLUInt32 *|UCS4Ch *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint64_t = {"_p_uint64_t", "uint64_t *|XMLUInt64 *|XMLFilePos *|XMLFileLoc *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|XMLByte *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uscxml__ErrorEvent = {"_p_uscxml__ErrorEvent", "p_uscxml__ErrorEvent", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uscxml__Event = {"_p_uscxml__Event", "uscxml::Event *|p_uscxml__Event", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_Data, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMAttr, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMDocument, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMElement, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMEntity, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMException, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNode, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNodeList, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNotation, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMText, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMTypeInfo, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, + &_swigt__p_XERCES_CPP_NAMESPACE__MemoryManager, + &_swigt__p_bool, + &_swigt__p_char, + &_swigt__p_int16_t, + &_swigt__p_int32_t, + &_swigt__p_int64_t, + &_swigt__p_namelist_t, + &_swigt__p_params_t, + &_swigt__p_size_t, + &_swigt__p_ssize_t, + &_swigt__p_std__listT_Data_t, + &_swigt__p_std__multimapT_std__string_Data_t, + &_swigt__p_uint16_t, + &_swigt__p_uint32_t, + &_swigt__p_uint64_t, + &_swigt__p_unsigned_char, + &_swigt__p_uscxml__ErrorEvent, + &_swigt__p_uscxml__Event, + &_swigt__p_void, +}; + +static swig_cast_info _swigc__p_Data[] = { {&_swigt__p_Data, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMAttr[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMAttr, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMCDATASection[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMCharacterData[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMText, _p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, _p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, _p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMComment[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMDocument[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocument, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentType[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMElement[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMElement, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMEntity[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntity, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMEntityReference[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMException[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNode[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMElement, _p_XERCES_CPP_NAMESPACE__DOMElementTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, _p_XERCES_CPP_NAMESPACE__DOMDocumentFragmentTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMAttr, _p_XERCES_CPP_NAMESPACE__DOMAttrTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType, _p_XERCES_CPP_NAMESPACE__DOMDocumentTypeTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData, _p_XERCES_CPP_NAMESPACE__DOMCharacterDataTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMText, _p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, _p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, _p_XERCES_CPP_NAMESPACE__DOMProcessingInstructionTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntity, _p_XERCES_CPP_NAMESPACE__DOMEntityTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference, _p_XERCES_CPP_NAMESPACE__DOMEntityReferenceTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, _p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNotation, _p_XERCES_CPP_NAMESPACE__DOMNotationTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNodeList[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNodeList, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNotation[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNotation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMText[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMText, 0, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, _p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMText, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMTypeInfo[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMTypeInfo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__MemoryManager[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__MemoryManager, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_bool[] = { {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int16_t[] = { {&_swigt__p_int16_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int32_t[] = { {&_swigt__p_int32_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int64_t[] = { {&_swigt__p_int64_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_namelist_t[] = { {&_swigt__p_namelist_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_params_t[] = { {&_swigt__p_params_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ssize_t[] = { {&_swigt__p_ssize_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__listT_Data_t[] = { {&_swigt__p_std__listT_Data_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__multimapT_std__string_Data_t[] = { {&_swigt__p_std__multimapT_std__string_Data_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint16_t[] = { {&_swigt__p_uint16_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint32_t[] = { {&_swigt__p_uint32_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint64_t[] = { {&_swigt__p_uint64_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uscxml__ErrorEvent[] = { {&_swigt__p_uscxml__ErrorEvent, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uscxml__Event[] = { {&_swigt__p_uscxml__Event, 0, 0, 0}, {&_swigt__p_uscxml__ErrorEvent, _p_uscxml__ErrorEventTo_p_uscxml__Event, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_Data, + _swigc__p_XERCES_CPP_NAMESPACE__DOMAttr, + _swigc__p_XERCES_CPP_NAMESPACE__DOMCDATASection, + _swigc__p_XERCES_CPP_NAMESPACE__DOMCharacterData, + _swigc__p_XERCES_CPP_NAMESPACE__DOMComment, + _swigc__p_XERCES_CPP_NAMESPACE__DOMDocument, + _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, + _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentType, + _swigc__p_XERCES_CPP_NAMESPACE__DOMElement, + _swigc__p_XERCES_CPP_NAMESPACE__DOMEntity, + _swigc__p_XERCES_CPP_NAMESPACE__DOMEntityReference, + _swigc__p_XERCES_CPP_NAMESPACE__DOMException, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNode, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNodeList, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNotation, + _swigc__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, + _swigc__p_XERCES_CPP_NAMESPACE__DOMText, + _swigc__p_XERCES_CPP_NAMESPACE__DOMTypeInfo, + _swigc__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, + _swigc__p_XERCES_CPP_NAMESPACE__MemoryManager, + _swigc__p_bool, + _swigc__p_char, + _swigc__p_int16_t, + _swigc__p_int32_t, + _swigc__p_int64_t, + _swigc__p_namelist_t, + _swigc__p_params_t, + _swigc__p_size_t, + _swigc__p_ssize_t, + _swigc__p_std__listT_Data_t, + _swigc__p_std__multimapT_std__string_Data_t, + _swigc__p_uint16_t, + _swigc__p_uint32_t, + _swigc__p_uint64_t, + _swigc__p_unsigned_char, + _swigc__p_uscxml__ErrorEvent, + _swigc__p_uscxml__Event, + _swigc__p_void, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + + + +static JSStaticValue exports_values[] = { + { + "XERCES_HAS_CPP_NAMESPACE", _wrap_XERCES_HAS_CPP_NAMESPACE, JS_veto_set_variable, kJSPropertyAttributeNone + }, + + + { + "DEBUG_UTF8_OUT", _wrap_DEBUG_UTF8_OUT_get, _wrap_DEBUG_UTF8_OUT_set, kJSPropertyAttributeNone + }, + + + { + "DEBUG_UTF8_IN", _wrap_DEBUG_UTF8_IN_get, _wrap_DEBUG_UTF8_IN_set, kJSPropertyAttributeNone + }, + + + { + 0, 0, 0, 0 + } +}; + +static JSStaticFunction exports_functions[] = { + { + 0, 0, 0 + } +}; + +static JSClassDefinition exports_classDefinition; +static JSObjectRef exports_object; + + +SWIGRUNTIME void +SWIG_JSC_SetModule(swig_module_info *swig_module) {} + +SWIGRUNTIME swig_module_info * +SWIG_JSC_GetModule(void) { + return 0; +} + +#define SWIG_GetModule(clientdata) SWIG_JSC_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_JSC_SetModule(pointer) + +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned statically to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int init; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + iter=module_head; + do { + if (iter==&swig_module) { + /* Our module is already in the list, so there's nothing more to do. */ + return; + } + iter=iter->next; + } while (iter!= module_head); + + /* otherwise we must add our module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpreters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ /* c-mode */ +#endif +} +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + +bool SWIGJSC_INIT (JSGlobalContextRef context, JSObjectRef *exports) { + SWIG_InitializeModule(0); + + + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->dcast = (swig_dycast_func) DOMNode_dynamic_cast; + + +/* Initialize the base swig type object */ +_SwigObject_objectDefinition.staticFunctions = _SwigObject_functions; +_SwigObject_objectDefinition.staticValues = _SwigObject_values; +_SwigObject_classRef = JSClassCreate(&_SwigObject_objectDefinition); + +/* Initialize the PackedData class */ +_SwigPackedData_objectDefinition.staticFunctions = _SwigPackedData_functions; +_SwigPackedData_objectDefinition.staticValues = _SwigPackedData_values; +_SwigPackedData_objectDefinition.finalize = _wrap_SwigPackedData_delete; +_SwigPackedData_classRef = JSClassCreate(&_SwigPackedData_objectDefinition); + +/* Create objects for namespaces */ + +exports_classDefinition.staticFunctions = exports_functions; +exports_classDefinition.staticValues = exports_values; +exports_object = JSObjectMake(context, JSClassCreate(&exports_classDefinition), NULL); + + +/* Register classes */ + +_exports_DOMException_classDefinition.staticFunctions = _exports_DOMException_staticFunctions; +_exports_DOMException_classDefinition.staticValues = _exports_DOMException_staticValues; +_exports_DOMException_classDefinition.callAsConstructor = _wrap_new_DOMException; +_exports_DOMException_objectDefinition.finalize = _wrap_delete_DOMException; +_exports_DOMException_objectDefinition.staticValues = _exports_DOMException_values; +_exports_DOMException_objectDefinition.staticFunctions = _exports_DOMException_functions; + +_exports_DOMException_objectDefinition.parentClass = _SwigObject_classRef; + + +_exports_DOMException_classRef = JSClassCreate(&_exports_DOMException_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException->clientdata = _exports_DOMException_classRef; + + +JS_registerClass(context, exports_object, "DOMException", &_exports_DOMException_classDefinition); + + +_exports_DOMNode_classDefinition.staticFunctions = _exports_DOMNode_staticFunctions; +_exports_DOMNode_classDefinition.staticValues = _exports_DOMNode_staticValues; +_exports_DOMNode_classDefinition.callAsConstructor = _wrap_new_veto_DOMNode; +_exports_DOMNode_objectDefinition.finalize = _wrap_delete_DOMNode; +_exports_DOMNode_objectDefinition.staticValues = _exports_DOMNode_values; +_exports_DOMNode_objectDefinition.staticFunctions = _exports_DOMNode_functions; + +_exports_DOMNode_objectDefinition.parentClass = _SwigObject_classRef; + + +_exports_DOMNode_classRef = JSClassCreate(&_exports_DOMNode_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata = _exports_DOMNode_classRef; + + +JS_registerClass(context, exports_object, "DOMNode", &_exports_DOMNode_classDefinition); + + +_exports_DOMAttr_classDefinition.staticFunctions = _exports_DOMAttr_staticFunctions; +_exports_DOMAttr_classDefinition.staticValues = _exports_DOMAttr_staticValues; +_exports_DOMAttr_classDefinition.callAsConstructor = _wrap_new_veto_DOMAttr; +_exports_DOMAttr_objectDefinition.finalize = _wrap_delete_DOMAttr; +_exports_DOMAttr_objectDefinition.staticValues = _exports_DOMAttr_values; +_exports_DOMAttr_objectDefinition.staticFunctions = _exports_DOMAttr_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMAttr_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMAttr_classRef = JSClassCreate(&_exports_DOMAttr_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr->clientdata = _exports_DOMAttr_classRef; + + +JS_registerClass(context, exports_object, "DOMAttr", &_exports_DOMAttr_classDefinition); + + +_exports_DOMElement_classDefinition.staticFunctions = _exports_DOMElement_staticFunctions; +_exports_DOMElement_classDefinition.staticValues = _exports_DOMElement_staticValues; +_exports_DOMElement_classDefinition.callAsConstructor = _wrap_new_veto_DOMElement; +_exports_DOMElement_objectDefinition.finalize = _wrap_delete_DOMElement; +_exports_DOMElement_objectDefinition.staticValues = _exports_DOMElement_values; +_exports_DOMElement_objectDefinition.staticFunctions = _exports_DOMElement_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMElement_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMElement_classRef = JSClassCreate(&_exports_DOMElement_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement->clientdata = _exports_DOMElement_classRef; + + +JS_registerClass(context, exports_object, "DOMElement", &_exports_DOMElement_classDefinition); + + +_exports_DOMEntity_classDefinition.staticFunctions = _exports_DOMEntity_staticFunctions; +_exports_DOMEntity_classDefinition.staticValues = _exports_DOMEntity_staticValues; +_exports_DOMEntity_classDefinition.callAsConstructor = _wrap_new_veto_DOMEntity; +_exports_DOMEntity_objectDefinition.finalize = _wrap_delete_DOMEntity; +_exports_DOMEntity_objectDefinition.staticValues = _exports_DOMEntity_values; +_exports_DOMEntity_objectDefinition.staticFunctions = _exports_DOMEntity_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMEntity_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMEntity_classRef = JSClassCreate(&_exports_DOMEntity_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity->clientdata = _exports_DOMEntity_classRef; + + +JS_registerClass(context, exports_object, "DOMEntity", &_exports_DOMEntity_classDefinition); + + +_exports_DOMDocumentType_classDefinition.staticFunctions = _exports_DOMDocumentType_staticFunctions; +_exports_DOMDocumentType_classDefinition.staticValues = _exports_DOMDocumentType_staticValues; +_exports_DOMDocumentType_classDefinition.callAsConstructor = _wrap_new_veto_DOMDocumentType; +_exports_DOMDocumentType_objectDefinition.finalize = _wrap_delete_DOMDocumentType; +_exports_DOMDocumentType_objectDefinition.staticValues = _exports_DOMDocumentType_values; +_exports_DOMDocumentType_objectDefinition.staticFunctions = _exports_DOMDocumentType_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMDocumentType_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMDocumentType_classRef = JSClassCreate(&_exports_DOMDocumentType_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType->clientdata = _exports_DOMDocumentType_classRef; + + +JS_registerClass(context, exports_object, "DOMDocumentType", &_exports_DOMDocumentType_classDefinition); + + +_exports_DOMCharacterData_classDefinition.staticFunctions = _exports_DOMCharacterData_staticFunctions; +_exports_DOMCharacterData_classDefinition.staticValues = _exports_DOMCharacterData_staticValues; +_exports_DOMCharacterData_classDefinition.callAsConstructor = _wrap_new_veto_DOMCharacterData; +_exports_DOMCharacterData_objectDefinition.finalize = _wrap_delete_DOMCharacterData; +_exports_DOMCharacterData_objectDefinition.staticValues = _exports_DOMCharacterData_values; +_exports_DOMCharacterData_objectDefinition.staticFunctions = _exports_DOMCharacterData_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMCharacterData_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMCharacterData_classRef = JSClassCreate(&_exports_DOMCharacterData_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata = _exports_DOMCharacterData_classRef; + + +JS_registerClass(context, exports_object, "DOMCharacterData", &_exports_DOMCharacterData_classDefinition); + + +_exports_DOMComment_classDefinition.staticFunctions = _exports_DOMComment_staticFunctions; +_exports_DOMComment_classDefinition.staticValues = _exports_DOMComment_staticValues; +_exports_DOMComment_classDefinition.callAsConstructor = _wrap_new_veto_DOMComment; +_exports_DOMComment_objectDefinition.finalize = _wrap_delete_DOMComment; +_exports_DOMComment_objectDefinition.staticValues = _exports_DOMComment_values; +_exports_DOMComment_objectDefinition.staticFunctions = _exports_DOMComment_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData != NULL) { + _exports_DOMComment_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata; +} + + +_exports_DOMComment_classRef = JSClassCreate(&_exports_DOMComment_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment->clientdata = _exports_DOMComment_classRef; + + +JS_registerClass(context, exports_object, "DOMComment", &_exports_DOMComment_classDefinition); + + +_exports_DOMText_classDefinition.staticFunctions = _exports_DOMText_staticFunctions; +_exports_DOMText_classDefinition.staticValues = _exports_DOMText_staticValues; +_exports_DOMText_classDefinition.callAsConstructor = _wrap_new_veto_DOMText; +_exports_DOMText_objectDefinition.finalize = _wrap_delete_DOMText; +_exports_DOMText_objectDefinition.staticValues = _exports_DOMText_values; +_exports_DOMText_objectDefinition.staticFunctions = _exports_DOMText_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData != NULL) { + _exports_DOMText_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata; +} + + +_exports_DOMText_classRef = JSClassCreate(&_exports_DOMText_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText->clientdata = _exports_DOMText_classRef; + + +JS_registerClass(context, exports_object, "DOMText", &_exports_DOMText_classDefinition); + + +_exports_DOMCDATASection_classDefinition.staticFunctions = _exports_DOMCDATASection_staticFunctions; +_exports_DOMCDATASection_classDefinition.staticValues = _exports_DOMCDATASection_staticValues; +_exports_DOMCDATASection_classDefinition.callAsConstructor = _wrap_new_veto_DOMCDATASection; +_exports_DOMCDATASection_objectDefinition.finalize = _wrap_delete_DOMCDATASection; +_exports_DOMCDATASection_objectDefinition.staticValues = _exports_DOMCDATASection_values; +_exports_DOMCDATASection_objectDefinition.staticFunctions = _exports_DOMCDATASection_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText != NULL) { + _exports_DOMCDATASection_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText->clientdata; +} + + +_exports_DOMCDATASection_classRef = JSClassCreate(&_exports_DOMCDATASection_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection->clientdata = _exports_DOMCDATASection_classRef; + + +JS_registerClass(context, exports_object, "DOMCDATASection", &_exports_DOMCDATASection_classDefinition); + + +_exports_DOMNodeList_classDefinition.staticFunctions = _exports_DOMNodeList_staticFunctions; +_exports_DOMNodeList_classDefinition.staticValues = _exports_DOMNodeList_staticValues; +_exports_DOMNodeList_classDefinition.callAsConstructor = _wrap_new_veto_DOMNodeList; +_exports_DOMNodeList_objectDefinition.finalize = _wrap_delete_DOMNodeList; +_exports_DOMNodeList_objectDefinition.staticValues = _exports_DOMNodeList_values; +_exports_DOMNodeList_objectDefinition.staticFunctions = _exports_DOMNodeList_functions; + +_exports_DOMNodeList_objectDefinition.parentClass = _SwigObject_classRef; + + +_exports_DOMNodeList_classRef = JSClassCreate(&_exports_DOMNodeList_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList->clientdata = _exports_DOMNodeList_classRef; + + +JS_registerClass(context, exports_object, "DOMNodeList", &_exports_DOMNodeList_classDefinition); + + +_exports_DOMNamedNodeMap_classDefinition.staticFunctions = _exports_DOMNamedNodeMap_staticFunctions; +_exports_DOMNamedNodeMap_classDefinition.staticValues = _exports_DOMNamedNodeMap_staticValues; +_exports_DOMNamedNodeMap_classDefinition.callAsConstructor = _wrap_new_veto_DOMNamedNodeMap; +_exports_DOMNamedNodeMap_objectDefinition.finalize = _wrap_delete_DOMNamedNodeMap; +_exports_DOMNamedNodeMap_objectDefinition.staticValues = _exports_DOMNamedNodeMap_values; +_exports_DOMNamedNodeMap_objectDefinition.staticFunctions = _exports_DOMNamedNodeMap_functions; + +_exports_DOMNamedNodeMap_objectDefinition.parentClass = _SwigObject_classRef; + + +_exports_DOMNamedNodeMap_classRef = JSClassCreate(&_exports_DOMNamedNodeMap_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap->clientdata = _exports_DOMNamedNodeMap_classRef; + + +JS_registerClass(context, exports_object, "DOMNamedNodeMap", &_exports_DOMNamedNodeMap_classDefinition); + + +_exports_DOMDocumentFragment_classDefinition.staticFunctions = _exports_DOMDocumentFragment_staticFunctions; +_exports_DOMDocumentFragment_classDefinition.staticValues = _exports_DOMDocumentFragment_staticValues; +_exports_DOMDocumentFragment_classDefinition.callAsConstructor = _wrap_new_veto_DOMDocumentFragment; +_exports_DOMDocumentFragment_objectDefinition.finalize = _wrap_delete_DOMDocumentFragment; +_exports_DOMDocumentFragment_objectDefinition.staticValues = _exports_DOMDocumentFragment_values; +_exports_DOMDocumentFragment_objectDefinition.staticFunctions = _exports_DOMDocumentFragment_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMDocumentFragment_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMDocumentFragment_classRef = JSClassCreate(&_exports_DOMDocumentFragment_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentFragment->clientdata = _exports_DOMDocumentFragment_classRef; + + +JS_registerClass(context, exports_object, "DOMDocumentFragment", &_exports_DOMDocumentFragment_classDefinition); + + +_exports_DOMEntityReference_classDefinition.staticFunctions = _exports_DOMEntityReference_staticFunctions; +_exports_DOMEntityReference_classDefinition.staticValues = _exports_DOMEntityReference_staticValues; +_exports_DOMEntityReference_classDefinition.callAsConstructor = _wrap_new_veto_DOMEntityReference; +_exports_DOMEntityReference_objectDefinition.finalize = _wrap_delete_DOMEntityReference; +_exports_DOMEntityReference_objectDefinition.staticValues = _exports_DOMEntityReference_values; +_exports_DOMEntityReference_objectDefinition.staticFunctions = _exports_DOMEntityReference_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMEntityReference_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMEntityReference_classRef = JSClassCreate(&_exports_DOMEntityReference_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference->clientdata = _exports_DOMEntityReference_classRef; + + +JS_registerClass(context, exports_object, "DOMEntityReference", &_exports_DOMEntityReference_classDefinition); + + +_exports_DOMNotation_classDefinition.staticFunctions = _exports_DOMNotation_staticFunctions; +_exports_DOMNotation_classDefinition.staticValues = _exports_DOMNotation_staticValues; +_exports_DOMNotation_classDefinition.callAsConstructor = _wrap_new_veto_DOMNotation; +_exports_DOMNotation_objectDefinition.finalize = _wrap_delete_DOMNotation; +_exports_DOMNotation_objectDefinition.staticValues = _exports_DOMNotation_values; +_exports_DOMNotation_objectDefinition.staticFunctions = _exports_DOMNotation_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMNotation_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMNotation_classRef = JSClassCreate(&_exports_DOMNotation_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation->clientdata = _exports_DOMNotation_classRef; + + +JS_registerClass(context, exports_object, "DOMNotation", &_exports_DOMNotation_classDefinition); + + +_exports_DOMProcessingInstruction_classDefinition.staticFunctions = _exports_DOMProcessingInstruction_staticFunctions; +_exports_DOMProcessingInstruction_classDefinition.staticValues = _exports_DOMProcessingInstruction_staticValues; +_exports_DOMProcessingInstruction_classDefinition.callAsConstructor = _wrap_new_veto_DOMProcessingInstruction; +_exports_DOMProcessingInstruction_objectDefinition.finalize = _wrap_delete_DOMProcessingInstruction; +_exports_DOMProcessingInstruction_objectDefinition.staticValues = _exports_DOMProcessingInstruction_values; +_exports_DOMProcessingInstruction_objectDefinition.staticFunctions = _exports_DOMProcessingInstruction_functions; + +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode != NULL) { + _exports_DOMProcessingInstruction_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata; +} + + +_exports_DOMProcessingInstruction_classRef = JSClassCreate(&_exports_DOMProcessingInstruction_objectDefinition); +SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction->clientdata = _exports_DOMProcessingInstruction_classRef; + + +JS_registerClass(context, exports_object, "DOMProcessingInstruction", &_exports_DOMProcessingInstruction_classDefinition); + + +_exports_Event_classDefinition.staticFunctions = _exports_Event_staticFunctions; +_exports_Event_classDefinition.staticValues = _exports_Event_staticValues; +_exports_Event_classDefinition.callAsConstructor = _wrap_new_Event; +_exports_Event_objectDefinition.finalize = _wrap_delete_Event; +_exports_Event_objectDefinition.staticValues = _exports_Event_values; +_exports_Event_objectDefinition.staticFunctions = _exports_Event_functions; + +_exports_Event_objectDefinition.parentClass = _SwigObject_classRef; + + +_exports_Event_classRef = JSClassCreate(&_exports_Event_objectDefinition); +SWIGTYPE_p_uscxml__Event->clientdata = _exports_Event_classRef; + + +JS_registerClass(context, exports_object, "Event", &_exports_Event_classDefinition); + + +_exports_ErrorEvent_classDefinition.staticFunctions = _exports_ErrorEvent_staticFunctions; +_exports_ErrorEvent_classDefinition.staticValues = _exports_ErrorEvent_staticValues; +_exports_ErrorEvent_classDefinition.callAsConstructor = _wrap_new_ErrorEvent; +_exports_ErrorEvent_objectDefinition.finalize = _wrap_delete_ErrorEvent; +_exports_ErrorEvent_objectDefinition.staticValues = _exports_ErrorEvent_values; +_exports_ErrorEvent_objectDefinition.staticFunctions = _exports_ErrorEvent_functions; + +if (SWIGTYPE_p_uscxml__Event != NULL) { + _exports_ErrorEvent_objectDefinition.parentClass = (JSClassRef) SWIGTYPE_p_uscxml__Event->clientdata; +} + + +_exports_ErrorEvent_classRef = JSClassCreate(&_exports_ErrorEvent_objectDefinition); +SWIGTYPE_p_uscxml__ErrorEvent->clientdata = _exports_ErrorEvent_classRef; + + +JS_registerClass(context, exports_object, "ErrorEvent", &_exports_ErrorEvent_classDefinition); + + + +/* Register namespaces */ + + +*exports = exports_object; + +return true; +} +#ifdef __cplusplus +} +#endif + diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h deleted file mode 100644 index 0b49c92..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCDOM_H_1RC5LCG8 -#define JSCDOM_H_1RC5LCG8 - -#include "uscxml/InterpreterInfo.h" -#include -#include -#include "../Storage.h" - -#define JSC_DESTRUCTOR(type) \ -static void jsDestructor(JSObjectRef object) { \ - type* thing = static_cast(JSObjectGetPrivate(object)); \ - if (thing) {\ - delete thing->nativeObj; \ - delete thing; \ - JSObjectSetPrivate(object, NULL);\ - }\ -} - -#define JSC_DESTRUCTOR_KEEP_WRAPPED(type) \ -static void jsDestructor(JSObjectRef object) { \ -type* thing = static_cast(JSObjectGetPrivate(object)); \ -delete thing; \ -} - -namespace Arabica { -namespace DOM { - -class JSCDOM { -public: - JSCDOM(); - virtual ~JSCDOM(); - uscxml::Storage* storage; - uscxml::NameSpaceInfo* nsInfo; - Arabica::XPath::XPath* xpath; - -}; - -} -} - -#endif /* end of include guard: JSCDOM_H_1RC5LCG8 */ diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp index d3eb0ef..d43efbe 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp @@ -18,55 +18,66 @@ */ #include "uscxml/Common.h" -#include "uscxml/config.h" -#include "uscxml/URL.h" +#include "uscxml/util/URL.h" #include "uscxml/util/String.h" #include "JSCDataModel.h" -#include "JSCDOM.h" -#include "dom/JSCDocument.h" -#include "dom/JSCElement.h" -#include "dom/JSCText.h" -#include "dom/JSCCDATASection.h" -#include "dom/JSCSCXMLEvent.h" - -#include "dom/JSCArrayBuffer.h" -#include "dom/JSCInt8Array.h" -#include "dom/JSCUint8Array.h" -#include "dom/JSCUint8ClampedArray.h" -#include "dom/JSCInt16Array.h" -#include "dom/JSCUint16Array.h" -#include "dom/JSCInt32Array.h" -#include "dom/JSCUint32Array.h" -#include "dom/JSCFloat32Array.h" -#include "dom/JSCFloat64Array.h" -#include "dom/JSCDataView.h" - -#include "uscxml/Message.h" -#include "uscxml/dom/DOMUtils.h" -#include +//#include "JSCSCXMLEvent.h" -#ifdef BUILD_AS_PLUGINS -#include -#endif +#include "uscxml/messages/Event.h" +#include "uscxml/util/DOM.h" +#include -#define TO_JSC_DOMVALUE(type) \ -struct JSC##type::JSC##type##Private* privData = new JSC##type::JSC##type##Private(); \ -privData->dom = _dom; \ -privData->nativeObj = new type(node); \ -JSObjectRef retObj = JSObjectMake(_ctx, JSC##type::getTmpl(), privData);\ -return retObj; +#define EVENT_STRING_OR_UNDEF(field, cond) \ +JSStringRef field##Name = JSStringCreateWithUTF8CString( #field ); \ +JSStringRef field##Val = JSStringCreateWithUTF8CString(event.field.c_str()); \ +JSObjectSetProperty(_ctx, \ + eventObj, \ + field##Name, \ + (cond ? JSValueMakeString(_ctx, field##Val) : JSValueMakeUndefined(_ctx)), \ + 0, \ + &exception); \ +JSStringRelease(field##Name); \ +JSStringRelease(field##Val); \ +if (exception) \ + handleException(exception); -#define JSC_ADD_GLOBAL_OBJECT(name, constructor)\ -JSStringRef name##Name = JSStringCreateWithUTF8CString(#name);\ -JSObjectRef name = JSObjectMake(dm->_ctx, constructor, NULL);\ -JSObjectSetProperty(dm->_ctx, JSContextGetGlobalObject(dm->_ctx), name##Name, name, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, NULL);\ -JSStringRelease(name##Name); -namespace uscxml { +using namespace xercesc; + +static JSValueRef XMLString2JS(const XMLCh* input, JSContextRef context) { + JSValueRef output; + + char* res = xercesc::XMLString::transcode(input); + + JSStringRef stringRef = JSStringCreateWithUTF8CString(res); + output = JSValueMakeString(context, stringRef); + JSStringRelease(stringRef); + + return output; +} + +static XMLCh* JS2XMLString(JSValueRef input, JSContextRef context) { + + if (!JSValueIsString(context, input)) + return NULL; + + JSValueRef exception = NULL; + JSStringRef stringInput = JSValueToStringCopy(context, input, &exception); + + // TODO: I am leaking! + size_t maxSize = JSStringGetMaximumUTF8CStringSize(stringInput); + char* output = new char[maxSize + 1]; + + JSStringGetUTF8CString(stringInput, output, maxSize); + XMLCh* ret = xercesc::XMLString::transcode(output); -using namespace Arabica::XPath; -using namespace Arabica::DOM; + return(ret); +} + +#include "JSCDOM.cpp.inc" + +namespace uscxml { #ifdef BUILD_AS_PLUGINS PLUMA_CONNECTOR @@ -77,13 +88,10 @@ bool pluginConnect(pluma::Host& host) { #endif JSCDataModel::JSCDataModel() { - _dom = NULL; _ctx = NULL; } JSCDataModel::~JSCDataModel() { - if (_dom) - delete _dom; if (_ctx) JSGlobalContextRelease(_ctx); } @@ -159,31 +167,6 @@ JSValueRef JSCDataModel::jsExtension(JSContextRef ctx, JSObjectRef function, JSO return JSValueMakeNull(ctx); } -#if 0 -typedef struct { - int version; /* current (and only) version is 0 */ - JSClassAttributes attributes; - - const char* className; - JSClassRef parentClass; - - const JSStaticValue* staticValues; - const JSStaticFunction* staticFunctions; - - JSObjectInitializeCallback initialize; - JSObjectFinalizeCallback finalize; - JSObjectHasPropertyCallback hasProperty; - JSObjectGetPropertyCallback getProperty; - JSObjectSetPropertyCallback setProperty; - JSObjectDeletePropertyCallback deleteProperty; - JSObjectGetPropertyNamesCallback getPropertyNames; - JSObjectCallAsFunctionCallback callAsFunction; - JSObjectCallAsConstructorCallback callAsConstructor; - JSObjectHasInstanceCallback hasInstance; - JSObjectConvertToTypeCallback convertToType; -} JSClassDefinition; -#endif - // functions need to be objects to hold private data in JSC JSClassDefinition JSCDataModel::jsInClassDef = { 0, 0, "In", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, jsIn, 0, 0, 0 }; JSClassDefinition JSCDataModel::jsPrintClassDef = { 0, 0, "print", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, jsPrint, 0, 0, 0 }; @@ -192,17 +175,74 @@ JSClassDefinition JSCDataModel::jsExtensionClassDef = { 0, 0, "Extension", 0, 0, JSClassDefinition JSCDataModel::jsIOProcessorsClassDef = { 0, 0, "ioProcessors", 0, 0, 0, 0, 0, jsIOProcessorHasProp, jsIOProcessorGetProp, 0, 0, jsIOProcessorListProps, 0, 0, 0, 0 }; JSClassDefinition JSCDataModel::jsInvokersClassDef = { 0, 0, "invokers", 0, 0, 0, 0, 0, jsInvokerHasProp, jsInvokerGetProp, 0, 0, jsInvokerListProps, 0, 0, 0, 0 }; -boost::shared_ptr JSCDataModel::create(InterpreterInfo* interpreter) { - boost::shared_ptr dm = boost::shared_ptr(new JSCDataModel()); +std::mutex JSCDataModel::_initMutex; + +bool JSCNodeListHasPropertyCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { + size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName); + char* propBuffer = new char[propMaxSize]; + JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize); + std::string propName(propBuffer); + free(propBuffer); + + std::string base = "0123456789"; + if (propName.find_first_not_of(base) != std::string::npos) { + return false; + } + + int index = strTo(propName); + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(object); + DOMNodeList* nodeList = (DOMNodeList*)t->swigCObject; + + if (nodeList->getLength() < index) { + return false; + } + + return true; +} + +JSValueRef JSCNodeListGetPropertyCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { + size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName); + char* propBuffer = new char[propMaxSize]; + JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize); + std::string propName(propBuffer); + free(propBuffer); + + std::string base = "0123456789"; + if (propName.find_first_not_of(base) != std::string::npos) { + return JSValueMakeUndefined(context); + } + + int index = strTo(propName); + SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(object); + DOMNodeList* nodeList = (DOMNodeList*)t->swigCObject; + + if (nodeList->getLength() < index) { + return JSValueMakeUndefined(context); + } + + DOMNode* node = nodeList->item(index); + JSValueRef jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(node), + SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&node)), 0); + return jsresult; +} + +std::shared_ptr JSCDataModel::create(DataModelCallbacks* callbacks) { + std::shared_ptr dm(new JSCDataModel()); dm->_ctx = JSGlobalContextCreate(NULL); - dm->_interpreter = interpreter; + dm->_callbacks = callbacks; + + JSObjectRef exports; - dm->_dom = new JSCDOM(); - dm->_dom->xpath = new XPath(); - dm->_dom->xpath->setNamespaceContext(*interpreter->getNameSpaceInfo().getNSContext()); - dm->_dom->storage = new Storage(URL::getResourceDir() + PATH_SEPERATOR + interpreter->getName() + ".storage"); - dm->_dom->nsInfo = new NameSpaceInfo(interpreter->getNameSpaceInfo()); + // register subscript operator with nodelist + _exports_DOMNodeList_objectDefinition.hasProperty = JSCNodeListHasPropertyCallback; + _exports_DOMNodeList_objectDefinition.getProperty = JSCNodeListGetPropertyCallback; + + // not thread safe! + { + std::lock_guard lock(_initMutex); + JSCDOM_initialize(dm->_ctx, &exports); + } // introduce global functions as objects for private data JSClassRef jsInClassRef = JSClassCreate(&jsInClassDef); @@ -230,76 +270,68 @@ boost::shared_ptr JSCDataModel::create(InterpreterInfo* interpret JSStringRelease(ioProcName); JSStringRef nameName = JSStringCreateWithUTF8CString("_name"); - JSStringRef name = JSStringCreateWithUTF8CString(dm->_interpreter->getName().c_str()); + JSStringRef name = JSStringCreateWithUTF8CString(dm->_callbacks->getName().c_str()); JSObjectSetProperty(dm->_ctx, JSContextGetGlobalObject(dm->_ctx), nameName, JSValueMakeString(dm->_ctx, name), kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, NULL); JSStringRelease(nameName); JSStringRelease(name); JSStringRef sessionIdName = JSStringCreateWithUTF8CString("_sessionid"); - JSStringRef sessionId = JSStringCreateWithUTF8CString(dm->_interpreter->getSessionId().c_str()); + JSStringRef sessionId = JSStringCreateWithUTF8CString(dm->_callbacks->getSessionId().c_str()); JSObjectSetProperty(dm->_ctx, JSContextGetGlobalObject(dm->_ctx), sessionIdName, JSValueMakeString(dm->_ctx, sessionId), kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, NULL); JSStringRelease(sessionIdName); JSStringRelease(sessionId); - JSC_ADD_GLOBAL_OBJECT(ArrayBuffer, JSCArrayBuffer::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Int8Array, JSCInt8Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Uint8Array, JSCUint8Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Uint8ClampedArray, JSCUint8ClampedArray::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Int16Array, JSCInt16Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Uint16Array, JSCUint16Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Int32Array, JSCInt32Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Uint32Array, JSCUint32Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Float32Array, JSCFloat32Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(Float64Array, JSCFloat64Array::getTmpl()); - JSC_ADD_GLOBAL_OBJECT(DataView, JSCDataView::getTmpl()); - - JSCDocument::JSCDocumentPrivate* privData = new JSCDocument::JSCDocumentPrivate(); - if (interpreter) { - privData->nativeObj = new Document(interpreter->getDocument()); - privData->dom = dm->_dom; - - JSObjectRef documentObject = JSObjectMake(dm->_ctx, JSCDocument::getTmpl(), privData); - JSObjectRef globalObject = JSContextGetGlobalObject(dm->_ctx); - JSStringRef documentName = JSStringCreateWithUTF8CString("document"); - - JSObjectSetProperty(dm->_ctx, globalObject, documentName, documentObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, NULL); - JSStringRelease(documentName); - } - - dm->eval(Element(), "_x = {};"); + dm->evalAsValue("_x = {};"); return dm; } -void JSCDataModel::pushContext() { -} - -void JSCDataModel::popContext() { -} - void JSCDataModel::setEvent(const Event& event) { - JSCSCXMLEvent::JSCSCXMLEventPrivate* privData = new JSCSCXMLEvent::JSCSCXMLEventPrivate(); - privData->nativeObj = new Event(event); - privData->dom = _dom; + Event* evPtr = new Event(event); - JSObjectRef eventObj = JSObjectMake(_ctx, JSCSCXMLEvent::getTmpl(), privData); + JSObjectRef eventObj = SWIG_JSC_NewPointerObj(_ctx, evPtr, SWIGTYPE_p_uscxml__Event, SWIG_POINTER_OWN); JSObjectRef globalObject = JSContextGetGlobalObject(_ctx); JSValueRef exception = NULL; - if (event.raw.size() == 0) { - std::stringstream ssRaw; - ssRaw << event; - privData->nativeObj->raw = ssRaw.str(); + /* Manually handle swig ignored fields */ + EVENT_STRING_OR_UNDEF(sendid, !event.hideSendId); // test333 + EVENT_STRING_OR_UNDEF(origin, event.origin.size() > 0); // test335 + EVENT_STRING_OR_UNDEF(origintype, event.origintype.size() > 0); // test337 + EVENT_STRING_OR_UNDEF(invokeid, event.invokeid.size() > 0); // test339 + + /* Manually handle swig ignored event type */ + JSStringRef eventTypeName = JSStringCreateWithUTF8CString("type"); + JSStringRef eventTypeVal; + + // test 331 + switch (event.eventType) { + case Event::EXTERNAL: + eventTypeVal = JSStringCreateWithUTF8CString("external"); + break; + case Event::INTERNAL: + eventTypeVal = JSStringCreateWithUTF8CString("internal"); + break; + case Event::PLATFORM: + eventTypeVal = JSStringCreateWithUTF8CString("platform"); + break; } - if (event.dom) { + JSObjectSetProperty(_ctx, eventObj, eventTypeName, JSValueMakeString(_ctx, eventTypeVal), 0, &exception); + if (exception) + handleException(exception); + + JSStringRelease(eventTypeName); + JSStringRelease(eventTypeVal); + + /* Manually handle swig ignored event data */ + if (event.data.node) { JSStringRef propName = JSStringCreateWithUTF8CString("data"); - JSObjectSetProperty(_ctx, eventObj, propName, getNodeAsValue(event.dom), 0, &exception); + JSObjectSetProperty(_ctx, eventObj, propName, getNodeAsValue(event.data.node), 0, &exception); JSStringRelease(propName); if (exception) handleException(exception); - +#if 0 } else if (event.content.length() > 0) { // _event.data is a string or JSON Data json = Data::fromJSON(event.content); @@ -319,6 +351,7 @@ void JSCDataModel::setEvent(const Event& event) { if (exception) handleException(exception); } +#endif } else { // _event.data is KVP Event eventCopy(event); @@ -359,22 +392,21 @@ void JSCDataModel::setEvent(const Event& event) { } -Data JSCDataModel::getStringAsData(const std::string& content) { +Data JSCDataModel::evalAsData(const std::string& content) { JSValueRef result = evalAsValue(content); - Data data = getValueAsData(result); - return data; + return getValueAsData(result); +} + +Data JSCDataModel::getAsData(const std::string& content) { + // parse as JSON test 578 + return Data::fromJSON(content); } JSValueRef JSCDataModel::getDataAsValue(const Data& data) { JSValueRef exception = NULL; if (data.node) { - JSCNode::JSCNodePrivate* privData = new JSCNode::JSCNodePrivate(); - privData->nativeObj = new Node(data.node); - privData->dom = _dom; - - JSObjectRef value = JSObjectMake(_ctx, JSCNode::getTmpl(), privData); - return value; + return getNodeAsValue(data.node); } if (data.compound.size() > 0) { JSObjectRef value = JSObjectMake(_ctx, 0, 0); @@ -417,16 +449,16 @@ JSValueRef JSCDataModel::getDataAsValue(const Data& data) { } } } - if (data.binary) { - uscxml::ArrayBuffer* localInstance = new uscxml::ArrayBuffer(data.binary); - - JSClassRef retClass = JSCArrayBuffer::getTmpl(); - struct JSCArrayBuffer::JSCArrayBufferPrivate* retPrivData = new JSCArrayBuffer::JSCArrayBufferPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(_ctx, retClass, retPrivData); - return retObj; - } +// if (data.binary) { +// uscxml::ArrayBuffer* localInstance = new uscxml::ArrayBuffer(data.binary); +// +// JSClassRef retClass = JSCArrayBuffer::getTmpl(); +// struct JSCArrayBuffer::JSCArrayBufferPrivate* retPrivData = new JSCArrayBuffer::JSCArrayBufferPrivate(); +// retPrivData->nativeObj = localInstance; +// +// JSObjectRef retObj = JSObjectMake(_ctx, retClass, retPrivData); +// return retObj; +// } return JSValueMakeUndefined(_ctx); } @@ -466,15 +498,18 @@ Data JSCDataModel::getValueAsData(const JSValueRef value) { JSObjectRef objValue = JSValueToObject(_ctx, value, &exception); if (exception) handleException(exception); - if (JSValueIsObjectOfClass(_ctx, value, JSCArrayBuffer::getTmpl())) { - // binary data - JSCArrayBuffer::JSCArrayBufferPrivate* privObj = (JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(objValue); - data.binary = privObj->nativeObj->_blob; - return data; - } else if (JSValueIsObjectOfClass(_ctx, value, JSCNode::getTmpl())) { +// if (JSValueIsObjectOfClass(_ctx, value, JSCArrayBuffer::getTmpl())) { +// // binary data +// JSCArrayBuffer::JSCArrayBufferPrivate* privObj = (JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(objValue); +// data.binary = privObj->nativeObj->_blob; +// return data; +// } else + + if (JSValueIsObjectOfClass(_ctx, value, _exports_DOMNode_classRef)) { // dom node - JSCNode::JSCNodePrivate* privObj = (JSCNode::JSCNodePrivate*)JSObjectGetPrivate(objValue); - data.node = *privObj->nativeObj; + void* privData = NULL; + SWIG_JSC_ConvertPtr(_ctx, value, &privData, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0); + data.node = (xercesc::DOMNode*)privData; return data; } std::set propertySet; @@ -518,10 +553,6 @@ Data JSCDataModel::getValueAsData(const JSValueRef value) { return data; } -bool JSCDataModel::validate(const std::string& location, const std::string& schema) { - return true; -} - uint32_t JSCDataModel::getLength(const std::string& expr) { JSValueRef result; @@ -558,10 +589,12 @@ void JSCDataModel::setForeach(const std::string& item, } } +#if 0 bool JSCDataModel::isLocation(const std::string& expr) { // location needs to be LHS and ++ is only valid for LHS return isValidSyntax(expr + "++"); } +#endif bool JSCDataModel::isValidSyntax(const std::string& expr) { JSStringRef scriptJS = JSStringCreateWithUTF8CString(expr.c_str()); @@ -587,34 +620,11 @@ bool JSCDataModel::isDeclared(const std::string& expr) { return true; } -void JSCDataModel::eval(const Element& scriptElem, - const std::string& expr) { - evalAsValue(expr); -} - -bool JSCDataModel::evalAsBool(const Arabica::DOM::Element& node, const std::string& expr) { +bool JSCDataModel::evalAsBool(const std::string& expr) { JSValueRef result = evalAsValue(expr); return JSValueToBoolean(_ctx, result); } -std::string JSCDataModel::evalAsString(const std::string& expr) { - JSValueRef result = evalAsValue(expr); - JSValueRef exception = NULL; - - JSStringRef stringValue = JSValueToStringCopy( _ctx, result, &exception); - if (exception) - handleException(exception); - - size_t maxSize = JSStringGetMaximumUTF8CStringSize(stringValue); - char data[maxSize]; - JSStringGetUTF8CString(stringValue, data, maxSize); - std::string retString(data); - - JSStringRelease(stringValue); - - return retString; -} - JSValueRef JSCDataModel::evalAsValue(const std::string& expr, bool dontThrow) { JSStringRef scriptJS = JSStringCreateWithUTF8CString(expr.c_str()); JSValueRef exception = NULL; @@ -627,24 +637,27 @@ JSValueRef JSCDataModel::evalAsValue(const std::string& expr, bool dontThrow) { return result; } -JSValueRef JSCDataModel::getNodeAsValue(const Node& node) { - switch (node.getNodeType()) { - case Node_base::ELEMENT_NODE: { - TO_JSC_DOMVALUE(Element); - } - case Node_base::TEXT_NODE: { - TO_JSC_DOMVALUE(Text); - } - case Node_base::CDATA_SECTION_NODE: { - TO_JSC_DOMVALUE(CDATASection); - } - case Node_base::DOCUMENT_NODE: { - TO_JSC_DOMVALUE(Document); - } - default: { - TO_JSC_DOMVALUE(Node); - } - } +JSValueRef JSCDataModel::getNodeAsValue(const DOMNode* node) { + return SWIG_JSC_NewPointerObj(_ctx, + (void*)node, + SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, + SWIG_as_voidptrptr(&node)), + 0); + +// switch (node->getNodeType()) { +// case DOMNode::ELEMENT_NODE: +// return SWIG_JSC_NewPointerObj(_ctx, (void*)node, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0); +// break; +// +// case DOMNode::COMMENT_NODE: +// return SWIG_JSC_NewPointerObj(_ctx, (void*)node, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment, 0); +// break; +// +// // TODO: We need to dispatch more types here! +// default: +// return SWIG_JSC_NewPointerObj(_ctx, (void*)node, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0); +// break; +// } } void JSCDataModel::assign(const std::string& location, const Data& data) { @@ -669,7 +682,7 @@ void JSCDataModel::assign(const std::string& location, const Data& data) { } /** - * test157: We need to evluate, as this will not throw for 'continue' = Var[5] in + * test157: We need to evaluate, as this will not throw for 'continue' = Var[5] in */ // JSObjectSetProperty(_ctx, JSContextGetGlobalObject(_ctx), JSStringCreateWithUTF8CString(location.c_str()), getDataAsValue(data), 0, &exception); @@ -677,66 +690,10 @@ void JSCDataModel::assign(const std::string& location, const Data& data) { handleException(exception); } -void JSCDataModel::assign(const Element& assignElem, - const Node& node, - const std::string& content) { - std::string key; - if (HAS_ATTR(assignElem, "id")) { - key = ATTR(assignElem, "id"); - } else if (HAS_ATTR(assignElem, "location")) { - key = ATTR(assignElem, "location"); - } - if (key.length() == 0) { - ERROR_EXECUTION_THROW("Assign element has neither id nor location"); - } - - if (HAS_ATTR(assignElem, "expr")) { - assign(key, Data(ATTR(assignElem, "expr"), Data::INTERPRETED)); - } else if (node) { - Data d; - d.node = node; - assign(key, d); - } else if (content.size() > 0) { - try { - Data d = Data::fromJSON(content); - if (d.empty()) - throw Event(); - assign(key, Data(d, Data::INTERPRETED)); - } catch (Event e) { - assign(key, Data("\"" + spaceNormalize(content) + "\"", Data::INTERPRETED)); - } - } else { - JSValueRef exception = NULL; - JSObjectSetProperty(_ctx, JSContextGetGlobalObject(_ctx), JSStringCreateWithUTF8CString(key.c_str()), JSValueMakeUndefined(_ctx), 0, &exception); - if (exception) - handleException(exception); - } -} - -void JSCDataModel::init(const Element& dataElem, - const Node& node, - const std::string& content) { - try { - assign(dataElem, node, content); - } catch (Event e) { - // test 277 - std::string key; - if (HAS_ATTR(dataElem, "id")) { - key = ATTR(dataElem, "id"); - } else if (HAS_ATTR(dataElem, "location")) { - key = ATTR(dataElem, "location"); - } - if (key.size() > 0) { - evalAsValue(key + " = undefined", true); - } - throw e; - } -} - void JSCDataModel::init(const std::string& location, const Data& data) { try { assign(location, data); - } catch (Event e) { + } catch (ErrorEvent e) { // test 277 evalAsValue(location + " = undefined", true); throw e; @@ -814,7 +771,7 @@ JSValueRef JSCDataModel::jsIn(JSContextRef ctx, JSObjectRef function, JSObjectRe std::string stateName(buffer); free(buffer); - if (INSTANCE->_interpreter->isInState(stateName)) { + if (INSTANCE->_callbacks->isInState(stateName)) { continue; } } @@ -826,7 +783,7 @@ JSValueRef JSCDataModel::jsIn(JSContextRef ctx, JSObjectRef function, JSObjectRe bool JSCDataModel::jsIOProcessorHasProp(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { JSCDataModel* INSTANCE = (JSCDataModel*)JSObjectGetPrivate(object); - std::map ioProcessors = INSTANCE->_interpreter->getIOProcessors(); + std::map ioProcessors = INSTANCE->_callbacks->getIOProcessors(); size_t maxSize = JSStringGetMaximumUTF8CStringSize(propertyName); char buffer[maxSize]; @@ -838,7 +795,7 @@ bool JSCDataModel::jsIOProcessorHasProp(JSContextRef ctx, JSObjectRef object, JS JSValueRef JSCDataModel::jsIOProcessorGetProp(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { JSCDataModel* INSTANCE = (JSCDataModel*)JSObjectGetPrivate(object); - std::map ioProcessors = INSTANCE->_interpreter->getIOProcessors(); + std::map ioProcessors = INSTANCE->_callbacks->getIOProcessors(); size_t maxSize = JSStringGetMaximumUTF8CStringSize(propertyName); char buffer[maxSize]; @@ -853,7 +810,7 @@ JSValueRef JSCDataModel::jsIOProcessorGetProp(JSContextRef ctx, JSObjectRef obje void JSCDataModel::jsIOProcessorListProps(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames) { JSCDataModel* INSTANCE = (JSCDataModel*)JSObjectGetPrivate(object); - std::map ioProcessors = INSTANCE->_interpreter->getIOProcessors(); + std::map ioProcessors = INSTANCE->_callbacks->getIOProcessors(); std::map::const_iterator ioProcIter = ioProcessors.begin(); while(ioProcIter != ioProcessors.end()) { @@ -866,7 +823,7 @@ void JSCDataModel::jsIOProcessorListProps(JSContextRef ctx, JSObjectRef object, bool JSCDataModel::jsInvokerHasProp(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { JSCDataModel* INSTANCE = (JSCDataModel*)JSObjectGetPrivate(object); - std::map invokers = INSTANCE->_interpreter->getInvokers(); + std::map invokers = INSTANCE->_callbacks->getInvokers(); size_t maxSize = JSStringGetMaximumUTF8CStringSize(propertyName); char buffer[maxSize]; @@ -878,7 +835,7 @@ bool JSCDataModel::jsInvokerHasProp(JSContextRef ctx, JSObjectRef object, JSStri JSValueRef JSCDataModel::jsInvokerGetProp(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { JSCDataModel* INSTANCE = (JSCDataModel*)JSObjectGetPrivate(object); - std::map invokers = INSTANCE->_interpreter->getInvokers(); + std::map invokers = INSTANCE->_callbacks->getInvokers(); size_t maxSize = JSStringGetMaximumUTF8CStringSize(propertyName); char buffer[maxSize]; @@ -893,7 +850,7 @@ JSValueRef JSCDataModel::jsInvokerGetProp(JSContextRef ctx, JSObjectRef object, void JSCDataModel::jsInvokerListProps(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames) { JSCDataModel* INSTANCE = (JSCDataModel*)JSObjectGetPrivate(object); - std::map invokers = INSTANCE->_interpreter->getInvokers(); + std::map invokers = INSTANCE->_callbacks->getInvokers(); std::map::const_iterator invokerIter = invokers.begin(); while(invokerIter != invokers.end()) { diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h index ccadc79..55e5c1f 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h @@ -20,11 +20,10 @@ #ifndef JSCDATAMODEL_H_KN8TWG0V #define JSCDATAMODEL_H_KN8TWG0V -#include "uscxml/InterpreterInfo.h" #include "uscxml/plugins/DataModel.h" #include +#include #include -#include "JSCDOM.h" #ifdef BUILD_AS_PLUGINS #include "uscxml/plugins/Plugins.h" @@ -41,7 +40,7 @@ class JSCDataModel : public DataModelImpl { public: JSCDataModel(); virtual ~JSCDataModel(); - virtual boost::shared_ptr create(InterpreterInfo* interpreter); + virtual std::shared_ptr create(DataModelCallbacks* callbacks); virtual void addExtension(DataModelExtension* ext); @@ -51,12 +50,9 @@ public: return names; } - virtual bool validate(const std::string& location, const std::string& schema); - virtual bool isLocation(const std::string& expr); virtual bool isValidSyntax(const std::string& expr); virtual void setEvent(const Event& event); - virtual Data getStringAsData(const std::string& content); // foreach virtual uint32_t getLength(const std::string& expr); @@ -64,31 +60,19 @@ public: const std::string& array, const std::string& index, uint32_t iteration); - virtual void pushContext(); - virtual void popContext(); - virtual void eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr); - virtual std::string evalAsString(const std::string& expr); - - virtual bool evalAsBool(const Arabica::DOM::Element& node, const std::string& expr); + virtual Data getAsData(const std::string& content); + virtual Data evalAsData(const std::string& expr); + virtual bool evalAsBool(const std::string& expr); virtual bool isDeclared(const std::string& expr); - virtual void assign(const Arabica::DOM::Element& assignElem, - const Arabica::DOM::Node& node, - const std::string& content); virtual void assign(const std::string& location, const Data& data); - - virtual void init(const Arabica::DOM::Element& dataElem, - const Arabica::DOM::Node& node, - const std::string& content); virtual void init(const std::string& location, const Data& data); virtual std::string andExpressions(std::list); protected: - Arabica::DOM::JSCDOM* _dom; static JSClassDefinition jsInClassDef; static JSValueRef jsIn(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); @@ -107,7 +91,7 @@ protected: static JSValueRef jsInvokerGetProp(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); static void jsInvokerListProps(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames); - JSValueRef getNodeAsValue(const Arabica::DOM::Node& node); + JSValueRef getNodeAsValue(const xercesc::DOMNode* node); JSValueRef getDataAsValue(const Data& data); Data getValueAsData(const JSValueRef value); JSValueRef evalAsValue(const std::string& expr, bool dontThrow = false); @@ -122,6 +106,8 @@ protected: Event _event; JSGlobalContextRef _ctx; + static std::mutex _initMutex; + }; #ifdef BUILD_AS_PLUGINS diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/bindings.i b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/bindings.i new file mode 100644 index 0000000..bf8a0fa --- /dev/null +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/bindings.i @@ -0,0 +1,46 @@ +#define XERCES_HAS_CPP_NAMESPACE 1 + +%include + +/* + +swig -I/Users/sradomski/Documents/TK/Code/uscxml2/build/cli/deps/xerces-c/include/ -javascript -jsc -c++ uscxml.i +gcc -I/Users/sradomski/Documents/TK/Code/uscxml2/build/cli/deps/xerces-c/include/ ./uscxml_wrap.cxx + +*/ + +%module JSCDOM + +%import "uscxml/config.h" +%import "uscxml/Common.h" + +%import "xercesc/util/XercesDefs.hpp" +%import "xercesc/util/Xerces_autoconf_config.hpp" + +%include "../../common/bindings/dom/ignore.i" +%include "../../common/bindings/dom/defines.i" +%include "../../common/bindings/dom/typemaps-general.i" + +// in typemap +%typemap(in) XMLCh * %{ + $1 = JS2XMLString($input, context); +%} + +%typemap(freearg) XMLCh * %{ + delete[] $1; +%} + +// out typemap +%typemap(out) XMLCh * %{ + $result = XMLString2JS($1, context); +%} + + +%include "../../common/bindings/dom/dom.i" + +// Operators we do want +// %rename(operator_assignment) operator=; +%rename(operator_equal_to) operator==; +%rename(operator_not_equal_to) operator!=; + +%include "../../common/bindings/event.i" diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.cpp deleted file mode 100644 index b6a262d..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.cpp +++ /dev/null @@ -1,209 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCArrayBuffer.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCArrayBuffer::Tmpl; - -JSStaticValue JSCArrayBuffer::staticValues[] = { - { "byteLength", byteLengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "mimeType", mimeTypeAttrGetter, mimeTypeAttrSetter, kJSPropertyAttributeDontDelete }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCArrayBuffer::staticFunctions[] = { - { "md5", md5Callback, kJSPropertyAttributeDontDelete }, - { "base64", base64Callback, kJSPropertyAttributeDontDelete }, - { "slice", sliceCallback, kJSPropertyAttributeDontDelete }, - { "isView", isViewCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCArrayBuffer::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::ArrayBuffer* localInstance = NULL; - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::ArrayBuffer(localLength); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for ArrayBuffer"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCArrayBuffer::getTmpl(); - - struct JSCArrayBuffer::JSCArrayBufferPrivate* retPrivData = new JSCArrayBuffer::JSCArrayBufferPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCArrayBuffer::byteLengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getByteLength()); -} - - -JSValueRef JSCArrayBuffer::mimeTypeAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getMimeType().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -bool JSCArrayBuffer::mimeTypeAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(thisObj); - - JSStringRef stringReflocalMimeType = JSValueToStringCopy(ctx, value, exception); - size_t localMimeTypeMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalMimeType); - char* localMimeTypeBuffer = new char[localMimeTypeMaxSize]; - JSStringGetUTF8CString(stringReflocalMimeType, localMimeTypeBuffer, localMimeTypeMaxSize); - std::string localMimeType(localMimeTypeBuffer); - JSStringRelease(stringReflocalMimeType); - free(localMimeTypeBuffer); - - privData->nativeObj->setMimeType(localMimeType); - return true; -} - -JSValueRef JSCArrayBuffer::md5Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - std::string retVal = privData->nativeObj->md5(); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling md5"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCArrayBuffer::base64Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - std::string retVal = privData->nativeObj->base64(); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling base64"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCArrayBuffer::sliceCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localBegin = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::ArrayBuffer* retVal = new uscxml::ArrayBuffer(privData->nativeObj->slice(localBegin, localEnd)); - JSClassRef retClass = JSCArrayBuffer::getTmpl(); - - struct JSCArrayBuffer::JSCArrayBufferPrivate* retPrivData = new JSCArrayBuffer::JSCArrayBufferPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localBegin = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::ArrayBuffer* retVal = new uscxml::ArrayBuffer(privData->nativeObj->slice(localBegin)); - JSClassRef retClass = JSCArrayBuffer::getTmpl(); - - struct JSCArrayBuffer::JSCArrayBufferPrivate* retPrivData = new JSCArrayBuffer::JSCArrayBufferPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling slice"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCArrayBuffer::isViewCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCArrayBufferPrivate* privData = (struct JSCArrayBufferPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - true) { - void* localValue = JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)); - - bool retVal = privData->nativeObj->isView(localValue); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling isView"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.h deleted file mode 100644 index cd2147f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBuffer.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCArrayBuffer_h -#define JSCArrayBuffer_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCArrayBuffer { -public: - struct JSCArrayBufferPrivate { - JSCDOM* dom; - uscxml::ArrayBuffer* nativeObj; - }; - - JSC_DESTRUCTOR(JSCArrayBufferPrivate); - - static JSValueRef md5Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef base64Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef sliceCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef isViewCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef byteLengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef mimeTypeAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool mimeTypeAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "ArrayBuffer"; - classDef.callAsConstructor = jsConstructor; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCArrayBuffer_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.cpp deleted file mode 100644 index ad567e8..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCArrayBufferView::Tmpl; - -JSStaticValue JSCArrayBufferView::staticValues[] = { - { "buffer", bufferAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "byteOffset", byteOffsetAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "byteLength", byteLengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCArrayBufferView::staticFunctions[] = { - { 0, 0, 0 } -}; - -JSValueRef JSCArrayBufferView::bufferAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCArrayBufferViewPrivate* privData = (struct JSCArrayBufferViewPrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getBuffer()) return JSValueMakeUndefined(ctx); - uscxml::ArrayBuffer* arabicaRet = new uscxml::ArrayBuffer(privData->nativeObj->getBuffer()); - - JSClassRef arbaicaRetClass = JSCArrayBuffer::getTmpl(); - - struct JSCArrayBuffer::JSCArrayBufferPrivate* retPrivData = new JSCArrayBuffer::JSCArrayBufferPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCArrayBufferView::byteOffsetAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCArrayBufferViewPrivate* privData = (struct JSCArrayBufferViewPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getByteOffset()); -} - - -JSValueRef JSCArrayBufferView::byteLengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCArrayBufferViewPrivate* privData = (struct JSCArrayBufferViewPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getByteLength()); -} - - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.h deleted file mode 100644 index a6910a1..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCArrayBufferView.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCArrayBufferView_h -#define JSCArrayBufferView_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCArrayBufferView { -public: - struct JSCArrayBufferViewPrivate { - JSCDOM* dom; - uscxml::ArrayBufferView* nativeObj; - }; - - JSC_DESTRUCTOR(JSCArrayBufferViewPrivate); - - - static JSValueRef bufferAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef byteOffsetAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef byteLengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "ArrayBufferView"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCArrayBufferView_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp deleted file mode 100644 index 31349cb..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCAttr.h" -#include "JSCElement.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCAttr::Tmpl; - -JSStaticValue JSCAttr::staticValues[] = { - { "name", nameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "specified", specifiedAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "value", valueAttrGetter, valueAttrSetter, kJSPropertyAttributeDontDelete }, - { "ownerElement", ownerElementAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCAttr::staticFunctions[] = { - { 0, 0, 0 } -}; - -JSValueRef JSCAttr::nameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCAttrPrivate* privData = (struct JSCAttrPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getName().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCAttr::specifiedAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCAttrPrivate* privData = (struct JSCAttrPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeBoolean(ctx, privData->nativeObj->getSpecified()); -} - - -JSValueRef JSCAttr::valueAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCAttrPrivate* privData = (struct JSCAttrPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getValue().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -bool JSCAttr::valueAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - struct JSCAttrPrivate* privData = (struct JSCAttrPrivate*)JSObjectGetPrivate(thisObj); - - JSStringRef stringReflocalValue = JSValueToStringCopy(ctx, value, exception); - size_t localValueMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalValue); - char* localValueBuffer = new char[localValueMaxSize]; - JSStringGetUTF8CString(stringReflocalValue, localValueBuffer, localValueMaxSize); - std::string localValue(localValueBuffer); - JSStringRelease(stringReflocalValue); - free(localValueBuffer); - - privData->nativeObj->setValue(localValue); - return true; -} - -JSValueRef JSCAttr::ownerElementAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCAttrPrivate* privData = (struct JSCAttrPrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getOwnerElement()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Element* arabicaRet = new Arabica::DOM::Element(privData->nativeObj->getOwnerElement()); - - JSClassRef arbaicaRetClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.h deleted file mode 100644 index adcb6bc..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCAttr.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCAttr_h -#define JSCAttr_h - -#include -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCAttr { -public: - struct JSCAttrPrivate { - JSCDOM* dom; - Arabica::DOM::Attr* nativeObj; - }; - - JSC_DESTRUCTOR(JSCAttrPrivate); - - - static JSValueRef nameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef specifiedAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef valueAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool valueAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - static JSValueRef ownerElementAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Attr"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCAttr_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.cpp deleted file mode 100644 index 3969a92..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCCDATASection.h" -#include "JSCText.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCCDATASection::Tmpl; - -JSStaticValue JSCCDATASection::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCCDATASection::staticFunctions[] = { - { 0, 0, 0 } -}; - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.h deleted file mode 100644 index 32ef4bc..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCDATASection.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCCDATASection_h -#define JSCCDATASection_h - -#include -#include "DOM/Node.hpp" -#include "JSCText.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCCDATASection { -public: - struct JSCCDATASectionPrivate { - JSCDOM* dom; - Arabica::DOM::CDATASection* nativeObj; - }; - - JSC_DESTRUCTOR(JSCCDATASectionPrivate); - - - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "CDATASection"; - classDef.parentClass = JSCText::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCCDATASection_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.cpp deleted file mode 100644 index cfb1720..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCCharacterData.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCCharacterData::Tmpl; - -JSStaticValue JSCCharacterData::staticValues[] = { - { "data", dataAttrGetter, dataAttrSetter, kJSPropertyAttributeDontDelete }, - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCCharacterData::staticFunctions[] = { - { "substringData", substringDataCallback, kJSPropertyAttributeDontDelete }, - { "appendData", appendDataCallback, kJSPropertyAttributeDontDelete }, - { "insertData", insertDataCallback, kJSPropertyAttributeDontDelete }, - { "deleteData", deleteDataCallback, kJSPropertyAttributeDontDelete }, - { "replaceData", replaceDataCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCCharacterData::dataAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getData().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -bool JSCCharacterData::dataAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(thisObj); - - JSStringRef stringReflocalData = JSValueToStringCopy(ctx, value, exception); - size_t localDataMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalData); - char* localDataBuffer = new char[localDataMaxSize]; - JSStringGetUTF8CString(stringReflocalData, localDataBuffer, localDataMaxSize); - std::string localData(localDataBuffer); - JSStringRelease(stringReflocalData); - free(localDataBuffer); - - privData->nativeObj->setData(localData); - return true; -} - -JSValueRef JSCCharacterData::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - - -JSValueRef JSCCharacterData::substringDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned long localCount = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - std::string retVal = privData->nativeObj->substringData(localOffset, localCount); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling substringData"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCCharacterData::appendDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalArg = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localArgMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalArg); - char* localArgBuffer = new char[localArgMaxSize]; - JSStringGetUTF8CString(stringReflocalArg, localArgBuffer, localArgMaxSize); - std::string localArg(localArgBuffer); - JSStringRelease(stringReflocalArg); - free(localArgBuffer); - - - privData->nativeObj->appendData(localArg); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling appendData"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCCharacterData::insertDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - JSStringRef stringReflocalArg = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localArgMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalArg); - char* localArgBuffer = new char[localArgMaxSize]; - JSStringGetUTF8CString(stringReflocalArg, localArgBuffer, localArgMaxSize); - std::string localArg(localArgBuffer); - JSStringRelease(stringReflocalArg); - free(localArgBuffer); - - - privData->nativeObj->insertData(localOffset, localArg); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling insertData"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCCharacterData::deleteDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned long localCount = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->deleteData(localOffset, localCount); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling deleteData"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCCharacterData::replaceDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCCharacterDataPrivate* privData = (struct JSCCharacterDataPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsString(ctx, arguments[2])) { - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned long localCount = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - JSStringRef stringReflocalArg = JSValueToStringCopy(ctx, arguments[2], exception); - size_t localArgMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalArg); - char* localArgBuffer = new char[localArgMaxSize]; - JSStringGetUTF8CString(stringReflocalArg, localArgBuffer, localArgMaxSize); - std::string localArg(localArgBuffer); - JSStringRelease(stringReflocalArg); - free(localArgBuffer); - - - privData->nativeObj->replaceData(localOffset, localCount, localArg); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling replaceData"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.h deleted file mode 100644 index b351fa2..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCCharacterData.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCCharacterData_h -#define JSCCharacterData_h - -#include -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCCharacterData { -public: - struct JSCCharacterDataPrivate { - JSCDOM* dom; - Arabica::DOM::CharacterData* nativeObj; - }; - - JSC_DESTRUCTOR(JSCCharacterDataPrivate); - - static JSValueRef substringDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef appendDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef insertDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef deleteDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef replaceDataCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef dataAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool dataAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "CharacterData"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCCharacterData_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.cpp deleted file mode 100644 index c8ae170..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCCharacterData.h" -#include "JSCComment.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCComment::Tmpl; - -JSStaticValue JSCComment::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCComment::staticFunctions[] = { - { 0, 0, 0 } -}; - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.h deleted file mode 100644 index 38a7822..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCComment.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCComment_h -#define JSCComment_h - -#include -#include "DOM/Node.hpp" -#include "JSCCharacterData.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCComment { -public: - struct JSCCommentPrivate { - JSCDOM* dom; - Arabica::DOM::Comment* nativeObj; - }; - - JSC_DESTRUCTOR(JSCCommentPrivate); - - - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Comment"; - classDef.parentClass = JSCCharacterData::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCComment_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.cpp deleted file mode 100644 index 7bdca82..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCDOMImplementation.h" -#include "JSCDocument.h" -#include "JSCDocumentType.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCDOMImplementation::Tmpl; - -JSStaticValue JSCDOMImplementation::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCDOMImplementation::staticFunctions[] = { - { "hasFeature", hasFeatureCallback, kJSPropertyAttributeDontDelete }, - { "createDocumentType", createDocumentTypeCallback, kJSPropertyAttributeDontDelete }, - { "createDocument", createDocumentCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCDOMImplementation::hasFeatureCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDOMImplementationPrivate* privData = (struct JSCDOMImplementationPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalFeature = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localFeatureMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalFeature); - char* localFeatureBuffer = new char[localFeatureMaxSize]; - JSStringGetUTF8CString(stringReflocalFeature, localFeatureBuffer, localFeatureMaxSize); - std::string localFeature(localFeatureBuffer); - JSStringRelease(stringReflocalFeature); - free(localFeatureBuffer); - - JSStringRef stringReflocalVersion = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localVersionMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalVersion); - char* localVersionBuffer = new char[localVersionMaxSize]; - JSStringGetUTF8CString(stringReflocalVersion, localVersionBuffer, localVersionMaxSize); - std::string localVersion(localVersionBuffer); - JSStringRelease(stringReflocalVersion); - free(localVersionBuffer); - - - bool retVal = privData->nativeObj->hasFeature(localFeature, localVersion); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling hasFeature"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDOMImplementation::createDocumentTypeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDOMImplementationPrivate* privData = (struct JSCDOMImplementationPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1]) && - JSValueIsString(ctx, arguments[2])) { - JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); - char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; - JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); - std::string localQualifiedName(localQualifiedNameBuffer); - JSStringRelease(stringReflocalQualifiedName); - free(localQualifiedNameBuffer); - - JSStringRef stringReflocalPublicId = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localPublicIdMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalPublicId); - char* localPublicIdBuffer = new char[localPublicIdMaxSize]; - JSStringGetUTF8CString(stringReflocalPublicId, localPublicIdBuffer, localPublicIdMaxSize); - std::string localPublicId(localPublicIdBuffer); - JSStringRelease(stringReflocalPublicId); - free(localPublicIdBuffer); - - JSStringRef stringReflocalSystemId = JSValueToStringCopy(ctx, arguments[2], exception); - size_t localSystemIdMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalSystemId); - char* localSystemIdBuffer = new char[localSystemIdMaxSize]; - JSStringGetUTF8CString(stringReflocalSystemId, localSystemIdBuffer, localSystemIdMaxSize); - std::string localSystemId(localSystemIdBuffer); - JSStringRelease(stringReflocalSystemId); - free(localSystemIdBuffer); - - - Arabica::DOM::DocumentType* retVal = new Arabica::DOM::DocumentType(privData->nativeObj->createDocumentType(localQualifiedName, localPublicId, localSystemId)); - JSClassRef retClass = JSCDocumentType::getTmpl(); - - struct JSCDocumentType::JSCDocumentTypePrivate* retPrivData = new JSCDocumentType::JSCDocumentTypePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createDocumentType"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDOMImplementation::createDocumentCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDOMImplementationPrivate* privData = (struct JSCDOMImplementationPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1]) && - JSValueIsObject(ctx, arguments[2]) && JSValueIsObjectOfClass(ctx, arguments[2], JSCDocumentType::getTmpl())) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); - char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; - JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); - std::string localQualifiedName(localQualifiedNameBuffer); - JSStringRelease(stringReflocalQualifiedName); - free(localQualifiedNameBuffer); - - Arabica::DOM::DocumentType* localDoctype = ((struct JSCDocumentType::JSCDocumentTypePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[2], exception)))->nativeObj; - - Arabica::DOM::Document* retVal = new Arabica::DOM::Document(privData->nativeObj->createDocument(localNamespaceURI, localQualifiedName, *localDoctype)); - JSClassRef retClass = JSCDocument::getTmpl(); - - struct JSCDocument::JSCDocumentPrivate* retPrivData = new JSCDocument::JSCDocumentPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createDocument"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.h deleted file mode 100644 index 4c39d93..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDOMImplementation.h +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCDOMImplementation_h -#define JSCDOMImplementation_h - -#include -#include "DOM/Node.hpp" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCDOMImplementation { -public: - struct JSCDOMImplementationPrivate { - JSCDOM* dom; - Arabica::DOM::DOMImplementation* nativeObj; - }; - - JSC_DESTRUCTOR(JSCDOMImplementationPrivate); - - static JSValueRef hasFeatureCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createDocumentTypeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createDocumentCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "DOMImplementation"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCDOMImplementation_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.cpp deleted file mode 100644 index 958a2fe..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.cpp +++ /dev/null @@ -1,583 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCDataView.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCDataView::Tmpl; - -JSStaticValue JSCDataView::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCDataView::staticFunctions[] = { - { "getInt8", getInt8Callback, kJSPropertyAttributeDontDelete }, - { "getUint8", getUint8Callback, kJSPropertyAttributeDontDelete }, - { "getInt16", getInt16Callback, kJSPropertyAttributeDontDelete }, - { "getUint16", getUint16Callback, kJSPropertyAttributeDontDelete }, - { "getInt32", getInt32Callback, kJSPropertyAttributeDontDelete }, - { "getUint32", getUint32Callback, kJSPropertyAttributeDontDelete }, - { "getFloat32", getFloat32Callback, kJSPropertyAttributeDontDelete }, - { "getFloat64", getFloat64Callback, kJSPropertyAttributeDontDelete }, - { "setInt8", setInt8Callback, kJSPropertyAttributeDontDelete }, - { "setUint8", setUint8Callback, kJSPropertyAttributeDontDelete }, - { "setInt16", setInt16Callback, kJSPropertyAttributeDontDelete }, - { "setUint16", setUint16Callback, kJSPropertyAttributeDontDelete }, - { "setInt32", setInt32Callback, kJSPropertyAttributeDontDelete }, - { "setUint32", setUint32Callback, kJSPropertyAttributeDontDelete }, - { "setFloat32", setFloat32Callback, kJSPropertyAttributeDontDelete }, - { "setFloat64", setFloat64Callback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCDataView::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::DataView* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localByteLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::DataView(localBuffer, localByteOffset, localByteLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::DataView(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::DataView(localBuffer); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for DataView"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCDataView::getTmpl(); - - struct JSCDataView::JSCDataViewPrivate* retPrivData = new JSCDataView::JSCDataViewPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCDataView::getInt8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - char retVal = privData->nativeObj->getInt8(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getInt8"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getUint8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned char retVal = privData->nativeObj->getUint8(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getUint8"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getInt16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsBoolean(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[1]); - - short retVal = privData->nativeObj->getInt16(localByteOffset, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - short retVal = privData->nativeObj->getInt16(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getInt16"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getUint16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsBoolean(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[1]); - - unsigned short retVal = privData->nativeObj->getUint16(localByteOffset, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned short retVal = privData->nativeObj->getUint16(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getUint16"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getInt32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsBoolean(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[1]); - - long retVal = privData->nativeObj->getInt32(localByteOffset, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - long retVal = privData->nativeObj->getInt32(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getInt32"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getUint32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsBoolean(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[1]); - - unsigned long retVal = privData->nativeObj->getUint32(localByteOffset, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned long retVal = privData->nativeObj->getUint32(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getUint32"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getFloat32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsBoolean(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[1]); - - float retVal = privData->nativeObj->getFloat32(localByteOffset, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - float retVal = privData->nativeObj->getFloat32(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getFloat32"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::getFloat64Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsBoolean(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[1]); - - double retVal = privData->nativeObj->getFloat64(localByteOffset, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - double retVal = privData->nativeObj->getFloat64(localByteOffset); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getFloat64"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setInt8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - char localValue = (char)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setInt8(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setInt8"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setUint8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned char localValue = (unsigned char)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setUint8(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setUint8"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setInt16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsBoolean(ctx, arguments[2])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - short localValue = (short)JSValueToNumber(ctx, arguments[1], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[2]); - - privData->nativeObj->setInt16(localByteOffset, localValue, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - short localValue = (short)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setInt16(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setInt16"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setUint16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsBoolean(ctx, arguments[2])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned short localValue = (unsigned short)JSValueToNumber(ctx, arguments[1], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[2]); - - privData->nativeObj->setUint16(localByteOffset, localValue, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned short localValue = (unsigned short)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setUint16(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setUint16"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setInt32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsBoolean(ctx, arguments[2])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - long localValue = (long)JSValueToNumber(ctx, arguments[1], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[2]); - - privData->nativeObj->setInt32(localByteOffset, localValue, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - long localValue = (long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setInt32(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setInt32"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setUint32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsBoolean(ctx, arguments[2])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned long localValue = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[2]); - - privData->nativeObj->setUint32(localByteOffset, localValue, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned long localValue = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setUint32(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setUint32"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setFloat32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsBoolean(ctx, arguments[2])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - float localValue = (float)JSValueToNumber(ctx, arguments[1], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[2]); - - privData->nativeObj->setFloat32(localByteOffset, localValue, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - float localValue = (float)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setFloat32(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setFloat32"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDataView::setFloat64Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDataViewPrivate* privData = (struct JSCDataViewPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsBoolean(ctx, arguments[2])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - double localValue = (double)JSValueToNumber(ctx, arguments[1], exception); - bool localLittleEndian = JSValueToBoolean(ctx, arguments[2]); - - privData->nativeObj->setFloat64(localByteOffset, localValue, localLittleEndian); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - double localValue = (double)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->setFloat64(localByteOffset, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setFloat64"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.h deleted file mode 100644 index 6593068..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDataView.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCDataView_h -#define JSCDataView_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCDataView { -public: - struct JSCDataViewPrivate { - JSCDOM* dom; - uscxml::DataView* nativeObj; - }; - - JSC_DESTRUCTOR(JSCDataViewPrivate); - - static JSValueRef getInt8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getUint8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getInt16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getUint16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getInt32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getUint32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getFloat32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getFloat64Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setInt8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setUint8Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setInt16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setUint16Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setInt32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setUint32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setFloat32Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setFloat64Callback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "DataView"; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCDataView_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.cpp deleted file mode 100644 index 795ad70..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.cpp +++ /dev/null @@ -1,542 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCAttr.h" -#include "JSCCDATASection.h" -#include "JSCComment.h" -#include "JSCDOMImplementation.h" -#include "JSCDocument.h" -#include "JSCDocumentFragment.h" -#include "JSCDocumentType.h" -#include "JSCElement.h" -#include "JSCEntityReference.h" -#include "JSCNode.h" -#include "JSCNodeList.h" -#include "JSCProcessingInstruction.h" -#include "JSCText.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCDocument::Tmpl; - -JSStaticValue JSCDocument::staticValues[] = { - { "doctype", doctypeAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "implementation", implementationAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "documentElement", documentElementAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "localStorage", localStorageCustomAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCDocument::staticFunctions[] = { - { "createElement", createElementCallback, kJSPropertyAttributeDontDelete }, - { "createDocumentFragment", createDocumentFragmentCallback, kJSPropertyAttributeDontDelete }, - { "createTextNode", createTextNodeCallback, kJSPropertyAttributeDontDelete }, - { "createComment", createCommentCallback, kJSPropertyAttributeDontDelete }, - { "createCDATASection", createCDATASectionCallback, kJSPropertyAttributeDontDelete }, - { "createProcessingInstruction", createProcessingInstructionCallback, kJSPropertyAttributeDontDelete }, - { "createAttribute", createAttributeCallback, kJSPropertyAttributeDontDelete }, - { "createEntityReference", createEntityReferenceCallback, kJSPropertyAttributeDontDelete }, - { "getElementsByTagName", getElementsByTagNameCallback, kJSPropertyAttributeDontDelete }, - { "importNode", importNodeCallback, kJSPropertyAttributeDontDelete }, - { "createElementNS", createElementNSCustomCallback, kJSPropertyAttributeDontDelete }, - { "createAttributeNS", createAttributeNSCustomCallback, kJSPropertyAttributeDontDelete }, - { "getElementsByTagNameNS", getElementsByTagNameNSCallback, kJSPropertyAttributeDontDelete }, - { "getElementById", getElementByIdCallback, kJSPropertyAttributeDontDelete }, - { "evaluate", evaluateCustomCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCDocument::doctypeAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getDoctype()) return JSValueMakeUndefined(ctx); - Arabica::DOM::DocumentType* arabicaRet = new Arabica::DOM::DocumentType(privData->nativeObj->getDoctype()); - - JSClassRef arbaicaRetClass = JSCDocumentType::getTmpl(); - - struct JSCDocumentType::JSCDocumentTypePrivate* retPrivData = new JSCDocumentType::JSCDocumentTypePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCDocument::implementationAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getImplementation()) return JSValueMakeUndefined(ctx); - Arabica::DOM::DOMImplementation* arabicaRet = new Arabica::DOM::DOMImplementation(privData->nativeObj->getImplementation()); - - JSClassRef arbaicaRetClass = JSCDOMImplementation::getTmpl(); - - struct JSCDOMImplementation::JSCDOMImplementationPrivate* retPrivData = new JSCDOMImplementation::JSCDOMImplementationPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCDocument::documentElementAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getDocumentElement()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Element* arabicaRet = new Arabica::DOM::Element(privData->nativeObj->getDocumentElement()); - - JSClassRef arbaicaRetClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCDocument::createElementCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalTagName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localTagNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalTagName); - char* localTagNameBuffer = new char[localTagNameMaxSize]; - JSStringGetUTF8CString(stringReflocalTagName, localTagNameBuffer, localTagNameMaxSize); - std::string localTagName(localTagNameBuffer); - JSStringRelease(stringReflocalTagName); - free(localTagNameBuffer); - - - Arabica::DOM::Element* retVal = new Arabica::DOM::Element(privData->nativeObj->createElement(localTagName)); - JSClassRef retClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createElement"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createDocumentFragmentCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - Arabica::DOM::DocumentFragment* retVal = new Arabica::DOM::DocumentFragment(privData->nativeObj->createDocumentFragment()); - JSClassRef retClass = JSCDocumentFragment::getTmpl(); - - struct JSCDocumentFragment::JSCDocumentFragmentPrivate* retPrivData = new JSCDocumentFragment::JSCDocumentFragmentPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createDocumentFragment"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createTextNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalData = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localDataMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalData); - char* localDataBuffer = new char[localDataMaxSize]; - JSStringGetUTF8CString(stringReflocalData, localDataBuffer, localDataMaxSize); - std::string localData(localDataBuffer); - JSStringRelease(stringReflocalData); - free(localDataBuffer); - - - Arabica::DOM::Text* retVal = new Arabica::DOM::Text(privData->nativeObj->createTextNode(localData)); - JSClassRef retClass = JSCText::getTmpl(); - - struct JSCText::JSCTextPrivate* retPrivData = new JSCText::JSCTextPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createTextNode"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createCommentCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalData = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localDataMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalData); - char* localDataBuffer = new char[localDataMaxSize]; - JSStringGetUTF8CString(stringReflocalData, localDataBuffer, localDataMaxSize); - std::string localData(localDataBuffer); - JSStringRelease(stringReflocalData); - free(localDataBuffer); - - - Arabica::DOM::Comment* retVal = new Arabica::DOM::Comment(privData->nativeObj->createComment(localData)); - JSClassRef retClass = JSCComment::getTmpl(); - - struct JSCComment::JSCCommentPrivate* retPrivData = new JSCComment::JSCCommentPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createComment"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createCDATASectionCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalData = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localDataMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalData); - char* localDataBuffer = new char[localDataMaxSize]; - JSStringGetUTF8CString(stringReflocalData, localDataBuffer, localDataMaxSize); - std::string localData(localDataBuffer); - JSStringRelease(stringReflocalData); - free(localDataBuffer); - - - Arabica::DOM::CDATASection* retVal = new Arabica::DOM::CDATASection(privData->nativeObj->createCDATASection(localData)); - JSClassRef retClass = JSCCDATASection::getTmpl(); - - struct JSCCDATASection::JSCCDATASectionPrivate* retPrivData = new JSCCDATASection::JSCCDATASectionPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createCDATASection"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createProcessingInstructionCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalTarget = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localTargetMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalTarget); - char* localTargetBuffer = new char[localTargetMaxSize]; - JSStringGetUTF8CString(stringReflocalTarget, localTargetBuffer, localTargetMaxSize); - std::string localTarget(localTargetBuffer); - JSStringRelease(stringReflocalTarget); - free(localTargetBuffer); - - JSStringRef stringReflocalData = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localDataMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalData); - char* localDataBuffer = new char[localDataMaxSize]; - JSStringGetUTF8CString(stringReflocalData, localDataBuffer, localDataMaxSize); - std::string localData(localDataBuffer); - JSStringRelease(stringReflocalData); - free(localDataBuffer); - - - Arabica::DOM::ProcessingInstruction* retVal = new Arabica::DOM::ProcessingInstruction(privData->nativeObj->createProcessingInstruction(localTarget, localData)); - JSClassRef retClass = JSCProcessingInstruction::getTmpl(); - - struct JSCProcessingInstruction::JSCProcessingInstructionPrivate* retPrivData = new JSCProcessingInstruction::JSCProcessingInstructionPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createProcessingInstruction"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->createAttribute(localName)); - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createAttribute"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createEntityReferenceCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - Arabica::DOM::EntityReference* retVal = new Arabica::DOM::EntityReference(privData->nativeObj->createEntityReference(localName)); - JSClassRef retClass = JSCEntityReference::getTmpl(); - - struct JSCEntityReference::JSCEntityReferencePrivate* retPrivData = new JSCEntityReference::JSCEntityReferencePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createEntityReference"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::getElementsByTagNameCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalTagname = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localTagnameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalTagname); - char* localTagnameBuffer = new char[localTagnameMaxSize]; - JSStringGetUTF8CString(stringReflocalTagname, localTagnameBuffer, localTagnameMaxSize); - std::string localTagname(localTagnameBuffer); - JSStringRelease(stringReflocalTagname); - free(localTagnameBuffer); - - - Arabica::DOM::NodeList* retVal = new Arabica::DOM::NodeList(privData->nativeObj->getElementsByTagName(localTagname)); - JSClassRef retClass = JSCNodeList::getTmpl(); - - struct JSCNodeList::JSCNodeListPrivate* retPrivData = new JSCNodeList::JSCNodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getElementsByTagName"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::importNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl()) && - JSValueIsBoolean(ctx, arguments[1])) { - Arabica::DOM::Node* localImportedNode = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - bool localDeep = JSValueToBoolean(ctx, arguments[1]); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->importNode(*localImportedNode, localDeep)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling importNode"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::getElementsByTagNameNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - Arabica::DOM::NodeList* retVal = new Arabica::DOM::NodeList(privData->nativeObj->getElementsByTagNameNS(localNamespaceURI, localLocalName)); - JSClassRef retClass = JSCNodeList::getTmpl(); - - struct JSCNodeList::JSCNodeListPrivate* retPrivData = new JSCNodeList::JSCNodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getElementsByTagNameNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::getElementByIdCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalElementId = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localElementIdMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalElementId); - char* localElementIdBuffer = new char[localElementIdMaxSize]; - JSStringGetUTF8CString(stringReflocalElementId, localElementIdBuffer, localElementIdMaxSize); - std::string localElementId(localElementIdBuffer); - JSStringRelease(stringReflocalElementId); - free(localElementIdBuffer); - - - Arabica::DOM::Element* retVal = new Arabica::DOM::Element(privData->nativeObj->getElementById(localElementId)); - JSClassRef retClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getElementById"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.h deleted file mode 100644 index 1b300fb..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCDocument_h -#define JSCDocument_h - -#include -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCDocument { -public: - struct JSCDocumentPrivate { - JSCDOM* dom; - Arabica::DOM::Document* nativeObj; - }; - - JSC_DESTRUCTOR(JSCDocumentPrivate); - - static JSValueRef createElementCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createDocumentFragmentCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createTextNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createCommentCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createCDATASectionCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createProcessingInstructionCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createEntityReferenceCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getElementsByTagNameCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef importNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createElementNSCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createAttributeNSCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getElementsByTagNameNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getElementByIdCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef evaluateCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef doctypeAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef implementationAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef documentElementAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef localStorageCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Document"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCDocument_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentCustom.cpp deleted file mode 100644 index a6d194f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentCustom.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "JSCDocument.h" -#include "JSCElement.h" -#include "JSCAttr.h" -#include "JSCStorage.h" -#include "JSCXPathResult.h" -#include "JSCNode.h" -#include -#include - -namespace Arabica { -namespace DOM { - -JSValueRef JSCDocument::localStorageCustomAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(object); - - if (!privData->dom->storage) { - return JSValueMakeUndefined(ctx); - } - - JSClassRef retClass = JSCStorage::getTmpl(); - struct JSCStorage::JSCStoragePrivate* retPrivData = new JSCStorage::JSCStoragePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retPrivData->dom->storage; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, retClass, retPrivData); - return arbaicaRetObj; - -} - - -JSValueRef JSCDocument::evaluateCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef object, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(object); - - if (!privData->dom || !privData->dom->xpath) return JSValueMakeUndefined(ctx); - if (argumentCount < 1) { - std::string errorMsg = "Wrong number of arguments in evaluate"; - JSStringRef string = JSStringCreateWithUTF8CString(errorMsg.c_str()); - JSValueRef exceptionString = JSValueMakeString(ctx, string); - JSStringRelease(string); - *exception = JSValueToObject(ctx, exceptionString, NULL); - return JSValueMakeUndefined(ctx); - } - - // make sure first argument is a string - if (!JSValueIsString(ctx, arguments[0])) { - std::string errorMsg = "Expected xpath expression as first argument"; - JSStringRef string = JSStringCreateWithUTF8CString(errorMsg.c_str()); - JSValueRef exceptionString = JSValueMakeString(ctx, string); - JSStringRelease(string); - *exception = JSValueToObject(ctx, exceptionString, NULL); - return JSValueMakeUndefined(ctx); - } - - JSStringRef stringReflocalXPath = JSValueToStringCopy(ctx, arguments[0], NULL); - size_t localXPathMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalXPath); - char* localXPathBuffer = new char[localXPathMaxSize]; - JSStringGetUTF8CString(stringReflocalXPath, localXPathBuffer, localXPathMaxSize); - std::string localXPath(localXPathBuffer); - JSStringRelease(stringReflocalXPath); - free(localXPathBuffer); - - JSClassRef arbaicaRetClass = JSCXPathResult::getTmpl(); - - XPath::XPathValue* retVal; - - try { - if (argumentCount > 1) { - // make sure second argument is a node - if (!JSValueIsObject(ctx, arguments[1])) { - std::string errorMsg = "Second argument is not of type node"; - JSStringRef string = JSStringCreateWithUTF8CString(errorMsg.c_str()); - JSValueRef exceptionString = JSValueMakeString(ctx, string); - JSStringRelease(string); - *exception = JSValueToObject(ctx, exceptionString, NULL); - return JSValueMakeUndefined(ctx); - } - -// Arabica::DOM::Node* localContextNode = (Arabica::DOM::Node*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[1], NULL)); - JSCNode::JSCNodePrivate* otherNodePrivate = (JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[1], NULL)); - Arabica::DOM::Node* localContextNode = otherNodePrivate->nativeObj; - -// std::cout << *localContextNode << std::endl; -// std::cout << ">>" << privData->dom->xpath->evaluate("//note/@importance", *localContextNode).asString() << "<<" << std::endl; - - retVal = new XPath::XPathValue(privData->dom->xpath->evaluate(localXPath, *localContextNode)); - } else { - retVal = new XPath::XPathValue(privData->dom->xpath->evaluate(localXPath, *privData->nativeObj)); - } - } catch (std::runtime_error e) { - std::cout << e.what() << std::endl; - return JSValueMakeUndefined(ctx); - } - - struct JSCXPathResult::JSCXPathResultPrivate* retPrivData = new JSCXPathResult::JSCXPathResultPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; - -#if 0 - if (args.Length() < 1) - throw V8Exception("Wrong number of arguments in evaluate"); -// if (!((V8Node::hasInstance(args[1])) && (V8XPathResult::hasInstance(args[3])))) -// throw V8Exception("Parameter mismatch while calling evaluate"); - - v8::Local self = args.Holder(); - V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - v8::String::AsciiValue localExpression(args[0]); - - XPath::XPathValue* retVal; - if (args.Length() > 1) { - Arabica::DOM::Node* localContextNode = V8DOM::toClassPtr >(args[1]->ToObject()->GetInternalField(0)); - retVal = new XPath::XPathValue(privData->dom->xpath->evaluate(*localExpression, *localContextNode)); - } else { - retVal = new XPath::XPathValue(privData->dom->xpath->evaluate(*localExpression, *privData->nativeObj)); - } - - v8::Handle retCtor = V8XPathResult::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - V8XPathResult::V8XPathResultPrivate* retPrivData = new V8XPathResult::V8XPathResultPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8XPathResult::jsDestructor); - return retObj; -#endif -} - -JSValueRef JSCDocument::createElementNSCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); - char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; - JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); - std::string localQualifiedName(localQualifiedNameBuffer); - JSStringRelease(stringReflocalQualifiedName); - free(localQualifiedNameBuffer); - - - Arabica::DOM::Element* retVal = new Arabica::DOM::Element(privData->nativeObj->createElementNS(localNamespaceURI, localQualifiedName)); - if (privData->dom->nsInfo->nsToPrefix.find(localNamespaceURI) != privData->dom->nsInfo->nsToPrefix.end()) - retVal->setPrefix(privData->dom->nsInfo->nsToPrefix[localNamespaceURI]); - - JSClassRef retClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createElementNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createAttributeNSCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); - char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; - JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); - std::string localQualifiedName(localQualifiedNameBuffer); - JSStringRelease(stringReflocalQualifiedName); - free(localQualifiedNameBuffer); - - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->createAttributeNS(localNamespaceURI, localQualifiedName)); - if (privData->dom->nsInfo->nsToPrefix.find(localNamespaceURI) != privData->dom->nsInfo->nsToPrefix.end()) - retVal->setPrefix(privData->dom->nsInfo->nsToPrefix[localNamespaceURI]); - - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createAttributeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.cpp deleted file mode 100644 index d52c923..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCDocumentFragment.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCDocumentFragment::Tmpl; - -JSStaticValue JSCDocumentFragment::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCDocumentFragment::staticFunctions[] = { - { 0, 0, 0 } -}; - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.h deleted file mode 100644 index 6beed81..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentFragment.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCDocumentFragment_h -#define JSCDocumentFragment_h - -#include -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCDocumentFragment { -public: - struct JSCDocumentFragmentPrivate { - JSCDOM* dom; - Arabica::DOM::DocumentFragment* nativeObj; - }; - - JSC_DESTRUCTOR(JSCDocumentFragmentPrivate); - - - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "DocumentFragment"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCDocumentFragment_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.cpp deleted file mode 100644 index 1c75dcd..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCDocumentType.h" -#include "JSCNamedNodeMap.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCDocumentType::Tmpl; - -JSStaticValue JSCDocumentType::staticValues[] = { - { "name", nameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "entities", entitiesAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "notations", notationsAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "publicId", publicIdAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "systemId", systemIdAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "internalSubset", internalSubsetAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCDocumentType::staticFunctions[] = { - { 0, 0, 0 } -}; - -JSValueRef JSCDocumentType::nameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentTypePrivate* privData = (struct JSCDocumentTypePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getName().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCDocumentType::entitiesAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentTypePrivate* privData = (struct JSCDocumentTypePrivate*)JSObjectGetPrivate(object); - - - Arabica::DOM::NamedNodeMap* arabicaRet = new Arabica::DOM::NamedNodeMap(privData->nativeObj->getEntities()); - - JSClassRef arbaicaRetClass = JSCNamedNodeMap::getTmpl(); - - struct JSCNamedNodeMap::JSCNamedNodeMapPrivate* retPrivData = new JSCNamedNodeMap::JSCNamedNodeMapPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCDocumentType::notationsAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentTypePrivate* privData = (struct JSCDocumentTypePrivate*)JSObjectGetPrivate(object); - - - Arabica::DOM::NamedNodeMap* arabicaRet = new Arabica::DOM::NamedNodeMap(privData->nativeObj->getNotations()); - - JSClassRef arbaicaRetClass = JSCNamedNodeMap::getTmpl(); - - struct JSCNamedNodeMap::JSCNamedNodeMapPrivate* retPrivData = new JSCNamedNodeMap::JSCNamedNodeMapPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCDocumentType::publicIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentTypePrivate* privData = (struct JSCDocumentTypePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getPublicId().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCDocumentType::systemIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentTypePrivate* privData = (struct JSCDocumentTypePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getSystemId().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCDocumentType::internalSubsetAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCDocumentTypePrivate* privData = (struct JSCDocumentTypePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getInternalSubset().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.h deleted file mode 100644 index d2077cf..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentType.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCDocumentType_h -#define JSCDocumentType_h - -#include -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCDocumentType { -public: - struct JSCDocumentTypePrivate { - JSCDOM* dom; - Arabica::DOM::DocumentType* nativeObj; - }; - - JSC_DESTRUCTOR(JSCDocumentTypePrivate); - - - static JSValueRef nameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef entitiesAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef notationsAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef publicIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef systemIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef internalSubsetAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "DocumentType"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCDocumentType_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.cpp deleted file mode 100644 index 33f6f70..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.cpp +++ /dev/null @@ -1,589 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCAttr.h" -#include "JSCElement.h" -#include "JSCNode.h" -#include "JSCNodeList.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCElement::Tmpl; - -JSStaticValue JSCElement::staticValues[] = { - { "tagName", tagNameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCElement::staticFunctions[] = { - { "getAttribute", getAttributeCallback, kJSPropertyAttributeDontDelete }, - { "setAttribute", setAttributeCallback, kJSPropertyAttributeDontDelete }, - { "removeAttribute", removeAttributeCallback, kJSPropertyAttributeDontDelete }, - { "getAttributeNode", getAttributeNodeCallback, kJSPropertyAttributeDontDelete }, - { "setAttributeNode", setAttributeNodeCallback, kJSPropertyAttributeDontDelete }, - { "removeAttributeNode", removeAttributeNodeCallback, kJSPropertyAttributeDontDelete }, - { "getElementsByTagName", getElementsByTagNameCallback, kJSPropertyAttributeDontDelete }, - { "getAttributeNS", getAttributeNSCallback, kJSPropertyAttributeDontDelete }, - { "setAttributeNS", setAttributeNSCallback, kJSPropertyAttributeDontDelete }, - { "removeAttributeNS", removeAttributeNSCallback, kJSPropertyAttributeDontDelete }, - { "getAttributeNodeNS", getAttributeNodeNSCallback, kJSPropertyAttributeDontDelete }, - { "setAttributeNodeNS", setAttributeNodeNSCallback, kJSPropertyAttributeDontDelete }, - { "getElementsByTagNameNS", getElementsByTagNameNSCallback, kJSPropertyAttributeDontDelete }, - { "hasAttribute", hasAttributeCallback, kJSPropertyAttributeDontDelete }, - { "hasAttributeNS", hasAttributeNSCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCElement::tagNameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getTagName().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCElement::getAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - std::string retVal = privData->nativeObj->getAttribute(localName); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getAttribute"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::setAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - JSStringRef stringReflocalValue = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localValueMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalValue); - char* localValueBuffer = new char[localValueMaxSize]; - JSStringGetUTF8CString(stringReflocalValue, localValueBuffer, localValueMaxSize); - std::string localValue(localValueBuffer); - JSStringRelease(stringReflocalValue); - free(localValueBuffer); - - - privData->nativeObj->setAttribute(localName, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setAttribute"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::removeAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - privData->nativeObj->removeAttribute(localName); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeAttribute"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::getAttributeNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->getAttributeNode(localName)); - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getAttributeNode"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::setAttributeNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCAttr::getTmpl())) { - Arabica::DOM::Attr* localNewAttr = ((struct JSCAttr::JSCAttrPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->setAttributeNode(*localNewAttr)); - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setAttributeNode"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::removeAttributeNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCAttr::getTmpl())) { - Arabica::DOM::Attr* localOldAttr = ((struct JSCAttr::JSCAttrPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->removeAttributeNode(*localOldAttr)); - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeAttributeNode"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::getElementsByTagNameCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - Arabica::DOM::NodeList* retVal = new Arabica::DOM::NodeList(privData->nativeObj->getElementsByTagName(localName)); - JSClassRef retClass = JSCNodeList::getTmpl(); - - struct JSCNodeList::JSCNodeListPrivate* retPrivData = new JSCNodeList::JSCNodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getElementsByTagName"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::getAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - std::string retVal = privData->nativeObj->getAttributeNS(localNamespaceURI, localLocalName); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getAttributeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::setAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 3 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1]) && - JSValueIsString(ctx, arguments[2])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); - char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; - JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); - std::string localQualifiedName(localQualifiedNameBuffer); - JSStringRelease(stringReflocalQualifiedName); - free(localQualifiedNameBuffer); - - JSStringRef stringReflocalValue = JSValueToStringCopy(ctx, arguments[2], exception); - size_t localValueMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalValue); - char* localValueBuffer = new char[localValueMaxSize]; - JSStringGetUTF8CString(stringReflocalValue, localValueBuffer, localValueMaxSize); - std::string localValue(localValueBuffer); - JSStringRelease(stringReflocalValue); - free(localValueBuffer); - - - privData->nativeObj->setAttributeNS(localNamespaceURI, localQualifiedName, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setAttributeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::removeAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - privData->nativeObj->removeAttributeNS(localNamespaceURI, localLocalName); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeAttributeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::getAttributeNodeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->getAttributeNodeNS(localNamespaceURI, localLocalName)); - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getAttributeNodeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::setAttributeNodeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCAttr::getTmpl())) { - Arabica::DOM::Attr* localNewAttr = ((struct JSCAttr::JSCAttrPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->setAttributeNodeNS(*localNewAttr)); - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setAttributeNodeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::getElementsByTagNameNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - Arabica::DOM::NodeList* retVal = new Arabica::DOM::NodeList(privData->nativeObj->getElementsByTagNameNS(localNamespaceURI, localLocalName)); - JSClassRef retClass = JSCNodeList::getTmpl(); - - struct JSCNodeList::JSCNodeListPrivate* retPrivData = new JSCNodeList::JSCNodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getElementsByTagNameNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::hasAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - bool retVal = privData->nativeObj->hasAttribute(localName); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling hasAttribute"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCElement::hasAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCElementPrivate* privData = (struct JSCElementPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - bool retVal = privData->nativeObj->hasAttributeNS(localNamespaceURI, localLocalName); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling hasAttributeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.h deleted file mode 100644 index eab3696..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCElement.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCElement_h -#define JSCElement_h - -#include -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCElement { -public: - struct JSCElementPrivate { - JSCDOM* dom; - Arabica::DOM::Element* nativeObj; - }; - - JSC_DESTRUCTOR(JSCElementPrivate); - - static JSValueRef getAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getAttributeNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setAttributeNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeAttributeNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getElementsByTagNameCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getAttributeNodeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setAttributeNodeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getElementsByTagNameNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef hasAttributeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef hasAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef tagNameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Element"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCElement_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.cpp deleted file mode 100644 index 4dec699..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCEntity.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCEntity::Tmpl; - -JSStaticValue JSCEntity::staticValues[] = { - { "publicId", publicIdAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "systemId", systemIdAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "notationName", notationNameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCEntity::staticFunctions[] = { - { 0, 0, 0 } -}; - -JSValueRef JSCEntity::publicIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCEntityPrivate* privData = (struct JSCEntityPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getPublicId().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCEntity::systemIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCEntityPrivate* privData = (struct JSCEntityPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getSystemId().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCEntity::notationNameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCEntityPrivate* privData = (struct JSCEntityPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getNotationName().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.h deleted file mode 100644 index c61510f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntity.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCEntity_h -#define JSCEntity_h - -#include -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCEntity { -public: - struct JSCEntityPrivate { - JSCDOM* dom; - Arabica::DOM::Entity* nativeObj; - }; - - JSC_DESTRUCTOR(JSCEntityPrivate); - - - static JSValueRef publicIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef systemIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef notationNameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Entity"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCEntity_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.cpp deleted file mode 100644 index fe67b5d..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCEntityReference.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCEntityReference::Tmpl; - -JSStaticValue JSCEntityReference::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCEntityReference::staticFunctions[] = { - { 0, 0, 0 } -}; - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.h deleted file mode 100644 index 9ed8980..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCEntityReference.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCEntityReference_h -#define JSCEntityReference_h - -#include -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCEntityReference { -public: - struct JSCEntityReferencePrivate { - JSCDOM* dom; - Arabica::DOM::EntityReference* nativeObj; - }; - - JSC_DESTRUCTOR(JSCEntityReferencePrivate); - - - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "EntityReference"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCEntityReference_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.cpp deleted file mode 100644 index 924f40f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCFloat32Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCFloat32Array::Tmpl; - -JSStaticValue JSCFloat32Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCFloat32Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCFloat32Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Float32Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Float32Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Float32Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCFloat32Array::getTmpl())) { - - uscxml::Float32Array* localArray = ((struct JSCFloat32Array::JSCFloat32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Float32Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Float32Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Float32Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Float32Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Float32Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCFloat32Array::getTmpl(); - - struct JSCFloat32Array::JSCFloat32ArrayPrivate* retPrivData = new JSCFloat32Array::JSCFloat32ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCFloat32Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCFloat32ArrayPrivate* privData = (struct JSCFloat32ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCFloat32Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 4); -} - - -JSValueRef JSCFloat32Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCFloat32ArrayPrivate* privData = (struct JSCFloat32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - float retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCFloat32Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCFloat32ArrayPrivate* privData = (struct JSCFloat32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCFloat32Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Float32Array* localArray = ((struct JSCFloat32Array::JSCFloat32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - float localValue = (float)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCFloat32Array::getTmpl())) { - uscxml::Float32Array* localArray = ((struct JSCFloat32Array::JSCFloat32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCFloat32Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCFloat32ArrayPrivate* privData = (struct JSCFloat32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Float32Array* retVal = new uscxml::Float32Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCFloat32Array::getTmpl(); - - struct JSCFloat32Array::JSCFloat32ArrayPrivate* retPrivData = new JSCFloat32Array::JSCFloat32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Float32Array* retVal = new uscxml::Float32Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCFloat32Array::getTmpl(); - - struct JSCFloat32Array::JSCFloat32ArrayPrivate* retPrivData = new JSCFloat32Array::JSCFloat32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.h deleted file mode 100644 index 0e7bbf9..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat32Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCFloat32Array_h -#define JSCFloat32Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCFloat32Array { -public: - struct JSCFloat32ArrayPrivate { - JSCDOM* dom; - uscxml::Float32Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCFloat32ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Float32Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCFloat32Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.cpp deleted file mode 100644 index a58bce9..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCFloat64Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCFloat64Array::Tmpl; - -JSStaticValue JSCFloat64Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCFloat64Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCFloat64Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Float64Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Float64Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Float64Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCFloat64Array::getTmpl())) { - - uscxml::Float64Array* localArray = ((struct JSCFloat64Array::JSCFloat64ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Float64Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Float64Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Float64Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Float64Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Float64Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCFloat64Array::getTmpl(); - - struct JSCFloat64Array::JSCFloat64ArrayPrivate* retPrivData = new JSCFloat64Array::JSCFloat64ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCFloat64Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCFloat64ArrayPrivate* privData = (struct JSCFloat64ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCFloat64Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 8); -} - - -JSValueRef JSCFloat64Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCFloat64ArrayPrivate* privData = (struct JSCFloat64ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - double retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCFloat64Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCFloat64ArrayPrivate* privData = (struct JSCFloat64ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCFloat64Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Float64Array* localArray = ((struct JSCFloat64Array::JSCFloat64ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - double localValue = (double)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCFloat64Array::getTmpl())) { - uscxml::Float64Array* localArray = ((struct JSCFloat64Array::JSCFloat64ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCFloat64Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCFloat64ArrayPrivate* privData = (struct JSCFloat64ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Float64Array* retVal = new uscxml::Float64Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCFloat64Array::getTmpl(); - - struct JSCFloat64Array::JSCFloat64ArrayPrivate* retPrivData = new JSCFloat64Array::JSCFloat64ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Float64Array* retVal = new uscxml::Float64Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCFloat64Array::getTmpl(); - - struct JSCFloat64Array::JSCFloat64ArrayPrivate* retPrivData = new JSCFloat64Array::JSCFloat64ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.h deleted file mode 100644 index 82f1f72..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCFloat64Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCFloat64Array_h -#define JSCFloat64Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCFloat64Array { -public: - struct JSCFloat64ArrayPrivate { - JSCDOM* dom; - uscxml::Float64Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCFloat64ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Float64Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCFloat64Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.cpp deleted file mode 100644 index e887378..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCInt16Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCInt16Array::Tmpl; - -JSStaticValue JSCInt16Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCInt16Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCInt16Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Int16Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Int16Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Int16Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt16Array::getTmpl())) { - - uscxml::Int16Array* localArray = ((struct JSCInt16Array::JSCInt16ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Int16Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Int16Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Int16Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Int16Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Int16Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCInt16Array::getTmpl(); - - struct JSCInt16Array::JSCInt16ArrayPrivate* retPrivData = new JSCInt16Array::JSCInt16ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCInt16Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCInt16ArrayPrivate* privData = (struct JSCInt16ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCInt16Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 2); -} - - -JSValueRef JSCInt16Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt16ArrayPrivate* privData = (struct JSCInt16ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - short retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCInt16Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt16ArrayPrivate* privData = (struct JSCInt16ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt16Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Int16Array* localArray = ((struct JSCInt16Array::JSCInt16ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - short localValue = (short)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt16Array::getTmpl())) { - uscxml::Int16Array* localArray = ((struct JSCInt16Array::JSCInt16ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCInt16Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt16ArrayPrivate* privData = (struct JSCInt16ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Int16Array* retVal = new uscxml::Int16Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCInt16Array::getTmpl(); - - struct JSCInt16Array::JSCInt16ArrayPrivate* retPrivData = new JSCInt16Array::JSCInt16ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Int16Array* retVal = new uscxml::Int16Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCInt16Array::getTmpl(); - - struct JSCInt16Array::JSCInt16ArrayPrivate* retPrivData = new JSCInt16Array::JSCInt16ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.h deleted file mode 100644 index f56c7b9..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt16Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCInt16Array_h -#define JSCInt16Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCInt16Array { -public: - struct JSCInt16ArrayPrivate { - JSCDOM* dom; - uscxml::Int16Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCInt16ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Int16Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCInt16Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.cpp deleted file mode 100644 index b868e9b..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCInt32Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCInt32Array::Tmpl; - -JSStaticValue JSCInt32Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCInt32Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCInt32Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Int32Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Int32Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Int32Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt32Array::getTmpl())) { - - uscxml::Int32Array* localArray = ((struct JSCInt32Array::JSCInt32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Int32Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Int32Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Int32Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Int32Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Int32Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCInt32Array::getTmpl(); - - struct JSCInt32Array::JSCInt32ArrayPrivate* retPrivData = new JSCInt32Array::JSCInt32ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCInt32Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCInt32ArrayPrivate* privData = (struct JSCInt32ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCInt32Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 4); -} - - -JSValueRef JSCInt32Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt32ArrayPrivate* privData = (struct JSCInt32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - long retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCInt32Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt32ArrayPrivate* privData = (struct JSCInt32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt32Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Int32Array* localArray = ((struct JSCInt32Array::JSCInt32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - long localValue = (long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt32Array::getTmpl())) { - uscxml::Int32Array* localArray = ((struct JSCInt32Array::JSCInt32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCInt32Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt32ArrayPrivate* privData = (struct JSCInt32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Int32Array* retVal = new uscxml::Int32Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCInt32Array::getTmpl(); - - struct JSCInt32Array::JSCInt32ArrayPrivate* retPrivData = new JSCInt32Array::JSCInt32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Int32Array* retVal = new uscxml::Int32Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCInt32Array::getTmpl(); - - struct JSCInt32Array::JSCInt32ArrayPrivate* retPrivData = new JSCInt32Array::JSCInt32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.h deleted file mode 100644 index 76bda20..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt32Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCInt32Array_h -#define JSCInt32Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCInt32Array { -public: - struct JSCInt32ArrayPrivate { - JSCDOM* dom; - uscxml::Int32Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCInt32ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Int32Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCInt32Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.cpp deleted file mode 100644 index 28bb6b4..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCInt8Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCInt8Array::Tmpl; - -JSStaticValue JSCInt8Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCInt8Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCInt8Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Int8Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Int8Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Int8Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt8Array::getTmpl())) { - - uscxml::Int8Array* localArray = ((struct JSCInt8Array::JSCInt8ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Int8Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Int8Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Int8Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Int8Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Int8Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCInt8Array::getTmpl(); - - struct JSCInt8Array::JSCInt8ArrayPrivate* retPrivData = new JSCInt8Array::JSCInt8ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCInt8Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCInt8ArrayPrivate* privData = (struct JSCInt8ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCInt8Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 1); -} - - -JSValueRef JSCInt8Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt8ArrayPrivate* privData = (struct JSCInt8ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - char retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCInt8Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt8ArrayPrivate* privData = (struct JSCInt8ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt8Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Int8Array* localArray = ((struct JSCInt8Array::JSCInt8ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - char localValue = (char)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCInt8Array::getTmpl())) { - uscxml::Int8Array* localArray = ((struct JSCInt8Array::JSCInt8ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCInt8Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCInt8ArrayPrivate* privData = (struct JSCInt8ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Int8Array* retVal = new uscxml::Int8Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCInt8Array::getTmpl(); - - struct JSCInt8Array::JSCInt8ArrayPrivate* retPrivData = new JSCInt8Array::JSCInt8ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Int8Array* retVal = new uscxml::Int8Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCInt8Array::getTmpl(); - - struct JSCInt8Array::JSCInt8ArrayPrivate* retPrivData = new JSCInt8Array::JSCInt8ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.h deleted file mode 100644 index b46d4cb..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCInt8Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCInt8Array_h -#define JSCInt8Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCInt8Array { -public: - struct JSCInt8ArrayPrivate { - JSCDOM* dom; - uscxml::Int8Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCInt8ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Int8Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCInt8Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.cpp deleted file mode 100644 index c0e53bf..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.cpp +++ /dev/null @@ -1,294 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCNamedNodeMap.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCNamedNodeMap::Tmpl; - -JSStaticValue JSCNamedNodeMap::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCNamedNodeMap::staticFunctions[] = { - { "getNamedItem", getNamedItemCallback, kJSPropertyAttributeDontDelete }, - { "setNamedItem", setNamedItemCallback, kJSPropertyAttributeDontDelete }, - { "removeNamedItem", removeNamedItemCallback, kJSPropertyAttributeDontDelete }, - { "item", itemCallback, kJSPropertyAttributeDontDelete }, - { "getNamedItemNS", getNamedItemNSCallback, kJSPropertyAttributeDontDelete }, - { "setNamedItemNS", setNamedItemNSCallback, kJSPropertyAttributeDontDelete }, - { "removeNamedItemNS", removeNamedItemNSCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCNamedNodeMap::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - - -JSValueRef JSCNamedNodeMap::getNamedItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->getNamedItem(localName)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getNamedItem"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNamedNodeMap::setNamedItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl())) { - Arabica::DOM::Node* localArg = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->setNamedItem(*localArg)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setNamedItem"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNamedNodeMap::removeNamedItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalName = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalName); - char* localNameBuffer = new char[localNameMaxSize]; - JSStringGetUTF8CString(stringReflocalName, localNameBuffer, localNameMaxSize); - std::string localName(localNameBuffer); - JSStringRelease(stringReflocalName); - free(localNameBuffer); - - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->removeNamedItem(localName)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeNamedItem"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNamedNodeMap::itemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->item(localIndex)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling item"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNamedNodeMap::getNamedItemNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->getNamedItemNS(localNamespaceURI, localLocalName)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getNamedItemNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNamedNodeMap::setNamedItemNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl())) { - Arabica::DOM::Node* localArg = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->setNamedItemNS(*localArg)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setNamedItemNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNamedNodeMap::removeNamedItemNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNamedNodeMapPrivate* privData = (struct JSCNamedNodeMapPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalLocalName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localLocalNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalLocalName); - char* localLocalNameBuffer = new char[localLocalNameMaxSize]; - JSStringGetUTF8CString(stringReflocalLocalName, localLocalNameBuffer, localLocalNameMaxSize); - std::string localLocalName(localLocalNameBuffer); - JSStringRelease(stringReflocalLocalName); - free(localLocalNameBuffer); - - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->removeNamedItemNS(localNamespaceURI, localLocalName)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeNamedItemNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.h deleted file mode 100644 index 5b2f6d9..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNamedNodeMap.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCNamedNodeMap_h -#define JSCNamedNodeMap_h - -#include -#include "DOM/Node.hpp" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCNamedNodeMap { -public: - struct JSCNamedNodeMapPrivate { - JSCDOM* dom; - Arabica::DOM::NamedNodeMap* nativeObj; - }; - - JSC_DESTRUCTOR(JSCNamedNodeMapPrivate); - - static JSValueRef getNamedItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setNamedItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeNamedItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef itemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getNamedItemNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setNamedItemNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeNamedItemNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "NamedNodeMap"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCNamedNodeMap_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.cpp deleted file mode 100644 index 7f9ddb0..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.cpp +++ /dev/null @@ -1,565 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCDocument.h" -#include "JSCNode.h" -#include "JSCNodeList.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCNode::Tmpl; - -JSStaticValue JSCNode::staticValues[] = { - { "nodeName", nodeNameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "nodeValue", nodeValueAttrGetter, nodeValueAttrSetter, kJSPropertyAttributeDontDelete }, - { "nodeType", nodeTypeAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "parentNode", parentNodeAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "childNodes", childNodesAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "firstChild", firstChildAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "lastChild", lastChildAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "previousSibling", previousSiblingAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "nextSibling", nextSiblingAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "attributes", attributesCustomAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "ownerDocument", ownerDocumentAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "namespaceURI", namespaceURIAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "prefix", prefixAttrGetter, prefixAttrSetter, kJSPropertyAttributeDontDelete }, - { "localName", localNameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "ELEMENT_NODE", ELEMENT_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "ATTRIBUTE_NODE", ATTRIBUTE_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "TEXT_NODE", TEXT_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "CDATA_SECTION_NODE", CDATA_SECTION_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "ENTITY_REFERENCE_NODE", ENTITY_REFERENCE_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "ENTITY_NODE", ENTITY_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "PROCESSING_INSTRUCTION_NODE", PROCESSING_INSTRUCTION_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "COMMENT_NODE", COMMENT_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "DOCUMENT_NODE", DOCUMENT_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "DOCUMENT_TYPE_NODE", DOCUMENT_TYPE_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "DOCUMENT_FRAGMENT_NODE", DOCUMENT_FRAGMENT_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "NOTATION_NODE", NOTATION_NODEConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCNode::staticFunctions[] = { - { "insertBefore", insertBeforeCallback, kJSPropertyAttributeDontDelete }, - { "replaceChild", replaceChildCallback, kJSPropertyAttributeDontDelete }, - { "removeChild", removeChildCallback, kJSPropertyAttributeDontDelete }, - { "appendChild", appendChildCallback, kJSPropertyAttributeDontDelete }, - { "hasChildNodes", hasChildNodesCallback, kJSPropertyAttributeDontDelete }, - { "cloneNode", cloneNodeCallback, kJSPropertyAttributeDontDelete }, - { "normalize", normalizeCallback, kJSPropertyAttributeDontDelete }, - { "isSupported", isSupportedCallback, kJSPropertyAttributeDontDelete }, - { "hasAttributes", hasAttributesCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCNode::nodeNameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getNodeName().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCNode::nodeValueAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getNodeValue().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -bool JSCNode::nodeValueAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - JSStringRef stringReflocalNodeValue = JSValueToStringCopy(ctx, value, exception); - size_t localNodeValueMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNodeValue); - char* localNodeValueBuffer = new char[localNodeValueMaxSize]; - JSStringGetUTF8CString(stringReflocalNodeValue, localNodeValueBuffer, localNodeValueMaxSize); - std::string localNodeValue(localNodeValueBuffer); - JSStringRelease(stringReflocalNodeValue); - free(localNodeValueBuffer); - - privData->nativeObj->setNodeValue(localNodeValue); - return true; -} - -JSValueRef JSCNode::nodeTypeAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getNodeType()); -} - - -JSValueRef JSCNode::parentNodeAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getParentNode()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Node* arabicaRet = new Arabica::DOM::Node(privData->nativeObj->getParentNode()); - - JSClassRef arbaicaRetClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::childNodesAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - - Arabica::DOM::NodeList* arabicaRet = new Arabica::DOM::NodeList(privData->nativeObj->getChildNodes()); - - JSClassRef arbaicaRetClass = JSCNodeList::getTmpl(); - - struct JSCNodeList::JSCNodeListPrivate* retPrivData = new JSCNodeList::JSCNodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::firstChildAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getFirstChild()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Node* arabicaRet = new Arabica::DOM::Node(privData->nativeObj->getFirstChild()); - - JSClassRef arbaicaRetClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::lastChildAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getLastChild()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Node* arabicaRet = new Arabica::DOM::Node(privData->nativeObj->getLastChild()); - - JSClassRef arbaicaRetClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::previousSiblingAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getPreviousSibling()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Node* arabicaRet = new Arabica::DOM::Node(privData->nativeObj->getPreviousSibling()); - - JSClassRef arbaicaRetClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::nextSiblingAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getNextSibling()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Node* arabicaRet = new Arabica::DOM::Node(privData->nativeObj->getNextSibling()); - - JSClassRef arbaicaRetClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::ownerDocumentAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->getOwnerDocument()) return JSValueMakeUndefined(ctx); - Arabica::DOM::Document* arabicaRet = new Arabica::DOM::Document(privData->nativeObj->getOwnerDocument()); - - JSClassRef arbaicaRetClass = JSCDocument::getTmpl(); - - struct JSCDocument::JSCDocumentPrivate* retPrivData = new JSCDocument::JSCDocumentPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCNode::namespaceURIAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getNamespaceURI().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCNode::prefixAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getPrefix().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -bool JSCNode::prefixAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - JSStringRef stringReflocalPrefix = JSValueToStringCopy(ctx, value, exception); - size_t localPrefixMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalPrefix); - char* localPrefixBuffer = new char[localPrefixMaxSize]; - JSStringGetUTF8CString(stringReflocalPrefix, localPrefixBuffer, localPrefixMaxSize); - std::string localPrefix(localPrefixBuffer); - JSStringRelease(stringReflocalPrefix); - free(localPrefixBuffer); - - privData->nativeObj->setPrefix(localPrefix); - return true; -} - -JSValueRef JSCNode::localNameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getLocalName().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - -JSValueRef JSCNode::ELEMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 1); -} - -JSValueRef JSCNode::ATTRIBUTE_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 2); -} - -JSValueRef JSCNode::TEXT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 3); -} - -JSValueRef JSCNode::CDATA_SECTION_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 4); -} - -JSValueRef JSCNode::ENTITY_REFERENCE_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 5); -} - -JSValueRef JSCNode::ENTITY_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 6); -} - -JSValueRef JSCNode::PROCESSING_INSTRUCTION_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 7); -} - -JSValueRef JSCNode::COMMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 8); -} - -JSValueRef JSCNode::DOCUMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 9); -} - -JSValueRef JSCNode::DOCUMENT_TYPE_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 10); -} - -JSValueRef JSCNode::DOCUMENT_FRAGMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 11); -} - -JSValueRef JSCNode::NOTATION_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 12); -} - - -JSValueRef JSCNode::insertBeforeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl()) && - JSValueIsObject(ctx, arguments[1]) && JSValueIsObjectOfClass(ctx, arguments[1], JSCNode::getTmpl())) { - Arabica::DOM::Node* localNewChild = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - Arabica::DOM::Node* localRefChild = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[1], exception)))->nativeObj; - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->insertBefore(*localNewChild, *localRefChild)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling insertBefore"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::replaceChildCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl()) && - JSValueIsObject(ctx, arguments[1]) && JSValueIsObjectOfClass(ctx, arguments[1], JSCNode::getTmpl())) { - Arabica::DOM::Node* localNewChild = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - Arabica::DOM::Node* localOldChild = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[1], exception)))->nativeObj; - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->replaceChild(*localNewChild, *localOldChild)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling replaceChild"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::removeChildCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl())) { - Arabica::DOM::Node* localOldChild = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->removeChild(*localOldChild)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeChild"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::appendChildCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCNode::getTmpl())) { - Arabica::DOM::Node* localNewChild = ((struct JSCNode::JSCNodePrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->appendChild(*localNewChild)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling appendChild"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::hasChildNodesCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - bool retVal = privData->nativeObj->hasChildNodes(); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling hasChildNodes"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::cloneNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsBoolean(ctx, arguments[0])) { - bool localDeep = JSValueToBoolean(ctx, arguments[0]); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->cloneNode(localDeep)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling cloneNode"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::normalizeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - privData->nativeObj->normalize(); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling normalize"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::isSupportedCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalFeature = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localFeatureMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalFeature); - char* localFeatureBuffer = new char[localFeatureMaxSize]; - JSStringGetUTF8CString(stringReflocalFeature, localFeatureBuffer, localFeatureMaxSize); - std::string localFeature(localFeatureBuffer); - JSStringRelease(stringReflocalFeature); - free(localFeatureBuffer); - - JSStringRef stringReflocalVersion = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localVersionMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalVersion); - char* localVersionBuffer = new char[localVersionMaxSize]; - JSStringGetUTF8CString(stringReflocalVersion, localVersionBuffer, localVersionMaxSize); - std::string localVersion(localVersionBuffer); - JSStringRelease(stringReflocalVersion); - free(localVersionBuffer); - - - bool retVal = privData->nativeObj->isSupported(localFeature, localVersion); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling isSupported"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCNode::hasAttributesCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - bool retVal = privData->nativeObj->hasAttributes(); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling hasAttributes"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.h deleted file mode 100644 index 91daa79..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNode.h +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCNode_h -#define JSCNode_h - -#include -#include "DOM/Node.hpp" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCNode { -public: - struct JSCNodePrivate { - JSCDOM* dom; - Arabica::DOM::Node* nativeObj; - }; - - JSC_DESTRUCTOR(JSCNodePrivate); - - static JSValueRef insertBeforeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef replaceChildCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeChildCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef appendChildCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef hasChildNodesCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef cloneNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef normalizeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef isSupportedCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef hasAttributesCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef nodeNameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef nodeValueAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool nodeValueAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - static JSValueRef nodeTypeAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef parentNodeAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef childNodesAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef firstChildAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef lastChildAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef previousSiblingAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef nextSiblingAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef attributesCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef ownerDocumentAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef namespaceURIAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef prefixAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool prefixAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - static JSValueRef localNameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef ELEMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef ATTRIBUTE_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef TEXT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef CDATA_SECTION_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef ENTITY_REFERENCE_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef ENTITY_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef PROCESSING_INSTRUCTION_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef COMMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef DOCUMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef DOCUMENT_TYPE_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef DOCUMENT_FRAGMENT_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef NOTATION_NODEConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Node"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCNode_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeCustom.cpp deleted file mode 100644 index b135044..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeCustom.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "JSCNode.h" -#include "JSCNamedNodeMap.h" - -namespace Arabica { -namespace DOM { - -JSValueRef JSCNode::attributesCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { - - struct JSCNodePrivate* privData = (struct JSCNodePrivate*)JSObjectGetPrivate(thisObj); - - if (!privData->nativeObj->hasAttributes()) { - return JSValueMakeUndefined(ctx); - } - - Arabica::DOM::NamedNodeMap* retVal = new Arabica::DOM::NamedNodeMap(privData->nativeObj->getAttributes()); - JSClassRef retClass = JSCNamedNodeMap::getTmpl(); - - struct JSCNamedNodeMap::JSCNamedNodeMapPrivate* retPrivData = new JSCNamedNodeMap::JSCNamedNodeMapPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; -} - - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.cpp deleted file mode 100644 index 6a3acfb..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCNode.h" -#include "JSCNodeList.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCNodeList::Tmpl; - -JSStaticValue JSCNodeList::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCNodeList::staticFunctions[] = { - { "item", itemCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCNodeList::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodeListPrivate* privData = (struct JSCNodeListPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - - -JSValueRef JSCNodeList::itemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodeListPrivate* privData = (struct JSCNodeListPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->item(localIndex)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling item"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.h deleted file mode 100644 index 2b5b3bc..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeList.h +++ /dev/null @@ -1,73 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCNodeList_h -#define JSCNodeList_h - -#include -#include "DOM/Node.hpp" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCNodeList { -public: - struct JSCNodeListPrivate { - JSCDOM* dom; - Arabica::DOM::NodeList* nativeObj; - }; - - JSC_DESTRUCTOR(JSCNodeListPrivate); - - static JSValueRef itemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "NodeList"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCNodeList_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeListCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeListCustom.cpp deleted file mode 100644 index 91c18e5..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeListCustom.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "JSCNodeList.h" -#include "JSCElement.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -bool JSCNodeList::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName); - char* propBuffer = new char[propMaxSize]; - JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize); - std::string propName(propBuffer); - free(propBuffer); - - std::string base = "0123456789"; - if (propName.find_first_not_of(base) != std::string::npos) { - return false; - } - - int index = boost::lexical_cast(propName); - struct JSCNodeListPrivate* privData = (struct JSCNodeListPrivate*)JSObjectGetPrivate(object); - - if (privData->nativeObj->getLength() < index) { - return false; - } - - return true; -} - -JSValueRef JSCNodeList::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName); - char* propBuffer = new char[propMaxSize]; - JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize); - std::string propName(propBuffer); - free(propBuffer); - - std::string base = "0123456789"; - if (propName.find_first_not_of(base) != std::string::npos) { - return JSValueMakeUndefined(ctx); - } - - int index = boost::lexical_cast(propName); - struct JSCNodeListPrivate* privData = (struct JSCNodeListPrivate*)JSObjectGetPrivate(object); - if (privData->nativeObj->getLength() < index) { - return JSValueMakeUndefined(ctx); - } - - switch(privData->nativeObj->item(index).getNodeType()) { - case Node_base::ELEMENT_NODE: { - Arabica::DOM::Element* retVal = new Arabica::DOM::Element(privData->nativeObj->item(index)); - JSClassRef retClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - break; - } - default: { - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->item(index)); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - } - } - - return JSValueMakeUndefined(ctx); -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp deleted file mode 100644 index cf4a8de..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCNodeSet.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCNodeSet::Tmpl; - -JSStaticValue JSCNodeSet::staticValues[] = { - { "size", sizeAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "empty", emptyAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCNodeSet::staticFunctions[] = { - { "toDocumentOrder", toDocumentOrderCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCNodeSet::sizeAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodeSetPrivate* privData = (struct JSCNodeSetPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->size()); -} - - -JSValueRef JSCNodeSet::emptyAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNodeSetPrivate* privData = (struct JSCNodeSetPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeBoolean(ctx, privData->nativeObj->empty()); -} - - -JSValueRef JSCNodeSet::toDocumentOrderCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCNodeSetPrivate* privData = (struct JSCNodeSetPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - privData->nativeObj->to_document_order(); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling toDocumentOrder"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.h deleted file mode 100644 index a384ade..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCNodeSet_h -#define JSCNodeSet_h - -#include -#include "DOM/Node.hpp" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCNodeSet { -public: - struct JSCNodeSetPrivate { - JSCDOM* dom; - Arabica::XPath::NodeSet* nativeObj; - }; - - JSC_DESTRUCTOR(JSCNodeSetPrivate); - - static JSValueRef toDocumentOrderCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef sizeAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef emptyAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "NodeSet"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCNodeSet_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSetCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSetCustom.cpp deleted file mode 100644 index 6de5793..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSetCustom.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "JSCNodeSet.h" -#include "JSCElement.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - - -bool JSCNodeSet::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName); - char* propBuffer = new char[propMaxSize]; - JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize); - std::string propName(propBuffer); - free(propBuffer); - - std::string base = "0123456789"; - if (propName.find_first_not_of(base) != std::string::npos) { - return false; - } - - int index = boost::lexical_cast(propName); - struct JSCNodeSetPrivate* privData = (struct JSCNodeSetPrivate*)JSObjectGetPrivate(object); - - if (privData->nativeObj->size() < index) { - return false; - } - - return true; -} - -JSValueRef JSCNodeSet::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName); - char* propBuffer = new char[propMaxSize]; - JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize); - std::string propName(propBuffer); - free(propBuffer); - - std::string base = "0123456789"; - if (propName.find_first_not_of(base) != std::string::npos) { - return JSValueMakeUndefined(ctx); - } - - int index = boost::lexical_cast(propName); - struct JSCNodeSetPrivate* privData = (struct JSCNodeSetPrivate*)JSObjectGetPrivate(object); - if (privData->nativeObj->size() <= index) { - return JSValueMakeUndefined(ctx); - } - - switch((*privData->nativeObj)[index].getNodeType()) { - case Node_base::ELEMENT_NODE: { - Arabica::DOM::Element* retVal = new Arabica::DOM::Element((*privData->nativeObj)[index]); - JSClassRef retClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - break; - } - default: { - Arabica::DOM::Node* retVal = new Arabica::DOM::Node((*privData->nativeObj)[index]); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - } - } - - return JSValueMakeUndefined(ctx); -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp deleted file mode 100644 index 6ff9079..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCNode.h" -#include "JSCNotation.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCNotation::Tmpl; - -JSStaticValue JSCNotation::staticValues[] = { - { "publicId", publicIdAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "systemId", systemIdAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCNotation::staticFunctions[] = { - { 0, 0, 0 } -}; - -JSValueRef JSCNotation::publicIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNotationPrivate* privData = (struct JSCNotationPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getPublicId().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCNotation::systemIdAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCNotationPrivate* privData = (struct JSCNotationPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getSystemId().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.h deleted file mode 100644 index 5238bbc..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNotation.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCNotation_h -#define JSCNotation_h - -#include -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCNotation { -public: - struct JSCNotationPrivate { - JSCDOM* dom; - Arabica::DOM::Notation* nativeObj; - }; - - JSC_DESTRUCTOR(JSCNotationPrivate); - - - static JSValueRef publicIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef systemIdAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Notation"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCNotation_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.cpp deleted file mode 100644 index c712c60..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCNode.h" -#include "JSCProcessingInstruction.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCProcessingInstruction::Tmpl; - -JSStaticValue JSCProcessingInstruction::staticValues[] = { - { "target", targetAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "data", dataAttrGetter, dataAttrSetter, kJSPropertyAttributeDontDelete }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCProcessingInstruction::staticFunctions[] = { - { 0, 0, 0 } -}; - -JSValueRef JSCProcessingInstruction::targetAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCProcessingInstructionPrivate* privData = (struct JSCProcessingInstructionPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getTarget().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCProcessingInstruction::dataAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCProcessingInstructionPrivate* privData = (struct JSCProcessingInstructionPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->getData().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -bool JSCProcessingInstruction::dataAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - struct JSCProcessingInstructionPrivate* privData = (struct JSCProcessingInstructionPrivate*)JSObjectGetPrivate(thisObj); - - JSStringRef stringReflocalData = JSValueToStringCopy(ctx, value, exception); - size_t localDataMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalData); - char* localDataBuffer = new char[localDataMaxSize]; - JSStringGetUTF8CString(stringReflocalData, localDataBuffer, localDataMaxSize); - std::string localData(localDataBuffer); - JSStringRelease(stringReflocalData); - free(localDataBuffer); - - privData->nativeObj->setData(localData); - return true; -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.h deleted file mode 100644 index fbee5fd..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCProcessingInstruction.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCProcessingInstruction_h -#define JSCProcessingInstruction_h - -#include -#include "DOM/Node.hpp" -#include "JSCNode.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCProcessingInstruction { -public: - struct JSCProcessingInstructionPrivate { - JSCDOM* dom; - Arabica::DOM::ProcessingInstruction* nativeObj; - }; - - JSC_DESTRUCTOR(JSCProcessingInstructionPrivate); - - - static JSValueRef targetAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef dataAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool dataAttrSetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "ProcessingInstruction"; - classDef.parentClass = JSCNode::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCProcessingInstruction_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.cpp deleted file mode 100644 index 174b704..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCNode.h" -#include "JSCSCXMLEvent.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCSCXMLEvent::Tmpl; - -JSStaticValue JSCSCXMLEvent::staticValues[] = { - { "type", typeCustomAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "name", nameAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "origin", originAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "origintype", origintypeAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "raw", rawAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "dom", domAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "sendid", sendidCustomAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "invokeid", invokeidAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "INTERNAL", INTERNALConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "EXTERNAL", EXTERNALConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "PLATFORM", PLATFORMConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCSCXMLEvent::staticFunctions[] = { - { 0, 0, 0 } -}; - -JSValueRef JSCSCXMLEvent::nameAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->name.c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCSCXMLEvent::originAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(object); - - if (privData->nativeObj->origin.length() == 0) - return JSValueMakeUndefined(ctx); - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->origin.c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCSCXMLEvent::origintypeAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(object); - - if (privData->nativeObj->origintype.length() == 0) - return JSValueMakeUndefined(ctx); - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->origintype.c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCSCXMLEvent::rawAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(object); - - if (privData->nativeObj->raw.length() == 0) - return JSValueMakeUndefined(ctx); - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->raw.c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCSCXMLEvent::domAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(object); - - if (!privData->nativeObj->dom) return JSValueMakeUndefined(ctx); - Arabica::DOM::Node* arabicaRet = new Arabica::DOM::Node(privData->nativeObj->dom); - - JSClassRef arbaicaRetClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arabicaRet; - - JSObjectRef arbaicaRetObj = JSObjectMake(ctx, arbaicaRetClass, retPrivData); - return arbaicaRetObj; -} - - -JSValueRef JSCSCXMLEvent::invokeidAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(object); - - if (privData->nativeObj->invokeid.length() == 0) - return JSValueMakeUndefined(ctx); - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->invokeid.c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - -JSValueRef JSCSCXMLEvent::INTERNALConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 1); -} - -JSValueRef JSCSCXMLEvent::EXTERNALConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 2); -} - -JSValueRef JSCSCXMLEvent::PLATFORMConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 3); -} - - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.h deleted file mode 100644 index 1d8021d..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEvent.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCSCXMLEvent_h -#define JSCSCXMLEvent_h - -#include -#include "DOM/Node.hpp" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCSCXMLEvent { -public: - struct JSCSCXMLEventPrivate { - JSCDOM* dom; - uscxml::Event* nativeObj; - }; - - JSC_DESTRUCTOR(JSCSCXMLEventPrivate); - - - static JSValueRef typeCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef nameAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef originAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef origintypeAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef rawAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef domAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef sendidCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef invokeidAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef INTERNALConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef EXTERNALConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef PLATFORMConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "SCXMLEvent"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCSCXMLEvent_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEventCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEventCustom.cpp deleted file mode 100644 index 9d128b6..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCSCXMLEventCustom.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "JSCSCXMLEvent.h" - -namespace Arabica { -namespace DOM { - -JSValueRef JSCSCXMLEvent::typeCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(thisObj); - JSStringRef stringRef; - - switch (privData->nativeObj->eventType) { - case uscxml::Event::INTERNAL: - stringRef = JSStringCreateWithUTF8CString("internal"); - break; - case uscxml::Event::EXTERNAL: - stringRef = JSStringCreateWithUTF8CString("external"); - break; - case uscxml::Event::PLATFORM: - stringRef = JSStringCreateWithUTF8CString("platform"); - break; - default: - stringRef = JSStringCreateWithUTF8CString("undefined"); - break; - } - - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - -JSValueRef JSCSCXMLEvent::sendidCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { - struct JSCSCXMLEventPrivate* privData = (struct JSCSCXMLEventPrivate*)JSObjectGetPrivate(thisObj); - JSStringRef stringRef; - - if (privData->nativeObj->sendid.length() == 0 || privData->nativeObj->hideSendId) { - return JSValueMakeUndefined(ctx); - } else { - stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->sendid.c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; - } -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.cpp deleted file mode 100644 index 9bd3d73..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCStorage.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCStorage::Tmpl; - -JSStaticValue JSCStorage::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCStorage::staticFunctions[] = { - { "key", keyCallback, kJSPropertyAttributeDontDelete }, - { "getItem", getItemCallback, kJSPropertyAttributeDontDelete }, - { "setItem", setItemCallback, kJSPropertyAttributeDontDelete }, - { "removeItem", removeItemCallback, kJSPropertyAttributeDontDelete }, - { "clear", clearCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCStorage::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCStoragePrivate* privData = (struct JSCStoragePrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - - -JSValueRef JSCStorage::keyCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCStoragePrivate* privData = (struct JSCStoragePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - std::string retVal = privData->nativeObj->key(localIndex); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling key"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCStorage::getItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCStoragePrivate* privData = (struct JSCStoragePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalKey = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localKeyMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalKey); - char* localKeyBuffer = new char[localKeyMaxSize]; - JSStringGetUTF8CString(stringReflocalKey, localKeyBuffer, localKeyMaxSize); - std::string localKey(localKeyBuffer); - JSStringRelease(stringReflocalKey); - free(localKeyBuffer); - - - std::string retVal = privData->nativeObj->getItem(localKey); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling getItem"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCStorage::setItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCStoragePrivate* privData = (struct JSCStoragePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalKey = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localKeyMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalKey); - char* localKeyBuffer = new char[localKeyMaxSize]; - JSStringGetUTF8CString(stringReflocalKey, localKeyBuffer, localKeyMaxSize); - std::string localKey(localKeyBuffer); - JSStringRelease(stringReflocalKey); - free(localKeyBuffer); - - JSStringRef stringReflocalValue = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localValueMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalValue); - char* localValueBuffer = new char[localValueMaxSize]; - JSStringGetUTF8CString(stringReflocalValue, localValueBuffer, localValueMaxSize); - std::string localValue(localValueBuffer); - JSStringRelease(stringReflocalValue); - free(localValueBuffer); - - - privData->nativeObj->setItem(localKey, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling setItem"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCStorage::removeItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCStoragePrivate* privData = (struct JSCStoragePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsString(ctx, arguments[0])) { - JSStringRef stringReflocalKey = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localKeyMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalKey); - char* localKeyBuffer = new char[localKeyMaxSize]; - JSStringGetUTF8CString(stringReflocalKey, localKeyBuffer, localKeyMaxSize); - std::string localKey(localKeyBuffer); - JSStringRelease(stringReflocalKey); - free(localKeyBuffer); - - - privData->nativeObj->removeItem(localKey); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling removeItem"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCStorage::clearCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCStoragePrivate* privData = (struct JSCStoragePrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - privData->nativeObj->clear(); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling clear"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.h deleted file mode 100644 index dfb66b8..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCStorage.h +++ /dev/null @@ -1,73 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCStorage_h -#define JSCStorage_h - -#include -#include "DOM/Node.hpp" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCStorage { -public: - struct JSCStoragePrivate { - JSCDOM* dom; - uscxml::Storage* nativeObj; - }; - - JSC_DESTRUCTOR_KEEP_WRAPPED(JSCStoragePrivate); - - static JSValueRef keyCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef getItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef removeItemCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef clearCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Storage"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCStorage_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.cpp deleted file mode 100644 index be25753..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCCharacterData.h" -#include "JSCText.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCText::Tmpl; - -JSStaticValue JSCText::staticValues[] = { - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCText::staticFunctions[] = { - { "splitText", splitTextCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCText::splitTextCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCTextPrivate* privData = (struct JSCTextPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - Arabica::DOM::Text* retVal = new Arabica::DOM::Text(privData->nativeObj->splitText(localOffset)); - JSClassRef retClass = JSCText::getTmpl(); - - struct JSCText::JSCTextPrivate* retPrivData = new JSCText::JSCTextPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling splitText"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.h deleted file mode 100644 index 7ca23cb..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCText.h +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCText_h -#define JSCText_h - -#include -#include "DOM/Node.hpp" -#include "JSCCharacterData.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCText { -public: - struct JSCTextPrivate { - JSCDOM* dom; - Arabica::DOM::Text* nativeObj; - }; - - JSC_DESTRUCTOR(JSCTextPrivate); - - static JSValueRef splitTextCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Text"; - classDef.parentClass = JSCCharacterData::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCText_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCTypedArrayCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCTypedArrayCustom.cpp deleted file mode 100644 index b5122e8..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCTypedArrayCustom.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "../../TypedArray.h" -#include "JSCArrayBuffer.h" -#include "JSCInt8Array.h" -#include "JSCUint8Array.h" -#include "JSCUint8ClampedArray.h" -#include "JSCInt16Array.h" -#include "JSCUint16Array.h" -#include "JSCInt32Array.h" -#include "JSCUint32Array.h" -#include "JSCFloat32Array.h" -#include "JSCFloat64Array.h" -#include "JSCDataView.h" - -#define JSC_VALUE_TO_STRING(name, stringName)\ -size_t name##MaxSize = JSStringGetMaximumUTF8CStringSize(name);\ -char* name##Buffer = new char[name##MaxSize];\ -JSStringGetUTF8CString(name, name##Buffer, name##MaxSize);\ -std::string stringName(name##Buffer);\ -free(name##Buffer);\ - - -#define JSC_TYPED_ARRAY_GET_PROP_RETURN(type)\ -size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName);\ -char* propBuffer = new char[propMaxSize];\ -JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize);\ -std::string propName(propBuffer);\ -free(propBuffer);\ -if (strcmp(propName.c_str(), "prototype") == 0) {\ - JSStringRef prototypeName = JSStringCreateWithUTF8CString(#type);\ - JSValueRef prototype = JSObjectGetProperty(ctx, JSContextGetGlobalObject(ctx), prototypeName, exception);\ - assert(!JSValueIsUndefined(ctx, prototype) && !JSValueIsNull(ctx, prototype));\ - JSStringRelease(prototypeName);\ - return prototype;\ -}\ -JSStaticValue* prop = JSC##type::staticValues;\ -while(prop->name) {\ - if (strcmp(propName.c_str(), prop->name) == 0) {\ - return (prop->getProperty)(ctx, object, propertyName, exception);\ - }\ - prop++;\ -}\ -\ -JSC##type::JSC##type##Private* privObj = (JSC##type::JSC##type##Private*)JSObjectGetPrivate(object);\ -if (!privObj)\ - return JSValueMakeUndefined(ctx);\ -\ -uscxml::type* array = ((JSC##type::JSC##type##Private*)JSObjectGetPrivate(object))->nativeObj;\ -std::string base = "0123456789";\ -if (propName.find_first_not_of(base) != std::string::npos) {\ - return JSValueMakeUndefined(ctx);\ -}\ -unsigned long index = boost::lexical_cast(propName);\ -return JSValueMakeNumber(ctx, array->get(index)); - - - -#define JSC_TYPED_ARRAY_SET_PROP_RETURN(type)\ -if (!JSValueIsNumber(ctx, value)) {\ - return false;\ -}\ -size_t propMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName);\ -char* propBuffer = new char[propMaxSize];\ -JSStringGetUTF8CString(propertyName, propBuffer, propMaxSize);\ -std::string propName(propBuffer);\ -free(propBuffer);\ -uscxml::type* array = ((JSC##type::JSC##type##Private*)JSObjectGetPrivate(object))->nativeObj;\ -std::string base = "0123456789";\ -if (propName.find_first_not_of(base) != std::string::npos) {\ - return JSValueMakeUndefined(ctx);\ -}\ -unsigned long index = boost::lexical_cast(propName);\ -if (index >= array->getLength()) {\ - return false;\ -}\ -array->set(index, JSValueToNumber(ctx, value, exception));\ -return true; - - -#define JSC_TYPED_ARRAY_HAS_PROP_RETURN(type)\ -size_t propertyNameMaxSize = JSStringGetMaximumUTF8CStringSize(propertyName);\ -char* propertyNameBuffer = new char[propertyNameMaxSize];\ -JSStringGetUTF8CString(propertyName, propertyNameBuffer, propertyNameMaxSize);\ -std::string propName(propertyNameBuffer);\ -free(propertyNameBuffer);\ -\ -if (strcmp(propName.c_str(), "prototype") == 0)\ - return true;\ -\ -if (strcmp(propName.c_str(), "length") == 0)\ - return true;\ -\ -JSStaticValue* prop = JSC##type::staticValues;\ -while(prop->name) {\ - if (strcmp(propName.c_str(), prop->name) == 0) {\ - return true;\ - }\ - prop++;\ -}\ -\ -JSC##type::JSC##type##Private* privObj = (JSC##type::JSC##type##Private*)JSObjectGetPrivate(object);\ -if (!privObj)\ - return false;\ -\ -uscxml::type* array = ((JSC##type::JSC##type##Private*)JSObjectGetPrivate(object))->nativeObj;\ -std::string base = "0123456789";\ -if (propName.find_first_not_of(base) != std::string::npos) {\ - return false;\ -}\ -unsigned long index = boost::lexical_cast(propName);\ -if (array->getLength() > index)\ - return true;\ -return false;\ - -namespace Arabica { -namespace DOM { - -bool JSCInt8Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Int8Array); -} - -bool JSCInt16Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Int16Array); -} - -bool JSCInt32Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Int32Array); -} - -bool JSCUint8Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Uint8Array); -} - -bool JSCUint16Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Uint16Array); -} - -bool JSCUint32Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Uint32Array); -} - -bool JSCFloat32Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Float32Array); -} - -bool JSCFloat64Array::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Float64Array); -} - -bool JSCUint8ClampedArray::hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { - JSC_TYPED_ARRAY_HAS_PROP_RETURN(Uint8ClampedArray); -} - -// ----------------- - -JSValueRef JSCInt8Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Int8Array); -} - -JSValueRef JSCInt16Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Int16Array); -} - -JSValueRef JSCInt32Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Int32Array); -} - -JSValueRef JSCUint8Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Uint8Array); -} - -JSValueRef JSCUint16Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Uint16Array); -} - -JSValueRef JSCUint32Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Uint32Array); -} - -JSValueRef JSCFloat32Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Float32Array); -} - -JSValueRef JSCFloat64Array::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Float64Array); -} - -JSValueRef JSCUint8ClampedArray::getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { - JSC_TYPED_ARRAY_GET_PROP_RETURN(Uint8ClampedArray); -} - -// ---------------- - -bool JSCInt8Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Int8Array); -} - -bool JSCInt16Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Int16Array); -} - -bool JSCInt32Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Int32Array); -} - -bool JSCUint8Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Uint8Array); -} - -bool JSCUint16Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Uint16Array); -} - -bool JSCUint32Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Uint32Array); -} - -bool JSCFloat32Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Float32Array); -} - -bool JSCFloat64Array::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Float64Array); -} - -bool JSCUint8ClampedArray::setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) { - JSC_TYPED_ARRAY_SET_PROP_RETURN(Uint8ClampedArray); -} - - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.cpp deleted file mode 100644 index d869d1e..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCUint16Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCUint16Array::Tmpl; - -JSStaticValue JSCUint16Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCUint16Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCUint16Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Uint16Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Uint16Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Uint16Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint16Array::getTmpl())) { - - uscxml::Uint16Array* localArray = ((struct JSCUint16Array::JSCUint16ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint16Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint16Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Uint16Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Uint16Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Uint16Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCUint16Array::getTmpl(); - - struct JSCUint16Array::JSCUint16ArrayPrivate* retPrivData = new JSCUint16Array::JSCUint16ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCUint16Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCUint16ArrayPrivate* privData = (struct JSCUint16ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCUint16Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 2); -} - - -JSValueRef JSCUint16Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint16ArrayPrivate* privData = (struct JSCUint16ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned short retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint16Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint16ArrayPrivate* privData = (struct JSCUint16ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint16Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Uint16Array* localArray = ((struct JSCUint16Array::JSCUint16ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned short localValue = (unsigned short)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint16Array::getTmpl())) { - uscxml::Uint16Array* localArray = ((struct JSCUint16Array::JSCUint16ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint16Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint16ArrayPrivate* privData = (struct JSCUint16ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Uint16Array* retVal = new uscxml::Uint16Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCUint16Array::getTmpl(); - - struct JSCUint16Array::JSCUint16ArrayPrivate* retPrivData = new JSCUint16Array::JSCUint16ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Uint16Array* retVal = new uscxml::Uint16Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCUint16Array::getTmpl(); - - struct JSCUint16Array::JSCUint16ArrayPrivate* retPrivData = new JSCUint16Array::JSCUint16ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.h deleted file mode 100644 index 19ff639..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint16Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCUint16Array_h -#define JSCUint16Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCUint16Array { -public: - struct JSCUint16ArrayPrivate { - JSCDOM* dom; - uscxml::Uint16Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCUint16ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Uint16Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCUint16Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.cpp deleted file mode 100644 index 8fbefb3..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCUint32Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCUint32Array::Tmpl; - -JSStaticValue JSCUint32Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCUint32Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCUint32Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Uint32Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Uint32Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Uint32Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint32Array::getTmpl())) { - - uscxml::Uint32Array* localArray = ((struct JSCUint32Array::JSCUint32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint32Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint32Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Uint32Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Uint32Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Uint32Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCUint32Array::getTmpl(); - - struct JSCUint32Array::JSCUint32ArrayPrivate* retPrivData = new JSCUint32Array::JSCUint32ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCUint32Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCUint32ArrayPrivate* privData = (struct JSCUint32ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCUint32Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 4); -} - - -JSValueRef JSCUint32Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint32ArrayPrivate* privData = (struct JSCUint32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned long retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint32Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint32ArrayPrivate* privData = (struct JSCUint32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint32Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Uint32Array* localArray = ((struct JSCUint32Array::JSCUint32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned long localValue = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint32Array::getTmpl())) { - uscxml::Uint32Array* localArray = ((struct JSCUint32Array::JSCUint32ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint32Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint32ArrayPrivate* privData = (struct JSCUint32ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Uint32Array* retVal = new uscxml::Uint32Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCUint32Array::getTmpl(); - - struct JSCUint32Array::JSCUint32ArrayPrivate* retPrivData = new JSCUint32Array::JSCUint32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Uint32Array* retVal = new uscxml::Uint32Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCUint32Array::getTmpl(); - - struct JSCUint32Array::JSCUint32ArrayPrivate* retPrivData = new JSCUint32Array::JSCUint32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.h deleted file mode 100644 index 5d6e371..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint32Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCUint32Array_h -#define JSCUint32Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCUint32Array { -public: - struct JSCUint32ArrayPrivate { - JSCDOM* dom; - uscxml::Uint32Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCUint32ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Uint32Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCUint32Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.cpp deleted file mode 100644 index fbdbb14..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCUint8Array.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCUint8Array::Tmpl; - -JSStaticValue JSCUint8Array::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCUint8Array::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCUint8Array::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Uint8Array* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Uint8Array(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Uint8Array(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint8Array::getTmpl())) { - - uscxml::Uint8Array* localArray = ((struct JSCUint8Array::JSCUint8ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint8Array(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint8Array(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Uint8Array(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Uint8Array(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Uint8Array"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCUint8Array::getTmpl(); - - struct JSCUint8Array::JSCUint8ArrayPrivate* retPrivData = new JSCUint8Array::JSCUint8ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCUint8Array::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCUint8ArrayPrivate* privData = (struct JSCUint8ArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCUint8Array::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 1); -} - - -JSValueRef JSCUint8Array::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint8ArrayPrivate* privData = (struct JSCUint8ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned char retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint8Array::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint8ArrayPrivate* privData = (struct JSCUint8ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint8Array::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Uint8Array* localArray = ((struct JSCUint8Array::JSCUint8ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned char localValue = (unsigned char)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint8Array::getTmpl())) { - uscxml::Uint8Array* localArray = ((struct JSCUint8Array::JSCUint8ArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint8Array::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint8ArrayPrivate* privData = (struct JSCUint8ArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Uint8Array* retVal = new uscxml::Uint8Array(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCUint8Array::getTmpl(); - - struct JSCUint8Array::JSCUint8ArrayPrivate* retPrivData = new JSCUint8Array::JSCUint8ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Uint8Array* retVal = new uscxml::Uint8Array(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCUint8Array::getTmpl(); - - struct JSCUint8Array::JSCUint8ArrayPrivate* retPrivData = new JSCUint8Array::JSCUint8ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.h deleted file mode 100644 index af9e79f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8Array.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCUint8Array_h -#define JSCUint8Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCUint8Array { -public: - struct JSCUint8ArrayPrivate { - JSCDOM* dom; - uscxml::Uint8Array* nativeObj; - }; - - JSC_DESTRUCTOR(JSCUint8ArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Uint8Array"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCUint8Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.cpp deleted file mode 100644 index 848a507..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCArrayBuffer.h" -#include "JSCArrayBufferView.h" -#include "JSCUint8ClampedArray.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCUint8ClampedArray::Tmpl; - -JSStaticValue JSCUint8ClampedArray::staticValues[] = { - { "length", lengthAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { "BYTES_PER_ELEMENT", BYTES_PER_ELEMENTConstGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCUint8ClampedArray::staticFunctions[] = { - { "get", getCallback, kJSPropertyAttributeDontDelete }, - { "set", setCallback, kJSPropertyAttributeDontDelete }, - { "subarray", subarrayCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSObjectRef JSCUint8ClampedArray::jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { - uscxml::Uint8ClampedArray* localInstance = NULL; - - if (false) { - } else if (argumentCount == 3 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1]) && - JSValueIsNumber(ctx, arguments[2])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[2], exception); - localInstance = new uscxml::Uint8ClampedArray(localBuffer, localByteOffset, localLength); - - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localByteOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - localInstance = new uscxml::Uint8ClampedArray(localBuffer, localByteOffset); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint8ClampedArray::getTmpl())) { - - uscxml::Uint8ClampedArray* localArray = ((struct JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint8ClampedArray(localArray); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCArrayBuffer::getTmpl())) { - - uscxml::ArrayBuffer* localBuffer = ((struct JSCArrayBuffer::JSCArrayBufferPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - localInstance = new uscxml::Uint8ClampedArray(localBuffer); - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - - unsigned long localLength = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - localInstance = new uscxml::Uint8ClampedArray(localLength); - - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - localInstance = new uscxml::Uint8ClampedArray(localArray); - - } - if (!localInstance) { - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling constructor for Uint8ClampedArray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return (JSObjectRef)JSValueMakeNull(ctx); - } - - JSClassRef retClass = JSCUint8ClampedArray::getTmpl(); - - struct JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate* retPrivData = new JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate(); - retPrivData->nativeObj = localInstance; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - return retObj; -} - -JSValueRef JSCUint8ClampedArray::lengthAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCUint8ClampedArrayPrivate* privData = (struct JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->getLength()); -} - -JSValueRef JSCUint8ClampedArray::BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef *exception) { - return JSValueMakeNumber(ctx, 1); -} - - -JSValueRef JSCUint8ClampedArray::getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint8ClampedArrayPrivate* privData = (struct JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - - unsigned char retVal = privData->nativeObj->get(localIndex); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling get"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint8ClampedArray::setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint8ClampedArrayPrivate* privData = (struct JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint8ClampedArray::getTmpl()) && - JSValueIsNumber(ctx, arguments[1])) { - uscxml::Uint8ClampedArray* localArray = ((struct JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - unsigned long localIndex = (unsigned long)JSValueToNumber(ctx, arguments[0], exception); - unsigned char localValue = (unsigned char)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localIndex, localValue); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 2 && - JSValueIsObject(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - unsigned long localOffset = (unsigned long)JSValueToNumber(ctx, arguments[1], exception); - - privData->nativeObj->set(localArray, localOffset); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0]) && JSValueIsObjectOfClass(ctx, arguments[0], JSCUint8ClampedArray::getTmpl())) { - uscxml::Uint8ClampedArray* localArray = ((struct JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(JSValueToObject(ctx, arguments[0], exception)))->nativeObj; - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } else if (argumentCount == 1 && - JSValueIsObject(ctx, arguments[0])) { - - std::vector localArray; - - JSValueRef localArrayItem; - unsigned int localArrayIndex = 0; - while((localArrayItem = JSObjectGetPropertyAtIndex(ctx, JSValueToObject(ctx, arguments[0], exception), localArrayIndex, exception))) { - if (JSValueIsUndefined(ctx, localArrayItem)) - break; - if (JSValueIsNumber(ctx,localArrayItem)) - localArray.push_back(JSValueToNumber(ctx, localArrayItem, exception)); - localArrayIndex++; - } - - privData->nativeObj->set(localArray); - - JSValueRef jscRetVal = JSValueMakeUndefined(ctx); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling set"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCUint8ClampedArray::subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCUint8ClampedArrayPrivate* privData = (struct JSCUint8ClampedArrayPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsNumber(ctx, arguments[0]) && - JSValueIsNumber(ctx, arguments[1])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - long localEnd = (long)JSValueToNumber(ctx, arguments[1], exception); - - uscxml::Uint8ClampedArray* retVal = new uscxml::Uint8ClampedArray(privData->nativeObj->subarray(localStart, localEnd)); - JSClassRef retClass = JSCUint8ClampedArray::getTmpl(); - - struct JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate* retPrivData = new JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } else if (argumentCount == 1 && - JSValueIsNumber(ctx, arguments[0])) { - long localStart = (long)JSValueToNumber(ctx, arguments[0], exception); - - uscxml::Uint8ClampedArray* retVal = new uscxml::Uint8ClampedArray(privData->nativeObj->subarray(localStart)); - JSClassRef retClass = JSCUint8ClampedArray::getTmpl(); - - struct JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate* retPrivData = new JSCUint8ClampedArray::JSCUint8ClampedArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling subarray"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.h deleted file mode 100644 index 1558e48..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCUint8ClampedArray.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCUint8ClampedArray_h -#define JSCUint8ClampedArray_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "JSCArrayBufferView.h" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCUint8ClampedArray { -public: - struct JSCUint8ClampedArrayPrivate { - JSCDOM* dom; - uscxml::Uint8ClampedArray* nativeObj; - }; - - JSC_DESTRUCTOR(JSCUint8ClampedArrayPrivate); - - static JSValueRef getCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef setCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef subarrayCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSObjectRef jsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - static JSValueRef lengthAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef BYTES_PER_ELEMENTConstGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static bool hasPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - static JSValueRef getPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - static bool setPropertyCustomCallback(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "Uint8ClampedArray"; - classDef.hasProperty = hasPropertyCustomCallback; - classDef.getProperty = getPropertyCustomCallback; - classDef.setProperty = setPropertyCustomCallback; - classDef.callAsConstructor = jsConstructor; - classDef.parentClass = JSCArrayBufferView::getTmpl(); - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCUint8ClampedArray_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.cpp deleted file mode 100644 index eb443f6..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ -#include "JSCNodeSet.h" -#include "JSCXPathResult.h" - -namespace Arabica { -namespace DOM { - -JSClassRef JSCXPathResult::Tmpl; - -JSStaticValue JSCXPathResult::staticValues[] = { - { "numberValue", numberValueAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "stringValue", stringValueAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "booleanValue", booleanValueAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "singleNodeValue", singleNodeValueCustomAttrGetter, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - - { 0, 0, 0, 0 } -}; - -JSStaticFunction JSCXPathResult::staticFunctions[] = { - { "asNodeSet", asNodeSetCallback, kJSPropertyAttributeDontDelete }, - { "asBool", asBoolCallback, kJSPropertyAttributeDontDelete }, - { "asString", asStringCallback, kJSPropertyAttributeDontDelete }, - { "asNumber", asNumberCallback, kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } -}; - -JSValueRef JSCXPathResult::numberValueAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeNumber(ctx, privData->nativeObj->asNumber()); -} - - -JSValueRef JSCXPathResult::stringValueAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(object); - - JSStringRef stringRef = JSStringCreateWithUTF8CString(privData->nativeObj->asString().c_str()); - JSValueRef retVal = JSValueMakeString(ctx, stringRef); - JSStringRelease(stringRef); - return retVal; -} - - -JSValueRef JSCXPathResult::booleanValueAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(object); - - return JSValueMakeBoolean(ctx, privData->nativeObj->asBool()); -} - - -JSValueRef JSCXPathResult::asNodeSetCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - Arabica::XPath::NodeSet* retVal = new Arabica::XPath::NodeSet(privData->nativeObj->asNodeSet()); - JSClassRef retClass = JSCNodeSet::getTmpl(); - - struct JSCNodeSet::JSCNodeSetPrivate* retPrivData = new JSCNodeSet::JSCNodeSetPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling asNodeSet"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCXPathResult::asBoolCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - bool retVal = privData->nativeObj->asBool(); - - JSValueRef jscRetVal = JSValueMakeBoolean(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling asBool"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCXPathResult::asStringCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - std::string retVal = privData->nativeObj->asString(); - - JSStringRef jscString = JSStringCreateWithUTF8CString(retVal.c_str()); - JSValueRef jscRetVal = JSValueMakeString(ctx, jscString); - JSStringRelease(jscString); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling asString"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCXPathResult::asNumberCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 0) { - - double retVal = privData->nativeObj->asNumber(); - - JSValueRef jscRetVal = JSValueMakeNumber(ctx, retVal); - return jscRetVal; - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling asNumber"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.h deleted file mode 100644 index e145dc1..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResult.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef JSCXPathResult_h -#define JSCXPathResult_h - -#include -#include "DOM/Node.hpp" -#include -#include "uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h" - -namespace Arabica { -namespace DOM { - -class JSCXPathResult { -public: - struct JSCXPathResultPrivate { - JSCDOM* dom; - Arabica::XPath::XPathValue* nativeObj; - }; - - JSC_DESTRUCTOR(JSCXPathResultPrivate); - - static JSValueRef asNodeSetCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef asBoolCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef asStringCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef asNumberCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - - static JSValueRef numberValueAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef stringValueAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef booleanValueAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - static JSValueRef singleNodeValueCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception); - - - static JSStaticValue staticValues[]; - static JSStaticFunction staticFunctions[]; - - static JSClassRef Tmpl; - static JSClassRef getTmpl() { - if (Tmpl == NULL) { - JSClassDefinition classDef = kJSClassDefinitionEmpty; - classDef.staticValues = staticValues; - classDef.staticFunctions = staticFunctions; - classDef.finalize = jsDestructor; - classDef.className = "XPathResult"; - - Tmpl = JSClassCreate(&classDef); - JSClassRetain(Tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // JSCXPathResult_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResultCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResultCustom.cpp deleted file mode 100644 index 42b4ea1..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCXPathResultCustom.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "JSCXPathResult.h" -#include "JSCNode.h" - -namespace Arabica { -namespace DOM { - -JSValueRef JSCXPathResult::singleNodeValueCustomAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { - struct JSCXPathResultPrivate* privData = (struct JSCXPathResultPrivate*)JSObjectGetPrivate(thisObj); - - Arabica::XPath::NodeSet nodeSet = privData->nativeObj->asNodeSet(); - if (nodeSet.size() == 0) - return JSValueMakeUndefined(ctx); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(nodeSet[0]); - JSClassRef retClass = JSCNode::getTmpl(); - - struct JSCNode::JSCNodePrivate* retPrivData = new JSCNode::JSCNodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/SpiderMonkey/SpiderMonkeyDataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/SpiderMonkey/SpiderMonkeyDataModel.cpp deleted file mode 100644 index c16bece..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/SpiderMonkey/SpiderMonkeyDataModel.cpp +++ /dev/null @@ -1,227 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/Common.h" -#include "uscxml/config.h" -#include "SpiderMonkeyDataModel.h" - -#include "uscxml/Message.h" -#include "uscxml/dom/DOMUtils.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -using namespace Arabica::XPath; -using namespace Arabica::DOM; - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new SpiderMonkeyDataModelProvider() ); - return true; -} -#endif - -static JSClass global_class = { "global", - JSCLASS_NEW_RESOLVE | JSCLASS_GLOBAL_FLAGS, - JS_PropertyStub, - JS_PropertyStub, - JS_PropertyStub, - JS_PropertyStub, - JS_EnumerateStub, - JS_ResolveStub, - JS_ConvertStub, - nullptr, - JSCLASS_NO_OPTIONAL_MEMBERS - }; - - -JSRuntime* SpiderMonkeyDataModel::_jsRuntime = NULL; - -SpiderMonkeyDataModel::SpiderMonkeyDataModel() { - _jsCtx = NULL; -} - -SpiderMonkeyDataModel::~SpiderMonkeyDataModel() { - if (_jsCtx) - JS_DestroyContext(_jsCtx); -} - -void SpiderMonkeyDataModel::reportError(JSContext *cx, const char *message, JSErrorReport *report) { -#if 0 - struct JSErrorReport { - const char *filename; /* source file name, URL, etc., or null */ - uintN lineno; /* source line number */ - const char *linebuf; /* offending source line without final \n */ - const char *tokenptr; /* pointer to error token in linebuf */ - const jschar *uclinebuf; /* unicode (original) line buffer */ - const jschar *uctokenptr; /* unicode (original) token pointer */ - uintN flags; /* error/warning, etc. */ - uintN errorNumber; /* the error number, e.g. see js.msg */ - const jschar *ucmessage; /* the (default) error message */ - const jschar **messageArgs; /* arguments for the error message */ - }; - exceptionEvent.data.compound["stacktrace"] = Data(stackTrace, Data::VERBATIM); -#endif - - Event exceptionEvent; - exceptionEvent.name = "error.execution"; - exceptionEvent.eventType = Event::PLATFORM; - - exceptionEvent.data.compound["cause"] = Data(message, Data::VERBATIM);; - exceptionEvent.data.compound["filename"] = Data(report->filename, Data::VERBATIM); - exceptionEvent.data.compound["sourceline"] = Data(report->linebuf, Data::VERBATIM); - exceptionEvent.data.compound["linenumber"] = Data(report->lineno, Data::INTERPRETED); - - std::stringstream ssUnderline; - for (int i = 0; i < (report->tokenptr - report->linebuf); i++) - ssUnderline << " "; - ssUnderline << "^"; - - exceptionEvent.data.compound["sourcemark"] = Data(ssUnderline.str(), Data::VERBATIM); - throw exceptionEvent; -} - -boost::shared_ptr SpiderMonkeyDataModel::create(InterpreterImpl* interpreter) { - if (_jsRuntime == NULL) { - JSRuntime *rt = JS_NewRuntime(8L * 1024L * 1024L); - if (!rt) { - throw std::bad_alloc(); - } - } - - boost::shared_ptr dm = boost::shared_ptr(new SpiderMonkeyDataModel()); - dm->_interpreter = interpreter; - dm->_jsCtx = JS_NewContext(_jsRuntime, 8192); - if (!dm->_jsCtx) { - throw std::bad_alloc(); - } - JS_SetOptions(dm->_jsCtx, JSOPTION_VAROBJFIX); - JS_SetErrorReporter(dm->_jsCtx, reportError); - - dm->_global = JS_NewObject(dm->_jsCtx, &global_class, nullptr, nullptr); - if (!JS_InitStandardClasses(dm->_jsCtx, dm->_global)) { - throw std::bad_alloc(); - } - - return dm; -} - -void SpiderMonkeyDataModel::pushContext() { -} - -void SpiderMonkeyDataModel::popContext() { -} - -void SpiderMonkeyDataModel::initialize() { -} - -void SpiderMonkeyDataModel::setEvent(const Event& event) { -} - -Data SpiderMonkeyDataModel::getStringAsData(const std::string& content) { - Data data; - return data; -} - - -bool SpiderMonkeyDataModel::validate(const std::string& location, const std::string& schema) { - return true; -} - -bool SpiderMonkeyDataModel::isLocation(const std::string& expr) { - return true; -} - -uint32_t SpiderMonkeyDataModel::getLength(const std::string& expr) { - return 0; -} - -void SpiderMonkeyDataModel::setForeach(const std::string& item, - const std::string& array, - const std::string& index, - uint32_t iteration) { -} - -void SpiderMonkeyDataModel::eval(const Element& scriptElem, - const std::string& expr) { -} - -bool SpiderMonkeyDataModel::isDeclared(const std::string& expr) { - return true; -} - -bool SpiderMonkeyDataModel::evalAsBool(const std::string& expr) { - return evalAsBool(Arabica::DOM::Element(), expr); -} - -bool SpiderMonkeyDataModel::evalAsBool(const Arabica::DOM::Element& node, const std::string& expr) { -} - -std::string SpiderMonkeyDataModel::evalAsString(const std::string& expr) { - return ""; -} - -double SpiderMonkeyDataModel::evalAsNumber(const std::string& expr) { - return 0; -} - -void SpiderMonkeyDataModel::assign(const Element& assignElem, - const Node& node, - const std::string& content) { -} - -void SpiderMonkeyDataModel::assign(const std::string& location, - const Data& data) { -} - -void SpiderMonkeyDataModel::init(const Element& dataElem, - const Node& doc, - const std::string& content) { -}; - -void SpiderMonkeyDataModel::init(const std::string& location, - const Data& data) { -} - -std::string SpiderMonkeyDataModel::andExpressions(std::list expressions) { - if (expressions.size() == 0) - return ""; - - if (expressions.size() == 1) - return *(expressions.begin()); - - std::ostringstream exprSS; - exprSS << "("; - std::string conjunction = ""; - for (std::list::const_iterator exprIter = expressions.begin(); - exprIter != expressions.end(); - exprIter++) { - exprSS << conjunction << "(" << *exprIter << ")"; - conjunction = " && "; - } - exprSS << ")"; - return exprSS.str(); -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/SpiderMonkey/SpiderMonkeyDataModel.h b/src/uscxml/plugins/datamodel/ecmascript/SpiderMonkey/SpiderMonkeyDataModel.h deleted file mode 100644 index d9a5e5e..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/SpiderMonkey/SpiderMonkeyDataModel.h +++ /dev/null @@ -1,105 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef SPIDERMONKEYDATAMODEL_H_88841EE2 -#define SPIDERMONKEYDATAMODEL_H_88841EE2 - -#include "uscxml/Interpreter.h" -#include -#include "jsapi.h" - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { -class Event; -class Data; -} - -namespace uscxml { - -class SpiderMonkeyDataModel : public DataModelImpl { -public: - SpiderMonkeyDataModel(); - virtual ~SpiderMonkeyDataModel(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("ecmascript"); - return names; - } - - virtual void initialize(); - virtual void setEvent(const Event& event); - - virtual bool validate(const std::string& location, const std::string& schema); - virtual bool isLocation(const std::string& expr); - - virtual uint32_t getLength(const std::string& expr); - virtual void setForeach(const std::string& item, - const std::string& array, - const std::string& index, - uint32_t iteration); - virtual void pushContext(); - virtual void popContext(); - - virtual void eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr); - virtual void assign(const Arabica::DOM::Element& assignElem, - const Arabica::DOM::Node& node, - const std::string& content); - virtual void assign(const std::string& location, - const Data& data); - - virtual void init(const Arabica::DOM::Element& dataElem, - const Arabica::DOM::Node& node, - const std::string& content); - virtual void init(const std::string& location, - const Data& data); - - virtual std::string andExpressions(std::list); - - virtual Data getStringAsData(const std::string& content); - - virtual bool isDeclared(const std::string& expr); - - virtual std::string evalAsString(const std::string& expr); - virtual bool evalAsBool(const Arabica::DOM::Element& node, const std::string& expr); - virtual bool evalAsBool(const std::string& expr); - virtual double evalAsNumber(const std::string& expr); - - static void reportError(JSContext *cx, const char *message, JSErrorReport *report); - -protected: - - JSObject* _global; - - JSContext* _jsCtx; - static JSRuntime* _jsRuntime; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(SpiderMonkeyDataModel, DataModelImpl); -#endif - -} - -#endif /* end of include guard: SPIDERMONKEYDATAMODEL_H_88841EE2 */ diff --git a/src/uscxml/plugins/datamodel/ecmascript/Storage.cpp b/src/uscxml/plugins/datamodel/ecmascript/Storage.cpp deleted file mode 100644 index 980fc5d..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/Storage.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "Storage.h" -#include -#include -#include - -namespace uscxml { - -Storage::Storage(const std::string& filename) { - _filename = filename; -// std::cout << _filename << std::endl; - std::fstream file; - file.open(_filename.c_str(), std::ios_base::in); - // read content into data - std::string key; - std::string value; - - while(std::getline(file, key, '\0')) { - if(std::getline(file, value, '\0')) { - _data[key] = value; - } - } - file.close(); -} - -Storage::~Storage() { - std::fstream file; - file.open(_filename.c_str(), std::ios_base::out); -// file.clear(); - - std::map::iterator dataIter = _data.begin(); - while(dataIter != _data.end()) { - // include trailing \0 - file.write(dataIter->first.c_str(), dataIter->first.length() + 1); - file.write(dataIter->second.c_str(), dataIter->second.length() + 1); - dataIter++; - } -// file.flush(); - file.close(); -} - -unsigned long Storage::getLength() { - return _data.size(); -} - -std::string Storage::key(unsigned long index) { - if (index > getLength()) - return ""; - - std::map::iterator dataIter = _data.begin(); - for (unsigned int i = 0; i < index; i++) { - dataIter++; - } - return dataIter->first; -} - -std::string Storage::getItem(const std::string& key) { - if (_data.find(key) == _data.end()) - return ""; - return _data[key]; -} - -void Storage::setItem(const std::string& key, const std::string& value) { - _data[key] = value; -} - -void Storage::removeItem(const std::string& key) { - if (_data.find(key) == _data.end()) - return; - _data.erase(key); -} - -void Storage::clear() { - _data.clear(); -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/Storage.h b/src/uscxml/plugins/datamodel/ecmascript/Storage.h deleted file mode 100644 index 35bde86..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/Storage.h +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef STORAGE_H_L672TNX -#define STORAGE_H_L672TNX - -#include -#include - -namespace uscxml { - -class Storage { -public: - Storage(const std::string& filename); - ~Storage(); - - unsigned long getLength(); - std::string key(unsigned long index); - std::string getItem(const std::string& key); - void setItem(const std::string& key, const std::string& value); - void removeItem(const std::string& key); - void clear(); - -protected: - std::map _data; - std::string _filename; -}; - -} - -#endif /* end of include guard: STORAGE_H_L672TNX */ diff --git a/src/uscxml/plugins/datamodel/ecmascript/TypedArray.cpp b/src/uscxml/plugins/datamodel/ecmascript/TypedArray.cpp deleted file mode 100644 index c8b73cf..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/TypedArray.cpp +++ /dev/null @@ -1,283 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "TypedArray.h" -#include "uscxml/Convenience.h" -#include - -#define DATAVIEW_TYPED_GET(type) \ -type retVal;\ -if (index + _start + sizeof(type) > _blob._impl->size)\ - return 0;\ -memcpy(&retVal, _blob._impl->data + (_start + index), sizeof(type)); - -#define DATAVIEW_TYPED_SET(type) \ -if (index + _start + sizeof(type) > _blob._impl->size)\ - return;\ -memcpy(_blob._impl->data + (_start + index), &value, sizeof(type)); - -namespace uscxml { - -ArrayBuffer::ArrayBuffer(unsigned long length) { - _blob = Blob(length); -} - -ArrayBuffer::ArrayBuffer(const Blob& blob) : _blob(blob) { -} - -ArrayBuffer::ArrayBuffer(void* data, unsigned int size) { - _blob = Blob((const char*)data, size, "application/octet-stream"); -} - -unsigned long ArrayBuffer::getByteLength() { - if (!_blob) - return 0; - return _blob._impl->size; -} - -ArrayBuffer ArrayBuffer::slice(long begin, long end) { - if (!_blob) { - return ArrayBuffer(0); - } - unsigned int realBegin = (begin + _blob._impl->size) % _blob._impl->size; - unsigned int realEnd = (end + _blob._impl->size) % _blob._impl->size; - if (realEnd < realBegin) { - return ArrayBuffer(0); - } - - ArrayBuffer arrBuffer(realEnd - realBegin); - memcpy(arrBuffer._blob._impl->data, _blob._impl->data + realBegin, realEnd - realBegin); - return arrBuffer; -} - -ArrayBuffer ArrayBuffer::slice(long begin) { - return slice(begin, _blob._impl->size); -} - -bool ArrayBuffer::isView(void*) { - return true; -} - -ArrayBuffer::operator bool() { - return !!_blob; -} - -ArrayBuffer ArrayBufferView::getBuffer() { - return ArrayBuffer(_blob); -} - -DataView::DataView(ArrayBuffer* buffer, unsigned long byteOffset, unsigned long byteLength) { - _start = byteOffset; - if (_start > buffer->_blob._impl->size) - return; - _end = _start + byteLength; - if (_end > buffer->_blob._impl->size) - return; - _blob = buffer->_blob; -} - -DataView::DataView(ArrayBuffer* buffer , unsigned long byteOffset) { - _start = byteOffset; - _end = buffer->_blob._impl->size; - if (_start > buffer->_blob._impl->size) - return; - _blob = buffer->_blob; -} - -DataView::DataView(ArrayBuffer* buffer) { - _start = 0; - _end = (buffer->_blob._impl->size); - _blob = buffer->_blob; -} - -unsigned long DataView::getByteOffset() { - return _start; -} - -unsigned long DataView::getByteLength() { - return _end - _start; -} - -unsigned long DataView::getLength() { - return _end - _start; -} - -int8_t DataView::getInt8(unsigned long index) { - DATAVIEW_TYPED_GET(int8_t); - return retVal; -} - -uint8_t DataView::getUint8(unsigned long index) { - DATAVIEW_TYPED_GET(uint8_t); - return retVal; -} - -int16_t DataView::getInt16(unsigned long index, bool littleEndian) { - DATAVIEW_TYPED_GET(int16_t); -#ifdef BOOST_LITTLE_ENDIAN - if (littleEndian) - return retVal; - return byte_swap(retVal); -#else - if (littleEndian) - return byte_swap(retVal); - return retVal; -#endif -} - -uint16_t DataView::getUint16(unsigned long index, bool littleEndian) { - DATAVIEW_TYPED_GET(uint16_t); -#ifdef BOOST_LITTLE_ENDIAN - if (littleEndian) - return retVal; - return byte_swap(retVal); -#else - if (littleEndian) - return byte_swap(retVal); - return retVal; -#endif -} - -int32_t DataView::getInt32(unsigned long index, bool littleEndian) { - DATAVIEW_TYPED_GET(int32_t); -#ifdef BOOST_LITTLE_ENDIAN - if (littleEndian) - return retVal; - return byte_swap(retVal); -#else - if (littleEndian) - return byte_swap(retVal); - return retVal; -#endif -} - -uint32_t DataView::getUint32(unsigned long index, bool littleEndian) { - DATAVIEW_TYPED_GET(uint32_t); -#ifdef BOOST_LITTLE_ENDIAN - if (littleEndian) - return retVal; - return byte_swap(retVal); -#else - if (littleEndian) - return byte_swap(retVal); - return retVal; -#endif -} - -float DataView::getFloat32(unsigned long index, bool littleEndian) { - DATAVIEW_TYPED_GET(float); -#ifdef BOOST_LITTLE_ENDIAN - if (littleEndian) - return retVal; - return byte_swap(retVal); -#else - if (littleEndian) - return byte_swap(retVal); - return retVal; -#endif -} - -double DataView::getFloat64(unsigned long index, bool littleEndian) { - DATAVIEW_TYPED_GET(double); -#ifdef BOOST_LITTLE_ENDIAN - if (littleEndian) - return retVal; - return byte_swap(retVal); -#else - if (littleEndian) - return byte_swap(retVal); - return retVal; -#endif -} - -void DataView::setInt8(long index, int8_t value) { - DATAVIEW_TYPED_SET(int8_t); -} - -void DataView::setUint8(long index, uint8_t value) { - DATAVIEW_TYPED_SET(uint8_t); -} - -void DataView::setInt16(long index, int16_t value, bool littleEndian) { -#ifdef BOOST_LITTLE_ENDIAN - if (!littleEndian) - value = byte_swap(value); -#else - if (littleEndian) - value = byte_swap(value); -#endif - DATAVIEW_TYPED_SET(int16_t); -} - -void DataView::setUint16(long index, uint16_t value, bool littleEndian) { -#ifdef BOOST_LITTLE_ENDIAN - if (!littleEndian) - value = byte_swap(value); -#else - if (littleEndian) - value = byte_swap(value); -#endif - DATAVIEW_TYPED_SET(uint16_t); -} - -void DataView::setInt32(long index, int32_t value, bool littleEndian) { -#ifdef BOOST_LITTLE_ENDIAN - if (!littleEndian) - value = byte_swap(value); -#else - if (littleEndian) - value = byte_swap(value); -#endif - DATAVIEW_TYPED_SET(int32_t); -} - -void DataView::setUint32(long index, uint32_t value, bool littleEndian) { -#ifdef BOOST_LITTLE_ENDIAN - if (!littleEndian) - value = byte_swap(value); -#else - if (littleEndian) - value = byte_swap(value); -#endif - DATAVIEW_TYPED_SET(uint32_t); -} - -void DataView::setFloat32(long index, float value, bool littleEndian) { -#ifdef BOOST_LITTLE_ENDIAN - if (!littleEndian) - value = byte_swap(value); -#else - if (littleEndian) - value = byte_swap(value); -#endif - DATAVIEW_TYPED_SET(float); -} - -void DataView::setFloat64(long index, double value, bool littleEndian) { -#ifdef BOOST_LITTLE_ENDIAN - if (!littleEndian) - value = byte_swap(value); -#else - if (littleEndian) - value = byte_swap(value); -#endif - DATAVIEW_TYPED_SET(double); -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/TypedArray.h b/src/uscxml/plugins/datamodel/ecmascript/TypedArray.h deleted file mode 100644 index a49410c..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/TypedArray.h +++ /dev/null @@ -1,463 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef TYPEDARRAY_H_99815BLY -#define TYPEDARRAY_H_99815BLY - -#include "uscxml/Common.h" -#include "uscxml/messages/Blob.h" - -#include -#include -#include -#include -#include - -#include -#include -#include - - -namespace uscxml { - -/** - * https://www.khronos.org/registry/typedarray/specs/latest/ - */ - -class ArrayBuffer { -public: - - ArrayBuffer(void* data, unsigned int size); - - /** - * Creates a new ArrayBuffer of the given length in bytes. The contents of the - * ArrayBuffer are initialized to 0. If the requested number of bytes could not - * be allocated an exception is raised. - */ - ArrayBuffer(unsigned long length); - ArrayBuffer(const Blob&); - - /** - * The length of the ArrayBuffer in bytes, as fixed at construction time. - * Reading this property returns 0 if this ArrayBuffer has been neutered. - */ - unsigned long getByteLength(); - - /** - * Returns a new ArrayBuffer whose contents are a copy of this ArrayBuffer's - * bytes from begin, inclusive, up to end, exclusive. If either begin or end - * is negative, it refers to an index from the end of the array, as opposed - * to from the beginning. - * If end is unspecified, the new ArrayBuffer contains all bytes from begin - * to the end of this ArrayBuffer. - * The range specified by the begin and end values is clamped to the valid - * index range for the current array. If the computed length of the new - * ArrayBuffer would be negative, it is clamped to zero. - */ - ArrayBuffer slice(long begin, long end); - ArrayBuffer slice(long begin); - static bool isView(void*); - unsigned long getLength() { - return getByteLength(); - } - operator bool(); - bool operator== (const ArrayBuffer& other) { - return other._blob == _blob; - } -// unsigned char get(unsigned long index) { -// if (index >= getLength()) -// return 0; -// unsigned char retVal; -// memcpy(&retVal, _blob->_data + index * sizeof(unsigned char), sizeof(unsigned char)); -// return retVal; -// } -// -// void set(unsigned long index, unsigned char value) { -// memcpy(_blob->_data + index * sizeof(unsigned char), &value, sizeof(unsigned char)); -// } - - // non-standard extension - std::string md5() const { - return _blob.md5(); - } - - // non-standard extension - std::string base64() const { - return _blob.base64(); - } - - std::string getMimeType() const { - if (_blob) - return _blob.getMimeType(); - return ""; - } - - void setMimeType(const std::string& mimeType) { - if (_blob) - _blob.setMimeType(mimeType); - } - - Blob _blob; -}; - -class ArrayBufferView { -public: - virtual ~ArrayBufferView() {} - /** - * The ArrayBuffer that this ArrayBufferView references. - */ - ArrayBuffer getBuffer(); - - /** - * The offset of this ArrayBufferView from the start of its ArrayBuffer, in - * bytes, as fixed at construction time. Reading this property returns 0 if - * the referenced ArrayBuffer has been neutered. - */ - virtual unsigned long getByteOffset() = 0; - - /** - * The length of the ArrayBufferView in bytes, as fixed at construction time. - * Reading this property returns 0 if the referenced ArrayBuffer has been - * neutered. - */ - virtual unsigned long getByteLength() = 0; - virtual unsigned long getLength() = 0; -protected: - Blob _blob; - unsigned long _start; - unsigned long _end; -}; - - -class DataView : ArrayBufferView { -public: - /** - * Create a new DataView object using the passed ArrayBuffer for its storage. - * Optional byteOffset and byteLength can be used to limit the section of the - * buffer referenced. The byteOffset indicates the offset in bytes from the - * start of the ArrayBuffer, and the byteLength is the number of bytes from the - * offset that this DataView will reference. If both byteOffset and byteLength - * are omitted, the DataView spans the entire ArrayBuffer range. If the - * byteLength is omitted, the DataView extends from the given byteOffset until - * the end of the ArrayBuffer. - * If the given byteOffset and byteLength references an area beyond the end of - * the ArrayBuffer an exception is raised. - */ - - DataView(ArrayBuffer*, unsigned long, unsigned long); - DataView(ArrayBuffer*, unsigned long); - DataView(ArrayBuffer*); - - unsigned long getByteOffset(); - unsigned long getByteLength(); - unsigned long getLength(); - - /** - * Gets the value of the given type at the specified byte offset - * from the start of the view. There is no alignment constraint; - * multi-byte values may be fetched from any offset. - * For multi-byte values, the optional littleEndian argument - * indicates whether a big-endian or little-endian value should be - * read. If false or undefined, a big-endian value is read. - * These methods raise an exception if they would read - * beyond the end of the view. - */ - - int8_t getInt8(unsigned long); - uint8_t getUint8(unsigned long); - int16_t getInt16(unsigned long, bool = false); - uint16_t getUint16(unsigned long, bool = false); - int32_t getInt32(unsigned long, bool = false); - uint32_t getUint32(unsigned long, bool = false); - float getFloat32(unsigned long, bool = false); - double getFloat64(unsigned long, bool = false); - - /** - * Stores a value of the given type at the specified byte offset - * from the start of the view. There is no alignment constraint; - * multi-byte values may be stored at any offset. - * For multi-byte values, the optional littleEndian argument - * indicates whether the value should be stored in big-endian or - * little-endian byte order. If false or undefined, the value is - * stored in big-endian byte order. - * These methods raise an exception if they would write - * beyond the end of the view. - */ - - void setInt8(long, int8_t); - void setUint8(long, uint8_t); - void setInt16(long, int16_t, bool = false); - void setUint16(long, uint16_t, bool = false); - void setInt32(long, int32_t, bool = false); - void setUint32(long, uint32_t, bool = false); - void setFloat32(long, float, bool = false); - void setFloat64(long, double, bool = false); - -}; - -template class TypedArray : public ArrayBufferView { -public: - virtual ~TypedArray() {} - - /** - * Create a new TypedArray object using the passed ArrayBuffer for its storage. - * Optional byteOffset and length can be used to limit the section of the buffer - * referenced. The byteOffset indicates the offset in bytes from the start of - * the ArrayBuffer, and the length is the count of elements from the offset - * that this TypedArray will reference. If both byteOffset and length are - * omitted, the TypedArray spans the entire ArrayBuffer range. If the length - * is omitted, the TypedArray extends from the given byteOffset until the end - * of the ArrayBuffer. - * The given byteOffset must be a multiple of the element size of the specific - * type, otherwise an exception is raised. - * If a given byteOffset and length references an area beyond the end of the - * ArrayBuffer an exception is raised. - * If length is not explicitly specified, the length of the ArrayBuffer minus - * the byteOffset must be a multiple of the element size of the specific type, - * or an exception is raised. - */ - TypedArray(uscxml::ArrayBuffer* buffer, unsigned long byteOffset, unsigned long length) { - if (byteOffset % sizeof(S)) - return; - - _start = byteOffset / sizeof(S); - _end = _start + length; - - if (_end > buffer->_blob._impl->size / sizeof(S)) - return; - - _blob = buffer->_blob; - } - TypedArray(uscxml::ArrayBuffer* buffer, unsigned long byteOffset) { - if (byteOffset % sizeof(S)) - return; - - _start = byteOffset / sizeof(S); - _end = buffer->_blob._impl->size / sizeof(S); - _blob = buffer->_blob; - } - TypedArray(uscxml::ArrayBuffer* buffer) { - _start = 0; - _end = (buffer->_blob._impl->size) / sizeof(S); - _blob = buffer->_blob; - } - - TypedArray(Blob blob, unsigned long byteOffset, unsigned long length) { - if (byteOffset % sizeof(S)) - return; - - _start = byteOffset / sizeof(S); - _end = _start + length; - - if (_end > blob._impl->size / sizeof(S)) - return; - - _blob = blob; - } - - /** - * Create a new ArrayBuffer with enough bytes to hold length elements of this - * typed array, then creates a typed array view referring to the full buffer. - * As with a directly constructed ArrayBuffer, the contents are initialized - * to 0. If the requested number of bytes could not be allocated an exception - * is raised. - */ - TypedArray(unsigned long length) { - _start = 0; - _end = length; - _blob = Blob(length * sizeof(S)); - } - - /** - * Create a new ArrayBuffer with enough bytes to hold array.length elements of - * this typed array, then creates a typed array view referring to the full - * buffer. The contents of the new view are initialized to the contents of the - * given array or typed array, with each element converted to the appropriate - * typed array type. - */ - TypedArray(std::vector data) { - _start = 0; - _end = data.size(); - _blob = Blob(data.size() * sizeof(S)); - set(data, 0); - } - TypedArray(TypedArray* other) { - _start = other->_start; - _end = other->_end; - _blob = other->_blob; - } - - /** - * This is an index getter. - * Returns the element at the given numeric index. - */ - T get(unsigned long index) { - if (index >= getLength()) - return static_cast(0); - S retVal; - memcpy(&retVal, _blob._impl->data + (_start + index) * sizeof(S), sizeof(S)); - return retVal; - } - - /** - * This is an index setter. - * Sets the element at the given numeric index to the given value. - */ - void set(unsigned long index, T value) { - memcpy(_blob._impl->data + (_start + index) * sizeof(S), &value, sizeof(S)); - } - - /** - * Set multiple values, reading input values from the array. - * The optional offset value indicates the index in the current array where - * values are written. If omitted, it is assumed to be 0. - * If the input array is a TypedArray, the two arrays may use the same - * underlying ArrayBuffer. In this situation, setting the values takes place - * as if all the data is first copied into a temporary buffer that does not - * overlap either of the arrays, and then the data from the temporary buffer - * is copied into the current array. - * If the offset plus the length of the given array is out of range for the - * current TypedArray, an exception is raised. - */ - void set(TypedArray* value, unsigned long offset) { - if (!_blob) - return; - if (offset * sizeof(S) + value->getByteLength() > _blob._impl->size) - return; - - unsigned long otherOffset = value->_start * sizeof(S); - - // will this work if we use the same buffer? - memcpy(_blob._impl->data + (_start + offset) * sizeof(S), value->_blob._impl->data + otherOffset, value->getByteLength()); - } - - void set(TypedArray* value) { - set(value, 0); - } - - /** - * Set multiple values, reading input values from the array. - * The optional offset value indicates the index in the current array where - * values are written. If omitted, it is assumed to be 0. - * If the input array is a TypedArray, the two arrays may use the same - * underlying ArrayBuffer. In this situation, setting the values takes place - * as if all the data is first copied into a temporary buffer that does not - * overlap either of the arrays, and then the data from the temporary buffer - * is copied into the current array. - * If the offset plus the length of the given array is out of range for the - * current TypedArray, an exception is raised. - */ - void set(std::vector data, unsigned long offset) { - if (!_blob) - return; - if (data.size() + offset > _end) - return; - - if (sizeof(T) == sizeof(S)) { - memcpy(_blob._impl->data + offset, (void*)&data[0], data.size() * sizeof(S)); - } else { - S* buffer = (S*)malloc(data.size() * sizeof(S)); - typename std::vector::const_iterator dataIter = data.begin(); - unsigned long i = 0; - while(dataIter != data.end()) { - buffer[i] = *dataIter; - dataIter++; - i++; - } - memcpy(_blob._impl->data + offset, buffer, data.size() * sizeof(S)); - free (buffer); - } - } - - void set(std::vector data) { - set(data, 0); - } - - /** - * Returns a new TypedArray view of the ArrayBuffer store for this TypedArray, - * referencing the elements at begin, inclusive, up to end, exclusive. If - * either begin or end is negative, it refers to an index from the end of the - * array, as opposed to from the beginning. - * If end is unspecified, the subarray contains all elements from begin to the - * end of the TypedArray. - * The range specified by the begin and end values is clamped to the valid - * index range for the current array. If the computed length of the new - * TypedArray would be negative, it is clamped to zero. - * The returned TypedArray will be of the same type as the array on which this - * method is invoked. - */ - TypedArray* subarray(long begin, long end) { - if (!_blob) - return NULL; - unsigned int length = getLength(); - unsigned int realBegin = (begin + length) % length; - unsigned int realEnd = (end + length) % length; - if (realEnd == 0) - realEnd = length; - - if (realEnd < realBegin) - return NULL; - - return new TypedArray(_blob, realBegin * sizeof(S), realEnd - realBegin); - } - - TypedArray* subarray(long begin) { - if (!_blob) - return NULL; - return subarray(begin, getLength()); - } - - unsigned long getLength() { - if (!_blob) - return 0; - return _end - _start; - } - - unsigned long getByteLength() { - if (!_blob) - return 0; - return (_end - _start) * sizeof(S); - } - - unsigned long getByteOffset() { - if (!_blob) - return 0; - return _start * sizeof(S); - } - -}; - -/** - * Define actual types as template instances. - * First argument is representation from JavaScript, second type maybe smaller to - * exactly specify the byte width ot the TypedArray. - */ -typedef TypedArray Uint8Array; -typedef TypedArray Uint8ClampedArray; -typedef TypedArray Int8Array; -typedef TypedArray Int16Array; -typedef TypedArray Uint16Array; -typedef TypedArray Int32Array; -typedef TypedArray Uint32Array; -typedef TypedArray Float32Array; -typedef TypedArray Float64Array; - -} - -#endif /* end of include guard: TYPEDARRAY_H_99815BLY */ diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.cpp deleted file mode 100644 index 87e7966..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8DOM.h" - -namespace Arabica { -namespace DOM { - -V8DOM::V8DOM() { - nsInfo = NULL; - xpath = NULL; - storage = NULL; -} - -V8DOM::~V8DOM() { - if (nsInfo) - delete(nsInfo); - if (xpath) - delete(xpath); - if (storage) - delete(storage); -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.cpp.inc b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.cpp.inc new file mode 100644 index 0000000..a0d8ae6 --- /dev/null +++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.cpp.inc @@ -0,0 +1,9365 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 3.0.8 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ +template class SwigValueWrapper { + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } +}; + +template T SwigValueInit() { + return T(); +} +#endif + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + +#ifndef SWIG_V8_VERSION +#define SWIG_V8_VERSION 0x031110 +#endif + + +#include + +#include +#include +#include + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast(r) (r) +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (equiv != 0 && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = SWIG_TypeNameComp(nb, ne, tb, te); + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +} + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + size_t l = 0; + size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + char d = *(c++); + unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +/* --------------------------------------------------------------------------- + * These typedefs and defines are used to deal with v8 API changes + * + * ---------------------------------------------------------------------------*/ + +// First v8 version that uses "SetWeak" and not "MakeWeak" + +#define SWIGV8_SETWEAK_VERSION 0x032224 + +#if (SWIG_V8_VERSION < 0x031803) +#define SWIGV8_STRING_NEW2(cstr, len) v8::String::New(cstr, len) +#else +#define SWIGV8_STRING_NEW2(cstr, len) v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), cstr, v8::String::kNormalString, len) +#endif + +#if (SWIG_V8_VERSION < 0x031903) +typedef v8::Handle SwigV8ReturnValue; +typedef v8::Arguments SwigV8Arguments; +typedef v8::AccessorInfo SwigV8PropertyCallbackInfo; +#define SWIGV8_RETURN(val) return scope.Close(val) +#define SWIGV8_RETURN_INFO(val, info) return scope.Close(val) +#else +typedef void SwigV8ReturnValue; +typedef v8::FunctionCallbackInfo SwigV8Arguments; +typedef v8::PropertyCallbackInfo SwigV8PropertyCallbackInfo; +#define SWIGV8_RETURN(val) args.GetReturnValue().Set(val); return +#define SWIGV8_RETURN_INFO(val, info) info.GetReturnValue().Set(val); return +#endif + +#if (SWIG_V8_VERSION < 0x032117) +#define SWIGV8_HANDLESCOPE() v8::HandleScope scope +#define SWIGV8_HANDLESCOPE_ESC() v8::HandleScope scope +#define SWIGV8_ESCAPE(val) return scope.Close(val) +#elif (SWIG_V8_VERSION < 0x032224) +#define SWIGV8_HANDLESCOPE() v8::HandleScope scope(v8::Isolate::GetCurrent()); +#define SWIGV8_HANDLESCOPE_ESC() v8::HandleScope scope(v8::Isolate::GetCurrent()); +#define SWIGV8_ESCAPE(val) return scope.Close(val) +#else +#define SWIGV8_HANDLESCOPE() v8::HandleScope scope(v8::Isolate::GetCurrent()); +#define SWIGV8_HANDLESCOPE_ESC() v8::EscapableHandleScope scope(v8::Isolate::GetCurrent()); +#define SWIGV8_ESCAPE(val) return scope.Escape(val) +#endif + +#if (SWIG_V8_VERSION < 0x032224) +#define SWIGV8_ADJUST_MEMORY(size) v8::V8::AdjustAmountOfExternalAllocatedMemory(size) +#define SWIGV8_CURRENT_CONTEXT() v8::Context::GetCurrent() +#define SWIGV8_THROW_EXCEPTION(err) v8::ThrowException(err) +#define SWIGV8_STRING_NEW(str) v8::String::New(str) +#define SWIGV8_SYMBOL_NEW(sym) v8::String::NewSymbol(sym) +#else +#define SWIGV8_ADJUST_MEMORY(size) v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size) +#define SWIGV8_CURRENT_CONTEXT() v8::Isolate::GetCurrent()->GetCurrentContext() +#define SWIGV8_THROW_EXCEPTION(err) v8::Isolate::GetCurrent()->ThrowException(err) +#define SWIGV8_STRING_NEW(str) v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), str) +#define SWIGV8_SYMBOL_NEW(sym) v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), sym) +#endif + +#if (SWIG_V8_VERSION < 0x032318) +#define SWIGV8_ARRAY_NEW() v8::Array::New() +#define SWIGV8_BOOLEAN_NEW(bool) v8::Boolean::New(bool) +#define SWIGV8_EXTERNAL_NEW(val) v8::External::New(val) +#define SWIGV8_FUNCTEMPLATE_NEW(func) v8::FunctionTemplate::New(func) +#define SWIGV8_FUNCTEMPLATE_NEW_VOID() v8::FunctionTemplate::New() +#define SWIGV8_INT32_NEW(num) v8::Int32::New(num) +#define SWIGV8_INTEGER_NEW(num) v8::Integer::New(num) +#define SWIGV8_INTEGER_NEW_UNS(num) v8::Integer::NewFromUnsigned(num) +#define SWIGV8_NUMBER_NEW(num) v8::Number::New(num) +#define SWIGV8_OBJECT_NEW() v8::Object::New() +#define SWIGV8_UNDEFINED() v8::Undefined() +#define SWIGV8_NULL() v8::Null() +#else +#define SWIGV8_ARRAY_NEW() v8::Array::New(v8::Isolate::GetCurrent()) +#define SWIGV8_BOOLEAN_NEW(bool) v8::Boolean::New(v8::Isolate::GetCurrent(), bool) +#define SWIGV8_EXTERNAL_NEW(val) v8::External::New(v8::Isolate::GetCurrent(), val) +#define SWIGV8_FUNCTEMPLATE_NEW(func) v8::FunctionTemplate::New(v8::Isolate::GetCurrent(), func) +#define SWIGV8_FUNCTEMPLATE_NEW_VOID() v8::FunctionTemplate::New(v8::Isolate::GetCurrent()) +#define SWIGV8_INT32_NEW(num) v8::Int32::New(v8::Isolate::GetCurrent(), num) +#define SWIGV8_INTEGER_NEW(num) v8::Integer::New(v8::Isolate::GetCurrent(), num) +#define SWIGV8_INTEGER_NEW_UNS(num) v8::Integer::NewFromUnsigned(v8::Isolate::GetCurrent(), num) +#define SWIGV8_NUMBER_NEW(num) v8::Number::New(v8::Isolate::GetCurrent(), num) +#define SWIGV8_OBJECT_NEW() v8::Object::New(v8::Isolate::GetCurrent()) +#define SWIGV8_UNDEFINED() v8::Undefined(v8::Isolate::GetCurrent()) +#define SWIGV8_NULL() v8::Null(v8::Isolate::GetCurrent()) +#endif + +#if (SWIG_V8_VERSION < 0x031710) +#define SWIGV8_SET_CLASS_TEMPL(class_templ, class) class_templ = v8::Persistent::New(class); +#elif (SWIG_V8_VERSION < 0x031900) +#define SWIGV8_SET_CLASS_TEMPL(class_templ, class) class_templ = v8::Persistent::New(v8::Isolate::GetCurrent(), class); +#else +#define SWIGV8_SET_CLASS_TEMPL(class_templ, class) class_templ.Reset(v8::Isolate::GetCurrent(), class); +#endif + +/* --------------------------------------------------------------------------- + * Error handling + * + * ---------------------------------------------------------------------------*/ + +#define SWIG_Error(code, msg) SWIGV8_ErrorHandler.error(code, msg) +#define SWIG_exception(code, msg) SWIGV8_ErrorHandler.error(code, msg) +#define SWIG_fail goto fail +#define SWIGV8_OVERLOAD false + +SWIGINTERN void SWIG_V8_Raise(const char *msg) { + SWIGV8_THROW_EXCEPTION(v8::Exception::Error(SWIGV8_STRING_NEW(msg))); +} + +/* + Note: There are two contexts for handling errors. + A static V8ErrorHandler is used in not overloaded methods. + For overloaded methods the throwing type checking mechanism is used + during dispatching. As V8 exceptions can not be resetted properly + the trick is to use a dynamic ErrorHandler with same local name as the global + one. + + - See defintion of SWIG_Error above. + - See code templates 'JS_function_dispatcher', 'JS_functionwrapper_overload', + and 'JS_function_dispatch_case' in javascriptcode.swg + +*/ +class V8ErrorHandler { +public: + virtual ~V8ErrorHandler() {} + virtual void error(int code, const char *msg) { + SWIG_V8_Raise(msg); + } +}; +// this is used in usually +SWIGRUNTIME V8ErrorHandler SWIGV8_ErrorHandler; + +// instances of this are used in overloaded functions +class OverloadErrorHandler: public V8ErrorHandler { +public: + virtual void error(int code, const char *msg) { + err = v8::Exception::Error(SWIGV8_STRING_NEW(msg)); + if(code != SWIG_TypeError) { + SWIGV8_THROW_EXCEPTION(err); + } + } + v8::Handle err; +}; + +/* --------------------------------------------------------------------------- + * Basic Proxy object + * + * ---------------------------------------------------------------------------*/ + +// Note: to trigger the v8 gc more often one can tell v8 about the memory consumption +// TODO: we could add a v8 specific parameter to control this value +#define SWIGV8_AVG_OBJ_SIZE 1000 + +class SWIGV8_Proxy { +public: + SWIGV8_Proxy(): swigCMemOwn(false), swigCObject(0), info(0) { + SWIGV8_ADJUST_MEMORY(SWIGV8_AVG_OBJ_SIZE); + }; + + ~SWIGV8_Proxy() { +#if (SWIG_V8_VERSION < 0x031710) + handle.ClearWeak(); + handle.Dispose(); +#elif (SWIG_V8_VERSION < 0x032100) + handle.ClearWeak(v8::Isolate::GetCurrent()); + handle.Dispose(v8::Isolate::GetCurrent()); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + handle.ClearWeak(); + handle.Dispose(); +#else + handle.ClearWeak(); + handle.Reset(); +#endif + +#if (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + handle.Clear(); +#endif + + SWIGV8_ADJUST_MEMORY(-SWIGV8_AVG_OBJ_SIZE); + } + + bool swigCMemOwn; + void *swigCObject; + swig_type_info *info; + v8::Persistent handle; +}; + +class SWIGV8_ClientData { +public: + v8::Persistent class_templ; + +#if (SWIG_V8_VERSION < 0x031710) + void (*dtor) (v8::Persistent< v8::Value> object, void *parameter); +#elif (SWIG_V8_VERSION < 0x031900) + void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Value> object, void *parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy); +#else + void (*dtor) (const v8::WeakCallbackData &data); +#endif +}; + +SWIGRUNTIME v8::Persistent SWIGV8_SWIGTYPE_Proxy_class_templ; + +SWIGRUNTIME int SWIG_V8_ConvertInstancePtr(v8::Handle objRef, void **ptr, swig_type_info *info, int flags) { + SWIGV8_HANDLESCOPE(); + + if(objRef->InternalFieldCount() < 1) return SWIG_ERROR; + +#if (SWIG_V8_VERSION < 0x031511) + v8::Handle cdataRef = objRef->GetInternalField(0); + SWIGV8_Proxy *cdata = static_cast(v8::External::Unwrap(cdataRef)); +#else + SWIGV8_Proxy *cdata = static_cast(objRef->GetAlignedPointerFromInternalField(0)); +#endif + + if(cdata == NULL) { + return SWIG_ERROR; + } + if(cdata->info != info) { + swig_cast_info *tc = SWIG_TypeCheckStruct(cdata->info, info); + if (!tc && cdata->info->name) { + tc = SWIG_TypeCheck(cdata->info->name, info); + } + bool type_valid = tc != 0; + if(!type_valid) { + return SWIG_TypeError; + } + } + *ptr = cdata->swigCObject; + if(flags & SWIG_POINTER_DISOWN) { + cdata->swigCMemOwn = false; + } + return SWIG_OK; +} + + +#if (SWIG_V8_VERSION < 0x031710) +SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Persistent< v8::Value > object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) +SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Value > object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) +SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy) { +#else +SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackData &data) { + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + delete proxy; +} + +SWIGRUNTIME int SWIG_V8_GetInstancePtr(v8::Handle valRef, void **ptr) { + if(!valRef->IsObject()) { + return SWIG_TypeError; + } + v8::Handle objRef = valRef->ToObject(); + + if(objRef->InternalFieldCount() < 1) return SWIG_ERROR; + +#if (SWIG_V8_VERSION < 0x031511) + v8::Handle cdataRef = objRef->GetInternalField(0); + SWIGV8_Proxy *cdata = static_cast(v8::External::Unwrap(cdataRef)); +#else + SWIGV8_Proxy *cdata = static_cast(objRef->GetAlignedPointerFromInternalField(0)); +#endif + + if(cdata == NULL) { + return SWIG_ERROR; + } + + *ptr = cdata->swigCObject; + + return SWIG_OK; +} + +SWIGRUNTIME void SWIGV8_SetPrivateData(v8::Handle obj, void *ptr, swig_type_info *info, int flags) { + SWIGV8_Proxy *cdata = new SWIGV8_Proxy(); + cdata->swigCObject = ptr; + cdata->swigCMemOwn = (flags & SWIG_POINTER_OWN) ? 1 : 0; + cdata->info = info; + +#if (SWIG_V8_VERSION < 0x031511) + obj->SetPointerInInternalField(0, cdata); +#else + obj->SetAlignedPointerInInternalField(0, cdata); +#endif + +#if (SWIG_V8_VERSION < 0x031710) + cdata->handle = v8::Persistent::New(obj); +#elif (SWIG_V8_VERSION < 0x031900) + cdata->handle = v8::Persistent::New(v8::Isolate::GetCurrent(), obj); +#else + cdata->handle.Reset(v8::Isolate::GetCurrent(), obj); +#endif + +#if (SWIG_V8_VERSION < 0x031710) + // clientdata must be set for owned data as we need to register the dtor + if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) { + cdata->handle.MakeWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor); + } else { + cdata->handle.MakeWeak(cdata, SWIGV8_Proxy_DefaultDtor); + } +#elif (SWIG_V8_VERSION < 0x031918) + if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) { + cdata->handle.MakeWeak(v8::Isolate::GetCurrent(), cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor); + } else { + cdata->handle.MakeWeak(v8::Isolate::GetCurrent(), cdata, SWIGV8_Proxy_DefaultDtor); + } +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) { + cdata->handle.MakeWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor); + } else { + cdata->handle.MakeWeak(cdata, SWIGV8_Proxy_DefaultDtor); + } +#else + if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) { + cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor); + } else { + cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor); + } +#endif + +#if (SWIG_V8_VERSION < 0x031710) + cdata->handle.MarkIndependent(); +#elif (SWIG_V8_VERSION < 0x032100) + cdata->handle.MarkIndependent(v8::Isolate::GetCurrent()); +#else + cdata->handle.MarkIndependent(); +#endif + +} + +SWIGRUNTIME int SWIG_V8_ConvertPtr(v8::Handle valRef, void **ptr, swig_type_info *info, int flags) { + SWIGV8_HANDLESCOPE(); + + /* special case: JavaScript null => C NULL pointer */ + if(valRef->IsNull()) { + *ptr=0; + return SWIG_OK; + } + if(!valRef->IsObject()) { + return SWIG_TypeError; + } + v8::Handle objRef = valRef->ToObject(); + return SWIG_V8_ConvertInstancePtr(objRef, ptr, info, flags); +} + +SWIGRUNTIME v8::Handle SWIG_V8_NewPointerObj(void *ptr, swig_type_info *info, int flags) { + SWIGV8_HANDLESCOPE_ESC(); + + v8::Handle class_templ; + + if (ptr == NULL) { +#if (SWIG_V8_VERSION < 0x031903) + SWIGV8_ESCAPE(SWIGV8_NULL()); +#else + v8::Local result = SWIGV8_NULL(); + SWIGV8_ESCAPE(result); +#endif + } + +#if (SWIG_V8_VERSION < 0x031903) + if(info->clientdata != 0) { + class_templ = ((SWIGV8_ClientData*) info->clientdata)->class_templ; + } else { + class_templ = SWIGV8_SWIGTYPE_Proxy_class_templ; + } +#else + v8::Isolate *isolate = v8::Isolate::GetCurrent(); + + if(info->clientdata != 0) { + class_templ = v8::Local::New(isolate, ((SWIGV8_ClientData*) info->clientdata)->class_templ); + } else { + class_templ = v8::Local::New(isolate, SWIGV8_SWIGTYPE_Proxy_class_templ); + } +#endif + +// v8::Handle result = class_templ->InstanceTemplate()->NewInstance(); + v8::Local result = class_templ->InstanceTemplate()->NewInstance(); + SWIGV8_SetPrivateData(result, ptr, info, flags); + + SWIGV8_ESCAPE(result); +} + +#define SWIG_ConvertPtr(obj, ptr, info, flags) SWIG_V8_ConvertPtr(obj, ptr, info, flags) +#define SWIG_NewPointerObj(ptr, info, flags) SWIG_V8_NewPointerObj(ptr, info, flags) + +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_V8_ConvertInstancePtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(thisvalue, type, flags) SWIG_V8_NewPointerObj(thisvalue, type, flags) + +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_V8_ConvertPtr(obj, pptr, type, 0) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_V8_NewPointerObj(ptr, type, 0) + +#define SWIG_GetInstancePtr(obj, ptr) SWIG_V8_GetInstancePtr(obj, ptr) + +SWIGRUNTIME SwigV8ReturnValue _SWIGV8_wrap_equals(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + void *arg1 = (void *) 0 ; + void *arg2 = (void *) 0 ; + bool result; + int res1; + int res2; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for equals."); + + res1 = SWIG_GetInstancePtr(args.Holder(), &arg1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ERROR, "Could not get pointer from 'this' object for equals."); + } + res2 = SWIG_GetInstancePtr(args[0], &arg2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "equals" "', argument " "1"" of type '" "void *""'"); + } + + result = (bool)(arg1 == arg2); + jsresult = SWIGV8_BOOLEAN_NEW(result); + + SWIGV8_RETURN(jsresult); + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + +SWIGRUNTIME SwigV8ReturnValue _wrap_getCPtr(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + void *arg1 = (void *) 0 ; + long result; + int res1; + + res1 = SWIG_GetInstancePtr(args.Holder(), &arg1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getCPtr" "', argument " "1"" of type '" "void *""'"); + } + + result = (long)arg1; + jsresult = SWIGV8_NUMBER_NEW(result); + + SWIGV8_RETURN(jsresult); + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + +/* --------------------------------------------------------------------------- + * PackedData object + * + * ---------------------------------------------------------------------------*/ + +class SwigV8PackedData { +public: + SwigV8PackedData(void *data, size_t size, swig_type_info *type): data(data), size(size), type(type) {}; + + ~SwigV8PackedData() { + }; + + void *data; + size_t size; + swig_type_info *type; + + v8::Persistent handle; +}; + +SWIGRUNTIMEINLINE +int SwigV8Packed_Check(v8::Handle valRef) { + SWIGV8_HANDLESCOPE(); + + v8::Handle objRef = valRef->ToObject(); + if(objRef->InternalFieldCount() < 1) return false; + v8::Handle flag = objRef->GetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__")); + return (flag->IsBoolean() && flag->BooleanValue()); +} + +SWIGRUNTIME +swig_type_info *SwigV8Packed_UnpackData(v8::Handle valRef, void *ptr, size_t size) { + if (SwigV8Packed_Check(valRef)) { + SWIGV8_HANDLESCOPE(); + + SwigV8PackedData *sobj; + + v8::Handle objRef = valRef->ToObject(); + +#if (SWIG_V8_VERSION < 0x031511) + v8::Handle cdataRef = objRef->GetInternalField(0); + sobj = static_cast(v8::External::Unwrap(cdataRef)); +#else + sobj = static_cast(objRef->GetAlignedPointerFromInternalField(0)); +#endif + if (sobj == NULL || sobj->size != size) return 0; + memcpy(ptr, sobj->data, size); + return sobj->type; + } else { + return 0; + } +} + +SWIGRUNTIME +int SWIGV8_ConvertPacked(v8::Handle valRef, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = SwigV8Packed_UnpackData(valRef, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +#if (SWIG_V8_VERSION < 0x031710) +SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Persistent< v8::Value > object, void *parameter) { + SwigV8PackedData *cdata = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) +SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SwigV8PackedData *cdata = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) +SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persistent *object, SwigV8PackedData *cdata) { +#else +SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SwigV8PackedData *cdata = data.GetParameter(); +#endif + + delete cdata; + +#if (SWIG_V8_VERSION < 0x031710) + object.Clear(); + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Clear(); + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif +} + +SWIGRUNTIME +v8::Handle SWIGV8_NewPackedObj(void *data, size_t size, swig_type_info *type) { + SWIGV8_HANDLESCOPE_ESC(); + + SwigV8PackedData *cdata = new SwigV8PackedData(data, size, type); +// v8::Handle obj = SWIGV8_OBJECT_NEW(); + v8::Local obj = SWIGV8_OBJECT_NEW(); + + obj->SetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"), SWIGV8_BOOLEAN_NEW(true)); + +#if (SWIG_V8_VERSION < 0x031511) + obj->SetPointerInInternalField(0, cdata); +#else + obj->SetAlignedPointerInInternalField(0, cdata); +#endif + +#if (SWIG_V8_VERSION < 0x031710) + cdata->handle = v8::Persistent::New(obj); +#elif (SWIG_V8_VERSION < 0x031900) + cdata->handle = v8::Persistent::New(v8::Isolate::GetCurrent(), obj); +#else + cdata->handle.Reset(v8::Isolate::GetCurrent(), obj); +#endif + + +#if (SWIG_V8_VERSION < 0x031710) + cdata->handle.MakeWeak(cdata, _wrap_SwigV8PackedData_delete); +#elif (SWIG_V8_VERSION < 0x031918) + cdata->handle.MakeWeak(v8::Isolate::GetCurrent(), cdata, _wrap_SwigV8PackedData_delete); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + cdata->handle.MakeWeak(cdata, _wrap_SwigV8PackedData_delete); +#else + cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete); +// v8::V8::SetWeak(&cdata->handle, cdata, _wrap_SwigV8PackedData_delete); +#endif + +#if (SWIG_V8_VERSION < 0x031710) + cdata->handle.MarkIndependent(); +#elif (SWIG_V8_VERSION < 0x032100) + cdata->handle.MarkIndependent(v8::Isolate::GetCurrent()); +#else + cdata->handle.MarkIndependent(); +#endif + + SWIGV8_ESCAPE(obj); +} + +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIGV8_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIGV8_NewPackedObj(ptr, sz, type) + + +/* --------------------------------------------------------------------------- + * Support for IN/OUTPUT typemaps (see Lib/typemaps/inoutlist.swg) + * + * ---------------------------------------------------------------------------*/ + +SWIGRUNTIME + +#if (SWIG_V8_VERSION < 0x031903) +v8::Handle SWIGV8_AppendOutput(v8::Handle result, v8::Handle obj) { +#else +v8::Handle SWIGV8_AppendOutput(v8::Local result, v8::Handle obj) { +#endif + SWIGV8_HANDLESCOPE_ESC(); + + if (result->IsUndefined()) { + result = SWIGV8_ARRAY_NEW(); + } +#if (SWIG_V8_VERSION < 0x031903) + v8::Handle arr = v8::Handle::Cast(result); +#else + v8::Local arr = v8::Local::Cast(result); +#endif + arr->Set(arr->Length(), obj); + + SWIGV8_ESCAPE(arr); +} + + + +// Note: since 3.19 there are new CallBack types, since 03.21.9 the old ones have been removed +#if (SWIG_V8_VERSION < 0x031903) +typedef v8::InvocationCallback SwigV8FunctionCallback; +typedef v8::AccessorGetter SwigV8AccessorGetterCallback; +typedef v8::AccessorSetter SwigV8AccessorSetterCallback; +typedef v8::AccessorInfo SwigV8PropertyCallbackInfoVoid; +#else +typedef v8::FunctionCallback SwigV8FunctionCallback; +typedef v8::AccessorGetterCallback SwigV8AccessorGetterCallback; +typedef v8::AccessorSetterCallback SwigV8AccessorSetterCallback; +typedef v8::PropertyCallbackInfo SwigV8PropertyCallbackInfoVoid; +#endif + +/** + * Creates a class template for a class with specified initialization function. + */ +SWIGRUNTIME v8::Handle SWIGV8_CreateClassTemplate(const char* symbol) { + SWIGV8_HANDLESCOPE_ESC(); + + v8::Local class_templ = SWIGV8_FUNCTEMPLATE_NEW_VOID(); + class_templ->SetClassName(SWIGV8_SYMBOL_NEW(symbol)); + + v8::Handle inst_templ = class_templ->InstanceTemplate(); + inst_templ->SetInternalFieldCount(1); + + v8::Handle equals_templ = class_templ->PrototypeTemplate(); + equals_templ->Set(SWIGV8_SYMBOL_NEW("equals"), SWIGV8_FUNCTEMPLATE_NEW(_SWIGV8_wrap_equals)); + + v8::Handle cptr_templ = class_templ->PrototypeTemplate(); + cptr_templ->Set(SWIGV8_SYMBOL_NEW("getCPtr"), SWIGV8_FUNCTEMPLATE_NEW(_wrap_getCPtr)); + + SWIGV8_ESCAPE(class_templ); +} + +/** + * Registers a class method with given name for a given class template. + */ +SWIGRUNTIME void SWIGV8_AddMemberFunction(v8::Handle class_templ, const char* symbol, + SwigV8FunctionCallback _func) { + v8::Handle proto_templ = class_templ->PrototypeTemplate(); + proto_templ->Set(SWIGV8_SYMBOL_NEW(symbol), SWIGV8_FUNCTEMPLATE_NEW(_func)); +} + +/** + * Registers a class property with given name for a given class template. + */ +SWIGRUNTIME void SWIGV8_AddMemberVariable(v8::Handle class_templ, const char* symbol, + SwigV8AccessorGetterCallback getter, SwigV8AccessorSetterCallback setter) { + v8::Handle proto_templ = class_templ->InstanceTemplate(); + proto_templ->SetAccessor(SWIGV8_SYMBOL_NEW(symbol), getter, setter); +} + +/** + * Registers a class method with given name for a given object. + */ +SWIGRUNTIME void SWIGV8_AddStaticFunction(v8::Handle obj, const char* symbol, + const SwigV8FunctionCallback& _func) { + obj->Set(SWIGV8_SYMBOL_NEW(symbol), SWIGV8_FUNCTEMPLATE_NEW(_func)->GetFunction()); +} + +/** + * Registers a class method with given name for a given object. + */ +SWIGRUNTIME void SWIGV8_AddStaticVariable(v8::Handle obj, const char* symbol, + SwigV8AccessorGetterCallback getter, SwigV8AccessorSetterCallback setter) { + obj->SetAccessor(SWIGV8_SYMBOL_NEW(symbol), getter, setter); +} + +SWIGRUNTIME void JS_veto_set_variable(v8::Local property, v8::Local value, + const SwigV8PropertyCallbackInfoVoid& info) +{ + char buffer[256]; + char msg[512]; + int res; + + property->WriteUtf8(buffer, 256); + res = sprintf(msg, "Tried to write read-only variable: %s.", buffer); + + if(res<0) { + SWIG_exception(SWIG_ERROR, "Tried to write read-only variable."); + } else { + SWIG_exception(SWIG_ERROR, msg); + } +} + + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_Data swig_types[0] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr swig_types[1] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection swig_types[2] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData swig_types[3] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment swig_types[4] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocument swig_types[5] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentFragment swig_types[6] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType swig_types[7] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement swig_types[8] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity swig_types[9] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference swig_types[10] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException swig_types[11] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap swig_types[12] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode swig_types[13] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList swig_types[14] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation swig_types[15] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction swig_types[16] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText swig_types[17] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMTypeInfo swig_types[18] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMUserDataHandler swig_types[19] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__MemoryManager swig_types[20] +#define SWIGTYPE_p_bool swig_types[21] +#define SWIGTYPE_p_char swig_types[22] +#define SWIGTYPE_p_int16_t swig_types[23] +#define SWIGTYPE_p_int32_t swig_types[24] +#define SWIGTYPE_p_int64_t swig_types[25] +#define SWIGTYPE_p_namelist_t swig_types[26] +#define SWIGTYPE_p_params_t swig_types[27] +#define SWIGTYPE_p_size_t swig_types[28] +#define SWIGTYPE_p_ssize_t swig_types[29] +#define SWIGTYPE_p_std__listT_Data_t swig_types[30] +#define SWIGTYPE_p_std__multimapT_std__string_Data_t swig_types[31] +#define SWIGTYPE_p_uint16_t swig_types[32] +#define SWIGTYPE_p_uint32_t swig_types[33] +#define SWIGTYPE_p_uint64_t swig_types[34] +#define SWIGTYPE_p_unsigned_char swig_types[35] +#define SWIGTYPE_p_uscxml__ErrorEvent swig_types[36] +#define SWIGTYPE_p_uscxml__Event swig_types[37] +#define SWIGTYPE_p_void swig_types[38] +static swig_type_info *swig_types[40]; +static swig_module_info swig_module = {swig_types, 39, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + + + +#define SWIGVERSION 0x030008 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) (void *)((const void *)(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) + + +#include + + +SWIGINTERNINLINE +v8::Handle SWIG_From_int (int value) +{ + return SWIGV8_INT32_NEW(value); +} + + +#include + + +#include "xercesc/sax/InputSource.hpp" +#include "xercesc/sax/SAXException.hpp" +#include "xercesc/sax/SAXParseException.hpp" +#include "xercesc/sax/Locator.hpp" +#include "xercesc/sax/HandlerBase.hpp" +#include "xercesc/sax2/Attributes.hpp" +#include "xercesc/sax2/ContentHandler.hpp" +#include "xercesc/sax2/LexicalHandler.hpp" +#include "xercesc/sax2/DefaultHandler.hpp" +#include "xercesc/sax2/SAX2XMLReader.hpp" +#include "xercesc/sax2/XMLReaderFactory.hpp" +#include "xercesc/util/PlatformUtils.hpp" +#include "xercesc/util/TransService.hpp" +#include "xercesc/util/XMLString.hpp" +#include "xercesc/util/XMLUri.hpp" +#include "xercesc/util/QName.hpp" +#include "xercesc/util/HexBin.hpp" +#include "xercesc/util/Base64.hpp" +#include "xercesc/parsers/AbstractDOMParser.hpp" +#include "xercesc/parsers/XercesDOMParser.hpp" +#include "xercesc/parsers/SAXParser.hpp" +#include "xercesc/dom/DOM.hpp" +#include "xercesc/framework/LocalFileInputSource.hpp" +#include "xercesc/framework/MemBufInputSource.hpp" +#include "xercesc/framework/StdInInputSource.hpp" +#include "xercesc/framework/URLInputSource.hpp" +#include "xercesc/framework/XMLGrammarDescription.hpp" +#include "xercesc/framework/XMLDTDDescription.hpp" +#include "xercesc/framework/XMLSchemaDescription.hpp" +#include "xercesc/util/NameIdPool.hpp" +#include "xercesc/util/XMLEnumerator.hpp" +#include "xercesc/framework/XMLValidator.hpp" +#include "xercesc/validators/common/Grammar.hpp" +#include "xercesc/validators/DTD/DTDAttDef.hpp" +#include "xercesc/validators/DTD/DTDAttDefList.hpp" +#include "xercesc/validators/DTD/DTDGrammar.hpp" +#include "xercesc/validators/DTD/DTDValidator.hpp" +#include "xercesc/validators/schema/SchemaGrammar.hpp" +#include "xercesc/validators/schema/SchemaValidator.hpp" +#include "xercesc/validators/schema/SchemaAttDefList.hpp" +#include "xercesc/validators/schema/SchemaAttDef.hpp" +#include "xercesc/framework/XMLFormatter.hpp" +#include "xercesc/framework/MemBufFormatTarget.hpp" +#include "xercesc/framework/LocalFileFormatTarget.hpp" +#include "xercesc/framework/StdOutFormatTarget.hpp" +#include "xercesc/framework/Wrapper4InputSource.hpp" +#include "xercesc/framework/psvi/PSVIHandler.hpp" + +// for resolving XMLExceptions +#include "xercesc/util/ArrayIndexOutOfBoundsException.hpp" +#include "xercesc/util/EmptyStackException.hpp" +#include "xercesc/util/IllegalArgumentException.hpp" +#include "xercesc/util/InvalidCastException.hpp" +#include "xercesc/util/IOException.hpp" +#include "xercesc/util/NoSuchElementException.hpp" +#include "xercesc/util/NullPointerException.hpp" +#include "xercesc/util/NumberFormatException.hpp" +#include "xercesc/util/ParseException.hpp" +#include "xercesc/util/RuntimeException.hpp" +#include "xercesc/util/SchemaDateTimeException.hpp" +#include "xercesc/util/TranscodingException.hpp" +#include "xercesc/util/UnexpectedEOFException.hpp" +#include "xercesc/util/UnsupportedEncodingException.hpp" +#include "xercesc/util/UTFDataFormatException.hpp" +#include "xercesc/util/XMLNetAccessor.hpp" +#include "xercesc/internal/XSerializationException.hpp" +#include "xercesc/validators/datatype/InvalidDatatypeFacetException.hpp" +#include "xercesc/validators/datatype/InvalidDatatypeValueException.hpp" +#include "xercesc/validators/schema/identity/XPathException.hpp" + +XERCES_CPP_NAMESPACE_USE + +// we initialize the static UTF-8 transcoding info +// these are used by the typemaps to convert between +// Xerces internal UTF-16 and Perl's internal UTF-8 +static XMLCh* UTF8_ENCODING = NULL; +static XMLTranscoder* UTF8_TRANSCODER = NULL; + +static bool DEBUG_UTF8_OUT = 0; +static bool DEBUG_UTF8_IN = 0; + + + +SWIGINTERN +int SWIG_AsVal_double (v8::Handle obj, double *val) +{ + if(!obj->IsNumber()) { + return SWIG_TypeError; + } + if(val) *val = obj->NumberValue(); + + return SWIG_OK; +} + + +#include + + +#include + + +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; +} + + +SWIGINTERN +int SWIG_AsVal_long (v8::Handle obj, long* val) +{ + if (!obj->IsNumber()) { + return SWIG_TypeError; + } + if(val) *val = (long) obj->IntegerValue(); + + return SWIG_OK; +} + + +SWIGINTERN +int SWIG_AsVal_bool (v8::Handle obj, bool *val) +{ + if(!obj->IsBoolean()) { + return SWIG_ERROR; + } + + if (val) *val = obj->BooleanValue(); + return SWIG_OK; +} + + +SWIGINTERNINLINE +v8::Handle +SWIG_From_bool (bool value) +{ + return SWIGV8_BOOLEAN_NEW(value); +} + + +static swig_type_info * +DOMNode_dynamic_cast(void **ptr) { + DOMNode **nptr = (DOMNode **) ptr; + if (*nptr == NULL) { + return NULL; + } + short int type = (*nptr)->getNodeType(); + if (type == DOMNode::TEXT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText; + } + if (type == DOMNode::PROCESSING_INSTRUCTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction; + } + if (type == DOMNode::DOCUMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocument; + } + if (type == DOMNode::ELEMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement; + } + if (type == DOMNode::ENTITY_REFERENCE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference; + } + if (type == DOMNode::CDATA_SECTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection; + } + if (type == DOMNode::CDATA_SECTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection; + } + if (type == DOMNode::COMMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment; + } + if (type == DOMNode::DOCUMENT_TYPE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType; + } + if (type == DOMNode::ENTITY_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity; + } + if (type == DOMNode::ATTRIBUTE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr; + } + if (type == DOMNode::NOTATION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation; + } + return NULL; +} + + +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +SWIGINTERN int +SWIG_AsVal_short (v8::Handle obj, short *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < SHRT_MIN || v > SHRT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (short)(v); + } + } + return res; +} + + +SWIGINTERNINLINE +v8::Handle SWIG_From_long (long value) +{ + return SWIGV8_NUMBER_NEW(value); +} + + +SWIGINTERNINLINE v8::Handle +SWIG_From_short (short value) +{ + return SWIG_From_long (value); +} + + +SWIGINTERNINLINE +v8::Handle SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > LONG_MAX) ? + SWIGV8_INTEGER_NEW_UNS(value) : SWIGV8_INTEGER_NEW((long)(value)); +} + + +SWIGINTERNINLINE v8::Handle +SWIG_From_size_t (size_t value) +{ + return SWIG_From_unsigned_SS_long ((unsigned long)(value)); +} + + +SWIGINTERN +int SWIG_AsVal_unsigned_SS_long (v8::Handle obj, unsigned long *val) +{ + if(!obj->IsNumber()) { + return SWIG_TypeError; + } + + long longVal = (long) obj->NumberValue(); + + if(longVal < 0) { + return SWIG_OverflowError; + } + + if(val) *val = longVal; + + return SWIG_OK; +} + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t (v8::Handle obj, size_t *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); + return res; +} + + +using uscxml::Data; + + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERN int +SWIG_AsCharPtrAndSize(v8::Handle valRef, char** cptr, size_t* psize, int *alloc) +{ + if(valRef->IsString()) { + v8::Handle js_str = valRef->ToString(); + + size_t len = js_str->Utf8Length() + 1; + char* cstr = new char[len]; + js_str->WriteUtf8(cstr, len); + + if(alloc) *alloc = SWIG_NEWOBJ; + if(psize) *psize = len; + if(cptr) *cptr = cstr; + + return SWIG_OK; + } else { + if(valRef->IsObject()) { + v8::Handle obj = valRef->ToObject(); + // try if the object is a wrapped char[] + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + return SWIG_TypeError; + } else { + return SWIG_TypeError; + } + } +} + + +SWIGINTERN int +SWIG_AsPtr_std_string (v8::Handle obj, std::string **val) +{ + char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; + if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { + if (buf) { + if (val) *val = new std::string(buf, size - 1); + if (alloc == SWIG_NEWOBJ) delete[] buf; + return SWIG_NEWOBJ; + } else { + if (val) *val = 0; + return SWIG_OLDOBJ; + } + } else { + static int init = 0; + static swig_type_info* descriptor = 0; + if (!init) { + descriptor = SWIG_TypeQuery("std::string" " *"); + init = 1; + } + if (descriptor) { + std::string *vptr; + int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); + if (SWIG_IsOK(res) && val) *val = vptr; + return res; + } + } + return SWIG_ERROR; +} + + +SWIGINTERN +int SWIG_AsVal_int (v8::Handle valRef, int* val) +{ + if (!valRef->IsNumber()) { + return SWIG_TypeError; + } + if(val) *val = valRef->IntegerValue(); + + return SWIG_OK; +} + + +SWIGINTERNINLINE v8::Handle +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > INT_MAX) { + // TODO: handle extra long strings + return SWIGV8_UNDEFINED(); + } else { + v8::Handle js_str = SWIGV8_STRING_NEW2(carray, size); + return js_str; + } + } else { + return SWIGV8_UNDEFINED(); + } +} + + +SWIGINTERNINLINE v8::Handle +SWIG_From_std_string (const std::string& s) +{ + return SWIG_FromCharPtrAndSize(s.data(), s.size()); +} + + +#define SWIGV8_INIT V8DOM_initialize + + +SWIGV8_ClientData _exports_DOMException_clientData; +SWIGV8_ClientData _exports_DOMNode_clientData; +SWIGV8_ClientData _exports_DOMAttr_clientData; +SWIGV8_ClientData _exports_DOMElement_clientData; +SWIGV8_ClientData _exports_DOMEntity_clientData; +SWIGV8_ClientData _exports_DOMDocumentType_clientData; +SWIGV8_ClientData _exports_DOMCharacterData_clientData; +SWIGV8_ClientData _exports_DOMComment_clientData; +SWIGV8_ClientData _exports_DOMText_clientData; +SWIGV8_ClientData _exports_DOMCDATASection_clientData; +SWIGV8_ClientData _exports_DOMNodeList_clientData; +SWIGV8_ClientData _exports_DOMNamedNodeMap_clientData; +SWIGV8_ClientData _exports_DOMDocumentFragment_clientData; +SWIGV8_ClientData _exports_DOMEntityReference_clientData; +SWIGV8_ClientData _exports_DOMNotation_clientData; +SWIGV8_ClientData _exports_DOMProcessingInstruction_clientData; +SWIGV8_ClientData _exports_Event_clientData; +SWIGV8_ClientData _exports_ErrorEvent_clientData; + + +static SwigV8ReturnValue _wrap_XERCES_HAS_CPP_NAMESPACE(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(1)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static void _wrap_DEBUG_UTF8_OUT_set(v8::Local property, v8::Local value, + const SwigV8PropertyCallbackInfoVoid &info) { + SWIGV8_HANDLESCOPE(); + + bool arg1 ; + bool val1 ; + int ecode1 = 0 ; + + ecode1 = SWIG_AsVal_bool(value, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DEBUG_UTF8_OUT_set" "', argument " "1"" of type '" "bool""'"); + } + arg1 = (bool)(val1); + DEBUG_UTF8_OUT = arg1; + + + goto fail; +fail: + return; +} + + +static SwigV8ReturnValue _wrap_DEBUG_UTF8_OUT_get(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + bool result; + + result = (bool)DEBUG_UTF8_OUT; + jsresult = SWIG_From_bool((bool)(result)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static void _wrap_DEBUG_UTF8_IN_set(v8::Local property, v8::Local value, + const SwigV8PropertyCallbackInfoVoid &info) { + SWIGV8_HANDLESCOPE(); + + bool arg1 ; + bool val1 ; + int ecode1 = 0 ; + + ecode1 = SWIG_AsVal_bool(value, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DEBUG_UTF8_IN_set" "', argument " "1"" of type '" "bool""'"); + } + arg1 = (bool)(val1); + DEBUG_UTF8_IN = arg1; + + + goto fail; +fail: + return; +} + + +static SwigV8ReturnValue _wrap_DEBUG_UTF8_IN_get(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + bool result; + + result = (bool)DEBUG_UTF8_IN; + jsresult = SWIG_From_bool((bool)(result)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_INDEX_SIZE_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::INDEX_SIZE_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_DOMSTRING_SIZE_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::DOMSTRING_SIZE_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_HIERARCHY_REQUEST_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::HIERARCHY_REQUEST_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_WRONG_DOCUMENT_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::WRONG_DOCUMENT_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_CHARACTER_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::INVALID_CHARACTER_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_NO_DATA_ALLOWED_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::NO_DATA_ALLOWED_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_NO_MODIFICATION_ALLOWED_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::NO_MODIFICATION_ALLOWED_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_NOT_FOUND_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::NOT_FOUND_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_NOT_SUPPORTED_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::NOT_SUPPORTED_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_INUSE_ATTRIBUTE_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::INUSE_ATTRIBUTE_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_STATE_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::INVALID_STATE_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_SYNTAX_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::SYNTAX_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_MODIFICATION_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::INVALID_MODIFICATION_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_NAMESPACE_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::NAMESPACE_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_ACCESS_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::INVALID_ACCESS_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_VALIDATION_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::VALIDATION_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMException_TYPE_MISMATCH_ERR(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMException::TYPE_MISMATCH_ERR)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_new_DOMException__SWIG_0(const SwigV8Arguments &args, V8ErrorHandler &SWIGV8_ErrorHandler) { + SWIGV8_HANDLESCOPE(); + + v8::Handle self = args.Holder(); + short arg1 ; + short arg2 ; + XERCES_CPP_NAMESPACE::MemoryManager *arg3 = (XERCES_CPP_NAMESPACE::MemoryManager *) (XERCES_CPP_NAMESPACE::MemoryManager *)0 ; + short val1 ; + int ecode1 = 0 ; + short val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + XERCES_CPP_NAMESPACE::DOMException *result; + if(args.Length() != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_new_DOMException__SWIG_0."); + ecode1 = SWIG_AsVal_short(args[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DOMException" "', argument " "1"" of type '" "short""'"); + } + arg1 = (short)(val1); + ecode2 = SWIG_AsVal_short(args[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DOMException" "', argument " "2"" of type '" "short""'"); + } + arg2 = (short)(val2); + res3 = SWIG_ConvertPtr(args[2], &argp3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__MemoryManager, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DOMException" "', argument " "3"" of type '" "XERCES_CPP_NAMESPACE::MemoryManager *const""'"); + } + arg3 = (XERCES_CPP_NAMESPACE::MemoryManager *)(argp3); + result = (XERCES_CPP_NAMESPACE::DOMException *)new XERCES_CPP_NAMESPACE::DOMException(arg1,arg2,arg3); + + + + + + + SWIGV8_SetPrivateData(self, result, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, SWIG_POINTER_OWN); + SWIGV8_RETURN(self); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_DOMException__SWIG_1(const SwigV8Arguments &args, V8ErrorHandler &SWIGV8_ErrorHandler) { + SWIGV8_HANDLESCOPE(); + + v8::Handle self = args.Holder(); + short arg1 ; + short arg2 ; + short val1 ; + int ecode1 = 0 ; + short val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMException *result; + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_new_DOMException__SWIG_1."); + ecode1 = SWIG_AsVal_short(args[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DOMException" "', argument " "1"" of type '" "short""'"); + } + arg1 = (short)(val1); + ecode2 = SWIG_AsVal_short(args[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DOMException" "', argument " "2"" of type '" "short""'"); + } + arg2 = (short)(val2); + result = (XERCES_CPP_NAMESPACE::DOMException *)new XERCES_CPP_NAMESPACE::DOMException(arg1,arg2); + + + + + + SWIGV8_SetPrivateData(self, result, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, SWIG_POINTER_OWN); + SWIGV8_RETURN(self); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_DOMException__SWIG_2(const SwigV8Arguments &args, V8ErrorHandler &SWIGV8_ErrorHandler) { + SWIGV8_HANDLESCOPE(); + + v8::Handle self = args.Holder(); + short arg1 ; + short val1 ; + int ecode1 = 0 ; + XERCES_CPP_NAMESPACE::DOMException *result; + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_new_DOMException__SWIG_2."); + ecode1 = SWIG_AsVal_short(args[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DOMException" "', argument " "1"" of type '" "short""'"); + } + arg1 = (short)(val1); + result = (XERCES_CPP_NAMESPACE::DOMException *)new XERCES_CPP_NAMESPACE::DOMException(arg1); + + + + + SWIGV8_SetPrivateData(self, result, SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, SWIG_POINTER_OWN); + SWIGV8_RETURN(self); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_DOMException(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + OverloadErrorHandler errorHandler; + v8::Handle self; + + // switch all cases by means of series of if-returns. + + if(args.Length() == 3) { + errorHandler.err.Clear(); +#if (SWIG_V8_VERSION < 0x031903) + self = _wrap_new_DOMException__SWIG_0(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + SWIGV8_ESCAPE(self); + } +#else + _wrap_new_DOMException__SWIG_0(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + return; + } +#endif + } + + if(args.Length() == 2) { + errorHandler.err.Clear(); +#if (SWIG_V8_VERSION < 0x031903) + self = _wrap_new_DOMException__SWIG_1(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + SWIGV8_ESCAPE(self); + } +#else + _wrap_new_DOMException__SWIG_1(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + return; + } +#endif + } + + if(args.Length() == 1) { + errorHandler.err.Clear(); +#if (SWIG_V8_VERSION < 0x031903) + self = _wrap_new_DOMException__SWIG_2(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + SWIGV8_ESCAPE(self); + } +#else + _wrap_new_DOMException__SWIG_2(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + return; + } +#endif + } + + + // default: + SWIG_exception_fail(SWIG_ERROR, "Illegal arguments for construction of _exports_DOMException"); + +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMException(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMException(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMException(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMException(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMException * arg1 = (XERCES_CPP_NAMESPACE::DOMException *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_DOMException_getMessage(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMException_getMessage."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_getMessage" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMException const *)arg1)->getMessage(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static void _wrap_DOMException_code_set(v8::Local property, v8::Local value, + const SwigV8PropertyCallbackInfoVoid &info) { + SWIGV8_HANDLESCOPE(); + + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + short arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + short val2 ; + int ecode2 = 0 ; + + res1 = SWIG_ConvertPtr(info.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_code_set" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + ecode2 = SWIG_AsVal_short(value, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMException_code_set" "', argument " "2"" of type '" "short""'"); + } + arg2 = (short)(val2); + if (arg1) (arg1)->code = arg2; + + + + goto fail; +fail: + return; +} + + +static SwigV8ReturnValue _wrap_DOMException_code_get(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + short result; + + res1 = SWIG_ConvertPtr(info.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_code_get" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + result = (short) ((arg1)->code); + jsresult = SWIG_From_short((short)(result)); + + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static void _wrap_DOMException_msg_set(v8::Local property, v8::Local value, + const SwigV8PropertyCallbackInfoVoid &info) { + SWIGV8_HANDLESCOPE(); + + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + res1 = SWIG_ConvertPtr(info.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_msg_set" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + + arg2 = JS2XMLString(value); + + if (arg1) (arg1)->msg = (XMLCh const *)arg2; + + + delete[] arg2; + + + goto fail; +fail: + return; +} + + +static SwigV8ReturnValue _wrap_DOMException_msg_get(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + res1 = SWIG_ConvertPtr(info.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMException_msg_get" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMException *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMException *)(argp1); + result = (XMLCh *) ((arg1)->msg); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMNode(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMNode(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMNode(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMNode(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMNode * arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_ELEMENT_NODE(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::ELEMENT_NODE)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_ATTRIBUTE_NODE(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::ATTRIBUTE_NODE)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_TEXT_NODE(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::TEXT_NODE)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_CDATA_SECTION_NODE(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::CDATA_SECTION_NODE)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_ENTITY_REFERENCE_NODE(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::ENTITY_REFERENCE_NODE)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_ENTITY_NODE(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::ENTITY_NODE)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_PROCESSING_INSTRUCTION_NODE(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::PROCESSING_INSTRUCTION_NODE)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_COMMENT_NODE(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::COMMENT_NODE)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_NODE(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_NODE)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_TYPE_NODE(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_TYPE_NODE)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_FRAGMENT_NODE(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_FRAGMENT_NODE)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_NOTATION_NODE(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::NOTATION_NODE)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_DISCONNECTED(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_DISCONNECTED)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_PRECEDING(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_PRECEDING)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_FOLLOWING(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_FOLLOWING)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_CONTAINS(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_CONTAINS)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_CONTAINED_BY(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_CONTAINED_BY)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getNodeName(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNodeName."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNodeName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNodeName(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getNodeValue(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNodeValue."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNodeValue" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNodeValue(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getNodeType(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode::NodeType result; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNodeType."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNodeType" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode::NodeType)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNodeType(); + jsresult = SWIG_From_int((int)(result)); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getParentNode(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getParentNode."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getParentNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getParentNode(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getChildNodes(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNodeList *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getChildNodes."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getChildNodes" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNodeList *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getChildNodes(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getFirstChild(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getFirstChild."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getFirstChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getFirstChild(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getLastChild(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getLastChild."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getLastChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getLastChild(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getPreviousSibling(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getPreviousSibling."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getPreviousSibling" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getPreviousSibling(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getNextSibling(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNextSibling."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNextSibling" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNextSibling(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getAttributes(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getAttributes."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getAttributes" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getAttributes(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getOwnerDocument(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMDocument *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getOwnerDocument."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getOwnerDocument" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMDocument *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getOwnerDocument(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocument, 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_cloneNode(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_cloneNode."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_cloneNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + ecode2 = SWIG_AsVal_bool(args[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMNode_cloneNode" "', argument " "2"" of type '" "bool""'"); + } + arg2 = (bool)(val2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->cloneNode(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_insertBefore(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg3 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_insertBefore."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_insertBefore" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_insertBefore" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + res3 = SWIG_ConvertPtr(args[1], &argp3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DOMNode_insertBefore" "', argument " "3"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg3 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp3); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->insertBefore(arg2,arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_replaceChild(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg3 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_replaceChild."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_replaceChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_replaceChild" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + res3 = SWIG_ConvertPtr(args[1], &argp3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DOMNode_replaceChild" "', argument " "3"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg3 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp3); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->replaceChild(arg2,arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_removeChild(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_removeChild."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_removeChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_removeChild" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->removeChild(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_appendChild(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_appendChild."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_appendChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_appendChild" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->appendChild(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_hasChildNodes(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_hasChildNodes."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_hasChildNodes" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->hasChildNodes(); + jsresult = SWIG_From_bool((bool)(result)); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_setNodeValue(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_setNodeValue."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_setNodeValue" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(args[0]); + + (arg1)->setNodeValue((XMLCh const *)arg2); + jsresult = SWIGV8_UNDEFINED(); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_normalize(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_normalize."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_normalize" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + (arg1)->normalize(); + jsresult = SWIGV8_UNDEFINED(); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_isSupported(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_isSupported."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_isSupported" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(args[0]); + + + arg3 = JS2XMLString(args[1]); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isSupported((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_From_bool((bool)(result)); + + + delete[] arg2; + + + delete[] arg3; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getNamespaceURI(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getNamespaceURI."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getNamespaceURI" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNamespaceURI(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getLocalName(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getLocalName."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getLocalName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getLocalName(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_setPrefix(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_setPrefix."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_setPrefix" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(args[0]); + + (arg1)->setPrefix((XMLCh const *)arg2); + jsresult = SWIGV8_UNDEFINED(); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_hasAttributes(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_hasAttributes."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_hasAttributes" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->hasAttributes(); + jsresult = SWIG_From_bool((bool)(result)); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_isSameNode(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool result; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_isSameNode."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_isSameNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_isSameNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isSameNode((XERCES_CPP_NAMESPACE::DOMNode const *)arg2); + jsresult = SWIG_From_bool((bool)(result)); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_isEqualNode(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool result; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_isEqualNode."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_isEqualNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_isEqualNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isEqualNode((XERCES_CPP_NAMESPACE::DOMNode const *)arg2); + jsresult = SWIG_From_bool((bool)(result)); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_setUserData(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *arg3 = (void *) 0 ; + XERCES_CPP_NAMESPACE::DOMUserDataHandler *arg4 = (XERCES_CPP_NAMESPACE::DOMUserDataHandler *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *result = 0 ; + + if(args.Length() != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_setUserData."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_setUserData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(args[0]); + + res3 = SWIG_ConvertPtr(args[1],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DOMNode_setUserData" "', argument " "3"" of type '" "void *""'"); + } + res4 = SWIG_ConvertPtr(args[2], &argp4,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DOMNode_setUserData" "', argument " "4"" of type '" "XERCES_CPP_NAMESPACE::DOMUserDataHandler *""'"); + } + arg4 = (XERCES_CPP_NAMESPACE::DOMUserDataHandler *)(argp4); + result = (void *)(arg1)->setUserData((XMLCh const *)arg2,arg3,arg4); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + + + delete[] arg2; + + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getUserData(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getUserData."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getUserData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(args[0]); + + result = (void *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getUserData((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getBaseURI(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getBaseURI."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getBaseURI" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getBaseURI(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_compareDocumentPosition(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + short result; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_compareDocumentPosition."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_compareDocumentPosition" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNode_compareDocumentPosition" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (short)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->compareDocumentPosition((XERCES_CPP_NAMESPACE::DOMNode const *)arg2); + jsresult = SWIG_From_short((short)(result)); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getTextContent(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getTextContent."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getTextContent" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getTextContent(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_setTextContent(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_setTextContent."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_setTextContent" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(args[0]); + + (arg1)->setTextContent((XMLCh const *)arg2); + jsresult = SWIGV8_UNDEFINED(); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_lookupPrefix(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_lookupPrefix."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_lookupPrefix" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(args[0]); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->lookupPrefix((XMLCh const *)arg2); + + jsresult = XMLString2JS(result); + + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_isDefaultNamespace(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_isDefaultNamespace."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_isDefaultNamespace" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(args[0]); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isDefaultNamespace((XMLCh const *)arg2); + jsresult = SWIG_From_bool((bool)(result)); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_lookupNamespaceURI(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_lookupNamespaceURI."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_lookupNamespaceURI" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(args[0]); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->lookupNamespaceURI((XMLCh const *)arg2); + + jsresult = XMLString2JS(result); + + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_getFeature(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *result = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_getFeature."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_getFeature" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + + arg2 = JS2XMLString(args[0]); + + + arg3 = JS2XMLString(args[1]); + + result = (void *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getFeature((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNode_release(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNode_release."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNode_release" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp1); + (arg1)->release(); + jsresult = SWIGV8_UNDEFINED(); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_veto_DOMNode(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMNode can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMAttr(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMAttr(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMAttr(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMAttr(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMAttr * arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_DOMAttr_getName(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getName."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getName(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMAttr_getSpecified(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getSpecified."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getSpecified" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getSpecified(); + jsresult = SWIG_From_bool((bool)(result)); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMAttr_getValue(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getValue."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getValue" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getValue(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMAttr_setValue(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_setValue."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_setValue" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + + arg2 = JS2XMLString(args[0]); + + (arg1)->setValue((XMLCh const *)arg2); + jsresult = SWIGV8_UNDEFINED(); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMAttr_getOwnerElement(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getOwnerElement."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getOwnerElement" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getOwnerElement(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMAttr_isId(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_isId."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_isId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->isId(); + jsresult = SWIG_From_bool((bool)(result)); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMAttr_getSchemaTypeInfo(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMTypeInfo *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMAttr_getSchemaTypeInfo."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMAttr_getSchemaTypeInfo" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMTypeInfo *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getSchemaTypeInfo(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMTypeInfo, 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_veto_DOMAttr(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMAttr can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMElement(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMElement(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMElement(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMElement(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMElement * arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_DOMElement_getTagName(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getTagName."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getTagName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getTagName(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_getAttribute(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getAttribute."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttribute((XMLCh const *)arg2); + + jsresult = XMLString2JS(result); + + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_getAttributeNode(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getAttributeNode."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getAttributeNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + result = (XERCES_CPP_NAMESPACE::DOMAttr *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttributeNode((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_getElementsByTagName(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNodeList *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getElementsByTagName."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getElementsByTagName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + result = (XERCES_CPP_NAMESPACE::DOMNodeList *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getElementsByTagName((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_setAttribute(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setAttribute."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + + arg3 = JS2XMLString(args[1]); + + (arg1)->setAttribute((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIGV8_UNDEFINED(); + + + delete[] arg2; + + + delete[] arg3; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_setAttributeNode(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setAttributeNode."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setAttributeNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMElement_setAttributeNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMAttr *)(arg1)->setAttributeNode(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_removeAttributeNode(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_removeAttributeNode."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_removeAttributeNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMElement_removeAttributeNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMAttr *)(arg1)->removeAttributeNode(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_removeAttribute(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_removeAttribute."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_removeAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + (arg1)->removeAttribute((XMLCh const *)arg2); + jsresult = SWIGV8_UNDEFINED(); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_getAttributeNS(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getAttributeNS."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + + arg3 = JS2XMLString(args[1]); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + + jsresult = XMLString2JS(result); + + + + delete[] arg2; + + + delete[] arg3; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_setAttributeNS(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + XMLCh *arg4 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if(args.Length() != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setAttributeNS."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + + arg3 = JS2XMLString(args[1]); + + + arg4 = JS2XMLString(args[2]); + + (arg1)->setAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3,(XMLCh const *)arg4); + jsresult = SWIGV8_UNDEFINED(); + + + delete[] arg2; + + + delete[] arg3; + + + delete[] arg4; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_removeAttributeNS(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_removeAttributeNS."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_removeAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + + arg3 = JS2XMLString(args[1]); + + (arg1)->removeAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIGV8_UNDEFINED(); + + + delete[] arg2; + + + delete[] arg3; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_getAttributeNodeNS(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getAttributeNodeNS."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getAttributeNodeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + + arg3 = JS2XMLString(args[1]); + + result = (XERCES_CPP_NAMESPACE::DOMAttr *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttributeNodeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_setAttributeNodeNS(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setAttributeNodeNS."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setAttributeNodeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMElement_setAttributeNodeNS" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMAttr *)(arg1)->setAttributeNodeNS(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_getElementsByTagNameNS(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNodeList *result = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getElementsByTagNameNS."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getElementsByTagNameNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + + arg3 = JS2XMLString(args[1]); + + result = (XERCES_CPP_NAMESPACE::DOMNodeList *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getElementsByTagNameNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_hasAttribute(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_hasAttribute."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_hasAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->hasAttribute((XMLCh const *)arg2); + jsresult = SWIG_From_bool((bool)(result)); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_hasAttributeNS(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_hasAttributeNS."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_hasAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + + arg3 = JS2XMLString(args[1]); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->hasAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_From_bool((bool)(result)); + + + delete[] arg2; + + + delete[] arg3; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_setIdAttribute(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val3 ; + int ecode3 = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setIdAttribute."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setIdAttribute" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + ecode3 = SWIG_AsVal_bool(args[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMElement_setIdAttribute" "', argument " "3"" of type '" "bool""'"); + } + arg3 = (bool)(val3); + (arg1)->setIdAttribute((XMLCh const *)arg2,arg3); + jsresult = SWIGV8_UNDEFINED(); + + + delete[] arg2; + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_setIdAttributeNS(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val4 ; + int ecode4 = 0 ; + + if(args.Length() != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setIdAttributeNS."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setIdAttributeNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + + arg2 = JS2XMLString(args[0]); + + + arg3 = JS2XMLString(args[1]); + + ecode4 = SWIG_AsVal_bool(args[2], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DOMElement_setIdAttributeNS" "', argument " "4"" of type '" "bool""'"); + } + arg4 = (bool)(val4); + (arg1)->setIdAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3,arg4); + jsresult = SWIGV8_UNDEFINED(); + + + delete[] arg2; + + + delete[] arg3; + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_setIdAttributeNode(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_setIdAttributeNode."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_setIdAttributeNode" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMElement_setIdAttributeNode" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMAttr const *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *)(argp2); + ecode3 = SWIG_AsVal_bool(args[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMElement_setIdAttributeNode" "', argument " "3"" of type '" "bool""'"); + } + arg3 = (bool)(val3); + (arg1)->setIdAttributeNode((XERCES_CPP_NAMESPACE::DOMAttr const *)arg2,arg3); + jsresult = SWIGV8_UNDEFINED(); + + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_getSchemaTypeInfo(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMTypeInfo *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getSchemaTypeInfo."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getSchemaTypeInfo" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMTypeInfo *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getSchemaTypeInfo(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMTypeInfo, 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_getFirstElementChild(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getFirstElementChild."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getFirstElementChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getFirstElementChild(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_getLastElementChild(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getLastElementChild."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getLastElementChild" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getLastElementChild(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_getPreviousElementSibling(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getPreviousElementSibling."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getPreviousElementSibling" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getPreviousElementSibling(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_getNextElementSibling(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getNextElementSibling."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getNextElementSibling" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getNextElementSibling(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMElement_getChildElementCount(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLSize_t result; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMElement_getChildElementCount."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMElement_getChildElementCount" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMElement const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMElement *)(argp1); + result = ((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getChildElementCount(); + jsresult = SWIG_From_size_t((size_t)(result)); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_veto_DOMElement(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMElement can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMEntity(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMEntity(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMEntity(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMEntity(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMEntity * arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_DOMEntity_getPublicId(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getPublicId."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getPublicId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getPublicId(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMEntity_getSystemId(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getSystemId."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getSystemId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getSystemId(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMEntity_getNotationName(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getNotationName."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getNotationName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getNotationName(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMEntity_getInputEncoding(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getInputEncoding."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getInputEncoding" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getInputEncoding(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMEntity_getXmlEncoding(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getXmlEncoding."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getXmlEncoding" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getXmlEncoding(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMEntity_getXmlVersion(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMEntity_getXmlVersion."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMEntity_getXmlVersion" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMEntity const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getXmlVersion(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_veto_DOMEntity(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMEntity can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMDocumentType(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMDocumentType(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMDocumentType(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMDocumentType(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMDocumentType * arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_DOMDocumentType_getName(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getName."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getName" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getName(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMDocumentType_getEntities(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getEntities."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getEntities" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getEntities(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMDocumentType_getNotations(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getNotations."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getNotations" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getNotations(); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMDocumentType_getPublicId(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getPublicId."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getPublicId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getPublicId(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMDocumentType_getSystemId(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getSystemId."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getSystemId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getSystemId(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMDocumentType_getInternalSubset(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMDocumentType_getInternalSubset."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMDocumentType_getInternalSubset" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMDocumentType const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getInternalSubset(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_veto_DOMDocumentType(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMDocumentType can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMCharacterData(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMCharacterData(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMCharacterData(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMCharacterData(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMCharacterData * arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_DOMCharacterData_getData(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_getData."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_getData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMCharacterData const *)arg1)->getData(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMCharacterData_getLength(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLSize_t result; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_getLength."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_getLength" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + result = ((XERCES_CPP_NAMESPACE::DOMCharacterData const *)arg1)->getLength(); + jsresult = SWIG_From_size_t((size_t)(result)); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMCharacterData_substringData(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLSize_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_substringData."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_substringData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + ecode2 = SWIG_AsVal_size_t(args[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMCharacterData_substringData" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + ecode3 = SWIG_AsVal_size_t(args[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMCharacterData_substringData" "', argument " "3"" of type '" "XMLSize_t""'"); + } + arg3 = (XMLSize_t)(val3); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMCharacterData const *)arg1)->substringData(arg2,arg3); + + jsresult = XMLString2JS(result); + + + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMCharacterData_appendData(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_appendData."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_appendData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + + arg2 = JS2XMLString(args[0]); + + (arg1)->appendData((XMLCh const *)arg2); + jsresult = SWIGV8_UNDEFINED(); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMCharacterData_insertData(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_insertData."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_insertData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + ecode2 = SWIG_AsVal_size_t(args[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMCharacterData_insertData" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + + arg3 = JS2XMLString(args[1]); + + (arg1)->insertData(arg2,(XMLCh const *)arg3); + jsresult = SWIGV8_UNDEFINED(); + + + + delete[] arg3; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMCharacterData_deleteData(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLSize_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_deleteData."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_deleteData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + ecode2 = SWIG_AsVal_size_t(args[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMCharacterData_deleteData" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + ecode3 = SWIG_AsVal_size_t(args[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMCharacterData_deleteData" "', argument " "3"" of type '" "XMLSize_t""'"); + } + arg3 = (XMLSize_t)(val3); + (arg1)->deleteData(arg2,arg3); + jsresult = SWIGV8_UNDEFINED(); + + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMCharacterData_replaceData(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLSize_t arg3 ; + XMLCh *arg4 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + + if(args.Length() != 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_replaceData."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_replaceData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + ecode2 = SWIG_AsVal_size_t(args[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMCharacterData_replaceData" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + ecode3 = SWIG_AsVal_size_t(args[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DOMCharacterData_replaceData" "', argument " "3"" of type '" "XMLSize_t""'"); + } + arg3 = (XMLSize_t)(val3); + + arg4 = JS2XMLString(args[2]); + + (arg1)->replaceData(arg2,arg3,(XMLCh const *)arg4); + jsresult = SWIGV8_UNDEFINED(); + + + + + delete[] arg4; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMCharacterData_setData(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMCharacterData_setData."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMCharacterData_setData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMCharacterData *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *)(argp1); + + arg2 = JS2XMLString(args[0]); + + (arg1)->setData((XMLCh const *)arg2); + jsresult = SWIGV8_UNDEFINED(); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_veto_DOMCharacterData(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMCharacterData can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMComment(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMComment(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMComment(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMComment(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMComment * arg1 = (XERCES_CPP_NAMESPACE::DOMComment *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_new_veto_DOMComment(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMComment can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMText(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMText(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMText(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMText(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMText * arg1 = (XERCES_CPP_NAMESPACE::DOMText *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_DOMText_splitText(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + XMLSize_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMText *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_splitText."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_splitText" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + ecode2 = SWIG_AsVal_size_t(args[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMText_splitText" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + result = (XERCES_CPP_NAMESPACE::DOMText *)(arg1)->splitText(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMText_getIsElementContentWhitespace(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_getIsElementContentWhitespace."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_getIsElementContentWhitespace" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMText const *)arg1)->getIsElementContentWhitespace(); + jsresult = SWIG_From_bool((bool)(result)); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMText_getWholeText(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_getWholeText."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_getWholeText" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMText const *)arg1)->getWholeText(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMText_replaceWholeText(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMText *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_replaceWholeText."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_replaceWholeText" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + + arg2 = JS2XMLString(args[0]); + + result = (XERCES_CPP_NAMESPACE::DOMText *)(arg1)->replaceWholeText((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMText_isIgnorableWhitespace(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMText_isIgnorableWhitespace."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMText_isIgnorableWhitespace" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMText const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMText *)(argp1); + result = (bool)((XERCES_CPP_NAMESPACE::DOMText const *)arg1)->isIgnorableWhitespace(); + jsresult = SWIG_From_bool((bool)(result)); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_veto_DOMText(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMText can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMCDATASection(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMCDATASection(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMCDATASection(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMCDATASection(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMCDATASection * arg1 = (XERCES_CPP_NAMESPACE::DOMCDATASection *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_new_veto_DOMCDATASection(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMCDATASection can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMNodeList(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMNodeList(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMNodeList(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMNodeList(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMNodeList * arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_DOMNodeList_item(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNodeList *arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *) 0 ; + XMLSize_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNodeList_item."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNodeList_item" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNodeList const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *)(argp1); + ecode2 = SWIG_AsVal_size_t(args[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMNodeList_item" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNodeList const *)arg1)->item(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNodeList_getLength(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNodeList *arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLSize_t result; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNodeList_getLength."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNodeList_getLength" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNodeList const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *)(argp1); + result = ((XERCES_CPP_NAMESPACE::DOMNodeList const *)arg1)->getLength(); + jsresult = SWIG_From_size_t((size_t)(result)); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_veto_DOMNodeList(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMNodeList can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMNamedNodeMap(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMNamedNodeMap(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMNamedNodeMap(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMNamedNodeMap(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMNamedNodeMap * arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_DOMNamedNodeMap_setNamedItem(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_setNamedItem."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_setNamedItem" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNamedNodeMap_setNamedItem" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->setNamedItem(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNamedNodeMap_item(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLSize_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_item."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_item" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + ecode2 = SWIG_AsVal_size_t(args[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DOMNamedNodeMap_item" "', argument " "2"" of type '" "XMLSize_t""'"); + } + arg2 = (XMLSize_t)(val2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->item(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNamedNodeMap_getNamedItem(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_getNamedItem."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_getNamedItem" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + + arg2 = JS2XMLString(args[0]); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->getNamedItem((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNamedNodeMap_getLength(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLSize_t result; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_getLength."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_getLength" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + result = ((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->getLength(); + jsresult = SWIG_From_size_t((size_t)(result)); + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNamedNodeMap_removeNamedItem(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_removeNamedItem."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_removeNamedItem" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + + arg2 = JS2XMLString(args[0]); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->removeNamedItem((XMLCh const *)arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNamedNodeMap_getNamedItemNS(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_getNamedItemNS."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_getNamedItemNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + + arg2 = JS2XMLString(args[0]); + + + arg3 = JS2XMLString(args[1]); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->getNamedItemNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNamedNodeMap_setNamedItemNS(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_setNamedItemNS."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_setNamedItemNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DOMNamedNodeMap_setNamedItemNS" "', argument " "2"" of type '" "XERCES_CPP_NAMESPACE::DOMNode *""'"); + } + arg2 = (XERCES_CPP_NAMESPACE::DOMNode *)(argp2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->setNamedItemNS(arg2); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNamedNodeMap_removeNamedItemNS(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNamedNodeMap_removeNamedItemNS."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNamedNodeMap_removeNamedItemNS" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNamedNodeMap *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)(argp1); + + arg2 = JS2XMLString(args[0]); + + + arg3 = JS2XMLString(args[1]); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->removeNamedItemNS((XMLCh const *)arg2,(XMLCh const *)arg3); + jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&result)), 0 | 0 ); + + + delete[] arg2; + + + delete[] arg3; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_veto_DOMNamedNodeMap(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMNamedNodeMap can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMDocumentFragment(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMDocumentFragment(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMDocumentFragment(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMDocumentFragment(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMDocumentFragment * arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentFragment *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_new_veto_DOMDocumentFragment(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMDocumentFragment can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMEntityReference(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMEntityReference(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMEntityReference(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMEntityReference(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMEntityReference * arg1 = (XERCES_CPP_NAMESPACE::DOMEntityReference *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_new_veto_DOMEntityReference(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMEntityReference can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMNotation(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMNotation(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMNotation(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMNotation(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMNotation * arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_DOMNotation_getPublicId(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNotation *arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNotation_getPublicId."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNotation_getPublicId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNotation const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNotation const *)arg1)->getPublicId(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMNotation_getSystemId(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMNotation *arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMNotation_getSystemId."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMNotation_getSystemId" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMNotation const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNotation const *)arg1)->getSystemId(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_veto_DOMNotation(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMNotation can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_DOMProcessingInstruction(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_DOMProcessingInstruction(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_DOMProcessingInstruction(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_DOMProcessingInstruction(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + XERCES_CPP_NAMESPACE::DOMProcessingInstruction * arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_DOMProcessingInstruction_getTarget(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMProcessingInstruction *arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMProcessingInstruction_getTarget."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMProcessingInstruction_getTarget" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *)arg1)->getTarget(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMProcessingInstruction_getData(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMProcessingInstruction *arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + XMLCh *result = 0 ; + + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMProcessingInstruction_getData."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMProcessingInstruction_getData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *)(argp1); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *)arg1)->getData(); + + jsresult = XMLString2JS(result); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_DOMProcessingInstruction_setData(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + XERCES_CPP_NAMESPACE::DOMProcessingInstruction *arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_DOMProcessingInstruction_setData."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DOMProcessingInstruction_setData" "', argument " "1"" of type '" "XERCES_CPP_NAMESPACE::DOMProcessingInstruction *""'"); + } + arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *)(argp1); + + arg2 = JS2XMLString(args[0]); + + (arg1)->setData((XMLCh const *)arg2); + jsresult = SWIGV8_UNDEFINED(); + + + delete[] arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_veto_DOMProcessingInstruction(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + SWIG_exception(SWIG_ERROR, "Class DOMProcessingInstruction can not be instantiated"); + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_uscxml_Event_INTERNAL(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(uscxml::Event::INTERNAL)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_uscxml_Event_EXTERNAL(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(uscxml::Event::EXTERNAL)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_uscxml_Event_PLATFORM(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + + jsresult = SWIG_From_int((int)(uscxml::Event::PLATFORM)); + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static SwigV8ReturnValue _wrap_new_Event__SWIG_0(const SwigV8Arguments &args, V8ErrorHandler &SWIGV8_ErrorHandler) { + SWIGV8_HANDLESCOPE(); + + v8::Handle self = args.Holder(); + uscxml::Event *result; + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_new_Event__SWIG_0."); + result = (uscxml::Event *)new uscxml::Event(); + + + + SWIGV8_SetPrivateData(self, result, SWIGTYPE_p_uscxml__Event, SWIG_POINTER_OWN); + SWIGV8_RETURN(self); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_Event__SWIG_1(const SwigV8Arguments &args, V8ErrorHandler &SWIGV8_ErrorHandler) { + SWIGV8_HANDLESCOPE(); + + v8::Handle self = args.Holder(); + std::string *arg1 = 0 ; + uscxml::Event::Type arg2 ; + int res1 = SWIG_OLDOBJ ; + int val2 ; + int ecode2 = 0 ; + uscxml::Event *result; + if(args.Length() != 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_new_Event__SWIG_1."); + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string(args[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Event" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(args[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Event" "', argument " "2"" of type '" "uscxml::Event::Type""'"); + } + arg2 = (uscxml::Event::Type)(val2); + result = (uscxml::Event *)new uscxml::Event((std::string const &)*arg1,arg2); + + if (SWIG_IsNewObj(res1)) delete arg1; + + + + SWIGV8_SetPrivateData(self, result, SWIGTYPE_p_uscxml__Event, SWIG_POINTER_OWN); + SWIGV8_RETURN(self); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_Event__SWIG_2(const SwigV8Arguments &args, V8ErrorHandler &SWIGV8_ErrorHandler) { + SWIGV8_HANDLESCOPE(); + + v8::Handle self = args.Holder(); + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + uscxml::Event *result; + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_new_Event__SWIG_2."); + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string(args[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Event" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (uscxml::Event *)new uscxml::Event((std::string const &)*arg1); + + if (SWIG_IsNewObj(res1)) delete arg1; + + + SWIGV8_SetPrivateData(self, result, SWIGTYPE_p_uscxml__Event, SWIG_POINTER_OWN); + SWIGV8_RETURN(self); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_Event(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + OverloadErrorHandler errorHandler; + v8::Handle self; + + // switch all cases by means of series of if-returns. + + if(args.Length() == 0) { + errorHandler.err.Clear(); +#if (SWIG_V8_VERSION < 0x031903) + self = _wrap_new_Event__SWIG_0(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + SWIGV8_ESCAPE(self); + } +#else + _wrap_new_Event__SWIG_0(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + return; + } +#endif + } + + if(args.Length() == 2) { + errorHandler.err.Clear(); +#if (SWIG_V8_VERSION < 0x031903) + self = _wrap_new_Event__SWIG_1(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + SWIGV8_ESCAPE(self); + } +#else + _wrap_new_Event__SWIG_1(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + return; + } +#endif + } + + if(args.Length() == 1) { + errorHandler.err.Clear(); +#if (SWIG_V8_VERSION < 0x031903) + self = _wrap_new_Event__SWIG_2(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + SWIGV8_ESCAPE(self); + } +#else + _wrap_new_Event__SWIG_2(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + return; + } +#endif + } + + + // default: + SWIG_exception_fail(SWIG_ERROR, "Illegal arguments for construction of _exports_Event"); + +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_Event_operator_equal_to(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + uscxml::Event *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + bool result; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Event_operator_equal_to."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_operator_equal_to" "', argument " "1"" of type '" "uscxml::Event const *""'"); + } + arg1 = (uscxml::Event *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2, SWIGTYPE_p_uscxml__Event, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_operator_equal_to" "', argument " "2"" of type '" "uscxml::Event const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_operator_equal_to" "', argument " "2"" of type '" "uscxml::Event const &""'"); + } + arg2 = (uscxml::Event *)(argp2); + result = (bool)((uscxml::Event const *)arg1)->operator ==((uscxml::Event const &)*arg2); + jsresult = SWIG_From_bool((bool)(result)); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_Event_operator_not_equal_to(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + uscxml::Event *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + bool result; + + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_Event_operator_not_equal_to."); + + res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_operator_not_equal_to" "', argument " "1"" of type '" "uscxml::Event const *""'"); + } + arg1 = (uscxml::Event *)(argp1); + res2 = SWIG_ConvertPtr(args[0], &argp2, SWIGTYPE_p_uscxml__Event, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_operator_not_equal_to" "', argument " "2"" of type '" "uscxml::Event const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_operator_not_equal_to" "', argument " "2"" of type '" "uscxml::Event const &""'"); + } + arg2 = (uscxml::Event *)(argp2); + result = (bool)((uscxml::Event const *)arg1)->operator !=((uscxml::Event const &)*arg2); + jsresult = SWIG_From_bool((bool)(result)); + + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_Event_getParam__SWIG_0(const SwigV8Arguments &args, V8ErrorHandler &SWIGV8_ErrorHandler) +{ + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + uscxml::Event::params_t *arg1 = 0 ; + std::string *arg2 = 0 ; + Data *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool result; + + res1 = SWIG_ConvertPtr(args[0], &argp1, SWIGTYPE_p_std__multimapT_std__string_Data_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + arg1 = (uscxml::Event::params_t *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(args[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(args[2], &argp3, SWIGTYPE_p_Data, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_getParam" "', argument " "3"" of type '" "Data &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "3"" of type '" "Data &""'"); + } + arg3 = (Data *)(argp3); + result = (bool)uscxml::Event::getParam((std::multimap< std::string,Data > const &)*arg1,(std::string const &)*arg2,*arg3); + jsresult = SWIG_From_bool((bool)(result)); + + if (SWIG_IsNewObj(res2)) delete arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_Event_getParam__SWIG_1(const SwigV8Arguments &args, V8ErrorHandler &SWIGV8_ErrorHandler) +{ + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + uscxml::Event::params_t *arg1 = 0 ; + std::string *arg2 = 0 ; + std::list< Data > *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool result; + + res1 = SWIG_ConvertPtr(args[0], &argp1, SWIGTYPE_p_std__multimapT_std__string_Data_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + arg1 = (uscxml::Event::params_t *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(args[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(args[2], &argp3, SWIGTYPE_p_std__listT_Data_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_getParam" "', argument " "3"" of type '" "std::list< Data > &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "3"" of type '" "std::list< Data > &""'"); + } + arg3 = (std::list< Data > *)(argp3); + result = (bool)uscxml::Event::getParam((std::multimap< std::string,Data > const &)*arg1,(std::string const &)*arg2,*arg3); + jsresult = SWIG_From_bool((bool)(result)); + + if (SWIG_IsNewObj(res2)) delete arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_Event_getParam__SWIG_3(const SwigV8Arguments &args, V8ErrorHandler &SWIGV8_ErrorHandler) +{ + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + uscxml::Event::params_t *arg1 = 0 ; + std::string *arg2 = 0 ; + bool *arg3 = 0 ; + void *argp1 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + void *argp3 = 0 ; + int res3 = 0 ; + bool result; + + res1 = SWIG_ConvertPtr(args[0], &argp1, SWIGTYPE_p_std__multimapT_std__string_Data_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "1"" of type '" "uscxml::Event::params_t const &""'"); + } + arg1 = (uscxml::Event::params_t *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(args[1], &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + res3 = SWIG_ConvertPtr(args[2], &argp3, SWIGTYPE_p_bool, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_getParam" "', argument " "3"" of type '" "bool &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_getParam" "', argument " "3"" of type '" "bool &""'"); + } + arg3 = (bool *)(argp3); + result = (bool)uscxml::Event::getParam((std::multimap< std::string,Data > const &)*arg1,(std::string const &)*arg2,*arg3); + jsresult = SWIG_From_bool((bool)(result)); + + if (SWIG_IsNewObj(res2)) delete arg2; + + + SWIGV8_RETURN(jsresult); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_Event__wrap_Event_getParam(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + OverloadErrorHandler errorHandler; + + + if(args.Length() == 3) { + errorHandler.err.Clear(); +#if (SWIG_V8_VERSION < 0x031903) + jsresult = _wrap_Event_getParam__SWIG_0(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + SWIGV8_ESCAPE(jsresult); + } +#else + _wrap_Event_getParam__SWIG_0(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + return; + } +#endif + } + + + if(args.Length() == 3) { + errorHandler.err.Clear(); +#if (SWIG_V8_VERSION < 0x031903) + jsresult = _wrap_Event_getParam__SWIG_1(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + SWIGV8_ESCAPE(jsresult); + } +#else + _wrap_Event_getParam__SWIG_1(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + return; + } +#endif + } + + + if(args.Length() == 3) { + errorHandler.err.Clear(); +#if (SWIG_V8_VERSION < 0x031903) + jsresult = _wrap_Event_getParam__SWIG_3(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + SWIGV8_ESCAPE(jsresult); + } +#else + _wrap_Event_getParam__SWIG_3(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + return; + } +#endif + } + + + SWIG_exception_fail(SWIG_ERROR, "Illegal arguments for function getParam."); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static void _wrap_Event_raw_set(v8::Local property, v8::Local value, + const SwigV8PropertyCallbackInfoVoid &info) { + SWIGV8_HANDLESCOPE(); + + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + res1 = SWIG_ConvertPtr(info.Holder(), &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_raw_set" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(value, &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_raw_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_raw_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->raw = *arg2; + + if (SWIG_IsNewObj(res2)) delete arg2; + + goto fail; +fail: + return; +} + + +static SwigV8ReturnValue _wrap_Event_raw_get(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + + res1 = SWIG_ConvertPtr(info.Holder(), &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_raw_get" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + result = (std::string *) & ((arg1)->raw); + jsresult = SWIG_From_std_string((std::string)(*result)); + + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static void _wrap_Event_name_set(v8::Local property, v8::Local value, + const SwigV8PropertyCallbackInfoVoid &info) { + SWIGV8_HANDLESCOPE(); + + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + + res1 = SWIG_ConvertPtr(info.Holder(), &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_name_set" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_AsPtr_std_string(value, &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_name_set" "', argument " "2"" of type '" "std::string const &""'"); + } + arg2 = ptr; + } + if (arg1) (arg1)->name = *arg2; + + if (SWIG_IsNewObj(res2)) delete arg2; + + goto fail; +fail: + return; +} + + +static SwigV8ReturnValue _wrap_Event_name_get(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string *result = 0 ; + + res1 = SWIG_ConvertPtr(info.Holder(), &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_name_get" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + result = (std::string *) & ((arg1)->name); + jsresult = SWIG_From_std_string((std::string)(*result)); + + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +static void _wrap_Event_eventType_set(v8::Local property, v8::Local value, + const SwigV8PropertyCallbackInfoVoid &info) { + SWIGV8_HANDLESCOPE(); + + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + uscxml::Event::Type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + res1 = SWIG_ConvertPtr(info.Holder(), &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_eventType_set" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + ecode2 = SWIG_AsVal_int(value, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Event_eventType_set" "', argument " "2"" of type '" "uscxml::Event::Type""'"); + } + arg2 = (uscxml::Event::Type)(val2); + if (arg1) (arg1)->eventType = arg2; + + + + goto fail; +fail: + return; +} + + +static SwigV8ReturnValue _wrap_Event_eventType_get(v8::Local property, const SwigV8PropertyCallbackInfo &info) { + SWIGV8_HANDLESCOPE(); + + v8::Handle jsresult; + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uscxml::Event::Type result; + + res1 = SWIG_ConvertPtr(info.Holder(), &argp1,SWIGTYPE_p_uscxml__Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_eventType_get" "', argument " "1"" of type '" "uscxml::Event *""'"); + } + arg1 = (uscxml::Event *)(argp1); + result = (uscxml::Event::Type) ((arg1)->eventType); + jsresult = SWIG_From_int((int)(result)); + + + SWIGV8_RETURN_INFO(jsresult, info); + + goto fail; +fail: + SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_Event(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_Event(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_Event(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_Event(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + uscxml::Event * arg1 = (uscxml::Event *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +static SwigV8ReturnValue _wrap_new_ErrorEvent__SWIG_0(const SwigV8Arguments &args, V8ErrorHandler &SWIGV8_ErrorHandler) { + SWIGV8_HANDLESCOPE(); + + v8::Handle self = args.Holder(); + uscxml::ErrorEvent *result; + if(args.Length() != 0) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_new_ErrorEvent__SWIG_0."); + result = (uscxml::ErrorEvent *)new uscxml::ErrorEvent(); + + + + SWIGV8_SetPrivateData(self, result, SWIGTYPE_p_uscxml__ErrorEvent, SWIG_POINTER_OWN); + SWIGV8_RETURN(self); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_ErrorEvent__SWIG_1(const SwigV8Arguments &args, V8ErrorHandler &SWIGV8_ErrorHandler) { + SWIGV8_HANDLESCOPE(); + + v8::Handle self = args.Holder(); + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + uscxml::ErrorEvent *result; + if(args.Length() != 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_new_ErrorEvent__SWIG_1."); + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string(args[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ErrorEvent" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ErrorEvent" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + result = (uscxml::ErrorEvent *)new uscxml::ErrorEvent((std::string const &)*arg1); + + if (SWIG_IsNewObj(res1)) delete arg1; + + + SWIGV8_SetPrivateData(self, result, SWIGTYPE_p_uscxml__ErrorEvent, SWIG_POINTER_OWN); + SWIGV8_RETURN(self); + + goto fail; +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +static SwigV8ReturnValue _wrap_new_ErrorEvent(const SwigV8Arguments &args) { + SWIGV8_HANDLESCOPE(); + + OverloadErrorHandler errorHandler; + v8::Handle self; + + // switch all cases by means of series of if-returns. + + if(args.Length() == 0) { + errorHandler.err.Clear(); +#if (SWIG_V8_VERSION < 0x031903) + self = _wrap_new_ErrorEvent__SWIG_0(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + SWIGV8_ESCAPE(self); + } +#else + _wrap_new_ErrorEvent__SWIG_0(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + return; + } +#endif + } + + if(args.Length() == 1) { + errorHandler.err.Clear(); +#if (SWIG_V8_VERSION < 0x031903) + self = _wrap_new_ErrorEvent__SWIG_1(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + SWIGV8_ESCAPE(self); + } +#else + _wrap_new_ErrorEvent__SWIG_1(args, errorHandler); + if(errorHandler.err.IsEmpty()) { + return; + } +#endif + } + + + // default: + SWIG_exception_fail(SWIG_ERROR, "Illegal arguments for construction of _exports_ErrorEvent"); + +fail: + SWIGV8_RETURN(SWIGV8_UNDEFINED()); +} + + +#if (SWIG_V8_VERSION < 0x031710) +static void _wrap_delete_ErrorEvent(v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < 0x031900) + static void _wrap_delete_ErrorEvent(v8::Isolate *isolate, v8::Persistent object, void *parameter) { + SWIGV8_Proxy *proxy = static_cast(parameter); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + static void _wrap_delete_ErrorEvent(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) { +#else + static void _wrap_delete_ErrorEvent(const v8::WeakCallbackData &data) { + v8::Local object = data.GetValue(); + SWIGV8_Proxy *proxy = data.GetParameter(); +#endif + + if(proxy->swigCMemOwn && proxy->swigCObject) { + uscxml::ErrorEvent * arg1 = (uscxml::ErrorEvent *)proxy->swigCObject; + delete arg1; + } + delete proxy; + +#if (SWIG_V8_VERSION < 0x031710) + object.Dispose(); +#elif (SWIG_V8_VERSION < 0x031900) + object.Dispose(isolate); +#elif (SWIG_V8_VERSION < 0x032100) + object->Dispose(isolate); +#elif (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION) + object->Dispose(); +#else + object.Clear(); +#endif + } + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static void *_p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMText(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMText *) ((XERCES_CPP_NAMESPACE::DOMCDATASection *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMText *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMComment *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMCharacterData *) (XERCES_CPP_NAMESPACE::DOMText *) ((XERCES_CPP_NAMESPACE::DOMCDATASection *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMElementTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMElement *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMDocumentFragmentTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMDocumentFragment *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMAttrTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMAttr *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMDocumentTypeTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMDocumentType *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCharacterDataTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMCharacterData *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) (XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMText *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) (XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMComment *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMProcessingInstructionTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMEntityTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMEntity *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMEntityReferenceTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMEntityReference *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) (XERCES_CPP_NAMESPACE::DOMCharacterData *)(XERCES_CPP_NAMESPACE::DOMText *) ((XERCES_CPP_NAMESPACE::DOMCDATASection *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMNotationTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMNotation *) x)); +} +static void *_p_uscxml__ErrorEventTo_p_uscxml__Event(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((uscxml::Event *) ((uscxml::ErrorEvent *) x)); +} +static swig_type_info _swigt__p_Data = {"_p_Data", "Data *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMAttr = {"_p_XERCES_CPP_NAMESPACE__DOMAttr", "XERCES_CPP_NAMESPACE::DOMAttr *|p_XERCES_CPP_NAMESPACE__DOMAttr", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection = {"_p_XERCES_CPP_NAMESPACE__DOMCDATASection", "p_XERCES_CPP_NAMESPACE__DOMCDATASection", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData = {"_p_XERCES_CPP_NAMESPACE__DOMCharacterData", "XERCES_CPP_NAMESPACE::DOMCharacterData *|p_XERCES_CPP_NAMESPACE__DOMCharacterData", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMComment = {"_p_XERCES_CPP_NAMESPACE__DOMComment", "p_XERCES_CPP_NAMESPACE__DOMComment", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMDocument = {"_p_XERCES_CPP_NAMESPACE__DOMDocument", "XERCES_CPP_NAMESPACE::DOMDocument *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment = {"_p_XERCES_CPP_NAMESPACE__DOMDocumentFragment", "p_XERCES_CPP_NAMESPACE__DOMDocumentFragment", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType = {"_p_XERCES_CPP_NAMESPACE__DOMDocumentType", "XERCES_CPP_NAMESPACE::DOMDocumentType *|p_XERCES_CPP_NAMESPACE__DOMDocumentType", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMElement = {"_p_XERCES_CPP_NAMESPACE__DOMElement", "p_XERCES_CPP_NAMESPACE__DOMElement|XERCES_CPP_NAMESPACE::DOMElement *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMEntity = {"_p_XERCES_CPP_NAMESPACE__DOMEntity", "XERCES_CPP_NAMESPACE::DOMEntity *|p_XERCES_CPP_NAMESPACE__DOMEntity", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference = {"_p_XERCES_CPP_NAMESPACE__DOMEntityReference", "p_XERCES_CPP_NAMESPACE__DOMEntityReference", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMException = {"_p_XERCES_CPP_NAMESPACE__DOMException", "p_XERCES_CPP_NAMESPACE__DOMException|XERCES_CPP_NAMESPACE::DOMException *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap = {"_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap", "p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap|XERCES_CPP_NAMESPACE::DOMNamedNodeMap *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNode = {"_p_XERCES_CPP_NAMESPACE__DOMNode", "XERCES_CPP_NAMESPACE::DOMNode *|p_XERCES_CPP_NAMESPACE__DOMNode", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNodeList = {"_p_XERCES_CPP_NAMESPACE__DOMNodeList", "p_XERCES_CPP_NAMESPACE__DOMNodeList|XERCES_CPP_NAMESPACE::DOMNodeList *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNotation = {"_p_XERCES_CPP_NAMESPACE__DOMNotation", "XERCES_CPP_NAMESPACE::DOMNotation *|p_XERCES_CPP_NAMESPACE__DOMNotation", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction = {"_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction", "XERCES_CPP_NAMESPACE::DOMProcessingInstruction *|p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMText = {"_p_XERCES_CPP_NAMESPACE__DOMText", "XERCES_CPP_NAMESPACE::DOMText *|p_XERCES_CPP_NAMESPACE__DOMText", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMTypeInfo = {"_p_XERCES_CPP_NAMESPACE__DOMTypeInfo", "XERCES_CPP_NAMESPACE::DOMTypeInfo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler = {"_p_XERCES_CPP_NAMESPACE__DOMUserDataHandler", "XERCES_CPP_NAMESPACE::DOMUserDataHandler *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__MemoryManager = {"_p_XERCES_CPP_NAMESPACE__MemoryManager", "XERCES_CPP_NAMESPACE::MemoryManager *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int16_t = {"_p_int16_t", "XMLInt16 *|int16_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int32_t = {"_p_int32_t", "int32_t *|XMLInt32 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int64_t = {"_p_int64_t", "int64_t *|XMLInt64 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_namelist_t = {"_p_namelist_t", "namelist_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_params_t = {"_p_params_t", "params_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *|XMLSize_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ssize_t = {"_p_ssize_t", "ssize_t *|XMLSSize_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__listT_Data_t = {"_p_std__listT_Data_t", "std::list< Data > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__multimapT_std__string_Data_t = {"_p_std__multimapT_std__string_Data_t", "uscxml::Event::params_t *|std::multimap< std::string,Data > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint16_t = {"_p_uint16_t", "XMLUInt16 *|UTF16Ch *|XMLCh *|uint16_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint32_t = {"_p_uint32_t", "uint32_t *|XMLUInt32 *|UCS4Ch *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint64_t = {"_p_uint64_t", "uint64_t *|XMLUInt64 *|XMLFilePos *|XMLFileLoc *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|XMLByte *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uscxml__ErrorEvent = {"_p_uscxml__ErrorEvent", "p_uscxml__ErrorEvent", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uscxml__Event = {"_p_uscxml__Event", "uscxml::Event *|p_uscxml__Event", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_Data, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMAttr, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMDocument, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMElement, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMEntity, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMException, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNode, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNodeList, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNotation, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMText, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMTypeInfo, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, + &_swigt__p_XERCES_CPP_NAMESPACE__MemoryManager, + &_swigt__p_bool, + &_swigt__p_char, + &_swigt__p_int16_t, + &_swigt__p_int32_t, + &_swigt__p_int64_t, + &_swigt__p_namelist_t, + &_swigt__p_params_t, + &_swigt__p_size_t, + &_swigt__p_ssize_t, + &_swigt__p_std__listT_Data_t, + &_swigt__p_std__multimapT_std__string_Data_t, + &_swigt__p_uint16_t, + &_swigt__p_uint32_t, + &_swigt__p_uint64_t, + &_swigt__p_unsigned_char, + &_swigt__p_uscxml__ErrorEvent, + &_swigt__p_uscxml__Event, + &_swigt__p_void, +}; + +static swig_cast_info _swigc__p_Data[] = { {&_swigt__p_Data, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMAttr[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMAttr, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMCDATASection[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMCharacterData[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMText, _p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, _p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, _p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMComment[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMDocument[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocument, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentType[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMElement[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMElement, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMEntity[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntity, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMEntityReference[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMException[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNode[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMElement, _p_XERCES_CPP_NAMESPACE__DOMElementTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, _p_XERCES_CPP_NAMESPACE__DOMDocumentFragmentTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMAttr, _p_XERCES_CPP_NAMESPACE__DOMAttrTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType, _p_XERCES_CPP_NAMESPACE__DOMDocumentTypeTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData, _p_XERCES_CPP_NAMESPACE__DOMCharacterDataTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMText, _p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, _p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, _p_XERCES_CPP_NAMESPACE__DOMProcessingInstructionTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntity, _p_XERCES_CPP_NAMESPACE__DOMEntityTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference, _p_XERCES_CPP_NAMESPACE__DOMEntityReferenceTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, _p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNotation, _p_XERCES_CPP_NAMESPACE__DOMNotationTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNodeList[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNodeList, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNotation[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNotation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMText[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMText, 0, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, _p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMText, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMTypeInfo[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMTypeInfo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__MemoryManager[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__MemoryManager, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_bool[] = { {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int16_t[] = { {&_swigt__p_int16_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int32_t[] = { {&_swigt__p_int32_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int64_t[] = { {&_swigt__p_int64_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_namelist_t[] = { {&_swigt__p_namelist_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_params_t[] = { {&_swigt__p_params_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ssize_t[] = { {&_swigt__p_ssize_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__listT_Data_t[] = { {&_swigt__p_std__listT_Data_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__multimapT_std__string_Data_t[] = { {&_swigt__p_std__multimapT_std__string_Data_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint16_t[] = { {&_swigt__p_uint16_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint32_t[] = { {&_swigt__p_uint32_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint64_t[] = { {&_swigt__p_uint64_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uscxml__ErrorEvent[] = { {&_swigt__p_uscxml__ErrorEvent, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uscxml__Event[] = { {&_swigt__p_uscxml__Event, 0, 0, 0}, {&_swigt__p_uscxml__ErrorEvent, _p_uscxml__ErrorEventTo_p_uscxml__Event, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_Data, + _swigc__p_XERCES_CPP_NAMESPACE__DOMAttr, + _swigc__p_XERCES_CPP_NAMESPACE__DOMCDATASection, + _swigc__p_XERCES_CPP_NAMESPACE__DOMCharacterData, + _swigc__p_XERCES_CPP_NAMESPACE__DOMComment, + _swigc__p_XERCES_CPP_NAMESPACE__DOMDocument, + _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, + _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentType, + _swigc__p_XERCES_CPP_NAMESPACE__DOMElement, + _swigc__p_XERCES_CPP_NAMESPACE__DOMEntity, + _swigc__p_XERCES_CPP_NAMESPACE__DOMEntityReference, + _swigc__p_XERCES_CPP_NAMESPACE__DOMException, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNode, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNodeList, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNotation, + _swigc__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, + _swigc__p_XERCES_CPP_NAMESPACE__DOMText, + _swigc__p_XERCES_CPP_NAMESPACE__DOMTypeInfo, + _swigc__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, + _swigc__p_XERCES_CPP_NAMESPACE__MemoryManager, + _swigc__p_bool, + _swigc__p_char, + _swigc__p_int16_t, + _swigc__p_int32_t, + _swigc__p_int64_t, + _swigc__p_namelist_t, + _swigc__p_params_t, + _swigc__p_size_t, + _swigc__p_ssize_t, + _swigc__p_std__listT_Data_t, + _swigc__p_std__multimapT_std__string_Data_t, + _swigc__p_uint16_t, + _swigc__p_uint32_t, + _swigc__p_uint64_t, + _swigc__p_unsigned_char, + _swigc__p_uscxml__ErrorEvent, + _swigc__p_uscxml__Event, + _swigc__p_void, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + + + + +#include + +SWIGRUNTIME void +SWIG_V8_SetModule(void *, swig_module_info *swig_module) { + v8::Local global_obj = SWIGV8_CURRENT_CONTEXT()->Global(); + v8::Local mod = SWIGV8_EXTERNAL_NEW(swig_module); + assert(!mod.IsEmpty()); + global_obj->SetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"), mod); +} + +SWIGRUNTIME swig_module_info * +SWIG_V8_GetModule(void *) { + v8::Local global_obj = SWIGV8_CURRENT_CONTEXT()->Global(); + v8::Local moduleinfo = global_obj->GetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data")); + + if (moduleinfo.IsEmpty()) + { + // It's not yet loaded + return 0; + } + + v8::Local moduleinfo_extern = v8::Local::Cast(moduleinfo); + + if (moduleinfo_extern.IsEmpty()) + { + // Something's not right + return 0; + } + + void *ptr = moduleinfo_extern->Value(); + assert(ptr); + swig_module_info *retptr = static_cast(ptr); + assert(retptr); + return retptr; +} + +#define SWIG_GetModule(clientdata) SWIG_V8_GetModule(clientdata) +#define SWIG_SetModule(clientdata, pointer) SWIG_V8_SetModule(clientdata, pointer) + + +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned statically to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int init; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + iter=module_head; + do { + if (iter==&swig_module) { + /* Our module is already in the list, so there's nothing more to do. */ + return; + } + iter=iter->next; + } while (iter!= module_head); + + /* otherwise we must add our module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpreters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ /* c-mode */ +#endif +} +#endif + + +// Note: 'extern "C"'' disables name mangling which makes it easier to load the symbol manually +// TODO: is it ok to do that? +extern "C" +#if (NODE_MODULE_VERSION < 0x000C) +void SWIGV8_INIT (v8::Handle exports) +#else +void SWIGV8_INIT (v8::Handle exports, v8::Handle /*module*/) +#endif +{ + SWIG_InitializeModule(static_cast(&exports)); + + SWIGV8_HANDLESCOPE(); + + v8::Handle exports_obj = exports; + + + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->dcast = (swig_dycast_func) DOMNode_dynamic_cast; + + + // a class template for creating proxies of undefined types + SWIGV8_SET_CLASS_TEMPL(SWIGV8_SWIGTYPE_Proxy_class_templ, SWIGV8_CreateClassTemplate("SwigProxy")); + + /* create objects for namespaces */ + + + /* create class templates */ + /* Name: _exports_DOMException, Type: p_XERCES_CPP_NAMESPACE__DOMException, Dtor: _wrap_delete_DOMException */ +v8::Handle _exports_DOMException_class = SWIGV8_CreateClassTemplate("_exports_DOMException"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMException_clientData.class_templ, _exports_DOMException_class); +_exports_DOMException_clientData.dtor = _wrap_delete_DOMException; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException->clientdata = &_exports_DOMException_clientData; +} +/* Name: _exports_DOMNode, Type: p_XERCES_CPP_NAMESPACE__DOMNode, Dtor: _wrap_delete_DOMNode */ +v8::Handle _exports_DOMNode_class = SWIGV8_CreateClassTemplate("_exports_DOMNode"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMNode_clientData.class_templ, _exports_DOMNode_class); +_exports_DOMNode_clientData.dtor = _wrap_delete_DOMNode; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata = &_exports_DOMNode_clientData; +} +/* Name: _exports_DOMAttr, Type: p_XERCES_CPP_NAMESPACE__DOMAttr, Dtor: _wrap_delete_DOMAttr */ +v8::Handle _exports_DOMAttr_class = SWIGV8_CreateClassTemplate("_exports_DOMAttr"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMAttr_clientData.class_templ, _exports_DOMAttr_class); +_exports_DOMAttr_clientData.dtor = _wrap_delete_DOMAttr; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr->clientdata = &_exports_DOMAttr_clientData; +} +/* Name: _exports_DOMElement, Type: p_XERCES_CPP_NAMESPACE__DOMElement, Dtor: _wrap_delete_DOMElement */ +v8::Handle _exports_DOMElement_class = SWIGV8_CreateClassTemplate("_exports_DOMElement"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMElement_clientData.class_templ, _exports_DOMElement_class); +_exports_DOMElement_clientData.dtor = _wrap_delete_DOMElement; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement->clientdata = &_exports_DOMElement_clientData; +} +/* Name: _exports_DOMEntity, Type: p_XERCES_CPP_NAMESPACE__DOMEntity, Dtor: _wrap_delete_DOMEntity */ +v8::Handle _exports_DOMEntity_class = SWIGV8_CreateClassTemplate("_exports_DOMEntity"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMEntity_clientData.class_templ, _exports_DOMEntity_class); +_exports_DOMEntity_clientData.dtor = _wrap_delete_DOMEntity; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity->clientdata = &_exports_DOMEntity_clientData; +} +/* Name: _exports_DOMDocumentType, Type: p_XERCES_CPP_NAMESPACE__DOMDocumentType, Dtor: _wrap_delete_DOMDocumentType */ +v8::Handle _exports_DOMDocumentType_class = SWIGV8_CreateClassTemplate("_exports_DOMDocumentType"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMDocumentType_clientData.class_templ, _exports_DOMDocumentType_class); +_exports_DOMDocumentType_clientData.dtor = _wrap_delete_DOMDocumentType; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType->clientdata = &_exports_DOMDocumentType_clientData; +} +/* Name: _exports_DOMCharacterData, Type: p_XERCES_CPP_NAMESPACE__DOMCharacterData, Dtor: _wrap_delete_DOMCharacterData */ +v8::Handle _exports_DOMCharacterData_class = SWIGV8_CreateClassTemplate("_exports_DOMCharacterData"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMCharacterData_clientData.class_templ, _exports_DOMCharacterData_class); +_exports_DOMCharacterData_clientData.dtor = _wrap_delete_DOMCharacterData; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata = &_exports_DOMCharacterData_clientData; +} +/* Name: _exports_DOMComment, Type: p_XERCES_CPP_NAMESPACE__DOMComment, Dtor: _wrap_delete_DOMComment */ +v8::Handle _exports_DOMComment_class = SWIGV8_CreateClassTemplate("_exports_DOMComment"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMComment_clientData.class_templ, _exports_DOMComment_class); +_exports_DOMComment_clientData.dtor = _wrap_delete_DOMComment; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment->clientdata = &_exports_DOMComment_clientData; +} +/* Name: _exports_DOMText, Type: p_XERCES_CPP_NAMESPACE__DOMText, Dtor: _wrap_delete_DOMText */ +v8::Handle _exports_DOMText_class = SWIGV8_CreateClassTemplate("_exports_DOMText"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMText_clientData.class_templ, _exports_DOMText_class); +_exports_DOMText_clientData.dtor = _wrap_delete_DOMText; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText->clientdata = &_exports_DOMText_clientData; +} +/* Name: _exports_DOMCDATASection, Type: p_XERCES_CPP_NAMESPACE__DOMCDATASection, Dtor: _wrap_delete_DOMCDATASection */ +v8::Handle _exports_DOMCDATASection_class = SWIGV8_CreateClassTemplate("_exports_DOMCDATASection"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMCDATASection_clientData.class_templ, _exports_DOMCDATASection_class); +_exports_DOMCDATASection_clientData.dtor = _wrap_delete_DOMCDATASection; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection->clientdata = &_exports_DOMCDATASection_clientData; +} +/* Name: _exports_DOMNodeList, Type: p_XERCES_CPP_NAMESPACE__DOMNodeList, Dtor: _wrap_delete_DOMNodeList */ +v8::Handle _exports_DOMNodeList_class = SWIGV8_CreateClassTemplate("_exports_DOMNodeList"); +//_exports_DOMNodeList_class->InstanceTemplate()->SetIndexedPropertyHandler(V8NodeListIndexedPropertyHandler2); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMNodeList_clientData.class_templ, _exports_DOMNodeList_class); +_exports_DOMNodeList_clientData.dtor = _wrap_delete_DOMNodeList; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList->clientdata = &_exports_DOMNodeList_clientData; +} +/* Name: _exports_DOMNamedNodeMap, Type: p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, Dtor: _wrap_delete_DOMNamedNodeMap */ +v8::Handle _exports_DOMNamedNodeMap_class = SWIGV8_CreateClassTemplate("_exports_DOMNamedNodeMap"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMNamedNodeMap_clientData.class_templ, _exports_DOMNamedNodeMap_class); +_exports_DOMNamedNodeMap_clientData.dtor = _wrap_delete_DOMNamedNodeMap; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap->clientdata = &_exports_DOMNamedNodeMap_clientData; +} +/* Name: _exports_DOMDocumentFragment, Type: p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, Dtor: _wrap_delete_DOMDocumentFragment */ +v8::Handle _exports_DOMDocumentFragment_class = SWIGV8_CreateClassTemplate("_exports_DOMDocumentFragment"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMDocumentFragment_clientData.class_templ, _exports_DOMDocumentFragment_class); +_exports_DOMDocumentFragment_clientData.dtor = _wrap_delete_DOMDocumentFragment; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentFragment->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentFragment->clientdata = &_exports_DOMDocumentFragment_clientData; +} +/* Name: _exports_DOMEntityReference, Type: p_XERCES_CPP_NAMESPACE__DOMEntityReference, Dtor: _wrap_delete_DOMEntityReference */ +v8::Handle _exports_DOMEntityReference_class = SWIGV8_CreateClassTemplate("_exports_DOMEntityReference"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMEntityReference_clientData.class_templ, _exports_DOMEntityReference_class); +_exports_DOMEntityReference_clientData.dtor = _wrap_delete_DOMEntityReference; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference->clientdata = &_exports_DOMEntityReference_clientData; +} +/* Name: _exports_DOMNotation, Type: p_XERCES_CPP_NAMESPACE__DOMNotation, Dtor: _wrap_delete_DOMNotation */ +v8::Handle _exports_DOMNotation_class = SWIGV8_CreateClassTemplate("_exports_DOMNotation"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMNotation_clientData.class_templ, _exports_DOMNotation_class); +_exports_DOMNotation_clientData.dtor = _wrap_delete_DOMNotation; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation->clientdata = &_exports_DOMNotation_clientData; +} +/* Name: _exports_DOMProcessingInstruction, Type: p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, Dtor: _wrap_delete_DOMProcessingInstruction */ +v8::Handle _exports_DOMProcessingInstruction_class = SWIGV8_CreateClassTemplate("_exports_DOMProcessingInstruction"); +SWIGV8_SET_CLASS_TEMPL(_exports_DOMProcessingInstruction_clientData.class_templ, _exports_DOMProcessingInstruction_class); +_exports_DOMProcessingInstruction_clientData.dtor = _wrap_delete_DOMProcessingInstruction; +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction->clientdata == 0) { + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction->clientdata = &_exports_DOMProcessingInstruction_clientData; +} +/* Name: _exports_Event, Type: p_uscxml__Event, Dtor: _wrap_delete_Event */ +v8::Handle _exports_Event_class = SWIGV8_CreateClassTemplate("_exports_Event"); +SWIGV8_SET_CLASS_TEMPL(_exports_Event_clientData.class_templ, _exports_Event_class); +_exports_Event_clientData.dtor = _wrap_delete_Event; +if (SWIGTYPE_p_uscxml__Event->clientdata == 0) { + SWIGTYPE_p_uscxml__Event->clientdata = &_exports_Event_clientData; +} +/* Name: _exports_ErrorEvent, Type: p_uscxml__ErrorEvent, Dtor: _wrap_delete_ErrorEvent */ +v8::Handle _exports_ErrorEvent_class = SWIGV8_CreateClassTemplate("_exports_ErrorEvent"); +SWIGV8_SET_CLASS_TEMPL(_exports_ErrorEvent_clientData.class_templ, _exports_ErrorEvent_class); +_exports_ErrorEvent_clientData.dtor = _wrap_delete_ErrorEvent; +if (SWIGTYPE_p_uscxml__ErrorEvent->clientdata == 0) { + SWIGTYPE_p_uscxml__ErrorEvent->clientdata = &_exports_ErrorEvent_clientData; +} + + + /* register wrapper functions */ + SWIGV8_AddStaticVariable(exports_obj, "XERCES_HAS_CPP_NAMESPACE", _wrap_XERCES_HAS_CPP_NAMESPACE, JS_veto_set_variable); +SWIGV8_AddStaticVariable(exports_obj, "DEBUG_UTF8_OUT", _wrap_DEBUG_UTF8_OUT_get, _wrap_DEBUG_UTF8_OUT_set); +SWIGV8_AddStaticVariable(exports_obj, "DEBUG_UTF8_IN", _wrap_DEBUG_UTF8_IN_get, _wrap_DEBUG_UTF8_IN_set); +SWIGV8_AddMemberFunction(_exports_DOMException_class, "getMessage", _wrap_DOMException_getMessage); +SWIGV8_AddMemberVariable(_exports_DOMException_class, "code", _wrap_DOMException_code_get, _wrap_DOMException_code_set); +SWIGV8_AddMemberVariable(_exports_DOMException_class, "msg", _wrap_DOMException_msg_get, _wrap_DOMException_msg_set); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getNodeName", _wrap_DOMNode_getNodeName); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getNodeValue", _wrap_DOMNode_getNodeValue); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getNodeType", _wrap_DOMNode_getNodeType); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getParentNode", _wrap_DOMNode_getParentNode); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getChildNodes", _wrap_DOMNode_getChildNodes); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getFirstChild", _wrap_DOMNode_getFirstChild); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getLastChild", _wrap_DOMNode_getLastChild); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getPreviousSibling", _wrap_DOMNode_getPreviousSibling); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getNextSibling", _wrap_DOMNode_getNextSibling); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getAttributes", _wrap_DOMNode_getAttributes); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getOwnerDocument", _wrap_DOMNode_getOwnerDocument); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "cloneNode", _wrap_DOMNode_cloneNode); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "insertBefore", _wrap_DOMNode_insertBefore); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "replaceChild", _wrap_DOMNode_replaceChild); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "removeChild", _wrap_DOMNode_removeChild); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "appendChild", _wrap_DOMNode_appendChild); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "hasChildNodes", _wrap_DOMNode_hasChildNodes); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "setNodeValue", _wrap_DOMNode_setNodeValue); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "normalize", _wrap_DOMNode_normalize); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "isSupported", _wrap_DOMNode_isSupported); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getNamespaceURI", _wrap_DOMNode_getNamespaceURI); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getLocalName", _wrap_DOMNode_getLocalName); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "setPrefix", _wrap_DOMNode_setPrefix); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "hasAttributes", _wrap_DOMNode_hasAttributes); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "isSameNode", _wrap_DOMNode_isSameNode); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "isEqualNode", _wrap_DOMNode_isEqualNode); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "setUserData", _wrap_DOMNode_setUserData); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getUserData", _wrap_DOMNode_getUserData); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getBaseURI", _wrap_DOMNode_getBaseURI); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "compareDocumentPosition", _wrap_DOMNode_compareDocumentPosition); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getTextContent", _wrap_DOMNode_getTextContent); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "setTextContent", _wrap_DOMNode_setTextContent); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "lookupPrefix", _wrap_DOMNode_lookupPrefix); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "isDefaultNamespace", _wrap_DOMNode_isDefaultNamespace); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "lookupNamespaceURI", _wrap_DOMNode_lookupNamespaceURI); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "getFeature", _wrap_DOMNode_getFeature); +SWIGV8_AddMemberFunction(_exports_DOMNode_class, "release", _wrap_DOMNode_release); +SWIGV8_AddMemberFunction(_exports_DOMAttr_class, "getName", _wrap_DOMAttr_getName); +SWIGV8_AddMemberFunction(_exports_DOMAttr_class, "getSpecified", _wrap_DOMAttr_getSpecified); +SWIGV8_AddMemberFunction(_exports_DOMAttr_class, "getValue", _wrap_DOMAttr_getValue); +SWIGV8_AddMemberFunction(_exports_DOMAttr_class, "setValue", _wrap_DOMAttr_setValue); +SWIGV8_AddMemberFunction(_exports_DOMAttr_class, "getOwnerElement", _wrap_DOMAttr_getOwnerElement); +SWIGV8_AddMemberFunction(_exports_DOMAttr_class, "isId", _wrap_DOMAttr_isId); +SWIGV8_AddMemberFunction(_exports_DOMAttr_class, "getSchemaTypeInfo", _wrap_DOMAttr_getSchemaTypeInfo); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "getTagName", _wrap_DOMElement_getTagName); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "getAttribute", _wrap_DOMElement_getAttribute); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "getAttributeNode", _wrap_DOMElement_getAttributeNode); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "getElementsByTagName", _wrap_DOMElement_getElementsByTagName); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "setAttribute", _wrap_DOMElement_setAttribute); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "setAttributeNode", _wrap_DOMElement_setAttributeNode); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "removeAttributeNode", _wrap_DOMElement_removeAttributeNode); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "removeAttribute", _wrap_DOMElement_removeAttribute); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "getAttributeNS", _wrap_DOMElement_getAttributeNS); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "setAttributeNS", _wrap_DOMElement_setAttributeNS); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "removeAttributeNS", _wrap_DOMElement_removeAttributeNS); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "getAttributeNodeNS", _wrap_DOMElement_getAttributeNodeNS); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "setAttributeNodeNS", _wrap_DOMElement_setAttributeNodeNS); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "getElementsByTagNameNS", _wrap_DOMElement_getElementsByTagNameNS); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "hasAttribute", _wrap_DOMElement_hasAttribute); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "hasAttributeNS", _wrap_DOMElement_hasAttributeNS); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "setIdAttribute", _wrap_DOMElement_setIdAttribute); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "setIdAttributeNS", _wrap_DOMElement_setIdAttributeNS); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "setIdAttributeNode", _wrap_DOMElement_setIdAttributeNode); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "getSchemaTypeInfo", _wrap_DOMElement_getSchemaTypeInfo); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "getFirstElementChild", _wrap_DOMElement_getFirstElementChild); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "getLastElementChild", _wrap_DOMElement_getLastElementChild); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "getPreviousElementSibling", _wrap_DOMElement_getPreviousElementSibling); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "getNextElementSibling", _wrap_DOMElement_getNextElementSibling); +SWIGV8_AddMemberFunction(_exports_DOMElement_class, "getChildElementCount", _wrap_DOMElement_getChildElementCount); +SWIGV8_AddMemberFunction(_exports_DOMEntity_class, "getPublicId", _wrap_DOMEntity_getPublicId); +SWIGV8_AddMemberFunction(_exports_DOMEntity_class, "getSystemId", _wrap_DOMEntity_getSystemId); +SWIGV8_AddMemberFunction(_exports_DOMEntity_class, "getNotationName", _wrap_DOMEntity_getNotationName); +SWIGV8_AddMemberFunction(_exports_DOMEntity_class, "getInputEncoding", _wrap_DOMEntity_getInputEncoding); +SWIGV8_AddMemberFunction(_exports_DOMEntity_class, "getXmlEncoding", _wrap_DOMEntity_getXmlEncoding); +SWIGV8_AddMemberFunction(_exports_DOMEntity_class, "getXmlVersion", _wrap_DOMEntity_getXmlVersion); +SWIGV8_AddMemberFunction(_exports_DOMDocumentType_class, "getName", _wrap_DOMDocumentType_getName); +SWIGV8_AddMemberFunction(_exports_DOMDocumentType_class, "getEntities", _wrap_DOMDocumentType_getEntities); +SWIGV8_AddMemberFunction(_exports_DOMDocumentType_class, "getNotations", _wrap_DOMDocumentType_getNotations); +SWIGV8_AddMemberFunction(_exports_DOMDocumentType_class, "getPublicId", _wrap_DOMDocumentType_getPublicId); +SWIGV8_AddMemberFunction(_exports_DOMDocumentType_class, "getSystemId", _wrap_DOMDocumentType_getSystemId); +SWIGV8_AddMemberFunction(_exports_DOMDocumentType_class, "getInternalSubset", _wrap_DOMDocumentType_getInternalSubset); +SWIGV8_AddMemberFunction(_exports_DOMCharacterData_class, "getData", _wrap_DOMCharacterData_getData); +SWIGV8_AddMemberFunction(_exports_DOMCharacterData_class, "getLength", _wrap_DOMCharacterData_getLength); +SWIGV8_AddMemberFunction(_exports_DOMCharacterData_class, "substringData", _wrap_DOMCharacterData_substringData); +SWIGV8_AddMemberFunction(_exports_DOMCharacterData_class, "appendData", _wrap_DOMCharacterData_appendData); +SWIGV8_AddMemberFunction(_exports_DOMCharacterData_class, "insertData", _wrap_DOMCharacterData_insertData); +SWIGV8_AddMemberFunction(_exports_DOMCharacterData_class, "deleteData", _wrap_DOMCharacterData_deleteData); +SWIGV8_AddMemberFunction(_exports_DOMCharacterData_class, "replaceData", _wrap_DOMCharacterData_replaceData); +SWIGV8_AddMemberFunction(_exports_DOMCharacterData_class, "setData", _wrap_DOMCharacterData_setData); +SWIGV8_AddMemberFunction(_exports_DOMText_class, "splitText", _wrap_DOMText_splitText); +SWIGV8_AddMemberFunction(_exports_DOMText_class, "getIsElementContentWhitespace", _wrap_DOMText_getIsElementContentWhitespace); +SWIGV8_AddMemberFunction(_exports_DOMText_class, "getWholeText", _wrap_DOMText_getWholeText); +SWIGV8_AddMemberFunction(_exports_DOMText_class, "replaceWholeText", _wrap_DOMText_replaceWholeText); +SWIGV8_AddMemberFunction(_exports_DOMText_class, "isIgnorableWhitespace", _wrap_DOMText_isIgnorableWhitespace); +SWIGV8_AddMemberFunction(_exports_DOMNodeList_class, "item", _wrap_DOMNodeList_item); +SWIGV8_AddMemberFunction(_exports_DOMNodeList_class, "getLength", _wrap_DOMNodeList_getLength); +SWIGV8_AddMemberFunction(_exports_DOMNamedNodeMap_class, "setNamedItem", _wrap_DOMNamedNodeMap_setNamedItem); +SWIGV8_AddMemberFunction(_exports_DOMNamedNodeMap_class, "item", _wrap_DOMNamedNodeMap_item); +SWIGV8_AddMemberFunction(_exports_DOMNamedNodeMap_class, "getNamedItem", _wrap_DOMNamedNodeMap_getNamedItem); +SWIGV8_AddMemberFunction(_exports_DOMNamedNodeMap_class, "getLength", _wrap_DOMNamedNodeMap_getLength); +SWIGV8_AddMemberFunction(_exports_DOMNamedNodeMap_class, "removeNamedItem", _wrap_DOMNamedNodeMap_removeNamedItem); +SWIGV8_AddMemberFunction(_exports_DOMNamedNodeMap_class, "getNamedItemNS", _wrap_DOMNamedNodeMap_getNamedItemNS); +SWIGV8_AddMemberFunction(_exports_DOMNamedNodeMap_class, "setNamedItemNS", _wrap_DOMNamedNodeMap_setNamedItemNS); +SWIGV8_AddMemberFunction(_exports_DOMNamedNodeMap_class, "removeNamedItemNS", _wrap_DOMNamedNodeMap_removeNamedItemNS); +SWIGV8_AddMemberFunction(_exports_DOMNotation_class, "getPublicId", _wrap_DOMNotation_getPublicId); +SWIGV8_AddMemberFunction(_exports_DOMNotation_class, "getSystemId", _wrap_DOMNotation_getSystemId); +SWIGV8_AddMemberFunction(_exports_DOMProcessingInstruction_class, "getTarget", _wrap_DOMProcessingInstruction_getTarget); +SWIGV8_AddMemberFunction(_exports_DOMProcessingInstruction_class, "getData", _wrap_DOMProcessingInstruction_getData); +SWIGV8_AddMemberFunction(_exports_DOMProcessingInstruction_class, "setData", _wrap_DOMProcessingInstruction_setData); +SWIGV8_AddMemberFunction(_exports_Event_class, "operator_equal_to", _wrap_Event_operator_equal_to); +SWIGV8_AddMemberFunction(_exports_Event_class, "operator_not_equal_to", _wrap_Event_operator_not_equal_to); +SWIGV8_AddMemberVariable(_exports_Event_class, "raw", _wrap_Event_raw_get, _wrap_Event_raw_set); +SWIGV8_AddMemberVariable(_exports_Event_class, "name", _wrap_Event_name_get, _wrap_Event_name_set); +SWIGV8_AddMemberVariable(_exports_Event_class, "eventType", _wrap_Event_eventType_get, _wrap_Event_eventType_set); + + + /* setup inheritances */ + if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata && !(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ.IsEmpty())) +{ +#if (SWIG_V8_VERSION < 0x031903) + _exports_DOMAttr_class->Inherit(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ); +#else + _exports_DOMAttr_class->Inherit( + v8::Local::New( + v8::Isolate::GetCurrent(), + static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ) + ); +#endif + +#ifdef SWIGRUNTIME_DEBUG + printf("Inheritance successful _exports_DOMAttr _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} else { +#ifdef SWIGRUNTIME_DEBUG + printf("Unable to inherit baseclass, it didn't exist _exports_DOMAttr _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata && !(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ.IsEmpty())) +{ +#if (SWIG_V8_VERSION < 0x031903) + _exports_DOMElement_class->Inherit(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ); +#else + _exports_DOMElement_class->Inherit( + v8::Local::New( + v8::Isolate::GetCurrent(), + static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ) + ); +#endif + +#ifdef SWIGRUNTIME_DEBUG + printf("Inheritance successful _exports_DOMElement _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} else { +#ifdef SWIGRUNTIME_DEBUG + printf("Unable to inherit baseclass, it didn't exist _exports_DOMElement _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata && !(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ.IsEmpty())) +{ +#if (SWIG_V8_VERSION < 0x031903) + _exports_DOMEntity_class->Inherit(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ); +#else + _exports_DOMEntity_class->Inherit( + v8::Local::New( + v8::Isolate::GetCurrent(), + static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ) + ); +#endif + +#ifdef SWIGRUNTIME_DEBUG + printf("Inheritance successful _exports_DOMEntity _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} else { +#ifdef SWIGRUNTIME_DEBUG + printf("Unable to inherit baseclass, it didn't exist _exports_DOMEntity _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata && !(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ.IsEmpty())) +{ +#if (SWIG_V8_VERSION < 0x031903) + _exports_DOMDocumentType_class->Inherit(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ); +#else + _exports_DOMDocumentType_class->Inherit( + v8::Local::New( + v8::Isolate::GetCurrent(), + static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ) + ); +#endif + +#ifdef SWIGRUNTIME_DEBUG + printf("Inheritance successful _exports_DOMDocumentType _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} else { +#ifdef SWIGRUNTIME_DEBUG + printf("Unable to inherit baseclass, it didn't exist _exports_DOMDocumentType _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata && !(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ.IsEmpty())) +{ +#if (SWIG_V8_VERSION < 0x031903) + _exports_DOMCharacterData_class->Inherit(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ); +#else + _exports_DOMCharacterData_class->Inherit( + v8::Local::New( + v8::Isolate::GetCurrent(), + static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ) + ); +#endif + +#ifdef SWIGRUNTIME_DEBUG + printf("Inheritance successful _exports_DOMCharacterData _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} else { +#ifdef SWIGRUNTIME_DEBUG + printf("Unable to inherit baseclass, it didn't exist _exports_DOMCharacterData _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata && !(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata)->class_templ.IsEmpty())) +{ +#if (SWIG_V8_VERSION < 0x031903) + _exports_DOMComment_class->Inherit(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata)->class_templ); +#else + _exports_DOMComment_class->Inherit( + v8::Local::New( + v8::Isolate::GetCurrent(), + static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata)->class_templ) + ); +#endif + +#ifdef SWIGRUNTIME_DEBUG + printf("Inheritance successful _exports_DOMComment _XERCES_CPP_NAMESPACE__DOMCharacterData\n"); +#endif +} else { +#ifdef SWIGRUNTIME_DEBUG + printf("Unable to inherit baseclass, it didn't exist _exports_DOMComment _XERCES_CPP_NAMESPACE__DOMCharacterData\n"); +#endif +} +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata && !(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata)->class_templ.IsEmpty())) +{ +#if (SWIG_V8_VERSION < 0x031903) + _exports_DOMText_class->Inherit(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata)->class_templ); +#else + _exports_DOMText_class->Inherit( + v8::Local::New( + v8::Isolate::GetCurrent(), + static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData->clientdata)->class_templ) + ); +#endif + +#ifdef SWIGRUNTIME_DEBUG + printf("Inheritance successful _exports_DOMText _XERCES_CPP_NAMESPACE__DOMCharacterData\n"); +#endif +} else { +#ifdef SWIGRUNTIME_DEBUG + printf("Unable to inherit baseclass, it didn't exist _exports_DOMText _XERCES_CPP_NAMESPACE__DOMCharacterData\n"); +#endif +} +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText->clientdata && !(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText->clientdata)->class_templ.IsEmpty())) +{ +#if (SWIG_V8_VERSION < 0x031903) + _exports_DOMCDATASection_class->Inherit(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText->clientdata)->class_templ); +#else + _exports_DOMCDATASection_class->Inherit( + v8::Local::New( + v8::Isolate::GetCurrent(), + static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText->clientdata)->class_templ) + ); +#endif + +#ifdef SWIGRUNTIME_DEBUG + printf("Inheritance successful _exports_DOMCDATASection _XERCES_CPP_NAMESPACE__DOMText\n"); +#endif +} else { +#ifdef SWIGRUNTIME_DEBUG + printf("Unable to inherit baseclass, it didn't exist _exports_DOMCDATASection _XERCES_CPP_NAMESPACE__DOMText\n"); +#endif +} +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata && !(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ.IsEmpty())) +{ +#if (SWIG_V8_VERSION < 0x031903) + _exports_DOMDocumentFragment_class->Inherit(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ); +#else + _exports_DOMDocumentFragment_class->Inherit( + v8::Local::New( + v8::Isolate::GetCurrent(), + static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ) + ); +#endif + +#ifdef SWIGRUNTIME_DEBUG + printf("Inheritance successful _exports_DOMDocumentFragment _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} else { +#ifdef SWIGRUNTIME_DEBUG + printf("Unable to inherit baseclass, it didn't exist _exports_DOMDocumentFragment _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata && !(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ.IsEmpty())) +{ +#if (SWIG_V8_VERSION < 0x031903) + _exports_DOMEntityReference_class->Inherit(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ); +#else + _exports_DOMEntityReference_class->Inherit( + v8::Local::New( + v8::Isolate::GetCurrent(), + static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ) + ); +#endif + +#ifdef SWIGRUNTIME_DEBUG + printf("Inheritance successful _exports_DOMEntityReference _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} else { +#ifdef SWIGRUNTIME_DEBUG + printf("Unable to inherit baseclass, it didn't exist _exports_DOMEntityReference _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata && !(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ.IsEmpty())) +{ +#if (SWIG_V8_VERSION < 0x031903) + _exports_DOMNotation_class->Inherit(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ); +#else + _exports_DOMNotation_class->Inherit( + v8::Local::New( + v8::Isolate::GetCurrent(), + static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ) + ); +#endif + +#ifdef SWIGRUNTIME_DEBUG + printf("Inheritance successful _exports_DOMNotation _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} else { +#ifdef SWIGRUNTIME_DEBUG + printf("Unable to inherit baseclass, it didn't exist _exports_DOMNotation _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} +if (SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata && !(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ.IsEmpty())) +{ +#if (SWIG_V8_VERSION < 0x031903) + _exports_DOMProcessingInstruction_class->Inherit(static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ); +#else + _exports_DOMProcessingInstruction_class->Inherit( + v8::Local::New( + v8::Isolate::GetCurrent(), + static_cast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->clientdata)->class_templ) + ); +#endif + +#ifdef SWIGRUNTIME_DEBUG + printf("Inheritance successful _exports_DOMProcessingInstruction _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} else { +#ifdef SWIGRUNTIME_DEBUG + printf("Unable to inherit baseclass, it didn't exist _exports_DOMProcessingInstruction _XERCES_CPP_NAMESPACE__DOMNode\n"); +#endif +} +if (SWIGTYPE_p_uscxml__Event->clientdata && !(static_cast(SWIGTYPE_p_uscxml__Event->clientdata)->class_templ.IsEmpty())) +{ +#if (SWIG_V8_VERSION < 0x031903) + _exports_ErrorEvent_class->Inherit(static_cast(SWIGTYPE_p_uscxml__Event->clientdata)->class_templ); +#else + _exports_ErrorEvent_class->Inherit( + v8::Local::New( + v8::Isolate::GetCurrent(), + static_cast(SWIGTYPE_p_uscxml__Event->clientdata)->class_templ) + ); +#endif + +#ifdef SWIGRUNTIME_DEBUG + printf("Inheritance successful _exports_ErrorEvent _uscxml__Event\n"); +#endif +} else { +#ifdef SWIGRUNTIME_DEBUG + printf("Unable to inherit baseclass, it didn't exist _exports_ErrorEvent _uscxml__Event\n"); +#endif +} + + + /* class instances */ + /* Class: DOMException (_exports_DOMException) */ +v8::Handle _exports_DOMException_class_0 = SWIGV8_CreateClassTemplate("DOMException"); +_exports_DOMException_class_0->SetCallHandler(_wrap_new_DOMException); +_exports_DOMException_class_0->Inherit(_exports_DOMException_class); +_exports_DOMException_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMException_obj = _exports_DOMException_class_0->GetFunction(); +/* Class: DOMNode (_exports_DOMNode) */ +v8::Handle _exports_DOMNode_class_0 = SWIGV8_CreateClassTemplate("DOMNode"); +_exports_DOMNode_class_0->SetCallHandler(_wrap_new_veto_DOMNode); +_exports_DOMNode_class_0->Inherit(_exports_DOMNode_class); +_exports_DOMNode_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMNode_obj = _exports_DOMNode_class_0->GetFunction(); +/* Class: DOMAttr (_exports_DOMAttr) */ +v8::Handle _exports_DOMAttr_class_0 = SWIGV8_CreateClassTemplate("DOMAttr"); +_exports_DOMAttr_class_0->SetCallHandler(_wrap_new_veto_DOMAttr); +_exports_DOMAttr_class_0->Inherit(_exports_DOMAttr_class); +_exports_DOMAttr_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMAttr_obj = _exports_DOMAttr_class_0->GetFunction(); +/* Class: DOMElement (_exports_DOMElement) */ +v8::Handle _exports_DOMElement_class_0 = SWIGV8_CreateClassTemplate("DOMElement"); +_exports_DOMElement_class_0->SetCallHandler(_wrap_new_veto_DOMElement); +_exports_DOMElement_class_0->Inherit(_exports_DOMElement_class); +_exports_DOMElement_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMElement_obj = _exports_DOMElement_class_0->GetFunction(); +/* Class: DOMEntity (_exports_DOMEntity) */ +v8::Handle _exports_DOMEntity_class_0 = SWIGV8_CreateClassTemplate("DOMEntity"); +_exports_DOMEntity_class_0->SetCallHandler(_wrap_new_veto_DOMEntity); +_exports_DOMEntity_class_0->Inherit(_exports_DOMEntity_class); +_exports_DOMEntity_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMEntity_obj = _exports_DOMEntity_class_0->GetFunction(); +/* Class: DOMDocumentType (_exports_DOMDocumentType) */ +v8::Handle _exports_DOMDocumentType_class_0 = SWIGV8_CreateClassTemplate("DOMDocumentType"); +_exports_DOMDocumentType_class_0->SetCallHandler(_wrap_new_veto_DOMDocumentType); +_exports_DOMDocumentType_class_0->Inherit(_exports_DOMDocumentType_class); +_exports_DOMDocumentType_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMDocumentType_obj = _exports_DOMDocumentType_class_0->GetFunction(); +/* Class: DOMCharacterData (_exports_DOMCharacterData) */ +v8::Handle _exports_DOMCharacterData_class_0 = SWIGV8_CreateClassTemplate("DOMCharacterData"); +_exports_DOMCharacterData_class_0->SetCallHandler(_wrap_new_veto_DOMCharacterData); +_exports_DOMCharacterData_class_0->Inherit(_exports_DOMCharacterData_class); +_exports_DOMCharacterData_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMCharacterData_obj = _exports_DOMCharacterData_class_0->GetFunction(); +/* Class: DOMComment (_exports_DOMComment) */ +v8::Handle _exports_DOMComment_class_0 = SWIGV8_CreateClassTemplate("DOMComment"); +_exports_DOMComment_class_0->SetCallHandler(_wrap_new_veto_DOMComment); +_exports_DOMComment_class_0->Inherit(_exports_DOMComment_class); +_exports_DOMComment_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMComment_obj = _exports_DOMComment_class_0->GetFunction(); +/* Class: DOMText (_exports_DOMText) */ +v8::Handle _exports_DOMText_class_0 = SWIGV8_CreateClassTemplate("DOMText"); +_exports_DOMText_class_0->SetCallHandler(_wrap_new_veto_DOMText); +_exports_DOMText_class_0->Inherit(_exports_DOMText_class); +_exports_DOMText_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMText_obj = _exports_DOMText_class_0->GetFunction(); +/* Class: DOMCDATASection (_exports_DOMCDATASection) */ +v8::Handle _exports_DOMCDATASection_class_0 = SWIGV8_CreateClassTemplate("DOMCDATASection"); +_exports_DOMCDATASection_class_0->SetCallHandler(_wrap_new_veto_DOMCDATASection); +_exports_DOMCDATASection_class_0->Inherit(_exports_DOMCDATASection_class); +_exports_DOMCDATASection_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMCDATASection_obj = _exports_DOMCDATASection_class_0->GetFunction(); +/* Class: DOMNodeList (_exports_DOMNodeList) */ +v8::Handle _exports_DOMNodeList_class_0 = SWIGV8_CreateClassTemplate("DOMNodeList"); +_exports_DOMNodeList_class_0->SetCallHandler(_wrap_new_veto_DOMNodeList); +_exports_DOMNodeList_class_0->Inherit(_exports_DOMNodeList_class); +_exports_DOMNodeList_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMNodeList_obj = _exports_DOMNodeList_class_0->GetFunction(); +/* Class: DOMNamedNodeMap (_exports_DOMNamedNodeMap) */ +v8::Handle _exports_DOMNamedNodeMap_class_0 = SWIGV8_CreateClassTemplate("DOMNamedNodeMap"); +_exports_DOMNamedNodeMap_class_0->SetCallHandler(_wrap_new_veto_DOMNamedNodeMap); +_exports_DOMNamedNodeMap_class_0->Inherit(_exports_DOMNamedNodeMap_class); +_exports_DOMNamedNodeMap_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMNamedNodeMap_obj = _exports_DOMNamedNodeMap_class_0->GetFunction(); +/* Class: DOMDocumentFragment (_exports_DOMDocumentFragment) */ +v8::Handle _exports_DOMDocumentFragment_class_0 = SWIGV8_CreateClassTemplate("DOMDocumentFragment"); +_exports_DOMDocumentFragment_class_0->SetCallHandler(_wrap_new_veto_DOMDocumentFragment); +_exports_DOMDocumentFragment_class_0->Inherit(_exports_DOMDocumentFragment_class); +_exports_DOMDocumentFragment_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMDocumentFragment_obj = _exports_DOMDocumentFragment_class_0->GetFunction(); +/* Class: DOMEntityReference (_exports_DOMEntityReference) */ +v8::Handle _exports_DOMEntityReference_class_0 = SWIGV8_CreateClassTemplate("DOMEntityReference"); +_exports_DOMEntityReference_class_0->SetCallHandler(_wrap_new_veto_DOMEntityReference); +_exports_DOMEntityReference_class_0->Inherit(_exports_DOMEntityReference_class); +_exports_DOMEntityReference_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMEntityReference_obj = _exports_DOMEntityReference_class_0->GetFunction(); +/* Class: DOMNotation (_exports_DOMNotation) */ +v8::Handle _exports_DOMNotation_class_0 = SWIGV8_CreateClassTemplate("DOMNotation"); +_exports_DOMNotation_class_0->SetCallHandler(_wrap_new_veto_DOMNotation); +_exports_DOMNotation_class_0->Inherit(_exports_DOMNotation_class); +_exports_DOMNotation_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMNotation_obj = _exports_DOMNotation_class_0->GetFunction(); +/* Class: DOMProcessingInstruction (_exports_DOMProcessingInstruction) */ +v8::Handle _exports_DOMProcessingInstruction_class_0 = SWIGV8_CreateClassTemplate("DOMProcessingInstruction"); +_exports_DOMProcessingInstruction_class_0->SetCallHandler(_wrap_new_veto_DOMProcessingInstruction); +_exports_DOMProcessingInstruction_class_0->Inherit(_exports_DOMProcessingInstruction_class); +_exports_DOMProcessingInstruction_class_0->SetHiddenPrototype(true); +v8::Handle _exports_DOMProcessingInstruction_obj = _exports_DOMProcessingInstruction_class_0->GetFunction(); +/* Class: Event (_exports_Event) */ +v8::Handle _exports_Event_class_0 = SWIGV8_CreateClassTemplate("Event"); +_exports_Event_class_0->SetCallHandler(_wrap_new_Event); +_exports_Event_class_0->Inherit(_exports_Event_class); +_exports_Event_class_0->SetHiddenPrototype(true); +v8::Handle _exports_Event_obj = _exports_Event_class_0->GetFunction(); +/* Class: ErrorEvent (_exports_ErrorEvent) */ +v8::Handle _exports_ErrorEvent_class_0 = SWIGV8_CreateClassTemplate("ErrorEvent"); +_exports_ErrorEvent_class_0->SetCallHandler(_wrap_new_ErrorEvent); +_exports_ErrorEvent_class_0->Inherit(_exports_ErrorEvent_class); +_exports_ErrorEvent_class_0->SetHiddenPrototype(true); +v8::Handle _exports_ErrorEvent_obj = _exports_ErrorEvent_class_0->GetFunction(); + + + /* add static class functions and variables */ + SWIGV8_AddStaticVariable(_exports_DOMException_obj, "INDEX_SIZE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INDEX_SIZE_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "DOMSTRING_SIZE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_DOMSTRING_SIZE_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "HIERARCHY_REQUEST_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_HIERARCHY_REQUEST_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "WRONG_DOCUMENT_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_WRONG_DOCUMENT_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "INVALID_CHARACTER_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_CHARACTER_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "NO_DATA_ALLOWED_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NO_DATA_ALLOWED_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "NO_MODIFICATION_ALLOWED_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NO_MODIFICATION_ALLOWED_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "NOT_FOUND_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NOT_FOUND_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "NOT_SUPPORTED_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NOT_SUPPORTED_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "INUSE_ATTRIBUTE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INUSE_ATTRIBUTE_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "INVALID_STATE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_STATE_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "SYNTAX_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_SYNTAX_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "INVALID_MODIFICATION_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_MODIFICATION_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "NAMESPACE_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_NAMESPACE_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "INVALID_ACCESS_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_INVALID_ACCESS_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "VALIDATION_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_VALIDATION_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMException_obj, "TYPE_MISMATCH_ERR", _wrap_XERCES_CPP_NAMESPACE_DOMException_TYPE_MISMATCH_ERR, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "ELEMENT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_ELEMENT_NODE, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "ATTRIBUTE_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_ATTRIBUTE_NODE, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "TEXT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_TEXT_NODE, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "CDATA_SECTION_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_CDATA_SECTION_NODE, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "ENTITY_REFERENCE_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_ENTITY_REFERENCE_NODE, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "ENTITY_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_ENTITY_NODE, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "PROCESSING_INSTRUCTION_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_PROCESSING_INSTRUCTION_NODE, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "COMMENT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_COMMENT_NODE, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "DOCUMENT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_NODE, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "DOCUMENT_TYPE_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_TYPE_NODE, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "DOCUMENT_FRAGMENT_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_FRAGMENT_NODE, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "NOTATION_NODE", _wrap_XERCES_CPP_NAMESPACE_DOMNode_NOTATION_NODE, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "DOCUMENT_POSITION_DISCONNECTED", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_DISCONNECTED, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "DOCUMENT_POSITION_PRECEDING", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_PRECEDING, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "DOCUMENT_POSITION_FOLLOWING", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_FOLLOWING, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "DOCUMENT_POSITION_CONTAINS", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_CONTAINS, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "DOCUMENT_POSITION_CONTAINED_BY", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_CONTAINED_BY, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_DOMNode_obj, "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", _wrap_XERCES_CPP_NAMESPACE_DOMNode_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_Event_obj, "INTERNAL", _wrap_uscxml_Event_INTERNAL, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_Event_obj, "EXTERNAL", _wrap_uscxml_Event_EXTERNAL, JS_veto_set_variable); +SWIGV8_AddStaticVariable(_exports_Event_obj, "PLATFORM", _wrap_uscxml_Event_PLATFORM, JS_veto_set_variable); +SWIGV8_AddStaticFunction(_exports_Event_obj, "getParam", _wrap_Event__wrap_Event_getParam); + + + /* register classes */ + exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMException"), _exports_DOMException_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMNode"), _exports_DOMNode_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMAttr"), _exports_DOMAttr_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMElement"), _exports_DOMElement_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMEntity"), _exports_DOMEntity_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMDocumentType"), _exports_DOMDocumentType_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMCharacterData"), _exports_DOMCharacterData_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMComment"), _exports_DOMComment_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMText"), _exports_DOMText_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMCDATASection"), _exports_DOMCDATASection_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMNodeList"), _exports_DOMNodeList_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMNamedNodeMap"), _exports_DOMNamedNodeMap_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMDocumentFragment"), _exports_DOMDocumentFragment_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMEntityReference"), _exports_DOMEntityReference_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMNotation"), _exports_DOMNotation_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("DOMProcessingInstruction"), _exports_DOMProcessingInstruction_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("Event"), _exports_Event_obj); +exports_obj->Set(SWIGV8_SYMBOL_NEW("ErrorEvent"), _exports_ErrorEvent_obj); + + + /* create and register namespace objects */ + +} + +#if defined(BUILDING_NODE_EXTENSION) +NODE_MODULE(V8DOM, V8DOM_initialize) +#endif diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h deleted file mode 100644 index dd0c18a..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h +++ /dev/null @@ -1,106 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef V8DOM_H_LKE1HKJK -#define V8DOM_H_LKE1HKJK - -#include "uscxml/Common.h" -#include "uscxml/Interpreter.h" -#include -#include -#include "../Storage.h" - -#define V8_DESTRUCTOR(type) \ -static void jsDestructor(v8::Persistent object, void* data) { \ - v8::HandleScope handleScope; \ - type* thing = static_cast(v8::Local::Cast(object->ToObject()->GetInternalField(0))->Value()); \ - delete thing->nativeObj; \ - delete thing; \ - object.Dispose(); \ - object.Clear(); \ -} - -#define V8_DESTRUCTOR_KEEP_WRAPPED(type) \ -static void jsDestructor(v8::Persistent object, void* data) { \ -v8::HandleScope handleScope; \ -type* thing = static_cast(v8::Local::Cast(object->ToObject()->GetInternalField(0))->Value()); \ -delete thing; \ -object.Dispose(); \ -object.Clear(); \ -} - -namespace Arabica { -namespace DOM { - -class V8DOM { -public: - V8DOM(); - virtual ~V8DOM(); - - template - static T* toClassPtr(v8::Local data) { - if(data.IsEmpty()) - return NULL; - else if(!data->IsExternal()) - return NULL; - else -// return v8::External::Cast(*data)->Value(); - return static_cast(v8::External::Unwrap(data)); - return NULL; - } - static v8::Local toExternal(void* pointer) { - v8::HandleScope scope; - return scope.Close(v8::External::New(pointer)); -// return v8::External::New(pointer); - } - - uscxml::NameSpaceInfo* nsInfo; - Arabica::XPath::XPath* xpath; - uscxml::Storage* storage; -}; - -class V8Exception : public std::runtime_error { -public: - - V8Exception(const std::string& reason) : - std::runtime_error("DOMException") { - } // V8Exception - - V8Exception(const V8Exception& rhs) : - std::runtime_error(rhs), - reason_(rhs.reason_) { - } // DOMException - - virtual ~V8Exception() throw() { - } // DOMBadCast - - virtual const char* what() const throw() { - return reason_.c_str(); - } // what - -private: - DOMBadCast& operator=(const DOMBadCast&); - bool operator==(const DOMBadCast&) const; - - std::string reason_; -}; // class DOMException - -} -} -#endif /* end of include guard: V8DOM_H_LKE1HKJK */ diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp index 85ae0cd..8b2bb04 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp @@ -23,74 +23,50 @@ */ #include "uscxml/Common.h" -#include "uscxml/config.h" -#include "V8DataModel.h" -#include "V8DOM.h" -#include "dom/V8Document.h" -#include "dom/V8Node.h" -#include "dom/V8Element.h" -#include "dom/V8Text.h" -#include "dom/V8CDATASection.h" -#include "dom/V8SCXMLEvent.h" - -#include "dom/V8ArrayBuffer.h" -#include "dom/V8Int8Array.h" -#include "dom/V8Uint8Array.h" -#include "dom/V8Uint8ClampedArray.h" -#include "dom/V8Int16Array.h" -#include "dom/V8Uint16Array.h" -#include "dom/V8Int32Array.h" -#include "dom/V8Uint32Array.h" -#include "dom/V8Float32Array.h" -#include "dom/V8Float64Array.h" -#include "dom/V8DataView.h" - -#include "uscxml/Message.h" -#include "uscxml/dom/DOMUtils.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif +#include "uscxml/util/URL.h" +#include "uscxml/util/String.h" -#define TO_V8_DOMVALUE(type) \ -v8::Handle retCtor = V8##type::getTmpl()->GetFunction();\ -v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance());\ -struct V8##type::V8##type##Private* retPrivData = new V8##type::V8##type##Private();\ -retPrivData->dom = _dom;\ -retPrivData->nativeObj = new type(node);\ -retObj->SetInternalField(0, V8DOM::toExternal(retPrivData));\ -retObj.MakeWeak(0, V8##type::jsDestructor);\ -return retObj; +#include "V8DataModel.h" +//#include "V8SCXMLEvent.h" +#include "uscxml/messages/Event.h" +#include "uscxml/util/DOM.h" +#include -namespace uscxml { +using namespace xercesc; -using namespace Arabica::XPath; -using namespace Arabica::DOM; +static v8::Local XMLString2JS(const XMLCh* input) { + char* res = xercesc::XMLString::transcode(input); + v8::Local handle = v8::String::New(res); + return handle; +} -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new V8DataModelProvider() ); - return true; +static XMLCh* JS2XMLString(const v8::Local& value) { + v8::String::AsciiValue s(value); + XMLCh* ret = xercesc::XMLString::transcode(*s); + return(ret); } -#endif -V8DataModel::V8DataModel() : _ioProcessorsAreSet(false), _invokersAreSet(false) { +// javascript magic here + +#define SWIG_V8_VERSION 0x034000 +#include "V8DOM.cpp.inc" + +namespace uscxml { + +V8DataModel::V8DataModel() { // _contexts.push_back(v8::Context::New()); } V8DataModel::~V8DataModel() { - while(_contexts.size() > 0) { - _contexts.back().Dispose(); - _contexts.pop_back(); - } - if (_dom) - delete _dom; + _context.Dispose(); +// if (_isolate != NULL) { +// _isolate->Dispose(); +// } } void V8DataModel::addExtension(DataModelExtension* ext) { +#if 0 if (_extensions.find(ext) != _extensions.end()) return; @@ -100,7 +76,7 @@ void V8DataModel::addExtension(DataModelExtension* ext) { v8::Locker locker; v8::HandleScope scope; v8::Context::Scope contextScope(_contexts.front()); - v8::Handle currScope = _contexts.front()->Global(); + v8::Local currScope = _contexts.front()->Global(); std::list locPath = tokenize(ext->provides(), '.'); std::list::iterator locIter = locPath.begin(); @@ -126,9 +102,11 @@ void V8DataModel::addExtension(DataModelExtension* ext) { break; } } +#endif } -v8::Handle V8DataModel::jsExtension(const v8::Arguments& args) { +void V8DataModel::jsExtension(const v8::FunctionCallbackInfo& info) { +#if 0 DataModelExtension* extension = static_cast(v8::External::Unwrap(args.Data())); v8::Local memberJS; @@ -151,33 +129,101 @@ v8::Handle V8DataModel::jsExtension(const v8::Arguments& args) { return ((V8DataModel*)(extension->dm))->getDataAsValue(extension->getValueOf(memberName)); } return v8::Undefined(); +#endif } -boost::shared_ptr V8DataModel::create(InterpreterInfo* interpreter) { - boost::shared_ptr dm = boost::shared_ptr(new V8DataModel()); - dm->_interpreter = interpreter; - v8::Locker locker; - v8::HandleScope scope; +std::mutex V8DataModel::_initMutex; + +v8::Isolate* V8DataModel::_isolate = NULL; + +void V8NodeListIndexedPropertyHandler(uint32_t index, const v8::PropertyCallbackInfo& info) { + xercesc::DOMNodeList* list; + SWIG_V8_GetInstancePtr(info.Holder(), (void**)&list); + + if (list->getLength() >= index) { + xercesc::DOMNode* node = list->item(index); + + v8::Handle val = SWIG_NewPointerObj(SWIG_as_voidptr(node), SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, SWIG_as_voidptrptr(&node)), 0 | 0 ); + info.GetReturnValue().Set(val); + return; + } + info.GetReturnValue().Set(v8::Undefined()); - dm->_dom = new V8DOM(); -// dom->interpreter = interpreter; - dm->_dom->xpath = new XPath(); - dm->_dom->xpath->setNamespaceContext(*interpreter->getNameSpaceInfo().getNSContext()); - dm->_dom->storage = new Storage(URL::getResourceDir() + PATH_SEPERATOR + interpreter->getName() + ".storage"); - dm->_dom->nsInfo = new NameSpaceInfo(interpreter->getNameSpaceInfo()); - // see http://stackoverflow.com/questions/3171418/v8-functiontemplate-class-instance +} + +std::shared_ptr V8DataModel::create(DataModelCallbacks* callbacks) { + std::shared_ptr dm(new V8DataModel()); + dm->_callbacks = callbacks; + + // TODO: we cannot use one isolate per thread as swig's type will be unknown :( + // We could register them by hand and avoid the _export_ globals in swig? + if (dm->_isolate == NULL) { + dm->_isolate = v8::Isolate::New(); + } + + v8::Locker locker(dm->_isolate); + v8::Isolate::Scope isoScope(dm->_isolate); + + // Create a handle scope to hold the temporary references. + v8::HandleScope scope(dm->_isolate); + + // Create a template for the global object where we set the built-in global functions. + v8::Local global = v8::ObjectTemplate::New(); // some free functions - v8::Handle global = v8::ObjectTemplate::New(); - global->Set(v8::String::New("In"), v8::FunctionTemplate::New(jsIn, v8::External::New(reinterpret_cast(dm.get()))), v8::ReadOnly); - global->Set(v8::String::New("print"), v8::FunctionTemplate::New(jsPrint, v8::External::New(reinterpret_cast(dm.get()))), v8::ReadOnly); + global->Set(v8::String::NewSymbol("print"), + v8::FunctionTemplate::New(dm->_isolate, jsPrint,v8::External::New(reinterpret_cast(dm.get())))); + global->Set(v8::String::NewSymbol("In"), + v8::FunctionTemplate::New(dm->_isolate, jsIn, v8::External::New(reinterpret_cast(dm.get())))); + + v8::Local context = v8::Context::New(dm->_isolate, NULL, global); + + dm->_context.Reset(dm->_isolate, context); - v8::Persistent context = v8::Context::New(0, global); + // Enter the new context so all the following operations take place within it. v8::Context::Scope contextScope(context); + assert(dm->_isolate->GetCurrentContext() == context); + + // not thread safe! + { + std::lock_guard lock(_initMutex); + SWIGV8_INIT(context->Global()); + + // register subscript operator with nodelist + v8::Handle _exports_DOMNodeList_class = SWIGV8_CreateClassTemplate("_exports_DOMNodeList"); + + _exports_DOMNodeList_class->InstanceTemplate()->SetIndexedPropertyHandler(V8NodeListIndexedPropertyHandler); + SWIGV8_AddMemberFunction(_exports_DOMNodeList_class, "item", _wrap_DOMNodeList_item); + SWIGV8_AddMemberFunction(_exports_DOMNodeList_class, "getLength", _wrap_DOMNodeList_getLength); + + SWIGV8_SET_CLASS_TEMPL(_exports_DOMNodeList_clientData.class_templ, _exports_DOMNodeList_class); + + } + + context->Global()->SetAccessor(v8::String::NewSymbol("_sessionid"), + V8DataModel::getAttribute, + V8DataModel::setWithException, + v8::String::New(callbacks->getSessionId().c_str())); + context->Global()->SetAccessor(v8::String::NewSymbol("_name"), + V8DataModel::getAttribute, + V8DataModel::setWithException, + v8::String::New(callbacks->getName().c_str())); + context->Global()->SetAccessor(v8::String::NewSymbol("_ioprocessors"), + V8DataModel::getIOProcessors, + V8DataModel::setWithException, + v8::External::New(reinterpret_cast(dm.get()))); + context->Global()->SetAccessor(v8::String::NewSymbol("_invokers"), + V8DataModel::getInvokers, + V8DataModel::setWithException, + v8::External::New(reinterpret_cast(dm.get()))); + +// v8::Persistent > persistent(_isolate, context); + +#if 0 // instantiate the document function - v8::Handle docCtor = V8Document::getTmpl()->GetFunction(); - v8::Handle docObj = docCtor->NewInstance(); + v8::Local docCtor = V8Document::getTmpl()->GetFunction(); + v8::Local docObj = docCtor->NewInstance(); V8Document::V8DocumentPrivate* privData = new V8Document::V8DocumentPrivate(); privData->nativeObj = new Document(interpreter->getDocument()); @@ -200,169 +246,209 @@ boost::shared_ptr V8DataModel::create(InterpreterInfo* interprete context->Global()->Set(v8::String::New("DataView"), V8DataView::getConstructor()->GetFunction()); - context->Global()->SetAccessor(v8::String::New("_sessionid"), - V8DataModel::getAttribute, - V8DataModel::setWithException, - v8::String::New(interpreter->getSessionId().c_str())); - context->Global()->SetAccessor(v8::String::New("_name"), - V8DataModel::getAttribute, - V8DataModel::setWithException, - v8::String::New(interpreter->getName().c_str())); - context->Global()->SetAccessor(v8::String::New("_ioprocessors"), - V8DataModel::getIOProcessors, - V8DataModel::setWithException, - v8::External::New(reinterpret_cast(dm.get()))); - context->Global()->SetAccessor(v8::String::New("_invokers"), - V8DataModel::getInvokers, - V8DataModel::setWithException, - v8::External::New(reinterpret_cast(dm.get()))); - - dm->_contexts.push_back(context); // instantiate objects - we have to have a context for that! dm->eval(Element(), "_x = {};"); +#endif return dm; } -v8::Handle V8DataModel::getAttribute(v8::Local property, const v8::AccessorInfo& info) { - return info.Data(); +void V8DataModel::getAttribute(v8::Local property, const v8::PropertyCallbackInfo& info) { + info.GetReturnValue().Set(info.Data()); } -void V8DataModel::setWithException(v8::Local property, v8::Local value, const v8::AccessorInfo& info) { +void V8DataModel::setWithException(v8::Local property, + v8::Local value, + const v8::PropertyCallbackInfo& info) { v8::String::AsciiValue data(property); std::string msg = "Cannot set " + std::string(*data); v8::ThrowException(v8::Exception::ReferenceError(v8::String::New(msg.c_str()))); } -v8::Handle V8DataModel::getIOProcessors(v8::Local property, const v8::AccessorInfo& info) { - V8DataModel* dataModel = V8DOM::toClassPtr(info.Data()); +void V8DataModel::getIOProcessors(v8::Local property, const v8::PropertyCallbackInfo& info) { + v8::Local field = v8::Local::Cast(info.Data()); + V8DataModel* dataModel = (V8DataModel*)field->Value(); + + if (dataModel->_ioProcessors.IsEmpty()) { - if (!dataModel->_ioProcessorsAreSet) { - dataModel->_ioProcessors = v8::Persistent::New(v8::Object::New()); - //v8::Handle ioProcessorObj = v8::Object::New(); - std::map ioProcessors = dataModel->_interpreter->getIOProcessors(); + v8::Local ioProcs = v8::Local::New(v8::Isolate::GetCurrent(), v8::Object::New()); + //v8::Local ioProcessorObj = v8::Object::New(); + std::map ioProcessors = dataModel->_callbacks->getIOProcessors(); std::map::const_iterator ioProcIter = ioProcessors.begin(); while(ioProcIter != ioProcessors.end()) { // std::cout << ioProcIter->first << std::endl; - dataModel->_ioProcessors->Set(v8::String::New(ioProcIter->first.c_str()), - dataModel->getDataAsValue(ioProcIter->second.getDataModelVariables())); + ioProcs->Set(v8::String::New(ioProcIter->first.c_str()), + dataModel->getDataAsValue(ioProcIter->second.getDataModelVariables())); ioProcIter++; } - dataModel->_ioProcessorsAreSet = true; + dataModel->_ioProcessors.Reset(v8::Isolate::GetCurrent(), ioProcs); } - return dataModel->_ioProcessors; + info.GetReturnValue().Set(dataModel->_ioProcessors); } -v8::Handle V8DataModel::getInvokers(v8::Local property, const v8::AccessorInfo& info) { - V8DataModel* dataModel = V8DOM::toClassPtr(info.Data()); +void V8DataModel::getInvokers(v8::Local property, const v8::PropertyCallbackInfo& info) { + v8::Local field = v8::Local::Cast(info.Data()); + V8DataModel* dataModel = (V8DataModel*)field->Value(); - if (!dataModel->_invokersAreSet) { - dataModel->_invokers = v8::Persistent::New(v8::Object::New()); - //v8::Handle ioProcessorObj = v8::Object::New(); - std::map invokers = dataModel->_interpreter->getInvokers(); + if (dataModel->_invokers.IsEmpty()) { + v8::Local invoks = v8::Local::New(v8::Isolate::GetCurrent(), v8::Object::New()); + //v8::Local ioProcessorObj = v8::Object::New(); + std::map invokers = dataModel->_callbacks->getInvokers(); std::map::const_iterator invokerIter = invokers.begin(); while(invokerIter != invokers.end()) { // std::cout << ioProcIter->first << std::endl; - dataModel->_invokers->Set(v8::String::New(invokerIter->first.c_str()), - dataModel->getDataAsValue(invokerIter->second.getDataModelVariables())); + invoks->Set(v8::String::New(invokerIter->first.c_str()), + dataModel->getDataAsValue(invokerIter->second.getDataModelVariables())); invokerIter++; } - dataModel->_invokersAreSet = true; + dataModel->_invokers.Reset(v8::Isolate::GetCurrent(), invoks); } - return dataModel->_invokers; + info.GetReturnValue().Set(dataModel->_invokers); } -void V8DataModel::pushContext() { - _contexts.push_back(_contexts.back().New(_contexts.back())); -} +void V8DataModel::setEvent(const Event& event) { + + v8::Locker locker(_isolate); + v8::Isolate::Scope isoScope(_isolate); -void V8DataModel::popContext() { - if (_contexts.size() > 1) { - _contexts.back().Dispose(); - _contexts.pop_back(); + v8::HandleScope scope(_isolate); + v8::Local ctx = v8::Local::New(_isolate, _context); + + v8::Local global = ctx->Global(); + v8::Context::Scope contextScope(ctx); // segfaults at newinstance without! + assert(_isolate->GetCurrentContext() == ctx); // only valid in context::scope + + +#if 0 + // this would work as swig_exports_ will get redefined per isolate + { + std::lock_guard lock(_initMutex); + SWIGV8_INIT(context->Global()); } -} +#endif -void V8DataModel::initialize() { -} + Event* evPtr = new Event(event); -void V8DataModel::setEvent(const Event& event) { - v8::Locker locker; - v8::HandleScope handleScope; - v8::Context::Scope contextScope(_contexts.front()); - v8::Handle global = _contexts.front()->Global(); +// v8::Handle classTmpl = v8::Local::New(_isolate, V8SCXMLEvent::getTmpl()); +// v8::Local eventObj = classTmpl->InstanceTemplate()->NewInstance(); +// eventObj->SetAlignedPointerInInternalField(0, (void*)evPtr); +// assert(eventObj->GetAlignedPointerFromInternalField(0) == evPtr); - v8::Handle eventCtor = V8SCXMLEvent::getTmpl()->GetFunction(); - v8::Persistent eventObj = v8::Persistent::New(eventCtor->NewInstance()); + v8::Local eventVal = SWIG_V8_NewPointerObj(evPtr, SWIGTYPE_p_uscxml__Event, SWIG_POINTER_OWN); + v8::Local eventObj = v8::Local::Cast(eventVal); - V8SCXMLEvent::V8SCXMLEventPrivate* privData = new V8SCXMLEvent::V8SCXMLEventPrivate(); - privData->nativeObj = new Event(event); - privData->dom = _dom; - eventObj->SetInternalField(0, V8DOM::toExternal(privData)); - eventObj.MakeWeak(0, V8SCXMLEvent::jsDestructor); + /* + v8::Local properties = eventObj->GetPropertyNames(); + for (int i = 0; i < properties->Length(); i++) { + assert(properties->Get(i)->IsString()); + v8::String::AsciiValue key(v8::Local::Cast(properties->Get(i))); + std::cout << *key << std::endl; + } + */ + + // test333 + if (event.origintype.size() > 0) { + eventObj->Set(v8::String::NewSymbol("origintype"),v8::String::NewFromUtf8(_isolate, event.origintype.c_str())); + } else { + eventObj->Set(v8::String::NewSymbol("origintype"),v8::Undefined(_isolate)); + } + // test335 + if (event.origin.size() > 0) { + eventObj->Set(v8::String::NewSymbol("origin"),v8::String::NewFromUtf8(_isolate, event.origin.c_str())); + } else { + eventObj->Set(v8::String::NewSymbol("origin"),v8::Undefined(_isolate)); + } + // test337 + if (!event.hideSendId) { + eventObj->Set(v8::String::NewSymbol("sendid"),v8::String::NewFromUtf8(_isolate, event.sendid.c_str())); + } else { + eventObj->Set(v8::String::NewSymbol("sendid"),v8::Undefined(_isolate)); + } + // test339 + if (event.invokeid.size() > 0) { + eventObj->Set(v8::String::NewSymbol("invokeid"),v8::String::NewFromUtf8(_isolate, event.invokeid.c_str())); + } else { + eventObj->Set(v8::String::NewSymbol("invokeid"),v8::Undefined(_isolate)); + } - if (event.raw.size() == 0) { - std::stringstream ssRaw; - ssRaw << event; - privData->nativeObj->raw = ssRaw.str(); + // test 331 + switch (event.eventType) { + case Event::EXTERNAL: + eventObj->Set(v8::String::NewSymbol("type"), v8::String::NewFromUtf8(_isolate, "external")); + break; + case Event::INTERNAL: + eventObj->Set(v8::String::NewSymbol("type"), v8::String::NewFromUtf8(_isolate, "internal")); + break; + case Event::PLATFORM: + eventObj->Set(v8::String::NewSymbol("type"), v8::String::NewFromUtf8(_isolate, "platform")); + break; } - if (event.dom) { - eventObj->Set(v8::String::New("data"), getNodeAsValue(event.dom)); - } else if (event.content.length() > 0) { - // _event.data is a string or JSON - Data json = Data::fromJSON(event.content); - if (!json.empty()) { - eventObj->Set(v8::String::New("data"), getDataAsValue(json)); - } else { - eventObj->Set(v8::String::New("data"), v8::String::New(spaceNormalize(event.content).c_str())); - } + if (event.data.node) { + eventObj->Set(v8::String::NewSymbol("data"), getNodeAsValue(event.data.node)); } else { // _event.data is KVP - Event eventCopy(event); - if (!eventCopy.params.empty()) { - Event::params_t::iterator paramIter = eventCopy.params.begin(); - while(paramIter != eventCopy.params.end()) { - eventCopy.data.compound[paramIter->first] = paramIter->second; + Data data = event.data; + if (!event.params.empty()) { + Event::params_t::const_iterator paramIter = event.params.begin(); + while(paramIter != event.params.end()) { + data.compound[paramIter->first] = paramIter->second; paramIter++; } } - if (!eventCopy.namelist.empty()) { - Event::namelist_t::iterator nameListIter = eventCopy.namelist.begin(); - while(nameListIter != eventCopy.namelist.end()) { - eventCopy.data.compound[nameListIter->first] = nameListIter->second; + if (!event.namelist.empty()) { + Event::namelist_t::const_iterator nameListIter = event.namelist.begin(); + while(nameListIter != event.namelist.end()) { + data.compound[nameListIter->first] = nameListIter->second; nameListIter++; } } - if (!eventCopy.data.empty()) { + if (!data.empty()) { // std::cout << Data::toJSON(eventCopy.data); - eventObj->Set(v8::String::New("data"), getDataAsValue(eventCopy.data)); // set data part of _event + eventObj->Set(v8::String::NewSymbol("data"), getDataAsValue(data)); // set data part of _event } else { // test 343 / test 488 - eventObj->Set(v8::String::New("data"), v8::Undefined()); // set data part of _event + eventObj->Set(v8::String::NewSymbol("data"), v8::Undefined()); // set data part of _event } } // we cannot make _event v8::ReadOnly as it will ignore subsequent setEvents - global->Set(v8::String::New("_event"), eventObj); + global->Set(v8::String::NewSymbol("_event"), eventObj); + _event.Reset(_isolate, eventObj); } -Data V8DataModel::getStringAsData(const std::string& content) { - v8::Locker locker; - v8::HandleScope handleScope; - v8::Context::Scope contextScope(_contexts.front()); - v8::Handle result = evalAsValue(content); +Data V8DataModel::getAsData(const std::string& content) { + return Data::fromJSON(content); +} + +Data V8DataModel::evalAsData(const std::string& content) { + v8::Locker locker(_isolate); + v8::Isolate::Scope isoScope(_isolate); + + v8::HandleScope scope(_isolate); + v8::Local ctx = v8::Local::New(_isolate, _context); + v8::Context::Scope contextScope(ctx); // segfaults at newinstance without! + + v8::Local result = evalAsValue(content); Data data = getValueAsData(result); return data; } -Data V8DataModel::getValueAsData(const v8::Handle& value) { +Data V8DataModel::getValueAsData(const v8::Local& value) { + v8::Locker locker(_isolate); + v8::Isolate::Scope isoScope(_isolate); + v8::HandleScope scope(_isolate); + std::set foo = std::set(); return getValueAsData(value, foo); } -Data V8DataModel::getValueAsData(const v8::Handle& value, std::set& alreadySeen) { +Data V8DataModel::getValueAsData(const v8::Local& value, std::set& alreadySeen) { + + v8::Local ctx = v8::Local::New(_isolate, _context); + v8::Context::Scope contextScope(ctx); // segfaults at newinstance without! + Data data; /// TODO: Breaking cycles does not work yet @@ -372,7 +458,7 @@ Data V8DataModel::getValueAsData(const v8::Handle& value, std::setIsArray()) { - v8::Handle array = v8::Handle::Cast(value); + v8::Local array = v8::Local::Cast(value); for (int i = 0; i < array->Length(); i++) { data.array.push_back(getValueAsData(array->Get(i), alreadySeen)); } @@ -396,33 +482,36 @@ Data V8DataModel::getValueAsData(const v8::Handle& value, std::setIsNull()) { LOG(ERROR) << "IsNull is unimplemented" << std::endl; } else if (value->IsNumber()) { - v8::String::AsciiValue prop(v8::Handle::Cast(v8::Handle::Cast(value))); + v8::String::AsciiValue prop(v8::Local::Cast(v8::Local::Cast(value))); data.atom = *prop; } else if (value->IsNumberObject()) { LOG(ERROR) << "IsNumberObject is unimplemented" << std::endl; } else if (value->IsObject()) { - if (V8ArrayBuffer::hasInstance(value)) { - uscxml::V8ArrayBuffer::V8ArrayBufferPrivate* privObj = V8DOM::toClassPtr(value->ToObject()->GetInternalField(0)); - data.binary = privObj->nativeObj->_blob; - return data; - } - if (V8Node::hasInstance(value)) { - uscxml::V8Node::V8NodePrivate* privObj = V8DOM::toClassPtr(value->ToObject()->GetInternalField(0)); - data.node = *privObj->nativeObj; + +// if (V8ArrayBuffer::hasInstance(value)) { +// uscxml::V8ArrayBuffer::V8ArrayBufferPrivate* privObj = V8DOM::toClassPtr(value->ToObject()->GetInternalField(0)); +// data.binary = privObj->nativeObj->_blob; +// return data; +// } + + v8::Local tmpl = v8::Local::New(_isolate, _exports_DOMNode_clientData.class_templ); + if (tmpl->HasInstance(value)) { + SWIG_V8_GetInstancePtr(value, (void**)&(data.node)); return data; } - v8::Handle object = v8::Handle::Cast(value); + + v8::Local object = v8::Local::Cast(value); v8::Local properties = object->GetPropertyNames(); for (int i = 0; i < properties->Length(); i++) { assert(properties->Get(i)->IsString()); - v8::String::AsciiValue key(v8::Handle::Cast(properties->Get(i))); + v8::String::AsciiValue key(v8::Local::Cast(properties->Get(i))); v8::Local property = object->Get(properties->Get(i)); data.compound[*key] = getValueAsData(property, alreadySeen); } } else if (value->IsRegExp()) { LOG(ERROR) << "IsRegExp is unimplemented" << std::endl; } else if(value->IsString()) { - v8::String::AsciiValue property(v8::Handle::Cast(value)); + v8::String::AsciiValue property(v8::Local::Cast(value)); data.atom = *property; data.type = Data::VERBATIM; } else if(value->IsStringObject()) { @@ -433,45 +522,32 @@ Data V8DataModel::getValueAsData(const v8::Handle& value, std::setIsUndefined()) { data.atom = "undefined"; + } else { + LOG(ERROR) << "Value's type is unknown!" << std::endl; } return data; } -v8::Handle V8DataModel::getNodeAsValue(const Node& node) { - - switch (node.getNodeType()) { - case Node_base::ELEMENT_NODE: { - TO_V8_DOMVALUE(Element); - } - case Node_base::TEXT_NODE: { - TO_V8_DOMVALUE(Text); - } - case Node_base::CDATA_SECTION_NODE: { - TO_V8_DOMVALUE(CDATASection); - } - case Node_base::DOCUMENT_NODE: { - TO_V8_DOMVALUE(Document); - } - default: { - TO_V8_DOMVALUE(Node); - } - } - +v8::Local V8DataModel::getNodeAsValue(const xercesc::DOMNode* node) { + return SWIG_NewPointerObj(SWIG_as_voidptr(node), + SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, + SWIG_as_voidptrptr(&node)), + 0); } -v8::Handle V8DataModel::getDataAsValue(const Data& data) { +v8::Local V8DataModel::getDataAsValue(const Data& data) { + if (data.compound.size() > 0) { - v8::Handle value = v8::Object::New(); + v8::Local value = v8::Object::New(); std::map::const_iterator compoundIter = data.compound.begin(); while(compoundIter != data.compound.end()) { -// std::cout << compoundIter->first.c_str() << std::endl; - value->Set(v8::String::New(compoundIter->first.c_str()), getDataAsValue(compoundIter->second)); + value->Set(v8::String::NewSymbol(compoundIter->first.c_str()), getDataAsValue(compoundIter->second)); compoundIter++; } return value; } if (data.array.size() > 0) { - v8::Handle value = v8::Array::New(); + v8::Local value = v8::Array::New(_isolate, data.array.size()); std::list::const_iterator arrayIter = data.array.begin(); uint32_t index = 0; while(arrayIter != data.array.end()) { @@ -490,61 +566,55 @@ v8::Handle V8DataModel::getDataAsValue(const Data& data) { break; } } - if (data.binary) { - uscxml::ArrayBuffer* arrBuffer = new uscxml::ArrayBuffer(data.binary); - v8::Handle retCtor = V8ArrayBuffer::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8ArrayBuffer::V8ArrayBufferPrivate* retPrivData = new V8ArrayBuffer::V8ArrayBufferPrivate(); - retPrivData->nativeObj = arrBuffer; - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8ArrayBuffer::jsDestructor); - return retObj; - } + if (data.node) { + return getNodeAsValue(data.node); + } + +// if (data.binary) { +// uscxml::ArrayBuffer* arrBuffer = new uscxml::ArrayBuffer(data.binary); +// v8::Local retCtor = V8ArrayBuffer::getTmpl()->GetFunction(); +// v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); +// +// struct V8ArrayBuffer::V8ArrayBufferPrivate* retPrivData = new V8ArrayBuffer::V8ArrayBufferPrivate(); +// retPrivData->nativeObj = arrBuffer; +// retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); +// +// retObj.MakeWeak(0, V8ArrayBuffer::jsDestructor); +// return retObj; +// } // this will never be reached return v8::Undefined(); } -v8::Handle V8DataModel::jsPrint(const v8::Arguments& args) { - if (args.Length() > 0) { - v8::String::AsciiValue printMsg(args[0]->ToString()); +void V8DataModel::jsPrint(const v8::FunctionCallbackInfo& info) { + if (info.Length() > 0) { + v8::String::AsciiValue printMsg(info[0]->ToString()); std::cout << *printMsg; } - return v8::Undefined(); } -v8::Handle V8DataModel::jsIn(const v8::Arguments& args) { - V8DataModel* INSTANCE = static_cast(v8::External::Unwrap(args.Data())); - for (unsigned int i = 0; i < args.Length(); i++) { - if (args[i]->IsString()) { - std::string stateName(*v8::String::AsciiValue(args[i]->ToString())); - if (INSTANCE->_interpreter->isInState(stateName)) { +void V8DataModel::jsIn(const v8::FunctionCallbackInfo& info) { + v8::Local field = v8::Local::Cast(info.Data()); + V8DataModel* dataModel = (V8DataModel*)field->Value(); + + for (unsigned int i = 0; i < info.Length(); i++) { + if (info[i]->IsString()) { + std::string stateName(*v8::String::AsciiValue(info[i]->ToString())); + if (dataModel->_callbacks->isInState(stateName)) { continue; } } - return v8::Boolean::New(false); + info.GetReturnValue().Set(false); + return; } - return v8::Boolean::New(true); -} - -bool V8DataModel::validate(const std::string& location, const std::string& schema) { - return true; -} - -bool V8DataModel::isLocation(const std::string& expr) { - // location needs to be RHS and ++ is only valid for RHS - return isValidSyntax(expr + "++"); + info.GetReturnValue().Set(true); } bool V8DataModel::isValidSyntax(const std::string& expr) { - v8::Locker locker; - v8::HandleScope handleScope; v8::TryCatch tryCatch; - v8::Context::Scope contextScope(_contexts.back()); - v8::Handle source = v8::String::New(expr.c_str()); - v8::Handle script = v8::Script::Compile(source); + v8::Local source = v8::String::New(expr.c_str()); + v8::Local script = v8::Script::Compile(source); if (script.IsEmpty() || tryCatch.HasCaught()) { return false; @@ -554,19 +624,18 @@ bool V8DataModel::isValidSyntax(const std::string& expr) { } uint32_t V8DataModel::getLength(const std::string& expr) { - v8::Locker locker; - v8::HandleScope handleScope; - v8::TryCatch tryCatch; - v8::Context::Scope contextScope(_contexts.back()); - v8::Handle result = evalAsValue(expr); + v8::Locker locker(_isolate); + v8::Isolate::Scope isoScope(_isolate); + v8::HandleScope scope(_isolate); + + v8::Local ctx = v8::Local::New(_isolate, _context); + v8::Context::Scope contextScope(ctx); // segfaults at newinstance without! + + v8::Local result = evalAsValue(expr); if (!result.IsEmpty() && result->IsArray()) return result.As()->Length(); - Event exceptionEvent; - exceptionEvent.name = "error.execution"; - exceptionEvent.data.compound["cause"] = Data("'" + expr + "' does not evaluate to an array.", Data::VERBATIM); - - throw(exceptionEvent); + ERROR_EXECUTION_THROW("'" + expr + "' does not evaluate to an array.") } void V8DataModel::setForeach(const std::string& item, @@ -576,10 +645,20 @@ void V8DataModel::setForeach(const std::string& item, if (!isDeclared(item)) { assign(item, Data()); } + + v8::Locker locker(_isolate); + v8::Isolate::Scope isoScope(_isolate); + v8::HandleScope scope(_isolate); + + v8::Local ctx = v8::Local::New(_isolate, _context); + v8::Context::Scope contextScope(ctx); // segfaults at newinstance without! + // assign array element to item std::stringstream ss; - ss << array << "[" << iteration << "]"; - assign(item, Data(ss.str(), Data::INTERPRETED)); + ss << item << " = " << array << "[" << iteration << "]"; +// assign(item, Data(ss.str(), Data::INTERPRETED)); + // test152: we need "'continue' = array[index]" to throw + evalAsValue(ss.str()); if (index.length() > 0) { // assign iteration element to index std::stringstream ss; @@ -588,29 +667,23 @@ void V8DataModel::setForeach(const std::string& item, } } -void V8DataModel::eval(const Element& scriptElem, - const std::string& expr) { - v8::Locker locker; - v8::HandleScope handleScope; - v8::Context::Scope contextScope(_contexts.back()); - evalAsValue(expr); -} - bool V8DataModel::isDeclared(const std::string& expr) { /** * Undeclared variables can be checked by trying to access them and catching * a reference error. */ - v8::Locker locker; - v8::HandleScope handleScope; - v8::Context::Scope contextScope(_contexts.back()); + v8::Locker locker(_isolate); + v8::Isolate::Scope isoScope(_isolate); - v8::TryCatch tryCatch; - v8::Handle source = v8::String::New(expr.c_str()); - v8::Handle script = v8::Script::Compile(source); + v8::HandleScope scope(_isolate); + v8::Local ctx = v8::Local::New(_isolate, _context); + v8::Context::Scope contextScope(ctx); // segfaults at newinstance without! + + v8::Local source = v8::String::New(expr.c_str()); + v8::Local script = v8::Script::Compile(source); - v8::Handle result; + v8::Local result; if (!script.IsEmpty()) result = script->Run(); @@ -621,152 +694,62 @@ bool V8DataModel::isDeclared(const std::string& expr) { } bool V8DataModel::evalAsBool(const std::string& expr) { - return evalAsBool(Arabica::DOM::Element(), expr); -} + v8::Locker locker(_isolate); + v8::Isolate::Scope isoScope(_isolate); -bool V8DataModel::evalAsBool(const Arabica::DOM::Element& node, const std::string& expr) { - v8::Locker locker; - v8::HandleScope handleScope; - v8::Context::Scope contextScope(_contexts.back()); - v8::Handle result = evalAsValue(expr); + v8::HandleScope scope(_isolate); + v8::Local ctx = v8::Local::New(_isolate, _context); + v8::Context::Scope contextScope(ctx); // segfaults at newinstance without! + + v8::Local result = evalAsValue(expr); return(result->ToBoolean()->BooleanValue()); } -std::string V8DataModel::evalAsString(const std::string& expr) { - v8::Locker locker; - v8::HandleScope handleScope; - v8::Context::Scope contextScope(_contexts.back()); - v8::Handle result = evalAsValue(expr); - if (result->IsObject()) { - v8::Local obj = result->ToObject(); - v8::Local proto; - - proto = obj->FindInstanceInPrototypeChain(V8Document::getTmpl()); - if (!proto.IsEmpty()) { - struct V8Document::V8DocumentPrivate* privData = - V8DOM::toClassPtr(obj->GetInternalField(0)); - std::stringstream ss; - ss << privData->nativeObj->getDocumentElement(); - return ss.str(); - } - - proto = obj->FindInstanceInPrototypeChain(V8Node::getTmpl()); - if (!proto.IsEmpty()) { - struct V8Node::V8NodePrivate* privData = - V8DOM::toClassPtr(obj->GetInternalField(0)); - std::stringstream ss; - ss << privData->nativeObj; - return ss.str(); - } - Data data = getValueAsData(result); - return toStr(data); - } - if (result->IsNumber()) { - return toStr(result->ToNumber()->NumberValue()); - } - v8::String::AsciiValue data(result->ToString()); - return std::string(*data); -} +void V8DataModel::assign(const std::string& location, const Data& data) { -double V8DataModel::evalAsNumber(const std::string& expr) { - v8::Locker locker; - v8::HandleScope handleScope; - v8::Context::Scope contextScope(_contexts.back()); - v8::Handle result = evalAsValue(expr); - if (result->IsNumber()) { - return result->ToNumber()->NumberValue(); - } - return 0; -} + v8::Locker locker(_isolate); + v8::Isolate::Scope isoScope(_isolate); + v8::HandleScope scope(_isolate); -void V8DataModel::assign(const Element& assignElem, - const Node& node, - const std::string& content) { - v8::Locker locker; - v8::HandleScope handleScope; - v8::Context::Scope contextScope(_contexts.front()); - v8::Handle global = _contexts.front()->Global(); + v8::Local ctx = v8::Local::New(_isolate, _context); + v8::Local global = ctx->Global(); + v8::Context::Scope contextScope(ctx); // segfaults at newinstance without! - std::string key; - if (HAS_ATTR(assignElem, "id")) { - key = ATTR(assignElem, "id"); - } else if (HAS_ATTR(assignElem, "location")) { - key = ATTR(assignElem, "location"); - } - if (key.length() == 0) - throw Event("error.execution", Event::PLATFORM); - - if (key.compare("_sessionid") == 0) // test 322 + if (location.compare("_sessionid") == 0) // test 322 ERROR_EXECUTION_THROW("Cannot assign to _sessionId"); - if (key.compare("_name") == 0) + if (location.compare("_name") == 0) ERROR_EXECUTION_THROW("Cannot assign to _name"); - if (key.compare("_ioprocessors") == 0) // test 326 + if (location.compare("_ioprocessors") == 0) // test 326 ERROR_EXECUTION_THROW("Cannot assign to _ioprocessors"); - if (key.compare("_invokers") == 0) + if (location.compare("_invokers") == 0) ERROR_EXECUTION_THROW("Cannot assign to _invokers"); - if (key.compare("_event") == 0) + if (location.compare("_event") == 0) ERROR_EXECUTION_THROW("Cannot assign to _event"); - if (HAS_ATTR(assignElem, "expr")) { - evalAsValue(key + " = " + ATTR(assignElem, "expr")); - } else if (node) { - global->Set(v8::String::New(key.c_str()), getNodeAsValue(node)); - } else if (content.size() > 0) { - try { - evalAsValue(key + " = " + content); - } catch (...) { - evalAsValue(key + " = " + "\"" + spaceNormalize(content) + "\""); - } + if (data.node) { + global->Set(v8::String::NewSymbol(location.c_str()), getNodeAsValue(data.node)); } else { - global->Set(v8::String::New(key.c_str()), v8::Undefined()); + evalAsValue(location + " = " + Data::toJSON(data)); } } -void V8DataModel::assign(const std::string& location, - const Data& data) { - v8::Locker locker; - v8::HandleScope handleScope; - v8::Context::Scope contextScope(_contexts.front()); - - std::stringstream ssJSON; - ssJSON << data; - evalAsValue(location + " = " + ssJSON.str()); -} - -void V8DataModel::init(const Element& dataElem, - const Node& doc, - const std::string& content) { - try { - assign(dataElem, doc, content); - } catch (Event e) { - // test 277 - std::string key; - if (HAS_ATTR(dataElem, "id")) { - key = ATTR(dataElem, "id"); - } else if (HAS_ATTR(dataElem, "location")) { - key = ATTR(dataElem, "location"); - } - v8::Locker locker; - v8::HandleScope handleScope; - v8::Context::Scope contextScope(_contexts.front()); - - evalAsValue(key + " = undefined", true); - throw e; - } -}; - void V8DataModel::init(const std::string& location, const Data& data) { + v8::Locker locker(_isolate); + v8::Isolate::Scope isoScope(_isolate); + v8::HandleScope scope(_isolate); + + v8::Local ctx = v8::Local::New(_isolate, _context); + v8::Context::Scope contextScope(ctx); // segfaults at newinstance without! + try { assign(location, data); - } catch (Event e) { + } catch (ErrorEvent e) { // test 277 - v8::Locker locker; - v8::HandleScope handleScope; - v8::Context::Scope contextScope(_contexts.front()); - evalAsValue(location + " = undefined", true); + + // we need to get error.execution into the queue throw e; } } @@ -791,12 +774,22 @@ std::string V8DataModel::andExpressions(std::list expressions) { return exprSS.str(); } -v8::Handle V8DataModel::evalAsValue(const std::string& expr, bool dontThrow) { +v8::Local V8DataModel::evalAsValue(const std::string& expr, bool dontThrow) { + +// v8::Locker locker(_isolate); +// v8::Isolate::Scope isoScope(_isolate); +// +// v8::HandleScope scope(_isolate); +// v8::EscapableHandleScope escape(_isolate); +// v8::Local ctx = v8::Local::New(_isolate, _context); +// v8::Context::Scope contextScope(ctx); // segfaults at newinstance without! + v8::TryCatch tryCatch; - v8::Handle source = v8::String::New(expr.c_str()); - v8::Handle script = v8::Script::Compile(source); - v8::Handle result; + v8::Local source = v8::String::New(expr.c_str()); + v8::Local script = v8::Script::Compile(source); + + v8::Local result; if (!script.IsEmpty()) result = script->Run(); @@ -811,14 +804,14 @@ v8::Handle V8DataModel::evalAsValue(const std::string& expr, bool don void V8DataModel::throwExceptionEvent(const v8::TryCatch& tryCatch) { assert(tryCatch.HasCaught()); - Event exceptionEvent; + ErrorEvent exceptionEvent; exceptionEvent.name = "error.execution"; exceptionEvent.eventType = Event::PLATFORM; std::string exceptionString(*v8::String::AsciiValue(tryCatch.Exception())); exceptionEvent.data.compound["cause"] = Data(exceptionString, Data::VERBATIM);; - v8::Handle message = tryCatch.Message(); + v8::Local message = tryCatch.Message(); if (!message.IsEmpty()) { std::string filename(*v8::String::AsciiValue(message->GetScriptResourceName())); exceptionEvent.data.compound["filename"] = Data(filename, Data::VERBATIM); diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h index 8e665b7..29b2b58 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h +++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h @@ -20,10 +20,10 @@ #ifndef V8DATAMODEL_H_KN8TWG0V #define V8DATAMODEL_H_KN8TWG0V -#include "uscxml/InterpreterInfo.h" +#include "uscxml/plugins/DataModel.h" #include +#include #include -#include "V8DOM.h" #ifdef BUILD_AS_PLUGINS #include "uscxml/plugins/Plugins.h" @@ -32,7 +32,6 @@ namespace uscxml { class Event; class Data; -class V8SCXMLDOM; } namespace uscxml { @@ -41,7 +40,9 @@ class V8DataModel : public DataModelImpl { public: V8DataModel(); virtual ~V8DataModel(); - virtual boost::shared_ptr create(InterpreterInfo* interpreter); + virtual std::shared_ptr create(DataModelCallbacks* callbacks); + + virtual void addExtension(DataModelExtension* ext); virtual std::list getNames() { std::list names; @@ -49,79 +50,61 @@ public: return names; } - virtual void initialize(); - virtual void setEvent(const Event& event); - - virtual bool validate(const std::string& location, const std::string& schema); - virtual bool isLocation(const std::string& expr); virtual bool isValidSyntax(const std::string& expr); + virtual void setEvent(const Event& event); + + // foreach virtual uint32_t getLength(const std::string& expr); virtual void setForeach(const std::string& item, const std::string& array, const std::string& index, uint32_t iteration); - virtual void pushContext(); - virtual void popContext(); - - virtual bool supportsJSON() { - return true; - } - - virtual void eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr); - virtual void assign(const Arabica::DOM::Element& assignElem, - const Arabica::DOM::Node& node, - const std::string& content); - virtual void assign(const std::string& location, - const Data& data); - - virtual void init(const Arabica::DOM::Element& dataElem, - const Arabica::DOM::Node& node, - const std::string& content); - virtual void init(const std::string& location, - const Data& data); - - virtual std::string andExpressions(std::list); - virtual Data getStringAsData(const std::string& content); - virtual Data getValueAsData(const v8::Handle& value, - std::set& alreadySeen); - virtual Data getValueAsData(const v8::Handle& value); + virtual bool evalAsBool(const std::string& expr); + virtual Data evalAsData(const std::string& expr); + virtual Data getAsData(const std::string& content); virtual bool isDeclared(const std::string& expr); - virtual std::string evalAsString(const std::string& expr); - virtual bool evalAsBool(const Arabica::DOM::Element& node, const std::string& expr); - virtual bool evalAsBool(const std::string& expr); - virtual double evalAsNumber(const std::string& expr); - - virtual void addExtension(DataModelExtension* ext); + virtual void assign(const std::string& location, const Data& data); + virtual void init(const std::string& location, const Data& data); - static v8::Handle jsExtension(const v8::Arguments& args); - static v8::Handle jsIn(const v8::Arguments& args); - static v8::Handle jsPrint(const v8::Arguments& args); + virtual std::string andExpressions(std::list); protected: - std::list > _contexts; - Arabica::DOM::V8DOM* _dom; + static void jsExtension(const v8::FunctionCallbackInfo& info); + static void jsIn(const v8::FunctionCallbackInfo& info); + static void jsPrint(const v8::FunctionCallbackInfo& info); + + v8::Persistent _event; + v8::Persistent _context; + static v8::Isolate* _isolate; - bool _ioProcessorsAreSet; - bool _invokersAreSet; v8::Persistent _ioProcessors; v8::Persistent _invokers; - static v8::Handle getIOProcessors(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle getInvokers(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle getAttribute(v8::Local property, const v8::AccessorInfo& info); - static void setWithException(v8::Local property, v8::Local value, const v8::AccessorInfo& info); - - v8::Handle evalAsValue(const std::string& expr, bool dontThrow = false); - v8::Handle getDataAsValue(const Data& data); - v8::Handle getNodeAsValue(const Arabica::DOM::Node& node); + + static void getIOProcessors(v8::Local property, const v8::PropertyCallbackInfo& info); + static void getInvokers(v8::Local property, const v8::PropertyCallbackInfo& info); + static void getAttribute(v8::Local property, const v8::PropertyCallbackInfo& info); + static void setWithException(v8::Local property, + v8::Local value, + const v8::PropertyCallbackInfo& info); + + v8::Local evalAsValue(const std::string& expr, bool dontThrow = false); + v8::Local getDataAsValue(const Data& data); + Data getValueAsData(const v8::Local& value); + v8::Local getNodeAsValue(const xercesc::DOMNode* node); void throwExceptionEvent(const v8::TryCatch& tryCatch); std::set _extensions; + +private: + Data getValueAsData(const v8::Local& value, std::set& alreadySeen); + + static std::mutex _initMutex; + }; #ifdef BUILD_AS_PLUGINS diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/bindings.i b/src/uscxml/plugins/datamodel/ecmascript/v8/bindings.i new file mode 100644 index 0000000..560671f --- /dev/null +++ b/src/uscxml/plugins/datamodel/ecmascript/v8/bindings.i @@ -0,0 +1,45 @@ +#define XERCES_HAS_CPP_NAMESPACE 1 + +%include + +/* + +swig -I/Users/sradomski/Documents/TK/Code/uscxml2/build/cli/deps/xerces-c/include/ -javascript -jsc -c++ uscxml.i +gcc -I/Users/sradomski/Documents/TK/Code/uscxml2/build/cli/deps/xerces-c/include/ ./uscxml_wrap.cxx + +*/ + +%module V8DOM + +%import "uscxml/config.h" +%import "uscxml/Common.h" + +%import "xercesc/util/XercesDefs.hpp" +%import "xercesc/util/Xerces_autoconf_config.hpp" + +%include "../../common/bindings/dom/ignore.i" +%include "../../common/bindings/dom/defines.i" +%include "../../common/bindings/dom/typemaps-general.i" + +// in typemap +%typemap(in) XMLCh * %{ + $1 = JS2XMLString($input); +%} + +%typemap(freearg) XMLCh * %{ + delete[] $1; +%} + +// out typemap +%typemap(out) XMLCh * %{ + $result = XMLString2JS($1); +%} + +%include "../../common/bindings/dom/dom.i" + +// Operators we do want +// %rename(operator_assignment) operator=; +%rename(operator_equal_to) operator==; +%rename(operator_not_equal_to) operator!=; + +%include "../../common/bindings/event.i" diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBuffer.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBuffer.cpp deleted file mode 100644 index 1328b19..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBuffer.cpp +++ /dev/null @@ -1,176 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8ArrayBuffer.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8ArrayBuffer::Tmpl; -v8::Persistent V8ArrayBuffer::Constr; - -v8::Handle V8ArrayBuffer::constructor(const v8::Arguments& args) { - if (!args.IsConstructCall()) - return v8::ThrowException(v8::String::New("Cannot call constructor as function")); - - uscxml::ArrayBuffer* localInstance = NULL; - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - - unsigned long localLength = args[0]->ToNumber()->Uint32Value(); - localInstance = new uscxml::ArrayBuffer(localLength); - - } - if (!localInstance) { - throw V8Exception("Parameter mismatch while calling constructor for ArrayBuffer"); - return v8::Undefined(); - } - - v8::Handle retCtor = V8ArrayBuffer::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8ArrayBuffer::V8ArrayBufferPrivate* retPrivData = new V8ArrayBuffer::V8ArrayBufferPrivate(); - retPrivData->nativeObj = localInstance; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8ArrayBuffer::jsDestructor); - return retObj; -} - -v8::Handle V8ArrayBuffer::byteLengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8ArrayBufferPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getByteLength()); -} - -v8::Handle V8ArrayBuffer::mimeTypeAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8ArrayBufferPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getMimeType().c_str()); -} - -void V8ArrayBuffer::mimeTypeAttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8ArrayBufferPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - v8::String::AsciiValue localMimeType(value); - privData->nativeObj->setMimeType(*localMimeType); -} - -v8::Handle V8ArrayBuffer::md5Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ArrayBufferPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 0) { - - std::string retVal = privData->nativeObj->md5(); - - return v8::String::New(retVal.c_str()); - } - throw V8Exception("Parameter mismatch while calling md5"); - return v8::Undefined(); -} - -v8::Handle V8ArrayBuffer::base64Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ArrayBufferPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 0) { - - std::string retVal = privData->nativeObj->base64(); - - return v8::String::New(retVal.c_str()); - } - throw V8Exception("Parameter mismatch while calling base64"); - return v8::Undefined(); -} - -v8::Handle V8ArrayBuffer::sliceCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ArrayBufferPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsInt32() && - args[1]->IsInt32()) { - long localBegin = args[0]->ToNumber()->Int32Value(); - long localEnd = args[1]->ToNumber()->Int32Value(); - - uscxml::ArrayBuffer* retVal = new uscxml::ArrayBuffer(privData->nativeObj->slice(localBegin, localEnd)); - v8::Handle retCtor = V8ArrayBuffer::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8ArrayBuffer::V8ArrayBufferPrivate* retPrivData = new V8ArrayBuffer::V8ArrayBufferPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8ArrayBuffer::jsDestructor); - return retObj; - - } else if (args.Length() == 1 && - args[0]->IsInt32()) { - long localBegin = args[0]->ToNumber()->Int32Value(); - - uscxml::ArrayBuffer* retVal = new uscxml::ArrayBuffer(privData->nativeObj->slice(localBegin)); - v8::Handle retCtor = V8ArrayBuffer::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8ArrayBuffer::V8ArrayBufferPrivate* retPrivData = new V8ArrayBuffer::V8ArrayBufferPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8ArrayBuffer::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling slice"); - return v8::Undefined(); -} - -v8::Handle V8ArrayBuffer::isViewCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ArrayBufferPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - true) { - void* localValue = v8::External::Unwrap(args[0]->ToObject()->GetInternalField(0)); - - bool retVal = privData->nativeObj->isView(localValue); - - return v8::Boolean::New(retVal); - } - throw V8Exception("Parameter mismatch while calling isView"); - return v8::Undefined(); -} -bool V8ArrayBuffer::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBuffer.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBuffer.h deleted file mode 100644 index 14b92b0..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBuffer.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8ArrayBuffer_h -#define V8ArrayBuffer_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8ArrayBuffer { -public: - struct V8ArrayBufferPrivate { - V8DOM* dom; - uscxml::ArrayBuffer* nativeObj; - }; - - V8_DESTRUCTOR(V8ArrayBufferPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle md5Callback(const v8::Arguments&); - static v8::Handle base64Callback(const v8::Arguments&); - static v8::Handle sliceCallback(const v8::Arguments&); - static v8::Handle isViewCallback(const v8::Arguments&); - - static v8::Handle byteLengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle mimeTypeAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static void mimeTypeAttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info); - - static v8::Handle constructor(const v8::Arguments&); - static v8::Persistent Constr; - static v8::Handle getConstructor() { - if (Constr.IsEmpty()) { - v8::Handle constr = v8::FunctionTemplate::New(constructor); - Constr = v8::Persistent::New(constr); - } - return Constr; - } - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("ArrayBuffer")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("byteLength"), V8ArrayBuffer::byteLengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("mimeType"), V8ArrayBuffer::mimeTypeAttrGetter, V8ArrayBuffer::mimeTypeAttrSetter, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - prototype->Set(v8::String::NewSymbol("md5"), - v8::FunctionTemplate::New(V8ArrayBuffer::md5Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("base64"), - v8::FunctionTemplate::New(V8ArrayBuffer::base64Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("slice"), - v8::FunctionTemplate::New(V8ArrayBuffer::sliceCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("isView"), - v8::FunctionTemplate::New(V8ArrayBuffer::isViewCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8ArrayBuffer_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBufferView.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBufferView.cpp deleted file mode 100644 index 60a2530..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBufferView.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8ArrayBuffer.h" -#include "V8ArrayBufferView.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8ArrayBufferView::Tmpl; - -v8::Handle V8ArrayBufferView::bufferAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8ArrayBufferViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (!privData->nativeObj->getBuffer()) return v8::Undefined(); - uscxml::ArrayBuffer* arbaicaRet = new uscxml::ArrayBuffer(privData->nativeObj->getBuffer()); - - v8::Handle arbaicaRetCtor = V8ArrayBuffer::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8ArrayBuffer::V8ArrayBufferPrivate* retPrivData = new V8ArrayBuffer::V8ArrayBufferPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8ArrayBuffer::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8ArrayBufferView::byteOffsetAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8ArrayBufferViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getByteOffset()); -} - -v8::Handle V8ArrayBufferView::byteLengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8ArrayBufferViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getByteLength()); -} -bool V8ArrayBufferView::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBufferView.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBufferView.h deleted file mode 100644 index 8ed542f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ArrayBufferView.h +++ /dev/null @@ -1,82 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8ArrayBufferView_h -#define V8ArrayBufferView_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8ArrayBufferView { -public: - struct V8ArrayBufferViewPrivate { - V8DOM* dom; - uscxml::ArrayBufferView* nativeObj; - }; - - V8_DESTRUCTOR(V8ArrayBufferViewPrivate); - static bool hasInstance(v8::Handle); - - - static v8::Handle bufferAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle byteOffsetAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle byteLengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("ArrayBufferView")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("buffer"), V8ArrayBufferView::bufferAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("byteOffset"), V8ArrayBufferView::byteOffsetAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("byteLength"), V8ArrayBufferView::byteLengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - - - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8ArrayBufferView_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.cpp deleted file mode 100644 index 9480cb6..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8Attr.h" -#include "V8Element.h" -#include "V8Node.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Attr::Tmpl; - -v8::Handle V8Attr::nameAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8AttrPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getName().c_str()); -} - -v8::Handle V8Attr::specifiedAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8AttrPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Boolean::New(privData->nativeObj->getSpecified()); -} - -v8::Handle V8Attr::valueAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8AttrPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getValue().c_str()); -} - -void V8Attr::valueAttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8AttrPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - v8::String::AsciiValue localValue(value); - privData->nativeObj->setValue(*localValue); -} - -v8::Handle V8Attr::ownerElementAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8AttrPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (!privData->nativeObj->getOwnerElement()) return v8::Undefined(); - Arabica::DOM::Element* arbaicaRet = new Arabica::DOM::Element(privData->nativeObj->getOwnerElement()); - - v8::Handle arbaicaRetCtor = V8Element::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8Element::jsDestructor); - return arbaicaRetObj; - -} -bool V8Attr::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.h deleted file mode 100644 index ca0c58b..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Attr.h +++ /dev/null @@ -1,87 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Attr_h -#define V8Attr_h - -#include -#include "DOM/Node.hpp" -#include "V8Node.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Attr { -public: - struct V8AttrPrivate { - V8DOM* dom; - Arabica::DOM::Attr* nativeObj; - }; - - V8_DESTRUCTOR(V8AttrPrivate); - static bool hasInstance(v8::Handle); - - - static v8::Handle nameAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle specifiedAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle valueAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static void valueAttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info); - static v8::Handle ownerElementAttrGetter(v8::Local property, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Attr")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("name"), V8Attr::nameAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("specified"), V8Attr::specifiedAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("value"), V8Attr::valueAttrGetter, V8Attr::valueAttrSetter, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("ownerElement"), V8Attr::ownerElementAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - - - tmpl->Inherit(V8Node::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Attr_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CDATASection.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CDATASection.cpp deleted file mode 100644 index 2d833fe..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CDATASection.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8CDATASection.h" -#include "V8Text.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8CDATASection::Tmpl; -bool V8CDATASection::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CDATASection.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CDATASection.h deleted file mode 100644 index b7d2a2e..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CDATASection.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8CDATASection_h -#define V8CDATASection_h - -#include -#include "DOM/Node.hpp" -#include "V8Text.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8CDATASection { -public: - struct V8CDATASectionPrivate { - V8DOM* dom; - Arabica::DOM::CDATASection* nativeObj; - }; - - V8_DESTRUCTOR(V8CDATASectionPrivate); - static bool hasInstance(v8::Handle); - - - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("CDATASection")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - - - - tmpl->Inherit(V8Text::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8CDATASection_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.cpp deleted file mode 100644 index 217d035..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8CharacterData.h" -#include "V8Node.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8CharacterData::Tmpl; - -v8::Handle V8CharacterData::dataAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8CharacterDataPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getData().c_str()); -} - -void V8CharacterData::dataAttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8CharacterDataPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - v8::String::AsciiValue localData(value); - privData->nativeObj->setData(*localData); -} - -v8::Handle V8CharacterData::lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8CharacterDataPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getLength()); -} - -v8::Handle V8CharacterData::substringDataCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8CharacterDataPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsUint32()) { - unsigned long localOffset = args[0]->ToNumber()->Uint32Value(); - unsigned long localCount = args[1]->ToNumber()->Uint32Value(); - - std::string retVal = privData->nativeObj->substringData(localOffset, localCount); - - return v8::String::New(retVal.c_str()); - } - throw V8Exception("Parameter mismatch while calling substringData"); - return v8::Undefined(); -} - -v8::Handle V8CharacterData::appendDataCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8CharacterDataPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localArg(args[0]); - - privData->nativeObj->appendData(*localArg); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling appendData"); - return v8::Undefined(); -} - -v8::Handle V8CharacterData::insertDataCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8CharacterDataPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsString()) { - unsigned long localOffset = args[0]->ToNumber()->Uint32Value(); - v8::String::AsciiValue localArg(args[1]); - - privData->nativeObj->insertData(localOffset, *localArg); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling insertData"); - return v8::Undefined(); -} - -v8::Handle V8CharacterData::deleteDataCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8CharacterDataPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsUint32()) { - unsigned long localOffset = args[0]->ToNumber()->Uint32Value(); - unsigned long localCount = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->deleteData(localOffset, localCount); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling deleteData"); - return v8::Undefined(); -} - -v8::Handle V8CharacterData::replaceDataCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8CharacterDataPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 3 && - args[0]->IsUint32() && - args[1]->IsUint32() && - args[2]->IsString()) { - unsigned long localOffset = args[0]->ToNumber()->Uint32Value(); - unsigned long localCount = args[1]->ToNumber()->Uint32Value(); - v8::String::AsciiValue localArg(args[2]); - - privData->nativeObj->replaceData(localOffset, localCount, *localArg); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling replaceData"); - return v8::Undefined(); -} -bool V8CharacterData::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.h deleted file mode 100644 index bf21603..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8CharacterData.h +++ /dev/null @@ -1,96 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8CharacterData_h -#define V8CharacterData_h - -#include -#include "DOM/Node.hpp" -#include "V8Node.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8CharacterData { -public: - struct V8CharacterDataPrivate { - V8DOM* dom; - Arabica::DOM::CharacterData* nativeObj; - }; - - V8_DESTRUCTOR(V8CharacterDataPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle substringDataCallback(const v8::Arguments&); - static v8::Handle appendDataCallback(const v8::Arguments&); - static v8::Handle insertDataCallback(const v8::Arguments&); - static v8::Handle deleteDataCallback(const v8::Arguments&); - static v8::Handle replaceDataCallback(const v8::Arguments&); - - static v8::Handle dataAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static void dataAttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info); - static v8::Handle lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("CharacterData")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("data"), V8CharacterData::dataAttrGetter, V8CharacterData::dataAttrSetter, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("length"), V8CharacterData::lengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - prototype->Set(v8::String::NewSymbol("substringData"), - v8::FunctionTemplate::New(V8CharacterData::substringDataCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("appendData"), - v8::FunctionTemplate::New(V8CharacterData::appendDataCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("insertData"), - v8::FunctionTemplate::New(V8CharacterData::insertDataCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("deleteData"), - v8::FunctionTemplate::New(V8CharacterData::deleteDataCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("replaceData"), - v8::FunctionTemplate::New(V8CharacterData::replaceDataCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - - tmpl->Inherit(V8Node::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8CharacterData_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Comment.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Comment.cpp deleted file mode 100644 index 9c7e0a7..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Comment.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8CharacterData.h" -#include "V8Comment.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Comment::Tmpl; -bool V8Comment::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Comment.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Comment.h deleted file mode 100644 index e0ed9a7..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Comment.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Comment_h -#define V8Comment_h - -#include -#include "DOM/Node.hpp" -#include "V8CharacterData.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Comment { -public: - struct V8CommentPrivate { - V8DOM* dom; - Arabica::DOM::Comment* nativeObj; - }; - - V8_DESTRUCTOR(V8CommentPrivate); - static bool hasInstance(v8::Handle); - - - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Comment")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - - - - tmpl->Inherit(V8CharacterData::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Comment_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.cpp deleted file mode 100644 index a9c3838..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8DOMImplementation.h" -#include "V8Document.h" -#include "V8DocumentType.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8DOMImplementation::Tmpl; - -v8::Handle V8DOMImplementation::hasFeatureCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DOMImplementationPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localFeature(args[0]); - v8::String::AsciiValue localVersion(args[1]); - - bool retVal = privData->nativeObj->hasFeature(*localFeature, *localVersion); - - return v8::Boolean::New(retVal); - } - throw V8Exception("Parameter mismatch while calling hasFeature"); - return v8::Undefined(); -} - -v8::Handle V8DOMImplementation::createDocumentTypeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DOMImplementationPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 3 && - args[0]->IsString() && - args[1]->IsString() && - args[2]->IsString()) { - v8::String::AsciiValue localQualifiedName(args[0]); - v8::String::AsciiValue localPublicId(args[1]); - v8::String::AsciiValue localSystemId(args[2]); - - Arabica::DOM::DocumentType* retVal = new Arabica::DOM::DocumentType(privData->nativeObj->createDocumentType(*localQualifiedName, *localPublicId, *localSystemId)); - v8::Handle retCtor = V8DocumentType::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8DocumentType::V8DocumentTypePrivate* retPrivData = new V8DocumentType::V8DocumentTypePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8DocumentType::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createDocumentType"); - return v8::Undefined(); -} - -v8::Handle V8DOMImplementation::createDocumentCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DOMImplementationPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 3 && - args[0]->IsString() && - args[1]->IsString() && - args[2]->IsObject() && V8DocumentType::hasInstance(args[2])) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localQualifiedName(args[1]); - Arabica::DOM::DocumentType* localDoctype = V8DOM::toClassPtr(args[2]->ToObject()->GetInternalField(0))->nativeObj; - - Arabica::DOM::Document* retVal = new Arabica::DOM::Document(privData->nativeObj->createDocument(*localNamespaceURI, *localQualifiedName, *localDoctype)); - v8::Handle retCtor = V8Document::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Document::V8DocumentPrivate* retPrivData = new V8Document::V8DocumentPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Document::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createDocument"); - return v8::Undefined(); -} -bool V8DOMImplementation::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.h deleted file mode 100644 index 5627a19..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DOMImplementation.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8DOMImplementation_h -#define V8DOMImplementation_h - -#include -#include "DOM/Node.hpp" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8DOMImplementation { -public: - struct V8DOMImplementationPrivate { - V8DOM* dom; - Arabica::DOM::DOMImplementation* nativeObj; - }; - - V8_DESTRUCTOR(V8DOMImplementationPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle hasFeatureCallback(const v8::Arguments&); - static v8::Handle createDocumentTypeCallback(const v8::Arguments&); - static v8::Handle createDocumentCallback(const v8::Arguments&); - - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("DOMImplementation")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - - prototype->Set(v8::String::NewSymbol("hasFeature"), - v8::FunctionTemplate::New(V8DOMImplementation::hasFeatureCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("createDocumentType"), - v8::FunctionTemplate::New(V8DOMImplementation::createDocumentTypeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("createDocument"), - v8::FunctionTemplate::New(V8DOMImplementation::createDocumentCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8DOMImplementation_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DataView.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DataView.cpp deleted file mode 100644 index 1eaca4f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DataView.cpp +++ /dev/null @@ -1,490 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8ArrayBuffer.h" -#include "V8ArrayBufferView.h" -#include "V8DataView.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8DataView::Tmpl; -v8::Persistent V8DataView::Constr; - -v8::Handle V8DataView::constructor(const v8::Arguments& args) { - if (!args.IsConstructCall()) - return v8::ThrowException(v8::String::New("Cannot call constructor as function")); - - uscxml::DataView* localInstance = NULL; - if (false) { - } else if (args.Length() == 3 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32() && - args[2]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - unsigned long localByteLength = args[2]->ToNumber()->Uint32Value(); - localInstance = new uscxml::DataView(localBuffer, localByteOffset, localByteLength); - - } else if (args.Length() == 2 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - localInstance = new uscxml::DataView(localBuffer, localByteOffset); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0])) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::DataView(localBuffer); - - } - if (!localInstance) { - throw V8Exception("Parameter mismatch while calling constructor for DataView"); - return v8::Undefined(); - } - - v8::Handle retCtor = V8DataView::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8DataView::V8DataViewPrivate* retPrivData = new V8DataView::V8DataViewPrivate(); - retPrivData->nativeObj = localInstance; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8DataView::jsDestructor); - return retObj; -} - -v8::Handle V8DataView::getInt8Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - - char retVal = privData->nativeObj->getInt8(localByteOffset); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling getInt8"); - return v8::Undefined(); -} - -v8::Handle V8DataView::getUint8Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - - unsigned char retVal = privData->nativeObj->getUint8(localByteOffset); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling getUint8"); - return v8::Undefined(); -} - -v8::Handle V8DataView::getInt16Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsBoolean()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - bool localLittleEndian = args[1]->ToBoolean()->BooleanValue(); - - short retVal = privData->nativeObj->getInt16(localByteOffset, localLittleEndian); - - return v8::Number::New(retVal); - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - - short retVal = privData->nativeObj->getInt16(localByteOffset); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling getInt16"); - return v8::Undefined(); -} - -v8::Handle V8DataView::getUint16Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsBoolean()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - bool localLittleEndian = args[1]->ToBoolean()->BooleanValue(); - - unsigned short retVal = privData->nativeObj->getUint16(localByteOffset, localLittleEndian); - - return v8::Number::New(retVal); - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - - unsigned short retVal = privData->nativeObj->getUint16(localByteOffset); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling getUint16"); - return v8::Undefined(); -} - -v8::Handle V8DataView::getInt32Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsBoolean()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - bool localLittleEndian = args[1]->ToBoolean()->BooleanValue(); - - long retVal = privData->nativeObj->getInt32(localByteOffset, localLittleEndian); - - return v8::Number::New(retVal); - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - - long retVal = privData->nativeObj->getInt32(localByteOffset); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling getInt32"); - return v8::Undefined(); -} - -v8::Handle V8DataView::getUint32Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsBoolean()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - bool localLittleEndian = args[1]->ToBoolean()->BooleanValue(); - - unsigned long retVal = privData->nativeObj->getUint32(localByteOffset, localLittleEndian); - - return v8::Number::New(retVal); - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - - unsigned long retVal = privData->nativeObj->getUint32(localByteOffset); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling getUint32"); - return v8::Undefined(); -} - -v8::Handle V8DataView::getFloat32Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsBoolean()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - bool localLittleEndian = args[1]->ToBoolean()->BooleanValue(); - - float retVal = privData->nativeObj->getFloat32(localByteOffset, localLittleEndian); - - return v8::Number::New(retVal); - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - - float retVal = privData->nativeObj->getFloat32(localByteOffset); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling getFloat32"); - return v8::Undefined(); -} - -v8::Handle V8DataView::getFloat64Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsBoolean()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - bool localLittleEndian = args[1]->ToBoolean()->BooleanValue(); - - double retVal = privData->nativeObj->getFloat64(localByteOffset, localLittleEndian); - - return v8::Number::New(retVal); - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - - double retVal = privData->nativeObj->getFloat64(localByteOffset); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling getFloat64"); - return v8::Undefined(); -} - -v8::Handle V8DataView::setInt8Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsInt32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - char localValue = args[1]->ToNumber()->Int32Value(); - - privData->nativeObj->setInt8(localByteOffset, localValue); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling setInt8"); - return v8::Undefined(); -} - -v8::Handle V8DataView::setUint8Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsUint32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - unsigned char localValue = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->setUint8(localByteOffset, localValue); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling setUint8"); - return v8::Undefined(); -} - -v8::Handle V8DataView::setInt16Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 3 && - args[0]->IsUint32() && - args[1]->IsInt32() && - args[2]->IsBoolean()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - short localValue = args[1]->ToNumber()->Int32Value(); - bool localLittleEndian = args[2]->ToBoolean()->BooleanValue(); - - privData->nativeObj->setInt16(localByteOffset, localValue, localLittleEndian); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsInt32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - short localValue = args[1]->ToNumber()->Int32Value(); - - privData->nativeObj->setInt16(localByteOffset, localValue); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling setInt16"); - return v8::Undefined(); -} - -v8::Handle V8DataView::setUint16Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 3 && - args[0]->IsUint32() && - args[1]->IsUint32() && - args[2]->IsBoolean()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - unsigned short localValue = args[1]->ToNumber()->Uint32Value(); - bool localLittleEndian = args[2]->ToBoolean()->BooleanValue(); - - privData->nativeObj->setUint16(localByteOffset, localValue, localLittleEndian); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsUint32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - unsigned short localValue = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->setUint16(localByteOffset, localValue); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling setUint16"); - return v8::Undefined(); -} - -v8::Handle V8DataView::setInt32Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 3 && - args[0]->IsUint32() && - args[1]->IsInt32() && - args[2]->IsBoolean()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - long localValue = args[1]->ToNumber()->Int32Value(); - bool localLittleEndian = args[2]->ToBoolean()->BooleanValue(); - - privData->nativeObj->setInt32(localByteOffset, localValue, localLittleEndian); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsInt32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - long localValue = args[1]->ToNumber()->Int32Value(); - - privData->nativeObj->setInt32(localByteOffset, localValue); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling setInt32"); - return v8::Undefined(); -} - -v8::Handle V8DataView::setUint32Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 3 && - args[0]->IsUint32() && - args[1]->IsUint32() && - args[2]->IsBoolean()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - unsigned long localValue = args[1]->ToNumber()->Uint32Value(); - bool localLittleEndian = args[2]->ToBoolean()->BooleanValue(); - - privData->nativeObj->setUint32(localByteOffset, localValue, localLittleEndian); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsUint32()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - unsigned long localValue = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->setUint32(localByteOffset, localValue); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling setUint32"); - return v8::Undefined(); -} - -v8::Handle V8DataView::setFloat32Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 3 && - args[0]->IsUint32() && - args[1]->IsNumber() && - args[2]->IsBoolean()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - float localValue = args[1]->ToNumber()->Value(); - bool localLittleEndian = args[2]->ToBoolean()->BooleanValue(); - - privData->nativeObj->setFloat32(localByteOffset, localValue, localLittleEndian); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsNumber()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - float localValue = args[1]->ToNumber()->Value(); - - privData->nativeObj->setFloat32(localByteOffset, localValue); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling setFloat32"); - return v8::Undefined(); -} - -v8::Handle V8DataView::setFloat64Callback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DataViewPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 3 && - args[0]->IsUint32() && - args[1]->IsNumber() && - args[2]->IsBoolean()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - double localValue = args[1]->ToNumber()->Value(); - bool localLittleEndian = args[2]->ToBoolean()->BooleanValue(); - - privData->nativeObj->setFloat64(localByteOffset, localValue, localLittleEndian); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsNumber()) { - unsigned long localByteOffset = args[0]->ToNumber()->Uint32Value(); - double localValue = args[1]->ToNumber()->Value(); - - privData->nativeObj->setFloat64(localByteOffset, localValue); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling setFloat64"); - return v8::Undefined(); -} -bool V8DataView::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DataView.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DataView.h deleted file mode 100644 index aa19473..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DataView.h +++ /dev/null @@ -1,133 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8DataView_h -#define V8DataView_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "V8ArrayBufferView.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8DataView { -public: - struct V8DataViewPrivate { - V8DOM* dom; - uscxml::DataView* nativeObj; - }; - - V8_DESTRUCTOR(V8DataViewPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle getInt8Callback(const v8::Arguments&); - static v8::Handle getUint8Callback(const v8::Arguments&); - static v8::Handle getInt16Callback(const v8::Arguments&); - static v8::Handle getUint16Callback(const v8::Arguments&); - static v8::Handle getInt32Callback(const v8::Arguments&); - static v8::Handle getUint32Callback(const v8::Arguments&); - static v8::Handle getFloat32Callback(const v8::Arguments&); - static v8::Handle getFloat64Callback(const v8::Arguments&); - static v8::Handle setInt8Callback(const v8::Arguments&); - static v8::Handle setUint8Callback(const v8::Arguments&); - static v8::Handle setInt16Callback(const v8::Arguments&); - static v8::Handle setUint16Callback(const v8::Arguments&); - static v8::Handle setInt32Callback(const v8::Arguments&); - static v8::Handle setUint32Callback(const v8::Arguments&); - static v8::Handle setFloat32Callback(const v8::Arguments&); - static v8::Handle setFloat64Callback(const v8::Arguments&); - - - static v8::Handle constructor(const v8::Arguments&); - static v8::Persistent Constr; - static v8::Handle getConstructor() { - if (Constr.IsEmpty()) { - v8::Handle constr = v8::FunctionTemplate::New(constructor); - Constr = v8::Persistent::New(constr); - } - return Constr; - } - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("DataView")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - - prototype->Set(v8::String::NewSymbol("getInt8"), - v8::FunctionTemplate::New(V8DataView::getInt8Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getUint8"), - v8::FunctionTemplate::New(V8DataView::getUint8Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getInt16"), - v8::FunctionTemplate::New(V8DataView::getInt16Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getUint16"), - v8::FunctionTemplate::New(V8DataView::getUint16Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getInt32"), - v8::FunctionTemplate::New(V8DataView::getInt32Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getUint32"), - v8::FunctionTemplate::New(V8DataView::getUint32Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getFloat32"), - v8::FunctionTemplate::New(V8DataView::getFloat32Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getFloat64"), - v8::FunctionTemplate::New(V8DataView::getFloat64Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setInt8"), - v8::FunctionTemplate::New(V8DataView::setInt8Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setUint8"), - v8::FunctionTemplate::New(V8DataView::setUint8Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setInt16"), - v8::FunctionTemplate::New(V8DataView::setInt16Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setUint16"), - v8::FunctionTemplate::New(V8DataView::setUint16Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setInt32"), - v8::FunctionTemplate::New(V8DataView::setInt32Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setUint32"), - v8::FunctionTemplate::New(V8DataView::setUint32Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setFloat32"), - v8::FunctionTemplate::New(V8DataView::setFloat32Callback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setFloat64"), - v8::FunctionTemplate::New(V8DataView::setFloat64Callback, v8::Undefined()), static_cast(v8::DontDelete)); - - - tmpl->Inherit(V8ArrayBufferView::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8DataView_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp deleted file mode 100644 index 226cd26..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp +++ /dev/null @@ -1,431 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8Attr.h" -#include "V8CDATASection.h" -#include "V8Comment.h" -#include "V8DOMImplementation.h" -#include "V8Document.h" -#include "V8DocumentFragment.h" -#include "V8DocumentType.h" -#include "V8Element.h" -#include "V8EntityReference.h" -#include "V8Node.h" -#include "V8NodeList.h" -#include "V8ProcessingInstruction.h" -#include "V8Text.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Document::Tmpl; - -v8::Handle V8Document::doctypeAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (!privData->nativeObj->getDoctype()) return v8::Undefined(); - Arabica::DOM::DocumentType* arbaicaRet = new Arabica::DOM::DocumentType(privData->nativeObj->getDoctype()); - - v8::Handle arbaicaRetCtor = V8DocumentType::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8DocumentType::V8DocumentTypePrivate* retPrivData = new V8DocumentType::V8DocumentTypePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8DocumentType::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8Document::implementationAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (!privData->nativeObj->getImplementation()) return v8::Undefined(); - Arabica::DOM::DOMImplementation* arbaicaRet = new Arabica::DOM::DOMImplementation(privData->nativeObj->getImplementation()); - - v8::Handle arbaicaRetCtor = V8DOMImplementation::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8DOMImplementation::V8DOMImplementationPrivate* retPrivData = new V8DOMImplementation::V8DOMImplementationPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8DOMImplementation::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8Document::documentElementAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (!privData->nativeObj->getDocumentElement()) return v8::Undefined(); - Arabica::DOM::Element* arbaicaRet = new Arabica::DOM::Element(privData->nativeObj->getDocumentElement()); - - v8::Handle arbaicaRetCtor = V8Element::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8Element::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8Document::createElementCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localTagName(args[0]); - - Arabica::DOM::Element* retVal = new Arabica::DOM::Element(privData->nativeObj->createElement(*localTagName)); - v8::Handle retCtor = V8Element::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Element::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createElement"); - return v8::Undefined(); -} - -v8::Handle V8Document::createDocumentFragmentCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 0) { - - Arabica::DOM::DocumentFragment* retVal = new Arabica::DOM::DocumentFragment(privData->nativeObj->createDocumentFragment()); - v8::Handle retCtor = V8DocumentFragment::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8DocumentFragment::V8DocumentFragmentPrivate* retPrivData = new V8DocumentFragment::V8DocumentFragmentPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8DocumentFragment::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createDocumentFragment"); - return v8::Undefined(); -} - -v8::Handle V8Document::createTextNodeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localData(args[0]); - - Arabica::DOM::Text* retVal = new Arabica::DOM::Text(privData->nativeObj->createTextNode(*localData)); - v8::Handle retCtor = V8Text::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Text::V8TextPrivate* retPrivData = new V8Text::V8TextPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Text::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createTextNode"); - return v8::Undefined(); -} - -v8::Handle V8Document::createCommentCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localData(args[0]); - - Arabica::DOM::Comment* retVal = new Arabica::DOM::Comment(privData->nativeObj->createComment(*localData)); - v8::Handle retCtor = V8Comment::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Comment::V8CommentPrivate* retPrivData = new V8Comment::V8CommentPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Comment::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createComment"); - return v8::Undefined(); -} - -v8::Handle V8Document::createCDATASectionCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localData(args[0]); - - Arabica::DOM::CDATASection* retVal = new Arabica::DOM::CDATASection(privData->nativeObj->createCDATASection(*localData)); - v8::Handle retCtor = V8CDATASection::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8CDATASection::V8CDATASectionPrivate* retPrivData = new V8CDATASection::V8CDATASectionPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8CDATASection::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createCDATASection"); - return v8::Undefined(); -} - -v8::Handle V8Document::createProcessingInstructionCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localTarget(args[0]); - v8::String::AsciiValue localData(args[1]); - - Arabica::DOM::ProcessingInstruction* retVal = new Arabica::DOM::ProcessingInstruction(privData->nativeObj->createProcessingInstruction(*localTarget, *localData)); - v8::Handle retCtor = V8ProcessingInstruction::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8ProcessingInstruction::V8ProcessingInstructionPrivate* retPrivData = new V8ProcessingInstruction::V8ProcessingInstructionPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8ProcessingInstruction::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createProcessingInstruction"); - return v8::Undefined(); -} - -v8::Handle V8Document::createAttributeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localName(args[0]); - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->createAttribute(*localName)); - v8::Handle retCtor = V8Attr::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Attr::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createAttribute"); - return v8::Undefined(); -} - -v8::Handle V8Document::createEntityReferenceCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localName(args[0]); - - Arabica::DOM::EntityReference* retVal = new Arabica::DOM::EntityReference(privData->nativeObj->createEntityReference(*localName)); - v8::Handle retCtor = V8EntityReference::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8EntityReference::V8EntityReferencePrivate* retPrivData = new V8EntityReference::V8EntityReferencePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8EntityReference::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createEntityReference"); - return v8::Undefined(); -} - -v8::Handle V8Document::getElementsByTagNameCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localTagname(args[0]); - - Arabica::DOM::NodeList* retVal = new Arabica::DOM::NodeList(privData->nativeObj->getElementsByTagName(*localTagname)); - v8::Handle retCtor = V8NodeList::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8NodeList::V8NodeListPrivate* retPrivData = new V8NodeList::V8NodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8NodeList::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling getElementsByTagName"); - return v8::Undefined(); -} - -v8::Handle V8Document::importNodeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsObject() && V8Node::hasInstance(args[0]) && - args[1]->IsBoolean()) { - Arabica::DOM::Node* localImportedNode = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - bool localDeep = args[1]->ToBoolean()->BooleanValue(); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->importNode(*localImportedNode, localDeep)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling importNode"); - return v8::Undefined(); -} - -v8::Handle V8Document::getElementsByTagNameNSCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localLocalName(args[1]); - - Arabica::DOM::NodeList* retVal = new Arabica::DOM::NodeList(privData->nativeObj->getElementsByTagNameNS(*localNamespaceURI, *localLocalName)); - v8::Handle retCtor = V8NodeList::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8NodeList::V8NodeListPrivate* retPrivData = new V8NodeList::V8NodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8NodeList::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling getElementsByTagNameNS"); - return v8::Undefined(); -} - -v8::Handle V8Document::getElementByIdCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localElementId(args[0]); - - Arabica::DOM::Element* retVal = new Arabica::DOM::Element(privData->nativeObj->getElementById(*localElementId)); - v8::Handle retCtor = V8Element::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Element::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling getElementById"); - return v8::Undefined(); -} -bool V8Document::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h deleted file mode 100644 index 373d18a..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h +++ /dev/null @@ -1,131 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Document_h -#define V8Document_h - -#include -#include "DOM/Node.hpp" -#include "V8Node.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Document { -public: - struct V8DocumentPrivate { - V8DOM* dom; - Arabica::DOM::Document* nativeObj; - }; - - V8_DESTRUCTOR(V8DocumentPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle createElementCallback(const v8::Arguments&); - static v8::Handle createDocumentFragmentCallback(const v8::Arguments&); - static v8::Handle createTextNodeCallback(const v8::Arguments&); - static v8::Handle createCommentCallback(const v8::Arguments&); - static v8::Handle createCDATASectionCallback(const v8::Arguments&); - static v8::Handle createProcessingInstructionCallback(const v8::Arguments&); - static v8::Handle createAttributeCallback(const v8::Arguments&); - static v8::Handle createEntityReferenceCallback(const v8::Arguments&); - static v8::Handle getElementsByTagNameCallback(const v8::Arguments&); - static v8::Handle importNodeCallback(const v8::Arguments&); - static v8::Handle createElementNSCustomCallback(const v8::Arguments&); - static v8::Handle createAttributeNSCustomCallback(const v8::Arguments&); - static v8::Handle getElementsByTagNameNSCallback(const v8::Arguments&); - static v8::Handle getElementByIdCallback(const v8::Arguments&); - static v8::Handle evaluateCustomCallback(const v8::Arguments&); - - static v8::Handle doctypeAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle implementationAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle documentElementAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle localStorageCustomAttrGetter(v8::Local property, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Document")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("doctype"), V8Document::doctypeAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("implementation"), V8Document::implementationAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("documentElement"), V8Document::documentElementAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("localStorage"), V8Document::localStorageCustomAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - prototype->Set(v8::String::NewSymbol("createElement"), - v8::FunctionTemplate::New(V8Document::createElementCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("createDocumentFragment"), - v8::FunctionTemplate::New(V8Document::createDocumentFragmentCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("createTextNode"), - v8::FunctionTemplate::New(V8Document::createTextNodeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("createComment"), - v8::FunctionTemplate::New(V8Document::createCommentCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("createCDATASection"), - v8::FunctionTemplate::New(V8Document::createCDATASectionCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("createProcessingInstruction"), - v8::FunctionTemplate::New(V8Document::createProcessingInstructionCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("createAttribute"), - v8::FunctionTemplate::New(V8Document::createAttributeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("createEntityReference"), - v8::FunctionTemplate::New(V8Document::createEntityReferenceCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getElementsByTagName"), - v8::FunctionTemplate::New(V8Document::getElementsByTagNameCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("importNode"), - v8::FunctionTemplate::New(V8Document::importNodeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("createElementNS"), - v8::FunctionTemplate::New(V8Document::createElementNSCustomCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("createAttributeNS"), - v8::FunctionTemplate::New(V8Document::createAttributeNSCustomCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getElementsByTagNameNS"), - v8::FunctionTemplate::New(V8Document::getElementsByTagNameNSCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getElementById"), - v8::FunctionTemplate::New(V8Document::getElementByIdCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("evaluate"), - v8::FunctionTemplate::New(V8Document::evaluateCustomCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - - tmpl->Inherit(V8Node::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Document_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp deleted file mode 100644 index f9882f0..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8Document.h" -#include "V8XPathResult.h" -#include "V8Storage.h" -#include "V8Attr.h" -#include "V8Element.h" - -namespace Arabica { -namespace DOM { - -v8::Handle V8Document::localStorageCustomAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - v8::Handle retCtor = V8Storage::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - V8Storage::V8StoragePrivate* retPrivData = new V8Storage::V8StoragePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = privData->dom->storage; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8XPathResult::jsDestructor); - return retObj; - -} - - -v8::Handle V8Document::evaluateCustomCallback(const v8::Arguments& args) { - if (args.Length() < 1) - throw V8Exception("Wrong number of arguments in evaluate"); -// if (!((V8Node::hasInstance(args[1])) && (V8XPathResult::hasInstance(args[3])))) -// throw V8Exception("Parameter mismatch while calling evaluate"); - - v8::Local self = args.Holder(); - V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - v8::String::AsciiValue localExpression(args[0]); - - XPath::XPathValue* retVal; - try { - if (args.Length() > 1) { - V8Node::V8NodePrivate* otherNodePrivate = V8DOM::toClassPtr(args[1]->ToObject()->GetInternalField(0)); - Arabica::DOM::Node* localContextNode = otherNodePrivate->nativeObj; - retVal = new XPath::XPathValue(privData->dom->xpath->evaluate(*localExpression, *localContextNode)); - } else { - retVal = new XPath::XPathValue(privData->dom->xpath->evaluate(*localExpression, *privData->nativeObj)); - } - } catch (std::runtime_error e) { - std::cout << e.what() << std::endl; - return v8::Undefined(); - } - - v8::Handle retCtor = V8XPathResult::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - V8XPathResult::V8XPathResultPrivate* retPrivData = new V8XPathResult::V8XPathResultPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8XPathResult::jsDestructor); - return retObj; - -} - -v8::Handle V8Document::createElementNSCustomCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localQualifiedName(args[1]); - - Arabica::DOM::Element* retVal = new Arabica::DOM::Element(privData->nativeObj->createElementNS(*localNamespaceURI, *localQualifiedName)); - if (privData->dom->nsInfo->nsToPrefix.find(*localNamespaceURI) != privData->dom->nsInfo->nsToPrefix.end()) - retVal->setPrefix(privData->dom->nsInfo->nsToPrefix[*localNamespaceURI]); - - v8::Handle retCtor = V8Element::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Element::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createElementNS"); - return v8::Undefined(); -} - -v8::Handle V8Document::createAttributeNSCustomCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localQualifiedName(args[1]); - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->createAttributeNS(*localNamespaceURI, *localQualifiedName)); - if (privData->dom->nsInfo->nsToPrefix.find(*localNamespaceURI) != privData->dom->nsInfo->nsToPrefix.end()) - retVal->setPrefix(privData->dom->nsInfo->nsToPrefix[*localNamespaceURI]); - - v8::Handle retCtor = V8Attr::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Attr::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createAttributeNS"); - return v8::Undefined(); -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentFragment.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentFragment.cpp deleted file mode 100644 index 359f6e5..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentFragment.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8DocumentFragment.h" -#include "V8Node.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8DocumentFragment::Tmpl; -bool V8DocumentFragment::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentFragment.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentFragment.h deleted file mode 100644 index 89d19d3..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentFragment.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8DocumentFragment_h -#define V8DocumentFragment_h - -#include -#include "DOM/Node.hpp" -#include "V8Node.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8DocumentFragment { -public: - struct V8DocumentFragmentPrivate { - V8DOM* dom; - Arabica::DOM::DocumentFragment* nativeObj; - }; - - V8_DESTRUCTOR(V8DocumentFragmentPrivate); - static bool hasInstance(v8::Handle); - - - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("DocumentFragment")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - - - - tmpl->Inherit(V8Node::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8DocumentFragment_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.cpp deleted file mode 100644 index a8839a4..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8DocumentType.h" -#include "V8NamedNodeMap.h" -#include "V8Node.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8DocumentType::Tmpl; - -v8::Handle V8DocumentType::nameAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8DocumentTypePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getName().c_str()); -} - -v8::Handle V8DocumentType::entitiesAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8DocumentTypePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - - Arabica::DOM::NamedNodeMap* arbaicaRet = new Arabica::DOM::NamedNodeMap(privData->nativeObj->getEntities()); - - v8::Handle arbaicaRetCtor = V8NamedNodeMap::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8NamedNodeMap::V8NamedNodeMapPrivate* retPrivData = new V8NamedNodeMap::V8NamedNodeMapPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8NamedNodeMap::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8DocumentType::notationsAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8DocumentTypePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - - Arabica::DOM::NamedNodeMap* arbaicaRet = new Arabica::DOM::NamedNodeMap(privData->nativeObj->getNotations()); - - v8::Handle arbaicaRetCtor = V8NamedNodeMap::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8NamedNodeMap::V8NamedNodeMapPrivate* retPrivData = new V8NamedNodeMap::V8NamedNodeMapPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8NamedNodeMap::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8DocumentType::publicIdAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8DocumentTypePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getPublicId().c_str()); -} - -v8::Handle V8DocumentType::systemIdAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8DocumentTypePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getSystemId().c_str()); -} - -v8::Handle V8DocumentType::internalSubsetAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8DocumentTypePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getInternalSubset().c_str()); -} -bool V8DocumentType::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.h deleted file mode 100644 index 9aec676..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentType.h +++ /dev/null @@ -1,92 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8DocumentType_h -#define V8DocumentType_h - -#include -#include "DOM/Node.hpp" -#include "V8Node.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8DocumentType { -public: - struct V8DocumentTypePrivate { - V8DOM* dom; - Arabica::DOM::DocumentType* nativeObj; - }; - - V8_DESTRUCTOR(V8DocumentTypePrivate); - static bool hasInstance(v8::Handle); - - - static v8::Handle nameAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle entitiesAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle notationsAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle publicIdAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle systemIdAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle internalSubsetAttrGetter(v8::Local property, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("DocumentType")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("name"), V8DocumentType::nameAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("entities"), V8DocumentType::entitiesAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("notations"), V8DocumentType::notationsAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("publicId"), V8DocumentType::publicIdAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("systemId"), V8DocumentType::systemIdAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("internalSubset"), V8DocumentType::internalSubsetAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - - - tmpl->Inherit(V8Node::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8DocumentType_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.cpp deleted file mode 100644 index 15d4c94..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.cpp +++ /dev/null @@ -1,382 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8Attr.h" -#include "V8Element.h" -#include "V8Node.h" -#include "V8NodeList.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Element::Tmpl; - -v8::Handle V8Element::tagNameAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getTagName().c_str()); -} - -v8::Handle V8Element::getAttributeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localName(args[0]); - - std::string retVal = privData->nativeObj->getAttribute(*localName); - - return v8::String::New(retVal.c_str()); - } - throw V8Exception("Parameter mismatch while calling getAttribute"); - return v8::Undefined(); -} - -v8::Handle V8Element::setAttributeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localName(args[0]); - v8::String::AsciiValue localValue(args[1]); - - privData->nativeObj->setAttribute(*localName, *localValue); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling setAttribute"); - return v8::Undefined(); -} - -v8::Handle V8Element::removeAttributeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localName(args[0]); - - privData->nativeObj->removeAttribute(*localName); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling removeAttribute"); - return v8::Undefined(); -} - -v8::Handle V8Element::getAttributeNodeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localName(args[0]); - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->getAttributeNode(*localName)); - v8::Handle retCtor = V8Attr::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Attr::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling getAttributeNode"); - return v8::Undefined(); -} - -v8::Handle V8Element::setAttributeNodeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Attr::hasInstance(args[0])) { - Arabica::DOM::Attr* localNewAttr = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->setAttributeNode(*localNewAttr)); - v8::Handle retCtor = V8Attr::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Attr::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling setAttributeNode"); - return v8::Undefined(); -} - -v8::Handle V8Element::removeAttributeNodeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Attr::hasInstance(args[0])) { - Arabica::DOM::Attr* localOldAttr = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->removeAttributeNode(*localOldAttr)); - v8::Handle retCtor = V8Attr::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Attr::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling removeAttributeNode"); - return v8::Undefined(); -} - -v8::Handle V8Element::getElementsByTagNameCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localName(args[0]); - - Arabica::DOM::NodeList* retVal = new Arabica::DOM::NodeList(privData->nativeObj->getElementsByTagName(*localName)); - v8::Handle retCtor = V8NodeList::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8NodeList::V8NodeListPrivate* retPrivData = new V8NodeList::V8NodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8NodeList::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling getElementsByTagName"); - return v8::Undefined(); -} - -v8::Handle V8Element::getAttributeNSCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localLocalName(args[1]); - - std::string retVal = privData->nativeObj->getAttributeNS(*localNamespaceURI, *localLocalName); - - return v8::String::New(retVal.c_str()); - } - throw V8Exception("Parameter mismatch while calling getAttributeNS"); - return v8::Undefined(); -} - -v8::Handle V8Element::setAttributeNSCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 3 && - args[0]->IsString() && - args[1]->IsString() && - args[2]->IsString()) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localQualifiedName(args[1]); - v8::String::AsciiValue localValue(args[2]); - - privData->nativeObj->setAttributeNS(*localNamespaceURI, *localQualifiedName, *localValue); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling setAttributeNS"); - return v8::Undefined(); -} - -v8::Handle V8Element::removeAttributeNSCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localLocalName(args[1]); - - privData->nativeObj->removeAttributeNS(*localNamespaceURI, *localLocalName); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling removeAttributeNS"); - return v8::Undefined(); -} - -v8::Handle V8Element::getAttributeNodeNSCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localLocalName(args[1]); - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->getAttributeNodeNS(*localNamespaceURI, *localLocalName)); - v8::Handle retCtor = V8Attr::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Attr::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling getAttributeNodeNS"); - return v8::Undefined(); -} - -v8::Handle V8Element::setAttributeNodeNSCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Attr::hasInstance(args[0])) { - Arabica::DOM::Attr* localNewAttr = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - Arabica::DOM::Attr* retVal = new Arabica::DOM::Attr(privData->nativeObj->setAttributeNodeNS(*localNewAttr)); - v8::Handle retCtor = V8Attr::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Attr::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling setAttributeNodeNS"); - return v8::Undefined(); -} - -v8::Handle V8Element::getElementsByTagNameNSCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localLocalName(args[1]); - - Arabica::DOM::NodeList* retVal = new Arabica::DOM::NodeList(privData->nativeObj->getElementsByTagNameNS(*localNamespaceURI, *localLocalName)); - v8::Handle retCtor = V8NodeList::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8NodeList::V8NodeListPrivate* retPrivData = new V8NodeList::V8NodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8NodeList::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling getElementsByTagNameNS"); - return v8::Undefined(); -} - -v8::Handle V8Element::hasAttributeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localName(args[0]); - - bool retVal = privData->nativeObj->hasAttribute(*localName); - - return v8::Boolean::New(retVal); - } - throw V8Exception("Parameter mismatch while calling hasAttribute"); - return v8::Undefined(); -} - -v8::Handle V8Element::hasAttributeNSCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8ElementPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localLocalName(args[1]); - - bool retVal = privData->nativeObj->hasAttributeNS(*localNamespaceURI, *localLocalName); - - return v8::Boolean::New(retVal); - } - throw V8Exception("Parameter mismatch while calling hasAttributeNS"); - return v8::Undefined(); -} -bool V8Element::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.h deleted file mode 100644 index ec87070..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Element.h +++ /dev/null @@ -1,122 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Element_h -#define V8Element_h - -#include -#include "DOM/Node.hpp" -#include "V8Node.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Element { -public: - struct V8ElementPrivate { - V8DOM* dom; - Arabica::DOM::Element* nativeObj; - }; - - V8_DESTRUCTOR(V8ElementPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle getAttributeCallback(const v8::Arguments&); - static v8::Handle setAttributeCallback(const v8::Arguments&); - static v8::Handle removeAttributeCallback(const v8::Arguments&); - static v8::Handle getAttributeNodeCallback(const v8::Arguments&); - static v8::Handle setAttributeNodeCallback(const v8::Arguments&); - static v8::Handle removeAttributeNodeCallback(const v8::Arguments&); - static v8::Handle getElementsByTagNameCallback(const v8::Arguments&); - static v8::Handle getAttributeNSCallback(const v8::Arguments&); - static v8::Handle setAttributeNSCallback(const v8::Arguments&); - static v8::Handle removeAttributeNSCallback(const v8::Arguments&); - static v8::Handle getAttributeNodeNSCallback(const v8::Arguments&); - static v8::Handle setAttributeNodeNSCallback(const v8::Arguments&); - static v8::Handle getElementsByTagNameNSCallback(const v8::Arguments&); - static v8::Handle hasAttributeCallback(const v8::Arguments&); - static v8::Handle hasAttributeNSCallback(const v8::Arguments&); - - static v8::Handle tagNameAttrGetter(v8::Local property, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Element")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("tagName"), V8Element::tagNameAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - prototype->Set(v8::String::NewSymbol("getAttribute"), - v8::FunctionTemplate::New(V8Element::getAttributeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setAttribute"), - v8::FunctionTemplate::New(V8Element::setAttributeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("removeAttribute"), - v8::FunctionTemplate::New(V8Element::removeAttributeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getAttributeNode"), - v8::FunctionTemplate::New(V8Element::getAttributeNodeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setAttributeNode"), - v8::FunctionTemplate::New(V8Element::setAttributeNodeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("removeAttributeNode"), - v8::FunctionTemplate::New(V8Element::removeAttributeNodeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getElementsByTagName"), - v8::FunctionTemplate::New(V8Element::getElementsByTagNameCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getAttributeNS"), - v8::FunctionTemplate::New(V8Element::getAttributeNSCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setAttributeNS"), - v8::FunctionTemplate::New(V8Element::setAttributeNSCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("removeAttributeNS"), - v8::FunctionTemplate::New(V8Element::removeAttributeNSCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getAttributeNodeNS"), - v8::FunctionTemplate::New(V8Element::getAttributeNodeNSCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setAttributeNodeNS"), - v8::FunctionTemplate::New(V8Element::setAttributeNodeNSCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getElementsByTagNameNS"), - v8::FunctionTemplate::New(V8Element::getElementsByTagNameNSCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("hasAttribute"), - v8::FunctionTemplate::New(V8Element::hasAttributeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("hasAttributeNS"), - v8::FunctionTemplate::New(V8Element::hasAttributeNSCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - - tmpl->Inherit(V8Node::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Element_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.cpp deleted file mode 100644 index e26bdb6..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8Entity.h" -#include "V8Node.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Entity::Tmpl; - -v8::Handle V8Entity::publicIdAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8EntityPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getPublicId().c_str()); -} - -v8::Handle V8Entity::systemIdAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8EntityPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getSystemId().c_str()); -} - -v8::Handle V8Entity::notationNameAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8EntityPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getNotationName().c_str()); -} -bool V8Entity::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.h deleted file mode 100644 index f6947b0..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Entity.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Entity_h -#define V8Entity_h - -#include -#include "DOM/Node.hpp" -#include "V8Node.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Entity { -public: - struct V8EntityPrivate { - V8DOM* dom; - Arabica::DOM::Entity* nativeObj; - }; - - V8_DESTRUCTOR(V8EntityPrivate); - static bool hasInstance(v8::Handle); - - - static v8::Handle publicIdAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle systemIdAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle notationNameAttrGetter(v8::Local property, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Entity")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("publicId"), V8Entity::publicIdAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("systemId"), V8Entity::systemIdAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("notationName"), V8Entity::notationNameAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - - - tmpl->Inherit(V8Node::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Entity_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8EntityReference.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8EntityReference.cpp deleted file mode 100644 index eb12655..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8EntityReference.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8EntityReference.h" -#include "V8Node.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8EntityReference::Tmpl; -bool V8EntityReference::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8EntityReference.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8EntityReference.h deleted file mode 100644 index 47b4430..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8EntityReference.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8EntityReference_h -#define V8EntityReference_h - -#include -#include "DOM/Node.hpp" -#include "V8Node.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8EntityReference { -public: - struct V8EntityReferencePrivate { - V8DOM* dom; - Arabica::DOM::EntityReference* nativeObj; - }; - - V8_DESTRUCTOR(V8EntityReferencePrivate); - static bool hasInstance(v8::Handle); - - - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("EntityReference")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - - - - tmpl->Inherit(V8Node::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8EntityReference_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float32Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float32Array.cpp deleted file mode 100644 index e49c2dc..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float32Array.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8ArrayBuffer.h" -#include "V8ArrayBufferView.h" -#include "V8Float32Array.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Float32Array::Tmpl; -v8::Persistent V8Float32Array::Constr; - -v8::Handle V8Float32Array::constructor(const v8::Arguments& args) { - if (!args.IsConstructCall()) - return v8::ThrowException(v8::String::New("Cannot call constructor as function")); - - uscxml::Float32Array* localInstance = NULL; - if (false) { - } else if (args.Length() == 3 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32() && - args[2]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - unsigned long localLength = args[2]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Float32Array(localBuffer, localByteOffset, localLength); - - } else if (args.Length() == 2 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Float32Array(localBuffer, localByteOffset); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Float32Array::hasInstance(args[0])) { - - uscxml::Float32Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Float32Array(localArray); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0])) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Float32Array(localBuffer); - - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - - unsigned long localLength = args[0]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Float32Array(localLength); - - } else if (args.Length() == 1 && - args[0]->IsArray()) { - - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToNumber()->Value()); - } - localInstance = new uscxml::Float32Array(localArray); - - } - if (!localInstance) { - throw V8Exception("Parameter mismatch while calling constructor for Float32Array"); - return v8::Undefined(); - } - - v8::Handle retCtor = V8Float32Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Float32Array::V8Float32ArrayPrivate* retPrivData = new V8Float32Array::V8Float32ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Float32Array::jsDestructor); - return retObj; -} - -v8::Handle V8Float32Array::lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8Float32ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getLength()); -} - -v8::Handle V8Float32Array::getCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Float32ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - - float retVal = privData->nativeObj->get(localIndex); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling get"); - return v8::Undefined(); -} - -v8::Handle V8Float32Array::setCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Float32ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsObject() && V8Float32Array::hasInstance(args[0]) && - args[1]->IsUint32()) { - uscxml::Float32Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsNumber()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - float localValue = args[1]->ToNumber()->Value(); - - privData->nativeObj->set(localIndex, localValue); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsArray() && - args[1]->IsUint32()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToNumber()->Value()); - } - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Float32Array::hasInstance(args[0])) { - uscxml::Float32Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsArray()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToNumber()->Value()); - } - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling set"); - return v8::Undefined(); -} - -v8::Handle V8Float32Array::subarrayCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Float32ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsInt32() && - args[1]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - long localEnd = args[1]->ToNumber()->Int32Value(); - - uscxml::Float32Array* retVal = new uscxml::Float32Array(privData->nativeObj->subarray(localStart, localEnd)); - v8::Handle retCtor = V8Float32Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Float32Array::V8Float32ArrayPrivate* retPrivData = new V8Float32Array::V8Float32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Float32Array::jsDestructor); - return retObj; - - } else if (args.Length() == 1 && - args[0]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - - uscxml::Float32Array* retVal = new uscxml::Float32Array(privData->nativeObj->subarray(localStart)); - v8::Handle retCtor = V8Float32Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Float32Array::V8Float32ArrayPrivate* retPrivData = new V8Float32Array::V8Float32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Float32Array::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling subarray"); - return v8::Undefined(); -} -bool V8Float32Array::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float32Array.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float32Array.h deleted file mode 100644 index 6684b58..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float32Array.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Float32Array_h -#define V8Float32Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "V8ArrayBufferView.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Float32Array { -public: - struct V8Float32ArrayPrivate { - V8DOM* dom; - uscxml::Float32Array* nativeObj; - }; - - V8_DESTRUCTOR(V8Float32ArrayPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle getCallback(const v8::Arguments&); - static v8::Handle setCallback(const v8::Arguments&); - static v8::Handle subarrayCallback(const v8::Arguments&); - - static v8::Handle lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle indexedPropertyCustomGetter(uint32_t, const v8::AccessorInfo&); - static v8::Handle indexedPropertyCustomSetter(uint32_t, v8::Local, const v8::AccessorInfo&); - - static v8::Handle constructor(const v8::Arguments&); - static v8::Persistent Constr; - static v8::Handle getConstructor() { - if (Constr.IsEmpty()) { - v8::Handle constr = v8::FunctionTemplate::New(constructor); - Constr = v8::Persistent::New(constr); - } - return Constr; - } - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Float32Array")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("length"), V8Float32Array::lengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - instance->SetIndexedPropertyHandler(V8Float32Array::indexedPropertyCustomGetter, V8Float32Array::indexedPropertyCustomSetter); - prototype->Set(v8::String::NewSymbol("get"), - v8::FunctionTemplate::New(V8Float32Array::getCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("set"), - v8::FunctionTemplate::New(V8Float32Array::setCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("subarray"), - v8::FunctionTemplate::New(V8Float32Array::subarrayCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - tmpl->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(4), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(4), static_cast(v8::ReadOnly | v8::DontEnum)); - - tmpl->Inherit(V8ArrayBufferView::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Float32Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float64Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float64Array.cpp deleted file mode 100644 index 3b844b5..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float64Array.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8ArrayBuffer.h" -#include "V8ArrayBufferView.h" -#include "V8Float64Array.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Float64Array::Tmpl; -v8::Persistent V8Float64Array::Constr; - -v8::Handle V8Float64Array::constructor(const v8::Arguments& args) { - if (!args.IsConstructCall()) - return v8::ThrowException(v8::String::New("Cannot call constructor as function")); - - uscxml::Float64Array* localInstance = NULL; - if (false) { - } else if (args.Length() == 3 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32() && - args[2]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - unsigned long localLength = args[2]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Float64Array(localBuffer, localByteOffset, localLength); - - } else if (args.Length() == 2 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Float64Array(localBuffer, localByteOffset); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Float64Array::hasInstance(args[0])) { - - uscxml::Float64Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Float64Array(localArray); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0])) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Float64Array(localBuffer); - - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - - unsigned long localLength = args[0]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Float64Array(localLength); - - } else if (args.Length() == 1 && - args[0]->IsArray()) { - - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToNumber()->Value()); - } - localInstance = new uscxml::Float64Array(localArray); - - } - if (!localInstance) { - throw V8Exception("Parameter mismatch while calling constructor for Float64Array"); - return v8::Undefined(); - } - - v8::Handle retCtor = V8Float64Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Float64Array::V8Float64ArrayPrivate* retPrivData = new V8Float64Array::V8Float64ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Float64Array::jsDestructor); - return retObj; -} - -v8::Handle V8Float64Array::lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8Float64ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getLength()); -} - -v8::Handle V8Float64Array::getCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Float64ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - - double retVal = privData->nativeObj->get(localIndex); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling get"); - return v8::Undefined(); -} - -v8::Handle V8Float64Array::setCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Float64ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsObject() && V8Float64Array::hasInstance(args[0]) && - args[1]->IsUint32()) { - uscxml::Float64Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsNumber()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - double localValue = args[1]->ToNumber()->Value(); - - privData->nativeObj->set(localIndex, localValue); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsArray() && - args[1]->IsUint32()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToNumber()->Value()); - } - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Float64Array::hasInstance(args[0])) { - uscxml::Float64Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsArray()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToNumber()->Value()); - } - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling set"); - return v8::Undefined(); -} - -v8::Handle V8Float64Array::subarrayCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Float64ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsInt32() && - args[1]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - long localEnd = args[1]->ToNumber()->Int32Value(); - - uscxml::Float64Array* retVal = new uscxml::Float64Array(privData->nativeObj->subarray(localStart, localEnd)); - v8::Handle retCtor = V8Float64Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Float64Array::V8Float64ArrayPrivate* retPrivData = new V8Float64Array::V8Float64ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Float64Array::jsDestructor); - return retObj; - - } else if (args.Length() == 1 && - args[0]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - - uscxml::Float64Array* retVal = new uscxml::Float64Array(privData->nativeObj->subarray(localStart)); - v8::Handle retCtor = V8Float64Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Float64Array::V8Float64ArrayPrivate* retPrivData = new V8Float64Array::V8Float64ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Float64Array::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling subarray"); - return v8::Undefined(); -} -bool V8Float64Array::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float64Array.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float64Array.h deleted file mode 100644 index 0aa54a8..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Float64Array.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Float64Array_h -#define V8Float64Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "V8ArrayBufferView.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Float64Array { -public: - struct V8Float64ArrayPrivate { - V8DOM* dom; - uscxml::Float64Array* nativeObj; - }; - - V8_DESTRUCTOR(V8Float64ArrayPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle getCallback(const v8::Arguments&); - static v8::Handle setCallback(const v8::Arguments&); - static v8::Handle subarrayCallback(const v8::Arguments&); - - static v8::Handle lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle indexedPropertyCustomGetter(uint32_t, const v8::AccessorInfo&); - static v8::Handle indexedPropertyCustomSetter(uint32_t, v8::Local, const v8::AccessorInfo&); - - static v8::Handle constructor(const v8::Arguments&); - static v8::Persistent Constr; - static v8::Handle getConstructor() { - if (Constr.IsEmpty()) { - v8::Handle constr = v8::FunctionTemplate::New(constructor); - Constr = v8::Persistent::New(constr); - } - return Constr; - } - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Float64Array")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("length"), V8Float64Array::lengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - instance->SetIndexedPropertyHandler(V8Float64Array::indexedPropertyCustomGetter, V8Float64Array::indexedPropertyCustomSetter); - prototype->Set(v8::String::NewSymbol("get"), - v8::FunctionTemplate::New(V8Float64Array::getCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("set"), - v8::FunctionTemplate::New(V8Float64Array::setCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("subarray"), - v8::FunctionTemplate::New(V8Float64Array::subarrayCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - tmpl->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(8), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(8), static_cast(v8::ReadOnly | v8::DontEnum)); - - tmpl->Inherit(V8ArrayBufferView::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Float64Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int16Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int16Array.cpp deleted file mode 100644 index 6a7e136..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int16Array.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8ArrayBuffer.h" -#include "V8ArrayBufferView.h" -#include "V8Int16Array.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Int16Array::Tmpl; -v8::Persistent V8Int16Array::Constr; - -v8::Handle V8Int16Array::constructor(const v8::Arguments& args) { - if (!args.IsConstructCall()) - return v8::ThrowException(v8::String::New("Cannot call constructor as function")); - - uscxml::Int16Array* localInstance = NULL; - if (false) { - } else if (args.Length() == 3 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32() && - args[2]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - unsigned long localLength = args[2]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Int16Array(localBuffer, localByteOffset, localLength); - - } else if (args.Length() == 2 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Int16Array(localBuffer, localByteOffset); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Int16Array::hasInstance(args[0])) { - - uscxml::Int16Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Int16Array(localArray); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0])) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Int16Array(localBuffer); - - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - - unsigned long localLength = args[0]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Int16Array(localLength); - - } else if (args.Length() == 1 && - args[0]->IsArray()) { - - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToInt32()->Value()); - } - localInstance = new uscxml::Int16Array(localArray); - - } - if (!localInstance) { - throw V8Exception("Parameter mismatch while calling constructor for Int16Array"); - return v8::Undefined(); - } - - v8::Handle retCtor = V8Int16Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Int16Array::V8Int16ArrayPrivate* retPrivData = new V8Int16Array::V8Int16ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Int16Array::jsDestructor); - return retObj; -} - -v8::Handle V8Int16Array::lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8Int16ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getLength()); -} - -v8::Handle V8Int16Array::getCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Int16ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - - short retVal = privData->nativeObj->get(localIndex); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling get"); - return v8::Undefined(); -} - -v8::Handle V8Int16Array::setCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Int16ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsObject() && V8Int16Array::hasInstance(args[0]) && - args[1]->IsUint32()) { - uscxml::Int16Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsInt32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - short localValue = args[1]->ToNumber()->Int32Value(); - - privData->nativeObj->set(localIndex, localValue); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsArray() && - args[1]->IsUint32()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToInt32()->Value()); - } - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Int16Array::hasInstance(args[0])) { - uscxml::Int16Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsArray()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToInt32()->Value()); - } - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling set"); - return v8::Undefined(); -} - -v8::Handle V8Int16Array::subarrayCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Int16ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsInt32() && - args[1]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - long localEnd = args[1]->ToNumber()->Int32Value(); - - uscxml::Int16Array* retVal = new uscxml::Int16Array(privData->nativeObj->subarray(localStart, localEnd)); - v8::Handle retCtor = V8Int16Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Int16Array::V8Int16ArrayPrivate* retPrivData = new V8Int16Array::V8Int16ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Int16Array::jsDestructor); - return retObj; - - } else if (args.Length() == 1 && - args[0]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - - uscxml::Int16Array* retVal = new uscxml::Int16Array(privData->nativeObj->subarray(localStart)); - v8::Handle retCtor = V8Int16Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Int16Array::V8Int16ArrayPrivate* retPrivData = new V8Int16Array::V8Int16ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Int16Array::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling subarray"); - return v8::Undefined(); -} -bool V8Int16Array::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int16Array.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int16Array.h deleted file mode 100644 index 0de8d89..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int16Array.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Int16Array_h -#define V8Int16Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "V8ArrayBufferView.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Int16Array { -public: - struct V8Int16ArrayPrivate { - V8DOM* dom; - uscxml::Int16Array* nativeObj; - }; - - V8_DESTRUCTOR(V8Int16ArrayPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle getCallback(const v8::Arguments&); - static v8::Handle setCallback(const v8::Arguments&); - static v8::Handle subarrayCallback(const v8::Arguments&); - - static v8::Handle lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle indexedPropertyCustomGetter(uint32_t, const v8::AccessorInfo&); - static v8::Handle indexedPropertyCustomSetter(uint32_t, v8::Local, const v8::AccessorInfo&); - - static v8::Handle constructor(const v8::Arguments&); - static v8::Persistent Constr; - static v8::Handle getConstructor() { - if (Constr.IsEmpty()) { - v8::Handle constr = v8::FunctionTemplate::New(constructor); - Constr = v8::Persistent::New(constr); - } - return Constr; - } - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Int16Array")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("length"), V8Int16Array::lengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - instance->SetIndexedPropertyHandler(V8Int16Array::indexedPropertyCustomGetter, V8Int16Array::indexedPropertyCustomSetter); - prototype->Set(v8::String::NewSymbol("get"), - v8::FunctionTemplate::New(V8Int16Array::getCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("set"), - v8::FunctionTemplate::New(V8Int16Array::setCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("subarray"), - v8::FunctionTemplate::New(V8Int16Array::subarrayCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - tmpl->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(2), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(2), static_cast(v8::ReadOnly | v8::DontEnum)); - - tmpl->Inherit(V8ArrayBufferView::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Int16Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int32Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int32Array.cpp deleted file mode 100644 index c4055ca..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int32Array.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8ArrayBuffer.h" -#include "V8ArrayBufferView.h" -#include "V8Int32Array.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Int32Array::Tmpl; -v8::Persistent V8Int32Array::Constr; - -v8::Handle V8Int32Array::constructor(const v8::Arguments& args) { - if (!args.IsConstructCall()) - return v8::ThrowException(v8::String::New("Cannot call constructor as function")); - - uscxml::Int32Array* localInstance = NULL; - if (false) { - } else if (args.Length() == 3 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32() && - args[2]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - unsigned long localLength = args[2]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Int32Array(localBuffer, localByteOffset, localLength); - - } else if (args.Length() == 2 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Int32Array(localBuffer, localByteOffset); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Int32Array::hasInstance(args[0])) { - - uscxml::Int32Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Int32Array(localArray); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0])) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Int32Array(localBuffer); - - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - - unsigned long localLength = args[0]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Int32Array(localLength); - - } else if (args.Length() == 1 && - args[0]->IsArray()) { - - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToInteger()->Value()); - } - localInstance = new uscxml::Int32Array(localArray); - - } - if (!localInstance) { - throw V8Exception("Parameter mismatch while calling constructor for Int32Array"); - return v8::Undefined(); - } - - v8::Handle retCtor = V8Int32Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Int32Array::V8Int32ArrayPrivate* retPrivData = new V8Int32Array::V8Int32ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Int32Array::jsDestructor); - return retObj; -} - -v8::Handle V8Int32Array::lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8Int32ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getLength()); -} - -v8::Handle V8Int32Array::getCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Int32ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - - long retVal = privData->nativeObj->get(localIndex); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling get"); - return v8::Undefined(); -} - -v8::Handle V8Int32Array::setCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Int32ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsObject() && V8Int32Array::hasInstance(args[0]) && - args[1]->IsUint32()) { - uscxml::Int32Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsInt32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - long localValue = args[1]->ToNumber()->Int32Value(); - - privData->nativeObj->set(localIndex, localValue); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsArray() && - args[1]->IsUint32()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToInteger()->Value()); - } - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Int32Array::hasInstance(args[0])) { - uscxml::Int32Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsArray()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToInteger()->Value()); - } - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling set"); - return v8::Undefined(); -} - -v8::Handle V8Int32Array::subarrayCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Int32ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsInt32() && - args[1]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - long localEnd = args[1]->ToNumber()->Int32Value(); - - uscxml::Int32Array* retVal = new uscxml::Int32Array(privData->nativeObj->subarray(localStart, localEnd)); - v8::Handle retCtor = V8Int32Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Int32Array::V8Int32ArrayPrivate* retPrivData = new V8Int32Array::V8Int32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Int32Array::jsDestructor); - return retObj; - - } else if (args.Length() == 1 && - args[0]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - - uscxml::Int32Array* retVal = new uscxml::Int32Array(privData->nativeObj->subarray(localStart)); - v8::Handle retCtor = V8Int32Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Int32Array::V8Int32ArrayPrivate* retPrivData = new V8Int32Array::V8Int32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Int32Array::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling subarray"); - return v8::Undefined(); -} -bool V8Int32Array::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int32Array.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int32Array.h deleted file mode 100644 index 431c355..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int32Array.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Int32Array_h -#define V8Int32Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "V8ArrayBufferView.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Int32Array { -public: - struct V8Int32ArrayPrivate { - V8DOM* dom; - uscxml::Int32Array* nativeObj; - }; - - V8_DESTRUCTOR(V8Int32ArrayPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle getCallback(const v8::Arguments&); - static v8::Handle setCallback(const v8::Arguments&); - static v8::Handle subarrayCallback(const v8::Arguments&); - - static v8::Handle lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle indexedPropertyCustomGetter(uint32_t, const v8::AccessorInfo&); - static v8::Handle indexedPropertyCustomSetter(uint32_t, v8::Local, const v8::AccessorInfo&); - - static v8::Handle constructor(const v8::Arguments&); - static v8::Persistent Constr; - static v8::Handle getConstructor() { - if (Constr.IsEmpty()) { - v8::Handle constr = v8::FunctionTemplate::New(constructor); - Constr = v8::Persistent::New(constr); - } - return Constr; - } - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Int32Array")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("length"), V8Int32Array::lengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - instance->SetIndexedPropertyHandler(V8Int32Array::indexedPropertyCustomGetter, V8Int32Array::indexedPropertyCustomSetter); - prototype->Set(v8::String::NewSymbol("get"), - v8::FunctionTemplate::New(V8Int32Array::getCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("set"), - v8::FunctionTemplate::New(V8Int32Array::setCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("subarray"), - v8::FunctionTemplate::New(V8Int32Array::subarrayCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - tmpl->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(4), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(4), static_cast(v8::ReadOnly | v8::DontEnum)); - - tmpl->Inherit(V8ArrayBufferView::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Int32Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int8Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int8Array.cpp deleted file mode 100644 index 9698414..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int8Array.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8ArrayBuffer.h" -#include "V8ArrayBufferView.h" -#include "V8Int8Array.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Int8Array::Tmpl; -v8::Persistent V8Int8Array::Constr; - -v8::Handle V8Int8Array::constructor(const v8::Arguments& args) { - if (!args.IsConstructCall()) - return v8::ThrowException(v8::String::New("Cannot call constructor as function")); - - uscxml::Int8Array* localInstance = NULL; - if (false) { - } else if (args.Length() == 3 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32() && - args[2]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - unsigned long localLength = args[2]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Int8Array(localBuffer, localByteOffset, localLength); - - } else if (args.Length() == 2 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Int8Array(localBuffer, localByteOffset); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Int8Array::hasInstance(args[0])) { - - uscxml::Int8Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Int8Array(localArray); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0])) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Int8Array(localBuffer); - - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - - unsigned long localLength = args[0]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Int8Array(localLength); - - } else if (args.Length() == 1 && - args[0]->IsArray()) { - - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToInt32()->Value()); - } - localInstance = new uscxml::Int8Array(localArray); - - } - if (!localInstance) { - throw V8Exception("Parameter mismatch while calling constructor for Int8Array"); - return v8::Undefined(); - } - - v8::Handle retCtor = V8Int8Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Int8Array::V8Int8ArrayPrivate* retPrivData = new V8Int8Array::V8Int8ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Int8Array::jsDestructor); - return retObj; -} - -v8::Handle V8Int8Array::lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8Int8ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getLength()); -} - -v8::Handle V8Int8Array::getCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Int8ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - - char retVal = privData->nativeObj->get(localIndex); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling get"); - return v8::Undefined(); -} - -v8::Handle V8Int8Array::setCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Int8ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsObject() && V8Int8Array::hasInstance(args[0]) && - args[1]->IsUint32()) { - uscxml::Int8Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsInt32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - char localValue = args[1]->ToNumber()->Int32Value(); - - privData->nativeObj->set(localIndex, localValue); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsArray() && - args[1]->IsUint32()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToInt32()->Value()); - } - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Int8Array::hasInstance(args[0])) { - uscxml::Int8Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsArray()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToInt32()->Value()); - } - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling set"); - return v8::Undefined(); -} - -v8::Handle V8Int8Array::subarrayCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Int8ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsInt32() && - args[1]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - long localEnd = args[1]->ToNumber()->Int32Value(); - - uscxml::Int8Array* retVal = new uscxml::Int8Array(privData->nativeObj->subarray(localStart, localEnd)); - v8::Handle retCtor = V8Int8Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Int8Array::V8Int8ArrayPrivate* retPrivData = new V8Int8Array::V8Int8ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Int8Array::jsDestructor); - return retObj; - - } else if (args.Length() == 1 && - args[0]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - - uscxml::Int8Array* retVal = new uscxml::Int8Array(privData->nativeObj->subarray(localStart)); - v8::Handle retCtor = V8Int8Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Int8Array::V8Int8ArrayPrivate* retPrivData = new V8Int8Array::V8Int8ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Int8Array::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling subarray"); - return v8::Undefined(); -} -bool V8Int8Array::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int8Array.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int8Array.h deleted file mode 100644 index 396139d..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Int8Array.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Int8Array_h -#define V8Int8Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "V8ArrayBufferView.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Int8Array { -public: - struct V8Int8ArrayPrivate { - V8DOM* dom; - uscxml::Int8Array* nativeObj; - }; - - V8_DESTRUCTOR(V8Int8ArrayPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle getCallback(const v8::Arguments&); - static v8::Handle setCallback(const v8::Arguments&); - static v8::Handle subarrayCallback(const v8::Arguments&); - - static v8::Handle lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle indexedPropertyCustomGetter(uint32_t, const v8::AccessorInfo&); - static v8::Handle indexedPropertyCustomSetter(uint32_t, v8::Local, const v8::AccessorInfo&); - - static v8::Handle constructor(const v8::Arguments&); - static v8::Persistent Constr; - static v8::Handle getConstructor() { - if (Constr.IsEmpty()) { - v8::Handle constr = v8::FunctionTemplate::New(constructor); - Constr = v8::Persistent::New(constr); - } - return Constr; - } - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Int8Array")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("length"), V8Int8Array::lengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - instance->SetIndexedPropertyHandler(V8Int8Array::indexedPropertyCustomGetter, V8Int8Array::indexedPropertyCustomSetter); - prototype->Set(v8::String::NewSymbol("get"), - v8::FunctionTemplate::New(V8Int8Array::getCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("set"), - v8::FunctionTemplate::New(V8Int8Array::setCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("subarray"), - v8::FunctionTemplate::New(V8Int8Array::subarrayCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - tmpl->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(1), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(1), static_cast(v8::ReadOnly | v8::DontEnum)); - - tmpl->Inherit(V8ArrayBufferView::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Int8Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.cpp deleted file mode 100644 index b55b9d1..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.cpp +++ /dev/null @@ -1,232 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8NamedNodeMap.h" -#include "V8Node.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8NamedNodeMap::Tmpl; - -v8::Handle V8NamedNodeMap::lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getLength()); -} - -v8::Handle V8NamedNodeMap::getNamedItemCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localName(args[0]); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->getNamedItem(*localName)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling getNamedItem"); - return v8::Undefined(); -} - -v8::Handle V8NamedNodeMap::setNamedItemCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Node::hasInstance(args[0])) { - Arabica::DOM::Node* localArg = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->setNamedItem(*localArg)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling setNamedItem"); - return v8::Undefined(); -} - -v8::Handle V8NamedNodeMap::removeNamedItemCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localName(args[0]); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->removeNamedItem(*localName)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling removeNamedItem"); - return v8::Undefined(); -} - -v8::Handle V8NamedNodeMap::itemCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->item(localIndex)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling item"); - return v8::Undefined(); -} - -v8::Handle V8NamedNodeMap::getNamedItemNSCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localLocalName(args[1]); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->getNamedItemNS(*localNamespaceURI, *localLocalName)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling getNamedItemNS"); - return v8::Undefined(); -} - -v8::Handle V8NamedNodeMap::setNamedItemNSCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Node::hasInstance(args[0])) { - Arabica::DOM::Node* localArg = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->setNamedItemNS(*localArg)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling setNamedItemNS"); - return v8::Undefined(); -} - -v8::Handle V8NamedNodeMap::removeNamedItemNSCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NamedNodeMapPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localLocalName(args[1]); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->removeNamedItemNS(*localNamespaceURI, *localLocalName)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling removeNamedItemNS"); - return v8::Undefined(); -} -bool V8NamedNodeMap::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.h deleted file mode 100644 index 71e501b..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NamedNodeMap.h +++ /dev/null @@ -1,96 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8NamedNodeMap_h -#define V8NamedNodeMap_h - -#include -#include "DOM/Node.hpp" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8NamedNodeMap { -public: - struct V8NamedNodeMapPrivate { - V8DOM* dom; - Arabica::DOM::NamedNodeMap* nativeObj; - }; - - V8_DESTRUCTOR(V8NamedNodeMapPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle getNamedItemCallback(const v8::Arguments&); - static v8::Handle setNamedItemCallback(const v8::Arguments&); - static v8::Handle removeNamedItemCallback(const v8::Arguments&); - static v8::Handle itemCallback(const v8::Arguments&); - static v8::Handle getNamedItemNSCallback(const v8::Arguments&); - static v8::Handle setNamedItemNSCallback(const v8::Arguments&); - static v8::Handle removeNamedItemNSCallback(const v8::Arguments&); - - static v8::Handle lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("NamedNodeMap")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("length"), V8NamedNodeMap::lengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - prototype->Set(v8::String::NewSymbol("getNamedItem"), - v8::FunctionTemplate::New(V8NamedNodeMap::getNamedItemCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setNamedItem"), - v8::FunctionTemplate::New(V8NamedNodeMap::setNamedItemCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("removeNamedItem"), - v8::FunctionTemplate::New(V8NamedNodeMap::removeNamedItemCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("item"), - v8::FunctionTemplate::New(V8NamedNodeMap::itemCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getNamedItemNS"), - v8::FunctionTemplate::New(V8NamedNodeMap::getNamedItemNSCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setNamedItemNS"), - v8::FunctionTemplate::New(V8NamedNodeMap::setNamedItemNSCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("removeNamedItemNS"), - v8::FunctionTemplate::New(V8NamedNodeMap::removeNamedItemNSCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8NamedNodeMap_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.cpp deleted file mode 100644 index ec66b15..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.cpp +++ /dev/null @@ -1,432 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8Document.h" -#include "V8Node.h" -#include "V8NodeList.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Node::Tmpl; - -v8::Handle V8Node::nodeNameAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getNodeName().c_str()); -} - -v8::Handle V8Node::nodeValueAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getNodeValue().c_str()); -} - -void V8Node::nodeValueAttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - v8::String::AsciiValue localNodeValue(value); - privData->nativeObj->setNodeValue(*localNodeValue); -} - -v8::Handle V8Node::nodeTypeAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getNodeType()); -} - -v8::Handle V8Node::parentNodeAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (!privData->nativeObj->getParentNode()) return v8::Undefined(); - Arabica::DOM::Node* arbaicaRet = new Arabica::DOM::Node(privData->nativeObj->getParentNode()); - - v8::Handle arbaicaRetCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8Node::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8Node::childNodesAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - - Arabica::DOM::NodeList* arbaicaRet = new Arabica::DOM::NodeList(privData->nativeObj->getChildNodes()); - - v8::Handle arbaicaRetCtor = V8NodeList::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8NodeList::V8NodeListPrivate* retPrivData = new V8NodeList::V8NodeListPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8NodeList::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8Node::firstChildAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (!privData->nativeObj->getFirstChild()) return v8::Undefined(); - Arabica::DOM::Node* arbaicaRet = new Arabica::DOM::Node(privData->nativeObj->getFirstChild()); - - v8::Handle arbaicaRetCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8Node::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8Node::lastChildAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (!privData->nativeObj->getLastChild()) return v8::Undefined(); - Arabica::DOM::Node* arbaicaRet = new Arabica::DOM::Node(privData->nativeObj->getLastChild()); - - v8::Handle arbaicaRetCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8Node::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8Node::previousSiblingAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (!privData->nativeObj->getPreviousSibling()) return v8::Undefined(); - Arabica::DOM::Node* arbaicaRet = new Arabica::DOM::Node(privData->nativeObj->getPreviousSibling()); - - v8::Handle arbaicaRetCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8Node::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8Node::nextSiblingAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (!privData->nativeObj->getNextSibling()) return v8::Undefined(); - Arabica::DOM::Node* arbaicaRet = new Arabica::DOM::Node(privData->nativeObj->getNextSibling()); - - v8::Handle arbaicaRetCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8Node::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8Node::ownerDocumentAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (!privData->nativeObj->getOwnerDocument()) return v8::Undefined(); - Arabica::DOM::Document* arbaicaRet = new Arabica::DOM::Document(privData->nativeObj->getOwnerDocument()); - - v8::Handle arbaicaRetCtor = V8Document::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8Document::V8DocumentPrivate* retPrivData = new V8Document::V8DocumentPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8Document::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8Node::namespaceURIAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getNamespaceURI().c_str()); -} - -v8::Handle V8Node::prefixAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getPrefix().c_str()); -} - -void V8Node::prefixAttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - v8::String::AsciiValue localPrefix(value); - privData->nativeObj->setPrefix(*localPrefix); -} - -v8::Handle V8Node::localNameAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getLocalName().c_str()); -} - -v8::Handle V8Node::insertBeforeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsObject() && V8Node::hasInstance(args[0]) && - args[1]->IsObject() && V8Node::hasInstance(args[1])) { - Arabica::DOM::Node* localNewChild = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - Arabica::DOM::Node* localRefChild = V8DOM::toClassPtr(args[1]->ToObject()->GetInternalField(0))->nativeObj; - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->insertBefore(*localNewChild, *localRefChild)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling insertBefore"); - return v8::Undefined(); -} - -v8::Handle V8Node::replaceChildCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsObject() && V8Node::hasInstance(args[0]) && - args[1]->IsObject() && V8Node::hasInstance(args[1])) { - Arabica::DOM::Node* localNewChild = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - Arabica::DOM::Node* localOldChild = V8DOM::toClassPtr(args[1]->ToObject()->GetInternalField(0))->nativeObj; - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->replaceChild(*localNewChild, *localOldChild)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling replaceChild"); - return v8::Undefined(); -} - -v8::Handle V8Node::removeChildCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Node::hasInstance(args[0])) { - Arabica::DOM::Node* localOldChild = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->removeChild(*localOldChild)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling removeChild"); - return v8::Undefined(); -} - -v8::Handle V8Node::appendChildCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Node::hasInstance(args[0])) { - Arabica::DOM::Node* localNewChild = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->appendChild(*localNewChild)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling appendChild"); - return v8::Undefined(); -} - -v8::Handle V8Node::hasChildNodesCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 0) { - - bool retVal = privData->nativeObj->hasChildNodes(); - - return v8::Boolean::New(retVal); - } - throw V8Exception("Parameter mismatch while calling hasChildNodes"); - return v8::Undefined(); -} - -v8::Handle V8Node::cloneNodeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsBoolean()) { - bool localDeep = args[0]->ToBoolean()->BooleanValue(); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->cloneNode(localDeep)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling cloneNode"); - return v8::Undefined(); -} - -v8::Handle V8Node::normalizeCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 0) { - - privData->nativeObj->normalize(); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling normalize"); - return v8::Undefined(); -} - -v8::Handle V8Node::isSupportedCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localFeature(args[0]); - v8::String::AsciiValue localVersion(args[1]); - - bool retVal = privData->nativeObj->isSupported(*localFeature, *localVersion); - - return v8::Boolean::New(retVal); - } - throw V8Exception("Parameter mismatch while calling isSupported"); - return v8::Undefined(); -} - -v8::Handle V8Node::hasAttributesCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 0) { - - bool retVal = privData->nativeObj->hasAttributes(); - - return v8::Boolean::New(retVal); - } - throw V8Exception("Parameter mismatch while calling hasAttributes"); - return v8::Undefined(); -} -bool V8Node::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.h deleted file mode 100644 index 5a512ef..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Node.h +++ /dev/null @@ -1,167 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Node_h -#define V8Node_h - -#include -#include "DOM/Node.hpp" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Node { -public: - struct V8NodePrivate { - V8DOM* dom; - Arabica::DOM::Node* nativeObj; - }; - - V8_DESTRUCTOR(V8NodePrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle insertBeforeCallback(const v8::Arguments&); - static v8::Handle replaceChildCallback(const v8::Arguments&); - static v8::Handle removeChildCallback(const v8::Arguments&); - static v8::Handle appendChildCallback(const v8::Arguments&); - static v8::Handle hasChildNodesCallback(const v8::Arguments&); - static v8::Handle cloneNodeCallback(const v8::Arguments&); - static v8::Handle normalizeCallback(const v8::Arguments&); - static v8::Handle isSupportedCallback(const v8::Arguments&); - static v8::Handle hasAttributesCallback(const v8::Arguments&); - - static v8::Handle nodeNameAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle nodeValueAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static void nodeValueAttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info); - static v8::Handle nodeTypeAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle parentNodeAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle childNodesAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle firstChildAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle lastChildAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle previousSiblingAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle nextSiblingAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle attributesCustomAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle ownerDocumentAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle namespaceURIAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle prefixAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static void prefixAttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info); - static v8::Handle localNameAttrGetter(v8::Local property, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Node")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("nodeName"), V8Node::nodeNameAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("nodeValue"), V8Node::nodeValueAttrGetter, V8Node::nodeValueAttrSetter, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("nodeType"), V8Node::nodeTypeAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("parentNode"), V8Node::parentNodeAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("childNodes"), V8Node::childNodesAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("firstChild"), V8Node::firstChildAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("lastChild"), V8Node::lastChildAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("previousSibling"), V8Node::previousSiblingAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("nextSibling"), V8Node::nextSiblingAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("attributes"), V8Node::attributesCustomAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("ownerDocument"), V8Node::ownerDocumentAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("namespaceURI"), V8Node::namespaceURIAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("prefix"), V8Node::prefixAttrGetter, V8Node::prefixAttrSetter, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("localName"), V8Node::localNameAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - prototype->Set(v8::String::NewSymbol("insertBefore"), - v8::FunctionTemplate::New(V8Node::insertBeforeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("replaceChild"), - v8::FunctionTemplate::New(V8Node::replaceChildCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("removeChild"), - v8::FunctionTemplate::New(V8Node::removeChildCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("appendChild"), - v8::FunctionTemplate::New(V8Node::appendChildCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("hasChildNodes"), - v8::FunctionTemplate::New(V8Node::hasChildNodesCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("cloneNode"), - v8::FunctionTemplate::New(V8Node::cloneNodeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("normalize"), - v8::FunctionTemplate::New(V8Node::normalizeCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("isSupported"), - v8::FunctionTemplate::New(V8Node::isSupportedCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("hasAttributes"), - v8::FunctionTemplate::New(V8Node::hasAttributesCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - tmpl->Set(v8::String::NewSymbol("ELEMENT_NODE"), v8::Integer::New(1), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("ELEMENT_NODE"), v8::Integer::New(1), static_cast(v8::ReadOnly | v8::DontEnum)); - tmpl->Set(v8::String::NewSymbol("ATTRIBUTE_NODE"), v8::Integer::New(2), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("ATTRIBUTE_NODE"), v8::Integer::New(2), static_cast(v8::ReadOnly | v8::DontEnum)); - tmpl->Set(v8::String::NewSymbol("TEXT_NODE"), v8::Integer::New(3), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("TEXT_NODE"), v8::Integer::New(3), static_cast(v8::ReadOnly | v8::DontEnum)); - tmpl->Set(v8::String::NewSymbol("CDATA_SECTION_NODE"), v8::Integer::New(4), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("CDATA_SECTION_NODE"), v8::Integer::New(4), static_cast(v8::ReadOnly | v8::DontEnum)); - tmpl->Set(v8::String::NewSymbol("ENTITY_REFERENCE_NODE"), v8::Integer::New(5), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("ENTITY_REFERENCE_NODE"), v8::Integer::New(5), static_cast(v8::ReadOnly | v8::DontEnum)); - tmpl->Set(v8::String::NewSymbol("ENTITY_NODE"), v8::Integer::New(6), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("ENTITY_NODE"), v8::Integer::New(6), static_cast(v8::ReadOnly | v8::DontEnum)); - tmpl->Set(v8::String::NewSymbol("PROCESSING_INSTRUCTION_NODE"), v8::Integer::New(7), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("PROCESSING_INSTRUCTION_NODE"), v8::Integer::New(7), static_cast(v8::ReadOnly | v8::DontEnum)); - tmpl->Set(v8::String::NewSymbol("COMMENT_NODE"), v8::Integer::New(8), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("COMMENT_NODE"), v8::Integer::New(8), static_cast(v8::ReadOnly | v8::DontEnum)); - tmpl->Set(v8::String::NewSymbol("DOCUMENT_NODE"), v8::Integer::New(9), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("DOCUMENT_NODE"), v8::Integer::New(9), static_cast(v8::ReadOnly | v8::DontEnum)); - tmpl->Set(v8::String::NewSymbol("DOCUMENT_TYPE_NODE"), v8::Integer::New(10), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("DOCUMENT_TYPE_NODE"), v8::Integer::New(10), static_cast(v8::ReadOnly | v8::DontEnum)); - tmpl->Set(v8::String::NewSymbol("DOCUMENT_FRAGMENT_NODE"), v8::Integer::New(11), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("DOCUMENT_FRAGMENT_NODE"), v8::Integer::New(11), static_cast(v8::ReadOnly | v8::DontEnum)); - tmpl->Set(v8::String::NewSymbol("NOTATION_NODE"), v8::Integer::New(12), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("NOTATION_NODE"), v8::Integer::New(12), static_cast(v8::ReadOnly | v8::DontEnum)); - - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Node_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeCustom.cpp deleted file mode 100644 index af43e20..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeCustom.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8Node.h" -#include "V8NamedNodeMap.h" - -namespace Arabica { -namespace DOM { - -v8::Handle V8Node::attributesCustomAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (!privData->nativeObj->hasAttributes()) { - return v8::Undefined(); - } - - Arabica::DOM::NamedNodeMap* arbaicaRet = new Arabica::DOM::NamedNodeMap(privData->nativeObj->getAttributes()); - - v8::Handle arbaicaRetCtor = V8NamedNodeMap::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8NamedNodeMap::V8NamedNodeMapPrivate* retPrivData = new V8NamedNodeMap::V8NamedNodeMapPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8NamedNodeMap::jsDestructor); - return arbaicaRetObj; - -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.cpp deleted file mode 100644 index efe5fa8..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8Node.h" -#include "V8NodeList.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8NodeList::Tmpl; - -v8::Handle V8NodeList::lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodeListPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getLength()); -} - -v8::Handle V8NodeList::itemCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NodeListPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->item(localIndex)); - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling item"); - return v8::Undefined(); -} -bool V8NodeList::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.h deleted file mode 100644 index 570ad66..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeList.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8NodeList_h -#define V8NodeList_h - -#include -#include "DOM/Node.hpp" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8NodeList { -public: - struct V8NodeListPrivate { - V8DOM* dom; - Arabica::DOM::NodeList* nativeObj; - }; - - V8_DESTRUCTOR(V8NodeListPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle itemCallback(const v8::Arguments&); - - static v8::Handle lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle indexedPropertyCustomGetter(uint32_t, const v8::AccessorInfo&); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("NodeList")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("length"), V8NodeList::lengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - instance->SetIndexedPropertyHandler(V8NodeList::indexedPropertyCustomGetter, 0); - prototype->Set(v8::String::NewSymbol("item"), - v8::FunctionTemplate::New(V8NodeList::itemCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8NodeList_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeListCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeListCustom.cpp deleted file mode 100644 index 69af5b0..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeListCustom.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8NodeList.h" -#include "V8Element.h" -#include "V8Node.h" - -namespace Arabica { -namespace DOM { - -v8::Handle V8NodeList::indexedPropertyCustomGetter(uint32_t index, const v8::AccessorInfo &info) { - v8::Local self = info.Holder(); - V8NodeListPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (privData->nativeObj->getLength() >= index) { - switch(privData->nativeObj->item(index).getNodeType()) { - case Node_base::ELEMENT_NODE: { - Arabica::DOM::Element* retVal = new Arabica::DOM::Element(privData->nativeObj->item(index)); - - v8::Handle retCtor = V8Element::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Element::jsDestructor); - return retObj; - } - default: { - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->item(index)); - - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - } - } - } - - return v8::Undefined(); - -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.cpp deleted file mode 100644 index a011465..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8NodeSet.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8NodeSet::Tmpl; - -v8::Handle V8NodeSet::sizeAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodeSetPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->size()); -} - -v8::Handle V8NodeSet::emptyAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NodeSetPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Boolean::New(privData->nativeObj->empty()); -} - -v8::Handle V8NodeSet::toDocumentOrderCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8NodeSetPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 0) { - - privData->nativeObj->to_document_order(); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling toDocumentOrder"); - return v8::Undefined(); -} -bool V8NodeSet::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.h deleted file mode 100644 index 85254d5..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSet.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8NodeSet_h -#define V8NodeSet_h - -#include -#include "DOM/Node.hpp" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8NodeSet { -public: - struct V8NodeSetPrivate { - V8DOM* dom; - Arabica::XPath::NodeSet* nativeObj; - }; - - V8_DESTRUCTOR(V8NodeSetPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle toDocumentOrderCallback(const v8::Arguments&); - - static v8::Handle sizeAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle emptyAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle indexedPropertyCustomGetter(uint32_t, const v8::AccessorInfo&); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("NodeSet")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("size"), V8NodeSet::sizeAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("empty"), V8NodeSet::emptyAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - instance->SetIndexedPropertyHandler(V8NodeSet::indexedPropertyCustomGetter, 0); - prototype->Set(v8::String::NewSymbol("toDocumentOrder"), - v8::FunctionTemplate::New(V8NodeSet::toDocumentOrderCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8NodeSet_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSetCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSetCustom.cpp deleted file mode 100644 index 31298f0..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8NodeSetCustom.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8NodeSet.h" -#include "V8Element.h" -#include "V8Node.h" - -namespace Arabica { -namespace DOM { - -v8::Handle V8NodeSet::indexedPropertyCustomGetter(uint32_t index, const v8::AccessorInfo &info) { - v8::Local self = info.Holder(); - V8NodeSetPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (privData->nativeObj->size() >= index) { - switch((*privData->nativeObj)[index].getNodeType()) { - case Node_base::ELEMENT_NODE: { - Arabica::DOM::Element* retVal = new Arabica::DOM::Element((*privData->nativeObj)[index]); - - v8::Handle retCtor = V8Element::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Element::jsDestructor); - return retObj; - } - default: { - Arabica::DOM::Node* retVal = new Arabica::DOM::Node((*privData->nativeObj)[index]); - - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; - } - } - } - - return v8::Undefined(); - -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.cpp deleted file mode 100644 index 1ec9b88..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8Node.h" -#include "V8Notation.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Notation::Tmpl; - -v8::Handle V8Notation::publicIdAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NotationPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getPublicId().c_str()); -} - -v8::Handle V8Notation::systemIdAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8NotationPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getSystemId().c_str()); -} -bool V8Notation::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.h deleted file mode 100644 index 9c574bd..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Notation.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Notation_h -#define V8Notation_h - -#include -#include "DOM/Node.hpp" -#include "V8Node.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Notation { -public: - struct V8NotationPrivate { - V8DOM* dom; - Arabica::DOM::Notation* nativeObj; - }; - - V8_DESTRUCTOR(V8NotationPrivate); - static bool hasInstance(v8::Handle); - - - static v8::Handle publicIdAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle systemIdAttrGetter(v8::Local property, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Notation")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("publicId"), V8Notation::publicIdAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("systemId"), V8Notation::systemIdAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - - - tmpl->Inherit(V8Node::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Notation_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.cpp deleted file mode 100644 index 06fdc7a..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8Node.h" -#include "V8ProcessingInstruction.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8ProcessingInstruction::Tmpl; - -v8::Handle V8ProcessingInstruction::targetAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8ProcessingInstructionPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getTarget().c_str()); -} - -v8::Handle V8ProcessingInstruction::dataAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8ProcessingInstructionPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->getData().c_str()); -} - -void V8ProcessingInstruction::dataAttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8ProcessingInstructionPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - v8::String::AsciiValue localData(value); - privData->nativeObj->setData(*localData); -} -bool V8ProcessingInstruction::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.h deleted file mode 100644 index 20700d2..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8ProcessingInstruction.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8ProcessingInstruction_h -#define V8ProcessingInstruction_h - -#include -#include "DOM/Node.hpp" -#include "V8Node.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8ProcessingInstruction { -public: - struct V8ProcessingInstructionPrivate { - V8DOM* dom; - Arabica::DOM::ProcessingInstruction* nativeObj; - }; - - V8_DESTRUCTOR(V8ProcessingInstructionPrivate); - static bool hasInstance(v8::Handle); - - - static v8::Handle targetAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle dataAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static void dataAttrSetter(v8::Local property, v8::Local value, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("ProcessingInstruction")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("target"), V8ProcessingInstruction::targetAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("data"), V8ProcessingInstruction::dataAttrGetter, V8ProcessingInstruction::dataAttrSetter, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - - - tmpl->Inherit(V8Node::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8ProcessingInstruction_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.cpp deleted file mode 100644 index d459bc2..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8Node.h" -#include "V8SCXMLEvent.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8SCXMLEvent::Tmpl; - -v8::Handle V8SCXMLEvent::nameAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8SCXMLEventPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->name.c_str()); -} - -v8::Handle V8SCXMLEvent::originAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8SCXMLEventPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (privData->nativeObj->origin.length() == 0) - return v8::Undefined(); - return v8::String::New(privData->nativeObj->origin.c_str()); -} - -v8::Handle V8SCXMLEvent::origintypeAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8SCXMLEventPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (privData->nativeObj->origintype.length() == 0) - return v8::Undefined(); - return v8::String::New(privData->nativeObj->origintype.c_str()); -} - -v8::Handle V8SCXMLEvent::rawAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8SCXMLEventPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (privData->nativeObj->raw.length() == 0) - return v8::Undefined(); - return v8::String::New(privData->nativeObj->raw.c_str()); -} - -v8::Handle V8SCXMLEvent::domAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8SCXMLEventPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (!privData->nativeObj->dom) return v8::Undefined(); - Arabica::DOM::Node* arbaicaRet = new Arabica::DOM::Node(privData->nativeObj->dom); - - v8::Handle arbaicaRetCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent arbaicaRetObj = v8::Persistent::New(arbaicaRetCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = arbaicaRet; - - arbaicaRetObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - arbaicaRetObj.MakeWeak(0, V8Node::jsDestructor); - return arbaicaRetObj; - -} - -v8::Handle V8SCXMLEvent::invokeidAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8SCXMLEventPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (privData->nativeObj->invokeid.length() == 0) - return v8::Undefined(); - return v8::String::New(privData->nativeObj->invokeid.c_str()); -} -bool V8SCXMLEvent::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.h deleted file mode 100644 index 72f85c6..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEvent.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8SCXMLEvent_h -#define V8SCXMLEvent_h - -#include -#include "DOM/Node.hpp" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8SCXMLEvent { -public: - struct V8SCXMLEventPrivate { - V8DOM* dom; - uscxml::Event* nativeObj; - }; - - V8_DESTRUCTOR(V8SCXMLEventPrivate); - static bool hasInstance(v8::Handle); - - - static v8::Handle typeCustomAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle nameAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle originAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle origintypeAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle rawAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle domAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle sendidCustomAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle invokeidAttrGetter(v8::Local property, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("SCXMLEvent")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("type"), V8SCXMLEvent::typeCustomAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("name"), V8SCXMLEvent::nameAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("origin"), V8SCXMLEvent::originAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("origintype"), V8SCXMLEvent::origintypeAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("raw"), V8SCXMLEvent::rawAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("dom"), V8SCXMLEvent::domAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("sendid"), V8SCXMLEvent::sendidCustomAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("invokeid"), V8SCXMLEvent::invokeidAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - - tmpl->Set(v8::String::NewSymbol("INTERNAL"), v8::Integer::New(1), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("INTERNAL"), v8::Integer::New(1), static_cast(v8::ReadOnly | v8::DontEnum)); - tmpl->Set(v8::String::NewSymbol("EXTERNAL"), v8::Integer::New(2), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("EXTERNAL"), v8::Integer::New(2), static_cast(v8::ReadOnly | v8::DontEnum)); - tmpl->Set(v8::String::NewSymbol("PLATFORM"), v8::Integer::New(3), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("PLATFORM"), v8::Integer::New(3), static_cast(v8::ReadOnly | v8::DontEnum)); - - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8SCXMLEvent_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEventCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEventCustom.cpp deleted file mode 100644 index 0876f81..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8SCXMLEventCustom.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8SCXMLEvent.h" - -namespace Arabica { -namespace DOM { - -v8::Handle V8SCXMLEvent::typeCustomAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - V8SCXMLEventPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - switch (privData->nativeObj->eventType) { - case uscxml::Event::INTERNAL: - return v8::String::New("internal"); - break; - case uscxml::Event::EXTERNAL: - return v8::String::New("external"); - break; - case uscxml::Event::PLATFORM: - return v8::String::New("platform"); - break; - default: - break; - } - return v8::String::New("unknown"); -} - -v8::Handle V8SCXMLEvent::sendidCustomAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - V8SCXMLEventPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - if (privData->nativeObj->sendid.length() == 0 || privData->nativeObj->hideSendId) - return v8::Undefined(); - return v8::String::New(privData->nativeObj->sendid.c_str()); -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Storage.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Storage.cpp deleted file mode 100644 index f1fb9b6..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Storage.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8Storage.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Storage::Tmpl; - -v8::Handle V8Storage::lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8StoragePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getLength()); -} - -v8::Handle V8Storage::keyCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8StoragePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - - std::string retVal = privData->nativeObj->key(localIndex); - - return v8::String::New(retVal.c_str()); - } - throw V8Exception("Parameter mismatch while calling key"); - return v8::Undefined(); -} - -v8::Handle V8Storage::getItemCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8StoragePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localKey(args[0]); - - std::string retVal = privData->nativeObj->getItem(*localKey); - - return v8::String::New(retVal.c_str()); - } - throw V8Exception("Parameter mismatch while calling getItem"); - return v8::Undefined(); -} - -v8::Handle V8Storage::setItemCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8StoragePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localKey(args[0]); - v8::String::AsciiValue localValue(args[1]); - - privData->nativeObj->setItem(*localKey, *localValue); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling setItem"); - return v8::Undefined(); -} - -v8::Handle V8Storage::removeItemCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8StoragePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsString()) { - v8::String::AsciiValue localKey(args[0]); - - privData->nativeObj->removeItem(*localKey); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling removeItem"); - return v8::Undefined(); -} - -v8::Handle V8Storage::clearCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8StoragePrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 0) { - - privData->nativeObj->clear(); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling clear"); - return v8::Undefined(); -} -bool V8Storage::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Storage.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Storage.h deleted file mode 100644 index b3d4c53..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Storage.h +++ /dev/null @@ -1,90 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Storage_h -#define V8Storage_h - -#include -#include "DOM/Node.hpp" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Storage { -public: - struct V8StoragePrivate { - V8DOM* dom; - uscxml::Storage* nativeObj; - }; - - V8_DESTRUCTOR_KEEP_WRAPPED(V8StoragePrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle keyCallback(const v8::Arguments&); - static v8::Handle getItemCallback(const v8::Arguments&); - static v8::Handle setItemCallback(const v8::Arguments&); - static v8::Handle removeItemCallback(const v8::Arguments&); - static v8::Handle clearCallback(const v8::Arguments&); - - static v8::Handle lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Storage")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("length"), V8Storage::lengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - prototype->Set(v8::String::NewSymbol("key"), - v8::FunctionTemplate::New(V8Storage::keyCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("getItem"), - v8::FunctionTemplate::New(V8Storage::getItemCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("setItem"), - v8::FunctionTemplate::New(V8Storage::setItemCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("removeItem"), - v8::FunctionTemplate::New(V8Storage::removeItemCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("clear"), - v8::FunctionTemplate::New(V8Storage::clearCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Storage_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.cpp deleted file mode 100644 index ec06237..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8CharacterData.h" -#include "V8Text.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Text::Tmpl; - -v8::Handle V8Text::splitTextCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8TextPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localOffset = args[0]->ToNumber()->Uint32Value(); - - Arabica::DOM::Text* retVal = new Arabica::DOM::Text(privData->nativeObj->splitText(localOffset)); - v8::Handle retCtor = V8Text::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Text::V8TextPrivate* retPrivData = new V8Text::V8TextPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Text::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling splitText"); - return v8::Undefined(); -} -bool V8Text::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.h deleted file mode 100644 index 1151311..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Text.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Text_h -#define V8Text_h - -#include -#include "DOM/Node.hpp" -#include "V8CharacterData.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Text { -public: - struct V8TextPrivate { - V8DOM* dom; - Arabica::DOM::Text* nativeObj; - }; - - V8_DESTRUCTOR(V8TextPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle splitTextCallback(const v8::Arguments&); - - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Text")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - - prototype->Set(v8::String::NewSymbol("splitText"), - v8::FunctionTemplate::New(V8Text::splitTextCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - - tmpl->Inherit(V8CharacterData::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Text_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8TypedArrayCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8TypedArrayCustom.cpp deleted file mode 100644 index dc25a4f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8TypedArrayCustom.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "../../TypedArray.h" -#include "V8ArrayBuffer.h" -#include "V8Int8Array.h" -#include "V8Uint8Array.h" -#include "V8Uint8ClampedArray.h" -#include "V8Int16Array.h" -#include "V8Uint16Array.h" -#include "V8Int32Array.h" -#include "V8Uint32Array.h" -#include "V8Float32Array.h" -#include "V8Float64Array.h" -#include "V8DataView.h" - -#define V8_TYPED_ARRAY_GET_PRIVATE(type) \ -v8::Local self = info.Holder(); \ -uscxml::type* array = V8DOM::toClassPtr(self->GetInternalField(0))->nativeObj; \ -if (index > array->getLength()) \ - return v8::Undefined(); - - -namespace Arabica { -namespace DOM { - -v8::Handle V8Int8Array::indexedPropertyCustomSetter(unsigned int index, v8::Local value, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Int8Array); - array->set(index, value->ToInt32()->Value()); - return value; -} - -v8::Handle V8Int16Array::indexedPropertyCustomSetter(unsigned int index, v8::Local value, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Int16Array); - array->set(index, value->ToInt32()->Value()); - return value; -} - -v8::Handle V8Int32Array::indexedPropertyCustomSetter(unsigned int index, v8::Local value, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Int32Array); - array->set(index, value->ToInt32()->Value()); - return value; -} - -v8::Handle V8Uint8Array::indexedPropertyCustomSetter(unsigned int index, v8::Local value, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Uint8Array); - array->set(index, value->ToUint32()->Value()); - return value; -} - -v8::Handle V8Uint16Array::indexedPropertyCustomSetter(unsigned int index, v8::Local value, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Uint16Array); - array->set(index, value->ToUint32()->Value()); - return value; -} - -v8::Handle V8Uint32Array::indexedPropertyCustomSetter(unsigned int index, v8::Local value, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Uint32Array); - array->set(index, value->ToUint32()->Value()); - return value; -} - -v8::Handle V8Float32Array::indexedPropertyCustomSetter(unsigned int index, v8::Local value, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Float32Array); - array->set(index, value->ToNumber()->Value()); - return value; -} - -v8::Handle V8Float64Array::indexedPropertyCustomSetter(unsigned int index, v8::Local value, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Float64Array); - array->set(index, value->ToNumber()->Value()); - return value; -} - -v8::Handle V8Uint8ClampedArray::indexedPropertyCustomSetter(unsigned int index, v8::Local value, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Uint8ClampedArray); - array->set(index, value->ToUint32()->Value() & 0xff); - return value; -} - -// ---------------- - -v8::Handle V8Int8Array::indexedPropertyCustomGetter(unsigned int index, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Int8Array); - return v8::Int32::New(array->get(index)); -} - -v8::Handle V8Int16Array::indexedPropertyCustomGetter(unsigned int index, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Int16Array); - return v8::Int32::New(array->get(index)); -} - -v8::Handle V8Int32Array::indexedPropertyCustomGetter(unsigned int index, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Int32Array); - return v8::Int32::New(array->get(index)); -} - -v8::Handle V8Uint8Array::indexedPropertyCustomGetter(unsigned int index, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Uint8Array); - return v8::Uint32::New(array->get(index)); -} - -v8::Handle V8Uint16Array::indexedPropertyCustomGetter(unsigned int index, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Uint16Array); - return v8::Uint32::New(array->get(index)); -} - -v8::Handle V8Uint32Array::indexedPropertyCustomGetter(unsigned int index, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Uint32Array); - return v8::Uint32::New(array->get(index)); -} - -v8::Handle V8Float32Array::indexedPropertyCustomGetter(unsigned int index, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Float32Array); - return v8::Number::New(array->get(index)); -} - -v8::Handle V8Float64Array::indexedPropertyCustomGetter(unsigned int index, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Float64Array); - return v8::Number::New(array->get(index)); -} - -v8::Handle V8Uint8ClampedArray::indexedPropertyCustomGetter(unsigned int index, const v8::AccessorInfo &info) { - V8_TYPED_ARRAY_GET_PRIVATE(Uint8ClampedArray); - return v8::Uint32::New(array->get(index)); -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint16Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint16Array.cpp deleted file mode 100644 index 1fbe1d5..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint16Array.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8ArrayBuffer.h" -#include "V8ArrayBufferView.h" -#include "V8Uint16Array.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Uint16Array::Tmpl; -v8::Persistent V8Uint16Array::Constr; - -v8::Handle V8Uint16Array::constructor(const v8::Arguments& args) { - if (!args.IsConstructCall()) - return v8::ThrowException(v8::String::New("Cannot call constructor as function")); - - uscxml::Uint16Array* localInstance = NULL; - if (false) { - } else if (args.Length() == 3 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32() && - args[2]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - unsigned long localLength = args[2]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Uint16Array(localBuffer, localByteOffset, localLength); - - } else if (args.Length() == 2 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Uint16Array(localBuffer, localByteOffset); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Uint16Array::hasInstance(args[0])) { - - uscxml::Uint16Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Uint16Array(localArray); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0])) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Uint16Array(localBuffer); - - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - - unsigned long localLength = args[0]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Uint16Array(localLength); - - } else if (args.Length() == 1 && - args[0]->IsArray()) { - - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToUint32()->Value()); - } - localInstance = new uscxml::Uint16Array(localArray); - - } - if (!localInstance) { - throw V8Exception("Parameter mismatch while calling constructor for Uint16Array"); - return v8::Undefined(); - } - - v8::Handle retCtor = V8Uint16Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Uint16Array::V8Uint16ArrayPrivate* retPrivData = new V8Uint16Array::V8Uint16ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Uint16Array::jsDestructor); - return retObj; -} - -v8::Handle V8Uint16Array::lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8Uint16ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getLength()); -} - -v8::Handle V8Uint16Array::getCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Uint16ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - - unsigned short retVal = privData->nativeObj->get(localIndex); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling get"); - return v8::Undefined(); -} - -v8::Handle V8Uint16Array::setCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Uint16ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsObject() && V8Uint16Array::hasInstance(args[0]) && - args[1]->IsUint32()) { - uscxml::Uint16Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - unsigned short localValue = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localIndex, localValue); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsArray() && - args[1]->IsUint32()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToUint32()->Value()); - } - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Uint16Array::hasInstance(args[0])) { - uscxml::Uint16Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsArray()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToUint32()->Value()); - } - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling set"); - return v8::Undefined(); -} - -v8::Handle V8Uint16Array::subarrayCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Uint16ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsInt32() && - args[1]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - long localEnd = args[1]->ToNumber()->Int32Value(); - - uscxml::Uint16Array* retVal = new uscxml::Uint16Array(privData->nativeObj->subarray(localStart, localEnd)); - v8::Handle retCtor = V8Uint16Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Uint16Array::V8Uint16ArrayPrivate* retPrivData = new V8Uint16Array::V8Uint16ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Uint16Array::jsDestructor); - return retObj; - - } else if (args.Length() == 1 && - args[0]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - - uscxml::Uint16Array* retVal = new uscxml::Uint16Array(privData->nativeObj->subarray(localStart)); - v8::Handle retCtor = V8Uint16Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Uint16Array::V8Uint16ArrayPrivate* retPrivData = new V8Uint16Array::V8Uint16ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Uint16Array::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling subarray"); - return v8::Undefined(); -} -bool V8Uint16Array::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint16Array.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint16Array.h deleted file mode 100644 index 3f94ab8..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint16Array.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Uint16Array_h -#define V8Uint16Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "V8ArrayBufferView.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Uint16Array { -public: - struct V8Uint16ArrayPrivate { - V8DOM* dom; - uscxml::Uint16Array* nativeObj; - }; - - V8_DESTRUCTOR(V8Uint16ArrayPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle getCallback(const v8::Arguments&); - static v8::Handle setCallback(const v8::Arguments&); - static v8::Handle subarrayCallback(const v8::Arguments&); - - static v8::Handle lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle indexedPropertyCustomGetter(uint32_t, const v8::AccessorInfo&); - static v8::Handle indexedPropertyCustomSetter(uint32_t, v8::Local, const v8::AccessorInfo&); - - static v8::Handle constructor(const v8::Arguments&); - static v8::Persistent Constr; - static v8::Handle getConstructor() { - if (Constr.IsEmpty()) { - v8::Handle constr = v8::FunctionTemplate::New(constructor); - Constr = v8::Persistent::New(constr); - } - return Constr; - } - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Uint16Array")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("length"), V8Uint16Array::lengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - instance->SetIndexedPropertyHandler(V8Uint16Array::indexedPropertyCustomGetter, V8Uint16Array::indexedPropertyCustomSetter); - prototype->Set(v8::String::NewSymbol("get"), - v8::FunctionTemplate::New(V8Uint16Array::getCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("set"), - v8::FunctionTemplate::New(V8Uint16Array::setCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("subarray"), - v8::FunctionTemplate::New(V8Uint16Array::subarrayCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - tmpl->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(2), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(2), static_cast(v8::ReadOnly | v8::DontEnum)); - - tmpl->Inherit(V8ArrayBufferView::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Uint16Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint32Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint32Array.cpp deleted file mode 100644 index 10f3b3c..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint32Array.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8ArrayBuffer.h" -#include "V8ArrayBufferView.h" -#include "V8Uint32Array.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Uint32Array::Tmpl; -v8::Persistent V8Uint32Array::Constr; - -v8::Handle V8Uint32Array::constructor(const v8::Arguments& args) { - if (!args.IsConstructCall()) - return v8::ThrowException(v8::String::New("Cannot call constructor as function")); - - uscxml::Uint32Array* localInstance = NULL; - if (false) { - } else if (args.Length() == 3 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32() && - args[2]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - unsigned long localLength = args[2]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Uint32Array(localBuffer, localByteOffset, localLength); - - } else if (args.Length() == 2 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Uint32Array(localBuffer, localByteOffset); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Uint32Array::hasInstance(args[0])) { - - uscxml::Uint32Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Uint32Array(localArray); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0])) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Uint32Array(localBuffer); - - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - - unsigned long localLength = args[0]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Uint32Array(localLength); - - } else if (args.Length() == 1 && - args[0]->IsArray()) { - - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToUint32()->Value()); - } - localInstance = new uscxml::Uint32Array(localArray); - - } - if (!localInstance) { - throw V8Exception("Parameter mismatch while calling constructor for Uint32Array"); - return v8::Undefined(); - } - - v8::Handle retCtor = V8Uint32Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Uint32Array::V8Uint32ArrayPrivate* retPrivData = new V8Uint32Array::V8Uint32ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Uint32Array::jsDestructor); - return retObj; -} - -v8::Handle V8Uint32Array::lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8Uint32ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getLength()); -} - -v8::Handle V8Uint32Array::getCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Uint32ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - - unsigned long retVal = privData->nativeObj->get(localIndex); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling get"); - return v8::Undefined(); -} - -v8::Handle V8Uint32Array::setCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Uint32ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsObject() && V8Uint32Array::hasInstance(args[0]) && - args[1]->IsUint32()) { - uscxml::Uint32Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - unsigned long localValue = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localIndex, localValue); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsArray() && - args[1]->IsUint32()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToUint32()->Value()); - } - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Uint32Array::hasInstance(args[0])) { - uscxml::Uint32Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsArray()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToUint32()->Value()); - } - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling set"); - return v8::Undefined(); -} - -v8::Handle V8Uint32Array::subarrayCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Uint32ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsInt32() && - args[1]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - long localEnd = args[1]->ToNumber()->Int32Value(); - - uscxml::Uint32Array* retVal = new uscxml::Uint32Array(privData->nativeObj->subarray(localStart, localEnd)); - v8::Handle retCtor = V8Uint32Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Uint32Array::V8Uint32ArrayPrivate* retPrivData = new V8Uint32Array::V8Uint32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Uint32Array::jsDestructor); - return retObj; - - } else if (args.Length() == 1 && - args[0]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - - uscxml::Uint32Array* retVal = new uscxml::Uint32Array(privData->nativeObj->subarray(localStart)); - v8::Handle retCtor = V8Uint32Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Uint32Array::V8Uint32ArrayPrivate* retPrivData = new V8Uint32Array::V8Uint32ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Uint32Array::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling subarray"); - return v8::Undefined(); -} -bool V8Uint32Array::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint32Array.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint32Array.h deleted file mode 100644 index 2ecaa9e..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint32Array.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Uint32Array_h -#define V8Uint32Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "V8ArrayBufferView.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Uint32Array { -public: - struct V8Uint32ArrayPrivate { - V8DOM* dom; - uscxml::Uint32Array* nativeObj; - }; - - V8_DESTRUCTOR(V8Uint32ArrayPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle getCallback(const v8::Arguments&); - static v8::Handle setCallback(const v8::Arguments&); - static v8::Handle subarrayCallback(const v8::Arguments&); - - static v8::Handle lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle indexedPropertyCustomGetter(uint32_t, const v8::AccessorInfo&); - static v8::Handle indexedPropertyCustomSetter(uint32_t, v8::Local, const v8::AccessorInfo&); - - static v8::Handle constructor(const v8::Arguments&); - static v8::Persistent Constr; - static v8::Handle getConstructor() { - if (Constr.IsEmpty()) { - v8::Handle constr = v8::FunctionTemplate::New(constructor); - Constr = v8::Persistent::New(constr); - } - return Constr; - } - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Uint32Array")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("length"), V8Uint32Array::lengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - instance->SetIndexedPropertyHandler(V8Uint32Array::indexedPropertyCustomGetter, V8Uint32Array::indexedPropertyCustomSetter); - prototype->Set(v8::String::NewSymbol("get"), - v8::FunctionTemplate::New(V8Uint32Array::getCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("set"), - v8::FunctionTemplate::New(V8Uint32Array::setCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("subarray"), - v8::FunctionTemplate::New(V8Uint32Array::subarrayCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - tmpl->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(4), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(4), static_cast(v8::ReadOnly | v8::DontEnum)); - - tmpl->Inherit(V8ArrayBufferView::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Uint32Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8Array.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8Array.cpp deleted file mode 100644 index 3a8248a..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8Array.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8ArrayBuffer.h" -#include "V8ArrayBufferView.h" -#include "V8Uint8Array.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Uint8Array::Tmpl; -v8::Persistent V8Uint8Array::Constr; - -v8::Handle V8Uint8Array::constructor(const v8::Arguments& args) { - if (!args.IsConstructCall()) - return v8::ThrowException(v8::String::New("Cannot call constructor as function")); - - uscxml::Uint8Array* localInstance = NULL; - if (false) { - } else if (args.Length() == 3 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32() && - args[2]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - unsigned long localLength = args[2]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Uint8Array(localBuffer, localByteOffset, localLength); - - } else if (args.Length() == 2 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Uint8Array(localBuffer, localByteOffset); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Uint8Array::hasInstance(args[0])) { - - uscxml::Uint8Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Uint8Array(localArray); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0])) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Uint8Array(localBuffer); - - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - - unsigned long localLength = args[0]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Uint8Array(localLength); - - } else if (args.Length() == 1 && - args[0]->IsArray()) { - - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToUint32()->Value()); - } - localInstance = new uscxml::Uint8Array(localArray); - - } - if (!localInstance) { - throw V8Exception("Parameter mismatch while calling constructor for Uint8Array"); - return v8::Undefined(); - } - - v8::Handle retCtor = V8Uint8Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Uint8Array::V8Uint8ArrayPrivate* retPrivData = new V8Uint8Array::V8Uint8ArrayPrivate(); - retPrivData->nativeObj = localInstance; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Uint8Array::jsDestructor); - return retObj; -} - -v8::Handle V8Uint8Array::lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8Uint8ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getLength()); -} - -v8::Handle V8Uint8Array::getCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Uint8ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - - unsigned char retVal = privData->nativeObj->get(localIndex); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling get"); - return v8::Undefined(); -} - -v8::Handle V8Uint8Array::setCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Uint8ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsObject() && V8Uint8Array::hasInstance(args[0]) && - args[1]->IsUint32()) { - uscxml::Uint8Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - unsigned char localValue = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localIndex, localValue); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsArray() && - args[1]->IsUint32()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToUint32()->Value()); - } - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Uint8Array::hasInstance(args[0])) { - uscxml::Uint8Array* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsArray()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToUint32()->Value()); - } - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling set"); - return v8::Undefined(); -} - -v8::Handle V8Uint8Array::subarrayCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Uint8ArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsInt32() && - args[1]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - long localEnd = args[1]->ToNumber()->Int32Value(); - - uscxml::Uint8Array* retVal = new uscxml::Uint8Array(privData->nativeObj->subarray(localStart, localEnd)); - v8::Handle retCtor = V8Uint8Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Uint8Array::V8Uint8ArrayPrivate* retPrivData = new V8Uint8Array::V8Uint8ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Uint8Array::jsDestructor); - return retObj; - - } else if (args.Length() == 1 && - args[0]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - - uscxml::Uint8Array* retVal = new uscxml::Uint8Array(privData->nativeObj->subarray(localStart)); - v8::Handle retCtor = V8Uint8Array::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Uint8Array::V8Uint8ArrayPrivate* retPrivData = new V8Uint8Array::V8Uint8ArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Uint8Array::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling subarray"); - return v8::Undefined(); -} -bool V8Uint8Array::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8Array.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8Array.h deleted file mode 100644 index 9ecc219..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8Array.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Uint8Array_h -#define V8Uint8Array_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "V8ArrayBufferView.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Uint8Array { -public: - struct V8Uint8ArrayPrivate { - V8DOM* dom; - uscxml::Uint8Array* nativeObj; - }; - - V8_DESTRUCTOR(V8Uint8ArrayPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle getCallback(const v8::Arguments&); - static v8::Handle setCallback(const v8::Arguments&); - static v8::Handle subarrayCallback(const v8::Arguments&); - - static v8::Handle lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle indexedPropertyCustomGetter(uint32_t, const v8::AccessorInfo&); - static v8::Handle indexedPropertyCustomSetter(uint32_t, v8::Local, const v8::AccessorInfo&); - - static v8::Handle constructor(const v8::Arguments&); - static v8::Persistent Constr; - static v8::Handle getConstructor() { - if (Constr.IsEmpty()) { - v8::Handle constr = v8::FunctionTemplate::New(constructor); - Constr = v8::Persistent::New(constr); - } - return Constr; - } - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Uint8Array")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("length"), V8Uint8Array::lengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - instance->SetIndexedPropertyHandler(V8Uint8Array::indexedPropertyCustomGetter, V8Uint8Array::indexedPropertyCustomSetter); - prototype->Set(v8::String::NewSymbol("get"), - v8::FunctionTemplate::New(V8Uint8Array::getCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("set"), - v8::FunctionTemplate::New(V8Uint8Array::setCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("subarray"), - v8::FunctionTemplate::New(V8Uint8Array::subarrayCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - tmpl->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(1), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(1), static_cast(v8::ReadOnly | v8::DontEnum)); - - tmpl->Inherit(V8ArrayBufferView::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Uint8Array_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8ClampedArray.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8ClampedArray.cpp deleted file mode 100644 index e05c8a8..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8ClampedArray.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8ArrayBuffer.h" -#include "V8ArrayBufferView.h" -#include "V8Uint8ClampedArray.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8Uint8ClampedArray::Tmpl; -v8::Persistent V8Uint8ClampedArray::Constr; - -v8::Handle V8Uint8ClampedArray::constructor(const v8::Arguments& args) { - if (!args.IsConstructCall()) - return v8::ThrowException(v8::String::New("Cannot call constructor as function")); - - uscxml::Uint8ClampedArray* localInstance = NULL; - if (false) { - } else if (args.Length() == 3 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32() && - args[2]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - unsigned long localLength = args[2]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Uint8ClampedArray(localBuffer, localByteOffset, localLength); - - } else if (args.Length() == 2 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0]) && - args[1]->IsUint32()) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localByteOffset = args[1]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Uint8ClampedArray(localBuffer, localByteOffset); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Uint8ClampedArray::hasInstance(args[0])) { - - uscxml::Uint8ClampedArray* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Uint8ClampedArray(localArray); - - } else if (args.Length() == 1 && - args[0]->IsObject() && V8ArrayBuffer::hasInstance(args[0])) { - - uscxml::ArrayBuffer* localBuffer = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - localInstance = new uscxml::Uint8ClampedArray(localBuffer); - - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - - unsigned long localLength = args[0]->ToNumber()->Uint32Value(); - localInstance = new uscxml::Uint8ClampedArray(localLength); - - } else if (args.Length() == 1 && - args[0]->IsArray()) { - - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToUint32()->Value()); - } - localInstance = new uscxml::Uint8ClampedArray(localArray); - - } - if (!localInstance) { - throw V8Exception("Parameter mismatch while calling constructor for Uint8ClampedArray"); - return v8::Undefined(); - } - - v8::Handle retCtor = V8Uint8ClampedArray::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Uint8ClampedArray::V8Uint8ClampedArrayPrivate* retPrivData = new V8Uint8ClampedArray::V8Uint8ClampedArrayPrivate(); - retPrivData->nativeObj = localInstance; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Uint8ClampedArray::jsDestructor); - return retObj; -} - -v8::Handle V8Uint8ClampedArray::lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8Uint8ClampedArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Integer::New(privData->nativeObj->getLength()); -} - -v8::Handle V8Uint8ClampedArray::getCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Uint8ClampedArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 1 && - args[0]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - - unsigned char retVal = privData->nativeObj->get(localIndex); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling get"); - return v8::Undefined(); -} - -v8::Handle V8Uint8ClampedArray::setCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Uint8ClampedArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsObject() && V8Uint8ClampedArray::hasInstance(args[0]) && - args[1]->IsUint32()) { - uscxml::Uint8ClampedArray* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsUint32() && - args[1]->IsUint32()) { - unsigned long localIndex = args[0]->ToNumber()->Uint32Value(); - unsigned char localValue = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localIndex, localValue); - - return v8::Undefined(); - } else if (args.Length() == 2 && - args[0]->IsArray() && - args[1]->IsUint32()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToUint32()->Value()); - } - unsigned long localOffset = args[1]->ToNumber()->Uint32Value(); - - privData->nativeObj->set(localArray, localOffset); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsObject() && V8Uint8ClampedArray::hasInstance(args[0])) { - uscxml::Uint8ClampedArray* localArray = V8DOM::toClassPtr(args[0]->ToObject()->GetInternalField(0))->nativeObj; - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } else if (args.Length() == 1 && - args[0]->IsArray()) { - std::vector localArray; - v8::Handle localArrayArray(v8::Array::Cast(*args[0])); - for (int i = 0; i < localArrayArray->Length(); i++) { - localArray.push_back(localArrayArray->Get(i)->ToUint32()->Value()); - } - - privData->nativeObj->set(localArray); - - return v8::Undefined(); - } - throw V8Exception("Parameter mismatch while calling set"); - return v8::Undefined(); -} - -v8::Handle V8Uint8ClampedArray::subarrayCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8Uint8ClampedArrayPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsInt32() && - args[1]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - long localEnd = args[1]->ToNumber()->Int32Value(); - - uscxml::Uint8ClampedArray* retVal = new uscxml::Uint8ClampedArray(privData->nativeObj->subarray(localStart, localEnd)); - v8::Handle retCtor = V8Uint8ClampedArray::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Uint8ClampedArray::V8Uint8ClampedArrayPrivate* retPrivData = new V8Uint8ClampedArray::V8Uint8ClampedArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Uint8ClampedArray::jsDestructor); - return retObj; - - } else if (args.Length() == 1 && - args[0]->IsInt32()) { - long localStart = args[0]->ToNumber()->Int32Value(); - - uscxml::Uint8ClampedArray* retVal = new uscxml::Uint8ClampedArray(privData->nativeObj->subarray(localStart)); - v8::Handle retCtor = V8Uint8ClampedArray::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Uint8ClampedArray::V8Uint8ClampedArrayPrivate* retPrivData = new V8Uint8ClampedArray::V8Uint8ClampedArrayPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Uint8ClampedArray::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling subarray"); - return v8::Undefined(); -} -bool V8Uint8ClampedArray::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8ClampedArray.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8ClampedArray.h deleted file mode 100644 index 3fa08de..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Uint8ClampedArray.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8Uint8ClampedArray_h -#define V8Uint8ClampedArray_h - -#include -#include "../../TypedArray.h" -#include "DOM/Node.hpp" -#include "V8ArrayBufferView.h" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8Uint8ClampedArray { -public: - struct V8Uint8ClampedArrayPrivate { - V8DOM* dom; - uscxml::Uint8ClampedArray* nativeObj; - }; - - V8_DESTRUCTOR(V8Uint8ClampedArrayPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle getCallback(const v8::Arguments&); - static v8::Handle setCallback(const v8::Arguments&); - static v8::Handle subarrayCallback(const v8::Arguments&); - - static v8::Handle lengthAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle indexedPropertyCustomGetter(uint32_t, const v8::AccessorInfo&); - static v8::Handle indexedPropertyCustomSetter(uint32_t, v8::Local, const v8::AccessorInfo&); - - static v8::Handle constructor(const v8::Arguments&); - static v8::Persistent Constr; - static v8::Handle getConstructor() { - if (Constr.IsEmpty()) { - v8::Handle constr = v8::FunctionTemplate::New(constructor); - Constr = v8::Persistent::New(constr); - } - return Constr; - } - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("Uint8ClampedArray")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("length"), V8Uint8ClampedArray::lengthAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - instance->SetIndexedPropertyHandler(V8Uint8ClampedArray::indexedPropertyCustomGetter, V8Uint8ClampedArray::indexedPropertyCustomSetter); - prototype->Set(v8::String::NewSymbol("get"), - v8::FunctionTemplate::New(V8Uint8ClampedArray::getCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("set"), - v8::FunctionTemplate::New(V8Uint8ClampedArray::setCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("subarray"), - v8::FunctionTemplate::New(V8Uint8ClampedArray::subarrayCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - tmpl->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(1), static_cast(v8::ReadOnly | v8::DontEnum)); - prototype->Set(v8::String::NewSymbol("BYTES_PER_ELEMENT"), v8::Integer::New(1), static_cast(v8::ReadOnly | v8::DontEnum)); - - tmpl->Inherit(V8ArrayBufferView::getTmpl()); - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8Uint8ClampedArray_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.cpp deleted file mode 100644 index 8bfd883..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8NodeSet.h" -#include "V8XPathResult.h" - -namespace Arabica { -namespace DOM { - -v8::Persistent V8XPathResult::Tmpl; - -v8::Handle V8XPathResult::numberValueAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8XPathResultPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Number::New(privData->nativeObj->asNumber()); -} - -v8::Handle V8XPathResult::stringValueAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8XPathResultPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::String::New(privData->nativeObj->asString().c_str()); -} - -v8::Handle V8XPathResult::booleanValueAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - struct V8XPathResultPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - return v8::Boolean::New(privData->nativeObj->asBool()); -} - -v8::Handle V8XPathResult::asNodeSetCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8XPathResultPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 0) { - - Arabica::XPath::NodeSet* retVal = new Arabica::XPath::NodeSet(privData->nativeObj->asNodeSet()); - v8::Handle retCtor = V8NodeSet::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8NodeSet::V8NodeSetPrivate* retPrivData = new V8NodeSet::V8NodeSetPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8NodeSet::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling asNodeSet"); - return v8::Undefined(); -} - -v8::Handle V8XPathResult::asBoolCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8XPathResultPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 0) { - - bool retVal = privData->nativeObj->asBool(); - - return v8::Boolean::New(retVal); - } - throw V8Exception("Parameter mismatch while calling asBool"); - return v8::Undefined(); -} - -v8::Handle V8XPathResult::asStringCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8XPathResultPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 0) { - - std::string retVal = privData->nativeObj->asString(); - - return v8::String::New(retVal.c_str()); - } - throw V8Exception("Parameter mismatch while calling asString"); - return v8::Undefined(); -} - -v8::Handle V8XPathResult::asNumberCallback(const v8::Arguments& args) { - - v8::Local self = args.Holder(); - struct V8XPathResultPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 0) { - - double retVal = privData->nativeObj->asNumber(); - - return v8::Number::New(retVal); - } - throw V8Exception("Parameter mismatch while calling asNumber"); - return v8::Undefined(); -} -bool V8XPathResult::hasInstance(v8::Handle value) { - return getTmpl()->HasInstance(value); -} - -} -} diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.h deleted file mode 100644 index 3aab7b0..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResult.h +++ /dev/null @@ -1,96 +0,0 @@ -/** - * @file - * @author This file has been generated by generate-bindings.pl. DO NOT MODIFY! - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - - -#ifndef V8XPathResult_h -#define V8XPathResult_h - -#include -#include "DOM/Node.hpp" -#include "string" -#include "uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h" -#include - -namespace Arabica { -namespace DOM { - -class V8XPathResult { -public: - struct V8XPathResultPrivate { - V8DOM* dom; - Arabica::XPath::XPathValue* nativeObj; - }; - - V8_DESTRUCTOR(V8XPathResultPrivate); - static bool hasInstance(v8::Handle); - - static v8::Handle asNodeSetCallback(const v8::Arguments&); - static v8::Handle asBoolCallback(const v8::Arguments&); - static v8::Handle asStringCallback(const v8::Arguments&); - static v8::Handle asNumberCallback(const v8::Arguments&); - - static v8::Handle numberValueAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle stringValueAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle booleanValueAttrGetter(v8::Local property, const v8::AccessorInfo& info); - static v8::Handle singleNodeValueCustomAttrGetter(v8::Local property, const v8::AccessorInfo& info); - - static v8::Persistent Tmpl; - static v8::Handle getTmpl() { - if (Tmpl.IsEmpty()) { - v8::Handle tmpl = v8::FunctionTemplate::New(); - tmpl->SetClassName(v8::String::New("XPathResult")); - tmpl->ReadOnlyPrototype(); - - v8::Local instance = tmpl->InstanceTemplate(); - v8::Local prototype = tmpl->PrototypeTemplate(); - (void)prototype; // surpress unused warnings - - instance->SetInternalFieldCount(1); - - instance->SetAccessor(v8::String::NewSymbol("numberValue"), V8XPathResult::numberValueAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("stringValue"), V8XPathResult::stringValueAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("booleanValue"), V8XPathResult::booleanValueAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - instance->SetAccessor(v8::String::NewSymbol("singleNodeValue"), V8XPathResult::singleNodeValueCustomAttrGetter, 0, - v8::External::New(0), static_cast(v8::DEFAULT), static_cast(v8::None)); - - prototype->Set(v8::String::NewSymbol("asNodeSet"), - v8::FunctionTemplate::New(V8XPathResult::asNodeSetCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("asBool"), - v8::FunctionTemplate::New(V8XPathResult::asBoolCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("asString"), - v8::FunctionTemplate::New(V8XPathResult::asStringCallback, v8::Undefined()), static_cast(v8::DontDelete)); - prototype->Set(v8::String::NewSymbol("asNumber"), - v8::FunctionTemplate::New(V8XPathResult::asNumberCallback, v8::Undefined()), static_cast(v8::DontDelete)); - - - Tmpl = v8::Persistent::New(tmpl); - } - return Tmpl; - } - - -}; - -} -} - -#endif // V8XPathResult_h diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResultCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResultCustom.cpp deleted file mode 100644 index 3e4063f..0000000 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8XPathResultCustom.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "V8XPathResult.h" -#include "V8Node.h" - -namespace Arabica { -namespace DOM { - -v8::Handle V8XPathResult::singleNodeValueCustomAttrGetter(v8::Local property, const v8::AccessorInfo& info) { - v8::Local self = info.Holder(); - V8XPathResultPrivate* privData = V8DOM::toClassPtr(self->GetInternalField(0)); - - Arabica::DOM::Node* retVal = new Arabica::DOM::Node(privData->nativeObj->asNodeSet()[0]); - - v8::Handle retCtor = V8Node::getTmpl()->GetFunction(); - v8::Persistent retObj = v8::Persistent::New(retCtor->NewInstance()); - - struct V8Node::V8NodePrivate* retPrivData = new V8Node::V8NodePrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Node::jsDestructor); - return retObj; -} - -} -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/lua/LuaDOM.cpp.inc b/src/uscxml/plugins/datamodel/lua/LuaDOM.cpp.inc new file mode 100644 index 0000000..5a256b6 --- /dev/null +++ b/src/uscxml/plugins/datamodel/lua/LuaDOM.cpp.inc @@ -0,0 +1,8969 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 3.0.8 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + + +#ifndef SWIGLUA +#define SWIGLUA +#endif + +#define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA +#define SWIG_LUA_MODULE_GLOBAL + + +#ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ +template class SwigValueWrapper { + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } +}; + +template T SwigValueInit() { + return T(); +} +#endif + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast(r) (r) +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (equiv != 0 && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = SWIG_TypeNameComp(nb, ne, tb, te); + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +} + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + size_t l = 0; + size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + char d = *(c++); + unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* ----------------------------------------------------------------------------- + * luarun.swg + * + * This file contains the runtime support for Lua modules + * and includes code for managing global variables and pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "lua.h" +#include "lauxlib.h" +#include /* for malloc */ +#include /* for a few sanity tests */ + +/* ----------------------------------------------------------------------------- + * Lua flavors + * ----------------------------------------------------------------------------- */ + +#define SWIG_LUA_FLAVOR_LUA 1 +#define SWIG_LUA_FLAVOR_ELUA 2 +#define SWIG_LUA_FLAVOR_ELUAC 3 + +#if !defined(SWIG_LUA_TARGET) +# error SWIG_LUA_TARGET not defined +#endif + +#if defined(SWIG_LUA_ELUA_EMULATE) + +struct swig_elua_entry; + +typedef struct swig_elua_key { + int type; + union { + const char* strkey; + lua_Number numkey; + } key; +} swig_elua_key; + +typedef struct swig_elua_val { + int type; + union { + lua_Number number; + const struct swig_elua_entry *table; + const char *string; + lua_CFunction function; + struct { + char member; + long lvalue; + void *pvalue; + swig_type_info **ptype; + } userdata; + } value; +} swig_elua_val; + +typedef struct swig_elua_entry { + swig_elua_key key; + swig_elua_val value; +} swig_elua_entry; + +#define LSTRKEY(x) {LUA_TSTRING, {.strkey = x} } +#define LNUMKEY(x) {LUA_TNUMBER, {.numkey = x} } +#define LNILKEY {LUA_TNIL, {.strkey = 0} } + +#define LNUMVAL(x) {LUA_TNUMBER, {.number = x} } +#define LFUNCVAL(x) {LUA_TFUNCTION, {.function = x} } +#define LROVAL(x) {LUA_TTABLE, {.table = x} } +#define LNILVAL {LUA_TNIL, {.string = 0} } +#define LSTRVAL(x) {LUA_TSTRING, {.string = x} } + +#define LUA_REG_TYPE swig_elua_entry + +#define SWIG_LUA_ELUA_EMUL_METATABLE_KEY "__metatable" + +#define lua_pushrotable(L,p)\ + lua_newtable(L);\ + assert(p);\ + SWIG_Lua_elua_emulate_register(L,(swig_elua_entry*)(p)); + +#define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\ + LSTRKEY(B), {LUA_TUSERDATA, { .userdata={0,0,(void*)(C),&D} } } + +#define SWIG_LUA_CONSTTAB_BINARY(B,S,C,D)\ + LSTRKEY(B), {LUA_TUSERDATA, { .userdata={1,S,(void*)(C),&D} } } +#endif + +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC) +# define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C) +# define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C) +# define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C) +# define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C) + /* Those two types of constants are not supported in elua */ + +#ifndef SWIG_LUA_CONSTTAB_POINTER +#warning eLua does not support pointers as constants. By default, nil will be used as value +#define SWIG_LUA_CONSTTAB_POINTER(B,C,D) LSTRKEY(B), LNILVAL +#endif + +#ifndef SWIG_LUA_CONSTTAB_BINARY +#warning eLua does not support pointers to member as constants. By default, nil will be used as value +#define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D) LSTRKEY(B), LNILVAL +#endif +#else /* SWIG_LUA_FLAVOR_LUA */ +# define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0 +# define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0 +# define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0 +# define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0 +# define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\ + SWIG_LUA_POINTER, (char *)B, 0, 0, (void *)C, &D +# define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D)\ + SWIG_LUA_BINARY, (char *)B, S, 0, (void *)C, &D +#endif + +#ifndef SWIG_LUA_ELUA_EMULATE +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC) +# define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING} +# define LSTRVAL LRO_STRVAL +#endif +#endif /* SWIG_LUA_ELUA_EMULATE*/ + +#ifndef SWIG_LUA_ELUA_EMULATE +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC) + +#ifndef MIN_OPT_LEVEL +#define MIN_OPT_LEVEL 2 +#endif + +#include "lrodefs.h" +#include "lrotable.h" +#endif +#endif /* SWIG_LUA_ELUA_EMULATE*/ +/* ----------------------------------------------------------------------------- + * compatibility defines + * ----------------------------------------------------------------------------- */ + +/* History of Lua C API length functions: In Lua 5.0 (and before?) + there was "lua_strlen". In Lua 5.1, this was renamed "lua_objlen", + but a compatibility define of "lua_strlen" was added. In Lua 5.2, + this function was again renamed, to "lua_rawlen" (to emphasize that + it doesn't call the "__len" metamethod), and the compatibility + define of lua_strlen was removed. All SWIG uses have been updated + to "lua_rawlen", and we add our own defines of that here for older + versions of Lua. */ +#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 +# define lua_rawlen lua_strlen +#elif LUA_VERSION_NUM == 501 +# define lua_rawlen lua_objlen +#endif + + +/* lua_pushglobaltable is the recommended "future-proof" way to get + the global table for Lua 5.2 and later. Here we define + lua_pushglobaltable ourselves for Lua versions before 5.2. */ +#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502 +# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX) +#endif + +/* lua_absindex was introduced in Lua 5.2 */ +#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502 +# define lua_absindex(L,i) ((i)>0 || (i) <= LUA_REGISTRYINDEX ? (i) : lua_gettop(L) + (i) + 1) +#endif + +/* lua_rawsetp was introduced in Lua 5.2 */ +#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502 +#define lua_rawsetp(L,index,ptr)\ + lua_pushlightuserdata(L,(void*)(ptr));\ + lua_insert(L,-2);\ + lua_rawset(L,index); + +#define lua_rawgetp(L,index,ptr)\ + lua_pushlightuserdata(L,(void*)(ptr));\ + lua_rawget(L,index); + +#endif + +/* -------------------------------------------------------------------------- + * Helper functions for error handling + * -------------------------------------------------------------------------- */ + +/* Push the string STR on the Lua stack, like lua_pushstring, but + prefixed with the the location of the innermost Lua call-point + (as formated by luaL_where). */ +SWIGRUNTIME void +SWIG_Lua_pusherrstring (lua_State *L, const char *str) +{ + luaL_where (L, 1); + lua_pushstring (L, str); + lua_concat (L, 2); +} + +/* Push a formatted string generated from FMT and following args on + the Lua stack, like lua_pushfstring, but prefixed with the the + location of the innermost Lua call-point (as formated by luaL_where). */ +SWIGRUNTIME void +SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...) +{ + va_list argp; + va_start(argp, fmt); + luaL_where(L, 1); + lua_pushvfstring(L, fmt, argp); + va_end(argp); + lua_concat(L, 2); +} + + +/* ----------------------------------------------------------------------------- + * global swig types + * ----------------------------------------------------------------------------- */ +/* Constant table */ +#define SWIG_LUA_INT 1 +#define SWIG_LUA_FLOAT 2 +#define SWIG_LUA_STRING 3 +#define SWIG_LUA_POINTER 4 +#define SWIG_LUA_BINARY 5 +#define SWIG_LUA_CHAR 6 + +/* Structure for variable linking table */ +typedef struct { + const char *name; + lua_CFunction get; + lua_CFunction set; +} swig_lua_var_info; + +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC) +typedef const LUA_REG_TYPE swig_lua_method; +typedef const LUA_REG_TYPE swig_lua_const_info; +#else /* Normal lua */ +typedef luaL_Reg swig_lua_method; + +/* Constant information structure */ +typedef struct { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_lua_const_info; + +#endif + +typedef struct { + const char *name; + lua_CFunction getmethod; + lua_CFunction setmethod; +} swig_lua_attribute; + + +struct swig_lua_class; +/* Can be used to create namespaces. Currently used to wrap class static methods/variables/constants */ +typedef struct swig_lua_namespace { + const char *name; + swig_lua_method *ns_methods; + swig_lua_attribute *ns_attributes; + swig_lua_const_info *ns_constants; + struct swig_lua_class **ns_classes; + struct swig_lua_namespace **ns_namespaces; +} swig_lua_namespace; + +typedef struct swig_lua_class { + const char *name; /* Name that this class has in Lua */ + const char *fqname; /* Fully qualified name - Scope + class name */ + swig_type_info **type; + lua_CFunction constructor; + void (*destructor)(void *); + swig_lua_method *methods; + swig_lua_attribute *attributes; + swig_lua_namespace *cls_static; + swig_lua_method *metatable; /* 0 for -eluac */ + struct swig_lua_class **bases; + const char **base_names; +} swig_lua_class; + +/* this is the struct for wrapping all pointers in SwigLua +*/ +typedef struct { + swig_type_info *type; + int own; /* 1 if owned & must be destroyed */ + void *ptr; +} swig_lua_userdata; + +/* this is the struct for wrapping arbitrary packed binary data +(currently it is only used for member function pointers) +the data ordering is similar to swig_lua_userdata, but it is currently not possible +to tell the two structures apart within SWIG, other than by looking at the type +*/ +typedef struct { + swig_type_info *type; + int own; /* 1 if owned & must be destroyed */ + char data[1]; /* arbitary amount of data */ +} swig_lua_rawdata; + +/* Common SWIG API */ +#define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner) +#define SWIG_ConvertPtr(L,idx, ptr, type, flags) SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags) +#define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname) +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(L, idx, ptr, sz, ty) SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty) +#define SWIG_NewMemberObj(L, ptr, sz, type) SWIG_Lua_NewPackedObj(L, ptr, sz, type) + +/* Runtime API */ +#define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata)) +#define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer) +#define SWIG_MODULE_CLIENTDATA_TYPE lua_State* + +/* Contract support */ +#define SWIG_contract_assert(expr, msg) \ + if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } else + + +/* helper #defines */ +#define SWIG_fail {goto fail;} +#define SWIG_fail_arg(func_name,argnum,type) \ + {SWIG_Lua_pushferrstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\ + func_name,argnum,type,SWIG_Lua_typename(L,argnum));\ + goto fail;} +#define SWIG_fail_ptr(func_name,argnum,type) \ + SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*") +#define SWIG_check_num_args(func_name,a,b) \ + if (lua_gettop(L)
b) \ + {SWIG_Lua_pushferrstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\ + goto fail;} + + +#define SWIG_Lua_get_table(L,n) \ + (lua_pushstring(L, n), lua_rawget(L,-2)) + +#define SWIG_Lua_add_function(L,n,f) \ + (lua_pushstring(L, n), \ + lua_pushcfunction(L, f), \ + lua_rawset(L,-3)) + +#define SWIG_Lua_add_boolean(L,n,b) \ + (lua_pushstring(L, n), \ + lua_pushboolean(L, b), \ + lua_rawset(L,-3)) + +/* special helper for allowing 'nil' for usertypes */ +#define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I)) + +#ifdef __cplusplus +/* Special helper for member function pointers +it gets the address, casts it, then dereferences it */ +/*#define SWIG_mem_fn_as_voidptr(a) (*((char**)&(a))) */ +#endif + +/* storing/access of swig_module_info */ +SWIGRUNTIME swig_module_info * +SWIG_Lua_GetModule(lua_State *L) { + swig_module_info *ret = 0; + lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME); + lua_rawget(L,LUA_REGISTRYINDEX); + if (lua_islightuserdata(L,-1)) + ret=(swig_module_info*)lua_touserdata(L,-1); + lua_pop(L,1); /* tidy */ + return ret; +} + +SWIGRUNTIME void +SWIG_Lua_SetModule(lua_State *L, swig_module_info *module) { + /* add this all into the Lua registry: */ + lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME); + lua_pushlightuserdata(L,(void*)module); + lua_rawset(L,LUA_REGISTRYINDEX); +} + +/* ----------------------------------------------------------------------------- + * global variable support code: modules + * ----------------------------------------------------------------------------- */ + +/* this function is called when trying to set an immutable. +default action is to print an error. +This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */ +SWIGINTERN int SWIG_Lua_set_immutable(lua_State *L) +{ +/* there should be 1 param passed in: the new value */ +#ifndef SWIGLUA_IGNORE_SET_IMMUTABLE + lua_pop(L,1); /* remove it */ + luaL_error(L,"This variable is immutable"); +#endif + return 0; /* should not return anything */ +} + +#ifdef SWIG_LUA_ELUA_EMULATE + +SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own); +SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type); +static int swig_lua_elua_emulate_unique_key; + +/* This function emulates eLua rotables behaviour. It loads a rotable definition into the usual lua table. */ +SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_entry *table) +{ + int i, table_parsed, parsed_tables_array, target_table; + assert(lua_istable(L,-1)); + target_table = lua_gettop(L); + /* Get the registry where we put all parsed tables to avoid loops */ + lua_rawgetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key); + if(lua_isnil(L,-1)) { + lua_pop(L,1); + lua_newtable(L); + lua_pushvalue(L,-1); + lua_rawsetp(L,LUA_REGISTRYINDEX,(void*)(&swig_lua_elua_emulate_unique_key)); + } + parsed_tables_array = lua_gettop(L); + lua_pushvalue(L,target_table); + lua_rawsetp(L, parsed_tables_array, table); + table_parsed = 0; + const int SWIGUNUSED pairs_start = lua_gettop(L); + for(i = 0;table[i].key.type != LUA_TNIL || table[i].value.type != LUA_TNIL;i++) + { + const swig_elua_entry *entry = table + i; + int is_metatable = 0; + switch(entry->key.type) { + case LUA_TSTRING: + lua_pushstring(L,entry->key.key.strkey); + if(strcmp(entry->key.key.strkey, SWIG_LUA_ELUA_EMUL_METATABLE_KEY) == 0) + is_metatable = 1; + break; + case LUA_TNUMBER: + lua_pushnumber(L,entry->key.key.numkey); + break; + case LUA_TNIL: + lua_pushnil(L); + break; + default: + assert(0); + } + switch(entry->value.type) { + case LUA_TSTRING: + lua_pushstring(L,entry->value.value.string); + break; + case LUA_TNUMBER: + lua_pushnumber(L,entry->value.value.number); + break; + case LUA_TFUNCTION: + lua_pushcfunction(L,entry->value.value.function); + break; + case LUA_TTABLE: + lua_rawgetp(L,parsed_tables_array, entry->value.value.table); + table_parsed = !lua_isnil(L,-1); + if(!table_parsed) { + lua_pop(L,1); /*remove nil */ + lua_newtable(L); + SWIG_Lua_elua_emulate_register(L,entry->value.value.table); + } + if(is_metatable) { + assert(lua_istable(L,-1)); + lua_pushvalue(L,-1); + lua_setmetatable(L,target_table); + } + + break; + case LUA_TUSERDATA: + if(entry->value.value.userdata.member) + SWIG_NewMemberObj(L,entry->value.value.userdata.pvalue, + entry->value.value.userdata.lvalue, + *(entry->value.value.userdata.ptype)); + else + SWIG_NewPointerObj(L,entry->value.value.userdata.pvalue, + *(entry->value.value.userdata.ptype),0); + break; + case LUA_TNIL: + lua_pushnil(L); + break; + default: + assert(0); + } + assert(lua_gettop(L) == pairs_start + 2); + lua_rawset(L,target_table); + } + lua_pop(L,1); /* Removing parsed tables storage */ + assert(lua_gettop(L) == target_table); +} + +SWIGINTERN void SWIG_Lua_elua_emulate_register_clear(lua_State *L) +{ + lua_pushnil(L); + lua_rawsetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key); +} + +SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L); + +SWIGINTERN int SWIG_Lua_emulate_elua_getmetatable(lua_State *L) +{ + SWIG_check_num_args("getmetatable(SWIG eLua emulation)", 1, 1); + SWIG_Lua_get_class_registry(L); + lua_getfield(L,-1,"lua_getmetatable"); + lua_remove(L,-2); /* remove the registry*/ + assert(!lua_isnil(L,-1)); + lua_pushvalue(L,1); + assert(lua_gettop(L) == 3); /* object | function | object again */ + lua_call(L,1,1); + if(!lua_isnil(L,-1)) /*There is an ordinary metatable */ + return 1; + /*if it is a table, then emulate elua behaviour - check for __metatable attribute of a table*/ + assert(lua_gettop(L) == 2); + if(lua_istable(L,-2)) { + lua_pop(L,1); /*remove the nil*/ + lua_getfield(L,-1, SWIG_LUA_ELUA_EMUL_METATABLE_KEY); + } + assert(lua_gettop(L) == 2); + return 1; + +fail: + lua_error(L); + return 0; +} + +SWIGINTERN void SWIG_Lua_emulate_elua_swap_getmetatable(lua_State *L) +{ + SWIG_Lua_get_class_registry(L); + lua_pushglobaltable(L); + lua_pushstring(L,"lua_getmetatable"); + lua_getfield(L,-2,"getmetatable"); + assert(!lua_isnil(L,-1)); + lua_rawset(L,-4); + lua_pushstring(L, "getmetatable"); + lua_pushcfunction(L, SWIG_Lua_emulate_elua_getmetatable); + lua_rawset(L,-3); + lua_pop(L,2); + +} +/* END OF REMOVE */ + +#endif +/* ----------------------------------------------------------------------------- + * global variable support code: namespaces and modules (which are the same thing) + * ----------------------------------------------------------------------------- */ + +SWIGINTERN int SWIG_Lua_namespace_get(lua_State *L) +{ +/* there should be 2 params passed in + (1) table (not the meta table) + (2) string name of the attribute +*/ + assert(lua_istable(L,-2)); /* just in case */ + lua_getmetatable(L,-2); + assert(lua_istable(L,-1)); + SWIG_Lua_get_table(L,".get"); /* find the .get table */ + assert(lua_istable(L,-1)); + /* look for the key in the .get table */ + lua_pushvalue(L,2); /* key */ + lua_rawget(L,-2); + lua_remove(L,-2); /* stack tidy, remove .get table */ + if (lua_iscfunction(L,-1)) + { /* found it so call the fn & return its value */ + lua_call(L,0,1); /* 1 value in (userdata),1 out (result) */ + lua_remove(L,-2); /* stack tidy, remove metatable */ + return 1; + } + lua_pop(L,1); /* remove whatever was there */ + /* ok, so try the .fn table */ + SWIG_Lua_get_table(L,".fn"); /* find the .get table */ + assert(lua_istable(L,-1)); /* just in case */ + lua_pushvalue(L,2); /* key */ + lua_rawget(L,-2); /* look for the fn */ + lua_remove(L,-2); /* stack tidy, remove .fn table */ + if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */ + { /* found it so return the fn & let lua call it */ + lua_remove(L,-2); /* stack tidy, remove metatable */ + return 1; + } + lua_pop(L,1); /* remove whatever was there */ + return 0; +} + +SWIGINTERN int SWIG_Lua_namespace_set(lua_State *L) +{ +/* there should be 3 params passed in + (1) table (not the meta table) + (2) string name of the attribute + (3) any for the new value +*/ + + assert(lua_istable(L,1)); + lua_getmetatable(L,1); /* get the meta table */ + assert(lua_istable(L,-1)); + + SWIG_Lua_get_table(L,".set"); /* find the .set table */ + if (lua_istable(L,-1)) + { + /* look for the key in the .set table */ + lua_pushvalue(L,2); /* key */ + lua_rawget(L,-2); + if (lua_iscfunction(L,-1)) + { /* found it so call the fn & return its value */ + lua_pushvalue(L,3); /* value */ + lua_call(L,1,0); + return 0; + } + lua_pop(L,1); /* remove the value */ + } + lua_pop(L,1); /* remove the value .set table */ + lua_pop(L,1); /* remote metatable */ + lua_rawset(L,-3); + return 0; +} + +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */ +SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]); /* forward declaration */ +SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn); /* forward declaration */ +SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss); + +/* helper function - register namespace methods and attributes into namespace */ +SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *ns) +{ + int i; + /* There must be namespace table (not metatable) at the top of the stack */ + assert(lua_istable(L,-1)); + SWIG_Lua_InstallConstants(L, ns->ns_constants); + + /* add methods to the namespace/module table */ + for(i=0;ns->ns_methods[i].name;i++){ + SWIG_Lua_add_function(L,ns->ns_methods[i].name,ns->ns_methods[i].func); + } + lua_getmetatable(L,-1); + + /* add fns */ + for(i=0;ns->ns_attributes[i].name;i++){ + SWIG_Lua_add_variable(L,ns->ns_attributes[i].name,ns->ns_attributes[i].getmethod,ns->ns_attributes[i].setmethod); + } + + /* clear stack - remove metatble */ + lua_pop(L,1); + return 0; +} + +/* Register all classes in the namespace */ +SWIGINTERN void SWIG_Lua_add_namespace_classes(lua_State *L, swig_lua_namespace *ns) +{ + swig_lua_class **classes; + + /* There must be a module/namespace table at the top of the stack */ + assert(lua_istable(L,-1)); + + classes = ns->ns_classes; + + if( classes != 0 ) { + while(*classes != 0) { + SWIG_Lua_class_register(L, *classes); + classes++; + } + } +} + +/* Helper function. Creates namespace table and adds it to module table + if 'reg' is true, then will register namespace table to parent one (must be on top of the stack + when function is called). + Function always returns newly registered table on top of the stack. +*/ +SWIGINTERN void SWIG_Lua_namespace_register(lua_State *L, swig_lua_namespace *ns, int reg) +{ + swig_lua_namespace **sub_namespace; + /* 1 argument - table on the top of the stack */ + const int SWIGUNUSED begin = lua_gettop(L); + assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table or parent namespace table */ + lua_checkstack(L,5); + lua_newtable(L); /* namespace itself */ + lua_newtable(L); /* metatable for namespace */ + + /* add a table called ".get" */ + lua_pushstring(L,".get"); + lua_newtable(L); + lua_rawset(L,-3); + /* add a table called ".set" */ + lua_pushstring(L,".set"); + lua_newtable(L); + lua_rawset(L,-3); + /* add a table called ".fn" */ + lua_pushstring(L,".fn"); + lua_newtable(L); + lua_rawset(L,-3); + + /* add accessor fns for using the .get,.set&.fn */ + SWIG_Lua_add_function(L,"__index",SWIG_Lua_namespace_get); + SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_namespace_set); + + lua_setmetatable(L,-2); /* set metatable */ + + /* Register all functions, variables etc */ + SWIG_Lua_add_namespace_details(L,ns); + /* Register classes */ + SWIG_Lua_add_namespace_classes(L,ns); + + sub_namespace = ns->ns_namespaces; + if( sub_namespace != 0) { + while(*sub_namespace != 0) { + SWIG_Lua_namespace_register(L, *sub_namespace, 1); + lua_pop(L,1); /* removing sub-namespace table */ + sub_namespace++; + } + } + + if (reg) { + lua_pushstring(L,ns->name); + lua_pushvalue(L,-2); + lua_rawset(L,-4); /* add namespace to module table */ + } + assert(lua_gettop(L) == begin+1); +} +#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */ + +/* ----------------------------------------------------------------------------- + * global variable support code: classes + * ----------------------------------------------------------------------------- */ + +SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname); + +typedef int (*swig_lua_base_iterator_func)(lua_State*,swig_type_info*, int, int *ret); + +SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info * SWIGUNUSED swig_type, + int first_arg, swig_lua_base_iterator_func func, int *const ret) +{ + /* first_arg - position of the object in stack. Everything that is above are arguments + * and is passed to every evocation of the func */ + int last_arg = lua_gettop(L);/* position of last argument */ + int original_metatable = last_arg + 1; + size_t bases_count; + int result = SWIG_ERROR; + int bases_table; + (void)swig_type; + lua_getmetatable(L,first_arg); + + /* initialise base search */ +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) + SWIG_Lua_get_table(L,".bases"); + assert(lua_istable(L,-1)); + bases_count = lua_rawlen(L,-1); + bases_table = lua_gettop(L); +#else + /* In elua .bases table doesn't exist. Use table from swig_lua_class */ + (void)bases_table; + assert(swig_type!=0); + swig_module_info *module=SWIG_GetModule(L); + swig_lua_class **bases= ((swig_lua_class*)(swig_type->clientdata))->bases; + const char **base_names= ((swig_lua_class*)(swig_type->clientdata))->base_names; + bases_count = 0; + for(;base_names[bases_count]; + bases_count++);/* get length of bases */ +#endif + + if(ret) + *ret = 0; + if(bases_count>0) + { + int to_remove; + size_t i; + int j; + int subcall_last_arg; + int subcall_first_arg = lua_gettop(L) + 1;/* Here a copy of first_arg and arguments begin */ + int valid = 1; + swig_type_info *base_swig_type = 0; + for(j=first_arg;j<=last_arg;j++) + lua_pushvalue(L,j); + subcall_last_arg = lua_gettop(L); + + /* Trick: temporarily replacing original metatable with metatable for base class and call getter */ + for(i=0;ifqname); + base_swig_type = SWIG_TypeQueryModule(module,module,base_names[i]); + assert(base_swig_type != 0); + } +#endif + + if(!valid) + continue; + assert(lua_isuserdata(L, subcall_first_arg)); + assert(lua_istable(L,-1)); + lua_setmetatable(L,subcall_first_arg); /* Set new metatable */ + assert(lua_gettop(L) == subcall_last_arg); + result = func(L, base_swig_type,subcall_first_arg, ret); /* Forward call */ + if(result != SWIG_ERROR) { + break; + } + } + /* Restore original metatable */ + lua_pushvalue(L,original_metatable); + lua_setmetatable(L,first_arg); + /* Clear - remove everything between last_arg and subcall_last_arg including */ + to_remove = subcall_last_arg - last_arg; + for(j=0;jtype; + result = SWIG_Lua_class_do_get(L,type,1,&ret); + if(result == SWIG_OK) + return ret; + + return 0; +} + +/* helper for the class.set method, performs the lookup of class attributes + * It returns error code. Number of function return values is passed inside 'ret' + */ +SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret) +{ +/* there should be 3 params passed in + (1) table (not the meta table) + (2) string name of the attribute + (3) any for the new value + */ + + int bases_search_result; + int substack_start = lua_gettop(L) - 3; + lua_checkstack(L,5); + assert(lua_isuserdata(L,substack_start+1)); /* just in case */ + lua_getmetatable(L,substack_start+1); /* get the meta table */ + assert(lua_istable(L,-1)); /* just in case */ + if(ret) + *ret = 0; /* it is setter - number of return values is always 0 */ + + SWIG_Lua_get_table(L,".set"); /* find the .set table */ + if (lua_istable(L,-1)) + { + /* look for the key in the .set table */ + lua_pushvalue(L,substack_start+2); /* key */ + lua_rawget(L,-2); + lua_remove(L,-2); /* tidy stack, remove .set table */ + if (lua_iscfunction(L,-1)) + { /* found it so call the fn & return its value */ + lua_pushvalue(L,substack_start+1); /* userdata */ + lua_pushvalue(L,substack_start+3); /* value */ + lua_call(L,2,0); + lua_remove(L,substack_start+4); /*remove metatable*/ + return SWIG_OK; + } + lua_pop(L,1); /* remove the value */ + } else { + lua_pop(L,1); /* remove the answer for .set table request*/ + } + /* NEW: looks for the __setitem() fn + this is a user provided set fn */ + SWIG_Lua_get_table(L,"__setitem"); /* find the fn */ + if (lua_iscfunction(L,-1)) /* if its there */ + { /* found it so call the fn & return its value */ + lua_pushvalue(L,substack_start+1); /* the userdata */ + lua_pushvalue(L,substack_start+2); /* the parameter */ + lua_pushvalue(L,substack_start+3); /* the value */ + lua_call(L,3,0); /* 3 values in ,0 out */ + lua_remove(L,-2); /* stack tidy, remove metatable */ + return SWIG_OK; + } + lua_pop(L,1); /* remove value */ + + lua_pop(L,1); /* remove metatable */ + /* Search among bases */ + bases_search_result = SWIG_Lua_iterate_bases(L,type,first_arg,SWIG_Lua_class_do_set,ret); + if(ret) + assert(*ret == 0); + assert(lua_gettop(L) == substack_start + 3); + return bases_search_result; +} + +/* This is the actual method exported to Lua. It calls SWIG_Lua_class_do_set and correctly + * handles return values. + */ +SWIGINTERN int SWIG_Lua_class_set(lua_State *L) +{ +/* There should be 3 params passed in + (1) table (not the meta table) + (2) string name of the attribute + (3) any for the new value + */ + int ret = 0; + int result; + swig_lua_userdata *usr; + swig_type_info *type; + assert(lua_isuserdata(L,1)); + usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */ + type = usr->type; + result = SWIG_Lua_class_do_set(L,type,1,&ret); + if(result != SWIG_OK) { + SWIG_Lua_pushferrstring(L,"Assignment not possible. No setter/member with this name. For custom assignments implement __setitem method."); + lua_error(L); + } else { + assert(ret==0); + } + return 0; +} + +/* the class.destruct method called by the interpreter */ +SWIGINTERN int SWIG_Lua_class_destruct(lua_State *L) +{ +/* there should be 1 params passed in + (1) userdata (not the meta table) */ + swig_lua_userdata *usr; + swig_lua_class *clss; + assert(lua_isuserdata(L,-1)); /* just in case */ + usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */ + /* if must be destroyed & has a destructor */ + if (usr->own) /* if must be destroyed */ + { + clss=(swig_lua_class*)usr->type->clientdata; /* get the class */ + if (clss && clss->destructor) /* there is a destroy fn */ + { + clss->destructor(usr->ptr); /* bye bye */ + } + } + return 0; +} + +/* the class.__tostring method called by the interpreter and print */ +SWIGINTERN int SWIG_Lua_class_tostring(lua_State *L) +{ +/* there should be 1 param passed in + (1) userdata (not the metatable) */ + const char *className; + void* userData; + assert(lua_isuserdata(L,1)); /* just in case */ + userData = lua_touserdata(L,1); /* get the userdata address for later */ + lua_getmetatable(L,1); /* get the meta table */ + assert(lua_istable(L,-1)); /* just in case */ + + lua_getfield(L, -1, ".type"); + className = lua_tostring(L, -1); + + lua_pushfstring(L, "<%s userdata: %p>", className, userData); + return 1; +} + +/* to manually disown some userdata */ +SWIGINTERN int SWIG_Lua_class_disown(lua_State *L) +{ +/* there should be 1 params passed in + (1) userdata (not the meta table) */ + swig_lua_userdata *usr; + assert(lua_isuserdata(L,-1)); /* just in case */ + usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */ + + usr->own = 0; /* clear our ownership */ + return 0; +} + +/* lua callable function to compare userdata's value +the issue is that two userdata may point to the same thing +but to lua, they are different objects */ +SWIGRUNTIME int SWIG_Lua_class_equal(lua_State *L) +{ + int result; + swig_lua_userdata *usr1,*usr2; + if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */ + return 0; /* nil reply */ + usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */ + usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */ + /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/ + result=(usr1->ptr==usr2->ptr); + lua_pushboolean(L,result); + return 1; +} + +/* populate table at the top of the stack with metamethods that ought to be inherited */ +SWIGINTERN void SWIG_Lua_populate_inheritable_metamethods(lua_State *L) +{ + SWIG_Lua_add_boolean(L, "__add", 1); + SWIG_Lua_add_boolean(L, "__sub", 1); + SWIG_Lua_add_boolean(L, "__mul", 1); + SWIG_Lua_add_boolean(L, "__div", 1); + SWIG_Lua_add_boolean(L, "__mod", 1); + SWIG_Lua_add_boolean(L, "__pow", 1); + SWIG_Lua_add_boolean(L, "__unm", 1); + SWIG_Lua_add_boolean(L, "__len", 1 ); + SWIG_Lua_add_boolean(L, "__concat", 1 ); + SWIG_Lua_add_boolean(L, "__eq", 1); + SWIG_Lua_add_boolean(L, "__lt", 1); + SWIG_Lua_add_boolean(L, "__le", 1); + SWIG_Lua_add_boolean(L, "__call", 1); + SWIG_Lua_add_boolean(L, "__tostring", 1); + SWIG_Lua_add_boolean(L, "__gc", 0); +} + +/* creates the swig registry */ +SWIGINTERN void SWIG_Lua_create_class_registry(lua_State *L) +{ + /* create main SWIG registry table */ + lua_pushstring(L,"SWIG"); + lua_newtable(L); + /* populate it with some predefined data */ + + /* .library table. Placeholder */ + lua_pushstring(L,".library"); + lua_newtable(L); + { + /* list of metamethods that class inherits from its bases */ + lua_pushstring(L,"inheritable_metamethods"); + lua_newtable(L); + /* populate with list of metamethods */ + SWIG_Lua_populate_inheritable_metamethods(L); + lua_rawset(L,-3); + } + lua_rawset(L,-3); + + lua_rawset(L,LUA_REGISTRYINDEX); +} + +/* gets the swig registry (or creates it) */ +SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L) +{ + /* add this all into the swig registry: */ + lua_pushstring(L,"SWIG"); + lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */ + if (!lua_istable(L,-1)) /* not there */ + { /* must be first time, so add it */ + lua_pop(L,1); /* remove the result */ + SWIG_Lua_create_class_registry(L); + /* then get it */ + lua_pushstring(L,"SWIG"); + lua_rawget(L,LUA_REGISTRYINDEX); + } +} + +SWIGINTERN void SWIG_Lua_get_inheritable_metamethods(lua_State *L) +{ + SWIG_Lua_get_class_registry(L); + lua_pushstring(L, ".library"); + lua_rawget(L,-2); + assert( !lua_isnil(L,-1) ); + lua_pushstring(L, "inheritable_metamethods"); + lua_rawget(L,-2); + + /* Remove class registry and library table */ + lua_remove(L,-2); + lua_remove(L,-2); +} + +/* Helper function to get the classes metatable from the register */ +SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname) +{ + SWIG_Lua_get_class_registry(L); /* get the registry */ + lua_pushstring(L,cname); /* get the name */ + lua_rawget(L,-2); /* get it */ + lua_remove(L,-2); /* tidy up (remove registry) */ +} + +/* Set up the base classes pointers. +Each class structure has a list of pointers to the base class structures. +This function fills them. +It cannot be done at compile time, as this will not work with hireachies +spread over more than one swig file. +Therefore it must be done at runtime, querying the SWIG type system. +*/ +SWIGINTERN void SWIG_Lua_init_base_class(lua_State *L,swig_lua_class *clss) +{ + int i=0; + swig_module_info *module=SWIG_GetModule(L); + for(i=0;clss->base_names[i];i++) + { + if (clss->bases[i]==0) /* not found yet */ + { + /* lookup and cache the base class */ + swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]); + if (info) clss->bases[i] = (swig_lua_class *) info->clientdata; + } + } +} + +#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) +/* Merges two tables */ +SWIGINTERN void SWIG_Lua_merge_tables_by_index(lua_State *L, int target, int source) +{ + /* iterating */ + lua_pushnil(L); + while (lua_next(L,source) != 0) { + /* -1 - value, -2 - index */ + /* have to copy to assign */ + lua_pushvalue(L,-2); /* copy of index */ + lua_pushvalue(L,-2); /* copy of value */ + lua_rawset(L, target); + lua_pop(L,1); + /* only key is left */ + } +} + +/* Merges two tables with given name. original - index of target metatable, base - index of source metatable */ +SWIGINTERN void SWIG_Lua_merge_tables(lua_State *L, const char* name, int original, int base) +{ + /* push original[name], then base[name] */ + lua_pushstring(L,name); + lua_rawget(L,original); + int original_table = lua_gettop(L); + lua_pushstring(L,name); + lua_rawget(L,base); + int base_table = lua_gettop(L); + SWIG_Lua_merge_tables_by_index(L, original_table, base_table); + /* clearing stack */ + lua_pop(L,2); +} + +/* Function takes all symbols from base and adds it to derived class. It's just a helper. */ +SWIGINTERN void SWIG_Lua_class_squash_base(lua_State *L, swig_lua_class *base_cls) +{ + /* There is one parameter - original, i.e. 'derived' class metatable */ + assert(lua_istable(L,-1)); + int original = lua_gettop(L); + SWIG_Lua_get_class_metatable(L,base_cls->fqname); + int base = lua_gettop(L); + SWIG_Lua_merge_tables(L, ".fn", original, base ); + SWIG_Lua_merge_tables(L, ".set", original, base ); + SWIG_Lua_merge_tables(L, ".get", original, base ); + lua_pop(L,1); +} + +/* Function squashes all symbols from 'clss' bases into itself */ +SWIGINTERN void SWIG_Lua_class_squash_bases(lua_State *L, swig_lua_class *clss) +{ + int i; + SWIG_Lua_get_class_metatable(L,clss->fqname); + for(i=0;clss->base_names[i];i++) + { + if (clss->bases[i]==0) /* Somehow it's not found. Skip it */ + continue; + /* Thing is: all bases are already registered. Thus they have already executed + * this function. So we just need to squash them into us, because their bases + * are already squashed into them. No need for recursion here! + */ + SWIG_Lua_class_squash_base(L, clss->bases[i]); + } + lua_pop(L,1); /*tidy stack*/ +} +#endif + +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */ +/* helper add a variable to a registered class */ +SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn) +{ + assert(lua_istable(L,-1)); /* just in case */ + SWIG_Lua_get_table(L,".get"); /* find the .get table */ + assert(lua_istable(L,-1)); /* just in case */ + SWIG_Lua_add_function(L,name,getFn); + lua_pop(L,1); /* tidy stack (remove table) */ + if (setFn) + { + SWIG_Lua_get_table(L,".set"); /* find the .set table */ + assert(lua_istable(L,-1)); /* just in case */ + SWIG_Lua_add_function(L,name,setFn); + lua_pop(L,1); /* tidy stack (remove table) */ + } +} + +/* helper to recursively add class static details (static attributes, operations and constants) */ +SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State *L, swig_lua_class *clss) +{ + int i = 0; + /* The class namespace table must be on the top of the stack */ + assert(lua_istable(L,-1)); + /* call all the base classes first: we can then override these later: */ + for(i=0;clss->bases[i];i++) + { + SWIG_Lua_add_class_static_details(L,clss->bases[i]); + } + + SWIG_Lua_add_namespace_details(L, clss->cls_static); +} + +SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss); /* forward declaration */ + +/* helper to recursively add class details (attributes & operations) */ +SWIGINTERN void SWIG_Lua_add_class_instance_details(lua_State *L, swig_lua_class *clss) +{ + int i; + size_t bases_count = 0; + /* Add bases to .bases table */ + SWIG_Lua_get_table(L,".bases"); + assert(lua_istable(L,-1)); /* just in case */ + for(i=0;clss->bases[i];i++) + { + SWIG_Lua_get_class_metatable(L,clss->bases[i]->fqname); + /* Base class must be already registered */ + assert(lua_istable(L,-1)); + lua_rawseti(L,-2,i+1); /* In lua indexing starts from 1 */ + bases_count++; + } + assert(lua_rawlen(L,-1) == bases_count); + lua_pop(L,1); /* remove .bases table */ + /* add attributes */ + for(i=0;clss->attributes[i].name;i++){ + SWIG_Lua_add_variable(L,clss->attributes[i].name,clss->attributes[i].getmethod,clss->attributes[i].setmethod); + } + /* add methods to the metatable */ + SWIG_Lua_get_table(L,".fn"); /* find the .fn table */ + assert(lua_istable(L,-1)); /* just in case */ + for(i=0;clss->methods[i].name;i++){ + SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].func); + } + lua_pop(L,1); /* tidy stack (remove table) */ + /* add operator overloads + This adds methods from metatable array to metatable. Can mess up garbage + collectind if someone defines __gc method + */ + if(clss->metatable) { + for(i=0;clss->metatable[i].name;i++) { + SWIG_Lua_add_function(L,clss->metatable[i].name,clss->metatable[i].func); + } + } + +#if !defined(SWIG_LUA_SQUASH_BASES) + /* Adding metamethods that are defined in base classes. If bases were squashed + * then it is obviously unnecessary + */ + SWIG_Lua_add_class_user_metamethods(L, clss); +#endif +} + +/* Helpers to add user defined class metamedhods - __add, __sub etc. The helpers are needed + for the following issue: Lua runtime checks for metamethod existence with rawget function + ignoring our SWIG-provided __index and __newindex functions. Thus our inheritance-aware method + search algorithm doesn't work in such case. (Not to say that Lua runtime queries metamethod directly + in metatable and not in object). + Current solution is this: if somewhere in hierarchy metamethod __x is defined, then all descendants + are automatically given a special proxy __x that calls the real __x method. + Obvious idea - to copy __x instead of creating __x-proxy is wrong because if someone changes __x in runtime, + those changes must be reflected in all descendants. +*/ + +SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L); /*forward declaration*/ + +/* The real function that resolves a metamethod. + * Function searches given class and all it's bases(recursively) for first instance of something that is + * not equal to SWIG_Lua_resolve_metatmethod. (Almost always this 'something' is actual metamethod implementation + * and it is a SWIG-generated C function.). It returns value on the top of the L and there is no garbage below the + * answer. + * Returns 1 if found, 0 otherwise. + * clss is class which metatable we will search for method + * metamethod_name_idx is index in L where metamethod name (as string) lies + * skip_check allows to skip searching metamethod in givel clss and immideatelly go to searching in bases. skip_check + * is not caried to subsequent recursive calls - false is always passed. It is set to true only at first call from + * SWIG_Lua_resolve_metamethod + * */ +SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx, + int skip_check) +{ + /* This function is called recursively */ + int result = 0; + int i = 0; + + if (!skip_check) { + SWIG_Lua_get_class_metatable(L, clss->fqname); + lua_pushvalue(L, metamethod_name_idx); + lua_rawget(L,-2); + /* If this is cfunction and it is equal to SWIG_Lua_resolve_metamethod then + * this isn't the function we are looking for :) + * lua_tocfunction will return NULL if not cfunction + */ + if (!lua_isnil(L,-1) && lua_tocfunction(L,-1) != SWIG_Lua_resolve_metamethod ) { + lua_remove(L,-2); /* removing class metatable */ + return 1; + } + lua_pop(L,2); /* remove class metatable and query result */ + } + + /* Forwarding calls to bases */ + for(i=0;clss->bases[i];i++) + { + result = SWIG_Lua_do_resolve_metamethod(L, clss->bases[i], metamethod_name_idx, 0); + if (result) + break; + } + + return result; +} + +/* The proxy function for metamethod. All parameters are passed as cclosure. Searches for actual method + * and calls it */ +SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L) +{ + int numargs; + int metamethod_name_idx; + const swig_lua_class* clss; + int result; + + lua_checkstack(L,5); + numargs = lua_gettop(L); /* number of arguments to pass to actual metamethod */ + + /* Get upvalues from closure */ + lua_pushvalue(L, lua_upvalueindex(1)); /*Get function name*/ + metamethod_name_idx = lua_gettop(L); + + lua_pushvalue(L, lua_upvalueindex(2)); + clss = (const swig_lua_class*)(lua_touserdata(L,-1)); + lua_pop(L,1); /* remove lightuserdata with clss from stack */ + + /* Actual work */ + result = SWIG_Lua_do_resolve_metamethod(L, clss, metamethod_name_idx, 1); + if (!result) { + SWIG_Lua_pushferrstring(L,"The metamethod proxy is set, but it failed to find actual metamethod. Memory corruption is most likely explanation."); + lua_error(L); + return 0; + } + + lua_remove(L,-2); /* remove metamethod key */ + lua_insert(L,1); /* move function to correct position */ + lua_call(L, numargs, LUA_MULTRET); + return lua_gettop(L); /* return all results */ +} + + +/* If given metamethod must be present in given class, then creates appropriate proxy + * Returns 1 if successfully added, 0 if not added because no base class has it, -1 + * if method is defined in the class metatable itself + */ +SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index) +{ + int key_index; + int success = 0; + int i = 0; + + /* metamethod name - on the top of the stack */ + assert(lua_isstring(L,-1)); + + key_index = lua_gettop(L); + + /* Check whether method is already defined in metatable */ + lua_pushvalue(L,key_index); /* copy of the key */ + lua_gettable(L,metatable_index); + if( !lua_isnil(L,-1) ) { + lua_pop(L,1); + return -1; + } + lua_pop(L,1); + + /* Iterating over immediate bases */ + for(i=0;clss->bases[i];i++) + { + const swig_lua_class *base = clss->bases[i]; + SWIG_Lua_get_class_metatable(L, base->fqname); + lua_pushvalue(L, key_index); + lua_rawget(L, -2); + if( !lua_isnil(L,-1) ) { + lua_pushvalue(L, key_index); + + /* Add proxy function */ + lua_pushvalue(L, key_index); /* first closure value is function name */ + lua_pushlightuserdata(L, clss); /* second closure value is swig_lua_class structure */ + lua_pushcclosure(L, SWIG_Lua_resolve_metamethod, 2); + + lua_rawset(L, metatable_index); + success = 1; + } + lua_pop(L,1); /* remove function or nil */ + lua_pop(L,1); /* remove base class metatable */ + + if( success ) + break; + } + + return success; +} + +SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss) +{ + int metatable_index; + int metamethods_info_index; + int tostring_undefined; + int eq_undefined = 0; + + SWIG_Lua_get_class_metatable(L, clss->fqname); + metatable_index = lua_gettop(L); + SWIG_Lua_get_inheritable_metamethods(L); + assert(lua_istable(L,-1)); + metamethods_info_index = lua_gettop(L); + lua_pushnil(L); /* first key */ + while(lua_next(L, metamethods_info_index) != 0 ) { + /* key at index -2, value at index -1 */ + const int is_inheritable = lua_toboolean(L,-2); + lua_pop(L,1); /* remove value - we don't need it anymore */ + + if(is_inheritable) { /* if metamethod is inheritable */ + SWIG_Lua_add_class_user_metamethod(L,clss,metatable_index); + } + } + + lua_pop(L,1); /* remove inheritable metatmethods table */ + + /* Special handling for __tostring method */ + lua_pushstring(L, "__tostring"); + lua_pushvalue(L,-1); + lua_rawget(L,metatable_index); + tostring_undefined = lua_isnil(L,-1); + lua_pop(L,1); + if( tostring_undefined ) { + lua_pushcfunction(L, SWIG_Lua_class_tostring); + lua_rawset(L, metatable_index); + } else { + lua_pop(L,1); /* remove copy of the key */ + } + + /* Special handling for __eq method */ + lua_pushstring(L, "__eq"); + lua_pushvalue(L,-1); + lua_rawget(L,metatable_index); + eq_undefined = lua_isnil(L,-1); + lua_pop(L,1); + if( eq_undefined ) { + lua_pushcfunction(L, SWIG_Lua_class_equal); + lua_rawset(L, metatable_index); + } else { + lua_pop(L,1); /* remove copy of the key */ + } + /* Warning: __index and __newindex are SWIG-defined. For user-defined operator[] + * a __getitem/__setitem method should be defined + */ + lua_pop(L,1); /* pop class metatable */ +} + +/* Register class static methods,attributes etc as well as constructor proxy */ +SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *clss) +{ + const int SWIGUNUSED begin = lua_gettop(L); + lua_checkstack(L,5); /* just in case */ + assert(lua_istable(L,-1)); /* just in case */ + assert(strcmp(clss->name, clss->cls_static->name) == 0); /* in class those 2 must be equal */ + + SWIG_Lua_namespace_register(L,clss->cls_static, 1); + + assert(lua_istable(L,-1)); /* just in case */ + + /* add its constructor to module with the name of the class + so you can do MyClass(...) as well as new_MyClass(...) + BUT only if a constructor is defined + (this overcomes the problem of pure virtual classes without constructors)*/ + if (clss->constructor) + { + lua_getmetatable(L,-1); + assert(lua_istable(L,-1)); /* just in case */ + SWIG_Lua_add_function(L,"__call", clss->constructor); + lua_pop(L,1); + } + + assert(lua_istable(L,-1)); /* just in case */ + SWIG_Lua_add_class_static_details(L, clss); + + /* clear stack */ + lua_pop(L,1); + assert( lua_gettop(L) == begin ); +} + +/* Performs the instance (non-static) class registration process. Metatable for class is created + * and added to the class registry. + */ +SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L,swig_lua_class *clss) +{ + const int SWIGUNUSED begin = lua_gettop(L); + int i; + /* if name already there (class is already registered) then do nothing */ + SWIG_Lua_get_class_registry(L); /* get the registry */ + lua_pushstring(L,clss->fqname); /* get the name */ + lua_rawget(L,-2); + if(!lua_isnil(L,-1)) { + lua_pop(L,2); + assert(lua_gettop(L)==begin); + return; + } + lua_pop(L,2); /* tidy stack */ + /* Recursively initialize all bases */ + for(i=0;clss->bases[i];i++) + { + SWIG_Lua_class_register_instance(L,clss->bases[i]); + } + /* Again, get registry and push name */ + SWIG_Lua_get_class_registry(L); /* get the registry */ + lua_pushstring(L,clss->fqname); /* get the name */ + lua_newtable(L); /* create the metatable */ +#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) + /* If squashing is requested, then merges all bases metatable into this one. + * It would get us all special methods: __getitem, __add etc. + * This would set .fn, .type, and other .xxx incorrectly, but we will overwrite it right away + */ + { + int new_metatable_index = lua_absindex(L,-1); + for(i=0;clss->bases[i];i++) + { + int base_metatable; + SWIG_Lua_get_class_metatable(L,clss->bases[i]->fqname); + base_metatable = lua_absindex(L,-1); + SWIG_Lua_merge_tables_by_index(L,new_metatable_index, base_metatable); + lua_pop(L,1); + } + } + /* And now we will overwrite all incorrectly set data */ +#endif + /* add string of class name called ".type" */ + lua_pushstring(L,".type"); + lua_pushstring(L,clss->fqname); + lua_rawset(L,-3); + /* add a table called bases */ + lua_pushstring(L,".bases"); + lua_newtable(L); + lua_rawset(L,-3); + /* add a table called ".get" */ + lua_pushstring(L,".get"); + lua_newtable(L); + lua_rawset(L,-3); + /* add a table called ".set" */ + lua_pushstring(L,".set"); + lua_newtable(L); + lua_rawset(L,-3); + /* add a table called ".fn" */ + lua_pushstring(L,".fn"); + lua_newtable(L); + /* add manual disown method */ + SWIG_Lua_add_function(L,"__disown",SWIG_Lua_class_disown); + lua_rawset(L,-3); + /* add accessor fns for using the .get,.set&.fn */ + SWIG_Lua_add_function(L,"__index",SWIG_Lua_class_get); + SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set); + SWIG_Lua_add_function(L,"__gc",SWIG_Lua_class_destruct); + /* add it */ + lua_rawset(L,-3); /* metatable into registry */ + lua_pop(L,1); /* tidy stack (remove registry) */ + assert(lua_gettop(L) == begin); + +#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) + /* Now merge all symbols from .fn, .set, .get etc from bases to our tables */ + SWIG_Lua_class_squash_bases(L,clss); +#endif + SWIG_Lua_get_class_metatable(L,clss->fqname); + SWIG_Lua_add_class_instance_details(L,clss); /* recursive adding of details (atts & ops) */ + lua_pop(L,1); /* tidy stack (remove class metatable) */ + assert( lua_gettop(L) == begin ); +} + +SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss) +{ + int SWIGUNUSED begin; + assert(lua_istable(L,-1)); /* This is a table (module or namespace) where classes will be added */ + SWIG_Lua_class_register_instance(L,clss); + SWIG_Lua_class_register_static(L,clss); + + /* Add links from static part to instance part and vice versa */ + /* [SWIG registry] [Module] + * "MyClass" ----> [MyClass metatable] <===== "MyClass" -+> [static part] + * ".get" ----> ... | | getmetatable()----| + * ".set" ----> ... | | | + * ".static" --------------)----------------/ [static part metatable] + * | ".get" --> ... + * | ".set" --> .... + * |=============================== ".instance" + */ + begin = lua_gettop(L); + lua_pushstring(L,clss->cls_static->name); + lua_rawget(L,-2); /* get class static table */ + assert(lua_istable(L,-1)); + lua_getmetatable(L,-1); + assert(lua_istable(L,-1)); /* get class static metatable */ + lua_pushstring(L,".instance"); /* prepare key */ + + SWIG_Lua_get_class_metatable(L,clss->fqname); /* get class metatable */ + assert(lua_istable(L,-1)); + lua_pushstring(L,".static"); /* prepare key */ + lua_pushvalue(L, -4); /* push static class TABLE */ + assert(lua_istable(L,-1)); + lua_rawset(L,-3); /* assign static class table(!NOT metatable) as ".static" member of class metatable */ + lua_rawset(L,-3); /* assign class metatable as ".instance" member of class static METATABLE */ + lua_pop(L,2); + assert(lua_gettop(L) == begin); +} +#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */ + +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC) +SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_class *clss) +{ + const int SWIGUNUSED begin = lua_gettop(L); + int i; + /* if name already there (class is already registered) then do nothing */ + SWIG_Lua_get_class_registry(L); /* get the registry */ + lua_pushstring(L,clss->fqname); /* get the name */ + lua_rawget(L,-2); + if(!lua_isnil(L,-1)) { + lua_pop(L,2); + assert(lua_gettop(L)==begin); + return; + } + lua_pop(L,2); /* tidy stack */ + /* Recursively initialize all bases */ + for(i=0;clss->bases[i];i++) + { + SWIG_Lua_elua_class_register_instance(L,clss->bases[i]); + } + /* Again, get registry and push name */ + SWIG_Lua_get_class_registry(L); /* get the registry */ + lua_pushstring(L,clss->fqname); /* get the name */ + assert(clss->metatable); + lua_pushrotable(L, (void*)(clss->metatable)); /* create the metatable */ + lua_rawset(L,-3); + lua_pop(L,1); + assert(lua_gettop(L) == begin); +} +#endif /* elua && eluac */ + +/* ----------------------------------------------------------------------------- + * Class/structure conversion fns + * ----------------------------------------------------------------------------- */ + +/* helper to add metatable to new lua object */ +SWIGINTERN void SWIG_Lua_AddMetatable(lua_State *L,swig_type_info *type) +{ + if (type->clientdata) /* there is clientdata: so add the metatable */ + { + SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->fqname); + if (lua_istable(L,-1)) + { + lua_setmetatable(L,-2); + } + else + { + lua_pop(L,1); + } + } +} + +/* pushes a new object into the lua stack */ +SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own) +{ + swig_lua_userdata *usr; + if (!ptr){ + lua_pushnil(L); + return; + } + usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */ + usr->ptr=ptr; /* set the ptr */ + usr->type=type; + usr->own=own; +#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) + SWIG_Lua_AddMetatable(L,type); /* add metatable */ +#endif +} + +/* takes a object from the lua stack & converts it into an object of the correct type + (if possible) */ +SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L,int index,void **ptr,swig_type_info *type,int flags) +{ + swig_lua_userdata *usr; + swig_cast_info *cast; + if (lua_isnil(L,index)){*ptr=0; return SWIG_OK;} /* special case: lua nil => NULL pointer */ + usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */ + if (usr) + { + if (flags & SWIG_POINTER_DISOWN) /* must disown the object */ + { + usr->own=0; + } + if (!type) /* special cast void*, no casting fn */ + { + *ptr=usr->ptr; + return SWIG_OK; /* ok */ + } + cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */ + if (cast) + { + int newmemory = 0; + *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + return SWIG_OK; /* ok */ + } + } + return SWIG_ERROR; /* error */ +} + +SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State *L,int index,swig_type_info *type,int flags, + int argnum,const char *func_name){ + void *result; + if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){ + luaL_error (L,"Error in %s, expected a %s at argument number %d\n", + func_name,(type && type->str)?type->str:"void*",argnum); + } + return result; +} + +/* pushes a packed userdata. user for member fn pointers only */ +SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type) +{ + swig_lua_rawdata *raw; + assert(ptr); /* not acceptable to pass in a NULL value */ + raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */ + raw->type=type; + raw->own=0; + memcpy(raw->data,ptr,size); /* copy the data */ + SWIG_Lua_AddMetatable(L,type); /* add metatable */ +} + +/* converts a packed userdata. user for member fn pointers only */ +SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L,int index,void *ptr,size_t size,swig_type_info *type) +{ + swig_lua_rawdata *raw; + raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */ + if (!raw) return SWIG_ERROR; /* error */ + if (type==0 || type==raw->type) /* void* or identical type */ + { + memcpy(ptr,raw->data,size); /* copy it */ + return SWIG_OK; /* ok */ + } + return SWIG_ERROR; /* error */ +} + +/* a function to get the typestring of a piece of data */ +SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp) +{ + swig_lua_userdata *usr; + if (lua_isuserdata(L,tp)) + { + usr=(swig_lua_userdata*)lua_touserdata(L,tp); /* get data */ + if (usr && usr->type && usr->type->str) + return usr->type->str; + return "userdata (unknown type)"; + } + return lua_typename(L,lua_type(L,tp)); +} + +/* lua callable function to get the userdata's type */ +SWIGRUNTIME int SWIG_Lua_type(lua_State *L) +{ + lua_pushstring(L,SWIG_Lua_typename(L,1)); + return 1; +} + +/* ----------------------------------------------------------------------------- + * global variable support code: class/struct typemap functions + * ----------------------------------------------------------------------------- */ + +#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)) +/* Install Constants */ +SWIGINTERN void +SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]) { + int i; + for (i = 0; constants[i].type; i++) { + switch(constants[i].type) { + case SWIG_LUA_INT: + lua_pushstring(L,constants[i].name); + lua_pushinteger(L,(lua_Number)constants[i].lvalue); + lua_rawset(L,-3); + break; + case SWIG_LUA_FLOAT: + lua_pushstring(L,constants[i].name); + lua_pushnumber(L,(lua_Number)constants[i].dvalue); + lua_rawset(L,-3); + break; + case SWIG_LUA_CHAR: + lua_pushstring(L,constants[i].name); + { + char c = constants[i].lvalue; + lua_pushlstring(L,&c,1); + } + lua_rawset(L,-3); + break; + case SWIG_LUA_STRING: + lua_pushstring(L,constants[i].name); + lua_pushstring(L,(char *) constants[i].pvalue); + lua_rawset(L,-3); + break; + case SWIG_LUA_POINTER: + lua_pushstring(L,constants[i].name); + SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0); + lua_rawset(L,-3); + break; + case SWIG_LUA_BINARY: + lua_pushstring(L,constants[i].name); + SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype); + lua_rawset(L,-3); + break; + default: + break; + } + } +} +#endif + +/* ----------------------------------------------------------------------------- + * executing lua code from within the wrapper + * ----------------------------------------------------------------------------- */ + +#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */ +#define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S) +#endif +/* Executes a C string in Lua which is a really simple way of calling lua from C +Unfortunately lua keeps changing its APIs, so we need a conditional compile +In lua 5.0.X it's lua_dostring() +In lua 5.1.X it's luaL_dostring() +*/ +SWIGINTERN int +SWIG_Lua_dostring(lua_State *L, const char *str) { + int ok,top; + if (str==0 || str[0]==0) return 0; /* nothing to do */ + top=lua_gettop(L); /* save stack */ +#if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501)) + ok=luaL_dostring(L,str); /* looks like this is lua 5.1.X or later, good */ +#else + ok=lua_dostring(L,str); /* might be lua 5.0.x, using lua_dostring */ +#endif + if (ok!=0) { + SWIG_DOSTRING_FAIL(lua_tostring(L,-1)); + } + lua_settop(L,top); /* restore the stack */ + return ok; +} + +#ifdef __cplusplus +} +#endif + +/* ------------------------------ end luarun.swg ------------------------------ */ + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_Data swig_types[0] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr swig_types[1] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection swig_types[2] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData swig_types[3] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment swig_types[4] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocument swig_types[5] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentFragment swig_types[6] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType swig_types[7] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement swig_types[8] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity swig_types[9] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference swig_types[10] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException swig_types[11] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap swig_types[12] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode swig_types[13] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList swig_types[14] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation swig_types[15] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction swig_types[16] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText swig_types[17] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMTypeInfo swig_types[18] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMUserDataHandler swig_types[19] +#define SWIGTYPE_p_XERCES_CPP_NAMESPACE__MemoryManager swig_types[20] +#define SWIGTYPE_p_bool swig_types[21] +#define SWIGTYPE_p_int16_t swig_types[22] +#define SWIGTYPE_p_int32_t swig_types[23] +#define SWIGTYPE_p_int64_t swig_types[24] +#define SWIGTYPE_p_namelist_t swig_types[25] +#define SWIGTYPE_p_params_t swig_types[26] +#define SWIGTYPE_p_size_t swig_types[27] +#define SWIGTYPE_p_ssize_t swig_types[28] +#define SWIGTYPE_p_std__listT_Data_t swig_types[29] +#define SWIGTYPE_p_std__multimapT_std__string_Data_t swig_types[30] +#define SWIGTYPE_p_std__string swig_types[31] +#define SWIGTYPE_p_uint16_t swig_types[32] +#define SWIGTYPE_p_uint32_t swig_types[33] +#define SWIGTYPE_p_uint64_t swig_types[34] +#define SWIGTYPE_p_unsigned_char swig_types[35] +#define SWIGTYPE_p_uscxml__ErrorEvent swig_types[36] +#define SWIGTYPE_p_uscxml__Event swig_types[37] +#define SWIGTYPE_p_void swig_types[38] +static swig_type_info *swig_types[40]; +static swig_module_info swig_module = {swig_types, 39, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#define SWIG_name "LuaDOM" +#define SWIG_init luaopen_LuaDOM +#define SWIG_init_user luaopen_LuaDOM_user + +#define SWIG_LUACODE luaopen_LuaDOM_luacode + +namespace swig { +typedef struct{} LANGUAGE_OBJ; +} + + +#include + + +SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) { + int ret = lua_isstring(L, idx); + if (!ret) + ret = lua_isnil(L, idx); + return ret; +} + + +#include "xercesc/sax/InputSource.hpp" +#include "xercesc/sax/SAXException.hpp" +#include "xercesc/sax/SAXParseException.hpp" +#include "xercesc/sax/Locator.hpp" +#include "xercesc/sax/HandlerBase.hpp" +#include "xercesc/sax2/Attributes.hpp" +#include "xercesc/sax2/ContentHandler.hpp" +#include "xercesc/sax2/LexicalHandler.hpp" +#include "xercesc/sax2/DefaultHandler.hpp" +#include "xercesc/sax2/SAX2XMLReader.hpp" +#include "xercesc/sax2/XMLReaderFactory.hpp" +#include "xercesc/util/PlatformUtils.hpp" +#include "xercesc/util/TransService.hpp" +#include "xercesc/util/XMLString.hpp" +#include "xercesc/util/XMLUri.hpp" +#include "xercesc/util/QName.hpp" +#include "xercesc/util/HexBin.hpp" +#include "xercesc/util/Base64.hpp" +#include "xercesc/parsers/AbstractDOMParser.hpp" +#include "xercesc/parsers/XercesDOMParser.hpp" +#include "xercesc/parsers/SAXParser.hpp" +#include "xercesc/dom/DOM.hpp" +#include "xercesc/framework/LocalFileInputSource.hpp" +#include "xercesc/framework/MemBufInputSource.hpp" +#include "xercesc/framework/StdInInputSource.hpp" +#include "xercesc/framework/URLInputSource.hpp" +#include "xercesc/framework/XMLGrammarDescription.hpp" +#include "xercesc/framework/XMLDTDDescription.hpp" +#include "xercesc/framework/XMLSchemaDescription.hpp" +#include "xercesc/util/NameIdPool.hpp" +#include "xercesc/util/XMLEnumerator.hpp" +#include "xercesc/framework/XMLValidator.hpp" +#include "xercesc/validators/common/Grammar.hpp" +#include "xercesc/validators/DTD/DTDAttDef.hpp" +#include "xercesc/validators/DTD/DTDAttDefList.hpp" +#include "xercesc/validators/DTD/DTDGrammar.hpp" +#include "xercesc/validators/DTD/DTDValidator.hpp" +#include "xercesc/validators/schema/SchemaGrammar.hpp" +#include "xercesc/validators/schema/SchemaValidator.hpp" +#include "xercesc/validators/schema/SchemaAttDefList.hpp" +#include "xercesc/validators/schema/SchemaAttDef.hpp" +#include "xercesc/framework/XMLFormatter.hpp" +#include "xercesc/framework/MemBufFormatTarget.hpp" +#include "xercesc/framework/LocalFileFormatTarget.hpp" +#include "xercesc/framework/StdOutFormatTarget.hpp" +#include "xercesc/framework/Wrapper4InputSource.hpp" +#include "xercesc/framework/psvi/PSVIHandler.hpp" + +// for resolving XMLExceptions +#include "xercesc/util/ArrayIndexOutOfBoundsException.hpp" +#include "xercesc/util/EmptyStackException.hpp" +#include "xercesc/util/IllegalArgumentException.hpp" +#include "xercesc/util/InvalidCastException.hpp" +#include "xercesc/util/IOException.hpp" +#include "xercesc/util/NoSuchElementException.hpp" +#include "xercesc/util/NullPointerException.hpp" +#include "xercesc/util/NumberFormatException.hpp" +#include "xercesc/util/ParseException.hpp" +#include "xercesc/util/RuntimeException.hpp" +#include "xercesc/util/SchemaDateTimeException.hpp" +#include "xercesc/util/TranscodingException.hpp" +#include "xercesc/util/UnexpectedEOFException.hpp" +#include "xercesc/util/UnsupportedEncodingException.hpp" +#include "xercesc/util/UTFDataFormatException.hpp" +#include "xercesc/util/XMLNetAccessor.hpp" +#include "xercesc/internal/XSerializationException.hpp" +#include "xercesc/validators/datatype/InvalidDatatypeFacetException.hpp" +#include "xercesc/validators/datatype/InvalidDatatypeValueException.hpp" +#include "xercesc/validators/schema/identity/XPathException.hpp" + +XERCES_CPP_NAMESPACE_USE + +// we initialize the static UTF-8 transcoding info +// these are used by the typemaps to convert between +// Xerces internal UTF-16 and Perl's internal UTF-8 +static XMLCh* UTF8_ENCODING = NULL; +static XMLTranscoder* UTF8_TRANSCODER = NULL; + +static bool DEBUG_UTF8_OUT = 0; +static bool DEBUG_UTF8_IN = 0; + + + +static swig_type_info * +DOMNode_dynamic_cast(void **ptr) { + DOMNode **nptr = (DOMNode **) ptr; + if (*nptr == NULL) { + return NULL; + } + short int type = (*nptr)->getNodeType(); + if (type == DOMNode::TEXT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText; + } + if (type == DOMNode::PROCESSING_INSTRUCTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction; + } + if (type == DOMNode::DOCUMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocument; + } + if (type == DOMNode::ELEMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement; + } + if (type == DOMNode::ENTITY_REFERENCE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference; + } + if (type == DOMNode::CDATA_SECTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection; + } + if (type == DOMNode::CDATA_SECTION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection; + } + if (type == DOMNode::COMMENT_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment; + } + if (type == DOMNode::DOCUMENT_TYPE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType; + } + if (type == DOMNode::ENTITY_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity; + } + if (type == DOMNode::ATTRIBUTE_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr; + } + if (type == DOMNode::NOTATION_NODE) { + return SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation; + } + return NULL; +} + +SWIGINTERN bool XERCES_CPP_NAMESPACE_DOMNode_operator_Se__Se_(XERCES_CPP_NAMESPACE::DOMNode *self,XERCES_CPP_NAMESPACE::DOMNode const *other){ + return self->isSameNode(other); + } + +using uscxml::Data; + +#ifdef __cplusplus +extern "C" { +#endif +static int _wrap_new_string__SWIG_0(lua_State* L) { + int SWIG_arg = 0; + std::string *result = 0 ; + + SWIG_check_num_args("std::string::string",0,0) + result = (std::string *)new std::string(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__string,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_string__SWIG_1(lua_State* L) { + int SWIG_arg = 0; + char *arg1 = (char *) 0 ; + std::string *result = 0 ; + + SWIG_check_num_args("std::string::string",1,1) + if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("std::string::string",1,"char const *"); + arg1 = (char *)lua_tostring(L, 1); + result = (std::string *)new std::string((char const *)arg1); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__string,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_string(lua_State* L) { + int argc; + int argv[2]={ + 1,2 + }; + + argc = lua_gettop(L); + if (argc == 0) { + return _wrap_new_string__SWIG_0(L); + } + if (argc == 1) { + int _v; + { + _v = SWIG_lua_isnilstring(L,argv[0]); + } + if (_v) { + return _wrap_new_string__SWIG_1(L); + } + } + + SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_string'\n" + " Possible C/C++ prototypes are:\n" + " std::string::string()\n" + " std::string::string(char const *)\n"); + lua_error(L);return 0; +} + + +static int _wrap_string_size(lua_State* L) { + int SWIG_arg = 0; + std::string *arg1 = (std::string *) 0 ; + unsigned int result; + + SWIG_check_num_args("std::string::size",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::size",1,"std::string const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ + SWIG_fail_ptr("string_size",1,SWIGTYPE_p_std__string); + } + + result = (unsigned int)((std::string const *)arg1)->size(); + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_string_length(lua_State* L) { + int SWIG_arg = 0; + std::string *arg1 = (std::string *) 0 ; + unsigned int result; + + SWIG_check_num_args("std::string::length",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::length",1,"std::string const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ + SWIG_fail_ptr("string_length",1,SWIGTYPE_p_std__string); + } + + result = (unsigned int)((std::string const *)arg1)->length(); + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_string_empty(lua_State* L) { + int SWIG_arg = 0; + std::string *arg1 = (std::string *) 0 ; + bool result; + + SWIG_check_num_args("std::string::empty",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::empty",1,"std::string const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ + SWIG_fail_ptr("string_empty",1,SWIGTYPE_p_std__string); + } + + result = (bool)((std::string const *)arg1)->empty(); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_string_c_str(lua_State* L) { + int SWIG_arg = 0; + std::string *arg1 = (std::string *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("std::string::c_str",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::c_str",1,"std::string const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ + SWIG_fail_ptr("string_c_str",1,SWIGTYPE_p_std__string); + } + + result = (char *)((std::string const *)arg1)->c_str(); + lua_pushstring(L,(const char *)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_string_data(lua_State* L) { + int SWIG_arg = 0; + std::string *arg1 = (std::string *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("std::string::data",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::data",1,"std::string const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ + SWIG_fail_ptr("string_data",1,SWIGTYPE_p_std__string); + } + + result = (char *)((std::string const *)arg1)->data(); + lua_pushstring(L,(const char *)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_string_assign(lua_State* L) { + int SWIG_arg = 0; + std::string *arg1 = (std::string *) 0 ; + char *arg2 = (char *) 0 ; + + SWIG_check_num_args("std::string::assign",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::assign",1,"std::string *"); + if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("std::string::assign",2,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ + SWIG_fail_ptr("string_assign",1,SWIGTYPE_p_std__string); + } + + arg2 = (char *)lua_tostring(L, 2); + (arg1)->assign((char const *)arg2); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_string(void *obj) { +std::string *arg1 = (std::string *) obj; +delete arg1; +} +static int _proxy__wrap_new_string(lua_State *L) { + assert(lua_istable(L,1)); + lua_pushcfunction(L,_wrap_new_string); + assert(!lua_isnil(L,-1)); + lua_replace(L,1); /* replace our table with real constructor */ + lua_call(L,lua_gettop(L)-1,1); + return 1; +} +static swig_lua_attribute swig_string_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_string_methods[]= { + { "size", _wrap_string_size}, + { "length", _wrap_string_length}, + { "empty", _wrap_string_empty}, + { "c_str", _wrap_string_c_str}, + { "data", _wrap_string_data}, + { "assign", _wrap_string_assign}, + {0,0} +}; +static swig_lua_method swig_string_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_string_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_string_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_string_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_string_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_string_Sf_SwigStatic = { + "string", + swig_string_Sf_SwigStatic_methods, + swig_string_Sf_SwigStatic_attributes, + swig_string_Sf_SwigStatic_constants, + swig_string_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_string_bases[] = {0}; +static const char *swig_string_base_names[] = {0}; +static swig_lua_class _wrap_class_string = { "string", "string", &SWIGTYPE_p_std__string,_proxy__wrap_new_string, swig_delete_string, swig_string_methods, swig_string_attributes, &swig_string_Sf_SwigStatic, swig_string_meta, swig_string_bases, swig_string_base_names }; + +static int _wrap_DEBUG_UTF8_OUT_set(lua_State* L) { + int SWIG_arg = 0; + bool arg1 ; + + SWIG_check_num_args("DEBUG_UTF8_OUT",1,1) + if(!lua_isboolean(L,1)) SWIG_fail_arg("DEBUG_UTF8_OUT",1,"bool"); + arg1 = (lua_toboolean(L, 1)!=0); + DEBUG_UTF8_OUT = arg1; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DEBUG_UTF8_OUT_get(lua_State* L) { + int SWIG_arg = 0; + bool result; + + SWIG_check_num_args("DEBUG_UTF8_OUT",0,0) + result = (bool)DEBUG_UTF8_OUT; + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DEBUG_UTF8_IN_set(lua_State* L) { + int SWIG_arg = 0; + bool arg1 ; + + SWIG_check_num_args("DEBUG_UTF8_IN",1,1) + if(!lua_isboolean(L,1)) SWIG_fail_arg("DEBUG_UTF8_IN",1,"bool"); + arg1 = (lua_toboolean(L, 1)!=0); + DEBUG_UTF8_IN = arg1; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DEBUG_UTF8_IN_get(lua_State* L) { + int SWIG_arg = 0; + bool result; + + SWIG_check_num_args("DEBUG_UTF8_IN",0,0) + result = (bool)DEBUG_UTF8_IN; + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_DOMException__SWIG_0(lua_State* L) { + int SWIG_arg = 0; + short arg1 ; + short arg2 ; + XERCES_CPP_NAMESPACE::MemoryManager *arg3 = (XERCES_CPP_NAMESPACE::MemoryManager *) (XERCES_CPP_NAMESPACE::MemoryManager *)0 ; + XERCES_CPP_NAMESPACE::DOMException *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMException::DOMException",3,3) + if(!lua_isnumber(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMException::DOMException",1,"short"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMException::DOMException",2,"short"); + if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMException::DOMException",3,"XERCES_CPP_NAMESPACE::MemoryManager *const"); + arg1 = (short)lua_tonumber(L, 1); + arg2 = (short)lua_tonumber(L, 2); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__MemoryManager,0))){ + SWIG_fail_ptr("new_DOMException",3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__MemoryManager); + } + + result = (XERCES_CPP_NAMESPACE::DOMException *)new XERCES_CPP_NAMESPACE::DOMException(arg1,arg2,arg3); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_DOMException__SWIG_1(lua_State* L) { + int SWIG_arg = 0; + short arg1 ; + short arg2 ; + XERCES_CPP_NAMESPACE::DOMException *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMException::DOMException",2,2) + if(!lua_isnumber(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMException::DOMException",1,"short"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMException::DOMException",2,"short"); + arg1 = (short)lua_tonumber(L, 1); + arg2 = (short)lua_tonumber(L, 2); + result = (XERCES_CPP_NAMESPACE::DOMException *)new XERCES_CPP_NAMESPACE::DOMException(arg1,arg2); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_DOMException__SWIG_2(lua_State* L) { + int SWIG_arg = 0; + short arg1 ; + XERCES_CPP_NAMESPACE::DOMException *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMException::DOMException",1,1) + if(!lua_isnumber(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMException::DOMException",1,"short"); + arg1 = (short)lua_tonumber(L, 1); + result = (XERCES_CPP_NAMESPACE::DOMException *)new XERCES_CPP_NAMESPACE::DOMException(arg1); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_DOMException(lua_State* L) { + int argc; + int argv[4]={ + 1,2,3,4 + }; + + argc = lua_gettop(L); + if (argc == 1) { + int _v; + { + _v = lua_isnumber(L,argv[0]); + } + if (_v) { + return _wrap_new_DOMException__SWIG_2(L); + } + } + if (argc == 2) { + int _v; + { + _v = lua_isnumber(L,argv[0]); + } + if (_v) { + { + _v = lua_isnumber(L,argv[1]); + } + if (_v) { + return _wrap_new_DOMException__SWIG_1(L); + } + } + } + if (argc == 3) { + int _v; + { + _v = lua_isnumber(L,argv[0]); + } + if (_v) { + { + _v = lua_isnumber(L,argv[1]); + } + if (_v) { + { + void *ptr; + if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_XERCES_CPP_NAMESPACE__MemoryManager, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + return _wrap_new_DOMException__SWIG_0(L); + } + } + } + } + + SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_DOMException'\n" + " Possible C/C++ prototypes are:\n" + " XERCES_CPP_NAMESPACE::DOMException::DOMException(short,short,XERCES_CPP_NAMESPACE::MemoryManager *const)\n" + " XERCES_CPP_NAMESPACE::DOMException::DOMException(short,short)\n" + " XERCES_CPP_NAMESPACE::DOMException::DOMException(short)\n"); + lua_error(L);return 0; +} + + +static int _wrap_DOMException_getMessage(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMException::getMessage",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMException::getMessage",1,"XERCES_CPP_NAMESPACE::DOMException const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException,0))){ + SWIG_fail_ptr("DOMException_getMessage",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMException const *)arg1)->getMessage(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMException_code_set(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + short arg2 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMException::code",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMException::code",1,"XERCES_CPP_NAMESPACE::DOMException *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMException::code",2,"short"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException,0))){ + SWIG_fail_ptr("DOMException_code_set",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException); + } + + arg2 = (short)lua_tonumber(L, 2); + if (arg1) (arg1)->code = arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMException_code_get(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + short result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMException::code",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMException::code",1,"XERCES_CPP_NAMESPACE::DOMException *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException,0))){ + SWIG_fail_ptr("DOMException_code_get",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException); + } + + result = (short) ((arg1)->code); + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMException_msg_set(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMException::msg",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMException::msg",1,"XERCES_CPP_NAMESPACE::DOMException *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException,0))){ + SWIG_fail_ptr("DOMException_msg_set",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException); + } + + + arg2 = Lua2XMLString(2); + + if (arg1) (arg1)->msg = (XMLCh const *)arg2; + + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMException_msg_get(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMException::msg",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMException::msg",1,"XERCES_CPP_NAMESPACE::DOMException *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException,0))){ + SWIG_fail_ptr("DOMException_msg_get",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException); + } + + result = (XMLCh *) ((arg1)->msg); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_DOMException(void *obj) { +XERCES_CPP_NAMESPACE::DOMException *arg1 = (XERCES_CPP_NAMESPACE::DOMException *) obj; +delete arg1; +} +static int _proxy__wrap_new_DOMException(lua_State *L) { + assert(lua_istable(L,1)); + lua_pushcfunction(L,_wrap_new_DOMException); + assert(!lua_isnil(L,-1)); + lua_replace(L,1); /* replace our table with real constructor */ + lua_call(L,lua_gettop(L)-1,1); + return 1; +} +static swig_lua_attribute swig_DOMException_attributes[] = { + { "code", _wrap_DOMException_code_get, _wrap_DOMException_code_set }, + { "msg", _wrap_DOMException_msg_get, _wrap_DOMException_msg_set }, + {0,0,0} +}; +static swig_lua_method swig_DOMException_methods[]= { + { "getMessage", _wrap_DOMException_getMessage}, + {0,0} +}; +static swig_lua_method swig_DOMException_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMException_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMException_Sf_SwigStatic_constants[]= { + {SWIG_LUA_CONSTTAB_INT("INDEX_SIZE_ERR", XERCES_CPP_NAMESPACE::DOMException::INDEX_SIZE_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMSTRING_SIZE_ERR", XERCES_CPP_NAMESPACE::DOMException::DOMSTRING_SIZE_ERR)}, + {SWIG_LUA_CONSTTAB_INT("HIERARCHY_REQUEST_ERR", XERCES_CPP_NAMESPACE::DOMException::HIERARCHY_REQUEST_ERR)}, + {SWIG_LUA_CONSTTAB_INT("WRONG_DOCUMENT_ERR", XERCES_CPP_NAMESPACE::DOMException::WRONG_DOCUMENT_ERR)}, + {SWIG_LUA_CONSTTAB_INT("INVALID_CHARACTER_ERR", XERCES_CPP_NAMESPACE::DOMException::INVALID_CHARACTER_ERR)}, + {SWIG_LUA_CONSTTAB_INT("NO_DATA_ALLOWED_ERR", XERCES_CPP_NAMESPACE::DOMException::NO_DATA_ALLOWED_ERR)}, + {SWIG_LUA_CONSTTAB_INT("NO_MODIFICATION_ALLOWED_ERR", XERCES_CPP_NAMESPACE::DOMException::NO_MODIFICATION_ALLOWED_ERR)}, + {SWIG_LUA_CONSTTAB_INT("NOT_FOUND_ERR", XERCES_CPP_NAMESPACE::DOMException::NOT_FOUND_ERR)}, + {SWIG_LUA_CONSTTAB_INT("NOT_SUPPORTED_ERR", XERCES_CPP_NAMESPACE::DOMException::NOT_SUPPORTED_ERR)}, + {SWIG_LUA_CONSTTAB_INT("INUSE_ATTRIBUTE_ERR", XERCES_CPP_NAMESPACE::DOMException::INUSE_ATTRIBUTE_ERR)}, + {SWIG_LUA_CONSTTAB_INT("INVALID_STATE_ERR", XERCES_CPP_NAMESPACE::DOMException::INVALID_STATE_ERR)}, + {SWIG_LUA_CONSTTAB_INT("SYNTAX_ERR", XERCES_CPP_NAMESPACE::DOMException::SYNTAX_ERR)}, + {SWIG_LUA_CONSTTAB_INT("INVALID_MODIFICATION_ERR", XERCES_CPP_NAMESPACE::DOMException::INVALID_MODIFICATION_ERR)}, + {SWIG_LUA_CONSTTAB_INT("NAMESPACE_ERR", XERCES_CPP_NAMESPACE::DOMException::NAMESPACE_ERR)}, + {SWIG_LUA_CONSTTAB_INT("INVALID_ACCESS_ERR", XERCES_CPP_NAMESPACE::DOMException::INVALID_ACCESS_ERR)}, + {SWIG_LUA_CONSTTAB_INT("VALIDATION_ERR", XERCES_CPP_NAMESPACE::DOMException::VALIDATION_ERR)}, + {SWIG_LUA_CONSTTAB_INT("TYPE_MISMATCH_ERR", XERCES_CPP_NAMESPACE::DOMException::TYPE_MISMATCH_ERR)}, + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMException_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMException_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMException_Sf_SwigStatic = { + "DOMException", + swig_DOMException_Sf_SwigStatic_methods, + swig_DOMException_Sf_SwigStatic_attributes, + swig_DOMException_Sf_SwigStatic_constants, + swig_DOMException_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMException_bases[] = {0}; +static const char *swig_DOMException_base_names[] = {0}; +static swig_lua_class _wrap_class_DOMException = { "DOMException", "DOMException", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException,_proxy__wrap_new_DOMException, swig_delete_DOMException, swig_DOMException_methods, swig_DOMException_attributes, &swig_DOMException_Sf_SwigStatic, swig_DOMException_meta, swig_DOMException_bases, swig_DOMException_base_names }; + +static int _wrap_DOMNode_getNodeName(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getNodeName",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getNodeName",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getNodeName",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNodeName(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getNodeValue(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getNodeValue",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getNodeValue",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getNodeValue",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNodeValue(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getNodeType(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode::NodeType result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getNodeType",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getNodeType",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getNodeType",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNode::NodeType)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNodeType(); + lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getParentNode(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getParentNode",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getParentNode",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getParentNode",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getParentNode(); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getChildNodes(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNodeList *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getChildNodes",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getChildNodes",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getChildNodes",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNodeList *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getChildNodes(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getFirstChild(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getFirstChild",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getFirstChild",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getFirstChild",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getFirstChild(); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getLastChild(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getLastChild",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getLastChild",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getLastChild",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getLastChild(); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getPreviousSibling(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getPreviousSibling",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getPreviousSibling",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getPreviousSibling",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getPreviousSibling(); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getNextSibling(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getNextSibling",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getNextSibling",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getNextSibling",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNextSibling(); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getAttributes(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getAttributes",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getAttributes",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getAttributes",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getAttributes(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getOwnerDocument(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMDocument *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getOwnerDocument",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getOwnerDocument",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getOwnerDocument",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMDocument *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getOwnerDocument(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocument,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_cloneNode(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + bool arg2 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::cloneNode",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::cloneNode",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + if(!lua_isboolean(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::cloneNode",2,"bool"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_cloneNode",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + arg2 = (lua_toboolean(L, 2)!=0); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->cloneNode(arg2); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_insertBefore(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg3 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::insertBefore",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::insertBefore",1,"XERCES_CPP_NAMESPACE::DOMNode *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::insertBefore",2,"XERCES_CPP_NAMESPACE::DOMNode *"); + if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::insertBefore",3,"XERCES_CPP_NAMESPACE::DOMNode *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_insertBefore",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_insertBefore",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_insertBefore",3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->insertBefore(arg2,arg3); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_replaceChild(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg3 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::replaceChild",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::replaceChild",1,"XERCES_CPP_NAMESPACE::DOMNode *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::replaceChild",2,"XERCES_CPP_NAMESPACE::DOMNode *"); + if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::replaceChild",3,"XERCES_CPP_NAMESPACE::DOMNode *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_replaceChild",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_replaceChild",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_replaceChild",3,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->replaceChild(arg2,arg3); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_removeChild(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::removeChild",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::removeChild",1,"XERCES_CPP_NAMESPACE::DOMNode *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::removeChild",2,"XERCES_CPP_NAMESPACE::DOMNode *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_removeChild",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_removeChild",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->removeChild(arg2); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_appendChild(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::appendChild",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::appendChild",1,"XERCES_CPP_NAMESPACE::DOMNode *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::appendChild",2,"XERCES_CPP_NAMESPACE::DOMNode *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_appendChild",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_appendChild",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->appendChild(arg2); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_hasChildNodes(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + bool result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::hasChildNodes",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::hasChildNodes",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_hasChildNodes",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->hasChildNodes(); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_setNodeValue(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::setNodeValue",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::setNodeValue",1,"XERCES_CPP_NAMESPACE::DOMNode *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_setNodeValue",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + arg2 = Lua2XMLString(2); + + (arg1)->setNodeValue((XMLCh const *)arg2); + + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_normalize(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::normalize",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::normalize",1,"XERCES_CPP_NAMESPACE::DOMNode *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_normalize",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + (arg1)->normalize(); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_isSupported(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + bool result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::isSupported",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::isSupported",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_isSupported",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + arg2 = Lua2XMLString(2); + + + arg3 = Lua2XMLString(3); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isSupported((XMLCh const *)arg2,(XMLCh const *)arg3); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + + delete[] arg2; + + + delete[] arg3; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + + delete[] arg3; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getNamespaceURI(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getNamespaceURI",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getNamespaceURI",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getNamespaceURI",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getNamespaceURI(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getLocalName(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getLocalName",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getLocalName",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getLocalName",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getLocalName(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_setPrefix(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::setPrefix",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::setPrefix",1,"XERCES_CPP_NAMESPACE::DOMNode *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_setPrefix",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + arg2 = Lua2XMLString(2); + + (arg1)->setPrefix((XMLCh const *)arg2); + + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_hasAttributes(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + bool result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::hasAttributes",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::hasAttributes",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_hasAttributes",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->hasAttributes(); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_isSameNode(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + bool result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::isSameNode",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::isSameNode",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::isSameNode",2,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_isSameNode",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_isSameNode",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isSameNode((XERCES_CPP_NAMESPACE::DOMNode const *)arg2); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_isEqualNode(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + bool result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::isEqualNode",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::isEqualNode",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::isEqualNode",2,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_isEqualNode",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_isEqualNode",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isEqualNode((XERCES_CPP_NAMESPACE::DOMNode const *)arg2); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_setUserData(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *arg3 = (void *) 0 ; + XERCES_CPP_NAMESPACE::DOMUserDataHandler *arg4 = (XERCES_CPP_NAMESPACE::DOMUserDataHandler *) 0 ; + void *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::setUserData",4,4) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::setUserData",1,"XERCES_CPP_NAMESPACE::DOMNode *"); + if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::setUserData",3,"void *"); + if(!SWIG_isptrtype(L,4)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::setUserData",4,"XERCES_CPP_NAMESPACE::DOMUserDataHandler *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_setUserData",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + arg2 = Lua2XMLString(2); + + arg3=(void *)SWIG_MustGetPtr(L,3,0,0,3,"DOMNode_setUserData"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,4,(void**)&arg4,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMUserDataHandler,0))){ + SWIG_fail_ptr("DOMNode_setUserData",4,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMUserDataHandler); + } + + result = (void *)(arg1)->setUserData((XMLCh const *)arg2,arg3,arg4); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getUserData(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + void *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getUserData",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getUserData",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getUserData",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + arg2 = Lua2XMLString(2); + + result = (void *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getUserData((XMLCh const *)arg2); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getBaseURI(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getBaseURI",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getBaseURI",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getBaseURI",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getBaseURI(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_compareDocumentPosition(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + short result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::compareDocumentPosition",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::compareDocumentPosition",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::compareDocumentPosition",2,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_compareDocumentPosition",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_compareDocumentPosition",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (short)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->compareDocumentPosition((XERCES_CPP_NAMESPACE::DOMNode const *)arg2); + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getTextContent(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getTextContent",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getTextContent",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getTextContent",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getTextContent(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_setTextContent(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::setTextContent",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::setTextContent",1,"XERCES_CPP_NAMESPACE::DOMNode *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_setTextContent",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + arg2 = Lua2XMLString(2); + + (arg1)->setTextContent((XMLCh const *)arg2); + + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_lookupPrefix(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::lookupPrefix",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::lookupPrefix",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_lookupPrefix",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + arg2 = Lua2XMLString(2); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->lookupPrefix((XMLCh const *)arg2); + + result = XMLString2Lua(result); + + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_isDefaultNamespace(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + bool result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::isDefaultNamespace",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::isDefaultNamespace",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_isDefaultNamespace",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + arg2 = Lua2XMLString(2); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->isDefaultNamespace((XMLCh const *)arg2); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_lookupNamespaceURI(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::lookupNamespaceURI",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::lookupNamespaceURI",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_lookupNamespaceURI",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + arg2 = Lua2XMLString(2); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->lookupNamespaceURI((XMLCh const *)arg2); + + result = XMLString2Lua(result); + + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_getFeature(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + void *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::getFeature",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::getFeature",1,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_getFeature",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + arg2 = Lua2XMLString(2); + + + arg3 = Lua2XMLString(3); + + result = (void *)((XERCES_CPP_NAMESPACE::DOMNode const *)arg1)->getFeature((XMLCh const *)arg2,(XMLCh const *)arg3); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; + + delete[] arg2; + + + delete[] arg3; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + + delete[] arg3; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode_release(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::release",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::release",1,"XERCES_CPP_NAMESPACE::DOMNode *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode_release",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + (arg1)->release(); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNode___eq(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + bool result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNode::operator ==",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::operator ==",1,"XERCES_CPP_NAMESPACE::DOMNode *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNode::operator ==",2,"XERCES_CPP_NAMESPACE::DOMNode const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode___eq",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNode___eq",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (bool)XERCES_CPP_NAMESPACE_DOMNode_operator_Se__Se_(arg1,(XERCES_CPP_NAMESPACE::DOMNode const *)arg2); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_DOMNode(void *obj) { +XERCES_CPP_NAMESPACE::DOMNode *arg1 = (XERCES_CPP_NAMESPACE::DOMNode *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMNode_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMNode_methods[]= { + { "getNodeName", _wrap_DOMNode_getNodeName}, + { "getNodeValue", _wrap_DOMNode_getNodeValue}, + { "getNodeType", _wrap_DOMNode_getNodeType}, + { "getParentNode", _wrap_DOMNode_getParentNode}, + { "getChildNodes", _wrap_DOMNode_getChildNodes}, + { "getFirstChild", _wrap_DOMNode_getFirstChild}, + { "getLastChild", _wrap_DOMNode_getLastChild}, + { "getPreviousSibling", _wrap_DOMNode_getPreviousSibling}, + { "getNextSibling", _wrap_DOMNode_getNextSibling}, + { "getAttributes", _wrap_DOMNode_getAttributes}, + { "getOwnerDocument", _wrap_DOMNode_getOwnerDocument}, + { "cloneNode", _wrap_DOMNode_cloneNode}, + { "insertBefore", _wrap_DOMNode_insertBefore}, + { "replaceChild", _wrap_DOMNode_replaceChild}, + { "removeChild", _wrap_DOMNode_removeChild}, + { "appendChild", _wrap_DOMNode_appendChild}, + { "hasChildNodes", _wrap_DOMNode_hasChildNodes}, + { "setNodeValue", _wrap_DOMNode_setNodeValue}, + { "normalize", _wrap_DOMNode_normalize}, + { "isSupported", _wrap_DOMNode_isSupported}, + { "getNamespaceURI", _wrap_DOMNode_getNamespaceURI}, + { "getLocalName", _wrap_DOMNode_getLocalName}, + { "setPrefix", _wrap_DOMNode_setPrefix}, + { "hasAttributes", _wrap_DOMNode_hasAttributes}, + { "isSameNode", _wrap_DOMNode_isSameNode}, + { "isEqualNode", _wrap_DOMNode_isEqualNode}, + { "setUserData", _wrap_DOMNode_setUserData}, + { "getUserData", _wrap_DOMNode_getUserData}, + { "getBaseURI", _wrap_DOMNode_getBaseURI}, + { "compareDocumentPosition", _wrap_DOMNode_compareDocumentPosition}, + { "getTextContent", _wrap_DOMNode_getTextContent}, + { "setTextContent", _wrap_DOMNode_setTextContent}, + { "lookupPrefix", _wrap_DOMNode_lookupPrefix}, + { "isDefaultNamespace", _wrap_DOMNode_isDefaultNamespace}, + { "lookupNamespaceURI", _wrap_DOMNode_lookupNamespaceURI}, + { "getFeature", _wrap_DOMNode_getFeature}, + { "release", _wrap_DOMNode_release}, + { "__eq", _wrap_DOMNode___eq}, + {0,0} +}; +static swig_lua_method swig_DOMNode_meta[] = { + { "__eq", _wrap_DOMNode___eq}, + {0,0} +}; + +static swig_lua_attribute swig_DOMNode_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMNode_Sf_SwigStatic_constants[]= { + {SWIG_LUA_CONSTTAB_INT("ELEMENT_NODE", XERCES_CPP_NAMESPACE::DOMNode::ELEMENT_NODE)}, + {SWIG_LUA_CONSTTAB_INT("ATTRIBUTE_NODE", XERCES_CPP_NAMESPACE::DOMNode::ATTRIBUTE_NODE)}, + {SWIG_LUA_CONSTTAB_INT("TEXT_NODE", XERCES_CPP_NAMESPACE::DOMNode::TEXT_NODE)}, + {SWIG_LUA_CONSTTAB_INT("CDATA_SECTION_NODE", XERCES_CPP_NAMESPACE::DOMNode::CDATA_SECTION_NODE)}, + {SWIG_LUA_CONSTTAB_INT("ENTITY_REFERENCE_NODE", XERCES_CPP_NAMESPACE::DOMNode::ENTITY_REFERENCE_NODE)}, + {SWIG_LUA_CONSTTAB_INT("ENTITY_NODE", XERCES_CPP_NAMESPACE::DOMNode::ENTITY_NODE)}, + {SWIG_LUA_CONSTTAB_INT("PROCESSING_INSTRUCTION_NODE", XERCES_CPP_NAMESPACE::DOMNode::PROCESSING_INSTRUCTION_NODE)}, + {SWIG_LUA_CONSTTAB_INT("COMMENT_NODE", XERCES_CPP_NAMESPACE::DOMNode::COMMENT_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOCUMENT_NODE", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOCUMENT_TYPE_NODE", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_TYPE_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOCUMENT_FRAGMENT_NODE", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_FRAGMENT_NODE)}, + {SWIG_LUA_CONSTTAB_INT("NOTATION_NODE", XERCES_CPP_NAMESPACE::DOMNode::NOTATION_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOCUMENT_POSITION_DISCONNECTED", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_DISCONNECTED)}, + {SWIG_LUA_CONSTTAB_INT("DOCUMENT_POSITION_PRECEDING", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_PRECEDING)}, + {SWIG_LUA_CONSTTAB_INT("DOCUMENT_POSITION_FOLLOWING", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_FOLLOWING)}, + {SWIG_LUA_CONSTTAB_INT("DOCUMENT_POSITION_CONTAINS", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_CONTAINS)}, + {SWIG_LUA_CONSTTAB_INT("DOCUMENT_POSITION_CONTAINED_BY", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_CONTAINED_BY)}, + {SWIG_LUA_CONSTTAB_INT("DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)}, + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMNode_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMNode_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMNode_Sf_SwigStatic = { + "DOMNode", + swig_DOMNode_Sf_SwigStatic_methods, + swig_DOMNode_Sf_SwigStatic_attributes, + swig_DOMNode_Sf_SwigStatic_constants, + swig_DOMNode_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMNode_bases[] = {0}; +static const char *swig_DOMNode_base_names[] = {0}; +static swig_lua_class _wrap_class_DOMNode = { "DOMNode", "DOMNode", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0, swig_delete_DOMNode, swig_DOMNode_methods, swig_DOMNode_attributes, &swig_DOMNode_Sf_SwigStatic, swig_DOMNode_meta, swig_DOMNode_bases, swig_DOMNode_base_names }; + +static int _wrap_DOMAttr_getName(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMAttr::getName",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMAttr::getName",1,"XERCES_CPP_NAMESPACE::DOMAttr const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0))){ + SWIG_fail_ptr("DOMAttr_getName",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getName(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMAttr_getSpecified(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + bool result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMAttr::getSpecified",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMAttr::getSpecified",1,"XERCES_CPP_NAMESPACE::DOMAttr const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0))){ + SWIG_fail_ptr("DOMAttr_getSpecified",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr); + } + + result = (bool)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getSpecified(); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMAttr_getValue(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMAttr::getValue",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMAttr::getValue",1,"XERCES_CPP_NAMESPACE::DOMAttr const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0))){ + SWIG_fail_ptr("DOMAttr_getValue",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getValue(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMAttr_setValue(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMAttr::setValue",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMAttr::setValue",1,"XERCES_CPP_NAMESPACE::DOMAttr *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0))){ + SWIG_fail_ptr("DOMAttr_setValue",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr); + } + + + arg2 = Lua2XMLString(2); + + (arg1)->setValue((XMLCh const *)arg2); + + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMAttr_getOwnerElement(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMAttr::getOwnerElement",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMAttr::getOwnerElement",1,"XERCES_CPP_NAMESPACE::DOMAttr const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0))){ + SWIG_fail_ptr("DOMAttr_getOwnerElement",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr); + } + + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getOwnerElement(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMAttr_isId(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + bool result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMAttr::isId",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMAttr::isId",1,"XERCES_CPP_NAMESPACE::DOMAttr const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0))){ + SWIG_fail_ptr("DOMAttr_isId",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr); + } + + result = (bool)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->isId(); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMAttr_getSchemaTypeInfo(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + XERCES_CPP_NAMESPACE::DOMTypeInfo *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMAttr::getSchemaTypeInfo",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMAttr::getSchemaTypeInfo",1,"XERCES_CPP_NAMESPACE::DOMAttr const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0))){ + SWIG_fail_ptr("DOMAttr_getSchemaTypeInfo",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr); + } + + result = (XERCES_CPP_NAMESPACE::DOMTypeInfo *)((XERCES_CPP_NAMESPACE::DOMAttr const *)arg1)->getSchemaTypeInfo(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMTypeInfo,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_DOMAttr(void *obj) { +XERCES_CPP_NAMESPACE::DOMAttr *arg1 = (XERCES_CPP_NAMESPACE::DOMAttr *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMAttr_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMAttr_methods[]= { + { "getName", _wrap_DOMAttr_getName}, + { "getSpecified", _wrap_DOMAttr_getSpecified}, + { "getValue", _wrap_DOMAttr_getValue}, + { "setValue", _wrap_DOMAttr_setValue}, + { "getOwnerElement", _wrap_DOMAttr_getOwnerElement}, + { "isId", _wrap_DOMAttr_isId}, + { "getSchemaTypeInfo", _wrap_DOMAttr_getSchemaTypeInfo}, + {0,0} +}; +static swig_lua_method swig_DOMAttr_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMAttr_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMAttr_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMAttr_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMAttr_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMAttr_Sf_SwigStatic = { + "DOMAttr", + swig_DOMAttr_Sf_SwigStatic_methods, + swig_DOMAttr_Sf_SwigStatic_attributes, + swig_DOMAttr_Sf_SwigStatic_constants, + swig_DOMAttr_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMAttr_bases[] = {0,0}; +static const char *swig_DOMAttr_base_names[] = {"XERCES_CPP_NAMESPACE::DOMNode *",0}; +static swig_lua_class _wrap_class_DOMAttr = { "DOMAttr", "DOMAttr", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0, swig_delete_DOMAttr, swig_DOMAttr_methods, swig_DOMAttr_attributes, &swig_DOMAttr_Sf_SwigStatic, swig_DOMAttr_meta, swig_DOMAttr_bases, swig_DOMAttr_base_names }; + +static int _wrap_DOMElement_getTagName(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::getTagName",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::getTagName",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_getTagName",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getTagName(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_getAttribute(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::getAttribute",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::getAttribute",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_getAttribute",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttribute((XMLCh const *)arg2); + + result = XMLString2Lua(result); + + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_getAttributeNode(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::getAttributeNode",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::getAttributeNode",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_getAttributeNode",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + result = (XERCES_CPP_NAMESPACE::DOMAttr *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttributeNode((XMLCh const *)arg2); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0); SWIG_arg++; + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_getElementsByTagName(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XERCES_CPP_NAMESPACE::DOMNodeList *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::getElementsByTagName",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::getElementsByTagName",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_getElementsByTagName",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + result = (XERCES_CPP_NAMESPACE::DOMNodeList *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getElementsByTagName((XMLCh const *)arg2); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList,0); SWIG_arg++; + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_setAttribute(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::setAttribute",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::setAttribute",1,"XERCES_CPP_NAMESPACE::DOMElement *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_setAttribute",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + + arg3 = Lua2XMLString(3); + + (arg1)->setAttribute((XMLCh const *)arg2,(XMLCh const *)arg3); + + + delete[] arg2; + + + delete[] arg3; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + + delete[] arg3; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_setAttributeNode(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::setAttributeNode",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::setAttributeNode",1,"XERCES_CPP_NAMESPACE::DOMElement *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::setAttributeNode",2,"XERCES_CPP_NAMESPACE::DOMAttr *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_setAttributeNode",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0))){ + SWIG_fail_ptr("DOMElement_setAttributeNode",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr); + } + + result = (XERCES_CPP_NAMESPACE::DOMAttr *)(arg1)->setAttributeNode(arg2); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_removeAttributeNode(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::removeAttributeNode",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::removeAttributeNode",1,"XERCES_CPP_NAMESPACE::DOMElement *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::removeAttributeNode",2,"XERCES_CPP_NAMESPACE::DOMAttr *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_removeAttributeNode",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0))){ + SWIG_fail_ptr("DOMElement_removeAttributeNode",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr); + } + + result = (XERCES_CPP_NAMESPACE::DOMAttr *)(arg1)->removeAttributeNode(arg2); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_removeAttribute(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::removeAttribute",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::removeAttribute",1,"XERCES_CPP_NAMESPACE::DOMElement *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_removeAttribute",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + (arg1)->removeAttribute((XMLCh const *)arg2); + + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_getAttributeNS(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::getAttributeNS",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::getAttributeNS",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_getAttributeNS",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + + arg3 = Lua2XMLString(3); + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + + result = XMLString2Lua(result); + + + delete[] arg2; + + + delete[] arg3; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + + delete[] arg3; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_setAttributeNS(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + XMLCh *arg4 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::setAttributeNS",4,4) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::setAttributeNS",1,"XERCES_CPP_NAMESPACE::DOMElement *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_setAttributeNS",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + + arg3 = Lua2XMLString(3); + + + arg4 = Lua2XMLString(4); + + (arg1)->setAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3,(XMLCh const *)arg4); + + + delete[] arg2; + + + delete[] arg3; + + + delete[] arg4; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + + delete[] arg3; + + + delete[] arg4; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_removeAttributeNS(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::removeAttributeNS",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::removeAttributeNS",1,"XERCES_CPP_NAMESPACE::DOMElement *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_removeAttributeNS",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + + arg3 = Lua2XMLString(3); + + (arg1)->removeAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + + + delete[] arg2; + + + delete[] arg3; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + + delete[] arg3; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_getAttributeNodeNS(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::getAttributeNodeNS",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::getAttributeNodeNS",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_getAttributeNodeNS",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + + arg3 = Lua2XMLString(3); + + result = (XERCES_CPP_NAMESPACE::DOMAttr *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getAttributeNodeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0); SWIG_arg++; + + delete[] arg2; + + + delete[] arg3; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + + delete[] arg3; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_setAttributeNodeNS(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::setAttributeNodeNS",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::setAttributeNodeNS",1,"XERCES_CPP_NAMESPACE::DOMElement *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::setAttributeNodeNS",2,"XERCES_CPP_NAMESPACE::DOMAttr *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_setAttributeNodeNS",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0))){ + SWIG_fail_ptr("DOMElement_setAttributeNodeNS",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr); + } + + result = (XERCES_CPP_NAMESPACE::DOMAttr *)(arg1)->setAttributeNodeNS(arg2); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_getElementsByTagNameNS(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + XERCES_CPP_NAMESPACE::DOMNodeList *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::getElementsByTagNameNS",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::getElementsByTagNameNS",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_getElementsByTagNameNS",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + + arg3 = Lua2XMLString(3); + + result = (XERCES_CPP_NAMESPACE::DOMNodeList *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getElementsByTagNameNS((XMLCh const *)arg2,(XMLCh const *)arg3); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList,0); SWIG_arg++; + + delete[] arg2; + + + delete[] arg3; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + + delete[] arg3; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_hasAttribute(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + bool result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::hasAttribute",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::hasAttribute",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_hasAttribute",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->hasAttribute((XMLCh const *)arg2); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_hasAttributeNS(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + bool result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::hasAttributeNS",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::hasAttributeNS",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_hasAttributeNS",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + + arg3 = Lua2XMLString(3); + + result = (bool)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->hasAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + + delete[] arg2; + + + delete[] arg3; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + + delete[] arg3; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_setIdAttribute(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + bool arg3 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::setIdAttribute",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::setIdAttribute",1,"XERCES_CPP_NAMESPACE::DOMElement *"); + if(!lua_isboolean(L,3)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::setIdAttribute",3,"bool"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_setIdAttribute",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + arg3 = (lua_toboolean(L, 3)!=0); + (arg1)->setIdAttribute((XMLCh const *)arg2,arg3); + + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_setIdAttributeNS(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + bool arg4 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::setIdAttributeNS",4,4) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::setIdAttributeNS",1,"XERCES_CPP_NAMESPACE::DOMElement *"); + if(!lua_isboolean(L,4)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::setIdAttributeNS",4,"bool"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_setIdAttributeNS",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + arg2 = Lua2XMLString(2); + + + arg3 = Lua2XMLString(3); + + arg4 = (lua_toboolean(L, 4)!=0); + (arg1)->setIdAttributeNS((XMLCh const *)arg2,(XMLCh const *)arg3,arg4); + + + delete[] arg2; + + + delete[] arg3; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + + delete[] arg3; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_setIdAttributeNode(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMAttr *arg2 = (XERCES_CPP_NAMESPACE::DOMAttr *) 0 ; + bool arg3 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::setIdAttributeNode",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::setIdAttributeNode",1,"XERCES_CPP_NAMESPACE::DOMElement *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::setIdAttributeNode",2,"XERCES_CPP_NAMESPACE::DOMAttr const *"); + if(!lua_isboolean(L,3)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::setIdAttributeNode",3,"bool"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_setIdAttributeNode",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr,0))){ + SWIG_fail_ptr("DOMElement_setIdAttributeNode",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMAttr); + } + + arg3 = (lua_toboolean(L, 3)!=0); + (arg1)->setIdAttributeNode((XERCES_CPP_NAMESPACE::DOMAttr const *)arg2,arg3); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_getSchemaTypeInfo(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMTypeInfo *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::getSchemaTypeInfo",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::getSchemaTypeInfo",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_getSchemaTypeInfo",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + result = (XERCES_CPP_NAMESPACE::DOMTypeInfo *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getSchemaTypeInfo(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMTypeInfo,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_getFirstElementChild(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::getFirstElementChild",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::getFirstElementChild",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_getFirstElementChild",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getFirstElementChild(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_getLastElementChild(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::getLastElementChild",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::getLastElementChild",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_getLastElementChild",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getLastElementChild(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_getPreviousElementSibling(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::getPreviousElementSibling",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::getPreviousElementSibling",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_getPreviousElementSibling",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getPreviousElementSibling(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_getNextElementSibling(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XERCES_CPP_NAMESPACE::DOMElement *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::getNextElementSibling",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::getNextElementSibling",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_getNextElementSibling",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + result = (XERCES_CPP_NAMESPACE::DOMElement *)((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getNextElementSibling(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMElement_getChildElementCount(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) 0 ; + XMLSize_t result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMElement::getChildElementCount",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMElement::getChildElementCount",1,"XERCES_CPP_NAMESPACE::DOMElement const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0))){ + SWIG_fail_ptr("DOMElement_getChildElementCount",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement); + } + + result = ((XERCES_CPP_NAMESPACE::DOMElement const *)arg1)->getChildElementCount(); + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_DOMElement(void *obj) { +XERCES_CPP_NAMESPACE::DOMElement *arg1 = (XERCES_CPP_NAMESPACE::DOMElement *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMElement_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMElement_methods[]= { + { "getTagName", _wrap_DOMElement_getTagName}, + { "getAttribute", _wrap_DOMElement_getAttribute}, + { "getAttributeNode", _wrap_DOMElement_getAttributeNode}, + { "getElementsByTagName", _wrap_DOMElement_getElementsByTagName}, + { "setAttribute", _wrap_DOMElement_setAttribute}, + { "setAttributeNode", _wrap_DOMElement_setAttributeNode}, + { "removeAttributeNode", _wrap_DOMElement_removeAttributeNode}, + { "removeAttribute", _wrap_DOMElement_removeAttribute}, + { "getAttributeNS", _wrap_DOMElement_getAttributeNS}, + { "setAttributeNS", _wrap_DOMElement_setAttributeNS}, + { "removeAttributeNS", _wrap_DOMElement_removeAttributeNS}, + { "getAttributeNodeNS", _wrap_DOMElement_getAttributeNodeNS}, + { "setAttributeNodeNS", _wrap_DOMElement_setAttributeNodeNS}, + { "getElementsByTagNameNS", _wrap_DOMElement_getElementsByTagNameNS}, + { "hasAttribute", _wrap_DOMElement_hasAttribute}, + { "hasAttributeNS", _wrap_DOMElement_hasAttributeNS}, + { "setIdAttribute", _wrap_DOMElement_setIdAttribute}, + { "setIdAttributeNS", _wrap_DOMElement_setIdAttributeNS}, + { "setIdAttributeNode", _wrap_DOMElement_setIdAttributeNode}, + { "getSchemaTypeInfo", _wrap_DOMElement_getSchemaTypeInfo}, + { "getFirstElementChild", _wrap_DOMElement_getFirstElementChild}, + { "getLastElementChild", _wrap_DOMElement_getLastElementChild}, + { "getPreviousElementSibling", _wrap_DOMElement_getPreviousElementSibling}, + { "getNextElementSibling", _wrap_DOMElement_getNextElementSibling}, + { "getChildElementCount", _wrap_DOMElement_getChildElementCount}, + {0,0} +}; +static swig_lua_method swig_DOMElement_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMElement_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMElement_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMElement_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMElement_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMElement_Sf_SwigStatic = { + "DOMElement", + swig_DOMElement_Sf_SwigStatic_methods, + swig_DOMElement_Sf_SwigStatic_attributes, + swig_DOMElement_Sf_SwigStatic_constants, + swig_DOMElement_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMElement_bases[] = {0,0}; +static const char *swig_DOMElement_base_names[] = {"XERCES_CPP_NAMESPACE::DOMNode *",0}; +static swig_lua_class _wrap_class_DOMElement = { "DOMElement", "DOMElement", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMElement,0, swig_delete_DOMElement, swig_DOMElement_methods, swig_DOMElement_attributes, &swig_DOMElement_Sf_SwigStatic, swig_DOMElement_meta, swig_DOMElement_bases, swig_DOMElement_base_names }; + +static int _wrap_DOMEntity_getPublicId(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMEntity::getPublicId",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMEntity::getPublicId",1,"XERCES_CPP_NAMESPACE::DOMEntity const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity,0))){ + SWIG_fail_ptr("DOMEntity_getPublicId",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getPublicId(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMEntity_getSystemId(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMEntity::getSystemId",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMEntity::getSystemId",1,"XERCES_CPP_NAMESPACE::DOMEntity const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity,0))){ + SWIG_fail_ptr("DOMEntity_getSystemId",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getSystemId(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMEntity_getNotationName(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMEntity::getNotationName",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMEntity::getNotationName",1,"XERCES_CPP_NAMESPACE::DOMEntity const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity,0))){ + SWIG_fail_ptr("DOMEntity_getNotationName",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getNotationName(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMEntity_getInputEncoding(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMEntity::getInputEncoding",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMEntity::getInputEncoding",1,"XERCES_CPP_NAMESPACE::DOMEntity const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity,0))){ + SWIG_fail_ptr("DOMEntity_getInputEncoding",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getInputEncoding(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMEntity_getXmlEncoding(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMEntity::getXmlEncoding",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMEntity::getXmlEncoding",1,"XERCES_CPP_NAMESPACE::DOMEntity const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity,0))){ + SWIG_fail_ptr("DOMEntity_getXmlEncoding",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getXmlEncoding(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMEntity_getXmlVersion(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMEntity::getXmlVersion",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMEntity::getXmlVersion",1,"XERCES_CPP_NAMESPACE::DOMEntity const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity,0))){ + SWIG_fail_ptr("DOMEntity_getXmlVersion",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMEntity const *)arg1)->getXmlVersion(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_DOMEntity(void *obj) { +XERCES_CPP_NAMESPACE::DOMEntity *arg1 = (XERCES_CPP_NAMESPACE::DOMEntity *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMEntity_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMEntity_methods[]= { + { "getPublicId", _wrap_DOMEntity_getPublicId}, + { "getSystemId", _wrap_DOMEntity_getSystemId}, + { "getNotationName", _wrap_DOMEntity_getNotationName}, + { "getInputEncoding", _wrap_DOMEntity_getInputEncoding}, + { "getXmlEncoding", _wrap_DOMEntity_getXmlEncoding}, + { "getXmlVersion", _wrap_DOMEntity_getXmlVersion}, + {0,0} +}; +static swig_lua_method swig_DOMEntity_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMEntity_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMEntity_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMEntity_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMEntity_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMEntity_Sf_SwigStatic = { + "DOMEntity", + swig_DOMEntity_Sf_SwigStatic_methods, + swig_DOMEntity_Sf_SwigStatic_attributes, + swig_DOMEntity_Sf_SwigStatic_constants, + swig_DOMEntity_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMEntity_bases[] = {0,0}; +static const char *swig_DOMEntity_base_names[] = {"XERCES_CPP_NAMESPACE::DOMNode *",0}; +static swig_lua_class _wrap_class_DOMEntity = { "DOMEntity", "DOMEntity", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntity,0, swig_delete_DOMEntity, swig_DOMEntity_methods, swig_DOMEntity_attributes, &swig_DOMEntity_Sf_SwigStatic, swig_DOMEntity_meta, swig_DOMEntity_bases, swig_DOMEntity_base_names }; + +static int _wrap_DOMDocumentType_getName(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMDocumentType::getName",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMDocumentType::getName",1,"XERCES_CPP_NAMESPACE::DOMDocumentType const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType,0))){ + SWIG_fail_ptr("DOMDocumentType_getName",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getName(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMDocumentType_getEntities(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMDocumentType::getEntities",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMDocumentType::getEntities",1,"XERCES_CPP_NAMESPACE::DOMDocumentType const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType,0))){ + SWIG_fail_ptr("DOMDocumentType_getEntities",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType); + } + + result = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getEntities(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMDocumentType_getNotations(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMDocumentType::getNotations",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMDocumentType::getNotations",1,"XERCES_CPP_NAMESPACE::DOMDocumentType const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType,0))){ + SWIG_fail_ptr("DOMDocumentType_getNotations",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType); + } + + result = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getNotations(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMDocumentType_getPublicId(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMDocumentType::getPublicId",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMDocumentType::getPublicId",1,"XERCES_CPP_NAMESPACE::DOMDocumentType const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType,0))){ + SWIG_fail_ptr("DOMDocumentType_getPublicId",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getPublicId(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMDocumentType_getSystemId(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMDocumentType::getSystemId",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMDocumentType::getSystemId",1,"XERCES_CPP_NAMESPACE::DOMDocumentType const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType,0))){ + SWIG_fail_ptr("DOMDocumentType_getSystemId",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getSystemId(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMDocumentType_getInternalSubset(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMDocumentType::getInternalSubset",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMDocumentType::getInternalSubset",1,"XERCES_CPP_NAMESPACE::DOMDocumentType const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType,0))){ + SWIG_fail_ptr("DOMDocumentType_getInternalSubset",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMDocumentType const *)arg1)->getInternalSubset(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_DOMDocumentType(void *obj) { +XERCES_CPP_NAMESPACE::DOMDocumentType *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentType *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMDocumentType_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMDocumentType_methods[]= { + { "getName", _wrap_DOMDocumentType_getName}, + { "getEntities", _wrap_DOMDocumentType_getEntities}, + { "getNotations", _wrap_DOMDocumentType_getNotations}, + { "getPublicId", _wrap_DOMDocumentType_getPublicId}, + { "getSystemId", _wrap_DOMDocumentType_getSystemId}, + { "getInternalSubset", _wrap_DOMDocumentType_getInternalSubset}, + {0,0} +}; +static swig_lua_method swig_DOMDocumentType_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMDocumentType_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMDocumentType_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMDocumentType_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMDocumentType_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMDocumentType_Sf_SwigStatic = { + "DOMDocumentType", + swig_DOMDocumentType_Sf_SwigStatic_methods, + swig_DOMDocumentType_Sf_SwigStatic_attributes, + swig_DOMDocumentType_Sf_SwigStatic_constants, + swig_DOMDocumentType_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMDocumentType_bases[] = {0,0}; +static const char *swig_DOMDocumentType_base_names[] = {"XERCES_CPP_NAMESPACE::DOMNode *",0}; +static swig_lua_class _wrap_class_DOMDocumentType = { "DOMDocumentType", "DOMDocumentType", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentType,0, swig_delete_DOMDocumentType, swig_DOMDocumentType_methods, swig_DOMDocumentType_attributes, &swig_DOMDocumentType_Sf_SwigStatic, swig_DOMDocumentType_meta, swig_DOMDocumentType_bases, swig_DOMDocumentType_base_names }; + +static int _wrap_DOMCharacterData_getData(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMCharacterData::getData",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::getData",1,"XERCES_CPP_NAMESPACE::DOMCharacterData const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData,0))){ + SWIG_fail_ptr("DOMCharacterData_getData",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMCharacterData const *)arg1)->getData(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMCharacterData_getLength(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMCharacterData::getLength",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::getLength",1,"XERCES_CPP_NAMESPACE::DOMCharacterData const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData,0))){ + SWIG_fail_ptr("DOMCharacterData_getLength",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData); + } + + result = ((XERCES_CPP_NAMESPACE::DOMCharacterData const *)arg1)->getLength(); + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMCharacterData_substringData(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLSize_t arg3 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMCharacterData::substringData",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::substringData",1,"XERCES_CPP_NAMESPACE::DOMCharacterData const *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::substringData",2,"XMLSize_t"); + if(!lua_isnumber(L,3)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::substringData",3,"XMLSize_t"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData,0))){ + SWIG_fail_ptr("DOMCharacterData_substringData",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData); + } + + SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative") + arg2 = (XMLSize_t)lua_tonumber(L, 2); + SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative") + arg3 = (XMLSize_t)lua_tonumber(L, 3); + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMCharacterData const *)arg1)->substringData(arg2,arg3); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMCharacterData_appendData(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMCharacterData::appendData",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::appendData",1,"XERCES_CPP_NAMESPACE::DOMCharacterData *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData,0))){ + SWIG_fail_ptr("DOMCharacterData_appendData",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData); + } + + + arg2 = Lua2XMLString(2); + + (arg1)->appendData((XMLCh const *)arg2); + + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMCharacterData_insertData(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLCh *arg3 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMCharacterData::insertData",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::insertData",1,"XERCES_CPP_NAMESPACE::DOMCharacterData *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::insertData",2,"XMLSize_t"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData,0))){ + SWIG_fail_ptr("DOMCharacterData_insertData",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData); + } + + SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative") + arg2 = (XMLSize_t)lua_tonumber(L, 2); + + arg3 = Lua2XMLString(3); + + (arg1)->insertData(arg2,(XMLCh const *)arg3); + + + delete[] arg3; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg3; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMCharacterData_deleteData(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLSize_t arg3 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMCharacterData::deleteData",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::deleteData",1,"XERCES_CPP_NAMESPACE::DOMCharacterData *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::deleteData",2,"XMLSize_t"); + if(!lua_isnumber(L,3)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::deleteData",3,"XMLSize_t"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData,0))){ + SWIG_fail_ptr("DOMCharacterData_deleteData",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData); + } + + SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative") + arg2 = (XMLSize_t)lua_tonumber(L, 2); + SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative") + arg3 = (XMLSize_t)lua_tonumber(L, 3); + (arg1)->deleteData(arg2,arg3); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMCharacterData_replaceData(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLSize_t arg2 ; + XMLSize_t arg3 ; + XMLCh *arg4 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMCharacterData::replaceData",4,4) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::replaceData",1,"XERCES_CPP_NAMESPACE::DOMCharacterData *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::replaceData",2,"XMLSize_t"); + if(!lua_isnumber(L,3)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::replaceData",3,"XMLSize_t"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData,0))){ + SWIG_fail_ptr("DOMCharacterData_replaceData",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData); + } + + SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative") + arg2 = (XMLSize_t)lua_tonumber(L, 2); + SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative") + arg3 = (XMLSize_t)lua_tonumber(L, 3); + + arg4 = Lua2XMLString(4); + + (arg1)->replaceData(arg2,arg3,(XMLCh const *)arg4); + + + delete[] arg4; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg4; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMCharacterData_setData(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMCharacterData::setData",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMCharacterData::setData",1,"XERCES_CPP_NAMESPACE::DOMCharacterData *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData,0))){ + SWIG_fail_ptr("DOMCharacterData_setData",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData); + } + + + arg2 = Lua2XMLString(2); + + (arg1)->setData((XMLCh const *)arg2); + + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_DOMCharacterData(void *obj) { +XERCES_CPP_NAMESPACE::DOMCharacterData *arg1 = (XERCES_CPP_NAMESPACE::DOMCharacterData *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMCharacterData_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMCharacterData_methods[]= { + { "getData", _wrap_DOMCharacterData_getData}, + { "getLength", _wrap_DOMCharacterData_getLength}, + { "substringData", _wrap_DOMCharacterData_substringData}, + { "appendData", _wrap_DOMCharacterData_appendData}, + { "insertData", _wrap_DOMCharacterData_insertData}, + { "deleteData", _wrap_DOMCharacterData_deleteData}, + { "replaceData", _wrap_DOMCharacterData_replaceData}, + { "setData", _wrap_DOMCharacterData_setData}, + {0,0} +}; +static swig_lua_method swig_DOMCharacterData_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMCharacterData_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMCharacterData_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMCharacterData_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMCharacterData_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMCharacterData_Sf_SwigStatic = { + "DOMCharacterData", + swig_DOMCharacterData_Sf_SwigStatic_methods, + swig_DOMCharacterData_Sf_SwigStatic_attributes, + swig_DOMCharacterData_Sf_SwigStatic_constants, + swig_DOMCharacterData_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMCharacterData_bases[] = {0,0}; +static const char *swig_DOMCharacterData_base_names[] = {"XERCES_CPP_NAMESPACE::DOMNode *",0}; +static swig_lua_class _wrap_class_DOMCharacterData = { "DOMCharacterData", "DOMCharacterData", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCharacterData,0, swig_delete_DOMCharacterData, swig_DOMCharacterData_methods, swig_DOMCharacterData_attributes, &swig_DOMCharacterData_Sf_SwigStatic, swig_DOMCharacterData_meta, swig_DOMCharacterData_bases, swig_DOMCharacterData_base_names }; + +static void swig_delete_DOMComment(void *obj) { +XERCES_CPP_NAMESPACE::DOMComment *arg1 = (XERCES_CPP_NAMESPACE::DOMComment *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMComment_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMComment_methods[]= { + {0,0} +}; +static swig_lua_method swig_DOMComment_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMComment_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMComment_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMComment_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMComment_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMComment_Sf_SwigStatic = { + "DOMComment", + swig_DOMComment_Sf_SwigStatic_methods, + swig_DOMComment_Sf_SwigStatic_attributes, + swig_DOMComment_Sf_SwigStatic_constants, + swig_DOMComment_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMComment_bases[] = {0,0}; +static const char *swig_DOMComment_base_names[] = {"XERCES_CPP_NAMESPACE::DOMCharacterData *",0}; +static swig_lua_class _wrap_class_DOMComment = { "DOMComment", "DOMComment", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMComment,0, swig_delete_DOMComment, swig_DOMComment_methods, swig_DOMComment_attributes, &swig_DOMComment_Sf_SwigStatic, swig_DOMComment_meta, swig_DOMComment_bases, swig_DOMComment_base_names }; + +static int _wrap_DOMText_splitText(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + XMLSize_t arg2 ; + XERCES_CPP_NAMESPACE::DOMText *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMText::splitText",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMText::splitText",1,"XERCES_CPP_NAMESPACE::DOMText *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMText::splitText",2,"XMLSize_t"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText,0))){ + SWIG_fail_ptr("DOMText_splitText",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText); + } + + SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative") + arg2 = (XMLSize_t)lua_tonumber(L, 2); + result = (XERCES_CPP_NAMESPACE::DOMText *)(arg1)->splitText(arg2); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMText_getIsElementContentWhitespace(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + bool result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMText::getIsElementContentWhitespace",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMText::getIsElementContentWhitespace",1,"XERCES_CPP_NAMESPACE::DOMText const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText,0))){ + SWIG_fail_ptr("DOMText_getIsElementContentWhitespace",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText); + } + + result = (bool)((XERCES_CPP_NAMESPACE::DOMText const *)arg1)->getIsElementContentWhitespace(); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMText_getWholeText(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMText::getWholeText",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMText::getWholeText",1,"XERCES_CPP_NAMESPACE::DOMText const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText,0))){ + SWIG_fail_ptr("DOMText_getWholeText",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMText const *)arg1)->getWholeText(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMText_replaceWholeText(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XERCES_CPP_NAMESPACE::DOMText *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMText::replaceWholeText",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMText::replaceWholeText",1,"XERCES_CPP_NAMESPACE::DOMText *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText,0))){ + SWIG_fail_ptr("DOMText_replaceWholeText",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText); + } + + + arg2 = Lua2XMLString(2); + + result = (XERCES_CPP_NAMESPACE::DOMText *)(arg1)->replaceWholeText((XMLCh const *)arg2); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText,0); SWIG_arg++; + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMText_isIgnorableWhitespace(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) 0 ; + bool result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMText::isIgnorableWhitespace",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMText::isIgnorableWhitespace",1,"XERCES_CPP_NAMESPACE::DOMText const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText,0))){ + SWIG_fail_ptr("DOMText_isIgnorableWhitespace",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText); + } + + result = (bool)((XERCES_CPP_NAMESPACE::DOMText const *)arg1)->isIgnorableWhitespace(); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_DOMText(void *obj) { +XERCES_CPP_NAMESPACE::DOMText *arg1 = (XERCES_CPP_NAMESPACE::DOMText *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMText_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMText_methods[]= { + { "splitText", _wrap_DOMText_splitText}, + { "getIsElementContentWhitespace", _wrap_DOMText_getIsElementContentWhitespace}, + { "getWholeText", _wrap_DOMText_getWholeText}, + { "replaceWholeText", _wrap_DOMText_replaceWholeText}, + { "isIgnorableWhitespace", _wrap_DOMText_isIgnorableWhitespace}, + {0,0} +}; +static swig_lua_method swig_DOMText_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMText_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMText_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMText_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMText_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMText_Sf_SwigStatic = { + "DOMText", + swig_DOMText_Sf_SwigStatic_methods, + swig_DOMText_Sf_SwigStatic_attributes, + swig_DOMText_Sf_SwigStatic_constants, + swig_DOMText_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMText_bases[] = {0,0}; +static const char *swig_DOMText_base_names[] = {"XERCES_CPP_NAMESPACE::DOMCharacterData *",0}; +static swig_lua_class _wrap_class_DOMText = { "DOMText", "DOMText", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMText,0, swig_delete_DOMText, swig_DOMText_methods, swig_DOMText_attributes, &swig_DOMText_Sf_SwigStatic, swig_DOMText_meta, swig_DOMText_bases, swig_DOMText_base_names }; + +static void swig_delete_DOMCDATASection(void *obj) { +XERCES_CPP_NAMESPACE::DOMCDATASection *arg1 = (XERCES_CPP_NAMESPACE::DOMCDATASection *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMCDATASection_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMCDATASection_methods[]= { + {0,0} +}; +static swig_lua_method swig_DOMCDATASection_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMCDATASection_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMCDATASection_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMCDATASection_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMCDATASection_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMCDATASection_Sf_SwigStatic = { + "DOMCDATASection", + swig_DOMCDATASection_Sf_SwigStatic_methods, + swig_DOMCDATASection_Sf_SwigStatic_attributes, + swig_DOMCDATASection_Sf_SwigStatic_constants, + swig_DOMCDATASection_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMCDATASection_bases[] = {0,0}; +static const char *swig_DOMCDATASection_base_names[] = {"XERCES_CPP_NAMESPACE::DOMText *",0}; +static swig_lua_class _wrap_class_DOMCDATASection = { "DOMCDATASection", "DOMCDATASection", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMCDATASection,0, swig_delete_DOMCDATASection, swig_DOMCDATASection_methods, swig_DOMCDATASection_attributes, &swig_DOMCDATASection_Sf_SwigStatic, swig_DOMCDATASection_meta, swig_DOMCDATASection_bases, swig_DOMCDATASection_base_names }; + +static int _wrap_DOMNodeList_item(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNodeList *arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *) 0 ; + XMLSize_t arg2 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNodeList::item",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNodeList::item",1,"XERCES_CPP_NAMESPACE::DOMNodeList const *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNodeList::item",2,"XMLSize_t"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList,0))){ + SWIG_fail_ptr("DOMNodeList_item",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList); + } + + SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative") + arg2 = (XMLSize_t)lua_tonumber(L, 2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNodeList const *)arg1)->item(arg2); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNodeList_getLength(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNodeList *arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *) 0 ; + XMLSize_t result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNodeList::getLength",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNodeList::getLength",1,"XERCES_CPP_NAMESPACE::DOMNodeList const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList,0))){ + SWIG_fail_ptr("DOMNodeList_getLength",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList); + } + + result = ((XERCES_CPP_NAMESPACE::DOMNodeList const *)arg1)->getLength(); + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_DOMNodeList(void *obj) { +XERCES_CPP_NAMESPACE::DOMNodeList *arg1 = (XERCES_CPP_NAMESPACE::DOMNodeList *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMNodeList_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMNodeList_methods[]= { + { "item", _wrap_DOMNodeList_item}, + { "getLength", _wrap_DOMNodeList_getLength}, + {0,0} +}; +static swig_lua_method swig_DOMNodeList_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMNodeList_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMNodeList_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMNodeList_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMNodeList_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMNodeList_Sf_SwigStatic = { + "DOMNodeList", + swig_DOMNodeList_Sf_SwigStatic_methods, + swig_DOMNodeList_Sf_SwigStatic_attributes, + swig_DOMNodeList_Sf_SwigStatic_constants, + swig_DOMNodeList_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMNodeList_bases[] = {0}; +static const char *swig_DOMNodeList_base_names[] = {0}; +static swig_lua_class _wrap_class_DOMNodeList = { "DOMNodeList", "DOMNodeList", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNodeList,0, swig_delete_DOMNodeList, swig_DOMNodeList_methods, swig_DOMNodeList_attributes, &swig_DOMNodeList_Sf_SwigStatic, swig_DOMNodeList_meta, swig_DOMNodeList_bases, swig_DOMNodeList_base_names }; + +static int _wrap_DOMNamedNodeMap_setNamedItem(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::setNamedItem",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::setNamedItem",1,"XERCES_CPP_NAMESPACE::DOMNamedNodeMap *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::setNamedItem",2,"XERCES_CPP_NAMESPACE::DOMNode *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap,0))){ + SWIG_fail_ptr("DOMNamedNodeMap_setNamedItem",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNamedNodeMap_setNamedItem",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->setNamedItem(arg2); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNamedNodeMap_item(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLSize_t arg2 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::item",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::item",1,"XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::item",2,"XMLSize_t"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap,0))){ + SWIG_fail_ptr("DOMNamedNodeMap_item",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap); + } + + SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative") + arg2 = (XMLSize_t)lua_tonumber(L, 2); + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->item(arg2); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNamedNodeMap_getNamedItem(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::getNamedItem",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::getNamedItem",1,"XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap,0))){ + SWIG_fail_ptr("DOMNamedNodeMap_getNamedItem",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap); + } + + + arg2 = Lua2XMLString(2); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->getNamedItem((XMLCh const *)arg2); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNamedNodeMap_getLength(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLSize_t result; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::getLength",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::getLength",1,"XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap,0))){ + SWIG_fail_ptr("DOMNamedNodeMap_getLength",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap); + } + + result = ((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->getLength(); + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNamedNodeMap_removeNamedItem(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::removeNamedItem",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::removeNamedItem",1,"XERCES_CPP_NAMESPACE::DOMNamedNodeMap *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap,0))){ + SWIG_fail_ptr("DOMNamedNodeMap_removeNamedItem",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap); + } + + + arg2 = Lua2XMLString(2); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->removeNamedItem((XMLCh const *)arg2); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNamedNodeMap_getNamedItemNS(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::getNamedItemNS",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::getNamedItemNS",1,"XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap,0))){ + SWIG_fail_ptr("DOMNamedNodeMap_getNamedItemNS",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap); + } + + + arg2 = Lua2XMLString(2); + + + arg3 = Lua2XMLString(3); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)((XERCES_CPP_NAMESPACE::DOMNamedNodeMap const *)arg1)->getNamedItemNS((XMLCh const *)arg2,(XMLCh const *)arg3); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + + delete[] arg2; + + + delete[] arg3; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + + delete[] arg3; + + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNamedNodeMap_setNamedItemNS(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *arg2 = (XERCES_CPP_NAMESPACE::DOMNode *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::setNamedItemNS",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::setNamedItemNS",1,"XERCES_CPP_NAMESPACE::DOMNamedNodeMap *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::setNamedItemNS",2,"XERCES_CPP_NAMESPACE::DOMNode *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap,0))){ + SWIG_fail_ptr("DOMNamedNodeMap_setNamedItemNS",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode,0))){ + SWIG_fail_ptr("DOMNamedNodeMap_setNamedItemNS",2,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode); + } + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->setNamedItemNS(arg2); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNamedNodeMap_removeNamedItemNS(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + XMLCh *arg3 = (XMLCh *) 0 ; + XERCES_CPP_NAMESPACE::DOMNode *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::removeNamedItemNS",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNamedNodeMap::removeNamedItemNS",1,"XERCES_CPP_NAMESPACE::DOMNamedNodeMap *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap,0))){ + SWIG_fail_ptr("DOMNamedNodeMap_removeNamedItemNS",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap); + } + + + arg2 = Lua2XMLString(2); + + + arg3 = Lua2XMLString(3); + + result = (XERCES_CPP_NAMESPACE::DOMNode *)(arg1)->removeNamedItemNS((XMLCh const *)arg2,(XMLCh const *)arg3); + { + swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, (void **) &result); + SWIG_NewPointerObj(L,(void*)result,ty,0); SWIG_arg++; + } + + delete[] arg2; + + + delete[] arg3; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + + delete[] arg3; + + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_DOMNamedNodeMap(void *obj) { +XERCES_CPP_NAMESPACE::DOMNamedNodeMap *arg1 = (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMNamedNodeMap_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMNamedNodeMap_methods[]= { + { "setNamedItem", _wrap_DOMNamedNodeMap_setNamedItem}, + { "item", _wrap_DOMNamedNodeMap_item}, + { "getNamedItem", _wrap_DOMNamedNodeMap_getNamedItem}, + { "getLength", _wrap_DOMNamedNodeMap_getLength}, + { "removeNamedItem", _wrap_DOMNamedNodeMap_removeNamedItem}, + { "getNamedItemNS", _wrap_DOMNamedNodeMap_getNamedItemNS}, + { "setNamedItemNS", _wrap_DOMNamedNodeMap_setNamedItemNS}, + { "removeNamedItemNS", _wrap_DOMNamedNodeMap_removeNamedItemNS}, + {0,0} +}; +static swig_lua_method swig_DOMNamedNodeMap_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMNamedNodeMap_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMNamedNodeMap_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMNamedNodeMap_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMNamedNodeMap_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMNamedNodeMap_SwigStatic = { + "DOMNamedNodeMap", + swig_DOMNamedNodeMap_SwigStatic_methods, + swig_DOMNamedNodeMap_SwigStatic_attributes, + swig_DOMNamedNodeMap_SwigStatic_constants, + swig_DOMNamedNodeMap_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMNamedNodeMap_bases[] = {0}; +static const char *swig_DOMNamedNodeMap_base_names[] = {0}; +static swig_lua_class _wrap_class_DOMNamedNodeMap = { "DOMNamedNodeMap", "DOMNamedNodeMap", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap,0, swig_delete_DOMNamedNodeMap, swig_DOMNamedNodeMap_methods, swig_DOMNamedNodeMap_attributes, &swig_DOMNamedNodeMap_SwigStatic, swig_DOMNamedNodeMap_meta, swig_DOMNamedNodeMap_bases, swig_DOMNamedNodeMap_base_names }; + +static void swig_delete_DOMDocumentFragment(void *obj) { +XERCES_CPP_NAMESPACE::DOMDocumentFragment *arg1 = (XERCES_CPP_NAMESPACE::DOMDocumentFragment *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMDocumentFragment_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMDocumentFragment_methods[]= { + {0,0} +}; +static swig_lua_method swig_DOMDocumentFragment_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMDocumentFragment_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMDocumentFragment_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMDocumentFragment_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMDocumentFragment_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMDocumentFragment_Sf_SwigStatic = { + "DOMDocumentFragment", + swig_DOMDocumentFragment_Sf_SwigStatic_methods, + swig_DOMDocumentFragment_Sf_SwigStatic_attributes, + swig_DOMDocumentFragment_Sf_SwigStatic_constants, + swig_DOMDocumentFragment_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMDocumentFragment_bases[] = {0,0}; +static const char *swig_DOMDocumentFragment_base_names[] = {"XERCES_CPP_NAMESPACE::DOMNode *",0}; +static swig_lua_class _wrap_class_DOMDocumentFragment = { "DOMDocumentFragment", "DOMDocumentFragment", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMDocumentFragment,0, swig_delete_DOMDocumentFragment, swig_DOMDocumentFragment_methods, swig_DOMDocumentFragment_attributes, &swig_DOMDocumentFragment_Sf_SwigStatic, swig_DOMDocumentFragment_meta, swig_DOMDocumentFragment_bases, swig_DOMDocumentFragment_base_names }; + +static void swig_delete_DOMEntityReference(void *obj) { +XERCES_CPP_NAMESPACE::DOMEntityReference *arg1 = (XERCES_CPP_NAMESPACE::DOMEntityReference *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMEntityReference_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMEntityReference_methods[]= { + {0,0} +}; +static swig_lua_method swig_DOMEntityReference_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMEntityReference_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMEntityReference_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMEntityReference_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMEntityReference_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMEntityReference_Sf_SwigStatic = { + "DOMEntityReference", + swig_DOMEntityReference_Sf_SwigStatic_methods, + swig_DOMEntityReference_Sf_SwigStatic_attributes, + swig_DOMEntityReference_Sf_SwigStatic_constants, + swig_DOMEntityReference_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMEntityReference_bases[] = {0,0}; +static const char *swig_DOMEntityReference_base_names[] = {"XERCES_CPP_NAMESPACE::DOMNode *",0}; +static swig_lua_class _wrap_class_DOMEntityReference = { "DOMEntityReference", "DOMEntityReference", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMEntityReference,0, swig_delete_DOMEntityReference, swig_DOMEntityReference_methods, swig_DOMEntityReference_attributes, &swig_DOMEntityReference_Sf_SwigStatic, swig_DOMEntityReference_meta, swig_DOMEntityReference_bases, swig_DOMEntityReference_base_names }; + +static int _wrap_DOMNotation_getPublicId(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNotation *arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNotation::getPublicId",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNotation::getPublicId",1,"XERCES_CPP_NAMESPACE::DOMNotation const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation,0))){ + SWIG_fail_ptr("DOMNotation_getPublicId",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNotation const *)arg1)->getPublicId(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMNotation_getSystemId(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMNotation *arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMNotation::getSystemId",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMNotation::getSystemId",1,"XERCES_CPP_NAMESPACE::DOMNotation const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation,0))){ + SWIG_fail_ptr("DOMNotation_getSystemId",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMNotation const *)arg1)->getSystemId(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_DOMNotation(void *obj) { +XERCES_CPP_NAMESPACE::DOMNotation *arg1 = (XERCES_CPP_NAMESPACE::DOMNotation *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMNotation_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMNotation_methods[]= { + { "getPublicId", _wrap_DOMNotation_getPublicId}, + { "getSystemId", _wrap_DOMNotation_getSystemId}, + {0,0} +}; +static swig_lua_method swig_DOMNotation_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMNotation_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMNotation_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMNotation_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMNotation_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMNotation_Sf_SwigStatic = { + "DOMNotation", + swig_DOMNotation_Sf_SwigStatic_methods, + swig_DOMNotation_Sf_SwigStatic_attributes, + swig_DOMNotation_Sf_SwigStatic_constants, + swig_DOMNotation_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMNotation_bases[] = {0,0}; +static const char *swig_DOMNotation_base_names[] = {"XERCES_CPP_NAMESPACE::DOMNode *",0}; +static swig_lua_class _wrap_class_DOMNotation = { "DOMNotation", "DOMNotation", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNotation,0, swig_delete_DOMNotation, swig_DOMNotation_methods, swig_DOMNotation_attributes, &swig_DOMNotation_Sf_SwigStatic, swig_DOMNotation_meta, swig_DOMNotation_bases, swig_DOMNotation_base_names }; + +static int _wrap_DOMProcessingInstruction_getTarget(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMProcessingInstruction *arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMProcessingInstruction::getTarget",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMProcessingInstruction::getTarget",1,"XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction,0))){ + SWIG_fail_ptr("DOMProcessingInstruction_getTarget",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *)arg1)->getTarget(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMProcessingInstruction_getData(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMProcessingInstruction *arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) 0 ; + XMLCh *result = 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMProcessingInstruction::getData",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMProcessingInstruction::getData",1,"XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction,0))){ + SWIG_fail_ptr("DOMProcessingInstruction_getData",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction); + } + + result = (XMLCh *)((XERCES_CPP_NAMESPACE::DOMProcessingInstruction const *)arg1)->getData(); + + result = XMLString2Lua(result); + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_DOMProcessingInstruction_setData(lua_State* L) { + int SWIG_arg = 0; + XERCES_CPP_NAMESPACE::DOMProcessingInstruction *arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) 0 ; + XMLCh *arg2 = (XMLCh *) 0 ; + + SWIG_check_num_args("XERCES_CPP_NAMESPACE::DOMProcessingInstruction::setData",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("XERCES_CPP_NAMESPACE::DOMProcessingInstruction::setData",1,"XERCES_CPP_NAMESPACE::DOMProcessingInstruction *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction,0))){ + SWIG_fail_ptr("DOMProcessingInstruction_setData",1,SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction); + } + + + arg2 = Lua2XMLString(2); + + (arg1)->setData((XMLCh const *)arg2); + + + delete[] arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + + delete[] arg2; + + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_DOMProcessingInstruction(void *obj) { +XERCES_CPP_NAMESPACE::DOMProcessingInstruction *arg1 = (XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) obj; +delete arg1; +} +static swig_lua_attribute swig_DOMProcessingInstruction_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_DOMProcessingInstruction_methods[]= { + { "getTarget", _wrap_DOMProcessingInstruction_getTarget}, + { "getData", _wrap_DOMProcessingInstruction_getData}, + { "setData", _wrap_DOMProcessingInstruction_setData}, + {0,0} +}; +static swig_lua_method swig_DOMProcessingInstruction_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_DOMProcessingInstruction_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_DOMProcessingInstruction_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_DOMProcessingInstruction_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_DOMProcessingInstruction_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_DOMProcessingInstruction_Sf_SwigStatic = { + "DOMProcessingInstruction", + swig_DOMProcessingInstruction_Sf_SwigStatic_methods, + swig_DOMProcessingInstruction_Sf_SwigStatic_attributes, + swig_DOMProcessingInstruction_Sf_SwigStatic_constants, + swig_DOMProcessingInstruction_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_DOMProcessingInstruction_bases[] = {0,0}; +static const char *swig_DOMProcessingInstruction_base_names[] = {"XERCES_CPP_NAMESPACE::DOMNode *",0}; +static swig_lua_class _wrap_class_DOMProcessingInstruction = { "DOMProcessingInstruction", "DOMProcessingInstruction", &SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction,0, swig_delete_DOMProcessingInstruction, swig_DOMProcessingInstruction_methods, swig_DOMProcessingInstruction_attributes, &swig_DOMProcessingInstruction_Sf_SwigStatic, swig_DOMProcessingInstruction_meta, swig_DOMProcessingInstruction_bases, swig_DOMProcessingInstruction_base_names }; + +static int _wrap_new_Event__SWIG_0(lua_State* L) { + int SWIG_arg = 0; + uscxml::Event *result = 0 ; + + SWIG_check_num_args("uscxml::Event::Event",0,0) + result = (uscxml::Event *)new uscxml::Event(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_uscxml__Event,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_Event__SWIG_1(lua_State* L) { + int SWIG_arg = 0; + std::string *arg1 = 0 ; + uscxml::Event::Type arg2 ; + std::string temp1 ; + uscxml::Event *result = 0 ; + + SWIG_check_num_args("uscxml::Event::Event",2,2) + if(!lua_isstring(L,1)) SWIG_fail_arg("uscxml::Event::Event",1,"std::string const &"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("uscxml::Event::Event",2,"uscxml::Event::Type"); + temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1; + arg2 = (uscxml::Event::Type)(int)lua_tonumber(L, 2); + result = (uscxml::Event *)new uscxml::Event((std::string const &)*arg1,arg2); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_uscxml__Event,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_Event__SWIG_2(lua_State* L) { + int SWIG_arg = 0; + std::string *arg1 = 0 ; + std::string temp1 ; + uscxml::Event *result = 0 ; + + SWIG_check_num_args("uscxml::Event::Event",1,1) + if(!lua_isstring(L,1)) SWIG_fail_arg("uscxml::Event::Event",1,"std::string const &"); + temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1; + result = (uscxml::Event *)new uscxml::Event((std::string const &)*arg1); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_uscxml__Event,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_Event(lua_State* L) { + int argc; + int argv[3]={ + 1,2,3 + }; + + argc = lua_gettop(L); + if (argc == 0) { + return _wrap_new_Event__SWIG_0(L); + } + if (argc == 1) { + int _v; + { + _v = lua_isstring(L,argv[0]); + } + if (_v) { + return _wrap_new_Event__SWIG_2(L); + } + } + if (argc == 2) { + int _v; + { + _v = lua_isstring(L,argv[0]); + } + if (_v) { + { + _v = lua_isnumber(L,argv[1]); + } + if (_v) { + return _wrap_new_Event__SWIG_1(L); + } + } + } + + SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Event'\n" + " Possible C/C++ prototypes are:\n" + " uscxml::Event::Event()\n" + " uscxml::Event::Event(std::string const &,uscxml::Event::Type)\n" + " uscxml::Event::Event(std::string const &)\n"); + lua_error(L);return 0; +} + + +static int _wrap_Event___lt(lua_State* L) { + int SWIG_arg = 0; + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + uscxml::Event *arg2 = 0 ; + bool result; + + SWIG_check_num_args("uscxml::Event::operator <",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("uscxml::Event::operator <",1,"uscxml::Event const *"); + if(!lua_isuserdata(L,2)) SWIG_fail_arg("uscxml::Event::operator <",2,"uscxml::Event const &"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_uscxml__Event,0))){ + SWIG_fail_ptr("Event___lt",1,SWIGTYPE_p_uscxml__Event); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_uscxml__Event,0))){ + SWIG_fail_ptr("Event___lt",2,SWIGTYPE_p_uscxml__Event); + } + + result = (bool)((uscxml::Event const *)arg1)->operator <((uscxml::Event const &)*arg2); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event___eq(lua_State* L) { + int SWIG_arg = 0; + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + uscxml::Event *arg2 = 0 ; + bool result; + + SWIG_check_num_args("uscxml::Event::operator ==",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("uscxml::Event::operator ==",1,"uscxml::Event const *"); + if(!lua_isuserdata(L,2)) SWIG_fail_arg("uscxml::Event::operator ==",2,"uscxml::Event const &"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_uscxml__Event,0))){ + SWIG_fail_ptr("Event___eq",1,SWIGTYPE_p_uscxml__Event); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_uscxml__Event,0))){ + SWIG_fail_ptr("Event___eq",2,SWIGTYPE_p_uscxml__Event); + } + + result = (bool)((uscxml::Event const *)arg1)->operator ==((uscxml::Event const &)*arg2); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_getParam__SWIG_0(lua_State* L) { + int SWIG_arg = 0; + uscxml::Event::params_t *arg1 = 0 ; + std::string *arg2 = 0 ; + Data *arg3 = 0 ; + std::string temp2 ; + bool result; + + SWIG_check_num_args("uscxml::Event::getParam",3,3) + if(!lua_isuserdata(L,1)) SWIG_fail_arg("uscxml::Event::getParam",1,"uscxml::Event::params_t const &"); + if(!lua_isstring(L,2)) SWIG_fail_arg("uscxml::Event::getParam",2,"std::string const &"); + if(!lua_isuserdata(L,3)) SWIG_fail_arg("uscxml::Event::getParam",3,"Data &"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__multimapT_std__string_Data_t,0))){ + SWIG_fail_ptr("Event_getParam",1,SWIGTYPE_p_std__multimapT_std__string_Data_t); + } + + temp2.assign(lua_tostring(L,2),lua_rawlen(L,2)); arg2=&temp2; + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Data,0))){ + SWIG_fail_ptr("Event_getParam",3,SWIGTYPE_p_Data); + } + + result = (bool)uscxml::Event::getParam((std::multimap< std::string,Data > const &)*arg1,(std::string const &)*arg2,*arg3); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_getParam__SWIG_1(lua_State* L) { + int SWIG_arg = 0; + uscxml::Event::params_t *arg1 = 0 ; + std::string *arg2 = 0 ; + std::list< Data > *arg3 = 0 ; + std::string temp2 ; + bool result; + + SWIG_check_num_args("uscxml::Event::getParam",3,3) + if(!lua_isuserdata(L,1)) SWIG_fail_arg("uscxml::Event::getParam",1,"uscxml::Event::params_t const &"); + if(!lua_isstring(L,2)) SWIG_fail_arg("uscxml::Event::getParam",2,"std::string const &"); + if(!lua_isuserdata(L,3)) SWIG_fail_arg("uscxml::Event::getParam",3,"std::list< Data > &"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__multimapT_std__string_Data_t,0))){ + SWIG_fail_ptr("Event_getParam",1,SWIGTYPE_p_std__multimapT_std__string_Data_t); + } + + temp2.assign(lua_tostring(L,2),lua_rawlen(L,2)); arg2=&temp2; + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_std__listT_Data_t,0))){ + SWIG_fail_ptr("Event_getParam",3,SWIGTYPE_p_std__listT_Data_t); + } + + result = (bool)uscxml::Event::getParam((std::multimap< std::string,Data > const &)*arg1,(std::string const &)*arg2,*arg3); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_getParam__SWIG_3(lua_State* L) { + int SWIG_arg = 0; + uscxml::Event::params_t *arg1 = 0 ; + std::string *arg2 = 0 ; + bool *arg3 = 0 ; + std::string temp2 ; + bool result; + + SWIG_check_num_args("uscxml::Event::getParam",3,3) + if(!lua_isuserdata(L,1)) SWIG_fail_arg("uscxml::Event::getParam",1,"uscxml::Event::params_t const &"); + if(!lua_isstring(L,2)) SWIG_fail_arg("uscxml::Event::getParam",2,"std::string const &"); + if(!lua_isuserdata(L,3)) SWIG_fail_arg("uscxml::Event::getParam",3,"bool &"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__multimapT_std__string_Data_t,0))){ + SWIG_fail_ptr("Event_getParam",1,SWIGTYPE_p_std__multimapT_std__string_Data_t); + } + + temp2.assign(lua_tostring(L,2),lua_rawlen(L,2)); arg2=&temp2; + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_bool,0))){ + SWIG_fail_ptr("Event_getParam",3,SWIGTYPE_p_bool); + } + + result = (bool)uscxml::Event::getParam((std::multimap< std::string,Data > const &)*arg1,(std::string const &)*arg2,*arg3); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_getParam(lua_State* L) { + int argc; + int argv[4]={ + 1,2,3,4 + }; + + argc = lua_gettop(L); + if (argc == 3) { + int _v; + { + void *ptr; + if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__multimapT_std__string_Data_t, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + { + void *ptr; + if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Data, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + return _wrap_Event_getParam__SWIG_0(L); + } + } + } + } + if (argc == 3) { + int _v; + { + void *ptr; + if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__multimapT_std__string_Data_t, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + { + void *ptr; + if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_std__listT_Data_t, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + return _wrap_Event_getParam__SWIG_1(L); + } + } + } + } + if (argc == 3) { + int _v; + { + void *ptr; + if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__multimapT_std__string_Data_t, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + { + void *ptr; + if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_bool, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + return _wrap_Event_getParam__SWIG_3(L); + } + } + } + } + + SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Event_getParam'\n" + " Possible C/C++ prototypes are:\n" + " uscxml::Event::getParam(uscxml::Event::params_t const &,std::string const &,Data &)\n" + " uscxml::Event::getParam(uscxml::Event::params_t const &,std::string const &,std::list< Data > &)\n" + " uscxml::Event::getParam(uscxml::Event::params_t const &,std::string const &,bool &)\n"); + lua_error(L);return 0; +} + + +static int _wrap_Event_raw_set(lua_State* L) { + int SWIG_arg = 0; + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + std::string *arg2 = 0 ; + std::string temp2 ; + + SWIG_check_num_args("uscxml::Event::raw",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("uscxml::Event::raw",1,"uscxml::Event *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("uscxml::Event::raw",2,"std::string const &"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_uscxml__Event,0))){ + SWIG_fail_ptr("Event_raw_set",1,SWIGTYPE_p_uscxml__Event); + } + + temp2.assign(lua_tostring(L,2),lua_rawlen(L,2)); arg2=&temp2; + if (arg1) (arg1)->raw = *arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_raw_get(lua_State* L) { + int SWIG_arg = 0; + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + std::string *result = 0 ; + + SWIG_check_num_args("uscxml::Event::raw",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("uscxml::Event::raw",1,"uscxml::Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_uscxml__Event,0))){ + SWIG_fail_ptr("Event_raw_get",1,SWIGTYPE_p_uscxml__Event); + } + + result = (std::string *) & ((arg1)->raw); + lua_pushlstring(L,result->data(),result->size()); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_name_set(lua_State* L) { + int SWIG_arg = 0; + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + std::string *arg2 = 0 ; + std::string temp2 ; + + SWIG_check_num_args("uscxml::Event::name",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("uscxml::Event::name",1,"uscxml::Event *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("uscxml::Event::name",2,"std::string const &"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_uscxml__Event,0))){ + SWIG_fail_ptr("Event_name_set",1,SWIGTYPE_p_uscxml__Event); + } + + temp2.assign(lua_tostring(L,2),lua_rawlen(L,2)); arg2=&temp2; + if (arg1) (arg1)->name = *arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_name_get(lua_State* L) { + int SWIG_arg = 0; + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + std::string *result = 0 ; + + SWIG_check_num_args("uscxml::Event::name",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("uscxml::Event::name",1,"uscxml::Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_uscxml__Event,0))){ + SWIG_fail_ptr("Event_name_get",1,SWIGTYPE_p_uscxml__Event); + } + + result = (std::string *) & ((arg1)->name); + lua_pushlstring(L,result->data(),result->size()); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_eventType_set(lua_State* L) { + int SWIG_arg = 0; + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + uscxml::Event::Type arg2 ; + + SWIG_check_num_args("uscxml::Event::eventType",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("uscxml::Event::eventType",1,"uscxml::Event *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("uscxml::Event::eventType",2,"uscxml::Event::Type"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_uscxml__Event,0))){ + SWIG_fail_ptr("Event_eventType_set",1,SWIGTYPE_p_uscxml__Event); + } + + arg2 = (uscxml::Event::Type)(int)lua_tonumber(L, 2); + if (arg1) (arg1)->eventType = arg2; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_eventType_get(lua_State* L) { + int SWIG_arg = 0; + uscxml::Event *arg1 = (uscxml::Event *) 0 ; + uscxml::Event::Type result; + + SWIG_check_num_args("uscxml::Event::eventType",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("uscxml::Event::eventType",1,"uscxml::Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_uscxml__Event,0))){ + SWIG_fail_ptr("Event_eventType_get",1,SWIGTYPE_p_uscxml__Event); + } + + result = (uscxml::Event::Type) ((arg1)->eventType); + lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_Event(void *obj) { +uscxml::Event *arg1 = (uscxml::Event *) obj; +delete arg1; +} +static int _proxy__wrap_new_Event(lua_State *L) { + assert(lua_istable(L,1)); + lua_pushcfunction(L,_wrap_new_Event); + assert(!lua_isnil(L,-1)); + lua_replace(L,1); /* replace our table with real constructor */ + lua_call(L,lua_gettop(L)-1,1); + return 1; +} +static swig_lua_attribute swig_Event_attributes[] = { + { "raw", _wrap_Event_raw_get, _wrap_Event_raw_set }, + { "name", _wrap_Event_name_get, _wrap_Event_name_set }, + { "eventType", _wrap_Event_eventType_get, _wrap_Event_eventType_set }, + {0,0,0} +}; +static swig_lua_method swig_Event_methods[]= { + { "__lt", _wrap_Event___lt}, + { "__eq", _wrap_Event___eq}, + {0,0} +}; +static swig_lua_method swig_Event_meta[] = { + { "__lt", _wrap_Event___lt}, + { "__eq", _wrap_Event___eq}, + {0,0} +}; + +static swig_lua_attribute swig_Event_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_Event_Sf_SwigStatic_constants[]= { + {SWIG_LUA_CONSTTAB_INT("INTERNAL", uscxml::Event::INTERNAL)}, + {SWIG_LUA_CONSTTAB_INT("EXTERNAL", uscxml::Event::EXTERNAL)}, + {SWIG_LUA_CONSTTAB_INT("PLATFORM", uscxml::Event::PLATFORM)}, + {0,0,0,0,0,0} +}; +static swig_lua_method swig_Event_Sf_SwigStatic_methods[]= { + { "getParam", _wrap_Event_getParam}, + {0,0} +}; +static swig_lua_class* swig_Event_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_Event_Sf_SwigStatic = { + "Event", + swig_Event_Sf_SwigStatic_methods, + swig_Event_Sf_SwigStatic_attributes, + swig_Event_Sf_SwigStatic_constants, + swig_Event_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_Event_bases[] = {0}; +static const char *swig_Event_base_names[] = {0}; +static swig_lua_class _wrap_class_Event = { "Event", "Event", &SWIGTYPE_p_uscxml__Event,_proxy__wrap_new_Event, swig_delete_Event, swig_Event_methods, swig_Event_attributes, &swig_Event_Sf_SwigStatic, swig_Event_meta, swig_Event_bases, swig_Event_base_names }; + +static int _wrap_new_ErrorEvent__SWIG_0(lua_State* L) { + int SWIG_arg = 0; + uscxml::ErrorEvent *result = 0 ; + + SWIG_check_num_args("uscxml::ErrorEvent::ErrorEvent",0,0) + result = (uscxml::ErrorEvent *)new uscxml::ErrorEvent(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_uscxml__ErrorEvent,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_ErrorEvent__SWIG_1(lua_State* L) { + int SWIG_arg = 0; + std::string *arg1 = 0 ; + std::string temp1 ; + uscxml::ErrorEvent *result = 0 ; + + SWIG_check_num_args("uscxml::ErrorEvent::ErrorEvent",1,1) + if(!lua_isstring(L,1)) SWIG_fail_arg("uscxml::ErrorEvent::ErrorEvent",1,"std::string const &"); + temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1; + result = (uscxml::ErrorEvent *)new uscxml::ErrorEvent((std::string const &)*arg1); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_uscxml__ErrorEvent,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_ErrorEvent(lua_State* L) { + int argc; + int argv[2]={ + 1,2 + }; + + argc = lua_gettop(L); + if (argc == 0) { + return _wrap_new_ErrorEvent__SWIG_0(L); + } + if (argc == 1) { + int _v; + { + _v = lua_isstring(L,argv[0]); + } + if (_v) { + return _wrap_new_ErrorEvent__SWIG_1(L); + } + } + + SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_ErrorEvent'\n" + " Possible C/C++ prototypes are:\n" + " uscxml::ErrorEvent::ErrorEvent()\n" + " uscxml::ErrorEvent::ErrorEvent(std::string const &)\n"); + lua_error(L);return 0; +} + + +static void swig_delete_ErrorEvent(void *obj) { +uscxml::ErrorEvent *arg1 = (uscxml::ErrorEvent *) obj; +delete arg1; +} +static int _proxy__wrap_new_ErrorEvent(lua_State *L) { + assert(lua_istable(L,1)); + lua_pushcfunction(L,_wrap_new_ErrorEvent); + assert(!lua_isnil(L,-1)); + lua_replace(L,1); /* replace our table with real constructor */ + lua_call(L,lua_gettop(L)-1,1); + return 1; +} +static swig_lua_attribute swig_ErrorEvent_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_ErrorEvent_methods[]= { + {0,0} +}; +static swig_lua_method swig_ErrorEvent_meta[] = { + {0,0} +}; + +static swig_lua_attribute swig_ErrorEvent_Sf_SwigStatic_attributes[] = { + {0,0,0} +}; +static swig_lua_const_info swig_ErrorEvent_Sf_SwigStatic_constants[]= { + {0,0,0,0,0,0} +}; +static swig_lua_method swig_ErrorEvent_Sf_SwigStatic_methods[]= { + {0,0} +}; +static swig_lua_class* swig_ErrorEvent_Sf_SwigStatic_classes[]= { + 0 +}; + +static swig_lua_namespace swig_ErrorEvent_Sf_SwigStatic = { + "ErrorEvent", + swig_ErrorEvent_Sf_SwigStatic_methods, + swig_ErrorEvent_Sf_SwigStatic_attributes, + swig_ErrorEvent_Sf_SwigStatic_constants, + swig_ErrorEvent_Sf_SwigStatic_classes, + 0 +}; +static swig_lua_class *swig_ErrorEvent_bases[] = {0,0}; +static const char *swig_ErrorEvent_base_names[] = {"uscxml::Event *",0}; +static swig_lua_class _wrap_class_ErrorEvent = { "ErrorEvent", "ErrorEvent", &SWIGTYPE_p_uscxml__ErrorEvent,_proxy__wrap_new_ErrorEvent, swig_delete_ErrorEvent, swig_ErrorEvent_methods, swig_ErrorEvent_attributes, &swig_ErrorEvent_Sf_SwigStatic, swig_ErrorEvent_meta, swig_ErrorEvent_bases, swig_ErrorEvent_base_names }; + +static swig_lua_attribute swig_SwigModule_attributes[] = { + { "DEBUG_UTF8_OUT", _wrap_DEBUG_UTF8_OUT_get, _wrap_DEBUG_UTF8_OUT_set }, + { "DEBUG_UTF8_IN", _wrap_DEBUG_UTF8_IN_get, _wrap_DEBUG_UTF8_IN_set }, + {0,0,0} +}; +static swig_lua_const_info swig_SwigModule_constants[]= { + {SWIG_LUA_CONSTTAB_INT("XERCES_HAS_CPP_NAMESPACE", 1)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_INDEX_SIZE_ERR", XERCES_CPP_NAMESPACE::DOMException::INDEX_SIZE_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_DOMSTRING_SIZE_ERR", XERCES_CPP_NAMESPACE::DOMException::DOMSTRING_SIZE_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_HIERARCHY_REQUEST_ERR", XERCES_CPP_NAMESPACE::DOMException::HIERARCHY_REQUEST_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_WRONG_DOCUMENT_ERR", XERCES_CPP_NAMESPACE::DOMException::WRONG_DOCUMENT_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_INVALID_CHARACTER_ERR", XERCES_CPP_NAMESPACE::DOMException::INVALID_CHARACTER_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_NO_DATA_ALLOWED_ERR", XERCES_CPP_NAMESPACE::DOMException::NO_DATA_ALLOWED_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_NO_MODIFICATION_ALLOWED_ERR", XERCES_CPP_NAMESPACE::DOMException::NO_MODIFICATION_ALLOWED_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_NOT_FOUND_ERR", XERCES_CPP_NAMESPACE::DOMException::NOT_FOUND_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_NOT_SUPPORTED_ERR", XERCES_CPP_NAMESPACE::DOMException::NOT_SUPPORTED_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_INUSE_ATTRIBUTE_ERR", XERCES_CPP_NAMESPACE::DOMException::INUSE_ATTRIBUTE_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_INVALID_STATE_ERR", XERCES_CPP_NAMESPACE::DOMException::INVALID_STATE_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_SYNTAX_ERR", XERCES_CPP_NAMESPACE::DOMException::SYNTAX_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_INVALID_MODIFICATION_ERR", XERCES_CPP_NAMESPACE::DOMException::INVALID_MODIFICATION_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_NAMESPACE_ERR", XERCES_CPP_NAMESPACE::DOMException::NAMESPACE_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_INVALID_ACCESS_ERR", XERCES_CPP_NAMESPACE::DOMException::INVALID_ACCESS_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_VALIDATION_ERR", XERCES_CPP_NAMESPACE::DOMException::VALIDATION_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMException_TYPE_MISMATCH_ERR", XERCES_CPP_NAMESPACE::DOMException::TYPE_MISMATCH_ERR)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_ELEMENT_NODE", XERCES_CPP_NAMESPACE::DOMNode::ELEMENT_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_ATTRIBUTE_NODE", XERCES_CPP_NAMESPACE::DOMNode::ATTRIBUTE_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_TEXT_NODE", XERCES_CPP_NAMESPACE::DOMNode::TEXT_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_CDATA_SECTION_NODE", XERCES_CPP_NAMESPACE::DOMNode::CDATA_SECTION_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_ENTITY_REFERENCE_NODE", XERCES_CPP_NAMESPACE::DOMNode::ENTITY_REFERENCE_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_ENTITY_NODE", XERCES_CPP_NAMESPACE::DOMNode::ENTITY_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_PROCESSING_INSTRUCTION_NODE", XERCES_CPP_NAMESPACE::DOMNode::PROCESSING_INSTRUCTION_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_COMMENT_NODE", XERCES_CPP_NAMESPACE::DOMNode::COMMENT_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_DOCUMENT_NODE", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_DOCUMENT_TYPE_NODE", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_TYPE_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_DOCUMENT_FRAGMENT_NODE", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_FRAGMENT_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_NOTATION_NODE", XERCES_CPP_NAMESPACE::DOMNode::NOTATION_NODE)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_DOCUMENT_POSITION_DISCONNECTED", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_DISCONNECTED)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_DOCUMENT_POSITION_PRECEDING", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_PRECEDING)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_DOCUMENT_POSITION_FOLLOWING", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_FOLLOWING)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_DOCUMENT_POSITION_CONTAINS", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_CONTAINS)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_DOCUMENT_POSITION_CONTAINED_BY", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_CONTAINED_BY)}, + {SWIG_LUA_CONSTTAB_INT("DOMNode_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", XERCES_CPP_NAMESPACE::DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)}, + {SWIG_LUA_CONSTTAB_INT("Event_INTERNAL", uscxml::Event::INTERNAL)}, + {SWIG_LUA_CONSTTAB_INT("Event_EXTERNAL", uscxml::Event::EXTERNAL)}, + {SWIG_LUA_CONSTTAB_INT("Event_PLATFORM", uscxml::Event::PLATFORM)}, + {0,0,0,0,0,0} +}; +static swig_lua_method swig_SwigModule_methods[]= { + { "Event_getParam", _wrap_Event_getParam}, + {0,0} +}; +static swig_lua_class* swig_SwigModule_classes[]= { +&_wrap_class_string, +&_wrap_class_DOMException, +&_wrap_class_DOMNode, +&_wrap_class_DOMAttr, +&_wrap_class_DOMElement, +&_wrap_class_DOMEntity, +&_wrap_class_DOMDocumentType, +&_wrap_class_DOMCharacterData, +&_wrap_class_DOMComment, +&_wrap_class_DOMText, +&_wrap_class_DOMCDATASection, +&_wrap_class_DOMNodeList, +&_wrap_class_DOMNamedNodeMap, +&_wrap_class_DOMDocumentFragment, +&_wrap_class_DOMEntityReference, +&_wrap_class_DOMNotation, +&_wrap_class_DOMProcessingInstruction, +&_wrap_class_Event, +&_wrap_class_ErrorEvent, + 0 +}; +static swig_lua_namespace* swig_SwigModule_namespaces[] = { + 0 +}; + +static swig_lua_namespace swig_SwigModule = { + "LuaDOM", + swig_SwigModule_methods, + swig_SwigModule_attributes, + swig_SwigModule_constants, + swig_SwigModule_classes, + swig_SwigModule_namespaces +}; +#ifdef __cplusplus +} +#endif + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static void *_p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMText(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMText *) ((XERCES_CPP_NAMESPACE::DOMCDATASection *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMText *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMComment *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMCharacterData *) (XERCES_CPP_NAMESPACE::DOMText *) ((XERCES_CPP_NAMESPACE::DOMCDATASection *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMElementTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMElement *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMDocumentFragmentTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMDocumentFragment *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMAttrTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMAttr *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMDocumentTypeTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMDocumentType *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCharacterDataTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMCharacterData *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) (XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMText *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) (XERCES_CPP_NAMESPACE::DOMCharacterData *) ((XERCES_CPP_NAMESPACE::DOMComment *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMProcessingInstructionTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMProcessingInstruction *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMEntityTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMEntity *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMEntityReferenceTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMEntityReference *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) (XERCES_CPP_NAMESPACE::DOMCharacterData *)(XERCES_CPP_NAMESPACE::DOMText *) ((XERCES_CPP_NAMESPACE::DOMCDATASection *) x)); +} +static void *_p_XERCES_CPP_NAMESPACE__DOMNotationTo_p_XERCES_CPP_NAMESPACE__DOMNode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((XERCES_CPP_NAMESPACE::DOMNode *) ((XERCES_CPP_NAMESPACE::DOMNotation *) x)); +} +static void *_p_uscxml__ErrorEventTo_p_uscxml__Event(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((uscxml::Event *) ((uscxml::ErrorEvent *) x)); +} +static swig_type_info _swigt__p_Data = {"_p_Data", "Data *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMAttr = {"_p_XERCES_CPP_NAMESPACE__DOMAttr", "XERCES_CPP_NAMESPACE::DOMAttr *", 0, 0, (void*)&_wrap_class_DOMAttr, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection = {"_p_XERCES_CPP_NAMESPACE__DOMCDATASection", "XERCES_CPP_NAMESPACE::DOMCDATASection *", 0, 0, (void*)&_wrap_class_DOMCDATASection, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData = {"_p_XERCES_CPP_NAMESPACE__DOMCharacterData", "XERCES_CPP_NAMESPACE::DOMCharacterData *", 0, 0, (void*)&_wrap_class_DOMCharacterData, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMComment = {"_p_XERCES_CPP_NAMESPACE__DOMComment", "XERCES_CPP_NAMESPACE::DOMComment *", 0, 0, (void*)&_wrap_class_DOMComment, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMDocument = {"_p_XERCES_CPP_NAMESPACE__DOMDocument", "XERCES_CPP_NAMESPACE::DOMDocument *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment = {"_p_XERCES_CPP_NAMESPACE__DOMDocumentFragment", "XERCES_CPP_NAMESPACE::DOMDocumentFragment *", 0, 0, (void*)&_wrap_class_DOMDocumentFragment, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType = {"_p_XERCES_CPP_NAMESPACE__DOMDocumentType", "XERCES_CPP_NAMESPACE::DOMDocumentType *", 0, 0, (void*)&_wrap_class_DOMDocumentType, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMElement = {"_p_XERCES_CPP_NAMESPACE__DOMElement", "XERCES_CPP_NAMESPACE::DOMElement *", 0, 0, (void*)&_wrap_class_DOMElement, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMEntity = {"_p_XERCES_CPP_NAMESPACE__DOMEntity", "XERCES_CPP_NAMESPACE::DOMEntity *", 0, 0, (void*)&_wrap_class_DOMEntity, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference = {"_p_XERCES_CPP_NAMESPACE__DOMEntityReference", "XERCES_CPP_NAMESPACE::DOMEntityReference *", 0, 0, (void*)&_wrap_class_DOMEntityReference, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMException = {"_p_XERCES_CPP_NAMESPACE__DOMException", "XERCES_CPP_NAMESPACE::DOMException *", 0, 0, (void*)&_wrap_class_DOMException, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap = {"_p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap", "XERCES_CPP_NAMESPACE::DOMNamedNodeMap *", 0, 0, (void*)&_wrap_class_DOMNamedNodeMap, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNode = {"_p_XERCES_CPP_NAMESPACE__DOMNode", "XERCES_CPP_NAMESPACE::DOMNode *", 0, 0, (void*)&_wrap_class_DOMNode, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNodeList = {"_p_XERCES_CPP_NAMESPACE__DOMNodeList", "XERCES_CPP_NAMESPACE::DOMNodeList *", 0, 0, (void*)&_wrap_class_DOMNodeList, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMNotation = {"_p_XERCES_CPP_NAMESPACE__DOMNotation", "XERCES_CPP_NAMESPACE::DOMNotation *", 0, 0, (void*)&_wrap_class_DOMNotation, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction = {"_p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction", "XERCES_CPP_NAMESPACE::DOMProcessingInstruction *", 0, 0, (void*)&_wrap_class_DOMProcessingInstruction, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMText = {"_p_XERCES_CPP_NAMESPACE__DOMText", "XERCES_CPP_NAMESPACE::DOMText *", 0, 0, (void*)&_wrap_class_DOMText, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMTypeInfo = {"_p_XERCES_CPP_NAMESPACE__DOMTypeInfo", "XERCES_CPP_NAMESPACE::DOMTypeInfo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler = {"_p_XERCES_CPP_NAMESPACE__DOMUserDataHandler", "XERCES_CPP_NAMESPACE::DOMUserDataHandler *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_XERCES_CPP_NAMESPACE__MemoryManager = {"_p_XERCES_CPP_NAMESPACE__MemoryManager", "XERCES_CPP_NAMESPACE::MemoryManager *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int16_t = {"_p_int16_t", "XMLInt16 *|int16_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int32_t = {"_p_int32_t", "int32_t *|XMLInt32 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int64_t = {"_p_int64_t", "int64_t *|XMLInt64 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_namelist_t = {"_p_namelist_t", "namelist_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_params_t = {"_p_params_t", "params_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *|XMLSize_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ssize_t = {"_p_ssize_t", "ssize_t *|XMLSSize_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__listT_Data_t = {"_p_std__listT_Data_t", "std::list< Data > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__multimapT_std__string_Data_t = {"_p_std__multimapT_std__string_Data_t", "uscxml::Event::params_t *|std::multimap< std::string,Data > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)&_wrap_class_string, 0}; +static swig_type_info _swigt__p_uint16_t = {"_p_uint16_t", "XMLUInt16 *|UTF16Ch *|XMLCh *|uint16_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint32_t = {"_p_uint32_t", "uint32_t *|XMLUInt32 *|UCS4Ch *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint64_t = {"_p_uint64_t", "uint64_t *|XMLUInt64 *|XMLFilePos *|XMLFileLoc *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|XMLByte *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uscxml__ErrorEvent = {"_p_uscxml__ErrorEvent", "uscxml::ErrorEvent *", 0, 0, (void*)&_wrap_class_ErrorEvent, 0}; +static swig_type_info _swigt__p_uscxml__Event = {"_p_uscxml__Event", "uscxml::Event *", 0, 0, (void*)&_wrap_class_Event, 0}; +static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_Data, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMAttr, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMDocument, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMElement, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMEntity, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMException, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNode, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNodeList, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMNotation, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMText, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMTypeInfo, + &_swigt__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, + &_swigt__p_XERCES_CPP_NAMESPACE__MemoryManager, + &_swigt__p_bool, + &_swigt__p_int16_t, + &_swigt__p_int32_t, + &_swigt__p_int64_t, + &_swigt__p_namelist_t, + &_swigt__p_params_t, + &_swigt__p_size_t, + &_swigt__p_ssize_t, + &_swigt__p_std__listT_Data_t, + &_swigt__p_std__multimapT_std__string_Data_t, + &_swigt__p_std__string, + &_swigt__p_uint16_t, + &_swigt__p_uint32_t, + &_swigt__p_uint64_t, + &_swigt__p_unsigned_char, + &_swigt__p_uscxml__ErrorEvent, + &_swigt__p_uscxml__Event, + &_swigt__p_void, +}; + +static swig_cast_info _swigc__p_Data[] = { {&_swigt__p_Data, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMAttr[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMAttr, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMCDATASection[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMCharacterData[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMText, _p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, _p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, _p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMCharacterData, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMComment[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMDocument[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocument, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentType[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMElement[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMElement, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMEntity[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntity, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMEntityReference[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMException[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMException, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNode[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMElement, _p_XERCES_CPP_NAMESPACE__DOMElementTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, _p_XERCES_CPP_NAMESPACE__DOMDocumentFragmentTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMAttr, _p_XERCES_CPP_NAMESPACE__DOMAttrTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMDocumentType, _p_XERCES_CPP_NAMESPACE__DOMDocumentTypeTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCharacterData, _p_XERCES_CPP_NAMESPACE__DOMCharacterDataTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMText, _p_XERCES_CPP_NAMESPACE__DOMTextTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMComment, _p_XERCES_CPP_NAMESPACE__DOMCommentTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, _p_XERCES_CPP_NAMESPACE__DOMProcessingInstructionTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntity, _p_XERCES_CPP_NAMESPACE__DOMEntityTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMEntityReference, _p_XERCES_CPP_NAMESPACE__DOMEntityReferenceTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, _p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNotation, _p_XERCES_CPP_NAMESPACE__DOMNotationTo_p_XERCES_CPP_NAMESPACE__DOMNode, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNodeList[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNodeList, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMNotation[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMNotation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMText[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMText, 0, 0, 0}, {&_swigt__p_XERCES_CPP_NAMESPACE__DOMCDATASection, _p_XERCES_CPP_NAMESPACE__DOMCDATASectionTo_p_XERCES_CPP_NAMESPACE__DOMText, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMTypeInfo[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMTypeInfo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_XERCES_CPP_NAMESPACE__MemoryManager[] = { {&_swigt__p_XERCES_CPP_NAMESPACE__MemoryManager, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_bool[] = { {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int16_t[] = { {&_swigt__p_int16_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int32_t[] = { {&_swigt__p_int32_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int64_t[] = { {&_swigt__p_int64_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_namelist_t[] = { {&_swigt__p_namelist_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_params_t[] = { {&_swigt__p_params_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ssize_t[] = { {&_swigt__p_ssize_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__listT_Data_t[] = { {&_swigt__p_std__listT_Data_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__multimapT_std__string_Data_t[] = { {&_swigt__p_std__multimapT_std__string_Data_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__string[] = { {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint16_t[] = { {&_swigt__p_uint16_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint32_t[] = { {&_swigt__p_uint32_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint64_t[] = { {&_swigt__p_uint64_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uscxml__ErrorEvent[] = { {&_swigt__p_uscxml__ErrorEvent, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uscxml__Event[] = { {&_swigt__p_uscxml__Event, 0, 0, 0}, {&_swigt__p_uscxml__ErrorEvent, _p_uscxml__ErrorEventTo_p_uscxml__Event, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_Data, + _swigc__p_XERCES_CPP_NAMESPACE__DOMAttr, + _swigc__p_XERCES_CPP_NAMESPACE__DOMCDATASection, + _swigc__p_XERCES_CPP_NAMESPACE__DOMCharacterData, + _swigc__p_XERCES_CPP_NAMESPACE__DOMComment, + _swigc__p_XERCES_CPP_NAMESPACE__DOMDocument, + _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentFragment, + _swigc__p_XERCES_CPP_NAMESPACE__DOMDocumentType, + _swigc__p_XERCES_CPP_NAMESPACE__DOMElement, + _swigc__p_XERCES_CPP_NAMESPACE__DOMEntity, + _swigc__p_XERCES_CPP_NAMESPACE__DOMEntityReference, + _swigc__p_XERCES_CPP_NAMESPACE__DOMException, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNamedNodeMap, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNode, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNodeList, + _swigc__p_XERCES_CPP_NAMESPACE__DOMNotation, + _swigc__p_XERCES_CPP_NAMESPACE__DOMProcessingInstruction, + _swigc__p_XERCES_CPP_NAMESPACE__DOMText, + _swigc__p_XERCES_CPP_NAMESPACE__DOMTypeInfo, + _swigc__p_XERCES_CPP_NAMESPACE__DOMUserDataHandler, + _swigc__p_XERCES_CPP_NAMESPACE__MemoryManager, + _swigc__p_bool, + _swigc__p_int16_t, + _swigc__p_int32_t, + _swigc__p_int64_t, + _swigc__p_namelist_t, + _swigc__p_params_t, + _swigc__p_size_t, + _swigc__p_ssize_t, + _swigc__p_std__listT_Data_t, + _swigc__p_std__multimapT_std__string_Data_t, + _swigc__p_std__string, + _swigc__p_uint16_t, + _swigc__p_uint32_t, + _swigc__p_uint64_t, + _swigc__p_unsigned_char, + _swigc__p_uscxml__ErrorEvent, + _swigc__p_uscxml__Event, + _swigc__p_void, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned statically to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int init; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + iter=module_head; + do { + if (iter==&swig_module) { + /* Our module is already in the list, so there's nothing more to do. */ + return; + } + iter=iter->next; + } while (iter!= module_head); + + /* otherwise we must add our module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpreters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ /* c-mode */ +#endif +} +#endif + + + +/* Forward declaration of where the user's %init{} gets inserted */ +void SWIG_init_user(lua_State* L ); + +#ifdef __cplusplus +extern "C" { +#endif +/* this is the initialization function + added at the very end of the code + the function is always called SWIG_init, but an earlier #define will rename it +*/ +#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)) +LUALIB_API int SWIG_init(lua_State* L) +#else +SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */ +#endif +{ +#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */ + int i; + int globalRegister = 0; + /* start with global table */ + lua_pushglobaltable (L); + /* SWIG's internal initialisation */ + SWIG_InitializeModule((void*)L); + SWIG_PropagateClientData(); +#endif + +#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)) || defined(SWIG_LUA_ELUA_EMULATE) + /* add a global fn */ + SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type); + SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_class_equal); +#endif + +#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) + /* set up base class pointers (the hierarchy) */ + for (i = 0; swig_types[i]; i++){ + if (swig_types[i]->clientdata){ + SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata)); + } + } +#ifdef SWIG_LUA_MODULE_GLOBAL + globalRegister = 1; +#endif + + +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) + SWIG_Lua_namespace_register(L,&swig_SwigModule, globalRegister); +#endif + +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC) + for (i = 0; swig_types[i]; i++){ + if (swig_types[i]->clientdata){ + SWIG_Lua_elua_class_register_instance(L,(swig_lua_class*)(swig_types[i]->clientdata)); + } + } +#endif + +#if defined(SWIG_LUA_ELUA_EMULATE) + lua_newtable(L); + SWIG_Lua_elua_emulate_register(L,swig_SwigModule.ns_methods); + SWIG_Lua_elua_emulate_register_clear(L); + if(globalRegister) { + lua_pushstring(L,swig_SwigModule.name); + lua_pushvalue(L,-2); + lua_rawset(L,-4); + } +#endif + +#endif + +#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) + /* invoke user-specific initialization */ + SWIG_init_user(L); + /* end module */ + /* Note: We do not clean up the stack here (Lua will do this for us). At this + point, we have the globals table and out module table on the stack. Returning + one value makes the module table the result of the require command. */ + return 1; +#else + return 0; +#endif +} + +#ifdef __cplusplus +} +#endif + + +const char* SWIG_LUACODE= + ""; + +void SWIG_init_user(lua_State* L) +{ + SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode->dcast = (swig_dycast_func) DOMNode_dynamic_cast; + + /* exec Lua code if applicable */ + SWIG_Lua_dostring(L,SWIG_LUACODE); +} + diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp index f6cb570..6fc5ac4 100644 --- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp +++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp @@ -17,10 +17,10 @@ * @endcond */ -#include - #include "uscxml/Common.h" +#include "uscxml/util/URL.h" #include "uscxml/util/String.h" + #include "LuaDataModel.h" // disable forcing to bool performance warning @@ -29,31 +29,71 @@ #include "LuaBridge.h" #pragma warning(pop) -#include "uscxml/dom/DOMUtils.h" - -#include "uscxml/Message.h" -#include +#include "uscxml/messages/Event.h" +#include "uscxml/util/DOM.h" +#include +#include -#ifdef BUILD_AS_PLUGINS -#include -#endif +//#include "LuaDOM.cpp.inc" namespace uscxml { -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new LuaDataModelProvider() ); - return true; -} -#endif - -static int luaInspect(lua_State * l) { - return 0; -} +//static int luaInspect(lua_State * l) { +// return 0; +//} bool _luaHasXMLParser = false; +static int luaEval(lua_State* luaState, const std::string& expr) { + int preStack = lua_gettop(luaState); + int error = luaL_loadstring(luaState, expr.c_str()) || lua_pcall(luaState, 0, LUA_MULTRET, 0); + if (error) { + std::string errMsg = lua_tostring(luaState, -1); + lua_pop(luaState, 1); /* pop error message from the stack */ + ERROR_EXECUTION_THROW(errMsg); + } + int postStack = lua_gettop(luaState); + return postStack - preStack; +} + +static Data getLuaAsData(lua_State* _luaState, const luabridge::LuaRef& lua) { + Data data; + if (lua.isFunction()) { + // TODO: this might lead to a stack-overflow + luabridge::LuaRef luaEvald = lua(); + return getLuaAsData(_luaState, luaEvald); + } else if(lua.isLightUserdata() || lua.isUserdata()) { + // not sure what to do + } else if(lua.isThread()) { + // not sure what to do + } else if(lua.isNil()) { + data.atom = "nil"; + data.type = Data::INTERPRETED; + } else if(lua.isNumber()) { + data.atom = toStr(lua.cast()); + data.type = Data::INTERPRETED; + } else if(lua.isString()) { + data.atom = lua.tostring(); + data.type = Data::VERBATIM; + } else if(lua.isTable()) { + bool isArray = false; + bool isMap = false; + for (luabridge::Iterator iter (lua); !iter.isNil(); ++iter) { + luabridge::LuaRef luaKey = iter.key(); + luabridge::LuaRef luaVal = *iter; + if (luaKey.isString()) { + assert(!isArray); + isMap = true; + data.compound[luaKey.tostring()] = getLuaAsData(_luaState, luaVal); + } else { + assert(!isMap); + isArray = true; + data.array.push_back(getLuaAsData(_luaState, luaVal)); + } + } + } + return data; +} static luabridge::LuaRef getDataAsLua(lua_State* _luaState, const Data& data) { luabridge::LuaRef luaData (_luaState); @@ -80,24 +120,24 @@ static luabridge::LuaRef getDataAsLua(lua_State* _luaState, const Data& data) { luaData[compoundIter->first] = getDataAsLua(_luaState, compoundIter->second); compoundIter++; } - luaData["inspect"] = luaInspect; +// luaData["inspect"] = luaInspect; return luaData; } if (data.array.size() > 0) { luaData = luabridge::newTable(_luaState); std::list::const_iterator arrayIter = data.array.begin(); - uint32_t index = 0; +// uint32_t index = 0; while(arrayIter != data.array.end()) { - luaData[index++] = getDataAsLua(_luaState, *arrayIter); +// luaData[index++] = getDataAsLua(_luaState, *arrayIter); + luaData.append(getDataAsLua(_luaState, *arrayIter)); arrayIter++; } - luaData["inspect"] = luaInspect; +// luaData["inspect"] = luaInspect; return luaData; } if (data.atom.size() > 0) { switch (data.type) { case Data::VERBATIM: { -// luaData = "\"" + data.atom + "\""; luaData = data.atom; break; } @@ -109,29 +149,34 @@ static luabridge::LuaRef getDataAsLua(lua_State* _luaState, const Data& data) { luaData = strTo(data.atom); } } else { - luaData = data.atom; + int retVals = luaEval(_luaState, "return(" + data.atom + ");"); + if (retVals == 1) { + luaData = luabridge::LuaRef::fromStack(_luaState, -1); + } + lua_pop(_luaState, retVals); } } } return luaData; } - return luaData; + // hopefully this is nil + return luabridge::LuaRef(_luaState); } LuaDataModel::LuaDataModel() { _luaState = NULL; } -static int luaInFunction(lua_State * l) { - luabridge::LuaRef ref = luabridge::getGlobal(l, "__interpreter"); - InterpreterInfo* interpreter = ref.cast(); +int LuaDataModel::luaInFunction(lua_State * l) { + luabridge::LuaRef ref = luabridge::getGlobal(l, "__datamodel"); + LuaDataModel* dm = ref.cast(); int stackSize = lua_gettop(l); for (size_t i = 0; i < stackSize; i++) { if (!lua_isstring(l, -1 - i)) continue; std::string stateName = lua_tostring(l, -1 - i); - if (interpreter->isInState(stateName)) + if (dm->_callbacks->isInState(stateName)) continue; lua_pushboolean(l, 0); return 1; @@ -140,9 +185,9 @@ static int luaInFunction(lua_State * l) { return 1; } -boost::shared_ptr LuaDataModel::create(InterpreterInfo* interpreter) { - boost::shared_ptr dm = boost::shared_ptr(new LuaDataModel()); - dm->_interpreter = interpreter; +std::shared_ptr LuaDataModel::create(DataModelCallbacks* callbacks) { + std::shared_ptr dm(new LuaDataModel()); + dm->_callbacks = callbacks; dm->_luaState = luaL_newstate(); luaL_openlibs(dm->_luaState); @@ -161,23 +206,33 @@ boost::shared_ptr LuaDataModel::create(InterpreterInfo* interpret LOG(INFO) << e.what(); } - luabridge::getGlobalNamespace(dm->_luaState).beginClass("Interpreter").endClass(); - luabridge::setGlobal(dm->_luaState, dm->_interpreter, "__interpreter"); + luabridge::getGlobalNamespace(dm->_luaState).beginClass("DataModel").endClass(); + luabridge::setGlobal(dm->_luaState, dm.get(), "__datamodel"); luabridge::getGlobalNamespace(dm->_luaState).addCFunction("In", luaInFunction); luabridge::LuaRef ioProcTable = luabridge::newTable(dm->_luaState); - - std::map::const_iterator ioProcIter = dm->_interpreter->getIOProcessors().begin(); - while(ioProcIter != dm->_interpreter->getIOProcessors().end()) { + std::map ioProcs = dm->_callbacks->getIOProcessors(); + std::map::const_iterator ioProcIter = ioProcs.begin(); + while(ioProcIter != ioProcs.end()) { Data ioProcData = ioProcIter->second.getDataModelVariables(); ioProcTable[ioProcIter->first] = getDataAsLua(dm->_luaState, ioProcData); ioProcIter++; } luabridge::setGlobal(dm->_luaState, ioProcTable, "_ioprocessors"); - luabridge::setGlobal(dm->_luaState, dm->_interpreter->getName(), "_name"); - luabridge::setGlobal(dm->_luaState, dm->_interpreter->getSessionId(), "_sessionid"); + luabridge::LuaRef invTable = luabridge::newTable(dm->_luaState); + std::map invokers = dm->_callbacks->getInvokers(); + std::map::const_iterator invIter = invokers.begin(); + while(invIter != invokers.end()) { + Data invData = invIter->second.getDataModelVariables(); + invTable[invIter->first] = getDataAsLua(dm->_luaState, invData); + invIter++; + } + luabridge::setGlobal(dm->_luaState, invTable, "_invokers"); + + luabridge::setGlobal(dm->_luaState, dm->_callbacks->getName(), "_name"); + luabridge::setGlobal(dm->_luaState, dm->_callbacks->getSessionId(), "_sessionid"); return dm; } @@ -187,42 +242,8 @@ LuaDataModel::~LuaDataModel() { lua_close(_luaState); } -void LuaDataModel::pushContext() { -} - -void LuaDataModel::popContext() { -} - -void LuaDataModel::initialize() { -} - -static Data getLuaAsData(const luabridge::LuaRef& lua) { - Data data; - if (lua.isFunction()) { - // TODO: this might lead to a stack-overflow - luabridge::LuaRef luaEvald = lua(); - return getLuaAsData(luaEvald); - } else if(lua.isLightUserdata() || lua.isUserdata()) { - // not sure what to do - } else if(lua.isThread()) { - // not sure what to do - } else if(lua.isNil()) { - data.atom = "undefined"; - data.type = Data::INTERPRETED; - } else if(lua.isString()) { - data.atom = lua.tostring(); - data.type = Data::VERBATIM; - } else if(lua.isNumber()) { - data.atom = lua.tostring(); - data.type = Data::INTERPRETED; - } else if(lua.isTable()) { - for (luabridge::Iterator iter (lua); !iter.isNil (); ++iter) { - luabridge::LuaRef luaKey = iter.key(); - luabridge::LuaRef luaVal = *iter; - data.compound[luaKey.tostring()] = getLuaAsData(luaVal); - } - } - return data; +void LuaDataModel::addExtension(DataModelExtension* ext) { + ERROR_EXECUTION_THROW("Extensions unimplemented in lua datamodel"); } void LuaDataModel::setEvent(const Event& event) { @@ -230,14 +251,17 @@ void LuaDataModel::setEvent(const Event& event) { luaEvent = luabridge::newTable(_luaState); luaEvent["name"] = event.name; - luaEvent["raw"] = event.raw; - luaEvent["xml"] = event.xml; - luaEvent["origin"] = event.origin; - luaEvent["origintype"] = event.origintype; - luaEvent["content"] = event.content; - luaEvent["invokeId"] = event.invokeid; - luaEvent["sendId"] = event.sendid; - luaEvent["inspect"] = luaInspect; + if (event.raw.size() > 0) + luaEvent["raw"] = event.raw; + if (event.origin.size() > 0) + luaEvent["origin"] = event.origin; + if (event.origintype.size() > 0) + luaEvent["origintype"] = event.origintype; + if (event.invokeid.size() > 0) + luaEvent["invokeid"] = event.invokeid; + if (!event.hideSendId) + luaEvent["sendid"] = event.sendid; +// luaEvent["inspect"] = luaInspect; switch (event.eventType) { case Event::INTERNAL: @@ -254,64 +278,44 @@ void LuaDataModel::setEvent(const Event& event) { break; } - if (event.dom) { + if (event.data.node) { if (_luaHasXMLParser) { const luabridge::LuaRef& luaLom = luabridge::getGlobal(_luaState, "lxp.lom"); const luabridge::LuaRef& luaLomParse = luaLom["parse"]; assert(luaLomParse.isFunction()); std::stringstream luaXMLSS; - luaXMLSS << event.dom; + luaXMLSS << event.data.node; try { luaEvent["data"] = luaLomParse(luaXMLSS.str()); } catch (luabridge::LuaException e) { ERROR_EXECUTION_THROW(e.what()); } } else { - // some error events have a dom node attached - do not throw for them - // issue65 - if (!nameMatch("error.*", event.name)) { - ERROR_EXECUTION_THROW("No DOM support in Lua datamodel"); - } - } - } else if (event.content.length() > 0) { - // _event.data is a string or JSON - Data json = Data::fromJSON(event.content); - if (!json.empty()) { - luaEvent["data"] = getDataAsLua(_luaState, json); - } else { - // test179 - std::string trimmed = boost::trim_copy(event.content); - if ((boost::starts_with(trimmed, "'") && boost::ends_with(trimmed, "'")) || - (boost::starts_with(trimmed, "\"") && boost::ends_with(trimmed, "\""))) { - luaEvent["data"] = spaceNormalize(event.content); - } else { - Data tmp(event.content, Data::INTERPRETED); - luaEvent["data"] = getDataAsLua(_luaState, tmp); - } + ERROR_EXECUTION_THROW("No DOM support in Lua datamodel"); } } else { // _event.data is KVP - Event eventCopy(event); + Data d = event.data; - if (!eventCopy.params.empty()) { - Event::params_t::iterator paramIter = eventCopy.params.begin(); - while(paramIter != eventCopy.params.end()) { - eventCopy.data.compound[paramIter->first] = paramIter->second; + if (!event.params.empty()) { + Event::params_t::const_iterator paramIter = event.params.begin(); + while(paramIter != event.params.end()) { + d.compound[paramIter->first] = paramIter->second; paramIter++; } } - if (!eventCopy.namelist.empty()) { - Event::namelist_t::iterator nameListIter = eventCopy.namelist.begin(); - while(nameListIter != eventCopy.namelist.end()) { - eventCopy.data.compound[nameListIter->first] = nameListIter->second; + if (!event.namelist.empty()) { + Event::namelist_t::const_iterator nameListIter = event.namelist.begin(); + while(nameListIter != event.namelist.end()) { + d.compound[nameListIter->first] = nameListIter->second; nameListIter++; } } - if (!eventCopy.data.empty()) { - luabridge::LuaRef luaData = getDataAsLua(_luaState, eventCopy.data); + if (!d.empty()) { + luabridge::LuaRef luaData = getDataAsLua(_luaState, d); assert(luaEvent.isTable()); - assert(luaData.isTable()); + // assert(luaData.isTable()); // not necessarily test179 luaEvent["data"] = luaData; } } @@ -319,31 +323,29 @@ void LuaDataModel::setEvent(const Event& event) { luabridge::setGlobal(_luaState, luaEvent, "_event"); } -Data LuaDataModel::getStringAsData(const std::string& content) { -// Data data = Data::fromJSON(content); +Data LuaDataModel::evalAsData(const std::string& content) { Data data; - if (data.empty()) { - std::string trimmedExpr = boost::trim_copy(content); - if (!boost::starts_with(trimmedExpr, "return")) { - trimmedExpr = "return(" + trimmedExpr + ");"; - } - int retVals = luaEval(Arabica::DOM::Element(), trimmedExpr); + std::string trimmedExpr = boost::trim_copy(content); + + try { + int retVals = luaEval(_luaState, "return(" + trimmedExpr + ")"); if (retVals == 1) { - data = getLuaAsData(luabridge::LuaRef::fromStack(_luaState, -1)); + data = getLuaAsData(_luaState, luabridge::LuaRef::fromStack(_luaState, -1)); } lua_pop(_luaState, retVals); - + } catch (ErrorEvent e) { + int retVals = luaEval(_luaState, trimmedExpr); + if (retVals == 1) { + data = getLuaAsData(_luaState, luabridge::LuaRef::fromStack(_luaState, -1)); + lua_pop(_luaState, retVals); + } else { + lua_pop(_luaState, retVals); + throw e; // we will assume syntax error and throw + } } - return data; -} -bool LuaDataModel::validate(const std::string& location, const std::string& schema) { - return true; -} - -bool LuaDataModel::isLocation(const std::string& expr) { - return true; + return data; } bool LuaDataModel::isValidSyntax(const std::string& expr) { @@ -368,7 +370,9 @@ uint32_t LuaDataModel::getLength(const std::string& expr) { trimmedExpr = "return(#" + trimmedExpr + ")"; } - int retVals = luaEval(Arabica::DOM::Element(), trimmedExpr); + int retVals = luaEval(_luaState, trimmedExpr); + +#if 1 if (retVals == 1 && lua_isnumber(_luaState, -1)) { int result = lua_tointeger(_luaState, -1); @@ -379,6 +383,21 @@ uint32_t LuaDataModel::getLength(const std::string& expr) { lua_pop(_luaState, retVals); ERROR_EXECUTION_THROW("'" + expr + "' does not evaluate to an array."); return 0; +#else + + if (retVals == 1) { + luabridge::LuaRef luaData = luabridge::LuaRef::fromStack(_luaState, -1); + if (luaData.isNumber()) { + lua_pop(_luaState, retVals); + return luaData.cast(); + } + } + lua_pop(_luaState, retVals); + + ERROR_EXECUTION_THROW("'" + expr + "' does not evaluate to an array."); + return 0; + +#endif } void LuaDataModel::setForeach(const std::string& item, @@ -390,152 +409,110 @@ void LuaDataModel::setForeach(const std::string& item, const luabridge::LuaRef& arrRef = luabridge::getGlobal(_luaState, array.c_str()); if (arrRef.isTable()) { - // trigger syntax error for invalid items - int retVals = luaEval(Arabica::DOM::Element(), "return(" + item + ");"); + // triggers syntax error for invalid items, test 152 + int retVals = luaEval(_luaState, item + " = " + array + "[" + toStr(iteration) + "]"); lua_pop(_luaState, retVals); - const luabridge::LuaRef& val = arrRef[iteration]; - luabridge::setGlobal(_luaState, val, item.c_str()); - if (index.length() > 0) { - // assign iteration element to index - luabridge::setGlobal(_luaState, iteration, index.c_str()); + int retVals = luaEval(_luaState, index + " = " + toStr(iteration)); + lua_pop(_luaState, retVals); } } } -void LuaDataModel::eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr) { - luaEval(scriptElem, expr); -} - -int LuaDataModel::luaEval(const Arabica::DOM::Element& scriptElem, - const std::string& expr) { - int preStack = lua_gettop(_luaState); - int error = luaL_loadstring(_luaState, expr.c_str()) || lua_pcall(_luaState, 0, LUA_MULTRET, 0); - if (error) { - std::string errMsg = lua_tostring(_luaState, -1); - lua_pop(_luaState, 1); /* pop error message from the stack */ - ERROR_EXECUTION_THROW(errMsg); - } - int postStack = lua_gettop(_luaState); - return postStack - preStack; -} - bool LuaDataModel::isDeclared(const std::string& expr) { // see: http://lua-users.org/wiki/DetectingUndefinedVariables return true; } -void LuaDataModel::assign(const Arabica::DOM::Element& assignElem, - const Arabica::DOM::Node& node, - const std::string& content) { - std::string key; - if (HAS_ATTR(assignElem, "id")) { - key = ATTR(assignElem, "id"); - } else if (HAS_ATTR(assignElem, "location")) { - key = ATTR(assignElem, "location"); - } - if (key.length() == 0) { + +void LuaDataModel::assign(const std::string& location, const Data& data) { + if (location.length() == 0) { ERROR_EXECUTION_THROW("Assign element has neither id nor location"); } // flags on attribute are ignored? - if (key.compare("_sessionid") == 0) // test 322 + if (location.compare("_sessionid") == 0) // test 322 ERROR_EXECUTION_THROW("Cannot assign to _sessionId"); - if (key.compare("_name") == 0) + if (location.compare("_name") == 0) ERROR_EXECUTION_THROW("Cannot assign to _name"); - if (key.compare("_ioprocessors") == 0) // test 326 + if (location.compare("_ioprocessors") == 0) // test 326 ERROR_EXECUTION_THROW("Cannot assign to _ioprocessors"); - if (key.compare("_invokers") == 0) + if (location.compare("_invokers") == 0) ERROR_EXECUTION_THROW("Cannot assign to _invokers"); - if (key.compare("_event") == 0) + if (location.compare("_event") == 0) ERROR_EXECUTION_THROW("Cannot assign to _event"); -// lua_pushnil(_luaState); -// lua_setglobal(_luaState, key.c_str()); + if (data.node) { + ERROR_EXECUTION_THROW("Cannot assign xml nodes in lua datamodel"); -// luabridge::setGlobal(_luaState, luabridge::Nil(), key.c_str()); -// luabridge::LuaRef val = luabridge::getGlobal(_luaState, key.c_str()); -// std::cout << val.tostring() << std::endl; + // TODO: DOM is prepared by swig - int retVals = 0; +// return SWIG_JSC_NewPointerObj(_ctx, +// (void*)node, +// SWIG_TypeDynamicCast(SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMNode, +// SWIG_as_voidptrptr(&node)), +// 0); - if (HAS_ATTR(assignElem, "expr")) { - retVals = luaEval(Arabica::DOM::Element(), key + " = " + ATTR(assignElem, "expr") + ";"); - } else if (node) { - ERROR_EXECUTION_THROW("Cannot assign xml nodes in lua datamodel"); - } else if (content.size() > 0) { - try { - eval(Arabica::DOM::Element(), key + " = " + content + ";"); - } catch (...) { - eval(Arabica::DOM::Element(), key + " = " + "\"" + spaceNormalize(content) + "\";"); - } + +// JSObjectSetProperty(_ctx, JSContextGetGlobalObject(_ctx), JSStringCreateWithUTF8CString(location.c_str()), getNodeAsValue(data.node), 0, &exception); } else { - eval(Arabica::DOM::Element(), key + " = " + "nil;"); - } -// val = luabridge::getGlobal(_luaState, key.c_str()); -// std::cout << val.tostring() << std::endl; + // trigger error.execution for undefined locations, test286 test311 + int retVals = luaEval(_luaState, location + " = " + location); + lua_pop(_luaState, retVals); -} + luabridge::LuaRef lua = getDataAsLua(_luaState, data); + luabridge::setGlobal(_luaState, lua, location.c_str()); -void LuaDataModel::assign(const std::string& location, const Data& data) { - luabridge::setGlobal(_luaState, getDataAsLua(_luaState, data), location.c_str()); -} - -void LuaDataModel::init(const Arabica::DOM::Element& dataElem, - const Arabica::DOM::Node& node, - const std::string& content) { - assign(dataElem, node, content); +// std::cout << Data::toJSON(evalAsData(location)) << std::endl; + } } void LuaDataModel::init(const std::string& location, const Data& data) { + luabridge::setGlobal(_luaState, luabridge::Nil(), location.c_str()); assign(location, data); } -/** - * The boolean expression language consists of the In predicate only. It has the - * form 'In(id)', where id is the id of a state in the enclosing state machine. - * The predicate must return 'true' if and only if that state is in the current - * state configuration. - */ -bool LuaDataModel::evalAsBool(const Arabica::DOM::Element& node, const std::string& expr) { +bool LuaDataModel::evalAsBool(const std::string& expr) { // we need the result of the expression on the lua stack -> has to "return"! std::string trimmedExpr = boost::trim_copy(expr); - if (!boost::starts_with(trimmedExpr, "return")) { - trimmedExpr = "return(" + trimmedExpr + ");"; - } - int retVals = luaEval(Arabica::DOM::Element(), trimmedExpr); + int retVals = luaEval(_luaState, "return(" + trimmedExpr + ")"); - if (retVals == 1 && lua_isboolean(_luaState, -1)) { + if (retVals == 1) { bool result = lua_toboolean(_luaState, -1); lua_pop(_luaState, 1); return result; } lua_pop(_luaState, retVals); + return false; } +Data LuaDataModel::getAsData(const std::string& content) { + Data data; + std::string trimmedExpr = boost::trim_copy(content); -std::string LuaDataModel::evalAsString(const std::string& expr) { - std::string trimmedExpr = boost::trim_copy(expr); - if (!boost::starts_with(trimmedExpr, "return")) { - trimmedExpr = "return(" + trimmedExpr + ")"; + int retVals = luaEval(_luaState, "__tmp = " + content + "; return __tmp"); + if (retVals == 1) { + data = getLuaAsData(_luaState, luabridge::LuaRef::fromStack(_luaState, -1)); } + lua_pop(_luaState, retVals); - int retVals = luaEval(Arabica::DOM::Element(), trimmedExpr); - - if (retVals == 1 && lua_isstring(_luaState, -1)) { - std::string result = lua_tostring(_luaState, -1); - lua_pop(_luaState, 1); - return result; + // escape as a string, this is sometimes the case with + if (data.atom == "nil" && data.type == Data::INTERPRETED) { + int retVals = luaEval(_luaState, "__tmp = '" + content + "'; return __tmp"); + if (retVals == 1) { + data = getLuaAsData(_luaState, luabridge::LuaRef::fromStack(_luaState, -1)); + } + lua_pop(_luaState, retVals); } - lua_pop(_luaState, retVals); - return ""; + + return data; } + std::string LuaDataModel::andExpressions(std::list exprs) { std::stringstream exprSS; std::list::const_iterator listIter; diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.h b/src/uscxml/plugins/datamodel/lua/LuaDataModel.h index eb23815..4e2fd43 100644 --- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.h +++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.h @@ -20,20 +20,20 @@ #ifndef LUADATAMODEL_H_113E014C #define LUADATAMODEL_H_113E014C -#include "uscxml/InterpreterInfo.h" #include "uscxml/plugins/DataModel.h" #include -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - extern "C" { #include "lua.h" #include "lualib.h" #include "lauxlib.h" } +#ifdef BUILD_AS_PLUGINS +#include "uscxml/plugins/Plugins.h" +#endif + + namespace uscxml { class Event; class Data; @@ -45,7 +45,9 @@ class LuaDataModel : public DataModelImpl { public: LuaDataModel(); virtual ~LuaDataModel(); - virtual boost::shared_ptr create(InterpreterInfo* interpreter); + virtual std::shared_ptr create(DataModelCallbacks* callbacks); + + virtual void addExtension(DataModelExtension* ext); virtual std::list getNames() { std::list names; @@ -53,46 +55,31 @@ public: return names; } - virtual void initialize(); - virtual void setEvent(const Event& event); - - virtual bool validate(const std::string& location, const std::string& schema); - virtual bool isLocation(const std::string& expr); virtual bool isValidSyntax(const std::string& expr); + virtual void setEvent(const Event& event); + + // foreach virtual uint32_t getLength(const std::string& expr); virtual void setForeach(const std::string& item, const std::string& array, const std::string& index, uint32_t iteration); - virtual void pushContext(); - virtual void popContext(); - - virtual void assign(const Arabica::DOM::Element& assignElem, - const Arabica::DOM::Node& node, - const std::string& content); - virtual void assign(const std::string& location, const Data& data); - - virtual void init(const Arabica::DOM::Element& dataElem, - const Arabica::DOM::Node& node, - const std::string& content); - virtual void init(const std::string& location, const Data& data); + virtual bool evalAsBool(const std::string& expr); + virtual Data evalAsData(const std::string& expr); + virtual Data getAsData(const std::string& content); - virtual Data getStringAsData(const std::string& content); virtual bool isDeclared(const std::string& expr); - virtual void eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr); - virtual std::string evalAsString(const std::string& expr); - virtual bool evalAsBool(const Arabica::DOM::Element& node, const std::string& expr); + virtual void assign(const std::string& location, const Data& data); + virtual void init(const std::string& location, const Data& data); virtual std::string andExpressions(std::list); protected: - virtual int luaEval(const Arabica::DOM::Element& scriptElem, - const std::string& expr); + static int luaInFunction(lua_State * l); lua_State* _luaState; }; diff --git a/src/uscxml/plugins/datamodel/lua/bindings.i b/src/uscxml/plugins/datamodel/lua/bindings.i new file mode 100644 index 0000000..24b756b --- /dev/null +++ b/src/uscxml/plugins/datamodel/lua/bindings.i @@ -0,0 +1,38 @@ +#define XERCES_HAS_CPP_NAMESPACE 1 + +%include + +%module LuaDOM + +%import "uscxml/config.h" +%import "uscxml/Common.h" + +%import "xercesc/util/XercesDefs.hpp" +%import "xercesc/util/Xerces_autoconf_config.hpp" + +%include "../common/bindings/dom/ignore.i" +%include "../common/bindings/dom/defines.i" +%include "../common/bindings/dom/typemaps-general.i" + +// in typemap +%typemap(in) XMLCh * %{ + $1 = Lua2XMLString($input); +%} + +%typemap(freearg) XMLCh * %{ + delete[] $1; +%} + +// out typemap +%typemap(out) XMLCh * %{ + $result = XMLString2Lua($1); +%} + +%include "../common/bindings/dom/dom.i" + +// Operators we do want +// %rename(operator_assignment) operator=; +%rename(operator_equal_to) operator==; +%rename(operator_not_equal_to) operator!=; + +%include "../common/bindings/event.i" diff --git a/src/uscxml/plugins/datamodel/null/NULLDataModel.cpp b/src/uscxml/plugins/datamodel/null/NULLDataModel.cpp index 7211dc5..773a970 100644 --- a/src/uscxml/plugins/datamodel/null/NULLDataModel.cpp +++ b/src/uscxml/plugins/datamodel/null/NULLDataModel.cpp @@ -21,10 +21,7 @@ #include "uscxml/Common.h" #include "NULLDataModel.h" -#include "uscxml/dom/DOMUtils.h" - -#include "uscxml/Message.h" -#include +#include "uscxml/util/DOM.h" #ifdef BUILD_AS_PLUGINS #include @@ -43,28 +40,16 @@ bool pluginConnect(pluma::Host& host) { NULLDataModel::NULLDataModel() { } -boost::shared_ptr NULLDataModel::create(InterpreterInfo* interpreter) { - boost::shared_ptr dm = boost::shared_ptr(new NULLDataModel()); - dm->_interpreter = interpreter; +std::shared_ptr NULLDataModel::create(DataModelCallbacks* callbacks) { + std::shared_ptr dm(new NULLDataModel()); + dm->_callbacks = callbacks; return dm; } NULLDataModel::~NULLDataModel() { } -void NULLDataModel::pushContext() { -} - -void NULLDataModel::popContext() { -} - -void NULLDataModel::initialize() { -} - -void NULLDataModel::setEvent(const Event& event) { -} - -Data NULLDataModel::getStringAsData(const std::string& content) { +Data NULLDataModel::getAsData(const std::string& content) { Data data = Data::fromJSON(content); if (data.empty()) { data = Data(content, Data::VERBATIM); @@ -72,39 +57,13 @@ Data NULLDataModel::getStringAsData(const std::string& content) { return data; } -bool NULLDataModel::validate(const std::string& location, const std::string& schema) { - return true; -} - -bool NULLDataModel::isLocation(const std::string& expr) { - return true; -} - -uint32_t NULLDataModel::getLength(const std::string& expr) { - return 0; -} - -void NULLDataModel::setForeach(const std::string& item, - const std::string& array, - const std::string& index, - uint32_t iteration) { -} - -void NULLDataModel::eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr) { -} - -bool NULLDataModel::isDeclared(const std::string& expr) { - return true; -} - /** * The boolean expression language consists of the In predicate only. It has the * form 'In(id)', where id is the id of a state in the enclosing state machine. * The predicate must return 'true' if and only if that state is in the current * state configuration. */ -bool NULLDataModel::evalAsBool(const Arabica::DOM::Element& node, const std::string& expr) { +bool NULLDataModel::evalAsBool(const xercesc::DOMElement* scriptNode, const std::string& expr) { std::string trimmedExpr = expr; boost::trim(trimmedExpr); if (!boost::istarts_with(trimmedExpr, "in")) @@ -138,7 +97,7 @@ bool NULLDataModel::evalAsBool(const Arabica::DOM::Element& node, c stateName = *stateIter; } - if (_interpreter->isInState(stateName)) { + if (_callbacks->isInState(stateName)) { continue; } return false; @@ -146,9 +105,4 @@ bool NULLDataModel::evalAsBool(const Arabica::DOM::Element& node, c return true; } -std::string NULLDataModel::evalAsString(const std::string& expr) { - return expr; -} - - } \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/null/NULLDataModel.h b/src/uscxml/plugins/datamodel/null/NULLDataModel.h index f813ae1..c584357 100644 --- a/src/uscxml/plugins/datamodel/null/NULLDataModel.h +++ b/src/uscxml/plugins/datamodel/null/NULLDataModel.h @@ -20,7 +20,6 @@ #ifndef NULLDATAMODEL_H_KN8TWG0V #define NULLDATAMODEL_H_KN8TWG0V -#include "uscxml/InterpreterInfo.h" #include "uscxml/plugins/DataModel.h" #include @@ -39,7 +38,7 @@ class NULLDataModel : public DataModelImpl { public: NULLDataModel(); virtual ~NULLDataModel(); - virtual boost::shared_ptr create(InterpreterInfo* interpreter); + virtual std::shared_ptr create(DataModelCallbacks* callbacks); virtual std::list getNames() { std::list names; @@ -47,38 +46,64 @@ public: return names; } - virtual void initialize(); - virtual void setEvent(const Event& event); + virtual bool validate(const std::string& location, const std::string& schema) { + return true; + } + virtual bool isValidSyntax(const std::string& expr) { + return true; // overwrite when datamodel supports it + } + virtual void setEvent(const Event& event) {} - virtual bool validate(const std::string& location, const std::string& schema); - virtual bool isLocation(const std::string& expr); + size_t replaceExpressions(std::string& content) { + return 0; + } - virtual uint32_t getLength(const std::string& expr); + // foreach + virtual uint32_t getLength(const std::string& expr) { + return 0; + } virtual void setForeach(const std::string& item, const std::string& array, const std::string& index, - uint32_t iteration); + uint32_t iteration) {} - virtual void pushContext(); - virtual void popContext(); + virtual Data getAsData(const std::string& content); + + virtual Data evalAsData(const std::string& content) { + return getAsData(content); + } + virtual std::string evalAsString(const std::string& expr) { + return expr; + } - virtual void assign(const Arabica::DOM::Element& assignElem, - const Arabica::DOM::Node& node, + virtual bool evalAsBool(const xercesc::DOMElement* scriptNode, + const std::string& expr); + virtual bool evalAsBool(const std::string& expr) { + return evalAsBool(NULL, expr); + } + + virtual bool isDeclared(const std::string& expr) { + return true; + } + + virtual void assign(const xercesc::DOMElement* assignElem, + const xercesc::DOMNode* node, const std::string& content) {} virtual void assign(const std::string& location, const Data& data) {} - virtual void init(const Arabica::DOM::Element& dataElem, - const Arabica::DOM::Node& node, + virtual void init(const xercesc::DOMElement* dataElem, + const xercesc::DOMNode* node, const std::string& content) {} virtual void init(const std::string& location, const Data& data) {} - virtual Data getStringAsData(const std::string& content); - virtual bool isDeclared(const std::string& expr); + virtual void setCallbacks(DataModelCallbacks* callbacks) { + _callbacks = callbacks; + } - virtual void eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr); - virtual std::string evalAsString(const std::string& expr); - virtual bool evalAsBool(const Arabica::DOM::Element& node, const std::string& expr); + virtual void addExtension(DataModelExtension* ext) {} + virtual std::string andExpressions(std::list) { + return ""; + } protected: diff --git a/src/uscxml/plugins/datamodel/prolog/swi/SWIConfig.h.in b/src/uscxml/plugins/datamodel/prolog/swi/SWIConfig.h.in deleted file mode 100644 index e3127b0..0000000 --- a/src/uscxml/plugins/datamodel/prolog/swi/SWIConfig.h.in +++ /dev/null @@ -1,4 +0,0 @@ -#cmakedefine SWI_HAS_PL_NIL -#cmakedefine SWI_HAS_PL_DICT -#cmakedefine SWI_HAS_PL_LIST_PAIR -#cmakedefine SWI_REINTERPRET_FOREIGN \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp deleted file mode 100644 index 8b120c8..0000000 --- a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp +++ /dev/null @@ -1,891 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include - -#include "uscxml/Common.h" -#include "uscxml/config.h" -#include "uscxml/util/String.h" -#include "uscxml/URL.h" -#include "SWIDataModel.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/Message.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -// these are defined but not exported by swi-prolog 7 -extern "C" { - PL_EXPORT(int) PL_is_dict(term_t t); - PL_EXPORT(int) PL_for_dict(term_t dict, int (*func)(term_t key, term_t value, int last, void *closure), void *closure, int flags); -} -#define RETHROW_PLEX_AS_EVENT \ -catch (PlException plex) { \ - ERROR_EXECUTION_THROW((char*)plex); \ -} \ - -#define PL_MODULE \ -_interpreter.getSessionId().c_str() \ - -#define SET_PL_ENGINE(dm) \ -assert(_swiEngines.find(dm) != _swiEngines.end()); \ -int rc = PL_set_engine(_swiEngines[dm], NULL); \ -assert(rc == PL_ENGINE_SET); \ -_dmPtr = dm; - -namespace uscxml { - -using namespace Arabica::XPath; -using namespace Arabica::DOM; - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new SWIDataModelProvider() ); - return true; -} -#endif - -// SWI prolog does not support passing user data -static SWIDataModel* _dmPtr; -static std::map _swiEngines; - -PL_blob_t SWIDataModel::blobType = { - PL_BLOB_MAGIC, - PL_BLOB_NOCOPY, - (char*)"blob", - releaseBlob, - compareBlob, - writeBlob, - acquireBlob -}; - -SWIDataModel::SWIDataModel() { -} - -SWIDataModel::~SWIDataModel() { - try { - if (_swiEngines.find(this) != _swiEngines.end()) { - PL_destroy_engine(_swiEngines[this]); - _swiEngines.erase(this); - } - } - RETHROW_PLEX_AS_EVENT; -} - -boost::shared_ptr SWIDataModel::create(InterpreterInfo* interpreter) { - try { - boost::shared_ptr dm = boost::shared_ptr(new SWIDataModel()); - dm->_interpreter = interpreter; - - const char* swibin = getenv("SWI_BINARY"); - if (swibin == NULL) - swibin = SWI_BINARY; - const char* quiet = "--quiet"; - - int argc = 2; - static char * av[] = { - (char*)swibin, - (char*)quiet, - NULL - }; - - if (!PL_is_initialised(NULL, NULL)) { - if(!PL_initialise(argc,av)) { - LOG(ERROR) << "Error intializing prolog engine"; - PL_halt(1); - return boost::shared_ptr(); - } - - PL_set_engine(PL_ENGINE_CURRENT, &_engine); - - // load SWI XML parser - try { - PlCall("use_module", PlCompound("library", PlTerm("sgml"))); - } catch (PlException plex) { - - LOG(ERROR) << "Cannot load prolog sgml module - make sure you have it installed in your prolog runtime: " << (char*)plex; - throw plex; - } - - // load json parser - try { - PlCall("use_module", PlCompound("library", PlTerm("http/json"))); - PlCall("use_module", PlCompound("library", PlTerm("http/json_convert"))); - } catch (PlException plex) { - LOG(ERROR) << "Cannot load prolog json module or json_convert - make sure you have it installed in your prolog runtime: " << (char*)plex; - throw plex; - } - - } else { - LOG(WARNING) << "Instantiating more than one SWI prolog datamodel will lead to weird effects as I cannot seperate the environments"; -// engine = PL_create_engine(NULL); - } - -// assert(engine); -// _swiEngines[dm.get()] = engine; - _dmPtr = dm.get(); - -// int rc = PL_set_engine(engine, NULL); -// assert(rc == PL_ENGINE_SET); -// (void)rc; - - _plModule = boost::replace_all_copy(interpreter->getSessionId(), "-", ""); - boost::replace_all(_plModule, "0", "g"); - boost::replace_all(_plModule, "1", "h"); - boost::replace_all(_plModule, "2", "i"); - boost::replace_all(_plModule, "3", "j"); - boost::replace_all(_plModule, "4", "k"); - boost::replace_all(_plModule, "5", "l"); - boost::replace_all(_plModule, "6", "m"); - boost::replace_all(_plModule, "7", "n"); - boost::replace_all(_plModule, "8", "o"); - boost::replace_all(_plModule, "9", "p"); - - // use atoms for double quoted - PlCall("set_prolog_flag(double_quotes,atom)."); - - // set system variables - PlCall("assert", PlCompound("sessionid", PlTerm(PlString(dm->_interpreter->getSessionId().c_str())))); - PlCall("assert", PlCompound("name", PlTerm(PlString(dm->_interpreter->getName().c_str())))); - - std::map::const_iterator ioProcIter = dm->_interpreter->getIOProcessors().begin(); - while(ioProcIter != dm->_interpreter->getIOProcessors().end()) { - Data ioProcData = ioProcIter->second.getDataModelVariables(); - - if (ioProcIter->first.find_first_of(":/'") == std::string::npos) { - std::stringstream ioProcShortCall; - ioProcShortCall << "assert(ioprocessors(" << ioProcIter->first << "(location('" << ioProcData.compound["location"].atom << "'))))"; - PlCall(ioProcShortCall.str().c_str()); - } - std::stringstream ioProcCall; - ioProcCall << "assert(ioprocessors(name('" << ioProcIter->first << "'), location('" << ioProcData.compound["location"].atom << "')))"; - PlCall(ioProcCall.str().c_str()); - - ioProcIter++; - } - - // the in predicate - PlRegister("user", "in", 1, SWIDataModel::inPredicate); - PL_set_engine(NULL, NULL); - return dm; - } - RETHROW_PLEX_AS_EVENT; -} - -foreign_t SWIDataModel::inPredicate(term_t a0, int arity, void* context) { - try { - char *s; - if ( PL_get_atom_chars(a0, &s) ) { - if (_dmPtr->_interpreter->isInState(s)) { - return true; - } - } - return FALSE; - } - RETHROW_PLEX_AS_EVENT; -} - -void SWIDataModel::registerIOProcessor(const std::string& name, const IOProcessor& ioprocessor) { -// std::cout << "SWIDataModel::registerIOProcessor" << std::endl; -} - -void SWIDataModel::setSessionId(const std::string& sessionId) { -// std::cout << "SWIDataModel::setSessionId" << std::endl; - _sessionId = sessionId; -} - -void SWIDataModel::setName(const std::string& name) { -// std::cout << "SWIDataModel::setName" << std::endl; - _name = name; -} - -void SWIDataModel::pushContext() { -// std::cout << "SWIDataModel::pushContext" << std::endl; -} - -void SWIDataModel::popContext() { -// std::cout << "SWIDataModel::popContext" << std::endl; -} - -void SWIDataModel::initialize() { -// std::cout << "SWIDataModel::initialize" << std::endl; -} - -void SWIDataModel::setEvent(const Event& event) { - SWIEngineLock engineLock; - - // remove old event - try { - PlCall("retractall(event(_))"); - - // simple values - PlCall("assert", PlCompound("event", PlCompound("name", PlTerm(event.name.c_str())))); - PlCall("assert", PlCompound("event", PlCompound("origin", PlString(event.origin.c_str())))); - PlCall("assert", PlCompound("event", PlCompound("origintype", PlString(event.invokeid.c_str())))); - PlCall("assert", PlCompound("event", PlCompound("invokeid", PlTerm(event.origintype.c_str())))); - PlCall("assert", PlCompound("event", PlCompound("raw", PlString(event.raw.c_str())))); - - // event.type - std::string type; - switch (event.eventType) { - case Event::PLATFORM: - type = "platform"; - break; - case Event::INTERNAL: - type = "internal"; - break; - case Event::EXTERNAL: - type = "external"; - break; - } - PlCall("assert", PlCompound("event", PlCompound("type", PlTerm(type.c_str())))); - - // event.sendid - if (!event.hideSendId) - PlCall("assert", PlCompound("event", PlCompound("sendid", PlTerm(event.sendid.c_str())))); - - // event.data - URL domUrl; - if (event.dom) { - std::stringstream dataInitStr; - std::stringstream xmlDoc; -// xmlDoc << event.getFirstDOMElement(); - xmlDoc << event.dom; - domUrl = URL::toLocalFile(xmlDoc.str(), ".pl"); - dataInitStr << "load_xml_file('" << domUrl.asLocalFile(".pl") << "', XML), copy_term(XML,DATA), assert(event(data(DATA)))"; - PlCall(dataInitStr.str().c_str()); - } else if (event.content.size() > 0) { - PlCall("assert", PlCompound("event", PlCompound("data", PlString(spaceNormalize(event.content).c_str())))); - } else if (!event.data.empty()) { - assertFromData(event.data, "event(data(", 2); - } - - Event::params_t::const_iterator paramIter = event.params.begin(); - while(paramIter != event.params.end()) { - assertFromData(paramIter->second, "event(param(" + paramIter->first + "(", 3); - paramIter++; - } - - Event::namelist_t::const_iterator namelistIter = event.namelist.begin(); - while(namelistIter != event.namelist.end()) { - assertFromData(paramIter->second, "event(param(" + namelistIter->first + "(", 3); - namelistIter++; - } - -#if 0 - // event.params - size_t uniqueKeys = 0; - Event::params_t::const_iterator paramIter = event.params.begin(); - while(paramIter != event.params.end()) { - uniqueKeys++; - paramIter = event.params.upper_bound(paramIter->first); - } - if (uniqueKeys > 0) { - paramIter = event.params.begin(); - for(int i = 0; paramIter != event.params.end(); i++) { - std::stringstream paramArray; - Event::params_t::const_iterator lastValueIter = event.params.upper_bound(paramIter->first); - - paramArray << paramIter->first << "(["; - std::string termSep = ""; - - for (size_t j = 0; paramIter != lastValueIter; j++) { - paramArray << termSep << "'" << paramIter->second << "'"; - termSep = ", "; - paramIter++; - } - paramArray << "])"; - std::stringstream paramExpr; - paramExpr << "assert(event(param(" << paramArray.str() << ")))"; - //std::cout << paramExpr.str() << std::endl; - PlCall(paramExpr.str().c_str()); - - paramIter = lastValueIter; - } - } -#endif - } - RETHROW_PLEX_AS_EVENT; -} - -void SWIDataModel::assertFromData(const Data& data, const std::string& expr, size_t nesting) { - if (data.atom.size() > 0) { - // terminal branch, this is where we assert - - std::stringstream ss; - ss << expr; -// nesting++; - - if (data.type == Data::VERBATIM) { - ss << "\"" << data.atom << "\""; - } else { - ss << data.atom; - } - - for (size_t i = 0; i < nesting; i++) { - ss << ")"; - } - -// std::cout << ss.str() << std::endl; - PlCall("assert", PlCompound(ss.str().c_str())); - return; - } - - if (data.compound.size() > 0) { - std::map::const_iterator compIter = data.compound.begin(); - while(compIter != data.compound.end()) { -// std::cout << compIter->first << std::endl; - std::stringstream prefix; - size_t prefixNesting = 0; - size_t oldPos = 0; - size_t pos = 0; - while((pos = compIter->first.find_first_of(",.(-", oldPos)) != std::string::npos) { - prefix << compIter->first.substr(oldPos, pos - oldPos) << "("; - prefixNesting++; - oldPos = pos + 1; - } - if (oldPos != compIter->first.size()) { - prefix << compIter->first.substr(oldPos, compIter->first.size() - oldPos) << "("; - prefixNesting++; - } - assertFromData(compIter->second, expr + prefix.str(), nesting + prefixNesting); - compIter++; - } - } - - if (data.array.size() > 0) { - std::list::const_iterator arrIter = data.array.begin(); - while(arrIter != data.array.end()) { - assertFromData(*arrIter, expr, nesting); - arrIter++; - } - } - - if (data.node) { - std::stringstream dataInitStr; - std::stringstream xmlDoc; - - xmlDoc << data.node; - URL domUrl = URL::toLocalFile(xmlDoc.str(), ".pl"); - dataInitStr << "load_xml_file('" << domUrl.asLocalFile(".pl") << "', XML), "; - dataInitStr << "copy_term(XML,DATA), "; - dataInitStr << "assert("; - dataInitStr << expr << "(DATA)"; - - for (size_t i = 0; i < nesting; i++) { - dataInitStr << ")"; - } - - PlCall(dataInitStr.str().c_str()); - return; - } -} - -#if 0 -std::list SWIDataModel::getSolutions(PlCompound compound) { - std::list solutions; - - PlTermv termv(compound.arity()); - for (size_t i = 0; i < compound.arity(); i++) { - termv[i] = compound[i + 1]; - } - PlQuery query(compound.name(), termv); - while(query.next_solution()) { -// std::cout << (char*)compound << std::endl; - solutions.push_back(compound); - } - return solutions; -} -#endif - -Data SWIDataModel::getStringAsData(const std::string& content) { - SWIEngineLock engineLock; - try { - PlCompound compound(content.c_str()); - PlCompound orig(content.c_str()); - Data data; - - PlTermv termv(compound.arity()); - for (size_t i = 0; i < compound.arity(); i++) { - termv[i] = compound[i + 1]; - } - PlQuery query(compound.name(), termv); - - while(query.next_solution()) { - std::map vars = resolveAtoms(compound, orig); - std::map::const_iterator varIter = vars.begin(); - - while(varIter != vars.end()) { - data.merge(termAsData(varIter->second)); - varIter++; - } - - } -// std::cout << Data::toJSON(data) << std::endl; - return data; - } catch (PlException plex) { - try { - // could not parse as compound, try term and type in termAsData - PlTerm term(content.c_str()); - return(termAsData(term)); - } - RETHROW_PLEX_AS_EVENT - } - return Data(); -} - -Data SWIDataModel::termAsData(PlTerm term) { - - Data data; -// std::cout << term.name() << (char*)term << std::endl; - - switch (term.type()) { - case PL_TERM: - for (size_t i = 1; i <= term.arity(); i++) { // arguments start at 1 - data.compound[term.name()] = termAsData(term[i]); - } - break; - case PL_VARIABLE: - case PL_INTEGER: - case PL_FLOAT: - case PL_SHORT: - case PL_INT: - case PL_LONG: - case PL_DOUBLE: - data.atom = std::string(term); - data.type = Data::INTERPRETED; - break; - case PL_STRING: - case PL_ATOM: - data.atom = std::string(term); - data.type = Data::VERBATIM; - break; -#ifdef SWI_HAS_PL_NIL - case PL_NIL: - data.array.push_back(Data("", Data::VERBATIM)); - break; -#endif -#ifdef SWI_HAS_PL_LIST_PAIR - case PL_LIST_PAIR: { - PlTail tail(term); - PlTerm item; - while(tail.next(item)) { - data.array.push_back(termAsData(item)); - } - break; - } -#endif -#ifdef SWI_HAS_DICT - case PL_DICT: { - std::string key(term); - size_t curlyPos = key.find_first_of("{"); - if (curlyPos == std::string::npos || curlyPos == 0) { - // no key given - PL_for_dict(term, SWIDataModel::dictCallBack, &data, 0); - } else { - // with key given - Data& tmp = data.compound[boost::trim_copy(key.substr(0, curlyPos))]; - PL_for_dict(term, SWIDataModel::dictCallBack, &tmp, 0); - } - break; - } -#endif - default: - LOG(ERROR) << "Prolog type " << term.type() << " at '" << (char*)term << "' not supported"; - break; - } - return data; -} - -int SWIDataModel::dictCallBack(term_t key, term_t value, int last, void *closure) { - Data* data = (Data*)closure; - PlTerm keyTerm(key); - data->compound[(char*)keyTerm] = termAsData(value); - return 0; -} - -PlTerm SWIDataModel::dataAsTerm(Data data) { - if (data.atom.length() > 0) { - return PlTerm(data.atom.c_str()); - } - if (data.array.size() > 0) { - PlTerm head; - PlTail list(head); - - std::list::const_iterator arrIter = data.array.begin(); - while(arrIter != data.array.end()) { - list.append(dataAsTerm(*arrIter)); - arrIter++; - } - list.close(); - return PlTail(head); - } - if (data.compound.size() > 0) { - if (data.compound.size() == 1 && data.compound.begin()->second.array.size() > 0) { - // this used to be a prolog compound - const Data& arr = data.compound.begin()->second; - PlTermv termv(arr.array.size()); - int index = 0; - - std::list::const_iterator arrIter = arr.array.begin(); - while(arrIter != arr.array.end()) { - termv[index] = dataAsTerm(*arrIter); - index++; - arrIter++; - } - return PlCompound(data.compound.begin()->first.c_str(), termv); - } else if (data.compound.size() == 1 && data.compound.begin()->second.compound.size() > 0) { - // this used to be a named dict - until we have dict support in C/C++ use PL_chars_to_term - std::stringstream dictSS; - std::string seperator; - dictSS << data.compound.begin()->first << "{"; - - std::map::const_iterator keyIter = data.compound.begin()->second.compound.begin(); - while(keyIter != data.compound.begin()->second.compound.end()) { - dictSS << seperator << keyIter->first << ":" << (char*)dataAsTerm(keyIter->second); - seperator = ","; - keyIter++; - } - dictSS << "}"; - return PlCompound(dictSS.str().c_str()); - - } else { - // an array of dicts - PlTermv termv(data.compound.size()); - int index = 0; - - std::map::const_iterator compIter = data.compound.begin(); - while(compIter != data.compound.end()) { - termv[index] = PlCompound(compIter->first.c_str(), dataAsTerm(compIter->second)); - index++; - compIter++; - } - return PlCompound(data.compound.begin()->first.c_str(), termv); - - } - } - if (data.binary) { - LOG(ERROR) << "Binary data with prolog datamodel still very experimental"; -// term_t binTerm = PL_new_term_ref(); -// PL_put_blob(binTerm, data.binary->data, data.binary->size, &blobType); -// return binTerm; - } - if (data.node) { - LOG(ERROR) << "DOM in event with prolog datamodel still very experimental"; - std::stringstream dataInitStr; - std::stringstream xmlDoc; - // xmlDoc << event.getFirstDOMElement(); - xmlDoc << data.node; - URL domUrl = URL::toLocalFile(xmlDoc.str(), ".pl"); - dataInitStr << "load_xml_file('" << domUrl.asLocalFile(".pl") << "', XML), copy_term(XML,DATA), assert(event(data(DATA)))"; - PlCall(dataInitStr.str().c_str()); - } - - return PlTerm(); -} - -bool SWIDataModel::validate(const std::string& location, const std::string& schema) { - SWIEngineLock engineLock; -// std::cout << "SWIDataModel::validate" << std::endl; - return true; -} - -bool SWIDataModel::isLocation(const std::string& expr) { - return true; -} - -uint32_t SWIDataModel::getLength(const std::string& expr) { - SWIEngineLock engineLock; - try { - PlCompound compound(expr.c_str()); - PlTermv termv(compound.arity()); - for (size_t i = 0; i < compound.arity(); i++) { - termv[i] = compound[i + 1]; - } - PlQuery query(compound.name(), termv); - uint32_t length = 0; - while(query.next_solution() > 0) - length++; - return length; - } - RETHROW_PLEX_AS_EVENT; -} - -void SWIDataModel::setForeach(const std::string& item, - const std::string& array, - const std::string& index, - uint32_t iteration) { - SWIEngineLock engineLock; - try { - PlCompound compound(array.c_str()); - PlCompound orig(array.c_str()); - PlTermv termv(compound.arity()); - for (size_t i = 0; i < compound.arity(); i++) { - termv[i] = compound[i + 1]; - } - { - int tmp = iteration + 1; - PlQuery query(compound.name(), termv); - while (tmp) { - query.next_solution(); - tmp--; - } - } - PlCall("retractall", PlCompound(index.c_str(), 1)); - PlCall("retractall", PlCompound(item.c_str(), 1)); - PlCall("assert", PlCompound(index.c_str(), PlTerm((long)iteration))); - - std::map vars = resolveAtoms(compound, orig); - std::map::iterator varIter = vars.begin(); - while(varIter != vars.end()) { - PlCall("assert", PlCompound(item.c_str(), varIter->second)); - varIter++; - } - } - RETHROW_PLEX_AS_EVENT; -} - -void SWIDataModel::eval(const Element& scriptElem, const std::string& expr) { - SWIEngineLock engineLock; - try { - if (scriptElem && HAS_ATTR(scriptElem, "type") && iequals(ATTR(scriptElem, "type"), "query")) { - evalAsBool(expr); - } else { - URL localPLFile = URL::toLocalFile(expr, ".pl"); - PlCall("user", "load_files", PlTermv(localPLFile.asLocalFile(".pl").c_str())) || LOG(ERROR) << "Could not execute prolog from file"; - } - } - RETHROW_PLEX_AS_EVENT; -} - -bool SWIDataModel::evalAsBool(const std::string& expr) { - return evalAsBool(Arabica::DOM::Element(), expr); -} - -bool SWIDataModel::evalAsBool(const Arabica::DOM::Element& node, const std::string& expr) { - SWIEngineLock engineLock; - try { - PlCompound compound(expr.c_str()); - PlTermv termv(compound.arity()); - for (size_t i = 0; i < compound.arity(); i++) { - termv[i] = compound[i + 1]; - } - PlQuery query(compound.name(), termv); - return query.next_solution() > 0; - } - RETHROW_PLEX_AS_EVENT - catch(...) { - return false; - } -} - -std::string SWIDataModel::evalAsString(const std::string& expr) { - SWIEngineLock engineLock; - try { - - PlCompound compound(expr.c_str()); - - if (strlen(compound.name())) { - PlCompound orig(expr.c_str()); - - PlTermv termv(compound.arity()); - for (size_t i = 0; i < compound.arity(); i++) { - termv[i] = compound[i + 1]; - } - PlQuery query(compound.name(), termv); - - std::stringstream ss; - std::string solSeparator = ""; - while (query.next_solution()) { - ss << solSeparator; - std::map vars = resolveAtoms(compound, orig); - std::map::const_iterator varIter = vars.begin(); - - std::string varSeparator = ""; - while(varIter != vars.end()) { - ss << varSeparator << (char *)varIter->second; - varSeparator = ", "; - varIter++; - } - solSeparator = "\n"; - } - return ss.str(); - } - return std::string(compound); - - } catch(PlException plex) { - // we got an exception while trying to evaluate as compound - PlTerm term(expr.c_str()); - if (term.type() == PL_ATOM || term.type() == PL_CHARS || term.type() == PL_STRING) { - return std::string(term); - } else { - ERROR_EXECUTION_THROW((char*)plex); - } - } -} - - -// this is similar to http://etalis.googlecode.com/svn/eEtalis/src/term.c -std::map SWIDataModel::resolveAtoms(PlTerm& term, PlTerm& orig) { - try { - std::map atoms; - switch (orig.type()) { - case PL_VARIABLE: { - atoms[(char *)orig] = term; - break; - } - case PL_ATOM: - break; - case PL_STRING: - break; - case PL_INTEGER: - break; - case PL_TERM: - for (size_t i = 1; i <= orig.arity(); i++) { - PlTerm newTerm = term[i]; - PlTerm newOrig = orig[i]; - std::map result = resolveAtoms(newTerm, newOrig); - atoms.insert(result.begin(), result.end()); - } - break; - default: - LOG(ERROR) << "Resolving variable of unknown type in query solution"; - } - return atoms; - } - RETHROW_PLEX_AS_EVENT -} - -void SWIDataModel::assign(const Element& assignElem, - const Node& node, - const std::string& content) { - SWIEngineLock engineLock; - try { - std::string expr = content; - std::string predicate; - if (HAS_ATTR(assignElem, "expr")) { - expr = ATTR(assignElem, "expr"); - } - if (HAS_ATTR(assignElem, "id")) - predicate = ATTR(assignElem, "id"); - if (HAS_ATTR(assignElem, "location")) - predicate = ATTR(assignElem, "location"); - - if (predicate.size() > 0) { - std::string callAssert = "assert"; - std::string type; - if (HAS_ATTR(assignElem, "type")) { - type = ATTR(assignElem, "type"); - if(iequals(type, "append")) { - callAssert = "assertz"; - } else if(iequals(type, "prepend")) { - callAssert = "asserta"; - } - } - - URL domUrl; - Data json; - if (!node) - json = Data::fromJSON(expr); - if (node) { - std::stringstream dataInitStr; - std::stringstream xmlDoc; - Node child = node; - while(child) { - xmlDoc << child; - child = child.getNextSibling(); - } - domUrl = URL::toLocalFile(xmlDoc.str(), ".pl"); - if (iequals(type, "retract")) - PlCall("retractall", PlCompound(predicate.c_str(), 1)); - dataInitStr << "load_xml_file('" << domUrl.asLocalFile(".pl") << "', XML), copy_term(XML,DATA), " << callAssert << "(" << predicate << "(DATA))"; - PlCall(dataInitStr.str().c_str()); - } else if (!json.empty()) { - std::stringstream dataInitStr; - if (iequals(type, "retract")) - PlCall("retractall", PlCompound(predicate.c_str(), 1)); - dataInitStr << "json_to_prolog(" << expr << ", JSON), assert(" << predicate << "(JSON))"; - PlCall(dataInitStr.str().c_str()); - } else { - // treat content as . seperated facts - std::stringstream factStream(expr); - std::string item; - while(std::getline(factStream, item, '.')) { - std::string fact = boost::trim_copy(item); - if (fact.length() == 0) - continue; - PlCall((callAssert + "(" + predicate + "(" + fact + "))").c_str()); - } - } - } else if (expr.length() > 0) { - if (boost::equals(TAGNAME(assignElem), "data")) { - eval(assignElem, expr); - } else { - std::stringstream exprStream(expr); - std::string item; - while(std::getline(exprStream, item, '.')) { - std::string plExpr = boost::trim_copy(item); - if (plExpr.length() == 0) - continue; - PlCall(plExpr.c_str()); - } - } - } - } - RETHROW_PLEX_AS_EVENT -} - -void SWIDataModel::assign(const std::string& location, const Data& data) { - eval(Element(), data.atom); -} - -void SWIDataModel::init(const Element& dataElem, - const Node& node, - const std::string& content) { - assign(dataElem, node, content); -} -void SWIDataModel::init(const std::string& location, const Data& data) { - assign(location, data); -} - -bool SWIDataModel::isDeclared(const std::string& expr) { - return true; -} - -void SWIDataModel::acquireBlob(atom_t symbol) { -} - - -int SWIDataModel::releaseBlob(atom_t symbol) { - return TRUE; -} - -int SWIDataModel::compareBlob(atom_t a, atom_t b) { - return 0; -} - -int SWIDataModel::writeBlob(void *s, atom_t symbol, int flags) { - return TRUE; -} - - -} diff --git a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h deleted file mode 100644 index e968b61..0000000 --- a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h +++ /dev/null @@ -1,137 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef SWIDATAMODEL_H_KN8TWG0V -#define SWIDATAMODEL_H_KN8TWG0V - -#include "uscxml/InterpreterInfo.h" -#include "uscxml/plugins/DataModel.h" -#include "uscxml/SWIConfig.h" - -#include -#include - - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class SWIDataModel : public DataModelImpl { -public: - class SWIEngineLock { - public: - SWIEngineLock() { - isLocked = false; - int rc = PL_set_engine(PL_ENGINE_MAIN, NULL); - if (rc == PL_ENGINE_SET) { - isLocked = true; - } - } - ~SWIEngineLock() { - if (isLocked) - PL_set_engine(NULL, NULL); - } - bool isLocked; - }; - - SWIDataModel(); - virtual ~SWIDataModel(); - virtual boost::shared_ptr create(InterpreterInfo* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("prolog"); - return names; - } - - virtual void initialize(); - virtual void setSessionId(const std::string& sessionId); - virtual void setName(const std::string& name); - virtual void setEvent(const Event& event); - - virtual void registerIOProcessor(const std::string& name, const IOProcessor& ioprocessor); - - virtual bool validate(const std::string& location, const std::string& schema); - virtual bool isLocation(const std::string& expr); - - virtual uint32_t getLength(const std::string& expr); - virtual void setForeach(const std::string& item, - const std::string& array, - const std::string& index, - uint32_t iteration); - - virtual void pushContext(); - virtual void popContext(); - - virtual void assign(const Arabica::DOM::Element& assignElem, - const Arabica::DOM::Node& node, - const std::string& content); - virtual void assign(const std::string& location, const Data& data); - - virtual void init(const Arabica::DOM::Element& dataElem, - const Arabica::DOM::Node& node, - const std::string& content); - virtual void init(const std::string& location, const Data& data); - - virtual void eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr); - - virtual bool isDeclared(const std::string& expr); - - virtual Data getStringAsData(const std::string& content); - - virtual std::string evalAsString(const std::string& expr); - virtual bool evalAsBool(const Arabica::DOM::Element& node, const std::string& expr); - virtual bool evalAsBool(const std::string& expr); - - static foreign_t inPredicate(term_t a0, int arity, void* context); -protected: - void assertFromData(const Data& data, const std::string& expr, size_t nesting); - - static Data termAsData(PlTerm term); - static PlTerm dataAsTerm(Data data); - -// virtual std::list getSolutions(PlCompound compound); - virtual std::map resolveAtoms(PlTerm& term, PlTerm& orig); - - static int dictCallBack(term_t key, term_t value, int last, void *closure); - - static PL_blob_t blobType; - static void acquireBlob(atom_t symbol); - static int releaseBlob(atom_t symbol); - static int compareBlob(atom_t a, atom_t b); - static int writeBlob(void *s, atom_t symbol, int flags); - - Event _event; - - std::string _plModule; - std::string _name; - std::string _sessionId; - PL_engine_t _engine; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(SWIDataModel, DataModelImpl); -#endif - -} - -#endif /* end of include guard: SWIDATAMODEL_H_KN8TWG0V */ diff --git a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.new b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.new deleted file mode 100644 index 8238577..0000000 --- a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.new +++ /dev/null @@ -1,962 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include - -#include "uscxml/Common.h" -#include "uscxml/config.h" -#include "SWIDataModel.h" -#include "uscxml/DOMUtils.h" -#include "uscxml/Message.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -// these are defined but not exported by swi-prolog 7 -extern "C" { - PL_EXPORT(int) PL_is_dict(term_t t); - PL_EXPORT(int) PL_for_dict(term_t dict, int (*func)(term_t key, term_t value, int last, void *closure), void *closure, int flags); -} -#define RETHROW_PLEX_AS_EVENT \ -catch (PlException plex) { \ - ERROR_EXECUTION_THROW((char*)plex); \ -} \ - -#define PL_MODULE \ -_interpreter.getSessionId().c_str() \ - -#define SET_PL_ENGINE(dm) \ -assert(_swiEngines.find(dm) != _swiEngines.end()); \ -int rc = PL_set_engine(_swiEngines[dm], NULL); \ -assert(rc == PL_ENGINE_SET); \ -_dmPtr = dm; - -namespace uscxml { - -using namespace Arabica::XPath; -using namespace Arabica::DOM; - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new SWIDataModelProvider() ); - return true; -} -#endif - -// SWI prolog does not support passing user data -static SWIDataModel* _dmPtr; -static std::map _swiEngines; - -PL_blob_t SWIDataModel::blobType = { - PL_BLOB_MAGIC, - PL_BLOB_NOCOPY, - (char*)"blob", - releaseBlob, - compareBlob, - writeBlob, - acquireBlob -}; - -SWIDataModel::SWIDataModel() { -} - -SWIDataModel::~SWIDataModel() { - try { - if (_swiEngines.find(this) != _swiEngines.end()) { - PL_destroy_engine(_swiEngines[this]); - _swiEngines.erase(this); - } - } - RETHROW_PLEX_AS_EVENT; -} - -boost::shared_ptr SWIDataModel::create(InterpreterImpl* interpreter) { - try { - boost::shared_ptr dm = boost::shared_ptr(new SWIDataModel()); - dm->_interpreter = interpreter; - - const char* swibin = getenv("SWI_BINARY"); - if (swibin == NULL) - swibin = SWI_BINARY; - const char* quiet = "--quiet"; - - int argc = 2; - static char * av[] = { - (char*)swibin, - (char*)quiet, - NULL - }; - - if (!PL_is_initialised(NULL, NULL)) { - if(!PL_initialise(argc,av)) { - LOG(ERROR) << "Error intializing prolog engine"; - PL_halt(1); - return boost::shared_ptr(); - } - - PL_set_engine(PL_ENGINE_CURRENT, &_engine); - - // load SWI XML parser - try { - PlCall("use_module", PlCompound("library", PlTerm("sgml"))); - } catch (PlException plex) { - - LOG(ERROR) << "Cannot load prolog sgml module - make sure you have it installed in your prolog runtime: " << (char*)plex; - throw plex; - } - - // load json parser - try { - PlCall("use_module", PlCompound("library", PlTerm("http/json"))); - PlCall("use_module", PlCompound("library", PlTerm("http/json_convert"))); - } catch (PlException plex) { - LOG(ERROR) << "Cannot load prolog json module or json_convert - make sure you have it installed in your prolog runtime: " << (char*)plex; - throw plex; - } - - } else { - LOG(WARNING) << "Instantiating more than one SWI prolog datamodel will lead to weird effects as I cannot seperate the environments"; -// engine = PL_create_engine(NULL); - } - -// assert(engine); -// _swiEngines[dm.get()] = engine; - _dmPtr = dm.get(); - -// int rc = PL_set_engine(engine, NULL); -// assert(rc == PL_ENGINE_SET); -// (void)rc; - - _plModule = boost::replace_all_copy(interpreter->getSessionId(), "-", ""); - boost::replace_all(_plModule, "0", "g"); - boost::replace_all(_plModule, "1", "h"); - boost::replace_all(_plModule, "2", "i"); - boost::replace_all(_plModule, "3", "j"); - boost::replace_all(_plModule, "4", "k"); - boost::replace_all(_plModule, "5", "l"); - boost::replace_all(_plModule, "6", "m"); - boost::replace_all(_plModule, "7", "n"); - boost::replace_all(_plModule, "8", "o"); - boost::replace_all(_plModule, "9", "p"); - - // use atoms for double quoted - PlCall("set_prolog_flag(double_quotes,atom)."); - - // set system variables - PlCall("assert", PlCompound("sessionid", PlTerm(PlString(dm->_interpreter->getSessionId().c_str())))); - PlCall("assert", PlCompound("name", PlTerm(PlString(dm->_interpreter->getName().c_str())))); - - std::map::const_iterator ioProcIter = dm->_interpreter->getIOProcessors().begin(); - while(ioProcIter != dm->_interpreter->getIOProcessors().end()) { - Data ioProcData = ioProcIter->second.getDataModelVariables(); - - if (ioProcIter->first.find_first_of(":/'") == std::string::npos) { - std::stringstream ioProcShortCall; - ioProcShortCall << "assert(ioprocessors(" << ioProcIter->first << "(location('" << ioProcData.compound["location"].atom << "'))))"; - PlCall(ioProcShortCall.str().c_str()); - } - std::stringstream ioProcCall; - ioProcCall << "assert(ioprocessors(name('" << ioProcIter->first << "'), location('" << ioProcData.compound["location"].atom << "')))"; - PlCall(ioProcCall.str().c_str()); - - ioProcIter++; - } - - // the in predicate - PlRegister("user", "in", 1, SWIDataModel::inPredicate); - PL_set_engine(NULL, NULL); - return dm; - } - RETHROW_PLEX_AS_EVENT; -} - -foreign_t SWIDataModel::inPredicate(term_t a0, int arity, void* context) { - try { - char *s; - if ( PL_get_atom_chars(a0, &s) ) { - if (_dmPtr->_interpreter->isInState(s)) { - return true; - } - } - return FALSE; - } - RETHROW_PLEX_AS_EVENT; -} - -void SWIDataModel::registerIOProcessor(const std::string& name, const IOProcessor& ioprocessor) { -// std::cout << "SWIDataModel::registerIOProcessor" << std::endl; -} - -void SWIDataModel::setSessionId(const std::string& sessionId) { -// std::cout << "SWIDataModel::setSessionId" << std::endl; - _sessionId = sessionId; -} - -void SWIDataModel::setName(const std::string& name) { -// std::cout << "SWIDataModel::setName" << std::endl; - _name = name; -} - -void SWIDataModel::pushContext() { -// std::cout << "SWIDataModel::pushContext" << std::endl; -} - -void SWIDataModel::popContext() { -// std::cout << "SWIDataModel::popContext" << std::endl; -} - -void SWIDataModel::initialize() { -// std::cout << "SWIDataModel::initialize" << std::endl; -} - -void SWIDataModel::setEvent(const Event& event) { - SWIEngineLock engineLock; - - // remove old event - try { - PlCall("retractall(event(_))"); - - // simple values - PlCall("assert", PlCompound("event", PlCompound("name", PlTerm(event.name.c_str())))); - PlCall("assert", PlCompound("event", PlCompound("origin", PlString(event.origin.c_str())))); - PlCall("assert", PlCompound("event", PlCompound("origintype", PlString(event.invokeid.c_str())))); - PlCall("assert", PlCompound("event", PlCompound("invokeid", PlTerm(event.origintype.c_str())))); - PlCall("assert", PlCompound("event", PlCompound("raw", PlString(event.raw.c_str())))); - - // event.type - std::string type; - switch (event.eventType) { - case Event::PLATFORM: - type = "platform"; - break; - case Event::INTERNAL: - type = "internal"; - break; - case Event::EXTERNAL: - type = "external"; - break; - } - PlCall("assert", PlCompound("event", PlCompound("type", PlTerm(type.c_str())))); - - // event.sendid - if (!event.hideSendId) - PlCall("assert", PlCompound("event", PlCompound("sendid", PlTerm(event.sendid.c_str())))); - - // event.data - URL domUrl; - if (event.dom) { - std::stringstream dataInitStr; - std::stringstream xmlDoc; -// xmlDoc << event.getFirstDOMElement(); - xmlDoc << event.dom; - domUrl = URL::toLocalFile(xmlDoc.str(), ".pl"); - dataInitStr << "load_xml_file('" << domUrl.asLocalFile(".pl") << "', XML), copy_term(XML,DATA), assert(event(data(DATA)))"; - PlCall(dataInitStr.str().c_str()); - } else if (event.content.size() > 0) { - PlCall("assert", PlCompound("event", PlCompound("data", PlString(InterpreterImpl::spaceNormalize(event.content).c_str())))); - } else if (!event.data.empty()) { - assertFromData(event.data, "event(data(", 2); - } - - Event::params_t::const_iterator paramIter = event.params.begin(); - while(paramIter != event.params.end()) { - assertFromData(paramIter->second, "event(param(" + paramIter->first + "(", 3); - paramIter++; - } - - Event::namelist_t::const_iterator namelistIter = event.namelist.begin(); - while(namelistIter != event.namelist.end()) { - assertFromData(paramIter->second, "event(param(" + namelistIter->first + "(", 3); - namelistIter++; - } - -#if 0 - // event.params - size_t uniqueKeys = 0; - Event::params_t::const_iterator paramIter = event.params.begin(); - while(paramIter != event.params.end()) { - uniqueKeys++; - paramIter = event.params.upper_bound(paramIter->first); - } - if (uniqueKeys > 0) { - paramIter = event.params.begin(); - for(int i = 0; paramIter != event.params.end(); i++) { - std::stringstream paramArray; - Event::params_t::const_iterator lastValueIter = event.params.upper_bound(paramIter->first); - - paramArray << paramIter->first << "(["; - std::string termSep = ""; - - for (int j = 0; paramIter != lastValueIter; j++) { - paramArray << termSep << "'" << paramIter->second << "'"; - termSep = ", "; - paramIter++; - } - paramArray << "])"; - std::stringstream paramExpr; - paramExpr << "assert(event(param(" << paramArray.str() << ")))"; - //std::cout << paramExpr.str() << std::endl; - PlCall(paramExpr.str().c_str()); - - paramIter = lastValueIter; - } - } -#endif - } - RETHROW_PLEX_AS_EVENT; -} - -void SWIDataModel::assertFromData(const Data& data, const std::string& expr, size_t nesting) { - if (data.atom.size() > 0) { - // terminal branch, this is where we assert - - std::stringstream ss; - ss << expr; -// nesting++; - - if (data.type == Data::VERBATIM) { - ss << "\"" << data.atom << "\""; - } else { - ss << data.atom; - } - - for (size_t i = 0; i < nesting; i++) { - ss << ")"; - } - -// std::cout << ss.str() << std::endl; - PlCall("assert", PlCompound(ss.str().c_str())); - return; - } - - if (data.compound.size() > 0) { - std::map::const_iterator compIter = data.compound.begin(); - while(compIter != data.compound.end()) { -// std::cout << compIter->first << std::endl; - std::stringstream prefix; - size_t prefixNesting = 0; - size_t oldPos = 0; - size_t pos = 0; - while((pos = compIter->first.find_first_of(",.(-", oldPos)) != std::string::npos) { - prefix << compIter->first.substr(oldPos, pos - oldPos) << "("; - prefixNesting++; - oldPos = pos + 1; - } - if (oldPos != compIter->first.size()) { - prefix << compIter->first.substr(oldPos, compIter->first.size() - oldPos) << "("; - prefixNesting++; - } - assertFromData(compIter->second, expr + prefix.str(), nesting + prefixNesting); - compIter++; - } - } - - if (data.array.size() > 0) { - std::list::const_iterator arrIter = data.array.begin(); - while(arrIter != data.array.end()) { - assertFromData(*arrIter, expr, nesting); - arrIter++; - } - } - - if (data.node) { - std::stringstream dataInitStr; - std::stringstream xmlDoc; - - xmlDoc << data.node; - URL domUrl = URL::toLocalFile(xmlDoc.str(), ".pl"); - dataInitStr << "load_xml_file('" << domUrl.asLocalFile(".pl") << "', XML), "; - dataInitStr << "copy_term(XML,DATA), "; - dataInitStr << "assert("; - dataInitStr << expr << "(DATA)"; - - for (size_t i = 0; i < nesting; i++) { - dataInitStr << ")"; - } - - PlCall(dataInitStr.str().c_str()); - return; - } -} - -#if 0 -std::list SWIDataModel::getSolutions(PlCompound compound) { - std::list solutions; - - PlTermv termv(compound.arity()); - for (int i = 0; i < compound.arity(); i++) { - termv[i] = compound[i + 1]; - } - PlQuery query(compound.name(), termv); - while(query.next_solution()) { -// std::cout << (char*)compound << std::endl; - solutions.push_back(compound); - } - return solutions; -} -#endif - -Data SWIDataModel::getStringAsData(const std::string& content) { - SWIEngineLock engineLock; - try { - PlCompound compound(content.c_str()); - PlCompound orig(content.c_str()); - Data data; - - PlTermv termv(compound.arity()); - for (int i = 0; i < compound.arity(); i++) { - termv[i] = compound[i + 1]; - } - PlQuery query(compound.name(), termv); - - while(query.next_solution()) { - std::map vars = resolveAtoms(compound, orig); - std::map::const_iterator varIter = vars.begin(); - - while(varIter != vars.end()) { - data.merge(termAsData(varIter->second)); - varIter++; - } - - } -// std::cout << Data::toJSON(data) << std::endl; - return data; - } catch (PlException plex) { - try { - // could not parse as compound, try term and type in termAsData - PlTerm term(content.c_str()); - return(termAsData(term)); - } - RETHROW_PLEX_AS_EVENT - } - return Data(); -} - -Data SWIDataModel::termAsData(PlTerm term) { - - Data data; -// std::cout << term.name() << (char*)term << std::endl; - - switch (term.type()) { - case PL_TERM: - for (int i = 1; i <= term.arity(); i++) { // arguments start at 1 - data.compound[term.name()] = termAsData(term[i]); - } - break; - case PL_VARIABLE: - case PL_INTEGER: - case PL_FLOAT: - case PL_SHORT: - case PL_INT: - case PL_LONG: - case PL_DOUBLE: - data.atom = std::string(term); - data.type = Data::INTERPRETED; - break; - case PL_STRING: - case PL_ATOM: - data.atom = std::string(term); - data.type = Data::VERBATIM; - break; -#ifdef SWI_HAS_PL_NIL - case PL_NIL: - data.array.push_back(Data("", Data::VERBATIM)); - break; -#endif -#ifdef SWI_HAS_PL_LIST_PAIR - case PL_LIST_PAIR: { - PlTail tail(term); - PlTerm item; - while(tail.next(item)) { - data.array.push_back(termAsData(item)); - } - break; - } -#endif -#ifdef SWI_HAS_DICT - case PL_DICT: { - std::string key(term); - size_t curlyPos = key.find_first_of("{"); - if (curlyPos == std::string::npos || curlyPos == 0) { - // no key given - PL_for_dict(term, SWIDataModel::dictCallBack, &data, 0); - } else { - // with key given - Data& tmp = data.compound[boost::trim_copy(key.substr(0, curlyPos))]; - PL_for_dict(term, SWIDataModel::dictCallBack, &tmp, 0); - } - break; - } -#endif - default: - LOG(ERROR) << "Prolog type " << term.type() << " at '" << (char*)term << "' not supported"; - break; - } - return data; -} - -int SWIDataModel::dictCallBack(term_t key, term_t value, int last, void *closure) { - Data* data = (Data*)closure; - PlTerm keyTerm(key); - data->compound[(char*)keyTerm] = termAsData(value); - return 0; -} - -PlTerm SWIDataModel::dataAsTerm(Data data) { - if (data.atom.length() > 0) { - return PlTerm(data.atom.c_str()); - } - if (data.array.size() > 0) { - PlTerm head; - PlTail list(head); - - std::list::const_iterator arrIter = data.array.begin(); - while(arrIter != data.array.end()) { - list.append(dataAsTerm(*arrIter)); - arrIter++; - } - list.close(); - return PlTail(head); - } - if (data.compound.size() > 0) { - if (data.compound.size() == 1 && data.compound.begin()->second.array.size() > 0) { - // this used to be a prolog compound - const Data& arr = data.compound.begin()->second; - PlTermv termv(arr.array.size()); - int index = 0; - - std::list::const_iterator arrIter = arr.array.begin(); - while(arrIter != arr.array.end()) { - termv[index] = dataAsTerm(*arrIter); - index++; - arrIter++; - } - return PlCompound(data.compound.begin()->first.c_str(), termv); - } else if (data.compound.size() == 1 && data.compound.begin()->second.compound.size() > 0) { - // this used to be a named dict - until we have dict support in C/C++ use PL_chars_to_term - std::stringstream dictSS; - std::string seperator; - dictSS << data.compound.begin()->first << "{"; - - std::map::const_iterator keyIter = data.compound.begin()->second.compound.begin(); - while(keyIter != data.compound.begin()->second.compound.end()) { - dictSS << seperator << keyIter->first << ":" << (char*)dataAsTerm(keyIter->second); - seperator = ","; - keyIter++; - } - dictSS << "}"; - return PlCompound(dictSS.str().c_str()); - - } else { - // an array of dicts - PlTermv termv(data.compound.size()); - int index = 0; - - std::map::const_iterator compIter = data.compound.begin(); - while(compIter != data.compound.end()) { - termv[index] = PlCompound(compIter->first.c_str(), dataAsTerm(compIter->second)); - index++; - compIter++; - } - return PlCompound(data.compound.begin()->first.c_str(), termv); - - } - } - if (data.binary) { - LOG(ERROR) << "Binary data with prolog datamodel still very experimental"; -// term_t binTerm = PL_new_term_ref(); -// PL_put_blob(binTerm, data.binary->data, data.binary->size, &blobType); -// return binTerm; - } - if (data.node) { - LOG(ERROR) << "DOM in event with prolog datamodel still very experimental"; - std::stringstream dataInitStr; - std::stringstream xmlDoc; - // xmlDoc << event.getFirstDOMElement(); - xmlDoc << data.node; - URL domUrl = URL::toLocalFile(xmlDoc.str(), ".pl"); - dataInitStr << "load_xml_file('" << domUrl.asLocalFile(".pl") << "', XML), copy_term(XML,DATA), assert(event(data(DATA)))"; - PlCall(dataInitStr.str().c_str()); - } - - return PlTerm(); -} - -bool SWIDataModel::validate(const std::string& location, const std::string& schema) { - SWIEngineLock engineLock; -// std::cout << "SWIDataModel::validate" << std::endl; - return true; -} - -bool SWIDataModel::isLocation(const std::string& expr) { - return true; -} - -uint32_t SWIDataModel::getLength(const std::string& expr) { - SWIEngineLock engineLock; - try { - PlCompound compound(expr.c_str()); - PlTermv termv(compound.arity()); - for (int i = 0; i < compound.arity(); i++) { - termv[i] = compound[i + 1]; - } - PlQuery query(compound.name(), termv); - uint32_t length = 0; - while(query.next_solution() > 0) - length++; - return length; - } - RETHROW_PLEX_AS_EVENT; -} - -void SWIDataModel::setForeach(const std::string& item, - const std::string& array, - const std::string& index, - uint32_t iteration) { - SWIEngineLock engineLock; - try { - PlCompound compound(array.c_str()); - PlCompound orig(array.c_str()); - PlTermv termv(compound.arity()); - for (int i = 0; i < compound.arity(); i++) { - termv[i] = compound[i + 1]; - } - { - int tmp = iteration + 1; - PlQuery query(compound.name(), termv); - while (tmp) { - query.next_solution(); - tmp--; - } - } - PlCall("retractall", PlCompound(index.c_str(), 1)); - PlCall("retractall", PlCompound(item.c_str(), 1)); - PlCall("assert", PlCompound(index.c_str(), PlTerm((long)iteration))); - - std::map vars = resolveAtoms(compound, orig); - std::map::iterator varIter = vars.begin(); - while(varIter != vars.end()) { - PlCall("assert", PlCompound(item.c_str(), varIter->second)); - varIter++; - } - } - RETHROW_PLEX_AS_EVENT; -} - -void SWIDataModel::eval(const Element& scriptElem, const std::string& expr) { - SWIEngineLock engineLock; - try { - if (scriptElem && HAS_ATTR(scriptElem, "type") && iequals(ATTR(scriptElem, "type"), "query")) { - evalAsBool(expr); - } else { - URL localPLFile = URL::toLocalFile(expr, ".pl"); - PlCall("user", "load_files", PlTermv(localPLFile.asLocalFile(".pl").c_str())) || LOG(ERROR) << "Could not execute prolog from file"; - } - } - RETHROW_PLEX_AS_EVENT; -} - -bool SWIDataModel::evalAsBool(const std::string& expr) { - return evalAsBool(Arabica::DOM::Element(), expr); -} - -bool SWIDataModel::evalAsBool(const Arabica::DOM::Element& node, const std::string& expr) { - SWIEngineLock engineLock; - try { - PlCompound compound(expr.c_str()); - PlTermv termv(compound.arity()); - for (int i = 0; i < compound.arity(); i++) { - termv[i] = compound[i + 1]; - } - PlQuery query(compound.name(), termv); - return query.next_solution() > 0; - } - RETHROW_PLEX_AS_EVENT - catch(...) { - return false; - } -} - -std::string SWIDataModel::evalAsString(const std::string& expr) { - SWIEngineLock engineLock; - try { - - PlCompound compound(expr.c_str()); - - if (strlen(compound.name())) { - PlCompound orig(expr.c_str()); - - PlTermv termv(compound.arity()); - for (int i = 0; i < compound.arity(); i++) { - termv[i] = compound[i + 1]; - } - PlQuery query(compound.name(), termv); - - std::stringstream ss; - std::string solSeparator = ""; - while (query.next_solution()) { - ss << solSeparator; - std::map vars = resolveAtoms(compound, orig); - std::map::const_iterator varIter = vars.begin(); - - std::string varSeparator = ""; - while(varIter != vars.end()) { - ss << varSeparator << (char *)varIter->second; - varSeparator = ", "; - varIter++; - } - solSeparator = "\n"; - } - return ss.str(); - } - return std::string(compound); - - } catch(PlException plex) { - // we got an exception while trying to evaluate as compound - PlTerm term(expr.c_str()); - if (term.type() == PL_ATOM || term.type() == PL_CHARS || term.type() == PL_STRING) { - return std::string(term); - } else { - ERROR_EXECUTION_THROW((char*)plex); - } - } -} - - -// this is similar to http://etalis.googlecode.com/svn/eEtalis/src/term.c -std::map SWIDataModel::resolveAtoms(PlTerm& term, PlTerm& orig) { - try { - std::map atoms; - switch (orig.type()) { - case PL_VARIABLE: { - atoms[(char *)orig] = term; - break; - } - case PL_ATOM: - break; - case PL_STRING: - break; - case PL_INTEGER: - break; - case PL_TERM: - for (int i = 1; i <= orig.arity(); i++) { - PlTerm newTerm = term[i]; - PlTerm newOrig = orig[i]; - std::map result = resolveAtoms(newTerm, newOrig); - atoms.insert(result.begin(), result.end()); - } - break; - default: - LOG(ERROR) << "Resolving variable of unknown type in query solution"; - } - return atoms; - } - RETHROW_PLEX_AS_EVENT -} - -void SWIDataModel::assign(const Element& assignElem, - const Node& node, - const std::string& content) { - SWIEngineLock engineLock; - try { - std::string callAssert = "assert"; - std::string solution; - std::string expr = content; - std::string predicate; - if (HAS_ATTR(assignElem, "solution")) - solution = ATTR(assignElem, "solution"); - if (HAS_ATTR(assignElem, "expr")) - expr = ATTR(assignElem, "expr"); - if (HAS_ATTR(assignElem, "id")) - predicate = ATTR(assignElem, "id"); - if (HAS_ATTR(assignElem, "location")) - predicate = ATTR(assignElem, "location"); - - if (solution.size() > 0 && expr.size() > 0 && predicate.size() > 0) { - // - std::cout << expr + ", " + callAssert + "(" + predicate + "(" + solution + "))" << std::endl; - PlCall((expr + ", " + callAssert + "(" + predicate + "(" + solution + "))").c_str()); - return; - } - - if (expr.size() > 0 && predicate.size()) { - Data json = Data::fromJSON(expr); - if (!json.empty()) { - std::cout << callAssert + "(" + predicate + ")" << std::endl; - PlCall((callAssert + "(" + predicate + ")").c_str()); - // expression is a JSON structure! - std::stringstream dataInitStr; - // if (iequals(type, "retract")) - // PlCall("retractall", PlCompound(predicate.c_str(), 1)); - dataInitStr << "json_to_prolog(" << expr << ", JSON), assert(" << predicate << "(JSON))"; - PlCall(dataInitStr.str().c_str()); - return; - } - } - - if (expr.size() > 0 && predicate.size()) { - // treat content as . seperated facts - std::stringstream factStream(expr); - std::string item; - while(std::getline(factStream, item, '.')) { - std::string fact = boost::trim_copy(item); - if (fact.length() == 0) - continue; - std::cout << callAssert + "(" + predicate + "(" + fact + "))" << std::endl; - PlCall((callAssert + "(" + predicate + "(" + fact + "))").c_str()); - } - return; - } - - if (predicate.size() > 0) { - std::cout << callAssert + "(" + predicate + ")" << std::endl; - PlCall((callAssert + "(" + predicate + ")").c_str()); - return; - } - - abort(); - - if (expr.size() == 0) { - // no expression, just assert id or idlocation - std::cout << callAssert + "(" + predicate + ")" << std::endl; - PlCall((callAssert + "(" + predicate + ")").c_str()); - return; - } - - - std::cout << expr + ", " + callAssert + "(" + predicate + ")" << std::endl; - PlCall((expr + ", " + callAssert + "(" + predicate + ")").c_str()); - - - } -#if 0 - try { - std::string expr = content; - std::string predicate; - if (HAS_ATTR(assignElem, "expr")) { - expr = ATTR(assignElem, "expr"); - } - if (HAS_ATTR(assignElem, "id")) - predicate = ATTR(assignElem, "id"); - if (HAS_ATTR(assignElem, "location")) - predicate = ATTR(assignElem, "location"); - - if (predicate.size() > 0) { - std::string callAssert = "assert"; - std::string type; - if (HAS_ATTR(assignElem, "type")) { - type = ATTR(assignElem, "type"); - if(iequals(type, "append")) { - callAssert = "assertz"; - } else if(iequals(type, "prepend")) { - callAssert = "asserta"; - } - } - - URL domUrl; - Data json; - if (!node) - json = Data::fromJSON(expr); - if (node) { - std::stringstream dataInitStr; - std::stringstream xmlDoc; - Node child = node; - while(child) { - xmlDoc << child; - child = child.getNextSibling(); - } - domUrl = URL::toLocalFile(xmlDoc.str(), ".pl"); - if (iequals(type, "retract")) - PlCall("retractall", PlCompound(predicate.c_str(), 1)); - dataInitStr << "load_xml_file('" << domUrl.asLocalFile(".pl") << "', XML), copy_term(XML,DATA), " << callAssert << "(" << predicate << "(DATA))"; - PlCall(dataInitStr.str().c_str()); - } else if (!json.empty()) { - std::stringstream dataInitStr; - if (iequals(type, "retract")) - PlCall("retractall", PlCompound(predicate.c_str(), 1)); - dataInitStr << "json_to_prolog(" << expr << ", JSON), assert(" << predicate << "(JSON))"; - PlCall(dataInitStr.str().c_str()); - } else { - // treat content as . seperated facts - std::stringstream factStream(content); - std::string item; - while(std::getline(factStream, item, '.')) { - std::string fact = boost::trim_copy(item); - if (fact.length() == 0) - continue; - PlCall((callAssert + "(" + predicate + "(" + fact + "))").c_str()); - } - } - } else if (expr.length() > 0) { - if (boost::equals(TAGNAME(assignElem), "data")) { - eval(assignElem, expr); - } else { - std::stringstream exprStream(expr); - std::string item; - while(std::getline(exprStream, item, '.')) { - std::string plExpr = boost::trim_copy(item); - if (plExpr.length() == 0) - continue; - PlCall(plExpr.c_str()); - } - } - } - } -#endif - RETHROW_PLEX_AS_EVENT -} - -void SWIDataModel::assign(const std::string& location, const Data& data) { - eval(Element(), data.atom); -} - -void SWIDataModel::init(const Element& dataElem, - const Node& node, - const std::string& content) { - assign(dataElem, node, content); -} -void SWIDataModel::init(const std::string& location, const Data& data) { - assign(location, data); -} - -bool SWIDataModel::isDeclared(const std::string& expr) { - return true; -} - -void SWIDataModel::acquireBlob(atom_t symbol) { -} - - -int SWIDataModel::releaseBlob(atom_t symbol) { - return TRUE; -} - -int SWIDataModel::compareBlob(atom_t a, atom_t b) { - return 0; -} - -int SWIDataModel::writeBlob(void *s, atom_t symbol, int flags) { - return TRUE; -} - - -} diff --git a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp deleted file mode 100644 index d65e9c7..0000000 --- a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp +++ /dev/null @@ -1,814 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include - -#include "uscxml/Common.h" -#include "uscxml/config.h" -#include "uscxml/util/String.h" -#include "PromelaDataModel.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/Message.h" -#include -#include - -#include "PromelaParser.h" -#include "parser/promela.tab.hpp" - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -#define INVALID_ASSIGNMENT(name) \ -name.compare("_sessionid") == 0 || \ -name.compare("_name") == 0 || \ -name.compare("_ioprocessors") == 0 || \ -name.compare("_event") == 0 - -namespace uscxml { - -using namespace Arabica::XPath; -using namespace Arabica::DOM; - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new PromelaDataModelProvider() ); - return true; -} -#endif - -PromelaDataModel::PromelaDataModel() { -} - -PromelaDataModel::~PromelaDataModel() { -} - -boost::shared_ptr PromelaDataModel::create(InterpreterInfo* interpreter) { - boost::shared_ptr dm = boost::shared_ptr(new PromelaDataModel()); - dm->_interpreter = interpreter; - - // session id - Data sessionId; - sessionId.compound["type"] = Data("string", Data::VERBATIM); - sessionId.compound["value"] = Data(interpreter->getSessionId(), Data::VERBATIM); - dm->_variables["_sessionid"] = sessionId; - - // name - Data name; - name.compound["type"] = Data("string", Data::VERBATIM); - name.compound["value"] = Data(interpreter->getName(), Data::VERBATIM); - dm->_variables["_name"] = name; - - // ioprocessors - Data ioProcs; - ioProcs.compound["type"] = Data("compound", Data::VERBATIM); - - std::map ioProcessors = interpreter->getIOProcessors(); - for (std::map::iterator iter = ioProcessors.begin(); iter != ioProcessors.end(); iter++) { - ioProcs.compound["value"].compound[iter->first] = iter->second.getDataModelVariables(); - } - dm->_variables["_ioprocessors"] = ioProcs; - - dm->_lastMType = 0; - return dm; -} - -void PromelaDataModel::registerIOProcessor(const std::string& name, const IOProcessor& ioprocessor) { -} - -void PromelaDataModel::pushContext() { -// std::cout << "PromelaDataModel::pushContext" << std::endl; -} - -void PromelaDataModel::popContext() { -// std::cout << "PromelaDataModel::popContext" << std::endl; -} - -void PromelaDataModel::setEvent(const Event& event) { - Data variable; - variable.compound["type"] = Data("compound", Data::VERBATIM); - variable.compound["value"].compound["name"] = Data(event.name, Data::VERBATIM); - variable.compound["value"].compound["origin"] = Data(event.origin, Data::VERBATIM); - variable.compound["value"].compound["origintype"] = Data(event.origintype, Data::VERBATIM); - variable.compound["value"].compound["invokeid"] = Data(event.invokeid, Data::VERBATIM); - if (event.hideSendId) { - variable.compound["value"].compound["sendid"] = Data("", Data::VERBATIM); - } else { - variable.compound["value"].compound["sendid"] = Data(event.sendid, Data::VERBATIM); - } - switch (event.eventType) { - case Event::PLATFORM: - variable.compound["value"].compound["type"] = Data("platform", Data::VERBATIM); - break; - case Event::INTERNAL: - variable.compound["value"].compound["type"] = Data("internal", Data::VERBATIM); - break; - case Event::EXTERNAL: - variable.compound["value"].compound["type"] = Data("external", Data::VERBATIM); - break; - default: - variable.compound["value"].compound["type"] = Data("invalid", Data::VERBATIM); - break; - } - - if (event.dom) { - // no support - } else if (event.content.length() > 0) { - // _event.data is a string or JSON - Data json = Data::fromJSON(event.content); - if (!json.empty()) { - variable.compound["value"].compound["data"] = json; - } else { - if (isNumeric(event.content.c_str(), 10)) { - variable.compound["value"].compound["data"] = Data(event.content, Data::INTERPRETED); - } else { - variable.compound["value"].compound["data"] = Data(spaceNormalize(event.content), Data::VERBATIM); - } - } - } else { - // _event.data is KVP - if (!event.data.empty()) { - variable.compound["value"].compound["data"] = event.data; - } else { - // test 343 / test 488 - variable.compound["value"].compound["data"]; - } - - for (Event::params_t::const_iterator start = event.params.begin(), end = event.params.end(); - start != end; start = event.params.upper_bound(start->first)) { - // only set first param key - if (isNumeric(start->second.atom.c_str(), 10)) { - variable.compound["value"].compound["data"].compound[start->first] = strTo(start->second.atom); - } else { - variable.compound["value"].compound["data"].compound[start->first] = start->second; - } - } - - for (Event::namelist_t::const_iterator iter = event.namelist.begin(); iter != event.namelist.end(); iter++) { - if (isNumeric(iter->second.atom.c_str(), 10)) { - variable.compound["value"].compound["data"].compound[iter->first] = strTo(iter->second.atom); - } else { - variable.compound["value"].compound["data"].compound[iter->first] = iter->second; - } - } - } - - // iterate all data elements and adapt type for int if atom is integer - adaptType(variable.compound["value"].compound["data"]); - - _variables["_event"] = variable; -} - -void PromelaDataModel::adaptType(Data& data) { - if (data.atom.length() > 0 && isInteger(data.atom.c_str(), 10)) { - data.type = Data::INTERPRETED; - return; - } - - if (data.array.size() > 0) { - for (std::list::iterator iter = data.array.begin(); iter != data.array.end(); iter++) { - adaptType(*iter); - } - return; - } - - if (data.compound.size() > 0) { - for (std::map::iterator iter = data.compound.begin(); iter != data.compound.end(); iter++) { - adaptType(iter->second); - } - return; - } - -} - -Data PromelaDataModel::getStringAsData(const std::string& content) { - return evaluateExpr(content); -} - - -bool PromelaDataModel::validate(const std::string& location, const std::string& schema) { -// std::cout << "PromelaDataModel::validate" << std::endl; - return true; -} - -bool PromelaDataModel::isLocation(const std::string& expr) { - return true; -} - -bool PromelaDataModel::isValidSyntax(const std::string& expr) { - try { - PromelaParser parser(expr); - } catch (Event e) { - LOG(ERROR) << e << std::endl; - return false; - } - return true; -} - -uint32_t PromelaDataModel::getLength(const std::string& expr) { - if (!isDeclared(expr)) { - ERROR_EXECUTION_THROW("Variable '" + expr + "' was not declared"); - } - - if (!_variables[expr].hasKey("size")) { - ERROR_EXECUTION_THROW("Variable '" + expr + "' is no array"); - } - - return strTo(_variables[expr]["size"].atom); -} - -void PromelaDataModel::setForeach(const std::string& item, - const std::string& array, - const std::string& index, - uint32_t iteration) { - // assign array element to item - std::stringstream ss; - ss << array << "[" << iteration << "]"; - - PromelaParser itemParser(item, 1, PromelaParser::PROMELA_EXPR); - if (itemParser.ast->type != PML_NAME) - ERROR_EXECUTION_THROW("Expression '" + item + "' is no valid item"); - - PromelaParser arrayParser(ss.str(), 1, PromelaParser::PROMELA_EXPR); - - setVariable(itemParser.ast, getVariable(arrayParser.ast)); - - if (index.length() > 0) { - PromelaParser indexParser(index, 1, PromelaParser::PROMELA_EXPR); - setVariable(indexParser.ast, iteration); - } - -} - -void PromelaDataModel::eval(const Element& scriptElem, const std::string& expr) { - PromelaParser parser(expr, 1, PromelaParser::PROMELA_STMNT); - evaluateStmnt(parser.ast); -// parser.dump(); -} - -bool PromelaDataModel::evalAsBool(const std::string& expr) { - return evalAsBool(Arabica::DOM::Element(), expr); -} - -bool PromelaDataModel::evalAsBool(const Arabica::DOM::Element& node, const std::string& expr) { - PromelaParser parser(expr, 1, PromelaParser::PROMELA_EXPR); -// parser.dump(); - Data tmp = evaluateExpr(parser.ast); - - if (tmp.atom.compare("false") == 0) - return false; - if (tmp.atom.compare("0") == 0) - return false; - return true; -} - -std::string PromelaDataModel::evalAsString(const std::string& expr) { - PromelaParser parser(expr); - return evaluateExpr(parser.ast); -} - -void PromelaDataModel::assign(const Element& assignElem, - const Node& node, - const std::string& content) { - std::string key; - std::string value; - - if (node) { - ERROR_EXECUTION_THROW("Assigning DOM node to variable is not supported"); - } - - if (HAS_ATTR(assignElem, "id")) { - key = ATTR(assignElem, "id"); - } else if (HAS_ATTR(assignElem, "location")) { - key = ATTR(assignElem, "location"); - } - - if (HAS_ATTR(assignElem, "expr")) { - if (key.length() == 0) { - ERROR_EXECUTION_THROW("Assign element has neither id nor location"); - } - value = ATTR(assignElem, "expr"); - } else { - value = content; - } - - if (value.length() == 0) - return; - - Data json = Data::fromJSON(value); - if (!json.empty()) { - // simply assign from json to key - assign(key, json); - } else { - std::string expr = key + " = " + value; - PromelaParser parser(expr, 1, PromelaParser::PROMELA_STMNT); - evaluateStmnt(parser.ast); - } -} - -void PromelaDataModel::evaluateDecl(const std::string& expr) { - PromelaParser parser(expr, 1, PromelaParser::PROMELA_DECL); - evaluateDecl(parser.ast); -} - -Data PromelaDataModel::evaluateExpr(const std::string& expr) { - PromelaParser parser(expr, 1, PromelaParser::PROMELA_EXPR); - return evaluateExpr(parser.ast); -} - -void PromelaDataModel::evaluateStmnt(const std::string& expr) { - PromelaParser parser(expr, 1, PromelaParser::PROMELA_STMNT); - evaluateStmnt(parser.ast); -} - -void PromelaDataModel::evaluateDecl(void* ast) { - PromelaParserNode* node = (PromelaParserNode*)ast; -// node->dump(); - if (false) { - } else if (node->type == PML_DECL) { - std::list::iterator opIter = node->operands.begin(); - PromelaParserNode* vis = *opIter++; - PromelaParserNode* type = *opIter++; - PromelaParserNode* varlist = *opIter++; - - for (std::list::iterator nameIter = varlist->operands.begin(); - nameIter != varlist->operands.end(); - nameIter++) { - Data variable; - variable.compound["vis"] = Data(vis->value, Data::VERBATIM); - variable.compound["type"] = Data(type->value, Data::VERBATIM); - - if (false) { - } else if ((*nameIter)->type == PML_NAME) { - // plain variables without initial assignment - - if (type->value == "mtype") { - variable.compound["value"] = Data(_lastMType++, Data::INTERPRETED); - } else { - variable.compound["value"] = Data(0, Data::INTERPRETED); - } - _variables.compound[(*nameIter)->value] = variable; - - } else if ((*nameIter)->type == PML_ASGN) { - // initially assigned variables - - std::list::iterator opIterAsgn = (*nameIter)->operands.begin(); - PromelaParserNode* name = *opIterAsgn++; - PromelaParserNode* expr = *opIterAsgn++; - - try { - variable.compound["value"] = evaluateExpr(expr); - } catch(uscxml::Event e) { - // test277, declare and throw - _variables.compound[name->value] = variable; - throw e; - } - - assert(opIterAsgn == (*nameIter)->operands.end()); - _variables.compound[name->value] = variable; - } else if ((*nameIter)->type == PML_VAR_ARRAY) { - // variable arrays - - std::list::iterator opIterAsgn = (*nameIter)->operands.begin(); - PromelaParserNode* name = *opIterAsgn++; - int size = dataToInt(evaluateExpr(*opIterAsgn++)); - - variable.compound["size"] = size; - for (size_t i = 0; i < size; i++) { - variable.compound["value"].array.push_back(Data(0, Data::INTERPRETED)); - } - - assert(opIterAsgn == (*nameIter)->operands.end()); - _variables.compound[name->value] = variable; - - } else { - ERROR_EXECUTION_THROW("Declaring variables via " + PromelaParserNode::typeToDesc((*nameIter)->type) + " not implemented"); - } - } - assert(opIter == node->operands.end()); - } else if (node->type == PML_DECLLIST) { - for (std::list::iterator declIter = node->operands.begin(); - declIter != node->operands.end(); - declIter++) { - evaluateDecl(*declIter); - } - } else { - node->dump(); - ERROR_EXECUTION_THROW("Declaring variables via " + PromelaParserNode::typeToDesc(node->type) + " not implemented"); - } -} - -int PromelaDataModel::dataToInt(const Data& data) { - if (data.type != Data::INTERPRETED) - ERROR_EXECUTION_THROW("Operand is not integer"); - int value = strTo(data.atom); - if (data.atom.compare(toStr(value)) != 0) - ERROR_EXECUTION_THROW("Operand is not integer"); - return value; -} - -bool PromelaDataModel::dataToBool(const Data& data) { - if (data.atom.size() == 0) // empty string or undefined - return false; - - if (data.type == Data::VERBATIM) { - // non-empty string is true - return true; - } else { - if (data.atom.compare("true") == 0) { - // boolean true is true - return true; - } else if (data.atom.compare("false") == 0) { - return false; - } else if (dataToInt(data) != 0) { - return true; // non zero values are true - } - } - return false; -} - -Data PromelaDataModel::evaluateExpr(void* ast) { - PromelaParserNode* node = (PromelaParserNode*)ast; - std::list::iterator opIter = node->operands.begin(); - switch (node->type) { - case PML_CONST: - if (iequals(node->value, "false")) - return Data(false); - if (iequals(node->value, "true")) - return Data(true); - return strTo(node->value); - case PML_NAME: - case PML_VAR_ARRAY: - case PML_CMPND: - return getVariable(node); - case PML_STRING: { - std::string stripped = node->value.substr(1, node->value.size() - 2); - return Data(stripped, Data::VERBATIM); -// return Data(node->value, Data::INTERPRETED); - } - case PML_PLUS: - return dataToInt(evaluateExpr(*opIter++)) + dataToInt(evaluateExpr(*opIter++)); - case PML_MINUS: - return dataToInt(evaluateExpr(*opIter++)) - dataToInt(evaluateExpr(*opIter++)); - case PML_DIVIDE: - return dataToInt(evaluateExpr(*opIter++)) / dataToInt(evaluateExpr(*opIter++)); - case PML_MODULO: - return dataToInt(evaluateExpr(*opIter++)) % dataToInt(evaluateExpr(*opIter++)); - case PML_EQ: { - PromelaParserNode* lhs = *opIter++; - PromelaParserNode* rhs = *opIter++; - - Data left = evaluateExpr(lhs); - Data right = evaluateExpr(rhs); - - if (left == right) // overloaded operator== - return Data(true); - - // literal strings or strings in variables - if ((lhs->type == PML_STRING || rhs->type == PML_STRING) - || (left.type == Data::VERBATIM && right.type == Data::VERBATIM)) { - return (left.atom.compare(right.atom) == 0 ? Data(true) : Data(false)); - } - return dataToInt(left) == dataToInt(right); - } - case PML_NEG: - return !dataToBool(evaluateExpr(*opIter++)); - case PML_LT: - return dataToInt(evaluateExpr(*opIter++)) < dataToInt(evaluateExpr(*opIter++)); - case PML_LE: - return dataToInt(evaluateExpr(*opIter++)) <= dataToInt(evaluateExpr(*opIter++)); - case PML_GT: - return dataToInt(evaluateExpr(*opIter++)) > dataToInt(evaluateExpr(*opIter++)); - case PML_GE: - return dataToInt(evaluateExpr(*opIter++)) >= dataToInt(evaluateExpr(*opIter++)); - case PML_TIMES: - return dataToInt(evaluateExpr(*opIter++)) * dataToInt(evaluateExpr(*opIter++)); - case PML_LSHIFT: - return dataToInt(evaluateExpr(*opIter++)) << dataToInt(evaluateExpr(*opIter++)); - case PML_RSHIFT: - return dataToInt(evaluateExpr(*opIter++)) >> dataToInt(evaluateExpr(*opIter++)); - case PML_AND: - case PML_OR: { - PromelaParserNode* lhs = *opIter++; - PromelaParserNode* rhs = *opIter++; - -// std::cout << "-----" << std::endl; -// lhs->dump(); -// rhs->dump(); - - Data left = evaluateExpr(lhs); - Data right = evaluateExpr(rhs); - - bool truthLeft = dataToBool(left); - bool truthRight = dataToBool(right); - - if (node->type == PML_AND) { - return truthLeft && truthRight; - } else { - return truthLeft || truthRight; - } - } - default: - ERROR_EXECUTION_THROW("Support for " + PromelaParserNode::typeToDesc(node->type) + " expressions not implemented"); - } - return 0; -} - -void PromelaDataModel::evaluateStmnt(void* ast) { - PromelaParserNode* node = (PromelaParserNode*)ast; - std::list::iterator opIter = node->operands.begin(); - switch (node->type) { - case PML_ASGN: { - PromelaParserNode* name = *opIter++; - PromelaParserNode* expr = *opIter++; - setVariable(name, evaluateExpr(expr)); - break; - } - case PML_STMNT: { - while(opIter != node->operands.end()) { - evaluateStmnt(*opIter++); - } - break; - } - case PML_INCR: { - PromelaParserNode* name = *opIter++; - setVariable(name, strTo(getVariable(name)) + 1); - break; - } - case PML_DECR: { - PromelaParserNode* name = *opIter++; - setVariable(name, strTo(getVariable(name)) - 1); - break; - } - default: - node->dump(); - ERROR_EXECUTION_THROW("No support for " + PromelaParserNode::typeToDesc(node->type) + " statement implemented"); - } -} - - -void PromelaDataModel::setVariable(void* ast, const Data& value) { - PromelaParserNode* node = (PromelaParserNode*)ast; - - if (INVALID_ASSIGNMENT(node->value)) { - ERROR_EXECUTION_THROW("Cannot assign to " + node->value); - } - -// if (_variables.compound.find(name->value) == _variables.compound.end()) { -// // declare implicitly / convenience -// evaluateDecl(ast); -// } - - switch (node->type) { - case PML_VAR_ARRAY: { - std::list::iterator opIter = node->operands.begin(); - - PromelaParserNode* name = *opIter++; - PromelaParserNode* expr = *opIter++; - - // is the location an array? - if (!_variables[name->value].hasKey("size")) { - ERROR_EXECUTION_THROW("Variable " + name->value + " is no array"); - } - - // is the array large enough? - int index = dataToInt(evaluateExpr(expr)); - if (strTo(_variables[name->value]["size"].atom) <= index) { - ERROR_EXECUTION_THROW("Index " + toStr(index) + " in array " + name->value + "[" + _variables[name->value]["size"].atom + "] is out of bounds"); - } - - _variables.compound[name->value].compound["value"][index] = value; - - break; - } - case PML_NAME: { - // location is an array, but no array was passed - if (_variables[node->value].hasKey("size")) { - if (value.compound.size() > 0 || value.atom.size() > 0) - ERROR_EXECUTION_THROW("Variable " + node->value + " is an array"); - - if (strTo(_variables[node->value].compound["size"].atom) < value.array.size()) - ERROR_EXECUTION_THROW("Array assigned to " + node->value + " is too large"); - } - - _variables.compound[node->value].compound["value"] = value; - break; - } - case PML_CMPND: { - std::list::iterator opIter = node->operands.begin(); - PromelaParserNode* name = *opIter++; - - // location is no array - if (_variables[name->value].hasKey("size")) { - ERROR_EXECUTION_THROW("Variable " + name->value + " is an array"); - } - -// std::cout << Data::toJSON(_variables) << std::endl;; - - Data* var = &_variables[name->value].compound["value"]; - var->compound["type"] = Data("compound", Data::VERBATIM); - var->compound["vis"] = Data("", Data::VERBATIM); - - while(opIter != node->operands.end()) { - name = *opIter; - opIter++; - var = &(var->compound[name->value]); - } - *var = value; - - break; - } - default: - node->dump(); - ERROR_EXECUTION_THROW("No support for " + PromelaParserNode::typeToDesc(node->type) + " variables implemented"); - break; - } - -// std::cout << Data::toJSON(_variables) << std::endl; -} - -Data PromelaDataModel::getVariable(void* ast) { - PromelaParserNode* node = (PromelaParserNode*)ast; -// node->dump(); - - std::list::iterator opIter = node->operands.begin(); - switch(node->type) { - case PML_NAME: - if (_variables.compound.find(node->value) == _variables.compound.end()) { - ERROR_EXECUTION_THROW("No variable " + node->value + " was declared"); - } -// if (_variables[node->value].compound.find("size") != _variables[node->value].compound.end()) { -// ERROR_EXECUTION_THROW("Type error: Variable " + node->value + " is an array"); -// } - return _variables[node->value]["value"]; - case PML_VAR_ARRAY: { - PromelaParserNode* name = *opIter++; - PromelaParserNode* expr = *opIter++; - int index = dataToInt(evaluateExpr(expr)); - - if (_variables.compound.find(name->value) == _variables.compound.end()) { - ERROR_EXECUTION_THROW("No variable " + name->value + " was declared"); - } - - if (!_variables[name->value].hasKey("size")) { - ERROR_EXECUTION_THROW("Variable " + name->value + " is no array"); - } - - if (strTo(_variables[name->value]["size"].atom) <= index) { - ERROR_EXECUTION_THROW("Index " + toStr(index) + " in array " + name->value + "[" + _variables[name->value]["size"].atom + "] is out of bounds"); - } - return _variables.compound[name->value].compound["value"][index]; - } - case PML_CMPND: { -// node->dump(); -// std::cout << Data::toJSON(_variables["_event"]); - std::stringstream idPath; - PromelaParserNode* name = *opIter++; - - // special case for _x variables - if (name->value.compare("_x") == 0) { - PromelaParserNode* what = *opIter++; - - if (what->type == PML_VAR_ARRAY) { - if (what->operands.size() == 2) { - std::string arrName = what->operands.front()->value; - std::string index = what->operands.back()->value; - - if (what->operands.back()->type == PML_STRING) { - index = index.substr(1, index.size() - 2); // remove quotes - } - - if (arrName.compare("states") == 0) { - return Data(_interpreter->isInState(index)); - } - } - } - ERROR_EXECUTION_THROW("No variable " + name->value + " was declared"); - } - - if (_variables.compound.find(name->value) == _variables.compound.end()) { - ERROR_EXECUTION_THROW("No variable " + name->value + " was declared"); - } - - Data currData = _variables.compound[name->value]["value"]; - idPath << name->value; - while(opIter != node->operands.end()) { - std::string key = (*opIter)->value; - idPath << "." << key; - if (currData.compound.find(key) == currData.compound.end()) { - ERROR_EXECUTION_THROW("No variable " + idPath.str() + " was declared"); - } - Data tmp = currData.compound[key]; - currData = tmp; - - opIter++; - } - return currData; - } - default: - ERROR_EXECUTION_THROW("Retrieving value of " + PromelaParserNode::typeToDesc(node->type) + " variable not implemented"); - } - return 0; -} - -std::string PromelaDataModel::andExpressions(std::list expressions) { - - if (expressions.size() == 0) - return ""; - - if (expressions.size() == 1) - return *(expressions.begin()); - - std::ostringstream exprSS; - exprSS << "("; - std::string conjunction = ""; - for (std::list::const_iterator exprIter = expressions.begin(); - exprIter != expressions.end(); - exprIter++) { - exprSS << conjunction << "(" << *exprIter << ")"; - conjunction = " && "; - } - exprSS << ")"; - return exprSS.str(); -} - -void PromelaDataModel::assign(const std::string& location, const Data& data) { - // used for e.g. to assign command line parameters and idlocation - PromelaParser parser(location); - setVariable(parser.ast, data); -} - -void PromelaDataModel::init(const Element& dataElem, - const Node& node, - const std::string& content) { - // from - if (HAS_ATTR(dataElem, "id")) { - std::string identifier = ATTR(dataElem, "id"); - std::string type = (HAS_ATTR(dataElem, "type") ? ATTR(dataElem, "type") : "auto"); - std::string arrSize; - - size_t bracketPos = type.find("["); - if (bracketPos != std::string::npos) { - arrSize = type.substr(bracketPos, type.length() - bracketPos); - type = type.substr(0, bracketPos); - } - - std::string expr = type + " " + identifier + arrSize; - PromelaParser parser(expr, 1, PromelaParser::PROMELA_DECL); - evaluateDecl(parser.ast); - - } - assign(dataElem, node, content); -} -void PromelaDataModel::init(const std::string& location, const Data& data) { - assign(location, data); -} - -bool PromelaDataModel::isDeclared(const std::string& expr) { - PromelaParser parser(expr); -// parser.dump(); - if (parser.ast->type == PML_VAR_ARRAY) - return _variables.compound.find(parser.ast->operands.front()->value) != _variables.compound.end(); - - if (parser.ast->type == PML_CMPND) { - // JSON declaration - std::list::iterator opIter = parser.ast->operands.begin(); - Data* var = &_variables; - - while(opIter != parser.ast->operands.end()) { - std::string name = (*opIter)->value; - opIter++; - if (var->compound.find(name) != var->compound.end()) { - var = &(var->compound.at(name)); - } else if (var->compound.find("value") != var->compound.end() && var->compound.at("value").compound.find(name) != var->compound.at("value").compound.end()) { - var = &(var->compound.at("value").compound.at(name)); - } else { - return false; - } - } - return true; - - } - - return _variables.compound.find(expr) != _variables.compound.end(); -} - - -} diff --git a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.h b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.h deleted file mode 100644 index 0778ecf..0000000 --- a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.h +++ /dev/null @@ -1,119 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef PROMELADATAMODEL_H_4VG0TDMU -#define PROMELADATAMODEL_H_4VG0TDMU - -#include "uscxml/InterpreterInfo.h" -#include "uscxml/plugins/DataModel.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class PromelaDataModel : public DataModelImpl { -public: - PromelaDataModel(); - virtual ~PromelaDataModel(); - virtual boost::shared_ptr create(InterpreterInfo* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("promela"); - return names; - } - - virtual void setEvent(const Event& event); - - virtual void registerIOProcessor(const std::string& name, const IOProcessor& ioprocessor); - - virtual bool validate(const std::string& location, const std::string& schema); - virtual bool isLocation(const std::string& expr); - virtual bool isValidSyntax(const std::string& expr); - - virtual uint32_t getLength(const std::string& expr); - virtual void setForeach(const std::string& item, - const std::string& array, - const std::string& index, - uint32_t iteration); - - virtual void pushContext(); - virtual void popContext(); - - virtual void assign(const Arabica::DOM::Element& assignElem, - const Arabica::DOM::Node& node, - const std::string& content); - virtual void assign(const std::string& location, const Data& data); - - virtual void init(const Arabica::DOM::Element& dataElem, - const Arabica::DOM::Node& node, - const std::string& content); - virtual void init(const std::string& location, const Data& data); - - virtual void eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr); - - virtual bool isDeclared(const std::string& expr); - - virtual Data getStringAsData(const std::string& content); - - virtual std::string evalAsString(const std::string& expr); - virtual bool evalAsBool(const Arabica::DOM::Element& node, const std::string& expr); - virtual bool evalAsBool(const std::string& expr); - - virtual std::string andExpressions(std::list expressions); - -protected: - - int dataToInt(const Data& data); - bool dataToBool(const Data& data); - - void evaluateDecl(void* ast); - Data evaluateExpr(void* ast); - void evaluateStmnt(void* ast); - - void evaluateDecl(const std::string& expr); - Data evaluateExpr(const std::string& expr); - void evaluateStmnt(const std::string& expr); - - void setVariable(void* ast, const Data& value); - Data getVariable(void* ast); - - void adaptType(Data& data); - - int _lastMType; - - Event _event; - std::string _name; - std::string _sessionId; - - Data _variables; - -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(PromelaDataModel, DataModelImpl); -#endif - -} - -#endif /* end of include guard: PROMELADATAMODEL_H_4VG0TDMU */ diff --git a/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp b/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp deleted file mode 100644 index 3467598..0000000 --- a/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp +++ /dev/null @@ -1,298 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "PromelaParser.h" -#include "parser/promela.tab.hpp" -#include "uscxml/messages/Event.h" - -#include - -struct yy_buffer_state; -typedef yy_buffer_state *YY_BUFFER_STATE; -extern YY_BUFFER_STATE promela__scan_buffer(char *, size_t, void*); -void promela__delete_buffer(YY_BUFFER_STATE, void*); -YY_BUFFER_STATE promela__scan_string (const char * yystr , void*); - - -extern int promela_lex (PROMELA_STYPE* yylval_param, PROMELA_LTYPE* yylloc_param, void* yyscanner); -int promela_lex_init (void**); -int promela_lex_destroy (void*); - -void promela_error (void* yylloc_param, uscxml::PromelaParser* ctx, void* yyscanner, const char* err) { - PROMELA_LTYPE* yylloc = (PROMELA_LTYPE*)yylloc_param; - // mark as pending exception as we cannot throw from constructor and have the destructor called - ERROR_EXECUTION(excEvent, err); - excEvent.data.compound["line"] = uscxml::Data(yylloc->first_line, uscxml::Data::VERBATIM); - excEvent.data.compound["col"] = uscxml::Data(yylloc->first_column, uscxml::Data::VERBATIM); - - std::stringstream ssUnderline; - for (size_t i = 0; i < yylloc->first_column; i++) - ssUnderline << " "; - ssUnderline << "^"; - excEvent.data.compound["sourcemark"] = uscxml::Data(ssUnderline.str(), uscxml::Data::VERBATIM); - - ctx->pendingException = excEvent; -} - -namespace uscxml { - -PromelaParser::PromelaParser(const std::string& expr) { - init(expr); -} - -PromelaParser::PromelaParser(const std::string& expr, int nrArgs, ...) { - init(expr); - - if (nrArgs == 0) - return; - - std::stringstream errSS; - std::string seperator; - errSS << "Promela syntax type mismatch: Expected {"; - - va_list ap; - va_start(ap, nrArgs); - for(int i = 1; i <= nrArgs; i++) { - int expectedType = va_arg(ap, int); - if (type == expectedType) - return; - errSS << seperator << typeToDesc(expectedType); - seperator = ", "; - } - errSS << "} but got " << typeToDesc(type); - ERROR_EXECUTION_THROW(errSS.str()); -} - -void PromelaParser::init(const std::string& expr) { - ast = NULL; - parseInCompound = 0; - input_length = expr.length() + 2; // plus some zero terminators - input = (char*) calloc(1, input_length); - memcpy(input, expr.c_str(), expr.length()); - - promela_lex_init(&scanner); - // promela_assign_set_extra(ast, &scanner); - buffer = promela__scan_string(input, scanner); - // buffer = promela__scan_buffer(input, input_length, scanner); - promela_parse(this, scanner); - if (pendingException.name.size() > 0) { - // parsing failed in promela_error - destroy(); - pendingException.data.compound["sourceline"] = Data(expr, Data::VERBATIM); - throw pendingException; - } -} - -void PromelaParser::destroy() { - if (ast) - delete(ast); - free(input); - promela__delete_buffer((YY_BUFFER_STATE)buffer, scanner); - promela_lex_destroy(scanner); -} - -PromelaParser::~PromelaParser() { - destroy(); -} - -std::string PromelaParser::typeToDesc(int type) { - switch (type) { - case PROMELA_EXPR: - return "expression"; - case PROMELA_DECL: - return "declarations"; - case PROMELA_STMNT: - return "statements"; - default: - break; - } - return ""; -} - -PromelaParserNode::~PromelaParserNode() { - while(operands.size() > 0) { - delete operands.front(); - operands.pop_front(); - } - if (loc) - free(loc); -} - -PromelaParserNode* PromelaParser::node(int type, int nrArgs, ...) { - PromelaParserNode* newNode = new PromelaParserNode(); - - newNode->type = type; - va_list ap; - va_start(ap, nrArgs); - for(int i = 1; i <= nrArgs; i++) { - newNode->operands.push_back(va_arg(ap, PromelaParserNode*)); - newNode->operands.back()->parent = newNode; - } - return newNode; -} - -PromelaParserNode* PromelaParser::value(int type, void* location, const char* value) { - PromelaParserNode* newNode = new PromelaParserNode(); - - if (location) { - PROMELA_LTYPE* location_param = (PROMELA_LTYPE*)location; - newNode->loc = (PromelaParserNode::Location*)malloc(sizeof(PromelaParserNode::Location)); - newNode->loc->firstCol = location_param->first_column; - newNode->loc->firstLine = location_param->first_line; - newNode->loc->lastCol = location_param->last_column; - newNode->loc->lastLine = location_param->last_line; - } - - newNode->value = value; - newNode->type = type; - return newNode; -} - - -void PromelaParser::dump() { - switch (type) { - case PROMELA_EXPR: - std::cout << "Promela Expression" << std::endl; - break; - case PROMELA_DECL: - std::cout << "Promela Declarations" << std::endl; - break; - case PROMELA_STMNT: - std::cout << "Promela Statement" << std::endl; - break; - } - ast->dump(); -} - - -void PromelaParserNode::merge(PromelaParserNode* node) { - for (std::list::iterator iter = node->operands.begin(); - iter != node->operands.end(); iter++) { - operands.push_back(*iter); - (*iter)->parent = this; - } - node->operands.clear(); -} - -void PromelaParserNode::push(PromelaParserNode* node) { - node->parent = this; - operands.push_back(node); -} - -void PromelaParserNode::dump(int indent) { - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - std::cout << padding << typeToDesc(type) << ": " << value; - if (loc != NULL) { - std::cout << " (" << loc->firstLine << ":" << loc->firstCol << ")-(" << loc->lastLine << ":" << loc->lastCol << ")"; - } - std::cout << std::endl; - for (std::list::iterator iter = operands.begin(); - iter != operands.end(); iter++) { - (*iter)->dump(indent + 1); - } -} - -std::string PromelaParserNode::typeToDesc(int type) { - switch(type) { - case PML_PLUS: - return "PLUS"; - case PML_MINUS: - return "MINUS"; - case PML_TIMES: - return "TIMES"; - case PML_DIVIDE: - return "DIVIDE"; - case PML_MODULO: - return "MODULO"; - case PML_BITAND: - return "BITAND"; - case PML_BITXOR: - return "BITXOR"; - case PML_BITOR: - return "BITOR"; - case PML_GT: - return "GT"; - case PML_LT: - return "LT"; - case PML_GE: - return "GE"; - case PML_LE: - return "LE"; - case PML_EQ: - return "EQ"; - case PML_NE: - return "NE"; - case PML_AND: - return "AND"; - case PML_OR: - return "OR"; - case PML_LSHIFT: - return "LSHIFT"; - case PML_RSHIFT: - return "RSHIFT"; - case PML_NEG: - return "NEG"; - case PML_ASGN: - return "ASGN"; - case PML_INCR: - return "INCR"; - case PML_DECR: - return "DECR"; - case PML_VAR_ARRAY: - return "VAR_ARRAY"; - case PML_DECL: - return "DECL"; - case PML_STMNT: - return "STMNT"; - case PML_TYPE: - return "TYPE"; - case PML_NAME: - return "NAME"; - case PML_CONST: - return "CONST"; - case PML_PRINT: - return "PRINT"; - case PML_SHOW: - return "SHOW"; - case PML_EXPR: - return "EXPR"; - case PML_VARLIST: - return "VARLIST"; - case PML_DECLLIST: - return "DECLLIST"; - case PML_NAMELIST: - return "NAMELIST"; - case PML_STRING: - return "STRING"; - case PML_TYPEDEF: - return "TYPEDEF"; - case PML_CMPND: - return "CMPND"; - case PML_ASSERT: - return "ASSERT"; - - default: - return std::string("UNK(") + toStr(type) + ")"; - } -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/promela/PromelaParser.h b/src/uscxml/plugins/datamodel/promela/PromelaParser.h deleted file mode 100644 index d79a2d0..0000000 --- a/src/uscxml/plugins/datamodel/promela/PromelaParser.h +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -// bison -v promela.ypp && flex promela.l - -#ifndef PROMELA_H_9AB78YB1 -#define PROMELA_H_9AB78YB1 - -#include -//#include -#include - -#include "uscxml/Message.h" - -namespace uscxml { - -class PromelaParser; - -class PromelaParserNode { -public: - struct Location { - int firstLine; - int firstCol; - int lastLine; - int lastCol; - }; - - PromelaParserNode() : type(0), parent(NULL), loc(NULL) {} - virtual ~PromelaParserNode(); - - void merge(PromelaParserNode* node); - void push(PromelaParserNode* node); - void dump(int indent = 0); - - static std::string typeToDesc(int type); - - int type; - std::string value; - std::list operands; - PromelaParserNode* parent; - Location* loc; -}; - -class PromelaParser { -public: - enum Type { - PROMELA_EXPR, - PROMELA_DECL, - PROMELA_STMNT - }; - - static std::string typeToDesc(int type); - - PromelaParser() : ast(NULL) {} - PromelaParser(const std::string& expr); - PromelaParser(const std::string& expr, int nrArgs, ...); - virtual ~PromelaParser(); - - virtual PromelaParserNode* node(int type, int nrArgs, ...); - virtual PromelaParserNode* value(int type, void* location, const char* value); - void dump(); - - int parseInCompound; - - PromelaParserNode* ast; - Type type; - - Event pendingException; - operator bool() const { - return ast != NULL; - } - -protected: - - void init(const std::string& expr); - void destroy(); - - void* buffer; - void* scanner; - char* input; - size_t input_length; -}; - -} - -void promela_error (void* yylloc_param, uscxml::PromelaParser* ctx, void* yyscanner, const char* err); - -#endif /* end of include guard: PROMELA_H_9AB78YB1 */ diff --git a/src/uscxml/plugins/datamodel/promela/parser/promela.l b/src/uscxml/plugins/datamodel/promela/parser/promela.l deleted file mode 100644 index 1edc625..0000000 --- a/src/uscxml/plugins/datamodel/promela/parser/promela.l +++ /dev/null @@ -1,117 +0,0 @@ -/* see: http://www.phpcompiler.org/articles/reentrantparser.html */ -/* see: http://spinroot.com/spin/Man/operators.html */ - - -%option yylineno -%option reentrant -%option bison-bridge -%option prefix="promela_" -%option outfile="promela.lex.yy.cpp" -%option noyywrap -%option debug -%option never-interactive nounistd -%option bison-locations - -%{ - -#include "../PromelaParser.h" -#include "promela.tab.hpp" -#define YYSTYPE PROMELA_STYPE -#define YYLTYPE PROMELA_LTYPE -#define YY_USER_INIT \ - yycolumn = yylloc->first_line = yylloc->first_column = 0; \ - yylineno = yylloc->last_line = yylloc->last_column = 0; \ - -//int yycolumn = 1; - -#define YY_USER_ACTION \ -{ \ - yylloc->first_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yycolumn + yyleng; \ - yylloc->last_line = yylineno; \ - yycolumn = yycolumn + yyleng; \ -} - -%} - -DIGIT [0-9] -ID [_a-zA-Z][_a-zA-Z0-9]* -L [a-zA-Z_] - -%% - -\/\*([^*]|\*[^/])*\*+\/ /* multiline comments */ - -bit|bool|byte|int|mtype|short|unsigned|string|auto { - yylval->value = strdup(yytext); - return PML_TYPE; -} - -len { return PML_LEN; } -false|skip|true { yylval->value = strdup(yytext); return PML_CONST; } -printf { return PML_PRINT; } -typedef { return PML_TYPEDEF; } -assert { return PML_ASSERT; } - -"!" { return PML_NEG; } -"~" { return PML_COMPL; } -"++" { return PML_INCR; } -"--" { return PML_DECR; } - -"*" { return PML_TIMES; } -"/" { return PML_DIVIDE; } -"%" { return PML_MODULO; } - -"+" { return PML_PLUS; } -"-" { return PML_MINUS; } - -"<<" { return PML_LSHIFT; } -">>" { return PML_RSHIFT; } - -"<=" { return PML_LE; } -">=" { return PML_GE; } -"<" { return PML_LT; } -">" { return PML_GT; } - -"!=" { return PML_NE; } -"==" { return PML_EQ; } - -"&" { return PML_BITAND; } -"^" { return PML_BITXOR; } -"|" { return PML_BITOR; } - - -"&&" { return PML_AND; } -"||" { return PML_OR; } - -"." { return PML_DOT; } -"," { return PML_COMMA; } -";" { return PML_SEMI; } - -"(" { return '('; } -")" { return ')'; } - -"[" { return '['; } -"]" { return ']'; } - -"{" { return '{'; } -"}" { return '}'; } - -"=" { return PML_ASGN; } - -L?\"(\\.|[^\\"])*\" { yylval->value = strdup(yytext); return(PML_STRING); } - - -L?'(\\.|[^\'])*\' { - /* Non PROMELA extension for single quoted string literals */ - yylval->value = strdup(yytext); return(PML_STRING); -} - -{DIGIT}+ { yylval->value = strdup(yytext); return PML_CONST; } -{ID} { yylval->value = strdup(yytext); return PML_NAME; } - -[ \t\n]+ /* eat up whitespace */ - - -. { /*printf( "Unrecognized character: %s\n", yytext ); */ } diff --git a/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp b/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp deleted file mode 100644 index 3a99921..0000000 --- a/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp +++ /dev/null @@ -1,2598 +0,0 @@ -#line 2 "promela.lex.yy.cpp" - -#line 4 "promela.lex.yy.cpp" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -/* %not-for-header */ - -/* %if-c-only */ -/* %if-not-reentrant */ -/* %endif */ -/* %endif */ -/* %ok-for-header */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* %if-c++-only */ -/* %endif */ - -/* %if-c-only */ - -/* %endif */ - -/* %if-c-only */ - -/* %endif */ - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -/* %if-c-only */ -#include -#include -#include -#include -/* %endif */ - -/* %if-tables-serialization */ -/* %endif */ -/* end standard C headers. */ - -/* %if-c-or-c++ */ -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -/* %endif */ - -/* %if-c++-only */ -/* %endif */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* %not-for-header */ - -/* Returned upon end-of-file. */ -#define YY_NULL 0 -/* %ok-for-header */ - -/* %not-for-header */ - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) -/* %ok-for-header */ - -/* %if-reentrant */ - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* %endif */ - -/* %if-not-reentrant */ -/* %endif */ - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE promela_restart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -/* %if-not-reentrant */ -/* %endif */ - -/* %if-c-only */ -/* %if-not-reentrant */ -/* %endif */ -/* %endif */ - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires - * access to the local variable yy_act. Since yyless() is a macro, it would break - * existing scanners that call yyless() from OUTSIDE promela_lex. - * One obvious solution it to make yy_act a global. I tried that, and saw - * a 5% performance hit in a non-yylineno scanner, because yy_act is - * normally declared as a register variable-- so it is not worth it. - */ -#define YY_LESS_LINENO(n) \ - do { \ - yy_size_t yyl;\ - for ( yyl = n; yyl < yyleng; ++yyl )\ - if ( yytext[yyl] == '\n' )\ - --yylineno;\ - }while(0) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state { - /* %if-c-only */ - FILE *yy_input_file; - /* %endif */ - - /* %if-c++-only */ - /* %endif */ - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via promela_restart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - -}; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* %if-c-only Standard (non-C++) definition */ -/* %not-for-header */ - -/* %if-not-reentrant */ -/* %endif */ -/* %ok-for-header */ - -/* %endif */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -/* %if-c-only Standard (non-C++) definition */ - -/* %if-not-reentrant */ -/* %not-for-header */ - -/* %ok-for-header */ - -/* %endif */ - -void promela_restart (FILE *input_file ,yyscan_t yyscanner ); -void promela__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE promela__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void promela__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void promela__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void promela_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void promela_pop_buffer_state (yyscan_t yyscanner ); - -static void promela_ensure_buffer_stack (yyscan_t yyscanner ); -static void promela__load_buffer_state (yyscan_t yyscanner ); -static void promela__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER promela__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE promela__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE promela__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE promela__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); - -/* %endif */ - -void *promela_alloc (yy_size_t ,yyscan_t yyscanner ); -void *promela_realloc (void *,yy_size_t ,yyscan_t yyscanner ); -void promela_free (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer promela__create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - promela_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - promela_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ - -#define promela_wrap(n) 1 -#define YY_SKIP_YYWRAP - -#define FLEX_DEBUG - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -/* %if-c-only Standard (non-C++) definition */ - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); - -/* %endif */ - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ -/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ -/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\ - yyg->yy_c_buf_p = yy_cp; - -/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ -#define YY_NUM_RULES 46 -#define YY_END_OF_BUFFER 47 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; -}; -static yyconst flex_int16_t yy_accept[126] = { - 0, - 0, 0, 47, 45, 44, 44, 8, 45, 14, 25, - 45, 33, 34, 12, 15, 31, 16, 30, 13, 42, - 32, 21, 39, 22, 43, 43, 35, 36, 26, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 37, - 27, 38, 9, 44, 23, 0, 40, 0, 28, 0, - 41, 0, 10, 11, 0, 42, 17, 19, 24, 20, - 18, 43, 0, 0, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 29, 0, 41, 0, 0, 0, 43, 43, 2, 43, - 43, 43, 3, 43, 43, 43, 43, 43, 43, 43, - - 43, 0, 1, 43, 43, 43, 43, 43, 4, 43, - 43, 43, 1, 43, 43, 43, 43, 43, 7, 5, - 43, 43, 6, 43, 0 -} ; - -static yyconst flex_int32_t yy_ec[256] = { - 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 1, 18, 19, - 20, 21, 1, 1, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 23, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 24, 25, 26, 27, 22, 1, 28, 29, 22, 30, - - 31, 32, 33, 34, 35, 22, 36, 37, 38, 39, - 40, 41, 22, 42, 43, 44, 45, 22, 22, 22, - 46, 22, 47, 48, 49, 50, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 -} ; - -static yyconst flex_int32_t yy_meta[51] = { - 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, - 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 1, 1, 1 -} ; - -static yyconst flex_int16_t yy_base[131] = { - 0, - 0, 0, 172, 173, 49, 51, 151, 50, 173, 163, - 48, 173, 173, 173, 157, 173, 154, 173, 156, 149, - 173, 38, 145, 39, 0, 56, 173, 173, 173, 20, - 31, 136, 124, 131, 117, 118, 34, 30, 120, 173, - 110, 173, 173, 77, 173, 57, 173, 154, 173, 59, - 173, 66, 173, 173, 145, 138, 173, 173, 173, 173, - 173, 0, 76, 75, 111, 109, 108, 111, 106, 112, - 104, 108, 100, 110, 104, 108, 100, 96, 99, 96, - 173, 77, 78, 84, 127, 77, 106, 96, 0, 98, - 103, 90, 0, 91, 92, 88, 88, 93, 96, 95, - - 90, 78, 173, 82, 92, 91, 77, 76, 0, 80, - 88, 75, 96, 62, 73, 71, 68, 59, 0, 0, - 65, 65, 0, 65, 173, 109, 111, 88, 113, 115 -} ; - -static yyconst flex_int16_t yy_def[131] = { - 0, - 125, 1, 125, 125, 125, 125, 125, 126, 125, 125, - 127, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 128, 128, 125, 125, 125, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 125, - 125, 125, 125, 125, 125, 126, 125, 126, 125, 127, - 125, 129, 125, 125, 130, 125, 125, 125, 125, 125, - 125, 128, 126, 127, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 125, 127, 127, 129, 130, 130, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - - 128, 130, 125, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 130, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 0, 125, 125, 125, 125, 125 -} ; - -static yyconst flex_int16_t yy_nxt[224] = { - 0, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 4, 28, 29, 30, 31, 25, - 25, 32, 25, 25, 33, 25, 34, 35, 25, 25, - 36, 25, 37, 38, 39, 25, 40, 41, 42, 43, - 44, 44, 44, 44, 47, 51, 57, 58, 60, 61, - 63, 47, 65, 64, 66, 67, 51, 75, 50, 76, - 68, 78, 52, 83, 48, 79, 69, 77, 44, 44, - 47, 48, 51, 52, 51, 51, 50, 102, 86, 62, - 84, 83, 103, 113, 89, 124, 123, 122, 121, 52, - - 48, 52, 52, 89, 120, 119, 86, 118, 84, 46, - 46, 50, 50, 82, 82, 85, 85, 117, 116, 89, - 115, 89, 109, 114, 112, 111, 109, 110, 109, 108, - 107, 106, 105, 89, 89, 89, 104, 86, 101, 100, - 99, 98, 97, 96, 95, 94, 93, 89, 92, 91, - 90, 89, 88, 87, 56, 86, 125, 81, 80, 74, - 73, 72, 71, 70, 59, 56, 55, 54, 53, 49, - 45, 125, 3, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125 -} ; - -static yyconst flex_int16_t yy_chk[224] = { - 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 5, 5, 6, 6, 8, 11, 22, 22, 24, 24, - 26, 46, 30, 26, 30, 31, 50, 37, 52, 37, - 31, 38, 11, 52, 8, 38, 31, 37, 44, 44, - 63, 46, 64, 50, 82, 83, 84, 86, 102, 128, - 52, 84, 86, 102, 124, 122, 121, 118, 117, 64, - - 63, 82, 83, 116, 115, 114, 113, 112, 84, 126, - 126, 127, 127, 129, 129, 130, 130, 111, 110, 108, - 107, 106, 105, 104, 101, 100, 99, 98, 97, 96, - 95, 94, 92, 91, 90, 88, 87, 85, 80, 79, - 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, - 68, 67, 66, 65, 56, 55, 48, 41, 39, 36, - 35, 34, 33, 32, 23, 20, 19, 17, 15, 10, - 7, 3, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125 -} ; - -/* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[47] = { - 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 0, 0, 1, 0, 0, -}; - -static yyconst flex_int16_t yy_rule_linenum[46] = { - 0, - 44, 46, 51, 52, 53, 54, 55, 57, 58, 59, - 60, 62, 63, 64, 66, 67, 69, 70, 72, 73, - 74, 75, 77, 78, 80, 81, 82, 85, 86, 88, - 89, 90, 92, 93, 95, 96, 98, 99, 101, 103, - 106, 111, 112, 114, 117 -} ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "promela.l" -/* see: http://www.phpcompiler.org/articles/reentrantparser.html */ -/* see: http://spinroot.com/spin/Man/operators.html */ -#define YY_NO_UNISTD_H 1 -#line 16 "promela.l" - -#include "../PromelaParser.h" -#include "promela.tab.hpp" -#define YYSTYPE PROMELA_STYPE -#define YYLTYPE PROMELA_LTYPE -#define YY_USER_INIT \ - yycolumn = yylloc->first_line = yylloc->first_column = 0; \ - yylineno = yylloc->last_line = yylloc->last_column = 0; \ - -//int yycolumn = 1; - -#define YY_USER_ACTION \ -{ \ - yylloc->first_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yycolumn + yyleng; \ - yylloc->last_line = yylineno; \ - yycolumn = yycolumn + yyleng; \ -} - -#line 661 "promela.lex.yy.cpp" - -#define INITIAL 0 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -/* %if-c-only */ -#include -/* %endif */ -/* %if-c++-only */ -/* %endif */ -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* %if-c-only Reentrant structure and macros (non-C++). */ -/* %if-reentrant */ - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - YYSTYPE * yylval_r; - - YYLTYPE * yylloc_r; - -}; /* end struct yyguts_t */ - -/* %if-c-only */ - -static int yy_init_globals (yyscan_t yyscanner ); - -/* %endif */ - -/* %if-reentrant */ - -/* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ -# define yylval yyg->yylval_r - -# define yylloc yyg->yylloc_r - -int promela_lex_init (yyscan_t* scanner); - -int promela_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* %endif */ - -/* %endif End reentrant structures and macros. */ - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int promela_lex_destroy (yyscan_t yyscanner ); - -int promela_get_debug (yyscan_t yyscanner ); - -void promela_set_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE promela_get_extra (yyscan_t yyscanner ); - -void promela_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *promela_get_in (yyscan_t yyscanner ); - -void promela_set_in (FILE * in_str ,yyscan_t yyscanner ); - -FILE *promela_get_out (yyscan_t yyscanner ); - -void promela_set_out (FILE * out_str ,yyscan_t yyscanner ); - -yy_size_t promela_get_leng (yyscan_t yyscanner ); - -char *promela_get_text (yyscan_t yyscanner ); - -int promela_get_lineno (yyscan_t yyscanner ); - -void promela_set_lineno (int line_number ,yyscan_t yyscanner ); - -/* %if-bison-bridge */ - -YYSTYPE * promela_get_lval (yyscan_t yyscanner ); - -void promela_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); - -YYLTYPE *promela_get_lloc (yyscan_t yyscanner ); - -void promela_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); - -/* %endif */ - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int promela_wrap (yyscan_t yyscanner ); -#else -extern int promela_wrap (yyscan_t yyscanner ); -#endif -#endif - -/* %not-for-header */ - -static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); - -/* %ok-for-header */ - -/* %endif */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT -/* %if-c-only Standard (non-C++) definition */ -/* %not-for-header */ - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif -/* %ok-for-header */ - -/* %endif */ -#endif - -/* %if-c-only */ - -/* %endif */ - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* %if-c-only Standard (non-C++) definition */ -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO fwrite( yytext, yyleng, 1, yyout ) -/* %endif */ -/* %if-c++-only C++ definition */ -/* %endif */ -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ -/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - yy_size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ -/* %if-c++-only C++ definition \ */\ -/* %endif */ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -/* %if-c-only */ -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -#endif - -/* %if-tables-serialization structures and prototypes */ -/* %not-for-header */ - -/* %ok-for-header */ - -/* %not-for-header */ - -/* %tables-yydmap generated elements */ -/* %endif */ -/* end tables serialization structures and prototypes */ - -/* %ok-for-header */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 -/* %if-c-only Standard (non-C++) definition */ - -extern int promela_lex \ -(YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); - -#define YY_DECL int promela_lex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only C++ definition */ -/* %endif */ -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -/* %% [6.0] YY_RULE_SETUP definition goes here */ -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/* %not-for-header */ - -/** The main scanner function which does all the work. - */ -YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* %% [7.0] user's declarations go here */ -#line 42 "promela.l" - - -#line 970 "promela.lex.yy.cpp" - - yylval = yylval_param; - - yylloc = yylloc_param; - - if ( !yyg->yy_init ) { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - /* %if-c-only */ - yyin = stdin; - /* %endif */ - /* %if-c++-only */ - /* %endif */ - - if ( ! yyout ) - /* %if-c-only */ - yyout = stdout; - /* %endif */ - /* %if-c++-only */ - /* %endif */ - - if ( ! YY_CURRENT_BUFFER ) { - promela_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - promela__load_buffer_state(yyscanner ); - } - - while ( 1 ) { /* loops until end-of-file is reached */ - /* %% [8.0] yymore()-related code goes here */ - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - /* %% [9.0] code to set up and find next match goes here */ - yy_current_state = yyg->yy_start; -yy_match: - do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 126 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } while ( yy_current_state != 125 ); - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - -yy_find_action: - /* %% [10.0] code to find the action number goes here */ - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - - /* %% [11.0] code for yylineno update goes here */ - - if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { - yy_size_t yyl; - for ( yyl = 0; yyl < yyleng; ++yyl ) - if ( yytext[yyl] == '\n' ) - - do { - yylineno++; - yycolumn=0; - } while(0) - ; - } - -do_action: /* This label is used only to access EOF actions. */ - - /* %% [12.0] debug code goes here */ - if ( yy_flex_debug ) { - if ( yy_act == 0 ) - fprintf( stderr, "--scanner backing up\n" ); - else if ( yy_act < 46 ) - fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", - (long)yy_rule_linenum[yy_act], yytext ); - else if ( yy_act == 46 ) - fprintf( stderr, "--accepting default rule (\"%s\")\n", - yytext ); - else if ( yy_act == 47 ) - fprintf( stderr, "--(end of buffer or a NUL)\n" ); - else - fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); - } - - switch ( yy_act ) { - /* beginning of action switch */ - /* %% [13.0] actions go here */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - - case 1: - /* rule 1 can match eol */ - YY_RULE_SETUP -#line 44 "promela.l" - /* multiline comments */ - YY_BREAK - case 2: - YY_RULE_SETUP -#line 46 "promela.l" - { - yylval->value = strdup(yytext); - return PML_TYPE; - } - YY_BREAK - case 3: - YY_RULE_SETUP -#line 51 "promela.l" - { return PML_LEN; } - YY_BREAK - case 4: - YY_RULE_SETUP -#line 52 "promela.l" - { yylval->value = strdup(yytext); return PML_CONST; } - YY_BREAK - case 5: - YY_RULE_SETUP -#line 53 "promela.l" - { return PML_PRINT; } - YY_BREAK - case 6: - YY_RULE_SETUP -#line 54 "promela.l" - { return PML_TYPEDEF; } - YY_BREAK - case 7: - YY_RULE_SETUP -#line 55 "promela.l" - { return PML_ASSERT; } - YY_BREAK - case 8: - YY_RULE_SETUP -#line 57 "promela.l" - { return PML_NEG; } - YY_BREAK - case 9: - YY_RULE_SETUP -#line 58 "promela.l" - { return PML_COMPL; } - YY_BREAK - case 10: - YY_RULE_SETUP -#line 59 "promela.l" - { return PML_INCR; } - YY_BREAK - case 11: - YY_RULE_SETUP -#line 60 "promela.l" - { return PML_DECR; } - YY_BREAK - case 12: - YY_RULE_SETUP -#line 62 "promela.l" - { return PML_TIMES; } - YY_BREAK - case 13: - YY_RULE_SETUP -#line 63 "promela.l" - { return PML_DIVIDE; } - YY_BREAK - case 14: - YY_RULE_SETUP -#line 64 "promela.l" - { return PML_MODULO; } - YY_BREAK - case 15: - YY_RULE_SETUP -#line 66 "promela.l" - { return PML_PLUS; } - YY_BREAK - case 16: - YY_RULE_SETUP -#line 67 "promela.l" - { return PML_MINUS; } - YY_BREAK - case 17: - YY_RULE_SETUP -#line 69 "promela.l" - { return PML_LSHIFT; } - YY_BREAK - case 18: - YY_RULE_SETUP -#line 70 "promela.l" - { return PML_RSHIFT; } - YY_BREAK - case 19: - YY_RULE_SETUP -#line 72 "promela.l" - { return PML_LE; } - YY_BREAK - case 20: - YY_RULE_SETUP -#line 73 "promela.l" - { return PML_GE; } - YY_BREAK - case 21: - YY_RULE_SETUP -#line 74 "promela.l" - { return PML_LT; } - YY_BREAK - case 22: - YY_RULE_SETUP -#line 75 "promela.l" - { return PML_GT; } - YY_BREAK - case 23: - YY_RULE_SETUP -#line 77 "promela.l" - { return PML_NE; } - YY_BREAK - case 24: - YY_RULE_SETUP -#line 78 "promela.l" - { return PML_EQ; } - YY_BREAK - case 25: - YY_RULE_SETUP -#line 80 "promela.l" - { return PML_BITAND; } - YY_BREAK - case 26: - YY_RULE_SETUP -#line 81 "promela.l" - { return PML_BITXOR; } - YY_BREAK - case 27: - YY_RULE_SETUP -#line 82 "promela.l" - { return PML_BITOR; } - YY_BREAK - case 28: - YY_RULE_SETUP -#line 85 "promela.l" - { return PML_AND; } - YY_BREAK - case 29: - YY_RULE_SETUP -#line 86 "promela.l" - { return PML_OR; } - YY_BREAK - case 30: - YY_RULE_SETUP -#line 88 "promela.l" - { return PML_DOT; } - YY_BREAK - case 31: - YY_RULE_SETUP -#line 89 "promela.l" - { return PML_COMMA; } - YY_BREAK - case 32: - YY_RULE_SETUP -#line 90 "promela.l" - { return PML_SEMI; } - YY_BREAK - case 33: - YY_RULE_SETUP -#line 92 "promela.l" - { return '('; } - YY_BREAK - case 34: - YY_RULE_SETUP -#line 93 "promela.l" - { return ')'; } - YY_BREAK - case 35: - YY_RULE_SETUP -#line 95 "promela.l" - { return '['; } - YY_BREAK - case 36: - YY_RULE_SETUP -#line 96 "promela.l" - { return ']'; } - YY_BREAK - case 37: - YY_RULE_SETUP -#line 98 "promela.l" - { return '{'; } - YY_BREAK - case 38: - YY_RULE_SETUP -#line 99 "promela.l" - { return '}'; } - YY_BREAK - case 39: - YY_RULE_SETUP -#line 101 "promela.l" - { return PML_ASGN; } - YY_BREAK - case 40: - /* rule 40 can match eol */ - YY_RULE_SETUP -#line 103 "promela.l" - { yylval->value = strdup(yytext); return(PML_STRING); } - YY_BREAK - case 41: - /* rule 41 can match eol */ - YY_RULE_SETUP -#line 106 "promela.l" - { - /* Non PROMELA extension for single quoted string literals */ - yylval->value = strdup(yytext); - return(PML_STRING); - } - YY_BREAK - case 42: - YY_RULE_SETUP -#line 111 "promela.l" - { yylval->value = strdup(yytext); return PML_CONST; } - YY_BREAK - case 43: - YY_RULE_SETUP -#line 112 "promela.l" - { yylval->value = strdup(yytext); return PML_NAME; } - YY_BREAK - case 44: - /* rule 44 can match eol */ - YY_RULE_SETUP -#line 114 "promela.l" - /* eat up whitespace */ - YY_BREAK - case 45: - YY_RULE_SETUP -#line 117 "promela.l" - { /*printf( "Unrecognized character: %s\n", yytext ); */ } - YY_BREAK - case 46: - YY_RULE_SETUP -#line 118 "promela.l" - ECHO; - YY_BREAK -#line 1336 "promela.lex.yy.cpp" - case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * promela_lex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) { - /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) { - case EOB_ACT_END_OF_FILE: { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( promela_wrap(yyscanner ) ) { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of promela_lex */ -/* %ok-for-header */ - -/* %if-c++-only */ -/* %not-for-header */ - -/* %ok-for-header */ - -/* %endif */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -/* %if-c-only */ -static int yy_get_next_buffer (yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { - /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) { - /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - promela_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) { - if ( number_to_move == YY_MORE_ADJ ) { - ret_val = EOB_ACT_END_OF_FILE; - promela_restart(yyin ,yyscanner); - } - - else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) promela_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -/* %if-c-only */ -/* %not-for-header */ - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - register yy_state_type yy_current_state; - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* %% [15.0] code to get the start state into yy_current_state goes here */ - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { - /* %% [16.0] code to find the next state goes here */ - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 126 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ -/* %if-c-only */ -static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - register int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ - register char *yy_cp = yyg->yy_c_buf_p; - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 126 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 125); - - return yy_is_jam ? 0 : yy_current_state; -} - -/* %if-c-only */ - -static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_cp = yyg->yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yyg->yy_hold_char; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { - /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register yy_size_t number_to_move = yyg->yy_n_chars + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - /* %% [18.0] update yylineno here */ - - if ( c == '\n' ) { - --yylineno; - } - - yyg->yytext_ptr = yy_bp; - yyg->yy_hold_char = *yy_cp; - yyg->yy_c_buf_p = yy_cp; -} -/* %if-c-only */ - -/* %endif */ - -/* %if-c-only */ -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner) -#else -static int input (yyscan_t yyscanner) -#endif - -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else { - /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - promela_restart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: { - if ( promela_wrap(yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - /* %% [19.0] update BOL and yylineno */ - if ( c == '\n' ) - - do { - yylineno++; - yycolumn=0; - } while(0) - ; - - return c; -} -/* %if-c-only */ -#endif /* ifndef YY_NO_INPUT */ -/* %endif */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ -/* %if-c-only */ -void promela_restart (FILE * input_file , yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ) { - promela_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - promela__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - promela__load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ -/* %if-c-only */ -void promela__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * promela_pop_buffer_state(); - * promela_push_buffer_state(new_buffer); - */ - promela_ensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - promela__load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (promela_wrap()) processing, but the only time this flag - * is looked at is after promela_wrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/* %if-c-only */ -static void promela__load_buffer_state (yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ -/* %if-c-only */ -YY_BUFFER_STATE promela__create_buffer (FILE * file, int size , yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) promela_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in promela__create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) promela_alloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in promela__create_buffer()" ); - - b->yy_is_our_buffer = 1; - - promela__init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with promela__create_buffer() - * @param yyscanner The scanner object. - */ -/* %if-c-only */ -void promela__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - promela_free((void *) b->yy_ch_buf ,yyscanner ); - - promela_free((void *) b ,yyscanner ); -} - -/* %if-c-only */ - -/* %endif */ - -/* %if-c++-only */ -/* %endif */ - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a promela_restart() or at EOF. - */ -/* %if-c-only */ -static void promela__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - promela__flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then promela__init_buffer was _probably_ - * called from promela_restart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER) { - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - /* %if-c-only */ - - b->yy_is_interactive = 0; - - /* %endif */ - /* %if-c++-only */ - /* %endif */ - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ -/* %if-c-only */ -void promela__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - promela__load_buffer_state(yyscanner ); -} - -/* %if-c-or-c++ */ -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -/* %if-c-only */ -void promela_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - promela_ensure_buffer_stack(yyscanner); - - /* This block is copied from promela__switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from promela__switch_to_buffer. */ - promela__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} -/* %endif */ - -/* %if-c-or-c++ */ -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -/* %if-c-only */ -void promela_pop_buffer_state (yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - promela__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - promela__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} -/* %endif */ - -/* %if-c-or-c++ */ -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -/* %if-c-only */ -static void promela_ensure_buffer_stack (yyscan_t yyscanner) -/* %endif */ -/* %if-c++-only */ -/* %endif */ -{ - yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - yyg->yy_buffer_stack = (struct yy_buffer_state**)promela_alloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in promela_ensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)promela_realloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in promela_ensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} -/* %endif */ - -/* %if-c-only */ -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE promela__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) promela_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in promela__scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - promela__switch_to_buffer(b ,yyscanner ); - - return b; -} -/* %endif */ - -/* %if-c-only */ -/** Setup the input buffer state to scan a string. The next call to promela_lex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * promela__scan_bytes() instead. - */ -YY_BUFFER_STATE promela__scan_string (yyconst char * yystr , yyscan_t yyscanner) { - - return promela__scan_bytes(yystr,strlen(yystr) ,yyscanner); -} -/* %endif */ - -/* %if-c-only */ -/** Setup the input buffer state to scan the given bytes. The next call to promela_lex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE promela__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n, i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) promela_alloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in promela__scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = promela__scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in promela__scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} -/* %endif */ - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -/* %if-c-only */ -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} -/* %endif */ -/* %if-c++-only */ -/* %endif */ - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/* %if-c-only */ -/* %if-reentrant */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE promela_get_extra (yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/* %endif */ - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int promela_get_lineno (yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int promela_get_column (yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *promela_get_in (yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *promela_get_out (yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -yy_size_t promela_get_leng (yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *promela_get_text (yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/* %if-reentrant */ - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void promela_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/* %endif */ - -/** Set the current line number. - * @param line_number - * @param yyscanner The scanner object. - */ -void promela_set_lineno (int line_number , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "promela_set_lineno called with no buffer" , yyscanner); - - yylineno = line_number; -} - -/** Set the current column. - * @param line_number - * @param yyscanner The scanner object. - */ -void promela_set_column (int column_no , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "promela_set_column called with no buffer" , yyscanner); - - yycolumn = column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * @param yyscanner The scanner object. - * @see promela__switch_to_buffer - */ -void promela_set_in (FILE * in_str , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; -} - -void promela_set_out (FILE * out_str , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; -} - -int promela_get_debug (yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void promela_set_debug (int bdebug , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; -} - -/* %endif */ - -/* %if-reentrant */ -/* Accessor methods for yylval and yylloc */ - -/* %if-bison-bridge */ - -YYSTYPE * promela_get_lval (yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; -} - -void promela_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; -} - -YYLTYPE *promela_get_lloc (yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; -} - -void promela_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; -} - -/* %endif */ - -/* User-visible API */ - -/* promela_lex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int promela_lex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) promela_alloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* promela_lex_init_extra has the same functionality as promela_lex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to promela_alloc in - * the yyextra field. - */ - -int promela_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - promela_set_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) promela_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - promela_set_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* %endif if-c-only */ - -/* %if-c-only */ -static int yy_init_globals (yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from promela_lex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = 0; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - - /* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * promela_lex_init() - */ - return 0; -} -/* %endif */ - -/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */ -/* promela_lex_destroy is for both reentrant and non-reentrant scanners. */ -int promela_lex_destroy (yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER) { - promela__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - promela_pop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - promela_free(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - promela_free(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * promela_lex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* %if-reentrant */ - /* Destroy the main struct (reentrant only). */ - promela_free ( yyscanner , yyscanner ); - yyscanner = NULL; - /* %endif */ - return 0; -} -/* %endif */ - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *promela_alloc (yy_size_t size , yyscan_t yyscanner) { - return (void *) malloc( size ); -} - -void *promela_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void promela_free (void * ptr , yyscan_t yyscanner) { - free( (char *) ptr ); /* see promela_realloc() for (char *) cast */ -} - -/* %if-tables-serialization definitions */ -/* %define-yytables The name for this specific scanner's tables. */ -#define YYTABLES_NAME "yytables" -/* %endif */ - -/* %ok-for-header */ - -#line 118 "promela.l" diff --git a/src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp b/src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp deleted file mode 100644 index 098c890..0000000 --- a/src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp +++ /dev/null @@ -1,2634 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.7.12-4996" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Substitute the type names. */ -#define YYSTYPE PROMELA_STYPE -#define YYLTYPE PROMELA_LTYPE -/* Substitute the variable and function names. */ -#define yyparse promela_parse -#define yylex promela_lex -#define yyerror promela_error -#define yylval promela_lval -#define yychar promela_char -#define yydebug promela_debug -#define yynerrs promela_nerrs -#define yylloc promela_lloc - -/* Copy the first part of user declarations. */ -/* Line 371 of yacc.c */ -#line 14 "promela.ypp" - -#include "../PromelaParser.h" -#include "promela.tab.hpp" -#include -#include - -#define YYMAXDEPTH 20000 // default is 10000 -#define YYDEBUG 1 -#define YYERROR_VERBOSE 1 - -extern int promela_lex (PROMELA_STYPE* yylval_param, PROMELA_LTYPE* yylloc_param, void* yyscanner); - -using namespace uscxml; - -/* Line 371 of yacc.c */ -#line 93 "promela.tab.cpp" - -# ifndef YY_NULL -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr -# else -# define YY_NULL 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "promela.tab.hpp". */ -#ifndef YY_PROMELA_PROMELA_TAB_HPP_INCLUDED -# define YY_PROMELA_PROMELA_TAB_HPP_INCLUDED -/* Enabling traces. */ -#ifndef PROMELA_DEBUG -# if defined YYDEBUG -# if YYDEBUG -# define PROMELA_DEBUG 1 -# else -# define PROMELA_DEBUG 0 -# endif -# else /* ! defined YYDEBUG */ -# define PROMELA_DEBUG 1 -# endif /* ! defined YYDEBUG */ -#endif /* ! defined PROMELA_DEBUG */ -#if PROMELA_DEBUG -extern int promela_debug; -#endif - -/* Tokens. */ -#ifndef PROMELA_TOKENTYPE -# define PROMELA_TOKENTYPE -/* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ -enum promela_tokentype { - PML_VAR_ARRAY = 258, - PML_VARLIST = 259, - PML_DECL = 260, - PML_DECLLIST = 261, - PML_STMNT = 262, - PML_COLON = 263, - PML_EXPR = 264, - PML_NAMELIST = 265, - PML_ASSERT = 266, - PML_PRINT = 267, - PML_PRINTM = 268, - PML_LEN = 269, - PML_STRING = 270, - PML_TYPEDEF = 271, - PML_MTYPE = 272, - PML_INLINE = 273, - PML_RETURN = 274, - PML_LABEL = 275, - PML_OF = 276, - PML_GOTO = 277, - PML_BREAK = 278, - PML_ELSE = 279, - PML_SEMI = 280, - PML_ARROW = 281, - PML_IF = 282, - PML_FI = 283, - PML_DO = 284, - PML_OD = 285, - PML_FOR = 286, - PML_SELECT = 287, - PML_IN = 288, - PML_SEP = 289, - PML_DOTDOT = 290, - PML_HIDDEN = 291, - PML_SHOW = 292, - PML_ISLOCAL = 293, - PML_CONST = 294, - PML_TYPE = 295, - PML_XU = 296, - PML_NAME = 297, - PML_UNAME = 298, - PML_PNAME = 299, - PML_INAME = 300, - PML_CLAIM = 301, - PML_TRACE = 302, - PML_INIT = 303, - PML_LTL = 304, - PML_COMMA = 305, - PML_ASGN = 306, - PML_AND = 307, - PML_OR = 308, - PML_BITAND = 309, - PML_BITXOR = 310, - PML_BITOR = 311, - PML_NE = 312, - PML_EQ = 313, - PML_LE = 314, - PML_GE = 315, - PML_LT = 316, - PML_GT = 317, - PML_RSHIFT = 318, - PML_LSHIFT = 319, - PML_MINUS = 320, - PML_PLUS = 321, - PML_MODULO = 322, - PML_DIVIDE = 323, - PML_TIMES = 324, - PML_DECR = 325, - PML_INCR = 326, - PML_COMPL = 327, - PML_NEG = 328, - PML_CMPND = 329, - PML_DOT = 330 -}; -#endif - - -#if ! defined PROMELA_STYPE && ! defined PROMELA_STYPE_IS_DECLARED -typedef union PROMELA_STYPE { - /* Line 387 of yacc.c */ -#line 39 "promela.ypp" - - uscxml::PromelaParserNode* node; - char* value; - - - /* Line 387 of yacc.c */ -#line 225 "promela.tab.cpp" -} PROMELA_STYPE; -# define PROMELA_STYPE_IS_TRIVIAL 1 -# define promela_stype PROMELA_STYPE /* obsolescent; will be withdrawn */ -# define PROMELA_STYPE_IS_DECLARED 1 -#endif - -#if ! defined PROMELA_LTYPE && ! defined PROMELA_LTYPE_IS_DECLARED -typedef struct PROMELA_LTYPE { - int first_line; - int first_column; - int last_line; - int last_column; -} PROMELA_LTYPE; -# define promela_ltype PROMELA_LTYPE /* obsolescent; will be withdrawn */ -# define PROMELA_LTYPE_IS_DECLARED 1 -# define PROMELA_LTYPE_IS_TRIVIAL 1 -#endif - - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int promela_parse (void *YYPARSE_PARAM); -#else -int promela_parse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int promela_parse (uscxml::PromelaParser* ctx, void * scanner); -#else -int promela_parse (); -#endif -#endif /* ! YYPARSE_PARAM */ - -#endif /* !YY_PROMELA_PROMELA_TAB_HPP_INCLUDED */ - -/* Copy the second part of user declarations. */ - -/* Line 390 of yacc.c */ -#line 265 "promela.tab.cpp" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if (! defined __GNUC__ || __GNUC__ < 2 \ - || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) -# define __attribute__(Spec) /* empty */ -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) -int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -/* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC -/* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM -/* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined PROMELA_LTYPE_IS_TRIVIAL && PROMELA_LTYPE_IS_TRIVIAL \ - && defined PROMELA_STYPE_IS_TRIVIAL && PROMELA_STYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc { - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 32 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 285 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 82 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 21 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 81 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 143 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 330 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = { - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 11, 12, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 13, 2, 14, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 15, 2, 16, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81 -}; - -#if PROMELA_DEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = { - 0, 0, 3, 5, 7, 9, 11, 13, 18, 21, - 22, 25, 29, 33, 37, 41, 45, 49, 53, 57, - 61, 65, 69, 73, 77, 81, 85, 89, 93, 97, - 101, 104, 107, 112, 114, 116, 118, 119, 121, 123, - 125, 129, 133, 140, 143, 149, 151, 154, 158, 160, - 164, 166, 170, 172, 176, 181, 183, 186, 190, 194, - 198, 202, 206, 210, 212, 215, 218, 220, 223, 227, - 229, 233, 236, 239, 245, 250, 255, 258, 260, 261, - 264, 266 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = { - 83, 0, -1, 92, -1, 88, -1, 98, -1, 86, - -1, 48, -1, 48, 13, 88, 14, -1, 85, 87, - -1, -1, 81, 86, -1, 11, 88, 12, -1, 88, - 72, 88, -1, 88, 71, 88, -1, 88, 75, 88, - -1, 88, 74, 88, -1, 88, 73, 88, -1, 88, - 60, 88, -1, 88, 61, 88, -1, 88, 62, 88, - -1, 88, 68, 88, -1, 88, 67, 88, -1, 88, - 66, 88, -1, 88, 65, 88, -1, 88, 64, 88, - -1, 88, 63, 88, -1, 88, 58, 88, -1, 88, - 59, 88, -1, 88, 70, 88, -1, 88, 69, 88, - -1, 79, 88, -1, 71, 88, -1, 20, 11, 84, - 12, -1, 84, -1, 45, -1, 21, -1, -1, 42, - -1, 43, -1, 44, -1, 89, 46, 93, -1, 89, - 49, 93, -1, 89, 46, 57, 15, 97, 16, -1, - 89, 91, -1, 22, 48, 15, 92, 16, -1, 90, - -1, 90, 31, -1, 90, 31, 92, -1, 94, -1, - 94, 56, 93, -1, 95, -1, 95, 57, 88, -1, - 48, -1, 48, 8, 45, -1, 48, 13, 96, 14, - -1, 45, -1, 71, 96, -1, 11, 96, 12, -1, - 96, 72, 96, -1, 96, 71, 96, -1, 96, 75, - 96, -1, 96, 74, 96, -1, 96, 73, 96, -1, - 48, -1, 97, 48, -1, 97, 56, -1, 99, -1, - 99, 31, -1, 99, 31, 98, -1, 100, -1, 84, - 57, 88, -1, 84, 77, -1, 84, 76, -1, 18, - 11, 21, 101, 12, -1, 18, 11, 84, 12, -1, - 18, 11, 45, 12, -1, 17, 88, -1, 88, -1, - -1, 56, 102, -1, 88, -1, 88, 56, 102, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint8 yyrline[] = { - 0, 85, 85, 89, 93, 99, 102, 103, 106, 121, - 122, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 154, 155, 156, 157, 163, 164, 165, 166, - 169, 170, 171, 172, 175, 178, 179, 180, 190, 191, - 194, 195, 198, 199, 200, 203, 204, 205, 206, 207, - 208, 209, 210, 213, 214, 223, 226, 227, 228, 231, - 234, 235, 236, 237, 238, 239, 240, 241, 244, 245, - 248, 249 -}; -#endif - -#if PROMELA_DEBUG || YYERROR_VERBOSE || 1 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = { - "$end", "error", "$undefined", "PML_VAR_ARRAY", "PML_VARLIST", - "PML_DECL", "PML_DECLLIST", "PML_STMNT", "PML_COLON", "PML_EXPR", - "PML_NAMELIST", "'('", "')'", "'['", "']'", "'{'", "'}'", "PML_ASSERT", - "PML_PRINT", "PML_PRINTM", "PML_LEN", "PML_STRING", "PML_TYPEDEF", - "PML_MTYPE", "PML_INLINE", "PML_RETURN", "PML_LABEL", "PML_OF", - "PML_GOTO", "PML_BREAK", "PML_ELSE", "PML_SEMI", "PML_ARROW", "PML_IF", - "PML_FI", "PML_DO", "PML_OD", "PML_FOR", "PML_SELECT", "PML_IN", - "PML_SEP", "PML_DOTDOT", "PML_HIDDEN", "PML_SHOW", "PML_ISLOCAL", - "PML_CONST", "PML_TYPE", "PML_XU", "PML_NAME", "PML_UNAME", "PML_PNAME", - "PML_INAME", "PML_CLAIM", "PML_TRACE", "PML_INIT", "PML_LTL", - "PML_COMMA", "PML_ASGN", "PML_AND", "PML_OR", "PML_BITAND", "PML_BITXOR", - "PML_BITOR", "PML_NE", "PML_EQ", "PML_LE", "PML_GE", "PML_LT", "PML_GT", - "PML_RSHIFT", "PML_LSHIFT", "PML_MINUS", "PML_PLUS", "PML_MODULO", - "PML_DIVIDE", "PML_TIMES", "PML_DECR", "PML_INCR", "PML_COMPL", - "PML_NEG", "PML_CMPND", "PML_DOT", "$accept", "program", "varref", - "pfld", "cmpnd", "sfld", "expr", "vis", "one_decl", "utype", "decl_lst", - "var_list", "ivar", "vardcl", "const_expr", "nlst", "stmnt_lst", "stmnt", - "Stmnt", "prargs", "arg", YY_NULL -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = { - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 40, 41, 91, 93, 123, 125, 266, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 330 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = { - 0, 82, 83, 83, 83, 84, 85, 85, 86, 87, - 87, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, - 90, 90, 90, 90, 91, 92, 92, 92, 93, 93, - 94, 94, 95, 95, 95, 96, 96, 96, 96, 96, - 96, 96, 96, 97, 97, 97, 98, 98, 98, 99, - 100, 100, 100, 100, 100, 100, 100, 100, 101, 101, - 102, 102 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = { - 0, 2, 1, 1, 1, 1, 1, 4, 2, 0, - 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 2, 4, 1, 1, 1, 0, 1, 1, 1, - 3, 3, 6, 2, 5, 1, 2, 3, 1, 3, - 1, 3, 1, 3, 4, 1, 2, 3, 3, 3, - 3, 3, 3, 1, 2, 2, 1, 2, 3, 1, - 3, 2, 2, 5, 4, 4, 2, 1, 0, 2, - 1, 3 -}; - -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = { - 36, 0, 0, 0, 0, 35, 37, 38, 39, 34, - 6, 0, 0, 0, 33, 9, 5, 3, 0, 45, - 2, 4, 66, 69, 33, 0, 76, 0, 0, 0, - 31, 30, 1, 0, 72, 71, 0, 8, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, - 36, 67, 11, 78, 0, 0, 0, 0, 70, 10, - 26, 27, 17, 18, 19, 25, 24, 23, 22, 21, - 20, 29, 28, 13, 12, 16, 15, 14, 0, 52, - 0, 40, 48, 50, 41, 47, 77, 68, 0, 0, - 75, 74, 32, 7, 36, 0, 0, 0, 0, 0, - 80, 79, 73, 0, 53, 0, 55, 0, 0, 63, - 0, 49, 51, 0, 44, 0, 56, 54, 0, 0, - 0, 0, 0, 42, 64, 65, 81, 57, 59, 58, - 62, 61, 60 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = { - -1, 13, 24, 15, 16, 37, 110, 18, 19, 59, - 20, 91, 92, 93, 118, 120, 21, 22, 23, 99, - 111 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -112 -static const yytype_int16 yypact[] = { - 14, 53, 53, 3, 13, -112, -112, -112, -112, -112, - 15, 53, 53, 26, 34, -51, -112, 138, 81, 5, - -112, -112, 58, -112, -112, 75, 160, 169, 42, 53, - -66, -112, -112, 53, -112, -112, 42, -112, 53, 53, - 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 53, 44, -35, 51, -112, - 72, 49, -112, 46, 88, 96, 100, 93, 160, -112, - 176, 176, 189, 189, 189, 200, 200, 207, 207, 207, - 207, 120, 120, -66, -66, -112, -112, -112, 98, -3, - 102, -112, 63, 74, -112, -112, 160, -112, 53, 113, - -112, -112, -112, -112, 62, 126, -8, 167, 51, 53, - 114, -112, -112, 267, -112, -8, -112, -8, 9, -112, - 70, -112, 160, 53, -112, 4, 48, -112, -8, -8, - -8, -8, -8, -112, -112, -112, -112, -112, 48, 48, - -112, -112, -112 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = { - -112, -112, 68, -112, 180, -112, 0, -112, -112, -112, - -33, -43, -112, -112, -111, -112, 223, -112, -112, -112, - 162 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -78 -static const yytype_int16 yytable[] = { - 17, 25, 26, 115, 125, 105, 126, 53, 54, 55, - 106, 30, 31, 89, 27, 94, 137, 138, 139, 140, - 141, 142, 90, 127, 28, 1, 32, 95, 29, 67, - 36, 2, 3, 68, 4, 5, 60, 116, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 6, 7, 8, 9, - 1, 96, 10, 117, 1, 121, 2, 3, 14, 4, - 5, 113, -46, 4, 5, 128, 129, 130, 131, 132, - 128, 129, 130, 131, 132, 11, 133, 62, -46, 61, - 10, 33, 88, 12, 9, 65, 66, 10, 9, 89, - 100, 10, 98, 56, 6, 7, 8, 103, 101, 122, - 34, 35, 102, 104, 6, 7, 8, 107, 134, 108, - 11, 130, 131, 132, 11, 112, 135, 57, 12, 14, - 58, 109, 12, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, -77, - 123, 114, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 63, 51, 52, 53, 54, 55, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 64, 119, 69, 10, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 49, 50, 51, 52, - 53, 54, 55, 124, 97, 136 -}; - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-112))) - -#define yytable_value_is_error(Yytable_value) \ - YYID (0) - -static const yytype_uint8 yycheck[] = { - 0, 1, 2, 11, 115, 8, 117, 73, 74, 75, - 13, 11, 12, 48, 11, 58, 12, 128, 129, 130, - 131, 132, 57, 14, 11, 11, 0, 60, 13, 29, - 81, 17, 18, 33, 20, 21, 31, 45, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 42, 43, 44, 45, - 11, 61, 48, 71, 11, 108, 17, 18, 0, 20, - 21, 104, 0, 20, 21, 71, 72, 73, 74, 75, - 71, 72, 73, 74, 75, 71, 16, 12, 16, 31, - 48, 57, 48, 79, 45, 27, 28, 48, 45, 48, - 12, 48, 56, 22, 42, 43, 44, 14, 12, 109, - 76, 77, 12, 15, 42, 43, 44, 15, 48, 56, - 71, 73, 74, 75, 71, 12, 56, 46, 79, 61, - 49, 57, 79, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 31, - 56, 45, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 21, 71, 72, 73, 74, 75, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 45, 48, 36, 48, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 69, 70, 71, 72, - 73, 74, 75, 16, 61, 123 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = { - 0, 11, 17, 18, 20, 21, 42, 43, 44, 45, - 48, 71, 79, 83, 84, 85, 86, 88, 89, 90, - 92, 98, 99, 100, 84, 88, 88, 11, 11, 13, - 88, 88, 0, 57, 76, 77, 81, 87, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 22, 46, 49, 91, - 31, 31, 12, 21, 45, 84, 84, 88, 88, 86, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 48, 48, - 57, 93, 94, 95, 93, 92, 88, 98, 56, 101, - 12, 12, 12, 14, 15, 8, 13, 15, 56, 57, - 88, 102, 12, 92, 45, 11, 45, 71, 96, 48, - 97, 93, 88, 56, 16, 96, 96, 14, 71, 72, - 73, 74, 75, 16, 48, 56, 102, 12, 96, 96, - 96, 96, 96 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL -/* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, ctx, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined PROMELA_LTYPE_IS_TRIVIAL && PROMELA_LTYPE_IS_TRIVIAL - -/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ - -__attribute__((__unused__)) -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static unsigned -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) -#else -static unsigned -yy_location_print_ (yyo, yylocp) -FILE *yyo; -YYLTYPE const * const yylocp; -#endif -{ - unsigned res = 0; - int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) { - res += fprintf (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += fprintf (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) { - if (yylocp->first_line < yylocp->last_line) { - res += fprintf (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += fprintf (yyo, ".%d", end_col); - } else if (0 <= end_col && yylocp->first_column < end_col) - res += fprintf (yyo, "-%d", end_col); - } - return res; -} - -# define YY_LOCATION_PRINT(File, Loc) \ - yy_location_print_ (File, &(Loc)) - -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, &yylloc, scanner) -#endif - -/* Enable debugging if requested. */ -#if PROMELA_DEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location, ctx, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, uscxml::PromelaParser* ctx, void * scanner) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, ctx, scanner) -FILE *yyoutput; -int yytype; -YYSTYPE const * const yyvaluep; -YYLTYPE const * const yylocationp; -uscxml::PromelaParser* ctx; -void * scanner; -#endif -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - if (!yyvaluep) - return; - YYUSE (yylocationp); - YYUSE (ctx); - YYUSE (scanner); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, uscxml::PromelaParser* ctx, void * scanner) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, ctx, scanner) -FILE *yyoutput; -int yytype; -YYSTYPE const * const yyvaluep; -YYLTYPE const * const yylocationp; -uscxml::PromelaParser* ctx; -void * scanner; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, ctx, scanner); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) -yytype_int16 *yybottom; -yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, uscxml::PromelaParser* ctx, void * scanner) -#else -static void -yy_reduce_print (yyvsp, yylsp, yyrule, ctx, scanner) -YYSTYPE *yyvsp; -YYLTYPE *yylsp; -int yyrule; -uscxml::PromelaParser* ctx; -void * scanner; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) , ctx, scanner); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule, ctx, scanner); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !PROMELA_DEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !PROMELA_DEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) -const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) -char *yydest; -const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) { - if (*yystr == '"') { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } -do_not_strip_quotes: - ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULL; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } else { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, uscxml::PromelaParser* ctx, void * scanner) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp, ctx, scanner) -const char *yymsg; -int yytype; -YYSTYPE *yyvaluep; -YYLTYPE *yylocationp; -uscxml::PromelaParser* ctx; -void * scanner; -#endif -{ - YYUSE (yyvaluep); - YYUSE (yylocationp); - YYUSE (ctx); - YYUSE (scanner); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YYUSE (yytype); -} - - - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) -void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (uscxml::PromelaParser* ctx, void * scanner) -#else -int -yyparse (ctx, scanner) -uscxml::PromelaParser* ctx; -void * scanner; -#endif -#endif -{ - /* The lookahead symbol. */ - int yychar; - - -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ - /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else - /* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ - static YYSTYPE yyval_default; -# define YY_INITIAL_VALUE(Value) = Value -#endif - static YYLTYPE yyloc_default -# if defined PROMELA_LTYPE_IS_TRIVIAL && PROMELA_LTYPE_IS_TRIVIAL - = { 1, 1, 1, 1 } -# endif - ; -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - - /* The semantic value of the lookahead symbol. */ - YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - - /* Location data for the lookahead symbol. */ - YYLTYPE yylloc = yyloc_default; - - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - `yyls': related to locations. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls; - YYLTYPE *yylsp; - - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - YYLTYPE yyloc; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yylsp = yyls = yylsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - yylsp[0] = yylloc; - goto yysetstate; - - /*------------------------------------------------------------. - | yynewstate -- Push a new state, which is found in yystate. | - `------------------------------------------------------------*/ -yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - -yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - - /*-----------. - | yybackup. | - `-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } else { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - *++yylsp = yylloc; - goto yynewstate; - - - /*-----------------------------------------------------------. - | yydefault -- do the default action for the current state. | - `-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - - /*-----------------------------. - | yyreduce -- Do a reduction. | - `-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); - YY_REDUCE_PRINT (yyn); - switch (yyn) { - case 2: - /* Line 1787 of yacc.c */ -#line 85 "promela.ypp" - { - ctx->ast = (yyvsp[(1) - (1)].node); - ctx->type = PromelaParser::PROMELA_DECL; - } - break; - - case 3: - /* Line 1787 of yacc.c */ -#line 89 "promela.ypp" - { - ctx->ast = (yyvsp[(1) - (1)].node); - ctx->type = PromelaParser::PROMELA_EXPR; - } - break; - - case 4: - /* Line 1787 of yacc.c */ -#line 93 "promela.ypp" - { - ctx->ast = (yyvsp[(1) - (1)].node); - ctx->type = PromelaParser::PROMELA_STMNT; - } - break; - - case 5: - /* Line 1787 of yacc.c */ -#line 99 "promela.ypp" - { - (yyval.node) = (yyvsp[(1) - (1)].node); - } - break; - - case 6: - /* Line 1787 of yacc.c */ -#line 102 "promela.ypp" - { - (yyval.node) = ctx->value(PML_NAME, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value)); - free((yyvsp[(1) - (1)].value)); - } - break; - - case 7: - /* Line 1787 of yacc.c */ -#line 103 "promela.ypp" - { - (yyval.node) = ctx->node(PML_VAR_ARRAY, 2, ctx->value(PML_NAME, (void*)&((yylsp[(1) - (4)])), (yyvsp[(1) - (4)].value)), (yyvsp[(3) - (4)].node)); - free((yyvsp[(1) - (4)].value)); - } - break; - - case 8: - /* Line 1787 of yacc.c */ -#line 107 "promela.ypp" - { - if ((yyvsp[(2) - (2)].node) != NULL) { - if ((yyvsp[(2) - (2)].node)->type == PML_CMPND) { - (yyval.node) = ctx->node(PML_CMPND, 1, (yyvsp[(1) - (2)].node)); - (yyval.node)->merge((yyvsp[(2) - (2)].node)); - delete (yyvsp[(2) - (2)].node); - } else { - (yyval.node) = ctx->node(PML_CMPND, 2, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); - } - } else { - (yyval.node) = (yyvsp[(1) - (2)].node); - } - } - break; - - case 9: - /* Line 1787 of yacc.c */ -#line 121 "promela.ypp" - { - (yyval.node) = NULL; - } - break; - - case 10: - /* Line 1787 of yacc.c */ -#line 122 "promela.ypp" - { - (yyval.node) = (yyvsp[(2) - (2)].node); - } - break; - - case 11: - /* Line 1787 of yacc.c */ -#line 132 "promela.ypp" - { - (yyval.node) = (yyvsp[(2) - (3)].node); - } - break; - - case 12: - /* Line 1787 of yacc.c */ -#line 133 "promela.ypp" - { - (yyval.node) = ctx->node(PML_PLUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 13: - /* Line 1787 of yacc.c */ -#line 134 "promela.ypp" - { - (yyval.node) = ctx->node(PML_MINUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 14: - /* Line 1787 of yacc.c */ -#line 135 "promela.ypp" - { - (yyval.node) = ctx->node(PML_TIMES, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 15: - /* Line 1787 of yacc.c */ -#line 136 "promela.ypp" - { - (yyval.node) = ctx->node(PML_DIVIDE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 16: - /* Line 1787 of yacc.c */ -#line 137 "promela.ypp" - { - (yyval.node) = ctx->node(PML_MODULO, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 17: - /* Line 1787 of yacc.c */ -#line 138 "promela.ypp" - { - (yyval.node) = ctx->node(PML_BITAND, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 18: - /* Line 1787 of yacc.c */ -#line 139 "promela.ypp" - { - (yyval.node) = ctx->node(PML_BITXOR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 19: - /* Line 1787 of yacc.c */ -#line 140 "promela.ypp" - { - (yyval.node) = ctx->node(PML_BITOR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 20: - /* Line 1787 of yacc.c */ -#line 141 "promela.ypp" - { - (yyval.node) = ctx->node(PML_GT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 21: - /* Line 1787 of yacc.c */ -#line 142 "promela.ypp" - { - (yyval.node) = ctx->node(PML_LT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 22: - /* Line 1787 of yacc.c */ -#line 143 "promela.ypp" - { - (yyval.node) = ctx->node(PML_GE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 23: - /* Line 1787 of yacc.c */ -#line 144 "promela.ypp" - { - (yyval.node) = ctx->node(PML_LE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 24: - /* Line 1787 of yacc.c */ -#line 145 "promela.ypp" - { - (yyval.node) = ctx->node(PML_EQ, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 25: - /* Line 1787 of yacc.c */ -#line 146 "promela.ypp" - { - (yyval.node) = ctx->node(PML_NE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 26: - /* Line 1787 of yacc.c */ -#line 147 "promela.ypp" - { - (yyval.node) = ctx->node(PML_AND, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 27: - /* Line 1787 of yacc.c */ -#line 148 "promela.ypp" - { - (yyval.node) = ctx->node(PML_OR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 28: - /* Line 1787 of yacc.c */ -#line 149 "promela.ypp" - { - (yyval.node) = ctx->node(PML_LSHIFT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 29: - /* Line 1787 of yacc.c */ -#line 150 "promela.ypp" - { - (yyval.node) = ctx->node(PML_RSHIFT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 30: - /* Line 1787 of yacc.c */ -#line 151 "promela.ypp" - { - (yyval.node) = ctx->node(PML_NEG, 1, (yyvsp[(2) - (2)].node)); - } - break; - - case 31: - /* Line 1787 of yacc.c */ -#line 152 "promela.ypp" - { - (yyval.node) = ctx->node(PML_MINUS, 1, (yyvsp[(2) - (2)].node)); - } - break; - - case 32: - /* Line 1787 of yacc.c */ -#line 154 "promela.ypp" - { - (yyval.node) = ctx->node(PML_LEN, 1, (yyvsp[(3) - (4)].node)); - } - break; - - case 33: - /* Line 1787 of yacc.c */ -#line 155 "promela.ypp" - { - (yyval.node) = (yyvsp[(1) - (1)].node); - } - break; - - case 34: - /* Line 1787 of yacc.c */ -#line 156 "promela.ypp" - { - (yyval.node) = ctx->value(PML_CONST, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value)); - free((yyvsp[(1) - (1)].value)); - } - break; - - case 35: - /* Line 1787 of yacc.c */ -#line 157 "promela.ypp" - { - /* Non standard promela for string literals */ - (yyval.node) = ctx->value(PML_STRING, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value)); - free((yyvsp[(1) - (1)].value)); - } - break; - - case 36: - /* Line 1787 of yacc.c */ -#line 163 "promela.ypp" - { - (yyval.node) = ctx->node(PML_SHOW, 0); - } - break; - - case 37: - /* Line 1787 of yacc.c */ -#line 164 "promela.ypp" - { - (yyval.node) = ctx->node(PML_HIDDEN, 0); - } - break; - - case 38: - /* Line 1787 of yacc.c */ -#line 165 "promela.ypp" - { - (yyval.node) = ctx->node(PML_SHOW, 0); - } - break; - - case 39: - /* Line 1787 of yacc.c */ -#line 166 "promela.ypp" - { - (yyval.node) = ctx->node(PML_ISLOCAL, 0); - } - break; - - case 40: - /* Line 1787 of yacc.c */ -#line 169 "promela.ypp" - { - (yyval.node) = ctx->node(PML_DECL, 3, (yyvsp[(1) - (3)].node), ctx->value(PML_TYPE, (void*)&((yylsp[(2) - (3)])), (yyvsp[(2) - (3)].value)), (yyvsp[(3) - (3)].node)); - free((yyvsp[(2) - (3)].value)); - } - break; - - case 41: - /* Line 1787 of yacc.c */ -#line 170 "promela.ypp" - { - (yyval.node) = ctx->node(PML_UNAME, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 42: - /* Line 1787 of yacc.c */ -#line 171 "promela.ypp" - { - (yyval.node) = ctx->node(PML_DECL, 3, (yyvsp[(1) - (6)].node), ctx->value(PML_TYPE, (void*)&((yylsp[(2) - (6)])), (yyvsp[(2) - (6)].value)), (yyvsp[(5) - (6)].node)); - free((yyvsp[(2) - (6)].value)); - } - break; - - case 43: - /* Line 1787 of yacc.c */ -#line 172 "promela.ypp" - { - (yyval.node) = (yyvsp[(2) - (2)].node); - } - break; - - case 44: - /* Line 1787 of yacc.c */ -#line 175 "promela.ypp" - { - (yyval.node) = ctx->node(PML_TYPEDEF, 2, ctx->value(PML_NAME, (void*)&((yylsp[(2) - (5)])), (yyvsp[(2) - (5)].value)), (yyvsp[(4) - (5)].node)); - } - break; - - case 45: - /* Line 1787 of yacc.c */ -#line 178 "promela.ypp" - { - (yyval.node) = (yyvsp[(1) - (1)].node); - } - break; - - case 46: - /* Line 1787 of yacc.c */ -#line 179 "promela.ypp" - { - (yyval.node) = (yyvsp[(1) - (2)].node); - } - break; - - case 47: - /* Line 1787 of yacc.c */ -#line 180 "promela.ypp" - { - (yyval.node) = ctx->node(PML_DECLLIST, 1, (yyvsp[(1) - (3)].node)); - if((yyvsp[(3) - (3)].node)->type == PML_DECLLIST) { - (yyval.node)->merge((yyvsp[(3) - (3)].node)); - delete (yyvsp[(3) - (3)].node); - } else { - (yyval.node)->push((yyvsp[(3) - (3)].node)); - } - } - break; - - case 48: - /* Line 1787 of yacc.c */ -#line 190 "promela.ypp" - { - (yyval.node) = ctx->node(PML_VARLIST, 1, (yyvsp[(1) - (1)].node)); - } - break; - - case 49: - /* Line 1787 of yacc.c */ -#line 191 "promela.ypp" - { - (yyval.node) = ctx->node(PML_VARLIST, 1, (yyvsp[(1) - (3)].node)); - (yyval.node)->merge((yyvsp[(3) - (3)].node)); - delete (yyvsp[(3) - (3)].node); - } - break; - - case 50: - /* Line 1787 of yacc.c */ -#line 194 "promela.ypp" - { - (yyval.node) = (yyvsp[(1) - (1)].node); - } - break; - - case 51: - /* Line 1787 of yacc.c */ -#line 195 "promela.ypp" - { - (yyval.node) = ctx->node(PML_ASGN, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 52: - /* Line 1787 of yacc.c */ -#line 198 "promela.ypp" - { - (yyval.node) = ctx->value(PML_NAME, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value)); - free((yyvsp[(1) - (1)].value)); - } - break; - - case 53: - /* Line 1787 of yacc.c */ -#line 199 "promela.ypp" - { - (yyval.node) = ctx->node(PML_COLON, 2, ctx->value(PML_NAME, (void*)&((yylsp[(1) - (3)])), (yyvsp[(1) - (3)].value)), ctx->value(PML_CONST, (void*)&((yylsp[(3) - (3)])), (yyvsp[(3) - (3)].value))); - free((yyvsp[(1) - (3)].value)); - free((yyvsp[(3) - (3)].value)); - } - break; - - case 54: - /* Line 1787 of yacc.c */ -#line 200 "promela.ypp" - { - (yyval.node) = ctx->node(PML_VAR_ARRAY, 2, ctx->value(PML_NAME, (void*)&((yylsp[(1) - (4)])), (yyvsp[(1) - (4)].value)), (yyvsp[(3) - (4)].node)); - free((yyvsp[(1) - (4)].value)); - } - break; - - case 55: - /* Line 1787 of yacc.c */ -#line 203 "promela.ypp" - { - (yyval.node) = ctx->value(PML_CONST, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value)); - free((yyvsp[(1) - (1)].value)); - } - break; - - case 56: - /* Line 1787 of yacc.c */ -#line 204 "promela.ypp" - { - (yyval.node) = ctx->node(PML_MINUS, 1, (yyvsp[(2) - (2)].node)); - } - break; - - case 57: - /* Line 1787 of yacc.c */ -#line 205 "promela.ypp" - { - (yyval.node) = (yyvsp[(2) - (3)].node); - } - break; - - case 58: - /* Line 1787 of yacc.c */ -#line 206 "promela.ypp" - { - (yyval.node) = ctx->node(PML_PLUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 59: - /* Line 1787 of yacc.c */ -#line 207 "promela.ypp" - { - (yyval.node) = ctx->node(PML_MINUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 60: - /* Line 1787 of yacc.c */ -#line 208 "promela.ypp" - { - (yyval.node) = ctx->node(PML_TIMES, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 61: - /* Line 1787 of yacc.c */ -#line 209 "promela.ypp" - { - (yyval.node) = ctx->node(PML_DIVIDE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 62: - /* Line 1787 of yacc.c */ -#line 210 "promela.ypp" - { - (yyval.node) = ctx->node(PML_MODULO, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 63: - /* Line 1787 of yacc.c */ -#line 213 "promela.ypp" - { - (yyval.node) = ctx->value(PML_NAME, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value)); - free((yyvsp[(1) - (1)].value)); - } - break; - - case 64: - /* Line 1787 of yacc.c */ -#line 214 "promela.ypp" - { - if ((yyvsp[(1) - (2)].node)->type == PML_NAME) { - (yyval.node) = ctx->node(PML_NAMELIST, 1, (yyvsp[(1) - (2)].node)); - (yyval.node)->push(ctx->value(PML_NAME, (void*)&((yylsp[(2) - (2)])), (yyvsp[(2) - (2)].value))); - } else { - (yyvsp[(1) - (2)].node)->push(ctx->value(PML_NAME, (void*)&((yylsp[(2) - (2)])), (yyvsp[(2) - (2)].value))); - } - free((yyvsp[(2) - (2)].value)); - } - break; - - case 65: - /* Line 1787 of yacc.c */ -#line 223 "promela.ypp" - { - (yyval.node) = (yyvsp[(1) - (2)].node); - } - break; - - case 66: - /* Line 1787 of yacc.c */ -#line 226 "promela.ypp" - { - (yyval.node) = (yyvsp[(1) - (1)].node); - } - break; - - case 67: - /* Line 1787 of yacc.c */ -#line 227 "promela.ypp" - { - (yyval.node) = (yyvsp[(1) - (2)].node); - } - break; - - case 68: - /* Line 1787 of yacc.c */ -#line 228 "promela.ypp" - { - (yyval.node) = ctx->node(PML_STMNT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 69: - /* Line 1787 of yacc.c */ -#line 231 "promela.ypp" - { - (yyval.node) = (yyvsp[(1) - (1)].node); - } - break; - - case 70: - /* Line 1787 of yacc.c */ -#line 234 "promela.ypp" - { - (yyval.node) = ctx->node(PML_ASGN, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - case 71: - /* Line 1787 of yacc.c */ -#line 235 "promela.ypp" - { - (yyval.node) = ctx->node(PML_INCR, 1, (yyvsp[(1) - (2)].node)); - } - break; - - case 72: - /* Line 1787 of yacc.c */ -#line 236 "promela.ypp" - { - (yyval.node) = ctx->node(PML_DECR, 1, (yyvsp[(1) - (2)].node)); - } - break; - - case 73: - /* Line 1787 of yacc.c */ -#line 237 "promela.ypp" - { - (yyval.node) = ctx->node(PML_PRINT, 2, ctx->value(PML_STRING, (void*)&((yylsp[(3) - (5)])), (yyvsp[(3) - (5)].value)), (yyvsp[(4) - (5)].node)); - free((yyvsp[(3) - (5)].value)); - } - break; - - case 74: - /* Line 1787 of yacc.c */ -#line 238 "promela.ypp" - { - (yyval.node) = ctx->node(PML_PRINT, 1, (yyvsp[(3) - (4)].node)); - } - break; - - case 75: - /* Line 1787 of yacc.c */ -#line 239 "promela.ypp" - { - (yyval.node) = ctx->node(PML_PRINT, 1, ctx->value(PML_CONST, (void*)&((yylsp[(3) - (4)])), (yyvsp[(3) - (4)].value))); - free((yyvsp[(3) - (4)].value)); - } - break; - - case 76: - /* Line 1787 of yacc.c */ -#line 240 "promela.ypp" - { - (yyval.node) = ctx->node(PML_ASSERT, 1, (yyvsp[(2) - (2)].node)); - } - break; - - case 77: - /* Line 1787 of yacc.c */ -#line 241 "promela.ypp" - { - (yyval.node) = (yyvsp[(1) - (1)].node); - } - break; - - case 78: - /* Line 1787 of yacc.c */ -#line 244 "promela.ypp" - { - (yyval.node) = ctx->value(0, NULL, ""); - } - break; - - case 79: - /* Line 1787 of yacc.c */ -#line 245 "promela.ypp" - { - (yyval.node) = (yyvsp[(2) - (2)].node); - } - break; - - case 80: - /* Line 1787 of yacc.c */ -#line 248 "promela.ypp" - { - (yyval.node) = (yyvsp[(1) - (1)].node); - } - break; - - case 81: - /* Line 1787 of yacc.c */ -#line 249 "promela.ypp" - { - (yyval.node) = ctx->node(0, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); - } - break; - - - /* Line 1787 of yacc.c */ -#line 2285 "promela.tab.cpp" - default: - break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - *++yylsp = yyloc; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - - /*------------------------------------. - | yyerrlab -- here on detecting error | - `------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (&yylloc, ctx, scanner, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } else { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (&yylloc, ctx, scanner, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - yyerror_range[1] = yylloc; - - if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } else { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, ctx, scanner); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - - /*---------------------------------------------------. - | yyerrorlab -- error raised explicitly by YYERROR. | - `---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - - /*-------------------------------------------------------------. - | yyerrlab1 -- common code for both syntax error and YYERROR. | - `-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, ctx, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - yyerror_range[2] = yylloc; - /* Using YYLLOC is tempting, but would change the location of - the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, yyerror_range, 2); - *++yylsp = yyloc; - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - - /*-------------------------------------. - | yyacceptlab -- YYACCEPT comes here. | - `-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - - /*-----------------------------------. - | yyabortlab -- YYABORT comes here. | - `-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE - /*-------------------------------------------------. - | yyexhaustedlab -- memory exhaustion comes here. | - `-------------------------------------------------*/ -yyexhaustedlab: - yyerror (&yylloc, ctx, scanner, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, ctx, scanner); - } - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, ctx, scanner); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - -/* Line 2050 of yacc.c */ -#line 253 "promela.ypp" - - diff --git a/src/uscxml/plugins/datamodel/promela/parser/promela.tab.hpp b/src/uscxml/plugins/datamodel/promela/parser/promela.tab.hpp deleted file mode 100644 index a48031a..0000000 --- a/src/uscxml/plugins/datamodel/promela/parser/promela.tab.hpp +++ /dev/null @@ -1,180 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY_PROMELA_PROMELA_TAB_HPP_INCLUDED -# define YY_PROMELA_PROMELA_TAB_HPP_INCLUDED -/* Enabling traces. */ -#ifndef PROMELA_DEBUG -# if defined YYDEBUG -# if YYDEBUG -# define PROMELA_DEBUG 1 -# else -# define PROMELA_DEBUG 0 -# endif -# else /* ! defined YYDEBUG */ -# define PROMELA_DEBUG 1 -# endif /* ! defined YYDEBUG */ -#endif /* ! defined PROMELA_DEBUG */ -#if PROMELA_DEBUG -extern int promela_debug; -#endif - -/* Tokens. */ -#ifndef PROMELA_TOKENTYPE -# define PROMELA_TOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum promela_tokentype { - PML_VAR_ARRAY = 258, - PML_VARLIST = 259, - PML_DECL = 260, - PML_DECLLIST = 261, - PML_STMNT = 262, - PML_COLON = 263, - PML_EXPR = 264, - PML_NAMELIST = 265, - PML_ASSERT = 266, - PML_PRINT = 267, - PML_PRINTM = 268, - PML_LEN = 269, - PML_STRING = 270, - PML_TYPEDEF = 271, - PML_MTYPE = 272, - PML_INLINE = 273, - PML_RETURN = 274, - PML_LABEL = 275, - PML_OF = 276, - PML_GOTO = 277, - PML_BREAK = 278, - PML_ELSE = 279, - PML_SEMI = 280, - PML_ARROW = 281, - PML_IF = 282, - PML_FI = 283, - PML_DO = 284, - PML_OD = 285, - PML_FOR = 286, - PML_SELECT = 287, - PML_IN = 288, - PML_SEP = 289, - PML_DOTDOT = 290, - PML_HIDDEN = 291, - PML_SHOW = 292, - PML_ISLOCAL = 293, - PML_CONST = 294, - PML_TYPE = 295, - PML_XU = 296, - PML_NAME = 297, - PML_UNAME = 298, - PML_PNAME = 299, - PML_INAME = 300, - PML_CLAIM = 301, - PML_TRACE = 302, - PML_INIT = 303, - PML_LTL = 304, - PML_COMMA = 305, - PML_ASGN = 306, - PML_AND = 307, - PML_OR = 308, - PML_BITAND = 309, - PML_BITXOR = 310, - PML_BITOR = 311, - PML_NE = 312, - PML_EQ = 313, - PML_LE = 314, - PML_GE = 315, - PML_LT = 316, - PML_GT = 317, - PML_RSHIFT = 318, - PML_LSHIFT = 319, - PML_MINUS = 320, - PML_PLUS = 321, - PML_MODULO = 322, - PML_DIVIDE = 323, - PML_TIMES = 324, - PML_DECR = 325, - PML_INCR = 326, - PML_COMPL = 327, - PML_NEG = 328, - PML_CMPND = 329, - PML_DOT = 330 - }; -#endif - - -#if ! defined PROMELA_STYPE && ! defined PROMELA_STYPE_IS_DECLARED -typedef union PROMELA_STYPE -{ -/* Line 2053 of yacc.c */ -#line 39 "promela.ypp" - - uscxml::PromelaParserNode* node; - char* value; - - -/* Line 2053 of yacc.c */ -#line 146 "promela.tab.hpp" -} PROMELA_STYPE; -# define PROMELA_STYPE_IS_TRIVIAL 1 -# define promela_stype PROMELA_STYPE /* obsolescent; will be withdrawn */ -# define PROMELA_STYPE_IS_DECLARED 1 -#endif - -#if ! defined PROMELA_LTYPE && ! defined PROMELA_LTYPE_IS_DECLARED -typedef struct PROMELA_LTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} PROMELA_LTYPE; -# define promela_ltype PROMELA_LTYPE /* obsolescent; will be withdrawn */ -# define PROMELA_LTYPE_IS_DECLARED 1 -# define PROMELA_LTYPE_IS_TRIVIAL 1 -#endif - - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int promela_parse (void *YYPARSE_PARAM); -#else -int promela_parse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int promela_parse (uscxml::PromelaParser* ctx, void * scanner); -#else -int promela_parse (); -#endif -#endif /* ! YYPARSE_PARAM */ - -#endif /* !YY_PROMELA_PROMELA_TAB_HPP_INCLUDED */ diff --git a/src/uscxml/plugins/datamodel/promela/parser/promela.ypp b/src/uscxml/plugins/datamodel/promela/parser/promela.ypp deleted file mode 100644 index d76b24a..0000000 --- a/src/uscxml/plugins/datamodel/promela/parser/promela.ypp +++ /dev/null @@ -1,254 +0,0 @@ -/** Subset extracted from spin.y by Stefan Radomski 2014 */ - -/***** spin: spin.y *****/ - -/* Copyright (c) 1989-2003 by Lucent Technologies, Bell Laboratories. */ -/* All Rights Reserved. This software is for educational purposes only. */ -/* No guarantee whatsoever is expressed or implied by the distribution of */ -/* this code. Permission is given to distribute this code provided that */ -/* this introductory message is not removed and no monies are exchanged. */ -/* Software written by Gerard J. Holzmann. For tool documentation see: */ -/* http://spinroot.com/ */ -/* Send all bug-reports and/or questions to: bugs@spinroot.com */ - -%{ -#include "../PromelaParser.h" -#include "promela.tab.hpp" -#include -#include - -#define YYMAXDEPTH 20000 // default is 10000 -#define YYDEBUG 1 -#define YYERROR_VERBOSE 1 - -extern int promela_lex (PROMELA_STYPE* yylval_param, PROMELA_LTYPE* yylloc_param, void* yyscanner); - -using namespace uscxml; -%} - -%pure-parser -%debug -%locations -%file-prefix "promela" -%parse-param { uscxml::PromelaParser* ctx } -%lex-param {void * scanner} -%parse-param {void * scanner} -%define api.prefix promela_ -%defines - -%union { - uscxml::PromelaParserNode* node; - char* value; -} - -%error-verbose - -/* %type expr_lst */ -%type expr pfld sfld varref decl_lst stmnt_lst vardcl ivar var_list one_decl prargs utype cmpnd -%type stmnt Stmnt const_expr nlst vis arg - -%token PML_VAR_ARRAY PML_VARLIST PML_DECL PML_DECLLIST PML_STMNT PML_COLON PML_EXPR PML_NAMELIST - -%token '(' ')' -%token '[' ']' -%token '{' '}' -%token PML_ASSERT PML_PRINT PML_PRINTM -%token PML_LEN PML_STRING -%token PML_TYPEDEF PML_MTYPE PML_INLINE PML_RETURN PML_LABEL PML_OF -%token PML_GOTO PML_BREAK PML_ELSE PML_SEMI PML_ARROW -%token PML_IF PML_FI PML_DO PML_OD PML_FOR PML_SELECT PML_IN PML_SEP PML_DOTDOT -%token PML_HIDDEN PML_SHOW PML_ISLOCAL -%token PML_CONST PML_TYPE PML_XU /* val */ -%token PML_NAME PML_UNAME PML_PNAME PML_INAME /* sym */ -%token PML_CLAIM PML_TRACE PML_INIT PML_LTL /* sym */ -%token PML_COMMA - -%right PML_ASGN -%left PML_OR PML_AND -%left PML_BITOR PML_BITXOR PML_BITAND -%left PML_EQ PML_NE -%left PML_GT PML_LT PML_GE PML_LE -%left PML_LSHIFT PML_RSHIFT -%left PML_PLUS PML_MINUS -%left PML_TIMES PML_DIVIDE PML_MODULO -%left PML_INCR PML_DECR -%left PML_COMPL -%right PML_NEG -%left PML_DOT PML_CMPND - -%% - - -/** PROMELA Grammar Rules **/ - -program : - decl_lst { - ctx->ast = $1; - ctx->type = PromelaParser::PROMELA_DECL; - } - | expr { - ctx->ast = $1; - ctx->type = PromelaParser::PROMELA_EXPR; - } - | stmnt_lst { - ctx->ast = $1; - ctx->type = PromelaParser::PROMELA_STMNT; - } - ; - -varref : cmpnd { $$ = $1; } - ; - -pfld : PML_NAME { $$ = ctx->value(PML_NAME, (void*)&(@1), $1); free($1); } - | PML_NAME '[' expr ']' { $$ = ctx->node(PML_VAR_ARRAY, 2, ctx->value(PML_NAME, (void*)&(@1), $1), $3); free($1); } - ; - -cmpnd : pfld - sfld { - if ($2 != NULL) { - if ($2->type == PML_CMPND) { - $$ = ctx->node(PML_CMPND, 1, $1); - $$->merge($2); delete $2; - } else { - $$ = ctx->node(PML_CMPND, 2, $1, $2); - } - } else { - $$ = $1; - } - } - ; - -sfld : /* empty */ { $$ = NULL; } - | PML_DOT cmpnd %prec PML_DOT { $$ = $2; } - ; - -/* -expr_lst: expr { $$ = ctx->node(PML_EXPR, 1, $1); } - | expr PML_SEMI { $$ = ctx->node(PML_EXPR, 1, $1); } - | expr PML_SEMI expr_lst { $$ = ctx->node(PML_EXPR, 2, $1, $3); } - ; -*/ - -expr : '(' expr ')' { $$ = $2; } - | expr PML_PLUS expr { $$ = ctx->node(PML_PLUS, 2, $1, $3); } - | expr PML_MINUS expr { $$ = ctx->node(PML_MINUS, 2, $1, $3); } - | expr PML_TIMES expr { $$ = ctx->node(PML_TIMES, 2, $1, $3); } - | expr PML_DIVIDE expr { $$ = ctx->node(PML_DIVIDE, 2, $1, $3); } - | expr PML_MODULO expr { $$ = ctx->node(PML_MODULO, 2, $1, $3); } - | expr PML_BITAND expr { $$ = ctx->node(PML_BITAND, 2, $1, $3); } - | expr PML_BITXOR expr { $$ = ctx->node(PML_BITXOR, 2, $1, $3); } - | expr PML_BITOR expr { $$ = ctx->node(PML_BITOR, 2, $1, $3); } - | expr PML_GT expr { $$ = ctx->node(PML_GT, 2, $1, $3); } - | expr PML_LT expr { $$ = ctx->node(PML_LT, 2, $1, $3); } - | expr PML_GE expr { $$ = ctx->node(PML_GE, 2, $1, $3); } - | expr PML_LE expr { $$ = ctx->node(PML_LE, 2, $1, $3); } - | expr PML_EQ expr { $$ = ctx->node(PML_EQ, 2, $1, $3); } - | expr PML_NE expr { $$ = ctx->node(PML_NE, 2, $1, $3); } - | expr PML_AND expr { $$ = ctx->node(PML_AND, 2, $1, $3); } - | expr PML_OR expr { $$ = ctx->node(PML_OR, 2, $1, $3); } - | expr PML_LSHIFT expr { $$ = ctx->node(PML_LSHIFT, 2, $1, $3); } - | expr PML_RSHIFT expr { $$ = ctx->node(PML_RSHIFT, 2, $1, $3); } - | PML_NEG expr { $$ = ctx->node(PML_NEG, 1, $2); } - | PML_MINUS expr %prec PML_MINUS { $$ = ctx->node(PML_MINUS, 1, $2); } - - | PML_LEN '(' varref ')' { $$ = ctx->node(PML_LEN, 1, $3); } - | varref { $$ = $1; } - | PML_CONST { $$ = ctx->value(PML_CONST, (void*)&(@1), $1); free($1); } - | PML_STRING { - /* Non standard promela for string literals */ - $$ = ctx->value(PML_STRING, (void*)&(@1), $1); free($1); } - ; - - -vis : /* empty */ { $$ = ctx->node(PML_SHOW, 0); } - | PML_HIDDEN { $$ = ctx->node(PML_HIDDEN, 0); } - | PML_SHOW { $$ = ctx->node(PML_SHOW, 0); } - | PML_ISLOCAL { $$ = ctx->node(PML_ISLOCAL, 0); } - ; - -one_decl: vis PML_TYPE var_list { $$ = ctx->node(PML_DECL, 3, $1, ctx->value(PML_TYPE, (void*)&(@2), $2), $3); free($2); } - | vis PML_UNAME var_list { $$ = ctx->node(PML_UNAME, 2, $1, $3); } - | vis PML_TYPE PML_ASGN '{' nlst '}' { $$ = ctx->node(PML_DECL, 3, $1, ctx->value(PML_TYPE, (void*)&(@2), $2), $5); free($2); } - | vis utype { $$ = $2; } - ; - -utype : PML_TYPEDEF PML_NAME '{' decl_lst '}' { $$ = ctx->node(PML_TYPEDEF, 2, ctx->value(PML_NAME, (void*)&(@2), $2), $4); } - ; - -decl_lst: one_decl { $$ = $1; } - | one_decl PML_SEMI { $$ = $1; } - | one_decl PML_SEMI decl_lst { - $$ = ctx->node(PML_DECLLIST, 1, $1); - if($3->type == PML_DECLLIST) { - $$->merge($3); delete $3; - } else { - $$->push($3); - } - } - ; - -var_list: ivar { $$ = ctx->node(PML_VARLIST, 1, $1); } - | ivar PML_COMMA var_list { $$ = ctx->node(PML_VARLIST, 1, $1); $$->merge($3); delete $3; } - ; - -ivar : vardcl { $$ = $1; } - | vardcl PML_ASGN expr { $$ = ctx->node(PML_ASGN, 2, $1, $3); } - ; - -vardcl : PML_NAME { $$ = ctx->value(PML_NAME, (void*)&(@1), $1); free($1); } - | PML_NAME PML_COLON PML_CONST { $$ = ctx->node(PML_COLON, 2, ctx->value(PML_NAME, (void*)&(@1), $1), ctx->value(PML_CONST, (void*)&(@3), $3)); free($1); free($3); } - | PML_NAME '[' const_expr ']' { $$ = ctx->node(PML_VAR_ARRAY, 2, ctx->value(PML_NAME, (void*)&(@1), $1), $3); free($1); } - ; - -const_expr: PML_CONST { $$ = ctx->value(PML_CONST, (void*)&(@1), $1); free($1); } - | PML_MINUS const_expr %prec PML_MINUS { $$ = ctx->node(PML_MINUS, 1, $2); } - | '(' const_expr ')' { $$ = $2; } - | const_expr PML_PLUS const_expr { $$ = ctx->node(PML_PLUS, 2, $1, $3); } - | const_expr PML_MINUS const_expr { $$ = ctx->node(PML_MINUS, 2, $1, $3); } - | const_expr PML_TIMES const_expr { $$ = ctx->node(PML_TIMES, 2, $1, $3); } - | const_expr PML_DIVIDE const_expr { $$ = ctx->node(PML_DIVIDE, 2, $1, $3); } - | const_expr PML_MODULO const_expr { $$ = ctx->node(PML_MODULO, 2, $1, $3); } - ; - -nlst : PML_NAME { $$ = ctx->value(PML_NAME, (void*)&(@1), $1); free($1); } - | nlst PML_NAME { - if ($1->type == PML_NAME) { - $$ = ctx->node(PML_NAMELIST, 1, $1); - $$->push(ctx->value(PML_NAME, (void*)&(@2), $2)); - } else { - $1->push(ctx->value(PML_NAME, (void*)&(@2), $2)); - } - free($2); - } - | nlst PML_COMMA { $$ = $1; } - ; - -stmnt_lst: stmnt { $$ = $1; } - | stmnt PML_SEMI { $$ = $1; } - | stmnt PML_SEMI stmnt_lst { $$ = ctx->node(PML_STMNT, 2, $1, $3); } - ; - -stmnt : Stmnt { $$ = $1; } - ; - -Stmnt : varref PML_ASGN expr { $$ = ctx->node(PML_ASGN, 2, $1, $3); } - | varref PML_INCR { $$ = ctx->node(PML_INCR, 1, $1); } - | varref PML_DECR { $$ = ctx->node(PML_DECR, 1, $1); } - | PML_PRINT '(' PML_STRING prargs ')' { $$ = ctx->node(PML_PRINT, 2, ctx->value(PML_STRING, (void*)&(@3), $3), $4); free($3); } - | PML_PRINT '(' varref ')' { $$ = ctx->node(PML_PRINT, 1, $3); } - | PML_PRINT '(' PML_CONST ')' { $$ = ctx->node(PML_PRINT, 1, ctx->value(PML_CONST, (void*)&(@3), $3)); free($3); } - | PML_ASSERT expr { $$ = ctx->node(PML_ASSERT, 1, $2); } - | expr { $$ = $1; } - ; - -prargs : /* empty */ { $$ = ctx->value(0, NULL, ""); } - | PML_COMMA arg { $$ = $2; } - ; - -arg : expr { $$ = $1; } - | expr PML_COMMA arg { $$ = ctx->node(0, 2, $1, $3); } - ; - - -%% - diff --git a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp deleted file mode 100644 index 282e8c6..0000000 --- a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp +++ /dev/null @@ -1,876 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @author 2013 Enrico Papi (enrico.papi@ajile.it) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/Common.h" -#include "XPathDataModel.h" - -#include "uscxml/Message.h" -#include "uscxml/util/String.h" -#include "uscxml/dom/DOMUtils.h" -#include -#include - -#include -//#include -//#include -//#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -using namespace Arabica::XPath; -using namespace Arabica::DOM; - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new XPathDataModelProvider() ); - return true; -} -#endif - -XPathDataModel::XPathDataModel() { -} - -boost::shared_ptr XPathDataModel::create(InterpreterInfo* interpreter) { - boost::shared_ptr dm = boost::shared_ptr(new XPathDataModel()); - dm->_interpreter = interpreter; - -// dm->_xpath->setVariableCompileTimeResolver(_varCTResolver); -// dm->_xpath->setNamespaceContext(interpreter->getNSContext()); - - dm->_funcResolver.setInterpreter(interpreter); - dm->_xpath.setNamespaceContext(*interpreter->getNameSpaceInfo().getNSContext()); - dm->_xpath.setFunctionResolver(dm->_funcResolver); - dm->_xpath.setVariableResolver(dm->_varResolver); - - dm->_domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - dm->_doc = dm->_domFactory.createDocument("http://www.w3.org/2005/07/scxml", "", 0); - dm->_datamodel = dm->_doc.createElement("datamodel"); - dm->_doc.appendChild(dm->_datamodel); - - Element ioProcElem = dm->_doc.createElement("data"); - ioProcElem.setAttribute("id", "_ioprocessors"); - std::map::const_iterator ioProcIter = interpreter->getIOProcessors().begin(); - while(ioProcIter != interpreter->getIOProcessors().end()) { - Element ioProc = dm->_doc.createElement("processor"); - ioProc.setAttribute("name", ioProcIter->first); - - Data ioProcData = ioProcIter->second.getDataModelVariables(); - Element ioProcLoc = dm->_doc.createElement("location"); - Text ioProcLocText = dm->_doc.createTextNode(ioProcData.compound["location"].atom); - ioProcLoc.appendChild(ioProcLocText); - ioProc.appendChild(ioProcLoc); - ioProcElem.appendChild(ioProc); - - ioProcIter++; - } - dm->_datamodel.appendChild(ioProcElem); - - NodeSet ioProcNodeSet; - ioProcNodeSet.push_back(ioProcElem); - dm->_varResolver.setVariable("_ioprocessors", ioProcNodeSet); - - Element sessIdElem = dm->_doc.createElement("data"); - sessIdElem.setAttribute("id", "_sessionid"); - Text sessIdText = dm->_doc.createTextNode(interpreter->getSessionId()); - sessIdElem.appendChild(sessIdText); - dm->_datamodel.appendChild(sessIdElem); - - NodeSet sessIdNodeSet; - sessIdNodeSet.push_back(sessIdText); - dm->_varResolver.setVariable("_sessionid", sessIdNodeSet); - - - Element nameElem = dm->_doc.createElement("data"); - nameElem.setAttribute("id", "_name"); - Text nameText = dm->_doc.createTextNode(interpreter->getName()); - nameElem.appendChild(nameText); - dm->_datamodel.appendChild(nameElem); - - NodeSet nameNodeSet; - nameNodeSet.push_back(nameText); - dm->_varResolver.setVariable("_name", nameNodeSet); - - return dm; -} - -XPathDataModel::~XPathDataModel() { -} - -void XPathDataModel::pushContext() { -} - -void XPathDataModel::popContext() { -} - -void XPathDataModel::initialize() { -} - -void XPathDataModel::setEvent(const Event& event) { - Element eventElem = _doc.createElement("data"); - eventElem.setAttribute("id", "_event"); - - Element eventDataElem = _doc.createElement("data"); - NodeSet eventNodeSet; - - { - // -- name - Element eventNameElem = _doc.createElement("name"); - Text eventName = _doc.createTextNode(event.name.c_str()); - eventNameElem.appendChild(eventName); - eventElem.appendChild(eventNameElem); - } - { - // -- origin - Element eventOriginElem = _doc.createElement("origin"); - Text eventOrigin = _doc.createTextNode(event.origin.c_str()); - eventOriginElem.appendChild(eventOrigin); - eventElem.appendChild(eventOriginElem); - } - { - // -- type - Element eventTypeElem = _doc.createElement("type"); - Text eventType; - switch (event.eventType) { - case Event::INTERNAL: - eventType = _doc.createTextNode("internal"); - break; - case Event::EXTERNAL: - eventType = _doc.createTextNode("external"); - break; - case Event::PLATFORM: - eventType = _doc.createTextNode("platform"); - break; - } - eventTypeElem.appendChild(eventType); - eventElem.appendChild(eventTypeElem); - } - - if (event.params.size() > 0) { - std::multimap::const_iterator paramIter = event.params.begin(); - while(paramIter != event.params.end()) { - Element eventParamElem = _doc.createElement("data"); - // this is simplified - Data might be more elaborate than a simple string atom - Text eventParamText = _doc.createTextNode(paramIter->second.atom); - - eventParamElem.setAttribute("id", paramIter->first); - eventParamElem.appendChild(eventParamText); - eventDataElem.appendChild(eventParamElem); - paramIter++; - } - } - if (event.namelist.size() > 0) { - std::map::const_iterator namelistIter = event.namelist.begin(); - while(namelistIter != event.namelist.end()) { - Element eventNamelistElem = _doc.createElement("data"); - // this is simplified - Data might be more elaborate than a simple string atom - Text eventNamelistText = _doc.createTextNode(namelistIter->second.atom); - - eventNamelistElem.setAttribute("id", namelistIter->first); - eventNamelistElem.appendChild(eventNamelistText); - eventDataElem.appendChild(eventNamelistElem); - namelistIter++; - } - } - if (event.raw.size() > 0) { - Element eventRawElem = _doc.createElement("raw"); - Text textNode = _doc.createTextNode(event.raw.c_str()); - eventRawElem.appendChild(textNode); - eventElem.appendChild(eventRawElem); - } - - if (event.content.size() > 0) { - Text textNode = _doc.createTextNode(spaceNormalize(event.content).c_str()); - eventDataElem.appendChild(textNode); - } - if (event.dom) { - Node importedNode = _doc.importNode(event.dom, true); - eventDataElem.appendChild(importedNode); - } - if (event.data.array.size() == 1) { - Text textNode = _doc.createTextNode(event.data.array.front().atom.c_str()); - eventDataElem.appendChild(textNode); - } else if (event.data.array.size() > 1) { - std::list::const_iterator ptr; - unsigned int i; - - for( i = 0 , ptr = event.data.array.begin() ; - ((i < event.data.array.size()) && (ptr != event.data.array.end())); - i++ , ptr++ ) { - Element eventMESElem = _doc.createElement("data"); - Text textNode = _doc.createTextNode(ptr->atom.c_str()); - std::stringstream ss; - ss << i; - eventMESElem.setAttribute("id", ss.str()); - eventMESElem.appendChild(textNode); - eventDataElem.appendChild(eventMESElem); - } - } - - eventElem.appendChild(eventDataElem); - eventNodeSet.push_back(eventElem); - - // do we need to replace an existing event? - Node oldEventElem = _datamodel.getFirstChild(); - while(oldEventElem) { - if (oldEventElem.getNodeType() == Node_base::ELEMENT_NODE) { - if (HAS_ATTR_CAST(oldEventElem, "id") && iequals(ATTR_CAST(oldEventElem, "id"), "_event")) - break; - } - oldEventElem = oldEventElem.getNextSibling(); - } - - if (oldEventElem) { - _datamodel.replaceChild(eventElem, oldEventElem); - } else { - _datamodel.appendChild(eventElem); - } - _varResolver.setVariable("_event", eventNodeSet); -} - -Data XPathDataModel::getStringAsData(const std::string& content) { - Data data; - XPathValue result = _xpath.evaluate_expr(content, _doc); - - std::stringstream ss; - - switch (result.type()) { - case ANY: - break; - case Arabica::XPath::BOOL: - ss << result.asBool(); - break; - case NUMBER: - ss << result.asNumber(); - break; - case STRING: - ss << result.asString(); - break; - case NODE_SET: - NodeSet ns = result.asNodeSet(); - for (size_t i = 0; i < ns.size(); i++) { - ss.str(""); - ss << i; - std::string idx = ss.str(); - ss.str(""); - ss << ns[i]; - data.compound[idx] = Data(ss.str(), Data::INTERPRETED); - } - data.type = Data::INTERPRETED; - return data; - break; - } - - data.atom = ss.str(); - data.type = Data::VERBATIM; - return data; -} - -bool XPathDataModel::validate(const std::string& location, const std::string& schema) { - return true; -} - -bool XPathDataModel::isLocation(const std::string& expr) { - return true; -} - -uint32_t XPathDataModel::getLength(const std::string& expr) { -// std::cout << _datamodel << std::endl; - XPathValue result = _xpath.evaluate_expr(expr, _doc); - switch(result.type()) { - case NUMBER: - return result.asNumber(); - break; - case NODE_SET: - return result.asNodeSet().size(); - break; - default: - ERROR_EXECUTION_THROW("'" + expr + "' does not evaluate to an array."); - } - return 0; -} - -void XPathDataModel::setForeach(const std::string& item, - const std::string& array, - const std::string& index, - uint32_t iteration) { - - XPathValue arrayResult = _xpath.evaluate_expr(array, _doc); - assert(arrayResult.type() == NODE_SET); - -#if 0 - std::cout << "Array Size: " << arrayResult.asNodeSet().size() << std::endl; - for (size_t i = 0; i < arrayResult.asNodeSet().size(); i++) { - std::cout << arrayResult.asNodeSet()[i] << std::endl; - } -#endif - - assert(arrayResult.asNodeSet().size() >= iteration); - - - NodeSet arrayNodeSet; - arrayNodeSet.push_back(arrayResult.asNodeSet()[iteration]); - - if (!isDeclared(item)) { - if (!isValidIdentifier(item)) - ERROR_EXECUTION_THROW("Expression '" + item + "' not a valid identifier."); - Element container = _doc.createElement("data"); - container.setAttribute("id", item); - container.appendChild(arrayResult.asNodeSet()[iteration].cloneNode(true)); - _datamodel.appendChild(container); - _varResolver.setVariable(item, arrayNodeSet); - } - XPathValue itemResult = _varResolver.resolveVariable("", item); - assign(itemResult, arrayNodeSet, Element()); - - if (index.length() > 0) { - NodeSet indexNodeSet; - Text indexElem = _doc.createTextNode(toStr(iteration)); - indexNodeSet.push_back(indexElem); - - if (!isDeclared(index)) { - Element container = _doc.createElement("data"); - container.setAttribute("id", index); - container.appendChild(indexElem); - _datamodel.appendChild(container); - - NodeSet indexVarNodeSet; - indexVarNodeSet.push_back(container); - _varResolver.setVariable(index, indexVarNodeSet); - } - XPathValue indexResult = _varResolver.resolveVariable("", index); - assign(indexResult, indexNodeSet, Element()); - } - - -#if 0 - std::cout << _datamodel << std::endl << std::endl; - std::cout << "Index: " << indexResult.asNodeSet().size() << std::endl; - for (size_t i = 0; i < indexResult.asNodeSet().size(); i++) { - std::cout << indexResult.asNodeSet()[i] << std::endl; - } - std::cout << std::endl; -#endif - - -} - -bool XPathDataModel::isValidIdentifier(const std::string& identifier) { - if(boost::starts_with(identifier, ".")) - return false; - - return true; -} - - -void XPathDataModel::eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr) { - XPathValue result = _xpath.evaluate_expr(expr, _doc); -} - -bool XPathDataModel::isDeclared(const std::string& expr) { - return true; - try { - return _varResolver.isDeclared(expr) || evalAsBool(expr); - } catch(...) { - return false; - } -} - -bool XPathDataModel::evalAsBool(const std::string& expr) { - return evalAsBool(Arabica::DOM::Element(), expr); -} - -bool XPathDataModel::evalAsBool(const Arabica::DOM::Element& node, const std::string& expr) { -// std::cout << std::endl << evalAsString(expr); - XPathValue result; - try { - result = _xpath.evaluate_expr(expr, _doc); - } catch(SyntaxException e) { - ERROR_EXECUTION_THROW(e.what()); - } catch(std::runtime_error e) { - ERROR_EXECUTION_THROW(e.what()); - } - return result.asBool(); -} - -std::string XPathDataModel::evalAsString(const std::string& expr) { - - XPathValue result; - try { - result = _xpath.evaluate_expr(expr, _doc); - } catch(SyntaxException e) { - ERROR_EXECUTION_THROW(e.what()); - } catch(std::runtime_error e) { - ERROR_EXECUTION_THROW(e.what()); - } - switch (result.type()) { - case STRING: - return result.asString(); - break; - case Arabica::XPath::BOOL: // MSVC croaks with ambiguous symbol without qualified name - return (result.asBool() ? "true" : "false"); - break; - case NUMBER: - return toStr(result.asNumber()); - break; - case NODE_SET: { - NodeSet nodeSet = result.asNodeSet(); - std::stringstream ss; - for (size_t i = 0; i < nodeSet.size(); i++) { - ss << nodeSet[i]; - if (nodeSet[i].getNodeType() != Node_base::TEXT_NODE) { - ss << std::endl; - } - } - return ss.str(); - break; - } - case ANY: - ERROR_EXECUTION_THROW("Type ANY not supported to evaluate as string"); - break; - } - return "undefined"; -} - -double XPathDataModel::evalAsNumber(const std::string& expr) { - XPathValue result = _xpath.evaluate_expr(expr, _doc); - return result.asNumber(); -} - -void XPathDataModel::assign(const Element& assignElem, - const Node& node, - const std::string& content) { - std::string location; - if (HAS_ATTR(assignElem, "id")) { - location = ATTR(assignElem, "id"); - } else if (HAS_ATTR(assignElem, "location")) { - location = ATTR(assignElem, "location"); - } - - // test 326ff - XPathValue key = _xpath.evaluate_expr(location, _doc); -#ifdef VERBOSE - LOG(INFO) << "Key XPath : " << key.asString(); -#endif -#if 0 - if (key.type() == NODE_SET) { - try { - for (size_t i = 0; i < key.asNodeSet().size(); i++) { - Node node = key.asNodeSet()[i]; - if (node == _varResolver.resolveVariable("", "_ioprocessors").asNodeSet()[0]) - ERROR_EXECUTION_THROW("Cannot assign _ioProcessors"); - if (node == _varResolver.resolveVariable("", "_sessionid").asNodeSet()[0]) - ERROR_EXECUTION_THROW("Cannot assign _sessionid"); - if (node == _varResolver.resolveVariable("", "_name").asNodeSet()[0]) - ERROR_EXECUTION_THROW("Cannot assign _name"); - if (node == _varResolver.resolveVariable("", "_event").asNodeSet()[0]) - ERROR_EXECUTION_THROW("Cannot assign _event"); - } - } catch (Event e) {} - } -#endif - NodeSet nodeSet; - if (node) { - Node data = node; - while (data) { - // do not add empty text as a node - if (data.getNodeType() == Node_base::TEXT_NODE) { - std::string trimmed = data.getNodeValue(); - boost::trim(trimmed); - if (trimmed.length() == 0) { - data = data.getNextSibling(); - continue; - } - } - nodeSet.push_back(data); - data = data.getNextSibling(); - } - assign(key, nodeSet, assignElem); - } else if (content.length() > 0) { - Text textNode = _doc.createTextNode(spaceNormalize(content)); - nodeSet.push_back(textNode); - assign(key, nodeSet, assignElem); - } else if (HAS_ATTR(assignElem, "expr")) { - XPathValue value = _xpath.evaluate_expr(ATTR(assignElem, "expr"), _doc); -#ifdef VERBOSE - LOG(INFO) << "Value XPath : " << value.asString(); -#endif - assign(key, value, assignElem); - } else { - LOG(ERROR) << "assign element has no content"; - } - -// std::cout << _datamodel << std::endl; -} - -void XPathDataModel::assign(const std::string& location, const Data& data) { - XPathValue locationResult = _xpath.evaluate_expr(location, _doc); - NodeSet dataNodeSet = dataToNodeSet(data); - assign(locationResult, dataNodeSet, Element()); -// std::cout << _datamodel << std::endl; -} - -NodeSet XPathDataModel::dataToNodeSet(const Data& data) { - NodeSet dataNodeSet; - if (data.atom.length() > 0) { - dataNodeSet.push_back(_doc.createTextNode(data.atom)); - } - return dataNodeSet; -} - -void XPathDataModel::init(const Element& dataElem, - const Node& node, - const std::string& content) { - std::string location; - if (HAS_ATTR(dataElem, "id")) { - location = ATTR(dataElem, "id"); - } else if (HAS_ATTR(dataElem, "location")) { - location = ATTR(dataElem, "location"); - } - - NodeSet nodeSet; - if (node || (content.length() > 0)) { - _datamodel.appendChild(_doc.importNode(dataElem, true)); - nodeSet.push_back(dataElem); - } else if (HAS_ATTR(dataElem, "expr")) { - try { - Element container = _doc.createElement("data"); - container.setAttribute("id", location); - XPathValue expr = _xpath.evaluate_expr(ATTR(dataElem, "expr"), _doc); - switch (expr.type()) { - case NODE_SET: { - for (size_t i = 0; i < expr.asNodeSet().size(); i++) { - container.appendChild(expr.asNodeSet()[i].cloneNode(true)); - nodeSet.push_back(expr.asNodeSet()[i].cloneNode(true)); - } - break; - } - case STRING: - container.appendChild(_doc.createTextNode(expr.asString())); - nodeSet.push_back(_doc.createTextNode(expr.asString())); - break; - case NUMBER: { - container.appendChild(_doc.createTextNode(toStr(expr.asNumber()))); - nodeSet.push_back(_doc.createTextNode(toStr(expr.asNumber()))); - break; - } - case Arabica::XPath::BOOL: - case ANY: - ERROR_EXECUTION_THROW("expr evaluates to type ANY"); - } - _datamodel.appendChild(container); - } catch (SyntaxException e) { - ERROR_EXECUTION_THROW(e.what()); - } - } else { - LOG(ERROR) << "data element has no content"; - } - - _varResolver.setVariable(location, nodeSet); -} - -void XPathDataModel::init(const std::string& location, const Data& data) { - NodeSet nodeSet; - _varResolver.setVariable(location, nodeSet); -} - - -void XPathDataModel::assign(const XPathValue& key, - const XPathValue& value, - const Element& assignElem) { - switch (key.type()) { - case NODE_SET: - if (key.asNodeSet().size() == 0) { - ERROR_EXECUTION_THROW("key for assign is empty nodeset"); - } - switch (value.type()) { - case STRING: - assign(key.asNodeSet(), value.asString(), assignElem); - break; - case Arabica::XPath::BOOL: - assign(key.asNodeSet(), value.asBool(), assignElem); - break; - case NUMBER: - assign(key.asNodeSet(), value.asNumber(), assignElem); - break; - case NODE_SET: - assign(key.asNodeSet(), value.asNodeSet(), assignElem); - break; - case ANY: - ERROR_EXECUTION_THROW("Type ANY as key for assign not supported"); - } - break; - case STRING: - case Arabica::XPath::BOOL: - case NUMBER: - case ANY: - ERROR_EXECUTION_THROW("Type ANY as key for assign not supported") - break; - } -} - -void XPathDataModel::assign(const XPathValue& key, - const NodeSet& value, - const Element& assignElem) { - if (value.size() == 0 || !value[0]) - return; - switch (key.type()) { - case NODE_SET: { - assign(key.asNodeSet(), value, assignElem); - break; - } - case STRING: - case Arabica::XPath::BOOL: - case NUMBER: - case ANY: - ERROR_EXECUTION_THROW("Type ANY as key for assign not supported") - } -} - -void XPathDataModel::assign(const NodeSet& key, - const std::string& value, - const Element& assignElem) { - if (key.size() == 0) - return; - for (size_t i = 0; i < key.size(); i++) { - Node node = key[i]; - switch (node.getNodeType()) { - case Node_base::ATTRIBUTE_NODE: { - Attr attr(node); - attr.setValue(value); - break; - } - case Node_base::TEXT_NODE: { - Text text(node); - text.setNodeValue(value); - break; - } - case Node_base::ELEMENT_NODE: { - Element element(node); - if (HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "addattribute")) { - // addattribute: Add an attribute with the name specified by 'attr' - // and value specified by 'expr' to the node specified by 'location'. - if (!HAS_ATTR(assignElem, "attr")) - ERROR_EXECUTION_THROW("Assign element is missing 'attr'"); - element.setAttribute(ATTR(assignElem, "attr"), value); - } else { - /// test 547 - while(element.hasChildNodes()) - element.removeChild(element.getChildNodes().item(0)); - Text text = _doc.createTextNode(value); - element.appendChild(text); - } - break; - } - default: - ERROR_EXECUTION_THROW("Unsupported node type with assign"); - break; - } - } -} - -void XPathDataModel::assign(const NodeSet& key, - const double value, - const Element& assignElem) { - assign(key, toStr(value), assignElem); -} - -void XPathDataModel::assign(const NodeSet& key, - const bool value, - const Element& assignElem) { -} - -void XPathDataModel::assign(const NodeSet& key, - const NodeSet& value, - const Element& assignElem) { - if (key.size() == 0) - return; - if (value.size() == 0 || !value[0]) - return; - - for (size_t i = 0; i < key.size(); i++) { - switch (key[i].getNodeType()) - case Node_base::ELEMENT_NODE: { - assign(Element(key[i]), value, assignElem); - break; - default: -// std::cout << key[i].getNodeType() << std::endl; - ERROR_EXECUTION_THROW("Unsupported node type for assign"); - break; - } - } -} - -void XPathDataModel::assign(const Element& key, - const NodeSet& value, - const Element& assignElem) { - Element element(key); - if (value.size() == 0 || !value[0]) - return; - - if (false) { - } else if (assignElem && HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "firstchild")) { - // firstchild: Insert the value specified by 'expr' before all of the children at 'location'. - for (size_t i = value.size(); i; i--) { - Node importedNode = (value[i-1].getOwnerDocument() == _doc ? value[i-1].cloneNode(true) : _doc.importNode(value[i-1], true)); - element.insertBefore(importedNode, element.getFirstChild()); - } - } else if (assignElem && HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "lastchild")) { - // lastchild: Insert the value specified by 'expr' after all of the children at 'location'. - for (size_t i = 0; i < value.size(); i++) { - Node importedNode = (value[i].getOwnerDocument() == _doc ? value[i].cloneNode(true) : _doc.importNode(value[i], true)); - element.appendChild(importedNode); - } - } else if (assignElem && HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "previoussibling")) { - // previoussibling: Insert the value specified by 'expr' before the - // node specified by 'location', keeping the same parent. - Node parent = element.getParentNode(); - if (!parent) - ERROR_EXECUTION_THROW("Node has no parent"); - for (size_t i = 0; i < value.size(); i++) { - Node importedNode = (value[i].getOwnerDocument() == _doc ? value[i].cloneNode(true) : _doc.importNode(value[i], true)); - parent.insertBefore(importedNode, element); - } - } else if (assignElem && HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "nextsibling")) { - // nextsibling: Insert the value specified by 'expr' after the node - // specified by 'location', keeping the same parent. - Node parent = element.getParentNode(); - if (!parent) - ERROR_EXECUTION_THROW("Node has no parent"); - for (size_t i = value.size(); i; i--) { - Node importedNode = (value[i-1].getOwnerDocument() == _doc ? value[i-1].cloneNode(true) : _doc.importNode(value[i-1], true)); - Node nextSibling = element.getNextSibling(); - if (nextSibling) { - parent.insertBefore(importedNode, element.getNextSibling()); - } else { - parent.appendChild(importedNode); - } - } - } else if (assignElem && HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "replace")) { - // replace: Replace the node specified by 'location' by the value specified by 'expr'. - Node parent = element.getParentNode(); - if (!parent) - ERROR_EXECUTION_THROW("Node has no parent"); - if (value.size() != 1) - ERROR_EXECUTION_THROW("Value not singular"); - Node importedNode = (value[0].getOwnerDocument() == _doc ? value[0].cloneNode(true) : _doc.importNode(value[0], true)); - parent.replaceChild(importedNode, element); - } else if (assignElem && HAS_ATTR(assignElem, "type") && iequals(ATTR(assignElem, "type"), "delete")) { - // delete: Delete the node specified by 'location'. ('expr' is ignored.). - Node parent = element.getParentNode(); - if (!parent) - ERROR_EXECUTION_THROW("Node has no parent"); - parent.removeChild(element); - } else { - // replacechildren: Replace all the children at 'location' with the value specified by 'expr'. - while(element.hasChildNodes()) - element.removeChild(element.getChildNodes().item(0)); - for (size_t i = 0; i < value.size(); i++) { - Node importedNode = element.getOwnerDocument().importNode(value[i], true); - element.appendChild(importedNode); - } - } -} - -XPathValue -NodeSetVariableResolver::resolveVariable(const std::string& namepaceUri, - const std::string& name) const { - std::map >::const_iterator n = _variables.find(name); - if(n == _variables.end()) { - ERROR_EXECUTION_THROW("No variable named '" + name + "'"); - } -#if VERBOSE - std::cout << std::endl << "Getting " << name << ":" << std::endl; - for (size_t i = 0; i < n->second.size(); i++) { - std::cout << n->second[i].getNodeType() << " | " << n->second[i] << std::endl; - } - std::cout << std::endl; -#endif - return XPathValue(new NodeSetValue(n->second)); -} - -void NodeSetVariableResolver::setVariable(const std::string& name, const NodeSet& value) { -#if VERBOSE - std::cout << std::endl << "Setting " << name << ":" << std::endl; - for (size_t i = 0; i < value.size(); i++) { - std::cout << value[i].getNodeType() << " | " << value[i] << std::endl; - } - std::cout << std::endl; -#endif - _variables[name] = value; -#if 0 - std::map >::iterator varIter = _variables.begin(); - while (varIter != _variables.end()) { - std::cout << varIter->first << ":" << std::endl; - for (size_t i = 0; i < varIter->second.size(); i++) { - std::cout << varIter->second[i].getNodeType() << " | " << varIter->second[i] << std::endl; - } - varIter++; - } -#endif -} - -bool NodeSetVariableResolver::isDeclared(const std::string& name) { -#if 0 - std::map >::iterator varIter = _variables.begin(); - while (varIter != _variables.end()) { - std::cout << varIter->first << std::endl; - varIter++; - } -#endif - return _variables.find(name) != _variables.end(); -} - -XPathFunction* -XPathFunctionResolver::resolveFunction(const std::string& namespace_uri, - const std::string& name, - const std::vector >& argExprs) const { - if (iequals(name, "in")) { - return new XPathFunctionIn(1, -1, argExprs, _interpreter); - } - return _xpathFuncRes.resolveFunction(namespace_uri, name, argExprs); -} - -std::vector > XPathFunctionResolver::validNames() const { - std::vector > names = _xpathFuncRes.validNames(); - names.push_back(std::make_pair("", "In")); - return names; -} - -bool XPathFunctionIn::doEvaluate(const Node& context, - const ExecutionContext& executionContext) const { - for (size_t i = 0; i < argCount(); i++) { - XPathValue stateName = arg(i, context, executionContext); - if (stateName.type() == STRING) { - if (_interpreter->isInState(stateName.asString())) { - continue; - } - } - return false; - } - return true; -} - -} diff --git a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.h b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.h deleted file mode 100644 index 7a085d2..0000000 --- a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.h +++ /dev/null @@ -1,185 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef XPATHDATAMODEL_H_KN8TWG0V -#define XPATHDATAMODEL_H_KN8TWG0V - -#include "uscxml/InterpreterInfo.h" -#include "uscxml/plugins/DataModel.h" - -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { -class Event; -class Data; -} - -namespace uscxml { - -class XPathFunctionIn : public Arabica::XPath::BooleanXPathFunction { -public: - XPathFunctionIn(int minArgs, - int maxArgs, - const std::vector >& args, - InterpreterInfo* interpreter) : - Arabica::XPath::BooleanXPathFunction(minArgs, maxArgs, args), - _interpreter(interpreter) {} - -protected: - bool doEvaluate(const Arabica::DOM::Node& context, - const Arabica::XPath::ExecutionContext& executionContext) const; - InterpreterInfo* _interpreter; -}; - -class XPathFunctionResolver : public Arabica::XPath::FunctionResolver { -public: - virtual ~XPathFunctionResolver() { } - - virtual Arabica::XPath::XPathFunction* - resolveFunction(const std::string& namespace_uri, - const std::string& name, - const std::vector >& argExprs) const; - - virtual std::vector > validNames() const; - void setInterpreter(InterpreterInfo* interpreter) { - _interpreter = interpreter; - } -protected: - Arabica::XPath::StandardXPathFunctionResolver _xpathFuncRes; - InterpreterInfo* _interpreter; -}; - -class NodeSetVariableResolver : public Arabica::XPath::VariableResolver { -public: - Arabica::XPath::XPathValue resolveVariable(const std::string& namepaceUri, - const std::string& name) const; - void setVariable(const std::string& name, const Arabica::XPath::NodeSet& value); - bool isDeclared(const std::string& name); - -private: - std::map > _variables; - friend class XPathDataModel; -}; - -class XPathDataModel : public DataModelImpl { -public: - XPathDataModel(); - virtual ~XPathDataModel(); - virtual boost::shared_ptr create(InterpreterInfo* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("xpath"); - return names; - } - - virtual void initialize(); - virtual void setEvent(const Event& event); - - virtual bool validate(const std::string& location, const std::string& schema); - virtual bool isLocation(const std::string& expr); - - virtual uint32_t getLength(const std::string& expr); - virtual void setForeach(const std::string& item, - const std::string& array, - const std::string& index, - uint32_t iteration); - - virtual void pushContext(); - virtual void popContext(); - - virtual void eval(const Arabica::DOM::Element& scriptElem, - const std::string& expr); - virtual void assign(const Arabica::DOM::Element& assignElem, - const Arabica::DOM::Node& node, - const std::string& content); - virtual void assign(const std::string& location, const Data& data); - - virtual void init(const Arabica::DOM::Element& dataElem, - const Arabica::DOM::Node& node, - const std::string& content); - virtual void init(const std::string& location, const Data& data); - - virtual Data getStringAsData(const std::string& content); - virtual bool isDeclared(const std::string& expr); - - virtual std::string evalAsString(const std::string& expr); - virtual bool evalAsBool(const std::string& expr); - virtual bool evalAsBool(const Arabica::DOM::Element& node, const std::string& expr); - virtual double evalAsNumber(const std::string& expr); - -protected: - Arabica::XPath::XPath _xpath; - Arabica::DOM::DOMImplementation _domFactory; - Arabica::DOM::Element _datamodel; - Arabica::DOM::Document _doc; - - bool isValidIdentifier(const std::string& identifier); - Arabica::XPath::NodeSet dataToNodeSet(const Data& data); - - // resolve value to its type - void assign(const Arabica::XPath::XPathValue& key, - const Arabica::XPath::XPathValue& value, - const Arabica::DOM::Element& assignElem); - void assign(const Arabica::XPath::XPathValue& key, - const Arabica::XPath::NodeSet& value, - const Arabica::DOM::Element& assignElem); - - // assign value to a nodeset key - void assign(const Arabica::XPath::NodeSet& key, - const std::string& value, - const Arabica::DOM::Element& assignElem); - void assign(const Arabica::XPath::NodeSet& key, - const double value, - const Arabica::DOM::Element& assignElem); - void assign(const Arabica::XPath::NodeSet& key, - const bool value, - const Arabica::DOM::Element& assignElem); - void assign(const Arabica::XPath::NodeSet& key, - const Arabica::XPath::NodeSet& value, - const Arabica::DOM::Element& assignElem); - - // assign value to an element key (from nodeset) - void assign(const Arabica::DOM::Element& key, - const Arabica::XPath::NodeSet& value, - const Arabica::DOM::Element& assignElem); - - - // assign value to a text node key (from nodeset) - void assign(const Arabica::DOM::Text& key, - const Arabica::XPath::NodeSet& value, - const Arabica::DOM::Element& assignElem); - - - NodeSetVariableResolver _varResolver; - XPathFunctionResolver _funcResolver; - -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(XPathDataModel, DataModelImpl); -#endif - -} - -#endif /* end of include guard: XPATHDATAMODEL_H_KN8TWG0V */ diff --git a/src/uscxml/plugins/element/CMakeLists.txt b/src/uscxml/plugins/element/CMakeLists.txt deleted file mode 100644 index e2142ca..0000000 --- a/src/uscxml/plugins/element/CMakeLists.txt +++ /dev/null @@ -1,114 +0,0 @@ -if (NOT BUILD_MINIMAL) - - # Fetch element - - set(USCXML_ELEMENTS "fetch ${USCXML_ELEMENTS}") - file(GLOB_RECURSE FETCH_ELEMENT - fetch/*.cpp - fetch/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${FETCH_ELEMENT}) - add_library( - element_fetch SHARED - ${FETCH_ELEMENT} - "../Plugins.cpp") - target_link_libraries(element_fetch uscxml) - set_target_properties(element_fetch PROPERTIES FOLDER "Plugin Element") - set_target_properties(element_fetch PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(element_fetch PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${FETCH_ELEMENT}) - endif() - - # MMI elements - - # file(GLOB_RECURSE MMI_ELEMENT - # mmi/*.cpp - # mmi/*.h - # ) - # if (BUILD_AS_PLUGINS) - # source_group("" FILES ${MMI_ELEMENT}) - # add_library( - # element_mmi SHARED - # ${MMI_ELEMENT} - # "../Plugins.cpp") - # target_link_libraries(element_mmi uscxml) - # set_target_properties(element_mmi PROPERTIES FOLDER "Plugin Element") - # set_target_properties(element_mmi PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - # set_target_properties(element_mmi PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - # else() - # list (APPEND USCXML_FILES ${MMI_ELEMENT}) - # endif() - - - # Postpone element - - set(USCXML_ELEMENTS "postpone ${USCXML_ELEMENTS}") - file(GLOB_RECURSE POSTPONE_ELEMENT - postpone/*.cpp - postpone/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${POSTPONE_ELEMENT}) - add_library( - element_postpone SHARED - ${POSTPONE_ELEMENT} - "../Plugins.cpp") - target_link_libraries(element_postpone uscxml) - set_target_properties(element_postpone PROPERTIES FOLDER "Plugin Element") - set_target_properties(element_postpone PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(element_postpone PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${POSTPONE_ELEMENT}) - endif() - - - # File element - - set(USCXML_ELEMENTS "file ${USCXML_ELEMENTS}") - file(GLOB_RECURSE FILE_ELEMENT - file/*.cpp - file/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${FILE_ELEMENT}) - add_library( - element_file SHARED - ${FILE_ELEMENT} - "../Plugins.cpp") - target_link_libraries(element_file uscxml) - set_target_properties(element_file PROPERTIES FOLDER "Plugin Element") - set_target_properties(element_file PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(element_file PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${FILE_ELEMENT}) - endif() - - - # Respond element - - set(USCXML_ELEMENTS "respond ${USCXML_ELEMENTS}") - file(GLOB_RECURSE RESPOND_ELEMENT - respond/*.cpp - respond/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${RESPOND_ELEMENT}) - add_library( - element_respond SHARED - ${RESPOND_ELEMENT} - "../Plugins.cpp") - target_link_libraries(element_respond uscxml) - set_target_properties(element_respond PROPERTIES FOLDER "Plugin Element") - set_target_properties(element_respond PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(element_respond PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${RESPOND_ELEMENT}) - endif() - -endif() # BUILD_MINIMAL - -set(USCXML_INCLUDE_DIRS ${USCXML_INCLUDE_DIRS} PARENT_SCOPE) -set(USCXML_FILES ${USCXML_FILES} PARENT_SCOPE) -set(USCXML_ELEMENTS ${USCXML_ELEMENTS} PARENT_SCOPE) diff --git a/src/uscxml/plugins/element/fetch/FetchElement.cpp b/src/uscxml/plugins/element/fetch/FetchElement.cpp deleted file mode 100644 index bf3129b..0000000 --- a/src/uscxml/plugins/element/fetch/FetchElement.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include - -#include "FetchElement.h" -#include "uscxml/dom/DOMUtils.h" -#include - -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new FetchElementProvider() ); - return true; -} -#endif - -boost::shared_ptr FetchElement::create(InterpreterImpl* interpreter) { - boost::shared_ptr element = boost::shared_ptr(new FetchElement()); - element->_interpreter = interpreter; - return element; -} - -FetchElement::~FetchElement() { - URLFetcher::breakURL(_targetUrl); -} - -void FetchElement::downloadCompleted(const URL& url) { - Event event; - event.name = _callback; - - std::string content = url.getInContent(); - std::map headerFields = url.getInHeaderFields(); - - if (false) { - } else if (iequals(_type, "text")) { - event.data.atom = content; - event.data.type = Data::VERBATIM; - } else if (iequals(_type, "url")) { - } else if (iequals(_type, "json")) { - event.data = Data::fromJSON(content); - } else if (iequals(_type, "xml")) { - event = Event::fromXML(content); - } - - _interpreter->receive(event); - -} - -void FetchElement::downloadFailed(const URL& url, int errorCode) { - Event event; - event.name = _callback + ".failed"; - - _interpreter->receive(event); - -} - -void FetchElement::enterElement(const Arabica::DOM::Element& node) { - if (!HAS_ATTR(node, "src") && !HAS_ATTR(node, "srcexpr")) { - LOG(ERROR) << "Fetch element requires src or srcexpr"; - return; - } - if (HAS_ATTR(node, "srcexpr") && !_interpreter->getDataModel()) { - LOG(ERROR) << "Fetch element with srcexpr requires datamodel"; - return; - } - _source = (HAS_ATTR(node, "src") ? ATTR(node, "src") : _interpreter->getDataModel().evalAsString(ATTR(node, "srcexpr"))); - - if (!HAS_ATTR(node, "callback") && !HAS_ATTR(node, "callbackexpr")) { - LOG(ERROR) << "Fetch element requires callback or callbackexpr"; - return; - } - if (HAS_ATTR(node, "callbackexpr") && !_interpreter->getDataModel()) { - LOG(ERROR) << "Fetch element with callbackexpr requires datamodel"; - return; - } - _callback = (HAS_ATTR(node, "callback") ? ATTR(node, "callback") : _interpreter->getDataModel().evalAsString(ATTR(node, "callbackexpr"))); - - _type = (HAS_ATTR(node, "type") ? ATTR(node, "type") : "text"); - if (!iequals(_type, "text") && - !iequals(_type, "url") && - !iequals(_type, "json") && - !iequals(_type, "xml")) { - LOG(ERROR) << "Fetch element type attribute not one of text, url, json, xml."; - return; - } - - _targetUrl = URL(_source); - if (!_targetUrl.isAbsolute()) { - if (!_targetUrl.toAbsolute(_interpreter->getBaseURL(node))) { - LOG(ERROR) << "Cannot transform " << _source << " into absolute URL"; - return; - } - } - - _targetUrl.addMonitor(this); - URLFetcher::fetchURL(_targetUrl); - -} - -void FetchElement::exitElement(const Arabica::DOM::Element& node) { - -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/element/fetch/FetchElement.h b/src/uscxml/plugins/element/fetch/FetchElement.h deleted file mode 100644 index 3b7628a..0000000 --- a/src/uscxml/plugins/element/fetch/FetchElement.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef FETCHELEMENT_H_R6GH94FV -#define FETCHELEMENT_H_R6GH94FV - -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class FetchElement : public ExecutableContentImpl, public URLMonitor { -public: - FetchElement() {} - virtual ~FetchElement(); - boost::shared_ptr create(InterpreterImpl* interpreter); - - std::string getLocalName() { - return "fetch"; - } - - std::string getNamespace() { - return "http://www.w3.org/2005/07/scxml"; - } - - bool processChildren() { - return false; - } - - void enterElement(const Arabica::DOM::Element& node); - void exitElement(const Arabica::DOM::Element& node); - void downloadCompleted(const URL& url); - void downloadFailed(const URL& url, int errorCode); - -protected: - URL _targetUrl; - std::string _source; - std::string _callback; - std::string _type; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(FetchElement, ExecutableContentImpl); -#endif - -} - -#endif /* end of include guard: FETCHELEMENT_H_R6GH94FV */ diff --git a/src/uscxml/plugins/element/file/FileElement.cpp b/src/uscxml/plugins/element/file/FileElement.cpp deleted file mode 100644 index c2e4f55..0000000 --- a/src/uscxml/plugins/element/file/FileElement.cpp +++ /dev/null @@ -1,259 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "FileElement.h" -#include -#include -#include -#include -#include "uscxml/messages/Blob.h" - -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/dom/NameSpacingParser.h" - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new FileElementProvider() ); - return true; -} -#endif - -boost::shared_ptr FileElement::create(InterpreterImpl* interpreter) { - boost::shared_ptr element = boost::shared_ptr(new FileElement()); - return element; -} - -FileElement::~FileElement() { -} - -void FileElement::enterElement(const Arabica::DOM::Element& node) { - if (!HAS_ATTR(node, "url") && !HAS_ATTR(node, "urlexpr")) { - LOG(ERROR) << "File element requires url or urlexpr"; - return; - } - _givenUrl = (HAS_ATTR(node, "url") ? ATTR(node, "url") : _interpreter->getDataModel().evalAsString(ATTR(node, "urlexpr"))); - - std::string sandBoxStr = (HAS_ATTR(node, "sandbox") ? ATTR(node, "sandbox") : "on"); - if (iequals(sandBoxStr, "off") || iequals(sandBoxStr, "false") || iequals(sandBoxStr, "no")) { - _sandBoxed = false; - } - - if (HAS_ATTR(node, "operation")) { - std::string operation = ATTR(node, "operation"); - if (iequals(operation, "read") || iequals(operation, "load")) { - _operation = READ; - } else if(iequals(operation, "write")) { - _operation = WRITE; - } else if(iequals(operation, "append")) { - _operation = APPEND; - } else { - LOG(ERROR) << "File element operation attribute not one of read, write or append."; - return; - } - } else { - _operation = READ; - } - - // callback is only needed for reading - std::string callback; - if (_operation == READ) { - if (!HAS_ATTR(node, "callback") && !HAS_ATTR(node, "callbackexpr")) { - LOG(ERROR) << "File element requires callback or callbackexpr"; - return; - } - callback = (HAS_ATTR(node, "callback") ? ATTR(node, "callback") : _interpreter->getDataModel().evalAsString(ATTR(node, "callbackexpr"))); - } - - std::string contentStr; - char* content = NULL; - size_t contentSize = 0; - if (_operation == WRITE || _operation == APPEND) { - if (!HAS_ATTR(node, "content") && !HAS_ATTR(node, "contentexpr")) { - LOG(ERROR) << "File element requires content or contentexpr"; - return; - } - if (HAS_ATTR(node, "content")) { - contentStr = ATTR(node, "content"); - } else { - Data data = _interpreter->getDataModel().getStringAsData(ATTR(node, "contentexpr")); - if (data.binary) { - content = data.binary.getData(); - contentSize = data.binary.getSize(); - } else if (data.atom.length() > 0) { - contentStr = data.atom; - } - } - } - - std::string type = "text"; - if (HAS_ATTR(node, "type")) { - type = ATTR(node, "type"); - } else if(HAS_ATTR(node, "typeexpr")) { - type = _interpreter->getDataModel().evalAsString(ATTR(node, "typeexpr")); - } - if (iequals(type, "text")) { - _type = TEXT; - } else if (iequals(type, "json")) { - _type = JSON; - } else if (iequals(type, "binary")) { - _type = BINARY; - } else if(iequals(type, "xml")) { - _type = XML; - } else { - LOG(ERROR) << "File element type attribute not one of text, json, xml or binary."; - return; - } - - _actualUrl = URL(_givenUrl); - if (_sandBoxed && _actualUrl.isAbsolute()) { - LOG(ERROR) << "Given URL is absolute with sandboxing enabled."; - return; - } - - if (_sandBoxed) - _actualUrl.toAbsolute(URL::getResourceDir()); - - _filepath = _actualUrl.path(); - - - std::string writeMode; - switch (_operation) { - case APPEND: - writeMode = "a+"; - case WRITE: { - if (writeMode.length() == 0) - writeMode = "w+"; - - FILE *fp; - fp = fopen(_filepath.c_str(), writeMode.c_str()); - if (fp == NULL) { - LOG(ERROR) << "Error opening '" << _filepath << "' for writing: " << strerror(errno); - } - - if (content && contentSize > 0) { - size_t written = fwrite(content, 1, contentSize, fp); - if (written != contentSize) { - LOG(ERROR) << "Error writing to '" << _filepath << "': " << strerror(errno); - return; - } - } else if (contentStr.length() > 0) { - size_t written = fwrite(contentStr.c_str(), contentStr.length(), 1, fp); - if (written < 1) { - LOG(ERROR) << "Error writing to '" << _filepath << "': " << strerror(errno); - } - } else { - LOG(WARNING) << "Nothing to write to '" << _filepath; - } - fclose(fp); - break; - } - case READ: { - struct stat fileStat; - int err = stat(_filepath.c_str(), &fileStat); - if (err < 0) { - LOG(ERROR) << "Cannot stat file '" << _filepath << "': " << strerror(errno); - return; - } - - Event event; - event.name = callback; - - std::string filename = _actualUrl.pathComponents()[_actualUrl.pathComponents().size() - 1]; - - event.data.compound["file"].compound["name"] = Data(filename, Data::VERBATIM); - event.data.compound["file"].compound["path"] = Data(_filepath, Data::VERBATIM); - event.data.compound["file"].compound["mtime"] = Data(toStr(fileStat.st_mtime), Data::INTERPRETED); - event.data.compound["file"].compound["ctime"] = Data(toStr(fileStat.st_ctime), Data::INTERPRETED); - event.data.compound["file"].compound["atime"] = Data(toStr(fileStat.st_atime), Data::INTERPRETED); - event.data.compound["file"].compound["size"] = Data(toStr(fileStat.st_size), Data::INTERPRETED); - - - FILE *fp; - fp = fopen(_filepath.c_str(), "r"); - - fseek (fp, 0, SEEK_END); - size_t filesize = ftell(fp); - rewind (fp); - - char* fileContents = (char*)malloc(filesize); - size_t read = fread(fileContents, 1, filesize, fp); - fclose(fp); - if (read != filesize) { - LOG(ERROR) << "Error reading from '" << _filepath << "': " << strerror(errno); - return; - } - - switch (_type) { - case BINARY: { - std::string mimetype = "application/octet-stream"; - if (HAS_ATTR(node, "mimetype")) { - mimetype = ATTR(node, "mimetype"); - } else if(HAS_ATTR(node, "mimetypeexpr")) { - mimetype = _interpreter->getDataModel().evalAsString(ATTR(node, "mimetypeexpr")); - } - - event.data.compound["content"] = Data(fileContents, fileStat.st_size, mimetype, true); - break; - } - case TEXT: - event.data.compound["content"] = Data(fileContents, Data::VERBATIM); - free(fileContents); - break; - case JSON: { - Data json = Data::fromJSON(fileContents); - free(fileContents); - if (json.empty()) { - LOG(ERROR) << "Cannot parse contents of " << _filepath << " as JSON"; - return; - } - event.data.compound["content"] = json; - break; - } - case XML: { - NameSpacingParser parser = NameSpacingParser::fromXML(fileContents); - if (parser.errorsReported()) { - LOG(ERROR) << "Cannot parse contents of " << _filepath << " as XML"; - return; - } - event.dom = parser.getDocument().getDocumentElement(); - break; - } - } - _interpreter->receive(event); - break; - } - } - - - - -} - -void FileElement::exitElement(const Arabica::DOM::Element& node) { - -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/element/file/FileElement.h b/src/uscxml/plugins/element/file/FileElement.h deleted file mode 100644 index b1b3426..0000000 --- a/src/uscxml/plugins/element/file/FileElement.h +++ /dev/null @@ -1,84 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef FILEELEMENT_H_VJ3JIMEJ -#define FILEELEMENT_H_VJ3JIMEJ - -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class FileElement : public ExecutableContentImpl { -public: - enum Operation { - READ, - WRITE, - APPEND - }; - - enum Type { - XML, - JSON, - TEXT, - BINARY - }; - - FileElement() { - _sandBoxed = true; - } - virtual ~FileElement(); - boost::shared_ptr create(InterpreterImpl* interpreter); - - std::string getLocalName() { - return "file"; - } - - std::string getNamespace() { - return "http://www.w3.org/2005/07/scxml"; - } - - bool processChildren() { - return false; - } - - void enterElement(const Arabica::DOM::Element& node); - void exitElement(const Arabica::DOM::Element& node); - -protected: - - bool _sandBoxed; - std::string _givenUrl; - URL _actualUrl; - std::string _filepath; - Operation _operation; - Type _type; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(FileElement, ExecutableContentImpl); -#endif - -} - -#endif /* end of include guard: FILEELEMENT_H_VJ3JIMEJ */ diff --git a/src/uscxml/plugins/element/mmi/MMIEvents.cpp b/src/uscxml/plugins/element/mmi/MMIEvents.cpp deleted file mode 100644 index e6d6954..0000000 --- a/src/uscxml/plugins/element/mmi/MMIEvents.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "MMIEvents.h" - -namespace uscxml { - -void PrepareRequestElement::enterElement(const Arabica::DOM::Node& node) { -} -void StartRequestElement::enterElement(const Arabica::DOM::Node& node) { -} -void PauseRequestElement::enterElement(const Arabica::DOM::Node& node) { -} -void ResumeRequestElement::enterElement(const Arabica::DOM::Node& node) { -} -void CancelRequestElement::enterElement(const Arabica::DOM::Node& node) { -} -void ClearContextRequestElement::enterElement(const Arabica::DOM::Node& node) { -} -void StatusRequestElement::enterElement(const Arabica::DOM::Node& node) { -} -void NewContextResponseElement::enterElement(const Arabica::DOM::Node& node) { -} -void PrepareResponseElement::enterElement(const Arabica::DOM::Node& node) { -} -void StartResponseElement::enterElement(const Arabica::DOM::Node& node) { -} -void PauseResponseElement::enterElement(const Arabica::DOM::Node& node) { -} -void ResumeResponseElement::enterElement(const Arabica::DOM::Node& node) { -} -void CancelResponseElement::enterElement(const Arabica::DOM::Node& node) { -} -void ClearContextResponseElement::enterElement(const Arabica::DOM::Node& node) { -} -void StatusResponseElement::enterElement(const Arabica::DOM::Node& node) { -} -void DoneNotificationElement::enterElement(const Arabica::DOM::Node& node) { -} -void NewContextRequestElement::enterElement(const Arabica::DOM::Node& node) { -} -void ExtensionNotificationElement::enterElement(const Arabica::DOM::Node& node) { -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/element/mmi/MMIEvents.h b/src/uscxml/plugins/element/mmi/MMIEvents.h deleted file mode 100644 index 74c66c0..0000000 --- a/src/uscxml/plugins/element/mmi/MMIEvents.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef MMIEVENTS_H_QHO6VT3M -#define MMIEVENTS_H_QHO6VT3M - -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -#define ELEMENT_CREATOR(elementName) \ -boost::shared_ptr create(InterpreterImpl* interpreter) { \ - boost::shared_ptr element = boost::shared_ptr(new elementName()); \ - element->_interpreter = interpreter; \ - return element; \ -} - -#define ELEMENT_MMI_CLASS(elementName) \ -class elementName##Element : public ExecutableContentImpl { \ -public:\ - elementName##Element () {}\ - virtual ~elementName##Element () {}\ - ELEMENT_CREATOR(elementName##Element);\ - std::string getLocalName() { return "elementName"; }\ - std::string getNamespace() { return "http://www.w3.org/2008/04/mmi-arch"; }\ - bool processChildren() { return false; }\ - void enterElement(const Arabica::DOM::Element& node) {}\ - void exitElement(const Arabica::DOM::Element& node) {}\ -}; - -namespace uscxml { - -ELEMENT_MMI_CLASS(PrepareRequest); -ELEMENT_MMI_CLASS(StartRequest); -ELEMENT_MMI_CLASS(PauseRequest); -ELEMENT_MMI_CLASS(ResumeRequest); -ELEMENT_MMI_CLASS(CancelRequest); -ELEMENT_MMI_CLASS(ClearContextRequest); -ELEMENT_MMI_CLASS(StatusRequest); -ELEMENT_MMI_CLASS(NewContextResponse); -ELEMENT_MMI_CLASS(PrepareResponse); -ELEMENT_MMI_CLASS(StartResponse); -ELEMENT_MMI_CLASS(PauseResponse); -ELEMENT_MMI_CLASS(ResumeResponse); -ELEMENT_MMI_CLASS(CancelResponse); -ELEMENT_MMI_CLASS(ClearContextResponse); -ELEMENT_MMI_CLASS(StatusResponse); -ELEMENT_MMI_CLASS(DoneNotification); -ELEMENT_MMI_CLASS(NewContextRequest); -ELEMENT_MMI_CLASS(ExtensionNotification); - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(FetchElement, ExecutableContentImpl); -#endif - -} - - -#endif /* end of include guard: MMIEVENTS_H_QHO6VT3M */ diff --git a/src/uscxml/plugins/element/postpone/PostponeElement.cpp b/src/uscxml/plugins/element/postpone/PostponeElement.cpp deleted file mode 100644 index 460cc88..0000000 --- a/src/uscxml/plugins/element/postpone/PostponeElement.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include - -#include "PostponeElement.h" -#include "uscxml/plugins/invoker/http/HTTPServletInvoker.h" -#include "uscxml/dom/DOMUtils.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new PostponeElementProvider() ); - return true; -} -#endif - -boost::shared_ptr PostponeElement::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new PostponeElement()); - invoker->_interpreter = interpreter; - return invoker; -} - -void PostponeElement::enterElement(const Arabica::DOM::Element& node) { - if (!_interpreter->getDataModel()) { - LOG(ERROR) << "Postpone element requires a datamodel"; - return; - } - - // under which condition will we postpone the current event? - if (HAS_ATTR(node, "cond")) { - std::string cond = ATTR(node, "cond"); - try { - if (!_interpreter->getDataModel().evalAsBool(cond)) - return; - } catch (Event e) { - LOG(ERROR) << "Syntax error in cond attribute of postpone element:" << std::endl << e << std::endl; - return; - } - } - - // chaining causes the event to fire if the condition was true since postponing - bool chained = false; - if (HAS_ATTR(node, "chaining")) { - chained = iequals(ATTR(node, "chaining"), "true"); - } - - // when will we refire the event? - std::string until; - try { - if (HAS_ATTR(node, "untilexpr")) { - until = _interpreter->getDataModel().evalAsString(ATTR(node, "untilexpr")); - } else if (HAS_ATTR(node, "until")) { - until = ATTR(node, "until"); - } - } catch (Event e) { - LOG(ERROR) << "Syntax error in postpone element untilexpr:" << std::endl << e << std::endl; - return; - } - - if (until.length() == 0) { - LOG(ERROR) << "Postpone element requires until or untilexpr attribute "; - return; - } - -// LOG(INFO) << until; - -#if 0 - std::string timeoutStr = "0s"; - try { - if (HAS_ATTR(node, "timeoutexpr")) { - timeoutStr = _interpreter->getDataModel().evalAsString(ATTR(node, "timeoutexpr")); - } else if (HAS_ATTR(node, "timeout")) { - timeoutStr = ATTR(node, "timeout"); - } - } catch (Event e) { - LOG(ERROR) << "Syntax error in postpone element timeoutexpr:" << std::endl << e << std::endl; - return; - } - - uint64_t timeout = 0; - NumAttr timeoutAttr(timeoutStr); - if (iequals(timeoutAttr.unit, "s")) { - timeout = strTo(timeoutAttr.value) * 1000; - } else if (iequals(timeoutAttr.unit, "ms")) { - timeout = strTo(timeoutAttr.value); - } - if (timeout > 0) { - timeout += tthread::chrono::system_clock::now(); - } -#endif - Event currEvent = _interpreter->getCurrentEvent(); - Resubmitter::postpone(currEvent, until, 0, chained, _interpreter); -} - -void PostponeElement::exitElement(const Arabica::DOM::Element& node) { -} - -void PostponeElement::Resubmitter::postpone(const Event& event, std::string until, uint64_t timeout, bool chained, InterpreterImpl* interpreter) { - Resubmitter* resubmitter = getInstance(interpreter); - resubmitter->_postponedEvents.push_back(Postponed(event, until, timeout, chained)); -} - -void PostponeElement::Resubmitter::onStableConfiguration(Interpreter interpreter) { - std::list::iterator eventIter = _postponedEvents.begin(); - bool dispatched = false; - while(eventIter != _postponedEvents.end()) { - try { -// LOG(INFO) << "Reevaluating: >> " << eventIter->first << " <<"; - if ((!dispatched || eventIter->chaining) && interpreter.getDataModel().evalAsBool(eventIter->until)) { -// LOG(INFO) << " -> is TRUE"; - eventIter->event.name += ".postponed"; - interpreter.receive(eventIter->event, true); - _postponedEvents.erase(eventIter++); - dispatched = true; - } -// LOG(INFO) << " -> is FALSE"; - } catch (Event e) { - LOG(ERROR) << "Syntax error while evaluating until attribute of postpone element:" << std::endl << e << std::endl; - _postponedEvents.erase(eventIter++); - continue; - } - eventIter++; - } -// LOG(ERROR) << _postponedEvents.size() << " Postponess remaining"; - -} - -void PostponeElement::Resubmitter::afterCompletion(Interpreter interpreter) { - tthread::lock_guard lock(PostponeElement::Resubmitter::_accessLock); - _instances.erase(interpreter); - delete this; // committing suicide is ok if we are careful -} - -std::map PostponeElement::Resubmitter::_instances; -tthread::recursive_mutex PostponeElement::Resubmitter::_accessLock; - -PostponeElement::Resubmitter* PostponeElement::Resubmitter::getInstance(InterpreterImpl* interpreter) { - tthread::lock_guard lock(PostponeElement::Resubmitter::_accessLock); - if (_instances.find(interpreter->shared_from_this()) == _instances.end()) { - _instances[interpreter->shared_from_this()] = new Resubmitter(interpreter); - } - return _instances[interpreter->shared_from_this()]; -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/element/postpone/PostponeElement.h b/src/uscxml/plugins/element/postpone/PostponeElement.h deleted file mode 100644 index 9840c75..0000000 --- a/src/uscxml/plugins/element/postpone/PostponeElement.h +++ /dev/null @@ -1,90 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef POSTPONEELEMENT_H_WN8EIYYI -#define POSTPONEELEMENT_H_WN8EIYYI - -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class PostponeElement : public ExecutableContentImpl { -public: - struct Postponed { - Postponed(const Event& event, const std::string& until, long timeout, bool chaining = false) : - event(event), until(until), timeout(timeout), chaining(chaining) {} - Event event; - std::string until; - uint64_t timeout; - bool chaining; - }; - - PostponeElement() {} - virtual ~PostponeElement() {} - boost::shared_ptr create(InterpreterImpl* interpreter); - - std::string getLocalName() { - return "postpone"; - } - - std::string getNamespace() { - return "http://www.w3.org/2005/07/scxml"; - } - - bool processChildren() { - return false; - } - - void enterElement(const Arabica::DOM::Element& node); - void exitElement(const Arabica::DOM::Element& node); - -protected: - // once per interpreter - class Resubmitter : public InterpreterMonitor { - public: - Resubmitter(InterpreterImpl* interpreter) { - interpreter->addMonitor(this); - } - - static Resubmitter* getInstance(InterpreterImpl* interpreter); - static void postpone(const Event& event, std::string until, uint64_t timeout, bool chained, InterpreterImpl* interpreter); - - // InterpreterMonitor - void onStableConfiguration(Interpreter interpreter); - void afterCompletion(Interpreter interpreter); - - std::list _postponedEvents; - static std::map _instances; - static tthread::recursive_mutex _accessLock; - - }; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(PostponeElement, ExecutableContentImpl); -#endif - -} - -#endif /* end of include guard: POSTPONEELEMENT_H_WN8EIYYI */ diff --git a/src/uscxml/plugins/element/respond/RespondElement.cpp b/src/uscxml/plugins/element/respond/RespondElement.cpp deleted file mode 100644 index 032f74e..0000000 --- a/src/uscxml/plugins/element/respond/RespondElement.cpp +++ /dev/null @@ -1,202 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "RespondElement.h" -#include "uscxml/plugins/invoker/http/HTTPServletInvoker.h" -#include "uscxml/server/InterpreterServlet.h" -#include "uscxml/dom/DOMUtils.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new RespondElementProvider() ); - return true; -} -#endif - -boost::shared_ptr RespondElement::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new RespondElement()); - invoker->_interpreter = interpreter; - return invoker; -} - -void RespondElement::enterElement(const Arabica::DOM::Element& node) { - // try to get the request id - if (!HAS_ATTR(node, "to")) { - LOG(ERROR) << "Respond element requires to attribute"; - return; - } - if (HAS_ATTR(node, "to") && !_interpreter->getDataModel()) { - LOG(ERROR) << "Respond element with to requires datamodel"; - return; - } - std::string requestId = _interpreter->getDataModel().evalAsString(ATTR(node, "to")); - - // try to get the request object - InterpreterHTTPServlet* servlet = _interpreter->getHTTPServlet(); - tthread::lock_guard lock(servlet->getMutex()); - - if (servlet->getRequests().find(requestId) == servlet->getRequests().end()) { - LOG(ERROR) << "No matching HTTP request for respond element"; - return; - } - - assert(servlet->getRequests().find(requestId) != servlet->getRequests().end()); - HTTPServer::Request httpReq = servlet->getRequests()[requestId]; - assert(httpReq.evhttpReq != NULL); - HTTPServer::Reply httpReply(httpReq); - servlet->getRequests().erase(requestId); - - // get the status or default to 200 - std::string statusStr = (HAS_ATTR(node, "status") ? ATTR(node, "status") : "200"); - if (!isNumeric(statusStr.c_str(), 10)) { - LOG(ERROR) << "Respond element with non-numeric status " << statusStr; - return; - } - httpReply.status = strTo(statusStr);; - - // extract the content - Arabica::XPath::NodeSet contents = DOMUtils::filterChildElements(_interpreter->getNameSpaceInfo().getXMLPrefixForNS(getNamespace()) + "content", node); - if (contents.size() > 0) { - Arabica::DOM::Element contentElem = Arabica::DOM::Element(contents[0]); - if (HAS_ATTR(contentElem, "expr")) { // -- content is evaluated string from datamodel ------ - if (_interpreter->getDataModel()) { - try { - Data contentData = _interpreter->getDataModel().getStringAsData(ATTR(contentElem, "expr")); - if (contentData.atom.length() > 0) { - httpReply.content = contentData.atom; - httpReply.headers["Content-Type"] = "text/plain"; - } else if (contentData.binary) { - httpReply.content = std::string(contentData.binary.getData(), contentData.binary.getSize()); - httpReply.headers["Content-Type"] = contentData.binary.getMimeType(); - } else if (contentData.node) { - std::stringstream ss; - ss << contentData.node; - httpReply.content = ss.str();; - httpReply.headers["Content-Type"] = "application/xml"; - } else { - httpReply.content = Data::toJSON(contentData); - httpReply.headers["Content-Type"] = "application/json"; - } - } catch (Event e) { - LOG(ERROR) << "Syntax error with expr in content child of Respond element:" << std::endl << e << std::endl; - return; - } - } else { - LOG(ERROR) << "content element has expr attribute but no datamodel is specified."; - return; - } - } else if (HAS_ATTR(contentElem, "file") || HAS_ATTR(contentElem, "fileexpr")) { // -- content is from file ------ - URL file; - if (HAS_ATTR(contentElem, "fileexpr")) { - if (_interpreter->getDataModel()) { - try { - file = "file://" + _interpreter->getDataModel().evalAsString(ATTR(contentElem, "fileexpr")); - } catch (Event e) { - LOG(ERROR) << "Syntax error with fileexpr in content child of Respond element:" << std::endl << e << std::endl; - return; - } - } - } else { - file = "file://" + ATTR(contentElem, "fileexpr"); - } - if (file) { - httpReply.content = file.getInContent(); - size_t lastDot; - if ((lastDot = file.path().find_last_of(".")) != std::string::npos) { - std::string extension = file.path().substr(lastDot + 1); - std::string mimeType = URL::getMimeType(extension); - if (mimeType.length() > 0) { - httpReply.headers["Content-Type"] = mimeType; - } - } - } - } else if (contents[0].hasChildNodes()) { // -- content embedded as child nodes ------ - httpReply.content = contents[0].getFirstChild().getNodeValue(); - } else { - LOG(ERROR) << "content element does not specify any content."; - return; - } - } - - // process headers - Arabica::XPath::NodeSet headers = DOMUtils::filterChildElements(_interpreter->getNameSpaceInfo().getXMLPrefixForNS(getNamespace()) + "header", node); - for (size_t i = 0; i < headers.size(); i++) { - Arabica::DOM::Element headerElem = Arabica::DOM::Element(headers[i]); - - std::string name; - if (HAS_ATTR(headerElem, "name")) { - name = ATTR(headerElem, "name"); - } else if(HAS_ATTR(headerElem, "nameexpr")) { - if (_interpreter->getDataModel()) { - try { - name = _interpreter->getDataModel().evalAsString(ATTR(headerElem, "nameexpr")); - } catch (Event e) { - LOG(ERROR) << "Syntax error with nameexpr in header child of Respond element:" << std::endl << e << std::endl; - return; - } - } else { - LOG(ERROR) << "header element has nameexpr attribute but no datamodel is specified."; - return; - } - } else { - LOG(ERROR) << "header element has no name or nameexpr attribute."; - return; - } - - std::string value; - if (HAS_ATTR(headerElem, "value")) { - value = ATTR(headerElem, "value"); - } else if(HAS_ATTR(headerElem, "valueexpr")) { - if (_interpreter->getDataModel()) { - try { - value = _interpreter->getDataModel().evalAsString(ATTR(headerElem, "valueexpr")); - } catch (Event e) { - LOG(ERROR) << "Syntax error with valueexpr in header child of Respond element:" << std::endl << e << std::endl; - return; - } - } else { - LOG(ERROR) << "header element has valueexpr attribute but no datamodel is specified."; - return; - } - } else { - LOG(ERROR) << "header element has no value or valueexpr attribute."; - return; - } - - httpReply.headers[name] = value; - } - - // send the reply - HTTPServer::reply(httpReply); - servlet->getRequests().erase(requestId); -} - -void RespondElement::exitElement(const Arabica::DOM::Element& node) { - -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/element/respond/RespondElement.h b/src/uscxml/plugins/element/respond/RespondElement.h deleted file mode 100644 index 2e8cec7..0000000 --- a/src/uscxml/plugins/element/respond/RespondElement.h +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef RESPONDELEMENT_H_I11KQ39Q -#define RESPONDELEMENT_H_I11KQ39Q - -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class RespondElement : public ExecutableContentImpl { -public: - RespondElement() {} - virtual ~RespondElement() {} - boost::shared_ptr create(InterpreterImpl* interpreter); - - std::string getLocalName() { - return "respond"; - } - - std::string getNamespace() { - return "http://www.w3.org/2005/07/scxml"; - } - - bool processChildren() { - return false; - } - - void enterElement(const Arabica::DOM::Element& node); - void exitElement(const Arabica::DOM::Element& node); - -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(RespondElement, ExecutableContentImpl); -#endif - -} - - -#endif /* end of include guard: RESPONDELEMENT_H_I11KQ39Q */ diff --git a/src/uscxml/plugins/invoker/CMakeLists.txt b/src/uscxml/plugins/invoker/CMakeLists.txt index 03f22a6..ec64899 100644 --- a/src/uscxml/plugins/invoker/CMakeLists.txt +++ b/src/uscxml/plugins/invoker/CMakeLists.txt @@ -4,572 +4,7 @@ set(USCXML_INVOKERS "scxml ${USCXML_INVOKERS}") file(GLOB_RECURSE USCXML_INVOKER scxml/*.cpp scxml/*.h) -if (BUILD_AS_PLUGINS) - source_group("" FILES ${USCXML_INVOKER}) - add_library( - invoker_uscxml SHARED - ${USCXML_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_uscxml uscxml) - set_target_properties(invoker_uscxml PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_uscxml PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_uscxml PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") -else() list (APPEND USCXML_FILES ${USCXML_INVOKER}) -endif() - -if (NOT BUILD_MINIMAL) - # sample invoker - include to make sure it compiles - set(USCXML_INVOKERS "sample ${USCXML_INVOKERS}") - file(GLOB_RECURSE SAMPLE_INVOKER - sample/*.cpp - sample/*.h - ) - - if (BUILD_AS_PLUGINS) - source_group("" FILES ${SAMPLE_INVOKER}) - add_library( - invoker_sample SHARED - ${SAMPLE_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_sample uscxml) - set_target_properties(invoker_sample PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_sample PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_sample PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${SAMPLE_INVOKER}) - endif() - - # DirMon invoker to watch for filesystem changes - - set(USCXML_INVOKERS "dirmon ${USCXML_INVOKERS}") - file(GLOB_RECURSE DIRMON_INVOKER - filesystem/dirmon/*.cpp - filesystem/dirmon/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${DIRMON_INVOKER}) - add_library( - invoker_dirmon SHARED - ${DIRMON_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_dirmon uscxml) - set_target_properties(invoker_dirmon PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_dirmon PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_dirmon PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${DIRMON_INVOKER}) - endif() - - - # Location invoker to watch for proximity to GPS coordinates - - # file(GLOB_RECURSE LOCATION_INVOKER - # location/*.cpp - # location/*.h - # ) - # if (BUILD_AS_PLUGINS) - # source_group("" FILES ${LOCATION_INVOKER}) - # add_library( - # invoker_location SHARED - # ${LOCATION_INVOKER} - # "../Plugins.cpp") - # target_link_libraries(invoker_location uscxml) - # set_target_properties(invoker_location PROPERTIES FOLDER "Plugin Invoker") - # else() - # list (APPEND USCXML_FILES ${LOCATION_INVOKER}) - # endif() - - - # XHTML invoker - - set(USCXML_INVOKERS "xhtml ${USCXML_INVOKERS}") - file(GLOB_RECURSE XHTML_INVOKER - xhtml/*.cpp - xhtml/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${XHTML_INVOKER}) - add_library( - invoker_xhtml SHARED - ${XHTML_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_xhtml uscxml) - set_target_properties(invoker_xhtml PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_xhtml PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_xhtml PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${XHTML_INVOKER}) - endif() - - - # System invoker to open a native command - - file(GLOB_RECURSE SYSTEM_INVOKER - system/*.cpp - system/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${SYSTEM_INVOKER}) - add_library( - invoker_system SHARED - ${SYSTEM_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_system uscxml) - set_target_properties(invoker_system PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_system PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_system PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${SYSTEM_INVOKER}) - endif() - - - # expect invoker - - if (EXPECT_FOUND AND TCL_FOUND) - set(USCXML_INVOKERS "expect ${USCXML_INVOKERS}") - file(GLOB_RECURSE EXPECT_INVOKER - expect/*.cpp - expect/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES EXPECT_INVOKER) - add_library( - invoker_expect SHARED - ${EXPECT_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_expect uscxml ${EXPECT_LIBRARY} ${TCL_LIBRARY}) - set_target_properties(invoker_expect PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_expect PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_expect PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${EXPECT_INVOKER}) - endif() - endif() - - - # SMTP invoker via curl - - if (CURL_HAS_SMTP) - set(USCXML_INVOKERS "smtp ${USCXML_INVOKERS}") - file(GLOB_RECURSE SMTP_INVOKER - smtp/*.cpp - smtp/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES SMTP_INVOKER) - add_library( - invoker_smtp SHARED - ${SMTP_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_smtp uscxml) - set_target_properties(invoker_smtp PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_smtp PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_smtp PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${SMTP_INVOKER}) - endif() - endif() - - - # IMAP invoker via curl - - set(USCXML_INVOKERS "imap ${USCXML_INVOKERS}") - file(GLOB_RECURSE IMAP_INVOKER - imap/*.cpp - imap/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES IMAP_INVOKER) - add_library( - invoker_imap SHARED - ${IMAP_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_imap uscxml) - set_target_properties(invoker_imap PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_imap PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_imap PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${IMAP_INVOKER}) - endif() - - - # SQLite3 SQL Invoker - - if (SQLITE3_FOUND) - file(GLOB_RECURSE SQLITE3_INVOKER - sqlite3/*.cpp - sqlite3/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${SQLITE3_INVOKER}) - add_library( - invoker_sqlite3 SHARED - ${SQLITE3_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_sqlite3 uscxml) - set_target_properties(invoker_sqlite3 PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_sqlite3 PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_sqlite3 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${SQLITE3_INVOKER}) - endif() - endif() - - - # ffmpeg invoker - - if (FFMPEG_FOUND) - set(USCXML_INVOKERS "ffmpeg ${USCXML_INVOKERS}") - file(GLOB_RECURSE FFMPEG_INVOKER - ffmpeg/*.cpp - ffmpeg/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${FFMPEG_INVOKER}) - add_library( - invoker_ffmpeg SHARED - ${FFMPEG_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_ffmpeg uscxml ${FFMPEG_LIBRARIES}) - set_target_properties(invoker_ffmpeg PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_ffmpeg PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_ffmpeg PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${FFMPEG_INVOKER}) - endif() - endif() - - - # instant messaging invoker - - if (LIBPURPLE_FOUND) - set(USCXML_INVOKERS "im ${USCXML_INVOKERS}") - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/im/IMConfig.h.in ${CMAKE_BINARY_DIR}/uscxml/IMConfig.h) - - file(GLOB_RECURSE LIBPURPLE_INVOKER - im/*.cpp - im/*.h - ) - - if (BUILD_AS_PLUGINS) - source_group("" FILES ${LIBPURPLE_INVOKER}) - add_library( - invoker_im SHARED - ${LIBPURPLE_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_im uscxml ${LIBPURPLE_LIBRARY} ${GLIB2_LIBRARIES} ${ICONV_LIBRARIES}) - set_target_properties(invoker_im PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_im PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_im PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${LIBPURPLE_INVOKER}) - endif() - endif() - - - # calendar invoker - - if (LIBICAL_FOUND) - set(USCXML_INVOKERS "calendar ${USCXML_INVOKERS}") - file(GLOB_RECURSE CALENDAR_INVOKER - calendar/*.cpp - calendar/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${CALENDAR_INVOKER}) - add_library( - invoker_calendar SHARED - ${CALENDAR_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_calendar uscxml ${LIBICAL_LIBRARIES}) - set_target_properties(invoker_calendar PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_calendar PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_calendar PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${CALENDAR_INVOKER}) - endif() - endif() - - - # webrtc invoker - - if (LIBJINGLE_FOUND) - set(USCXML_INVOKERS "webrtc ${USCXML_INVOKERS}") - file(GLOB_RECURSE WEBRTC_INVOKER - webrtc/*.cpp - webrtc/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${WEBRTC_INVOKER}) - add_library( - invoker_webrtc SHARED - ${WEBRTC_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_webrtc uscxml ${LIBJINGLE_LIBRARIES}) - set_target_properties(invoker_webrtc PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_webrtc PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_webrtc PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${WEBRTC_INVOKER}) - endif() - endif() - - - # location invoker - - if (CORELOCATION_LIBRARY AND OFF) - set(USCXML_INVOKERS "location ${USCXML_INVOKERS}") - file(GLOB_RECURSE LOCATION_INVOKER - location/CoreLocation/*.cpp - location/CoreLocation/*.mm - location/CoreLocation/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${LOCATION_INVOKER}) - add_library( - invoker_location SHARED - ${LOCATION_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_location uscxml) - set_target_properties(invoker_location PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_location PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_location PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${LOCATION_INVOKER}) - endif() - endif() - - - # UMUNDO invoker - - if (UMUNDO_FOUND AND PROTOBUF_FOUND) - set(USCXML_INVOKERS "umundo ${USCXML_INVOKERS}") - set(UMUNDO_INVOKER - ${CMAKE_CURRENT_SOURCE_DIR}/umundo/UmundoInvoker.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/umundo/UmundoInvoker.h - ) - if (PROTOBUF_FOUND) - list(APPEND UMUNDO_INVOKER - ${CMAKE_CURRENT_SOURCE_DIR}/umundo/JSON.pb.cc - ${CMAKE_CURRENT_SOURCE_DIR}/umundo/JSON.pb.h - ) - endif() - if (BUILD_AS_PLUGINS) - source_group("" FILES ${UMUNDO_INVOKER}) - # message(FATAL_ERROR "UMUNDO_LIBRARIES: ${UMUNDO_LIBRARIES}") - add_library( - invoker_umundo SHARED - ${UMUNDO_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_umundo uscxml - ${UMUNDO_LIBRARIES}) - if (PROTOBUF_FOUND) - target_link_libraries(invoker_umundo - optimized ${PROTOBUF_LIBRARY} - debug ${PROTOBUF_LIBRARY_DEBUG}) - endif() - set_target_properties(invoker_umundo PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_umundo PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_umundo PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${UMUNDO_INVOKER}) - endif() - endif() - - - # HTTP server invoker - - set(USCXML_INVOKERS "httpservlet ${USCXML_INVOKERS}") - file(GLOB_RECURSE HTTPSERVLET_INVOKER - http/*.cpp - http/*.h) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${HTTPSERVLET_INVOKER}) - add_library( - invoker_httpserver SHARED - ${HTTPSERVLET_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_httpserver - uscxml) - set_target_properties(invoker_httpserver PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_httpserver PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_httpserver PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${HTTPSERVLET_INVOKER}) - endif() - - - # Heartbeat invoker - - set(USCXML_INVOKERS "heartbeat ${USCXML_INVOKERS}") - file(GLOB_RECURSE HEARTBEAT_INVOKER - heartbeat/*.cpp - heartbeat/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${HEARTBEAT_INVOKER}) - add_library( - invoker_heartbeat SHARED - ${HEARTBEAT_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_heartbeat uscxml) - set_target_properties(invoker_heartbeat PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_heartbeat PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_heartbeat PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${HEARTBEAT_INVOKER}) - endif() - - - # OpenSceneGraph invoker - if (OPENSCENEGRAPH_FOUND AND OPENGL_FOUND) - set(USCXML_INVOKERS "scenegraph ${USCXML_INVOKERS}") - file(GLOB OPENSCENEGRAPH_INVOKER - graphics/openscenegraph/*.cpp - graphics/openscenegraph/*.h) - - if (BUILD_AS_PLUGINS) - source_group("" FILES ${OPENSCENEGRAPH_INVOKER}) - add_library( - invoker_openscenegraph SHARED - ${OPENSCENEGRAPH_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_openscenegraph - ${OPENSCENEGRAPH_LIBRARIES} - ${OPENGL_LIBRARIES} - uscxml) - set_target_properties(invoker_openscenegraph PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_openscenegraph PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_openscenegraph PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${OPENSCENEGRAPH_INVOKER}) - endif() - - set(USCXML_INVOKERS "osgvonvert ${USCXML_INVOKERS}") - file(GLOB OPENSCENEGRAPH_CONVERTER_INVOKER - graphics/openscenegraph/converter/*.cpp - graphics/openscenegraph/converter/*.h) - - if (BUILD_AS_PLUGINS) - source_group("" FILES ${OPENSCENEGRAPH_CONVERTER_INVOKER}) - add_library( - invoker_openscenegraph_convert SHARED - ${OPENSCENEGRAPH_CONVERTER_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_openscenegraph_convert - ${OPENSCENEGRAPH_LIBRARIES} - ${OPENGL_LIBRARIES} - uscxml) - set_target_properties(invoker_openscenegraph_convert PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_openscenegraph_convert PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_openscenegraph_convert PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${OPENSCENEGRAPH_CONVERTER_INVOKER}) - endif() - endif() - - - # OpenAL modality components - - if (OPENAL_FOUND AND (LIBSNDFILE_FOUND OR AUDIOTOOLBOX_FOUND)) - set(USCXML_INVOKERS "openal ${USCXML_INVOKERS}") - file(GLOB_RECURSE OPENAL_INVOKER - audio/OpenAL*.cpp - audio/OpenAL*.h) - if (LIBSNDFILE_FOUND) - file(GLOB_RECURSE LIBSNDFILE_WRAPPER - audio/LibSoundFile*.cpp - audio/LibSoundFile*.h) - LIST(APPEND OPENAL_INVOKER ${LIBSNDFILE_WRAPPER}) - elseif(AUDIOTOOLBOX_FOUND) - file(GLOB_RECURSE AUDIOTOOLBOX_WRAPPER - audio/AudioToolbox*.mm - audio/AudioToolbox*.h) - LIST(APPEND OPENAL_INVOKER ${AUDIOTOOLBOX_WRAPPER}) - endif() - # message("MILES_INVOKER ${MILES_INVOKER}") - - if (BUILD_AS_PLUGINS) - source_group("" FILES ${OPENAL_INVOKER}) - add_library( - invoker_openal SHARED - ${OPENAL_INVOKER} - "../Plugins.cpp") - if (LIBSNDFILE_FOUND) - target_link_libraries(invoker_openal - ${OPENAL_LIBRARY} - ${LIBSNDFILE_LIBRARY} - uscxml) - elseif(AUDIOTOOLBOX_FOUND) - target_link_libraries(invoker_openal - ${OPENAL_LIBRARY} - ${AUDIOTOOLBOX}/AudioToolbox - uscxml) - endif() - set_target_properties(invoker_openal PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_openal PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_openal PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${OPENAL_INVOKER}) - endif() - endif() - - - # MILES modality components - - if (MILES_FOUND) - set(USCXML_INVOKERS "miles ${USCXML_INVOKERS}") - file(GLOB_RECURSE MILES_INVOKER - miles/*.cpp - miles/*.h) - # message("MILES_INVOKER ${MILES_INVOKER}") - - if (BUILD_AS_PLUGINS) - source_group("" FILES ${MILES_INVOKER}) - add_library( - invoker_miles SHARED - ${MILES_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_miles - ${MILES_LIBRARIES} - ${JPEG_LIBRARIES} - uscxml) - if (ICONV_FOUND) - target_link_libraries(invoker_miles ${ICONV_LIBRARIES}) - endif() - if (OPENAL_FOUND) - target_link_libraries(invoker_miles ${OPENAL_LIBRARY}) - endif() - set_target_properties(invoker_miles PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_miles PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_miles PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${MILES_INVOKER}) - endif() - endif() - - - set(USCXML_INVOKERS "vxml ${USCXML_INVOKERS}") - file(GLOB_RECURSE VXML_INVOKER - vxml/*.cpp - vxml/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${VXML_INVOKER}) - add_library( - invoker_voicexml SHARED - ${VXML_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_voicexml uscxml) - set_target_properties(invoker_voicexml PROPERTIES FOLDER "Plugin Invoker") - set_target_properties(invoker_voicexml PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(invoker_voicexml PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${VXML_INVOKER}) - endif() - -endif() # BUILD_MINIMAL set(USCXML_INCLUDE_DIRS ${USCXML_INCLUDE_DIRS} PARENT_SCOPE) set(USCXML_FILES ${USCXML_FILES} PARENT_SCOPE) diff --git a/src/uscxml/plugins/invoker/audio/AudioToolbox.h b/src/uscxml/plugins/invoker/audio/AudioToolbox.h deleted file mode 100644 index 5834f34..0000000 --- a/src/uscxml/plugins/invoker/audio/AudioToolbox.h +++ /dev/null @@ -1,51 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef AUDIOTOOLBOX_H_GX4SW17C -#define AUDIOTOOLBOX_H_GX4SW17C - -#include "PCMConverter.h" -#include - -namespace uscxml { - -class AudioToolbox : public PCMConverter { -public: - AudioToolbox(const std::string filename); - virtual ~AudioToolbox(); - virtual void seek(unsigned int pos); - virtual int read(char* buffer, unsigned int size); - - virtual void setOutFormat(const PCMFormat& format); - virtual PCMFormat getInFormat(); - -protected: - ExtAudioFileRef _afId; - AudioStreamBasicDescription _outputFormat; - AudioStreamBasicDescription _inputFormat; - - ALenum formatToALEnum(AudioStreamBasicDescription); - bool alEnumToFormat(AudioStreamBasicDescription&, ALenum); -}; - -} - -#endif /* end of include guard: AUDIOTOOLBOX_H_GX4SW17C */ - - diff --git a/src/uscxml/plugins/invoker/audio/AudioToolbox.mm b/src/uscxml/plugins/invoker/audio/AudioToolbox.mm deleted file mode 100644 index ef99063..0000000 --- a/src/uscxml/plugins/invoker/audio/AudioToolbox.mm +++ /dev/null @@ -1,185 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "AudioToolbox.h" -#include - -#import -#import - -#ifdef __has_feature -# if __has_feature(objc_arc) -# define(HAS_AUTORELEASE_POOL) -# endif -#endif - -namespace uscxml { - -AudioToolbox::AudioToolbox(const std::string filename) { -#if HAS_AUTORELEASE_POOL - @autoreleasepool { -#else - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; -#endif - _afId = 0; - NSString* filePath = [NSString stringWithCString:filename.c_str() encoding:NSASCIIStringEncoding]; - NSURL* afUrl = [NSURL fileURLWithPath:filePath]; - - OSStatus result = noErr; - - result = ExtAudioFileOpenURL((CFURLRef)afUrl, &_afId); - - if (result != noErr) { - LOG(WARNING) << "Cannot open audio file " << filename; - return; - } - UInt32 thePropertySize = sizeof(_inputFormat); - result = ExtAudioFileGetProperty(_afId, kExtAudioFileProperty_FileDataFormat, &thePropertySize, &_inputFormat); - if (result != noErr) { - LOG(WARNING) << "Cannot determine input format of " << filename; - return; - } - - // output format is input format - memcpy(&_outputFormat, &_inputFormat, sizeof(_inputFormat)); - - // except for things that make no sense for open al - _outputFormat.mFormatID = kAudioFormatLinearPCM; - _outputFormat.mFormatFlags = kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked | kAudioFormatFlagIsSignedInteger; - - ALenum bestFormat = formatToALEnum(_outputFormat); - alEnumToFormat(_outputFormat, bestFormat); - - result = ExtAudioFileSetProperty(_afId, kExtAudioFileProperty_ClientDataFormat, sizeof(_outputFormat), &_outputFormat); - - if (result != noErr) { - LOG(WARNING) << "Cannot set audio format file " << filename; - return; - } - -#if HAS_AUTORELEASE_POOL - } -#else - [pool drain]; -#endif -} - -AudioToolbox::~AudioToolbox() { - if (_afId) - ExtAudioFileDispose(_afId); //close the file -} - -void AudioToolbox::seek(unsigned int pos) { - ExtAudioFileSeek(_afId, pos); -} - -int AudioToolbox::read(char* buffer, unsigned int size) { - UInt32 read = size / _outputFormat.mBytesPerFrame; - OSStatus result = noErr; - - SInt64 theFileLengthInFrames = 0; - UInt32 thePropertySize = sizeof(theFileLengthInFrames); - result = ExtAudioFileGetProperty(_afId, kExtAudioFileProperty_FileLengthFrames, &thePropertySize, &theFileLengthInFrames); - - read = (theFileLengthInFrames < read ? theFileLengthInFrames : read); - - AudioBufferList dataBuffer; - dataBuffer.mNumberBuffers = 1; - dataBuffer.mBuffers[0].mDataByteSize = size; - dataBuffer.mBuffers[0].mNumberChannels = _outputFormat.mChannelsPerFrame; - dataBuffer.mBuffers[0].mData = buffer; - - result = ExtAudioFileRead(_afId, &read, &dataBuffer); - if (result != noErr) { - LOG(WARNING) << "Cannot read data"; - return 0; - } - - return read * _outputFormat.mBytesPerFrame; -} - -ALenum AudioToolbox::formatToALEnum(AudioStreamBasicDescription asbd) { - if (asbd.mBitsPerChannel < 16) { - if (asbd.mChannelsPerFrame == 1) { - return AL_FORMAT_MONO8; - } else { - return AL_FORMAT_STEREO8; - } - } else { - if (asbd.mChannelsPerFrame == 1) { - return AL_FORMAT_MONO16; - } else { - return AL_FORMAT_STEREO16; - } - } -} - -bool AudioToolbox::alEnumToFormat(AudioStreamBasicDescription& asbd, ALenum format) { - switch (format) { - case AL_FORMAT_MONO8: - asbd.mBitsPerChannel = 8; - asbd.mBytesPerFrame = 1; - asbd.mBytesPerPacket = 1; - asbd.mChannelsPerFrame = 1; - break; - case AL_FORMAT_MONO16: - asbd.mBitsPerChannel = 16; - asbd.mBytesPerFrame = 2; - asbd.mBytesPerPacket = 2; - asbd.mChannelsPerFrame = 1; - break; - case AL_FORMAT_STEREO8: - asbd.mBitsPerChannel = 8; - asbd.mBytesPerFrame = 2; - asbd.mBytesPerPacket = 2; - asbd.mChannelsPerFrame = 2; - break; - case AL_FORMAT_STEREO16: - asbd.mBitsPerChannel = 16; - asbd.mBytesPerFrame = 4; - asbd.mBytesPerPacket = 4; - asbd.mChannelsPerFrame = 2; - break; - default: - break; - } - return true; -} - -void AudioToolbox::setOutFormat(const PCMFormat& format) { - - alEnumToFormat(_outputFormat, format.alFormat); - _outputFormat.mSampleRate = format.sampleRate; - - OSStatus result = ExtAudioFileSetProperty(_afId, kExtAudioFileProperty_ClientDataFormat, sizeof(_outputFormat), &_outputFormat); - if (result != noErr) { - LOG(WARNING) << "Cannot set audio format"; - return; - } - -} - -PCMFormat AudioToolbox::getInFormat() { - PCMFormat format; - format.sampleRate = _inputFormat.mSampleRate; - format.alFormat = formatToALEnum(_inputFormat); - return format; -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/audio/LibSoundFile.cpp b/src/uscxml/plugins/invoker/audio/LibSoundFile.cpp deleted file mode 100644 index b881e41..0000000 --- a/src/uscxml/plugins/invoker/audio/LibSoundFile.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "LibSoundFile.h" - -namespace uscxml { - -LibSoundFile::LibSoundFile(const std::string filename) : PCMConverter() { - _filename = filename; - _handle = SndfileHandle(_filename, SFM_READ, SF_FORMAT_PCM_16, 1, 44100); - _format.sampleRate = _handle.samplerate(); - _format.alFormat = AL_FORMAT_MONO16; - -} - -LibSoundFile::~LibSoundFile() { - -} - -void LibSoundFile::seek(unsigned int pos) { - _handle.seek(pos, 0); -} - -int LibSoundFile::read(char* buffer, unsigned int size) { - return _handle.readRaw(buffer, size); -} - -void LibSoundFile::setOutFormat(const PCMFormat& format) { - _format = format; - switch (_format.alFormat) { - case AL_FORMAT_MONO8: - _handle = SndfileHandle(_filename, SFM_READ, SF_FORMAT_PCM_S8, 1, _format.sampleRate); - break; - case AL_FORMAT_MONO16: - _handle = SndfileHandle(_filename, SFM_READ, SF_FORMAT_PCM_16, 1, _format.sampleRate); - break; - case AL_FORMAT_STEREO8: - _handle = SndfileHandle(_filename, SFM_READ, SF_FORMAT_PCM_S8, 2, _format.sampleRate); - break; - case AL_FORMAT_STEREO16: - _handle = SndfileHandle(_filename, SFM_READ, SF_FORMAT_PCM_16, 2, _format.sampleRate); - break; - - default: - break; - } -} - -PCMFormat LibSoundFile::getInFormat() { - return _format; -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/audio/LibSoundFile.h b/src/uscxml/plugins/invoker/audio/LibSoundFile.h deleted file mode 100644 index 0e0b304..0000000 --- a/src/uscxml/plugins/invoker/audio/LibSoundFile.h +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef LIBSOUNDFILE_H_Q97OEKGG -#define LIBSOUNDFILE_H_Q97OEKGG - -#include "PCMConverter.h" -#include - -namespace uscxml { - -class LibSoundFile : public PCMConverter { -public: - LibSoundFile(const std::string filename); - virtual ~LibSoundFile(); - void seek(unsigned int pos); - int read(char* buffer, unsigned int size); - - virtual void setOutFormat(const PCMFormat& format); - virtual PCMFormat getInFormat(); - -protected: - std::string _filename; - SndfileHandle _handle; - PCMFormat _format; -}; - -} - -#endif /* end of include guard: LIBSOUNDFILE_H_Q97OEKGG */ diff --git a/src/uscxml/plugins/invoker/audio/OpenALInvoker.cpp b/src/uscxml/plugins/invoker/audio/OpenALInvoker.cpp deleted file mode 100644 index e813f2f..0000000 --- a/src/uscxml/plugins/invoker/audio/OpenALInvoker.cpp +++ /dev/null @@ -1,421 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -// see http://stackoverflow.com/questions/6563810/m-pi-works-with-math-h-but-not-with-cmath-in-visual-studio -#define _USE_MATH_DEFINES -#include - -#include - -#include "OpenALInvoker.h" -#include -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new OpenALInvokerProvider() ); - return true; -} -#endif - -// see http://stackoverflow.com/questions/1904635/warning-c4003-and-errors-c2589-and-c2059-on-x-stdnumeric-limitsintmax -#undef max - -OpenALInvoker::OpenALInvoker() { - _isStarted = false; - _alContext = NULL; - _alDevice = NULL; - _thread = NULL; - _listenerPos[0] = _listenerPos[1] = _listenerPos[2] = 0; - _listenerVel[0] = _listenerVel[1] = _listenerVel[2] = 0; - _maxPos[0] = _maxPos[1] = _maxPos[2] = 1; - - _listenerOrient[0] = _listenerOrient[1] = _listenerOrient[3] = _listenerOrient[5] = 0; - _listenerOrient[2] = _listenerOrient[4] = 1.0; -} - -OpenALInvoker::~OpenALInvoker() { - if (_thread) { - _isStarted = false; - _sourcesAvailable.notify_all(); - _thread->join(); - delete(_thread); - } - if (_alContext) { -// alcCloseDevice(alcGetContextsDevice(_alContext)); -// alcDestroyContext(_alContext); - } -}; - -boost::shared_ptr OpenALInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new OpenALInvoker()); - invoker->_interpreter = interpreter; - return invoker; -} - -Data OpenALInvoker::getDataModelVariables() { - Data data; - return data; -} - -void OpenALInvoker::send(const SendRequest& req) { - tthread::lock_guard lock(_mutex); - - if (!_isStarted) - start(); - - if (iequals(req.name, "play")) { - if (req.params.find("src") == req.params.end()) { - LOG(ERROR) << "Sent event play with no src URL"; - } - - URL srcURL = req.params.find("src")->second.atom; - if (!srcURL.toAbsolute(_interpreter->getBaseURL(req.elem))) { - LOG(ERROR) << "src URL " << req.params.find("src")->second << " is relative with no base URI set for interpreter"; - return; - } - - _sources[req.sendid] = new OpenALSource(); - _sources[req.sendid]->loop = req.params.find("loop") != req.params.end() && iequals(req.params.find("loop")->second.atom, "true"); - _sources[req.sendid]->file = srcURL; -#ifdef LIBSNDFILE_FOUND - _sources[req.sendid]->transform = new LibSoundFile(srcURL.asLocalFile(".audio")); -#else -# ifdef AUDIOTOOLBOX_FOUND - _sources[req.sendid]->transform = new AudioToolbox(srcURL.asLocalFile(".audio")); -# endif -#endif - if (_sources[req.sendid]->transform == NULL) { - LOG(ERROR) << "No transcoder for input file known - install libsndfile or AudioToolbox"; - _sources.erase(req.sendid); - return; - } - - // force mono format to ensure actual spatial audio - PCMFormat format = _sources[req.sendid]->transform->getInFormat(); - format.alFormat = AL_FORMAT_MONO16; - _sources[req.sendid]->transform->setOutFormat(format); - - try { - _sources[req.sendid]->player = new OpenALPlayer(_alContext, NULL, format.alFormat, format.sampleRate); - } catch (std::exception ex) { - returnErrorExecution(ex.what()); - return; - } - - getPosFromParams(req.params, _sources[req.sendid]->pos); - - _sources[req.sendid]->pos[0] -= _listenerPos[0]; - _sources[req.sendid]->pos[1] -= _listenerPos[1]; - _sources[req.sendid]->pos[2] -= _listenerPos[2]; - try { - _sources[req.sendid]->player->setPosition(_sources[req.sendid]->pos); - - } catch (std::exception ex) { - returnErrorExecution(ex.what()); - } - - _sourcesAvailable.notify_all(); - } - - if (iequals(req.name, "move.source")) { - std::string sourceId; - if (req.params.find("source") == req.params.end()) { - LOG(WARNING) << "Cannot move source with no source given in parameters"; - return; - } - sourceId = req.params.find("source")->second.atom; - - if (_sources.find(sourceId) == _sources.end()) { - LOG(WARNING) << "Given source '" << sourceId << "' not active or not existing"; - return; - } - - getPosFromParams(req.params, _sources[sourceId]->pos); - try { - _sources[sourceId]->player->setPosition(_sources[sourceId]->pos); - } catch (std::exception ex) { - returnErrorExecution(ex.what()); - } - } - - if (iequals(req.name, "move.listener")) { - getPosFromParams(req.params, _listenerPos); - - try { - alcMakeContextCurrent(_alContext); - alListenerfv(AL_POSITION, _listenerPos); - OpenALPlayer::checkOpenALError(__LINE__); - } catch (std::exception ex) { - returnErrorExecution(ex.what()); - } - } - -} - -void OpenALInvoker::start() { - _isStarted = true; - _thread = new tthread::thread(&OpenALInvoker::fillBuffers, this); -} - -void OpenALInvoker::fillBuffers(void* userdata) { - OpenALInvoker* INST = (OpenALInvoker*)userdata; - while(INST->_isStarted) { - // do nothing until we have at least one source - int waitMs = std::numeric_limits::max(); - INST->_mutex.lock(); - while (INST->_sources.size() == 0 && INST->_isStarted) { - INST->_sourcesAvailable.wait(INST->_mutex); - } - - if (!INST->_isStarted) - return; - - // here we are with at least one source and a locked mutex - assert(INST->_sources.size() > 0); - - std::map::iterator srcIter = INST->_sources.begin(); - while(srcIter != INST->_sources.end()) { - OpenALSource* src = srcIter->second; - int wait = std::numeric_limits::max(); - - if (src->finished) { - // source has already finished playing, feed no more samples to it - try { - wait = src->player->isPlaying(); - if (wait == 0) { - // source stopped playing, delete it - INST->notifyOfEnd(src); - delete src; - INST->_sources.erase(srcIter++); - continue; - } else { - // source returned time when to repoll - assert(wait > 0); - } - } catch (std::exception ex) { - INST->returnErrorExecution(ex.what()); - delete src; - INST->_sources.erase(srcIter++); - continue; - } - } else { - // source still needs more samples or play existing buffer - if (src->written == src->read) { - // all read samples have been written, read some more - src->written = 0; - src->read = src->transform->read(src->buffer, ALPLAY_AUDIO_BUFFER_SIZE); - if (src->read < ALPLAY_AUDIO_BUFFER_SIZE) { - if (src->loop) { - INST->notifyOfLoop(src); - while (src->read < ALPLAY_AUDIO_BUFFER_SIZE) { - src->transform->seek(0); - src->read += src->transform->read(src->buffer + src->read, ALPLAY_AUDIO_BUFFER_SIZE - src->read); - } - } else { - src->finished = true; - memset(src->buffer + src->read, 0, ALPLAY_AUDIO_BUFFER_SIZE - src->read); - } - } - } - - // there are unwritten samples in the buffer - if (src->read != src->written) { - try { - int written = src->player->write(src->buffer, ALPLAY_AUDIO_BUFFER_SIZE, &wait); - if (written >=0 ) { - src->written += written; - } - } catch (std::exception ex) { - INST->returnErrorExecution(ex.what()); - src->finished = true; - } - } else { - assert(src->finished); - } - } - - waitMs = (wait < waitMs ? wait : waitMs); - srcIter++; - } - -// std::cout << "W" << waitMs << "."; - - INST->_mutex.unlock(); - if (waitMs < std::numeric_limits::max()) - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(waitMs)); - } -} - -void OpenALInvoker::cancel(const std::string sendId) { - tthread::lock_guard lock(_mutex); - -} - -void OpenALInvoker::invoke(const InvokeRequest& req) { - _alDevice = alcOpenDevice(NULL); - if (_alDevice == NULL) { - throw std::string("__FILE__ __LINE__ openal error opening device"); - } - - std::multimap::const_iterator paramIter = req.params.begin(); - while(paramIter != req.params.end()) { - if (iequals(paramIter->first, "maxX")) - _maxPos[0] = strTo(paramIter->second.atom); - if (iequals(paramIter->first, "maxY")) - _maxPos[1] = strTo(paramIter->second.atom); - if (iequals(paramIter->first, "maxZ")) - _maxPos[2] = strTo(paramIter->second.atom); - paramIter++; - } - - // create new context with device - _alContext = alcCreateContext (_alDevice, NULL); - if (_alContext == NULL) { - alcCloseDevice (_alDevice); - throw std::string("openal error create context"); - } - -// std::cout << boost::lexical_cast(_alContext); -// std::cout << boost::lexical_cast(_alDevice); - - alcMakeContextCurrent(_alContext); -// float listener[3] = {0,0,0}; -// alListenerfv(AL_POSITION, listener); - - alcMakeContextCurrent(_alContext); - alListenerfv(AL_POSITION, _listenerPos); - alListenerfv(AL_VELOCITY, _listenerVel); - alListenerfv(AL_ORIENTATION, _listenerOrient); - - alListenerf(AL_GAIN, 0.5); - - start(); -} - -void OpenALInvoker::notifyOfEnd(OpenALSource* src) { - Event ev; - ev.name = "audio.end"; - ev.data.compound["file"] = src->file; - returnEvent(ev); -} - -void OpenALInvoker::notifyOfLoop(OpenALSource* src) { - Event ev; - ev.name = "audio.loop"; - ev.data.compound["file"] = src->file; - returnEvent(ev); -} - -void OpenALInvoker::getPosFromParams(const std::multimap& params, float* position) { - // vector explicitly given - try { - if (params.find("x") != params.end()) - position[0] = boost::lexical_cast(params.find("x")->second); - if (params.find("y") != params.end()) - position[1] = boost::lexical_cast(params.find("y")->second); - if (params.find("z") != params.end()) - position[2] = boost::lexical_cast(params.find("z")->second); - } catch (boost::bad_lexical_cast& e) { - LOG(ERROR) << "Cannot interpret x, y or z as float value in params: " << e.what(); - } - - try { - // right is an alias for x - if (params.find("right") != params.end()) - position[0] = boost::lexical_cast(params.find("right")->second); - // height is an alias for y - if (params.find("height") != params.end()) - position[1] = boost::lexical_cast(params.find("height")->second); - // front is an alias for z - if (params.find("front") != params.end()) - position[2] = boost::lexical_cast(params.find("front")->second); - } catch (boost::bad_lexical_cast& e) { - LOG(ERROR) << "Cannot interpret right, height or front as float value in params: " << e.what(); - } - - // do we have a position on a circle? - try { - if (params.find("circle") != params.end()) { - float rad = posToRadian(params.find("circle")->second); - position[0] = cosf(rad); - position[2] = -1 * sinf(rad); // z axis increases to front -// position[0] *= 150; -// position[2] *= 150; - - } - } catch (boost::bad_lexical_cast& e) { - LOG(ERROR) << "Cannot interpret circle as float value in params: " << e.what(); - } - - position[0] = position[0] / _maxPos[0]; - position[1] = position[1] / _maxPos[1]; - position[2] = position[2] / _maxPos[2]; -// std::cout << position[0] << ":" << position[1] << ":" << position[2] << std::endl; - -} - -float OpenALInvoker::posToRadian(const std::string& pos) { - - std::string trimmedPos = boost::trim_copy(pos); - float rad = 0; - - if (trimmedPos.size() > 3 && iequals("deg", trimmedPos.substr(trimmedPos.length() - 3, 3))) { - rad = boost::lexical_cast(trimmedPos.substr(0, trimmedPos.size() - 3)); - rad = fmodf(rad, 360); // into range [0-360] - rad /= 180; // into range [0-2] - rad *= M_PI; // into range [0-2PI] - rad -= M_PI_2; // 0 to top; - rad *= -1; // make clockwise - rad += 2 * M_PI; // make positive - } else if (trimmedPos.size() > 3 && iequals("rad", trimmedPos.substr(trimmedPos.length() - 3, 3))) { - rad = boost::lexical_cast(trimmedPos.substr(0, trimmedPos.size() - 3)); - rad = fmodf(rad, M_PI * 2); // into range [0-2*PI] - } else { - LOG(ERROR) << "Cannot make sense of position value " << trimmedPos << ": does not end in 'deg', 'rad'"; - } - return rad; -} - -OpenALSource::OpenALSource() { - pos[0] = pos[1] = pos[2] = 0; - player = NULL; - loop = false; - finished = false; - transform = NULL; - read = written = 0; - memset(buffer, 0, ALPLAY_AUDIO_BUFFER_SIZE); -} - -OpenALSource::~OpenALSource() { - if (player) - delete player; - if (transform) - delete transform; -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/audio/OpenALInvoker.h b/src/uscxml/plugins/invoker/audio/OpenALInvoker.h deleted file mode 100644 index 98524ed..0000000 --- a/src/uscxml/plugins/invoker/audio/OpenALInvoker.h +++ /dev/null @@ -1,111 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef OPENALINVOKER_H_W09J90F0 -#define OPENALINVOKER_H_W09J90F0 - -#include "uscxml/config.h" -#include -#include "OpenALPlayer.h" - -#include "PCMConverter.h" -#ifdef LIBSNDFILE_FOUND -# include "LibSoundFile.h" -#else -# ifdef AUDIOTOOLBOX_FOUND -# include "AudioToolbox.h" -# endif -#endif - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class OpenALSource { -public: - OpenALSource(); - ~OpenALSource(); - - OpenALPlayer* player; - char buffer[ALPLAY_AUDIO_BUFFER_SIZE]; - bool loop; - bool finished; - int read; - int written; - ALfloat pos[3]; - URL file; - PCMConverter* transform; -}; - -class OpenALInvoker : public InvokerImpl { -public: - OpenALInvoker(); - virtual ~OpenALInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("openal"); - names.push_back("spatial-audio"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#openal"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - -protected: - std::map _sources; - ALCcontext* _alContext; - ALCdevice* _alDevice; - - tthread::recursive_mutex _mutex; - tthread::thread* _thread; - tthread::condition_variable _sourcesAvailable; - - bool _isStarted; - bool _isRunning; - ALfloat _listenerPos[3]; - ALfloat _listenerVel[3]; - ALfloat _listenerOrient[6]; - float _maxPos[3]; - - static void fillBuffers(void* userdata); - void start(); - - void notifyOfEnd(OpenALSource*); - void notifyOfLoop(OpenALSource*); - - float posToRadian(const std::string& pos); - void getPosFromParams(const std::multimap& params, float* position); - -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(OpenALInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: OPENALINVOKER_H_W09J90F0 */ diff --git a/src/uscxml/plugins/invoker/audio/OpenALPlayer.cpp b/src/uscxml/plugins/invoker/audio/OpenALPlayer.cpp deleted file mode 100644 index 3aaeddf..0000000 --- a/src/uscxml/plugins/invoker/audio/OpenALPlayer.cpp +++ /dev/null @@ -1,541 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "OpenALPlayer.h" -#include -#include - -tthread::recursive_mutex OpenALPlayer::_alMutex; - -/** -* Create a new OpenAL stream source -*/ -OpenALPlayer::OpenALPlayer(ALCcontext* context, OpenALPlayerCallback* audioCallback, ALenum format, ALsizei freq) { - - _isInitialized = false; - _audioCallback = audioCallback; - _freq = freq; - _format = format; - _bufferSize = 0; - _nrBuffers = 0; - _thread = NULL; - _alId = 0; - - _position[0] = _position[1] = _position[2] = 0; - _velocity[0] = _velocity[1] = _velocity[2] = 0; - _direction[0] = _direction[1] = _direction[2] = 0; - - tthread::lock_guard lock(_alMutex); - if (context == NULL) { - // this is in essence alutInit() from freealut. - - // use the current context if there is one - _context = alcGetCurrentContext(); - - if (_context == NULL) { -// std::cout << "\tnew context" << std::endl; - // create a new context if none was given and no is current - - // get default device - ALCdevice* device = alcOpenDevice(NULL); - if (device == NULL) { - throw std::runtime_error("__FILE__ __LINE__ openal error opening device"); - } - - // create new context with device - _context = alcCreateContext (device, NULL); - if (_context == NULL) { - alcCloseDevice (device); - throw std::runtime_error("openal error create context"); - } - - // make context current - if (!alcMakeContextCurrent (_context)) { - alcDestroyContext (_context); - alcCloseDevice (device); - throw std::runtime_error("openal error make context current"); - } - } else { -// std::cout << "\texisting context" << std::endl; - } - } else { -// std::cout << "\tgiven context" << std::endl; - _context = context; - } -} - -OpenALPlayer::~OpenALPlayer() { - tthread::lock_guard lock(_alMutex); - if (isPlaying()) { - alSourceStop(_alId); - } - if (_thread) { - stop(); - _thread->join(); - delete(_thread); - } - - if (_isInitialized) { - alDeleteSources(1, &_alId); - if (alIsSource(_alId)) { - throw std::runtime_error("openal source id still valid"); - } - for (size_t i = 0; i < _nrBuffers; i++) { - assert(alIsBuffer(_bufferIds[i])); - free(_buffers[i]); - } - alDeleteBuffers(_nrBuffers, _bufferIds); - for (size_t i = 0; i < _nrBuffers; i++) { -// assert(!alIsBuffer(_bufferIds[i])); - } - free(_buffers); - free(_bufferIds); - } - // clear errors and begone - alGetError(); - -} - -/** -* Allocate; data and set defaults -*/ -void OpenALPlayer::init() { - _userData = NULL; - _pitch = 0; - _gain = 0; - _referenceDistance = 1.0; - _isLooping = false; - - // no one set a buffer size yet - if (_bufferSize <= 0) - _bufferSize = ALPLAY_AUDIO_BUFFER_SIZE; - - // no one set the number of buffers yet - if (_nrBuffers <= 0) - _nrBuffers = ALPLAY_NR_AUDIO_BUFFERS; - - _isInitialized = true; - - _buffers = (char**)malloc(_nrBuffers * sizeof(char*)); - _bufferIds = (ALuint*)malloc(_nrBuffers * sizeof(ALuint)); - for (size_t i = 0; i < _nrBuffers; i++) { - _buffers[i] = 0; //(char*)malloc(_bufferSize); - } - - // there are other formats as well and this will have to be extended - int bytesPerSample = 2; - switch(_format) { - case AL_FORMAT_MONO8: - case AL_FORMAT_STEREO8: - bytesPerSample = 1; - break; - - case AL_FORMAT_MONO16: - case AL_FORMAT_STEREO16: - bytesPerSample = 2; - break; - } - - // how many ms audio is in one buffer? - _msForBuffer = (int)(((float)_bufferSize / (float)bytesPerSample) / ((float)_freq / 1000.0f)); - _initialSleep = (_msForBuffer - (int)(0.6 * _msForBuffer)) * _nrBuffers; - _bufferSleep = _msForBuffer - (int)(0.4 * _msForBuffer); - _repollSleep = _msForBuffer - (int)(0.7 * _msForBuffer); - -// std::cout << _msForBuffer << "ms in one buffer" << std::endl; - - // get available buffer ids - tthread::lock_guard lock(_alMutex); - - if (!alcMakeContextCurrent (_context)) { - throw std::runtime_error("openal error make context current"); - } - - alGenBuffers(_nrBuffers, _bufferIds); - checkOpenALError(__LINE__); - - // get new source id from openAL - alGenSources(1, &_alId); - - checkOpenALError(__LINE__); - if (!alIsSource(_alId)) { - throw std::runtime_error("openal source id not valid"); - } - - // set our position and various flags to meaningful defaults - alSourcei (_alId, AL_SOURCE_RELATIVE, AL_TRUE); - checkOpenALError(__LINE__); - alSourcei(_alId, AL_LOOPING, AL_FALSE); - checkOpenALError(__LINE__); - alSourcefv(_alId, AL_POSITION, _position); - checkOpenALError(__LINE__); -// alSourcef(_alId,AL_REFERENCE_DISTANCE, 5.0f); -// checkOpenALError(__LINE__); - alDistanceModel(AL_LINEAR_DISTANCE); - checkOpenALError(__LINE__); - alSourcefv(_alId, AL_VELOCITY, _velocity); - checkOpenALError(__LINE__); - alSourcefv(_alId, AL_DIRECTION, _direction); - checkOpenALError(__LINE__); -// alSourcef (_alId, AL_ROLLOFF_FACTOR, 1.0); -// checkOpenALError(__LINE__); -// alSourcef(_alId,AL_REFERENCE_DISTANCE, 5.0f); -// checkOpenALError(__LINE__); -// float listener[] = { 0.0, 0.0, 0.0 }; -// alListenerfv(AL_POSITION, listener); -// checkOpenALError(__LINE__); -} - -/** -* Start the sound source. -* -* This will trigger continuous calls top the audio callback. -*/ -void OpenALPlayer::start() { - if (!_isInitialized) - init(); - - if (_audioCallback == NULL) - throw std::runtime_error("cannot start without an audio callback"); - - _isStarted = true; - - // prime the buffers with some initial data and register for buffer ids - tthread::lock_guard lock(_alMutex); - for (ALuint i = 0; i < (unsigned int)_nrBuffers; i++) { - _buffers[i] = (char*)malloc(_bufferSize); - _audioCallback->getSamples(_buffers[i], _bufferSize, this); - alBufferData(_bufferIds[i], _format, _buffers[i], _bufferSize, _freq); - checkOpenALError(__LINE__); - } - // enqueue all buffers - alSourceQueueBuffers(_alId, _nrBuffers, _bufferIds); - checkOpenALError(__LINE__); - - // start thread - if (_audioCallback != NULL) { - _thread = new tthread::thread(&OpenALPlayer::updateBuffersWrapper, this); - } - - // tell openAL to start rendering the buffers - alSourcePlay(_alId); - checkOpenALError(__LINE__); -} - -// find bufferId in _bufferIds to get bufferIndex into _buffers - messy -int OpenALPlayer::bufferIndex(int bufferId) { - int bufferIndex = 0; - for (; bufferIndex < _nrBuffers; bufferIndex++) { - if (_bufferIds[bufferIndex] == (unsigned int)bufferId) - break; - } - if (bufferIndex >= _nrBuffers) - throw std::runtime_error("could not find dequeued bufferId in ids"); - return bufferIndex; -} - -/** -* Write a buffer (blocking). -* -* This allows for a pushing model, whereas the callback allows for a polling model. -*/ -int OpenALPlayer::write(char* buffer, int size, int* repollAt, bool blocking) { - tthread::lock_guard lock(_alMutex); - - if (!_isInitialized) - init(); - - if (_audioCallback != NULL) { - throw std::runtime_error("you cannot use the write interface with an audio callback"); - } - - if (size != _bufferSize) { - throw std::runtime_error("buffersize does not match"); - } - - if (!alcMakeContextCurrent (_context)) { - throw std::runtime_error("openal error make context current"); - } - - // try to enqueue the given buffer data - for (;;) { - // do we have an empty buffer in the OpenAL queue? - int processed; - alGetSourcei(_alId, AL_BUFFERS_PROCESSED, &processed); - checkOpenALError(__LINE__); - -// if (!isPlaying()) -// std::cout << "-"; - - if (processed > 0) { -// std::cout << "P" << processed; - ALuint bufferId = 0; - alSourceUnqueueBuffers(_alId, 1, &bufferId); - checkOpenALError(__LINE__); - - int bufferIdx = bufferIndex(bufferId); - - // fill the buffer with the given data - memcpy(_buffers[bufferIdx], buffer, _bufferSize); - alBufferData(bufferId, _format, _buffers[bufferIdx], _bufferSize, _freq); - checkOpenALError(__LINE__); - - // enqueue - alSourceQueueBuffers(_alId, 1, &bufferId); - checkOpenALError(__LINE__); - - // some buffers were processed - if (repollAt) - *repollAt = _repollSleep; - break; - - } else { - // no buffer processed - is there an uninitialized buffer left? - int nextBuffer = 0; - for(; nextBuffer < _nrBuffers; nextBuffer++) { - if (_buffers[nextBuffer] == 0) { - break; - } - } - if (nextBuffer < _nrBuffers) { -// std::cout << "N"; - _buffers[nextBuffer] = (char*)malloc(_bufferSize); - memcpy(_buffers[nextBuffer], buffer, _bufferSize); - - alBufferData(_bufferIds[nextBuffer], _format, _buffers[nextBuffer], _bufferSize, _freq); - checkOpenALError(__LINE__); - - alSourceQueueBuffers(_alId, 1, &_bufferIds[nextBuffer]); - checkOpenALError(__LINE__); - // there was a free buffer, repoll immediately to try to write more - if (repollAt) - *repollAt = 0; - - break; - } else { -// std::cout << "X"; - // no processed, no new buffer, wait until we processed one - if (blocking) { - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(_repollSleep)); - } else { - if (repollAt) - *repollAt = _repollSleep; - return -1; - } - } - } - } - - // we have at least one buffer queued, start playing - if (!_isStarted || !isPlaying()) { - alSourcePlay(_alId); - checkOpenALError(__LINE__); - _isStarted = true; - } - - return size; -} - - -/** -* Dequeue, refill and re-enqueue buffers. -*/ -void OpenALPlayer::updateBuffers() { - int processed; -// int queued; - -// std::cout << "Initial sleep: " << initialSleep << "ms" << std::endl; -// std::cout << "Buffer sleep: " << bufferSleep << "ms" << std::endl; -// std::cout << "Repoll sleep: " << repollSleep << "ms" << std::endl; - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(_bufferSleep * _initialSleep)); - - - while(_isStarted) { - - // how many buffers have been rendered already? - tthread::lock_guard lock(_alMutex); - alGetSourcei(_alId, AL_BUFFERS_PROCESSED, &processed); - checkOpenALError(__LINE__); - //std::cout << processed << std::flush; - - if (processed == 0) { - // avoid busy wait by sleeping - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(_bufferSleep * _initialSleep)); - } else { - // dequeue buffers and get ids - // see http://stackoverflow.com/questions/1900665/c-compiler-differences-vs2008-and-g - ALuint bufferIds[ALPLAY_NR_AUDIO_BUFFERS]; - alSourceUnqueueBuffers(_alId, processed, bufferIds); - checkOpenALError(__LINE__); - - for (size_t id = 0; id < processed; id++) { - int bufferIdx = bufferIndex(bufferIds[id]); - - // refill the buffer with data from the callback - _audioCallback->getSamples(_buffers[bufferIdx], _bufferSize, this); - alBufferData(bufferIds[id], _format, _buffers[bufferIdx], _bufferSize, _freq); - checkOpenALError(__LINE__); - - } - // re-enqueue - alSourceQueueBuffers(_alId, processed, bufferIds); - checkOpenALError(__LINE__); - - // restart if we are not running anymore - if (!isPlaying()) { - alSourcePlay(_alId); - checkOpenALError(__LINE__); - } - - // sleep a bit less than the duration of one buffer - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(_bufferSleep * processed)); - } - } -} - -/** -* TODO -*/ -void OpenALPlayer::stop() { - _isStarted = false; - _thread->join(); -} - -void OpenALPlayer::checkOpenALError(int line) { - int error = alGetError(); - if(error != AL_NO_ERROR) { - std::stringstream out; - out << "OpenALError:" << line << ":"; - - switch (error) { - case AL_INVALID_NAME: - out << "OpenAL invalid name."; - break; - case AL_INVALID_ENUM: - out << "OpenAL invalid enum."; - break; - case AL_INVALID_VALUE: - out << "OpenAL invalid value."; - break; - case AL_INVALID_OPERATION: - out << "OpenAL invalid operation."; - break; - case AL_OUT_OF_MEMORY: - out << "OpenAL out of memory."; - break; - - default: - out << "OpenAL unknown error."; - break; - } - throw std::runtime_error(out.str()); - } -} - -unsigned int OpenALPlayer::isPlaying() { - ALint val; - alGetSourcei(_alId, AL_SOURCE_STATE, &val); - if(val != AL_PLAYING) - return 0; - return _repollSleep; -} - -void OpenALPlayer::updateBuffersWrapper(void *obj) { - try { - reinterpret_cast(obj)->updateBuffers(); - } catch(std::runtime_error& error) { -// std::cout << "Terminating Thread: " << error << std::endl; - } catch(...) { -// std::cout << "Terminating Thread! " << std::endl; - } -} - -void OpenALPlayer::setNrBuffers(int nrBuffers) { - if (_nrBuffers > 0) - throw std::runtime_error("cannot modify number of buffers"); - _nrBuffers = nrBuffers; -} - -int OpenALPlayer::getNrBuffers() { - return _nrBuffers; -} - -/** -* Set position of sound source in coordinate system -*/ -void OpenALPlayer::setPosition(ALfloat position[]) { - memcpy(&_position, position, 3 * sizeof(ALfloat)); -// std::cout << _position[0] << ", " << _position[1] << ", " << _position[2] << std::endl; - if (_isInitialized) - alSourcefv(_alId, AL_POSITION, _position); -} - -ALfloat* OpenALPlayer::getPosition() { - return _position; -} - -/** -* Set velocity of sound source in coordinate system -*/ -void OpenALPlayer::setVelocity(ALfloat velocity[]) { - memcpy(&_velocity, velocity, 3 * sizeof(ALfloat)); - if (_isInitialized) - alSourcefv(_alId, AL_VELOCITY, _velocity); -} - -ALfloat* OpenALPlayer::getVelocity() { - return _velocity; -} - -/** -* Set direction of sound source in coordinate system -*/ -void OpenALPlayer::setDirection(ALfloat direction[]) { - memcpy(&_direction, direction, 3 * sizeof(ALfloat)); - if (_isInitialized) - alSourcefv(_alId, AL_DIRECTION, _direction); -} - -ALfloat* OpenALPlayer::getDirection() { - return _direction; -} - -void OpenALPlayer::setBufferSize(int bufferSize) { - if (_bufferSize > 0) - throw std::runtime_error("cannot modify buffersize"); - _bufferSize = bufferSize; -} - -int OpenALPlayer::getBufferSize() { - return _bufferSize; -} - -OpenALPlayerCallback* OpenALPlayer::getCallback() { - return _audioCallback; -} -void OpenALPlayer::setCallback(OpenALPlayerCallback* callback) { - _audioCallback = callback; -} - -void* OpenALPlayer::getUserData() { - return _userData; -} -void OpenALPlayer::setUserData(void* userData) { - _userData = userData; -} diff --git a/src/uscxml/plugins/invoker/audio/OpenALPlayer.h b/src/uscxml/plugins/invoker/audio/OpenALPlayer.h deleted file mode 100644 index db883a0..0000000 --- a/src/uscxml/plugins/invoker/audio/OpenALPlayer.h +++ /dev/null @@ -1,125 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef OPENALPLAYER_H_3PORVJDU -#define OPENALPLAYER_H_3PORVJDU - -#include -#include -#include -#include -#include - -#include -#include - -// sometimes the stream drops if this is less than 5000 bytes -#define ALPLAY_NR_AUDIO_BUFFERS 3 -#define ALPLAY_AUDIO_BUFFER_SIZE 2048 -//#define ALPLAYER_FORMAT_MONO16 0x1101 - -class OpenALPlayer; - -class OpenALPlayerCallback { -public: - virtual ~OpenALPlayerCallback() {} - /* - * Returning an OpenALPlayerCallback is a hack to be able to provide a typemap for SWIG. - * We cannot use SWIG directors with byte arrays otherwise. Posted to swig-ML already. - */ - virtual OpenALPlayerCallback* getSamples(char* buffer, int size, OpenALPlayer* player) = 0; -}; - -class OpenALPlayer { -private: - ALCcontext* _context; - - ALuint _alId; - ALfloat _position[3]; - ALfloat _velocity[3]; - ALfloat _direction[3]; - ALfloat _pitch; - ALfloat _gain; - ALfloat _referenceDistance; - ALboolean _isLooping; - - // OpenAL is not really thread safe - static tthread::recursive_mutex _alMutex; - - ALenum _format; - ALsizei _freq; - int _msForBuffer; - int _initialSleep; - int _bufferSleep; - int _repollSleep; - - int _bufferSize; - int _nrBuffers; - ALuint* _bufferIds; - char** _buffers; - OpenALPlayerCallback* _audioCallback; - void* _userData; - - tthread::thread* _thread; - bool _isStarted; - bool _isInitialized; - - void updateBuffers(); - void init(); - - // static wrapper as an entry point for pthreads - static void updateBuffersWrapper(void *obj); - - // get the index in _buffers for a buffer ID - int inline bufferIndex(int bufferId); - -public: - OpenALPlayer(ALCcontext*, OpenALPlayerCallback*, ALenum, ALsizei); - virtual ~OpenALPlayer(); - - unsigned int isPlaying(); - static void checkOpenALError(int line); - - ALfloat* getPosition(); - void setPosition(ALfloat[3]); - ALfloat* getVelocity(); - void setVelocity(ALfloat[3]); - ALfloat* getDirection(); - void setDirection(ALfloat[3]); - - void setBufferSize(int bufferSize); - int getBufferSize(); - void setNrBuffers(int nrBuffers); - int getNrBuffers(); - - // callback interface for pull - OpenALPlayerCallback* getCallback(); - void setCallback(OpenALPlayerCallback* callback); - - // stream interface for push - int write(char* buffer, int size, int* repollAt, bool blocking = false); - - void* getUserData(); - void setUserData(void* userData); - - void start(); - void stop(); -}; - -#endif /* end of include guard: OPENALPLAYER_H_3PORVJDU */ diff --git a/src/uscxml/plugins/invoker/audio/PCMConverter.h b/src/uscxml/plugins/invoker/audio/PCMConverter.h deleted file mode 100644 index 1984600..0000000 --- a/src/uscxml/plugins/invoker/audio/PCMConverter.h +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef PCMCONVERTER_H_97Z8U7PA -#define PCMCONVERTER_H_97Z8U7PA - -#include -#include -#include - -namespace uscxml { - -struct PCMFormat { - ALenum alFormat; - unsigned int sampleRate; -}; - -class PCMConverter { -public: - PCMConverter(const std::string filename) {} - virtual ~PCMConverter() {} - virtual void seek(unsigned int pos) = 0; - virtual int read(char* buffer, unsigned int size) = 0; - - virtual void setOutFormat(const PCMFormat& format) = 0; - virtual PCMFormat getInFormat() = 0; -protected: - PCMConverter() {} -}; - -} - -#endif /* end of include guard: PCMCONVERTER_H_97Z8U7PA */ diff --git a/src/uscxml/plugins/invoker/calendar/CalendarInvoker.cpp b/src/uscxml/plugins/invoker/calendar/CalendarInvoker.cpp deleted file mode 100644 index 8a4ea3d..0000000 --- a/src/uscxml/plugins/invoker/calendar/CalendarInvoker.cpp +++ /dev/null @@ -1,651 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include - -#include "CalendarInvoker.h" -#include "uscxml/concurrency/DelayedEventQueue.h" - -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new CalendarInvokerProvider() ); - return true; -} -#endif - -CalendarInvoker::CalendarInvoker() { - _icalSet = NULL; - _icalComp = NULL; -} - -CalendarInvoker::~CalendarInvoker() { - tthread::lock_guard lock(_mutex); - std::set::iterator _eventIdIter = _eventIds.begin(); - while(_eventIdIter != _eventIds.end()) { - _interpreter->getDelayQueue()->cancelEvent(*_eventIdIter); - _eventIds.erase(_eventIdIter++); - - } - - std::map::iterator eventIter = _events.begin(); - while(eventIter != _events.end()) { - delete eventIter->second; - eventIter++; - } - - if (_icalComp) - icalcomponent_free(_icalComp); -}; - -boost::shared_ptr CalendarInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new CalendarInvoker()); - invoker->_interpreter = interpreter; - - icalerror_set_error_state(ICAL_PARSE_ERROR, ICAL_ERROR_NONFATAL); - -// invoker->_calFile = URL::tmpFile(); -// invoker->_icalSet = icalfileset_new(invoker->_calFile.c_str()); - -// if (!invoker->_icalSet) { -// LOG(WARNING) << "Could not create new ical fileset: " << icalerror_perror(); -// } - - return invoker; -} - -Data CalendarInvoker::getDataModelVariables() { - Data data; - return data; -} - -void CalendarInvoker::send(const SendRequest& req) { - tthread::lock_guard lock(_mutex); -} - -void CalendarInvoker::cancel(const std::string sendId) { - tthread::lock_guard lock(_mutex); - std::set::iterator _eventIdIter = _eventIds.begin(); - while(_eventIdIter != _eventIds.end()) { - _interpreter->getDelayQueue()->cancelEvent(*_eventIdIter); - _eventIds.erase(_eventIdIter++); - } -} - -void CalendarInvoker::invoke(const InvokeRequest& req) { - tthread::lock_guard lock(_mutex); - - _icalComp = addIcal(req.content); -// dumpComponent(_icalComp); - setupEvents(_icalComp); - -} - -icalcomponent* CalendarInvoker::addIcal(const std::string& icalString) { - - icalcomponent* root = icalparser_parse_string(icalString.c_str()); - if (!root) { - LOG(WARNING) << "Could not parse ical data: " << icalerror_perror(); - return NULL; - } -// icalerrorenum err; -// err = icalset_add_component(_icalSet, root); -// icalfileset_commit(_icalSet); - - return root; -} - -void CalendarInvoker::setupEvents(icalcomponent* comp) { -// dumpComponent(comp); - - switch (icalcomponent_isa(comp)) { - case ICAL_VCALENDAR_COMPONENT: - case ICAL_XROOT_COMPONENT: - break; - case ICAL_VALARM_COMPONENT: { - break; - } - case ICAL_VEVENT_COMPONENT: { - // event to map - CalendarEvent* event = new CalendarEvent(comp); - _events[toStr((uintptr_t)event)] = event; - queueEvent(event); - break; - } - default: -// dumpComponent(comp); - break; - } - - icalcomponent* child = icalcomponent_get_first_component(comp, ICAL_ANY_COMPONENT); - while(child) { - setupEvents(child); - child = icalcomponent_get_next_component(comp, ICAL_ANY_COMPONENT); - } - -} - -void CalendarInvoker::queueEvent(CalendarEvent* event) { - if (_events.find(toStr((uintptr_t)event)) == _events.end()) { - _events[toStr((uintptr_t)event)] = event; - } - time_t now = time(NULL); - struct icaltime_span span; - - if (event->_nextSpan.start > 0) { - span = event->getNextDuration(event->_nextSpan.start + 1); - } else { - span = event->getNextDuration(now); - } - -#if 0 - if (span.end > 0) { - std::cout << "\t\t" << ctime(&span.start); - std::cout << "\t\t" << ctime(&span.end); - span = event->getNextDuration(span.end); - } -#endif - - if (span.start <= 0 || span.end <= 0) { - event->_nextSpan.start = 0; - event->_nextSpan.end = 0; - return; - } - - int beginSecs = span.start - now; - int endSecs = span.end - now; - - if (beginSecs > endSecs) { - LOG(WARNING) << "Event ends before it starts"; - return; - } - - event->_nextSpan = span; - - std::string beginEventId = event->getId() + "." + toStr(span.start) + ".started"; - std::string endEventId = event->getId() + "." + toStr(span.end) + ".ended"; - -#if 0 - beginSecs = 1; - endSecs = 2; -#endif - if (beginSecs > 0) { - _interpreter->getDelayQueue()->addEvent(beginEventId, CalendarInvoker::raiseEvent, beginSecs * 1000, this); - _eventIds.insert(beginEventId); - } else { - raiseEvent(this, beginEventId); - } - _interpreter->getDelayQueue()->addEvent(endEventId, CalendarInvoker::raiseEvent, endSecs * 1000, this); - _eventIds.insert(endEventId); - -} - -void CalendarInvoker::raiseEvent(void* userdata, const std::string eventId) { - CalendarInvoker* INSTANCE = (CalendarInvoker*)userdata; - tthread::lock_guard lock(INSTANCE->_mutex); - - std::string address = eventId.substr(0, eventId.find_first_of(".")); - - if (INSTANCE->_events.find(address) == INSTANCE->_events.end()) { - LOG(WARNING) << "No such event: " << eventId; - return; - } - - if(INSTANCE->_eventIds.find(eventId) != INSTANCE->_eventIds.end()) { - INSTANCE->_eventIds.erase(eventId); - } - - CalendarEvent* calEvent = INSTANCE->_events[address]; - Event event; - - event.data = *calEvent; - if (boost::ends_with(eventId, ".started")) { - event.name = "event.started." + calEvent->getId(); - assert(!calEvent->_active); - calEvent->_active = true; - } else { - event.name = "event.ended." + calEvent->getId(); - assert(calEvent->_active); - calEvent->_active = false; - } - INSTANCE->returnEvent(event); - - // event ended, reschedule next event - if (boost::ends_with(eventId, ".ended")) - INSTANCE->queueEvent(calEvent); -} - -/** - * Get the next duration for this event starting no earlier - * than the given time. - */ -icaltime_span CalendarEvent::getNextDuration(time_t time) { - if (!_icalComp) - return icaltime_span_new(icaltime_null_time(), icaltime_null_time(), 0); - - // see icalcomponent_foreach_recurrence - icalproperty *rrule; - - icaltimetype calTime = icaltime_from_timet_with_zone(time, 0, 0); - - // actual occurence, without reocurrence - if (!icalproperty_recurrence_is_excluded(_icalComp, &_dtstart, &_dtend)) { - if (icaltime_compare(_dtstart, calTime) >= 0) { - // start is still in the future - return icaltime_span_new(_dtstart, _dtend, 0); - } - } - - icaltime_span recDur = icaltime_span_new(icaltime_null_time(), icaltime_null_time(), 0); - - // iterate all rrules - for (rrule = icalcomponent_get_first_property(_icalComp, ICAL_RRULE_PROPERTY); - rrule != NULL; - rrule = icalcomponent_get_next_property(_icalComp, ICAL_RRULE_PROPERTY)) { - - struct icalrecurrencetype recurType = icalproperty_get_rrule(rrule); - icalrecur_iterator *ritr; - struct icaltimetype rtime; - - // do we have an old iterator that has not yet passed time? - if (_recIters.find(rrule) != _recIters.end()) { - if (_recIters[rrule].second > time) { - icalrecur_iterator_free(_recIters[rrule].first); - _recIters[rrule].first = icalrecur_iterator_new(recurType, _dtstart); - - // skip initial non-reoccurence - if(_recIters[rrule].first) - rtime = icalrecur_iterator_next(_recIters[rrule].first); - - } - ritr = _recIters[rrule].first; - } else { - // create a new iterator for this rrule - _recIters[rrule] = std::make_pair(icalrecur_iterator_new(recurType, _dtstart), 0); - ritr = _recIters[rrule].first; - } - -// std::cout << icalrecurrencetype_as_string(&recurType) << std::endl; - - while (ritr) { - rtime = icalrecur_iterator_next(ritr); - -#if 0 - time_t tt = icaltime_as_timet(rtime); - std::cout << "\t\t" << ctime(&tt); -#endif - - if (icaltime_is_null_time(rtime)) { - // remove iterator - icalrecur_iterator_free(_recIters[rrule].first); - _recIters.erase(rrule); - break; // for next rule - } - _recIters[rrule].second = icaltime_as_timet(rtime); - - if (icaltime_compare(rtime, calTime) < 0) - continue; // until we are after given time - - if (icalproperty_recurrence_is_excluded(_icalComp, &_dtstart, &rtime)) - continue; - - icaltime_span thisDur = icaltime_span_new(rtime, rtime, 1); - thisDur.end += _dtduration; - - if (recDur.start == 0 || thisDur.start < recDur.start) { - // update soonest reoccurence with the one from this rule - recDur = thisDur; - } - break; // we are after the event - } - } - return recDur; -} - -CalendarEvent::~CalendarEvent() { - std::map >::iterator recItersIter = _recIters.begin(); - while(recItersIter != _recIters.end()) { - icalrecur_iterator_free(recItersIter->second.first); - recItersIter++; - } -} - -CalendarEvent::CalendarEvent(icalcomponent* icalComp) { - _nextSpan.start = 0; - _nextSpan.end = 0; - _icalComp = NULL; - _active = false; - - - _dtstart = icalcomponent_get_dtstart(icalComp); - _dtend = icalcomponent_get_dtend(icalComp); - - if (!icaltime_is_valid_time(_dtstart)) { - LOG(WARNING) << "Start of event not a valid time"; - return; - } - - if (!icaltime_is_valid_time(_dtend)) { - LOG(WARNING) << "End of event not a valid time"; - return; - } - - _dtduration = icaldurationtype_as_int(icaltime_subtract(_dtend, _dtstart)); - - if (_dtduration <= 0) { - LOG(WARNING) << "Event has negative or zero duration"; - return; - } - - _icalComp = icalComp; - - // initialize all iterators - not really needed anymore - for (icalproperty* rrule = icalcomponent_get_first_property(_icalComp, ICAL_RRULE_PROPERTY); - rrule != NULL; - rrule = icalcomponent_get_next_property(_icalComp, ICAL_RRULE_PROPERTY)) { - - struct icalrecurrencetype recurType = icalproperty_get_rrule(rrule); - icalrecur_iterator *ritr = icalrecur_iterator_new(recurType, _dtstart); - - _recIters[rrule] = std::make_pair(ritr, 0); - } - - -} - -CalendarEvent::operator Data() { - Data data; - data = CalendarInvoker::toData(_icalComp); - return data; -} - -Data CalendarInvoker::toData(icalcomponent* comp) { - Data data; - data.compound["kind"] = Data(icalcomponent_kind_to_string(icalcomponent_isa(comp)), Data::VERBATIM); - - // iterate all properties - icalproperty* prop = icalcomponent_get_first_property(comp, ICAL_ANY_PROPERTY); - while(prop) { - std::string propName = icalproperty_kind_to_string(icalproperty_isa(prop)); - boost::to_lower(propName); - -#if 0 - // iterate all parameters - icalparameter* para = icalproperty_get_first_parameter(prop, ICAL_ANY_PARAMETER); - while(para) { - std::string paraName = icalparameter_kind_to_string(icalparameter_isa(para)); - - switch(icalparameter_get_value(para)) { - case ICAL_VALUE_X: - data.compound[propName].compound[paraName] = Data(icalparameter_get_x(para), Data::VERBATIM); - break; - case ICAL_VALUE_BOOLEAN: - case ICAL_VALUE_BINARY: - case ICAL_VALUE_DATE: - case ICAL_VALUE_DURATION: - case ICAL_VALUE_FLOAT: - case ICAL_VALUE_INTEGER: - case ICAL_VALUE_PERIOD: - case ICAL_VALUE_RECUR: - case ICAL_VALUE_TEXT: - case ICAL_VALUE_URI: - case ICAL_VALUE_ERROR: - case ICAL_VALUE_DATETIME: - case ICAL_VALUE_UTCOFFSET: - case ICAL_VALUE_CALADDRESS: - case ICAL_VALUE_NONE: - data.compound[propName].compound[paraName] = Data("", Data::VERBATIM); - break; - } - - para = icalproperty_get_next_parameter(prop, ICAL_ANY_PARAMETER); - } - data.compound[propName].compound["value"] = Data(icalproperty_get_value_as_string(prop), Data::VERBATIM); -#endif -#if 0 - data.compound[propName] = Data(icalproperty_as_ical_string(prop), Data::VERBATIM); -#endif - data.compound[propName] = Data(icalproperty_get_value_as_string(prop), Data::VERBATIM); - - prop = icalcomponent_get_next_property(comp, ICAL_ANY_PROPERTY); - } - - - icalcomponent* child = icalcomponent_get_first_component(comp, ICAL_ANY_COMPONENT); - while(child) { - data.compound["childs"].array.push_back(toData(child)); - child = icalcomponent_get_next_component(comp, ICAL_ANY_COMPONENT); - } - - return data; -} - -#if 0 -void CalendarInvoker::dumpComponent(icalcomponent* comp) { - std::cout << icalcomponent_kind_to_string(icalcomponent_isa(comp)) << std::endl; - - struct icaltimetype start, end; - time_t tt; - - icalproperty *startProp = icalcomponent_get_first_property(comp, ICAL_DTSTART_PROPERTY); - if (startProp) { - start = icalproperty_get_dtstart(startProp); - } - - icalproperty *endProp = icalcomponent_get_first_property(comp, ICAL_DTEND_PROPERTY); - if (endProp) { - end = icalproperty_get_dtend(endProp); - } - - icalproperty *prop = icalcomponent_get_first_property(comp, ICAL_ANY_PROPERTY); - - while(prop) { - std::cout << "\t" << icalproperty_kind_to_string(icalproperty_isa(prop)) << std::endl; - switch (icalproperty_isa(prop)) { - case ICAL_ANY_PROPERTY: - case ICAL_ACKNOWLEDGED_PROPERTY: - case ICAL_ACTION_PROPERTY: - case ICAL_ALLOWCONFLICT_PROPERTY: - case ICAL_ATTACH_PROPERTY: - case ICAL_ATTENDEE_PROPERTY: - case ICAL_CALID_PROPERTY: - case ICAL_CALMASTER_PROPERTY: - case ICAL_CALSCALE_PROPERTY: - case ICAL_CAPVERSION_PROPERTY: - case ICAL_CARLEVEL_PROPERTY: - case ICAL_CARID_PROPERTY: - case ICAL_CATEGORIES_PROPERTY: - case ICAL_CLASS_PROPERTY: - case ICAL_CMD_PROPERTY: - case ICAL_COMMENT_PROPERTY: - case ICAL_COMPLETED_PROPERTY: - case ICAL_COMPONENTS_PROPERTY: - case ICAL_CONTACT_PROPERTY: - case ICAL_CREATED_PROPERTY: - case ICAL_CSID_PROPERTY: - case ICAL_DATEMAX_PROPERTY: - case ICAL_DATEMIN_PROPERTY: - case ICAL_DECREED_PROPERTY: - case ICAL_DEFAULTCHARSET_PROPERTY: - case ICAL_DEFAULTLOCALE_PROPERTY: - case ICAL_DEFAULTTZID_PROPERTY: - case ICAL_DEFAULTVCARS_PROPERTY: - case ICAL_DENY_PROPERTY: - break; - case ICAL_DESCRIPTION_PROPERTY: - std::cout << "\t\t" << icalproperty_get_description(prop) << std::endl; - break; - case ICAL_DTEND_PROPERTY: { - end = icalproperty_get_dtend(prop); - tt = icaltime_as_timet(start); - std::cout << "\t\t" << ctime(&tt) << std::endl; - break; - } - case ICAL_DTSTAMP_PROPERTY: - break; - case ICAL_DTSTART_PROPERTY: { - start = icalproperty_get_dtstart(prop); - tt = icaltime_as_timet(start); - std::cout << "\t\t" << ctime(&tt) << std::endl; - break; - } - case ICAL_DUE_PROPERTY: - case ICAL_DURATION_PROPERTY: - case ICAL_EXDATE_PROPERTY: - case ICAL_EXPAND_PROPERTY: - case ICAL_EXRULE_PROPERTY: - case ICAL_FREEBUSY_PROPERTY: - case ICAL_GEO_PROPERTY: - case ICAL_GRANT_PROPERTY: - case ICAL_ITIPVERSION_PROPERTY: - case ICAL_LASTMODIFIED_PROPERTY: - case ICAL_LOCATION_PROPERTY: - case ICAL_MAXCOMPONENTSIZE_PROPERTY: - case ICAL_MAXDATE_PROPERTY: - case ICAL_MAXRESULTS_PROPERTY: - case ICAL_MAXRESULTSSIZE_PROPERTY: - case ICAL_METHOD_PROPERTY: - case ICAL_MINDATE_PROPERTY: - case ICAL_MULTIPART_PROPERTY: - case ICAL_NAME_PROPERTY: - case ICAL_ORGANIZER_PROPERTY: - case ICAL_OWNER_PROPERTY: - case ICAL_PERCENTCOMPLETE_PROPERTY: - case ICAL_PERMISSION_PROPERTY: - case ICAL_PRIORITY_PROPERTY: - case ICAL_PRODID_PROPERTY: - case ICAL_QUERY_PROPERTY: - case ICAL_QUERYLEVEL_PROPERTY: - case ICAL_QUERYID_PROPERTY: - case ICAL_QUERYNAME_PROPERTY: - case ICAL_RDATE_PROPERTY: - case ICAL_RECURACCEPTED_PROPERTY: - case ICAL_RECUREXPAND_PROPERTY: - case ICAL_RECURLIMIT_PROPERTY: - case ICAL_RECURRENCEID_PROPERTY: - case ICAL_RELATEDTO_PROPERTY: - case ICAL_RELCALID_PROPERTY: - case ICAL_REPEAT_PROPERTY: - case ICAL_REQUESTSTATUS_PROPERTY: - case ICAL_RESOURCES_PROPERTY: - case ICAL_RESTRICTION_PROPERTY: - break; - case ICAL_RRULE_PROPERTY: { - // struct icaltimetype start = icaltime_from_timet(1,0); - // struct icaltimetype start = icalproperty_get_dtstart(icalcomponent_get_first_property(comp,ICAL_DTSTART_PROPERTY)); - - // struct icaltimetype end = icaltime_today(); - struct icalrecurrencetype recur = icalproperty_get_rrule(prop); - struct icaltimetype next; - - icalrecur_iterator* ritr; - for(ritr = icalrecur_iterator_new(recur,start), - next = icalrecur_iterator_next(ritr); - !icaltime_is_null_time(next); - next = icalrecur_iterator_next(ritr)) { - - tt = icaltime_as_timet(next); - printf(" %s",ctime(&tt )); - - } - icalrecur_iterator_free(ritr); - - break; - } - case ICAL_SCOPE_PROPERTY: - case ICAL_SEQUENCE_PROPERTY: - case ICAL_STATUS_PROPERTY: - case ICAL_STORESEXPANDED_PROPERTY: - case ICAL_SUMMARY_PROPERTY: - case ICAL_TARGET_PROPERTY: - case ICAL_TRANSP_PROPERTY: - case ICAL_TRIGGER_PROPERTY: - case ICAL_TZID_PROPERTY: - case ICAL_TZNAME_PROPERTY: - case ICAL_TZOFFSETFROM_PROPERTY: - case ICAL_TZOFFSETTO_PROPERTY: - case ICAL_TZURL_PROPERTY: - case ICAL_UID_PROPERTY: - case ICAL_URL_PROPERTY: - case ICAL_VERSION_PROPERTY: - case ICAL_X_PROPERTY: - case ICAL_XLICCLASS_PROPERTY: - case ICAL_XLICCLUSTERCOUNT_PROPERTY: - case ICAL_XLICERROR_PROPERTY: - case ICAL_XLICMIMECHARSET_PROPERTY: - case ICAL_XLICMIMECID_PROPERTY: - case ICAL_XLICMIMECONTENTTYPE_PROPERTY: - case ICAL_XLICMIMEENCODING_PROPERTY: - case ICAL_XLICMIMEFILENAME_PROPERTY: - case ICAL_XLICMIMEOPTINFO_PROPERTY: - case ICAL_NO_PROPERTY: - break; - } - prop = icalcomponent_get_next_property(comp, ICAL_ANY_PROPERTY); - } - - switch (icalcomponent_isa(comp)) { - case ICAL_NO_COMPONENT: - case ICAL_ANY_COMPONENT: - break; - case ICAL_XROOT_COMPONENT: { - icalcomponent* child = icalcomponent_get_first_component(comp, ICAL_ANY_COMPONENT); - while(child) { - dumpComponent(child); - child = icalcomponent_get_next_component(comp, ICAL_ANY_COMPONENT); - } - break; - } - case ICAL_XATTACH_COMPONENT: - case ICAL_VEVENT_COMPONENT: - case ICAL_VTODO_COMPONENT: - case ICAL_VJOURNAL_COMPONENT: - case ICAL_VCALENDAR_COMPONENT: - case ICAL_VAGENDA_COMPONENT: - case ICAL_VFREEBUSY_COMPONENT: - case ICAL_VALARM_COMPONENT: - case ICAL_XAUDIOALARM_COMPONENT: - case ICAL_XDISPLAYALARM_COMPONENT: - case ICAL_XEMAILALARM_COMPONENT: - case ICAL_XPROCEDUREALARM_COMPONENT: - case ICAL_VTIMEZONE_COMPONENT: - case ICAL_XSTANDARD_COMPONENT: - case ICAL_XDAYLIGHT_COMPONENT: - case ICAL_X_COMPONENT: - case ICAL_VSCHEDULE_COMPONENT: - case ICAL_VQUERY_COMPONENT: - case ICAL_VREPLY_COMPONENT: - case ICAL_VCAR_COMPONENT: - case ICAL_VCOMMAND_COMPONENT: - case ICAL_XLICINVALID_COMPONENT: - case ICAL_XLICMIMEPART_COMPONENT: - break; - } -} -#endif - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/calendar/CalendarInvoker.h b/src/uscxml/plugins/invoker/calendar/CalendarInvoker.h deleted file mode 100644 index be50575..0000000 --- a/src/uscxml/plugins/invoker/calendar/CalendarInvoker.h +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef CALENDARINVOKER_H_W09J90F0 -#define CALENDARINVOKER_H_W09J90F0 - -#include -extern "C" { -# include -# include -} - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class CalendarEvent { -public: - CalendarEvent(icalcomponent* _icalComp); - ~CalendarEvent(); - icalcomponent* _icalComp; - icaltime_span _nextSpan; - bool _active; - struct icaltimetype _dtstart, _dtend; - time_t _dtduration; - - icaltime_span getNextDuration(time_t time); - std::string getId() { - return toStr((uintptr_t)this); - } - - std::map > _recIters; - operator Data(); -}; - -class CalendarInvoker : public InvokerImpl { -public: - CalendarInvoker(); - virtual ~CalendarInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("calendar"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#calendar"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - - static void raiseEvent(void* userdata, const std::string eventId); - static Data toData(icalcomponent* comp); -protected: - icalcomponent* addIcal(const std::string& icalString); - void setupEvents(icalcomponent* comp); - void queueEvent(CalendarEvent* event); -#if 0 - void dumpComponent(icalcomponent* comp); -#endif - - tthread::recursive_mutex _mutex; - - std::string _calFile; - icalset* _icalSet; - icalcomponent* _icalComp; - - std::set _eventIds; - std::map _events; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(CalendarInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: CALENDARINVOKER_H_W09J90F0 */ diff --git a/src/uscxml/plugins/invoker/expect/ExpectInvoker.cpp b/src/uscxml/plugins/invoker/expect/ExpectInvoker.cpp deleted file mode 100644 index 69ad686..0000000 --- a/src/uscxml/plugins/invoker/expect/ExpectInvoker.cpp +++ /dev/null @@ -1,360 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "ExpectInvoker.h" -#include - -#include "uscxml/concurrency/DelayedEventQueue.h" - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -#include "uscxml/UUID.h" - -#undef USE_TCL_STUBS - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new ExpectInvokerProvider() ); - return true; -} -#endif - -Tcl_Interp* ExpectInvoker::_tcl = NULL; - -ExpectInvoker::ExpectInvoker() : _eventQueue(NULL) { -} - -ExpectInvoker::~ExpectInvoker() { - _eventQueue->stop(); -// if (_tcl) { -// Tcl_DeleteInterp(_tcl); -// } -}; - -boost::shared_ptr ExpectInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new ExpectInvoker()); - return invoker; -} - -Data ExpectInvoker::getDataModelVariables() { - Data data; - return data; -} - -void ExpectInvoker::send(const SendRequest& req) { - EventContext* ctx = new EventContext(); - ctx->sendReq = req; - ctx->instance = this; - -// LOG(ERROR) << "################ " << req; - - std::string eventId = UUID::getUUID(); - _eventQueue->addEvent(eventId, ExpectInvoker::send, 0, ctx); - -// send(ctx, ""); -} - -void ExpectInvoker::send(void *userdata, const std::string event) { - - EventContext* ctx = (EventContext*)userdata; - if (!ctx) - return; - - if (!ctx->instance) { - delete(ctx); - return; - } - - const SendRequest& req = ctx->sendReq; - - if (iequals(req.name, "expect.match")) { - int nrCases = req.params.size(); - struct exp_case *cases = (struct exp_case*)malloc(sizeof(struct exp_case) * (nrCases + 1)); - memset(cases, 0, sizeof(exp_case) * (nrCases + 1)); - - /** - exp_end: indicates that no more patterns appear. - exp_glob: indicates that the pattern is a glob-style string pattern. - exp_exact: indicates that the pattern is an exact string. - exp_regexp: indicates that the pattern is a regexp-style string pattern. - exp_compiled: indicates that the pattern is a regexp-style string pattern, and that its compiled form is also provided. - exp_null: indicates that the pattern is a null (for debugging purposes, a string pattern must also follow). - */ - - Event::params_t::const_iterator paramIter = req.params.begin(); - int index = 0; - while (paramIter != req.params.end()) { - struct exp_case* expCase = &cases[index]; - size_t colonPos = paramIter->first.find(":"); - if (colonPos != std::string::npos) { - if (paramIter->first.substr(0, colonPos) == "regex") { - expCase->type = exp_regexp; - } else if(paramIter->first.substr(0, colonPos) == "glob") { - expCase->type = exp_glob; - } else if(paramIter->first.substr(0, colonPos) == "exact") { - expCase->type = exp_exact; - } else { - // if we can't make sense of the type - expCase->type = exp_exact; - } - } else { - expCase->type = exp_regexp; - } - - expCase->pattern = strdup(paramIter->second.atom.c_str()); -// LOG(ERROR) << "################ " << expCase->pattern; - - if (expCase->type == exp_regexp) { - expCase->re = TclRegComp(expCase->pattern); - if (expCase->re == NULL) { - LOG(ERROR) << TclGetRegError(); - expCase->type = exp_null; - } - } - expCase->value = index + 1; - paramIter++; - index++; - } - - assert(index == nrCases); - - cases[nrCases].type = exp_end; - - /** - * The functions wait until the output from a process matches one of the - * patterns, a specified time period has passed, or an EOF is seen. - */ - - int rc = 0; - // exp_fexpectv won't return on timeout when called in thread -// rc = exp_fexpectv(ctx->instance->_cmdFP, cases); - rc = exp_expectv(ctx->instance->_cmdFD, cases); - - if (rc == EXP_EOF) { - Event ev; - ev.name = "expect.match.eof"; - ev.data.compound["buffer"] = Data(exp_buffer, Data::VERBATIM); - ctx->instance->returnEvent(ev); - } else if (rc == EXP_TIMEOUT) { - Event ev; - ev.name = "expect.match.timeout"; - ev.data.compound["buffer"] = Data(exp_buffer, Data::VERBATIM); - ctx->instance->returnEvent(ev); - } else if (rc == EXP_FULLBUFFER) { - Event ev; - ev.name = "expect.match.fullbuffer"; - ev.data.compound["buffer"] = Data(exp_buffer, Data::VERBATIM); - ctx->instance->returnEvent(ev); - } else if (rc > 0) { - rc--; // we started at 1 - paramIter = req.params.begin(); - while(rc > 0) { - if (paramIter == req.params.end()) - break; - paramIter++; - rc--; - } - if (paramIter != req.params.end()) { - Event event; - - size_t colonPos = paramIter->first.find(":"); - if (colonPos != std::string::npos) { - std::string eventName = paramIter->first; - event.name = std::string("expect.match.") + eventName.substr(colonPos + 1, eventName.length() - (colonPos + 1)); - event.data.compound["type"] = Data(paramIter->first.substr(0, colonPos), Data::VERBATIM); - - } else { - event.name = std::string("expect.match.") + paramIter->first; - event.data.compound["type"] = Data("regex", Data::VERBATIM); - } - - event.data.compound["pattern"] = Data(paramIter->second.atom, Data::VERBATIM); - event.data.compound["buffer"] = Data(exp_buffer, Data::VERBATIM); - event.data.compound["start"] = Data((int)(exp_match - exp_buffer)); - event.data.compound["end"] = Data((int)(exp_match_end - exp_buffer)); - event.data.compound["match"] = Data(std::string(exp_buffer).substr(exp_match - exp_buffer, exp_match_end - exp_match), Data::VERBATIM); - ctx->instance->returnEvent(event); - } else { - // exp_fexpectl returned gibberish - assert(false); - } - } else { - // exp_fexpectl returned gibberish - assert(false); - } - - // free our memory - for (int i = 0; i < nrCases; i++) { - if (cases[i].pattern != NULL) - free(cases[i].pattern); - if (cases[i].re != NULL) - free(cases[i].re); - } - free(cases); - - } else if (iequals(req.name, "expect.send")) { - std::string toSend = unescape(req.content); - ctx->instance->_interpreter->getDataModel().replaceExpressions(toSend); - fwrite(toSend.c_str(), toSend.length(), 1, ctx->instance->_cmdFP); - } - - delete(ctx); -} - -void ExpectInvoker::cancel(const std::string sendId) { -} - -void ExpectInvoker::invoke(const InvokeRequest& req) { - if (_eventQueue == NULL) { - _eventQueue = new DelayedEventQueue(); - _eventQueue->start(); - } - - EventContext* ctx = new EventContext(); - ctx->invokeReq = req; - ctx->instance = this; - - //_eventQueue->addEvent(req.sendid, ExpectInvoker::invoke, 0, ctx); - invoke(ctx, ""); - -} - -void ExpectInvoker::invoke(void *userdata, const std::string event) { - EventContext* ctx = (EventContext*)userdata; - - if (!ctx) - return; - - if (!ctx->instance) { - delete(ctx); - return; - } - - const InvokeRequest& req = ctx->invokeReq; - - // moved here for thread local storage - if (ctx->instance->_tcl == NULL) { - ctx->instance->_tcl = Tcl_CreateInterp(); - if (ctx->instance->_tcl) { - Tcl_Init(ctx->instance->_tcl); - Expect_Init(ctx->instance->_tcl); - } - ctx->instance->_cmdFP = NULL; - - bool debug = false; - Event::getParam(req.params, "debug", debug); - if (debug) { - exp_is_debugging = 1; - } else { - exp_is_debugging = 0; - } - - int timeout = 20; - Event::getParam(req.params, "timeout", timeout); - exp_timeout = timeout; - - bool logUser = false; - Event::getParam(req.params, "loguser", logUser); - if (logUser) { - exp_loguser = 1; - } else { - exp_loguser = 0; - } - - // exp_interactive = 1; - exp_logfile = 0; - // exp_remove_nulls = 1; - // exp_ttyinit = 1; - - } else { -// assert(false); - } - - char* cmd = NULL; - char** args = NULL; - int nrArgs = 0; - - if (req.params.count("spawn")) { - // get command - std::string command; - Event::getParam(req.params, "spawn", command); - cmd = strdup(command.c_str()); - - // get arguments - nrArgs = req.params.count("argument"); - args = (char**)malloc(sizeof(char*) * nrArgs + 2); - args[0] = strdup(command.c_str()); - - size_t index = 1; - std::pair argIterRange = req.params.equal_range("argument"); - Event::params_t::const_iterator argIter = argIterRange.first; - while(argIter != argIterRange.second) { - args[index] = strdup(argIter->second.atom.c_str()); - argIter++; - index++; - } - args[index] = (char*)0; - } else if(req.params.count("command")) { - - } - - // open socket - ctx->instance->_cmdFD = exp_spawnv(cmd, args); - if (ctx->instance->_cmdFD > 0) { - ctx->instance->_cmdFP = fdopen(ctx->instance->_cmdFD, "r+"); - - if (ctx->instance->_cmdFP) { - // disable buffering - setbuf(ctx->instance->_cmdFP,(char *)0); - Event event; - event.name = "spawn.success"; - ctx->instance->returnEvent(event); - } - } - - if (ctx->instance->_cmdFP == NULL || ctx->instance->_cmdFD <= 0) { - Event event; - event.name = "spawn.failed"; - event.data.compound["cause"] = Data(strerror(errno), Data::VERBATIM); - Tcl_Obj *infoObj = Tcl_GetVar2Ex(_tcl, "errorInfo", NULL, TCL_GLOBAL_ONLY); - if (infoObj) { - event.data.compound["errorInfo"] = Data(Tcl_GetString(infoObj), Data::VERBATIM); - } - - ctx->instance->returnEvent(event); - } - - if (cmd) - free(cmd); - - if (args) { - for (int i = 0; i < nrArgs + 1; i++) { - free(args[i]); - } - free(args); - } - -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/expect/ExpectInvoker.h b/src/uscxml/plugins/invoker/expect/ExpectInvoker.h deleted file mode 100644 index 25a2517..0000000 --- a/src/uscxml/plugins/invoker/expect/ExpectInvoker.h +++ /dev/null @@ -1,79 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef EXPECTINVOKER_H_W02590F0 -#define EXPECTINVOKER_H_W02590F0 - -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -#include -#include -#include - -namespace uscxml { - -class ExpectInvoker : public InvokerImpl { -public: - struct EventContext { - InvokeRequest invokeReq; - SendRequest sendReq; - ExpectInvoker* instance; - }; - - ExpectInvoker(); - virtual ~ExpectInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("expect"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#expect"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - -protected: - - static void send(void *userdata, const std::string event); - static void invoke(void *userdata, const std::string event); - - static Tcl_Interp* _tcl; - FILE* _cmdFP; - int _cmdFD; - - DelayedEventQueue* _eventQueue; - -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(ExpectInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: EXPECTINVOKER_H_W02590F0 */ diff --git a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp b/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp deleted file mode 100644 index f67e58f..0000000 --- a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp +++ /dev/null @@ -1,463 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include - -#include "FFMPEGInvoker.h" -#include "uscxml/messages/Blob.h" - -#include - -#include -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -#define STREAM_FRAME_RATE 25 /* 25 images/s */ -#define BMP_FORMAT PIX_FMT_BGR24 - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new FFMPEGInvokerProvider() ); - return true; -} -#endif - -FFMPEGInvoker::FFMPEGInvoker() { -} - -FFMPEGInvoker::~FFMPEGInvoker() { -}; - -boost::shared_ptr FFMPEGInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new FFMPEGInvoker()); - // Register all formats and codecs - this ought to be done just once - av_register_all(); - return invoker; -} - -Data FFMPEGInvoker::getDataModelVariables() { - Data data; - - AVCodec* codec = NULL; - while((codec = av_codec_next(codec))) { - AVCodec* codecInst = avcodec_find_encoder(codec->id); - if (!codecInst) - continue; - - switch (codec->type) { - case AVMEDIA_TYPE_VIDEO: { - Data codecData; - codecData.compound["name"] = Data(codec->name, Data::VERBATIM); - codecData.compound["longName"] = Data(codec->long_name, Data::VERBATIM); - data.compound["video"].compound[codec->name] = codecData; - break; - } - case AVMEDIA_TYPE_AUDIO: { - Data codecData; - codecData.compound["name"] = Data(codec->name, Data::VERBATIM); - codecData.compound["longName"] = Data(codec->long_name, Data::VERBATIM); - data.compound["audio"].compound[codec->name] = codecData; - break; - } - default: - break; - } - } - - return data; -} - -void FFMPEGInvoker::invoke(const InvokeRequest& req) { - int nrThreads = 1; - Event::getParam(req.params, "threads", nrThreads); - - _isRunning = true; - for (size_t i = 0; i < nrThreads; i++) { - _threads.insert(new tthread::thread(FFMPEGInvoker::run, this)); - } -} - -void FFMPEGInvoker::send(const SendRequest& req) { - SendRequest reqCopy = req; - - if (iequals(req.name, "render.start")) { - // create a new encoding context - int ret; - EncodingContext* ctx = new EncodingContext(); - tthread::lock_guard lock(ctx->mutex); - - std::string context; - Event::getParam(req.params, "context", context); - - ctx->extension = "mpeg"; - Event::getParam(req.params, "format", ctx->extension); - - Event::getParam(req.params, "width", ctx->width); - Event::getParam(req.params, "height", ctx->height); - - if (!ctx->width || !ctx->height) - return; - - ctx->filename = URL::getTmpFilename(); - - /* allocate the output media context */ - avformat_alloc_output_context2(&ctx->formatCtx, NULL, ctx->extension.c_str(), ctx->filename.c_str()); - if (!ctx->formatCtx) { - printf("Could not deduce output format from file extension: using MPEG.\n"); - avformat_alloc_output_context2(&ctx->formatCtx, NULL, "mpeg", ctx->filename.c_str()); - } - if (!ctx->formatCtx) { - return; - } - ctx->format = ctx->formatCtx->oformat; - - /* Add the audio and video streams using the default format codecs - * and initialize the codecs. */ - ctx->videoStream = NULL; - - if (ctx->format->video_codec != AV_CODEC_ID_NONE) { - ctx->videoStream = addStream(ctx, ctx->formatCtx, &ctx->videoCodec, ctx->format->video_codec); - } - - /* Now that all the parameters are set, we can open the audio and - * video codecs and allocate the necessary encode buffers. */ - if (ctx->videoStream) - openVideo(ctx, ctx->formatCtx, ctx->videoCodec, ctx->videoStream); - - /* open the output file, if needed */ - if (!(ctx->format->flags & AVFMT_NOFILE)) { - ret = avio_open(&ctx->formatCtx->pb, ctx->filename.c_str(), AVIO_FLAG_WRITE); - if (ret < 0) { - // fprintf(stderr, "Could not open '%s': %s\n", ctx->filename.c_str(), - // av_err2str(ret)); - return; - } - } - - /* Write the stream header, if any. */ - ret = avformat_write_header(ctx->formatCtx, NULL); - if (ret < 0) { - // fprintf(stderr, "Error occurred when opening output file: %s\n", - // av_err2str(ret)); - return; - } - - if (ctx->frame) - ctx->frame->pts = 0; - - _encoders[context] = ctx; - } else if(iequals(req.name, "render.frame")) { - _workQueue.push(req); - } else if(iequals(req.name, "render.end")) { - _workQueue.push(req); - } -} - -void FFMPEGInvoker::cancel(const std::string sendId) { -} - -void FFMPEGInvoker::run(void* instance) { - FFMPEGInvoker* INSTANCE = (FFMPEGInvoker*)instance; - while(true) { - SendRequest req = INSTANCE->_workQueue.pop(); - if (INSTANCE->_isRunning) { - INSTANCE->process(req); - } else { - return; - } - } -} - -void FFMPEGInvoker::finish(EncodingContext* ctx, const SendRequest& req) { - av_write_trailer(ctx->formatCtx); - - /* Close each codec. */ - if (ctx->videoStream) - closeVideo(ctx, ctx->formatCtx, ctx->videoStream); - - if (!(ctx->formatCtx->oformat->flags & AVFMT_NOFILE)) - /* Close the output file. */ - avio_close(ctx->formatCtx->pb); - - /* free the stream */ - avformat_free_context(ctx->formatCtx); - - // read file - std::ifstream movieFile(ctx->filename.c_str()); - movieFile.seekg(0, std::ios::end); - size_t length = movieFile.tellg(); - movieFile.seekg(0, std::ios::beg); - - char* movieBuffer = (char*)malloc(length); - movieFile.read(movieBuffer, length); - - // move to desktop for checking -// int err = rename(ctx->filename.c_str(), "/Users/sradomski/Desktop/foo.mpg"); -// if (err) { -// printf("%s", strerror(errno)); -// } - - std::string context; - Event::getParam(req.params, "context", context); - - Event event; - event.name = "render.done"; - event.data.compound["context"] = Data(context, Data::INTERPRETED); - event.data.compound["movie"] = Data(movieBuffer, length, "video/mpeg", true); - event.data.compound["filename"] = Data(std::string("movie.") + ctx->extension, Data::VERBATIM); - - returnEvent(event); -} - -void FFMPEGInvoker::process(const SendRequest& req) { - - std::string context; - Event::getParam(req.params, "context", context); - if (_encoders.find(context) == _encoders.end()) { - return; - } - - EncodingContext* ctx = _encoders[context]; - tthread::lock_guard lock(ctx->mutex); - - // finish encoding and return - if(iequals(req.name, "render.end")) { - finish(ctx, req); - delete _encoders[context]; - _encoders.erase(context); - } - - Data image; - Event::getParam(req.params, "frame", image); - if (image.empty()) { - return; - } - - std::string format = "bmp"; - Event::getParam(req.params, "format", format); - - writeVideoFrame(ctx, ctx->formatCtx, ctx->videoStream, image.binary); - ctx->frame->pts += av_rescale_q(1, ctx->videoStream->codec->time_base, ctx->videoStream->time_base); - -} - -AVStream* FFMPEGInvoker::addStream(EncodingContext* ctx, AVFormatContext *oc, AVCodec **codec, - enum AVCodecID codec_id) { - AVCodecContext *c; - AVStream *st; - - /* find the encoder */ - *codec = avcodec_find_encoder(codec_id); - if (!(*codec)) { - fprintf(stderr, "Could not find encoder for '%s'\n", - avcodec_get_name(codec_id)); - return NULL; - } - - st = avformat_new_stream(oc, *codec); - ctx->videoPixFmt = (*codec)->pix_fmts[0]; - if (!st) { - fprintf(stderr, "Could not allocate stream\n"); - return NULL; - } - st->id = oc->nb_streams-1; - c = st->codec; - - switch ((*codec)->type) { - case AVMEDIA_TYPE_AUDIO: - c->sample_fmt = AV_SAMPLE_FMT_FLTP; - c->bit_rate = 64000; - c->sample_rate = 44100; - c->channels = 2; - break; - - case AVMEDIA_TYPE_VIDEO: - c->codec_id = codec_id; - - c->bit_rate = 800000; - /* Resolution must be a multiple of two. */ - c->width = ctx->width; - c->height = ctx->height; - /* timebase: This is the fundamental unit of time (in seconds) in terms - * of which frame timestamps are represented. For fixed-fps content, - * timebase should be 1/framerate and timestamp increments should be - * identical to 1. */ - c->time_base.den = STREAM_FRAME_RATE; - c->time_base.num = 1; - c->gop_size = 12; /* emit one intra frame every twelve frames at most */ - c->pix_fmt = ctx->videoPixFmt; - if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) { - /* just for testing, we also add B frames */ - c->max_b_frames = 2; - } - if (c->codec_id == AV_CODEC_ID_MPEG1VIDEO) { - /* Needed to avoid using macroblocks in which some coeffs overflow. - * This does not happen with normal video, it just happens here as - * the motion of the chroma plane does not match the luma plane. */ - c->mb_decision = 2; - } - break; - - default: - break; - } - - /* Some formats want stream headers to be separate. */ - if (oc->oformat->flags & AVFMT_GLOBALHEADER) - c->flags |= CODEC_FLAG_GLOBAL_HEADER; - - return st; -} - -void FFMPEGInvoker::openVideo(EncodingContext* ctx, AVFormatContext *oc, AVCodec *codec, AVStream *st) { - int ret; - AVCodecContext *c = st->codec; - - /* open the codec */ - ret = avcodec_open2(c, codec, NULL); - if (ret < 0) { - // fprintf(stderr, "Could not open video codec: %s\n", av_err2str(ret)); - return; - } - - /* allocate and init a re-usable frame */ - ctx->frame = avcodec_alloc_frame(); - if (!ctx->frame) { - fprintf(stderr, "Could not allocate video frame\n"); - return; - } - - /* Allocate the encoded raw picture. */ - ret = avpicture_alloc(&ctx->dst_picture, c->pix_fmt, c->width, c->height); - if (ret < 0) { -// fprintf(stderr, "Could not allocate picture: %s\n", av_err2str(ret)); - return; - } - - /* If the output format is not YUV420P, then a temporary YUV420P - * picture is needed too. It is then converted to the required - * output format. */ - if (c->pix_fmt != BMP_FORMAT) { - ret = avpicture_alloc(&ctx->src_picture, BMP_FORMAT, c->width, c->height); - if (ret < 0) { - // fprintf(stderr, "Could not allocate temporary picture: %s\n", - // av_err2str(ret)); - return; - } - } - - /* copy data and linesize picture pointers to frame */ - *((AVPicture *)ctx->frame) = ctx->dst_picture; -} - -void FFMPEGInvoker::writeVideoFrame(EncodingContext* ctx, AVFormatContext *oc, AVStream *st, Blob image) { - int ret; - AVCodecContext *c = st->codec; - - if (c->pix_fmt != BMP_FORMAT) { - /* as we only generate a YUV420P picture, we must convert it - * to the codec pixel format if needed */ - if (!ctx->sws_ctx) { - ctx->sws_ctx = sws_getContext(c->width, c->height, BMP_FORMAT, - c->width, c->height, c->pix_fmt, - ctx->sws_flags, NULL, NULL, NULL); - if (!ctx->sws_ctx) { - fprintf(stderr, - "Could not initialize the conversion context\n"); - return; - } - } - - uint32_t headerOffset = 0; - headerOffset += image._impl->data[10] << 0; - headerOffset += image._impl->data[11] << 8; - headerOffset += image._impl->data[12] << 16; - headerOffset += image._impl->data[13] << 24; - -// std::cout << headerOffset + (c->width * c->height) << " / " << image->_size << std::endl; - - ret = avpicture_fill(&ctx->src_picture, (uint8_t*)(image._impl->data + headerOffset), BMP_FORMAT, c->width, c->height); - if (ret < 0) { - fprintf(stderr, - "Could not fill image from given bitmap\n"); - } - sws_scale(ctx->sws_ctx, - (const uint8_t * const *)ctx->src_picture.data, ctx->src_picture.linesize, - 0, c->height, ctx->dst_picture.data, ctx->dst_picture.linesize); - } else { - avpicture_fill(&ctx->dst_picture, (uint8_t*)image._impl->data, c->pix_fmt, c->width, c->height); - } - - if (oc->oformat->flags & AVFMT_RAWPICTURE) { - /* Raw video case - directly store the picture in the packet */ - AVPacket pkt; - av_init_packet(&pkt); - - pkt.flags |= AV_PKT_FLAG_KEY; - pkt.stream_index = st->index; - pkt.data = ctx->dst_picture.data[0]; - pkt.size = sizeof(AVPicture); - - ret = av_interleaved_write_frame(oc, &pkt); - } else { - AVPacket pkt = { 0 }; - int got_packet; - av_init_packet(&pkt); - - /* encode the image */ - ret = avcodec_encode_video2(c, &pkt, ctx->frame, &got_packet); - if (ret < 0) { - // fprintf(stderr, "Error encoding video frame: %s\n", av_err2str(ret)); - return; - } - /* If size is zero, it means the image was buffered. */ - - if (!ret && got_packet && pkt.size) { - pkt.stream_index = st->index; - - /* Write the compressed frame to the media file. */ -// ret = av_write_frame(oc, &pkt); - ret = av_interleaved_write_frame(oc, &pkt); - } else { - ret = 0; - } - } - if (ret != 0) { -// fprintf(stderr, "Error while writing video frame: %s\n", av_err2str(ret)); - return; - } - ctx->frame_count++; -} - -void FFMPEGInvoker::closeVideo(EncodingContext* ctx, AVFormatContext *oc, AVStream *st) { - avcodec_close(st->codec); -// av_free(ctx->src_picture.data[0]); - av_free(ctx->dst_picture.data[0]); - av_free(ctx->frame); -} - - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h b/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h deleted file mode 100644 index 81589bb..0000000 --- a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h +++ /dev/null @@ -1,115 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef FFMPEGINVOKER_H_VQD1V1C2 -#define FFMPEGINVOKER_H_VQD1V1C2 - -#include - -extern "C" { -#include -#include -#include -} - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class FFMPEGInvoker : public InvokerImpl { -public: - FFMPEGInvoker(); - virtual ~FFMPEGInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("ffmpeg"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#ffmpeg"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - -protected: - class EncodingContext { - public: - EncodingContext() : - format(NULL), - formatCtx(NULL), - audioStream(NULL), videoStream(NULL), - audioCodec(NULL), videoCodec(NULL), - audioTime(0), videoTime(0), - frame(NULL), - frame_count(0), - width(0), - height(0), - sws_flags(SWS_BICUBIC), - sws_ctx(NULL) {} - - virtual ~EncodingContext() { - if (sws_ctx) - sws_freeContext(sws_ctx); - } - - tthread::recursive_mutex mutex; - PixelFormat videoPixFmt; - std::string filename; - AVOutputFormat* format; - AVFormatContext* formatCtx; - AVStream *audioStream, *videoStream; - AVCodec *audioCodec, *videoCodec, *imageCodec; - double audioTime, videoTime; - AVFrame *frame; - AVPicture src_picture, dst_picture; - int frame_count; - size_t width, height; - int sws_flags; - SwsContext *sws_ctx; - std::string extension; - }; - - AVStream* addStream(EncodingContext* ctx, AVFormatContext *oc, AVCodec **codec, enum AVCodecID codec_id); - void openVideo(EncodingContext* ctx, AVFormatContext *oc, AVCodec *codec, AVStream *st); - void writeVideoFrame(EncodingContext* ctx, AVFormatContext *oc, AVStream *st, Blob image); - void closeVideo(EncodingContext* ctx, AVFormatContext *oc, AVStream *st); - - static void run(void*); - void finish(EncodingContext* ctx, const SendRequest& req); - void process(const SendRequest& req); - - std::set _threads; - uscxml::concurrency::BlockingQueue _workQueue; - bool _isRunning; - std::map _encoders; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(FFMPEGInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: FFMPEGINVOKER_H_VQD1V1C2 */ diff --git a/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp b/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp deleted file mode 100644 index 63d1628..0000000 --- a/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp +++ /dev/null @@ -1,443 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include - -#include "DirMonInvoker.h" -#include - -#include "uscxml/config.h" - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -#include -#ifndef WIN32 -#include -#else -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new DirMonInvokerProvider() ); - return true; -} -#endif - -DirMonInvoker::DirMonInvoker() : - _reportExisting(true), - _reportHidden(false), - _recurse(false), - _thread(NULL), - _watcher(NULL) { -} - -DirMonInvoker::~DirMonInvoker() { - _isRunning = false; - if (_thread) { - _thread->join(); - delete _thread; - } - if (_watcher) - delete(_watcher); -}; - -boost::shared_ptr DirMonInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new DirMonInvoker()); - invoker->_interpreter = interpreter; - return invoker; -} - -Data DirMonInvoker::getDataModelVariables() { - tthread::lock_guard lock(_mutex); - - Data data; - data.compound["dir"] = Data(_dir, Data::VERBATIM); - - std::set::iterator suffixIter = _suffixes.begin(); - while(suffixIter != _suffixes.end()) { - data.compound["suffixes"].array.push_back(Data(*suffixIter, Data::VERBATIM)); - suffixIter++; - } - - std::map entries = _watcher->getAllEntries(); - std::map::iterator entryIter = entries.begin(); - while(entryIter != entries.end()) { - data.compound["file"].compound[entryIter->first].compound["mtime"] = Data(toStr(entryIter->second.st_mtime), Data::INTERPRETED); - data.compound["file"].compound[entryIter->first].compound["ctime"] = Data(toStr(entryIter->second.st_mtime), Data::INTERPRETED); - data.compound["file"].compound[entryIter->first].compound["atime"] = Data(toStr(entryIter->second.st_mtime), Data::INTERPRETED); - data.compound["file"].compound[entryIter->first].compound["size"] = Data(toStr(entryIter->second.st_mtime), Data::INTERPRETED); - entryIter++; - } - - return data; -} - -void DirMonInvoker::send(const SendRequest& req) { -} - -void DirMonInvoker::cancel(const std::string sendId) { -} - -void DirMonInvoker::invoke(const InvokeRequest& req) { - if (req.params.find("dir") == req.params.end()) { - LOG(ERROR) << "No dir param given"; - return; - } - - if (req.params.find("reportexisting") != req.params.end() && - iequals(req.params.find("reportexisting")->second.atom, "false")) - _reportExisting = false; - if (req.params.find("recurse") != req.params.end() && - iequals(req.params.find("recurse")->second.atom, "true")) - _recurse = true; - if (req.params.find("reporthidden") != req.params.end() && - iequals(req.params.find("reporthidden")->second.atom, "true")) - _reportHidden = true; - - std::string suffixList; - if (req.params.find("suffix") != req.params.end()) { - suffixList = req.params.find("suffix")->second.atom; - } else if (req.params.find("suffixes") != req.params.end()) { - suffixList = req.params.find("suffixes")->second.atom; - } - - if (suffixList.size() > 0) { - // seperate path into components - std::stringstream ss(suffixList); - std::string item; - while(std::getline(ss, item, ' ')) { - if (item.length() == 0) - continue; - _suffixes.insert(item); - } - } - - std::multimap::const_iterator dirIter = req.params.find("dir"); - while(dirIter != req.params.upper_bound("dir")) { - // this is simplified - Data might be more elaborate than a simple string atom - URL url(dirIter->second.atom); - if (!url.toAbsolute(_interpreter->getBaseURL(req.elem)) || !iequals(url.scheme(), "file")) { - LOG(ERROR) << "Given directory '" << dirIter->second << "' cannot be transformed to absolute path"; - } else { - _dir = url.path(); - } - break; - } - - _watcher = new DirectoryWatch(_dir, _recurse); - _watcher->addMonitor(this); - _watcher->updateEntries(true); - - _isRunning = true; - _thread = new tthread::thread(DirMonInvoker::run, this); -} - -void DirMonInvoker::run(void* instance) { - while(((DirMonInvoker*)instance)->_isRunning) { - { - tthread::lock_guard lock(((DirMonInvoker*)instance)->_mutex); - ((DirMonInvoker*)instance)->_watcher->updateEntries(); - } - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(20)); - } -} - -void DirMonInvoker::handleChanges(DirectoryWatch::Action action, const std::string reportedDir, const std::string reportedFilename, struct stat fileStat) { - -// std::cout << action << " on " << reportedFilename << std::endl; - - std::string path; // complete path to the file including filename - std::string relPath; // path relative to monitored directory including filename - std::string dir; // the name of the directory we monitor - std::string relDir; // the directory from dir to the actual directory where we found a file - std::string basename; // filename including suffix - std::string strippedName; // filename without the suffix - std::string extension; // the extension - - dir = reportedDir; - - path = dir + reportedFilename; - boost::algorithm::replace_all(path, "\\", "/"); - boost::algorithm::replace_all(path, "//", "/"); - - assert(boost::algorithm::starts_with(path, dir)); - relPath = path.substr(dir.length()); - assert(boost::equal(path, dir + relPath)); - - size_t lastSep; - if ((lastSep = path.find_last_of(PATH_SEPERATOR)) != std::string::npos) { - lastSep++; - basename = path.substr(lastSep, path.length() - lastSep); - } else { - assert(false); - } - assert(boost::algorithm::ends_with(relPath, basename)); - - // extension is the suffix and strippedName the basename without the suffix - size_t lastDot; - if ((lastDot = basename.find_last_of(".")) != std::string::npos) { - if (lastDot == 0) { - // hidden file - strippedName = basename; - } else { - extension = basename.substr(lastDot + 1); - strippedName = basename.substr(0, lastDot); - } - } else { - strippedName = basename; - } - - relDir = relPath.substr(0, relPath.length() - basename.length()); - assert(boost::equal(path, dir + relDir + basename)); - - // return if this is a hidden file - if (boost::algorithm::starts_with(basename, ".") && !_reportHidden) - return; - - // ilter suffixes - if (_suffixes.size() > 0) { - bool validSuffix = false; - std::set::iterator suffixIter = _suffixes.begin(); - while(suffixIter != _suffixes.end()) { - if (boost::algorithm::ends_with(path, *suffixIter)) { - validSuffix = true; - break; - } - suffixIter++; - } - if (!validSuffix) - return; - } - - Event event; - event.invokeid = _invokeId; - - switch (action) { - case DirectoryWatch::EXISTING: - event.name = "file.existing"; - break; - case DirectoryWatch::ADDED: - event.name = "file.added"; - break; - case DirectoryWatch::DELETED: - event.name = "file.deleted"; - break; - case DirectoryWatch::MODIFIED: - event.name = "file.modified"; - break; - default: - break; - } - - if (action != DirectoryWatch::DELETED) { - event.data.compound["file"].compound["mtime"] = Data(toStr(fileStat.st_mtime), Data::INTERPRETED); - event.data.compound["file"].compound["ctime"] = Data(toStr(fileStat.st_ctime), Data::INTERPRETED); - event.data.compound["file"].compound["atime"] = Data(toStr(fileStat.st_atime), Data::INTERPRETED); - event.data.compound["file"].compound["size"] = Data(toStr(fileStat.st_size), Data::INTERPRETED); - } - - event.data.compound["file"].compound["name"] = Data(basename, Data::VERBATIM); - event.data.compound["file"].compound["extension"] = Data(extension, Data::VERBATIM); - event.data.compound["file"].compound["strippedName"] = Data(strippedName, Data::VERBATIM); - event.data.compound["file"].compound["relPath"] = Data(relPath, Data::VERBATIM); - event.data.compound["file"].compound["relDir"] = Data(relDir, Data::VERBATIM); - event.data.compound["file"].compound["path"] = Data(path, Data::VERBATIM); - event.data.compound["file"].compound["dir"] = Data(dir, Data::VERBATIM); - - returnEvent(event); -} - -DirectoryWatch::~DirectoryWatch() { - std::map::iterator dirIter = _knownDirs.begin(); - while(dirIter != _knownDirs.end()) { - delete(dirIter->second); - dirIter++; - } - -} - -void DirectoryWatch::reportAsDeleted() { - std::map::iterator fileIter = _knownEntries.begin(); - while(fileIter != _knownEntries.end()) { - if (fileIter->second.st_mode & S_IFDIR) { - _knownDirs[fileIter->first]->reportAsDeleted(); - delete _knownDirs[fileIter->first]; - _knownDirs.erase(fileIter->first); - } else { - _monitors_t::iterator monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - (*monIter)->handleChanges(DELETED, _dir, _relDir + PATH_SEPERATOR + fileIter->first, fileIter->second); - monIter++; - } - } - _knownEntries.erase(fileIter++); -// fileIter++; - } - assert(_knownDirs.size() == 0); - assert(_knownEntries.size() == 0); -} - -void DirectoryWatch::updateEntries(bool reportAsExisting) { - _monitors_t::iterator monIter; - if (_dir[_dir.length() - 1] == PATH_SEPERATOR) - _dir = _dir.substr(0, _dir.length() - 1); - - // stat directory for modification date - struct stat dirStat; - if (stat((_dir + _relDir).c_str(), &dirStat) != 0) { - LOG(ERROR) << "Error with stat on directory " << _dir << ": " << strerror(errno); - return; - } - - if ((unsigned)dirStat.st_mtime >= (unsigned)_lastChecked) { -// std::cout << "dirStat.st_mtime: " << dirStat.st_mtime << " / _lastChecked: " << _lastChecked << std::endl; - - // there are changes in the directory - std::set currEntries; - -#ifndef WIN32 - DIR *dp; - dp = opendir((_dir + _relDir).c_str()); - if (dp == NULL) { - LOG(ERROR) << "Error opening directory " << _dir + _relDir << ": " << strerror(errno); - return; - } - // iterate all entries and see what changed - struct dirent* entry; - while((entry = readdir(dp))) { - std::string dname = entry->d_name; -#else - WIN32_FIND_DATA ffd; - HANDLE hFind = INVALID_HANDLE_VALUE; - TCHAR szDir[MAX_PATH]; - StringCchCopy(szDir, MAX_PATH, _dir.c_str()); - StringCchCat(szDir, MAX_PATH, TEXT("\\*")); - - hFind = FindFirstFile(szDir, &ffd); - do { - std::string dname = ffd.cFileName; -#endif - - // see if the file was changed - std::string filename = _dir + _relDir + "/" + dname; -// asprintf(&filename, "%s/%s", (_dir + _relDir).c_str(), dname.c_str()); - - struct stat fileStat; - if (stat(filename.c_str(), &fileStat) != 0) { - LOG(ERROR) << "Error with stat on directory entry: " << filename << ": " << strerror(errno); - continue; - } - - if (fileStat.st_mode & S_IFDIR) { - if (boost::equals(dname, ".") || boost::equals(dname, "..")) { - continue; // do not report . or .. - } - } - - currEntries.insert(dname); - - if (_knownEntries.find(dname) != _knownEntries.end()) { - // we have seen this entry before - struct stat oldStat = _knownEntries[dname]; - if (oldStat.st_mtime < fileStat.st_mtime) { - monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - (*monIter)->handleChanges(MODIFIED, _dir, _relDir + PATH_SEPERATOR + dname, fileStat); - monIter++; - } - } - } else { - // we have not yet seen this entry - if (fileStat.st_mode & S_IFDIR) { - _knownDirs[dname] = new DirectoryWatch(_dir, _relDir + PATH_SEPERATOR + dname); - monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - _knownDirs[dname]->addMonitor(*monIter); - monIter++; - } - } else { - monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - if (reportAsExisting) { - (*monIter)->handleChanges(EXISTING, _dir, _relDir + PATH_SEPERATOR + dname, fileStat); - } else { - (*monIter)->handleChanges(ADDED, _dir, _relDir + PATH_SEPERATOR + dname, fileStat); - } - monIter++; - } - } - } - - _knownEntries[dname] = fileStat; // gets copied on insertion -#ifndef WIN32 - } - closedir(dp); -#else - } - while (FindNextFile(hFind, &ffd) != 0); - FindClose(hFind); -#endif - // are there any known entries we have not seen this time around? - std::map::iterator fileIter = _knownEntries.begin(); - while(fileIter != _knownEntries.end()) { - if (currEntries.find(fileIter->first) == currEntries.end()) { - // we used to know this file - if (fileIter->second.st_mode & S_IFDIR) { - if (_recurse) { - _knownDirs[fileIter->first]->reportAsDeleted(); - delete _knownDirs[fileIter->first]; - _knownDirs.erase(fileIter->first); - } - } else { - monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - (*monIter)->handleChanges(DELETED, _dir, _relDir + PATH_SEPERATOR + fileIter->first, fileIter->second); - monIter++; - } - } - _knownEntries.erase(fileIter++); - } else { - fileIter++; - } - } - // remember when we last checked the directory for modifications -#ifndef WIN32 - time(&_lastChecked); -#else - // TODO: this will fail with sub-millisecond updates to the directory - _lastChecked = dirStat.st_mtime + 1; -#endif - // update all directories - } - if (_recurse) { - std::map::iterator dirIter = _knownDirs.begin(); - while(dirIter != _knownDirs.end()) { - dirIter->second->updateEntries(); - dirIter++; - } - } -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.h b/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.h deleted file mode 100644 index 85f5174..0000000 --- a/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.h +++ /dev/null @@ -1,139 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef DIRMONINVOKER_H_W09J90F0 -#define DIRMONINVOKER_H_W09J90F0 - -#include -#include -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class DirectoryWatchMonitor; - -class DirectoryWatch { -public: - enum Action { - ADDED = 1, - MODIFIED = 2, - DELETED = 4, - EXISTING = 8 - }; - - DirectoryWatch(const std::string& dir, bool recurse = false) : _dir(dir), _recurse(recurse), _lastChecked(0) {} - ~DirectoryWatch(); - - void addMonitor(DirectoryWatchMonitor* monitor) { - _monitors.insert(monitor); - } - void removeMonitor(DirectoryWatchMonitor* monitor) { - _monitors.erase(monitor); - } - void updateEntries(bool reportAsExisting = false); - void reportAsDeleted(); - - std::map getAllEntries() { - std::map entries; - entries.insert(_knownEntries.begin(), _knownEntries.end()); - - std::map::iterator dirIter = _knownDirs.begin(); - while(dirIter != _knownDirs.end()) { - std::map dirEntries = dirIter->second->getAllEntries(); - std::map::iterator dirEntryIter = dirEntries.begin(); - while(dirEntryIter != dirEntries.end()) { - entries[dirIter->first + '/' + dirEntryIter->first] = dirEntryIter->second; - dirEntryIter++; - } - dirIter++; - } - - return entries; - } - -protected: - DirectoryWatch(const std::string& dir, const std::string& relDir) : _dir(dir), _relDir(relDir), _recurse(true), _lastChecked(0) {} - - std::string _dir; - std::string _relDir; - - bool _recurse; - std::map _knownEntries; - std::map _knownDirs; - std::set _monitors; - typedef std::set _monitors_t; - time_t _lastChecked; -}; - -class DirectoryWatchMonitor { -public: - virtual void handleChanges(DirectoryWatch::Action action, const std::string dir, const std::string file, struct stat fileStat) = 0; -}; - -class DirMonInvoker : public InvokerImpl, public DirectoryWatchMonitor { -public: - DirMonInvoker(); - virtual ~DirMonInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("dirmon"); - names.push_back("DirectoryMonitor"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#dirmon"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - - virtual void handleChanges(DirectoryWatch::Action action, const std::string dir, const std::string file, struct stat fileStat); - - static void run(void* instance); - -protected: - bool _reportExisting; - bool _reportHidden; - bool _recurse; - - std::string _dir; - std::set _suffixes; - - bool _isRunning; - tthread::thread* _thread; - tthread::recursive_mutex _mutex; - - DirectoryWatch* _watcher; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(DirMonInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: DIRMONINVOKER_H_W09J90F0 */ diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/CompositeDisplay.cpp b/src/uscxml/plugins/invoker/graphics/openscenegraph/CompositeDisplay.cpp deleted file mode 100644 index bf4fac7..0000000 --- a/src/uscxml/plugins/invoker/graphics/openscenegraph/CompositeDisplay.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "CompositeDisplay.h" -#if 0 -#ifdef MACOSX -USE_GRAPICSWINDOW_IMPLEMENTATION(Cocoa) -#else -USE_GRAPHICSWINDOW() -#endif -#endif - -CompositeDisplay::CompositeDisplay(unsigned int x, - unsigned int y, - unsigned int width, - unsigned int height, - int screenId) { - _waitForViewOp = false; - unsigned int tWidth = 0; - unsigned int tHeight = 0; - getResolution(tWidth, tHeight, screenId); - - osg::ref_ptr traits = new osg::GraphicsContext::Traits; - traits->doubleBuffer = true; - traits->sharedContext = 0; - traits->screenNum = screenId; - - if (width == 0 || height == 0 || (width == tWidth && height == tHeight)) { - // fullscreen - traits->windowDecoration = false; - traits->width = tWidth; - traits->height = tHeight; - traits->x = 0; - traits->y = 0; - } else { - // Start with given resolution - traits->windowDecoration = true; - traits->x = x; - traits->y = y; - traits->width = width; - traits->height = height; - } - - _gc = osg::GraphicsContext::createGraphicsContext(traits.get()); - if (_gc.valid()) { - _gc->setClearColor(osg::Vec4f(1.0f,1.0f,1.0f,1.0f)); - _gc->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - } - - _width = traits->width; - _height = traits->height; - - setRunMaxFrameRate(30); -// setRunFrameScheme(osgViewer::ViewerBase::ON_DEMAND); - setThreadingModel(osgViewer::Viewer::AutomaticSelection); -} - -CompositeDisplay::~CompositeDisplay() {} - -void CompositeDisplay::frame(double simulationTime) { - tthread::lock_guard lock(_mutex); - CompositeViewer::frame(); -} - -bool CompositeDisplay::checkNeedToDoFrame() { - return CompositeViewer::checkNeedToDoFrame(); -} - -void CompositeDisplay::addView(const std::string& name, osg::Viewport* v, osgViewer::View* view) { - tthread::lock_guard lock(_mutex); - _viewports[name] = v; - - _views[name] = view; - _views[name]->setName(name); - _views[name]->getCamera()->setName(name); - _views[name]->setCameraManipulator(new osgGA::TrackballManipulator); - - // add the state manipulator - osg::ref_ptr statesetManipulator = new osgGA::StateSetManipulator; - statesetManipulator->setStateSet(_views[name]->getCamera()->getOrCreateStateSet()); - _views[name]->addEventHandler( statesetManipulator.get() ); - - _views[name]->addEventHandler( new osgViewer::StatsHandler ); - _views[name]->addEventHandler( new osgViewer::HelpHandler ); - _views[name]->addEventHandler( new osgViewer::WindowSizeHandler ); - _views[name]->addEventHandler( new osgViewer::ThreadingHandler ); - - _views[name]->getCamera()->setViewport(v); - - // set graphic context - _views[name]->getCamera()->setGraphicsContext(_gc.get()); - CompositeViewer::addView(_views[name]); - -} - -void CompositeDisplay::moveView(const std::string& name, osg::Viewport* v) { - tthread::lock_guard lock(_mutex); - const osg::GraphicsContext::Traits* traits = _gc->getTraits(); - osg::Viewport* absoluteVp = new osg::Viewport(v->x() * (traits->width/100.0), - v->y() * (traits->height/100.0), - v->width() * (traits->width/100.0), - v->height() * (traits->height/100.0)); - _views[name]->getCamera()->setViewport(absoluteVp); -} - -void CompositeDisplay::removeView(const std::string& name) { - tthread::lock_guard lock(_mutex); - - _views[name]->getCamera()->setGraphicsContext(NULL); - _views[name]->getCamera()->setViewport(NULL); - - CompositeViewer::removeView(_views[name]); - - if (_views.find(name) != _views.end()) { - _views.erase(name); - } - if (_viewports.find(name) != _viewports.end()) - _viewports.erase(name); -} - -osg::GraphicsContext::WindowingSystemInterface* CompositeDisplay::wsi = NULL; -void CompositeDisplay::getResolution(unsigned int& width, unsigned int& height, int screenId) { - if (!wsi) - wsi = osg::GraphicsContext::getWindowingSystemInterface(); - if (wsi) { - wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(screenId), width, height); - } else { - width = 800; - height = 600; - } -} diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/CompositeDisplay.h b/src/uscxml/plugins/invoker/graphics/openscenegraph/CompositeDisplay.h deleted file mode 100644 index 6c2adac..0000000 --- a/src/uscxml/plugins/invoker/graphics/openscenegraph/CompositeDisplay.h +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef COMPOSITEDISPLAY_H_W2MX9CXP -#define COMPOSITEDISPLAY_H_W2MX9CXP - -#include "uscxml/concurrency/tinythread.h" -#include -#include -#include -#include -#include -#include -#include - -class CompositeDisplay : public osgViewer::CompositeViewer { -public: - CompositeDisplay(unsigned int x, - unsigned int y, - unsigned int width, - unsigned int height, - int screenId); - virtual ~CompositeDisplay(); - - virtual void addView(const std::string& name, osg::Viewport* v, osgViewer::View* view); - virtual void moveView(const std::string& name, osg::Viewport* v); - virtual void removeView(const std::string& name); - - virtual void frame(double simulationTime); - virtual bool checkNeedToDoFrame(); - - int getWidth() { - return _width; - } - int getHeight() { - return _height; - } - - static void getResolution(unsigned int& width, unsigned int& height, int screenId); - -protected: - tthread::recursive_mutex _mutex; - tthread::condition_variable _monitor; - bool _waitForViewOp; - std::map _views; - std::map _viewports; - osg::ref_ptr _gc; - - static osg::GraphicsContext::WindowingSystemInterface* wsi; - int _width, _height; -}; - - -#endif /* end of include guard: COMPOSITEDISPLAY_H_W2MX9CXP */ diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp deleted file mode 100644 index d2bf74d..0000000 --- a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp +++ /dev/null @@ -1,722 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include - -#include "OSGInvoker.h" -#include "uscxml/URL.h" -#include "uscxml/UUID.h" -#include "uscxml/dom/DOMUtils.h" -#include - -#include -#include -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -#define OSG_SET_MATERIAL \ -osg::ref_ptr mat = getMaterial(element); \ -if (mat) { \ - osg::ref_ptr nodeSS = geode->getOrCreateStateSet(); \ -\ - nodeSS->setAttribute(mat.get()); \ - nodeSS->setMode( GL_BLEND, osg::StateAttribute::ON ); \ -/* nodeSS->setRenderingHint( osg::StateSet::TRANSPARENT_BIN ); \ - nodeSS->setMode( GL_DEPTH_TEST, osg::StateAttribute::ON ); \ - osg::Depth* depth = new osg::Depth; \ - depth->setWriteMask( false ); \ - nodeSS->setAttributeAndModes( depth, osg::StateAttribute::ON ); \ - nodeSS->setMode( GL_LIGHTING, osg::StateAttribute::OFF );*/ \ -} - -#define OSG_SET_COLOR \ -bool validColor = true; \ -osg::Vec4 color = getColor(element, "color", validColor); \ -if (validColor) \ -drawable->setColor(color); - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new OSGInvokerProvider() ); - return true; -} -#endif - -#define OSG_TAG_HANDLE(tagName, procFunc) \ -} else if (iequals(LOCALNAME(childElem), tagName) && \ - validChildren.find(tagName) != validChildren.end()) { \ - procFunc(childElem);\ - - -OSGInvoker::OSGInvoker() { -} - -OSGInvoker::~OSGInvoker() { -}; - -boost::shared_ptr OSGInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr (new OSGInvoker()); - invoker->_interpreter = interpreter; - return invoker; -} - -Data OSGInvoker::getDataModelVariables() { - Data data; - return data; -} - -void OSGInvoker::send(const SendRequest& req) { - if (iequals(req.name, "intersect")) { - - } -} - -void OSGInvoker::cancel(const std::string sendId) { -} - -void OSGInvoker::invoke(const InvokeRequest& req) { - tthread::lock_guard lock(_mutex); - - setupColors(); - -// std::cout << req.dom; - - // register default event handlers - Arabica::DOM::Events::EventTarget evTarget = Arabica::DOM::Events::EventTarget(req.dom); - evTarget.addEventListener("DOMSubtreeModified", *this, false); - evTarget.addEventListener("DOMNodeInserted", *this, false); - evTarget.addEventListener("DOMNodeRemoved", *this, false); - evTarget.addEventListener("DOMAttrModified", *this, false); - - std::set validChilds; - validChilds.insert("display"); - - // this is somewhat unfortunate, if content contains a single child, we will get that, otherwise its parent () - if (iequals(LOCALNAME(req.dom), "display")) { - processChildren(validChilds, req.dom.getParentNode()); - } else { - processChildren(validChilds, req.dom); - } -} - -void OSGInvoker::setupColors() { - _colors["red"] = osg::Vec4(1.0, 0.0, 0.0, 1.0); - _colors["cyan"] = osg::Vec4(0.0, 1.0, 1.0, 1.0); - _colors["blue"] = osg::Vec4(0.0, 0.0, 1.0, 1.0); - _colors["darkblue"] = osg::Vec4(0.0, 0.0, 0.625, 1.0); - _colors["lightblue"] = osg::Vec4(0.675, 0.84375,0.89844,1.0); - _colors["purple"] = osg::Vec4(0.5, 0.0, 0.5, 1.0); - _colors["yellow"] = osg::Vec4(1.0, 1.0, 0.0, 1.0); - _colors["lime"] = osg::Vec4(0.0, 1.0, 0.0, 1.0); - _colors["magenta"] = osg::Vec4(1.0, 0.0, 1.0, 1.0); - _colors["white"] = osg::Vec4(1.0, 1.0, 1.0, 1.0); - _colors["silver"] = osg::Vec4(0.75, 0.75, 0.75, 1.0); - _colors["grey"] = osg::Vec4(0.5, 0.5, 0.5, 1.0); - _colors["gray"] = osg::Vec4(0.5, 0.5, 0.5, 1.0); - _colors["black"] = osg::Vec4(0.0, 0.0, 0.0, 1.0); - _colors["orange"] = osg::Vec4(1.0, 0.644, 0.0, 1.0); - _colors["brown"] = osg::Vec4(0.644, 0.164, 0.164, 1.0); - _colors["maroon"] = osg::Vec4(0.5, 0.0, 0.0, 1.0); - _colors["green"] = osg::Vec4(0.0, 0.5, 0.0, 1.0); - _colors["olive"] = osg::Vec4(0.5, 0.5, 0.0, 1.0); -} - -void OSGInvoker::runOnMainThread() { - _displays_t::iterator dispIter = _displays.begin(); - if (_mutex.try_lock()) { - while(dispIter != _displays.end()) { - dispIter->second->osgViewer::ViewerBase::frame(); - dispIter++; - } - _mutex.unlock(); - } -} - -void OSGInvoker::handleEvent(Arabica::DOM::Events::Event& event) { -// std::cout << "Handling Event!" << std::endl; - Arabica::DOM::Node node(event.getTarget()); - if (_nodes.find(node) != _nodes.end()) { - osg::ref_ptr osgNode = _nodes[node]; - if (false) { - } else if (iequals(LOCALNAME(node), "rotation")) { - updateRotation(osgNode, event); - } - } -} - -void OSGInvoker::processDisplay(const Arabica::DOM::Element& element) { -// std::cout << element << std::endl; - - if (_displays.find(element) == _displays.end()) { - - int screenId = 0; - unsigned int actualX = 0; - unsigned int actualY = 0; - unsigned int actualWidth = 0; - unsigned int actualHeight = 0; - getViewport(element, actualX, actualY, actualWidth, actualHeight, screenId); - - CompositeDisplay* compDisp = new CompositeDisplay(actualX, actualY, actualWidth, actualHeight, screenId); - _displays[element] = compDisp; - - std::set validChilds; - validChilds.insert("viewport"); - processChildren(validChilds, element); - } -} - -void OSGInvoker::processViewport(const Arabica::DOM::Element& element) { - if (_displays.find(element.getParentNode()) == _displays.end()) - return; - - CompositeDisplay* compDisp = _displays[element.getParentNode()]; - osgViewer::View* sceneView = new osgViewer::View(); - _views[element] = sceneView; - - osg::Group* group = new osg::Group(); - _nodes[element] = group; - sceneView->setSceneData(group); - - std::string name = (HAS_ATTR(element, "id") ? ATTR(element, "id") : UUID::getUUID()); - - unsigned int actualX = 0; - unsigned int actualY = 0; - unsigned int actualWidth = 0; - unsigned int actualHeight = 0; - - getViewport(element, actualX, actualY, actualWidth, actualHeight, compDisp); - osg::Viewport* viewPort = new osg::Viewport(actualX, actualY, actualWidth, actualHeight); - compDisp->addView(name, viewPort, sceneView); - - bool hasBGColor; - osg::Vec4 bgColor = getColor(element, "bgcolor", hasBGColor); - if (hasBGColor) { - sceneView->getCamera()->setClearColor(bgColor); - } else { - sceneView->getCamera()->setClearColor(_colors["white"]); - } - - std::set validChilds; - validChilds.insert("camera"); - validChilds.insert("translation"); - validChilds.insert("rotation"); - validChilds.insert("scale"); - validChilds.insert("node"); - validChilds.insert("sphere"); - validChilds.insert("box"); - validChilds.insert("capsule"); - validChilds.insert("cone"); - validChilds.insert("cylinder"); - processChildren(validChilds, element); -} - -void OSGInvoker::processCamera(const Arabica::DOM::Node& element) {} -void OSGInvoker::updateCamera(osg::ref_ptr node, Arabica::DOM::Events::Event& event) {} - -void OSGInvoker::processTranslation(const Arabica::DOM::Element& element) { - assert(_nodes.find(element.getParentNode()) != _nodes.end()); - osg::ref_ptr node = _nodes[element.getParentNode()]; - - double x = 0, y = 0, z = 0; - if (HAS_ATTR(element, "x")) - x = strTo(ATTR(element, "x")); - if (HAS_ATTR(element, "y")) - y = strTo(ATTR(element, "y")); - if (HAS_ATTR(element, "z")) - z = strTo(ATTR(element, "z")); - - osg::Matrix translate; - translate.makeTranslate(x, y, z); - - osg::MatrixTransform* transform = new osg::MatrixTransform(); - transform->setMatrix(translate); - node->asGroup()->addChild(transform); - _nodes[element] = transform; - - std::set validChilds; - validChilds.insert("translation"); - validChilds.insert("rotation"); - validChilds.insert("scale"); - validChilds.insert("node"); - validChilds.insert("sphere"); - validChilds.insert("box"); - validChilds.insert("capsule"); - validChilds.insert("cone"); - validChilds.insert("cylinder"); - processChildren(validChilds, element); -} - -void OSGInvoker::processRotation(const Arabica::DOM::Element& element) { - assert(_nodes.find(element.getParentNode()) != _nodes.end()); - osg::ref_ptr node = _nodes[element.getParentNode()]; - - osg::Matrix rotation = rotationFromElement(element); - osg::MatrixTransform* transform = new osg::MatrixTransform(); - transform->setMatrix(rotation); - node->asGroup()->addChild(transform); - _nodes[element] = transform; - - std::set validChilds; - validChilds.insert("translation"); - validChilds.insert("rotation"); - validChilds.insert("scale"); - validChilds.insert("node"); - validChilds.insert("sphere"); - validChilds.insert("box"); - validChilds.insert("capsule"); - validChilds.insert("cone"); - validChilds.insert("cylinder"); - processChildren(validChilds, element); -} - -void OSGInvoker::updateRotation(osg::ref_ptr node, Arabica::DOM::Events::Event& event) { - osg::ref_ptr transform = static_cast(node->asTransform()); - if (false) { - } else if (iequals(event.getType(), "DOMAttrModified")) { - osg::Matrix rotation = rotationFromElement(Arabica::DOM::Element(Arabica::DOM::Node(event.getTarget()))); - transform->setMatrix(rotation); - } -} - -osg::Matrix OSGInvoker::rotationFromElement(const Arabica::DOM::Element& element) { - double pitch = 0, roll = 0, yaw = 0; - if (HAS_ATTR(element, "pitch")) { - NumAttr pitchAttr = NumAttr(ATTR(element, "pitch")); - if (iequals(pitchAttr.unit, "deg")) { - pitch = osg::DegreesToRadians(strTo(pitchAttr.value)); - } else if (iequals(pitchAttr.unit, "%")) { - pitch = osg::DegreesToRadians((strTo(pitchAttr.value) * 360) / 100); - } else { - pitch = strTo(pitchAttr.value); - } - } - if (HAS_ATTR(element, "roll")) { - NumAttr rollAttr = NumAttr(ATTR(element, "roll")); - if (iequals(rollAttr.unit, "deg")) { - roll = osg::DegreesToRadians(strTo(rollAttr.value)); - } else if (iequals(rollAttr.unit, "%")) { - roll = osg::DegreesToRadians((strTo(rollAttr.value) * 360) / 100); - } else { - roll = strTo(rollAttr.value); - } - } - if (HAS_ATTR(element, "yaw")) { - NumAttr yawAttr = NumAttr(ATTR(element, "yaw")); - if (iequals(yawAttr.unit, "deg")) { - yaw = osg::DegreesToRadians(strTo(yawAttr.value)); - } else if (iequals(yawAttr.unit, "%")) { - yaw = osg::DegreesToRadians((strTo(yawAttr.value) * 360) / 100); - } else { - yaw = strTo(yawAttr.value); - } - } - - osg::Matrix rotation; - rotation.makeRotate(roll, osg::Vec3(0,1,0), // roll - pitch, osg::Vec3(1,0,0) , // pitch - yaw, osg::Vec3(0,0,1) ); // heading - - return rotation; -} - -void OSGInvoker::processScale(const Arabica::DOM::Element& element) { - assert(_nodes.find(element.getParentNode()) != _nodes.end()); - osg::ref_ptr node = _nodes[element.getParentNode()]; - - double x = 1, y = 1, z = 1; - if (HAS_ATTR(element, "x")) - x = strTo(ATTR(element, "x")); - if (HAS_ATTR(element, "y")) - y = strTo(ATTR(element, "y")); - if (HAS_ATTR(element, "z")) - z = strTo(ATTR(element, "z")); - - osg::Matrix scale; - scale.makeScale(x, y, z); - - osg::MatrixTransform* transform = new osg::MatrixTransform(); - transform->setMatrix(scale); - node->asGroup()->addChild(transform); - _nodes[element] = transform; - - std::set validChilds; - validChilds.insert("translation"); - validChilds.insert("rotation"); - validChilds.insert("scale"); - validChilds.insert("node"); - validChilds.insert("sphere"); - validChilds.insert("box"); - validChilds.insert("capsule"); - validChilds.insert("cone"); - validChilds.insert("cylinder"); - processChildren(validChilds, element); -} - -void OSGInvoker::processNode(const Arabica::DOM::Element& element) { - _nodes_t::iterator nodeIter = _nodes.find(element.getParentNode()); - assert(nodeIter != _nodes.end()); - - assert(_nodes.find(element.getParentNode()) != _nodes.end()); - osg::ref_ptr parent = _nodes[element.getParentNode()]; - - std::string filename; - if (HAS_ATTR(element, "src")) { - filename = ATTR(element, "src"); - - if (filename.length() > 0) { - std::string extension; - size_t extensionStart = filename.find_last_of("."); - if (extensionStart != std::string::npos) { - extension = filename.substr(extensionStart); - } - - URL srcURI(filename); - if (!srcURI.toAbsolute(_interpreter->getBaseURL(element))) { - LOG(ERROR) << "invoke element has relative src URI with no baseURI set."; - return; - } - filename = srcURI.asLocalFile(extension); - osg::ref_ptr model = osgDB::readNodeFile(filename); - if (model.get()) - parent->asGroup()->addChild(model); - - } - } -} - -void OSGInvoker::processSphere(const Arabica::DOM::Element& element) { - assert(_nodes.find(element.getParentNode()) != _nodes.end()); - osg::ref_ptr parent = _nodes[element.getParentNode()]; - - float radius = 1; - osg::Vec3 center(0,0,0); - - if (HAS_ATTR(element, "radius")) { - radius = strTo(ATTR(element, "radius")); - } - - osg::ref_ptr sphere = new osg::Sphere(center, radius); - osg::ref_ptr drawable = new osg::ShapeDrawable(sphere); - osg::ref_ptr geode = new osg::Geode(); - geode->addDrawable(drawable); - - OSG_SET_COLOR; - OSG_SET_MATERIAL; - - _nodes[element] = geode; - - parent->asGroup()->addChild(geode); -} - -void OSGInvoker::updateSphere(osg::ref_ptr node, Arabica::DOM::Events::Event& event) { -} - -void OSGInvoker::processBox(const Arabica::DOM::Element& element) { - assert(_nodes.find(element.getParentNode()) != _nodes.end()); - osg::ref_ptr parent = _nodes[element.getParentNode()]; - - float x = 1; - float y = 1; - float z = 1; - osg::Vec3 center(0,0,0); - - if (HAS_ATTR(element, "x")) x = strTo(ATTR(element, "x")); - if (HAS_ATTR(element, "y")) y = strTo(ATTR(element, "y")); - if (HAS_ATTR(element, "z")) z = strTo(ATTR(element, "z")); - - osg::ref_ptr box = new osg::Box(center, x, y, z); - osg::ref_ptr drawable = new osg::ShapeDrawable(box); - osg::ref_ptr geode = new osg::Geode(); - geode->addDrawable(drawable); - - OSG_SET_COLOR; - OSG_SET_MATERIAL; - - _nodes[element] = geode; - - parent->asGroup()->addChild(geode); - -} -void OSGInvoker::updateBox(osg::ref_ptr node, Arabica::DOM::Events::Event& event) { -} -void OSGInvoker::processCapsule(const Arabica::DOM::Element& element) { - assert(_nodes.find(element.getParentNode()) != _nodes.end()); - osg::ref_ptr parent = _nodes[element.getParentNode()]; - - float radius = 1; - float height = 1; - osg::Vec3 center(0,0,0); - - if (HAS_ATTR(element, "radius")) radius = strTo(ATTR(element, "radius")); - if (HAS_ATTR(element, "height")) height = strTo(ATTR(element, "height")); - - osg::ref_ptr capsule = new osg::Capsule(center, radius, height); - osg::ref_ptr drawable = new osg::ShapeDrawable(capsule); - osg::ref_ptr geode = new osg::Geode(); - geode->addDrawable(drawable); - - OSG_SET_COLOR; - OSG_SET_MATERIAL; - - _nodes[element] = geode; - parent->asGroup()->addChild(geode); -} -void OSGInvoker::updateCapsule(osg::ref_ptr node, Arabica::DOM::Events::Event& event) { -} - -void OSGInvoker::processCone(const Arabica::DOM::Element& element) { - assert(_nodes.find(element.getParentNode()) != _nodes.end()); - osg::ref_ptr parent = _nodes[element.getParentNode()]; - - float radius = 1; - float height = 1; - osg::Vec3 center(0,0,0); - - if (HAS_ATTR(element, "radius")) radius = strTo(ATTR(element, "radius")); - if (HAS_ATTR(element, "height")) height = strTo(ATTR(element, "height")); - - osg::ref_ptr cone = new osg::Cone(center, radius, height); - osg::ref_ptr drawable = new osg::ShapeDrawable(cone); - osg::ref_ptr geode = new osg::Geode(); - geode->addDrawable(drawable); - - OSG_SET_COLOR; - OSG_SET_MATERIAL; - - _nodes[element] = geode; - - parent->asGroup()->addChild(geode); - -} -void OSGInvoker::updateCone(osg::ref_ptr node, Arabica::DOM::Events::Event& event) { -} - -void OSGInvoker::processCylinder(const Arabica::DOM::Element& element) { - assert(_nodes.find(element.getParentNode()) != _nodes.end()); - osg::ref_ptr parent = _nodes[element.getParentNode()]; - - float radius = 1; - float height = 1; - osg::Vec3 center(0,0,0); - - if (HAS_ATTR(element, "radius")) radius = strTo(ATTR(element, "radius")); - if (HAS_ATTR(element, "height")) height = strTo(ATTR(element, "height")); - - osg::ref_ptr cylinder = new osg::Cylinder(center, radius, height); - osg::ref_ptr drawable = new osg::ShapeDrawable(cylinder); - osg::ref_ptr geode = new osg::Geode(); - geode->addDrawable(drawable); - - OSG_SET_COLOR; - OSG_SET_MATERIAL; - - _nodes[element] = geode; - - parent->asGroup()->addChild(geode); - -} -void OSGInvoker::updateCylinder(osg::ref_ptr node, Arabica::DOM::Events::Event& event) { -} - -osg::Vec4 OSGInvoker::getColor(const Arabica::DOM::Element& element, const std::string& attr, bool& valid) { - if (HAS_ATTR(element, attr)) { - std::string color = ATTR(element, attr); - - // is this one of the predefined colors? - if (_colors.find(color) != _colors.end()) { - valid = true; - return _colors[color]; - } - - // otherwise try to parse as rgba values - int i; - osg::Vec4 colorVec = parseVec4(color, i); - - if (i == 1) { - // only a single value was given, interpret as grey value - colorVec[1] = colorVec[2] = colorVec[0]; - colorVec[3] = 1.0; - valid = true; - return colorVec; - } - - if (i == 3) { - // three values were given, set opacity to max - colorVec[3] = 1.0; - valid = true; - return colorVec; - } - } - - // return empty reference - valid = false; - return osg::Vec4(); -} - -osg::ref_ptr OSGInvoker::getMaterial(const Arabica::DOM::Element& element) { - - osg::ref_ptr nodeMat; - - // material color - bool hasMatColor; - osg::Vec4 matColor = getColor(element, "materialcolor", hasMatColor); - if (hasMatColor) { - if (!nodeMat) - nodeMat = new osg::Material; - nodeMat->setDiffuse(osg::Material::FRONT, matColor); - nodeMat->setDiffuse(osg::Material::BACK, matColor); - } - - // translucency - if (HAS_ATTR(element, "transparency")) { - std::string transparency = ATTR(element, "transparency"); - float trans = strTo(transparency); - if (!nodeMat) - nodeMat = new osg::Material; - nodeMat->setTransparency(osg::Material::FRONT, trans); - nodeMat->setTransparency(osg::Material::BACK, trans); - } - - return nodeMat; -} - -osg::Vec4 OSGInvoker::parseVec4(const std::string& coeffs, int& i) { - - // otherwise try to parse as rgba values - std::string coeff; - std::stringstream coeffSS(coeffs); - - osg::Vec4 vec; - - i = 0; - while(std::getline(coeffSS, coeff, ',')) { - boost::trim(coeff); - if (coeff.length() == 0) - continue; - if (!isNumeric(coeff.c_str(), 10)) - continue; - - vec[i] = strTo(coeff); - i++; - } - return vec; -} - -void OSGInvoker::processChildren(const std::set& validChildren, const Arabica::DOM::Node& element) { - Arabica::DOM::NodeList childs = element.getChildNodes(); - for (int i = 0; i < childs.getLength(); ++i) { - if (childs.item(i).getNodeType() != Arabica::DOM::Node_base::ELEMENT_NODE) - continue; - Arabica::DOM::Element childElem = Arabica::DOM::Element(childs.item(i)); - if (false) { - OSG_TAG_HANDLE("node", processNode); - OSG_TAG_HANDLE("translation", processTranslation); - OSG_TAG_HANDLE("rotation", processRotation); - OSG_TAG_HANDLE("scale", processScale); - OSG_TAG_HANDLE("viewport", processViewport); - OSG_TAG_HANDLE("camera", processCamera); - OSG_TAG_HANDLE("display", processDisplay); - OSG_TAG_HANDLE("sphere", processSphere); - OSG_TAG_HANDLE("box", processBox); - OSG_TAG_HANDLE("cone", processCone); - OSG_TAG_HANDLE("capsule", processCapsule); - OSG_TAG_HANDLE("cylinder", processCylinder); - } else { - LOG(INFO) << "Unknown XML element " << TAGNAME(childElem); - } - } -} - -void OSGInvoker::getViewport(const Arabica::DOM::Element& element, - unsigned int& x, - unsigned int& y, - unsigned int& width, - unsigned int& height, - CompositeDisplay* display) { - getViewport(element, x, y, width, height, display->getWidth(), display->getHeight()); - -} - -void OSGInvoker::getViewport(const Arabica::DOM::Element& element, - unsigned int& x, - unsigned int& y, - unsigned int& width, - unsigned int& height, - int& screenId) { - - screenId = (HAS_ATTR(element, "screenId") ? strTo(ATTR(element, "screenId")) : 0); - - unsigned int fullWidth = 0; - unsigned int fullHeight = 0; - CompositeDisplay::getResolution(fullWidth, fullHeight, screenId); - getViewport(element, x, y, width, height, fullWidth, fullHeight); -} - -void OSGInvoker::getViewport(const Arabica::DOM::Element& element, - unsigned int& x, - unsigned int& y, - unsigned int& width, - unsigned int& height, - unsigned int fullWidth, - unsigned int fullHeight) { - if (HAS_ATTR(element, "x")) { - NumAttr xAttr = NumAttr(ATTR(element, "x")); - x = strTo(xAttr.value); - if (iequals(xAttr.unit, "%")) - x = (x * fullWidth) / 100; - } - if (HAS_ATTR(element, "y")) { - NumAttr yAttr = NumAttr(ATTR(element, "y")); - y = strTo(yAttr.value); - if (iequals(yAttr.unit, "%")) - y = (y * fullHeight) / 100; - } - if (HAS_ATTR(element, "width")) { - NumAttr widthAttr = NumAttr(ATTR(element, "width")); - width = strTo(widthAttr.value); - if (iequals(widthAttr.unit, "%")) - width = (width * fullWidth) / 100; - } - if (HAS_ATTR(element, "height")) { - NumAttr heightAttr = NumAttr(ATTR(element, "height")); - height = strTo(heightAttr.value); - if (iequals(heightAttr.unit, "%")) - height = (height * fullHeight) / 100; - } -} - -osgViewer::View* OSGInvoker::getView(const Arabica::DOM::Node& element) { - Arabica::DOM::Node curr = element; - while(curr && !iequals(LOCALNAME(curr), "viewport")) { - curr = curr.getParentNode(); - } - if (curr && _views.find(curr) != _views.end()) - return _views[curr]; - return NULL; -} - - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h deleted file mode 100644 index 30be8ca..0000000 --- a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h +++ /dev/null @@ -1,148 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef OSGINVOKER_H_H6T4R8HU -#define OSGINVOKER_H_H6T4R8HU - -#include -#include -#include -#include - -#include "CompositeDisplay.h" -#include -#include -#include - -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class OSGInvoker : public InvokerImpl, public Arabica::DOM::Events::EventListener { -public: - OSGInvoker(); - virtual ~OSGInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("3d"); - names.push_back("scenegraph"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#3d"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - virtual void handleEvent(Arabica::DOM::Events::Event& event); - - virtual void runOnMainThread(); - -protected: - void processDisplay(const Arabica::DOM::Element& element); - void updateDisplay(osg::ref_ptr node, Arabica::DOM::Events::Event& event); - void processViewport(const Arabica::DOM::Element& element); - void updateViewport(osg::ref_ptr node, Arabica::DOM::Events::Event& event); - void processCamera(const Arabica::DOM::Node& element); - void updateCamera(osg::ref_ptr node, Arabica::DOM::Events::Event& event); - - void processTranslation(const Arabica::DOM::Element& element); - void updateTranslation(osg::ref_ptr node, Arabica::DOM::Events::Event& event); - - void processRotation(const Arabica::DOM::Element& element); - void updateRotation(osg::ref_ptr node, Arabica::DOM::Events::Event& event); - static osg::Matrix rotationFromElement(const Arabica::DOM::Element& element); - - void processScale(const Arabica::DOM::Element& element); - void updateScale(osg::ref_ptr node, Arabica::DOM::Events::Event& event); - - void processNode(const Arabica::DOM::Element& element); - void updateNode(osg::ref_ptr node, Arabica::DOM::Events::Event& event); - - void processSphere(const Arabica::DOM::Element& element); - void updateSphere(osg::ref_ptr node, Arabica::DOM::Events::Event& event); - void processBox(const Arabica::DOM::Element& element); - void updateBox(osg::ref_ptr node, Arabica::DOM::Events::Event& event); - void processCapsule(const Arabica::DOM::Element& element); - void updateCapsule(osg::ref_ptr node, Arabica::DOM::Events::Event& event); - void processCone(const Arabica::DOM::Element& element); - void updateCone(osg::ref_ptr node, Arabica::DOM::Events::Event& event); - void processCylinder(const Arabica::DOM::Element& element); - void updateCylinder(osg::ref_ptr node, Arabica::DOM::Events::Event& event); - - osg::Vec4 getColor(const Arabica::DOM::Element& element, const std::string& attr, bool& valid); - osg::ref_ptr getMaterial(const Arabica::DOM::Element& element); - osg::Vec4 parseVec4(const std::string& coeffs, int& number); - - void processChildren(const std::set& validChildren, const Arabica::DOM::Node& element); - - void getViewport(const Arabica::DOM::Element& element, - unsigned int& x, - unsigned int& y, - unsigned int& width, - unsigned int& height, - int& screenId); - - void getViewport(const Arabica::DOM::Element& element, - unsigned int& x, - unsigned int& y, - unsigned int& width, - unsigned int& height, - CompositeDisplay* display); - - void getViewport(const Arabica::DOM::Element& element, - unsigned int& x, - unsigned int& y, - unsigned int& width, - unsigned int& height, - unsigned int fullWidth, - unsigned int fullHeight); - - osgViewer::View* getView(const Arabica::DOM::Node& element); - - std::map, CompositeDisplay*> _displays; - typedef std::map, CompositeDisplay*> _displays_t; - - std::map, osgViewer::View*> _views; - typedef std::map, osgViewer::View*> _views_t; - - std::map, osg::ref_ptr > _nodes; - typedef std::map, osg::ref_ptr > _nodes_t; - - void setupColors(); - std::map _colors; - typedef std::map _colors_t; - - tthread::recursive_mutex _mutex; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(OSGInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: OSGINVOKER_H_H6T4R8HU */ diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp b/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp deleted file mode 100644 index 2a68be7..0000000 --- a/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp +++ /dev/null @@ -1,611 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "OSGConverter.h" -#include -#include "uscxml/config.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -#define EVAL_PARAM_EXPR(param, expr, key) \ -if (param.find(key) == param.end() && param.find(expr) != param.end() && _interpreter->getDataModel()) \ - param.insert(std::make_pair(key, Data(_interpreter->getDataModel().evalAsString(param.find(expr)->second.atom), Data::INTERPRETED))); - -#define CAST_PARAM(param, var, key, type) \ -if (param.find(key) != param.end()) { \ - try { var = boost::lexical_cast(param.find(key)->second.atom); } \ - catch(...) { LOG(ERROR) << "Attribute " key " of sendrequest to osgconverter is of invalid format: " << param.find(key)->second.atom; } \ -} - - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new OSGConverterProvider() ); - return true; -} -#endif - -OSGConverter::OSGConverter() : _isRunning(false) { -// osg::setNotifyLevel(osg::DEBUG_FP); - osg::setNotifyLevel(osg::FATAL); -} - -OSGConverter::~OSGConverter() { - _isRunning = false; - std::set::iterator threadIter = _threads.begin(); - while(threadIter != _threads.end()) { - (*threadIter)->join(); - } -}; - -boost::shared_ptr OSGConverter::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new OSGConverter()); - invoker->_interpreter = interpreter; - return invoker; -} - -Data OSGConverter::getDataModelVariables() { - Data data; - return data; -} - -void OSGConverter::send(const SendRequest& req) { - - /** - * we have to resolve all datamodel dependent strings first as - * we cannot access the datamodel from within another thread without locking - */ - - // make a copy - SendRequest actualReq(req); - - if (actualReq.params.find("source") == actualReq.params.end()) { - // no explicit source - if (actualReq.params.find("sourceexpr") != actualReq.params.end() && _interpreter->getDataModel()) { - actualReq.params.insert(std::make_pair("source", _interpreter->getDataModel().getStringAsData(actualReq.params.find("sourceexpr")->second))); - } else { - LOG(ERROR) << "SendRequests for osginvoker missing source or sourceExpr and datamodel"; - reportFailure(req); - return; - } - } - - if (actualReq.params.find("dest") == actualReq.params.end()) { - // no explicit destination - if (actualReq.params.find("destexpr") != actualReq.params.end() && _interpreter->getDataModel()) { - actualReq.params.insert(std::make_pair("dest", _interpreter->getDataModel().getStringAsData(actualReq.params.find("destexpr")->second))); - boost::algorithm::replace_all(actualReq.params.find("dest")->second.atom, "//", "/"); - boost::algorithm::replace_all(actualReq.params.find("dest")->second.atom, "\\\\", "\\"); - } - } - - if (actualReq.params.find("autorotate") == actualReq.params.end()) { - if (actualReq.params.find("autorotateexpr") != actualReq.params.end()) { - if (_interpreter->getDataModel()) { - actualReq.params.insert(std::make_pair("autorotate", _interpreter->getDataModel().getStringAsData(actualReq.params.find("autorotateexpr")->second))); - } else { - LOG(ERROR) << "SendRequests for osginvoker ncludes autorotateexpr but no datamodel is specified"; - reportFailure(req); - return; - } - } - } - - // support for multiple formats at the same time - std::list formats; - Event::getParam(req.params, "format", formats); - for (std::list::const_iterator formatIter = formats.begin(); formatIter != formats.end(); formatIter++) { - actualReq.params.insert(std::make_pair("format", *formatIter)); - } - - // format given as expression - std::list formatExprs; - Event::getParam(req.params, "formatexpr", formatExprs); - for (std::list::const_iterator formatIter = formatExprs.begin(); formatIter != formatExprs.end(); formatIter++) { - actualReq.params.insert(std::make_pair("format", _interpreter->getDataModel().getStringAsData(*formatIter))); - } - - if (actualReq.params.find("format") == actualReq.params.end()) { - // no explicit format, try to get from destination - std::string dest; - if (Event::getParam(actualReq.params, "dest", dest)) { - std::string format; - size_t lastDot; - if ((lastDot = dest.find_last_of(".")) != std::string::npos) { - lastDot++; - format = dest.substr(lastDot, dest.length() - lastDot); - actualReq.params.insert(std::make_pair("format", Data(format, Data::VERBATIM))); - } - } - } - - if (actualReq.params.find("format") == actualReq.params.end()) { - LOG(ERROR) << "missing format"; - reportFailure(req); - return; - } - - EVAL_PARAM_EXPR(actualReq.params, "heightexpr", "height"); - EVAL_PARAM_EXPR(actualReq.params, "widthexpr", "width"); - EVAL_PARAM_EXPR(actualReq.params, "pitchexpr", "pitch"); - EVAL_PARAM_EXPR(actualReq.params, "rollexpr", "roll"); - EVAL_PARAM_EXPR(actualReq.params, "yawexpr", "yaw"); - EVAL_PARAM_EXPR(actualReq.params, "zoomexpr", "zoom"); - EVAL_PARAM_EXPR(actualReq.params, "xexpr", "x"); - EVAL_PARAM_EXPR(actualReq.params, "yexpr", "y"); - EVAL_PARAM_EXPR(actualReq.params, "zexpr", "z"); - -// process(actualReq); - _workQueue.push(actualReq); -} - -void OSGConverter::cancel(const std::string sendId) { -} - -void OSGConverter::invoke(const InvokeRequest& req) { - int nrThreads = 1; - - if (req.params.find("threads") != req.params.end() && isNumeric(req.params.find("threads")->second.atom.c_str(), 10)) { - nrThreads = strTo(req.params.find("threads")->second); - } - - _isRunning = true; - for (int i = 0; i < nrThreads; i++) { - _threads.insert(new tthread::thread(OSGConverter::run, this)); - } -} - -void OSGConverter::run(void* instance) { - OSGConverter* INSTANCE = (OSGConverter*)instance; - while(true) { - SendRequest req = INSTANCE->_workQueue.pop(); - if (INSTANCE->_isRunning) { - INSTANCE->process(req); - } else { - return; - } - } -} - -void OSGConverter::process(const SendRequest& req) { - -// std::cout << req; - - int width = 640; - int height = 480; - Event::getParam(req.params, "width", width); - Event::getParam(req.params, "height", height); - - assert(req.params.find("source") != req.params.end()); - assert(req.params.find("format") != req.params.end()); - - std::string source; - if (!Event::getParam(req.params, "source", source)) { - reportFailure(req); - LOG(ERROR) << "No source given for convert request"; - return; - } - - std::string dest; - Event::getParam(req.params, "dest", dest); - - std::list formats; - if (!Event::getParam(req.params, "format", formats)) { - reportFailure(req); - LOG(ERROR) << "No format given for convert request"; - return; - } - - bool autoRotate = true; - if (req.params.find("autorotate") != req.params.end()) { - if (iequals(req.params.find("autorotate")->second.atom, "off") || - iequals(req.params.find("autorotate")->second.atom, "0") || - iequals(req.params.find("autorotate")->second.atom, "false")) { - autoRotate = false; - } - } - - bool optimizeGeometry = false; - if (req.params.find("optimizegeometry") != req.params.end()) { - if (iequals(req.params.find("optimizegeometry")->second.atom, "on") || - iequals(req.params.find("optimizegeometry")->second.atom, "1") || - iequals(req.params.find("optimizegeometry")->second.atom, "true")) { - optimizeGeometry = true; - } - } - - bool antiAliased = true; - if (req.params.find("antialiased") != req.params.end()) { - if (iequals(req.params.find("antialiased")->second.atom, "off") || - iequals(req.params.find("antialiased")->second.atom, "0") || - iequals(req.params.find("antialiased")->second.atom, "false")) { - antiAliased = false; - } - } - - // get the 3D scene - osg::ref_ptr model = setupGraph(source, autoRotate); - if (model->asGroup()->getNumChildren() == 0) { - reportFailure(req); - LOG(ERROR) << "Could not setup scenegraph"; - return; - } - - if (optimizeGeometry) { - osgUtil::Optimizer optimizer; - optimizer.optimize(model, osgUtil::Optimizer::ALL_OPTIMIZATIONS); - } - - Data retContent; - - // setup scenegraph - osg::ref_ptr sceneGraph = new osg::Group(); - sceneGraph->addChild(model); - ((osg::MatrixTransform*)model.get())->setMatrix(requestToModelPose(req)); - osg::BoundingSphere bs = model->getBound(); - - for (std::list::iterator formatIter = formats.begin(); formatIter != formats.end(); formatIter++) { - std::string format = *formatIter; - - osg::ref_ptr writer = osgDB::Registry::instance()->getReaderWriterForExtension(format); - - if (writer.valid()) { - // conversion from 3d model to 3d model - std::stringstream ss; - osgDB::ReaderWriter::WriteResult result; - osgDB::ReaderWriter::Options* rwOptions = new osgDB::ReaderWriter::Options(); - - // pass option to disable tristrips when writing osgjs files - if (strcmp(format.c_str(), "osgjs") == 0) - rwOptions->setOptionString("disableTriStrip"); - - result = writer->writeNode(*sceneGraph, ss, rwOptions); - if (result.success()) { - if (dest.length() > 0) { - std::ofstream outFile(dest.c_str()); - outFile << ss.str(); - } - retContent.compound[format] = Data(ss.str().c_str(), ss.str().size(), URL::getMimeType(format), false); - continue; - } - } - - // conversion from 3d model to image - tthread::lock_guard lock(_viewerMutex); - osgViewer::Viewer viewer; - osg::Camera *camera = viewer.getCamera(); - - osg::ref_ptr traits = new - osg::GraphicsContext::Traits; - traits->width = width; - traits->height = height; - traits->pbuffer = true; - - traits->readDISPLAY(); - if (antiAliased) { - traits->samples = 4; // to make anti-aliased. - osg::DisplaySettings* ds = osg::DisplaySettings::instance(); - ds->setNumMultiSamples(4); - viewer.setDisplaySettings(ds); - } - osg::GraphicsContext *gc = - osg::GraphicsContext::createGraphicsContext(traits.get()); - - camera->setGraphicsContext(gc); - camera->setDrawBuffer(GL_FRONT); - camera->setViewport(new osg::Viewport(0, 0, width, height)); - - viewer.setSceneData(sceneGraph); - - viewer.setCameraManipulator(new osgGA::TrackballManipulator()); - viewer.getCamera()->setClearColor(osg::Vec4f(1.0f,1.0f,1.0f,1.0f)); - viewer.getCamera()->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - double zoom = 1; - CAST_PARAM(req.params, zoom, "zoom", double); - - viewer.getCameraManipulator()->setByMatrix(osg::Matrix::lookAt(osg::Vec3d(0,0,bs.radius() * (-3.4 * zoom)), // eye - (osg::Vec3d)bs.center(), // center - osg::Vec3d(0,0,1))); // up - - osg::Image *image = new osg::Image(); - camera->attach(osg::Camera::COLOR_BUFFER0, image); - - viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); - viewer.realize(); - viewer.frame(); - - std::string tempFile = URL::getTmpFilename(format); - - if (!osgDB::writeImageFile(*image, tempFile)) { - LOG(ERROR) << "Could write image file at " << tempFile; - return; - } - - // read file into buffer - char* buffer = NULL; - size_t length = 0; - { - std::ifstream file(tempFile.c_str()); - - file.seekg(0, std::ios::end); - length = file.tellg(); - file.seekg(0, std::ios::beg); - buffer = (char*)malloc(length); - file.read(buffer, length); - } - - retContent.compound[format] = Data(buffer, length, URL::getMimeType(format), false); - } - - if (retContent.compound.size()) { - reportSuccess(req, retContent); - } else { - reportFailure(req); - } - return; -} - -void OSGConverter::reportSuccess(const SendRequest& req, const Data& content) { - Event event(req); - -// for (Event::params_t::const_iterator paramIter = req.params.begin(); paramIter != req.params.end(); paramIter++) { -// Data foo = paramIter->second; -// std::cout << paramIter->first << " = " << foo << std::endl; -// } - - if (event.name.length() == 0) - event.name = "convert"; - event.name += ".success"; - - if (!content.empty()) - event.data.compound["content"] = content; - returnEvent(event); -} - -void OSGConverter::reportFailure(const SendRequest& req) { - Event event(req); - if (event.name.length() == 0) - event.name = "convert"; - event.name += ".failure"; - returnEvent(event); -} - -osg::Matrix OSGConverter::requestToModelPose(const SendRequest& req) { - double pitch = 0; - double roll = 0; - double yaw = 0; - double x = 0; - double y = 0; - double z = 0; - CAST_PARAM(req.params, pitch, "pitch", double); - CAST_PARAM(req.params, roll, "roll", double); - CAST_PARAM(req.params, yaw, "yaw", double); - CAST_PARAM(req.params, x, "x", double); - CAST_PARAM(req.params, y, "y", double); - CAST_PARAM(req.params, z, "z", double); - - osg::Matrix m = eulerToMatrix(pitch, roll, yaw) * osg::Matrix::translate(-1 * x, -1 * y, -1 * z); -#if 0 - dumpMatrix(m); -#endif - return m; -} - -osg::Matrix OSGConverter::requestToCamPose(const SendRequest& req) { -// double zoom = 1; -// CAST_PARAM(req.params, zoom, "zoom", double); -// osg::Matrix scale = osg::Matrix::scale(zoom, zoom, zoom); -// return scale; - osg::Matrix identity; - identity.makeIdentity(); - return identity; -} - -osg::ref_ptr OSGConverter::setupGraph(const std::string filename, bool autoRotate) { - - // get some privacy - tthread::lock_guard lock(_cacheMutex); - - /** - * root (model pose) - * - rotate (autoRotate to face largest side) - * - modelCenter (center model) - * - model (actual model) - */ - - long now = tthread::chrono::system_clock::now(); - - { - - // do we have it in the cache? - if (_models.find(filename) == _models.end()) { - osg::ref_ptr model = osgDB::readNodeFile(filename); - if (!model.valid()) { - LOG(ERROR) << "Cannot load model from " << filename; - return new osg::MatrixTransform(); - } - _models[filename] = std::make_pair(now, model); - } - _models[filename].first = now; - -#if 1 - // remove old models from cache - std::map > >::iterator modelIter = _models.begin(); - while(modelIter != _models.end()) { - // delete every model unused for 1 minutes - if (now - modelIter->second.first > 6000) { - _models.erase(modelIter++); - } else { - modelIter++; - } - } - -#endif - } - - osg::ref_ptr root = new osg::MatrixTransform(); - osg::ref_ptr rotate = new osg::MatrixTransform(); - osg::ref_ptr model = _models[filename].second; - - // translation matrix to move model into center - osg::ref_ptr modelCenter = new osg::MatrixTransform(); - modelCenter->addChild(model); - rotate->addChild(modelCenter); - - // move bounding sphere center into origin - osg::BoundingSphere bs = model->getBound(); - modelCenter->setMatrix(osg::Matrix::translate(bs.center() *= -1)); - - // get bounding box - osg::ComputeBoundsVisitor cbv; - osg::BoundingBox& bb(cbv.getBoundingBox()); - modelCenter->accept(cbv); - - if (autoRotate) { - double depth = bb.zMax() - bb.zMin(); - double width = bb.xMax() - bb.xMin(); - double height = bb.yMax() - bb.yMin(); - - double frontArea = width * height; - double sideArea = depth * height; - double topArea = depth * width; - - // rotate by multiples of 90deg to face largest area - if (frontArea < sideArea || frontArea < topArea) { - if (sideArea < topArea) { - // top needs to come to front -> rotate on x - rotate->setMatrix(osg::Matrix::rotate(M_PI_2, osg::Vec3f(1.0,0,0))); - } else { - // side needs to come to front - rotate->setMatrix(osg::Matrix::rotate(M_PI_2, osg::Vec3f(0,1.0,0))); - } - } - } - - // add rotation to root - root->addChild(rotate); - return root; -} - -osg::ref_ptr OSGConverter::getOrigin() { - osg::Geode* geode = new osg::Geode(); -// osg::StateSet* stateset = new osg::StateSet(); -// stateset->setMode(GL_LIGHTING, osg::StateAttribute::ON); -// geode->setStateSet(stateset); - - geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f,0.0f,0.0f),1))); - geode->addDrawable(new osg::ShapeDrawable(new osg::Box(osg::Vec3(10.0f,0.0f,0.0f),0.5))); - geode->addDrawable(new osg::ShapeDrawable(new osg::Box(osg::Vec3(0.0f,10.0f,0.0f),2))); - geode->addDrawable(new osg::ShapeDrawable(new osg::Box(osg::Vec3(0.0f,0.0f,10.0f),4))); - // geode->addDrawable(new osg::ShapeDrawable(new osg::Cone(osg::Vec3(4.0f,0.0f,0.0f),radius,height),hints)); - - return geode; -} - -osg::Matrix OSGConverter::eulerToMatrix(double pitch, double roll, double yaw) { - // see http://www.flipcode.com/documents/matrfaq.html#Q36 - osg::Matrix m; - m.makeIdentity(); - - double A = cos(pitch); - double B = sin(pitch); - double C = cos(roll); - double D = sin(roll); - double E = cos(yaw); - double F = sin(yaw); - - double AD = A * D; - double BD = B * D; - - m(0,0) = C * E; - m(0,1) = -C * F; - m(0,2) = -D; - m(1,0) = -BD * E + A * F; - m(1,1) = BD * F + A * E; - m(1,2) = -B * C; - m(2,0) = AD * E + B * F; - m(2,1) = -AD * F + B * E; - m(2,2) = A * C; - - m(0,3) = m(1,3) = m(2,3) = m(3,0) = m(3,1) = m(3,2) = 0; - m(3,3) = 1; - - return m; -} - -void OSGConverter::matrixToEuler(const osg::Matrix& m, double& pitch, double& roll, double& yaw) { - // see: http://www.flipcode.com/documents/matrfaq.html#Q37 - double angle_x, angle_z; - double D = -1 * asin(m(0,2)); /* Calculate Y-axis angle */ - double angle_y = D; - double C = cos(angle_y); - - /* Gimball lock? */ - if ( fabs( C ) > 0.005 ) { - double tr_x = m(2,2) / C; /* No, so get X-axis angle */ - double tr_y = -1 * m(1,2) / C; - angle_x = atan2( tr_y, tr_x ); - tr_x = m(0,0) / C; /* Get Z-axis angle */ - tr_y = -1 * m(0,1) / C; - angle_z = atan2( tr_y, tr_x ); - } else { - /* Gimball lock has occurred */ - angle_x = 0; /* Set X-axis angle to zero */ - double tr_x = m(1,1); /* And calculate Z-axis angle */ - double tr_y = m(1,0); - angle_z = atan2( tr_y, tr_x ); - } - - pitch = fmod(angle_x, 2 * M_PI ); /* Clamp all angles to range */ - roll = fmod( angle_y, 2 * M_PI ); - yaw = fmod( angle_z, 2 * M_PI ); -} - -void OSGConverter::dumpMatrix(const osg::Matrix& m) { - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - std::cout << ", " << m(i, j); - } - std::cout << std::endl; - } -} - - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.h b/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.h deleted file mode 100644 index 10e6fc9..0000000 --- a/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.h +++ /dev/null @@ -1,89 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef OSGCONVERTER_H_W09J90F0 -#define OSGCONVERTER_H_W09J90F0 - -#include -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class OSGConverter : public InvokerImpl { -public: - OSGConverter(); - virtual ~OSGConverter(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("osgconverter"); - names.push_back("osgconvert"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#osgconverter"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#osgconvert"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - - void reportSuccess(const SendRequest& req, const Data& content); - void reportFailure(const SendRequest& req); - - osg::Matrix requestToModelPose(const SendRequest& req); - osg::Matrix requestToCamPose(const SendRequest& req); - - static void dumpMatrix(const osg::Matrix& m); - static osg::Matrix eulerToMatrix(double pitch, double roll, double yaw); - static void matrixToEuler(const osg::Matrix& m, double& pitch, double& roll, double& yaw); - -protected: - - uscxml::concurrency::BlockingQueue _workQueue; - osg::ref_ptr setupGraph(const std::string filename, bool autoRotate = false); - osg::ref_ptr getOrigin(); - - tthread::recursive_mutex _viewerMutex; - - std::map > > _models; - tthread::recursive_mutex _cacheMutex; - - std::set _threads; - - static void run(void*); - void process(const SendRequest& req); - - bool _isRunning; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(OSGConverter, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: OSGCONVERTER_H_W09J90F0 */ diff --git a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp deleted file mode 100644 index 0b54228..0000000 --- a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include - -#include "HeartbeatInvoker.h" -#include "uscxml/dom/DOMUtils.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new HeartbeatInvokerProvider() ); - return true; -} -#endif - -HeartbeatInvoker::HeartbeatInvoker() { -} - -HeartbeatInvoker::~HeartbeatInvoker() { - cancel(""); -}; - -boost::shared_ptr HeartbeatInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new HeartbeatInvoker()); - invoker->_interpreter = interpreter; - return invoker; -} - -Data HeartbeatInvoker::getDataModelVariables() { - Data data; - return data; -} - -void HeartbeatInvoker::send(const SendRequest& req) { -} - -void HeartbeatInvoker::cancel(const std::string sendId) { - HeartbeatDispatcher::getInstance()->cancelEvent(toStr(this)); -} - -void HeartbeatInvoker::invoke(const InvokeRequest& req) { - _invokeId = req.invokeid; - _event.invokeid = _invokeId; - std::string intervalStr; - double interval = 0; - unsigned long intervalMs = 0; - InvokeRequest::params_t::const_iterator paramIter = req.params.begin(); - while(paramIter != req.params.end()) { - if (iequals(paramIter->first, "interval")) { - intervalStr = paramIter->second.atom; - NumAttr intervalAttr(paramIter->second.atom); - interval = strTo(intervalAttr.value); - if (false) { - } else if (iequals(intervalAttr.unit, "s")) { - intervalMs = interval * 1000; - } else if (iequals(intervalAttr.unit, "ms")) { - intervalMs = interval; - } else { - intervalMs = interval; - } - } - if (iequals(paramIter->first, "eventname")) { - _event.name = paramIter->second.atom; - } - paramIter++; - } - if (_event.name.length() == 0) - _event.name = std::string("heartbeat." + intervalStr); - - if (intervalMs > 0) { - HeartbeatDispatcher::getInstance()->addEvent(toStr(this), HeartbeatInvoker::dispatch, intervalMs, this, true); - } -} - -void HeartbeatInvoker::dispatch(void* instance, std::string name) { - HeartbeatInvoker* invoker = (HeartbeatInvoker*)instance; - invoker->returnEvent(invoker->_event); -} - -HeartbeatDispatcher* HeartbeatDispatcher::_instance = NULL; -HeartbeatDispatcher* HeartbeatDispatcher::getInstance() { - if (_instance == NULL) { - _instance = new HeartbeatDispatcher(); - _instance->start(); - } - return _instance; -} - -HeartbeatDispatcher::HeartbeatDispatcher() {} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h deleted file mode 100644 index f0bc32c..0000000 --- a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef HEARTBEATINVOKER_H_W09J90F0 -#define HEARTBEATINVOKER_H_W09J90F0 - -#include -#include "uscxml/concurrency/DelayedEventQueue.h" - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class HeartbeatInvoker : public InvokerImpl { -public: - HeartbeatInvoker(); - virtual ~HeartbeatInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("heartbeat"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#heartbeat"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - - static void dispatch(void* instance, std::string name); - -protected: - Event _event; - -}; - -class HeartbeatDispatcher : public DelayedEventQueue { -public: - static HeartbeatDispatcher* getInstance(); -protected: - static HeartbeatDispatcher* _instance; - HeartbeatDispatcher(); -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(HeartbeatInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: HEARTBEATINVOKER_H_W09J90F0 */ diff --git a/src/uscxml/plugins/invoker/http/HTTPServletInvoker.cpp b/src/uscxml/plugins/invoker/http/HTTPServletInvoker.cpp deleted file mode 100644 index 1e0fced..0000000 --- a/src/uscxml/plugins/invoker/http/HTTPServletInvoker.cpp +++ /dev/null @@ -1,137 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "HTTPServletInvoker.h" -#include - -#include "uscxml/config.h" - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new HTTPServletInvokerProvider() ); - return true; -} -#endif - -HTTPServletInvoker::HTTPServletInvoker() { -} - -HTTPServletInvoker::~HTTPServletInvoker() { - HTTPServer::unregisterServlet(this); - -}; - -boost::shared_ptr HTTPServletInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new HTTPServletInvoker()); - invoker->_interpreter = interpreter; - return invoker; -} - -Data HTTPServletInvoker::getDataModelVariables() { - Data data; - assert(_url.length() > 0); - data.compound["location"] = Data(_url, Data::VERBATIM); - return data; -} - -void HTTPServletInvoker::send(const SendRequest& req) { - - if (req.name.find("reply.", 0, req.name.length())) { - // this is a reply - const std::string requestId = req.name.substr(6); - if (_requests.find(requestId) == _requests.end()) { - LOG(ERROR) << "Replying to non existing request " << requestId; - return; - } - - HTTPServer::Request httpRequest = _requests[requestId]; - HTTPServer::Reply httpReply(httpRequest); - httpReply.content = req.content; - - std::map::const_iterator nameListIter = req.namelist.begin(); - while(nameListIter != req.namelist.end()) { - httpReply.headers[nameListIter->first] = nameListIter->second.atom; - nameListIter++; - } - - std::multimap::const_iterator paramIter = req.params.begin(); - while(paramIter != req.params.end()) { - httpReply.headers[paramIter->first] = paramIter->second.atom; - paramIter++; - } - - HTTPServer::reply(httpReply); - return; - } -} - -void HTTPServletInvoker::cancel(const std::string sendId) { -} - -void HTTPServletInvoker::invoke(const InvokeRequest& req) { - - _invokeId = req.invokeid; - if (req.params.find("path") == req.params.end()) { - LOG(ERROR) << "Path parameter required with httpserver"; - } - _path = (*req.params.find("path")).second.atom; - - if (req.params.find("callback") != req.params.end()) { - _callback = (*req.params.find("callback")).second.atom; - } else { - _callback = _path; - std::replace(_callback.begin(), _callback.end(), '/', '.'); - } - - if (!HTTPServer::registerServlet(_path, this)) { - LOG(ERROR) << "Cannot register http servlet at " << _path << ": " << " already taken"; - } -} - -/** - * Receive a request and deliver it to the interpreter - */ -bool HTTPServletInvoker::httpRecvRequest(const HTTPServer::Request& req) { - tthread::lock_guard lock(_mutex); - -// evhttp_request_own(req.curlReq); - - _requests[toStr((uintptr_t)req.evhttpReq)] = req; - - Event event = req; - - event.name = _callback; - event.data.compound["reqId"] = Data(toStr((uintptr_t)req.evhttpReq), Data::VERBATIM); - - returnEvent(event); - return true; -} - -std::string HTTPServletInvoker::getPath() { - return _path; -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/http/HTTPServletInvoker.h b/src/uscxml/plugins/invoker/http/HTTPServletInvoker.h deleted file mode 100644 index 59c25ca..0000000 --- a/src/uscxml/plugins/invoker/http/HTTPServletInvoker.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef HTTPSERVERINVOKER_H_OAAWX8NF -#define HTTPSERVERINVOKER_H_OAAWX8NF - -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class HTTPServletInvoker : public InvokerImpl, public HTTPServlet { -public: - HTTPServletInvoker(); - virtual ~HTTPServletInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("httpservlet"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#httpserver"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - - // HTTPServlet - virtual bool httpRecvRequest(const HTTPServer::Request& req); - virtual std::string getPath(); - virtual void setURL(const std::string& url) { - _url = url; - } - bool canAdaptPath() { - return false; - } - -protected: - tthread::recursive_mutex _mutex; - std::map _requests; - std::string _path; - std::string _callback; - std::string _url; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(HTTPServletInvoker, InvokerImpl); -#endif - -} - -#endif /* end of include guard: HTTPSERVERINVOKER_H_OAAWX8NF */ diff --git a/src/uscxml/plugins/invoker/im/IMConfig.h.in b/src/uscxml/plugins/invoker/im/IMConfig.h.in deleted file mode 100644 index b43fef6..0000000 --- a/src/uscxml/plugins/invoker/im/IMConfig.h.in +++ /dev/null @@ -1,4 +0,0 @@ -#define LIBPURPLE_VERSION_MAJOR @LIBPURPLE_VERSION_MAJOR@ -#define LIBPURPLE_VERSION_MINOR @LIBPURPLE_VERSION_MINOR@ -#define LIBPURPLE_VERSION_PATCH @LIBPURPLE_VERSION_PATCH@ -#define LIBPURPLE_VERSION "@LIBPURPLE_VERSION@" diff --git a/src/uscxml/plugins/invoker/im/IMInvoker.cpp b/src/uscxml/plugins/invoker/im/IMInvoker.cpp deleted file mode 100644 index f111743..0000000 --- a/src/uscxml/plugins/invoker/im/IMInvoker.cpp +++ /dev/null @@ -1,1409 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "IMInvoker.h" -#include -#include "uscxml/UUID.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/dom/NameSpacingParser.h" -#include - -#include "uscxml/concurrency/DelayedEventQueue.h" - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -#define GET_INSTANCE_IN_CALLBACK(account) \ -tthread::lock_guard lock(_accountMutex); \ -IMInvoker* inst = NULL;\ -if (_accountInstances.find(account) == _accountInstances.end()) { \ - LOG(ERROR) << "Callback for unknown account called"; \ -} else {\ - inst = _accountInstances[account];\ -} - - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new IMInvokerProvider() ); - return true; -} -#endif - -Data IMInvoker::_pluginData; -GHashTable* IMInvoker::_uiInfo = NULL; -GRand* IMInvoker::_gRand = NULL; - -PurpleEventLoopUiOps IMInvoker::_uiEventLoopOps = { - purpleEventTimeoutAdd, - purpleEventTimeoutRemove, - purpleEventInputAdd, - purpleEventInputRemove, - purpleEventInputGetError, - purpleEventTimeoutAddSec, - NULL, - NULL, - NULL -}; - -PurpleDebugUiOps IMInvoker::_uiDebugOps = { - purpleDebugPrint, - purpleDebugIsEnabled, - NULL, NULL, NULL, NULL -}; - -PurpleAccountUiOps IMInvoker::_uiAccountOps = { - accountNotifyAdded, - accountStatusChanged, - accountRequestAdd, - accountRequestAuthorize, - accountCloseRequest, - NULL, - NULL, - NULL -}; - -PurpleBlistUiOps IMInvoker::_uiBuddyOps = { - purpleNewList, - purpleNewNode, - purpleShow, - NULL, // purpleUpdate, - NULL, // purpleRemove, - NULL, // purpleDestroy, - NULL, // purpleSetVisible, - purpleRequestAddBuddy, - purpleRequestAddChat, - purpleRequestAddGroup, - NULL, // purpleSaveNode, - NULL, // purpleRemoveNode, - NULL, // purpleSaveAccount, -}; - -// file transfer -PurpleXferUiOps IMInvoker::_uiXferOps = { - purpleNewXfer, - purpleDestroy, - purpleAddXfer, - purpleUpdateProgress, - purpleCancelLocal, - purpleCancelRemote, - purpleWrite, - purpleRead, - purpleDataNotSent, - purpleAddThumbnail -}; - -// connection info -PurpleConnectionUiOps IMInvoker::_uiConnectOps = { - purpleConnectProgress, - purpleConnected, - purpleDisonnected, - purpleNotice, -#if LIBPURPLE_VERSION_MAJOR >= 3 - purpleNetworkConnected, - purpleNetworkDisconnected, - purpleReportDisconnect, - NULL, - NULL, - NULL -#else - purpleReportDisconnect, - purpleNetworkConnected, - purpleNetworkDisconnected, - NULL, - NULL, - NULL -#endif -}; - -//libpurple conversation operations -PurpleConversationUiOps IMInvoker::_uiConvOps = { - NULL, //purpleCreateConversation, - NULL, //purpleDestroyConversation, - NULL, //purpleWriteChat, - NULL, //purpleWriteIm, - purpleWriteConv, - NULL, //purpleChatRenameUser, - NULL, //purpleChatRemoveUsers, - NULL, //purpleChatUpdateUser, - NULL, //purplePresentConversation, - NULL, //purpleHasFocus, - NULL, //purpleCustomSmileyAdd, - NULL, //purpleCustomSmileyWrite, - NULL, //purpleCustomSmileyClose, - NULL, //purpleSendConfirm, - NULL, - NULL, - NULL, - NULL -}; - -PurpleNotifyUiOps IMInvoker::_uiNotifyOps = { - purpeNotifyMessage, - purpeNotifyEmail, - purpeNotifyEmails, - purpeNotifyFormatted, - purpeNotifySearchResults, - purpeNotifySearchResultsNewRows, - purpeNotifyUserInfo, - purpeNotifyURI, - purpeNotifyClose, - NULL, - NULL, - NULL, - NULL -}; - -#if LIBPURPLE_VERSION_MAJOR < 3 -PurplePrivacyUiOps IMInvoker::_uiPrivacyOps = { - purplePermitAdded, - purplePermitRemoved, - purpleDebyAdded, - purpleDenyRemoved, - NULL, - NULL, - NULL, - NULL -}; -#endif - -#if LIBPURPLE_VERSION_MAJOR >= 3 -PurpleRequestFeature IMInvoker::_features; -#endif -PurpleRequestUiOps IMInvoker::_uiRequestOps = { -#if LIBPURPLE_VERSION_MAJOR >= 3 - _features, - purpleRequestInput, - purpleRequestChoice, - purpleRequestAction, - purpleRequestWait, - purpleRequestWaitUpdate, - purpleRequestFields, - purpleRequestFile, - purpleRequestFolder, - purpleRequestClose, - NULL, - NULL, - NULL, - NULL -#else - purpleRequestInput, - purpleRequestChoice, - purpleRequestAction, - purpleRequestFields, - purpleRequestFile, - purpleRequestClose, - purpleRequestFolder, - purpleRequestActionWithIcon, - NULL, - NULL, - NULL - -#endif - -}; - -PurpleWhiteboardUiOps IMInvoker::_uiWhiteboardOps = { - purpleCreateWB, - purpleDestroyWB, - purpleSetDimensions, - purpleSetBrush, - purpleDrawPont, - purpleDrawLine, - purpleClearWB, - NULL, - NULL, - NULL, - NULL -}; - -PurpleCoreUiOps IMInvoker::_uiCoreOps = { - purplePrefsInit, - NULL, - purpleUIInit, - NULL, - NULL, - NULL, - NULL, - NULL -}; - -DelayedEventQueue* IMInvoker::_eventQueue = NULL; - -tthread::mutex IMInvoker::_initMutex; -tthread::condition_variable IMInvoker::_initCond; - -tthread::recursive_mutex IMInvoker::_accountMutex; -std::map IMInvoker::_accountInstances; - -void IMInvoker::setupPurpleSignals() { - int handle; - // connection signals - purple_signal_connect(purple_connections_get_handle(), "signed-on", &handle, PURPLE_CALLBACK(signedOnCB), NULL); - - // conversation signals - purple_signal_connect(purple_conversations_get_handle(), "conversation-created", &handle, PURPLE_CALLBACK(conversationCreatedCB), NULL); - purple_signal_connect(purple_conversations_get_handle(), "chat-joined", &handle, PURPLE_CALLBACK(chatJoinedCB), NULL); - purple_signal_connect(purple_conversations_get_handle(), "chat-join-failed", &handle, PURPLE_CALLBACK(chatJoinFailedCB), NULL); - purple_signal_connect(purple_conversations_get_handle(), "buddy-typing", &handle, PURPLE_CALLBACK(buddyTypingCB), NULL); - purple_signal_connect(purple_conversations_get_handle(), "buddy-typed", &handle, PURPLE_CALLBACK(buddyTypedCB), NULL); - purple_signal_connect(purple_conversations_get_handle(), "buddy-typing-stopped", &handle, PURPLE_CALLBACK(buddyTypingStoppedCB), NULL); - - // buddy signals - purple_signal_connect(purple_blist_get_handle(), "buddy-signed-on", &handle, PURPLE_CALLBACK(buddyEventCB), GINT_TO_POINTER(PURPLE_BUDDY_SIGNON)); - purple_signal_connect(purple_blist_get_handle(), "buddy-signed-off", &handle, PURPLE_CALLBACK(buddyEventCB), GINT_TO_POINTER(PURPLE_BUDDY_SIGNOFF)); - purple_signal_connect(purple_blist_get_handle(), "buddy-got-login-time", &handle, PURPLE_CALLBACK(buddyEventCB), GINT_TO_POINTER(PURPLE_BUDDY_SIGNON_TIME)); - purple_signal_connect(purple_blist_get_handle(), "buddy-idle-changed", &handle, PURPLE_CALLBACK(buddyIdleChangedCB), NULL); - purple_signal_connect(purple_blist_get_handle(), "buddy-status-changed", &handle, PURPLE_CALLBACK(buddyStatusChangedCB), NULL); - purple_signal_connect(purple_blist_get_handle(), "buddy-icon-changed", &handle, PURPLE_CALLBACK(buddyEventCB), GINT_TO_POINTER(PURPLE_BUDDY_ICON)); - purple_signal_connect(purple_blist_get_handle(), "buddy-added", &handle, PURPLE_CALLBACK(buddyAddedCB), NULL); - purple_signal_connect(purple_blist_get_handle(), "buddy-removed", &handle, PURPLE_CALLBACK(buddyRemovedCB), NULL); - purple_signal_connect(purple_blist_get_handle(), "blist-node-aliased", &handle, PURPLE_CALLBACK(blistNodeAliasedCB), NULL); - purple_signal_connect(purple_blist_get_handle(), "buddy-caps-changed", &handle, PURPLE_CALLBACK(buddyCapsChangedCB), NULL); - - // xfer signals - purple_signal_connect(purple_xfers_get_handle(), "file-recv-request", &handle, PURPLE_CALLBACK(fileRecvRequestCB), NULL); - -} - -void IMInvoker::initLibPurple(void *userdata, const std::string event) { - _initMutex.lock(); - - _uiInfo = g_hash_table_new(g_str_hash, g_str_equal); -// g_hash_table_insert(_uiInfo, "name", (char*)"uscxml"); -// g_hash_table_insert(_uiInfo, "version", "0.0.3"); -// g_hash_table_insert(_uiInfo, "website", "http://uscxml.tk.informatik.tu-darmstadt.de"); -// g_hash_table_insert(_uiInfo, "dev_website", "http://uscxml.tk.informatik.tu-darmstadt.de"); -// g_hash_table_insert(_uiInfo, "client_type", "pc"); - - _gRand = g_rand_new(); - - /* Set a custom user directory (optional) */ - //purple_util_set_user_dir(CUSTOM_USER_DIRECTORY); - - /* We do not want any debugging for now to keep the noise to a minimum. */ - purple_debug_set_enabled(false); - - purple_core_set_ui_ops(&_uiCoreOps); - purple_eventloop_set_ui_ops(&_uiEventLoopOps); - - purple_plugins_add_search_path("/usr/local/lib/purple-3"); - // purple_plugins_probe(G_MODULE_SUFFIX); - - if (!purple_core_init("uscxml")) { - LOG(ERROR) << "libpurple initialization failed." << std::endl; - return; - } - - /* Load the preferences. */ - purple_prefs_load(); - purple_plugins_load_saved("/purple/uscxml/plugins/saved"); - - GList *l; - PurplePlugin *plugin; - - for (l = purple_plugins_get_all(); l != NULL; l = l->next) { - plugin = (PurplePlugin *)l->data; - - Data pluginData; - if (plugin->info->id) pluginData.compound["id"] = Data(plugin->info->id, Data::VERBATIM); - if (plugin->info->homepage) pluginData.compound["homepage"] = Data(plugin->info->homepage, Data::VERBATIM); - if (plugin->info->author) pluginData.compound["author"] = Data(plugin->info->author, Data::VERBATIM); - if (plugin->info->description) pluginData.compound["description"] = Data(plugin->info->description, Data::VERBATIM); - if (plugin->info->name) pluginData.compound["name"] = Data(plugin->info->name, Data::VERBATIM); - if (plugin->info->summary) pluginData.compound["summary"] = Data(plugin->info->summary, Data::VERBATIM); - if (plugin->info->version) pluginData.compound["version"] = Data(plugin->info->version, Data::VERBATIM); - if (plugin->info->major_version) pluginData.compound["majorVersion"] = Data(toStr(plugin->info->major_version), Data::VERBATIM); - if (plugin->info->minor_version) pluginData.compound["minorVersion"] = Data(toStr(plugin->info->minor_version), Data::VERBATIM); - - if (plugin->info->type == PURPLE_PLUGIN_PROTOCOL) { - _pluginData.compound["protocol"].compound[plugin->info->id] = pluginData; - } else if (plugin->info->type == PURPLE_PLUGIN_STANDARD) { -// _pluginData.compound["standard"].compound[plugin->info->id] = pluginData; - } else if (plugin->info->type == PURPLE_PLUGIN_LOADER) { -// _pluginData.compound["loader"].compound[plugin->info->id] = pluginData; - } - } - - _initMutex.unlock(); - _initCond.notify_all(); -} - -// purple event callbacks -void IMInvoker::signedOnCB(PurpleConnection *gc, gpointer null) { - PurpleAccount *account = purple_connection_get_account(gc); - GET_INSTANCE_IN_CALLBACK(account); - if (!inst) - return; - -#if 0 - GSList *buddies = purple_find_buddies(purple_connection_get_account(gc), NULL); - GSList *cur; - for (cur = buddies; cur; cur = cur->next) { - buddyAddedCB((PurpleBuddy *)cur->data); - } - g_slist_free(buddies); -#endif - - // set my status to active - PurpleSavedStatus* status = purple_savedstatus_new(NULL, PURPLE_STATUS_AVAILABLE); - purple_savedstatus_activate(status); - - Event retEv("im.signed.on"); - inst->returnEvent(retEv); -} - -void IMInvoker::conversationCreatedCB(PurpleConversation *conv, void *data) {} -void IMInvoker::chatJoinedCB(PurpleConversation *conv, void *data) {} -void IMInvoker::chatJoinFailedCB(PurpleConnection *gc, GHashTable *components) {} -void IMInvoker::buddyTypingCB(PurpleAccount *account, const char *name, void *data) { - std::cout << "buddyTypingCB" << std::endl; -} -void IMInvoker::buddyTypedCB(PurpleAccount *account, const char *name, void *data) { - std::cout << "buddyTypedCB" << std::endl; -} -void IMInvoker::buddyTypingStoppedCB(PurpleAccount *account, const char *name, void *data) { - std::cout << "buddyTypingStoppedCB" << std::endl; -} - -void IMInvoker::buddyEventCB(PurpleBuddy *buddy, PurpleBuddyEvent event) { - if (!buddy) - return; - - PurpleAccount *account = purple_buddy_get_account(buddy); - GET_INSTANCE_IN_CALLBACK(account); - if (!inst) - return; - - switch (event) { - case PURPLE_BUDDY_SIGNOFF: - case PURPLE_BUDDY_SIGNON: { - PurplePresence* presence = purple_buddy_get_presence(buddy); - PurpleStatus* status = purple_presence_get_active_status(presence); - buddyStatusChangedCB(buddy, NULL, status, event); - break; - } - case PURPLE_BUDDY_ICON: - break; - - default: - break; - } - -} - -void IMInvoker::buddyIdleChangedCB(PurpleBuddy *buddy, gboolean old_idle, gboolean idle, PurpleBuddyEvent event) { -} - -void IMInvoker::buddyStatusChangedCB(PurpleBuddy *buddy, PurpleStatus *old, PurpleStatus *newstatus, PurpleBuddyEvent event) { - PurpleAccount *account = purple_buddy_get_account(buddy); - GET_INSTANCE_IN_CALLBACK(account); - - std::string buddyName = purple_buddy_get_name(buddy); - Data buddyData = buddyToData(buddy); - inst->_dataModelVars.compound["buddies"].compound[buddyName] = buddyData; - - Event retEv("im.buddy.status.changed"); - retEv.data = buddyData; - inst->returnEvent(retEv); - -} - -void IMInvoker::buddyAddedCB(PurpleBuddy* buddy) { - PurpleAccount *account = purple_buddy_get_account(buddy); - GET_INSTANCE_IN_CALLBACK(account); - if (!inst) - return; - - std::string buddyName = purple_buddy_get_name(buddy); - - Event retEv("im.buddy.added"); - retEv.data.compound["name"] = Data(buddyName, Data::VERBATIM); - inst->returnEvent(retEv); - - buddyStatusChangedCB(buddy, NULL, purple_presence_get_active_status(purple_buddy_get_presence(buddy)), PURPLE_BUDDY_NONE); - -} - -void IMInvoker::buddyRemovedCB(PurpleBuddy* buddy) { - PurpleAccount *account = purple_buddy_get_account(buddy); - GET_INSTANCE_IN_CALLBACK(account); - std::string buddyName = purple_buddy_get_name(buddy); - - Event retEv("im.buddy.removed"); - retEv.data.compound["name"] = Data(buddyName, Data::VERBATIM); - inst->returnEvent(retEv); - - inst->_dataModelVars.compound["buddies"].compound.erase(buddyName); - -} - -void IMInvoker::blistNodeAliasedCB(PurpleBlistNode *node, char *old_alias) { -} - -void IMInvoker::fileRecvRequestCB(PurpleXfer *xfer) { - purple_xfer_set_local_filename(xfer, ""); -} - - -void IMInvoker::buddyCapsChangedCB(PurpleBuddy* buddy, PurpleMediaCaps newcaps, PurpleMediaCaps oldcaps) { - PurpleAccount *account = purple_buddy_get_account(buddy); - GET_INSTANCE_IN_CALLBACK(account); -} - -Data IMInvoker::statusToData(PurpleStatus *status) { - Data data; - const char* statusName = purple_status_get_name(status); - if (statusName) data.compound["name"] = Data(statusName, Data::VERBATIM); - - PurpleStatusType* statusType = PURPLE_STATUS_GET_TYPE(status); - - GList *statusAttrElem; - PURPLE_STATUS_ATTR* statusAttr; - GList *statusAttrList = purple_status_type_get_attrs(statusType); - - for(statusAttrElem = statusAttrList; statusAttrElem; statusAttrElem = statusAttrElem->next) { - statusAttr = (PURPLE_STATUS_ATTR*)statusAttrElem->data; - const char* statusAttrId = PURPLE_STATUS_ATTR_GET_ID(statusAttr); - PURPLE_VALUE* statusValue = purple_status_get_attr_value(status, statusAttrId); - if (statusValue) { - data.compound[statusAttrId] = purpleValueToData(statusValue); - } - } - - data.compound["active"] = Data((bool)purple_status_is_active(status)); - data.compound["available"] = Data((bool)purple_status_is_available(status)); - data.compound["exclusive"] = Data((bool)purple_status_is_exclusive(status)); - data.compound["active"] = Data((bool)purple_status_is_active(status)); - data.compound["independent"] = Data((bool)purple_status_is_independent(status)); - data.compound["online"] = Data((bool)purple_status_is_online(status)); - - return data; -} - -Data IMInvoker::buddyToData(PurpleBuddy *buddy) { - Data data; - std::string buddyName = purple_buddy_get_name(buddy); - - if (purple_buddy_get_name(buddy)) data.compound["name"] = Data(purple_buddy_get_name(buddy), Data::VERBATIM); - if (purple_buddy_get_alias(buddy)) data.compound["alias"] = Data(purple_buddy_get_alias(buddy), Data::VERBATIM); - if (purple_buddy_get_alias_only(buddy)) data.compound["aliasOnly"] = Data(purple_buddy_get_alias_only(buddy), Data::VERBATIM); - if (purple_buddy_get_server_alias(buddy)) data.compound["server"] = Data(purple_buddy_get_server_alias(buddy), Data::VERBATIM); - - PurpleGroup* group = purple_buddy_get_group(buddy); - if (group) { - if (purple_group_get_name(group)) data.compound["group"] = Data(purple_group_get_name(group), Data::VERBATIM); - } - - PurpleBuddyIcon* icon = purple_buddy_get_icon(buddy); - if (icon) { - size_t iconSize = 0; - gconstpointer iconData = purple_buddy_icon_get_data(icon, &iconSize); - data.compound["icon"] = Data((char*)iconData, iconSize, "application/octet-stream", false); - } - - PurplePresence* presence = purple_buddy_get_presence(buddy); - - if (presence) { - GList *statusElem; - GList *statusList = purple_presence_get_statuses(presence); - PurpleStatus* status; - - for(statusElem = statusList; statusElem; statusElem = statusElem->next) { - status = (PurpleStatus*)statusElem->data; - const char* statusId = purple_status_get_id(status); - PurpleStatusPrimitive statusPrimitive = purple_primitive_get_type_from_id(statusId); - - // only include active states - if(statusPrimitive == PURPLE_STATUS_UNSET || !purple_presence_is_status_primitive_active(presence, statusPrimitive)) - continue; - data.compound["status"].compound[statusId] = statusToData(status); - } - } - - return data; -} - -Data IMInvoker::purpleValueToData(PURPLE_VALUE* value) { - Data data; - -#if LIBPURPLE_VERSION_MAJOR >= 3 - if (false) { - } else if (g_type_check_value_holds(value, G_TYPE_CHAR)) { - data = Data(g_value_get_schar(value), Data::VERBATIM); - - } else if (g_type_check_value_holds(value, G_TYPE_UCHAR)) { - data = Data(g_value_get_uchar(value), Data::VERBATIM); - - } else if (g_type_check_value_holds(value, G_TYPE_BOOLEAN)) { - data = Data(g_value_get_boolean(value)); - - } else if (g_type_check_value_holds(value, G_TYPE_INT)) { - data = Data(g_value_get_int(value)); - - } else if (g_type_check_value_holds(value, G_TYPE_UINT)) { - data = Data(g_value_get_uint(value)); - - } else if (g_type_check_value_holds(value, G_TYPE_LONG)) { - data = Data(g_value_get_long(value)); - - } else if (g_type_check_value_holds(value, G_TYPE_ULONG)) { - data = Data(g_value_get_ulong(value)); - - } else if (g_type_check_value_holds(value, G_TYPE_INT64)) { - data = Data(g_value_get_int64(value)); - - } else if (g_type_check_value_holds(value, G_TYPE_FLOAT)) { - data = Data(g_value_get_float(value)); - - } else if (g_type_check_value_holds(value, G_TYPE_DOUBLE)) { - data = Data(g_value_get_double(value)); - - } else if (g_type_check_value_holds(value, G_TYPE_STRING)) { - const gchar* tmp = g_value_get_string(value); - if (tmp == NULL) { - data = Data("", Data::VERBATIM); - } else { - data = Data(g_value_get_string(value), Data::VERBATIM); - } - - } else if (g_type_check_value_holds(value, G_TYPE_OBJECT) || - g_type_check_value_holds(value, G_TYPE_PARAM) || - g_type_check_value_holds(value, G_TYPE_POINTER) || - g_type_check_value_holds(value, G_TYPE_FLAGS) || - g_type_check_value_holds(value, G_TYPE_ENUM)) { - LOG(ERROR) << "purple thingy not supported"; - } else { - LOG(ERROR) << "purple thingy unknown"; - } -#else - switch (purple_value_get_type(value)) { - case PURPLE_TYPE_BOOLEAN: - if (purple_value_get_boolean(value)) - data = Data("true"); - data = Data("false"); - break; - case PURPLE_TYPE_STRING: - if (purple_value_get_string(value)) { - data = Data(purple_value_get_string(value), Data::VERBATIM); - } - break; - case PURPLE_TYPE_CHAR: - Data(purple_value_get_char(value)); - break; - case PURPLE_TYPE_UCHAR: - Data(purple_value_get_uchar(value)); - break; - case PURPLE_TYPE_SHORT: - Data(purple_value_get_short(value)); - break; - case PURPLE_TYPE_USHORT: - Data(purple_value_get_ushort(value)); - break; - case PURPLE_TYPE_INT: - Data(purple_value_get_int(value)); - break; - case PURPLE_TYPE_UINT: - Data(purple_value_get_uint(value)); - break; - case PURPLE_TYPE_LONG: - Data(purple_value_get_long(value)); - break; - case PURPLE_TYPE_ULONG: - Data(purple_value_get_ulong(value)); - break; - case PURPLE_TYPE_INT64: - Data(purple_value_get_int64(value)); - break; - case PURPLE_TYPE_UINT64: - Data(purple_value_get_uint64(value)); - break; - case PURPLE_TYPE_OBJECT: - case PURPLE_TYPE_POINTER: - case PURPLE_TYPE_ENUM: - case PURPLE_TYPE_BOXED: - case PURPLE_TYPE_UNKNOWN: - case PURPLE_TYPE_SUBTYPE: - LOG(ERROR) << "purple thingy not supported"; - break; - } -#endif - return data; -} - -IMInvoker::IMInvoker() { - _account = NULL; -} - -IMInvoker::~IMInvoker() { - if (_account) { - _accountMutex.lock(); - _accountInstances.erase(_account); -// purple_account_destroy(_account); - _accountMutex.unlock(); - } -}; - -boost::shared_ptr IMInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new IMInvoker()); - - if (!_eventQueue) { - tthread::lock_guard lock(_initMutex); - _eventQueue = new DelayedEventQueue(); - _eventQueue->addEvent("initLibPurple", IMInvoker::initLibPurple, 0, NULL); - _eventQueue->start(); - // make sure to have the shebang initialized when we leave - _initCond.wait(_initMutex); - } - - invoker->_dataModelVars.compound["plugins"] = _pluginData; - return invoker; -} - -Data IMInvoker::getDataModelVariables() { - tthread::lock_guard lock(_accountMutex); - return _dataModelVars; -} - -void IMInvoker::send(const SendRequest& req) { - EventContext* ctx = new EventContext(); - ctx->sendReq = req; - ctx->instance = this; - - std::string eventId = UUID::getUUID(); - _eventQueue->addEvent(eventId, IMInvoker::send, 0, ctx); - return; -} - -void IMInvoker::send(void *userdata, const std::string event) { - // we are in the thread that manages all of libpurple - EventContext* ctx = (EventContext*)userdata; - - if (!ctx) - return; - - if (!ctx->instance || !ctx->instance->_account) { - ctx->instance->returnErrorExecution("No account available"); - delete(ctx); - return; - } - - if (iequals(ctx->sendReq.name, "im.send")) { - std::string receiver; - Event::getParam(ctx->sendReq.params, "receiver", receiver); - - Data data; - Event::getParam(ctx->sendReq.params, "data", data); - -#if LIBPURPLE_VERSION_MAJOR >= 3 - PurpleIMConversation* conv = purple_im_conversation_new(ctx->instance->_account, receiver.c_str()); - if (ctx->sendReq.content.length() > 0) - purple_conversation_send(PURPLE_CONVERSATION(conv), ctx->sendReq.content.c_str()); -#else - PurpleConversation* conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, ctx->instance->_account, receiver.c_str()); - if (ctx->sendReq.content.length() > 0) - purple_conv_im_send(purple_conversation_get_im_data(conv), ctx->sendReq.content.c_str()); -#endif - -#if 0 - if (data.binary) { - PurpleConnection *gc = purple_account_get_connection(ctx->instance->_account); - PurplePlugin *prpl; - PurplePluginProtocolInfo *prpl_info; - - - if (gc) { - prpl = purple_connection_get_prpl(gc); - prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); - -// if (prpl_info && prpl_info->new_xfer) { -// PurpleXfer* xfer = (prpl_info->new_xfer)(purple_account_get_connection(ctx->instance->_account), receiver.c_str()); -// purple_xfer_set_local_filename(xfer, "/Users/sradomski/Documents/W3C Standards.pdf"); -// purple_xfer_set_filename(xfer, "asdfadsf.pdf"); -// purple_xfer_request(xfer); -// purple_xfer_request_accepted(xfer, "/Users/sradomski/Documents/W3C Standards.pdf"); -// } - - //Set the filename -// purple_xfer_set_local_filename(xfer, [[fileTransfer localFilename] UTF8String]); -// purple_xfer_set_filename(xfer, [[[fileTransfer localFilename] lastPathComponent] UTF8String]); -// xfer->ui_data -// purple_xfer_request(xfer); - - serv_send_file(gc, "sradomski@localhost", "/Users/sradomski/Documents/W3C Standards.pdf"); -// if (prpl_info->send_file && (prpl_info->can_receive_file && prpl_info->can_receive_file(gc, receiver.c_str()))) { -// prpl_info->send_file(gc, receiver.c_str(), "/Users/sradomski/Documents/W3C Standards.pdf"); -// } -// prpl_info->send_raw(gc, data.binary->data, data.binary->size); - } - - } -#endif - } else if (iequals(ctx->sendReq.name, "im.buddy.add")) { - std::string buddyName; - Event::getParam(ctx->sendReq.params, "name", buddyName); - - std::string reqMsg; - Event::getParam(ctx->sendReq.params, "msg", reqMsg); - - PurpleBuddy* buddy = purple_buddy_new(ctx->instance->_account, buddyName.c_str(), NULL); - purple_blist_add_buddy(buddy, NULL, NULL, NULL); -#if LIBPURPLE_VERSION_MAJOR >= 3 - purple_account_add_buddy(ctx->instance->_account, buddy, reqMsg.c_str()); -#else - purple_account_add_buddy(ctx->instance->_account, buddy); -#endif - - } else if (iequals(ctx->sendReq.name, "im.buddy.remove")) { - std::string buddyName; - Event::getParam(ctx->sendReq.params, "name", buddyName); - -#if LIBPURPLE_VERSION_MAJOR >= 3 - PurpleBuddy* buddy = purple_blist_find_buddy(ctx->instance->_account, buddyName.c_str()); - if (PURPLE_IS_BUDDY(buddy)) { - purple_account_remove_buddy(ctx->instance->_account, buddy, purple_buddy_get_group(buddy)); - purple_blist_remove_buddy(buddy); - } -#else - PurpleBuddy* buddy = purple_find_buddy(ctx->instance->_account, buddyName.c_str()); - purple_account_remove_buddy(ctx->instance->_account, buddy, purple_buddy_get_group(buddy)); - purple_blist_remove_buddy(buddy); - -#endif - } - - delete(ctx); -} - -void IMInvoker::cancel(const std::string sendId) { -} - -void IMInvoker::invoke(const InvokeRequest& req) { - - EventContext* ctx = new EventContext(); - ctx->invokeReq = req; - ctx->instance = this; - _eventQueue->addEvent(req.sendid, IMInvoker::invoke, 0, ctx); - return; -} - -void IMInvoker::invoke(void *userdata, const std::string event) { - _accountMutex.lock(); - - EventContext* ctx = (EventContext*)userdata; - IMInvoker* instance = ctx->instance; - - std::string username; - Event::getParam(ctx->invokeReq.params, "username", username); - std::string protocolId; - Event::getParam(ctx->invokeReq.params, "protocol", protocolId); - std::string password; - Event::getParam(ctx->invokeReq.params, "password", password); - - instance->_account = purple_account_new(username.c_str(), protocolId.c_str()); - _accountInstances[instance->_account] = instance; - -#if LIBPURPLE_VERSION_MAJOR >= 3 - purple_account_set_password(instance->_account, password.c_str(), NULL, NULL); -#else - purple_account_set_password(instance->_account, password.c_str()); -#endif - purple_account_set_enabled(instance->_account, "uscxml", true); - - GSList* buddies = purple_blist_get_buddies(); - GSList *cur; - for (cur = buddies; cur; cur = cur->next) { - std::string buddyName = purple_buddy_get_name((PurpleBuddy *)cur->data); - Data buddyData = buddyToData((PurpleBuddy *)cur->data); - instance->_dataModelVars.compound["buddies"].compound[buddyName] = buddyData; - } - g_slist_free(buddies); - - - - delete(ctx); - _accountMutex.unlock(); -} - -guint IMInvoker::purpleEventTimeoutAdd(guint interval, GSourceFunc function, gpointer data) { - PurpleEventContext* ctx = new PurpleEventContext(); - ctx->function = function; - ctx->input = NULL; - ctx->data = data; - uintptr_t ptr = reinterpret_cast(ctx); - - _eventQueue->addEvent(toStr(ptr), purpleCallback, interval, ctx); - return ptr; -} - -gboolean IMInvoker::purpleEventTimeoutRemove(guint handle) { - _eventQueue->cancelEvent(toStr(handle)); - return true; -} - -guint IMInvoker::purpleEventTimeoutAddSec(guint interval, GSourceFunc function, gpointer data) { - return purpleEventTimeoutAdd(interval * 1000, function, data); -} - -guint IMInvoker::purpleEventInputAdd(int fd, PurpleInputCondition cond, PurpleInputFunction func, gpointer data) { - PurpleEventContext* ctx = new PurpleEventContext(); - ctx->function = NULL; - ctx->input = func; - ctx->inputFD = fd; - ctx->cond = cond; - ctx->data = data; - - short opMask = 0; - if (cond & PURPLE_INPUT_READ) - opMask |= DelayedEventQueue::DEQ_READ; - if (cond & PURPLE_INPUT_WRITE) - opMask |= DelayedEventQueue::DEQ_WRITE; - - guint eventId = g_rand_int(_gRand); -// std::cout << "-- Input add " << eventId << " --------" << fd << std::endl; - _eventQueue->addEvent(toStr(eventId), fd, opMask, purpleCallback, ctx, true); - return eventId; -} - -gboolean IMInvoker::purpleEventInputRemove(guint handle) { -// std::cout << "-- Input del " << handle << std::endl; - _eventQueue->cancelEvent(toStr(handle)); - return true; -} - -int IMInvoker::purpleEventInputGetError(int fd, int *error) { - int ret; - socklen_t len; - len = sizeof(*error); - - ret = getsockopt(fd, SOL_SOCKET, SO_ERROR, error, &len); - if (!ret && !(*error)) { - /* - * Taken from Fire's FaimP2PConnection.m: - * The job of this function is to detect if the connection failed or not - * There has to be a better way to do this - * - * Any socket that fails to connect will select for reading and writing - * and all reads and writes will fail - * Any listening socket will select for reading, and any read will fail - * So, select for writing, if you can write, and the write fails, not connected - */ - - { - fd_set thisfd; - struct timeval timeout; - - FD_ZERO(&thisfd); - FD_SET(fd, &thisfd); - timeout.tv_sec = 0; - timeout.tv_usec = 0; - select(fd+1, NULL, &thisfd, NULL, &timeout); - if(FD_ISSET(fd, &thisfd)) { - ssize_t length = 0; - char buffer[4] = {0, 0, 0, 0}; - - length = write(fd, buffer, length); - if(length == -1) { - /* Not connected */ - ret = -1; - *error = ENOTCONN; - } - } - } - } - - return ret; -} - -void IMInvoker::purpleCallback(void *userdata, const std::string event) { - PurpleEventContext* ctx = (PurpleEventContext*)userdata; - if (ctx->function) { - ctx->function(ctx->data); - delete ctx; - } else if(ctx->input) { -// std::cout << "operating on " << ctx->inputFD << std::endl; - ctx->input(ctx->data, ctx->inputFD, ctx->cond); - } -} - -void IMInvoker::purplePrefsInit(void) { - purple_prefs_add_bool("/auto-login", false); -} - -void IMInvoker::purpleDebugInit(void) {} - -void IMInvoker::purpleUIInit(void) { - purple_accounts_set_ui_ops(&_uiAccountOps); -// purple_xfers_set_ui_ops(&_uiXferOps); -// purple_blist_set_ui_ops(&_uiBuddyOps); -// purple_notify_set_ui_ops(&_uiNotifyOps); -// purple_privacy_set_ui_ops(&_uiPrivacyOps); -// purple_request_set_ui_ops(&_uiRequestOps); -// purple_connections_set_ui_ops(&_uiConnectOps); -// purple_whiteboard_set_ui_ops(&_uiWhiteboardOps); - purple_conversations_set_ui_ops(&_uiConvOps); - purple_debug_set_ui_ops(&_uiDebugOps); - - setupPurpleSignals(); - -} -void IMInvoker::purpleQuit(void) {} - -GHashTable* IMInvoker::purpleGetUIInfo(void) { - return _uiInfo; -} - -void IMInvoker::accountNotifyAdded(PurpleAccount *account, - const char *remote_user, - const char *id, - const char *alias, - const char *message) { - std::cout << "accountNotifyAdded" << std::endl; -} - -void IMInvoker::accountStatusChanged(PurpleAccount *account, - PurpleStatus *status) { - std::cout << "accountStatusChanged" << std::endl; - -} - -void IMInvoker::accountRequestAdd(PurpleAccount *account, - const char *remote_user, - const char *id, - const char *alias, - const char *message) { - std::cout << "accountRequestAdd" << std::endl; -} - -void* IMInvoker::accountRequestAuthorize(PurpleAccount *account, - const char *remote_user, - const char *id, - const char *alias, - const char *message, - gboolean on_list, - PurpleAccountRequestAuthorizationCb authorize_cb, - PurpleAccountRequestAuthorizationCb deny_cb, - void *user_data) { - // always accept all "may I add you as a buddy?" requests -#if LIBPURPLE_VERSION_MAJOR >= 3 - authorize_cb(message, user_data); -#else - authorize_cb(user_data); -#endif - return user_data; -} - -void IMInvoker::accountCloseRequest(void *ui_handle) { - std::cout << "accountCloseRequest" << std::endl; -} - -//libpurple conversation operations -void IMInvoker::purpleCreateConversation(PurpleConversation *conv) {} -void IMInvoker::purpleDestroyConversation(PurpleConversation *conv) {} -void IMInvoker::purpleWriteChat(PurpleConversation *conv, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime) { - std::cout << "purpleWriteChat" << std::endl; -} -void IMInvoker::purpleWriteIm(PurpleConversation *conv, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime) { - std::cout << "purpleWriteIm" << std::endl; -} -void IMInvoker::purpleWriteConv(PurpleConversation *conv, const char *name, const char *alias, const char *message, PurpleMessageFlags flags, time_t mtime) { - - GET_INSTANCE_IN_CALLBACK(purple_conversation_get_account(conv)); - if (inst == NULL) - return; - - Event msgRcvdEv; - if (flags & PURPLE_MESSAGE_SEND) - msgRcvdEv.name = "im.send.conv"; - if (flags & PURPLE_MESSAGE_RECV) - msgRcvdEv.name = "im.rcvd.conv"; - - if (alias && *alias) - msgRcvdEv.data.compound["alias"] = Data(alias, Data::VERBATIM); - if (name && *name) - msgRcvdEv.data.compound["name"] = Data(name, Data::VERBATIM); - - msgRcvdEv.data.compound["conversation"] = Data(purple_conversation_get_name(conv), Data::VERBATIM); - msgRcvdEv.data.compound["timestamp"] = Data(mtime); - msgRcvdEv.data.compound["time"] = Data(purple_utf8_strftime("%T", localtime(&mtime)), Data::VERBATIM); - msgRcvdEv.data.compound["date"] = Data(purple_utf8_strftime("%F", localtime(&mtime)), Data::VERBATIM); - msgRcvdEv.data.compound["datetime"] = Data(purple_utf8_strftime("%c", localtime(&mtime)), Data::VERBATIM); - - msgRcvdEv.data.compound["raw"] = Data(message, Data::VERBATIM); - if (flags & PURPLE_MESSAGE_RAW) { - msgRcvdEv.data.compound["message"] = Data(message, Data::VERBATIM); - } else { - bool successParse = false; // unfortunate code layout as parsers operator= is private :( - std::string origErrors; - - // try to parse as XHTML - { - NameSpacingParser parser = NameSpacingParser::fromXML(message); - if (!parser.errorsReported()) { - msgRcvdEv.data.compound["message"].node = parser.getDocument().getDocumentElement(); - successParse = true; - } else { - origErrors = parser.errors(); - } - } - - // try again with added XHTML tags - if (!successParse) { - NameSpacingParser parser = NameSpacingParser::fromXML(std::string("") + - std::string("") + - message + - std::string("") + - std::string("")); - if (!parser.errorsReported()) { - msgRcvdEv.data.compound["message"].node = parser.getDocument().getDocumentElement(); - successParse = true; - } else { - LOG(ERROR) << "Cannot parse message as XHTML: " << origErrors << std::endl << message; - } - } - - if (successParse) { - // prepare stripped message content - std::list > texts = DOMUtils::getElementsByType(msgRcvdEv.data.compound["message"].node, Arabica::DOM::Node_base::TEXT_NODE); - std::stringstream ssTexts; - std::string seperator; - while(texts.size() > 0) { - ssTexts << seperator << texts.front().getNodeValue(); - texts.pop_front(); - if (ssTexts.str().length() > 0 && isspace(ssTexts.str()[ssTexts.str().length() - 1])) { - seperator = ""; - } else { - seperator = " "; - } - } - - msgRcvdEv.data.compound["stripped"] = Data(ssTexts.str(), Data::VERBATIM); - } - // erase for now as JS dump croaks on dom nodes with cycles - msgRcvdEv.data.compound.erase("message"); - } - - msgRcvdEv.data.compound["flags"].compound["send"] = Data((bool)(flags & PURPLE_MESSAGE_SEND)); - msgRcvdEv.data.compound["flags"].compound["rcvd"] = Data((bool)(flags & PURPLE_MESSAGE_RECV)); - msgRcvdEv.data.compound["flags"].compound["system"] = Data((bool)(flags & PURPLE_MESSAGE_SYSTEM)); - msgRcvdEv.data.compound["flags"].compound["auoresponse"] = Data((bool)(flags & PURPLE_MESSAGE_AUTO_RESP)); - msgRcvdEv.data.compound["flags"].compound["activeonly"] = Data((bool)(flags & PURPLE_MESSAGE_ACTIVE_ONLY)); - msgRcvdEv.data.compound["flags"].compound["containsnick"] = Data((bool)(flags & PURPLE_MESSAGE_NICK)); - msgRcvdEv.data.compound["flags"].compound["nolog"] = Data((bool)(flags & PURPLE_MESSAGE_NO_LOG)); - msgRcvdEv.data.compound["flags"].compound["whisper"] = Data((bool)(flags & PURPLE_MESSAGE_WHISPER)); - msgRcvdEv.data.compound["flags"].compound["error"] = Data((bool)(flags & PURPLE_MESSAGE_ERROR)); - msgRcvdEv.data.compound["flags"].compound["delayed"] = Data((bool)(flags & PURPLE_MESSAGE_DELAYED)); - msgRcvdEv.data.compound["flags"].compound["raw"] = Data((bool)(flags & PURPLE_MESSAGE_RAW)); - msgRcvdEv.data.compound["flags"].compound["images"] = Data((bool)(flags & PURPLE_MESSAGE_IMAGES)); - msgRcvdEv.data.compound["flags"].compound["notify"] = Data((bool)(flags & PURPLE_MESSAGE_NOTIFY)); - msgRcvdEv.data.compound["flags"].compound["nolinkify"] = Data((bool)(flags & PURPLE_MESSAGE_NO_LINKIFY)); - msgRcvdEv.data.compound["flags"].compound["invisible"] = Data((bool)(flags & PURPLE_MESSAGE_INVISIBLE)); - - inst->returnEvent(msgRcvdEv); -} -void IMInvoker::purpleChatAddUsers(PurpleConversation *conv, GList *cbuddies, gboolean new_arrivals) {} -void IMInvoker::purpleChatRenameUser(PurpleConversation *conv, const char *old_name, const char *new_name, const char *new_alias) {} -void IMInvoker::purpleChatRemoveUsers(PurpleConversation *conv, GList *users) {} -void IMInvoker::purpleChatUpdateUser(PurpleConversation *conv, const char *user) {} -void IMInvoker::purplePresentConversation(PurpleConversation *conv) {} -gboolean IMInvoker::purpleHasFocus(PurpleConversation *conv) { - return true; -} -gboolean IMInvoker::purpleCustomSmileyAdd(PurpleConversation *conv, const char *smile, gboolean remote) { - return true; -} -void IMInvoker::purpleCustomSmileyWrite(PurpleConversation *conv, const char *smile, const guchar *data, gsize size) {} -void IMInvoker::purpleCustomSmileyClose(PurpleConversation *conv, const char *smile) {} -void IMInvoker::purpleSendConfirm(PurpleConversation *conv, const char *message) {} - -// buddy operations -void IMInvoker::purpleNewList(PurpleBuddyList *list) { - std::cout << "purpleNewList" << std::endl; -} -void IMInvoker::purpleNewNode(PurpleBlistNode *node) { - std::cout << "purpleNewNode" << std::endl; -} -void IMInvoker::purpleShow(PurpleBuddyList *list) { - std::cout << "purpleShow" << std::endl; -} -void IMInvoker::purpleUpdate(PurpleBuddyList *list, PurpleBlistNode *node) { -} -void IMInvoker::purpleRemove(PurpleBuddyList *list, PurpleBlistNode *node) {} -void IMInvoker::purpleDestroy(PurpleBuddyList *list) {} -void IMInvoker::purpleSetVisible(PurpleBuddyList *list, gboolean show) {} -void IMInvoker::purpleRequestAddBuddy(PurpleAccount *account, const char *username, const char *group, const char *alias) { - std::cout << "purpleRequestAddBuddy" << std::endl; -} -void IMInvoker::purpleRequestAddChat(PurpleAccount *account, PurpleGroup *group, const char *alias, const char *name) { - std::cout << "purpleRequestAddChat" << std::endl; -} -void IMInvoker::purpleRequestAddGroup(void) { - std::cout << "purpleRequestAddGroup" << std::endl; -} -void IMInvoker::purpleSaveNode(PurpleBlistNode *node) {} -void IMInvoker::purpleRemoveNode(PurpleBlistNode *node) {} -void IMInvoker::purpleSaveAccount(PurpleAccount *account) {} - -// file transfer operations -void IMInvoker::purpleNewXfer(PurpleXfer *xfer) { - std::cout << "purpleNewXfer" << std::endl; -} -void IMInvoker::purpleDestroy(PurpleXfer *xfer) { - std::cout << "purpleDestroy" << std::endl; -} -void IMInvoker::purpleAddXfer(PurpleXfer *xfer) { - std::cout << "purpleAddXfer" << std::endl; -} -void IMInvoker::purpleUpdateProgress(PurpleXfer *xfer, double percent) { - std::cout << "purpleUpdateProgress" << std::endl; -} -void IMInvoker::purpleCancelLocal(PurpleXfer *xfer) { - std::cout << "purpleCancelLocal" << std::endl; -} -void IMInvoker::purpleCancelRemote(PurpleXfer *xfer) { - std::cout << "purpleCancelRemote" << std::endl; -} -gssize IMInvoker::purpleWrite(PurpleXfer *xfer, const guchar *buffer, gssize size) { - std::cout << "purpleWrite" << std::endl; - return 0; -} -gssize IMInvoker::purpleRead(PurpleXfer *xfer, guchar **buffer, gssize size) { - std::cout << "purpleRead" << std::endl; - return 0; -} -void IMInvoker::purpleDataNotSent(PurpleXfer *xfer, const guchar *buffer, gsize size) { - std::cout << "purpleDataNotSent" << std::endl; -} -void IMInvoker::purpleAddThumbnail(PurpleXfer *xfer, const gchar *formats) { - std::cout << "purpleAddThumbnail" << std::endl; -} - -// notification operations -#if LIBPURPLE_VERSION_MAJOR >= 3 -void* IMInvoker::purpeNotifyMessage(PurpleNotifyMsgType type, const char *title, const char *primary, const char *secondary, PurpleRequestCommonParameters *cpar) { -#else -void* IMInvoker::purpeNotifyMessage(PurpleNotifyMsgType type, const char *title, const char *primary, const char *secondary) { -#endif - return NULL; -} -void* IMInvoker::purpeNotifyEmail(PurpleConnection *gc, const char *subject, const char *from, const char *to, const char *url) { - return NULL; -} -void* IMInvoker::purpeNotifyEmails(PurpleConnection *gc, size_t count, gboolean detailed, const char **subjects, const char **froms, const char **tos, const char **urls) { - return NULL; -} -void* IMInvoker::purpeNotifyFormatted(const char *title, const char *primary, const char *secondary, const char *text) { - return NULL; -} -void* IMInvoker::purpeNotifySearchResults(PurpleConnection *gc, const char *title, const char *primary, const char *secondary, PurpleNotifySearchResults *results, gpointer user_data) { - return NULL; -} -void IMInvoker::purpeNotifySearchResultsNewRows(PurpleConnection *gc, PurpleNotifySearchResults *results, void *data) {} -void* IMInvoker::purpeNotifyUserInfo(PurpleConnection *gc, const char *who, PurpleNotifyUserInfo *user_info) { - return NULL; -} -void* IMInvoker::purpeNotifyURI(const char *uri) { - return NULL; -} -void IMInvoker::purpeNotifyClose(PurpleNotifyType type, void *ui_handle) {} - -// privacy ui operations -void IMInvoker::purplePermitAdded(PurpleAccount *account, const char *name) {} -void IMInvoker::purplePermitRemoved(PurpleAccount *account, const char *name) {} -void IMInvoker::purpleDebyAdded(PurpleAccount *account, const char *name) {} -void IMInvoker::purpleDenyRemoved(PurpleAccount *account, const char *name) {} - - -// request ui operations -#if LIBPURPLE_VERSION_MAJOR >= 3 - -void* IMInvoker::purpleRequestInput(const char *title, const char *primary, - const char *secondary, const char *default_value, - gboolean multiline, gboolean masked, gchar *hint, - const char *ok_text, GCallback ok_cb, - const char *cancel_text, GCallback cancel_cb, - PurpleRequestCommonParameters *cpar, void *user_data) { - return NULL; -} -void* IMInvoker::purpleRequestChoice(const char *title, const char *primary, - const char *secondary, gpointer default_value, - const char *ok_text, GCallback ok_cb, const char *cancel_text, - GCallback cancel_cb , PurpleRequestCommonParameters *cpar, - void *user_data, va_list choices) { - return NULL; -} -void* IMInvoker::purpleRequestAction(const char *title, const char *primary, - const char *secondary, int default_action, - PurpleRequestCommonParameters *cpar, void *user_data, - size_t action_count, va_list actions) { - return NULL; -} - -void* IMInvoker::purpleRequestWait(const char *title, const char *primary, - const char *secondary, gboolean with_progress, - PurpleRequestCancelCb cancel_cb, - PurpleRequestCommonParameters *cpar, void *user_data) { - return NULL; -} - -void IMInvoker::purpleRequestWaitUpdate(void *ui_handle, gboolean pulse, gfloat fraction) { -} - -void* IMInvoker::purpleRequestFields(const char *title, const char *primary, - const char *secondary, PurpleRequestFields *fields, - const char *ok_text, GCallback ok_cb, - const char *cancel_text, GCallback cancel_cb, - PurpleRequestCommonParameters *cpar, void *user_data) { - return NULL; -} -void* IMInvoker::purpleRequestFile(const char *title, const char *filename, - gboolean savedialog, GCallback ok_cb, GCallback cancel_cb, - PurpleRequestCommonParameters *cpar, void *user_data) { - // click ok - PurpleXfer *xfer = (PurpleXfer *)user_data; - PurpleXferType xferType = purple_xfer_get_xfer_type(xfer); - if (xferType == PURPLE_XFER_TYPE_RECEIVE) { - ((PurpleRequestFileCb)ok_cb)(user_data, filename); - } else if (xferType == PURPLE_XFER_TYPE_SEND) { - if (purple_xfer_get_local_filename(xfer) != NULL && purple_xfer_get_filename(xfer) != NULL) { - ((PurpleRequestFileCb)ok_cb)(user_data, purple_xfer_get_local_filename(xfer)); - } else { - ((PurpleRequestFileCb)cancel_cb)(user_data, purple_xfer_get_local_filename(xfer)); - } - } - return NULL; -} - -void* IMInvoker::purpleRequestFolder(const char *title, const char *dirname, - GCallback ok_cb, GCallback cancel_cb - , PurpleRequestCommonParameters *cpar, void *user_data) { - return NULL; -} - -void IMInvoker::purpleRequestClose(PurpleRequestType type, void *ui_handle) { - -} -#else - -void* IMInvoker::purpleRequestInput(const char *title, const char *primary, - const char *secondary, const char *default_value, - gboolean multiline, gboolean masked, gchar *hint, - const char *ok_text, GCallback ok_cb, - const char *cancel_text, GCallback cancel_cb, - PurpleAccount *account, const char *who, - PurpleConversation *conv, void *user_data) { - return NULL; -} - -void* IMInvoker::purpleRequestChoice(const char *title, const char *primary, - const char *secondary, int default_value, - const char *ok_text, GCallback ok_cb, - const char *cancel_text, GCallback cancel_cb, - PurpleAccount *account, const char *who, - PurpleConversation *conv, void *user_data, - va_list choices) { - return NULL; -} - -void* IMInvoker::purpleRequestAction(const char *title, const char *primary, - const char *secondary, int default_action, - PurpleAccount *account, const char *who, - PurpleConversation *conv, void *user_data, - size_t action_count, va_list actions) { - return NULL; -} - -void* IMInvoker::purpleRequestFields(const char *title, const char *primary, - const char *secondary, PurpleRequestFields *fields, - const char *ok_text, GCallback ok_cb, - const char *cancel_text, GCallback cancel_cb, - PurpleAccount *account, const char *who, - PurpleConversation *conv, void *user_data) { - return NULL; -} - -void* IMInvoker::purpleRequestFile(const char *title, const char *filename, - gboolean savedialog, GCallback ok_cb, - GCallback cancel_cb, PurpleAccount *account, - const char *who, PurpleConversation *conv, - void *user_data) { - return NULL; -} - -void IMInvoker::purpleRequestClose(PurpleRequestType type, void *ui_handle) { -} - -void* IMInvoker::purpleRequestFolder(const char *title, const char *dirname, - GCallback ok_cb, GCallback cancel_cb, - PurpleAccount *account, const char *who, - PurpleConversation *conv, void *user_data) { - return NULL; -} - -void* IMInvoker::purpleRequestActionWithIcon(const char *title, const char *primary, - const char *secondary, int default_action, - PurpleAccount *account, const char *who, - PurpleConversation *conv, - gconstpointer icon_data, gsize icon_size, - void *user_data, - size_t action_count, va_list actions) { - return NULL; -} - -#endif - - -// connection ui operations -void IMInvoker::purpleConnectProgress(PurpleConnection *gc, const char *text, size_t step, size_t step_count) {} -void IMInvoker::purpleConnected(PurpleConnection *gc) {} -void IMInvoker::purpleDisonnected(PurpleConnection *gc) {} -void IMInvoker::purpleNotice(PurpleConnection *gc, const char *text) {} -void IMInvoker::purpleNetworkConnected(void) {} -void IMInvoker::purpleNetworkDisconnected(void) {} - -#if LIBPURPLE_VERSION_MAJOR >= 3 -void IMInvoker::purpleReportDisconnect(PurpleConnection *gc, PurpleConnectionError reason, const char *text) { -#else -void IMInvoker::purpleReportDisconnect(PurpleConnection *gc, const char *text) { -#endif -} -// whiteboard ui operations -void IMInvoker::purpleCreateWB(PurpleWhiteboard *wb) {} -void IMInvoker::purpleDestroyWB(PurpleWhiteboard *wb) {} -void IMInvoker::purpleSetDimensions(PurpleWhiteboard *wb, int width, int height) {} -void IMInvoker::purpleSetBrush(PurpleWhiteboard *wb, int size, int color) {} -void IMInvoker::purpleDrawPont(PurpleWhiteboard *wb, int x, int y, int color, int size) {} -void IMInvoker::purpleDrawLine(PurpleWhiteboard *wb, int x1, int y1, int x2, int y2, int color, int size) {} -void IMInvoker::purpleClearWB(PurpleWhiteboard *wb) {} - -// debug ui operations -void IMInvoker::purpleDebugPrint(PurpleDebugLevel level, const char *category, const char *arg_s) { -// std::cout << category << ": " << arg_s << std::endl; -} - -gboolean IMInvoker::purpleDebugIsEnabled(PurpleDebugLevel level, const char *category) { - return true; -} - - -} diff --git a/src/uscxml/plugins/invoker/im/IMInvoker.h b/src/uscxml/plugins/invoker/im/IMInvoker.h deleted file mode 100644 index 82d5762..0000000 --- a/src/uscxml/plugins/invoker/im/IMInvoker.h +++ /dev/null @@ -1,377 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef IMINVOKER_H_FNWG0XCQ -#define IMINVOKER_H_FNWG0XCQ - -#include - -extern "C" { -#include -} - -#include "uscxml/IMConfig.h" - -#if LIBPURPLE_VERSION_MAJOR < 3 -#define PURPLE_STATUS_GET_TYPE purple_status_get_type -#define PURPLE_STATUS_ATTR_GET_ID purple_status_attr_get_id -#define PURPLE_STATUS_ATTR PurpleStatusAttr -#define PURPLE_VALUE PurpleValue -#else -#define PURPLE_STATUS_GET_TYPE purple_status_get_status_type -#define PURPLE_STATUS_ATTR_GET_ID purple_status_attribute_get_id -#define PURPLE_STATUS_ATTR PurpleStatusAttribute -#define PURPLE_VALUE GValue -#endif - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -typedef enum { - PURPLE_BUDDY_NONE = 0x00, /**< No events. */ - PURPLE_BUDDY_SIGNON = 0x01, /**< The buddy signed on. */ - PURPLE_BUDDY_SIGNOFF = 0x02, /**< The buddy signed off. */ - PURPLE_BUDDY_INFO_UPDATED = 0x10, /**< The buddy's information (profile) changed. */ - PURPLE_BUDDY_ICON = 0x40, /**< The buddy's icon changed. */ - PURPLE_BUDDY_MISCELLANEOUS = 0x80, /**< The buddy's service-specific miscalleneous info changed. */ - PURPLE_BUDDY_SIGNON_TIME = 0x11, /**< The buddy's signon time changed. */ - PURPLE_BUDDY_EVIL = 0x12, /**< The buddy's warning level changed. */ - PURPLE_BUDDY_DIRECTIM_CONNECTED = 0x14, /**< Connected to the buddy via DirectIM. */ - PURPLE_BUDDY_DIRECTIM_DISCONNECTED = 0x18, /**< Disconnected from the buddy via DirectIM. */ - PURPLE_BUDDY_NAME = 0x20 /** create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("im"); - names.push_back("instant-messaging"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#instant-messaging"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - -private: - static bool _libPurpleIsInitialized; - static Data _pluginData; - - Data _dataModelVars; - - static Data buddyToData(PurpleBuddy *buddy); - static Data statusToData(PurpleStatus *status); - static Data purpleValueToData(PURPLE_VALUE* value); - - static PurpleAccountUiOps _uiAccountOps; - static PurpleEventLoopUiOps _uiEventLoopOps; - static PurpleCoreUiOps _uiCoreOps; - static PurpleConversationUiOps _uiConvOps; - static PurpleBlistUiOps _uiBuddyOps; - static PurpleXferUiOps _uiXferOps; - static PurpleNotifyUiOps _uiNotifyOps; -#if LIBPURPLE_VERSION_MAJOR < 3 - static PurplePrivacyUiOps _uiPrivacyOps; -#endif - static PurpleRequestUiOps _uiRequestOps; - static PurpleConnectionUiOps _uiConnectOps; - static PurpleWhiteboardUiOps _uiWhiteboardOps; - static PurpleDebugUiOps _uiDebugOps; - -#if LIBPURPLE_VERSION_MAJOR >= 3 - static PurpleRequestFeature _features; -#endif - - static GHashTable* _uiInfo; - static GRand* _gRand; - - static tthread::recursive_mutex _accountMutex; - static std::map _accountInstances; - static tthread::mutex _initMutex; - static tthread::condition_variable _initCond; - static DelayedEventQueue* _eventQueue; - - // libpurple event callbacks - static void signedOnCB(PurpleConnection *gc, gpointer null); - static void conversationCreatedCB(PurpleConversation *conv, void *data); - static void chatJoinedCB(PurpleConversation *conv, void *data); - static void chatJoinFailedCB(PurpleConnection *gc, GHashTable *components); - static void buddyTypingCB(PurpleAccount *account, const char *name, void *data); - static void buddyTypedCB(PurpleAccount *account, const char *name, void *data); - static void buddyTypingStoppedCB(PurpleAccount *account, const char *name, void *data); - static void buddyIdleChangedCB(PurpleBuddy *buddy, gboolean old_idle, gboolean idle, PurpleBuddyEvent event); - static void blistNodeAliasedCB(PurpleBlistNode *node, char *old_alias); - static void buddyEventCB(PurpleBuddy *buddy, PurpleBuddyEvent event); - static void buddyStatusChangedCB(PurpleBuddy *buddy, PurpleStatus *oldstatus, PurpleStatus *newstatus, PurpleBuddyEvent event); - static void buddyAddedCB(PurpleBuddy* buddy); - static void buddyRemovedCB(PurpleBuddy* buddy); - static void fileRecvRequestCB(PurpleXfer *xfer); - static void buddyCapsChangedCB(PurpleBuddy* buddy, PurpleMediaCaps newcaps, PurpleMediaCaps oldcaps); - - // these are only being called from the delayed queue's thread - static void initLibPurple(void *userdata, const std::string event); - static void setupPurpleSignals(); - - static void send(void *userdata, const std::string event); - static void invoke(void *userdata, const std::string event); - - // libpurple ui operations - static guint purpleEventTimeoutAdd(guint interval, GSourceFunc function, gpointer data); - static gboolean purpleEventTimeoutRemove(guint handle); - static guint purpleEventInputAdd(int fd, PurpleInputCondition cond, PurpleInputFunction func, gpointer user_data); - static gboolean purpleEventInputRemove(guint handle); - static int purpleEventInputGetError(int fd, int *error); - static guint purpleEventTimeoutAddSec(guint interval, GSourceFunc function, gpointer data); - - // callback contexts - struct PurpleEventContext { - PurpleInputFunction input; - PurpleInputCondition cond; - int inputFD; - GSourceFunc function; - gpointer data; - }; - static void purpleCallback(void *userdata, const std::string event); - - // libpurple debug - static void purpleDebugPrint(PurpleDebugLevel level, const char *category, const char *arg_s); - static gboolean purpleDebugIsEnabled(PurpleDebugLevel level, const char *category); - - - // libpurple core operations - static void purplePrefsInit(void); - static void purpleDebugInit(void); - static void purpleUIInit(void); - static void purpleQuit(void); - static GHashTable* purpleGetUIInfo(void); - - //libpurple conversation operations - static void purpleCreateConversation(PurpleConversation *conv); - static void purpleDestroyConversation(PurpleConversation *conv); - static void purpleWriteChat(PurpleConversation *conv, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime); - static void purpleWriteIm(PurpleConversation *conv, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime); - static void purpleWriteConv(PurpleConversation *conv, const char *name, const char *alias, const char *message, PurpleMessageFlags flags, time_t mtime); - static void purpleChatAddUsers(PurpleConversation *conv, GList *cbuddies, gboolean new_arrivals); - static void purpleChatRenameUser(PurpleConversation *conv, const char *old_name, const char *new_name, const char *new_alias); - static void purpleChatRemoveUsers(PurpleConversation *conv, GList *users); - static void purpleChatUpdateUser(PurpleConversation *conv, const char *user); - static void purplePresentConversation(PurpleConversation *conv); - static gboolean purpleHasFocus(PurpleConversation *conv); - static gboolean purpleCustomSmileyAdd(PurpleConversation *conv, const char *smile, gboolean remote); - static void purpleCustomSmileyWrite(PurpleConversation *conv, const char *smile, const guchar *data, gsize size); - static void purpleCustomSmileyClose(PurpleConversation *conv, const char *smile); - static void purpleSendConfirm(PurpleConversation *conv, const char *message); - - // buddy operations - static void purpleNewList(PurpleBuddyList *list); - static void purpleNewNode(PurpleBlistNode *node); - static void purpleShow(PurpleBuddyList *list); - static void purpleUpdate(PurpleBuddyList *list, PurpleBlistNode *node); - static void purpleRemove(PurpleBuddyList *list, PurpleBlistNode *node); - static void purpleDestroy(PurpleBuddyList *list); - static void purpleSetVisible(PurpleBuddyList *list, gboolean show); - static void purpleRequestAddBuddy(PurpleAccount *account, const char *username, const char *group, const char *alias); - static void purpleRequestAddChat(PurpleAccount *account, PurpleGroup *group, const char *alias, const char *name); - static void purpleRequestAddGroup(void); - static void purpleSaveNode(PurpleBlistNode *node); - static void purpleRemoveNode(PurpleBlistNode *node); - static void purpleSaveAccount(PurpleAccount *account); - - // file transfer operations - static void purpleNewXfer(PurpleXfer *xfer); - static void purpleDestroy(PurpleXfer *xfer); - static void purpleAddXfer(PurpleXfer *xfer); - static void purpleUpdateProgress(PurpleXfer *xfer, double percent); - static void purpleCancelLocal(PurpleXfer *xfer); - static void purpleCancelRemote(PurpleXfer *xfer); - static gssize purpleWrite(PurpleXfer *xfer, const guchar *buffer, gssize size); - static gssize purpleRead(PurpleXfer *xfer, guchar **buffer, gssize size); - static void purpleDataNotSent(PurpleXfer *xfer, const guchar *buffer, gsize size); - static void purpleAddThumbnail(PurpleXfer *xfer, const gchar *formats); - - // notification operations -#if LIBPURPLE_VERSION_MAJOR >= 3 - static void* purpeNotifyMessage(PurpleNotifyMsgType type, const char *title, const char *primary, const char *secondary , PurpleRequestCommonParameters *cpar); -#else - static void* purpeNotifyMessage(PurpleNotifyMsgType type, const char *title, const char *primary, const char *secondary); -#endif - static void* purpeNotifyEmail(PurpleConnection *gc, const char *subject, const char *from, const char *to, const char *url); - static void* purpeNotifyEmails(PurpleConnection *gc, size_t count, gboolean detailed, const char **subjects, const char **froms, const char **tos, const char **urls); - static void* purpeNotifyFormatted(const char *title, const char *primary, const char *secondary, const char *text); - static void* purpeNotifySearchResults(PurpleConnection *gc, const char *title, const char *primary, const char *secondary, PurpleNotifySearchResults *results, gpointer user_data); - static void purpeNotifySearchResultsNewRows(PurpleConnection *gc, PurpleNotifySearchResults *results, void *data); - static void* purpeNotifyUserInfo(PurpleConnection *gc, const char *who, PurpleNotifyUserInfo *user_info); - static void* purpeNotifyURI(const char *uri); - static void purpeNotifyClose(PurpleNotifyType type, void *ui_handle); - - // account operations - static void accountNotifyAdded(PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *message); - static void accountStatusChanged(PurpleAccount *account, PurpleStatus *status); - static void accountRequestAdd(PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *message); - static void* accountRequestAuthorize(PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *message, gboolean on_list, PurpleAccountRequestAuthorizationCb authorize_cb, PurpleAccountRequestAuthorizationCb deny_cb, void *user_data); - static void accountCloseRequest(void *ui_handle); - - // privacy ui operations - static void purplePermitAdded(PurpleAccount *account, const char *name); - static void purplePermitRemoved(PurpleAccount *account, const char *name); - static void purpleDebyAdded(PurpleAccount *account, const char *name); - static void purpleDenyRemoved(PurpleAccount *account, const char *name); - - // request ui operations -#if LIBPURPLE_VERSION_MAJOR >= 3 - - static void* purpleRequestInput(const char *title, const char *primary, - const char *secondary, const char *default_value, - gboolean multiline, gboolean masked, gchar *hint, - const char *ok_text, GCallback ok_cb, - const char *cancel_text, GCallback cancel_cb, - PurpleRequestCommonParameters *cpar, void *user_data); - static void* purpleRequestChoice(const char *title, const char *primary, - const char *secondary, gpointer default_value, - const char *ok_text, GCallback ok_cb, const char *cancel_text, - GCallback cancel_cb , PurpleRequestCommonParameters *cpar, - void *user_data, va_list choices); - static void* purpleRequestAction(const char *title, const char *primary, - const char *secondary, int default_action, - PurpleRequestCommonParameters *cpar, void *user_data, - size_t action_count, va_list actions); - static void* purpleRequestWait(const char *title, const char *primary, - const char *secondary, gboolean with_progress, - PurpleRequestCancelCb cancel_cb, - PurpleRequestCommonParameters *cpar, void *user_data); - - static void purpleRequestWaitUpdate(void *ui_handle, gboolean pulse, gfloat fraction); - - static void* purpleRequestFields(const char *title, const char *primary, - const char *secondary, PurpleRequestFields *fields, - const char *ok_text, GCallback ok_cb, - const char *cancel_text, GCallback cancel_cb, - PurpleRequestCommonParameters *cpar, void *user_data); - static void* purpleRequestFile(const char *title, const char *filename, - gboolean savedialog, GCallback ok_cb, GCallback cancel_cb, - PurpleRequestCommonParameters *cpar, void *user_data); - static void* purpleRequestFolder(const char *title, const char *dirname, - GCallback ok_cb, GCallback cancel_cb, - PurpleRequestCommonParameters *cpar, void *user_data); - static void purpleRequestClose(PurpleRequestType type, void *ui_handle); -#else - - static void* purpleRequestInput(const char *title, const char *primary, - const char *secondary, const char *default_value, - gboolean multiline, gboolean masked, gchar *hint, - const char *ok_text, GCallback ok_cb, - const char *cancel_text, GCallback cancel_cb, - PurpleAccount *account, const char *who, - PurpleConversation *conv, void *user_data); - - static void* purpleRequestChoice(const char *title, const char *primary, - const char *secondary, int default_value, - const char *ok_text, GCallback ok_cb, - const char *cancel_text, GCallback cancel_cb, - PurpleAccount *account, const char *who, - PurpleConversation *conv, void *user_data, - va_list choices); - - static void* purpleRequestAction(const char *title, const char *primary, - const char *secondary, int default_action, - PurpleAccount *account, const char *who, - PurpleConversation *conv, void *user_data, - size_t action_count, va_list actions); - - static void* purpleRequestFields(const char *title, const char *primary, - const char *secondary, PurpleRequestFields *fields, - const char *ok_text, GCallback ok_cb, - const char *cancel_text, GCallback cancel_cb, - PurpleAccount *account, const char *who, - PurpleConversation *conv, void *user_data); - - static void* purpleRequestFile(const char *title, const char *filename, - gboolean savedialog, GCallback ok_cb, - GCallback cancel_cb, PurpleAccount *account, - const char *who, PurpleConversation *conv, - void *user_data); - - static void purpleRequestClose(PurpleRequestType type, void *ui_handle); - - static void* purpleRequestFolder(const char *title, const char *dirname, - GCallback ok_cb, GCallback cancel_cb, - PurpleAccount *account, const char *who, - PurpleConversation *conv, void *user_data); - - static void* purpleRequestActionWithIcon(const char *title, const char *primary, - const char *secondary, int default_action, - PurpleAccount *account, const char *who, - PurpleConversation *conv, - gconstpointer icon_data, gsize icon_size, - void *user_data, - size_t action_count, va_list actions); - -#endif - - - // connection ui operations - static void purpleConnectProgress(PurpleConnection *gc, const char *text, size_t step, size_t step_count); - static void purpleConnected(PurpleConnection *gc); - static void purpleDisonnected(PurpleConnection *gc); - static void purpleNotice(PurpleConnection *gc, const char *text); - static void purpleNetworkConnected(void); - static void purpleNetworkDisconnected(void); -#if LIBPURPLE_VERSION_MAJOR >= 3 - static void purpleReportDisconnect(PurpleConnection *gc, PurpleConnectionError reason, const char *text); -#else - static void purpleReportDisconnect(PurpleConnection *gc, const char *text); -#endif - - // whiteboard ui operations - static void purpleCreateWB(PurpleWhiteboard *wb); - static void purpleDestroyWB(PurpleWhiteboard *wb); - static void purpleSetDimensions(PurpleWhiteboard *wb, int width, int height); - static void purpleSetBrush(PurpleWhiteboard *wb, int size, int color); - static void purpleDrawPont(PurpleWhiteboard *wb, int x, int y, int color, int size); - static void purpleDrawLine(PurpleWhiteboard *wb, int x1, int y1, int x2, int y2, int color, int size); - static void purpleClearWB(PurpleWhiteboard *wb); - - - PurpleAccount* _account; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(IMInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: IMINVOKER_H_FNWG0XCQ */ diff --git a/src/uscxml/plugins/invoker/imap/IMAPInvoker.cpp b/src/uscxml/plugins/invoker/imap/IMAPInvoker.cpp deleted file mode 100644 index d3686f9..0000000 --- a/src/uscxml/plugins/invoker/imap/IMAPInvoker.cpp +++ /dev/null @@ -1,495 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#define NOMINMAX // and have MSVC die in a fire for defining min macro -#include "IMAPInvoker.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -#include -#include "uscxml/UUID.h" - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new IMAPInvokerProvider() ); - return true; -} -#endif - -IMAPInvoker::IMAPInvoker() { -} - -IMAPInvoker::~IMAPInvoker() { -}; - -boost::shared_ptr IMAPInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new IMAPInvoker()); - return invoker; -} - -Data IMAPInvoker::getDataModelVariables() { - Data data; - return data; -} - -void IMAPInvoker::run(void* instance) { - IMAPInvoker* INSTANCE = (IMAPInvoker*)instance; - while(true) { - IMAPContext* req = INSTANCE->_workQueue.pop(); - if (INSTANCE->_isRunning) { - INSTANCE->process(req); - } else { - return; - } - } -} - -size_t IMAPInvoker::writeCurlData(void *ptr, size_t size, size_t nmemb, void *userdata) { - if (!userdata) - return 0; - - IMAPContext* ctx = (IMAPContext*)userdata; - - size_t toWrite = (std::min)(ctx->outContent.length() - ctx->readPtr, size * nmemb); - if (toWrite > 0) { - memcpy (ptr, ctx->outContent.c_str() + ctx->readPtr, toWrite); - ctx->readPtr += toWrite; - } - - return toWrite; -} - -size_t IMAPInvoker::readCurlData(void *ptr, size_t size, size_t nmemb, void *userdata) { - if (!userdata) - return 0; - - IMAPContext* ctx = (IMAPContext*)userdata; - ctx->inContent << std::string((char*)ptr, size * nmemb); - - return size * nmemb; -} - - -void IMAPInvoker::send(const SendRequest& req) { - IMAPContext* ctx = NULL; - - if (false) { - } else if (iequals(req.name, "select")) { - IMAPContext::Select* args = new IMAPContext::Select(); - Event::getParam(req.params, "mailbox", args->mailbox); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_SELECT; - ctx->arguments = args; - - } else if (iequals(req.name, "examine")) { - IMAPContext::Examine* args = new IMAPContext::Examine(); - Event::getParam(req.params, "mailbox", args->mailbox); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_EXAMINE; - ctx->arguments = args; - - } else if (iequals(req.name, "delete")) { - IMAPContext::Delete* args = new IMAPContext::Delete(); - Event::getParam(req.params, "mailbox", args->mailbox); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_DELETE; - ctx->arguments = args; - - } else if (iequals(req.name, "rename")) { - IMAPContext::Rename* args = new IMAPContext::Rename(); - Event::getParam(req.params, "mailbox", args->mailbox); - Event::getParam(req.params, "name", args->newName); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_RENAME; - ctx->arguments = args; - - } else if (iequals(req.name, "subscribe")) { - IMAPContext::Subscribe* args = new IMAPContext::Subscribe(); - Event::getParam(req.params, "mailbox", args->mailbox); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_SUBSCRIBE; - ctx->arguments = args; - - } else if (iequals(req.name, "unsubscribe")) { - IMAPContext::Unsubscribe* args = new IMAPContext::Unsubscribe(); - Event::getParam(req.params, "mailbox", args->mailbox); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_UNSUBSCRIBE; - ctx->arguments = args; - - } else if (iequals(req.name, "list")) { - IMAPContext::List* args = new IMAPContext::List(); - Event::getParam(req.params, "mailbox", args->mailbox); - Event::getParam(req.params, "reference", args->refName); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_LIST; - ctx->arguments = args; - - } else if (iequals(req.name, "lsub")) { - IMAPContext::LSub* args = new IMAPContext::LSub(); - Event::getParam(req.params, "mailbox", args->mailbox); - Event::getParam(req.params, "reference", args->refName); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_LSUB; - ctx->arguments = args; - - } else if (iequals(req.name, "status")) { - IMAPContext::Status* args = new IMAPContext::Status(); - Event::getParam(req.params, "mailbox", args->mailbox); - Event::getParam(req.params, "dataitems", args->dataItems); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_STATUS; - ctx->arguments = args; - - } else if (iequals(req.name, "append")) { - IMAPContext::Append* args = new IMAPContext::Append(); - Event::getParam(req.params, "mailbox", args->mailbox); - Event::getParam(req.params, "flags", args->flags); - Event::getParam(req.params, "datetime", args->dateTime); - - if (!Event::getParam(req.params, "message", args->literal)) { - args->literal = req.content; - } - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_APPEND; - ctx->arguments = args; - - } else if (iequals(req.name, "check")) { - IMAPContext::Check* args = new IMAPContext::Check(); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_CHECK; - ctx->arguments = args; - - } else if (iequals(req.name, "close")) { - IMAPContext::Close* args = new IMAPContext::Close(); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_CLOSE; - ctx->arguments = args; - - } else if (iequals(req.name, "expunge")) { - IMAPContext::Expunge* args = new IMAPContext::Expunge(); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_EXPUNGE; - ctx->arguments = args; - - } else if (iequals(req.name, "search")) { - IMAPContext::Search* args = new IMAPContext::Search(); - Event::getParam(req.params, "charset", args->charSet); - Event::getParam(req.params, "criteria", args->criteria); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_SEARCH; - ctx->arguments = args; - - } else if (iequals(req.name, "fetch")) { - IMAPContext::Fetch* args = new IMAPContext::Fetch(); - Event::getParam(req.params, "sequence", args->sequence); - Event::getParam(req.params, "itemnames", args->itemNames); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_FETCH; - ctx->arguments = args; - - } else if (iequals(req.name, "store")) { - IMAPContext::Store* args = new IMAPContext::Store(); - Event::getParam(req.params, "sequence", args->sequence); - Event::getParam(req.params, "itemnames", args->itemNames); - Event::getParam(req.params, "values", args->values); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_STORE; - ctx->arguments = args; - - } else if (iequals(req.name, "copy")) { - IMAPContext::Copy* args = new IMAPContext::Copy(); - Event::getParam(req.params, "mailbox", args->mailbox); - Event::getParam(req.params, "sequence", args->sequence); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_COPY; - ctx->arguments = args; - - } else if (iequals(req.name, "uid")) { - IMAPContext::UId* args = new IMAPContext::UId(); - Event::getParam(req.params, "command", args->command); - Event::getParam(req.params, "arguments", args->arguments); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_UID; - ctx->arguments = args; - - } else if (boost::istarts_with(req.name, "x")) { - IMAPContext::XExtension* args = new IMAPContext::XExtension(); - args->command = req.name; - Event::getParam(req.params, "arguments", args->arguments); - - ctx = new IMAPContext(); - ctx->command = IMAPContext::IMAP_XEXTENSION; - ctx->arguments = args; - - } - - if (ctx == NULL) { - returnErrorExecution("Event '" + req.name + "' not known"); - return; - } - - Event::getParam(req.params, "verbose", ctx->verbose); - Event::getParam(req.params, "ssl", ctx->useSSL); - - ctx->invoker = this; - ctx->sendReq = req; - - _workQueue.push(ctx); -} - -void IMAPInvoker::process(IMAPContext* ctx) { - CURL* _curl; - CURLcode curlError; - - // see http://curl.haxx.se/libcurl/c/imap-tls.html - _curl = curl_easy_init(); - if(_curl) { - (curlError = curl_easy_setopt(_curl, CURLOPT_USERNAME, _username.c_str())) == CURLE_OK || - LOG(ERROR) << "Cannot set username: " << curl_easy_strerror(curlError); - (curlError = curl_easy_setopt(_curl, CURLOPT_PASSWORD, _password.c_str())) == CURLE_OK || - LOG(ERROR) << "Cannot set password: " << curl_easy_strerror(curlError); - (curlError = curl_easy_setopt(_curl, CURLOPT_URL, _server.c_str())) == CURLE_OK || - LOG(ERROR) << "Cannot set server string: " << curl_easy_strerror(curlError); - - if (ctx->useSSL) { - (curlError = curl_easy_setopt(_curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL)) == CURLE_OK || - LOG(ERROR) << "Cannot use SSL: " << curl_easy_strerror(curlError); -#if 1 - (curlError = curl_easy_setopt(_curl, CURLOPT_SSL_VERIFYPEER, 0L)) == CURLE_OK || - LOG(ERROR) << "Cannot unset verify peer with SSL: " << curl_easy_strerror(curlError); - (curlError = curl_easy_setopt(_curl, CURLOPT_SSL_VERIFYHOST, 0L)) == CURLE_OK || - LOG(ERROR) << "Cannot unset verify host with SSL: " << curl_easy_strerror(curlError); -#else - (curlError = curl_easy_setopt(_curl, CURLOPT_CAINFO, "/path/to/certificate.pem")) == CURLE_OK || - LOG(ERROR) << "Cannot set CA info path: " << curl_easy_strerror(curlError); -#endif - - } - - (curlError = curl_easy_setopt(_curl, CURLOPT_READFUNCTION, IMAPInvoker::writeCurlData)) == CURLE_OK || - LOG(ERROR) << "Cannot register read function: " << curl_easy_strerror(curlError); - (curlError = curl_easy_setopt(_curl, CURLOPT_READDATA, ctx)) == CURLE_OK || - LOG(ERROR) << "Cannot register userdata for read function: " << curl_easy_strerror(curlError); - (curlError = curl_easy_setopt(_curl, CURLOPT_WRITEFUNCTION, IMAPInvoker::readCurlData)) == CURLE_OK || - LOG(ERROR) << "Cannot register read function: " << curl_easy_strerror(curlError); - (curlError = curl_easy_setopt(_curl, CURLOPT_WRITEDATA, ctx)) == CURLE_OK || - LOG(ERROR) << "Cannot register userdata for write function: " << curl_easy_strerror(curlError); - - if (ctx->verbose) { - (curlError = curl_easy_setopt(_curl, CURLOPT_VERBOSE, 1L)) == CURLE_OK || - LOG(ERROR) << "Cannot set curl to verbose: " << curl_easy_strerror(curlError); - } - - std::stringstream cmdSS; - switch (ctx->command) { - case IMAPContext::IMAP_SELECT: { - IMAPContext::Select* cmd = (IMAPContext::Select*)ctx->arguments; - cmdSS << "SELECT " << "\"" << cmd->mailbox << "\""; - break; - } - case IMAPContext::IMAP_EXAMINE: { - IMAPContext::Examine* cmd = (IMAPContext::Examine*)ctx->arguments; - cmdSS << "EXAMINE " << "\"" << cmd->mailbox << "\""; - break; - } - case IMAPContext::IMAP_CREATE: { - IMAPContext::Create* cmd = (IMAPContext::Create*)ctx->arguments; - cmdSS << "CREATE " << "\"" << cmd->mailbox << "\""; - break; - } - case IMAPContext::IMAP_DELETE: { - IMAPContext::Delete* cmd = (IMAPContext::Delete*)ctx->arguments; - cmdSS << "DELETE " << "\"" << cmd->mailbox << "\""; - break; - } - case IMAPContext::IMAP_RENAME: { - IMAPContext::Rename* cmd = (IMAPContext::Rename*)ctx->arguments; - cmdSS << "RENAME " << "\"" << cmd->mailbox << "\" \"" << cmd->newName << "\""; - break; - } - case IMAPContext::IMAP_SUBSCRIBE: { - IMAPContext::Subscribe* cmd = (IMAPContext::Subscribe*)ctx->arguments; - cmdSS << "SUBSCRIBE " << "\"" << cmd->mailbox << "\""; - break; - } - case IMAPContext::IMAP_UNSUBSCRIBE: { - IMAPContext::Unsubscribe* cmd = (IMAPContext::Unsubscribe*)ctx->arguments; - cmdSS << "UNSUBSCRIBE " << "\"" << cmd->mailbox << "\""; - break; - } - case IMAPContext::IMAP_LIST: { - IMAPContext::List* cmd = (IMAPContext::List*)ctx->arguments; - cmdSS << "LIST " << "\"" << cmd->mailbox << "\" \"" << cmd->refName << "\""; - break; - } - case IMAPContext::IMAP_LSUB: { - IMAPContext::LSub* cmd = (IMAPContext::LSub*)ctx->arguments; - cmdSS << "LSUB " << "\"" << cmd->mailbox << "\" \"" << cmd->refName << "\""; - break; - } - case IMAPContext::IMAP_STATUS: { - IMAPContext::Status* cmd = (IMAPContext::Status*)ctx->arguments; - cmdSS << "STATUS " << "\"" << cmd->mailbox << "\" (" << cmd->dataItems << ")"; - break; - } - case IMAPContext::IMAP_APPEND: { - IMAPContext::Append* cmd = (IMAPContext::Append*)ctx->arguments; - cmdSS << "APPEND " << "\"" << cmd->mailbox << "\" (" << cmd->flags << ") {" << cmd->dateTime << "}"; - break; - } - case IMAPContext::IMAP_CHECK: { - cmdSS << "CHECK"; - break; - } - case IMAPContext::IMAP_CLOSE: { - cmdSS << "CLOSE"; - break; - } - case IMAPContext::IMAP_EXPUNGE: { - cmdSS << "EXPUNGE"; - break; - } - case IMAPContext::IMAP_SEARCH: { - IMAPContext::Search* cmd = (IMAPContext::Search*)ctx->arguments; - cmdSS << "SEARCH "; - if (cmd->charSet.size() > 0) { - cmdSS << "CHARSET " << cmd->charSet << " "; - } - cmdSS << cmd->criteria; - break; - } - case IMAPContext::IMAP_FETCH: { - IMAPContext::Fetch* cmd = (IMAPContext::Fetch*)ctx->arguments; - cmdSS << "FETCH " << cmd->sequence << " " << cmd->itemNames; - break; - } - case IMAPContext::IMAP_STORE: { - IMAPContext::Store* cmd = (IMAPContext::Store*)ctx->arguments; - cmdSS << "STORE " << cmd->sequence << " " << cmd->itemNames << " " << cmd->values; - break; - } - case IMAPContext::IMAP_COPY: { - IMAPContext::Copy* cmd = (IMAPContext::Copy*)ctx->arguments; - cmdSS << "COPY " << "\"" << cmd->mailbox << "\" " << cmd->sequence; - break; - } - case IMAPContext::IMAP_UID: { - IMAPContext::UId* cmd = (IMAPContext::UId*)ctx->arguments; - cmdSS << "UID " << cmd->command << " " << cmd->arguments; - break; - } - case IMAPContext::IMAP_XEXTENSION: { - IMAPContext::XExtension* cmd = (IMAPContext::XExtension*)ctx->arguments; - cmdSS << cmd->command << " " << cmd->arguments; - break; - } - default: - break; - } - curl_easy_setopt(_curl, CURLOPT_CUSTOMREQUEST, cmdSS.str().c_str()); - - CURLcode res = curl_easy_perform(_curl); - - /* Check for errors */ - if(res != CURLE_OK) { - LOG(ERROR) << "curl_easy_perform() failed: " << curl_easy_strerror(res); - returnErrorExecution("error.mail.send"); - } else { - - Event e; - -#if 0 - switch (ctx->command) { - case IMAPContext::LIST: - e.data = parseListReponse(ctx->inContent.str()); - break; - default: - break; - } -#endif - - e.name = ctx->sendReq.name + ".success"; - e.data.compound["raw"] = Data(ctx->inContent.str(), Data::VERBATIM); - - returnEvent(e); - } - - /* Always cleanup */ - curl_easy_cleanup(_curl); - - } -} - -#if 0 -Data IMAPInvoker::parseListReponse(const std::string& response) { - Data data; - - std::string line; - std::istringstream inSS(response); - - while(std::getline(inSS, line, '\n')) { - // individual lines - size_t lastSep = line.find_last_of("\" "); - if (lastSep != std::string::npos) { - - } - } - - return data; -} -#endif - -void IMAPInvoker::cancel(const std::string sendId) { -} - -void IMAPInvoker::invoke(const InvokeRequest& req) { - Event::getParam(req.params, "username", _username); - Event::getParam(req.params, "password", _password); - Event::getParam(req.params, "server", _server); - - _isRunning = true; - _thread = new tthread::thread(IMAPInvoker::run, this); -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/imap/IMAPInvoker.h b/src/uscxml/plugins/invoker/imap/IMAPInvoker.h deleted file mode 100644 index bf2b3e9..0000000 --- a/src/uscxml/plugins/invoker/imap/IMAPInvoker.h +++ /dev/null @@ -1,171 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef IMAPINVOKER_H_W09JFED0 -#define IMAPINVOKER_H_W09JFED0 - -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -#include - -namespace uscxml { - -class IMAPInvoker : public InvokerImpl { -public: - IMAPInvoker(); - virtual ~IMAPInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("imap"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#imap"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - -protected: - - class IMAPContext { - - public: - enum Cmd { - // valid in authenticated state - IMAP_SELECT, - IMAP_EXAMINE, - IMAP_CREATE, - IMAP_DELETE, - IMAP_RENAME, - IMAP_SUBSCRIBE, - IMAP_UNSUBSCRIBE, - IMAP_LIST, - IMAP_LSUB, - IMAP_STATUS, - IMAP_APPEND, - // valid in selected state - IMAP_CHECK, - IMAP_CLOSE, - IMAP_EXPUNGE, - IMAP_SEARCH, - IMAP_FETCH, - IMAP_STORE, - IMAP_COPY, - IMAP_UID, - IMAP_XEXTENSION, - }; - - struct MailboxOp { - std::string mailbox; - }; - - struct Select : MailboxOp {}; - struct Examine : MailboxOp {}; - struct Create : MailboxOp {}; - struct Delete : MailboxOp {}; - struct Rename : MailboxOp { - std::string newName; - }; - struct Subscribe : MailboxOp {}; - struct Unsubscribe : MailboxOp {}; - struct List : MailboxOp { - std::string refName; - }; - struct LSub : List {}; - struct Status : MailboxOp { - std::string dataItems; - }; - struct Append : MailboxOp { - std::string flags; - std::string dateTime; - std::string literal; - }; - struct Check {}; - struct Close {}; - struct Expunge {}; - struct Search { - std::string charSet; - std::string criteria; - }; - struct Fetch { - std::string sequence; - std::string itemNames; - }; - struct Store : Fetch { - std::string values; - }; - struct Copy : MailboxOp { - std::string sequence; - }; - struct UId { - std::string command; - std::string arguments; - }; - struct XExtension : UId {}; - - - IMAPContext() : readPtr(0) {} - - void* arguments; - Cmd command; - - IMAPInvoker* invoker; - SendRequest sendReq; - std::stringstream inContent; - std::string outContent; - size_t readPtr; - bool verbose; - bool useSSL; - - }; - -protected: - std::string _username; - std::string _password; - std::string _server; - - static void run(void*); - - tthread::thread* _thread; - uscxml::concurrency::BlockingQueue _workQueue; - bool _isRunning; - - void process(IMAPContext* ctx); - static size_t writeCurlData(void *ptr, size_t size, size_t nmemb, void *userdata); - static size_t readCurlData(void *ptr, size_t size, size_t nmemb, void *userdata); - -// Data parseListReponse(const std::string& response); -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(IMAPInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: IMAPINVOKER_H_W09JFED0 */ diff --git a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp deleted file mode 100644 index 7b12ddd..0000000 --- a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp +++ /dev/null @@ -1,1097 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include - -#include "MilesSessionInvoker.h" -#include "uscxml/server/HTTPServer.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -#include -#include /* srand, rand */ - -#ifdef _WIN32 -#define strdup _strdup -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new MilesSessionInvokerProvider() ); - return true; -} -#endif - -MilesSessionInvoker::MilesSessionInvoker() { - /* Initialize Miles */ - miles_init(); - - _isRunning = false; - _imageSeq = 0; - num_connected = 0; -} - -MilesSessionInvoker::~MilesSessionInvoker() { - free_media_buffers(); -}; - -boost::shared_ptr MilesSessionInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new MilesSessionInvoker()); - invoker->_interpreter = interpreter; - return invoker; -} - -Data MilesSessionInvoker::getDataModelVariables() { - Data data; - return data; -} - -void MilesSessionInvoker::init_media_buffers() { - video_out_buf = NULL; - video_conv_buf = NULL; - encoded_out_img = NULL; - audio_in_buf = NULL; - render_img = NULL; - render_img_size = 0; - audio_data = NULL; - encoded_out_audio = NULL; - audio_read_buf = NULL; - video_data = (char *)malloc(1000000); - text_msg_buf = (char *)malloc(1000); - text_msg_available = 0; -} - -void MilesSessionInvoker::free_media_buffers() { - if(video_out_buf) - free(video_out_buf); - video_out_buf = NULL; - if(video_conv_buf) - free(video_conv_buf); - video_conv_buf = NULL; - if(encoded_out_img) - free(encoded_out_img); - encoded_out_img = NULL; - if(audio_in_buf) - free(audio_in_buf); - audio_in_buf = NULL; - if(render_img) - free(render_img); - render_img = NULL; - render_img_size = 0; - if(audio_data) - free(audio_data); - audio_data = NULL; - if(video_data) - free(video_data); - video_data = NULL; - if(encoded_out_audio) - free(encoded_out_audio); - encoded_out_audio = NULL; - if(audio_read_buf) - free(audio_read_buf); - audio_read_buf = NULL; - if(text_msg_buf) - free(text_msg_buf); - text_msg_buf = NULL; - text_msg_available = 0; -} - -void MilesSessionInvoker::free_video_buffers() { - if(video_out_buf) - free(video_out_buf); - video_out_buf = NULL; - if(video_conv_buf) - free(video_conv_buf); - video_conv_buf = NULL; - if(encoded_out_img) - free(encoded_out_img); - encoded_out_img = NULL; - if(render_img) - free(render_img); - render_img = NULL; - render_img_size = 0; - if(video_data) - free(video_data); - video_data = NULL; -} - -void MilesSessionInvoker::free_audio_buffers() { - if(audio_in_buf) - free(audio_in_buf); - audio_in_buf = NULL; - if(audio_data) - free(audio_data); - audio_data = NULL; - video_data = NULL; - if(encoded_out_audio) - free(encoded_out_audio); - encoded_out_audio = NULL; - if(audio_read_buf) - free(audio_read_buf); - audio_read_buf = NULL; -} - -void MilesSessionInvoker::free_text_buffers() { - if(text_msg_buf) - free(text_msg_buf); - text_msg_buf = NULL; - text_msg_available = 0; -} - -// Yes, sort of ugly... -char confero_text_msg_buf[1000]; -int confero_text_msg_available = 0; - -int receive_text_message_callback(u_int32_t ssrc, char *pkt, int length) { - char cname[100]; - int i=0, j; - - while(pkt[i]) { - cname[i] = pkt[i]; - i++; - } - cname[i++] = 0; - j = i; - while(pkt[j] && j' || pkt[j]=='\r' || pkt[j]=='\n') - pkt[j] = ' '; - j++; - } - memcpy(confero_text_msg_buf, pkt+i, length-i); - //printf("RTCP app depacketizer called, cname = %s, msg = %s\n", cname, confero_text_msg_buf); - confero_text_msg_available = 1; - return length; -} - -void MilesSessionInvoker::send(const SendRequest& req) { -// std::cout << req; - std::string origin; - Event::getParam(req.params, "origin", origin); - - if (false) { - } else if (iequals(req.name, "start")) { - - std::string userId, reflector, session; - Event::getParam(req.params, "userid", userId); - Event::getParam(req.params, "reflector", reflector); - Event::getParam(req.params, "session", session); - processEventStart(origin, userId, reflector, session); - - } else if (iequals(req.name, "stop")) { - - processEventStop(origin); - - } else if (iequals(req.name, "participants")) { - - processEventParticipants(origin); - - } else if (iequals(req.name, "thumbnail")) { - - std::string userId; - Event::getParam(req.params, "userid", userId); - processEventThumbnail(origin, userId); - - } else if (iequals(req.name, "videoon")) { - - std::string userId; - Event::getParam(req.params, "userid", userId); - processEventVideoOn(origin, userId); - - } else if (iequals(req.name, "videooff")) { - - std::string userId; - Event::getParam(req.params, "userid", userId); - processEventVideoOff(origin, userId); - - } else if (iequals(req.name, "audioon")) { - - std::string userId; - Event::getParam(req.params, "userid", userId); - processEventAudioOn(origin, userId); - - } else if (iequals(req.name, "audiooff")) { - - std::string userId; - Event::getParam(req.params, "userid", userId); - processEventAudioOff(origin, userId); - - } else if (iequals(req.name, "sendvideo")) { - - std::string userId, compression; - size_t height, width, framerate; - Event::getParam(req.params, "userid", userId); - Event::getParam(req.params, "height", height); - Event::getParam(req.params, "width", width); - Event::getParam(req.params, "framerate", framerate); - processEventSendVideo(origin, width, height, framerate, compression); - - } else if (iequals(req.name, "sendvideooff")) { - - processEventSendVideoOff(origin); - - } else if (iequals(req.name, "sendaudio")) { - - std::string userId, encoding; - Event::getParam(req.params, "userid", userId); - Event::getParam(req.params, "encoding", encoding); - processEventSendAudio(origin, encoding); - - } else if (iequals(req.name, "sendaudiooff")) { - - processEventSendAudioOff(origin); - - } else if (iequals(req.name, "gettext")) { - - processEventGetText(origin); - - } else if (iequals(req.name, "posttext")) { - - std::string userId, message; - Event::getParam(req.params, "userid", userId); - Event::getParam(req.params, "message", message); - processEventPostText(origin, userId, message); - - } else { - LOG(ERROR) << "Do not know how to handle event " << req.name; - } - -} - -void MilesSessionInvoker::processEventStart(const std::string& origin, const std::string& userid, const std::string& reflector, const std::string& session) { - - Event ev; - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - //std::cout << req; - if(num_connected>0) { - num_connected++; - ev.name = "start.reply"; - returnEvent(ev); - return; - } - - LOG(ERROR) << "miles/start called, reflector ip = " << reflector << " session name = " << session << " userid = " << userid; - - int rv; - rv = miles_connect_reflector_session((char*)reflector.c_str(), (char*)session.c_str()); - if (!rv) { - LOG(ERROR) << "Could not setup reflector session"; - ev.name = "start.error"; - returnEvent(ev); - return; - } - LOG(ERROR) << "session set up"; - - /* set up media buffers */ - init_media_buffers(); - - /* Set up audio and video RTP sockets */ - video_rtp_in_socket = miles_net_setup_udp_socket((char*)reflector.c_str(), video_port, video_port, 10, 16000); - audio_rtp_in_socket = miles_net_setup_udp_socket((char*)reflector.c_str(), audio_port, audio_port, 10, 16000); - video_rtp_out_socket = video_rtp_in_socket; - audio_rtp_out_socket = audio_rtp_in_socket; - - - /* Set up audio and video RTCP sockets */ - video_rtcp_in_socket = miles_net_setup_udp_socket((char*)reflector.c_str(), video_port+1, video_port+1, 10, 16000); - audio_rtcp_in_socket = miles_net_setup_udp_socket((char*)reflector.c_str(), audio_port+1, audio_port+1, 10, 16000); - video_rtcp_out_socket = video_rtcp_in_socket; - audio_rtcp_out_socket = audio_rtcp_in_socket; - - /* Set up RTP audio and video sessions */ - video_session = miles_rtp_setup_session(video_rtp_in_socket, MILES_RTP_MEDIA_TYPE_VIDEO); - audio_session = miles_rtp_setup_session(audio_rtp_in_socket, MILES_RTP_MEDIA_TYPE_AUDIO); - - /* Set up RTCP audio and video sessions */ - video_session->rtcp_session = miles_rtp_setup_rtcp_session(video_session, video_rtcp_in_socket); - audio_session->rtcp_session = miles_rtp_setup_rtcp_session(audio_session, audio_rtcp_in_socket); - - /* Set up video capture */ - video_grabber_available = setup_video_grabber(); - if(video_grabber_available) - sendvideo_enabled = 1; - - /* Set up audio capture/playback */ - audio_available = setup_audio(); - if(audio_available) - sendaudio_enabled = 1; - - /* Set up outgoing RTP stream for video */ - if(video_grabber_available) { - out_rtp_video_stream = miles_rtp_setup_outgoing_stream(video_session, video_rtp_out_socket, 0, MILES_RTP_PAYLOAD_TYPE_JPEG); - out_rtp_video_stream->codec_ctx = video_encoder; - out_rtcp_video_stream = miles_rtp_setup_outgoing_rtcp_stream(video_session->rtcp_session, video_rtcp_out_socket, out_rtp_video_stream->ssrc); - if(out_rtp_video_stream->sdes.cname) - free(out_rtp_video_stream->sdes.cname); - out_rtp_video_stream->sdes.cname = strdup(userid.c_str()); - } - - /* Set up outgoing RTP stream for audio */ - if(audio_available) { - out_rtp_audio_stream = miles_rtp_setup_outgoing_stream(audio_session, audio_rtp_out_socket, 0, MILES_RTP_PAYLOAD_TYPE_L16); - if(out_rtp_audio_stream->sdes.cname) - free(out_rtp_audio_stream->sdes.cname); - out_rtp_audio_stream->sdes.cname = strdup(userid.c_str()); - - /* Associate RTP stream with codec context */ - out_rtp_audio_stream->codec_ctx = audio_encoder; - - /* Set up outgoing RTCP streams for audio */ - out_rtcp_audio_stream = miles_rtp_setup_outgoing_rtcp_stream(audio_session->rtcp_session, audio_rtcp_out_socket, out_rtp_audio_stream->ssrc); - } - - /* Register RTCP APP handler for text messages */ - rv = miles_rtp_register_rtcp_app_handler("text", NULL, receive_text_message_callback, 0); - if(rv==0) { - LOG(ERROR) << "Error registering text message callback"; - } - memset(confero_text_msg_buf, 0, 1000); - - _isRunning = true; - num_connected=1; - _reflector = reflector; - _userId = userid; - _session = session; - - if(audio_available) - _audioThread = new tthread::thread(MilesSessionInvoker::runAudio, this); - _videoThread = new tthread::thread(MilesSessionInvoker::runVideo, this); - ev.name = "start.reply"; - returnEvent(ev); -} - -void MilesSessionInvoker::processEventStop(const std::string& origin) { - Event ev; - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - - if(num_connected==0) { - LOG(ERROR) << "not connected"; - ev.name = "stop.error"; - returnEvent(ev); - return; - } - num_connected--; - if(num_connected>0) { - ev.name = "stop.reply"; - returnEvent(ev); - return; - } - int rv = miles_disconnect_reflector_session((char*)_reflector.c_str(), (char*)_session.c_str()); - if (!rv) { - LOG(ERROR) << "Could not disconnect from reflector session"; - ev.name = "stop.error"; - returnEvent(ev); - return; - } - /* Unregister RTCP APP handler for text messages */ - rv = miles_rtp_unregister_rtcp_app_handler("text"); - if(rv==0) { - LOG(ERROR) << "Error registering text message callback"; - } - _isRunning = false; - free_text_buffers(); - ev.name = "stop.reply"; - returnEvent(ev); - LOG(ERROR) << "disconnected from reflector session"; -} - -void MilesSessionInvoker::processEventParticipants(const std::string& origin) { - - Event ev; - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - if(num_connected==0) { - LOG(ERROR) << "not connected"; - ev.name = "participants.error"; - returnEvent(ev); - return; - } - // create an array with objects inside - for (int i = 0; i < 5; i++) { - Data userInfo; - userInfo.compound["name"] = Data("username" + toStr(i), Data::VERBATIM); - userInfo.compound["email"] = Data("usermail" + toStr(i), Data::VERBATIM); - ev.data.compound["participants"].array.push_back(userInfo); - } - - ev.name = "participants.reply"; - returnEvent(ev); -} - -void MilesSessionInvoker::processEventThumbnail(const std::string& origin, const std::string& userid) { - Event ev; - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - if(num_connected==0) { - LOG(ERROR) << "not connected"; - ev.name = "thumbnail.error"; - returnEvent(ev); - return; - } - - _imageSeq++; - if (_imageSeq > 4) - _imageSeq = 1; - - std::stringstream testImageName; - testImageName << "test" << _imageSeq << ".jpeg"; - - URL imageURL(testImageName.str()); - imageURL.toAbsolute(_interpreter->getBaseURL()); - std::stringstream ssImage; - ssImage << imageURL; - std::string imageContent = ssImage.str(); - - ev.name = "thumbnail.reply"; - - struct thumb_entry *use_thumb = NULL; - struct miles_list *p; - struct thumb_entry *te; - _mutex.lock(); - // Find thumbnail of user - p = thumb_list; - while(p) { - te = (struct thumb_entry *)p->item; - if(te->userid && strcmp(te->userid, userid.c_str()) == 0) { - use_thumb = te; - break; - } - if(te->userid==NULL && use_thumb == NULL) { - use_thumb = te; - } - p = p->next; - } - if(!p && use_thumb) - use_thumb->userid = strdup(userid.c_str()); - if(use_thumb) { - ev.data.compound["image"] = Data(use_thumb->img_buf, use_thumb->img_size, "image/jpeg"); - } else { - // Return empty face image - ev.data.compound["image"] = Data(imageContent.data(), imageContent.size(), "image/jpeg"); - } - _mutex.unlock(); - - returnEvent(ev); -} - -void MilesSessionInvoker::processEventVideoOn(const std::string& origin, const std::string& userid) { - Event ev; - ev.name = "videoon.reply"; - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - returnEvent(ev); -} -void MilesSessionInvoker::processEventVideoOff(const std::string& origin, const std::string& userid) { - Event ev; - ev.name = "videooff.reply"; - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - returnEvent(ev); -} -void MilesSessionInvoker::processEventAudioOn(const std::string& origin, const std::string& userid) { - Event ev; - ev.name = "audioon.reply"; - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - returnEvent(ev); -} -void MilesSessionInvoker::processEventAudioOff(const std::string& origin, const std::string& userid) { - Event ev; - ev.name = "audiooff.reply"; - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - returnEvent(ev); -} -void MilesSessionInvoker::processEventSendVideo(const std::string& origin, size_t width, size_t height, size_t framerate, const std::string& compression) { - Event ev; - ev.name = "sendvideo.reply"; - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - sendvideo_enabled = 1; - returnEvent(ev); -} -void MilesSessionInvoker::processEventSendVideoOff(const std::string& origin) { - Event ev; - ev.name = "sendvideooff.reply"; - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - returnEvent(ev); - sendvideo_enabled = 0; -} -void MilesSessionInvoker::processEventSendAudio(const std::string& origin, const std::string& encoding) { - Event ev; - ev.name = "sendaudio.reply"; - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - returnEvent(ev); - sendaudio_enabled = 1; -} -void MilesSessionInvoker::processEventSendAudioOff(const std::string& origin) { - Event ev; - ev.name = "sendaudiooff.reply"; - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - returnEvent(ev); - sendaudio_enabled = 0; -} -void MilesSessionInvoker::processEventPostText(const std::string& origin, const std::string& userid, const std::string& message) { - char msgbuf[1000]; - char pkt[1000]; - char *cname = "user@all"; // for now - int n, length; - Event ev; - - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - if(num_connected==0) { - LOG(ERROR) << "not connected"; - ev.name = "posttext.error"; - returnEvent(ev); - return; - } - ev.name = "posttext.reply"; - returnEvent(ev); - if(out_rtcp_video_stream==NULL) - return; - //printf("sending message %s\n", message.c_str()); - memcpy(msgbuf, cname, strlen(cname)+1); - sprintf(msgbuf+strlen(cname)+1, "<%s>: %s", userid.c_str(), message.c_str()); - n = strlen(cname)+1 + userid.length() + 4 + message.length(); - length = miles_rtp_make_rtcp_app(pkt, out_rtcp_video_stream->ssrc, "text", n, msgbuf); - if(length>0 && out_rtcp_video_stream) - out_rtcp_video_stream->send_packet(out_rtcp_video_stream->socket, pkt, length, 0); -} - -void MilesSessionInvoker::processEventGetText(const std::string& origin) { - Event ev; - ev.data.compound["origin"] = Data(origin, Data::INTERPRETED); - if(num_connected==0) { - LOG(ERROR) << "not connected"; - ev.name = "gettext.error"; - returnEvent(ev); - return; - } - - ev.name = "gettext.reply"; - if(confero_text_msg_available) { - strcpy(text_msg_buf, confero_text_msg_buf); - ev.data.compound["message"] = Data(text_msg_buf, Data::VERBATIM); - //ev.data.compound["message"] = Data(base64_encode(text_msg_buf, strlen(text_msg_buf)), Data::VERBATIM); - ev.data.compound["user"] = Data("username1", Data::VERBATIM); - memset(confero_text_msg_buf, 0, 1000); - confero_text_msg_available = 0; - } - - returnEvent(ev); -} - -void MilesSessionInvoker::runAudio(void* instance) { - ((MilesSessionInvoker*)instance)->processAudio(); -} - -void MilesSessionInvoker::runVideo(void* instance) { - ((MilesSessionInvoker*)instance)->processVideo(); -} - -void MilesSessionInvoker::processVideo() { - while(_isRunning) { - rtp_video_receiver(video_session); - if(video_grabber_available && sendvideo_enabled) - video_transmitter(video_grabber, video_encoder, out_rtp_video_stream, out_rtcp_video_stream); - } - /* done, clean up */ - if(video_grabber_available) { - miles_rtp_destroy_out_stream(out_rtp_video_stream); - miles_video_grabber_destroy(video_grabber); - miles_video_codec_destroy_encoder(video_encoder); - video_grabber_available = 0; - sendvideo_enabled = 0; - } - miles_rtp_destroy_session(video_session); - miles_list_destroy(thumb_list); - thumb_list = NULL; - miles_net_socket_close(video_rtp_in_socket); - miles_net_socket_close(video_rtcp_in_socket); - - free_video_buffers(); -} - -void MilesSessionInvoker::processAudio() { - while(_isRunning) { - rtp_audio_receiver(audio_session); - if(audio_available && sendaudio_enabled) - audio_transmitter(audio_dev, audio_encoder, out_rtp_audio_stream, out_rtcp_audio_stream); - } - /* done, clean up */ - if(audio_available) { - miles_rtp_destroy_out_stream(out_rtp_audio_stream); - if(audio_dev_playback) - miles_audio_device_close(MILES_AUDIO_IO_OPENAL, audio_dev_playback, 0); - if(audio_dev) - miles_audio_device_close(MILES_AUDIO_IO_OPENAL, audio_dev, 1); - miles_audio_codec_destroy_encoder(audio_encoder); - audio_available = 0; - sendaudio_enabled = 0; - } - miles_rtp_destroy_session(audio_session); - miles_net_socket_close(audio_rtp_in_socket); - miles_net_socket_close(audio_rtcp_in_socket); - - free_video_buffers(); -} - -int MilesSessionInvoker::setup_audio() { - /* Check that we have OpeanAL audio */ - if(!miles_audio_io_is_supported(MILES_AUDIO_IO_OPENAL)) { - fprintf(stderr, "OpenAL audio i/o not supported on this platform.\n"); - return 0; - } - - /* Initialize and configure audio encoder */ - audio_encoder = miles_audio_codec_init_encoder(); - audio_encoder->codec_id = miles_audio_codec_get_encoder_for_rtp_payload_type(MILES_RTP_PAYLOAD_TYPE_L16); - audio_encoder->sample_rate = 16000; - audio_encoder->bytes_per_sample = 2; - audio_encoder->chunk_size = 320; /* 20 ms */ - audio_encoder->input_format = MILES_AUDIO_FORMAT_PCM; - int rv = miles_audio_codec_setup_encoder(audio_encoder); - if(rv == 0) { - /* Couldn't set up audio codec */ - LOG(ERROR) << "Couldn't set up audio codec"; - return 0; - } - - /* Set up audio grabber */ - int n = miles_audio_device_get_supported_devices(MILES_AUDIO_IO_OPENAL, &supported_audio_devices); - if(n<=0) { - /* No audio device available */ - LOG(ERROR) << "No audio device available"; - return 0; - } - /* Use first device that supports capture */ - for(int i=0; isample_rate*audio_encoder->bytes_per_sample); - encoded_out_audio = (char *)malloc(audio_encoder->sample_rate*audio_encoder->bytes_per_sample); - audio_read_buf = (char *)malloc(audio_encoder->sample_rate*audio_encoder->bytes_per_sample); - audio_data = (char *)malloc(1000000); - - LOG(ERROR) << "audio device set up"; - return 1; -} - -int MilesSessionInvoker::setup_video_grabber() { - struct miles_video_grabber_description *grabber_description; - - /* Set up video grabber */ - int n = miles_video_grabber_get_supported_grabbers(&supported_video_grabbers); - if(n<=0) { - /* No video grabber available */ - LOG(ERROR) << "No video grabber available"; - return 0; - } - int use_grabber = 0; - if(n>1) { - /* If more than one grabber, select one that is not 'Test' */ - for(int i=0; iname, "Test") != 0) { - /* Make sure there is a device */ - if(grabber_description->devices != NULL) { - use_grabber = i; - free(grabber_description); - break; - } - } - free(grabber_description); - } - } - grabber_description = miles_video_grabber_get_description(supported_video_grabbers[use_grabber]); - printf("Using video grabber %s\n", grabber_description->name); - video_grabber = miles_video_grabber_create_context(supported_video_grabbers[use_grabber]); - video_grabber->width = 320; - video_grabber->height = 240; - video_grabber->frame_rate = 25*100; - /* Select first supported image format */ - struct miles_video_grabber_device *dev; - dev = (struct miles_video_grabber_device *)grabber_description->devices->item; - struct miles_int_struct *img_format; - img_format = (struct miles_int_struct *)dev->capabilities->formats->item; - video_grabber->image_format = img_format->value; - miles_video_grabber_setup(video_grabber); - free(supported_video_grabbers); - free(grabber_description); - - /* Initialize and configure video encoder */ - video_encoder = miles_video_codec_init_encoder(); - video_encoder->codec_id = miles_video_codec_get_encoder_for_rtp_payload_type(MILES_RTP_PAYLOAD_TYPE_JPEG); - video_encoder->width = video_grabber->width = 320; - video_encoder->height = video_grabber->height = 240; - video_encoder->qfactor = 50; - //video_encoder->input_format = MILES_IMAGE_RGB; //video_grabber->image_format; - int rv = miles_video_codec_setup_encoder(video_encoder); - if (!rv) { - LOG(ERROR) << "Could not setup video encoder"; - return 0; - } - - video_out_buf = (char *)malloc(video_encoder->width*video_encoder->height*4); - encoded_out_img = (char *)malloc(video_encoder->width*video_encoder->height*4); - - return 1; -} - -void MilesSessionInvoker::cancel(const std::string sendId) { -} - -void MilesSessionInvoker::invoke(const InvokeRequest& req) { - video_port = 5566; - audio_port = 5568; - thumb_list = NULL; - save_image = 0; -} - -/** - * Render video image in a window - */ -void MilesSessionInvoker::render_video_image(char *img, int width, int height, int img_format) { - char *img_buf_ptr; - - if(img_format != MILES_IMAGE_RGB) { - if(render_img==NULL || render_img_size < width*height*4) { - if(render_img) - free(render_img); - render_img_size = width*height*4; - render_img = (char *)malloc(render_img_size); - } - miles_image_convert(img, render_img, img_format, MILES_IMAGE_RGB, width, height); - img_buf_ptr = render_img; - } else { - img_buf_ptr = img; - } - - /* save image to disk */ - if(save_image) - miles_image_file_write(MILES_IMAGE_FILE_FORMAT_PNG, MILES_IMAGE_RGB, "image.png", width, height, img_buf_ptr); - - /* render image in window... to be implementd. */ -} - - -/** - * Send an audio chunk decoded from an RTP stream to an audio device - */ -void MilesSessionInvoker::playback_audio(u_int32_t ssrc, char *buf, int sample_rate, int bps, int audio_format, int size) { - - if(size<0) - return; - - /* re-configure audio device, if needed */ - if(audio_dev_playback == NULL || audio_dev_playback->chunk_size != size || audio_dev_playback->sample_rate != sample_rate || - audio_dev_playback->format != audio_format || audio_dev_playback->bytes_per_sample != bps) { - if(audio_dev_playback) - miles_audio_device_close(MILES_AUDIO_IO_OPENAL, audio_dev_playback, 0); - audio_dev_playback = miles_audio_device_open(MILES_AUDIO_IO_OPENAL, audio_dev_playback_id, audio_format, sample_rate, bps, 1, size, 0); - if(audio_dev_playback == NULL) - return; - } - - /* play audio */ - miles_audio_device_write(MILES_AUDIO_IO_OPENAL, audio_dev_playback, buf, size); -} - -/** - * Handle incoming video streams - */ - -int MilesSessionInvoker::video_receiver(struct miles_rtp_in_stream *rtp_stream, char *data, int bytes_read) { - int status, n; - struct miles_video_codec_decode_context *codec_ctx; - char *codec_name; - struct miles_list *p; - struct thumb_entry *te; - - codec_ctx = (struct miles_video_codec_decode_context *)rtp_stream->codec_ctx; - - if(codec_ctx == NULL || !miles_video_codec_decoder_supports_rtp_payload_type(codec_ctx, rtp_stream->payload_type)) { - if(codec_ctx) - miles_video_codec_destroy_decoder(codec_ctx); - codec_ctx = miles_video_codec_init_decoder(); - codec_ctx->codec_id = miles_video_codec_get_decoder_for_rtp_payload_type(rtp_stream->payload_type); - if(codec_ctx->codec_id == MILES_VIDEO_CODEC_UNKNOWN) { - /* Cannot decode the video stream */ - return 0; - } - - status = miles_video_codec_setup_decoder(codec_ctx); - if(status == 0) { - /* Cannot decode the video stream */ - return 0; - } - rtp_stream->codec_ctx = (void *)codec_ctx; - return 0; - } - - /* Find thumbnail list entry of the stream */ - _mutex.lock(); - p = thumb_list; - while(p) { - te = (struct thumb_entry *)p->item; - if(te->ssrc == rtp_stream->ssrc) { - break; - } - p = p->next; - } - if(p==NULL) { - // Create new thumbnail list entry - te = (struct thumb_entry *)malloc(sizeof(struct thumb_entry)); - if(thumb_list==NULL) - p = thumb_list = miles_list_create(te); - else - p = miles_list_append(thumb_list, te); - te->ssrc = rtp_stream->ssrc; - te->window_ctx = NULL; - te->userid = NULL; - te->img_buf = (char *)malloc(bytes_read); - te->buf_size = bytes_read; - te->img_size = 0; - te->decode_buf = NULL; - } - if(te->buf_size < bytes_read) { - // Need bigger image buffer - free(te->img_buf); - te->img_buf = (char *)malloc(bytes_read); - te->buf_size = bytes_read; - } - /* - * If codec is JPEG, thumbnail image can be saved without decoding - */ - codec_name = miles_video_codec_get_codec_name(codec_ctx->codec_id); - if(codec_name==NULL) { - _mutex.unlock(); - return 0; - } - if(strcmp(codec_name, "JPEG")==0) { - memcpy(te->img_buf, data, bytes_read); - te->img_size = bytes_read; - te->img_format = WEBCONFERO_THUMB_JPEG; - //miles_image_file_write(MILES_IMAGE_FILE_FORMAT_JPG, MILES_IMAGE_JPEG, "test.jpg", bytes_read, 1, data); - // If we're not going to render the video in a window, we're done now - if(te->window_ctx==NULL) { - _mutex.unlock(); - return 0; - } - } else { - te->img_format = WEBCONFERO_THUMB_PNG; - } - free(codec_name); - - if(te->decode_buf==NULL) { - te->decode_buf = (char *)malloc(1920*1080*4); - } - n = miles_video_codec_decode(codec_ctx, data, te->decode_buf, bytes_read); - if(n > 0) { - if(te->img_format==WEBCONFERO_THUMB_PNG) { - if(n > te->buf_size) { - free(te->img_buf); - te->img_buf = (char *)malloc(n); - te->buf_size = n; - } - // Need to insert a PNG header here... - memcpy(te->img_buf, te->decode_buf, n); - te->img_size = n; - } - if(te->window_ctx) - render_video_image(te->decode_buf, codec_ctx->width, codec_ctx->height, codec_ctx->output_format); - } - _mutex.unlock(); - - return n; -} - -/** - * Handle incoming audio streams - */ - -int MilesSessionInvoker::audio_receiver(struct miles_rtp_in_stream *rtp_stream, char *data, int bytes_read) { - int status, size; - struct miles_audio_codec_decode_context *codec_ctx; - - codec_ctx = (struct miles_audio_codec_decode_context *)rtp_stream->codec_ctx; - - if(codec_ctx == NULL || !miles_audio_codec_decoder_supports_rtp_payload_type(codec_ctx, rtp_stream->payload_type)) { - if(codec_ctx) - miles_audio_codec_destroy_decoder(codec_ctx); - codec_ctx = miles_audio_codec_init_decoder(); - codec_ctx->codec_id = miles_audio_codec_get_decoder_for_rtp_payload_type(rtp_stream->payload_type); - if(codec_ctx->codec_id == MILES_AUDIO_CODEC_UNKNOWN) { - /* Cannot decode the audio stream */ - return 0; - } - status = miles_audio_codec_setup_decoder(codec_ctx); - if(status == 0) { - /* Cannot decode the audio stream */ - return 0; - } - rtp_stream->codec_ctx = (void *)codec_ctx; - } - size = miles_audio_codec_decode(codec_ctx, data, audio_in_buf); - if(size > 0) { - playback_audio(rtp_stream->ssrc, audio_in_buf, codec_ctx->sample_rate, codec_ctx->bytes_per_sample, codec_ctx->output_format, size); - } - return size; -} - -/** - * Read and depacketize incoming RTP streams - */ - -void MilesSessionInvoker::rtp_audio_receiver(struct miles_rtp_session *rtp_session) { - int n; - struct miles_rtp_in_stream *rtp_stream; - - /* Poll RTP socket, read all available RTP packets */ - while (1) { - n = miles_net_wait_socket(rtp_session->socket, 10); - if(n<=0) return; - - /* Read RTP data */ - n = miles_rtp_recv(rtp_session, &rtp_stream, audio_data); - if(n>0) { - audio_receiver(rtp_stream, audio_data, n); - } - - /* Poll RTCP socket */ - n = miles_net_poll_socket(rtp_session->rtcp_session->socket); - if(n>0) { - /* Do RTCP packet processEventing */ - n = miles_rtp_recv_rtcp(rtp_session->rtcp_session); - } - } -} - -void MilesSessionInvoker::rtp_video_receiver(struct miles_rtp_session *rtp_session) { - int n; - struct miles_rtp_in_stream *rtp_stream; - - /* Poll RTP socket, read all available RTP packets */ - while (1) { - n = miles_net_wait_socket(rtp_session->socket, 10); - if(n<=0) return; - - /* Read RTP data */ - n = miles_rtp_recv(rtp_session, &rtp_stream, video_data); - if(n>0) { - video_receiver(rtp_stream, video_data, n); - } - - /* Poll RTCP socket */ - n = miles_net_poll_socket(rtp_session->rtcp_session->socket); - if(n>0) { - /* Do RTCP packet processEventing */ - n = miles_rtp_recv_rtcp(rtp_session->rtcp_session); - } - } -} - -/** - * Send RTP video stream - */ -int MilesSessionInvoker::video_transmitter(struct miles_video_grabber_context *grabber, struct miles_video_codec_encode_context *codec_ctx, struct miles_rtp_out_stream *rtp_stream, struct miles_rtcp_out_stream *out_rtcp_stream) { - int n; - static struct timeval last_time; - static int first_time=1; - struct timeval now; - int tbf; - char *video_buf_ptr; - -#ifndef WIN32 - // Need to fix gettimeofday() on Win - if (first_time) { - gettimeofday(&last_time, 0); - first_time = 0; - } - gettimeofday(&now, 0); - tbf = 100000 / grabber->frame_rate; - if (miles_elapsed_time(&last_time, &now) < tbf) - return 0; - - last_time = now; -#endif - - /* Send RTCP packets, if due */ - miles_rtp_send_rtcp(out_rtcp_stream); - - n = miles_video_grabber_grab(grabber, video_out_buf); - if(n <= 0) - return 0; - if(grabber->image_format != codec_ctx->input_format) { - /* image conversion ... */ - if(video_conv_buf==NULL) - video_conv_buf = (char *)malloc(codec_ctx->width*codec_ctx->height*4); - printf("converting video...\n"); - miles_image_convert(video_out_buf, video_conv_buf, grabber->image_format, codec_ctx->input_format, codec_ctx->width, codec_ctx->height); - video_buf_ptr = video_conv_buf; - } else { - video_buf_ptr = video_out_buf; - } - n = miles_video_codec_encode(codec_ctx, video_buf_ptr, encoded_out_img); - if(n<=0) - return 0; - return miles_rtp_send(rtp_stream, encoded_out_img, n); -} - -/** - * Send RTP audio stream - */ -int MilesSessionInvoker::audio_transmitter(struct miles_audio_device *dev, struct miles_audio_codec_encode_context *codec_ctx, struct miles_rtp_out_stream *rtp_stream, struct miles_rtcp_out_stream *out_rtcp_audio_stream) { - int n; - - /* Send RTCP packets, if due */ - miles_rtp_send_rtcp(out_rtcp_audio_stream); - - n = miles_audio_device_read(MILES_AUDIO_IO_OPENAL, dev, audio_read_buf, codec_ctx->chunk_size); - if(n <= 0) - return 0; - if(dev->format != codec_ctx->input_format) { - /* audio conversion needed ... */ - } - n = miles_audio_codec_encode(codec_ctx, audio_read_buf, encoded_out_audio); - if(n<=0) - return 0; - return miles_rtp_send(rtp_stream, encoded_out_audio, n); -} - - -} diff --git a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.h b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.h deleted file mode 100644 index 148be68..0000000 --- a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.h +++ /dev/null @@ -1,174 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef MILESSESIONINVOKER_H_W09J90F0 -#define MILESSESIONINVOKER_H_W09J90F0 - -#include - -extern "C" { -#include "miles/miles.h" -#include "miles/network.h" -#include "miles/rtp.h" -#include "miles/audio_codec.h" -#include "miles/audio_io.h" -#include "miles/audio_device.h" -#include "miles/video_codec.h" -#include "miles/video_grabber.h" -#include "miles/session.h" -#include "miles/image.h" -#include "miles/list.h" - long miles_elapsed_time(struct timeval *before, struct timeval *after); -} -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -#define WEBCONFERO_THUMB_NONE 0 -#define WEBCONFERO_THUMB_JPEG 1 -#define WEBCONFERO_THUMB_PNG 2 - -struct thumb_entry { - char *img_buf; - int buf_size; // The size of the buffer malloced - int img_size; // The size of the image - int img_format; // JPEG or PNG image - char *decode_buf; - u_int32_t ssrc; - char *userid; // The user id assigned to the video stream - void *window_ctx; // The context of the window popped up when the thumbnail is clicked. -}; - -namespace uscxml { - -class MilesSessionInvoker : public InvokerImpl { -public: - MilesSessionInvoker(); - virtual ~MilesSessionInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("miles"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#miles"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - -protected: - void processEventStart(const std::string& origin, const std::string& userid, const std::string& reflector, const std::string& session); - void processEventStop(const std::string& origin); - void processEventParticipants(const std::string& origin); - void processEventThumbnail(const std::string& origin, const std::string& userid); - void processEventVideoOn(const std::string& origin, const std::string& userid); - void processEventVideoOff(const std::string& origin, const std::string& userid); - void processEventAudioOn(const std::string& origin, const std::string& userid); - void processEventAudioOff(const std::string& origin, const std::string& userid); - void processEventSendVideo(const std::string& origin, size_t width, size_t height, size_t framerate, const std::string& compression); - void processEventSendVideoOff(const std::string& origin); - void processEventSendAudio(const std::string& origin, const std::string& encoding); - void processEventSendAudioOff(const std::string& origin); - void processEventPostText(const std::string& origin, const std::string& userid, const std::string& message); - void processEventGetText(const std::string& origin); - - int _imageSeq; - - int video_rtp_in_socket, audio_rtp_in_socket; - int video_rtp_out_socket, audio_rtp_out_socket; - int video_rtcp_in_socket, audio_rtcp_in_socket; - int video_rtcp_out_socket, audio_rtcp_out_socket; - struct miles_rtp_session *video_session, *audio_session; - struct miles_video_codec_encode_context *video_encoder; - struct miles_audio_codec_encode_context *audio_encoder; - int *supported_video_grabbers; - struct miles_video_grabber_context *video_grabber; - struct miles_rtp_out_stream *out_rtp_video_stream, *out_rtp_audio_stream; - struct miles_rtcp_out_stream *out_rtcp_video_stream, *out_rtcp_audio_stream; - struct miles_audio_device *audio_dev; - struct miles_audio_device_description *supported_audio_devices; - int video_port, audio_port; - std::string ip_address; - - char *video_out_buf; - char *video_conv_buf; - char *encoded_out_img; - char *audio_in_buf; - char *render_img; - int render_img_size; - char *audio_data; - char *video_data; - - char *encoded_out_audio; - char *audio_read_buf; - struct miles_list *thumb_list; - int save_image; - - char *text_msg_buf; - int text_msg_available; - - struct miles_audio_device *audio_dev_playback; - int audio_dev_playback_id; - int audio_available; - int video_grabber_available; - int sendvideo_enabled; - int sendaudio_enabled; - - static void runAudio(void* instance); - static void runVideo(void* instance); - void processVideo(); - void processAudio(); - int setup_video_grabber(); - int setup_audio(); - - void init_media_buffers(); - void free_media_buffers(); - void free_video_buffers(); - void free_audio_buffers(); - void free_text_buffers(); - - void render_video_image(char *img, int width, int height, int img_format); - void playback_audio(u_int32_t ssrc, char *buf, int sample_rate, int bps, int audio_format, int size); - int video_receiver(struct miles_rtp_in_stream *rtp_stream, char *data, int bytes_read); - int audio_receiver(struct miles_rtp_in_stream *rtp_stream, char *data, int bytes_read); - void rtp_audio_receiver(struct miles_rtp_session *rtp_session); - void rtp_video_receiver(struct miles_rtp_session *rtp_session); - int video_transmitter(struct miles_video_grabber_context *grabber, struct miles_video_codec_encode_context *codec_ctx, struct miles_rtp_out_stream *rtp_stream, struct miles_rtcp_out_stream *out_rtcp_stream); - int audio_transmitter(struct miles_audio_device *dev, struct miles_audio_codec_encode_context *codec_ctx, struct miles_rtp_out_stream *rtp_stream, struct miles_rtcp_out_stream *out_rtcp_audio_stream); - - - bool _isRunning; - int num_connected; - std::string _userId, _reflector, _session; - tthread::thread* _videoThread; - tthread::thread* _audioThread; - tthread::recursive_mutex _mutex; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(MilesSessionInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: MILESSESIONINVOKER_H_W09J90F0 */ diff --git a/src/uscxml/plugins/invoker/sample/SampleInvoker.cpp b/src/uscxml/plugins/invoker/sample/SampleInvoker.cpp deleted file mode 100644 index d91b14c..0000000 --- a/src/uscxml/plugins/invoker/sample/SampleInvoker.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "SampleInvoker.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new SampleInvokerProvider() ); - return true; -} -#endif - -SampleInvoker::SampleInvoker() { -} - -SampleInvoker::~SampleInvoker() { -}; - -boost::shared_ptr SampleInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new SampleInvoker()); - return invoker; -} - -Data SampleInvoker::getDataModelVariables() { - Data data; - return data; -} - -void SampleInvoker::send(const SendRequest& req) { -} - -void SampleInvoker::cancel(const std::string sendId) { -} - -void SampleInvoker::invoke(const InvokeRequest& req) { -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/sample/SampleInvoker.h b/src/uscxml/plugins/invoker/sample/SampleInvoker.h deleted file mode 100644 index f7bcb24..0000000 --- a/src/uscxml/plugins/invoker/sample/SampleInvoker.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef SAMPLEINVOKER_H_W09J90F0 -#define SAMPLEINVOKER_H_W09J90F0 - -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class SampleInvoker : public InvokerImpl { -public: - SampleInvoker(); - virtual ~SampleInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("sample"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#sample"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - -protected: -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(SampleInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: SAMPLEINVOKER_H_W09J90F0 */ diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp index 62f7a1e..4d3c579 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp @@ -18,16 +18,22 @@ */ #include "USCXMLInvoker.h" -#include -#include "uscxml/dom/DOMUtils.h" -#include + +#include "uscxml/config.h" #ifdef BUILD_AS_PLUGINS #include #endif +#ifdef UNIX +#include +#endif + namespace uscxml { +// msxml.h should die in a fire for polluting the global namespace +// using namespace xercesc; + #ifdef BUILD_AS_PLUGINS PLUMA_CONNECTOR bool pluginConnect(pluma::Host& host) { @@ -36,26 +42,88 @@ bool pluginConnect(pluma::Host& host) { } #endif -USCXMLInvoker::USCXMLInvoker() : _cancelled(false) { - _parentQueue._invoker = this; +USCXMLInvoker::USCXMLInvoker() { + _parentQueue = EventQueue(std::shared_ptr(new ParentQueueImpl(this))); + _thread = NULL; + _isActive = false; + _isStarted = false; } USCXMLInvoker::~USCXMLInvoker() { + stop(); }; +void USCXMLInvoker::start() { + _isStarted = true; + _thread = new std::thread(USCXMLInvoker::run, this); +} + +void USCXMLInvoker::stop() { + _isStarted = false; + _isActive = false; + + if (_thread) { + /** + * We cannot join the invoked thread if it is blocking at an external + * receive. Cancel will finalize and unblock. + */ + _invokedInterpreter.cancel(); + _thread->join(); + delete _thread; + _thread = NULL; + } +} + void USCXMLInvoker::uninvoke() { - _cancelled = true; - Event event; - event.name = "unblock.and.die"; - if (_invokedInterpreter) + _isActive = false; + stop(); +} + +void USCXMLInvoker::eventFromSCXML(const Event& event) { + if (_isActive) { _invokedInterpreter.receive(event); + } +} + +void USCXMLInvoker::run(void* instance) { + USCXMLInvoker* INSTANCE = (USCXMLInvoker*)instance; + +#ifdef APPLE + std::string threadName; + threadName += "uscxml::"; + threadName += (INSTANCE->_invokedInterpreter.getImpl()->_name.size() > 0 ? INSTANCE->_invokedInterpreter.getImpl()->_name : "anon"); + threadName += ".scxml"; + + pthread_setname_np(threadName.c_str()); +#endif + InterpreterState state = USCXML_UNDEF; + while(state != USCXML_FINISHED) { + state = INSTANCE->_invokedInterpreter.step(true); + +// if (!INSTANCE->_isStarted) { +// // we have been cancelled +// INSTANCE->_isActive = false; +// return; +// } + } + + if (INSTANCE->_isActive) { + // we finished on our own and were not cancelled + Event e; + e.eventType = Event::PLATFORM; + e.invokeid = INSTANCE->_invokedInterpreter.getImpl()->getInvokeId(); + e.name = "done.invoke." + e.invokeid; + INSTANCE->_interpreter->enqueueExternal(e); + } + + INSTANCE->_isActive = false; } -boost::shared_ptr USCXMLInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new USCXMLInvoker()); - invoker->_parentInterpreter = interpreter; +std::shared_ptr USCXMLInvoker::create(InterpreterImpl* interpreter) { + std::shared_ptr invoker(new USCXMLInvoker()); + invoker->_interpreter = interpreter; return invoker; } @@ -64,71 +132,65 @@ Data USCXMLInvoker::getDataModelVariables() { return data; } -void USCXMLInvoker::send(const SendRequest& req) { - if (_invokedInterpreter) - _invokedInterpreter.receive(req); -} - -void USCXMLInvoker::cancel(const std::string sendId) { - assert(false); -} +void USCXMLInvoker::invoke(const std::string& source, const Event& invokeEvent) { + if (source.length() > 0) { + _invokedInterpreter = Interpreter::fromURL(source); + } else if (invokeEvent.data.node) { + xercesc::DOMImplementation* implementation = xercesc::DOMImplementationRegistry::getDOMImplementation(X("core")); + xercesc::DOMDocument* document = implementation->createDocument(); -void USCXMLInvoker::invoke(const InvokeRequest& req) { - _cancelled = false; - if (req.src.length() > 0) { - _invokedInterpreter = Interpreter::fromURL(req.src); - } else if (req.dom) { - Arabica::DOM::DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - Arabica::DOM::Document dom = domFactory.createDocument(req.dom.getNamespaceURI(), "", 0); // we need to import the parent - to support xpath test150 - Arabica::DOM::Node newNode = dom.importNode(req.dom, true); - dom.appendChild(newNode); + xercesc::DOMNode* newNode = document->importNode(invokeEvent.data.node, true); + document->appendChild(newNode); + +// std::cout << *document << std::endl; + // TODO: where do we get the namespace from? - _invokedInterpreter = Interpreter::fromDOM(dom, _interpreter->getNameSpaceInfo(), _interpreter->getSourceURL()); - } else if (req.content.size() > 0) { - _invokedInterpreter = Interpreter::fromXML(req.content, _interpreter->getSourceURL()); + _invokedInterpreter = Interpreter::fromDocument(document, _interpreter->getBaseURL()); + } else { - LOG(ERROR) << "Cannot invoke nested SCXML interpreter, neither src attribute nor content nor DOM is given"; + _isActive = false; + ERROR_PLATFORM_THROW("Cannot invoke nested SCXML interpreter, neither src attribute nor content nor DOM is given"); } - if (_invokedInterpreter) { - if (req.elem && HAS_ATTR(req.elem, "initial")) { - _invokedInterpreter.setInitalConfiguration(tokenize(ATTR(req.elem, "initial"))); - } - DataModel dataModel(_invokedInterpreter.getImpl()->getDataModel()); - _invokedInterpreter.getImpl()->setParentQueue(&_parentQueue); + if (_invokedInterpreter) { + _invokedInterpreter.getImpl()->_parentQueue = _parentQueue; + _invokedInterpreter.getImpl()->_invokeId = invokeEvent.invokeid; + _invokedInterpreter.getImpl()->_invokeReq = invokeEvent; // copy monitors - std::set::const_iterator monIter = _interpreter->_monitors.begin(); - while(monIter != _interpreter->_monitors.end()) { - if ((*monIter)->copyToInvokers()) { - _invokedInterpreter.getImpl()->_monitors.insert(*monIter); - } - monIter++; - } - - // transfer namespace prefixes - _invokedInterpreter.setNameSpaceInfo(_parentInterpreter->getNameSpaceInfo()); - _invokedInterpreter.getImpl()->_sessionId = req.invokeid; +// std::set::const_iterator monIter = _interpreter->_monitors.begin(); +// while(monIter != _interpreter->_monitors.end()) { +// if ((*monIter)->copyToInvokers()) { +// _invokedInterpreter.getImpl()->_monitors.insert(*monIter); +// } +// monIter++; +// } + /// test240 assumes that invoke request params will carry over to the datamodel - _invokedInterpreter.getImpl()->setInvokeRequest(req); +// _invokedInterpreter.getImpl()->setInvokeRequest(req); + _isActive = true; + + // we need to make sure it is at least setup to receive data! + _invokedInterpreter.getImpl()->init(); + + start(); - _invokedInterpreter.start(); } else { /// test 530 - _parentInterpreter->receive(Event("done.invoke." + _invokeId, Event::PLATFORM)); + Event e("done.invoke." + invokeEvent.invokeid, Event::PLATFORM); + eventToSCXML(e, USCXML_INVOKER_SCXML_TYPE, _invokeId); + _isActive = false; } } -void USCXMLInvoker::ParentQueue::push(const SendRequest& event) { +void USCXMLInvoker::ParentQueueImpl::enqueue(const Event& event) { // test 252 - if (_invoker->_cancelled) + if (!_invoker->_isActive) return; - SendRequest copyEvent(event); - // this is somewhat hidden here! - copyEvent.invokeid = _invoker->_invokeId; - _invoker->_parentInterpreter->receive(copyEvent); + Event copy(event); // TODO: can we get around a copy? + _invoker->eventToSCXML(copy, USCXML_INVOKER_SCXML_TYPE, _invoker->_invokeId); } } \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h index f5f8fbd..dac8d8b 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h @@ -21,56 +21,57 @@ #define USCXMLINVOKER_H_OQFA21IO #include -#include -#include "uscxml/concurrency/BlockingQueue.h" +#include "uscxml/interpreter/EventQueueImpl.h" #ifdef BUILD_AS_PLUGINS #include "uscxml/plugins/Plugins.h" #endif -namespace uscxml { +#define USCXML_INVOKER_SCXML_TYPE "http://www.w3.org/TR/scxml" -class Interpreter; -class USCXMLInvoker; +namespace uscxml { class USCXMLInvoker : public InvokerImpl, - public boost::enable_shared_from_this { + public std::enable_shared_from_this { public: - class ParentQueue : public concurrency::BlockingQueue { + class ParentQueueImpl : public EventQueueImpl { public: - ParentQueue() {} - virtual void push(const SendRequest& event); + ParentQueueImpl(USCXMLInvoker* invoker) : _invoker(invoker) {} + virtual void enqueue(const Event& event); USCXMLInvoker* _invoker; }; USCXMLInvoker(); virtual ~USCXMLInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); + virtual std::shared_ptr create(InterpreterImpl* interpreter); + virtual std::list getNames() { std::list names; names.push_back("scxml"); names.push_back("uscxml"); - names.push_back("http://www.w3.org/TR/scxml"); + names.push_back(USCXML_INVOKER_SCXML_TYPE); names.push_back("http://www.w3.org/TR/scxml/"); return names; } - virtual bool deleteOnUninvoke() { - return false; - } + virtual void eventFromSCXML(const Event& event); virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); + virtual void invoke(const std::string& source, const Event& invokeEvent); virtual void uninvoke(); protected: - bool _cancelled; - ParentQueue _parentQueue; + + void start(); + void stop(); + static void run(void* instance); + + bool _isActive; + bool _isStarted; + std::thread* _thread; + EventQueue _parentQueue; Interpreter _invokedInterpreter; - InterpreterImpl* _parentInterpreter; }; #ifdef BUILD_AS_PLUGINS diff --git a/src/uscxml/plugins/invoker/smtp/SMTPInvoker.cpp b/src/uscxml/plugins/invoker/smtp/SMTPInvoker.cpp deleted file mode 100644 index 90b777c..0000000 --- a/src/uscxml/plugins/invoker/smtp/SMTPInvoker.cpp +++ /dev/null @@ -1,362 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "SMTPInvoker.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -#include -#include "uscxml/UUID.h" -#include "uscxml/messages/Blob.h" - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new SMTPInvokerProvider() ); - return true; -} -#endif - -SMTPInvoker::SMTPInvoker() { -} - -SMTPInvoker::~SMTPInvoker() { -}; - -boost::shared_ptr SMTPInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new SMTPInvoker()); - return invoker; -} - -Data SMTPInvoker::getDataModelVariables() { - Data data; - return data; -} - -size_t SMTPInvoker::writeCurlData(void *ptr, size_t size, size_t nmemb, void *userdata) { - if (!userdata) - return 0; - - SMTPContext* ctx = (SMTPContext*)userdata; - - size_t toWrite = (std::min)(ctx->content.length() - ctx->readPtr, size * nmemb); - if (toWrite > 0) { - memcpy (ptr, ctx->content.c_str() + ctx->readPtr, toWrite); - ctx->readPtr += toWrite; - } - - return toWrite; -} - -std::list SMTPInvoker::getAtoms(std::list list) { - std::list atoms; - - std::list::const_iterator iter = list.begin(); - while(iter != list.end()) { - const Data& data = *iter; - if (data.atom.size() > 0) { - atoms.push_back(data.atom); - } else if (data.array.size() > 0) { - std::list::const_iterator arrIter = data.array.begin(); - while(arrIter != data.array.end()) { - if (arrIter->atom.size() > 0) { - atoms.push_back(arrIter->atom); - arrIter++; - } - } - } - iter++; - } - return atoms; -} - -void SMTPInvoker::getAttachments(std::list list, std::list& attachments) { - // accumulate attachments with filename, mimetype and data - std::list::const_iterator iter = list.begin(); - while(iter != list.end()) { - const Data& data = *iter; - if (data.hasKey("data")) { - // compound structure with all information - Data att = data; - - if (!att.hasKey("mimetype")) { - if (att["data"].binary && att["data"].binary.getMimeType().size() > 0) { - att.compound["mimetype"] = Data(att["data"].binary.getMimeType(), Data::VERBATIM); - } else { - att.compound["mimetype"] = Data("text/plain", Data::VERBATIM); - } - } - - if (!att.hasKey("filename")) { - std::stringstream filenameSS; - filenameSS << "attachment" << attachments.size() + 1; - if (boost::starts_with(att.compound["mimetype"].atom, "text")) { - filenameSS << ".txt"; - } else { - filenameSS << ".bin"; - } - att.compound["filename"] = Data(filenameSS.str(), Data::VERBATIM); - } - - attachments.push_back(att); - - } else if (data.binary) { - // a single binary blob - Data att; - - att.compound["data"].binary = data.binary; - - if (data.binary.getMimeType().size() > 0) { - att.compound["mimetype"] = Data(attachments.back()["data"].binary.getMimeType(), Data::VERBATIM); - } else { - att.compound["mimetype"] = Data("application/octet-stream", Data::VERBATIM); - } - - std::stringstream filenameSS; - filenameSS << "attachment" << attachments.size() + 1; - if (boost::starts_with(att.compound["mimetype"].atom, "text")) { - filenameSS << ".txt"; - } else { - filenameSS << ".bin"; - } - att.compound["filename"] = Data(filenameSS.str(), Data::VERBATIM); - - attachments.push_back(att); - - } else if (data.compound.size() > 0) { - // data is some compound, descent to find attachment structures or binaries - std::map::const_iterator compIter = data.compound.begin(); - while(compIter != data.compound.end()) { - std::list tmp; - tmp.push_back(compIter->second); - getAttachments(tmp, attachments); - compIter++; - } - } else if (data.array.size() > 0) { - // descent into array - getAttachments(data.array, attachments); - } - iter++; - } -} - -void SMTPInvoker::send(const SendRequest& req) { - if (iequals(req.name, "mail.send")) { - - struct curl_slist* recipients = NULL; - CURLcode curlError; - std::string multipartSep; - - bool verbose; - std::string from; - std::string subject; - std::string contentType; - std::list headerParams; - std::list toParams; - std::list ccParams; - std::list bccParams; - std::list attachmentParams; - - Event::getParam(req.params, "verbose", verbose); - Event::getParam(req.params, "Content-Type", contentType); - Event::getParam(req.params, "attachment", attachmentParams); - Event::getParam(req.params, "from", from); - Event::getParam(req.params, "subject", subject); - Event::getParam(req.params, "header", headerParams); - Event::getParam(req.params, "to", toParams); - Event::getParam(req.params, "cc", ccParams); - Event::getParam(req.params, "bcc", bccParams); - - if (contentType.size() == 0) - contentType = "text/plain; charset=\"UTF-8\""; - - SMTPContext* ctx = new SMTPContext(); - std::stringstream contentSS; - - std::list::const_iterator recIter; - std::list to = getAtoms(toParams); - std::list cc = getAtoms(ccParams); - std::list bcc = getAtoms(bccParams); - std::list headers = getAtoms(headerParams); - std::list attachments; - getAttachments(attachmentParams, attachments); - - if (to.size() == 0) - return; - - recIter = to.begin(); - recIter++; // skip first as we need it in CURLOPT_MAIL_RCPT - while(recIter != to.end()) { - contentSS << "TO: " << *recIter << std::endl; - recIter++; - } - recIter = cc.begin(); - while(recIter != cc.end()) { - contentSS << "CC: " << *recIter << std::endl; - recIter++; - } - recIter = bcc.begin(); - while(recIter != bcc.end()) { - contentSS << "BCC: " << *recIter << std::endl; - recIter++; - } - - recIter = headers.begin(); - while(recIter != headers.end()) { - contentSS << *recIter << std::endl; - recIter++; - } - - if (subject.length() > 0) { - boost::replace_all(subject, "\n\r", " "); - boost::replace_all(subject, "\r\n", " "); - boost::replace_all(subject, "\n", " "); - boost::replace_all(subject, "\r", " "); - contentSS << "Subject: " << subject << "\n"; - } - - // content type is different when we have attachments - if (attachments.size() > 0) { - multipartSep = UUID::getUUID(); - boost::replace_all(multipartSep, "-", ""); - contentSS << "Content-Type: multipart/mixed; boundary=\"" << multipartSep << "\"\n"; - contentSS << "MIME-Version: 1.0\n"; - contentSS << "\n"; - contentSS << "--" << multipartSep << "\n"; - contentSS << "Content-Type: " << contentType << "\n"; - } else { - // when we have no attachment, respect user-defined or use text/plain - contentSS << "Content-Type: " << contentType << "\n"; - } - - contentSS << "\n"; - contentSS << req.content; - - std::list::iterator attIter = attachments.begin(); - while(attIter != attachments.end()) { - // only send valid attachments - if(!attIter->hasKey("filename") || !attIter->hasKey("mimetype") || !attIter->hasKey("data")) { - LOG(ERROR) << "Not sending attachment as filename, mimetype or data is missing: " << *attIter; - } else { - contentSS << "\n\n"; - contentSS << "--" << multipartSep << "\n"; - contentSS << "Content-Disposition: attachment; filename=\"" << attIter->compound["filename"].atom << "\""; - contentSS << "\n"; - - contentSS << "Content-Type: " << attIter->compound["mimetype"].atom << "; "; - contentSS << "name=\"" << attIter->compound["filename"].atom << "\""; - contentSS << "\n"; - - if (attIter->compound["data"].binary) { - contentSS << "Content-Transfer-Encoding: base64"; - contentSS << "\n\n"; - contentSS << attIter->compound["data"].binary.base64(); - } else { - contentSS << "Content-Transfer-Encoding: 7Bit"; - contentSS << "\n\n"; - contentSS << attIter->compound["data"].atom; - } - } - attIter++; - } - - ctx->content = contentSS.str(); - ctx->invoker = this; - - - // see http://curl.haxx.se/libcurl/c/smtp-tls.html - _curl = curl_easy_init(); - if(_curl) { - (curlError = curl_easy_setopt(_curl, CURLOPT_USERNAME, _username.c_str())) == CURLE_OK || - LOG(ERROR) << "Cannot set username: " << curl_easy_strerror(curlError); - (curlError = curl_easy_setopt(_curl, CURLOPT_PASSWORD, _password.c_str())) == CURLE_OK || - LOG(ERROR) << "Cannot set password: " << curl_easy_strerror(curlError); - (curlError = curl_easy_setopt(_curl, CURLOPT_URL, _server.c_str())) == CURLE_OK || - LOG(ERROR) << "Cannot set server string: " << curl_easy_strerror(curlError); - (curlError = curl_easy_setopt(_curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL)) == CURLE_OK || - LOG(ERROR) << "Cannot use SSL: " << curl_easy_strerror(curlError); - - // this is needed, even if we have a callback function - recipients = curl_slist_append(recipients, to.begin()->c_str()); - (curlError = curl_easy_setopt(_curl, CURLOPT_MAIL_RCPT, recipients)) == CURLE_OK || - LOG(ERROR) << "Cannot set mail recipient: " << curl_easy_strerror(curlError); - - (curlError = curl_easy_setopt(_curl, CURLOPT_READFUNCTION, SMTPInvoker::writeCurlData)) == CURLE_OK || - LOG(ERROR) << "Cannot register read function: " << curl_easy_strerror(curlError); - (curlError = curl_easy_setopt(_curl, CURLOPT_READDATA, ctx)) == CURLE_OK || - LOG(ERROR) << "Cannot register userdata for read function: " << curl_easy_strerror(curlError); - (curlError = curl_easy_setopt(_curl, CURLOPT_UPLOAD, 1L)) == CURLE_OK || - LOG(ERROR) << "Cannot set upload parameter: " << curl_easy_strerror(curlError); - -#if 1 - (curlError = curl_easy_setopt(_curl, CURLOPT_SSL_VERIFYPEER, 0L)) == CURLE_OK || - LOG(ERROR) << "Cannot unset verify peer with SSL: " << curl_easy_strerror(curlError); - (curlError = curl_easy_setopt(_curl, CURLOPT_SSL_VERIFYHOST, 0L)) == CURLE_OK || - LOG(ERROR) << "Cannot unset verify host with SSL: " << curl_easy_strerror(curlError); -#else - (curlError = curl_easy_setopt(_curl, CURLOPT_CAINFO, "/path/to/certificate.pem")) == CURLE_OK || - LOG(ERROR) << "Cannot set CA info path: " << curl_easy_strerror(curlError); -#endif - - if (from.length() > 0) { - (curlError = curl_easy_setopt(_curl, CURLOPT_MAIL_FROM, from.c_str())) == CURLE_OK || - LOG(ERROR) << "Cannot set from parameter: " << curl_easy_strerror(curlError); - } - - if (verbose) { - (curlError = curl_easy_setopt(_curl, CURLOPT_VERBOSE, 1L)) == CURLE_OK || - LOG(ERROR) << "Cannot set curl to verbose: " << curl_easy_strerror(curlError); - } - - CURLcode res = curl_easy_perform(_curl); - - /* Check for errors */ - if(res != CURLE_OK) { - LOG(ERROR) << "curl_easy_perform() failed: " << curl_easy_strerror(res); - returnErrorExecution("error.mail.send"); - } else { - returnErrorExecution("success.mail.send"); - } - /* Free the list of recipients */ - if (recipients) - curl_slist_free_all(recipients); - - /* Always cleanup */ - curl_easy_cleanup(_curl); - - } - - } -} - -void SMTPInvoker::cancel(const std::string sendId) { -} - -void SMTPInvoker::invoke(const InvokeRequest& req) { - Event::getParam(req.params, "username", _username); - Event::getParam(req.params, "password", _password); - Event::getParam(req.params, "server", _server); -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/smtp/SMTPInvoker.h b/src/uscxml/plugins/invoker/smtp/SMTPInvoker.h deleted file mode 100644 index 5975b4b..0000000 --- a/src/uscxml/plugins/invoker/smtp/SMTPInvoker.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef SMTPINVOKER_H_W09J90F0 -#define SMTPINVOKER_H_W09J90F0 - -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -#include - -namespace uscxml { - -class SMTPInvoker : public InvokerImpl { -public: - SMTPInvoker(); - virtual ~SMTPInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("smtp"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#smtp"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - -protected: - - class SMTPContext { - public: - SMTPContext() : readPtr(0) {} - std::string content; - size_t readPtr; - SMTPInvoker* invoker; - }; - - CURL* _curl; - std::string _username; - std::string _password; - std::string _server; - - std::list getAtoms(std::list list); - void getAttachments(std::list list, std::list& attachments); - static size_t writeCurlData(void *ptr, size_t size, size_t nmemb, void *userdata); -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(SMTPInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: SMTPINVOKER_H_W09J90F0 */ diff --git a/src/uscxml/plugins/invoker/sqlite3/Sqlite3Invoker.cpp b/src/uscxml/plugins/invoker/sqlite3/Sqlite3Invoker.cpp deleted file mode 100644 index debe371..0000000 --- a/src/uscxml/plugins/invoker/sqlite3/Sqlite3Invoker.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "Sqlite3Invoker.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new Sqlite3InvokerProvider() ); - return true; -} -#endif - -Sqlite3Invoker::Sqlite3Invoker() { -} - -Sqlite3Invoker::~Sqlite3Invoker() { -}; - -boost::shared_ptr Sqlite3Invoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new Sqlite3Invoker()); - invoker->_interpreter = interpreter; - return invoker; -} - -Data Sqlite3Invoker::getDataModelVariables() { - Data data; - return data; -} - -void Sqlite3Invoker::send(const SendRequest& req) { -} - -void Sqlite3Invoker::cancel(const std::string sendId) { -} - -void Sqlite3Invoker::invoke(const InvokeRequest& req) { -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/sqlite3/Sqlite3Invoker.h b/src/uscxml/plugins/invoker/sqlite3/Sqlite3Invoker.h deleted file mode 100644 index b6e5031..0000000 --- a/src/uscxml/plugins/invoker/sqlite3/Sqlite3Invoker.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef SQLITE3INVOKER_H_W09J90F0 -#define SQLITE3INVOKER_H_W09J90F0 - -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class Sqlite3Invoker : public InvokerImpl { -public: - Sqlite3Invoker(); - virtual ~Sqlite3Invoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("sqlite3"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#sqlite3"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - -protected: -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(Sqlite3Invoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: SQLITE3INVOKER_H_W09J90F0 */ diff --git a/src/uscxml/plugins/invoker/system/SystemInvoker.cpp b/src/uscxml/plugins/invoker/system/SystemInvoker.cpp deleted file mode 100644 index c5f574f..0000000 --- a/src/uscxml/plugins/invoker/system/SystemInvoker.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "SystemInvoker.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add(new SystemInvokerProvider()); - return true; -} -#endif - -SystemInvoker::SystemInvoker() { -} - -SystemInvoker::~SystemInvoker() { -}; - -boost::shared_ptr SystemInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new SystemInvoker()); - invoker->_interpreter = interpreter; - return invoker; -} - -Data SystemInvoker::getDataModelVariables() { - Data data; - return data; -} - -void SystemInvoker::send(const SendRequest& req) { -} - -void SystemInvoker::cancel(const std::string sendId) { -} - -void SystemInvoker::invoke(const InvokeRequest& req) { -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/system/SystemInvoker.h b/src/uscxml/plugins/invoker/system/SystemInvoker.h deleted file mode 100644 index a3d1451..0000000 --- a/src/uscxml/plugins/invoker/system/SystemInvoker.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef SYSTEMINVOKER_H_W09J90F0 -#define SYSTEMINVOKER_H_W09J90F0 - -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class SystemInvoker : public InvokerImpl { -public: - SystemInvoker(); - virtual ~SystemInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("system"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#system"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - -protected: -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(SystemInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: SYSTEMINVOKER_H_W09J90F0 */ diff --git a/src/uscxml/plugins/invoker/umundo/JSON.pb.cc b/src/uscxml/plugins/invoker/umundo/JSON.pb.cc deleted file mode 100644 index 9e245c1..0000000 --- a/src/uscxml/plugins/invoker/umundo/JSON.pb.cc +++ /dev/null @@ -1,462 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: JSON.proto - -#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION -#include "JSON.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) - -namespace { - -const ::google::protobuf::Descriptor* JSONProto_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - JSONProto_reflection_ = NULL; - -} // namespace - - -void protobuf_AssignDesc_JSON_2eproto() { - protobuf_AddDesc_JSON_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "JSON.proto"); - GOOGLE_CHECK(file != NULL); - JSONProto_descriptor_ = file->message_type(0); - static const int JSONProto_offsets_[4] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(JSONProto, compound_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(JSONProto, key_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(JSONProto, atom_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(JSONProto, verbatim_), - }; - JSONProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - JSONProto_descriptor_, - JSONProto::default_instance_, - JSONProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(JSONProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(JSONProto, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(JSONProto)); -} - -namespace { - -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_JSON_2eproto); -} - -void protobuf_RegisterTypes(const ::std::string&) { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - JSONProto_descriptor_, &JSONProto::default_instance()); -} - -} // namespace - -void protobuf_ShutdownFile_JSON_2eproto() { - delete JSONProto::default_instance_; - delete JSONProto_reflection_; -} - -void protobuf_AddDesc_JSON_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; - GOOGLE_PROTOBUF_VERIFY_VERSION; - - ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\nJSON.proto\"V\n\tJSONProto\022\034\n\010compound\030\001 " - "\003(\0132\n.JSONProto\022\013\n\003key\030\002 \001(\t\022\014\n\004atom\030\003 \001" - "(\t\022\020\n\010verbatim\030\004 \001(\010", 100); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( - "JSON.proto", &protobuf_RegisterTypes); - JSONProto::default_instance_ = new JSONProto(); - JSONProto::default_instance_->InitAsDefaultInstance(); - ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_JSON_2eproto); -} - -// Force AddDescriptors() to be called at static initialization time. -struct StaticDescriptorInitializer_JSON_2eproto { - StaticDescriptorInitializer_JSON_2eproto() { - protobuf_AddDesc_JSON_2eproto(); - } -} static_descriptor_initializer_JSON_2eproto_; - -// =================================================================== - -#ifndef _MSC_VER -const int JSONProto::kCompoundFieldNumber; -const int JSONProto::kKeyFieldNumber; -const int JSONProto::kAtomFieldNumber; -const int JSONProto::kVerbatimFieldNumber; -#endif // !_MSC_VER - -JSONProto::JSONProto() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void JSONProto::InitAsDefaultInstance() { -} - -JSONProto::JSONProto(const JSONProto& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void JSONProto::SharedCtor() { - _cached_size_ = 0; - key_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - atom_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - verbatim_ = false; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -JSONProto::~JSONProto() { - SharedDtor(); -} - -void JSONProto::SharedDtor() { - if (key_ != &::google::protobuf::internal::kEmptyString) { - delete key_; - } - if (atom_ != &::google::protobuf::internal::kEmptyString) { - delete atom_; - } - if (this != default_instance_) { - } -} - -void JSONProto::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* JSONProto::descriptor() { - protobuf_AssignDescriptorsOnce(); - return JSONProto_descriptor_; -} - -const JSONProto& JSONProto::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_JSON_2eproto(); - return *default_instance_; -} - -JSONProto* JSONProto::default_instance_ = NULL; - -JSONProto* JSONProto::New() const { - return new JSONProto; -} - -void JSONProto::Clear() { - if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { - if (has_key()) { - if (key_ != &::google::protobuf::internal::kEmptyString) { - key_->clear(); - } - } - if (has_atom()) { - if (atom_ != &::google::protobuf::internal::kEmptyString) { - atom_->clear(); - } - } - verbatim_ = false; - } - compound_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool JSONProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .JSONProto compound = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_compound: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_compound())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(10)) goto parse_compound; - if (input->ExpectTag(18)) goto parse_key; - break; - } - - // optional string key = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_key: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_key())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->key().data(), this->key().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(26)) goto parse_atom; - break; - } - - // optional string atom = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_atom: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_atom())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->atom().data(), this->atom().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(32)) goto parse_verbatim; - break; - } - - // optional bool verbatim = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_verbatim: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &verbatim_))); - set_has_verbatim(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void JSONProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // repeated .JSONProto compound = 1; - for (int i = 0; i < this->compound_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->compound(i), output); - } - - // optional string key = 2; - if (has_key()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->key().data(), this->key().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 2, this->key(), output); - } - - // optional string atom = 3; - if (has_atom()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->atom().data(), this->atom().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 3, this->atom(), output); - } - - // optional bool verbatim = 4; - if (has_verbatim()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->verbatim(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* JSONProto::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // repeated .JSONProto compound = 1; - for (int i = 0; i < this->compound_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->compound(i), target); - } - - // optional string key = 2; - if (has_key()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->key().data(), this->key().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 2, this->key(), target); - } - - // optional string atom = 3; - if (has_atom()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->atom().data(), this->atom().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 3, this->atom(), target); - } - - // optional bool verbatim = 4; - if (has_verbatim()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->verbatim(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int JSONProto::ByteSize() const { - int total_size = 0; - - if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { - // optional string key = 2; - if (has_key()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->key()); - } - - // optional string atom = 3; - if (has_atom()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->atom()); - } - - // optional bool verbatim = 4; - if (has_verbatim()) { - total_size += 1 + 1; - } - - } - // repeated .JSONProto compound = 1; - total_size += 1 * this->compound_size(); - for (int i = 0; i < this->compound_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->compound(i)); - } - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void JSONProto::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const JSONProto* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void JSONProto::MergeFrom(const JSONProto& from) { - GOOGLE_CHECK_NE(&from, this); - compound_.MergeFrom(from.compound_); - if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) { - if (from.has_key()) { - set_key(from.key()); - } - if (from.has_atom()) { - set_atom(from.atom()); - } - if (from.has_verbatim()) { - set_verbatim(from.verbatim()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void JSONProto::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void JSONProto::CopyFrom(const JSONProto& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool JSONProto::IsInitialized() const { - - return true; -} - -void JSONProto::Swap(JSONProto* other) { - if (other != this) { - compound_.Swap(&other->compound_); - std::swap(key_, other->key_); - std::swap(atom_, other->atom_); - std::swap(verbatim_, other->verbatim_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata JSONProto::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = JSONProto_descriptor_; - metadata.reflection = JSONProto_reflection_; - return metadata; -} - - -// @@protoc_insertion_point(namespace_scope) - -// @@protoc_insertion_point(global_scope) diff --git a/src/uscxml/plugins/invoker/umundo/JSON.pb.h b/src/uscxml/plugins/invoker/umundo/JSON.pb.h deleted file mode 100644 index ff65656..0000000 --- a/src/uscxml/plugins/invoker/umundo/JSON.pb.h +++ /dev/null @@ -1,361 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: JSON.proto - -#ifndef PROTOBUF_JSON_2eproto__INCLUDED -#define PROTOBUF_JSON_2eproto__INCLUDED - -#include - -#include - - -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) - -// Internal implementation detail -- do not call these. -void protobuf_AddDesc_JSON_2eproto(); -void protobuf_AssignDesc_JSON_2eproto(); -void protobuf_ShutdownFile_JSON_2eproto(); - -class JSONProto; - -// =================================================================== - -class JSONProto : public ::google::protobuf::Message { -public: - JSONProto(); - virtual ~JSONProto(); - - JSONProto(const JSONProto& from); - - inline JSONProto& operator=(const JSONProto& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const JSONProto& default_instance(); - - void Swap(JSONProto* other); - - // implements Message ---------------------------------------------- - - JSONProto* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const JSONProto& from); - void MergeFrom(const JSONProto& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { - return _cached_size_; - } -private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; -public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // repeated .JSONProto compound = 1; - inline int compound_size() const; - inline void clear_compound(); - static const int kCompoundFieldNumber = 1; - inline const ::JSONProto& compound(int index) const; - inline ::JSONProto* mutable_compound(int index); - inline ::JSONProto* add_compound(); - inline const ::google::protobuf::RepeatedPtrField< ::JSONProto >& - compound() const; - inline ::google::protobuf::RepeatedPtrField< ::JSONProto >* - mutable_compound(); - - // optional string key = 2; - inline bool has_key() const; - inline void clear_key(); - static const int kKeyFieldNumber = 2; - inline const ::std::string& key() const; - inline void set_key(const ::std::string& value); - inline void set_key(const char* value); - inline void set_key(const char* value, size_t size); - inline ::std::string* mutable_key(); - inline ::std::string* release_key(); - inline void set_allocated_key(::std::string* key); - - // optional string atom = 3; - inline bool has_atom() const; - inline void clear_atom(); - static const int kAtomFieldNumber = 3; - inline const ::std::string& atom() const; - inline void set_atom(const ::std::string& value); - inline void set_atom(const char* value); - inline void set_atom(const char* value, size_t size); - inline ::std::string* mutable_atom(); - inline ::std::string* release_atom(); - inline void set_allocated_atom(::std::string* atom); - - // optional bool verbatim = 4; - inline bool has_verbatim() const; - inline void clear_verbatim(); - static const int kVerbatimFieldNumber = 4; - inline bool verbatim() const; - inline void set_verbatim(bool value); - - // @@protoc_insertion_point(class_scope:JSONProto) -private: - inline void set_has_key(); - inline void clear_has_key(); - inline void set_has_atom(); - inline void clear_has_atom(); - inline void set_has_verbatim(); - inline void clear_has_verbatim(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::RepeatedPtrField< ::JSONProto > compound_; - ::std::string* key_; - ::std::string* atom_; - bool verbatim_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; - - friend void protobuf_AddDesc_JSON_2eproto(); - friend void protobuf_AssignDesc_JSON_2eproto(); - friend void protobuf_ShutdownFile_JSON_2eproto(); - - void InitAsDefaultInstance(); - static JSONProto* default_instance_; -}; -// =================================================================== - - -// =================================================================== - -// JSONProto - -// repeated .JSONProto compound = 1; -inline int JSONProto::compound_size() const { - return compound_.size(); -} -inline void JSONProto::clear_compound() { - compound_.Clear(); -} -inline const ::JSONProto& JSONProto::compound(int index) const { - return compound_.Get(index); -} -inline ::JSONProto* JSONProto::mutable_compound(int index) { - return compound_.Mutable(index); -} -inline ::JSONProto* JSONProto::add_compound() { - return compound_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::JSONProto >& -JSONProto::compound() const { - return compound_; -} -inline ::google::protobuf::RepeatedPtrField< ::JSONProto >* -JSONProto::mutable_compound() { - return &compound_; -} - -// optional string key = 2; -inline bool JSONProto::has_key() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void JSONProto::set_has_key() { - _has_bits_[0] |= 0x00000002u; -} -inline void JSONProto::clear_has_key() { - _has_bits_[0] &= ~0x00000002u; -} -inline void JSONProto::clear_key() { - if (key_ != &::google::protobuf::internal::kEmptyString) { - key_->clear(); - } - clear_has_key(); -} -inline const ::std::string& JSONProto::key() const { - return *key_; -} -inline void JSONProto::set_key(const ::std::string& value) { - set_has_key(); - if (key_ == &::google::protobuf::internal::kEmptyString) { - key_ = new ::std::string; - } - key_->assign(value); -} -inline void JSONProto::set_key(const char* value) { - set_has_key(); - if (key_ == &::google::protobuf::internal::kEmptyString) { - key_ = new ::std::string; - } - key_->assign(value); -} -inline void JSONProto::set_key(const char* value, size_t size) { - set_has_key(); - if (key_ == &::google::protobuf::internal::kEmptyString) { - key_ = new ::std::string; - } - key_->assign(reinterpret_cast(value), size); -} -inline ::std::string* JSONProto::mutable_key() { - set_has_key(); - if (key_ == &::google::protobuf::internal::kEmptyString) { - key_ = new ::std::string; - } - return key_; -} -inline ::std::string* JSONProto::release_key() { - clear_has_key(); - if (key_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = key_; - key_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} -inline void JSONProto::set_allocated_key(::std::string* key) { - if (key_ != &::google::protobuf::internal::kEmptyString) { - delete key_; - } - if (key) { - set_has_key(); - key_ = key; - } else { - clear_has_key(); - key_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - } -} - -// optional string atom = 3; -inline bool JSONProto::has_atom() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void JSONProto::set_has_atom() { - _has_bits_[0] |= 0x00000004u; -} -inline void JSONProto::clear_has_atom() { - _has_bits_[0] &= ~0x00000004u; -} -inline void JSONProto::clear_atom() { - if (atom_ != &::google::protobuf::internal::kEmptyString) { - atom_->clear(); - } - clear_has_atom(); -} -inline const ::std::string& JSONProto::atom() const { - return *atom_; -} -inline void JSONProto::set_atom(const ::std::string& value) { - set_has_atom(); - if (atom_ == &::google::protobuf::internal::kEmptyString) { - atom_ = new ::std::string; - } - atom_->assign(value); -} -inline void JSONProto::set_atom(const char* value) { - set_has_atom(); - if (atom_ == &::google::protobuf::internal::kEmptyString) { - atom_ = new ::std::string; - } - atom_->assign(value); -} -inline void JSONProto::set_atom(const char* value, size_t size) { - set_has_atom(); - if (atom_ == &::google::protobuf::internal::kEmptyString) { - atom_ = new ::std::string; - } - atom_->assign(reinterpret_cast(value), size); -} -inline ::std::string* JSONProto::mutable_atom() { - set_has_atom(); - if (atom_ == &::google::protobuf::internal::kEmptyString) { - atom_ = new ::std::string; - } - return atom_; -} -inline ::std::string* JSONProto::release_atom() { - clear_has_atom(); - if (atom_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = atom_; - atom_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} -inline void JSONProto::set_allocated_atom(::std::string* atom) { - if (atom_ != &::google::protobuf::internal::kEmptyString) { - delete atom_; - } - if (atom) { - set_has_atom(); - atom_ = atom; - } else { - clear_has_atom(); - atom_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - } -} - -// optional bool verbatim = 4; -inline bool JSONProto::has_verbatim() const { - return (_has_bits_[0] & 0x00000008u) != 0; -} -inline void JSONProto::set_has_verbatim() { - _has_bits_[0] |= 0x00000008u; -} -inline void JSONProto::clear_has_verbatim() { - _has_bits_[0] &= ~0x00000008u; -} -inline void JSONProto::clear_verbatim() { - verbatim_ = false; - clear_has_verbatim(); -} -inline bool JSONProto::verbatim() const { - return verbatim_; -} -inline void JSONProto::set_verbatim(bool value) { - set_has_verbatim(); - verbatim_ = value; -} - - -// @@protoc_insertion_point(namespace_scope) - -#ifndef SWIG -namespace google { -namespace protobuf { - - -} // namespace google -} // namespace protobuf -#endif // SWIG - -// @@protoc_insertion_point(global_scope) - -#endif // PROTOBUF_JSON_2eproto__INCLUDED diff --git a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp deleted file mode 100644 index 0302d87..0000000 --- a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp +++ /dev/null @@ -1,655 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include - -#include "UmundoInvoker.h" -#include -#include "uscxml/URL.h" - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new UmundoInvokerProvider() ); - return true; -} -#endif - -UmundoInvoker::UmundoInvoker() : _node(NULL), _discovery(NULL), _pub(NULL), _sub(NULL) { -} - -UmundoInvoker::~UmundoInvoker() { - if (_node) { - if (_sub) { - _node->removeSubscriber(*_sub); - delete _sub; - } - if (_pub) { - _node->removePublisher(*_pub); - delete _pub; - } - delete(_node); - } -}; - -boost::shared_ptr UmundoInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new UmundoInvoker()); - invoker->_interpreter = interpreter; - return invoker; -} - -Data UmundoInvoker::getDataModelVariables() { - Data data; - return data; -} - -void UmundoInvoker::send(const SendRequest& req) { - umundo::Message msg; - - if (req.name.length() > 0) { - msg.putMeta("event", req.name); - } else { - msg.putMeta("event", "umundo"); - } - - try { - Data data = req.data; - - if (data.empty() && req.content.length()) - data = _interpreter->getDataModel().getStringAsData(req.content); - - if (data.empty()) { - LOG(ERROR) << "Cannot transform content to data object per datamodel or no data given"; - return; - } - -// std::cout << Data::toJSON(data) << std::endl; - - std::string type; - if (req.params.find("type") != req.params.end()) { - // we are supposed to build a typed object - type = req.params.find("type")->second.atom; - - const google::protobuf::Message* protoMsg = umundo::PBSerializer::getProto(type); - if (protoMsg == NULL) { - LOG(ERROR) << "No type '" << type << "' is known, pass a directory with proto .desc files via types param when invoking"; - return; - } - - google::protobuf::Message* pbMsg = protoMsg->New(); - if (!dataToProtobuf(pbMsg, data)) { - LOG(ERROR) << "Cannot create message from JSON - not sending"; - return; - } - - if (!_isService) { - // add all s11n properties - _pub->prepareMsg(&msg, type, pbMsg); - _pub->send(&msg); - } else { - // invoke as service - std::map::iterator svcIter = _svcs.begin(); - while(svcIter != _svcs.end()) { - umundo::ServiceStub* stub = svcIter->second; - Event event; - void* rv = NULL; - stub->callStubMethod(req.name, pbMsg, type, rv, ""); - protobufToData(event.data, *(const google::protobuf::Message*)rv); - - event.name = _invokeId + ".reply." + req.name; - event.origin = msg.getMeta("um.channel"); - event.origintype = "umundo"; - event.eventType = Event::EXTERNAL; - - returnEvent(event); - svcIter++; - } - } - } else { - // just encode JSON - JSONProto* jsonProtoMsg = new JSONProto(); - if (!dataToJSONbuf(jsonProtoMsg, data)) { - LOG(ERROR) << "Cannot create message from JSON - not sending"; - return; - } - - if (!_isService) { - // add all s11n properties - _pub->prepareMsg(&msg, "JSON", jsonProtoMsg); - _pub->send(&msg); - } else { - LOG(ERROR) << "Cannot invoke services with untyped JSON"; - return; - } - - } - } catch (Event e) { - LOG(ERROR) << "Syntax error when invoking umundo:" << std::endl << e << std::endl; - return; - } -} - -void UmundoInvoker::cancel(const std::string sendId) { - assert(false); -} - -void UmundoInvoker::invoke(const InvokeRequest& req) { - - std::string domain; - std::string channelName; - std::string serviceName; - - if (req.params.find("channel") != req.params.end()) { - channelName = req.params.find("channel")->second.atom; - _isService = false; - } else if (req.params.find("service") != req.params.end()) { - serviceName = req.params.find("service")->second.atom; - _isService = true; - } else { - LOG(ERROR) << "Invoking umundo needs a service or a channel param"; - return; - } - if (req.params.find("domain") != req.params.end()) { - domain = req.params.find("domain")->second.atom; - } - _node = new umundo::Node(); - - umundo::DiscoveryConfigMDNS discOpts; - _discovery = new umundo::Discovery(&discOpts); - - _discovery->add(*_node); - - // add type from .proto or .desc files - std::list type; - Event::getParam(req.params, "type", type); - std::list::const_iterator typeIter = type.begin(); - while(typeIter != type.end()) { - URL typeURI(*typeIter); - if (typeURI.toAbsolute(_interpreter->getBaseURL(req.elem))) { - std::string filename = typeURI.asLocalFile(".proto"); - umundo::PBSerializer::addProto(filename); - } else { - LOG(ERROR) << "umundo invoker has relative type src but no baseURI set with interpreter."; - } - typeIter++; - } - - // add directory with .proto or .desc files - std::list types; - Event::getParam(req.params, "type", types); - std::list::const_iterator typesIter = types.begin(); - while(typesIter != types.end()) { - URL typeURI(*typesIter); - if (typeURI.toAbsolute(_interpreter->getBaseURL(req.elem))) { - umundo::PBSerializer::addProto(typeURI.path()); - } else { - LOG(ERROR) << "invoke element has relative src URI with no baseURI set."; - } - typesIter++; - } - - if (!_isService) { - // use umundo to publish objects on a channel - _pub = new umundo::TypedPublisher(channelName); - _sub = new umundo::TypedSubscriber(channelName, this); - - _pub->setGreeter(this); - _sub->registerType("JSON", new JSONProto()); - - _node->addPublisher(*_pub); - _node->addSubscriber(*_sub); - - } else if (serviceName.length() > 0) { - // use umundo to access services - _svcFilter = new umundo::ServiceFilter(serviceName); - _node->connect(_svcMgr); - _svcMgr->startQuery(*_svcFilter, this); - } -} - -void UmundoInvoker::welcome(umundo::TypedPublisher atPub, const umundo::SubscriberStub& sub) { - Event event; - event.name = "umundo.sub.added"; - event.data.compound["subId"] = Data(sub.getUUID(), Data::VERBATIM); - event.data.compound["channel"] = Data(atPub.getChannelName(), Data::VERBATIM); - event.data.compound["totalSubs"] = Data(toStr(atPub.waitForSubscribers(0)), Data::VERBATIM); - returnEvent(event); -} - -void UmundoInvoker::farewell(umundo::TypedPublisher fromPub, const umundo::SubscriberStub& sub) { - Event event; - event.name = "umundo.sub.removed"; - event.data.compound["subId"] = Data(sub.getUUID(), Data::VERBATIM); - event.data.compound["channel"] = Data(fromPub.getChannelName(), Data::VERBATIM); - event.data.compound["totalSubs"] = Data(toStr(fromPub.waitForSubscribers(0)), Data::VERBATIM); - returnEvent(event); -} - -void UmundoInvoker::receive(void* object, umundo::Message* msg) { - uscxml::Event event; - if (msg->getMeta().find("event") != msg->getMeta().end()) { - event.name = msg->getMeta("event"); - } else { - event.name = "umundo.rcvd"; - } - - event.invokeid = _invokeId; - event.origin = msg->getMeta("um.channel"); - event.origintype = "umundo"; - event.eventType = Event::EXTERNAL; - - if (object != NULL) { - if (msg->getMeta().find("um.s11n.type") != msg->getMeta().end() && - boost::equals(msg->getMeta().find("um.s11n.type")->second, "JSON")) { - jsonbufToData(event.data, *(JSONProto*)object); - } else { - protobufToData(event.data, *(const google::protobuf::Message*)object); - } - } - - // get meta fields into event - std::map::const_iterator metaIter = msg->getMeta().begin(); - while(metaIter != msg->getMeta().end()) { - if (isNumeric(metaIter->second.c_str(), 10)) { - event.data.compound[metaIter->first] = Data(metaIter->second, Data::INTERPRETED); - } else { - event.data.compound[metaIter->first] = Data(metaIter->second, Data::VERBATIM); - } - metaIter++; - } - - if (msg->size() > 0) { - event.data.compound["protobuf"] = Data(msg->data(), msg->size(), "application/x-protobuf"); - } - - returnEvent(event); -} - -void UmundoInvoker::added(umundo::ServiceDescription desc) { - LOG(ERROR) << "Service found!"; - - umundo::ServiceStub* stub = new umundo::ServiceStub(desc); - _svcs[desc] = stub; - - Event addedEvent; - addedEvent.invokeid = _invokeId; - addedEvent.origin = desc.getName(); - addedEvent.origintype = "umundo"; - addedEvent.eventType = Event::EXTERNAL; - addedEvent.name = _invokeId + ".added"; - - std::map::const_iterator propIter = desc.getProperties().begin(); - while(propIter != desc.getProperties().end()) { - addedEvent.data.compound[propIter->first] = Data(propIter->second, Data::VERBATIM); - propIter++; - } - - returnEvent(addedEvent); -} - -void UmundoInvoker::removed(umundo::ServiceDescription desc) { - LOG(ERROR) << "Service lost!"; - - if (_svcs.find(desc) == _svcs.end()) { - return; - } - - delete _svcs[desc]; - _svcs.erase(desc); - - Event addedEvent; - addedEvent.invokeid = _invokeId; - addedEvent.origin = desc.getName(); - addedEvent.origintype = "umundo"; - addedEvent.eventType = Event::EXTERNAL; - addedEvent.name = _invokeId + ".removed"; - - std::map::const_iterator propIter = desc.getProperties().begin(); - while(propIter != desc.getProperties().end()) { - addedEvent.data.compound[propIter->first] = Data(propIter->second, Data::VERBATIM); - propIter++; - } - - returnEvent(addedEvent); -} - -void UmundoInvoker::changed(umundo::ServiceDescription desc, uint64_t what) { -} - -bool UmundoInvoker::jsonbufToData(Data& data, const JSONProto& json) { - if (json.compound_size() > 0) { - if (json.compound(0).key().size() > 0) { - // compound - for (int i = 0; i < json.compound_size(); i++) { - jsonbufToData(data.compound[json.compound(i).key()], json.compound(i)); - } - } else { - // array - for (int i = 0; i < json.compound_size(); i++) { - Data arrayData; - data.array.push_back(arrayData); - jsonbufToData(data.array.back(), json.compound(i)); - } - } - } else if (json.atom().size() > 0) { - data.atom = json.atom(); - if (json.verbatim()) { - data.type = Data::VERBATIM; - } else { - data.type = Data::INTERPRETED; - } - } - - return true; -} - -bool UmundoInvoker::protobufToData(Data& data, const google::protobuf::Message& msg) { - const google::protobuf::Descriptor* desc = msg.GetDescriptor(); - const google::protobuf::Reflection* reflect = msg.GetReflection(); - - data.compound["protobufType"] = Data(desc->name(), Data::VERBATIM); - - for (int i = 0; i < desc->field_count(); i++) { - const google::protobuf::FieldDescriptor* fieldDesc = desc->field(i); - std::string key = fieldDesc->name(); - - if (!fieldDesc->is_repeated() && !reflect->HasField(msg, fieldDesc)) - continue; - - switch(fieldDesc->type()) { - case google::protobuf::FieldDescriptor::TYPE_BOOL: - if (fieldDesc->is_repeated()) { - for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(reflect->GetRepeatedBool(msg, fieldDesc, j) ? "true" : "false")); - } - } else { - data.compound[key].atom = (reflect->GetBool(msg, fieldDesc) ? "true" : "false"); - } - break; - case google::protobuf::FieldDescriptor::TYPE_BYTES: - case google::protobuf::FieldDescriptor::TYPE_STRING: - if (fieldDesc->is_repeated()) { - for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedString(msg, fieldDesc, j)), Data::VERBATIM)); - } - } else { - data.compound[key].atom = toStr(reflect->GetString(msg, fieldDesc)); - data.compound[key].type = Data::VERBATIM; - } - break; - case google::protobuf::FieldDescriptor::TYPE_DOUBLE: - if (fieldDesc->is_repeated()) { - for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedDouble(msg, fieldDesc, j)), Data::INTERPRETED)); - } - } else { - data.compound[key].atom = toStr(reflect->GetDouble(msg, fieldDesc)); - } - break; - case google::protobuf::FieldDescriptor::TYPE_ENUM: - if (fieldDesc->is_repeated()) { - for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - const google::protobuf::EnumValueDescriptor* enumDesc = reflect->GetRepeatedEnum(msg, fieldDesc, j); - data.compound[key].array.push_back(Data(toStr(enumDesc->name()), Data::VERBATIM)); - } - } else { - const google::protobuf::EnumValueDescriptor* enumDesc = reflect->GetEnum(msg, fieldDesc); - data.compound[key] = Data(enumDesc->name(), Data::VERBATIM); - } - break; - case google::protobuf::FieldDescriptor::TYPE_FIXED32: - case google::protobuf::FieldDescriptor::TYPE_UINT32: - if (fieldDesc->is_repeated()) { - for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedUInt32(msg, fieldDesc, j)), Data::INTERPRETED)); - } - } else { - data.compound[key].atom = toStr(reflect->GetUInt32(msg, fieldDesc)); - } - break; - case google::protobuf::FieldDescriptor::TYPE_FIXED64: - case google::protobuf::FieldDescriptor::TYPE_UINT64: - if (fieldDesc->is_repeated()) { - for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedUInt64(msg, fieldDesc, j)), Data::INTERPRETED)); - } - } else { - data.compound[key].atom = toStr(reflect->GetUInt64(msg, fieldDesc)); - } - break; - case google::protobuf::FieldDescriptor::TYPE_FLOAT: - if (fieldDesc->is_repeated()) { - for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedFloat(msg, fieldDesc, j)), Data::INTERPRETED)); - } - } else { - data.compound[key].atom = toStr(reflect->GetFloat(msg, fieldDesc)); - } - break; - case google::protobuf::FieldDescriptor::TYPE_GROUP: - LOG(ERROR) << "TYPE_GROUP is unimplemented" << std::endl; - break; - case google::protobuf::FieldDescriptor::TYPE_INT32: - case google::protobuf::FieldDescriptor::TYPE_SINT32: - case google::protobuf::FieldDescriptor::TYPE_SFIXED32: - if (fieldDesc->is_repeated()) { - for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedInt32(msg, fieldDesc, j)), Data::INTERPRETED)); - } - } else { - data.compound[key].atom = toStr(reflect->GetInt32(msg, fieldDesc)); - } - break; - case google::protobuf::FieldDescriptor::TYPE_INT64: - case google::protobuf::FieldDescriptor::TYPE_SINT64: - case google::protobuf::FieldDescriptor::TYPE_SFIXED64: - if (fieldDesc->is_repeated()) { - for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data(toStr(reflect->GetRepeatedInt64(msg, fieldDesc, j)), Data::INTERPRETED)); - } - } else { - data.compound[key].atom = toStr(reflect->GetInt64(msg, fieldDesc)); - } - break; - case google::protobuf::FieldDescriptor::TYPE_MESSAGE: - if (fieldDesc->is_repeated()) { - for (int j = 0; j < reflect->FieldSize(msg, fieldDesc); j++) { - data.compound[key].array.push_back(Data()); - protobufToData(data.compound[key].array.back(), reflect->GetRepeatedMessage(msg, fieldDesc, j)); - } - } else { - protobufToData(data.compound[key], reflect->GetMessage(msg, fieldDesc)); - } - break; - } - } - return true; -} - -bool UmundoInvoker::dataToJSONbuf(JSONProto* msg, Data& data) { - const google::protobuf::Descriptor* desc = msg->GetDescriptor(); - const google::protobuf::Reflection* reflect = msg->GetReflection(); - - if (!data.compound.empty()) { - const google::protobuf::FieldDescriptor* fieldDesc = desc->FindFieldByName("compound"); - - std::map::iterator compoundIter = data.compound.begin(); - while(compoundIter != data.compound.end()) { - JSONProto* compoundMsg = (JSONProto*)reflect->AddMessage(msg, fieldDesc); - dataToJSONbuf(compoundMsg, compoundIter->second); - compoundMsg->set_key(compoundIter->first); - compoundIter++; - } - } else if (!data.array.empty()) { - const google::protobuf::FieldDescriptor* fieldDesc = desc->FindFieldByName("compound"); - - std::list::iterator arrayIter = data.array.begin(); - while(arrayIter != data.array.end()) { - JSONProto* arrayMsg = (JSONProto*)reflect->AddMessage(msg, fieldDesc); - dataToJSONbuf(arrayMsg, *arrayIter); - arrayIter++; - } - } else if (!data.atom.empty()) { - const google::protobuf::FieldDescriptor* atomDesc = desc->FindFieldByName("atom"); - const google::protobuf::FieldDescriptor* verbDesc = desc->FindFieldByName("verbatim"); - - if (data.type == Data::VERBATIM) { - reflect->SetBool(msg, verbDesc, true); - } else { - reflect->SetBool(msg, verbDesc, false); - } - reflect->SetString(msg, atomDesc, data.atom); - } - return true; -} - -bool UmundoInvoker::dataToProtobuf(google::protobuf::Message* msg, Data& data) { - const google::protobuf::Descriptor* desc = msg->GetDescriptor(); - const google::protobuf::Reflection* reflect = msg->GetReflection(); - - for (int i = 0; i < desc->field_count(); i++) { - const google::protobuf::FieldDescriptor* fieldDesc = desc->field(i); - std::string key = fieldDesc->name(); - - if (data.compound.find(key) == data.compound.end()) { - if (fieldDesc->is_required()) { - LOG(ERROR) << "required field " << key << " not given"; - return false; - } - continue; - } - - std::list::iterator arrayIter = data.compound[key].array.begin(); - - switch(fieldDesc->type()) { - case google::protobuf::FieldDescriptor::TYPE_BOOL: - if (fieldDesc->is_repeated()) { - while(arrayIter != data.compound[key].array.end()) { - reflect->AddBool(msg, fieldDesc, arrayIter->atom.compare("false") == 0 ? false : true); - arrayIter++; - } - } else { - reflect->SetBool(msg, fieldDesc, (data.compound[key].atom.compare("false") == 0 ? false : true)); - } - break; - case google::protobuf::FieldDescriptor::TYPE_BYTES: - case google::protobuf::FieldDescriptor::TYPE_STRING: - if (fieldDesc->is_repeated()) { - while(arrayIter != data.compound[key].array.end()) { - reflect->AddString(msg, fieldDesc, arrayIter->atom); - arrayIter++; - } - } else { - reflect->SetString(msg, fieldDesc, data.compound[key].atom); - } - break; - case google::protobuf::FieldDescriptor::TYPE_DOUBLE: - if (fieldDesc->is_repeated()) { - while(arrayIter != data.compound[key].array.end()) { - reflect->AddDouble(msg, fieldDesc, strTo(arrayIter->atom)); - arrayIter++; - } - } else { - reflect->SetDouble(msg, fieldDesc, strTo(data.compound[key].atom)); - } - break; - case google::protobuf::FieldDescriptor::TYPE_ENUM: - LOG(ERROR) << "TYPE_ENUM is unimplemented" << std::endl; - break; - case google::protobuf::FieldDescriptor::TYPE_FIXED32: - case google::protobuf::FieldDescriptor::TYPE_UINT32: - if (fieldDesc->is_repeated()) { - while(arrayIter != data.compound[key].array.end()) { - reflect->AddUInt32(msg, fieldDesc, strTo(arrayIter->atom)); - arrayIter++; - } - } else { - reflect->SetUInt32(msg, fieldDesc, strTo(data.compound[key].atom)); - } - break; - case google::protobuf::FieldDescriptor::TYPE_FIXED64: - case google::protobuf::FieldDescriptor::TYPE_UINT64: - if (fieldDesc->is_repeated()) { - while(arrayIter != data.compound[key].array.end()) { - reflect->AddUInt64(msg, fieldDesc, strTo(arrayIter->atom)); - arrayIter++; - } - } else { - reflect->SetUInt64(msg, fieldDesc, strTo(data.compound[key].atom)); - } - break; - case google::protobuf::FieldDescriptor::TYPE_FLOAT: - if (fieldDesc->is_repeated()) { - while(arrayIter != data.compound[key].array.end()) { - reflect->AddFloat(msg, fieldDesc, strTo(arrayIter->atom)); - arrayIter++; - } - } else { - reflect->SetFloat(msg, fieldDesc, strTo(data.compound[key].atom)); - } - break; - case google::protobuf::FieldDescriptor::TYPE_GROUP: - LOG(ERROR) << "TYPE_GROUP is unimplemented" << std::endl; - break; - case google::protobuf::FieldDescriptor::TYPE_INT32: - case google::protobuf::FieldDescriptor::TYPE_SINT32: - case google::protobuf::FieldDescriptor::TYPE_SFIXED32: - if (fieldDesc->is_repeated()) { - while(arrayIter != data.compound[key].array.end()) { - reflect->AddInt32(msg, fieldDesc, strTo(arrayIter->atom)); - arrayIter++; - } - } else { - reflect->SetInt32(msg, fieldDesc, strTo(data.compound[key].atom)); - } - break; - case google::protobuf::FieldDescriptor::TYPE_INT64: - case google::protobuf::FieldDescriptor::TYPE_SINT64: - case google::protobuf::FieldDescriptor::TYPE_SFIXED64: - if (fieldDesc->is_repeated()) { - while(arrayIter != data.compound[key].array.end()) { - reflect->AddInt64(msg, fieldDesc, strTo(arrayIter->atom)); - arrayIter++; - } - } else { - reflect->SetInt64(msg, fieldDesc, strTo(data.compound[key].atom)); - } - break; - case google::protobuf::FieldDescriptor::TYPE_MESSAGE: - if (fieldDesc->is_repeated()) { - while(arrayIter != data.compound[key].array.end()) { - dataToProtobuf(reflect->AddMessage(msg, fieldDesc), *arrayIter); - arrayIter++; - } - } else { - dataToProtobuf(reflect->MutableMessage(msg, fieldDesc), data.compound[key]); - } - break; - } - } - return true; -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h deleted file mode 100644 index 4c0e988..0000000 --- a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h +++ /dev/null @@ -1,94 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef UMUNDOINVOKER_H_77YXQGU7 -#define UMUNDOINVOKER_H_77YXQGU7 - -#include -#include -#include -#include -#include -#include - -#include "JSON.pb.h" - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class Interpreter; - -class UmundoInvoker : public InvokerImpl, public umundo::TypedReceiver, public umundo::ResultSet, public umundo::TypedGreeter { -public: - UmundoInvoker(); - virtual ~UmundoInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("umundo"); - names.push_back("http://umundo.tk.informatik.tu-darmstadt.de/"); - names.push_back("http://umundo.tk.informatik.tu-darmstadt.de"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - - virtual void receive(void* object, umundo::Message* msg); - - virtual void added(umundo::ServiceDescription); - virtual void removed(umundo::ServiceDescription); - virtual void changed(umundo::ServiceDescription, uint64_t what); - - virtual void welcome(umundo::TypedPublisher atPub, const umundo::SubscriberStub& sub); - virtual void farewell(umundo::TypedPublisher fromPub, const umundo::SubscriberStub& sub); - -protected: - bool _isService; - - bool dataToJSONbuf(JSONProto* msg, Data& data); - bool dataToProtobuf(google::protobuf::Message* msg, Data& data); - - bool jsonbufToData(Data& data, const JSONProto& json); - bool protobufToData(Data& data, const google::protobuf::Message& msg); - - umundo::Node* _node; - umundo::Discovery* _discovery; - umundo::TypedPublisher* _pub; - umundo::TypedSubscriber* _sub; - - umundo::ServiceFilter* _svcFilter; - umundo::ServiceManager* _svcMgr; - std::map _svcs; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(UmundoInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: UMUNDOINVOKER_H_77YXQGU7 */ diff --git a/src/uscxml/plugins/invoker/vxml/VoiceXMLInvoker.cpp b/src/uscxml/plugins/invoker/vxml/VoiceXMLInvoker.cpp deleted file mode 100644 index 4c56a14..0000000 --- a/src/uscxml/plugins/invoker/vxml/VoiceXMLInvoker.cpp +++ /dev/null @@ -1,269 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "VoiceXMLInvoker.h" -#include -#include "uscxml/UUID.h" - -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -#define ISSUE_REQUEST(name, block) {\ - Arabica::DOM::Document name##XML = name.toXML(true);\ - name##XML.getDocumentElement().setPrefix("mmi");\ - std::stringstream name##XMLSS;\ - name##XMLSS << name##XML;\ - URL name##URL(name.target);\ - std::cout << "SEND: " << name##XMLSS.str() << std::endl; \ - name##URL.setOutContent(name##XMLSS.str());\ - name##URL.addOutHeader("Content-type", "application/xml");\ - name##URL.download(block);\ -} - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new VoiceXMLInvokerProvider() ); - return true; -} -#endif - -VoiceXMLInvoker::VoiceXMLInvoker() { - _thread = NULL; -} - -VoiceXMLInvoker::~VoiceXMLInvoker() { -}; - -boost::shared_ptr VoiceXMLInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new VoiceXMLInvoker()); - invoker->_interpreter = interpreter; - return invoker; -} - -bool VoiceXMLInvoker::httpRecvRequest(const HTTPServer::Request& request) { - tthread::lock_guard lock(_mutex); - - if (!request.data.hasKey("content") || !request.data.at("content").node) { - HTTPServer::Reply reply(request); - reply.status = 500; - HTTPServer::reply(reply); - } - - const Arabica::DOM::Node& node = request.data.at("content").node; -// std::cout << "RCVD: " << node << std::endl; - - switch(MMIEvent::getType(node)) { - case MMIEvent::NEWCONTEXTRESPONSE: { - NewContextResponse resp = NewContextResponse::fromXML(node); - if (_context.size() == 0) { - _compState = MMI_IDLE; - _context = resp.context; - - StartRequest startReq; - startReq.context = _context; - startReq.source = _url; - startReq.target = _target; - startReq.requestId = uscxml::UUID::getUUID(); - - if (_invokeReq.src.size() > 0) { - startReq.contentURL.href = _invokeReq.src; - } else if(_invokeReq.content.size()) { - startReq.content = _invokeReq.content; - } else if(_invokeReq.dom) { - std::stringstream contentSS; - startReq.contentDOM = _invokeReq.dom; - } - ISSUE_REQUEST(startReq, false); - - } else { - // already got a context! - } - break; - } - case MMIEvent::STARTRESPONSE: { - StartResponse resp = StartResponse::fromXML(node); - _compState = MMI_RUNNING; - break; - } - - case MMIEvent::DONENOTIFICATION: { - DoneNotification resp = DoneNotification::fromXML(node); - _compState = MMI_IDLE; - break; - } - - case MMIEvent::STATUSRESPONSE: { - StatusResponse resp = StatusResponse::fromXML(node); - switch (resp.status) { - case StatusResponse::DEAD: - _compState = MMI_DEAD; - case StatusResponse::FAILURE: { - Event ev = resp; - returnEvent(ev); - break; - } - default: - break; - } - break; - } - - case MMIEvent::EXTENSIONNOTIFICATION: { - Event resp = ExtensionNotification::fromXML(node); - returnEvent(resp); - } - - default: - break; - } - - - HTTPServer::Reply reply(request); - HTTPServer::reply(reply); - return true; -} - -void VoiceXMLInvoker::setURL(const std::string& url) { - _url = url; -// boost::replace_first(_url, "epikur-2.local", "178.4.230.252"); -} - -Data VoiceXMLInvoker::getDataModelVariables() { - Data data; - return data; -} - -void VoiceXMLInvoker::send(const SendRequest& req) { - _workQueue.push(req); -} - -void VoiceXMLInvoker::invoke(const InvokeRequest& req) { - tthread::lock_guard lock(_mutex); - - HTTPServer::getInstance()->registerServlet(req.invokeid, this); - - Event::getParam(req.params, "target", _target); - if (_target.size() == 0) { - LOG(ERROR) << "No target parameter given!"; - return; - } - - _invokeReq = req; - - NewContextRequest newCtxReq; - newCtxReq.source = _url; - newCtxReq.target = _target; - newCtxReq.requestId = uscxml::UUID::getUUID(); - ISSUE_REQUEST(newCtxReq, false); - - _isRunning = true; - _thread = new tthread::thread(VoiceXMLInvoker::run, this); - -} - -void VoiceXMLInvoker::uninvoke() { - - ClearContextRequest clrCtxReq; - clrCtxReq.source = _url; - clrCtxReq.target = _target; - clrCtxReq.requestId = uscxml::UUID::getUUID(); - ISSUE_REQUEST(clrCtxReq, false); - - if (_isRunning) - _isRunning = false; - - // unblock queue - SendRequest req; - _workQueue.push(req); - - if (_thread) { - _thread->join(); - delete _thread; - } - - HTTPServer::getInstance()->unregisterServlet(this); - _context = ""; - -} - -void VoiceXMLInvoker::run(void* instance) { - VoiceXMLInvoker* INSTANCE = (VoiceXMLInvoker*)instance; - while(true) { - SendRequest req = INSTANCE->_workQueue.pop(); - if (INSTANCE->_isRunning) { - INSTANCE->process(req); - } else { - return; - } - } -} - -void VoiceXMLInvoker::process(SendRequest& req) { - tthread::lock_guard lock(_mutex); - while(_context.size() == 0 && _isRunning) - _cond.wait_for(_mutex, 200); - - if (_context.size() == 0) { - // we never acquired a context - return; - } - - if (_compState != MMI_RUNNING) - // remote component is not running - return; - - // dispatch over send request - // Is there something special to do here? - - // if we did nothing else, send as ExtensionNotification - ExtensionNotification extNotif; - extNotif.context = _context; - extNotif.source = _url; - extNotif.target = _target; - extNotif.requestId = uscxml::UUID::getUUID(); - extNotif.name = req.name; - - if (!req.namelist.empty()) { - for (Event::namelist_t::iterator iter = req.namelist.begin(); iter != req.namelist.end(); iter++) { - req.data.compound[iter->first] = iter->second; - } - } else if (!req.params.empty()) { - for(Event::params_t::iterator it = req.params.begin(), end = req.params.end(); it != end; it = req.params.upper_bound(it->first)) { - Event::getParam(req.params, it->first, req.data.compound[it->first]); - } - } - - if (req.dom) { - extNotif.dataDOM = req.dom; - } else if (req.content.size() > 0) { - extNotif.data = req.content; - } else if (!req.data.empty()) { - extNotif.data = Data::toJSON(req.data); - } - - ISSUE_REQUEST(extNotif, false); -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/vxml/VoiceXMLInvoker.h b/src/uscxml/plugins/invoker/vxml/VoiceXMLInvoker.h deleted file mode 100644 index d6078cd..0000000 --- a/src/uscxml/plugins/invoker/vxml/VoiceXMLInvoker.h +++ /dev/null @@ -1,94 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef VOICEXMLINVOKER_H_W09J90F0 -#define VOICEXMLINVOKER_H_W09J90F0 - -#include -#include -#include "uscxml/server/HTTPServer.h" - -// #include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class VoiceXMLInvoker : public InvokerImpl, public HTTPServlet { -public: - enum ComponentState { - MMI_IDLE, - MMI_PAUSED, - MMI_RUNNING, - MMI_DEAD - }; - - VoiceXMLInvoker(); - virtual ~VoiceXMLInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("vxml"); - names.push_back("voicexml"); - names.push_back("http://www.w3.org/TR/voicexml21/"); - return names; - } - - bool deleteOnUninvoke() { - return false; - } - - bool httpRecvRequest(const HTTPServer::Request& request); - void setURL(const std::string& url); - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void invoke(const InvokeRequest& req); - virtual void uninvoke(); - - static void run(void*); - void process(SendRequest& ctx); - -protected: - std::string _url; - std::string _context; - std::string _target; - - InvokeRequest _invokeReq; - - ComponentState _compState; - - tthread::thread* _thread; - tthread::condition_variable _cond; - tthread::mutex _mutex; - concurrency::BlockingQueue _workQueue; - bool _isRunning; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(VoiceXMLInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: VOICEXMLINVOKER_H_W09J90F0 */ diff --git a/src/uscxml/plugins/invoker/webrtc/WebRTCInvoker.cpp b/src/uscxml/plugins/invoker/webrtc/WebRTCInvoker.cpp deleted file mode 100644 index 2d871c8..0000000 --- a/src/uscxml/plugins/invoker/webrtc/WebRTCInvoker.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @file - * @author 2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "WebRTCInvoker.h" -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -//#include "talk/app/webrtc/peerconnection.h" - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new WebRTCInvokerProvider() ); - return true; -} -#endif - -WebRTCInvoker::WebRTCInvoker() { -} - -WebRTCInvoker::~WebRTCInvoker() { -}; - -boost::shared_ptr WebRTCInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new WebRTCInvoker()); - return invoker; -} - -Data WebRTCInvoker::getDataModelVariables() { - Data data; - return data; -} - -void WebRTCInvoker::send(const SendRequest& req) { -} - -void WebRTCInvoker::cancel(const std::string sendId) { -} - -void WebRTCInvoker::invoke(const InvokeRequest& req) { -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/webrtc/WebRTCInvoker.h b/src/uscxml/plugins/invoker/webrtc/WebRTCInvoker.h deleted file mode 100644 index e4d7775..0000000 --- a/src/uscxml/plugins/invoker/webrtc/WebRTCInvoker.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file - * @author 2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef WEBRTCINVOKER_H_1E704623 -#define WEBRTCINVOKER_H_1E704623 - -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class WebRTCInvoker : public InvokerImpl { -public: - WebRTCInvoker(); - virtual ~WebRTCInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("webrtc"); - names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#webrtc"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - -protected: -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(WebRTCInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: WEBRTCINVOKER_H_1E704623 */ diff --git a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp b/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp deleted file mode 100644 index 9c85f37..0000000 --- a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp +++ /dev/null @@ -1,290 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include - -#include -#include "XHTMLInvoker.h" -#include -#include "uscxml/dom/DOMUtils.h" -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -#if __APPLE__ -# if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR -# else -# include -# include -# endif -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new XHTMLInvokerProvider() ); - return true; -} -#endif - -XHTMLInvoker::XHTMLInvoker() { -} - -XHTMLInvoker::~XHTMLInvoker() { - HTTPServer::unregisterServlet(this); -}; - -boost::shared_ptr XHTMLInvoker::create(InterpreterImpl* interpreter) { - boost::shared_ptr invoker = boost::shared_ptr(new XHTMLInvoker()); - invoker->_interpreter = interpreter; - return invoker; -} - -bool XHTMLInvoker::httpRecvRequest(const HTTPServer::Request& req) { - tthread::lock_guard lock(_mutex); - - // these are the XHR requests - if (iequals(req.data.at("header").at("X-Requested-With").atom, "XMLHttpRequest")) { - if (iequals(req.data.at("type").atom, "get")) { - // this is the incoming the long-polling GET - if (_longPoll) { - // cancel old longPoller - evhttp_send_error(_longPoll.evhttpReq, 204, NULL); - _longPoll.evhttpReq = NULL; - } - - _longPoll = req; - if (!_outQueue.empty()) { - // do we have some send requests pending? - HTTPServer::Reply reply =_outQueue.front(); - reply.setRequest(_longPoll); - HTTPServer::reply(reply); - _outQueue.pop_front(); - _longPoll.evhttpReq = NULL; - } - return true; - - } else { - // an incomping event per POST request - Event ev(req); - if (ev.data["header"].hasKey("X-SCXML-Name")) { - ev.name = ev.data["header"]["X-SCXML-Name"].atom; - } else { - ev.name = req.data.at("type").atom; - } - - // initialize data - ev.data = req.data.at("content"); - ev.eventType = Event::EXTERNAL; - - HTTPServer::Reply reply(req); - HTTPServer::reply(reply); - - returnEvent(ev); - return true; - } - } - - // initial request for a document - if (!req.data.hasKey("query") && // no query parameters - iequals(req.data.at("type").atom, "get") && // request type is GET - req.content.length() == 0) { // no content - - // send template to establish long polling - HTTPServer::Reply reply(req); - - // _invokeReq.content will contain the actual content as we needed to replace expressions in the interpreter thread - - if (!_invokeReq.data.empty()) { - // just reply with given data as json, this time and for ever - reply.content = _invokeReq.content; - reply.headers["Content-type"] = "application/json"; - HTTPServer::reply(reply); - return true; - - } else if (_invokeReq.dom) { - // there is some XML given with the content - if (HAS_ATTR_CAST(_invokeReq.dom, "type")) { - // it's special XML to send per Comet later on, default to sending template and enqueue - _longPoll.evhttpReq = NULL; - _outQueue = std::deque(); - - HTTPServer::Reply reply; - reply.content = _invokeReq.content; - reply.headers["Content-type"] = "application/xml"; - _outQueue.push_back(reply); - - // no return here - we wan to send the template below - - } else { - // it's plain XML now and forever - reply.content = _invokeReq.content; - reply.headers["Content-type"] = "application/xml"; - HTTPServer::reply(reply); - return true; - } - } else if (_invokeReq.content.size() > 0) { - - // just reply as text this time and for ever - reply.content = _invokeReq.content; - reply.headers["Content-type"] = "text/plain"; - HTTPServer::reply(reply); - return true; - } - - /* - * Return our template to establish a two way communication via comet - * If we want to replace expressions in the temaplte, we have to do it in invoke() - * for thread safety of the datamodel. - */ - - // this file is generated from template/xhtml-invoker.xhtml via xxd -#include "template/xhtml-invoker.inc.h" - - // aggressive caching in IE will return all XHR get requests instantenously otherwise - reply.headers["Cache-Control"] = "no-cache"; - reply.headers["Content-Type"] = "text/html; charset=utf-8"; - - reply.content = std::string((const char*)template_xhtml_invoker_html, template_xhtml_invoker_html_len); - HTTPServer::reply(reply); - return true; - } - - // don't know what to do with other requests - return false; -} - -Data XHTMLInvoker::getDataModelVariables() { - Data data; - return data; -} - -void XHTMLInvoker::send(const SendRequest& req) { - tthread::lock_guard lock(_mutex); - - HTTPServer::Reply reply; - - if (req.dom) { - // XML - std::stringstream ss; - if (req.dom.getNodeType() == Arabica::DOM::Node_base::ELEMENT_NODE) { - Arabica::DOM::Element contentElem = Arabica::DOM::Element(req.dom); - - if (HAS_ATTR(contentElem, "type")) - reply.headers["X-SCXML-Type"] = ATTR(contentElem, "type"); - if (HAS_ATTR(contentElem, "xpath")) - reply.headers["X-SCXML-XPath"] = ATTR(contentElem, "xpath"); - if (HAS_ATTR(contentElem, "attr")) - reply.headers["X-SCXML-Attr"] = ATTR(contentElem, "attr"); - } - - ss << req.dom; - reply.content = ss.str(); - reply.headers["Content-Type"] = "application/xml"; - - } else if (!req.data.empty()) { - // JSON - reply.content = Data::toJSON(req.data); - reply.headers["Content-Type"] = "application/json"; - } else if (req.content.length() > 0) { - reply.content = req.content; - reply.headers["Content-Type"] = "text/plain"; - } - - // TODO: Params to set variables? - - _interpreter->getDataModel().replaceExpressions(reply.content); - - if (!_longPoll) { - _outQueue.push_back(reply); - return; - } - reply.setRequest(_longPoll); - HTTPServer::reply(reply); - _longPoll.evhttpReq = NULL; -} - -void XHTMLInvoker::cancel(const std::string sendId) { - HTTPServer::unregisterServlet(this); -} - -void XHTMLInvoker::invoke(const InvokeRequest& req) { - _invokeReq = req; - - // make sure _invokeReq.content contains correct and substituted string - if (!_invokeReq.data.empty()) { - _invokeReq.content = Data::toJSON(_invokeReq.data); - } else if (_invokeReq.dom) { - std::stringstream ss; - ss << _invokeReq.dom; - _invokeReq.content = ss.str(); - } - _interpreter->getDataModel().replaceExpressions(_invokeReq.content); - - std::string browserURL; - if (req.src.size() > 0) { - // no src given, send browser off to some remote url - browserURL = req.src; - } else { - // invoke to talk to us - HTTPServer::registerServlet(_interpreter->getName() + "/" + req.invokeid + ".html", this); - if (_url.size() == 0) { - returnErrorExecution("No HTTP server running"); - } - browserURL = _url.c_str(); - } -#if __APPLE__ -# if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR -# else - // see http://stackoverflow.com/questions/4177744/c-osx-open-default-browser - CFURLRef url = CFURLCreateWithBytes ( - NULL, // allocator - (UInt8*)browserURL.c_str(), // URLBytes - browserURL.length(), // length - kCFStringEncodingASCII, // encoding - NULL // baseURL - ); - if (LSOpenCFURLRef(url,0) == errSecSuccess) { - if (url) - CFRelease(url); - return; - } -# endif -#endif -#ifdef _WIN32 -// see http://support.microsoft.com/kb/224816 - ShellExecute(NULL, "open", browserURL.c_str(), NULL, NULL, SW_SHOWNORMAL); - return; -#endif -#ifdef HAS_XDG_OPEN - std::string systemCmd; - systemCmd = "xdg-open "; - systemCmd += browserURL; - if (system(systemCmd.c_str()) >= 0) - return; -#endif - LOG(ERROR) << "Could not open a HTML browser, access '" << browserURL << "' yourself."; -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h b/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h deleted file mode 100644 index 386af3d..0000000 --- a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef XHTMLINVOKER_H_W09J90F0 -#define XHTMLINVOKER_H_W09J90F0 - -#include -#include "uscxml/server/HTTPServer.h" - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class XHTMLInvoker : public InvokerImpl, public HTTPServlet { -public: - XHTMLInvoker(); - virtual ~XHTMLInvoker(); - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("xhtml"); - names.push_back("http://www.w3.org/1999/xhtml"); - return names; - } - - virtual Data getDataModelVariables(); - virtual void send(const SendRequest& req); - virtual void cancel(const std::string sendId); - virtual void invoke(const InvokeRequest& req); - - // HTTPServlet - virtual bool httpRecvRequest(const HTTPServer::Request& request); - virtual void setURL(const std::string& url) { - _url = url; - } - - void reply(const SendRequest& req, const HTTPServer::Request& longPoll); - -protected: - HTTPServer::Request _longPoll; - std::deque _outQueue; - - tthread::recursive_mutex _mutex; - InvokeRequest _invokeReq; - - std::string _url; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(XHTMLInvoker, InvokerImpl); -#endif - -} - - -#endif /* end of include guard: XHTMLINVOKER_H_W09J90F0 */ diff --git a/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.html b/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.html deleted file mode 100644 index 6d31b11..0000000 --- a/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.inc.h b/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.inc.h deleted file mode 100644 index 971260b..0000000 --- a/src/uscxml/plugins/invoker/xhtml/template/xhtml-invoker.inc.h +++ /dev/null @@ -1,691 +0,0 @@ -unsigned char template_xhtml_invoker_html[] = { - 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3d, - 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, - 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x31, 0x39, 0x39, 0x39, 0x2f, - 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x0a, 0x09, 0x3c, 0x68, 0x65, - 0x61, 0x64, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, - 0x68, 0x74, 0x74, 0x70, 0x2d, 0x65, 0x71, 0x75, 0x69, 0x76, 0x3d, 0x22, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79, 0x70, 0x65, - 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x74, - 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3b, 0x63, 0x68, 0x61, - 0x72, 0x73, 0x65, 0x74, 0x3d, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x22, 0x20, - 0x2f, 0x3e, 0x0a, 0x0a, 0x09, 0x09, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x47, - 0x65, 0x74, 0x20, 0x64, 0x6f, 0x6d, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, - 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x63, 0x72, 0x6f, 0x73, - 0x73, 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x73, 0x20, 0x2d, - 0x2d, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, - 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x3e, - 0x0a, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x65, 0x20, 0x68, - 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x6f, - 0x76, 0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x31, 0x32, - 0x30, 0x36, 0x39, 0x33, 0x37, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x2d, 0x64, 0x6f, 0x6d, 0x72, 0x65, 0x61, 0x64, - 0x79, 0x0a, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x64, 0x6f, 0x6d, - 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2a, - 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x20, 0x45, 0x78, - 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x20, 0x2a, 0x2f, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x2f, 0x2a, 0x40, 0x63, 0x63, 0x5f, 0x6f, 0x6e, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x40, 0x69, 0x66, 0x20, 0x28, 0x40, 0x5f, 0x77, 0x69, - 0x6e, 0x33, 0x32, 0x20, 0x7c, 0x7c, 0x20, 0x40, 0x5f, 0x77, 0x69, 0x6e, - 0x36, 0x34, 0x29, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x28, 0x27, 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x69, 0x65, 0x53, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x22, 0x20, 0x64, 0x65, 0x66, 0x65, - 0x72, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x2f, 0x2f, 0x3a, 0x22, 0x3e, - 0x3c, 0x5c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x27, 0x29, - 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x27, 0x69, 0x65, 0x53, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x27, 0x29, 0x2e, 0x6f, - 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, - 0x72, 0x65, 0x61, 0x64, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, - 0x3d, 0x20, 0x27, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x27, - 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, - 0x61, 0x72, 0x20, 0x68, 0x65, 0x61, 0x64, 0x3d, 0x20, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x54, 0x61, 0x67, 0x4e, 0x61, - 0x6d, 0x65, 0x28, 0x27, 0x68, 0x65, 0x61, 0x64, 0x27, 0x29, 0x5b, 0x30, - 0x5d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, - 0x72, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3d, 0x20, 0x64, 0x6f, - 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x27, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x27, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x3d, 0x20, 0x27, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, - 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x27, 0x3b, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x2e, 0x73, 0x72, 0x63, 0x3d, 0x20, 0x27, 0x68, 0x74, 0x74, 0x70, 0x3a, - 0x2f, 0x2f, 0x77, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x6f, - 0x64, 0x2d, 0x78, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, - 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x77, 0x67, 0x78, 0x70, 0x61, 0x74, 0x68, - 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x2e, 0x6a, 0x73, 0x27, - 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x68, 0x65, 0x61, - 0x64, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x28, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x29, 0x3b, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x77, 0x67, 0x78, 0x70, 0x61, 0x74, - 0x68, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x28, 0x29, 0x3b, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x65, 0x20, 0x68, - 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x6f, - 0x76, 0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x31, 0x38, - 0x31, 0x31, 0x31, 0x31, 0x36, 0x2f, 0x69, 0x65, 0x2d, 0x73, 0x75, 0x70, - 0x70, 0x6f, 0x72, 0x74, 0x2d, 0x66, 0x6f, 0x72, 0x2d, 0x64, 0x6f, 0x6d, - 0x2d, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, - 0x64, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x61, 0x6c, 0x6c, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x29, 0x20, 0x7b, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x73, 0x77, 0x69, 0x74, - 0x63, 0x68, 0x20, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x63, 0x61, 0x73, 0x65, - 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x4c, - 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x3a, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x65, 0x77, 0x4e, 0x6f, 0x64, 0x65, - 0x20, 0x3d, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x4e, 0x53, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x55, 0x52, 0x49, 0x2c, 0x20, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x26, - 0x26, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x20, 0x3e, 0x20, 0x30, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, - 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x2c, 0x20, - 0x69, 0x6c, 0x20, 0x3d, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x20, 0x69, 0x6c, 0x3b, - 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6e, - 0x65, 0x77, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5b, - 0x69, 0x5d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x2c, - 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x67, 0x65, 0x74, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5b, 0x69, - 0x5d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x29, 0x29, - 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x69, 0x66, 0x28, 0x61, 0x6c, 0x6c, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x20, 0x26, 0x26, 0x20, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, - 0x20, 0x26, 0x26, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x20, 0x3e, 0x20, 0x30, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, - 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, - 0x2c, 0x20, 0x69, 0x6c, 0x20, 0x3d, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2e, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x20, 0x69, - 0x6c, 0x3b, 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6e, 0x65, 0x77, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x70, - 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x5b, 0x69, 0x5d, 0x2c, - 0x20, 0x61, 0x6c, 0x6c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, - 0x29, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, - 0x6e, 0x65, 0x77, 0x4e, 0x6f, 0x64, 0x65, 0x3b, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x72, - 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x20, 0x20, 0x20, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x4e, - 0x4f, 0x44, 0x45, 0x3a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x20, 0x20, 0x20, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x44, 0x41, 0x54, 0x41, 0x5f, - 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x44, 0x45, - 0x3a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, - 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4e, - 0x4f, 0x44, 0x45, 0x3a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, - 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x7d, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x28, 0x29, 0x3b, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x7d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x40, 0x65, 0x6e, - 0x64, 0x20, 0x40, 0x2a, 0x2f, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2a, - 0x20, 0x4d, 0x6f, 0x7a, 0x69, 0x6c, 0x6c, 0x61, 0x2c, 0x20, 0x43, 0x68, - 0x72, 0x6f, 0x6d, 0x65, 0x2c, 0x20, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x20, - 0x2a, 0x2f, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x64, 0x64, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x28, 0x27, - 0x44, 0x4f, 0x4d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x6f, - 0x61, 0x64, 0x65, 0x64, 0x27, 0x2c, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x62, - 0x61, 0x63, 0x6b, 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x3b, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x2f, 0x2a, 0x20, 0x53, 0x61, 0x66, 0x61, 0x72, 0x69, 0x2c, 0x20, 0x69, - 0x43, 0x61, 0x62, 0x2c, 0x20, 0x4b, 0x6f, 0x6e, 0x71, 0x75, 0x65, 0x72, - 0x6f, 0x72, 0x20, 0x2a, 0x2f, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, - 0x20, 0x28, 0x2f, 0x4b, 0x48, 0x54, 0x4d, 0x4c, 0x7c, 0x57, 0x65, 0x62, - 0x4b, 0x69, 0x74, 0x7c, 0x69, 0x43, 0x61, 0x62, 0x2f, 0x69, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x28, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x29, - 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, - 0x20, 0x44, 0x4f, 0x4d, 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x72, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x69, 0x66, 0x20, 0x28, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x7c, - 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x2f, 0x69, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x28, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x29, - 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x28, 0x29, 0x3b, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x28, 0x44, 0x4f, 0x4d, 0x4c, - 0x6f, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x29, 0x3b, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x7d, 0x2c, 0x20, 0x31, 0x30, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2a, 0x20, 0x4f, 0x74, - 0x68, 0x65, 0x72, 0x20, 0x77, 0x65, 0x62, 0x20, 0x62, 0x72, 0x6f, 0x77, - 0x73, 0x65, 0x72, 0x73, 0x20, 0x2a, 0x2f, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x6f, 0x6e, 0x6c, 0x6f, 0x61, - 0x64, 0x20, 0x3d, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, - 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x7d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x3c, - 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x0a, 0x09, 0x09, - 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, - 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x0a, - 0x09, 0x09, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x28, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x29, 0x20, 0x7b, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2a, 0x2a, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x20, 0x2a, 0x20, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x66, - 0x6f, 0x72, 0x20, 0x74, 0x77, 0x6f, 0x2d, 0x63, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x20, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, - 0x6f, 0x75, 0x73, 0x20, 0x68, 0x74, 0x74, 0x70, 0x20, 0x63, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x20, 0x2a, 0x2f, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x66, - 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x6b, 0x65, 0x79, 0x20, - 0x69, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x29, 0x20, - 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x61, 0x73, 0x4f, - 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x28, 0x6b, - 0x65, 0x79, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, - 0x20, 0x20, 0x20, 0x74, 0x68, 0x69, 0x73, 0x5b, 0x6b, 0x65, 0x79, 0x5d, - 0x20, 0x3d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5b, 0x6b, - 0x65, 0x79, 0x5d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x7d, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x76, - 0x61, 0x72, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x20, 0x3d, 0x20, 0x74, 0x68, - 0x69, 0x73, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x78, 0x68, 0x72, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x28, 0x77, 0x69, 0x6e, 0x64, 0x6f, - 0x77, 0x2e, 0x58, 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x58, - 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x28, 0x29, 0x20, 0x3a, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x58, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x28, - 0x22, 0x4d, 0x53, 0x58, 0x4d, 0x4c, 0x32, 0x2e, 0x58, 0x4d, 0x4c, 0x48, - 0x54, 0x54, 0x50, 0x2e, 0x33, 0x2e, 0x30, 0x22, 0x29, 0x29, 0x3b, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, - 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x28, 0x77, 0x69, - 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x58, 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x6e, 0x65, - 0x77, 0x20, 0x58, 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x28, 0x29, 0x20, 0x3a, 0x20, 0x6e, 0x65, 0x77, - 0x20, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x58, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x28, 0x22, 0x4d, 0x53, 0x58, 0x4d, 0x4c, 0x32, 0x2e, 0x58, - 0x4d, 0x4c, 0x48, 0x54, 0x54, 0x50, 0x2e, 0x33, 0x2e, 0x30, 0x22, 0x29, - 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x74, 0x68, 0x69, 0x73, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, - 0x55, 0x49, 0x44, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, - 0x77, 0x2e, 0x69, 0x65, 0x74, 0x66, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x72, - 0x66, 0x63, 0x2f, 0x72, 0x66, 0x63, 0x34, 0x31, 0x32, 0x32, 0x2e, 0x74, - 0x78, 0x74, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, - 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x5d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x76, 0x61, 0x72, 0x20, 0x68, 0x65, 0x78, 0x44, 0x69, 0x67, 0x69, - 0x74, 0x73, 0x20, 0x3d, 0x20, 0x22, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, - 0x36, 0x37, 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x22, 0x3b, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x76, - 0x61, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x20, 0x69, 0x20, - 0x3c, 0x20, 0x33, 0x36, 0x3b, 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x20, 0x7b, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x5b, 0x69, 0x5d, 0x20, - 0x3d, 0x20, 0x68, 0x65, 0x78, 0x44, 0x69, 0x67, 0x69, 0x74, 0x73, 0x2e, - 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x28, 0x4d, 0x61, 0x74, 0x68, 0x2e, - 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x28, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x72, - 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x28, 0x29, 0x20, 0x2a, 0x20, 0x30, 0x78, - 0x31, 0x30, 0x29, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x5b, 0x31, - 0x34, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x34, 0x22, 0x3b, 0x20, 0x20, 0x2f, - 0x2f, 0x20, 0x62, 0x69, 0x74, 0x73, 0x20, 0x31, 0x32, 0x2d, 0x31, 0x35, - 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, - 0x5f, 0x68, 0x69, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x6f, - 0x20, 0x30, 0x30, 0x31, 0x30, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, - 0x5b, 0x31, 0x39, 0x5d, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x78, 0x44, 0x69, - 0x67, 0x69, 0x74, 0x73, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x28, - 0x28, 0x73, 0x5b, 0x31, 0x39, 0x5d, 0x20, 0x26, 0x20, 0x30, 0x78, 0x33, - 0x29, 0x20, 0x7c, 0x20, 0x30, 0x78, 0x38, 0x2c, 0x20, 0x31, 0x29, 0x3b, - 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x69, 0x74, 0x73, 0x20, 0x36, 0x2d, - 0x37, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x71, 0x5f, 0x68, 0x69, 0x5f, 0x61, 0x6e, - 0x64, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x74, - 0x6f, 0x20, 0x30, 0x31, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x5b, - 0x38, 0x5d, 0x20, 0x3d, 0x20, 0x73, 0x5b, 0x31, 0x33, 0x5d, 0x20, 0x3d, - 0x20, 0x73, 0x5b, 0x31, 0x38, 0x5d, 0x20, 0x3d, 0x20, 0x73, 0x5b, 0x32, - 0x33, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x2d, 0x22, 0x3b, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x75, 0x75, 0x69, 0x64, 0x20, - 0x3d, 0x20, 0x73, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x28, 0x22, 0x22, 0x29, - 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x20, 0x75, 0x75, 0x69, 0x64, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x74, - 0x68, 0x69, 0x73, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x70, 0x6f, 0x6c, 0x6c, - 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, - 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, - 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x2e, - 0x6f, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x73, 0x65, 0x6c, 0x66, - 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x2e, 0x72, - 0x65, 0x61, 0x64, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, - 0x3d, 0x20, 0x34, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, - 0x6f, 0x6d, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x20, 0x21, 0x3d, 0x3d, 0x20, 0x32, 0x30, 0x30, 0x29, - 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, - 0x65, 0x6c, 0x66, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x70, 0x6f, 0x6c, 0x6c, - 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x6f, 0x6e, 0x52, 0x63, 0x76, 0x64, 0x28, - 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x50, 0x6f, - 0x6c, 0x6c, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x70, 0x6f, 0x6c, - 0x6c, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x3b, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x20, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, 0x77, 0x65, 0x20, - 0x68, 0x61, 0x76, 0x65, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, - 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x2e, 0x6f, - 0x70, 0x65, 0x6e, 0x28, 0x22, 0x47, 0x45, 0x54, 0x22, 0x2c, 0x20, 0x73, - 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x2b, - 0x20, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x20, 0x3f, 0x20, 0x22, 0x3f, 0x22, 0x20, 0x2b, 0x20, 0x73, 0x65, 0x6c, - 0x66, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x3a, 0x20, 0x22, 0x22, - 0x29, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, - 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x2e, - 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x28, 0x27, 0x58, 0x2d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x65, 0x64, 0x2d, 0x57, 0x69, 0x74, 0x68, 0x27, 0x2c, - 0x20, 0x27, 0x58, 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x27, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x6f, 0x6d, - 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x28, - 0x22, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x2c, 0x20, 0x22, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x22, 0x29, 0x3b, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x6f, - 0x6d, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x6e, 0x64, - 0x28, 0x6e, 0x75, 0x6c, 0x6c, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x7d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x74, 0x68, 0x69, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x78, 0x68, 0x72, 0x2e, 0x6f, 0x70, 0x65, - 0x6e, 0x28, 0x22, 0x50, 0x4f, 0x53, 0x54, 0x22, 0x2c, 0x20, 0x73, 0x65, - 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x2b, 0x20, - 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, - 0x3f, 0x20, 0x22, 0x3f, 0x22, 0x20, 0x2b, 0x20, 0x73, 0x65, 0x6c, 0x66, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x3a, 0x20, 0x22, 0x22, 0x29, - 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x3b, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x78, 0x68, 0x72, 0x2e, - 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x28, 0x27, 0x58, 0x2d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x65, 0x64, 0x2d, 0x57, 0x69, 0x74, 0x68, 0x27, 0x2c, - 0x20, 0x27, 0x58, 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x27, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x78, 0x68, 0x72, 0x2e, 0x73, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x28, 0x27, 0x58, 0x2d, 0x53, 0x43, 0x58, 0x4d, 0x4c, 0x2d, - 0x4e, 0x61, 0x6d, 0x65, 0x27, 0x2c, 0x20, 0x22, 0x64, 0x6f, 0x6e, 0x65, - 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x22, 0x29, 0x3b, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x78, 0x68, 0x72, - 0x2e, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x4e, 0x55, 0x4c, 0x4c, 0x29, 0x3b, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x70, 0x6f, - 0x73, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, - 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, - 0x6c, 0x66, 0x2e, 0x78, 0x68, 0x72, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x28, - 0x22, 0x50, 0x4f, 0x53, 0x54, 0x22, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x66, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x2b, 0x20, 0x28, 0x73, - 0x65, 0x6c, 0x66, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x3f, 0x20, - 0x22, 0x3f, 0x22, 0x20, 0x2b, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x20, 0x3a, 0x20, 0x22, 0x22, 0x29, 0x29, 0x3b, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x78, - 0x68, 0x72, 0x2e, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x28, 0x27, 0x58, 0x2d, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2d, 0x57, 0x69, 0x74, - 0x68, 0x27, 0x2c, 0x20, 0x27, 0x58, 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x27, 0x29, 0x3b, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x78, 0x68, 0x72, - 0x2e, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x28, 0x27, 0x58, 0x2d, 0x53, 0x43, 0x58, - 0x4d, 0x4c, 0x2d, 0x4e, 0x61, 0x6d, 0x65, 0x27, 0x2c, 0x20, 0x6e, 0x61, - 0x6d, 0x65, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, - 0x20, 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, - 0x65, 0x6c, 0x66, 0x2e, 0x78, 0x68, 0x72, 0x2e, 0x73, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x28, 0x27, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79, - 0x70, 0x65, 0x27, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x2e, - 0x78, 0x68, 0x72, 0x2e, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x64, 0x61, 0x74, - 0x61, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x73, 0x65, - 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, - 0x73, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x74, 0x68, 0x69, - 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, - 0x74, 0x68, 0x69, 0x6e, 0x67, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61, 0x3b, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x65, 0x20, - 0x61, 0x6c, 0x73, 0x6f, 0x3a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, - 0x2f, 0x2f, 0x72, 0x61, 0x77, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x6f, 0x75, 0x67, 0x6c, 0x61, 0x73, - 0x63, 0x72, 0x6f, 0x63, 0x6b, 0x66, 0x6f, 0x72, 0x64, 0x2f, 0x4a, 0x53, - 0x4f, 0x4e, 0x2d, 0x6a, 0x73, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, - 0x2f, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x6a, 0x73, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x6e, - 0x67, 0x79, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x74, 0x79, - 0x70, 0x65, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x3d, - 0x3d, 0x3d, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x29, - 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, - 0x20, 0x73, 0x65, 0x65, 0x6e, 0x20, 0x3d, 0x20, 0x5b, 0x5d, 0x3b, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x77, 0x69, 0x6c, - 0x6c, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x6f, - 0x6e, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x20, 0x61, 0x73, 0x20, 0x74, - 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x73, 0x20, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x79, 0x63, 0x6c, - 0x65, 0x73, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x4a, 0x53, - 0x4f, 0x4e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, - 0x28, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6b, 0x65, 0x79, 0x2c, 0x20, 0x76, 0x61, - 0x6c, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x69, 0x66, 0x20, 0x28, 0x69, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x28, 0x76, - 0x61, 0x6c, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x20, 0x61, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x6f, 0x66, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x64, 0x3a, 0x20, 0x76, 0x61, 0x6c, - 0x2e, 0x69, 0x64, 0x2c, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x76, - 0x61, 0x6c, 0x2e, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x2c, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x76, 0x61, 0x6c, 0x2e, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x3b, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x69, 0x66, 0x20, 0x28, 0x69, 0x73, 0x57, 0x69, 0x6e, 0x64, 0x6f, - 0x77, 0x28, 0x76, 0x61, 0x6c, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x74, 0x79, - 0x70, 0x65, 0x6f, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x20, 0x3d, 0x3d, 0x3d, - 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x29, 0x20, 0x7b, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, - 0x28, 0x73, 0x65, 0x65, 0x6e, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4f, - 0x66, 0x28, 0x76, 0x61, 0x6c, 0x29, 0x20, 0x3e, 0x3d, 0x20, 0x30, 0x29, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, 0x65, - 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x73, 0x65, 0x65, 0x6e, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28, - 0x76, 0x61, 0x6c, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x20, 0x76, 0x61, 0x6c, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x7d, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, - 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x74, 0x68, 0x69, - 0x6e, 0x67, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x70, 0x6f, 0x73, - 0x74, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, - 0x2c, 0x20, 0x22, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x22, 0x29, 0x3b, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x20, - 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, - 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x20, 0x77, 0x68, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, - 0x69, 0x6e, 0x67, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x68, 0x74, 0x6d, - 0x6c, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x76, - 0x61, 0x72, 0x20, 0x69, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, - 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x29, 0x7b, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x20, 0x28, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, - 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x20, - 0x3d, 0x3d, 0x3d, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, - 0x20, 0x3f, 0x20, 0x6f, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x6f, 0x66, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x3a, 0x20, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x20, 0x26, 0x26, - 0x20, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6f, 0x20, 0x3d, 0x3d, - 0x3d, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x20, 0x26, - 0x26, 0x20, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6f, 0x2e, 0x6e, - 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d, 0x3d, 0x20, - 0x22, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x20, 0x26, 0x26, 0x20, - 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3d, 0x3d, 0x3d, 0x22, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x22, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x29, - 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x2f, 0x2f, 0x20, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x20, 0x66, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x64, - 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x20, 0x77, 0x68, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, - 0x6e, 0x67, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x77, 0x69, 0x6e, 0x64, - 0x6f, 0x77, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x69, - 0x73, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x3d, 0x20, 0x66, 0x75, - 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6f, 0x29, 0x7b, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, - 0x28, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x74, 0x79, - 0x70, 0x65, 0x6f, 0x66, 0x20, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, - 0x3d, 0x3d, 0x3d, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, - 0x20, 0x3f, 0x20, 0x6f, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x6f, 0x66, 0x20, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x3a, - 0x20, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x20, - 0x26, 0x26, 0x20, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6f, 0x20, - 0x3d, 0x3d, 0x3d, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, - 0x20, 0x26, 0x26, 0x20, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x6f, - 0x2e, 0x6d, 0x65, 0x6e, 0x75, 0x62, 0x61, 0x72, 0x20, 0x3d, 0x3d, 0x3d, - 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x20, 0x20, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x7d, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, - 0x09, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x3e, 0x0a, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x3c, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, - 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x22, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x64, 0x6f, 0x6d, 0x4c, 0x6f, 0x61, - 0x64, 0x65, 0x64, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x28, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x73, 0x63, - 0x78, 0x6d, 0x6c, 0x20, 0x3d, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x43, 0x6f, - 0x6d, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x28, 0x7b, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x65, 0x6c, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x42, 0x79, 0x49, 0x64, 0x28, 0x22, 0x24, 0x7b, 0x73, 0x63, 0x78, 0x6d, - 0x6c, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x64, 0x7d, 0x22, - 0x29, 0x2c, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x3a, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x55, 0x52, 0x4c, 0x2c, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6f, - 0x6e, 0x52, 0x63, 0x76, 0x64, 0x20, 0x3a, 0x20, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x64, 0x61, 0x74, 0x61, 0x29, 0x20, 0x7b, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x58, 0x4d, 0x4c, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, - 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x28, - 0x22, 0x58, 0x2d, 0x53, 0x43, 0x58, 0x4d, 0x4c, 0x2d, 0x54, 0x79, 0x70, - 0x65, 0x22, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, - 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, - 0x20, 0x64, 0x6f, 0x6d, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x3d, - 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x28, - 0x22, 0x58, 0x2d, 0x53, 0x43, 0x58, 0x4d, 0x4c, 0x2d, 0x58, 0x50, 0x61, - 0x74, 0x68, 0x22, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x22, 0x2f, 0x68, 0x74, - 0x6d, 0x6c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x3b, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x64, 0x6f, 0x6d, - 0x41, 0x74, 0x74, 0x72, 0x20, 0x3d, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x28, 0x22, 0x58, 0x2d, 0x53, 0x43, 0x58, - 0x4d, 0x4c, 0x2d, 0x41, 0x74, 0x74, 0x72, 0x22, 0x29, 0x3b, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, - 0x28, 0x64, 0x6f, 0x6d, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2c, 0x20, - 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x6e, 0x75, - 0x6c, 0x6c, 0x2c, 0x20, 0x58, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x2e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x5f, - 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x2c, 0x20, 0x6e, 0x75, 0x6c, 0x6c, - 0x29, 0x3b, 0x0a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x66, - 0x6f, 0x72, 0x20, 0x28, 0x76, 0x61, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, - 0x30, 0x2c, 0x20, 0x6c, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x20, 0x6c, 0x3b, - 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x69, 0x74, 0x65, 0x6d, - 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x73, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x28, 0x69, - 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, - 0x61, 0x72, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x64, 0x6f, - 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6d, 0x70, 0x6f, 0x72, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x28, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x58, 0x4d, 0x4c, 0x2e, 0x66, - 0x69, 0x72, 0x73, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2c, 0x20, 0x74, - 0x72, 0x75, 0x65, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x20, 0x28, 0x74, 0x79, - 0x70, 0x65, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x63, 0x61, 0x73, 0x65, 0x20, 0x22, 0x66, 0x69, 0x72, - 0x73, 0x74, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x22, 0x3a, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x74, 0x65, 0x6d, - 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, - 0x65, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x65, 0x6d, - 0x2e, 0x66, 0x69, 0x72, 0x73, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x29, - 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x62, - 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x63, 0x61, 0x73, 0x65, 0x20, 0x22, 0x6c, 0x61, 0x73, - 0x74, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x22, 0x3a, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x2e, - 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, - 0x6e, 0x6f, 0x64, 0x65, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x61, 0x73, 0x65, - 0x20, 0x22, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x73, 0x69, - 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x3a, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x69, 0x6e, - 0x73, 0x65, 0x72, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x28, 0x6e, - 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x29, 0x3b, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x63, 0x61, 0x73, 0x65, 0x20, 0x22, 0x6e, 0x65, 0x78, 0x74, 0x73, - 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x3a, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x2e, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x69, - 0x6e, 0x73, 0x65, 0x72, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x28, - 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x6e, - 0x65, 0x78, 0x74, 0x53, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x29, 0x3b, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x62, 0x72, - 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x63, 0x61, 0x73, 0x65, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x22, 0x3a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x6e, 0x6f, 0x64, - 0x65, 0x2c, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x29, 0x3b, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x62, 0x72, 0x65, 0x61, 0x6b, - 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, - 0x61, 0x73, 0x65, 0x20, 0x22, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, - 0x3a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x28, 0x69, 0x74, 0x65, 0x6d, 0x29, 0x3b, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x62, 0x72, 0x65, 0x61, - 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x63, 0x61, 0x73, 0x65, 0x20, 0x22, 0x61, 0x64, 0x64, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0x3a, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x2e, - 0x73, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x28, 0x64, 0x6f, 0x6d, 0x41, 0x74, 0x74, 0x72, 0x2c, 0x20, 0x6e, 0x6f, - 0x64, 0x65, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x61, 0x73, 0x65, 0x20, 0x22, - 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x72, 0x65, 0x6e, 0x22, 0x3a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x28, 0x69, 0x74, - 0x65, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4e, - 0x6f, 0x64, 0x65, 0x73, 0x28, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x74, 0x65, - 0x6d, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x28, 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x66, 0x69, 0x72, 0x73, 0x74, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x61, - 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x6e, - 0x6f, 0x64, 0x65, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x0a, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x29, 0x3b, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x73, 0x63, 0x78, 0x6d, 0x6c, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, - 0x70, 0x6f, 0x6c, 0x6c, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, - 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x63, - 0x78, 0x6d, 0x6c, 0x3b, 0x0a, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x77, 0x69, - 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x6f, 0x6e, 0x62, 0x65, 0x66, 0x6f, 0x72, - 0x65, 0x75, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, - 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x65, 0x29, 0x20, 0x7b, - 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x63, 0x78, 0x6d, 0x6c, 0x2e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x29, - 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x72, 0x65, - 0x74, 0x75, 0x72, 0x6e, 0x20, 0x27, 0x59, 0x6f, 0x75, 0x20, 0x68, 0x61, - 0x76, 0x65, 0x20, 0x75, 0x6e, 0x73, 0x61, 0x76, 0x65, 0x64, 0x20, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x21, 0x27, 0x3b, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x7d, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x7d, 0x29, 0x3b, 0x0a, - 0x09, 0x09, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, - 0x0a, 0x09, 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x09, 0x3c, - 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, - 0x0a, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a -}; -unsigned int template_xhtml_invoker_html_len = 8253; diff --git a/src/uscxml/plugins/ioprocessor/CMakeLists.txt b/src/uscxml/plugins/ioprocessor/CMakeLists.txt index 3c882ed..1171d73 100644 --- a/src/uscxml/plugins/ioprocessor/CMakeLists.txt +++ b/src/uscxml/plugins/ioprocessor/CMakeLists.txt @@ -1,25 +1,3 @@ -# LIBEVENT basichttp ioprocessor - this one is already required above - -set(USCXML_IOPROCESSORS "basichttp ${USCXML_IOPROCESSORS}") -file(GLOB_RECURSE BASICHTTP_IOPROCESSOR - basichttp/*.cpp - basichttp/*.h -) -if (BUILD_AS_PLUGINS) - source_group("" FILES ${BASICHTTP_IOPROCESSOR}) - add_library( - ioprocessor_basichttp SHARED - ${BASICHTTP_IOPROCESSOR} - "../Plugins.cpp") - target_link_libraries(ioprocessor_basichttp uscxml) - set_target_properties(ioprocessor_basichttp PROPERTIES FOLDER "Plugin IOProcessor") - set_target_properties(ioprocessor_basichttp PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(ioprocessor_basichttp PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") -else() - list (APPEND USCXML_FILES ${BASICHTTP_IOPROCESSOR}) -endif() - - # scxml ioprocessor set(USCXML_IOPROCESSORS "scxml ${USCXML_IOPROCESSORS}") @@ -27,110 +5,16 @@ file(GLOB_RECURSE SCXML_IOPROCESSOR scxml/*.cpp scxml/*.h ) +list (APPEND USCXML_FILES ${SCXML_IOPROCESSOR}) + +set(USCXML_IOPROCESSORS "basichttp ${USCXML_IOPROCESSORS}") file(GLOB_RECURSE BASICHTTP_IOPROCESSOR basichttp/*.cpp basichttp/*.h ) -if (BUILD_AS_PLUGINS) - source_group("" FILES ${SCXML_IOPROCESSOR}) - add_library( - ioprocessor_scxml SHARED - ${SCXML_IOPROCESSOR} - ${BASICHTTP_IOPROCESSOR} - "../Plugins.cpp") - # scxml ioprocessor is a basichttp ioprocessor - target_link_libraries(ioprocessor_scxml uscxml) - set_target_properties(ioprocessor_scxml PROPERTIES FOLDER "Plugin IOProcessor") - set_target_properties(ioprocessor_scxml PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(ioprocessor_scxml PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") -else() - list (APPEND USCXML_FILES ${SCXML_IOPROCESSOR}) -endif() - - -if (NOT BUILD_MINIMAL) - - set(USCXML_IOPROCESSORS "sample ${USCXML_IOPROCESSORS}") - file(GLOB_RECURSE SAMPLE_IOPROCESSOR - sample/*.cpp - sample/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${SAMPLE_IOPROCESSOR}) - add_library( - ioprocessor_sample SHARED - ${SAMPLE_IOPROCESSOR} - "../Plugins.cpp") - target_link_libraries(ioprocessor_sample uscxml) - set_target_properties(ioprocessor_sample PROPERTIES FOLDER "Plugin IOProcessor") - set_target_properties(ioprocessor_sample PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(ioprocessor_sample PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${SAMPLE_IOPROCESSOR}) - endif() - - set(USCXML_IOPROCESSORS "comet ${USCXML_IOPROCESSORS}") - file(GLOB_RECURSE COMET_IOPROCESSOR - comet/*.cpp - comet/*.h - ) - if (BUILD_AS_PLUGINS) - source_group("" FILES ${COMET_IOPROCESSOR}) - add_library( - ioprocessor_comet SHARED - ${COMET_IOPROCESSOR} - "../Plugins.cpp") - target_link_libraries(ioprocessor_comet uscxml) - set_target_properties(ioprocessor_comet PROPERTIES FOLDER "Plugin IOProcessor") - set_target_properties(ioprocessor_comet PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(ioprocessor_comet PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${COMET_IOPROCESSOR}) - endif() - - - # mmi ioprocessor - - if (PROTOBUF_FOUND AND OFF) - - if (NOT PROTOBUF_PROTOC_EXECUTABLE) - message(FATAL_ERROR "protoc binary required for serialization") - endif() - - set(USCXML_IOPROCESSORS "mmi ${USCXML_IOPROCESSORS}") - file(GLOB_RECURSE MMI_IOPROCESSOR - modality/*.cpp - modality/*.h - ) - - # process .proto files - file(GLOB_RECURSE PROTOBUF_INTERFACES ${PROJECT_SOURCE_DIR}/contrib/proto/*.proto) - list (APPEND USCXML_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}) - - PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${PROTOBUF_INTERFACES}) - # set_source_files_properties(${PROTO_SRCS} ${PROTO_HDRS} PROPERTIES GENERATED TRUE) - - # this needs to be here for dependencies on the generated proto files - add_library(mmi_proto STATIC ${PROTO_SRCS}) - set_target_properties(mmi_proto PROPERTIES FOLDER "Generated") - - if (BUILD_AS_PLUGINS) - source_group("" FILES ${MMI_IOPROCESSOR}) - add_library( - ioprocessor_mmi SHARED - ${MMI_IOPROCESSOR} - "../Plugins.cpp") - target_link_libraries(ioprocessor_mmi uscxml mmi_proto) - set_target_properties(ioprocessor_mmi PROPERTIES FOLDER "Plugin IOProcessor") - set_target_properties(ioprocessor_mmi PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") - set_target_properties(ioprocessor_mmi PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") - else() - list (APPEND USCXML_FILES ${MMI_IOPROCESSOR}) - list (APPEND USCXML_OPT_LIBS mmi_proto) - endif() - endif() +list (APPEND BASICHTTP_IOPROCESSOR "") -endif() # BUILD_MINIMAL +list (APPEND USCXML_FILES ${BASICHTTP_IOPROCESSOR}) set(USCXML_INCLUDE_DIRS ${USCXML_INCLUDE_DIRS} PARENT_SCOPE) set(USCXML_OPT_LIBS ${USCXML_OPT_LIBS} PARENT_SCOPE) diff --git a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp index 1bced48..f81cf54 100644 --- a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp +++ b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp @@ -20,9 +20,8 @@ #include "uscxml/Common.h" #include "uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h" -#include "uscxml/Message.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/dom/NameSpacingParser.h" +#include "uscxml/messages/Event.h" +#include "uscxml/util/DOM.h" #include #include @@ -31,8 +30,7 @@ #include -#include -#include +#include #include #ifdef _WIN32 @@ -65,6 +63,7 @@ bool pluginConnect(pluma::Host& host) { // see http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor BasicHTTPIOProcessor::BasicHTTPIOProcessor() { + HTTPServer::getInstance(); } BasicHTTPIOProcessor::~BasicHTTPIOProcessor() { @@ -73,8 +72,8 @@ BasicHTTPIOProcessor::~BasicHTTPIOProcessor() { } -boost::shared_ptr BasicHTTPIOProcessor::create(InterpreterImpl* interpreter) { - boost::shared_ptr io = boost::shared_ptr(new BasicHTTPIOProcessor()); +std::shared_ptr BasicHTTPIOProcessor::create(InterpreterImpl* interpreter) { + std::shared_ptr io(new BasicHTTPIOProcessor()); io->_interpreter = interpreter; // register at http server @@ -104,19 +103,19 @@ Data BasicHTTPIOProcessor::getDataModelVariables() { data.compound["path"] = Data(url.path(), Data::VERBATIM); data.compound["scheme"] = Data(url.scheme(), Data::VERBATIM); - std::vector pathComps = url.pathComponents(); - std::vector::const_iterator pathCompIter = pathComps.begin(); + std::list pathComps = url.pathComponents(); + std::list::const_iterator pathCompIter = pathComps.begin(); while(pathCompIter != pathComps.end()) { - data.compound["pathComponens"].array.push_back(Data(*pathCompIter, Data::VERBATIM)); + data.compound["pathComponents"].array.push_back(Data(*pathCompIter, Data::VERBATIM)); pathCompIter++; } return data; } -bool BasicHTTPIOProcessor::httpRecvRequest(const HTTPServer::Request& req) { - Event reqEvent = req; - reqEvent.eventType = Event::EXTERNAL; +bool BasicHTTPIOProcessor::requestFromHTTP(const HTTPServer::Request& req) { + Event event = req; + event.eventType = Event::EXTERNAL; // std::cout << req.raw << std::endl; @@ -130,10 +129,10 @@ bool BasicHTTPIOProcessor::httpRecvRequest(const HTTPServer::Request& req) { // if we sent ourself an event it will end up here // this will call the const subscript operator if (req.data.at("content").hasKey("_scxmleventname")) { - reqEvent.name = req.data.at("content").at("_scxmleventname").atom; + event.name = req.data.at("content").at("_scxmleventname").atom; } if (req.data.at("content").hasKey("content")) { - reqEvent.content = req.data.at("content").at("content").atom; + event.data.atom = req.data.at("content").at("content").atom; } } @@ -143,9 +142,9 @@ bool BasicHTTPIOProcessor::httpRecvRequest(const HTTPServer::Request& req) { for(std::map::const_iterator compIter = data.compound.begin(); compIter!= data.compound.end(); compIter++) { if (compIter->first == "content") { - reqEvent.content = compIter->second.atom; + event.data.atom = compIter->second.atom; } else { - reqEvent.data[compIter->first] = compIter->second; + event.data[compIter->first] = compIter->second; } } } @@ -155,62 +154,60 @@ bool BasicHTTPIOProcessor::httpRecvRequest(const HTTPServer::Request& req) { for(std::map::const_iterator compIter = data.compound.begin(); compIter!= data.compound.end(); compIter++) { if (compIter->first == "_scxmleventname") { - reqEvent.name = compIter->second.atom; + event.name = compIter->second.atom; } } } - // check whether we can parse it as XML - if (reqEvent.content.length() > 0) { - NameSpacingParser parser = NameSpacingParser::fromXML(reqEvent.content); - if (!parser.errorsReported()) { - reqEvent.dom = parser.getDocument(); - } - } - - /// test532 - if (reqEvent.name.length() == 0) - reqEvent.name = "http." + req.data.compound.at("type").atom; + // test 532 + if (event.name.length() == 0) + event.name = "http." + req.data.compound.at("type").atom; - returnEvent(reqEvent); + eventToSCXML(event, USCXML_IOPROC_BASICHTTP_TYPE, _url); evhttp_send_reply(req.evhttpReq, 200, "OK", NULL); return true; } -void BasicHTTPIOProcessor::send(const SendRequest& req) { +bool BasicHTTPIOProcessor::isValidTarget(const std::string& target) { + try { + URL url(target); + if (url.scheme().compare("http") != 0) + return false; - if (req.target.length() == 0) { - _interpreter->receiveInternal(Event("error.communication", Event::PLATFORM)); - return; + return true; + } catch (ErrorEvent e) { } + return false; +} - bool isLocal = false; - std::string target; - if (!boost::equals(req.target, _url)) { - target = req.target; - } else { - isLocal = true; - target = _url; +void BasicHTTPIOProcessor::eventFromSCXML(const std::string& target, const Event& event) { + + // TODO: is this still needed with isValidTarget()? + if (target.length() == 0) { + _interpreter->enqueueInternal(Event("error.communication", Event::PLATFORM)); + return; } + + bool isLocal = target == _url; URL targetURL(target); std::stringstream kvps; std::string kvpSeperator; // event name - if (req.name.size() > 0) { + if (event.name.size() > 0) { char* eventNameCStr = evhttp_encode_uri("_scxmleventname"); - char* eventValueCStr = evhttp_encode_uri(req.name.c_str()); + char* eventValueCStr = evhttp_encode_uri(event.name.c_str()); kvps << kvpSeperator << eventNameCStr << "=" << eventValueCStr; kvpSeperator = "&"; free(eventNameCStr); free(eventValueCStr); -// targetURL.addOutHeader("_scxmleventname", evhttp_encode_uri(req.name.c_str())); + targetURL.addOutHeader("_scxmleventname", evhttp_encode_uri(event.name.c_str())); } // event namelist - if (req.namelist.size() > 0) { - std::map::const_iterator namelistIter = req.namelist.begin(); - while (namelistIter != req.namelist.end()) { + if (event.namelist.size() > 0) { + std::map::const_iterator namelistIter = event.namelist.begin(); + while (namelistIter != event.namelist.end()) { char* keyCStr = evhttp_encode_uri(namelistIter->first.c_str()); // this is simplified - Data might be more elaborate than a simple string atom char* valueCStr = evhttp_encode_uri(namelistIter->second.atom.c_str()); @@ -218,15 +215,15 @@ void BasicHTTPIOProcessor::send(const SendRequest& req) { free(keyCStr); free(valueCStr); kvpSeperator = "&"; -// targetURL.addOutHeader(namelistIter->first, namelistIter->second); + targetURL.addOutHeader(namelistIter->first, namelistIter->second); namelistIter++; } } // event params - if (req.params.size() > 0) { - std::multimap::const_iterator paramIter = req.params.begin(); - while (paramIter != req.params.end()) { + if (event.params.size() > 0) { + std::multimap::const_iterator paramIter = event.params.begin(); + while (paramIter != event.params.end()) { char* keyCStr = evhttp_encode_uri(paramIter->first.c_str()); // this is simplified - Data might be more elaborate than a simple string atom char* valueCStr = evhttp_encode_uri(paramIter->second.atom.c_str()); @@ -234,35 +231,23 @@ void BasicHTTPIOProcessor::send(const SendRequest& req) { free(keyCStr); free(valueCStr); kvpSeperator = "&"; -// targetURL.addOutHeader(paramIter->first, paramIter->second); + targetURL.addOutHeader(paramIter->first, paramIter->second); paramIter++; } } // try hard to find actual content char* keyCStr = evhttp_encode_uri("content"); - if (req.content.size() > 0) { - char* valueCStr = evhttp_encode_uri(req.content.c_str()); - kvps << kvpSeperator << keyCStr << "=" << valueCStr; - free(valueCStr); - kvpSeperator = "&"; - } else if (req.dom) { - std::stringstream xmlStream; - xmlStream << req.dom; - char* valueCStr = evhttp_encode_uri(xmlStream.str().c_str()); - kvps << kvpSeperator << keyCStr << "=" << valueCStr; - free(valueCStr); - kvpSeperator = "&"; - } else if (!req.data.empty()) { + if (!event.data.empty()) { char* valueCStr = NULL; - if (req.data.atom.length() || req.data.array.size() || req.data.compound.size()) { - valueCStr = evhttp_encode_uri(Data::toJSON(req.data).c_str()); - } else if(req.data.node) { + if (event.data.atom.length() || event.data.array.size() || event.data.compound.size()) { + valueCStr = evhttp_encode_uri(Data::toJSON(event.data).c_str()); + } else if(event.data.node) { std::stringstream xmlStream; - xmlStream << req.data.node; + xmlStream << event.data.node; valueCStr = evhttp_encode_uri(xmlStream.str().c_str()); - } else if(req.data.binary) { - valueCStr = evhttp_encode_uri(req.data.binary.base64().c_str()); + } else if(event.data.binary) { + valueCStr = evhttp_encode_uri(event.data.binary.base64().c_str()); } if (valueCStr != NULL) { kvps << kvpSeperator << keyCStr << "=" << valueCStr; @@ -273,13 +258,12 @@ void BasicHTTPIOProcessor::send(const SendRequest& req) { free(keyCStr); targetURL.setOutContent(kvps.str()); + targetURL.addOutHeader("Content-Type", "application/x-www-form-urlencoded"); -// targetURL.addOutHeader("Content-Type", "application/x-www-form-urlencoded"); - - targetURL.setRequestType("post"); + targetURL.setRequestType(URLRequestType::POST); targetURL.addMonitor(this); - _sendRequests[req.sendid] = std::make_pair(targetURL, req); + _sendRequests[event.sendid] = std::make_pair(targetURL, event); if (isLocal) { // test201 use a blocking request with local communication targetURL.download(true); @@ -291,7 +275,7 @@ void BasicHTTPIOProcessor::send(const SendRequest& req) { void BasicHTTPIOProcessor::downloadStarted(const URL& url) {} void BasicHTTPIOProcessor::downloadCompleted(const URL& url) { - std::map >::iterator reqIter = _sendRequests.begin(); + std::map >::iterator reqIter = _sendRequests.begin(); while(reqIter != _sendRequests.end()) { if (reqIter->second.first == url) { // test513 @@ -302,7 +286,7 @@ void BasicHTTPIOProcessor::downloadCompleted(const URL& url) { Event event; event.data = url; event.name = "HTTP." + statusPrefix + "." + statusRest; -// returnEvent(event); + eventToSCXML(event, USCXML_IOPROC_BASICHTTP_TYPE, std::string(_url)); } _sendRequests.erase(reqIter); return; @@ -314,12 +298,12 @@ void BasicHTTPIOProcessor::downloadCompleted(const URL& url) { void BasicHTTPIOProcessor::downloadFailed(const URL& url, int errorCode) { - std::map >::iterator reqIter = _sendRequests.begin(); + std::map >::iterator reqIter = _sendRequests.begin(); while(reqIter != _sendRequests.end()) { if (reqIter->second.first == url) { Event failEvent; failEvent.name = "error.communication"; - returnEvent(failEvent); + eventToSCXML(failEvent, USCXML_IOPROC_BASICHTTP_TYPE, std::string(_url)); _sendRequests.erase(reqIter); return; diff --git a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h index 3a43e49..f7e9f10 100644 --- a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h +++ b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h @@ -35,10 +35,9 @@ extern "C" { # define USCXML_PLUGIN_API #endif -#include "uscxml/concurrency/DelayedEventQueue.h" #include "uscxml/server/HTTPServer.h" #include "uscxml/Interpreter.h" -#include "uscxml/Factory.h" +#include "uscxml/plugins/Factory.h" #ifndef _WIN32 #include #endif @@ -47,27 +46,30 @@ extern "C" { #include "uscxml/plugins/Plugins.h" #endif +#define USCXML_IOPROC_BASICHTTP_TYPE "http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" + namespace uscxml { class USCXML_PLUGIN_API BasicHTTPIOProcessor : public IOProcessorImpl, public HTTPServlet, public URLMonitor { public: BasicHTTPIOProcessor(); virtual ~BasicHTTPIOProcessor(); - virtual boost::shared_ptr create(uscxml::InterpreterImpl* interpreter); + virtual std::shared_ptr create(uscxml::InterpreterImpl* interpreter); virtual std::list getNames() { std::list names; names.push_back("basichttp"); - names.push_back("http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"); + names.push_back(USCXML_IOPROC_BASICHTTP_TYPE); return names; } - virtual void send(const SendRequest& req); + virtual void eventFromSCXML(const std::string& target, const Event& event); + virtual bool isValidTarget(const std::string& target); Data getDataModelVariables(); /// HTTPServlet - bool httpRecvRequest(const HTTPServer::Request& req); + bool requestFromHTTP(const HTTPServer::Request& req); void setURL(const std::string& url) { _url = url; } @@ -83,7 +85,7 @@ public: protected: std::string _url; - std::map > _sendRequests; + std::map > _sendRequests; }; // do not implement pluma plugins if we build an inherited plugin diff --git a/src/uscxml/plugins/ioprocessor/comet/CometIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/comet/CometIOProcessor.cpp deleted file mode 100644 index 9ec5c00..0000000 --- a/src/uscxml/plugins/ioprocessor/comet/CometIOProcessor.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include -#include "uscxml/plugins/ioprocessor/comet/CometIOProcessor.h" -#include "uscxml/Message.h" -#include - -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new CometIOProcessorProvider() ); - return true; -} -#endif - -CometIOProcessor::CometIOProcessor() { -} - -CometIOProcessor::~CometIOProcessor() { - HTTPServer::unregisterServlet(this); -} - -boost::shared_ptr CometIOProcessor::create(InterpreterImpl* interpreter) { - boost::shared_ptr io = boost::shared_ptr(new CometIOProcessor()); - io->_interpreter = interpreter; - - // register at http server - std::string path = interpreter->getName(); - int i = 2; - while (!HTTPServer::registerServlet(path + "/comet", io.get())) { - std::stringstream ss; - ss << interpreter->getName() << i++; - path = ss.str(); - } - - return io; -} - -Data CometIOProcessor::getDataModelVariables() { - Data data; - return data; -} - -void CometIOProcessor::send(const SendRequest& req) { - tthread::lock_guard lock(_mutex); - if (!_longPollingReq) { - _outQueue.push_back(req); - return; - } - reply(req, _longPollingReq); -} - -void CometIOProcessor::reply(const SendRequest& req, const HTTPServer::Request& longPoll) { - HTTPServer::Reply reply(longPoll); - - if (req.dom) { - std::stringstream ss; - ss << req.dom; - reply.content = ss.str(); - reply.headers["Content-Type"] = "application/xml"; - } else if (!req.data.empty()) { - reply.content = Data::toJSON(req.data); - reply.headers["Content-Type"] = "application/json"; - } else if (req.content.length() > 0) { - reply.content = req.content; - reply.headers["Content-Type"] = "text/plain"; - } - - if (req.params.find("Content-Type") != req.params.end()) - reply.headers["Content-Type"] = req.params.find("Content-Type")->first; - - HTTPServer::reply(reply); -} - -bool CometIOProcessor::httpRecvRequest(const HTTPServer::Request& request) { - tthread::lock_guard lock(_mutex); - - if (_longPollingReq) - // send 204 to last request and remember new one - evhttp_send_error(_longPollingReq.evhttpReq, 204, NULL); - _longPollingReq = request; - if (!_outQueue.empty()) { - send(_outQueue.front()); - _outQueue.pop_front(); - } - return true; -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/ioprocessor/comet/CometIOProcessor.h b/src/uscxml/plugins/ioprocessor/comet/CometIOProcessor.h deleted file mode 100644 index 0a57d70..0000000 --- a/src/uscxml/plugins/ioprocessor/comet/CometIOProcessor.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef COMETIOPROCESSOR_H_2CUY93KU -#define COMETIOPROCESSOR_H_2CUY93KU - -#include "uscxml/concurrency/DelayedEventQueue.h" -#include "uscxml/server/HTTPServer.h" -#include "uscxml/Interpreter.h" -#include "uscxml/Factory.h" - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class CometIOProcessor : public IOProcessorImpl, public HTTPServlet { -public: - CometIOProcessor(); - virtual ~CometIOProcessor(); - virtual boost::shared_ptr create(uscxml::InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("comet"); - names.push_back("http://www.w3.org/TR/scxml/#CometEventProcessor"); - return names; - } - - /// This method can be overridden for specific replies - virtual void reply(const SendRequest& req, const HTTPServer::Request& longPoll); - - virtual void send(const SendRequest& req); - Data getDataModelVariables(); - - virtual bool httpRecvRequest(const HTTPServer::Request& request); - virtual void setURL(const std::string& url) { - _url = url; - } - -protected: - tthread::recursive_mutex _mutex; - std::string _url; - std::deque _outQueue; - HTTPServer::Request _longPollingReq; - -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(CometIOProcessor, IOProcessorImpl); -#endif - -} - -#endif /* end of include guard: COMETIOPROCESSOR_H_2CUY93KU */ \ No newline at end of file diff --git a/src/uscxml/plugins/ioprocessor/dom/DOMIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/dom/DOMIOProcessor.cpp deleted file mode 100644 index 1a3417a..0000000 --- a/src/uscxml/plugins/ioprocessor/dom/DOMIOProcessor.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - diff --git a/src/uscxml/plugins/ioprocessor/dom/DOMIOProcessor.h b/src/uscxml/plugins/ioprocessor/dom/DOMIOProcessor.h deleted file mode 100644 index 1a3417a..0000000 --- a/src/uscxml/plugins/ioprocessor/dom/DOMIOProcessor.h +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - diff --git a/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.cpp deleted file mode 100644 index 15c05c0..0000000 --- a/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.h" -#include "uscxml/Message.h" - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new MMIHTTPIOProcessorProvider() ); - return true; -} -#endif - -MMIHTTPIOProcessor::MMIHTTPIOProcessor() { -} - -MMIHTTPIOProcessor::~MMIHTTPIOProcessor() { -} - -boost::shared_ptr MMIHTTPIOProcessor::create(InterpreterImpl* interpreter) { - boost::shared_ptr io = boost::shared_ptr(new MMIHTTPIOProcessor()); - io->_interpreter = interpreter; - - // register at http server - std::string path = interpreter->getName(); - int i = 2; - while (!HTTPServer::registerServlet(path + "/mmihttp", io.get())) { - std::stringstream ss; - ss << interpreter->getName() << i++; - path = ss.str(); - } - - return io; -} - -bool MMIHTTPIOProcessor::httpRecvRequest(const HTTPServer::Request& req) { - Event reqEvent = req; - reqEvent.eventType = Event::EXTERNAL; - bool scxmlStructFound = false; - - if (reqEvent.data.compound["header"].compound.find("Content-Type") != reqEvent.data.compound["header"].compound.end() && - boost::iequals(reqEvent.data.compound["header"].compound["Content-Type"].atom, "application/x-www-form-urlencoded")) { - std::stringstream ss(reqEvent.data.compound["content"].atom); - std::string term; - while(std::getline(ss, term, '&')) { - size_t split = term.find_first_of("="); - if (split != std::string::npos) { - std::string key = evhttp_decode_uri(term.substr(0, split).c_str()); - std::string value = evhttp_decode_uri(term.substr(split + 1).c_str()); - if (boost::iequals(key, "_scxmleventname")) { - reqEvent.name = value; - } else if (boost::iequals(key, "content")) { - reqEvent.initContent(value); - } else { - reqEvent.data.compound[key] = value; - reqEvent.params.insert(std::make_pair(key, value)); - } - } else { - // this is most likely wrong - reqEvent.content = evhttp_decode_uri(term.c_str()); - } - } - } else { - if (reqEvent.data.compound["header"].compound.find("_scxmleventstruct") != reqEvent.data.compound["header"].compound.end()) { - // TODO: this looses all other information - reqEvent = Event::fromXML(evhttp_decode_uri(reqEvent.data.compound["header"].compound["_scxmleventstruct"].atom.c_str())); - scxmlStructFound = true; - } - if (reqEvent.data.compound["header"].compound.find("_scxmleventname") != reqEvent.data.compound["header"].compound.end()) { - reqEvent.name = evhttp_decode_uri(reqEvent.data.compound["header"].compound["_scxmleventname"].atom.c_str()); - } - } - std::map::iterator headerIter = reqEvent.data.compound["header"].compound.begin(); - while(headerIter != reqEvent.data.compound["header"].compound.end()) { - reqEvent.data.compound[headerIter->first] = Data(evhttp_decode_uri(headerIter->second.atom.c_str()), Data::VERBATIM); - headerIter++; - } - -#if 0 - std::map::const_iterator headerIter = req.headers.begin(); - while(headerIter != req.headers.end()) { - if (boost::iequals("_scxmleventstruct", headerIter->first)) { - reqEvent = Event::fromXML(evhttp_decode_uri(headerIter->second.c_str())); - scxmlStructFound = true; - break; - } else if (boost::iequals("_scxmleventname", headerIter->first)) { - reqEvent.name = evhttp_decode_uri(headerIter->second.c_str()); - } else { - reqEvent.data.compound[headerIter->first] = Data(evhttp_decode_uri(headerIter->second.c_str()), Data::VERBATIM); - } - headerIter++; - } -#endif - - /// test532 - if (reqEvent.name.length() == 0) - reqEvent.name = "http." + req.data.compound.at("type").atom; - - if (!scxmlStructFound) { - // get content into event - reqEvent.data.compound["content"] = Data(req.content, Data::VERBATIM); - } - - returnEvent(reqEvent); - evhttp_send_reply(req.curlReq, 200, "OK", NULL); - return true; -} - -void MMIHTTPIOProcessor::send(const SendRequest& req) { - - if (req.target.length() == 0) { - _interpreter->receiveInternal(Event("error.communication", Event::PLATFORM)); - return; - } - - bool isLocal = false; - std::string target; - if (!boost::equals(req.target, _url)) { - target = req.target; - } else { - isLocal = true; - target = _url; - } - URL targetURL(target); - std::stringstream kvps; - std::string kvpSeperator; - - // event name - if (req.name.size() > 0) { - kvps << kvpSeperator << evhttp_encode_uri("_scxmleventname") << "=" << evhttp_encode_uri(req.name.c_str()); - kvpSeperator = "&"; -// targetURL.addOutHeader("_scxmleventname", evhttp_encode_uri(req.name.c_str())); - } - - // event namelist - if (req.namelist.size() > 0) { - std::map::const_iterator namelistIter = req.namelist.begin(); - while (namelistIter != req.namelist.end()) { - // this is simplified - Data might be more elaborate than a simple string atom - kvps << kvpSeperator << evhttp_encode_uri(namelistIter->first.c_str()) << "=" << evhttp_encode_uri(namelistIter->second.atom.c_str()); - kvpSeperator = "&"; -// targetURL.addOutHeader(namelistIter->first, namelistIter->second); - namelistIter++; - } - } - - // event params - if (req.params.size() > 0) { - std::multimap::const_iterator paramIter = req.params.begin(); - while (paramIter != req.params.end()) { - // this is simplified - Data might be more elaborate than a simple string atom - kvps << kvpSeperator << evhttp_encode_uri(paramIter->first.c_str()) << "=" << evhttp_encode_uri(paramIter->second.atom.c_str()); - kvpSeperator = "&"; -// targetURL.addOutHeader(paramIter->first, paramIter->second); - paramIter++; - } - } - - // content - - if (req.content.size() > 0) { - kvps << kvpSeperator << evhttp_encode_uri("content") << "=" << evhttp_encode_uri(req.content.c_str()); - kvpSeperator = "&"; - } - if (req.dom) { - std::stringstream xmlStream; - xmlStream << req.dom; - kvps << kvpSeperator << evhttp_encode_uri("content") << "=" << evhttp_encode_uri(xmlStream.str().c_str()); - kvpSeperator = "&"; - } - targetURL.setOutContent(kvps.str()); - - targetURL.setRequestType("post"); - targetURL.addMonitor(this); - - _sendRequests[req.sendid] = std::make_pair(targetURL, req); - if (isLocal) { - // test201 use a blocking request with local communication - targetURL.download(true); - } else { - URLFetcher::fetchURL(targetURL); - } -} - - - -} \ No newline at end of file diff --git a/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.h b/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.h deleted file mode 100644 index 00b47c7..0000000 --- a/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef MMIHTTPIOPROCESSOR_H_P1FN0YPL -#define MMIHTTPIOPROCESSOR_H_P1FN0YPL - -#include "uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h" -#include "uscxml/Interpreter.h" -#include "uscxml/Factory.h" -#ifndef _WIN32 -#include -#endif - -#include -#include - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -namespace uscxml { - -class MMIHTTPIOProcessor : public BasicHTTPIOProcessor { -public: - MMIHTTPIOProcessor(); - virtual ~MMIHTTPIOProcessor(); - virtual boost::shared_ptr create(uscxml::InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("mmihttp"); - names.push_back("http://www.w3.org/TR/mmi-arch/#HTTPTransport"); - return names; - } - - virtual void send(const SendRequest& req); - - /// HTTPServlet - bool httpRecvRequest(const HTTPServer::Request& req); - - bool canAdaptPath() { - return false; - } - -protected: - std::string _url; - std::map > _sendRequests; -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(MMIHTTPIOProcessor, IOProcessorImpl); -#endif - -} - -#endif /* end of include guard: MMIHTTPIOPROCESSOR_H_P1FN0YPL */ diff --git a/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.cpp b/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.cpp deleted file mode 100644 index c649a17..0000000 --- a/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "MMIProtoBridge.h" - -#define INIT_PROTO_LIFE_CYCLE_EVENT(type) \ -::LifeCycleEvent lifeCycleEvent; \ -lifeCycleEvent.set_type(type); \ -lifeCycleEvent.set_requestid(mmiEvent.requestId); \ -lifeCycleEvent.set_source(mmiEvent.source); \ -lifeCycleEvent.set_target(mmiEvent.target); - -namespace uscxml { - -::LifeCycleEvent MMIProtoBridge::toProto(const NewContextRequest& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_NEW_CONTEXT_REQUEST); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const NewContextResponse& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_NEW_CONTEXT_RESPONSE); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const PrepareRequest& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_PREPARE_REQUEST); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const PrepareResponse& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_PREPARE_RESPONSE); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const StartRequest& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_START_REQUEST); - - ::LifeCycleRequest* lifeCycleRequest = lifeCycleEvent.MutableExtension(::LifeCycleRequest::Request); - lifeCycleRequest->set_context(mmiEvent.context); - - ::StartRequest* startRequest = lifeCycleRequest->MutableExtension(::StartRequest::Request); - startRequest->set_content(mmiEvent.content); - startRequest->set_contenturl(mmiEvent.contentURL.href); - - ::StartRequestData* startRequestData = startRequest->MutableExtension(::StartRequestData::Request); - startRequestData->set_data(mmiEvent.data); - - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const StartResponse& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_START_RESPONSE); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const DoneNotification& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_DONE_NOTIFICATION); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const CancelRequest& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_CANCEL_REQUEST); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const CancelResponse& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_CANCEL_RESPONSE); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const PauseRequest& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_PAUSE_REQUEST); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const PauseResponse& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_PAUSE_RESPONSE); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const ResumeRequest& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_RESUME_REQUEST); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const ResumeResponse& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_RESUME_RESPONSE); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const ExtensionNotification& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_EXTENSION_NOTIFICATION); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const ClearContextRequest& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_CLEAR_CONTEXT_REQUEST); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const ClearContextResponse& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_CLEAR_CONTEXT_RESPONSE); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const StatusRequest& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_STATUS_REQUEST); - return lifeCycleEvent; -} - -::LifeCycleEvent MMIProtoBridge::toProto(const StatusResponse& mmiEvent) { - INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_STATUS_RESPONSE); - return lifeCycleEvent; -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.h b/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.h deleted file mode 100644 index 60ba824..0000000 --- a/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.h +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef MMIPROTOBRIDGE_H_T6VXUX69 -#define MMIPROTOBRIDGE_H_T6VXUX69 - -#include "LifeCycleEvents.pb.h" -#include "StringDataExtension.pb.h" -#include "MMIMessages.h" - -namespace uscxml { - -class MMIProtoBridge { -public: - static ::LifeCycleEvent toProto(const NewContextRequest&); - static ::LifeCycleEvent toProto(const NewContextResponse&); - static ::LifeCycleEvent toProto(const PrepareRequest&); - static ::LifeCycleEvent toProto(const PrepareResponse&); - static ::LifeCycleEvent toProto(const StartRequest&); - static ::LifeCycleEvent toProto(const StartResponse&); - static ::LifeCycleEvent toProto(const DoneNotification&); - static ::LifeCycleEvent toProto(const CancelRequest&); - static ::LifeCycleEvent toProto(const CancelResponse&); - static ::LifeCycleEvent toProto(const PauseRequest&); - static ::LifeCycleEvent toProto(const PauseResponse&); - static ::LifeCycleEvent toProto(const ResumeRequest&); - static ::LifeCycleEvent toProto(const ResumeResponse&); - static ::LifeCycleEvent toProto(const ExtensionNotification&); - static ::LifeCycleEvent toProto(const ClearContextRequest&); - static ::LifeCycleEvent toProto(const ClearContextResponse&); - static ::LifeCycleEvent toProto(const StatusRequest&); - static ::LifeCycleEvent toProto(const StatusResponse&); -}; - -} - -#endif /* end of include guard: MMIPROTOBRIDGE_H_T6VXUX69 */ diff --git a/src/uscxml/plugins/ioprocessor/sample/SampleIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/sample/SampleIOProcessor.cpp deleted file mode 100644 index bca2344..0000000 --- a/src/uscxml/plugins/ioprocessor/sample/SampleIOProcessor.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/plugins/ioprocessor/sample/SampleIOProcessor.h" -#include "uscxml/Message.h" -#include - -#include - -#ifdef BUILD_AS_PLUGINS -#include -#endif - -namespace uscxml { - -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new SampleIOProcessorProvider() ); - return true; -} -#endif - -SampleIOProcessor::SampleIOProcessor() { -} - -SampleIOProcessor::~SampleIOProcessor() { -} - -boost::shared_ptr SampleIOProcessor::create(InterpreterImpl* interpreter) { - boost::shared_ptr io = boost::shared_ptr(new SampleIOProcessor()); - return io; -} - -Data SampleIOProcessor::getDataModelVariables() { - Data data; - return data; -} - -void SampleIOProcessor::send(const SendRequest& req) { -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/ioprocessor/sample/SampleIOProcessor.h b/src/uscxml/plugins/ioprocessor/sample/SampleIOProcessor.h deleted file mode 100644 index 05dd3ef..0000000 --- a/src/uscxml/plugins/ioprocessor/sample/SampleIOProcessor.h +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef SAMPLEIOPROCESSOR_H_2CUY93KU -#define SAMPLEIOPROCESSOR_H_2CUY93KU - -#include "uscxml/Factory.h" - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif - -#if defined(_WIN32) && !defined(USCXML_STATIC) -# if (defined ioprocessor_sample_EXPORTS || defined USCXML_EXPORT) -# define USCXML_PLUGIN_API __declspec(dllexport) -# else -# define USCXML_PLUGIN_API __declspec(dllimport) -# endif -#else -# define USCXML_PLUGIN_API -#endif - -namespace uscxml { - -class USCXML_PLUGIN_API SampleIOProcessor : public IOProcessorImpl { -public: - SampleIOProcessor(); - virtual ~SampleIOProcessor(); - virtual boost::shared_ptr create(uscxml::InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("sample"); - names.push_back("http://www.w3.org/TR/scxml/#SampleEventProcessor"); - return names; - } - - virtual void send(const SendRequest& req); - Data getDataModelVariables(); - -protected: -}; - -#ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(SampleIOProcessor, IOProcessorImpl); -#endif - -} - -#endif /* end of include guard: SAMPLEIOPROCESSOR_H_2CUY93KU */ \ No newline at end of file diff --git a/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp index 6905e22..c53915b 100644 --- a/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp +++ b/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp @@ -17,88 +17,64 @@ * @endcond */ -#include -#ifdef _WIN32 -#define NOMINMAX -#include -#include -#endif - -#include "uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.h" -#include "uscxml/Message.h" -#include -#include -#include -#include +#include "SCXMLIOProcessor.h" +#include "uscxml/messages/Event.h" +#include "uscxml/interpreter/InterpreterImpl.h" #include -#include -#include #ifndef _WIN32 #include #include #endif -#ifdef BUILD_AS_PLUGINS -#include -#endif - namespace uscxml { -#ifdef BUILD_AS_PLUGINS -PLUMA_CONNECTOR -bool pluginConnect(pluma::Host& host) { - host.add( new SCXMLIOProcessorProvider() ); - return true; -} -#endif - // see http://www.w3.org/TR/scxml/#SCXMLEventProcessor SCXMLIOProcessor::SCXMLIOProcessor() { } SCXMLIOProcessor::~SCXMLIOProcessor() { - HTTPServer::unregisterServlet(this); } -boost::shared_ptr SCXMLIOProcessor::create(InterpreterImpl* interpreter) { - boost::shared_ptr io = boost::shared_ptr(new SCXMLIOProcessor()); +std::shared_ptr SCXMLIOProcessor::create(InterpreterImpl* interpreter) { + std::shared_ptr io(new SCXMLIOProcessor()); io->_interpreter = interpreter; - - // register at http server - std::string path = interpreter->getName(); - int i = 2; - while (!HTTPServer::registerServlet(path + "/scxml", io.get())) { - std::stringstream ss; - ss << interpreter->getName() << i++; - path = ss.str(); - } return io; } Data SCXMLIOProcessor::getDataModelVariables() { Data data; - if(_url.length() > 0) - data.compound["location"] = Data(_url, Data::VERBATIM); + + data.compound["location"] = Data("#_scxml_" + _interpreter->getSessionId(), Data::VERBATIM); + return data; } +bool SCXMLIOProcessor::isValidTarget(const std::string& target) { + if (target.size() > 0 && (target[0] != '#' || target[1] != '_')) { + ERROR_EXECUTION_THROW("Target '" + target + "' not supported in send"); + } + return true; +} + -void SCXMLIOProcessor::send(const SendRequest& req) { +void SCXMLIOProcessor::eventFromSCXML(const std::string& target, const Event& event) { // see http://www.w3.org/TR/scxml/#SendTargets + Event eventCopy(event); - SendRequest reqCopy(req); - // test 253 - reqCopy.origintype = "http://www.w3.org/TR/scxml/#SCXMLEventProcessor"; - reqCopy.origin = _url; + // test 253 / 198 / 336 + eventCopy.origintype = "http://www.w3.org/TR/scxml/#SCXMLEventProcessor"; + + // test 336 + eventCopy.origin = "#_scxml_" + _interpreter->getSessionId(); if (false) { - } else if(reqCopy.target.length() == 0) { + } else if(target.length() == 0) { /** * If neither the 'target' nor the 'targetexpr' attribute is specified, the * SCXML Processor must add the event will be added to the external event @@ -107,16 +83,31 @@ void SCXMLIOProcessor::send(const SendRequest& req) { // test333 vs test351 // reqCopy.sendid = ""; + // test 198 - _interpreter->receive(reqCopy); - } else if (iequals(reqCopy.target, "#_internal")) { + _interpreter->enqueueExternal(eventCopy); + + } else if (iequals(target, "#_internal")) { /** * #_internal: If the target is the special term '#_internal', the Processor * must add the event to the internal event queue of the sending session. */ - _interpreter->receiveInternal(reqCopy); + _interpreter->enqueueInternal(eventCopy); - } else if(boost::starts_with(reqCopy.target, "#_scxml_")) { + } else if (iequals(target, "#_parent")) { + /** + * #_parent: If the target is the special term '#_parent', the Processor must + * add the event to the external event queue of the SCXML session that invoked + * the sending session, if there is one. + */ + + if (_interpreter->_parentQueue) { + _interpreter->_parentQueue.enqueue(eventCopy); + } else { + ERROR_COMMUNICATION_THROW("Sending to parent invoker, but none is set"); + } + + } else if (target.length() > 8 && iequals(target.substr(0, 8), "#_scxml_")) { /** * #_scxml_sessionid: If the target is the special term '#_scxml_sessionid', * where sessionid is the id of an SCXML session that is accessible to the @@ -124,66 +115,46 @@ void SCXMLIOProcessor::send(const SendRequest& req) { * session. The set of SCXML sessions that are accessible to a given SCXML * Processor is platform-dependent. */ - std::string sessionId = reqCopy.target.substr(8, reqCopy.target.length() - 8); - std::map > instances = Interpreter::getInstances(); - if (instances.find(sessionId) != instances.end()) { - boost::shared_ptr other = instances[sessionId].lock(); - other->receive(reqCopy); - } else { - ERROR_COMMUNICATION(error, "Can not send to scxml session " + sessionId + " - not known"); - error.sendid = reqCopy.sendid; - _interpreter->receiveInternal(error); + std::string sessionId = target.substr(8); - } - } else if (iequals(reqCopy.target, "#_parent")) { - /** - * #_parent: If the target is the special term '#_parent', the Processor must - * add the event to the external event queue of the SCXML session that invoked - * the sending session, if there is one. - */ - if (_interpreter->_parentQueue != NULL) { - _interpreter->_parentQueue->push(reqCopy); + std::lock_guard lock(_interpreter->_instanceMutex); + std::map > instances = InterpreterImpl::getInstances(); + if (instances.find(sessionId) != instances.end()) { + std::shared_ptr otherSession = instances[sessionId].lock(); + if (otherSession) { + otherSession->enqueueExternal(eventCopy); + } else { + ERROR_COMMUNICATION_THROW("Can not send to scxml session " + sessionId + " - not known"); + } } else { - ERROR_COMMUNICATION(error, "Can not send to parent, we were not invoked or no parent queue is set"); - error.sendid = reqCopy.sendid; - _interpreter->receiveInternal(error); + ERROR_COMMUNICATION_THROW("Invalid target scxml session for send"); } - } else if (boost::starts_with(reqCopy.target, "#_")) { + + } else if (target.length() > 2 && iequals(target.substr(0, 2), "#_")) { /** * #_invokeid: If the target is the special term '#_invokeid', where invokeid * is the invokeid of an SCXML session that the sending session has created * by , the Processor must add the event to the external queue of that * session. */ - std::string invokeId = reqCopy.target.substr(2, reqCopy.target.length() - 2); + std::string invokeId = target.substr(2); if (_interpreter->_invokers.find(invokeId) != _interpreter->_invokers.end()) { - tthread::lock_guard lock(_interpreter->_mutex); + std::lock_guard lock(_interpreter->_instanceMutex); try { - _interpreter->_invokers[invokeId].send(reqCopy); + _interpreter->_invokers[invokeId].eventFromSCXML(eventCopy); } catch(Event e) { // Is this the right thing to do? - _interpreter->receive(e); +// _interpreter->enqueueExternal(eventCopy); } catch (const std::exception &e) { - LOG(ERROR) << "Exception caught while sending event to invoker " << invokeId << ": " << e.what(); + ERROR_COMMUNICATION_THROW("Exception caught while sending event to invoker '" + invokeId + "': " + e.what()); } catch(...) { - LOG(ERROR) << "Exception caught while sending event to invoker " << invokeId; + ERROR_COMMUNICATION_THROW("Exception caught while sending event to invoker '" + invokeId + "'"); } } else { - ERROR_COMMUNICATION(error, "Can not send to invoked component '" + invokeId + "', no such invokeId"); - error.sendid = reqCopy.sendid; - _interpreter->receiveInternal(error); + ERROR_COMMUNICATION_THROW("Can not send to invoked component '" + invokeId + "', no such invokeId"); } } else { - URL target(reqCopy.target); - if (target.isAbsolute()) { - BasicHTTPIOProcessor::send(reqCopy); - } else { - ERROR_EXECUTION(error, "Not sure what to make of the target '" + reqCopy.target + "' - raising error"); - error.sendid = reqCopy.sendid; - // test 159 still fails -// _interpreter->receiveInternal(error); - throw error; - } + ERROR_COMMUNICATION_THROW("Not sure what to make of the target '" + target + "' - raising error"); } } diff --git a/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.h b/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.h index 3eca2db..3b08e30 100644 --- a/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.h +++ b/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.h @@ -20,19 +20,15 @@ #ifndef SCXMLIOProcessor_H_2CUY93KU #define SCXMLIOProcessor_H_2CUY93KU -#include "uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h" - -#ifdef BUILD_AS_PLUGINS -#include "uscxml/plugins/Plugins.h" -#endif +#include "uscxml/plugins/IOProcessor.h" namespace uscxml { -class SCXMLIOProcessor : public BasicHTTPIOProcessor { +class SCXMLIOProcessor : public IOProcessorImpl { public: SCXMLIOProcessor(); virtual ~SCXMLIOProcessor(); - virtual boost::shared_ptr create(uscxml::InterpreterImpl* interpreter); + virtual std::shared_ptr create(uscxml::InterpreterImpl* interpreter); virtual std::list getNames() { std::list names; @@ -41,9 +37,12 @@ public: return names; } - virtual void send(const SendRequest& req); + virtual void eventFromSCXML(const std::string& target, const Event& event); + virtual bool isValidTarget(const std::string& target); Data getDataModelVariables(); +protected: + InterpreterImpl* _interpreter; }; #ifdef BUILD_AS_PLUGINS diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp index 6f2347c..cb80ec4 100644 --- a/src/uscxml/server/HTTPServer.cpp +++ b/src/uscxml/server/HTTPServer.cpp @@ -25,9 +25,8 @@ #include #endif -#include "uscxml/server/HTTPServer.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/dom/NameSpacingParser.h" +#include "HTTPServer.h" +#include "uscxml/util/DOM.h" #include #include @@ -41,7 +40,7 @@ extern "C" { #include } -#include +#include #include #ifndef _WIN32 @@ -53,16 +52,8 @@ extern "C" { //#include #endif -#if (defined EVENT_SSL_FOUND && defined OPENSSL_FOUND && defined OPENSSL_HAS_ELIPTIC_CURVES) -#include -#include -#include -#include -#include -#endif -#include "uscxml/Message.h" -#include "uscxml/Convenience.h" // for toStr +#include "uscxml/util/Convenience.h" // for toStr #ifdef BUILD_AS_PLUGINS #include @@ -100,9 +91,9 @@ HTTPServer::HTTPServer(unsigned short port, unsigned short wsPort, SSLConfig* ss evhttp_set_allowed_methods(_http, allowedMethods); // allow all methods if (_port > 0) { - _httpHandle = evhttp_bind_socket_with_handle(_http, INADDR_ANY, _port); + _httpHandle = evhttp_bind_socket_with_handle(_http, NULL, _port); if (_httpHandle) { - DLOG(INFO) << "HTTP server listening on tcp/" << _port; + LOG(INFO) << "HTTP server listening on tcp/" << _port; } else { LOG(ERROR) << "HTTP server cannot bind to tcp/" << _port; } @@ -112,7 +103,7 @@ HTTPServer::HTTPServer(unsigned short port, unsigned short wsPort, SSLConfig* ss if (_wsPort > 0) { _wsHandle = evws_bind_socket(_evws, _wsPort); if (_wsHandle) { - DLOG(INFO) << "WebSocket server listening on tcp/" << _wsPort; + LOG(INFO) << "WebSocket server listening on tcp/" << _wsPort; } else { LOG(ERROR) << "WebSocket server cannot bind to tcp/" << _wsPort; } @@ -178,10 +169,10 @@ HTTPServer::~HTTPServer() { } HTTPServer* HTTPServer::_instance = NULL; -tthread::recursive_mutex HTTPServer::_instanceMutex; +std::recursive_mutex HTTPServer::_instanceMutex; HTTPServer* HTTPServer::getInstance(unsigned short port, unsigned short wsPort, SSLConfig* sslConf) { -// tthread::lock_guard lock(_instanceMutex); +// std::lock_guard lock(_instanceMutex); if (_instance == NULL) { #ifdef _WIN32 WSADATA wsaData; @@ -247,7 +238,7 @@ void HTTPServer::wsRecvReqCallback(struct evws_connection *conn, struct evws_fra // try with the handler registered for path first bool answered = false; if (callbackData != NULL) - answered = ((WebSocketServlet*)callbackData)->wsRecvRequest(conn, wsFrame); + answered = ((WebSocketServlet*)callbackData)->requestFromWS(conn, wsFrame); if (!answered) HTTPServer::getInstance()->processByMatchingServlet(conn, wsFrame); @@ -415,12 +406,13 @@ void HTTPServer::httpRecvReqCallback(struct evhttp_request *req, void *callbackD request.data.compound["content"] = json; } } else if (iequals(contentType.substr(0, 15), "application/xml")) { - NameSpacingParser parser = NameSpacingParser::fromXML(request.data.compound["content"].atom); - if (parser.errorsReported()) { - LOG(ERROR) << "Cannot parse contents of HTTP request as XML"; - } else { - request.data.compound["content"].node = parser.getDocument().getDocumentElement(); - } + assert(0); +// NameSpacingParser parser = NameSpacingParser::fromXML(request.data.compound["content"].atom); +// if (parser.errorsReported()) { +// LOG(ERROR) << "Cannot parse contents of HTTP request as XML"; +// } else { +// request.data.compound["content"].node = parser.getDocument().getDocumentElement(); +// } } } @@ -429,7 +421,7 @@ void HTTPServer::httpRecvReqCallback(struct evhttp_request *req, void *callbackD // try with the handler registered for path first bool answered = false; if (callbackData != NULL) - answered = ((HTTPServlet*)callbackData)->httpRecvRequest(request); + answered = ((HTTPServlet*)callbackData)->requestFromHTTP(request); if (!answered) HTTPServer::getInstance()->processByMatchingServlet(request); @@ -437,7 +429,7 @@ void HTTPServer::httpRecvReqCallback(struct evhttp_request *req, void *callbackD void HTTPServer::processByMatchingServlet(const Request& request) { - tthread::lock_guard lock(_mutex); + std::lock_guard lock(_mutex); http_servlet_iter_t servletIter = _httpServlets.begin(); @@ -459,7 +451,7 @@ void HTTPServer::processByMatchingServlet(const Request& request) { // process by best matching servlet until someone feels responsible std::map::iterator matchesIter = matches.begin(); while(matchesIter != matches.end()) { - if (matchesIter->second->httpRecvRequest(request)) { + if (matchesIter->second->requestFromHTTP(request)) { return; } matchesIter++; @@ -470,7 +462,7 @@ void HTTPServer::processByMatchingServlet(const Request& request) { } void HTTPServer::processByMatchingServlet(evws_connection* conn, const WSFrame& frame) { - tthread::lock_guard lock(_mutex); + std::lock_guard lock(_mutex); ws_servlet_iter_t servletIter = _wsServlets.begin(); @@ -490,7 +482,7 @@ void HTTPServer::processByMatchingServlet(evws_connection* conn, const WSFrame& // process by best matching servlet until someone feels responsible std::map::iterator matchesIter = matches.begin(); while(matchesIter != matches.end()) { - if (matchesIter->second->wsRecvRequest(conn, frame)) { + if (matchesIter->second->requestFromWS(conn, frame)) { return; } matchesIter++; @@ -568,10 +560,11 @@ bool HTTPServer::registerServlet(const std::string& path, HTTPServlet* servlet) HTTPServer* INSTANCE = getInstance(); if (!INSTANCE->_httpHandle) { + LOG(INFO) << "Registering at unstarted HTTP Server"; return true; // this is the culprit! } - tthread::lock_guard lock(INSTANCE->_mutex); + std::lock_guard lock(INSTANCE->_mutex); // remove trailing and leading slash std::string actualPath = path; @@ -596,7 +589,7 @@ bool HTTPServer::registerServlet(const std::string& path, HTTPServlet* servlet) servlet->setURL(servletURL.str()); INSTANCE->_httpServlets[suffixedPath] = servlet; - DLOG(INFO) << "HTTP Servlet listening at: " << servletURL.str() << std::endl; +// LOG(INFO) << "HTTP Servlet listening at: " << servletURL.str(); // register callback evhttp_set_cb(INSTANCE->_http, ("/" + suffixedPath).c_str(), HTTPServer::httpRecvReqCallback, servlet); @@ -606,7 +599,7 @@ bool HTTPServer::registerServlet(const std::string& path, HTTPServlet* servlet) void HTTPServer::unregisterServlet(HTTPServlet* servlet) { HTTPServer* INSTANCE = getInstance(); - tthread::lock_guard lock(INSTANCE->_mutex); + std::lock_guard lock(INSTANCE->_mutex); http_servlet_iter_t servletIter = INSTANCE->_httpServlets.begin(); while(servletIter != INSTANCE->_httpServlets.end()) { if (servletIter->second == servlet) { @@ -624,7 +617,7 @@ bool HTTPServer::registerServlet(const std::string& path, WebSocketServlet* serv if (!INSTANCE->_wsHandle) return true; - tthread::lock_guard lock(INSTANCE->_mutex); + std::lock_guard lock(INSTANCE->_mutex); // remove trailing and leading slash std::string actualPath = path; @@ -660,7 +653,7 @@ bool HTTPServer::registerServlet(const std::string& path, WebSocketServlet* serv void HTTPServer::unregisterServlet(WebSocketServlet* servlet) { HTTPServer* INSTANCE = getInstance(); - tthread::lock_guard lock(INSTANCE->_mutex); + std::lock_guard lock(INSTANCE->_mutex); ws_servlet_iter_t servletIter = INSTANCE->_wsServlets.begin(); while(servletIter != INSTANCE->_wsServlets.end()) { if (servletIter->second == servlet) { @@ -696,7 +689,7 @@ std::string HTTPServer::getBaseURL(ServerType type) { void HTTPServer::start() { _isRunning = true; - _thread = new tthread::thread(HTTPServer::run, this); + _thread = new std::thread(HTTPServer::run, this); } void HTTPServer::run(void* instance) { @@ -704,7 +697,7 @@ void HTTPServer::run(void* instance) { while(INSTANCE->_isRunning) { event_base_dispatch(INSTANCE->_base); } - LOG(INFO) << "HTTP Server stopped" << std::endl; + LOG(INFO) << "HTTP Server stopped"; } void HTTPServer::determineAddress() { diff --git a/src/uscxml/server/HTTPServer.h b/src/uscxml/server/HTTPServer.h index 7fedd83..a584360 100644 --- a/src/uscxml/server/HTTPServer.h +++ b/src/uscxml/server/HTTPServer.h @@ -24,6 +24,8 @@ #include // for map, map<>::iterator, etc #include // for string, operator< +#include +#include extern "C" { #include "event2/util.h" // for evutil_socket_t @@ -32,8 +34,7 @@ extern "C" { } #include "uscxml/Common.h" // for USCXML_API -#include "uscxml/Message.h" // for Data, Event -#include "uscxml/concurrency/tinythread.h" // for recursive_mutex, etc +#include "uscxml/messages/Event.h" // for Data, Event #include "uscxml/config.h" // for OPENSSL_FOUND namespace uscxml { @@ -54,14 +55,7 @@ public: } }; - class WSFrame : public Event { - public: - WSFrame() : evwsConn(NULL) {} - std::string content; - struct evws_connection* evwsConn; - }; - - class SSLConfig { + class USCXML_API SSLConfig { public: SSLConfig() : port(8443) {} std::string privateKey; @@ -69,7 +63,14 @@ public: unsigned short port; }; - class Reply { + class WSFrame : public Event { + public: + WSFrame() : evwsConn(NULL) {} + std::string content; + struct evws_connection* evwsConn; + }; + + class USCXML_API Reply { public: Reply() : status(200), type("get"), evhttpReq(NULL) {} Reply(Request req) : status(200), type(req.data.compound["type"].atom), evhttpReq(req.evhttpReq) {} @@ -140,7 +141,7 @@ private: }; }; - HTTPServer(unsigned short port, unsigned short wsPort, SSLConfig* sslConf = NULL); + HTTPServer(unsigned short port, unsigned short wsPort, SSLConfig* sslConf); virtual ~HTTPServer(); void start(); @@ -178,9 +179,9 @@ private: static HTTPServer* _instance; - static tthread::recursive_mutex _instanceMutex; - tthread::thread* _thread; - tthread::recursive_mutex _mutex; + static std::recursive_mutex _instanceMutex; + std::thread* _thread; + std::recursive_mutex _mutex; bool _isRunning; friend class HTTPServlet; @@ -199,7 +200,7 @@ private: class USCXML_API HTTPServlet { public: virtual ~HTTPServlet() {} - virtual bool httpRecvRequest(const HTTPServer::Request& request) = 0; + virtual bool requestFromHTTP(const HTTPServer::Request& request) = 0; virtual void setURL(const std::string& url) = 0; /// Called by the server with the actual URL virtual bool canAdaptPath() { return true; @@ -209,7 +210,7 @@ public: class USCXML_API WebSocketServlet { public: virtual ~WebSocketServlet() {} - virtual bool wsRecvRequest(struct evws_connection *conn, const HTTPServer::WSFrame& frame) = 0; + virtual bool requestFromWS(struct evws_connection *conn, const HTTPServer::WSFrame& frame) = 0; virtual void setURL(const std::string& url) = 0; /// Called by the server with the actual URL virtual bool canAdaptPath() { return true; diff --git a/src/uscxml/server/InterpreterServlet.cpp b/src/uscxml/server/InterpreterServlet.cpp deleted file mode 100644 index 285add9..0000000 --- a/src/uscxml/server/InterpreterServlet.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "InterpreterServlet.h" -#include "uscxml/Interpreter.h" -#include -#include - -namespace uscxml { - -InterpreterHTTPServlet::~InterpreterHTTPServlet() { - HTTPServer::unregisterServlet(this); -} - -InterpreterHTTPServlet::InterpreterHTTPServlet(InterpreterImpl* interpreter) { - _interpreter = interpreter; - - std::stringstream path; - path << _interpreter->getName(); - int i = 2; - while(!HTTPServer::registerServlet(path.str(), this)) { - path.clear(); - path.str(); - path << _interpreter->getName() << i++; - } - _path = path.str(); -} - -boost::shared_ptr InterpreterHTTPServlet::create(InterpreterImpl* interpreter) { - // we instantiate directly in Interpreter - boost::shared_ptr io = boost::shared_ptr(new InterpreterHTTPServlet(interpreter)); - return io; -} - -bool InterpreterHTTPServlet::httpRecvRequest(const HTTPServer::Request& req) { - tthread::lock_guard lock(_mutex); - - // evhttp_request_own(req.curlReq); - - _requests[toStr((uintptr_t)req.evhttpReq)] = req; - - Event event = req; - - event.name = "http." + event.data.compound["type"].atom; - event.origin = toStr((uintptr_t)req.evhttpReq); - - if (!event.data.compound["content"].empty()) { - if (event.data.compound["content"].compound.size() > 0) { - std::map::iterator compoundIter = event.data.compound["content"].compound.begin(); - while(compoundIter != event.data.compound["content"].compound.end()) { -// std::cout << compoundIter->second.atom << std::endl; - Data json = Data::fromJSON(compoundIter->second.atom); - if (!json.empty()) { -// std::cout << Data::toJSON(json) << std::endl; - compoundIter->second = json; - } - compoundIter++; - } - } - } - - _interpreter->receive(event); - return true; -} - -Data InterpreterHTTPServlet::getDataModelVariables() { - Data data; - if(_url.length() > 0) - data.compound["location"] = Data(_url, Data::VERBATIM); - return data; -} - -void InterpreterHTTPServlet::send(const SendRequest& req) { - LOG(ERROR) << "send not supported by http iorprocessor, use the fetch element"; -} - -InterpreterWebSocketServlet::~InterpreterWebSocketServlet() { - HTTPServer::unregisterServlet(this); -} - -InterpreterWebSocketServlet::InterpreterWebSocketServlet(InterpreterImpl* interpreter) { - _interpreter = interpreter; - - std::stringstream path; - path << _interpreter->getName(); - int i = 2; - while(!HTTPServer::registerServlet(path.str(), this)) { - path.clear(); - path.str(); - path << _interpreter->getName() << i++; - } - _path = path.str(); -} - -boost::shared_ptr InterpreterWebSocketServlet::create(InterpreterImpl* interpreter) { - // we instantiate directly in Interpreter - boost::shared_ptr io = boost::shared_ptr(new InterpreterWebSocketServlet(interpreter)); - return io; -} - -bool InterpreterWebSocketServlet::wsRecvRequest(struct evws_connection *conn, const HTTPServer::WSFrame& frame) { - tthread::lock_guard lock(_mutex); - - // evhttp_request_own(req.curlReq); - - _requests[toStr((uintptr_t)conn)] = conn; - - Event event = frame; - - event.name = "ws." + event.data.compound["type"].atom; - event.origin = toStr((uintptr_t)conn); - - if (event.data.compound["type"].atom.compare("text") == 0 && !event.data.compound["content"].empty()) { - if (event.data.compound["content"].compound.size() > 0) { - std::map::iterator compoundIter = event.data.compound["content"].compound.begin(); - while(compoundIter != event.data.compound["content"].compound.end()) { - Data json = Data::fromJSON(compoundIter->second.atom); - if (!json.empty()) { - compoundIter->second = json; - } - compoundIter++; - } - } - } - - _interpreter->receive(event); - return true; -} - -Data InterpreterWebSocketServlet::getDataModelVariables() { - Data data; - if(_url.length() > 0) - data.compound["location"] = Data(_url, Data::VERBATIM); - return data; -} - -void InterpreterWebSocketServlet::send(const SendRequest& req) { - - if (req.data.empty()) { - LOG(WARNING) << "No content given to send on websocket!"; - return; - } - - if (_requests.find(req.target) != _requests.end()) { - // send data to the given connection - if (false) { - } else if (req.data.binary) { - HTTPServer::wsSend(_requests[req.target], - EVWS_BINARY_FRAME, - req.data.binary.getData(), - req.data.binary.getSize()); - } else if (req.data.node) { - std::stringstream ssXML; - ssXML << req.data.node; - std::string data = ssXML.str(); - HTTPServer::wsSend(_requests[req.target], - EVWS_TEXT_FRAME, - data.c_str(), - data.length()); - } else if (!req.data.empty()) { - std::string data = Data::toJSON(req.data); - HTTPServer::wsSend(_requests[req.target], - EVWS_TEXT_FRAME, - data.c_str(), - data.length()); - } else { - LOG(WARNING) << "Not sure what to make off content given to send on websocket!"; - } - } else if(req.target.size() && req.target.compare(0, 1, "/") == 0) { - // broadcast to the given path - if (false) { - } else if (req.data.binary) { - HTTPServer::wsBroadcast(req.target.c_str(), - EVWS_BINARY_FRAME, - req.data.binary.getData(), - req.data.binary.getSize()); - } else if (req.data.node) { - std::stringstream ssXML; - ssXML << req.data.node; - std::string data = ssXML.str(); - HTTPServer::wsBroadcast(req.target.c_str(), - EVWS_TEXT_FRAME, - data.c_str(), - data.length()); - } else if (!req.data.empty()) { - std::string data = Data::toJSON(req.data); - HTTPServer::wsBroadcast(req.target.c_str(), - EVWS_TEXT_FRAME, - data.c_str(), - data.length()); - } else { - LOG(WARNING) << "Not sure what to make off content given to broadcast on websocket!"; - } - } else { - LOG(WARNING) << "Invalid target for websocket"; - } -} - -} \ No newline at end of file diff --git a/src/uscxml/server/InterpreterServlet.h b/src/uscxml/server/InterpreterServlet.h deleted file mode 100644 index 436574b..0000000 --- a/src/uscxml/server/InterpreterServlet.h +++ /dev/null @@ -1,135 +0,0 @@ -/** - * @file - * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef INTERPRETERSERVLET_H_XQLWNMH4 -#define INTERPRETERSERVLET_H_XQLWNMH4 - -#include "HTTPServer.h" -#include "uscxml/messages/SendRequest.h" // for SendRequest -#include "uscxml/plugins/IOProcessor.h" // for IOProcessorImpl - -namespace uscxml { - -class InterpreterImpl; - -class InterpreterHTTPServlet : public HTTPServlet, public IOProcessorImpl { -public: - InterpreterHTTPServlet() {}; - InterpreterHTTPServlet(InterpreterImpl* interpreter); - virtual ~InterpreterHTTPServlet(); - - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("http"); - names.push_back("http://www.w3.org/TR/scxml/#HTTPEventProcessor"); - return names; - } - - Data getDataModelVariables(); - virtual void send(const SendRequest& req); - - virtual bool httpRecvRequest(const HTTPServer::Request& req); - - std::string getPath() { - return _path; - } - std::string getURL() { - return _url; - } - void setURL(const std::string& url) { - _url = url; - } - bool canAdaptPath() { - return false; - } - - - std::map& getRequests() { - return _requests; - } - tthread::recursive_mutex& getMutex() { - return _mutex; - } - -protected: - InterpreterImpl* _interpreter; - - tthread::recursive_mutex _mutex; - std::map _requests; - std::string _path; - std::string _url; - -}; - -class InterpreterWebSocketServlet : public WebSocketServlet, public IOProcessorImpl { -public: - InterpreterWebSocketServlet() {}; - InterpreterWebSocketServlet(InterpreterImpl* interpreter); - virtual ~InterpreterWebSocketServlet(); - - virtual boost::shared_ptr create(InterpreterImpl* interpreter); - - virtual std::list getNames() { - std::list names; - names.push_back("websocket"); - names.push_back("http://www.w3.org/TR/scxml/#WebSocketEventProcessor"); - return names; - } - - Data getDataModelVariables(); - virtual void send(const SendRequest& req); - - virtual bool wsRecvRequest(struct evws_connection *conn, const HTTPServer::WSFrame& frame); - - std::string getPath() { - return _path; - } - std::string getURL() { - return _url; - } - void setURL(const std::string& url) { - _url = url; - } - bool canAdaptPath() { - return false; - } - - std::map& getRequests() { - return _requests; - } - tthread::recursive_mutex& getMutex() { - return _mutex; - } - -protected: - InterpreterImpl* _interpreter; - - tthread::recursive_mutex _mutex; - std::map _requests; - std::string _path; - std::string _url; - -}; - -} - - -#endif /* end of include guard: INTERPRETERSERVLET_H_XQLWNMH4 */ diff --git a/src/uscxml/server/Socket.cpp b/src/uscxml/server/Socket.cpp deleted file mode 100644 index 35b416e..0000000 --- a/src/uscxml/server/Socket.cpp +++ /dev/null @@ -1,389 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "Socket.h" - -#include "uscxml/Common.h" // for Data, Event -#include "uscxml/Message.h" // for Data, Event -#include "uscxml/config.h" // for OPENSSL_FOUND - -#ifndef _WIN32 -#include /* For socket functions */ -#include // inet_addr -#endif - -#include /* For fcntl */ -#include - -namespace uscxml { - -// see: http://codepad.org/XRJAVg5m -Socket::Socket(int domain, int type, int protocol) { - - _base = EventBase::get("sockets"); - _blockSizeRead = 1024; - - if (!_base) - throw std::runtime_error("Cannot get eventbase"); - - _sin.sin_family = domain; - _socketFD = socket(domain, type, protocol); - - if (_socketFD == -1) - throw std::runtime_error(std::string("socket: ") + strerror(errno)); - -} - -Socket::~Socket() { - if (_socketFD > 0) -#ifdef WIN32 - closesocket(_socketFD); -#else - close(_socketFD); -#endif -} - -void Socket::setupSockAddr(const std::string& address, int port) { - - if (address == "*") { - _sin.sin_addr.s_addr = 0; - } else { - struct hostent *he = NULL; - if ( (he = gethostbyname(address.c_str()) ) != NULL ) { - memcpy(&_sin.sin_addr, he->h_addr_list[0], he->h_length); - } else { - _sin.sin_addr.s_addr = inet_addr(address.c_str()); - } - if (_sin.sin_addr.s_addr == INADDR_NONE) - throw std::runtime_error(std::string("inet_addr: ") + strerror(errno)); - } - - _sin.sin_port = htons(port); -} - -void Socket::setBlockSizeRead(size_t size) { -// tthread::lock_guard lock(_mutex); - _blockSizeRead = size; -} - -void Socket::parseAddress(const std::string& address, std::string& protocol, std::string& hostName, uint16_t& port) { - // tcp://hostname:port - size_t protEnd = address.find("://"); - if (protEnd != std::string::npos) { - protocol = address.substr(0, protEnd); - protEnd += 3; - } else { - protocol = "tcp"; - protEnd = 0; - } - - size_t hostEnd = address.find(":", protEnd); - if (hostEnd != std::string::npos) { - hostName = address.substr(protEnd, hostEnd - protEnd); - hostEnd += 1; - } else { - hostName = "127.0.0.1"; - hostEnd = protEnd; - } - - if (hostEnd < address.size()) { - port = strTo(address.substr(hostEnd)); - } else { - port = 0; - } -} - - -ClientSocket::ClientSocket(int domain, int type, int protocol) : Socket(domain, type, protocol), _clientEvent(NULL) { -} - - -ClientSocket::~ClientSocket() { - if (_clientEvent) { - bufferevent_enable(_clientEvent, 0); - bufferevent_free(_clientEvent); - } -} - -void ClientSocket::errorCallback(struct bufferevent *bev, short error, void *ctx) { -// ClientSocket* instance = (ClientSocket*)ctx; - // tthread::lock_guard lock(instance->_mutex); - - if (error & BEV_EVENT_READING) { - std::cout << "ClientSocket: error encountered while reading" << std::endl; - } else if (error & BEV_EVENT_WRITING) { - std::cout << "ClientSocket: error encountered while writing" << std::endl; - } else if (error & BEV_EVENT_EOF) { - std::cout << "ClientSocket: eof file reached" << std::endl; - } else if (error & BEV_EVENT_ERROR) { - std::cout << "ClientSocket: unrecoverable error encountered" << std::endl; - } else if (error & BEV_EVENT_TIMEOUT) { - std::cout << "ClientSocket: user-specified timeout reached" << std::endl; - } else if (error & BEV_EVENT_CONNECTED) { - std::cout << "ClientSocket: connect operation finished" << std::endl; - } - - // bufferevent_free(bev); -} - -void ClientSocket::connect(const std::string& address) { - std::string _prot; - std::string _address; - uint16_t _port; - parseAddress(address, _prot, _address, _port); - connect(_address, _port); -} - -void ClientSocket::connect(const std::string& address, int port) { -// tthread::lock_guard lock(_mutex); - - setupSockAddr(address, port); - if(::connect(_socketFD, (struct sockaddr *)&_sin, sizeof _sin) != 0) { - throw std::runtime_error(std::string("connect: ") + strerror(errno)); - } - - _clientEvent = bufferevent_socket_new(_base->base, _socketFD, BEV_OPT_THREADSAFE); //BEV_OPT_THREADSAFE); - bufferevent_setcb(_clientEvent, ClientSocket::readCallback, NULL, ClientSocket::errorCallback, this); - bufferevent_enable(_clientEvent, EV_READ|EV_WRITE); -} - -int ClientSocket::write(const std::string& data) { - return write(data.data(), data.size()); -} - -int ClientSocket::write(const char* data, size_t size) { -// tthread::lock_guard lock(_mutex); - bufferevent_write(_clientEvent, data, size); - return size; -} - -void ClientSocket::readCallback(struct bufferevent *bev, void *ctx) { - ClientSocket* instance = (ClientSocket*)ctx; -// tthread::lock_guard lock(instance->_mutex); - - int n; - struct evbuffer* input; - char* data = (char*)malloc(instance->_blockSizeRead); - - input = bufferevent_get_input(bev); - - while((n = evbuffer_remove(input, data, instance->_blockSizeRead)) > 0) { - instance->readCallback(data, n); - } - free(data); -} - -std::set ServerSocket::_instances; - -ServerSocket::ServerSocket(int domain, int type, int protocol) : Socket(domain, type, protocol), _listenerEvent(NULL) { - _instances.insert(this); -} - -ServerSocket::~ServerSocket() { - tthread::lock_guard lock(_mutex); - - std::map::iterator connIter = _connections.begin(); - while(connIter != _connections.end()) { - bufferevent_enable(connIter->second.bufferEvent, 0); - bufferevent_setcb(connIter->second.bufferEvent, NULL, NULL, NULL, 0); - - bufferevent_free(connIter->second.bufferEvent); -#ifdef WIN32 - closesocket(connIter->second.fd); -#else - close(connIter->second.fd); -#endif - - connIter++; - } - - if (_listenerEvent) { - event_del(_listenerEvent); - event_free(_listenerEvent); - } - - _instances.erase(this); - -} - -void ServerSocket::errorCallback(struct bufferevent *bev, short error, void *ctx) { - ServerSocket* instance = (ServerSocket*)ctx; - tthread::lock_guard lock(instance->_mutex); - - if (_instances.find(instance) == _instances.end()) - return; - - if (error & BEV_EVENT_READING || error & BEV_EVENT_WRITING) { - // remote end close the connection - tthread::lock_guard lock(instance->_mutex); - std::map::iterator conn = instance->_connections.find(bev); - if (conn != instance->_connections.end()) { - bufferevent_enable(conn->second.bufferEvent, 0); - bufferevent_free(conn->second.bufferEvent); -#ifdef WIN32 - closesocket(conn->second.fd); -#else - close(conn->second.fd); -#endif - instance->_connections.erase(conn); - } - } else if (error & BEV_EVENT_EOF) { - std::cout << "ServerSocket: eof file reached" << std::endl; - } else if (error & BEV_EVENT_ERROR) { - std::cout << "ServerSocket: unrecoverable error encountered" << std::endl; - } else if (error & BEV_EVENT_TIMEOUT) { - std::cout << "ServerSocket: user-specified timeout reached" << std::endl; - } else if (error & BEV_EVENT_CONNECTED) { - std::cout << "ServerSocket: connect operation finished" << std::endl; - } - // bufferevent_free(bev); -} - -void ServerSocket::readCallback(struct bufferevent *bev, void *ctx) { - ServerSocket* instance = (ServerSocket*)ctx; - tthread::lock_guard lock(instance->_mutex); - - // instance is already gone - if (_instances.find(instance) == _instances.end()) - return; - - size_t n; - struct evbuffer* input; - char* data = (char*)malloc(instance->_blockSizeRead); - - input = bufferevent_get_input(bev); - while((n = evbuffer_remove(input, data, instance->_blockSizeRead)) > 0) { - instance->readCallback(data, n, instance->_connections[bev]); - } - free(data); -} - -void ServerSocket::bind() { - if (::bind(_socketFD, (struct sockaddr*)&_sin, sizeof(_sin)) < 0) { - throw std::runtime_error(std::string("bind: ") + strerror(errno)); - } -} - -void ServerSocket::listen(const std::string& address) { - std::string _prot; - std::string _address; - uint16_t _port; - parseAddress(address, _prot, _address, _port); - listen(_address, _port); -} - -void ServerSocket::listen(const std::string& address, int port) { -// tthread::lock_guard lock(_mutex); - setupSockAddr(address, port); - bind(); - - int one = 1; - if (setsockopt(_socketFD, SOL_SOCKET, SO_REUSEADDR, (const char*)&one, sizeof(one)) != 0) { - throw std::runtime_error(std::string("setsockopt: ") + strerror(errno)); - } - -#ifndef _WIN32 - int flags = fcntl(_socketFD, F_GETFL); - if (flags >= 0) { - flags |= O_NONBLOCK; - if (fcntl(_socketFD, F_SETFL, flags) < 0) { - // could not set to non-block - } - } -#else - unsigned long on = 1; - if (ioctlsocket(_socketFD, FIONBIO, &on) != 0) { - // could not set to non-block - } -#endif - - _listenerEvent = event_new(_base->base, _socketFD, EV_READ|EV_PERSIST, acceptCallback, (void*)this); - /*XXX check it */ - event_add(_listenerEvent, NULL); - - if (::listen(_socketFD, 16)<0) { - throw std::runtime_error(std::string("listen: ") + strerror(errno)); - } -} - -void ServerSocket::acceptCallback(evutil_socket_t listener, short event, void *ctx) { - ServerSocket* instance = (ServerSocket*)ctx; -// tthread::lock_guard lock(instance->_mutex); - - struct sockaddr_storage ss; - socklen_t slen = sizeof(ss); - int fd = accept(listener, (struct sockaddr*)&ss, &slen); - if (fd < 0) { - throw std::runtime_error(std::string("accept: ") + strerror(errno)); - } else if (fd > FD_SETSIZE) { -#ifdef WIN32 - closesocket(fd); -#else - close(fd); -#endif - - throw std::runtime_error(std::string("accept: ") + strerror(errno)); - } else { - struct bufferevent *bev; - evutil_make_socket_nonblocking(fd); - bev = bufferevent_socket_new(instance->_base->base, fd, BEV_OPT_THREADSAFE); //BEV_OPT_THREADSAFE - bufferevent_setcb(bev, ServerSocket::readCallback, NULL, ServerSocket::errorCallback, ctx); - bufferevent_enable(bev, EV_READ|EV_WRITE); - - instance->_connections[bev].bufferEvent = bev; - instance->_connections[bev].fd = fd; - } -} - -void ServerSocket::Connection::reply(const char* data, size_t size) { - bufferevent_write(bufferEvent, data, size); -} - -PacketServerSocket::~PacketServerSocket() { - for(std::map::iterator fragIter = _fragments.begin(); - fragIter != _fragments.end(); - fragIter++) { - delete fragIter->second; - } -} - -void PacketServerSocket::readCallback(const char* data, size_t size, Connection& conn) { - if (_fragments.find(conn) == _fragments.end()) - _fragments[conn] = new std::stringstream(); - - std::stringstream* fragment = _fragments[conn]; - *fragment << std::string(data, size); - - size_t startPos = 0; - size_t endPos; - const std::string& buffer = fragment->str(); - while((endPos = buffer.find(_sep, startPos)) != std::string::npos) { -// std::cout << ">" << buffer.substr(startPos, endPos - startPos) << "<" << std::endl; - readCallback(buffer.substr(startPos, endPos - startPos), conn); - startPos = endPos + _sep.size(); - } - if (startPos != 0 && startPos < buffer.size() + 1) { - std::string rest = buffer.substr(startPos); - fragment->str(std::string()); - fragment->clear(); - *fragment << rest; - } -} - -} diff --git a/src/uscxml/server/Socket.h b/src/uscxml/server/Socket.h deleted file mode 100644 index 01e91b2..0000000 --- a/src/uscxml/server/Socket.h +++ /dev/null @@ -1,139 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef SOCKETCLIENT_H_9A0B2A88 -#define SOCKETCLIENT_H_9A0B2A88 - -#include "uscxml/Common.h" // for USCXML_API -#include "uscxml/concurrency/EventBase.h" -#include -#include -#include -#include - -#ifdef _WIN32 -# include -#else -# include /* For sockaddr_in */ -#endif -#include - -#include "uscxml/concurrency/tinythread.h" // for recursive_mutex, etc - -extern "C" { -#include -#include -#include -} - -namespace uscxml { - -class USCXML_API Socket { -public: - Socket(int domain, int type, int protocol); - virtual ~Socket(); - - void setBlockSizeRead(size_t size); - static void parseAddress(const std::string& address, std::string& protocol, std::string& hostName, uint16_t& port); - -protected: - - void setupSockAddr(const std::string& address, int port); - - evutil_socket_t _socketFD; - - tthread::recursive_mutex _mutex; - size_t _blockSizeRead; - struct sockaddr_in _sin; - - boost::shared_ptr _base; -}; - -class USCXML_API ServerSocket : public Socket { -public: - class Connection { - public: - bool operator<(const Connection& other) const { - return bufferEvent < other.bufferEvent; - } - - struct bufferevent* bufferEvent; - int fd; - - void reply(const char* data, size_t size); - }; - - ServerSocket(int domain, int type, int protocol); - virtual ~ServerSocket(); - - void listen(const std::string& address, int port); - void listen(const std::string& address); - virtual void readCallback(const char* data, size_t size, Connection& conn) {}; - - -protected: - void bind(); - static void acceptCallback(evutil_socket_t listener, short event, void *ctx); - static void errorCallback(struct bufferevent *bev, short error, void *ctx); - static void readCallback(struct bufferevent *bev, void *ctx); - - std::map _connections; - struct event* _listenerEvent; - - static std::set _instances; - -}; - -class USCXML_API PacketServerSocket : public ServerSocket { -public: - PacketServerSocket(int domain, int type, int protocol, const std::string& sep) : ServerSocket(domain, type, protocol), _sep(sep) {} - virtual ~PacketServerSocket(); - - void readCallback(const char* data, size_t size, Connection& conn); - virtual void readCallback(const std::string& packet, Connection& conn) = 0; - -protected: - std::string _sep; - std::map _fragments; -}; - -class USCXML_API ClientSocket : public Socket { -public: - ClientSocket(int domain, int type, int protocol); - virtual ~ClientSocket(); - - virtual void readCallback(const char* data, size_t size) {}; - void connect(const std::string& address, int port); - void connect(const std::string& address); - int write(const std::string& data); - int write(const char* data, size_t size); - - -protected: - static void readCallback(struct bufferevent *bev, void *ctx); - static void errorCallback(struct bufferevent *bev, short error, void *ctx); - - struct bufferevent* _clientEvent; - -}; - - -} - -#endif /* end of include guard: SOCKETCLIENT_H_9A0B2A88 */ diff --git a/src/uscxml/transform/ChartAnnotator.cpp b/src/uscxml/transform/ChartAnnotator.cpp deleted file mode 100644 index 5bab391..0000000 --- a/src/uscxml/transform/ChartAnnotator.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @file - * @author 2012-2015 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "ChartAnnotator.h" - -namespace uscxml { - -} \ No newline at end of file diff --git a/src/uscxml/transform/ChartAnnotator.h b/src/uscxml/transform/ChartAnnotator.h deleted file mode 100644 index 3ce8f4a..0000000 --- a/src/uscxml/transform/ChartAnnotator.h +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @file - * @author 2012-2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef CHARTANNOTATOR_H_2AC11ECB -#define CHARTANNOTATOR_H_2AC11ECB - -namespace uscxml { - -} - -#endif /* end of include guard: CHARTANNOTATOR_H_2AC11ECB */ diff --git a/src/uscxml/transform/ChartToC.cpp b/src/uscxml/transform/ChartToC.cpp index cf4c175..896ef09 100644 --- a/src/uscxml/transform/ChartToC.cpp +++ b/src/uscxml/transform/ChartToC.cpp @@ -17,26 +17,24 @@ * @endcond */ -#include "uscxml/transform/ChartToFSM.h" #include "uscxml/transform/ChartToC.h" -#include "uscxml/debug/Complexity.h" -#include -#include #include -#include "uscxml/UUID.h" +#include "uscxml/util/UUID.h" +#include "uscxml/util/Predicates.h" #include "uscxml/util/MD5.hpp" -#include "uscxml/dom/DOMUtils.h" +#include "uscxml/util/DOM.h" +#include "uscxml/util/String.h" #include #include -#include +#include #include #include namespace uscxml { -using namespace Arabica::DOM; -using namespace Arabica::XPath; +using namespace xercesc; + // many more tricks: https://graphics.stanford.edu/~seander/bithacks.html @@ -46,10 +44,11 @@ Transformer ChartToC::transform(const Interpreter& other) { return boost::shared_ptr(c2c); } -ChartToC::ChartToC(const Interpreter& other) : TransformerImpl(), _topMostMachine(NULL), _parentMachine(NULL) { - cloneFrom(other.getImpl()); +ChartToC::ChartToC(const Interpreter& other) : TransformerImpl(other), _topMostMachine(NULL), _parentMachine(NULL) { + std::stringstream ss; ss << _document; + _md5 = md5(ss.str()); _prefix = "_uscxml_" + _md5.substr(0, 8); _allMachines.push_back(this); @@ -57,8 +56,6 @@ ChartToC::ChartToC(const Interpreter& other) : TransformerImpl(), _topMostMachin prepare(); findNestedMachines(); -// std::cout << _scxml; - if (_extensions.find("prefix") != _extensions.end()) { _prefixes = new std::list(); std::pair::iterator, @@ -72,61 +69,63 @@ ChartToC::ChartToC(const Interpreter& other) : TransformerImpl(), _topMostMachin void ChartToC::setHistoryCompletion() { std::set elements; - elements.insert(_nsInfo.xmlNSPrefix + "history"); - Arabica::XPath::NodeSet histories = DOMUtils::inPostFixOrder(elements, _scxml); - NodeSet covered; - NodeSet perParentcovered; - Node parent; + elements.insert(XML_PREFIX(_scxml).str() + "history"); + std::list histories = DOMUtils::inPostFixOrder(elements, _scxml); - for (size_t i = 0; i < histories.size(); i++) { - Element history(histories[i]); - NodeSet completion; + std::list covered; + std::list perParentcovered; + DOMNode* parent; - if (parent != history.getParentNode()) { - covered.push_back(perParentcovered); - perParentcovered = NodeSet(); - parent = history.getParentNode(); + for (auto histIter = histories.begin(); histIter != histories.end(); histIter++) { + DOMElement* history = *histIter; + std::list completion; + + if (parent != history->getParentNode()) { + covered.insert(covered.end(), perParentcovered.begin(), perParentcovered.end()); + perParentcovered.clear(); + parent = history->getParentNode(); } bool deep = (HAS_ATTR(history, "type") && iequals(ATTR(history, "type"), "deep")); - for (size_t j = 0; j < _states.size(); j++) { - if (_states[j] == history) + for (auto stateIter = _states.begin(); stateIter != _states.end(); stateIter++) { + DOMElement* state = *stateIter; + if (state == history) continue; - if (isDescendant(_states[j], history.getParentNode()) && isHistory(Element(_states[j]))) { - history.setAttribute("hasHistoryChild", "yes"); + if (DOMUtils::isDescendant(state, history->getParentNode()) && isHistory(state)) { + history->setAttribute(X("hasHistoryChild"), X("yes")); } - if (isMember(_states[j], covered)) + if (DOMUtils::isMember(state, covered)) continue; if (deep) { - if (isDescendant(_states[j], history.getParentNode()) && !isHistory(Element(_states[j]))) { - completion.push_back(_states[j]); + if (DOMUtils::isDescendant(state, history->getParentNode()) && !isHistory(state)) { + completion.push_back(state); } } else { - if (_states[j].getParentNode() == history.getParentNode() && !isHistory(Element(_states[j]))) { - completion.push_back(_states[j]); + if (state->getParentNode() == history->getParentNode() && !isHistory(state)) { + completion.push_back(state); } } } - perParentcovered.push_back(completion); + perParentcovered.insert(perParentcovered.end(), completion.begin(), completion.end()); std::string completionBools; for (size_t j = 0; j < _states.size(); j++) { - if (isMember(_states[j], completion)) { + if (DOMUtils::isMember(_states[j], completion)) { completionBools += "1"; } else { completionBools += "0"; } } - history.setAttribute("completionBools", completionBools); + history->setAttribute(X("completionBools"), X(completionBools)); } } -void ChartToC::resortStates(Arabica::DOM::Node& node) { - if (node.getNodeType() != Node_base::ELEMENT_NODE) +void ChartToC::resortStates(DOMNode* node) { + if (node->getNodeType() != DOMNode::ELEMENT_NODE) return; /** @@ -136,56 +135,56 @@ void ChartToC::resortStates(Arabica::DOM::Node& node) { everything else */ - Element element(node); + DOMElement* element = static_cast(node); // shallow history states to top - Node child = element.getFirstChild(); + DOMNode* child = element->getFirstChild(); while(child) { resortStates(child); - if (child.getNodeType() == Node_base::ELEMENT_NODE && - TAGNAME_CAST(child) == _nsInfo.xmlNSPrefix + "history" && + if (child->getNodeType() == DOMNode::ELEMENT_NODE && + TAGNAME_CAST(child) == XML_PREFIX(node).str() + "history" && (!HAS_ATTR(element, "type") || iequals(ATTR(element, "type"), "shallow"))) { - Node tmp = child.getNextSibling(); - if (child != element.getFirstChild()) { - element.insertBefore(child, element.getFirstChild()); + DOMNode* tmp = child->getNextSibling(); + if (child != element->getFirstChild()) { + element->insertBefore(child, element->getFirstChild()); } child = tmp; } else { - child = child.getNextSibling(); + child = child->getNextSibling(); } } // deep history states to top - child = element.getFirstChild(); + child = element->getFirstChild(); while(child) { resortStates(child); - if (child.getNodeType() == Node_base::ELEMENT_NODE && - TAGNAME_CAST(child) == _nsInfo.xmlNSPrefix + "history" && + if (child->getNodeType() == DOMNode::ELEMENT_NODE && + TAGNAME_CAST(child) == XML_PREFIX(node).str() + "history" && HAS_ATTR(element, "type") && iequals(ATTR(element, "type"), "deep")) { - Node tmp = child.getNextSibling(); - if (child != element.getFirstChild()) { - element.insertBefore(child, element.getFirstChild()); + DOMNode* tmp = child->getNextSibling(); + if (child != element->getFirstChild()) { + element->insertBefore(child, element->getFirstChild()); } child = tmp; } else { - child = child.getNextSibling(); + child = child->getNextSibling(); } } // initial states on top of histories even - child = element.getFirstChild(); + child = element->getFirstChild(); while(child) { resortStates(child); - if (child.getNodeType() == Node_base::ELEMENT_NODE && TAGNAME_CAST(child) == _nsInfo.xmlNSPrefix + "initial") { - Node tmp = child.getNextSibling(); - if (child != element.getFirstChild()) { - element.insertBefore(child, element.getFirstChild()); + if (child->getNodeType() == DOMNode::ELEMENT_NODE && TAGNAME_CAST(child) == XML_PREFIX(node).str() + "initial") { + DOMNode* tmp = child->getNextSibling(); + if (child != element->getFirstChild()) { + element->insertBefore(child, element->getFirstChild()); } child = tmp; } else { - child = child.getNextSibling(); + child = child->getNextSibling(); } } @@ -195,35 +194,36 @@ void ChartToC::setStateCompletion() { setHistoryCompletion(); for (size_t i = 0; i < _states.size(); i++) { - Element state(_states[i]); + DOMElement* state(_states[i]); if (isHistory(state)) { // we already did in setHistoryCompletion continue; } - NodeSet completion; + std::list completion; if (isParallel(state)) { completion = getChildStates(state); - } else if (state.hasAttribute("initial")) { - completion = getStates(tokenize(state.getAttribute("initial"))); + } else if (HAS_ATTR(state, "initial")) { + completion = getStates(tokenize(ATTR(state, "initial")), _scxml); } else { - NodeSet initElems = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "initial", state); - if(initElems.size() > 0 && !iequals(ATTR_CAST(initElems[0], "generated"), "true")) { + std::list initElems = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "initial", state); + if(initElems.size() > 0) { // initial element is first child - completion.push_back(initElems[0]); + completion.push_back(initElems.front()); } else { // first child state - Arabica::XPath::NodeSet initStates; - NodeList childs = state.getChildNodes(); - for (size_t i = 0; i < childs.getLength(); i++) { - if (childs.item(i).getNodeType() != Node_base::ELEMENT_NODE) + std::list initStates; + DOMNodeList* childs = state->getChildNodes(); + for (size_t i = 0; i < childs->getLength(); i++) { + if (childs->item(i)->getNodeType() != DOMNode::ELEMENT_NODE) continue; - if (isState(Element(childs.item(i)))) { - completion.push_back(childs.item(i)); + DOMElement* childElem = static_cast(childs->item(i)); + if (isState(childElem)) { + completion.push_back(childElem); break; } } @@ -232,47 +232,47 @@ void ChartToC::setStateCompletion() { std::string completionBools; for (size_t j = 0; j < _states.size(); j++) { - if (isMember(_states[j], completion)) { + if (DOMUtils::isMember(_states[j], completion)) { completionBools += "1"; } else { completionBools += "0"; } } - state.setAttribute("completionBools", completionBools); + state->setAttribute(X("completionBools"), X(completionBools)); } } void ChartToC::prepare() { - _binding = (HAS_ATTR(_scxml, "binding") && iequals(ATTR(_scxml, "binding"), "late") ? LATE : EARLY); - _name = (HAS_ATTR(_scxml, "name") ? ATTR(_scxml, "name") : ""); // make sure initial and history elements always precede propoer states resortStates(_scxml); std::set elements; - elements.insert(_nsInfo.xmlNSPrefix + "scxml"); - elements.insert(_nsInfo.xmlNSPrefix + "state"); - elements.insert(_nsInfo.xmlNSPrefix + "final"); - elements.insert(_nsInfo.xmlNSPrefix + "history"); - elements.insert(_nsInfo.xmlNSPrefix + "initial"); - elements.insert(_nsInfo.xmlNSPrefix + "parallel"); - _states = DOMUtils::inDocumentOrder(elements, _scxml); + elements.insert(XML_PREFIX(_scxml).str() + "scxml"); + elements.insert(XML_PREFIX(_scxml).str() + "state"); + elements.insert(XML_PREFIX(_scxml).str() + "final"); + elements.insert(XML_PREFIX(_scxml).str() + "history"); + elements.insert(XML_PREFIX(_scxml).str() + "initial"); + elements.insert(XML_PREFIX(_scxml).str() + "parallel"); + + std::list tmp = DOMUtils::inDocumentOrder(elements, _scxml); + _states.insert(_states.end(), tmp.begin(), tmp.end()); // set states' document order and parent attribute for (size_t i = 0; i < _states.size(); i++) { - Element state(_states[i]); - state.setAttribute("documentOrder", toStr(i)); - if (state.getParentNode().getNodeType() == Node_base::ELEMENT_NODE && - HAS_ATTR_CAST(state.getParentNode(), "documentOrder")) { - state.setAttribute("parent", ATTR_CAST(state.getParentNode(), "documentOrder")); + DOMElement* state(_states[i]); + state->setAttribute(X("documentOrder"), X(toStr(i))); + if (state->getParentNode()->getNodeType() == DOMNode::ELEMENT_NODE && + HAS_ATTR_CAST(state->getParentNode(), "documentOrder")) { + state->setAttribute(X("parent"), X(ATTR_CAST(state->getParentNode(), "documentOrder"))); } // set the states' children and whether it has a history std::string childBools; bool hasHistoryChild = false; for (size_t j = 0; j < _states.size(); j++) { - if (_states[j].getParentNode() == state) { - if (isHistory(Element(_states[j]))) { + if (_states[j]->getParentNode() == state) { + if (isHistory(static_cast(_states[j]))) { hasHistoryChild = true; } childBools += "1"; @@ -280,70 +280,74 @@ void ChartToC::prepare() { childBools += "0"; } } - state.setAttribute("childBools", childBools); + state->setAttribute(X("childBools"), X(childBools)); if (hasHistoryChild) { - state.setAttribute("hasHistoryChild", "yes"); + state->setAttribute(X("hasHistoryChild"), X("yes")); } // ancestors std::string ancBools; for (size_t j = 0; j < _states.size(); j++) { - if (isDescendant(state, _states[j])) { + if (DOMUtils::isDescendant(state, _states[j])) { ancBools += "1"; } else { ancBools += "0"; } } - state.setAttribute("ancBools", ancBools); + state->setAttribute(X("ancBools"), X(ancBools)); } + // set transitions' document order and source attribute elements.clear(); - elements.insert(_nsInfo.xmlNSPrefix + "transition"); - _transitions = DOMUtils::inDocumentOrder(elements, _scxml); - for (size_t i = 0; i < _transitions.size(); i++) { - Element transition(_transitions[i]); - transition.setAttribute("documentOrder", toStr(i)); - if (transition.getParentNode().getNodeType() == Node_base::ELEMENT_NODE && - HAS_ATTR_CAST(transition.getParentNode(), "documentOrder")) { - transition.setAttribute("source", ATTR_CAST(transition.getParentNode(), "documentOrder")); + elements.insert(XML_PREFIX(_scxml).str() + "transition"); + tmp = DOMUtils::inDocumentOrder(elements, _scxml); + size_t index = 0; + for (auto transIter = tmp.begin(); transIter != tmp.end(); transIter++, index++) { + DOMElement* transition = *transIter; + transition->setAttribute(X("documentOrder"), X(toStr(index))); + if (transition->getParentNode()->getNodeType() == DOMNode::ELEMENT_NODE && + HAS_ATTR_CAST(transition->getParentNode(), "documentOrder")) { + transition->setAttribute(X("source"), X(ATTR_CAST(transition->getParentNode(), "documentOrder"))); } } // set transitions' postfix order attribute - _transitions = DOMUtils::inPostFixOrder(elements, _scxml); + tmp = DOMUtils::inPostFixOrder(elements, _scxml); + _transitions.insert(_transitions.end(), tmp.begin(), tmp.end()); + for (size_t i = 0; i < _transitions.size(); i++) { - Element transition(_transitions[i]); - transition.setAttribute("postFixOrder", toStr(i)); + DOMElement* transition(_transitions[i]); + transition->setAttribute(X("postFixOrder"), X(toStr(i))); // and exit set std::string exitSetBools; - NodeSet exitSet = computeExitSet(transition); + std::list exitSet = getExitSet(transition, _scxml); for (unsigned int j = 0; j < _states.size(); j++) { - Element state(_states[j]); - if (isMember(state, exitSet)) { + DOMElement* state(_states[j]); + if (DOMUtils::isMember(state, exitSet)) { exitSetBools += "1"; } else { exitSetBools += "0"; } } - transition.setAttribute("exitSetBools", exitSetBools); + transition->setAttribute(X("exitSetBools"), X(exitSetBools)); // and conflicts std::string conflictBools; for (unsigned int j = 0; j < _transitions.size(); j++) { - Element t2(_transitions[j]); - if (hasIntersection(computeExitSet(transition), computeExitSet(t2)) || + DOMElement* t2(_transitions[j]); + if (DOMUtils::hasIntersection(getExitSet(transition, _scxml), getExitSet(t2, _scxml)) || (getSourceState(transition) == getSourceState(t2)) || - (isDescendant(getSourceState(transition), getSourceState(t2))) || - (isDescendant(getSourceState(t2), getSourceState(transition)))) { + (DOMUtils::isDescendant(getSourceState(transition), getSourceState(t2))) || + (DOMUtils::isDescendant(getSourceState(t2), getSourceState(transition)))) { conflictBools += "1"; } else { conflictBools += "0"; } } - transition.setAttribute("conflictBools", conflictBools); + transition->setAttribute(X("conflictBools"), X(conflictBools)); // and target if (HAS_ATTR(transition, "target")) { @@ -351,7 +355,7 @@ void ChartToC::prepare() { std::string targetBools; for (size_t j = 0; j < _states.size(); j++) { - Element state(_states[j]); + DOMElement* state(_states[j]); if (HAS_ATTR(state, "id") && std::find(targets.begin(), targets.end(), escape(ATTR(state, "id"))) != targets.end()) { @@ -360,7 +364,7 @@ void ChartToC::prepare() { targetBools += "0"; } } - transition.setAttribute("targetBools", targetBools); + transition->setAttribute(X("targetBools"), X(targetBools)); } } @@ -418,7 +422,7 @@ void ChartToC::writeTo(std::ostream& stream) { stream << "/**" << std::endl; stream << " Generated from source:" << std::endl; - stream << " " << _sourceURL.asString() << std::endl; + stream << " " << (std::string)_baseURL << std::endl; stream << "*/" << std::endl; stream << std::endl; @@ -452,13 +456,14 @@ void ChartToC::writeForwardDeclarations(std::ostream& stream) { } void ChartToC::findNestedMachines() { - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _scxml, true); + std::list invokes = DOMUtils::filterChildElements(XML_PREFIX(_scxml).str() + "invoke", _scxml, true); + + for (auto invIter = invokes.begin(); invIter != invokes.end(); invIter++) { + DOMElement* invoke = *invIter; - for (size_t i = 0; i < invokes.size(); i++) { - if(isInEmbeddedDocument(invokes[i])) + if(isInEmbeddedDocument(invoke)) continue; - Element invoke(invokes[i]); if (HAS_ATTR(invoke, "type") && ATTR(invoke, "type") != "scxml" && ATTR(invoke, "type") != "http://www.w3.org/TR/scxml/") @@ -466,31 +471,28 @@ void ChartToC::findNestedMachines() { ChartToC* c2c = NULL; if (HAS_ATTR(invoke, "src")) { + URL srcURL(ATTR(invoke, "src")); - if (!srcURL.toAbsolute(getBaseURLForNode(invoke))) { - LOG(ERROR) << "invoke element has relative src URL with no baseURL set."; - return; + if (!srcURL.isAbsolute()) { + srcURL = URL::resolve(srcURL, _baseURL); } - c2c = new ChartToC(Interpreter::fromURL(srcURL.asString())); + std::string tmp = (std::string)srcURL; + c2c = new ChartToC(Interpreter::fromURL(tmp)); } else { // is there a nested scxml machine inside? - NodeSet contents = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", invoke); + std::list contents = DOMUtils::filterChildElements(XML_PREFIX(invoke).str() + "content", invoke); if (contents.size() == 0) continue; - NodeSet scxmls = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "scxml", contents[0]); + std::list scxmls = DOMUtils::filterChildElements(XML_PREFIX(invoke).str() + "scxml", contents.front()); if (scxmls.size() == 0) continue; - DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - Arabica::DOM::Document doc = domFactory.createDocument(_document.getNamespaceURI(), "", 0); - Node imported = doc.importNode(scxmls[0], true); - doc.appendChild(imported); -// std::cout << doc << std::endl; - c2c = new ChartToC(Interpreter::fromDOM(doc, _nsInfo, _sourceURL)); + c2c = new ChartToC(Interpreter::fromElement(scxmls.front(), _baseURL)); + c2c->_name += "." + DOMUtils::idForNode(scxmls.front()); } if (c2c != NULL) { - invoke.setAttribute("md5sum", c2c->_md5); + invoke->setAttribute(X("md5sum"), X(c2c->_md5)); ChartToC* topMostMachine = (_topMostMachine == NULL ? this : _topMostMachine); c2c->_topMostMachine = topMostMachine; c2c->_parentMachine = this; @@ -739,7 +741,7 @@ void ChartToC::writeTypes(std::ostream& stream) { stream << std::endl; stream << "/**" << std::endl; - stream << " * All information pertaining to a element." << std::endl; + stream << " * All information pertaining to a element->" << std::endl; stream << " * With late data binding, blocks of data elements are separated by NULL" << std::endl; stream << " * use USCXML_ELEM_DATA_IS_SET to test for end of a block." << std::endl; stream << " */" << std::endl; @@ -752,7 +754,7 @@ void ChartToC::writeTypes(std::ostream& stream) { stream << std::endl; stream << "/**" << std::endl; - stream << " * All information pertaining to an element." << std::endl; + stream << " * All information pertaining to an element->" << std::endl; stream << " */" << std::endl; stream << "struct uscxml_elem_assign {" << std::endl; stream << " const char* location;" << std::endl; @@ -762,7 +764,7 @@ void ChartToC::writeTypes(std::ostream& stream) { stream << std::endl; stream << "/**" << std::endl; - stream << " * All information pertaining to any state element." << std::endl; + stream << " * All information pertaining to any state element->" << std::endl; stream << " */" << std::endl; stream << "struct uscxml_state {" << std::endl; stream << " const char* name; /* eventual name */" << std::endl; @@ -770,32 +772,32 @@ void ChartToC::writeTypes(std::ostream& stream) { stream << " const exec_content_t on_entry; /* on entry handlers */" << std::endl; stream << " const exec_content_t on_exit; /* on exit handlers */" << std::endl; stream << " const invoke_t invoke; /* invocations */" << std::endl; - stream << " const char children[USCXML_MAX_NR_STATES_BYTES]; /* all children */" << std::endl; - stream << " const char completion[USCXML_MAX_NR_STATES_BYTES]; /* default completion */" << std::endl; - stream << " const char ancestors[USCXML_MAX_NR_STATES_BYTES]; /* all ancestors */" << std::endl; + stream << " const unsigned char children[USCXML_MAX_NR_STATES_BYTES]; /* all children */" << std::endl; + stream << " const unsigned char completion[USCXML_MAX_NR_STATES_BYTES]; /* default completion */" << std::endl; + stream << " const unsigned char ancestors[USCXML_MAX_NR_STATES_BYTES]; /* all ancestors */" << std::endl; stream << " const uscxml_elem_data* data; /* data with late binding */" << std::endl; stream << " const unsigned char type; /* One of USCXML_STATE_* */" << std::endl; stream << "};" << std::endl; stream << std::endl; stream << "/**" << std::endl; - stream << " * All information pertaining to a element." << std::endl; + stream << " * All information pertaining to a element->" << std::endl; stream << " */" << std::endl; stream << "struct uscxml_transition {" << std::endl; stream << " const USCXML_NR_STATES_TYPE source;" << std::endl; - stream << " const char target[USCXML_MAX_NR_STATES_BYTES];" << std::endl; + stream << " const unsigned char target[USCXML_MAX_NR_STATES_BYTES];" << std::endl; stream << " const char* event;" << std::endl; stream << " const char* condition;" << std::endl; stream << " const is_enabled_t is_enabled;" << std::endl; stream << " const exec_content_t on_transition;" << std::endl; stream << " const unsigned char type;" << std::endl; - stream << " const char conflicts[USCXML_MAX_NR_TRANS_BYTES];" << std::endl; - stream << " const char exit_set[USCXML_MAX_NR_STATES_BYTES];" << std::endl; + stream << " const unsigned char conflicts[USCXML_MAX_NR_TRANS_BYTES];" << std::endl; + stream << " const unsigned char exit_set[USCXML_MAX_NR_STATES_BYTES];" << std::endl; stream << "};" << std::endl; stream << std::endl; stream << "/**" << std::endl; - stream << " * All information pertaining to a element." << std::endl; + stream << " * All information pertaining to a element->" << std::endl; stream << " */" << std::endl; stream << "struct uscxml_elem_foreach {" << std::endl; stream << " const char* array;" << std::endl; @@ -805,7 +807,7 @@ void ChartToC::writeTypes(std::ostream& stream) { stream << std::endl; stream << "/**" << std::endl; - stream << " * All information pertaining to a element." << std::endl; + stream << " * All information pertaining to a element->" << std::endl; stream << " * Blocks of params are separated by NULL params, use" << std::endl; stream << " * USCXML_ELEM_PARAM_IS_SET to test for end of a block." << std::endl; stream << " */" << std::endl; @@ -817,7 +819,7 @@ void ChartToC::writeTypes(std::ostream& stream) { stream << std::endl; stream << "/**" << std::endl; - stream << " * All information pertaining to a element." << std::endl; + stream << " * All information pertaining to a element->" << std::endl; stream << " */" << std::endl; stream << "struct uscxml_elem_donedata {" << std::endl; stream << " const USCXML_NR_STATES_TYPE source;" << std::endl; @@ -828,7 +830,7 @@ void ChartToC::writeTypes(std::ostream& stream) { stream << std::endl; stream << "/**" << std::endl; - stream << " * All information pertaining to an element." << std::endl; + stream << " * All information pertaining to an element->" << std::endl; stream << " */" << std::endl; stream << "struct uscxml_elem_invoke {" << std::endl; stream << " const uscxml_machine* machine;" << std::endl; @@ -849,7 +851,7 @@ void ChartToC::writeTypes(std::ostream& stream) { stream << std::endl; stream << "/**" << std::endl; - stream << " * All information pertaining to a element." << std::endl; + stream << " * All information pertaining to a element->" << std::endl; stream << " */" << std::endl; stream << "struct uscxml_elem_send {" << std::endl; stream << " const char* event;" << std::endl; @@ -876,10 +878,10 @@ void ChartToC::writeTypes(std::ostream& stream) { stream << " unsigned char flags;" << std::endl; stream << " const uscxml_machine* machine;" << std::endl; stream << std::endl; - stream << " char config[USCXML_MAX_NR_STATES_BYTES]; /* Make sure these macros specify a sufficient size */" << std::endl; - stream << " char history[USCXML_MAX_NR_STATES_BYTES];" << std::endl; - stream << " char invocations[USCXML_MAX_NR_STATES_BYTES];" << std::endl; - stream << " char initialized_data[USCXML_MAX_NR_STATES_BYTES];" << std::endl; + stream << " unsigned char config[USCXML_MAX_NR_STATES_BYTES]; /* Make sure these macros specify a sufficient size */" << std::endl; + stream << " unsigned char history[USCXML_MAX_NR_STATES_BYTES];" << std::endl; + stream << " unsigned char invocations[USCXML_MAX_NR_STATES_BYTES];" << std::endl; + stream << " unsigned char initialized_data[USCXML_MAX_NR_STATES_BYTES];" << std::endl; stream << std::endl; stream << " void* user_data;" << std::endl; stream << " void* event;" << std::endl; @@ -914,7 +916,7 @@ void ChartToC::writeHelpers(std::ostream& stream) { stream << "/**" << std::endl; stream << " * Print name of states contained in a (debugging)." << std::endl; stream << " */" << std::endl; - stream << "static void printStateNames(const uscxml_ctx* ctx, const char* a, size_t length) {" << std::endl; + stream << "static void printStateNames(const uscxml_ctx* ctx, const unsigned char* a, size_t length) {" << std::endl; stream << " size_t i;" << std::endl; stream << " const char* seperator = \"\";" << std::endl; stream << " for (i = 0; i < length; i++) {" << std::endl; @@ -930,7 +932,7 @@ void ChartToC::writeHelpers(std::ostream& stream) { stream << "/**" << std::endl; stream << " * Print bits set in a in a binary representation (debugging)." << std::endl; stream << " */" << std::endl; - stream << "static void printBitsetIndices(const char* a, size_t length) {" << std::endl; + stream << "static void printBitsetIndices(const unsigned char* a, size_t length) {" << std::endl; stream << " size_t i;" << std::endl; stream << " const char* seperator = \"\";" << std::endl; stream << " for (i = 0; i < length; i++) {" << std::endl; @@ -949,7 +951,7 @@ void ChartToC::writeHelpers(std::ostream& stream) { stream << "/**" << std::endl; stream << " * Return true if there is a common bit in a and b." << std::endl; stream << " */" << std::endl; - stream << "static int bit_has_and(const char* a, const char* b, size_t i) {" << std::endl; + stream << "static int bit_has_and(const unsigned char* a, const unsigned char* b, size_t i) {" << std::endl; stream << " while(i--) {" << std::endl; stream << " if (a[i] & b[i])" << std::endl; stream << " return 1;" << std::endl; @@ -962,7 +964,7 @@ void ChartToC::writeHelpers(std::ostream& stream) { stream << " * Set all bits to 0, this corresponds to memset(a, 0, i), " << std::endl; stream << " * but does not require string.h or cstring." << std::endl; stream << " */" << std::endl; - stream << "static void bit_clear_all(char* a, size_t i) {" << std::endl; + stream << "static void bit_clear_all(unsigned char* a, size_t i) {" << std::endl; stream << " while(i--) {" << std::endl; stream << " a[i] = 0;" << std::endl; stream << " }" << std::endl; @@ -972,7 +974,7 @@ void ChartToC::writeHelpers(std::ostream& stream) { stream << "/**" << std::endl; stream << " * Return true if there is any bit set in a." << std::endl; stream << " */" << std::endl; - stream << "static int bit_has_any(const char* a, size_t i) {" << std::endl; + stream << "static int bit_has_any(unsigned const char* a, size_t i) {" << std::endl; stream << " while(i--) {" << std::endl; stream << " if (a[i] > 0)" << std::endl; stream << " return 1;" << std::endl; @@ -984,7 +986,7 @@ void ChartToC::writeHelpers(std::ostream& stream) { stream << "/**" << std::endl; stream << " * Set all bits from given mask in dest, this is |= for bit arrays." << std::endl; stream << " */" << std::endl; - stream << "static void bit_or(char* dest, const char* mask, size_t i) {" << std::endl; + stream << "static void bit_or(unsigned char* dest, const unsigned char* mask, size_t i) {" << std::endl; stream << " while(i--) {" << std::endl; stream << " dest[i] |= mask[i];" << std::endl; stream << " }" << std::endl; @@ -995,7 +997,7 @@ void ChartToC::writeHelpers(std::ostream& stream) { stream << " * Copy all bits from source to dest, this corresponds to memcpy(a, b, i), " << std::endl; stream << " * but does not require string.h or cstring." << std::endl; stream << " */" << std::endl; - stream << "static void bit_copy(char* dest, const char* source, size_t i) {" << std::endl; + stream << "static void bit_copy(unsigned char* dest, const unsigned char* source, size_t i) {" << std::endl; stream << " while(i--) {" << std::endl; stream << " dest[i] = source[i];" << std::endl; stream << " }" << std::endl; @@ -1005,7 +1007,7 @@ void ChartToC::writeHelpers(std::ostream& stream) { stream << "/**" << std::endl; stream << " * Unset bits from mask in dest." << std::endl; stream << " */" << std::endl; - stream << "static void bit_and_not(char* dest, const char* mask, size_t i) {" << std::endl; + stream << "static void bit_and_not(unsigned char* dest, const unsigned char* mask, size_t i) {" << std::endl; stream << " while(i--) {" << std::endl; stream << " dest[i] &= ~mask[i];" << std::endl; stream << " }" << std::endl; @@ -1015,7 +1017,7 @@ void ChartToC::writeHelpers(std::ostream& stream) { stream << "/**" << std::endl; stream << " * Set bits from mask in dest." << std::endl; stream << " */" << std::endl; - stream << "static void bit_and(char* dest, const char* mask, size_t i) {" << std::endl; + stream << "static void bit_and(unsigned char* dest, const unsigned char* mask, size_t i) {" << std::endl; stream << " while(i--) {" << std::endl; stream << " dest[i] &= mask[i];" << std::endl; stream << " };" << std::endl; @@ -1030,22 +1032,22 @@ void ChartToC::writeHelpers(std::ostream& stream) { void ChartToC::writeExecContentFinalize(std::ostream& stream) { // needs to be written prior to invocation elem info - NodeSet finalizes = DOMUtils::inDocumentOrder(_nsInfo.xmlNSPrefix + "finalize", _scxml); + std::list finalizes = DOMUtils::inDocumentOrder(XML_PREFIX(_scxml).str() + "finalize", _scxml); if (finalizes.size() > 0) { stream << "#ifndef USCXML_NO_EXEC_CONTENT" << std::endl; stream << std::endl; } - for (size_t i = 0; i < finalizes.size(); i++) { - Element finalize(finalizes[i]); - NodeSet execContent = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, finalize); + for (auto iter = finalizes.begin(); iter != finalizes.end(); iter++) { + DOMElement* finalize = *iter; + std::list execContent = DOMUtils::filterChildType(DOMNode::ELEMENT_NODE, finalize); if (execContent.size() > 0) { stream << "static int " << _prefix << "_" << DOMUtils::idForNode(finalize) << "(const uscxml_ctx* ctx, const uscxml_elem_invoke* invocation, const void* event) {" << std::endl; stream << " int err = USCXML_ERR_OK;" << std::endl; - for (size_t j = 0; j < execContent.size(); j++) { - writeExecContent(stream, Element(execContent[j]), 1); + for (auto iter2 = execContent.begin(); iter2 != execContent.end(); iter2++) { + writeExecContent(stream, static_cast(*iter2), 1); } stream << " return USCXML_ERR_OK;" << std::endl; stream << "}" << std::endl; @@ -1064,16 +1066,19 @@ void ChartToC::writeExecContent(std::ostream& stream) { stream << std::endl; for (size_t i = 0; i < _states.size(); i++) { - Element state(_states[i]); + DOMElement* state(_states[i]); if (i == 0) { // root state - we need to perform some initialization here - NodeSet globalScripts = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "script", state); + std::list globalScripts = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "script", state); if (globalScripts.size() > 0) { - for (size_t j = 0; j < globalScripts.size(); j++) { + size_t j = 0; + for (auto iter = globalScripts.begin(); iter != globalScripts.end(); iter++, j++) { + DOMElement* globalScript = *iter; + stream << "static int " << _prefix << "_global_script_" << toStr(j) << "(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) {" << std::endl; stream << " int err = USCXML_ERR_OK;" << std::endl; - writeExecContent(stream, globalScripts[j], 1); + writeExecContent(stream, globalScript, 1); stream << " return USCXML_ERR_OK;" << std::endl; stream << "}" << std::endl; } @@ -1088,65 +1093,76 @@ void ChartToC::writeExecContent(std::ostream& stream) { } } - NodeSet onexit = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "onexit", state); - for (size_t j = 0; j < onexit.size(); j++) { - stream << "static int " << _prefix << "_" << DOMUtils::idForNode(state) << "_on_exit_" << toStr(j) << "(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) {" << std::endl; - stream << " int err = USCXML_ERR_OK;" << std::endl; - writeExecContent(stream, onexit[j], 1); - stream << " return USCXML_ERR_OK;" << std::endl; - stream << "}" << std::endl; - stream << std::endl; - } + { + std::list onexits = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "onexit", state); + size_t j = 0; + for (auto iter = onexits.begin(); iter != onexits.end(); iter++, j++) { + DOMElement* onexit = *iter; + stream << "static int " << _prefix << "_" << DOMUtils::idForNode(state) << "_on_exit_" << toStr(j) << "(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) {" << std::endl; + stream << " int err = USCXML_ERR_OK;" << std::endl; + writeExecContent(stream, onexit, 1); + stream << " return USCXML_ERR_OK;" << std::endl; + stream << "}" << std::endl; + stream << std::endl; + } - if (onexit.size() > 0) { - stream << "static int " << _prefix << "_" << DOMUtils::idForNode(state) << "_on_exit(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) {" << std::endl; - for (size_t j = 0; j < onexit.size(); j++) { - stream << " " << _prefix << "_" << DOMUtils::idForNode(state) << "_on_exit_" << toStr(j) << "(ctx, state, event);" << std::endl; + if (onexits.size() > 0) { + stream << "static int " << _prefix << "_" << DOMUtils::idForNode(state) << "_on_exit(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) {" << std::endl; + for (size_t j = 0; j < onexits.size(); j++) { + stream << " " << _prefix << "_" << DOMUtils::idForNode(state) << "_on_exit_" << toStr(j) << "(ctx, state, event);" << std::endl; + } + stream << " return USCXML_ERR_OK;" << std::endl; + stream << "}" << std::endl; + stream << std::endl; } - stream << " return USCXML_ERR_OK;" << std::endl; - stream << "}" << std::endl; - stream << std::endl; } - NodeSet onentry = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "onentry", state); - for (size_t j = 0; j < onentry.size(); j++) { - stream << "static int " << _prefix << "_" << DOMUtils::idForNode(state) << "_on_entry_" << toStr(j) << "(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) {" << std::endl; - stream << " int err = USCXML_ERR_OK;" << std::endl; - writeExecContent(stream, onentry[j], 1); - stream << " return USCXML_ERR_OK;" << std::endl; - stream << "}" << std::endl; - stream << std::endl; - } - - if (onentry.size() > 0) { - stream << "static int " << _prefix << "_" << DOMUtils::idForNode(state) << "_on_entry(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) {" << std::endl; - for (size_t j = 0; j < onentry.size(); j++) { - stream << " " << _prefix << "_" << DOMUtils::idForNode(state) << "_on_entry_" << toStr(j) << "(ctx, state, event);" << std::endl; + { + std::list onentrys = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "onentry", state); + size_t j = 0; + for (auto iter = onentrys.begin(); iter != onentrys.end(); iter++, j++) { + DOMElement* onentry = *iter; + stream << "static int " << _prefix << "_" << DOMUtils::idForNode(state) << "_on_entry_" << toStr(j) << "(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) {" << std::endl; + stream << " int err = USCXML_ERR_OK;" << std::endl; + writeExecContent(stream, onentry, 1); + stream << " return USCXML_ERR_OK;" << std::endl; + stream << "}" << std::endl; + stream << std::endl; } - stream << " return USCXML_ERR_OK;" << std::endl; - stream << "}" << std::endl; - stream << std::endl; + if (onentrys.size() > 0) { + stream << "static int " << _prefix << "_" << DOMUtils::idForNode(state) << "_on_entry(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) {" << std::endl; + for (size_t j = 0; j < onentrys.size(); j++) { + stream << " " << _prefix << "_" << DOMUtils::idForNode(state) << "_on_entry_" << toStr(j) << "(ctx, state, event);" << std::endl; + } + + stream << " return USCXML_ERR_OK;" << std::endl; + stream << "}" << std::endl; + stream << std::endl; + } } + { + std::list invokes = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "invoke", state); + if (invokes.size() > 0) { + stream << "static int " << _prefix << "_" << DOMUtils::idForNode(state) << "_invoke(const uscxml_ctx* ctx, const uscxml_state* s, const uscxml_elem_invoke* invocation, unsigned char uninvoke) {" << std::endl; - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", state); - if (invokes.size() > 0) { - stream << "static int " << _prefix << "_" << DOMUtils::idForNode(state) << "_invoke(const uscxml_ctx* ctx, const uscxml_state* s, const uscxml_elem_invoke* invocation, unsigned char uninvoke) {" << std::endl; - for (size_t j = 0; j < invokes.size(); j++) { - Element invoke(invokes[j]); - stream << " ctx->invoke(ctx, s, &" << _prefix << "_elem_invokes[" << ATTR(invoke, "documentOrder") << "], uninvoke);" << std::endl; - stream << std::endl; + size_t j = 0; + for (auto iter = invokes.begin(); iter != invokes.end(); iter++, j++) { + DOMElement* invoke = *iter; + stream << " ctx->invoke(ctx, s, &" << _prefix << "_elem_invokes[" << ATTR(invoke, "documentOrder") << "], uninvoke);" << std::endl; + stream << std::endl; + } + stream << " return USCXML_ERR_OK;" << std::endl; + stream << "}" << std::endl; } - stream << " return USCXML_ERR_OK;" << std::endl; - stream << "}" << std::endl; } } for (size_t i = 0; i < _transitions.size(); i++) { - Element transition(_transitions[i]); - NodeSet execContent = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, transition); + DOMElement* transition(_transitions[i]); + std::list execContent = DOMUtils::filterChildType(DOMNode::ELEMENT_NODE, transition); if (HAS_ATTR(transition, "cond")) { stream << "static int " << _prefix << "_" << DOMUtils::idForNode(transition) << "_is_enabled(const uscxml_ctx* ctx, const uscxml_transition* transition) {" << std::endl; @@ -1164,8 +1180,8 @@ void ChartToC::writeExecContent(std::ostream& stream) { if (execContent.size() > 0) { stream << "static int " << _prefix << "_" << DOMUtils::idForNode(transition) << "_on_trans(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) {" << std::endl; stream << " int err = USCXML_ERR_OK;" << std::endl; - for (size_t j = 0; j < execContent.size(); j++) { - writeExecContent(stream, Element(execContent[j]), 1); + for (auto iter = execContent.begin(); iter != execContent.end(); iter++) { + writeExecContent(stream, static_cast(*iter), 1); } stream << " return USCXML_ERR_OK;" << std::endl; stream << "}" << std::endl; @@ -1178,16 +1194,16 @@ void ChartToC::writeExecContent(std::ostream& stream) { } -void ChartToC::writeExecContent(std::ostream& stream, const Arabica::DOM::Node& node, int indent) { +void ChartToC::writeExecContent(std::ostream& stream, const DOMNode* node, int indent) { if (!node) return; - if (node.getNodeType() == Node_base::TEXT_NODE) { - if (boost::trim_copy(node.getNodeValue()).length() > 0) { + if (node->getNodeType() == DOMNode::TEXT_NODE) { + if (boost::trim_copy(X(node->getNodeValue()).str()).length() > 0) { if (HAS_ATTR(_scxml, "datamodel") && ATTR(_scxml, "datamodel") == "native") { - stream << node.getNodeValue(); + stream << node->getNodeValue(); } else { - std::string escaped = escape(node.getNodeValue()); + std::string escaped = escape(X(node->getNodeValue()).str()); stream << escaped; } } @@ -1200,30 +1216,33 @@ void ChartToC::writeExecContent(std::ostream& stream, const Arabica::DOM::NodegetNodeType() != DOMNode::ELEMENT_NODE) return; // skip anything not an element - Arabica::DOM::Element elem = Arabica::DOM::Element(node); + DOMElement* elem = (DOMElement*)(node); if (false) { - } else if(TAGNAME(elem) == "onentry" || TAGNAME(elem) == "onexit" || TAGNAME(elem) == "transition" || TAGNAME(elem) == "finalize") { + } else if(TAGNAME(elem) == XML_PREFIX(elem).str() + "onentry" || + TAGNAME(elem) == XML_PREFIX(elem).str() + "onexit" || + TAGNAME(elem) == XML_PREFIX(elem).str() + "transition" || + TAGNAME(elem) == XML_PREFIX(elem).str() + "finalize") { // descent into childs and write their contents - Arabica::DOM::Node child = node.getFirstChild(); + DOMNode* child = node->getFirstChild(); while(child) { writeExecContent(stream, child, indent); - child = child.getNextSibling(); + child = child->getNextSibling(); } - } else if(TAGNAME(elem) == "script") { + } else if(TAGNAME(elem) == XML_PREFIX(elem).str() + "script") { stream << padding; stream << "if likely(ctx->exec_content_script != NULL) {" << std::endl; stream << padding; stream << " if unlikely((err = ctx->exec_content_script(ctx, "; stream << (HAS_ATTR(elem, "src") ? "\"" + escape(ATTR(elem, "src")) + "\"" : "NULL") << ", "; - NodeSet scriptTexts = DOMUtils::filterChildType(Node_base::TEXT_NODE, elem); + std::list scriptTexts = DOMUtils::filterChildType(DOMNode::TEXT_NODE, elem); if (scriptTexts.size() > 0) { stream << "\""; - writeExecContent(stream, scriptTexts[0], 0); + writeExecContent(stream, scriptTexts.front(), 0); stream << "\""; } else { stream << "NULL"; @@ -1234,7 +1253,7 @@ void ChartToC::writeExecContent(std::ostream& stream, const Arabica::DOM::Nodeexec_content_log != NULL) {" << std::endl; stream << padding; @@ -1246,7 +1265,7 @@ void ChartToC::writeExecContent(std::ostream& stream, const Arabica::DOM::Nodeexec_content_foreach_init != NULL &&" << std::endl; stream << padding << " ctx->exec_content_foreach_next != NULL &&" << std::endl; stream << padding << " ctx->exec_content_foreach_done != NULL) {" << std::endl; @@ -1254,10 +1273,10 @@ void ChartToC::writeExecContent(std::ostream& stream, const Arabica::DOM::Nodeexec_content_foreach_init(ctx, &" << _prefix << "_elem_foreachs[" << ATTR(elem, "documentOrder") << "])) != USCXML_ERR_OK) return err;" << std::endl; stream << padding << " while (ctx->exec_content_foreach_next(ctx, &" << _prefix << "_elem_foreachs[" << ATTR(elem, "documentOrder") << "]) == USCXML_ERR_OK) {" << std::endl; - Arabica::DOM::Node child = node.getFirstChild(); + DOMNode* child = node->getFirstChild(); while(child) { writeExecContent(stream, child, indent + 2); - child = child.getNextSibling(); + child = child->getNextSibling(); } stream << padding << " }" << std::endl; stream << padding << " if ((ctx->exec_content_foreach_done(ctx, &" << _prefix << "_elem_foreachs[" << ATTR(elem, "documentOrder") << "])) != USCXML_ERR_OK) return err;" << std::endl; @@ -1265,30 +1284,30 @@ void ChartToC::writeExecContent(std::ostream& stream, const Arabica::DOM::Nodeis_true != NULL) {" << std::endl; stream << padding; stream << " if (ctx->is_true(ctx, " << (HAS_ATTR(elem, "cond") ? "\"" + escape(ATTR(elem, "cond")) + "\"" : "NULL") << ")) {" << std::endl; - Arabica::DOM::Node child = elem.getFirstChild(); + DOMNode* child = elem->getFirstChild(); while(child) { - if (child.getNodeType() == Node_base::ELEMENT_NODE && TAGNAME_CAST(child) == "elseif") { + if (child->getNodeType() == DOMNode::ELEMENT_NODE && TAGNAME_CAST(child) == "elseif") { stream << padding; stream << " } else if (ctx->is_true(ctx, " << (HAS_ATTR_CAST(child, "cond") ? "\"" + escape(ATTR_CAST(child, "cond")) + "\"" : "NULL") << ")) {" << std::endl; - } else if (child.getNodeType() == Node_base::ELEMENT_NODE && TAGNAME_CAST(child) == "else") { + } else if (child->getNodeType() == DOMNode::ELEMENT_NODE && TAGNAME_CAST(child) == "else") { stream << padding; stream << " } else {" << std::endl; } else { writeExecContent(stream, child, indent + 2); } - child = child.getNextSibling(); + child = child->getNextSibling(); } stream << padding << " }" << std::endl; stream << padding << "} else {" << std::endl; stream << padding << " return USCXML_ERR_MISSING_CALLBACK;" << std::endl; stream << padding << "}" << std::endl; - } else if(TAGNAME(elem) == "assign") { + } else if(TAGNAME(elem) == XML_PREFIX(elem).str() + "assign") { stream << padding; stream << "if likely(ctx->exec_content_assign != NULL) {" << std::endl; stream << padding; @@ -1299,7 +1318,7 @@ void ChartToC::writeExecContent(std::ostream& stream, const Arabica::DOM::Nodeexec_content_raise != NULL) {" << std::endl; stream << padding; @@ -1310,7 +1329,7 @@ void ChartToC::writeExecContent(std::ostream& stream, const Arabica::DOM::Nodeexec_content_send != NULL) {" << std::endl; stream << padding; @@ -1320,7 +1339,7 @@ void ChartToC::writeExecContent(std::ostream& stream, const Arabica::DOM::Nodeexec_content_cancel != NULL) {" << std::endl; stream << padding; @@ -1344,12 +1363,13 @@ void ChartToC::writeElementInfoInvocation(std::ostream& stream) { stream << "#ifndef USCXML_NO_ELEM_INFO" << std::endl; stream << std::endl; - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _scxml, true); + std::list invokes = DOMUtils::filterChildElements(XML_PREFIX(_scxml).str() + "invoke", _scxml, true); if (invokes.size() > 0) { _hasElement.insert("invoke"); stream << "static const uscxml_elem_invoke " << _prefix << "_elem_invokes[" << invokes.size() << "] = {" << std::endl; - for (size_t i = 0; i < invokes.size(); i++) { - Element invoke(invokes[i]); + size_t i = 0; + for (auto iter = invokes.begin(); iter != invokes.end(); iter++, i++) { + DOMElement* invoke = *iter; /* stream << "struct uscxml_elem_invoke {" << std::endl; @@ -1421,7 +1441,7 @@ void ChartToC::writeElementInfoInvocation(std::ostream& stream) { stream << ", " << std::endl; stream << " /* sourcename */ "; - stream << (HAS_ATTR_CAST(invoke.getParentNode(), "id") ? "\"" + escape(ATTR_CAST(invoke.getParentNode(), "id")) + "\"" : "NULL"); + stream << (HAS_ATTR_CAST(invoke->getParentNode(), "id") ? "\"" + escape(ATTR_CAST(invoke->getParentNode(), "id")) + "\"" : "NULL"); stream << ", " << std::endl; stream << " /* namelist */ "; @@ -1441,32 +1461,32 @@ void ChartToC::writeElementInfoInvocation(std::ostream& stream) { stream << ", " << std::endl; stream << " /* finalize */ "; - NodeSet finalizes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "finalize", invoke); + std::list finalizes = DOMUtils::filterChildElements(XML_PREFIX(invoke).str() + "finalize", invoke); if (finalizes.size() > 0) { - stream << _prefix << "_" << DOMUtils::idForNode(finalizes[0]); + stream << _prefix << "_" << DOMUtils::idForNode(finalizes.front()); } else { stream << "NULL"; } stream << ", " << std::endl; - NodeSet contents = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", invoke); + std::list contents = DOMUtils::filterChildElements(XML_PREFIX(invoke).str() + "content", invoke); if (contents.size() > 0 && !HAS_ATTR(invoke, "md5sum")) { std::stringstream ss; - NodeList cChilds = contents[0].getChildNodes(); - for (size_t j = 0; j < cChilds.getLength(); j++) { - ss << cChilds.item(j); + DOMNodeList* cChilds = contents.front()->getChildNodes(); + for (size_t j = 0; j < cChilds->getLength(); j++) { + ss << cChilds->item(j); } stream << " /* content */ "; stream << (ss.str().size() > 0 ? "\"" + escape(ss.str()) + "\", " : "NULL, ") << std::endl; stream << " /* contentexpr */ "; - stream << (HAS_ATTR_CAST(contents[0], "expr") ? "\"" + ATTR_CAST(contents[0], "expr") + "\", " : "NULL, ") << std::endl; + stream << (HAS_ATTR_CAST(contents.front(), "expr") ? "\"" + ATTR_CAST(contents.front(), "expr") + "\", " : "NULL, ") << std::endl; } else { stream << " /* content */ NULL," << std::endl; stream << " /* contentexpr */ NULL," << std::endl; } stream << " }" << (i + 1 < invokes.size() ? ",": "") << std::endl; - invoke.setAttribute("documentOrder", toStr(i)); + invoke->setAttribute(X("documentOrder"), X(toStr(i))); } stream << "};" << std::endl; @@ -1482,41 +1502,43 @@ void ChartToC::writeElementInfo(std::ostream& stream) { stream << "#ifndef USCXML_NO_ELEM_INFO" << std::endl; stream << std::endl; - NodeSet foreachs = DOMUtils::inDocumentOrder(_nsInfo.xmlNSPrefix + "foreach", _scxml); + std::list foreachs = DOMUtils::inDocumentOrder(XML_PREFIX(_scxml).str() + "foreach", _scxml); if (foreachs.size() > 0) { _hasElement.insert("foreach"); stream << "static const uscxml_elem_foreach " << _prefix << "_elem_foreachs[" << foreachs.size() << "] = {" << std::endl; stream << " /* array, item, index */" << std::endl; - for (size_t i = 0; i < foreachs.size(); i++) { - Element foreach(foreachs[i]); + size_t i = 0; + for (auto iter = foreachs.begin(); iter != foreachs.end(); iter++, i++) { + DOMElement* foreach = *iter; stream << " { "; stream << (HAS_ATTR(foreach, "array") ? "\"" + escape(ATTR(foreach, "array")) + "\"" : "NULL") << ", "; stream << (HAS_ATTR(foreach, "item") ? "\"" + escape(ATTR(foreach, "item")) + "\"" : "NULL") << ", "; stream << (HAS_ATTR(foreach, "index") ? "\"" + escape(ATTR(foreach, "index")) + "\"" : "NULL"); stream << " }" << (i + 1 < foreachs.size() ? ",": "") << std::endl; - foreach.setAttribute("documentOrder", toStr(i)); + foreach->setAttribute(X("documentOrder"), X(toStr(i))); } stream << "};" << std::endl; stream << std::endl; } - NodeSet assigns = DOMUtils::inDocumentOrder(_nsInfo.xmlNSPrefix + "assign", _scxml); + std::list assigns = DOMUtils::inDocumentOrder(XML_PREFIX(_scxml).str() + "assign", _scxml); if (assigns.size() > 0) { _hasElement.insert("assign"); stream << "static const uscxml_elem_assign " << _prefix << "_elem_assigns[" << assigns.size() << "] = {" << std::endl; stream << " /* location, expr, content */" << std::endl; - for (size_t i = 0; i < assigns.size(); i++) { - Element assign(assigns[i]); + size_t i = 0; + for (auto iter = assigns.begin(); iter != assigns.end(); iter++, i++) { + DOMElement* assign = *iter; stream << " { "; stream << (HAS_ATTR(assign, "location") ? "\"" + escape(ATTR(assign, "location")) + "\"" : "NULL") << ", "; stream << (HAS_ATTR(assign, "expr") ? "\"" + escape(ATTR(assign, "expr")) + "\"" : "NULL") << ", "; - NodeSet assignTexts = DOMUtils::filterChildType(Node_base::TEXT_NODE, assign); + std::list assignTexts = DOMUtils::filterChildType(DOMNode::TEXT_NODE, assign); if (assignTexts.size() > 0) { - if (boost::trim_copy(assignTexts[0].getNodeValue()).length() > 0) { - std::string escaped = escape(assignTexts[0].getNodeValue()); + if (boost::trim_copy(X(assignTexts.front()->getNodeValue()).str()).length() > 0) { + std::string escaped = escape(X(assignTexts.front()->getNodeValue()).str()); stream << "\"" << escaped << "\""; } } else { @@ -1524,7 +1546,7 @@ void ChartToC::writeElementInfo(std::ostream& stream) { } stream << " }," << std::endl; - assign.setAttribute("documentOrder", toStr(i)); + assign->setAttribute(X("documentOrder"), X(toStr(i))); } stream << "};" << std::endl; @@ -1532,50 +1554,51 @@ void ChartToC::writeElementInfo(std::ostream& stream) { } - NodeSet datas = DOMUtils::inDocumentOrder(_nsInfo.xmlNSPrefix + "data", _scxml); + std::list datas = DOMUtils::inDocumentOrder(XML_PREFIX(_scxml).str() + "data", _scxml); if (datas.size() > 0) { _hasElement.insert("data"); size_t dataIndexOffset = 0; - Node parent; + DOMNode* parent = NULL; size_t distinctParents = 0; if (_binding == InterpreterImpl::EARLY) { - Element(_states[0]).setAttribute("dataIndex", "0"); + _states[0]->setAttribute(X("dataIndex"), X("0")); distinctParents = 1; } else { - for (size_t i = 0; i < datas.size(); i++) { - Element data(datas[i]); - if (data.getParentNode() != parent) { + for (auto iter = datas.begin(); iter != datas.end(); iter++) { + DOMElement* data = *iter; + if (data->getParentNode() != parent) { distinctParents++; } } } - parent = Node(); + parent = NULL; stream << "static const uscxml_elem_data " << _prefix << "_elem_datas[" << datas.size() + distinctParents << "] = {" << std::endl; stream << " /* id, src, expr, content */" << std::endl; - for (size_t i = 0; i < datas.size(); i++) { - Element data(datas[i]); - if (data.getParentNode().getParentNode() != parent) { + size_t i = 0; + for (auto iter = datas.begin(); iter != datas.end(); iter++, i++) { + DOMElement* data = *iter; + if (data->getParentNode()->getParentNode() != parent) { if (_binding == InterpreterImpl::LATE) { if (i > 0) { stream << " { NULL, NULL, NULL, NULL }," << std::endl; dataIndexOffset++; } - Element(data.getParentNode().getParentNode()).setAttribute("dataIndex", toStr(i + dataIndexOffset)); + static_cast(data->getParentNode()->getParentNode())->setAttribute(X("dataIndex"), X(toStr(i + dataIndexOffset))); } - parent = data.getParentNode().getParentNode(); + parent = data->getParentNode()->getParentNode(); } stream << " { "; stream << (HAS_ATTR(data, "id") ? "\"" + escape(ATTR(data, "id")) + "\"" : "NULL") << ", "; stream << (HAS_ATTR(data, "src") ? "\"" + escape(ATTR(data, "src")) + "\"" : "NULL") << ", "; stream << (HAS_ATTR(data, "expr") ? "\"" + escape(ATTR(data, "expr")) + "\"" : "NULL") << ", "; - NodeSet dataTexts = DOMUtils::filterChildType(Node_base::TEXT_NODE, data); + std::list dataTexts = DOMUtils::filterChildType(DOMNode::TEXT_NODE, data); if (dataTexts.size() > 0) { - if (boost::trim_copy(dataTexts[0].getNodeValue()).length() > 0) { - std::string escaped = escape(dataTexts[0].getNodeValue()); + if (boost::trim_copy(X(dataTexts.front()->getNodeValue()).str()).length() > 0) { + std::string escaped = escape(X(dataTexts.front()->getNodeValue()).str()); stream << "\"" << escaped << "\""; } } else { @@ -1589,29 +1612,30 @@ void ChartToC::writeElementInfo(std::ostream& stream) { stream << std::endl; } - NodeSet params = DOMUtils::inDocumentOrder(_nsInfo.xmlNSPrefix + "param", _scxml); + std::list params = DOMUtils::inDocumentOrder(XML_PREFIX(_scxml).str() + "param", _scxml); if (params.size() > 0) { _hasElement.insert("param"); - Node parent; + DOMNode* parent = NULL; size_t distinctParents = 0; - for (size_t i = 0; i < params.size(); i++) { - Element param(params[i]); - if (param.getParentNode() != parent) { + for (auto iter = params.begin(); iter != params.end(); iter++) { + DOMElement* param = *iter; + if (param->getParentNode() != parent) { distinctParents++; } } - parent = Node(); + parent = NULL; stream << "static const uscxml_elem_param " << _prefix << "_elem_params[" << params.size() + distinctParents << "] = {" << std::endl; stream << " /* name, expr, location */" << std::endl; - for (size_t i = 0; i < params.size(); i++) { - Element param(params[i]); - if (param.getParentNode() != parent) { - Element(param.getParentNode()).setAttribute("paramIndex", toStr(i)); + size_t i = 0; + for (auto iter = params.begin(); iter != params.end(); iter++, i++) { + DOMElement* param = *iter; + if (param->getParentNode() != parent) { + static_cast(param->getParentNode())->setAttribute(X("paramIndex"), X(toStr(i))); if (i > 0) { stream << " { NULL, NULL, NULL }," << std::endl; } - parent = param.getParentNode(); + parent = param->getParentNode(); } stream << " { "; stream << (HAS_ATTR(param, "name") ? "\"" + escape(ATTR(param, "name")) + "\"" : "NULL") << ", "; @@ -1625,12 +1649,13 @@ void ChartToC::writeElementInfo(std::ostream& stream) { stream << std::endl; } - NodeSet sends = DOMUtils::inDocumentOrder(_nsInfo.xmlNSPrefix + "send", _scxml); + std::list sends = DOMUtils::inDocumentOrder(XML_PREFIX(_scxml).str() + "send", _scxml); if (sends.size() > 0) { _hasElement.insert("send"); stream << "static const uscxml_elem_send " << _prefix << "_elem_sends[" << sends.size() << "] = {" << std::endl; - for (size_t i = 0; i < sends.size(); i++) { - Element send(sends[i]); + size_t i = 0; + for (auto iter = sends.begin(); iter != sends.end(); iter++, i++) { + DOMElement* send = *iter; stream << " { "; stream << std::endl << " /* event */ "; stream << (HAS_ATTR(send, "event") ? "\"" + escape(ATTR(send, "event")) + "\"" : "NULL") << ", "; @@ -1655,17 +1680,17 @@ void ChartToC::writeElementInfo(std::ostream& stream) { stream << std::endl << " /* namelist */ "; stream << (HAS_ATTR(send, "namelist") ? "\"" + escape(ATTR(send, "namelist")) + "\"" : "NULL") << ", "; - NodeSet contents = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", send); + std::list contents = DOMUtils::filterChildElements(XML_PREFIX(send).str() + "content", send); if (contents.size() > 0) { std::stringstream ss; - NodeList cChilds = contents[0].getChildNodes(); - for (size_t j = 0; j < cChilds.getLength(); j++) { - ss << cChilds.item(j); + DOMNodeList* cChilds = contents.front()->getChildNodes(); + for (size_t j = 0; j < cChilds->getLength(); j++) { + ss << *(cChilds->item(j)); } stream << std::endl << " /* content */ "; stream << (ss.str().size() > 0 ? "\"" + escape(ss.str()) + "\", " : "NULL, "); stream << std::endl << " /* contentexpr */ "; - stream << (HAS_ATTR_CAST(contents[0], "expr") ? "\"" + ATTR_CAST(contents[0], "expr") + "\", " : "NULL, "); + stream << (HAS_ATTR_CAST(contents.front(), "expr") ? "\"" + ATTR_CAST(contents.front(), "expr") + "\", " : "NULL, "); } else { stream << std::endl << " /* content */ "; stream << "NULL,"; @@ -1682,32 +1707,34 @@ void ChartToC::writeElementInfo(std::ostream& stream) { } stream << std::endl << " }" << (i + 1 < sends.size() ? ",": "") << std::endl; - send.setAttribute("documentOrder", toStr(i)); + send->setAttribute(X("documentOrder"), X(toStr(i))); } stream << "};" << std::endl; stream << std::endl; } - NodeSet donedatas = DOMUtils::inDocumentOrder(_nsInfo.xmlNSPrefix + "donedata", _scxml); + std::list donedatas = DOMUtils::inDocumentOrder(XML_PREFIX(_scxml).str() + "donedata", _scxml); stream << "static const uscxml_elem_donedata " << _prefix << "_elem_donedatas[" << donedatas.size() + 1 << "] = {" << std::endl; stream << " /* source, content, contentexpr, params */" << std::endl; - for (size_t i = 0; i < donedatas.size(); i++) { + size_t i = 0; + for (auto iter = donedatas.begin(); iter != donedatas.end(); iter++, i++) { + DOMElement* donedata = *iter; + _hasElement.insert("donedata"); - Element donedata(donedatas[i]); stream << " { "; // parent - stream << ATTR_CAST(donedata.getParentNode(), "documentOrder") << ", "; + stream << ATTR_CAST(donedata->getParentNode(), "documentOrder") << ", "; - NodeSet contents = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", donedata); + std::list contents = DOMUtils::filterChildElements(XML_PREFIX(donedata).str() + "content", donedata); if (contents.size() > 0) { std::stringstream ss; - NodeList cChilds = contents[0].getChildNodes(); - for (size_t j = 0; j < cChilds.getLength(); j++) { - ss << cChilds.item(j); + DOMNodeList* cChilds = contents.front()->getChildNodes(); + for (size_t j = 0; j < cChilds->getLength(); j++) { + ss << cChilds->item(j); } stream << (ss.str().size() > 0 ? "\"" + escape(ss.str()) + "\", " : "NULL, "); - stream << (HAS_ATTR_CAST(contents[0], "expr") ? "\"" + ATTR_CAST(contents[0], "expr") + "\", " : "NULL, "); + stream << (HAS_ATTR_CAST(contents.front(), "expr") ? "\"" + ATTR_CAST(contents.front(), "expr") + "\", " : "NULL, "); } else { stream << "NULL, NULL, "; } @@ -1719,7 +1746,7 @@ void ChartToC::writeElementInfo(std::ostream& stream) { } stream << " }," << std::endl; - donedata.setAttribute("documentOrder", toStr(i)); + donedata->setAttribute(X("documentOrder"), X(toStr(i))); } stream << " { 0, NULL, NULL, NULL }" << std::endl; stream << "};" << std::endl; @@ -1751,6 +1778,7 @@ void ChartToC::writeMachineInfo(std::ostream& stream) { if (_name.size() > 0) { std::string macroName = boost::to_upper_copy(escape(_name)); boost::replace_all(macroName, "-", "_"); + boost::replace_all(macroName, ".", "_"); stream << "#define USCXML_MACHINE_" << macroName << " " << _prefix << "_machine" << std::endl; } stream << std::endl; @@ -1788,7 +1816,7 @@ void ChartToC::writeMachineInfo(std::ostream& stream) { stream << " /* donedata */ " << "&" << _prefix << "_elem_donedatas[0], " << std::endl; stream << " /* script */ "; - if (DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "script", _scxml).size() > 0) { + if (DOMUtils::filterChildElements(XML_PREFIX(_scxml).str() + "script", _scxml).size() > 0) { stream << _prefix << "_global_script" << std::endl; } else { stream << "NULL"; @@ -1829,7 +1857,7 @@ void ChartToC::writeMachineInfo(std::ostream& stream) { stream << " /* donedata */ " << "&" << m->_prefix << "_elem_donedatas[0], " << std::endl; stream << " /* script */ "; - if (DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "script", _scxml).size() > 0) { + if (DOMUtils::filterChildElements(XML_PREFIX(node).str() + "script", _scxml).size() > 0) { stream << m->_prefix << "_global_script" << std::endl; } else { stream << "NULL"; @@ -1855,7 +1883,7 @@ void ChartToC::writeStates(std::ostream& stream) { stream << "static const uscxml_state " << _prefix << "_states[" << toStr(_states.size()) << "] = {" << std::endl; for (size_t i = 0; i < _states.size(); i++) { - Element state(_states[i]); + DOMElement* state(_states[i]); stream << " { /* state number " << toStr(i) << " */" << std::endl; @@ -1866,22 +1894,22 @@ void ChartToC::writeStates(std::ostream& stream) { // parent stream << " /* parent */ "; - stream << (i == 0 ? "0" : ATTR_CAST(state.getParentNode(), "documentOrder")); + stream << (i == 0 ? "0" : ATTR_CAST(state->getParentNode(), "documentOrder")); stream << "," << std::endl; // onentry stream << " /* onentry */ "; - stream << (DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "onentry", state).size() > 0 ? _prefix + "_" + DOMUtils::idForNode(state) + "_on_entry" : "NULL"); + stream << (DOMUtils::filterChildElements(XML_PREFIX(_scxml).str() + "onentry", state).size() > 0 ? _prefix + "_" + DOMUtils::idForNode(state) + "_on_entry" : "NULL"); stream << "," << std::endl; // onexit stream << " /* onexit */ "; - stream << (DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "onexit", state).size() > 0 ? _prefix + "_" + DOMUtils::idForNode(state) + "_on_exit" : "NULL"); + stream << (DOMUtils::filterChildElements(XML_PREFIX(_scxml).str() + "onexit", state).size() > 0 ? _prefix + "_" + DOMUtils::idForNode(state) + "_on_exit" : "NULL"); stream << "," << std::endl; // invokers stream << " /* invoke */ "; - stream << (DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", state).size() > 0 ? _prefix + "_" + DOMUtils::idForNode(state) + "_invoke" : "NULL"); + stream << (DOMUtils::filterChildElements(XML_PREFIX(_scxml).str() + "invoke", state).size() > 0 ? _prefix + "_" + DOMUtils::idForNode(state) + "_invoke" : "NULL"); stream << "," << std::endl; // children @@ -1948,13 +1976,13 @@ void ChartToC::writeTransitions(std::ostream& stream) { // cross reference transition by document order - is this really needed?! std::set elements; - elements.insert(_nsInfo.xmlNSPrefix + "transition"); - NodeSet transDocOrder = DOMUtils::inDocumentOrder(elements, _scxml); + elements.insert(XML_PREFIX(_scxml).str() + "transition"); + std::list transDocOrder = DOMUtils::inDocumentOrder(elements, _scxml); if (_transitions.size() > 0) { stream << "static const uscxml_transition " << _prefix << "_transitions[" << toStr(_transitions.size()) << "] = {" << std::endl; for (size_t i = 0; i < _transitions.size(); i++) { - Element transition(_transitions[i]); + DOMElement* transition(_transitions[i]); stream << " { /* transition number " << ATTR(transition, "documentOrder") << " with priority " << toStr(i) << std::endl; stream << " target: " << ATTR(transition, "target") << std::endl; @@ -1962,7 +1990,7 @@ void ChartToC::writeTransitions(std::ostream& stream) { // source stream << " /* source */ "; - stream << ATTR_CAST(transition.getParentNode(), "documentOrder"); + stream << ATTR_CAST(transition->getParentNode(), "documentOrder"); stream << "," << std::endl; // targets @@ -1997,7 +2025,7 @@ void ChartToC::writeTransitions(std::ostream& stream) { // on transition handlers stream << " /* ontrans */ "; - if (DOMUtils::filterChildType(Arabica::DOM::Node_base::ELEMENT_NODE, transition).size() > 0) { + if (DOMUtils::filterChildType(DOMNode::ELEMENT_NODE, transition).size() > 0) { stream << _prefix << "_" << DOMUtils::idForNode(transition) + "_on_trans"; } else { stream << "NULL"; @@ -2022,12 +2050,12 @@ void ChartToC::writeTransitions(std::ostream& stream) { seperator = " | "; } - if (iequals(TAGNAME_CAST(transition.getParentNode()), "history")) { + if (iequals(TAGNAME_CAST(transition->getParentNode()), "history")) { stream << seperator << "USCXML_TRANS_HISTORY"; seperator = " | "; } - if (iequals(TAGNAME_CAST(transition.getParentNode()), "initial")) { + if (iequals(TAGNAME_CAST(transition->getParentNode()), "initial")) { stream << seperator << "USCXML_TRANS_INITIAL"; seperator = " | "; } @@ -2058,24 +2086,6 @@ void ChartToC::writeTransitions(std::ostream& stream) { } -Arabica::XPath::NodeSet ChartToC::computeExitSet(const Arabica::DOM::Element& transition) { - - NodeSet statesToExit; - if (!isTargetless(transition)) { - Arabica::DOM::Node domain = getTransitionDomain(transition); - if (!domain) - return statesToExit; - for (unsigned int j = 0; j < _states.size(); j++) { - const Node& s = _states[j]; - if (isDescendant(s, domain)) { - statesToExit.push_back(s); - } - } - } - - return statesToExit; -} - void ChartToC::writeCharArrayInitList(std::ostream& stream, const std::string& boolString) { /** * 0111 -> 0x08 @@ -2128,12 +2138,12 @@ void ChartToC::writeFSM(std::ostream& stream) { stream << " USCXML_NR_TRANS_TYPE nr_trans_bytes = ((USCXML_NUMBER_TRANS + 7) & ~7) >> 3;" << std::endl; stream << " int err = USCXML_ERR_OK;" << std::endl; - stream << " char conflicts [USCXML_MAX_NR_TRANS_BYTES];" << std::endl; - stream << " char trans_set [USCXML_MAX_NR_TRANS_BYTES];" << std::endl; - stream << " char target_set [USCXML_MAX_NR_STATES_BYTES];" << std::endl; - stream << " char exit_set [USCXML_MAX_NR_STATES_BYTES];" << std::endl; - stream << " char entry_set [USCXML_MAX_NR_STATES_BYTES];" << std::endl; - stream << " char tmp_states [USCXML_MAX_NR_STATES_BYTES];" << std::endl; + stream << " unsigned char conflicts [USCXML_MAX_NR_TRANS_BYTES];" << std::endl; + stream << " unsigned char trans_set [USCXML_MAX_NR_TRANS_BYTES];" << std::endl; + stream << " unsigned char target_set [USCXML_MAX_NR_STATES_BYTES];" << std::endl; + stream << " unsigned char exit_set [USCXML_MAX_NR_STATES_BYTES];" << std::endl; + stream << " unsigned char entry_set [USCXML_MAX_NR_STATES_BYTES];" << std::endl; + stream << " unsigned char tmp_states [USCXML_MAX_NR_STATES_BYTES];" << std::endl; stream << std::endl; stream << "#ifdef USCXML_VERBOSE" << std::endl; diff --git a/src/uscxml/transform/ChartToC.h b/src/uscxml/transform/ChartToC.h index 0c9c2e5..a34a2e0 100644 --- a/src/uscxml/transform/ChartToC.h +++ b/src/uscxml/transform/ChartToC.h @@ -20,20 +20,17 @@ #ifndef FSMTOCPP_H_201672B0 #define FSMTOCPP_H_201672B0 -#include "uscxml/interpreter/InterpreterRC.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/util/Trie.h" +#include "uscxml/util/DOM.h" +#include "uscxml/transform/Trie.h" #include "Transformer.h" -#include -#include -#include +#include #include #include namespace uscxml { -class USCXML_API ChartToC : public InterpreterRC, public TransformerImpl { +class USCXML_API ChartToC : public TransformerImpl { public: virtual ~ChartToC(); @@ -61,11 +58,9 @@ protected: void writeFSM(std::ostream& stream); void writeCharArrayInitList(std::ostream& stream, const std::string& boolString); - void writeExecContent(std::ostream& stream, const Arabica::DOM::Node& node, int indent = 0); + void writeExecContent(std::ostream& stream, const xercesc::DOMNode* node, int indent = 0); - Arabica::XPath::NodeSet computeExitSet(const Arabica::DOM::Element& transition); - - void resortStates(Arabica::DOM::Node& node); + void resortStates(xercesc::DOMNode* node); void setHistoryCompletion(); void setStateCompletion(); void prepare(); @@ -74,8 +69,8 @@ protected: Interpreter interpreter; - Arabica::XPath::NodeSet _states; - Arabica::XPath::NodeSet _transitions; + std::vector _states; + std::vector _transitions; std::string _md5; std::string _prefix; diff --git a/src/uscxml/transform/ChartToFSM.cpp b/src/uscxml/transform/ChartToFSM.cpp deleted file mode 100644 index aa9dda8..0000000 --- a/src/uscxml/transform/ChartToFSM.cpp +++ /dev/null @@ -1,2035 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/transform/ChartToFSM.h" -#include "uscxml/transform/FlatStateIdentifier.h" -#include "uscxml/Convenience.h" -#include "uscxml/Factory.h" -#include "uscxml/debug/Complexity.h" - -#include -#include -#include - -#include -#include "uscxml/UUID.h" -#include -#include -#include -#undef max -#include - -#define UNDECIDABLE 2147483647 -#define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) - -#define DUMP_STATS(nrTrans, disregardTime) \ -uint64_t now = tthread::chrono::system_clock::now(); \ -if (now - _lastTimeStamp > 1000 || disregardTime) { \ - std::cerr << "## Transition: " << _perfTransUsed << " / " << _perfTransTotal << " [" << _perfTransProcessed << "/sec]"; \ - if (nrTrans > 0) { \ - std::cerr << " - 2**" << nrTrans << " = " << pow(2.0, static_cast(nrTrans)); \ - } \ - std::cerr << std::endl; \ - std::cerr << "## State : " << _globalConf.size() << " found / " << _perfStackSize << " stacked / " << _perfStatesTotal << " seen [" << _perfStatesProcessed << "/sec]" << std::endl; \ - std::cerr << "## Microstep : " << _perfMicroStepTotal << " [" << _perfMicroStepProcessed << "/sec]" << std::endl; \ - std::cerr << "## Cached : " << _perfStatesCachedTotal << " [" << _perfStatesCachedProcessed << "/sec]" << std::endl; \ - std::cerr << "## Skipped : " << _perfStatesSkippedTotal << " [" << _perfStatesSkippedProcessed << "/sec]" << std::endl; \ - std::cerr << "## Queues : " << (_maxEventRaisedChain == UNDECIDABLE ? "UNK" : toStr(_maxEventRaisedChain)) << " / " << (_maxEventSentChain == UNDECIDABLE ? "UNK" : toStr(_maxEventSentChain)) << std::endl; \ - std::cerr << "toFSM: "; \ - std::cerr << _perfTransUsed << ", " << _perfTransTotal << ", " << _perfTransProcessed << ", "; \ - std::cerr << _globalConf.size() << ", " << _perfStackSize << ", " << _perfStatesTotal << ", " << _perfStatesProcessed << ", "; \ - std::cerr << _perfMicroStepTotal << ", " << _perfMicroStepProcessed << ", "; \ - std::cerr << _perfStatesCachedTotal << ", " << _perfStatesCachedProcessed << ", " << _perfStatesSkippedTotal << ", " << _perfStatesSkippedProcessed << ", "; \ - std::cerr << (_maxEventRaisedChain == UNDECIDABLE ? "UNK" : toStr(_maxEventRaisedChain)) << ", " << (_maxEventSentChain == UNDECIDABLE ? "UNK" : toStr(_maxEventSentChain)) << std::endl; \ - std::cerr << std::endl; \ - _perfTransProcessed = 0; \ - _perfStatesProcessed = 0; \ - _perfStatesCachedProcessed = 0; \ - _perfStatesSkippedProcessed = 0; \ - _perfMicroStepProcessed = 0; \ - if (!disregardTime)\ - _lastTimeStamp = now; \ -} - -//std::cerr << "Q: " << (_maxEventRaisedChain == UNDECIDABLE ? "UNK" : toStr(_maxEventRaisedChain)) << " / " << (_maxEventSentChain == UNDECIDABLE ? "UNK" : toStr(_maxEventSentChain)) << std::endl; - -#define DUMP_TRANSSET(where) \ -{\ -std::cout << std::endl;\ -std::cout << "** " << transitions.size() << " ** " << where << std::endl;\ - for (size_t m = 0; m < transitions.size(); m++) {\ - std::cout << transitions[m] << std::endl;\ - }\ -} - -namespace uscxml { - - -using namespace Arabica::DOM; -using namespace Arabica::XPath; - - -#define DETAIL_EXEC_CONTENT(field, actPtr) \ -std::cerr << " " << #field << " / " << TAGNAME_CAST(actPtr->field) << " ("; \ -NodeSet contents = filterChildType(Node_base::ELEMENT_NODE, actPtr->field, true); \ -for (size_t i = 0; i < contents.size(); i++) { \ - std::cerr << " " << TAGNAME_CAST(contents[i]); \ -} \ -std::cerr << ")"; - - - -ChartToFSM::ChartToFSM(const Interpreter& other) { - - cloneFrom(other.getImpl()); - - _transitionsFromTree = true; - _keepInvalidTransitions = false; - _lastTimeStamp = tthread::chrono::system_clock::now(); - _perfTransProcessed = 0; - _perfTransTotal = 0; - _perfTransUsed = 0; - _perfStatesTotal = 0; - _perfStatesProcessed = 0; - _perfStackSize = 0; - _perfStatesSkippedProcessed = 0; - _perfStatesSkippedTotal = 0; - _perfStatesCachedProcessed = 0; - _perfStatesCachedTotal = 0; - _perfMicroStepProcessed = 0; - _perfMicroStepTotal = 0; - - if (envVarIEquals("USCXML_TRANSFORM_TRANS_FROM", "powerset")) - _transitionsFromTree = false; - - _start = NULL; - _currGlobalTransition = NULL; - _transTree = NULL; - - _lastStateIndex = 0; - _lastActiveIndex = 0; - _lastTransIndex = 0; - - _maxEventSentChain = 0; - _maxEventRaisedChain = 0; - _doneEventRaiseTolerance = 0; - _skipEventChainCalculations = false; - - addMonitor(this); -} - -ChartToFSM::~ChartToFSM() { - std::map::iterator confIter = _globalConf.begin(); - while(confIter != _globalConf.end()) { - std::list::iterator transIter = confIter->second->sortedOutgoing.begin(); - while (transIter != confIter->second->sortedOutgoing.end()) { - delete *transIter; - transIter++; - } - delete confIter->second; - confIter++; - } - - // tear down caches - Arabica::XPath::NodeSet allTransitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", _scxml, true); - for (size_t i = 0; i < allTransitions.size(); i++) { - _transParents.erase(allTransitions[i]); - } -} - -Document ChartToFSM::getDocument() const { - if (_flatDoc) - return _flatDoc; - return _document; -} - -InterpreterState ChartToFSM::interpret() { - - init(); - setupIOProcessors(); - - { - std::list > > allConfig = Complexity::getAllConfigurations(_scxml); - for (std::list > >::iterator confIter = allConfig.begin(); confIter != allConfig.end(); confIter++) { - std::string seperator; - NodeSet configNodeSet; - std::set > config = *confIter; - for (std::set >::iterator elemIter = config.begin(); elemIter != config.end(); elemIter++) { -// std::cerr << seperator << ATTR((*elemIter), "id"); - seperator = ","; - configNodeSet.push_back(*elemIter); - } - assert(isLegalConfiguration(configNodeSet)); -// std::cerr << std::endl; - } - } - std::map histoGramm = Complexity::getTransitionHistogramm(_scxml); -// abort(); - - uint64_t complexity = Complexity::stateMachineComplexity(this) + 1; - std::cerr << "Approximate Complexity: " << complexity << std::endl; - std::cerr << "Approximate Active Complexity: " << Complexity::stateMachineComplexity(this, Complexity::IGNORE_HISTORY | Complexity::IGNORE_NESTED_DATA) + 1 << std::endl; - - if (complexity > 1000) { - _skipEventChainCalculations = true; - _maxEventRaisedChain = UNDECIDABLE; - _maxEventSentChain = UNDECIDABLE; - } - // initialize the datamodel - std::string datamodelName; - if (datamodelName.length() == 0 && HAS_ATTR(_scxml, "datamodel")) - datamodelName = ATTR(_scxml, "datamodel"); - if (datamodelName.length() == 0 && HAS_ATTR(_scxml, "profile")) // SCION SCXML uses profile to specify datamodel - datamodelName = ATTR(_scxml, "profile"); - if(datamodelName.length() > 0) { - _dataModel = _factory->createDataModel(datamodelName, this); - if (!_dataModel) { - Event e; - e.data.compound["cause"] = Data("Cannot instantiate datamodel", Data::VERBATIM); - throw e; - } - } else { - _dataModel = _factory->createDataModel("null", this); - } - if(datamodelName.length() > 0 && !_dataModel) { - LOG(ERROR) << "No datamodel for " << datamodelName << " registered"; - } - - // setup caches - { - Arabica::XPath::NodeSet allTransitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", _scxml, true); - indexedTransitions.reserve(allTransitions.size()); - for (size_t i = 0; i < allTransitions.size(); i++) { - _transParents[allTransitions[i]] = InterpreterImpl::getParentState(allTransitions[i]); - } - } - - // identify all history elements - NodeSet histories = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "history", _scxml, true); - for (size_t i = 0; i < histories.size(); i++) { - _historyTargets[ATTR_CAST(histories[i], "id")] = Element(histories[i]); - } - - _binding = (HAS_ATTR(_scxml, "binding") && iequals(ATTR(_scxml, "binding"), "late") ? LATE : EARLY); - _alreadyFlat = (HAS_ATTR(_scxml, "flat") && stringIsTrue(ATTR(_scxml, "flat"))); - - if (_alreadyFlat) { - reassembleFromFlat(); - return _state; - } - - // set invokeid for all invokers to parent state if none given - NodeSet invokers = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _scxml, true); - for (size_t i = 0; i < invokers.size(); i++) { - Element invokerElem = Element(invokers[i]); - invokerElem.setAttribute("parent", ATTR_CAST(invokerElem.getParentNode(), "id")); - } - // reset - _globalConf.clear(); - _currGlobalTransition = NULL; - - // very first state - _start = new GlobalState(_configuration, _alreadyEntered, _historyValue, _nsInfo.xmlNSPrefix, this); - _globalConf[_start->stateId] = _start; - _globalConf[_start->stateId]->index = _lastStateIndex++; - - NodeSet initialTransitions; - - // enter initial configuration - Arabica::XPath::NodeSet initialStates; - initialStates = getInitialStates(); - assert(initialStates.size() > 0); - for (size_t i = 0; i < initialStates.size(); i++) { - Element initialElem = _document.createElementNS(_nsInfo.nsURL, "initial"); - _nsInfo.setPrefix(initialElem); - initialElem.setAttribute("generated", "true"); - Element transitionElem = _document.createElementNS(_nsInfo.nsURL, "transition"); - _nsInfo.setPrefix(transitionElem); - transitionElem.setAttribute("target", ATTR_CAST(initialStates[i], "id")); - initialElem.appendChild(transitionElem); - _scxml.appendChild(initialElem); - initialTransitions.push_back(transitionElem); - } - - if (!_skipEventChainCalculations) - annotateRaiseAndSend(_scxml); - -// std::cout << _scxml << std::endl; - - indexTransitions(); - - // add initial transitions as least prior - for (size_t i = 0; i < initialTransitions.size() ; i++) { - indexedTransitions.push_back(Element(initialTransitions[i])); - } - - // set index attribute for transitions - for (size_t i = 0; i < indexedTransitions.size(); i++) { -// std::cerr << toStr(i) << ":" << (HAS_ATTR(indexedTransitions[i], "line_start") ? ATTR(indexedTransitions[i], "line_start") : ""); -// std::cerr << "\t" << DOMUtils::xPathForNode(indexedTransitions[i]) << std::endl; - indexedTransitions[i].setAttribute("index", toStr(i)); - } - -// int lastTransIndex = indexedTransitions.size(); -// for (size_t i = 0; i < initialTransitions.size() ; i++, lastTransIndex++) { -// indexedTransitions[i].setAttribute("index", toStr(indexedTransitions.size() - 1 - i)); -// } - - // gather and set index attribute o states - NodeSet allStates = getAllStates(); - allStates.to_document_order(); - - indexedStates.resize(allStates.size()); - for (size_t i = 0; i < allStates.size(); i++) { - Element state = Element(allStates[i]); - - // while we are iterating, determine deepest nested level - size_t nrAncs = getProperAncestors(state, _scxml).size(); - if (_doneEventRaiseTolerance < nrAncs) - _doneEventRaiseTolerance = nrAncs; - - state.setAttribute("index", toStr(i)); - indexedStates[i] = state; - } - -// std::cerr << _scxml << std::endl; - - // create a _flatDoc for the FSM - DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - _flatDoc = domFactory.createDocument(_document.getNamespaceURI(), "", 0); - - GlobalTransition* globalTransition = new GlobalTransition(initialTransitions, _dataModel, this); - globalTransition->index = _lastTransIndex++; - - _start->sortedOutgoing.push_back(globalTransition); - globalTransition->source = _start->stateId; - _currGlobalTransition = globalTransition; - - enterStates(initialTransitions); - globalTransition->destination = FlatStateIdentifier::toStateId(_configuration); - globalTransition->activeDestination = globalTransition->destination; - - explode(); - - DUMP_STATS(0, true); - -#if 0 - // print set of global configurations - for(std::map::iterator globalConfIter = _globalConf.begin(); - globalConfIter != _globalConf.end(); - globalConfIter++) { - std::cerr << globalConfIter->first << std::endl; - } - std::cerr << _globalConf.size() << std::endl; -#endif - - std::cerr << "Actual Complexity: " << _globalConf.size() << std::endl; - std::cerr << "Actual Active Complexity: " << _activeConf.size() << std::endl; - std::cerr << "Internal Queue: " << _maxEventRaisedChain << std::endl; - std::cerr << "External Queue: " << _maxEventSentChain << std::endl; - -// if (complexity < _globalConf.size()) -// throw std::runtime_error("Upper bound for states exceeded"); - - return _state; -} - -void ChartToFSM::executeContent(const Arabica::DOM::Element& content, bool rethrow) { -// std::cerr << content << std::endl; -// std::cerr << TAGNAME(content) << std::endl; - - GlobalTransition::Action action; - - NodeList childs = content.getChildNodes(); - for (unsigned int i = 0; i < childs.getLength(); i++) { - Node_base::Type type = childs.item(i).getNodeType(); - if (type == Node_base::ELEMENT_NODE || type == Node_base::COMMENT_NODE || type == Node_base::TEXT_NODE) { - goto HAS_VALID_CHILDREN; - } - } - return; - -HAS_VALID_CHILDREN: - if (false) { - } else if (TAGNAME(content) == "transition") { - action.transition = content; - } else if (TAGNAME(content) == "onexit") { - action.onExit = content; - } else if (TAGNAME(content) == "onentry") { - action.onEntry = content; - } else if (TAGNAME(content) == "history") { - assert(false); - } else { // e.g. global script elements - return; - } - - if (!_skipEventChainCalculations && - (_maxEventRaisedChain != UNDECIDABLE || _maxEventSentChain != UNDECIDABLE)) { - assert(content.hasAttribute("raise") && content.hasAttribute("send")); - - std::string raiseAttr = content.getAttribute("raise"); - std::string sendAttr = content.getAttribute("send"); - - _currGlobalTransition->eventsRaised = (raiseAttr == "-1" ? UNDECIDABLE : _currGlobalTransition->eventsRaised + strTo(raiseAttr)); - _currGlobalTransition->eventsSent = (sendAttr == "-1" ? UNDECIDABLE : _currGlobalTransition->eventsSent + strTo(sendAttr)); - - if (_currGlobalTransition->eventsRaised > _maxEventRaisedChain) - _maxEventRaisedChain = _currGlobalTransition->eventsRaised; - if (_currGlobalTransition->eventsSent > _maxEventSentChain) - _maxEventSentChain = _currGlobalTransition->eventsSent; - } - - _currGlobalTransition->actions.push_back(action); - _currGlobalTransition->hasExecutableContent = true; -} - -void ChartToFSM::invoke(const Arabica::DOM::Element& element) { - GlobalTransition::Action action; - action.invoke = element; - _currGlobalTransition->actions.push_back(action); - _currGlobalTransition->hasExecutableContent = true; -} - -void ChartToFSM::cancelInvoke(const Arabica::DOM::Element& element) { - GlobalTransition::Action action; - action.uninvoke = element; - _currGlobalTransition->actions.push_back(action); - _currGlobalTransition->hasExecutableContent = true; -} - -void ChartToFSM::internalDoneSend(const Arabica::DOM::Element& state, const Arabica::DOM::Element& doneData) { - if (!isState(state)) - return; - -// if (LOCALNAME(state) == "scxml") -// return; - -// if (parentIsScxmlState(state)) -// return; - -// return; -// std::cerr << "internalDoneSend: " << state << std::endl; - - // create onentry with a raise element - Element onentry = _flatDoc.createElementNS(_nsInfo.nsURL, "onentry"); - _nsInfo.setPrefix(onentry); - - Element raise = _flatDoc.createElementNS(_nsInfo.nsURL, "raise"); - _nsInfo.setPrefix(raise); - - onentry.appendChild(raise); - - if (doneData) { - Arabica::XPath::NodeSet contents = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", doneData); - if (contents.size() > 0) { - Node imported = _flatDoc.importNode(contents[0], true); - raise.appendChild(imported); - } - Arabica::XPath::NodeSet params = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "param", doneData); - if (params.size() > 0) { - Node imported = _flatDoc.importNode(params[0], true); - raise.appendChild(imported); - } - } - - - raise.setAttribute("event", "done.state." + ATTR_CAST(state, "id")); // parent?! - - GlobalTransition::Action action; - action.raiseDone = onentry; // HERE! - - _currGlobalTransition->actions.push_back(action); - if (!_skipEventChainCalculations && - (_maxEventRaisedChain != UNDECIDABLE || _maxEventSentChain != UNDECIDABLE)) - _currGlobalTransition->eventsRaised++; - _currGlobalTransition->hasExecutableContent = true; - -} - -static bool isSuperset(const GlobalTransition* t1, const GlobalTransition* t2) { - bool isSuperset = true; - - if (t1->transitionRefs.size() >= t2->transitionRefs.size()) - return false; - - NodeSet t1Trans = t1->getTransitions(); - NodeSet t2Trans = t2->getTransitions(); - - for (size_t i = 0; i < t1Trans.size(); i++) { - if (!InterpreterImpl::isMember(t1Trans[i], t2Trans)) { - isSuperset = false; - } - } - return isSuperset; -} - -// return false if two transitions have the same source -std::map, Arabica::DOM::Node > ChartToFSM::_transParents; -bool ChartToFSM::filterSameState(const NodeSet& transitions) { - - for (unsigned int i = 0; i < transitions.size(); i++) { - Node p1 = _transParents[transitions[i]]; - - for (unsigned int j = i + 1; j < transitions.size(); j++) { -// if (i == j) -// continue; - Node p2 = _transParents[transitions[j]]; - - if (p1 == p2) - return false; - } - } - return true; -} - -static bool filterSameHierarchy(const NodeSet& transitions) { - for (unsigned int i = 0; i < transitions.size(); i++) { - Node t1 = transitions[i]; - Node p1 = InterpreterImpl::getParentState(t1); - for (unsigned int j = i + 1; j < transitions.size(); j++) { - Node t2 = transitions[j]; - Node p2 = InterpreterImpl::getParentState(t2); - while(p2) { - if (p1 == p2) { - return false; - } - p2 = p2.getParentNode(); - } - } - } - return true; -} - - -static bool filterChildEnabled(const NodeSet& transitions) { - // drop any transition that is already enabled by a child - NodeSet filteredTransitions; - for (unsigned int i = 0; i < transitions.size(); i++) { - Node t1 = transitions[i]; - Node p1 = InterpreterImpl::getParentState(t1); - for (unsigned int j = 0; j < transitions.size(); j++) { - if (i == j) - continue; - Node t2 = transitions[j]; - Node p2 = InterpreterImpl::getParentState(t2); - p2 = p2.getParentNode(); // TODO: think about again! - while(p2) { - if (p1 == p2) { - std::string eventDesc1 = ATTR_CAST(t1, "event"); - std::string eventDesc2 = ATTR_CAST(t2, "event"); - if (nameMatch(eventDesc1, eventDesc2)) { - return false; - } - } - p2 = p2.getParentNode(); - } - } - filteredTransitions.push_back(t1); - ; - } - return true; -} - -bool ChartToFSM::hasForeachInBetween(const Arabica::DOM::Node& ancestor, const Arabica::DOM::Node& child) { - if (!ancestor || !child) - return false; - - Node currChild = child; - while(currChild != ancestor) { - if (!currChild.getParentNode()) - return false; - if (TAGNAME_CAST(currChild) == "foreach") - return true; - currChild = currChild.getParentNode(); - } - return false; -} - -void ChartToFSM::annotateRaiseAndSend(const Arabica::DOM::Element& root) { - NodeSet execContent; - execContent.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", _scxml, true)); - execContent.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "onentry", _scxml, true)); - execContent.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "onexit", _scxml, true)); - for (size_t i = 0; i < execContent.size(); i++) { - Element execContentElem(execContent[i]); - - int nrRaise = 0; - NodeSet raise = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "raise", execContent[i], true); - for (size_t j = 0; j < raise.size(); j++) { - if (hasForeachInBetween(execContent[i], raise[j])) { - execContentElem.setAttribute("raise", "-1"); - goto DONE_COUNT_RAISE; - } else { - nrRaise++; - } - } - execContentElem.setAttribute("raise", toStr(nrRaise)); - -DONE_COUNT_RAISE: - - int nrSend = 0; - NodeSet sends = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "send", execContent[i], true); - for (size_t j = 0; j < sends.size(); j++) { - if (hasForeachInBetween(execContent[i], sends[j])) { - execContentElem.setAttribute("send", "-1"); - goto DONE_COUNT_SEND; - } else { - nrSend++; - } - } - execContentElem.setAttribute("send", toStr(nrSend)); - -DONE_COUNT_SEND: - ; - } -} - -void ChartToFSM::annotateDomain() { - Arabica::XPath::NodeSet allTransitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", _scxml, true); - for (size_t i = 0; i < allTransitions.size(); i++) { - Element transition(allTransitions[i]); - Arabica::DOM::Node domain = getTransitionDomain(transition); - if (domain) { - transition.setAttribute("domain", (HAS_ATTR_CAST(domain, "id") ? ATTR_CAST(domain, "id") : DOMUtils::xPathForNode(domain))); - } else { - transition.setAttribute("domain", "#UNDEF"); - } - } -} - -void ChartToFSM::annotateExitSet() { - Arabica::XPath::NodeSet allTransitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", _scxml, true); - for (size_t i = 0; i < allTransitions.size(); i++) { - Element transition(allTransitions[i]); - Arabica::DOM::Node domain = getTransitionDomain(transition); - - Arabica::XPath::NodeSet allStates = getAllStates(); - std::ostringstream exitSetStr; - std::string seperator = ""; - for (size_t j = 0; j < allStates.size(); j++) { - Element state(allStates[j]); - if (state.getParentNode() == domain) { - exitSetStr << seperator << (HAS_ATTR(state, "id") ? ATTR(state, "id") : DOMUtils::xPathForNode(state)); - seperator = ", "; - } - } - transition.setAttribute("exitset", exitSetStr.str()); - } -} - -void ChartToFSM::annotateEntrySet() { - Arabica::XPath::NodeSet allTransitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", _scxml, true); - for (size_t i = 0; i < allTransitions.size(); i++) { - Element transition(allTransitions[i]); - - NodeSet tmpTransitions; - NodeSet tmpStatesToEnter; - NodeSet tmpStatesForDefaultEntry; - std::map > tmpDefaultHistoryContent; - - tmpTransitions.push_back(transition); - computeEntrySet(tmpTransitions, tmpStatesToEnter, tmpStatesForDefaultEntry, tmpDefaultHistoryContent); - - std::ostringstream entrySetStr; - std::string seperator = ""; - - for (size_t j = 0; j < tmpStatesToEnter.size(); j++) { - Element state(tmpStatesToEnter[j]); - entrySetStr << seperator << (HAS_ATTR(state, "id") ? ATTR(state, "id") : DOMUtils::xPathForNode(state)); - seperator = ", "; - } - for (size_t j = 0; j < tmpStatesForDefaultEntry.size(); j++) { - Element state(tmpStatesForDefaultEntry[j]); - entrySetStr << seperator << (HAS_ATTR(state, "id") ? ATTR(state, "id") : DOMUtils::xPathForNode(state)); - seperator = ", "; - } - transition.setAttribute("entryset", entrySetStr.str()); - - } -} - -void ChartToFSM::annotateConflicts() { - Arabica::XPath::NodeSet allTransitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", _scxml, true); - Arabica::XPath::NodeSet allStates = getAllStates(); - - for (size_t i = 0; i < allTransitions.size(); i++) { - Element t1(allTransitions[i]); - if (!isState(Element(t1.getParentNode()))) - continue; - - Arabica::DOM::Node d1 = getTransitionDomain(t1); - - Arabica::XPath::NodeSet exitSet1; - for (size_t k = 0; k < allStates.size(); k++) { - Element state(allStates[k]); - if (isDescendant(state, d1)) { - exitSet1.push_back(state); - } - } - - std::ostringstream preemptionStr; - std::string seperator = ""; - - for (size_t j = 0; j < allTransitions.size(); j++) { - if ( i == j) - continue; - - Element t2(allTransitions[j]); - if (!isState(Element(t2.getParentNode()))) - continue; - - Arabica::DOM::Node d2 = getTransitionDomain(t2); - - Arabica::XPath::NodeSet exitSet2; - for (size_t k = 0; k < allStates.size(); k++) { - Element state(allStates[k]); - if (isDescendant(state, d2)) { - exitSet2.push_back(state); - } - } - - if (hasIntersection(exitSet1, exitSet2)) { - preemptionStr << seperator << (HAS_ATTR(t2, "priority") ? ATTR(t2, "priority") : DOMUtils::xPathForNode(t2)); - seperator = ", "; - } - -// if (isDescendant(d1, d2) || isDescendant(d2, d1) || d1 == d2) { -// preemptionStr << seperator << ATTR(t2, "priority"); -// seperator = ", "; -// } - - } - if (preemptionStr.str().size() > 0) - t1.setAttribute("conflicts", preemptionStr.str()); - - } -} - -void ChartToFSM::indexTransitions() { - indexedTransitions.clear(); - indexTransitions(_scxml); - -#if 1 - size_t index = indexedTransitions.size() - 1; - for (std::vector >::iterator transIter = indexedTransitions.begin(); transIter != indexedTransitions.end(); transIter++) { - transIter->setAttribute("priority", toStr(index)); - index--; - } -#else - size_t index = 0; - for (std::vector >::iterator transIter = indexedTransitions.begin(); transIter != indexedTransitions.end(); transIter++) { - transIter->setAttribute("priority", toStr(index)); - index++; - } -#endif - // reverse indices for most prior to be in front - //std::reverse(indexedTransitions.begin(), indexedTransitions.end()); -} - -#if 0 -void ChartToFSM::indexTransitions(const Arabica::DOM::Element& root) { - // breadth first traversal of transitions - Arabica::XPath::NodeSet levelTransitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", root); - for (int i = levelTransitions.size() - 1; i >= 0; i--) { - // push into index starting with least prior - indexedTransitions.push_back(Element(levelTransitions[i])); - } - - Arabica::XPath::NodeSet nextLevel = filterChildType(Arabica::DOM::Node_base::ELEMENT_NODE, root); - for (int i = nextLevel.size() - 1; i >= 0; i--) { - Element stateElem = Element(nextLevel[i]); - if (isState(stateElem)) - indexTransitions(stateElem); - } -} - -#else - -void ChartToFSM::indexTransitions(const Arabica::DOM::Element& root) { - // Post-order traversal of transitions - Arabica::XPath::NodeSet childStates = getChildStates(root); - for (size_t i = 0; i < childStates.size(); i++) { - Element childElem(childStates[i]); - indexTransitions(childElem); - } - - Arabica::XPath::NodeSet levelTransitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", root); - for (size_t i = 0; i < levelTransitions.size(); i++) { - // push into index starting with least prior - indexedTransitions.push_back(Element(levelTransitions[i])); - } - -} - -#endif -bool GlobalTransition::operator< (const GlobalTransition& other) const { - const std::vector >& indexedTransitions = interpreter->indexedTransitions; - NodeSet transitions = getTransitions(); - - for (std::vector >::const_iterator transIter = indexedTransitions.begin(); transIter != indexedTransitions.end(); transIter++) { - const Element& refTrans = *transIter; - NodeSet otherTransitions = other.getTransitions(); - - if (InterpreterImpl::isMember(refTrans, transitions) && !InterpreterImpl::isMember(refTrans, otherTransitions)) { - return true; - } - if (!InterpreterImpl::isMember(refTrans, transitions) && InterpreterImpl::isMember(refTrans, otherTransitions)) { - return false; - } - } - return true; // actually, they are equal -} - -template bool PtrComp(const T * const & a, const T * const & b) { - return *a < *b; -} - - -/** - * subset only removes transitions without cond -> superset will always be enabled - */ -bool hasUnconditionalSuperset(GlobalTransition* first, GlobalTransition* second) { - - NodeSet firstTransitions = first->getTransitions(); - NodeSet secondTransitions = second->getTransitions(); - -// if (first->condition.size() > 0) -// return false; - - if (isSuperset(second, first)) { - for (size_t i = 0; i < firstTransitions.size(); i++) { - if (!InterpreterImpl::isMember(firstTransitions[i], secondTransitions)) { - if (HAS_ATTR_CAST(firstTransitions[i], "cond")) { - return false; // second can't be removed - } - } - } - return true; // remove second - } - return false; //second can't be removed -} - -/** - * earlier transition is conditionless for same event - */ -bool hasEarlierUnconditionalMatch(GlobalTransition* first, GlobalTransition* second) { - if (first->eventDesc == second->eventDesc) { - if (first->condition.size() == 0) - return true; - } - return false; -} - -std::list redundantRemove(std::list list) { -#if 1 - std::list::iterator outerIter; - std::list::iterator innerIter; - - outerIter = list.begin(); - while(outerIter != list.end()) { - innerIter = outerIter; - - while(innerIter != list.end()) { - if (innerIter == outerIter) { - innerIter++; - continue; - } - - GlobalTransition* t1 = *outerIter; - GlobalTransition* t2 = *innerIter; - - if (hasUnconditionalSuperset(t1, t2)) { - list.erase(innerIter++); - continue; - } else if (hasUnconditionalSuperset(t2, t1)) { - list.erase(outerIter++); - break; - } - if (hasEarlierUnconditionalMatch(t1, t2)) { - list.erase(innerIter++); - continue; - } - innerIter++; - } - - outerIter++; - } - -#else - - for (std::list::iterator outerIter = list.begin(); - outerIter != list.end(); - outerIter++) { - for (std::list::iterator innerIter = outerIter; - innerIter != list.end(); - innerIter++) { - - if (innerIter == outerIter) - continue; - - GlobalTransition* t1 = *outerIter; - GlobalTransition* t2 = *innerIter; - - if (hasUnconditionalSuperset(t1, t2)) { - innerIter = list.erase(innerIter); - continue; - } else if (hasUnconditionalSuperset(t2, t1)) { - outerIter = list.erase(outerIter); - continue; - } - if (hasEarlierUnconditionalMatch(t1, t2)) { - innerIter = list.erase(innerIter); - continue; - } - } - } -#endif - return list; -} - -std::list redundantMark(std::list list) { -#if 1 - std::list::iterator outerIter; - std::list::iterator innerIter; - - outerIter = list.begin(); - while(outerIter != list.end()) { - innerIter = outerIter; - - while(innerIter != list.end()) { - if (innerIter == outerIter) { - innerIter++; - continue; - } - - GlobalTransition* t1 = *outerIter; - GlobalTransition* t2 = *innerIter; - - if (!t1->isValid || !t2->isValid) { - innerIter++; - continue; - } - - if (hasUnconditionalSuperset(t1, t2)) { - t2->isValid = false; - t2->invalidMsg = "Unconditional superset"; - t2->invalidReason = GlobalTransition::UNCONDITIONAL_SUPERSET; - innerIter++; - continue; - } else if (hasUnconditionalSuperset(t2, t1)) { - t1->isValid = false; - t1->invalidMsg = "Unconditional superset"; - t1->invalidReason = GlobalTransition::UNCONDITIONAL_SUPERSET; - outerIter++; - break; - } - if (hasEarlierUnconditionalMatch(t1, t2)) { - t2->isValid = false; - t2->invalidMsg = "Earlier unconditional match"; - t2->invalidReason = GlobalTransition::UNCONDITIONAL_MATCH; - innerIter++; - continue; - } - innerIter++; - } - - outerIter++; - } - -#else - - for (std::list::iterator outerIter = list.begin(); - outerIter != list.end(); - outerIter++) { - for (std::list::iterator innerIter = outerIter; - innerIter != list.end(); - innerIter++) { - - if (innerIter == outerIter) - continue; - - GlobalTransition* t1 = *outerIter; - GlobalTransition* t2 = *innerIter; - - if (!t1->isValid || !t2->isValid) - continue; - - if (hasUnconditionalSuperset(t1, t2)) { - t2->isValid = false; - t2->invalidMsg = "Unconditional superset"; - t2->invalidReason = GlobalTransition::UNCONDITIONAL_SUPERSET; - continue; - } else if (hasUnconditionalSuperset(t2, t1)) { - t1->isValid = false; - t1->invalidMsg = "Unconditional superset"; - t1->invalidReason = GlobalTransition::UNCONDITIONAL_SUPERSET; - continue; - } - if (hasEarlierUnconditionalMatch(t1, t2)) { - t2->isValid = false; - t2->invalidMsg = "Earlier unconditional match"; - t2->invalidReason = GlobalTransition::UNCONDITIONAL_MATCH; - continue; - } - } - } -#endif - return list; -} - - -void TransitionTreeNode::dump(int indent) { - std::string padding; - for (size_t i = 0; i + 1 < indent; i++) { - padding += "| "; - } - if (indent > 0) - padding += "|-"; - - std::string typeString; - switch (type) { - case TYPE_NESTED: - typeString = "NESTED"; - break; - case TYPE_PARALLEL: - typeString = "PARALLEL"; - break; - case TYPE_TRANSITION: - typeString = "TRANSITION"; - break; - case TYPE_UNDEFINED: - typeString = "UNDEFINED"; - break; - break; - default: - break; - } - - - if (transition) { - std::cerr << padding << "t" << ATTR(transition, "index") << " " << typeString << ": "; -// std::cerr << (prevTransition != NULL ? " (" + prevTransition->nodeId + ") <-" : ""); - std::cerr << "[" << nodeId << "]"; -// std::cerr << (nextTransition != NULL ? " -> (" + nextTransition->nodeId + ")" : ""); - std::cerr << std::endl; - } else { - std::cerr << padding << ATTR(state, "id") << " " << typeString << ": " << "[" << nodeId << "]"; -// std::cerr << (firstTransition != NULL ? " -> " + firstTransition->nodeId : ""); - std::cerr << std::endl; - } - - for (std::list::iterator childIter = children.begin(); childIter != children.end(); childIter++) { - (*childIter)->dump(indent + 1); - } -} - -void ChartToFSM::getPotentialTransitionsForConfFromTree(const Arabica::XPath::NodeSet& conf, std::map& outMap) { - if (_transTree == NULL) { - _transTree = buildTransTree(_scxml, "0"); -// _transTree->dump(); - } - std::string seperator; - - -// std::cerr << "--- "; - - // recursion start - std::set transLeafs; - - for (size_t i = 0; i < conf.size(); i++) { - DUMP_STATS(conf.size(), false); - - Element confElem(conf[i]); - assert(_stateToTransTreeNode.find(confElem) != _stateToTransTreeNode.end()); - TransitionTreeNode* node = _stateToTransTreeNode[confElem]; - if (node->firstState == NULL) { // a leaf - ignore intermediates - // ascend to the first parent with transitions but stop at parallel nodes - while(node != NULL && node->firstTransition == NULL) { - if (node->parent && node->parent->type == TransitionTreeNode::TYPE_PARALLEL) - break; - node = node->parent; - } - if (node != NULL) { - transLeafs.insert(node); - } else { - //std::cerr << ATTR(confElem, "id") << " does not cause transitions" << std::endl; - } - } - } - - std::list > stack; - stack.push_back(transLeafs); // push follow-up configurations onto stack - - while (stack.size() > 0) { - // pop from front of stack - std::set stateList = stack.front(); - stack.pop_front(); - - DUMP_STATS(conf.size(), false); - -#if 0 - seperator = ""; - std::cerr << "Current set: "; - for (std::set::iterator transIter = stateList.begin(); transIter != stateList.end(); transIter++) { - std::cerr << seperator << (*transIter)->nodeId; - seperator = ", "; - } - std::cerr << std::endl; -#endif - - /* - * TransNodes contains a set of lists of transitions. - * In the inner stack we build every possible combination - * of picking at-most one from each list. - */ - - /* create global transitions for every n-tuple in current set of lists */ - std::list, std::set > > innerStack; - innerStack.push_back(std::make_pair(std::set(), stateList)); - - while(innerStack.size() > 0) { - - // picking at-most one from each list - std::set remainingStates = innerStack.front().second; - std::set fixedTransitions = innerStack.front().first; - innerStack.pop_front(); - - if (remainingStates.size() > 0) { - // iterate for each first element fixed - TransitionTreeNode* firstRemainingState = *remainingStates.begin(); - remainingStates.erase(remainingStates.begin()); - - if (firstRemainingState->firstTransition == NULL) { - // no transitions at this state - reenqueue with NULL selection from this - innerStack.push_back(std::make_pair(fixedTransitions, remainingStates)); - continue; - } - - TransitionTreeNode* currTrans = firstRemainingState->firstTransition; - - // choose none from firstList - innerStack.push_back(std::make_pair(fixedTransitions, remainingStates)); - - while(currTrans != NULL) { - std::set fixedAndThis(fixedTransitions); - fixedAndThis.insert(currTrans); - innerStack.push_back(std::make_pair(fixedAndThis, remainingStates)); - currTrans = currTrans->nextTransition; - } - } else { - DUMP_STATS(conf.size(), false); - - if (fixedTransitions.size() > 0) { - - _perfTransTotal++; - _perfTransProcessed++; - - NodeSet fixed; - -#if 0 - seperator = ""; - for (std::set::iterator itemIter = fixedTransitions.begin(); itemIter != fixedTransitions.end(); itemIter++) { - TransitionTreeNode* currItem = *itemIter; - std::cerr << seperator << currItem->nodeId; - seperator = ", "; - } - std::cerr << " ## "; -#endif - - seperator = ""; - for (std::set::iterator itemIter = fixedTransitions.begin(); itemIter != fixedTransitions.end(); itemIter++) { - TransitionTreeNode* currItem = *itemIter; - fixed.push_back(currItem->transition); -// std::cerr << seperator << ATTR(currItem->transition, "index"); - seperator = ", "; - } -// std::cerr << std::endl; - - // fixed contains a transiton set! - assert(filterSameState(fixed)); -// assert(filterChildEnabled(fixed)); - assert(filterSameHierarchy(fixed)); - // do not add if they preempt - if (fixed.size() != removeConflictingTransitions(fixed).size()) { -// std::cerr << " - PREEMPTS" << std::endl; - continue; - } - - GlobalTransition* transition = new GlobalTransition(fixed, _dataModel, this); - transition->index = _lastTransIndex++; - -// assert(outMap.find(transition->transitionId) == outMap.end()); - - if (!transition->isValid && !_keepInvalidTransitions) { - delete(transition); -// std::cerr << " - INVALID" << std::endl; - continue; - } - - _perfTransUsed++; - - outMap[transition->transitionId] = transition; -// std::cerr << " - GOOD" << std::endl; - } - } - } - - // create new set of transition lists by moving to parent states - for (std::set::iterator stateIter = stateList.begin(); stateIter != stateList.end(); stateIter++) { - TransitionTreeNode* origState = *stateIter; - TransitionTreeNode* currState = origState; - TransitionTreeNode* parentState = currState->parent; - - /** - * We ascend the current state via its parent and add the parent with transitions. - * However, we break if we reached the top or if we passed a parallel state for - * wich we are not the first child - */ - - while(parentState != NULL) { - if (parentState->type == TransitionTreeNode::TYPE_PARALLEL && parentState->firstState != currState) { - // the first child of the parallel state will continue this transition - we made sure to keep them - break; - } - - if (parentState->firstTransition != NULL) { -// std::cerr << "#### Adding new parent lists for " << origState->nodeId << std::endl; - - std::set newStateList; - newStateList.insert(parentState); - - // add all other states that are not a child of the parent state - for (std::set::iterator newlistIter = stateList.begin(); newlistIter != stateList.end(); newlistIter++) { - TransitionTreeNode* otherState = *newlistIter; - while(otherState != NULL && otherState != parentState) { - otherState = otherState->parent; - } - if (otherState == NULL) - newStateList.insert(*newlistIter); - } - if (newStateList.size() > 0) - stack.push_back(newStateList); - break; - } - - currState = currState->parent; - parentState = currState->parent; - } - } - } -} - -TransitionTreeNode* ChartToFSM::buildTransTree(const Arabica::DOM::Element& root, const std::string& nodeId) { - TransitionTreeNode* stateNode = new TransitionTreeNode(); - stateNode->nodeId = nodeId; - stateNode->state = root; - - if (TAGNAME(root) == _nsInfo.xmlNSPrefix + "parallel") { - stateNode->type = TransitionTreeNode::TYPE_PARALLEL; - } else { - stateNode->type = TransitionTreeNode::TYPE_NESTED; - } - - // get all transitions and states from root without recursing - NodeSet nested; - nested.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", root)); - nested.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "state", root)); - nested.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "final", root)); - nested.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "parallel", root)); - nested.to_document_order(); - - TransitionTreeNode* lastNode = NULL; - - for (size_t i = 0; i < nested.size(); i++) { - Element nestedElem(nested[i]); - if (TAGNAME(nestedElem) == _nsInfo.xmlNSPrefix + "transition") { - TransitionTreeNode* transNode = new TransitionTreeNode(); - transNode->transition = nestedElem; - transNode->parent = stateNode; - transNode->nodeId = nodeId + "-" + toStr(i); - transNode->type = TransitionTreeNode::TYPE_TRANSITION; - - if (stateNode->firstTransition == NULL) { - stateNode->firstTransition = transNode; - } - stateNode->children.push_back(transNode); - stateNode->lastTransition = transNode; - - if (lastNode != NULL) { - lastNode->nextTransition = transNode; - transNode->prevTransition = lastNode; - } - lastNode = transNode; - - - } else { - TransitionTreeNode* deeperNode = buildTransTree(nestedElem, nodeId + "-" + toStr(i)); - if (stateNode->firstState == NULL) { - stateNode->firstState = deeperNode; - } - - deeperNode->parent = stateNode; - stateNode->children.push_back(deeperNode); - } - } - - _stateToTransTreeNode[root] = stateNode; - - return stateNode; -} - -void ChartToFSM::getPotentialTransitionsForConfFromPowerSet(const Arabica::XPath::NodeSet& conf, std::map& outMap) { - // get all transition elements from states in the current configuration - NodeSet allTransitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", conf); - - { - std::string seperator = ""; - for (size_t i = 0; i < allTransitions.size(); i++) { - std::cerr << seperator << ATTR_CAST(allTransitions[i], "index"); - seperator=", "; - } - std::cerr << std::endl; - } - -// if (true) { -// outMap = _confToTransitions[""]; -// } - - if (allTransitions.size() == 0) - return; // no transitions - - int nrElements = allTransitions.size(); - int k = 0; - int* stack = (int*)malloc((nrElements + 1) * sizeof(int)); - memset(stack, 0, (nrElements + 1) * sizeof(int)); - - /** - * Powerset is too naive and takes too long! - * We have it up to 500k checks/sec and still 2**30 is - * 1G+ for 30minutes in a single state out of 50k+! - */ - - while(1) { - // create the power set of all potential transitions - this is expensive! - // see: http://www.programminglogic.com/powerset-algorithm-in-c/ - - if (stack[k] < nrElements) { - stack[k+1] = stack[k] + 1; - k++; - } - - else { - stack[k-1]++; - k--; - } - - if (k==0) - break; - - NodeSet transitions; -// std::cerr << globalState->stateId << " [" << nrElements << "]: " << std::endl; - for (size_t i = 1; i <= k; i++) { - // std::cerr << stack[i] - 1 << ", "; - transitions.push_back(allTransitions[stack[i] - 1]); - } - // std::cerr << std::endl; - - // transitions.push_back(allTransitions[0]); - // transitions.push_back(allTransitions[4]); - // transitions.push_back(allTransitions[5]); - // transitions.push_back(allTransitions[7]); - - bool dump = false; - - // if (k == 4 && stack[1] == 1 && stack[2] == 5 && stack[3] == 6 && stack[4] == 8) { - // dump = true; - // } - - if (dump) DUMP_TRANSSET("at start"); - - _perfTransTotal++; - _perfTransProcessed++; - - DUMP_STATS(nrElements, false); - - GlobalTransition* transition = NULL; - - // reduce to conflict-free subset - // transitions.to_document_order(); - if (!_keepInvalidTransitions) { - // remove transitions in the same state - if(!filterSameState(transitions)) - continue; - if (dump) DUMP_TRANSSET("after same state filtered"); - - // remove those transitions with a child transition -// if(!filterChildEnabled(transitions)) - if(!filterSameHierarchy(transitions)) - continue; - if (dump) DUMP_TRANSSET("after child enabled filtered"); - - transitions = removeConflictingTransitions(transitions); - if (dump) DUMP_TRANSSET("after conflicting filtered"); - // algorithm can never reduce to empty set - assert(transitions.size() > 0); - - // create a GlobalTransition object from the set - transition = new GlobalTransition(transitions, _dataModel, this); - if (!transition->isValid) { - // this set of transitions can not be enabled together - delete transition; - continue; - } - } else { - transition = new GlobalTransition(transitions, _dataModel, this); - - // remove transitions in the same state - if(!filterSameState(transitions)) { - transition->isValid = false; - transition->invalidReason = GlobalTransition::SAME_SOURCE_STATE; - transition->invalidMsg = "Same source state"; - -// } else if(!filterChildEnabled(transitions)) { - } else if(!filterSameHierarchy(transitions)) { - transition->isValid = false; - transition->invalidReason = GlobalTransition::CHILD_ENABLED; - transition->invalidMsg = "Nested transitions"; - } else { - NodeSet nonPreemptingTransitions = removeConflictingTransitions(transitions); - if (nonPreemptingTransitions.size() != transitions.size()) { - transition->isValid = false; - transition->invalidReason = GlobalTransition::PREEMPTING_MEMBERS; - transition->invalidMsg = "Preempting members"; - } - } - - } - - // two combinations might have projected onto the same conflict-free set - if (outMap.find(transition->transitionId) != outMap.end()) { - // std::cerr << "skipping as projected onto existing conflict-free subset" << std::endl; - delete transition; - continue; - } - - transition->index = _lastTransIndex++; - _perfTransUsed++; - - // remember this conflict-free set - // std::cerr << "New conflict-free subset: " << transition->transitionId << ":" << transition->eventDesc << std::endl; - outMap[transition->transitionId] = transition; - } -// _confToTransitions[""] = outMap; - return; -} - -void ChartToFSM::explode() { - - std::list > statesRemaining; - statesRemaining.push_back(std::make_pair(_currGlobalTransition, new GlobalState(_configuration, _alreadyEntered, _historyValue, _nsInfo.xmlNSPrefix, this))); - - // add all invokers for initial transition - for (unsigned int i = 0; i < _statesToInvoke.size(); i++) { - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _statesToInvoke[i]); - for (unsigned int j = 0; j < invokes.size(); j++) { - invoke(Element(invokes[j])); - } - } - _statesToInvoke = NodeSet(); - - /** - We need this to be a recursion in order not to exhaust the stack - */ - - // append new global states and pop from front - while(statesRemaining.size() > 0) { - _perfStackSize = statesRemaining.size(); - _perfStatesTotal++; - _perfStatesProcessed++; - - DUMP_STATS(0, false); - - GlobalState* globalState = statesRemaining.front().second; - _currGlobalTransition = statesRemaining.front().first; - statesRemaining.pop_front(); - - // used to be conditionalized, we will just assume - assert(_currGlobalTransition); - - if (_globalConf.find(globalState->stateId) != _globalConf.end()) { - if (_currGlobalTransition->isEventless && - !_skipEventChainCalculations && - (_maxEventRaisedChain != UNDECIDABLE || _maxEventSentChain != UNDECIDABLE)) { - // we arrived via a spontaneaous transition, do we need to update? - updateRaisedAndSendChains(_globalConf[globalState->stateId], _currGlobalTransition, std::set()); - } - delete globalState; - _perfStatesSkippedTotal++; - _perfStatesSkippedProcessed++; - continue; // we have already been here - } - - _configuration = globalState->getActiveStates(); - _alreadyEntered = globalState->getAlreadyEnteredStates(); - _historyValue = globalState->getHistoryStates(); - - // remember as global configuration - _globalConf[globalState->stateId] = globalState; - _globalConf[globalState->stateId]->index = _lastStateIndex++; - - if(_globalConf[globalState->stateId]->isFinal) { - if (_activeConf.find(globalState->activeId) == _activeConf.end()) { - assert(globalState->activeIndex == -1); - globalState->activeIndex = _lastActiveIndex++; - _activeConf[globalState->activeId] = globalState; // remember as active configuration - exitInterpreter(); - } - continue; // done in this branch - } - - if (_activeConf.find(globalState->activeId) != _activeConf.end()) { - // we already know these transition sets, just copy over - std::list::iterator sortTransIter = _activeConf[globalState->activeId]->sortedOutgoing.begin(); - while(sortTransIter != _activeConf[globalState->activeId]->sortedOutgoing.end()) { - globalState->sortedOutgoing.push_back(GlobalTransition::copyWithoutExecContent(*sortTransIter)); - globalState->sortedOutgoing.back()->index = _lastTransIndex++; - _perfTransUsed++; - sortTransIter++; - } - _perfStatesCachedTotal++; - _perfStatesCachedProcessed++; - - } else { - // we need to calculate the potential optimal transition sets - std::map transitionSets; - // std::cerr << globalState->stateId << std::endl; - if (_transitionsFromTree) { - getPotentialTransitionsForConfFromTree(refsToStates(globalState->activeStatesRefs), transitionSets); - } else { - getPotentialTransitionsForConfFromPowerSet(refsToStates(globalState->activeStatesRefs), transitionSets); - } - - // reduce and sort transition sets - for(std::map::iterator transSetIter = transitionSets.begin(); - transSetIter != transitionSets.end(); - transSetIter++) { - globalState->sortedOutgoing.push_back(transSetIter->second); - } - - globalState->sortedOutgoing.sort(PtrComp); -// globalState->sortedOutgoing.unique(hasUnconditionalSuperset); -// globalState->sortedOutgoing.unique(hasEarlierUnconditionalMatch); - // unique is not quite like what we need, but it was a start - if (_keepInvalidTransitions) { - globalState->sortedOutgoing = redundantMark(globalState->sortedOutgoing); - } else { -// globalState->sortedOutgoing.unique(hasUnconditionalSuperset); -// globalState->sortedOutgoing.unique(hasEarlierUnconditionalMatch); - globalState->sortedOutgoing = redundantRemove(globalState->sortedOutgoing); - } -// globalState->sortedOutgoing = redundantRemove(globalState->sortedOutgoing); -// globalState->sortedOutgoing = redundantRemove(globalState->sortedOutgoing); -// -// std::cout << globalState->sortedOutgoing.size() << std::endl; - - assert(_activeConf.find(globalState->activeId) == _activeConf.end()); - assert(globalState->activeIndex == -1); - globalState->activeIndex = _lastActiveIndex++; - _activeConf[globalState->activeId] = globalState; - } - - // take every transition set and append resulting new state - for(std::list::iterator transIter = globalState->sortedOutgoing.begin(); - transIter != globalState->sortedOutgoing.end(); - transIter++) { - - GlobalTransition* incomingTrans = _currGlobalTransition; - GlobalTransition* outgoingTrans = *transIter; - - outgoingTrans->source = globalState->stateId; - - if (_keepInvalidTransitions && !outgoingTrans->isValid) - continue; - - _currGlobalTransition = outgoingTrans; - - microstep(refsToTransitions(outgoingTrans->transitionRefs)); -// assert(isLegalConfiguration(_configuration)); - - _perfMicroStepProcessed++; - _perfMicroStepTotal++; - - // if outgoing transition is spontaneous, add number of events to chain - if (outgoingTrans->isEventless && - !_skipEventChainCalculations && - (_maxEventRaisedChain != UNDECIDABLE || _maxEventSentChain != UNDECIDABLE)) { - outgoingTrans->eventsChainRaised = MIN(incomingTrans->eventsChainRaised + outgoingTrans->eventsRaised, UNDECIDABLE); - outgoingTrans->eventsChainSent = MIN(incomingTrans->eventsChainSent + outgoingTrans->eventsSent, UNDECIDABLE); - - if (outgoingTrans->eventsChainRaised > _maxEventRaisedChain) - _maxEventRaisedChain = outgoingTrans->eventsChainRaised; - if (outgoingTrans->eventsChainSent > _maxEventSentChain) - _maxEventSentChain = outgoingTrans->eventsChainSent; - - } - - statesRemaining.push_back(std::make_pair(outgoingTrans, new GlobalState(_configuration, _alreadyEntered, _historyValue, _nsInfo.xmlNSPrefix, this))); - - // add all invokers - for (unsigned int i = 0; i < _statesToInvoke.size(); i++) { - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _statesToInvoke[i]); - for (unsigned int j = 0; j < invokes.size(); j++) { - invoke(Element(invokes[j])); - } - } - _statesToInvoke = NodeSet(); - - // remember that the last transition lead here - outgoingTrans->destination = statesRemaining.back().second->stateId; - outgoingTrans->activeDestination = statesRemaining.back().second->activeId; - // reset state for next transition set - _configuration = globalState->getActiveStates(); - _alreadyEntered = globalState->getAlreadyEnteredStates(); - _historyValue = globalState->getHistoryStates(); - } - } - -} - -void ChartToFSM::updateRaisedAndSendChains(GlobalState* state, GlobalTransition* source, std::set visited) { - for (std::list::iterator transIter = state->sortedOutgoing.begin(); transIter != state->sortedOutgoing.end(); transIter++) { - GlobalTransition* transition = *transIter; - - if (!transition->isEventless) - continue; // we do not care for eventful transitions - - // source leads to spontaneous transition -> update event chains - bool eventChainsNeedUpdated = false; - - if (visited.find(transition) != visited.end()) { - // potential spontaneous transition cycle! - if (transition->eventsChainRaised > 0) - _maxEventRaisedChain = UNDECIDABLE; - if (transition->eventsChainSent > 0) - _maxEventSentChain = UNDECIDABLE; - return; - } - - // UNDECIDABLE means "undecidable / endless" - - // will source increase our event chain? - if (transition->eventsChainRaised != UNDECIDABLE && - transition->eventsChainRaised < source->eventsChainRaised + transition->eventsRaised) { - // taking transition after source causes more events in chain - transition->eventsChainRaised = MIN(source->eventsChainRaised + transition->eventsRaised, UNDECIDABLE); - eventChainsNeedUpdated = true; - } - if (transition->eventsChainSent != UNDECIDABLE && - transition->eventsChainSent < source->eventsChainSent + transition->eventsSent) { - // taking transition after source causes more events in chain - transition->eventsChainSent = MIN(source->eventsChainSent + transition->eventsSent, UNDECIDABLE); - eventChainsNeedUpdated = true; - } - - if (eventChainsNeedUpdated && - transition->destination.length() > 0 && - _globalConf.find(transition->destination) != _globalConf.end()) { - - visited.insert(transition); - // iterate all spontaneous transitions in destination and update event chains - updateRaisedAndSendChains(_globalConf[transition->destination], transition, visited); - } - - if (transition->eventsChainRaised > _maxEventRaisedChain) - _maxEventRaisedChain = transition->eventsChainRaised; - if (transition->eventsChainSent > _maxEventSentChain) - _maxEventSentChain = transition->eventsChainSent; - } -} - -uint32_t ChartToFSM::getMinInternalQueueLength(uint32_t defaultVal) { - if (_maxEventRaisedChain != UNDECIDABLE) - return _maxEventRaisedChain + _doneEventRaiseTolerance; - return defaultVal; -} - -uint32_t ChartToFSM::getMinExternalQueueLength(uint32_t defaultVal) { - if (_maxEventSentChain != UNDECIDABLE) - return _maxEventSentChain; - return defaultVal; -} - -void ChartToFSM::reassembleFromFlat() { - LOG(ERROR) << "Cannot flatten flat SCXML document"; - abort(); -} - -Arabica::XPath::NodeSet ChartToFSM::refsToStates(const std::set& stateRefs) { - NodeSet states; - for (std::set::const_iterator stateIter = stateRefs.begin(); stateIter != stateRefs.end(); stateIter++) { - states.push_back(indexedStates[*stateIter]); - } - return states; -} - -Arabica::XPath::NodeSet ChartToFSM::refsToTransitions(const std::set& transRefs) { - NodeSet transitions; - for (std::set::const_iterator transIter = transRefs.begin(); transIter != transRefs.end(); transIter++) { - transitions.push_back(indexedTransitions[*transIter]); - } - return transitions; -} - -void ChartToFSM::beforeMicroStep(Interpreter interpreter) { -} -void ChartToFSM::onStableConfiguration(Interpreter interpreter) { -} -void ChartToFSM::beforeExitingState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - GlobalTransition::Action action; - action.exited = state; - _currGlobalTransition->actions.push_back(action); -} -void ChartToFSM::beforeEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - GlobalTransition::Action action; - action.entered = state; - _currGlobalTransition->actions.push_back(action); -} -void ChartToFSM::beforeTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing) { -} - -std::ostream& operator<< (std::ostream& os, const GlobalTransition::Action& action) { - if (action.onEntry) - os << "onEntry: " << action.onEntry; - if (action.onExit) - os << "onExit: " << action.onExit; - if (action.transition) - os << "transition: " << action.transition; - if (action.entered) - os << "entered: " << action.entered; - if (action.exited) - os << "exited: " << action.exited; - if (action.invoke) - os << "invoke: " << action.invoke; - if (action.uninvoke) - os << "uninvoke: " << action.uninvoke; - if (action.raiseDone) - os << "raiseDone: " << action.raiseDone; - return os; -} - -GlobalState::GlobalState(const Arabica::XPath::NodeSet& activeStates_, - const Arabica::XPath::NodeSet& alreadyEnteredStates_, // we need to remember for binding=late - const std::map >& historyStates_, - const std::string& xmlNSPrefix, - ChartToFSM* flattener) { - interpreter = flattener; - activeIndex = -1; - - // take references - for (size_t i = 0; i < activeStates_.size(); i++) { - activeStatesRefs.insert(strTo(ATTR_CAST(activeStates_[i], "index"))); - } - - for (size_t i = 0; i < alreadyEnteredStates_.size(); i++) { - alreadyEnteredStatesRefs.insert(strTo(ATTR_CAST(alreadyEnteredStates_[i], "index"))); - } - - for (std::map >::const_iterator histIter = historyStates_.begin(); histIter != historyStates_.end(); histIter++) { - for (size_t i = 0; i < histIter->second.size(); i++) { - historyStatesRefs[histIter->first].insert(strTo(ATTR_CAST(histIter->second[i], "index"))); - } - } - - isFinal = false; - - // is state this final? - for(int i = 0; i < activeStates_.size(); i++) { - Arabica::DOM::Element state = Arabica::DOM::Element(activeStates_[i]); - Arabica::DOM::Element parentElem = (Arabica::DOM::Element)state.getParentNode(); - if(InterpreterImpl::isFinal(state) && iequals(parentElem.getTagName(), xmlNSPrefix + "scxml")) { - isFinal = true; - break; - } - } - - FlatStateIdentifier flatStateId(getActiveStates(), getAlreadyEnteredStates(), getHistoryStates()); - stateId = flatStateId.getStateId(); - activeId = flatStateId.getFlatActive(); -} - -GlobalTransition* GlobalTransition::copyWithoutExecContent(GlobalTransition* other) { - GlobalTransition* newTrans = new GlobalTransition(*other); - newTrans->actions.clear(); - newTrans->historyBase = other; - other->historyTrans.push_back(newTrans); - return newTrans; -} - -GlobalTransition::GlobalTransition(const Arabica::XPath::NodeSet& transitionSet, DataModel dataModel, ChartToFSM* flattener) { - interpreter = flattener; - - eventsRaised = 0; - eventsSent = 0; - eventsChainRaised = 0; - eventsChainSent = 0; - historyBase = NULL; - - for (size_t i = 0; i < transitionSet.size(); i++) { - transitionRefs.insert(strTo(ATTR_CAST(transitionSet[i], "index"))); - } - - std::ostringstream setId; // also build id for subset - std::string seperator = ""; - for (std::set::iterator transIter = transitionRefs.begin(); transIter != transitionRefs.end(); transIter++) { - setId << seperator << *transIter; - seperator = "-"; - } - transitionId = setId.str(); - - hasExecutableContent = false; - isValid = true; - isEventless = true; - -#if 0 - std::cerr << "################" << std::endl; - for (size_t i = 0; i < transitions.size(); i++) { - std::cerr << transitions[i] << std::endl; - } - std::cerr << "################" << std::endl; -#endif - - // first establish whether this is a valid set - - /** - * Can these events event occur together? They can't if: - * 1. event / eventless is mixed - * 2. target / targetless is mixed (?) - * 3. there is no common prefix for their event attribute - */ - - bool foundWithEvent = false; - bool foundEventLess = false; - bool foundWithTarget = false; - bool foundTargetLess = false; - - Arabica::DOM::Element withEvent; - Arabica::DOM::Element noneEvent; - Arabica::DOM::Element withTarget; - Arabica::DOM::Element noneTarget; - - for (size_t i = 0; i < transitionSet.size(); i++) { - Arabica::DOM::Element transElem = Arabica::DOM::Element(transitionSet[i]); - if (HAS_ATTR(transElem, "eventexpr")) { - ERROR_EXECUTION_THROW("Cannot flatten document with eventexpr attributes"); - } - if (HAS_ATTR(transElem, "event")) { - foundWithEvent = true; - withEvent = transElem; - if (foundEventLess) - break; - } else { - foundEventLess = true; - noneEvent = transElem; - if (foundWithEvent) - break; - } - if (HAS_ATTR(transElem, "target")) { - foundWithTarget = true; - withTarget = transElem; - if (foundTargetLess) - break; - } else { - foundTargetLess = true; - noneTarget = transElem; - if (foundWithTarget) - break; - } - - } - - // do not mix eventless and event transitions - if (foundEventLess && foundWithEvent) { - if (flattener->_keepInvalidTransitions) { - invalidReason = MIXES_EVENT_SPONTANEOUS; - invalidMsg = "Mixes (non-)spontaneous"; - } - isValid = false; - return; - } - - // 403c vs 229 / 403b - solved via filterChildEnabled - if (foundTargetLess && foundWithTarget) { -// isValid = false; -// return; - } - - isEventless = foundEventLess; - isTargetless = !foundWithTarget; - - // is there a set of event names that would enable this conflict-free transition set? - if (foundWithEvent) { - // get the set of longest event descriptors that will enable this transition set - eventNames = getCommonEvents(transitionSet); - if (eventNames.size() == 0) { -// LOG(INFO) << "No event will activate this conflict-free subset" << std::endl; - if (flattener->_keepInvalidTransitions) { - invalidReason = NO_COMMON_EVENT; - invalidMsg = "No common event"; - } - isValid = false; - return; - } else { - std::string seperator = ""; - for (std::list::iterator eventIter = eventNames.begin(); - eventIter != eventNames.end(); - eventIter++) { - eventDesc += seperator + *eventIter; - seperator = " "; - } - } - if (eventDesc.size() == 0) - eventDesc = "*"; - } - - // extract conditions and history targets - std::list conditions; - for (size_t i = 0; i < transitionSet.size(); i++) { - Arabica::DOM::Element transElem = Arabica::DOM::Element(transitionSet[i]); - // gather conditions while we are iterating anyway - if (HAS_ATTR(transElem, "cond")) { - conditions.push_back(boost::trim_copy(ATTR(transElem, "cond"))); - } - - std::list targets = tokenize(ATTR(transElem, "target")); - std::list::iterator targetIter = targets.begin(); - while(targetIter != targets.end()) { -// std::cout << "// " << *targetIter << std::endl; - if (flattener->_historyTargets.find(*targetIter) != flattener->_historyTargets.end()) { - histTargets.insert(*targetIter); - } - targetIter++; - } -// std::cout << std::endl << std::endl; - } - - seperator = ""; - for (std::vector >::iterator transIter = interpreter->indexedTransitions.begin(); transIter != interpreter->indexedTransitions.end(); transIter++) { - const Element& refTrans = *transIter; - if (!HAS_ATTR(refTrans, "priority")) - continue; - if (InterpreterImpl::isMember(refTrans, transitionSet)) { - members += seperator + ATTR(refTrans, "priority"); - } else { - members += seperator; - for (size_t i = 0; i < ATTR(refTrans, "priority").size(); i++) { - members += " "; - } - } - seperator = " "; - } - - // if (members == " 4 6 7 ") - // std::cout << "asdfadf"; - - if (conditions.size() > 1) { - condition = dataModel.andExpressions(conditions); - if (condition.size() == 0) { - LOG(ERROR) << "Datamodel does not support to conjungate expressions!" << std::endl; - } - } else if (conditions.size() == 1) { - condition = conditions.front(); - } -} - -Arabica::XPath::NodeSet GlobalState::getActiveStates() { - return interpreter->refsToStates(activeStatesRefs); -} - -Arabica::XPath::NodeSet GlobalState::getAlreadyEnteredStates() { - return interpreter->refsToStates(alreadyEnteredStatesRefs); -} - -std::map > GlobalState::getHistoryStates() { - std::map > historyValue; - for (std::map >::iterator histIter = historyStatesRefs.begin(); histIter != historyStatesRefs.end(); histIter++) { - historyValue[histIter->first] = interpreter->refsToStates(histIter->second); - } - return historyValue; -} - - -Arabica::XPath::NodeSet GlobalTransition::getTransitions() const { - return interpreter->refsToTransitions(transitionRefs); -} - -std::list GlobalTransition::getCommonEvents(const NodeSet& transitions) { - std::list prefixes; - std::list longestPrefixes; - - for (size_t i = 0; i < transitions.size(); i++) { - // for every transition - std::list eventNames = tokenize(ATTR_CAST(transitions[i], "event")); - - for (std::list::iterator eventNameIter = eventNames.begin(); - eventNameIter != eventNames.end(); - eventNameIter++) { - // for every event descriptor - std::string eventName = *eventNameIter; - - // remove trailing .* - if (eventName.find("*", eventName.size() - 1) != std::string::npos) - eventName = eventName.substr(0, eventName.size() - 1); - if (eventName.find(".", eventName.size() - 1) != std::string::npos) - eventName = eventName.substr(0, eventName.size() - 1); - - bool isMatching = true; - for (size_t j = 0; j < transitions.size(); j++) { - // check if token would activate all other transitions - if (i == j) - continue; - if (!nameMatch(ATTR_CAST(transitions[j], "event"), eventName)) { - isMatching = false; - break; - } - } - if (isMatching) { - prefixes.push_back(eventName); - } - } - } - - // from the set of event names, remove those that are prefixes - for (std::list::iterator outerEventNameIter = prefixes.begin(); - outerEventNameIter != prefixes.end(); - outerEventNameIter++) { - for (std::list::iterator innerEventNameIter = prefixes.begin(); - innerEventNameIter != prefixes.end(); - innerEventNameIter++) { - if (!iequals(*outerEventNameIter, *innerEventNameIter) && nameMatch(*outerEventNameIter, *innerEventNameIter)) { - goto IS_PREFIX; - } - } - longestPrefixes.push_back(*outerEventNameIter); -IS_PREFIX: - ; - } - return longestPrefixes; -} - -} diff --git a/src/uscxml/transform/ChartToFSM.cpp.new b/src/uscxml/transform/ChartToFSM.cpp.new deleted file mode 100644 index 1dcf16c..0000000 --- a/src/uscxml/transform/ChartToFSM.cpp.new +++ /dev/null @@ -1,1482 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/transform/ChartToFSM.h" -#include "uscxml/transform/FlatStateIdentifier.h" -#include "uscxml/Convenience.h" -#include "uscxml/Factory.h" - -#include -#include - -#include -#include "uscxml/UUID.h" -#include -#include -#include -#undef max -#include - -#define UNDECIDABLE 2147483647 -#define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) - -#define DUMP_STATS(nrTrans) \ -uint64_t now = tthread::chrono::system_clock::now(); \ -if (now - _lastTimeStamp > 1000) { \ - std::cerr << "## Transition: " << _perfTransUsed << " / " << _perfTransTotal << " [" << _perfTransProcessed << "/sec]"; \ - if (nrTrans > 0) { \ - std::cerr << " - 2**" << nrTrans << " = " << pow(2.0, static_cast(nrTrans)); \ - } \ - std::cerr << std::endl; \ - std::cerr << "## State : " << _globalConf.size() << " [" << _perfStatesProcessed << "/sec]" << std::endl; \ - std::cerr << "## Microstep : " << _perfMicroStepTotal << " [" << _perfMicroStepProcessed << "/sec]" << std::endl; \ - std::cerr << "## Cached : " << _perfStatesCachedTotal << " [" << _perfStatesCachedProcessed << "/sec]" << std::endl; \ - std::cerr << "## Skipped : " << _perfStatesSkippedTotal << " [" << _perfStatesSkippedProcessed << "/sec]" << std::endl; \ - std::cerr << "## Queues : " << (_maxEventRaisedChain == UNDECIDABLE ? "UNK" : toStr(_maxEventRaisedChain)) << " / " << (_maxEventSentChain == UNDECIDABLE ? "UNK" : toStr(_maxEventSentChain)) << std::endl; \ - std::cerr << _perfTransUsed << ", " << _perfTransTotal << ", " << _perfTransProcessed << ", "; \ - std::cerr << _globalConf.size() << ", " << _perfStatesProcessed << ", "; \ - std::cerr << _perfMicroStepTotal << ", " << _perfMicroStepProcessed << ", "; \ - std::cerr << _perfStatesCachedTotal << ", " << _perfStatesCachedProcessed << ", " << _perfStatesSkippedTotal << ", " << _perfStatesSkippedProcessed << ", "; \ - std::cerr << (_maxEventRaisedChain == UNDECIDABLE ? "UNK" : toStr(_maxEventRaisedChain)) << ", " << (_maxEventSentChain == UNDECIDABLE ? "UNK" : toStr(_maxEventSentChain)) << std::endl; \ - std::cerr << std::endl; \ - _perfTransProcessed = 0; \ - _perfStatesProcessed = 0; \ - _perfStatesCachedProcessed = 0; \ - _perfStatesSkippedProcessed = 0; \ - _perfMicroStepProcessed = 0; \ - _lastTimeStamp = now; \ -} - -//std::cerr << "Q: " << (_maxEventRaisedChain == UNDECIDABLE ? "UNK" : toStr(_maxEventRaisedChain)) << " / " << (_maxEventSentChain == UNDECIDABLE ? "UNK" : toStr(_maxEventSentChain)) << std::endl; - -#define DUMP_TRANSSET(where) \ -{\ -std::cout << std::endl;\ -std::cout << "** " << transitions.size() << " ** " << where << std::endl;\ - for (int m = 0; m < transitions.size(); m++) {\ - std::cout << transitions[m] << std::endl;\ - }\ -} - -namespace uscxml { - - -using namespace Arabica::DOM; -using namespace Arabica::XPath; - - -#define DETAIL_EXEC_CONTENT(field, actPtr) \ -std::cerr << " " << #field << " / " << TAGNAME_CAST(actPtr->field) << " ("; \ -NodeSet contents = filterChildType(Node_base::ELEMENT_NODE, actPtr->field, true); \ -for (int i = 0; i < contents.size(); i++) { \ - std::cerr << " " << TAGNAME_CAST(contents[i]); \ -} \ -std::cerr << ")"; - - -uint64_t Complexity::stateMachineComplexity(const Arabica::DOM::Element& root, Variant variant) { - Complexity complexity = calculateStateMachineComplexity(root); - uint64_t value = complexity.value; - - if (variant != IGNORE_HISTORY_AND_NESTED_DATA && variant != IGNORE_HISTORY) { - for (std::list::const_iterator histIter = complexity.history.begin(); histIter != complexity.history.end(); histIter++) { - value *= *histIter; - } - } - - if (variant != IGNORE_HISTORY_AND_NESTED_DATA && variant != IGNORE_NESTED_DATA) { - bool ignoreNestedData = false; - if (root.getLocalName() == "scxml" && (!HAS_ATTR_CAST(root, "binding") || boost::to_lower_copy(ATTR_CAST(root, "binding")) == "early")) { - ignoreNestedData = true; - } - - if (!ignoreNestedData) { - uint64_t power = complexity.nestedData; - while(power--) { - value *= 2; - } - } - } - - return value; -} - -Complexity Complexity::calculateStateMachineComplexity(const Arabica::DOM::Element& root) { - Complexity complexity; - - bool hasFlatHistory = false; - bool hasDeepHistory = false; - bool hasNestedData = false; - - Arabica::DOM::NodeList childElems = root.getChildNodes(); - for (int i = 0; i < childElems.getLength(); i++) { - if (childElems.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - Element childElem = Element(childElems.item(i)); - if (InterpreterImpl::isHistory(childElem)) { - if (HAS_ATTR(childElem, "type") && ATTR(childElem, "type") == "deep") { - hasDeepHistory = true; - } else { - hasFlatHistory = true; - } - } - if (!hasNestedData && childElem.getLocalName() == "datamodel") { - Arabica::DOM::NodeList dataElemChilds = childElem.getChildNodes(); - for (int j = 0; j < dataElemChilds.getLength(); j++) { - if (dataElemChilds.item(j).getLocalName() == "data") - hasNestedData = true; - } - } - } - - if (hasNestedData) - complexity.nestedData++; - - if (InterpreterImpl::isCompound(root) || TAGNAME(root) == "scxml") { - // compounds can be in any of the child state -> add - NodeSet childs = InterpreterImpl::getChildStates(root); - for (int i = 0; i < childs.size(); i++) { - complexity += calculateStateMachineComplexity(Element(childs[i])); - } - if (hasFlatHistory) { - complexity.history.push_back(childs.size()); - } - if (hasDeepHistory) { - complexity.history.push_back(complexity.value); - } - } else if (InterpreterImpl::isParallel(root)) { - // parallels are in all states -> multiply - NodeSet childs = InterpreterImpl::getChildStates(root); - complexity.value = 1; - for (int i = 0; i < childs.size(); i++) { - complexity *= calculateStateMachineComplexity(Element(childs[i])); - } - if (hasDeepHistory) { - complexity.history.push_back(complexity.value); - } - - } else if (InterpreterImpl::isAtomic(root)) { - return 1; - } - - return complexity; -} - - -ChartToFSM::ChartToFSM(const Interpreter& other) { - - cloneFrom(other.getImpl()); - - _keepInvalidTransitions = false; - _lastTimeStamp = tthread::chrono::system_clock::now(); - _perfTransProcessed = 0; - _perfTransTotal = 0; - _perfTransUsed = 0; - _perfStatesProcessed = 0; - _perfStatesSkippedProcessed = 0; - _perfStatesSkippedTotal = 0; - _perfStatesCachedProcessed = 0; - _perfStatesCachedTotal = 0; - _perfMicroStepProcessed = 0; - _perfMicroStepTotal = 0; - - _start = NULL; - _currGlobalTransition = NULL; - - _lastStateIndex = 0; - _lastActiveIndex = 0; - _lastTransIndex = 0; - - _maxEventSentChain = 0; - _maxEventRaisedChain = 0; - _doneEventRaiseTolerance = 0; - _skipEventChainCalculations = false; - - addMonitor(this); -} - -ChartToFSM::~ChartToFSM() { - std::map::iterator confIter = _globalConf.begin(); - while(confIter != _globalConf.end()) { - std::list::iterator transIter = confIter->second->sortedOutgoing.begin(); - while (transIter != confIter->second->sortedOutgoing.end()) { - delete *transIter; - transIter++; - } - delete confIter->second; - confIter++; - } - - // tear down caches - Arabica::XPath::NodeSet allTransitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", _scxml, true); - for (int i = 0; i < allTransitions.size(); i++) { - _transParents.erase(allTransitions[i]); - } - -} - -Document ChartToFSM::getDocument() const { - if (_flatDoc) - return _flatDoc; - return _document; -} - -InterpreterState ChartToFSM::interpret() { - - // create a _flatDoc for the FSM - DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - _flatDoc = domFactory.createDocument(_document.getNamespaceURI(), "", 0); - - init(); - setupIOProcessors(); - - uint64_t complexity = Complexity::stateMachineComplexity(_scxml) + 1; - std::cerr << "Approximate Complexity: " << complexity << std::endl; - std::cerr << "Approximate Active Complexity: " << Complexity::stateMachineComplexity(_scxml, Complexity::IGNORE_HISTORY_AND_NESTED_DATA) + 1 << std::endl; - - if (complexity > 1000) { - _skipEventChainCalculations = true; - _maxEventRaisedChain = UNDECIDABLE; - _maxEventSentChain = UNDECIDABLE; - } - // initialize the datamodel - std::string datamodelName; - if (datamodelName.length() == 0 && HAS_ATTR(_scxml, "datamodel")) - datamodelName = ATTR(_scxml, "datamodel"); - if (datamodelName.length() == 0 && HAS_ATTR(_scxml, "profile")) // SCION SCXML uses profile to specify datamodel - datamodelName = ATTR(_scxml, "profile"); - if(datamodelName.length() > 0) { - _dataModel = _factory->createDataModel(datamodelName, this); - if (!_dataModel) { - Event e; - e.data.compound["cause"] = Data("Cannot instantiate datamodel", Data::VERBATIM); - throw e; - } - } else { - _dataModel = _factory->createDataModel("null", this); - } - if(datamodelName.length() > 0 && !_dataModel) { - LOG(ERROR) << "No datamodel for " << datamodelName << " registered"; - } - - // setup caches - { - Arabica::XPath::NodeSet allTransitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", _scxml, true); - indexedTransitions.reserve(allTransitions.size()); - for (int i = 0; i < allTransitions.size(); i++) { - _transParents[allTransitions[i]] = InterpreterImpl::getParentState(allTransitions[i]); - } - } - - // identify all history elements - NodeSet histories = filterChildElements(_nsInfo.xmlNSPrefix + "history", _scxml, true); - for (int i = 0; i < histories.size(); i++) { - _historyTargets[ATTR_CAST(histories[i], "id")] = Element(histories[i]); - } - - _binding = (HAS_ATTR(_scxml, "binding") && iequals(ATTR(_scxml, "binding"), "late") ? LATE : EARLY); - _alreadyFlat = (HAS_ATTR(_scxml, "flat") && stringIsTrue(ATTR(_scxml, "flat"))); - - if (_alreadyFlat) { - reassembleFromFlat(); - return _state; - } - - // set invokeid for all invokers to parent state if none given - NodeSet invokers = filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _scxml, true); - for (int i = 0; i < invokers.size(); i++) { - Element invokerElem = Element(invokers[i]); - invokerElem.setAttribute("parent", ATTR_CAST(invokerElem.getParentNode(), "id")); - } - // reset - _globalConf.clear(); - _currGlobalTransition = NULL; - - // very first state - _start = new GlobalState(_configuration, _alreadyEntered, _historyValue, _nsInfo.xmlNSPrefix, this); - _globalConf[_start->stateId] = _start; - _globalConf[_start->stateId]->index = _lastStateIndex++; - - NodeSet initialTransitions; - - // enter initial configuration - Arabica::XPath::NodeSet initialStates; - initialStates = getInitialStates(); - assert(initialStates.size() > 0); - for (int i = 0; i < initialStates.size(); i++) { - Element initialElem = _document.createElementNS(_nsInfo.nsURL, "initial"); - _nsInfo.setPrefix(initialElem); - initialElem.setAttribute("generated", "true"); - Element transitionElem = _document.createElementNS(_nsInfo.nsURL, "transition"); - _nsInfo.setPrefix(transitionElem); - transitionElem.setAttribute("target", ATTR_CAST(initialStates[i], "id")); - initialElem.appendChild(transitionElem); - _scxml.appendChild(initialElem); - initialTransitions.push_back(transitionElem); - } - - if (!_skipEventChainCalculations) - annotateRaiseAndSend(_scxml); - -// std::cout << _scxml << std::endl; - - indexTransitions(); - - // add initial transitions as least prior - for (int i = 0; i < initialTransitions.size() ; i++) { - indexedTransitions.push_back(Element(initialTransitions[i])); - } - - // set index attribute for transitions - for (int i = 0; i < indexedTransitions.size(); i++) { - std::cerr << toStr(i) << ":" << (HAS_ATTR(indexedTransitions[i], "line_start") ? ATTR(indexedTransitions[i], "line_start") : ""); - std::cerr << "\t" << DOMUtils::xPathForNode(indexedTransitions[i]) << std::endl; - indexedTransitions[i].setAttribute("index", toStr(i)); - } - -// int lastTransIndex = indexedTransitions.size(); -// for (int i = 0; i < initialTransitions.size() ; i++, lastTransIndex++) { -// indexedTransitions[i].setAttribute("index", toStr(indexedTransitions.size() - 1 - i)); -// } - - // gather and set index attribute o states - NodeSet allStates = getAllStates(); - allStates.to_document_order(); - - indexedStates.resize(allStates.size()); - for (int i = 0; i < allStates.size(); i++) { - Element state = Element(allStates[i]); - - // while we are iterating, determine deepest nested level - size_t nrAncs = getProperAncestors(state, _scxml).size(); - if (_doneEventRaiseTolerance < nrAncs) - _doneEventRaiseTolerance = nrAncs; - - state.setAttribute("index", toStr(i)); - indexedStates[i] = state; - } - -// std::cerr << _scxml << std::endl; - - GlobalTransition* globalTransition = new GlobalTransition(initialTransitions, _dataModel, this); - globalTransition->index = _lastTransIndex++; - - _start->sortedOutgoing.push_back(globalTransition); - globalTransition->source = _start->stateId; - _currGlobalTransition = globalTransition; - - enterStates(initialTransitions); - globalTransition->destination = FlatStateIdentifier::toStateId(_configuration); - globalTransition->activeDestination = globalTransition->destination; - - explode(); - -#if 0 - // print set of global configurations - for(std::map::iterator globalConfIter = _globalConf.begin(); - globalConfIter != _globalConf.end(); - globalConfIter++) { - std::cerr << globalConfIter->first << std::endl; - } - std::cerr << _globalConf.size() << std::endl; -#endif - - std::cerr << "Actual Complexity: " << _globalConf.size() << std::endl; - std::cerr << "Actual Active Complexity: " << _activeConf.size() << std::endl; - std::cerr << "Internal Queue: " << _maxEventRaisedChain << std::endl; - std::cerr << "External Queue: " << _maxEventSentChain << std::endl; - - if (complexity < _globalConf.size()) - throw std::runtime_error("Upper bound for states exceeded"); - - return _state; -} - -void ChartToFSM::executeContent(const Arabica::DOM::Element& content, bool rethrow) { -// std::cerr << content << std::endl; -// std::cerr << TAGNAME(content) << std::endl; - - GlobalTransition::Action action; - - NodeList childs = content.getChildNodes(); - for (unsigned int i = 0; i < childs.getLength(); i++) { - Node_base::Type type = childs.item(i).getNodeType(); - if (type == Node_base::ELEMENT_NODE || type == Node_base::COMMENT_NODE || type == Node_base::TEXT_NODE) { - goto HAS_VALID_CHILDREN; - } - } - return; - -HAS_VALID_CHILDREN: - if (false) { - } else if (TAGNAME(content) == "transition") { - action.transition = content; - } else if (TAGNAME(content) == "onexit") { - action.onExit = content; - } else if (TAGNAME(content) == "onentry") { - action.onEntry = content; - } else if (TAGNAME(content) == "history") { - assert(false); - } else { // e.g. global script elements - return; - } - - if (!_skipEventChainCalculations && - (_maxEventRaisedChain != UNDECIDABLE || _maxEventSentChain != UNDECIDABLE)) { - assert(content.hasAttribute("raise") && content.hasAttribute("send")); - - std::string raiseAttr = content.getAttribute("raise"); - std::string sendAttr = content.getAttribute("send"); - - _currGlobalTransition->eventsRaised = (raiseAttr == "-1" ? UNDECIDABLE : _currGlobalTransition->eventsRaised + strTo(raiseAttr)); - _currGlobalTransition->eventsSent = (sendAttr == "-1" ? UNDECIDABLE : _currGlobalTransition->eventsSent + strTo(sendAttr)); - - if (_currGlobalTransition->eventsRaised > _maxEventRaisedChain) - _maxEventRaisedChain = _currGlobalTransition->eventsRaised; - if (_currGlobalTransition->eventsSent > _maxEventSentChain) - _maxEventSentChain = _currGlobalTransition->eventsSent; - } - - _currGlobalTransition->actions.push_back(action); - _currGlobalTransition->hasExecutableContent = true; -} - -void ChartToFSM::invoke(const Arabica::DOM::Element& element) { - GlobalTransition::Action action; - action.invoke = element; - _currGlobalTransition->actions.push_back(action); - _currGlobalTransition->hasExecutableContent = true; -} - -void ChartToFSM::cancelInvoke(const Arabica::DOM::Element& element) { - GlobalTransition::Action action; - action.uninvoke = element; - _currGlobalTransition->actions.push_back(action); - _currGlobalTransition->hasExecutableContent = true; -} - -void ChartToFSM::internalDoneSend(const Arabica::DOM::Element& state) { - if (!isState(state)) - return; - - if (parentIsScxmlState(state)) - return; - -// std::cerr << "internalDoneSend: " << state << std::endl; - - // create onentry with a raise element - Element onentry = _flatDoc.createElementNS(_nsInfo.nsURL, "onentry"); - _nsInfo.setPrefix(onentry); - - Element raise = _flatDoc.createElementNS(_nsInfo.nsURL, "raise"); - _nsInfo.setPrefix(raise); - - onentry.appendChild(raise); - - Arabica::XPath::NodeSet doneDatas = filterChildElements(_nsInfo.xmlNSPrefix + "donedata", state); - if (doneDatas.size() > 0) { - Arabica::DOM::Node doneData = doneDatas[0]; - Arabica::XPath::NodeSet contents = filterChildElements(_nsInfo.xmlNSPrefix + "content", doneDatas[0]); - if (contents.size() > 0) { - Node imported = _flatDoc.importNode(contents[0], true); - raise.appendChild(imported); - } - Arabica::XPath::NodeSet params = filterChildElements(_nsInfo.xmlNSPrefix + "param", doneDatas[0]); - if (params.size() > 0) { - Node imported = _flatDoc.importNode(params[0], true); - raise.appendChild(imported); - } - } - - raise.setAttribute("event", "done.state." + ATTR_CAST(state.getParentNode(), "id")); // parent?! - - GlobalTransition::Action action; - action.onEntry = onentry; - - _currGlobalTransition->actions.push_back(action); - if (!_skipEventChainCalculations && - (_maxEventRaisedChain != UNDECIDABLE || _maxEventSentChain != UNDECIDABLE)) - _currGlobalTransition->eventsRaised++; - _currGlobalTransition->hasExecutableContent = true; - -} - -static bool isSuperset(const GlobalTransition* t1, const GlobalTransition* t2) { - bool isSuperset = true; - - if (t1->transitionRefs.size() >= t2->transitionRefs.size()) - return false; - - NodeSet t1Trans = t1->getTransitions(); - NodeSet t2Trans = t2->getTransitions(); - - for (int i = 0; i < t1Trans.size(); i++) { - if (!InterpreterImpl::isMember(t1Trans[i], t2Trans)) { - isSuperset = false; - } - } - return isSuperset; -} - -// return false if two transitions have the same source -std::map, Arabica::DOM::Node > ChartToFSM::_transParents; -bool ChartToFSM::filterSameState(const NodeSet& transitions) { - - for (unsigned int i = 0; i < transitions.size(); i++) { - Node p1 = _transParents[transitions[i]]; - - for (unsigned int j = i + 1; j < transitions.size(); j++) { -// if (i == j) -// continue; - Node p2 = _transParents[transitions[j]]; - - if (p1 == p2) - return false; - } - } - return true; -} - -static bool filterChildEnabled(const NodeSet& transitions) { - // drop any transition that is already enabled by a child - NodeSet filteredTransitions; - for (unsigned int i = 0; i < transitions.size(); i++) { - Node t1 = transitions[i]; - Node p1 = InterpreterImpl::getParentState(t1); - for (unsigned int j = 0; j < transitions.size(); j++) { - if (i == j) - continue; - Node t2 = transitions[j]; - Node p2 = InterpreterImpl::getParentState(t2); - p2 = p2.getParentNode(); // TODO: think about again! - while(p2) { - if (p1 == p2) { - std::string eventDesc1 = ATTR_CAST(t1, "event"); - std::string eventDesc2 = ATTR_CAST(t2, "event"); - if (InterpreterImpl::nameMatch(eventDesc1, eventDesc2)) { - return false; - } - } - p2 = p2.getParentNode(); - } - } - filteredTransitions.push_back(t1); - ; - } - return true; -} - -bool ChartToFSM::hasForeachInBetween(const Arabica::DOM::Node& ancestor, const Arabica::DOM::Node& child) { - if (!ancestor || !child) - return false; - - Node currChild = child; - while(currChild != ancestor) { - if (!currChild.getParentNode()) - return false; - if (TAGNAME_CAST(currChild) == "foreach") - return true; - currChild = currChild.getParentNode(); - } - return false; -} - -void ChartToFSM::annotateRaiseAndSend(const Arabica::DOM::Element& root) { - NodeSet execContent; - execContent.push_back(filterChildElements(_nsInfo.xmlNSPrefix + "transition", _scxml, true)); - execContent.push_back(filterChildElements(_nsInfo.xmlNSPrefix + "onentry", _scxml, true)); - execContent.push_back(filterChildElements(_nsInfo.xmlNSPrefix + "onexit", _scxml, true)); - for (int i = 0; i < execContent.size(); i++) { - Element execContentElem(execContent[i]); - - int nrRaise = 0; - NodeSet raise = filterChildElements(_nsInfo.xmlNSPrefix + "raise", execContent[i], true); - for (int j = 0; j < raise.size(); j++) { - if (hasForeachInBetween(execContent[i], raise[j])) { - execContentElem.setAttribute("raise", "-1"); - goto DONE_COUNT_RAISE; - } else { - nrRaise++; - } - } - execContentElem.setAttribute("raise", toStr(nrRaise)); - - DONE_COUNT_RAISE: - - int nrSend = 0; - NodeSet sends = filterChildElements(_nsInfo.xmlNSPrefix + "send", execContent[i], true); - for (int j = 0; j < sends.size(); j++) { - if (hasForeachInBetween(execContent[i], sends[j])) { - execContentElem.setAttribute("send", "-1"); - goto DONE_COUNT_SEND; - } else { - nrSend++; - } - } - execContentElem.setAttribute("send", toStr(nrSend)); - - DONE_COUNT_SEND: - ; - } -} - -void ChartToFSM::indexTransitions() { - indexTransitions(_scxml); - // reverse indices for most prior to be in front - std::reverse(indexedTransitions.begin(), indexedTransitions.end()); - - size_t index = 1; - for (std::vector >::iterator transIter = indexedTransitions.begin(); transIter != indexedTransitions.end(); transIter++) { - transIter->setAttribute("priority", toStr(index)); - index++; - } - -} - -void ChartToFSM::indexTransitions(const Arabica::DOM::Element& root) { - // breadth first traversal of transitions - Arabica::XPath::NodeSet levelTransitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", root); - for (int i = levelTransitions.size() - 1; i >= 0; i--) { - // push into index starting with least prior - indexedTransitions.push_back(Element(levelTransitions[i])); - } - - Arabica::XPath::NodeSet nextLevel = filterChildType(Arabica::DOM::Node_base::ELEMENT_NODE, root); - for (int i = nextLevel.size() - 1; i >= 0; i--) { - Element stateElem = Element(nextLevel[i]); - if (isState(stateElem)) - indexTransitions(stateElem); - } -} - -bool GlobalTransition::operator< (const GlobalTransition& other) const { - const std::vector >& indexedTransitions = interpreter->indexedTransitions; - NodeSet transitions = getTransitions(); - - for (std::vector >::const_iterator transIter = indexedTransitions.begin(); transIter != indexedTransitions.end(); transIter++) { - const Element& refTrans = *transIter; - NodeSet otherTransitions = other.getTransitions(); - - if (InterpreterImpl::isMember(refTrans, transitions) && !InterpreterImpl::isMember(refTrans, otherTransitions)) { - return true; - } - if (!InterpreterImpl::isMember(refTrans, transitions) && InterpreterImpl::isMember(refTrans, otherTransitions)) { - return false; - } - } - return true; // actually, they are equal -} - -template bool PtrComp(const T * const & a, const T * const & b) { - return *a < *b; -} - - -/** - * subset only removes transitions without cond -> superset will always be enabled - */ -bool hasUnconditionalSuperset (GlobalTransition* first, GlobalTransition* second) { - - NodeSet firstTransitions = first->getTransitions(); - NodeSet secondTransitions = first->getTransitions(); - - if (isSuperset(second, first)) { - for (int i = 0; i < firstTransitions.size(); i++) { - if (!InterpreterImpl::isMember(firstTransitions[i], secondTransitions)) { - if (HAS_ATTR_CAST(firstTransitions[i], "cond")) { - return false; // second can't be removed - } - } - } - return true; // remove second - } - return false; //second can't be removed -} - -bool hasEarlierUnconditionalMatch(GlobalTransition* first, GlobalTransition* second) { - if (first->eventDesc == second->eventDesc) { - if (first->condition.size() == 0) - return true; - } - return false; -} - -std::list redundantRemove(std::list list) { - for (std::list::iterator outerIter = list.begin(); - outerIter != list.end(); - outerIter++) { - for (std::list::iterator innerIter = outerIter; - innerIter != list.end(); - innerIter++) { - - if (innerIter == outerIter) - continue; - - GlobalTransition* t1 = *outerIter; - GlobalTransition* t2 = *innerIter; - - if (hasUnconditionalSuperset(t1, t2)) { - list.erase(innerIter++); - continue; - } else if (hasUnconditionalSuperset(t2, t1)) { - list.erase(outerIter++); - continue; - } - if (hasEarlierUnconditionalMatch(t1, t2)) { - list.erase(innerIter++); - continue; - } - } - } - return list; -} - -std::list redundantMark(std::list list) { - for (std::list::iterator outerIter = list.begin(); - outerIter != list.end(); - outerIter++) { - for (std::list::iterator innerIter = outerIter; - innerIter != list.end(); - innerIter++) { - - if (innerIter == outerIter) - continue; - - GlobalTransition* t1 = *outerIter; - GlobalTransition* t2 = *innerIter; - - if (!t1->isValid || !t2->isValid) - continue; - - if (hasUnconditionalSuperset(t1, t2)) { - t2->isValid = false; - t2->invalidMsg = "Unconditional superset"; - t2->invalidReason = GlobalTransition::UNCONDITIONAL_SUPERSET; - continue; - } else if (hasUnconditionalSuperset(t2, t1)) { - t1->isValid = false; - t1->invalidMsg = "Unconditional superset"; - t1->invalidReason = GlobalTransition::UNCONDITIONAL_SUPERSET; - continue; - } - if (hasEarlierUnconditionalMatch(t1, t2)) { - t2->isValid = false; - t2->invalidMsg = "Earlier unconditional match"; - t2->invalidReason = GlobalTransition::UNCONDITIONAL_MATCH; - continue; - } - } - } - return list; -} - -void ChartToFSM::getPotentialTransitionsForConf(const Arabica::XPath::NodeSet& conf, std::map& outMap) { - // get all transition elements from states in the current configuration - NodeSet allTransitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", conf); - - - if (allTransitions.size() == 0) - return; // no transitions - - int nrElements = allTransitions.size(); - int k = 0; - int* stack = (int*)malloc((nrElements + 1) * sizeof(int)); - memset(stack, 0, (nrElements + 1) * sizeof(int)); - - while(1) { - // create the power set of all potential transitions - this is expensive! - // see: http://www.programminglogic.com/powerset-algorithm-in-c/ - - if (stack[k] < nrElements) { - stack[k+1] = stack[k] + 1; - k++; - } - - else { - stack[k-1]++; - k--; - } - - if (k==0) - break; - - NodeSet transitions; - // std::cerr << globalState->stateId << " [" << nrElements << "]: " << std::endl; - for (int i = 1; i <= k; i++) { - // std::cerr << stack[i] - 1 << ", "; - transitions.push_back(allTransitions[stack[i] - 1]); - } - // std::cerr << std::endl; - - // transitions.push_back(allTransitions[0]); - // transitions.push_back(allTransitions[4]); - // transitions.push_back(allTransitions[5]); - // transitions.push_back(allTransitions[7]); - - bool dump = false; - - // if (k == 4 && stack[1] == 1 && stack[2] == 5 && stack[3] == 6 && stack[4] == 8) { - // dump = true; - // } - - if (dump) DUMP_TRANSSET("at start"); - - _perfTransTotal++; - _perfTransProcessed++; - - DUMP_STATS(nrElements); - - - GlobalTransition* transition = NULL; - - // reduce to conflict-free subset - // transitions.to_document_order(); - if (!_keepInvalidTransitions) { - // remove transitions in the same state - if(!filterSameState(transitions)) - continue; - if (dump) DUMP_TRANSSET("after same state filtered"); - - // remove those transitions with a child transition - if(!filterChildEnabled(transitions)) - continue; - if (dump) DUMP_TRANSSET("after child enabled filtered"); - - transitions = removeConflictingTransitions(transitions); - if (dump) DUMP_TRANSSET("after conflicting filtered"); - // algorithm can never reduce to empty set - assert(transitions.size() > 0); - - // create a GlobalTransition object from the set - transition = new GlobalTransition(transitions, _dataModel, this); - if (!transition->isValid) { - // this set of transitions can not be enabled together - delete transition; - continue; - } - } else { - transition = new GlobalTransition(transitions, _dataModel, this); - - // remove transitions in the same state - if(!filterSameState(transitions)) { - transition->isValid = false; - transition->invalidReason = GlobalTransition::SAME_SOURCE_STATE; - transition->invalidMsg = "Same source state"; - - } else if(!filterChildEnabled(transitions)) { - transition->isValid = false; - transition->invalidReason = GlobalTransition::CHILD_ENABLED; - transition->invalidMsg = "Nested transition enabled"; - - } else { - NodeSet nonPreemptingTransitions = removeConflictingTransitions(transitions); - if (nonPreemptingTransitions.size() != transitions.size()) { - transition->isValid = false; - transition->invalidReason = GlobalTransition::PREEMPTING_MEMBERS; - transition->invalidMsg = "Preempting members"; - } - } - - } - - - // two combinations might have projected onto the same conflict-free set - if (outMap.find(transition->transitionId) != outMap.end()) { - // std::cerr << "skipping as projected onto existing conflict-free subset" << std::endl; - delete transition; - continue; - } - - transition->index = _lastTransIndex++; - _perfTransUsed++; - - // remember this conflict-free set - // std::cerr << "New conflict-free subset: " << transition->transitionId << ":" << transition->eventDesc << std::endl; - outMap[transition->transitionId] = transition; - } - return; -} - -void ChartToFSM::explode() { - - std::list > statesRemaining; - statesRemaining.push_back(std::make_pair(_currGlobalTransition, new GlobalState(_configuration, _alreadyEntered, _historyValue, _nsInfo.xmlNSPrefix, this))); - - // add all invokers for initial transition - for (unsigned int i = 0; i < _statesToInvoke.size(); i++) { - NodeSet invokes = filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _statesToInvoke[i]); - for (unsigned int j = 0; j < invokes.size(); j++) { - invoke(Element(invokes[j])); - } - } - _statesToInvoke = NodeSet(); - - /** - We need to resolve the recursion in order not to exhaust the stack - */ - - // append new global states and pop from front - while(statesRemaining.size() > 0) { - DUMP_STATS(0); - - GlobalState* globalState = statesRemaining.front().second; - _currGlobalTransition = statesRemaining.front().first; - statesRemaining.pop_front(); - - // used to be conditionalized, we will just assume - assert(_currGlobalTransition); - - if (_globalConf.find(globalState->stateId) != _globalConf.end()) { - if (_currGlobalTransition->isEventless && - !_skipEventChainCalculations && - (_maxEventRaisedChain != UNDECIDABLE || _maxEventSentChain != UNDECIDABLE)) { - // we arrived via a spontaneaous transition, do we need to update? - updateRaisedAndSendChains(_globalConf[globalState->stateId], _currGlobalTransition, std::set()); - } - delete globalState; - _perfStatesSkippedTotal++; - _perfStatesSkippedProcessed++; - continue; // we have already been here - } - - _perfStatesProcessed++; - - _configuration = globalState->getActiveStates(); - _alreadyEntered = globalState->getAlreadyEnteredStates(); - _historyValue = globalState->getHistoryStates(); - - // remember as global configuration - _globalConf[globalState->stateId] = globalState; - _globalConf[globalState->stateId]->index = _lastStateIndex++; - - if(_globalConf[globalState->stateId]->isFinal) { - if (_activeConf.find(globalState->activeId) == _activeConf.end()) { - assert(globalState->activeIndex == -1); - globalState->activeIndex = _lastActiveIndex++; - _activeConf[globalState->activeId] = globalState; // remember as active configuration - exitInterpreter(); - } - continue; // done in this branch - } - - if (_activeConf.find(globalState->activeId) != _activeConf.end()) { - // we already know these transition sets, just copy over - std::list::iterator sortTransIter = _activeConf[globalState->activeId]->sortedOutgoing.begin(); - while(sortTransIter != _activeConf[globalState->activeId]->sortedOutgoing.end()) { - globalState->sortedOutgoing.push_back(GlobalTransition::copyWithoutExecContent(*sortTransIter)); - globalState->sortedOutgoing.back()->index = _lastTransIndex++; - _perfTransUsed++; - sortTransIter++; - } - _perfStatesCachedTotal++; - _perfStatesCachedProcessed++; - - } else { - // we need to calculate the potential optimal transition sets - std::map transitionSets; - getPotentialTransitionsForConf(refsToStates(globalState->activeStatesRefs), transitionSets); - - // reduce and sort transition sets - for(std::map::iterator transSetIter = transitionSets.begin(); - transSetIter != transitionSets.end(); - transSetIter++) { - globalState->sortedOutgoing.push_back(transSetIter->second); - } - - globalState->sortedOutgoing.sort(PtrComp); -// globalState->sortedOutgoing.unique(hasUnconditionalSuperset); -// globalState->sortedOutgoing.unique(hasEarlierUnconditionalMatch); - // unique is not quite like what we need, but it was a start - if (_keepInvalidTransitions) { - globalState->sortedOutgoing = redundantMark(globalState->sortedOutgoing); - } else { - globalState->sortedOutgoing.unique(hasUnconditionalSuperset); - globalState->sortedOutgoing.unique(hasEarlierUnconditionalMatch); - globalState->sortedOutgoing = redundantRemove(globalState->sortedOutgoing); - } -// globalState->sortedOutgoing = redundantRemove(globalState->sortedOutgoing); -// globalState->sortedOutgoing = redundantRemove(globalState->sortedOutgoing); - -// std::cout << globalState->sortedOutgoing.size() << std::endl; - - assert(_activeConf.find(globalState->activeId) == _activeConf.end()); - assert(globalState->activeIndex == -1); - globalState->activeIndex = _lastActiveIndex++; - _activeConf[globalState->activeId] = globalState; - } - - // take every transition set and append resulting new state - for(std::list::iterator transIter = globalState->sortedOutgoing.begin(); - transIter != globalState->sortedOutgoing.end(); - transIter++) { - - GlobalTransition* incomingTrans = _currGlobalTransition; - GlobalTransition* outgoingTrans = *transIter; - - outgoingTrans->source = globalState->stateId; - - if (_keepInvalidTransitions && !outgoingTrans->isValid) - continue; - - _currGlobalTransition = outgoingTrans; - - microstep(refsToTransitions(outgoingTrans->transitionRefs)); - assert(isLegalConfiguration(_configuration)); - - _perfMicroStepProcessed++; - _perfMicroStepTotal++; - - // if outgoing transition is spontaneous, add number of events to chain - if (outgoingTrans->isEventless && - !_skipEventChainCalculations && - (_maxEventRaisedChain != UNDECIDABLE || _maxEventSentChain != UNDECIDABLE)) { - outgoingTrans->eventsChainRaised = MIN(incomingTrans->eventsChainRaised + outgoingTrans->eventsRaised, UNDECIDABLE); - outgoingTrans->eventsChainSent = MIN(incomingTrans->eventsChainSent + outgoingTrans->eventsSent, UNDECIDABLE); - - if (outgoingTrans->eventsChainRaised > _maxEventRaisedChain) - _maxEventRaisedChain = outgoingTrans->eventsChainRaised; - if (outgoingTrans->eventsChainSent > _maxEventSentChain) - _maxEventSentChain = outgoingTrans->eventsChainSent; - - } - - statesRemaining.push_back(std::make_pair(outgoingTrans, new GlobalState(_configuration, _alreadyEntered, _historyValue, _nsInfo.xmlNSPrefix, this))); - - // add all invokers - for (unsigned int i = 0; i < _statesToInvoke.size(); i++) { - NodeSet invokes = filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _statesToInvoke[i]); - for (unsigned int j = 0; j < invokes.size(); j++) { - invoke(Element(invokes[j])); - } - } - _statesToInvoke = NodeSet(); - - // remember that the last transition lead here - outgoingTrans->destination = statesRemaining.back().second->stateId; - outgoingTrans->activeDestination = statesRemaining.back().second->activeId; - // reset state for next transition set - _configuration = globalState->getActiveStates(); - _alreadyEntered = globalState->getAlreadyEnteredStates(); - _historyValue = globalState->getHistoryStates(); - } - } - -} - -void ChartToFSM::updateRaisedAndSendChains(GlobalState* state, GlobalTransition* source, std::set visited) { - for (std::list::iterator transIter = state->sortedOutgoing.begin(); transIter != state->sortedOutgoing.end(); transIter++) { - GlobalTransition* transition = *transIter; - - if (!transition->isEventless) - continue; // we do not care for eventful transitions - - // source leads to spontaneous transition -> update event chains - bool eventChainsNeedUpdated = false; - - if (visited.find(transition) != visited.end()) { - // potential spontaneous transition cycle! - if (transition->eventsChainRaised > 0) - _maxEventRaisedChain = UNDECIDABLE; - if (transition->eventsChainSent > 0) - _maxEventSentChain = UNDECIDABLE; - return; - } - - // UNDECIDABLE means "undecidable / endless" - - // will source increase our event chain? - if (transition->eventsChainRaised != UNDECIDABLE && - transition->eventsChainRaised < source->eventsChainRaised + transition->eventsRaised) { - // taking transition after source causes more events in chain - transition->eventsChainRaised = MIN(source->eventsChainRaised + transition->eventsRaised, UNDECIDABLE); - eventChainsNeedUpdated = true; - } - if (transition->eventsChainSent != UNDECIDABLE && - transition->eventsChainSent < source->eventsChainSent + transition->eventsSent) { - // taking transition after source causes more events in chain - transition->eventsChainSent = MIN(source->eventsChainSent + transition->eventsSent, UNDECIDABLE); - eventChainsNeedUpdated = true; - } - - if (eventChainsNeedUpdated && - transition->destination.length() > 0 && - _globalConf.find(transition->destination) != _globalConf.end()) { - - visited.insert(transition); - // iterate all spontaneous transitions in destination and update event chains - updateRaisedAndSendChains(_globalConf[transition->destination], transition, visited); - } - - if (transition->eventsChainRaised > _maxEventRaisedChain) - _maxEventRaisedChain = transition->eventsChainRaised; - if (transition->eventsChainSent > _maxEventSentChain) - _maxEventSentChain = transition->eventsChainSent; - } -} - -uint32_t ChartToFSM::getMinInternalQueueLength(uint32_t defaultVal) { - if (_maxEventRaisedChain != UNDECIDABLE) - return _maxEventRaisedChain + _doneEventRaiseTolerance; - return defaultVal; -} - -uint32_t ChartToFSM::getMinExternalQueueLength(uint32_t defaultVal) { - if (_maxEventSentChain != UNDECIDABLE) - return _maxEventSentChain; - return defaultVal; -} - -void ChartToFSM::reassembleFromFlat() { - LOG(ERROR) << "Cannot flatten flat SCXML document"; - abort(); -} - -Arabica::XPath::NodeSet ChartToFSM::refsToStates(const std::set& stateRefs) { - NodeSet states; - for (std::set::const_iterator stateIter = stateRefs.begin(); stateIter != stateRefs.end(); stateIter++) { - states.push_back(indexedStates[*stateIter]); - } - return states; -} - -Arabica::XPath::NodeSet ChartToFSM::refsToTransitions(const std::set& transRefs) { - NodeSet transitions; - for (std::set::const_iterator transIter = transRefs.begin(); transIter != transRefs.end(); transIter++) { - transitions.push_back(indexedTransitions[*transIter]); - } - return transitions; -} - -void ChartToFSM::beforeMicroStep(Interpreter interpreter) { -} -void ChartToFSM::onStableConfiguration(Interpreter interpreter) { -} -void ChartToFSM::beforeExitingState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - GlobalTransition::Action action; - action.exited = state; - _currGlobalTransition->actions.push_back(action); -} -void ChartToFSM::beforeEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - GlobalTransition::Action action; - action.entered = state; - _currGlobalTransition->actions.push_back(action); -} -void ChartToFSM::beforeTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing) { -} - -GlobalState::GlobalState(const Arabica::XPath::NodeSet& activeStates_, - const Arabica::XPath::NodeSet& alreadyEnteredStates_, // we need to remember for binding=late - const std::map >& historyStates_, - const std::string& xmlNSPrefix, - ChartToFSM* flattener) { - interpreter = flattener; - activeIndex = -1; - - // take references - for (int i = 0; i < activeStates_.size(); i++) { - activeStatesRefs.insert(strTo(ATTR_CAST(activeStates_[i], "index"))); - } - - for (int i = 0; i < alreadyEnteredStates_.size(); i++) { - alreadyEnteredStatesRefs.insert(strTo(ATTR_CAST(alreadyEnteredStates_[i], "index"))); - } - - for (std::map >::const_iterator histIter = historyStates_.begin(); histIter != historyStates_.end(); histIter++) { - for (int i = 0; i < histIter->second.size(); i++) { - historyStatesRefs[histIter->first].insert(strTo(ATTR_CAST(histIter->second[i], "index"))); - } - } - - isFinal = false; - - // is state this final? - for(int i = 0; i < activeStates_.size(); i++) { - Arabica::DOM::Element state = Arabica::DOM::Element(activeStates_[i]); - Arabica::DOM::Element parentElem = (Arabica::DOM::Element)state.getParentNode(); - if(InterpreterImpl::isFinal(state) && iequals(parentElem.getTagName(), xmlNSPrefix + "scxml")) { - isFinal = true; - break; - } - } - - FlatStateIdentifier flatStateId(getActiveStates(), getAlreadyEnteredStates(), getHistoryStates()); - stateId = flatStateId.getStateId(); - activeId = flatStateId.getFlatActive(); -} - -GlobalTransition* GlobalTransition::copyWithoutExecContent(GlobalTransition* other) { - GlobalTransition* newTrans = new GlobalTransition(*other); - newTrans->actions.clear(); - newTrans->historyBase = other; - other->historyTrans.push_back(newTrans); - return newTrans; -} - -GlobalTransition::GlobalTransition(const Arabica::XPath::NodeSet& transitionSet, DataModel dataModel, ChartToFSM* flattener) { - interpreter = flattener; - - eventsRaised = 0; - eventsSent = 0; - eventsChainRaised = 0; - eventsChainSent = 0; - historyBase = NULL; - - for (int i = 0; i < transitionSet.size(); i++) { - transitionRefs.insert(strTo(ATTR_CAST(transitionSet[i], "index"))); - } - - std::ostringstream setId; // also build id for subset - std::string seperator = ""; - for (std::set::iterator transIter = transitionRefs.begin(); transIter != transitionRefs.end(); transIter++) { - setId << seperator << *transIter; - seperator = "-"; - } - transitionId = setId.str(); - - hasExecutableContent = false; - isValid = true; - isEventless = true; - -#if 0 - std::cerr << "################" << std::endl; - for (int i = 0; i < transitions.size(); i++) { - std::cerr << transitions[i] << std::endl; - } - std::cerr << "################" << std::endl; -#endif - - // first establish whether this is a valid set - - /** - * Can these events event occur together? They can't if: - * 1. event / eventless is mixed - * 2. target / targetless is mixed (?) - * 3. there is no common prefix for their event attribute - */ - - bool foundWithEvent = false; - bool foundEventLess = false; - bool foundWithTarget = false; - bool foundTargetLess = false; - - Arabica::DOM::Element withEvent; - Arabica::DOM::Element noneEvent; - Arabica::DOM::Element withTarget; - Arabica::DOM::Element noneTarget; - - for (int i = 0; i < transitionSet.size(); i++) { - Arabica::DOM::Element transElem = Arabica::DOM::Element(transitionSet[i]); - if (HAS_ATTR(transElem, "eventexpr")) { - ERROR_EXECUTION_THROW("Cannot flatten document with eventexpr attributes"); - } - if (HAS_ATTR(transElem, "event")) { - foundWithEvent = true; - withEvent = transElem; - if (foundEventLess) - break; - } else { - foundEventLess = true; - noneEvent = transElem; - if (foundWithEvent) - break; - } - if (HAS_ATTR(transElem, "target")) { - foundWithTarget = true; - withTarget = transElem; - if (foundTargetLess) - break; - } else { - foundTargetLess = true; - noneTarget = transElem; - if (foundWithTarget) - break; - } - - } - - // do not mix eventless and event transitions - if (foundEventLess && foundWithEvent) { - if (flattener->_keepInvalidTransitions) { - invalidReason = MIXES_EVENT_SPONTANEOUS; - invalidMsg = "Mixes (non-)spontaneous"; - } - isValid = false; - return; - } - - // 403c vs 229 / 403b - solved via filterChildEnabled - if (foundTargetLess && foundWithTarget) { -// isValid = false; -// return; - } - - isEventless = foundEventLess; - isTargetless = !foundWithTarget; - - // is there a set of event names that would enable this conflict-free transition set? - if (foundWithEvent) { - // get the set of longest event descriptors that will enable this transition set - eventNames = getCommonEvents(transitionSet); - if (eventNames.size() == 0) { -// LOG(INFO) << "No event will activate this conflict-free subset" << std::endl; - if (flattener->_keepInvalidTransitions) { - invalidReason = NO_COMMON_EVENT; - invalidMsg = "No common event"; - } - isValid = false; - return; - } else { - std::string seperator = ""; - for (std::list::iterator eventIter = eventNames.begin(); - eventIter != eventNames.end(); - eventIter++) { - eventDesc += seperator + *eventIter; - seperator = " "; - } - } - if (eventDesc.size() == 0) - eventDesc = "*"; - } - - // extract conditions and history targets - std::list conditions; - for (int i = 0; i < transitionSet.size(); i++) { - Arabica::DOM::Element transElem = Arabica::DOM::Element(transitionSet[i]); - // gather conditions while we are iterating anyway - if (HAS_ATTR(transElem, "cond")) { - conditions.push_back(boost::trim_copy(ATTR(transElem, "cond"))); - } - - std::list targets = InterpreterImpl::tokenizeIdRefs(ATTR(transElem, "target")); - std::list::iterator targetIter = targets.begin(); - while(targetIter != targets.end()) { -// std::cout << "// " << *targetIter << std::endl; - if (flattener->_historyTargets.find(*targetIter) != flattener->_historyTargets.end()) { - histTargets.insert(*targetIter); - } - targetIter++; - } -// std::cout << std::endl << std::endl; - } - - seperator = ""; - for (std::vector >::iterator transIter = interpreter->indexedTransitions.begin(); transIter != interpreter->indexedTransitions.end(); transIter++) { - const Element& refTrans = *transIter; - if (!HAS_ATTR(refTrans, "priority")) - continue; - if (InterpreterImpl::isMember(refTrans, transitionSet)) { - members += seperator + ATTR(refTrans, "priority"); - } else { - members += seperator; - for (int i = 0; i < ATTR(refTrans, "priority").size(); i++) { - members += " "; - } - } - seperator = " "; - } - - // if (members == " 4 6 7 ") - // std::cout << "asdfadf"; - - if (conditions.size() > 1) { - condition = dataModel.andExpressions(conditions); - if (condition.size() == 0) { - LOG(ERROR) << "Datamodel does not support to conjungate expressions!" << std::endl; - } - } else if (conditions.size() == 1) { - condition = conditions.front(); - } -} - -Arabica::XPath::NodeSet GlobalState::getActiveStates() { - return interpreter->refsToStates(activeStatesRefs); -} - -Arabica::XPath::NodeSet GlobalState::getAlreadyEnteredStates() { - return interpreter->refsToStates(alreadyEnteredStatesRefs); -} - -std::map > GlobalState::getHistoryStates() { - std::map > historyValue; - for (std::map >::iterator histIter = historyStatesRefs.begin(); histIter != historyStatesRefs.end(); histIter++) { - historyValue[histIter->first] = interpreter->refsToStates(histIter->second); - } - return historyValue; -} - - -Arabica::XPath::NodeSet GlobalTransition::getTransitions() const { - return interpreter->refsToTransitions(transitionRefs); -} - -std::list GlobalTransition::getCommonEvents(const NodeSet& transitions) { - std::list prefixes; - std::list longestPrefixes; - - for (int i = 0; i < transitions.size(); i++) { - // for every transition - std::list eventNames = InterpreterImpl::tokenizeIdRefs(ATTR_CAST(transitions[i], "event")); - - for (std::list::iterator eventNameIter = eventNames.begin(); - eventNameIter != eventNames.end(); - eventNameIter++) { - // for every event descriptor - std::string eventName = *eventNameIter; - - // remove trailing .* - if (eventName.find("*", eventName.size() - 1) != std::string::npos) - eventName = eventName.substr(0, eventName.size() - 1); - if (eventName.find(".", eventName.size() - 1) != std::string::npos) - eventName = eventName.substr(0, eventName.size() - 1); - - bool isMatching = true; - for (int j = 0; j < transitions.size(); j++) { - // check if token would activate all other transitions - if (i == j) - continue; - if (!InterpreterImpl::nameMatch(ATTR_CAST(transitions[j], "event"), eventName)) { - isMatching = false; - break; - } - } - if (isMatching) { - prefixes.push_back(eventName); - } - } - } - - // from the set of event names, remove those that are prefixes - for (std::list::iterator outerEventNameIter = prefixes.begin(); - outerEventNameIter != prefixes.end(); - outerEventNameIter++) { - for (std::list::iterator innerEventNameIter = prefixes.begin(); - innerEventNameIter != prefixes.end(); - innerEventNameIter++) { - if (!iequals(*outerEventNameIter, *innerEventNameIter) && InterpreterImpl::nameMatch(*outerEventNameIter, *innerEventNameIter)) { - goto IS_PREFIX; - } - } - longestPrefixes.push_back(*outerEventNameIter); -IS_PREFIX: - ; - } - return longestPrefixes; -} - -} diff --git a/src/uscxml/transform/ChartToFSM.h b/src/uscxml/transform/ChartToFSM.h deleted file mode 100644 index fa76f3a..0000000 --- a/src/uscxml/transform/ChartToFSM.h +++ /dev/null @@ -1,350 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef CHARTTOFSM_H_IOKPYEBY -#define CHARTTOFSM_H_IOKPYEBY - -#include "uscxml/interpreter/InterpreterRC.h" -#include "uscxml/dom/DOMUtils.h" -#include -#include -#include -#include -#include - -namespace uscxml { -class GlobalState; -class GlobalTransition; -class ChartToFSM; - - -class USCXML_API GlobalState { -public: - - GlobalState() {} - GlobalState(const Arabica::DOM::Node& globalState); - GlobalState(const Arabica::XPath::NodeSet& activeStates, - const Arabica::XPath::NodeSet& alreadyEnteredStates, // we need to remember for binding=late - const std::map >& historyStates, - const std::string& xmlNSPrefix, - ChartToFSM* flattener); - - std::set activeStatesRefs; - std::set alreadyEnteredStatesRefs; - std::map > historyStatesRefs; - - std::list sortedOutgoing; - std::string stateId; - std::string activeId; - - unsigned long activeIndex; - unsigned long index; - bool isFinal; - - ChartToFSM* interpreter; - - Arabica::XPath::NodeSet getActiveStates(); - Arabica::XPath::NodeSet getAlreadyEnteredStates(); - std::map > getHistoryStates(); - -// friend class ChartToFSM; -}; - - -class USCXML_API GlobalTransition { -public: - enum InvalidReason { - MIXES_EVENT_SPONTANEOUS, - NO_COMMON_EVENT, - CHILD_ENABLED, - SAME_SOURCE_STATE, - UNCONDITIONAL_SUPERSET, - UNCONDITIONAL_MATCH, - PREEMPTING_MEMBERS - }; - - class Action { - public: - bool operator<(const Action& other) const { - if ((onEntry && !other.onEntry) || (!onEntry && other.onEntry)) - return true; - if ((raiseDone && !other.raiseDone) || (!raiseDone && other.raiseDone)) - return true; - if ((onExit && !other.onExit) || (!onExit && other.onExit)) - return true; - if ((transition && !other.transition) || (!transition && other.transition)) - return true; - if ((entered && !other.entered) || (!entered && other.entered)) - return true; - if ((exited && !other.exited) || (!exited && other.exited)) - return true; - if ((invoke && !other.invoke) || (!invoke && other.invoke)) - return true; - if ((uninvoke && !other.uninvoke) || (!uninvoke && other.uninvoke)) - return true; - - if (onEntry < other.onEntry) - return onEntry < other.onEntry; - if (raiseDone < other.raiseDone) - return raiseDone < other.raiseDone; - if (onExit < other.onExit) - return onExit < other.onExit; - if (transition < other.transition) - return transition < other.transition; - if (entered < other.entered) - return entered < other.entered; - if (exited < other.exited) - return exited < other.exited; - if (invoke < other.invoke) - return invoke < other.invoke; - if (uninvoke < other.uninvoke) - return uninvoke < other.uninvoke; - return false; - } - - bool operator==(const Action& other) const { - return !(other < *this) && !(*this < other); - } - bool operator!=(const Action& other) const { - return !operator==(other); - } - - friend USCXML_API std::ostream& operator<< (std::ostream& os, const Action& action); - - typedef std::list::iterator iter_t; - - Arabica::DOM::Element onEntry; - Arabica::DOM::Element onExit; - Arabica::DOM::Element transition; - Arabica::DOM::Element entered; - Arabica::DOM::Element exited; - Arabica::DOM::Element invoke; - Arabica::DOM::Element uninvoke; - Arabica::DOM::Element raiseDone; - - }; - - GlobalTransition(const Arabica::XPath::NodeSet& transitions, DataModel dataModel, ChartToFSM* flattener); - static GlobalTransition* copyWithoutExecContent(GlobalTransition* other); - - bool isValid; // constructor will determine, calling code will delete if not - std::string invalidMsg; - InvalidReason invalidReason; - - bool isEventless; // whether or not all our transitions are eventless - bool isTargetless; // whether or not all our transitions are eventless - bool isSubset; // there is a superset to this set - bool hasExecutableContent; - - uint32_t eventsRaised; // internal events this transition will raise - uint32_t eventsSent; // external events this transition will send - uint32_t eventsChainRaised; // maximum number of internal events raised when taking this transition in a chain - uint32_t eventsChainSent; // maximum number of external events raised when taking this transition in a chain - - std::set startTransitionRefs; // indices of eventful transitions that might trigger this transition - - std::set transitionRefs; // indizes of constituting transitions - Arabica::XPath::NodeSet getTransitions() const; - - std::list eventNames; // the list of longest event names that will enable this set - std::string eventDesc; // space-seperated eventnames for convenience - std::string condition; // conjunction of all the set's conditions - std::string members; // a convenience string listing all constituting transitions - - // executable content we gathered when we took the transition - std::list actions; - - std::string transitionId; - std::string source; - std::string destination; - std::string activeDestination; - - GlobalTransition* historyBase; // we have a base transition that left our source with no history (-> we are a history transition) - std::list historyTrans; // transitions from the same source but different histories - std::set histTargets; // constituting targets to history states - - long index; - ChartToFSM* interpreter; - - bool operator< (const GlobalTransition& other) const; - -protected: - std::list getCommonEvents(const Arabica::XPath::NodeSet& transitions); -}; - -USCXML_API std::ostream& operator<< (std::ostream& os, const GlobalTransition::Action& action); - -class TransitionTreeNode { -public: - enum TransitionTreeNodeType { - TYPE_UNDEFINED, - TYPE_PARALLEL, - TYPE_NESTED, - TYPE_TRANSITION - }; - - TransitionTreeNode() - : prevTransition(NULL), - nextTransition(NULL), - firstTransition(NULL), - firstState(NULL), - parent(NULL), - type(TYPE_UNDEFINED) {} - - virtual ~TransitionTreeNode() { - for (std::list::iterator childIter = children.begin(); childIter != children.end(); childIter++) { - delete(*childIter); - } - } - - void dump(int indent = 0); - - TransitionTreeNode* prevTransition; - TransitionTreeNode* nextTransition; - Arabica::DOM::Element transition; - - Arabica::DOM::Element state; - TransitionTreeNode* firstTransition; - TransitionTreeNode* lastTransition; - TransitionTreeNode* firstState; - - TransitionTreeNode* parent; - std::list children; - std::string nodeId; - - TransitionTreeNodeType type; - - bool operator<(const TransitionTreeNode& other) const { - return nodeId < other.nodeId; - } - -}; - -class USCXML_API ChartToFSM : public InterpreterRC, public InterpreterMonitor { -public: - ChartToFSM(const Interpreter& other); - virtual ~ChartToFSM(); - - void indexTransitions(); - void annotateDomain(); - void annotateExitSet(); - void annotateEntrySet(); - void annotateConflicts(); - Arabica::DOM::Document getDocument() const; // overwrite to return flat FSM - -protected: - - InterpreterState interpret(); - - GlobalState* _start; - Arabica::DOM::Document _flatDoc; - std::map _globalConf; - std::map _activeConf; // potentially enabled transition sets per active configuration - std::map > _historyTargets; // ids of all history states - - uint32_t getMinInternalQueueLength(uint32_t defaultVal); - uint32_t getMinExternalQueueLength(uint32_t defaultVal); - - bool _keepInvalidTransitions; - bool _transitionsFromTree; - - std::vector > indexedTransitions; - std::vector > indexedStates; - -private: - Arabica::XPath::NodeSet refsToStates(const std::set&); - Arabica::XPath::NodeSet refsToTransitions(const std::set&); - - // gather executable content per microstep - void executeContent(const Arabica::DOM::Element& content, bool rethrow = false); - - // invoke and uninvoke - virtual void invoke(const Arabica::DOM::Element& element); - virtual void cancelInvoke(const Arabica::DOM::Element& element); - - // override to do nothing - void send(const Arabica::DOM::Element& element) {} - void internalDoneSend(const Arabica::DOM::Element& state, const Arabica::DOM::Element& doneData); - - // InterpreterMonitor - virtual void beforeMicroStep(Interpreter interpreter); - virtual void onStableConfiguration(Interpreter interpreter); - virtual void beforeExitingState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing); - virtual void beforeEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing); - virtual void beforeTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing); - - void explode(); - void getPotentialTransitionsForConfFromPowerSet(const Arabica::XPath::NodeSet& conf, std::map& outMap); - void getPotentialTransitionsForConfFromTree(const Arabica::XPath::NodeSet& conf, std::map& outMap); -// void labelTransitions(); - TransitionTreeNode* buildTransTree(const Arabica::DOM::Element& root, const std::string& nodeId); - - void indexTransitions(const Arabica::DOM::Element& root); - void annotateRaiseAndSend(const Arabica::DOM::Element& root); - bool hasForeachInBetween(const Arabica::DOM::Node& ancestor, const Arabica::DOM::Node& child); - void updateRaisedAndSendChains(GlobalState* state, GlobalTransition* source, std::set visited); - - void reassembleFromFlat(); - - std::list sortTransitions(std::list list); - - // we need this static as we use it in a sort function - static std::map, Arabica::DOM::Node > _transParents; - - static bool filterSameState(const Arabica::XPath::NodeSet& transitions); - - uint64_t _perfTransProcessed; - uint64_t _perfTransTotal; - uint64_t _perfTransUsed; - uint64_t _perfStatesProcessed; - uint64_t _perfStatesTotal; - uint64_t _perfStatesSkippedProcessed; - uint64_t _perfStatesSkippedTotal; - uint64_t _perfStatesCachedProcessed; - uint64_t _perfStatesCachedTotal; - uint64_t _perfMicroStepProcessed; - uint64_t _perfMicroStepTotal; - uint64_t _perfStackSize; - uint64_t _lastTimeStamp; - - size_t _lastTransientStateId; - size_t _lastStateIndex; - size_t _lastActiveIndex; - size_t _lastTransIndex; - - bool _alreadyFlat; - - bool _skipEventChainCalculations; - size_t _maxEventSentChain; - size_t _maxEventRaisedChain; - size_t _doneEventRaiseTolerance; - - GlobalTransition* _currGlobalTransition; - std::map > _confToTransitions; - - TransitionTreeNode* _transTree; - std::map, TransitionTreeNode*> _stateToTransTreeNode; - - friend class GlobalTransition; - friend class GlobalState; -}; - -} - -#endif /* end of include guard: CHARTTOFSM_H_IOKPYEBY */ diff --git a/src/uscxml/transform/ChartToFSM.h.new b/src/uscxml/transform/ChartToFSM.h.new deleted file mode 100644 index 2ec2f44..0000000 --- a/src/uscxml/transform/ChartToFSM.h.new +++ /dev/null @@ -1,303 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef CHARTTOFSM_H_IOKPYEBY -#define CHARTTOFSM_H_IOKPYEBY - -#include "uscxml/DOMUtils.h" -#include "uscxml/interpreter/InterpreterRC.h" -#include -#include -#include -#include -#include - -namespace uscxml { -class GlobalState; -class GlobalTransition; -class ChartToFSM; - -class USCXML_API Complexity { -public: - - enum Variant { - IGNORE_NOTHING, - IGNORE_HISTORY, - IGNORE_NESTED_DATA, - IGNORE_HISTORY_AND_NESTED_DATA, - }; - - Complexity() : value(0), nestedData(0) {} - Complexity(uint64_t value) : value(value), nestedData(0) {} - - Complexity& operator+=(const Complexity& rhs) { - value += rhs.value; - nestedData += rhs.nestedData; - history.insert(history.end(), rhs.history.begin(), rhs.history.end()); - return *this; - } - - Complexity& operator*=(const Complexity& rhs) { - value *= rhs.value; - nestedData += rhs.nestedData; - history.insert(history.end(), rhs.history.begin(), rhs.history.end()); - return *this; - } - - static uint64_t stateMachineComplexity(const Arabica::DOM::Element& root, Complexity::Variant variant = IGNORE_NOTHING); - -protected: - static Complexity calculateStateMachineComplexity(const Arabica::DOM::Element& root); - - uint64_t value; - uint64_t nestedData; - std::list history; -}; - -class USCXML_API GlobalState { -public: - - GlobalState() {} - GlobalState(const Arabica::DOM::Node& globalState); - GlobalState(const Arabica::XPath::NodeSet& activeStates, - const Arabica::XPath::NodeSet& alreadyEnteredStates, // we need to remember for binding=late - const std::map >& historyStates, - const std::string& xmlNSPrefix, - ChartToFSM* flattener); - - std::set activeStatesRefs; - std::set alreadyEnteredStatesRefs; - std::map > historyStatesRefs; - - std::list sortedOutgoing; - std::string stateId; - std::string activeId; - - unsigned long activeIndex; - unsigned long index; - bool isFinal; - - ChartToFSM* interpreter; - - Arabica::XPath::NodeSet getActiveStates(); - Arabica::XPath::NodeSet getAlreadyEnteredStates(); - std::map > getHistoryStates(); - -}; - - -class USCXML_API GlobalTransition { -public: - enum InvalidReason { - MIXES_EVENT_SPONTANEOUS, - NO_COMMON_EVENT, - CHILD_ENABLED, - SAME_SOURCE_STATE, - UNCONDITIONAL_SUPERSET, - UNCONDITIONAL_MATCH, - PREEMPTING_MEMBERS - }; - - class Action { - public: - bool operator<(const Action& other) const { - if (onEntry < other.onEntry) - return onEntry < other.onEntry; - if (onExit < other.onExit) - return onExit < other.onExit; - if (transition < other.transition) - return transition < other.transition; - if (entered < other.entered) - return entered < other.entered; - if (exited < other.exited) - return exited < other.exited; - if (invoke < other.invoke) - return invoke < other.invoke; - if (uninvoke < other.uninvoke) - return uninvoke < other.uninvoke; - return false; - } - - bool operator==(const Action& other) const { - return !(other < *this) && !(*this < other); - } - bool operator!=(const Action& other) const { - return !operator==(other); - } - - typedef std::list::iterator iter_t; - - Arabica::DOM::Element onEntry; - Arabica::DOM::Element onExit; - Arabica::DOM::Element transition; - Arabica::DOM::Element entered; - Arabica::DOM::Element exited; - Arabica::DOM::Element invoke; - Arabica::DOM::Element uninvoke; - - }; - - GlobalTransition(const Arabica::XPath::NodeSet& transitions, DataModel dataModel, ChartToFSM* flattener); - static GlobalTransition* copyWithoutExecContent(GlobalTransition* other); - - bool isValid; // constructor will determine, calling code will delete if not - std::string invalidMsg; - InvalidReason invalidReason; - - bool isEventless; // whether or not all our transitions are eventless - bool isTargetless; // whether or not all our transitions are eventless - bool isSubset; // there is a superset to this set - bool hasExecutableContent; - - uint32_t eventsRaised; // internal events this transition will raise - uint32_t eventsSent; // external events this transition will send - uint32_t eventsChainRaised; // maximum number of internal events raised when taking this transition in a chain - uint32_t eventsChainSent; // maximum number of external events raised when taking this transition in a chain - - std::set startTransitionRefs; // indices of eventful transitions that might trigger this transition - - std::set transitionRefs; // indizes of constituting transitions - Arabica::XPath::NodeSet getTransitions() const; - - std::list eventNames; // the list of longest event names that will enable this set - std::string eventDesc; // space-seperated eventnames for convenience - std::string condition; // conjunction of all the set's conditions - std::string members; // a convenience string listing all constituting transitions - - // executable content we gathered when we took the transition - std::list actions; - - std::string transitionId; - std::string source; - std::string destination; - std::string activeDestination; - - GlobalTransition* historyBase; // we have a base transition that left our source with no history (-> we are a history transition) - std::list historyTrans; // transitions from the same source but different histories - std::set histTargets; // constituting targets to history states - - long index; - ChartToFSM* interpreter; - - bool operator< (const GlobalTransition& other) const; - -protected: - std::list getCommonEvents(const Arabica::XPath::NodeSet& transitions); -}; - - -class USCXML_API ChartToFSM : public InterpreterRC, public InterpreterMonitor { -public: - ChartToFSM(const Interpreter& other); - virtual ~ChartToFSM(); - - void indexTransitions(); - Arabica::DOM::Document getDocument() const; // overwrite to return flat FSM - -protected: - - InterpreterState interpret(); - - GlobalState* _start; - Arabica::DOM::Document _flatDoc; - std::map _globalConf; - std::map _activeConf; // potentially enabled transition sets per active configuration - std::map > _historyTargets; // ids of all history states - - uint32_t getMinInternalQueueLength(uint32_t defaultVal); - uint32_t getMinExternalQueueLength(uint32_t defaultVal); - - bool _keepInvalidTransitions; - -private: - Arabica::XPath::NodeSet refsToStates(const std::set&); - Arabica::XPath::NodeSet refsToTransitions(const std::set&); - - std::vector > indexedTransitions; - std::vector > indexedStates; - - // gather executable content per microstep - void executeContent(const Arabica::DOM::Element& content, bool rethrow = false); - - // invoke and uninvoke - virtual void invoke(const Arabica::DOM::Element& element); - virtual void cancelInvoke(const Arabica::DOM::Element& element); - - // override to do nothing - void send(const Arabica::DOM::Element& element) {} - void internalDoneSend(const Arabica::DOM::Element& state); - - // InterpreterMonitor - virtual void beforeMicroStep(Interpreter interpreter); - virtual void onStableConfiguration(Interpreter interpreter); - virtual void beforeExitingState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing); - virtual void beforeEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing); - virtual void beforeTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing); - - void explode(); - void getPotentialTransitionsForConf(const Arabica::XPath::NodeSet& conf, std::map& outMap); -// void labelTransitions(); - - void indexTransitions(const Arabica::DOM::Element& root); - void annotateRaiseAndSend(const Arabica::DOM::Element& root); - bool hasForeachInBetween(const Arabica::DOM::Node& ancestor, const Arabica::DOM::Node& child); - void updateRaisedAndSendChains(GlobalState* state, GlobalTransition* source, std::set visited); - - void reassembleFromFlat(); - - std::list sortTransitions(std::list list); - - // we need this static as we use it in a sort function - static std::map, Arabica::DOM::Node > _transParents; - - static bool filterSameState(const Arabica::XPath::NodeSet& transitions); - - uint64_t _perfTransProcessed; - uint64_t _perfTransTotal; - uint64_t _perfTransUsed; - uint64_t _perfStatesProcessed; - uint64_t _perfStatesSkippedProcessed; - uint64_t _perfStatesSkippedTotal; - uint64_t _perfStatesCachedProcessed; - uint64_t _perfStatesCachedTotal; - uint64_t _perfMicroStepProcessed; - uint64_t _perfMicroStepTotal; - uint64_t _lastTimeStamp; - - size_t _lastTransientStateId; - size_t _lastStateIndex; - size_t _lastActiveIndex; - size_t _lastTransIndex; - - bool _alreadyFlat; - - bool _skipEventChainCalculations; - size_t _maxEventSentChain; - size_t _maxEventRaisedChain; - size_t _doneEventRaiseTolerance; - - GlobalTransition* _currGlobalTransition; - - friend class GlobalTransition; - friend class GlobalState; -}; - -} - -#endif /* end of include guard: CHARTTOFSM_H_IOKPYEBY */ diff --git a/src/uscxml/transform/ChartToFlatSCXML.cpp b/src/uscxml/transform/ChartToFlatSCXML.cpp deleted file mode 100644 index ac91681..0000000 --- a/src/uscxml/transform/ChartToFlatSCXML.cpp +++ /dev/null @@ -1,440 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "ChartToFlatSCXML.h" -#include "uscxml/Convenience.h" -#include "uscxml/transform/FlatStateIdentifier.h" - -#define CREATE_TRANSIENT_STATE_WITH_CHILDS(stateId) \ -if (childs.size() > 0) { \ - Element transientState = _flatDoc.createElementNS(_nsInfo.nsURL, "state"); \ - _nsInfo.setPrefix(transientState);\ - transientState.setAttribute("transient", "true"); \ - for (std::list >::iterator commentIter = pendingComments.begin(); commentIter != pendingComments.end(); commentIter++) {\ - transientState.appendChild(*commentIter); \ - }\ - pendingComments.clear(); \ - if (stateId.length() > 0) \ - transientState.setAttribute("id", stateId); \ - for (size_t i = 0; i < childs.size(); i++) { \ - Node imported = _flatDoc.importNode(childs[i], true); \ - transientState.appendChild(imported); \ - } \ - transientStateChain.push_back(transientState); \ -} \ -childs = NodeSet(); - -namespace uscxml { - -using namespace Arabica::DOM; -using namespace Arabica::XPath; - -ChartToFlatSCXML::operator Interpreter() { - if (!HAS_ATTR(_scxml, "flat") || !stringIsTrue(ATTR(_scxml, "flat"))) { - createDocument(); - } - - return Interpreter::fromClone(shared_from_this()); -} - -Transformer ChartToFlatSCXML::transform(const Interpreter& other) { - return boost::shared_ptr(new ChartToFlatSCXML(other)); -} - -void ChartToFlatSCXML::writeTo(std::ostream& stream) { - if (!HAS_ATTR(_scxml, "flat") || !stringIsTrue(ATTR(_scxml, "flat"))) { - createDocument(); - } - - // remove all debug attributes - NodeSet elementNodes = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, _scxml, true); - for (size_t i = 0; i < elementNodes.size(); i++) { - Element element(elementNodes[i]); - if (!envVarIsTrue("USCXML_ANNOTATE_GLOBAL_TRANS_SENDS") && HAS_ATTR(element, "send")) - element.removeAttribute("send"); - if (!envVarIsTrue("USCXML_ANNOTATE_GLOBAL_TRANS_RAISES") && HAS_ATTR(element, "raise")) - element.removeAttribute("raise"); - if (!envVarIsTrue("USCXML_ANNOTATE_GLOBAL_TRANS_MEMBERS") && HAS_ATTR(element, "members")) - element.removeAttribute("members"); - if (!envVarIsTrue("USCXML_ANNOTATE_GLOBAL_TRANS_PRIO") && HAS_ATTR(element, "priority")) - element.removeAttribute("priority"); - if (!envVarIsTrue("USCXML_ANNOTATE_GLOBAL_STATE_STEP") && HAS_ATTR(element, "step")) - element.removeAttribute("step"); - if (HAS_ATTR(element, "final-target")) - element.removeAttribute("final-target"); - } - - if (envVarIsTrue("USCXML_FLAT_FSM_METRICS_ONLY")) - return; - - stream << _scxml; -} - -void ChartToFlatSCXML::createDocument() { - - if (HAS_ATTR(_scxml, "flat") && stringIsTrue(ATTR(_scxml, "flat"))) - return; - - { - NodeSet allElements = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, _scxml, true); - size_t nrElements = 0; - for (size_t i = 0; i < allElements.size(); i++) { - if (!isInEmbeddedDocument(allElements[i])) - nrElements++; - } - std::cerr << "Number of elements before flattening: " << nrElements + 1 << std::endl; - } - - - if (_start == NULL) - interpret(); // only if not already flat! - - if (envVarIsTrue("USCXML_FLAT_FSM_METRICS_ONLY")) - return; - - Element _origSCXML = _scxml; - - _scxml = _flatDoc.createElementNS(_nsInfo.nsURL, "scxml"); - _nsInfo.setPrefix(_scxml); - - _scxml.setAttribute("flat", "true"); - _flatDoc.appendChild(_scxml); - - if (HAS_ATTR(_origSCXML, "datamodel")) { - _scxml.setAttribute("datamodel", ATTR(_origSCXML, "datamodel")); - } - - if (HAS_ATTR(_origSCXML, "name")) { - _scxml.setAttribute("name", ATTR(_origSCXML, "name")); - } - - if (HAS_ATTR(_origSCXML, "binding")) { - _scxml.setAttribute("binding", ATTR(_origSCXML, "binding")); - } - - _scxml.setAttribute("initial", _start->stateId); - - NodeSet datas; - if (_binding == InterpreterImpl::LATE) { - // with late binding, just copy direct datamodel childs - datas = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "datamodel", _origSCXML); - } else { - // with early binding, copy all datamodel elements into scxml element - datas = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "datamodel", _origSCXML).asNodeSet(); - } - for (size_t i = 0; i < datas.size(); i++) { - if (isInEmbeddedDocument(datas[i])) - continue; // nested document - Node imported = _flatDoc.importNode(datas[i], true); - _scxml.appendChild(imported); - } - - - NodeSet scripts = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "script", _origSCXML); - for (size_t i = 0; i < scripts.size(); i++) { - Node imported = _flatDoc.importNode(scripts[i], true); - _scxml.appendChild(imported); - } - - NodeSet comments = DOMUtils::filterChildType(Node_base::COMMENT_NODE, _origSCXML); - for (size_t i = 0; i < comments.size(); i++) { - Node imported = _flatDoc.importNode(comments[i], true); - _scxml.appendChild(imported); - } - - std::vector > sortedStates; - sortedStates.insert(sortedStates.begin(), _globalConf.begin(), _globalConf.end()); - std::sort(sortedStates.begin(), sortedStates.end(), sortStatesByIndex); - - // int index = 0; - // for (std::vector >::iterator transIter = indexedTransitions.begin(); transIter != indexedTransitions.end(); transIter++) { - // const Element& refTrans = *transIter; - // std::cerr << index++ << ": " << refTrans << std::endl; - // } - // std::cerr << std::endl; - - for (std::vector >::iterator confIter = sortedStates.begin(); - confIter != sortedStates.end(); - confIter++) { - appendGlobalStateNode(confIter->second); - } - - _document = _flatDoc; - - NodeSet scxmls = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "scxml", _document); - if (scxmls.size() > 0) { - _scxml = Element(scxmls[0]); - } - - { - NodeSet allElements = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, _scxml, true); - size_t nrElements = 0; - for (size_t i = 0; i < allElements.size(); i++) { - if (!isInEmbeddedDocument(allElements[i])) - nrElements++; - } - std::cerr << "Number of elements after flattening: " << nrElements + 1 << std::endl; - } - - -} - -void ChartToFlatSCXML::appendGlobalStateNode(GlobalState* globalState) { - Element state = _flatDoc.createElementNS(_nsInfo.nsURL, "state"); - _nsInfo.setPrefix(state); - - state.setAttribute("step", toStr(globalState->index)); - state.setAttribute("id", globalState->stateId); - - if (globalState->isFinal) - state.setAttribute("final", "true"); - - std::list& transitionList = globalState->sortedOutgoing; - - // apend here, for transient state chains to trail the state - _scxml.appendChild(state); - - size_t index = 0; - for (std::list::iterator outIter = transitionList.begin(); - outIter != transitionList.end(); - outIter++) { -// (*outIter)->index = globalState->index + ":" + toStr(index); - state.appendChild(globalTransitionToNode(*outIter)); - index++; - } -} - -/** - * Creates transient states for executable content as a side-effect - */ -Node ChartToFlatSCXML::globalTransitionToNode(GlobalTransition* globalTransition) { - Element transition = _flatDoc.createElementNS(_nsInfo.nsURL, "transition"); - _nsInfo.setPrefix(transition); - - // transition.setAttribute("ref", globalTransition->index); - -#if 1 - transition.setAttribute("members", globalTransition->members); -#endif - // transition.setAttribute("priority", toStr(globalTransition->priority)); - - if (!globalTransition->isEventless) { - transition.setAttribute("event", globalTransition->eventDesc); - } - - if (globalTransition->condition.size() > 0) { - transition.setAttribute("cond", globalTransition->condition); - } - - if (globalTransition->destination.size() > 0) { - transition.setAttribute("final-target", globalTransition->destination); - } - - NodeSet transientStateChain; - - // current active state set - FlatStateIdentifier flatId(globalTransition->source); - std::list currActiveStates = flatId.getActive(); - - // std::cerr << "From " << globalTransition->source << " to " << globalTransition->destination << ":" << std::endl; - - // gather content for new transient state - NodeSet childs; - - // aggregated entering / exiting to avoid states without childs while still labeling - std::list > pendingComments; - - // iterate all actions taken during the transition - for (std::list::iterator actionIter = globalTransition->actions.begin(); - actionIter != globalTransition->actions.end(); - actionIter++) { - - if (actionIter->transition) { - // DETAIL_EXEC_CONTENT(transition, actionIter); - - Element onexit = _flatDoc.createElementNS(_nsInfo.nsURL, "onexit"); - _nsInfo.setPrefix(onexit); - Node child = actionIter->transition.getFirstChild(); - while(child) { - Node imported = _flatDoc.importNode(child, true); - onexit.appendChild(imported); - child = child.getNextSibling(); - } - // only append if there is something done - std::stringstream commentSS; - commentSS << " Transition in '" << ATTR_CAST(getSourceState(actionIter->transition), "id") << "'"; - if (HAS_ATTR(actionIter->transition, "event")) - commentSS << " for event '" << ATTR(actionIter->transition, "event") << "'"; - if (HAS_ATTR(actionIter->transition, "cond")) - commentSS << " with condition '" << ATTR(actionIter->transition, "cond") << "'"; - if (HAS_ATTR(actionIter->transition, "target")) - commentSS << " to target '" << ATTR(actionIter->transition, "target") << "'"; - commentSS << " "; - - if (onexit.hasChildNodes()) { - if (envVarIsTrue("USCXML_ANNOTATE_VERBOSE_COMMENTS")) - childs.push_back(_flatDoc.createComment(commentSS.str())); - childs.push_back(onexit); - } else { - if (envVarIsTrue("USCXML_ANNOTATE_VERBOSE_COMMENTS")) - pendingComments.push_back(_flatDoc.createComment(commentSS.str())); - } - - continue; - } - - if (actionIter->onExit) { - // DETAIL_EXEC_CONTENT(onExit, actionIter); - childs.push_back(actionIter->onExit); - continue; - } - - if (actionIter->onEntry) { - // DETAIL_EXEC_CONTENT(onEntry, actionIter); - childs.push_back(actionIter->onEntry); - continue; - } - - if (actionIter->raiseDone) { - // DETAIL_EXEC_CONTENT(raiseDone, actionIter); - childs.push_back(actionIter->raiseDone); - continue; - } - - if (actionIter->invoke) { - // DETAIL_EXEC_CONTENT(invoke, actionIter); - Element invokeElem = Element(actionIter->invoke); - invokeElem.setAttribute("persist", "true"); - childs.push_back(invokeElem); - continue; - } - - if (actionIter->uninvoke) { - // DETAIL_EXEC_CONTENT(uninvoke, actionIter); - Element uninvokeElem = _flatDoc.createElementNS(_nsInfo.nsURL, "uninvoke"); - _nsInfo.setPrefix(uninvokeElem); - - if (HAS_ATTR(actionIter->uninvoke, "type")) { - uninvokeElem.setAttribute("type", ATTR(actionIter->uninvoke, "type")); - } - if (HAS_ATTR(actionIter->uninvoke, "typeexpr")) { - uninvokeElem.setAttribute("typeexpr", ATTR(actionIter->uninvoke, "typeexpr")); - } - if (HAS_ATTR(actionIter->uninvoke, "id")) { - uninvokeElem.setAttribute("id", ATTR(actionIter->uninvoke, "id")); - } - if (HAS_ATTR(actionIter->uninvoke, "idlocation")) { - uninvokeElem.setAttribute("idlocation", ATTR(actionIter->uninvoke, "idlocation")); - } - childs.push_back(uninvokeElem); - continue; - } - - if (actionIter->exited) { - currActiveStates.remove(ATTR_CAST(actionIter->exited, "id")); - if (childs.size() > 0) { - if (envVarIsTrue("USCXML_ANNOTATE_VERBOSE_COMMENTS")) - childs.push_back(_flatDoc.createComment(" Exiting " + ATTR_CAST(actionIter->exited, "id") + " ")); - CREATE_TRANSIENT_STATE_WITH_CHILDS(FlatStateIdentifier::toStateId(currActiveStates)); // create a new transient state to update its id - } else { - // enqueue for next actual state - if (envVarIsTrue("USCXML_ANNOTATE_VERBOSE_COMMENTS")) - pendingComments.push_back(_flatDoc.createComment(" Exiting " + ATTR_CAST(actionIter->exited, "id") + " ")); - } - } - - if (actionIter->entered) { - if (childs.size() > 0) { - if (envVarIsTrue("USCXML_ANNOTATE_VERBOSE_COMMENTS")) - childs.push_back(_flatDoc.createComment(" Entering " + ATTR_CAST(actionIter->entered, "id") + " ")); - CREATE_TRANSIENT_STATE_WITH_CHILDS(FlatStateIdentifier::toStateId(currActiveStates)); // create a new transient state to update its id - } else { - if (envVarIsTrue("USCXML_ANNOTATE_VERBOSE_COMMENTS")) - pendingComments.push_back(_flatDoc.createComment(" Entering " + ATTR_CAST(actionIter->entered, "id") + " ")); - } - currActiveStates.push_back(ATTR_CAST(actionIter->entered, "id")); - - // we entered a new child - check if it has a datamodel and we entered for the first time - if (_binding == InterpreterImpl::LATE) { - NodeSet datamodel = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "datamodel", actionIter->entered); - if (datamodel.size() > 0 && !isMember(actionIter->entered, _globalConf[globalTransition->source]->getAlreadyEnteredStates())) { - childs.push_back(datamodel); - } - } - } - } - - CREATE_TRANSIENT_STATE_WITH_CHILDS(FlatStateIdentifier::toStateId(currActiveStates)) - - if (transientStateChain.size() > 0) { - Element prevExitTransitionElem; - - for (size_t i = 0; i < transientStateChain.size(); i++) { - Element transientStateElem = Element(transientStateChain[i]); - transientStateElem.setAttribute("id", transientStateElem.getAttribute("id") + "-via-" + toStr(_lastTransientStateId++)); - - Element exitTransition = _flatDoc.createElementNS(_nsInfo.nsURL, "transition"); - _nsInfo.setPrefix(exitTransition); - - if (prevExitTransitionElem) { - // point previous to this one - prevExitTransitionElem.setAttribute("target", transientStateElem.getAttribute("id")); - } else { - // update globalTransition->source target - } - - transientStateElem.appendChild(exitTransition); - prevExitTransitionElem = exitTransition; - - if (i == 0) - transition.setAttribute("target", transientStateElem.getAttribute("id")); - - _scxml.appendChild(transientStateElem); - } - - // last one points to actual target - assert(prevExitTransitionElem); - prevExitTransitionElem.setAttribute("target", globalTransition->destination); -#if 0 - } else if (transientStateChain.size() == 1) { - Element transientStateElem = Element(transientStateChain[0]); - transientStateElem.setAttribute("onlyOne", "yes!"); - - Element exitTransition = _flatDoc.createElementNS(_nsInfo.nsURL, "transition"); - _nsInfo.setPrefix(exitTransition); - exitTransition.setAttribute("target", globalTransition->destination); - - transientStateElem.appendChild(exitTransition); - - _scxml.appendChild(transientStateElem); - transition.setAttribute("target", transientStateElem.getAttribute("id")); -#endif - } else { - transition.setAttribute("target", globalTransition->destination); - } - - assert(HAS_ATTR_CAST(transition, "target")); - return transition; -} - -bool ChartToFlatSCXML::sortStatesByIndex(const std::pair& s1, const std::pair& s2) { - return s1.second->index < s2.second->index; -} - -} \ No newline at end of file diff --git a/src/uscxml/transform/ChartToFlatSCXML.h b/src/uscxml/transform/ChartToFlatSCXML.h deleted file mode 100644 index a278721..0000000 --- a/src/uscxml/transform/ChartToFlatSCXML.h +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef FSMTOSCXML_H_DC0B5E09 -#define FSMTOSCXML_H_DC0B5E09 - -#include "ChartToFSM.h" -#include "Transformer.h" - -namespace uscxml { - -class USCXML_API ChartToFlatSCXML : public TransformerImpl, public ChartToFSM { -public: - virtual ~ChartToFlatSCXML() {} - static Transformer transform(const Interpreter& other); - - operator Interpreter(); - - Arabica::DOM::Document getDocument() const { - if (_flatDoc) - return _flatDoc; - return _document; - } - -protected: - void writeTo(std::ostream& stream); - - ChartToFlatSCXML(const Interpreter& other) : TransformerImpl(), ChartToFSM(other), _lastTransientStateId(0) {} - void createDocument(); - - void appendGlobalStateNode(GlobalState* globalState); - Arabica::DOM::Node globalTransitionToNode(GlobalTransition* globalTransition); - static bool sortStatesByIndex(const std::pair& s1, const std::pair& s2); - - size_t _lastTransientStateId; - -}; - -} -#endif /* end of include guard: FSMTOSCXML_H_DC0B5E09 */ diff --git a/src/uscxml/transform/ChartToMinimalSCXML.cpp b/src/uscxml/transform/ChartToMinimalSCXML.cpp deleted file mode 100644 index 80db707..0000000 --- a/src/uscxml/transform/ChartToMinimalSCXML.cpp +++ /dev/null @@ -1,284 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/transform/ChartToMinimalSCXML.h" -#include "uscxml/transform/FlatStateIdentifier.h" -#include "uscxml/Convenience.h" -#include "uscxml/Factory.h" - -#include -#include - -#include - -namespace uscxml { - -using namespace Arabica::XPath; -using namespace Arabica::DOM; - -Transformer ChartToMinimalSCXML::transform(const Interpreter& other) { - return boost::shared_ptr(new ChartToMinimalSCXML(other)); -} - -ChartToMinimalSCXML::ChartToMinimalSCXML(const Interpreter& other) : TransformerImpl(), _retainAsComments(false), _step(1) { - cloneFrom(other.getImpl()); - - // a bit messy but needed for SCXML IO Processor with session id target - _selfPtr = boost::shared_ptr(this, Deleter()); - Interpreter::addInstance(_selfPtr); -} - -void ChartToMinimalSCXML::writeTo(std::ostream& stream) { - - addMonitor(this); - - { - NodeSet allElements = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, _scxml, true); - size_t nrElements = 0; - for (size_t i = 0; i < allElements.size(); i++) { - if (!isInEmbeddedDocument(allElements[i])) - nrElements++; - } - std::cerr << "Number of elements before reduction: " << nrElements + 1 << std::endl; - } - - // test 278 - move embedded datas to topmost datamodel - if (_binding == EARLY) { - // move all data elements into topmost datamodel element - NodeSet datas = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "data", _scxml, true); - - if (datas.size() > 0) { - Node topMostDatamodel; - NodeSet datamodels = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "datamodel", _scxml, false); - if (datamodels.size() > 0) { - topMostDatamodel = datamodels[0]; - } else { - topMostDatamodel = _document.createElementNS(_nsInfo.nsURL, "datamodel"); - _scxml.insertBefore(topMostDatamodel, _scxml.getFirstChild()); - } - - while(topMostDatamodel.hasChildNodes()) - topMostDatamodel.removeChild(topMostDatamodel.getFirstChild()); - - for (size_t i = 0; i < datas.size(); i++) { - if (!isInEmbeddedDocument(datas[i])) { - topMostDatamodel.appendChild(datas[i]); - } - } - } - } - - char* waitForEnv = getenv("USCXML_MINIMIZE_WAIT_MS"); - _retainAsComments = envVarIsTrue("USCXML_MINIMIZE_RETAIN_AS_COMMENTS"); - - long waitFor = -1; - - if (waitForEnv != NULL) { - try { - waitFor = strTo(waitForEnv); - } catch (...) { - waitFor = 0; - } - } - - if (envVarIsTrue("USCXML_MINIMIZE_WAIT_FOR_COMPLETION")) { - interpret(); - } else { - start(); - if (waitFor < 0) { - // wait for EOF / CTRL+D - char c; - while(true) { - std::cin >> c; - if(std::cin.eof()) - break; - } - } else { - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(waitFor)); - } - } - stop(); - - removeUnvisited(_scxml); - - { - NodeSet allElements = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, _scxml, true); - size_t nrElements = 0; - for (size_t i = 0; i < allElements.size(); i++) { - if (!isInEmbeddedDocument(allElements[i])) - nrElements++; - } - std::cerr << "Number of elements after reduction: " << nrElements + 1 << std::endl; - } - - // unset data model - _dmCopy = DataModel(); - - stream << _scxml; -} - -void ChartToMinimalSCXML::removeUnvisited(Arabica::DOM::Node& node) { - if (node.getNodeType() != Node_base::ELEMENT_NODE) - return; - - Element elem(node); - - if (isInEmbeddedDocument(elem) || - (TAGNAME(elem) == _nsInfo.xmlNSPrefix + "param") || - (TAGNAME(elem) == _nsInfo.xmlNSPrefix + "donedata") || - (TAGNAME(elem) == _nsInfo.xmlNSPrefix + "datamodel") || - (TAGNAME(elem) == _nsInfo.xmlNSPrefix + "data") || - (TAGNAME(elem) == _nsInfo.xmlNSPrefix + "content")) { - return; - } - - // special handling for conditional blocks with if - if (TAGNAME(elem) == _nsInfo.xmlNSPrefix + "if") { - NodeSet ifChilds = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, elem, false); - Element lastConditional = elem; - bool hadVisitedChild = false; - for (size_t j = 0; j < ifChilds.size(); j++) { - Element ifChildElem(ifChilds[j]); - if (TAGNAME(ifChildElem) == _nsInfo.xmlNSPrefix + "else" || TAGNAME(ifChildElem) == _nsInfo.xmlNSPrefix + "elseif") { - if (!hadVisitedChild && HAS_ATTR(lastConditional, "cond")) { - lastConditional.setAttribute("cond", "false"); - } - lastConditional = ifChildElem; - hadVisitedChild = false; - } - if (_visited.find(ifChildElem) != _visited.end()) { - _visited.insert(lastConditional); - hadVisitedChild = true; - } - } - } - - // test344 - if (_dmCopy && - TAGNAME(elem) == _nsInfo.xmlNSPrefix + "transition" && - HAS_ATTR(elem, "cond") && - !_dmCopy.isValidSyntax(ATTR(elem, "cond"))) - return; - - // detach unvisited nodes from DOM - if (_visited.find(node) == _visited.end()) { - std::cerr << DOMUtils::xPathForNode(node) << std::endl; - if (_retainAsComments) { - std::stringstream oldContent; - oldContent << node; - node.getParentNode().replaceChild(_document.createComment(boost::replace_all_copy(oldContent.str(),"--", "-")), node); - } else { - // removeChildren is not working as expected -// node.getParentNode().replaceChild(_document.createTextNode(""), node); - node.getParentNode().removeChild(node); - } - return; - } - - // iterate and remove unvisited children - NodeList children = node.getChildNodes(); - for (size_t i = 0; i < children.getLength(); i++) { - Node child(children.item(i)); - removeUnvisited(child); - } -} - -void ChartToMinimalSCXML::markAsVisited(const Arabica::DOM::Element& element) { - if (_visited.find(element) != _visited.end()) - return; - - Arabica::DOM::Element elem = const_cast&>(element); - - _visited.insert(element); - Node parent = element.getParentNode(); - if (parent && parent.getNodeType() == Node_base::ELEMENT_NODE) { - Arabica::DOM::Element parentElem(parent); - markAsVisited(parentElem); - } -} - -void ChartToMinimalSCXML::beforeExecutingContent(Interpreter interpreter, const Arabica::DOM::Element& element) { - markAsVisited(element); - StateTransitionMonitor::beforeExecutingContent(interpreter, element); -} - -void ChartToMinimalSCXML::beforeUninvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) { - markAsVisited(invokeElem); -} - -void ChartToMinimalSCXML::beforeTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing) { - NodeSet targets = getTargetStates(transition); - // we need this for history pseudo states - for (size_t i = 0; i < targets.size(); i++) { - markAsVisited(Arabica::DOM::Element(targets[i])); - } - markAsVisited(transition); - - std::stringstream commentSS; - if (HAS_ATTR(transition, "event")) { - commentSS << " Step #" << _step++ << " - transition taken for event '" << _currEvent.name << "' "; - } else { - commentSS << " Step #" << _step++ << " - spontaneous transition taken "; - } - if (envVarIsTrue("USCXML_ANNOTATE_PROGRESS")) - transition.getParentNode().insertBefore(_document.createComment(commentSS.str()), transition); - - StateTransitionMonitor::beforeTakingTransition(interpreter, transition, moreComing); -} - -void ChartToMinimalSCXML::beforeEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - markAsVisited(state); - - std::stringstream commentSS; - commentSS << " Step #" << _step++ << " - state entered "; - - Arabica::DOM::Element ncState = const_cast&>(state); - if (envVarIsTrue("USCXML_ANNOTATE_PROGRESS")) - ncState.insertBefore(_document.createComment(commentSS.str()), ncState.getFirstChild()); - - StateTransitionMonitor::beforeEnteringState(interpreter, state, moreComing); -} - -void ChartToMinimalSCXML::beforeInvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) { - markAsVisited(invokeElem); -} - -void ChartToMinimalSCXML::beforeCompletion(Interpreter interpreter) { - _dmCopy = _dataModel; // retain a copy; -} - -void ChartToMinimalSCXML::executeContent(const Arabica::DOM::Element& content, bool rethrow) { - markAsVisited(content); - InterpreterRC::executeContent(content, rethrow); -} - -void ChartToMinimalSCXML::invoke(const Arabica::DOM::Element& element) { - markAsVisited(element); - InterpreterRC::invoke(element); -} - -void ChartToMinimalSCXML::cancelInvoke(const Arabica::DOM::Element& element) { - markAsVisited(element); - InterpreterRC::cancelInvoke(element); -} - -void ChartToMinimalSCXML::onStableConfiguration(uscxml::Interpreter interpreter) { -} - -} \ No newline at end of file diff --git a/src/uscxml/transform/ChartToMinimalSCXML.h b/src/uscxml/transform/ChartToMinimalSCXML.h deleted file mode 100644 index 4eb0b92..0000000 --- a/src/uscxml/transform/ChartToMinimalSCXML.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef CHARTTOMINIMALSCXML_H_7B97677A -#define CHARTTOMINIMALSCXML_H_7B97677A - -#include "uscxml/interpreter/InterpreterRC.h" -#include "uscxml/dom/DOMUtils.h" -#include -#include -#include -#include -#include -#include - -#include "Transformer.h" - -namespace uscxml { - -class USCXML_API ChartToMinimalSCXML : public InterpreterRC, public StateTransitionMonitor, public TransformerImpl { -public: - virtual ~ChartToMinimalSCXML() {} - static Transformer transform(const Interpreter& other); - - // InterpreterMonitor - virtual void beforeExecutingContent(Interpreter interpreter, const Arabica::DOM::Element& element); - virtual void beforeUninvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid); - virtual void beforeTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing); - virtual void beforeEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing); - virtual void beforeInvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid); - virtual void beforeCompletion(Interpreter interpreter); - virtual void onStableConfiguration(Interpreter interpreter); - - // gather executable content per microstep - void executeContent(const Arabica::DOM::Element& content, bool rethrow = false); - - // invoke and uninvoke - virtual void invoke(const Arabica::DOM::Element& element); - virtual void cancelInvoke(const Arabica::DOM::Element& element); - -protected: - void writeTo(std::ostream& stream); - - ChartToMinimalSCXML(const Interpreter& other); - - void markAsVisited(const Arabica::DOM::Element& element); - void removeUnvisited(Arabica::DOM::Node& node); - - std::set > _visited; - DataModel _dmCopy; - bool _retainAsComments; - -private: - size_t _step; - - // we need this to register as an instance at Interpreter::_instances - boost::shared_ptr _selfPtr; - - // prevent deletion from shared_ptr - class Deleter { - public: - void operator()(ChartToMinimalSCXML* p) { - /* do nothing */ - } - }; - -}; - -} - - -#endif /* end of include guard: CHARTTOMINIMALSCXML_H_7B97677A */ diff --git a/src/uscxml/transform/ChartToPromela.cpp b/src/uscxml/transform/ChartToPromela.cpp deleted file mode 100644 index a9afea6..0000000 --- a/src/uscxml/transform/ChartToPromela.cpp +++ /dev/null @@ -1,3578 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#define NEW_DELAY_RESHUFFLE 1 - -#include "uscxml/transform/ChartToFSM.h" -#include "uscxml/transform/ChartToPromela.h" -#include "uscxml/transform/FlatStateIdentifier.h" -#include "uscxml/plugins/datamodel/promela/PromelaParser.h" -#include "uscxml/plugins/datamodel/promela/parser/promela.tab.hpp" - -#include -#include -#include -#include "uscxml/UUID.h" -#include -#include -#include - -#define MSG_QUEUE_LENGTH 5 -#define MAX_MACRO_CHARS 64 -#define MIN_COMMENT_PADDING 60 -#define MAX(X,Y) ((X) > (Y) ? (X) : (Y)) - -#define ADAPT_SRC(code) _analyzer->adaptCode(code, _prefix) - -#define BIT_WIDTH(number) (number > 1 ? (int)ceil(log((double)number) / log((double)2.0)) : 1) -#define LENGTH_FOR_NUMBER(input, output) \ -{ \ - int number = input; \ - int output = 0; \ - do { \ - number /= 10; \ - output++; \ - } while (number != 0); \ -} - -#define INDENT_MIN(stream, start, cols) \ -for (size_t indentIndex = start; indentIndex < cols; indentIndex++) \ - stream << " "; - -#define DIFF_MAPS(base, compare, result) \ -{ \ - histIter_t baseIter = base.begin(); \ - while(baseIter != base.end()) { \ - if (compare.find(baseIter->first) == compare.end()) { \ - result[baseIter->first] = baseIter->second; \ - } else { \ - histMemberIter_t baseMemberIter = baseIter->second.begin(); \ - while(baseMemberIter != baseIter->second.end()) { \ - if (compare.at(baseIter->first).find(*baseMemberIter) == compare.at(baseIter->first).end()) { \ - result[baseIter->first].insert(*baseMemberIter); \ - } \ - baseMemberIter++; \ - } \ - } \ - baseIter++; \ - } \ -} - -#define INTERSECT_MAPS(base, compare, result) \ -{ \ - histIter_t baseIter = base.begin(); \ - while(baseIter != base.end()) { \ - if (compare.find(baseIter->first) != compare.end()) { \ - histMemberIter_t baseMemberIter = baseIter->second.begin(); \ - while(baseMemberIter != baseIter->second.end()) { \ - if (compare.at(baseIter->first).find(*baseMemberIter) != compare.at(baseIter->first).end()) { \ - result[baseIter->first].insert(*baseMemberIter); \ - } \ - baseMemberIter++; \ - } \ - } \ - baseIter++; \ - } \ -} - -#define PRETTY_PRINT_LIST(stream, var) \ -{ \ - std::list::const_iterator listIter = var.begin(); \ - std::string sep;\ - while(listIter != var.end()) { \ - stream << sep << *listIter; \ - sep = ", "; \ - listIter++; \ - } \ -} - -#define TRANSITION_TRACE(transList, value) \ -if (_traceTransitions) { \ -for (std::set::iterator transRefIter = transList->transitionRefs.begin(); \ - transRefIter != transList->transitionRefs.end(); \ - transRefIter++) { \ - stream << padding << _prefix << "transitions[" << *transRefIter << "] = "#value"; " << std::endl; \ - } \ -} \ - - -#define DUMP_STATS(disregardTime) \ -uint64_t now = tthread::chrono::system_clock::now(); \ -if (now - _lastTimeStamp > 1000 || disregardTime) { \ - std::cerr << "## State : " << _perfStatesTotal << " [" << _perfStatesProcessed << "/sec]" << std::endl; \ - std::cerr << "## Transition: " << _perfTransTotal << " [" << _perfHistoryProcessed << "/sec]" << std::endl; \ - std::cerr << "## History : " << _perfHistoryTotal << " [" << _perfHistoryProcessed << "/sec]" << std::endl; \ - std::cerr << "toPML: "; \ - std::cerr << _perfStatesTotal << ", " << _perfStatesProcessed << ", "; \ - std::cerr << _perfTransTotal << ", " << _perfTransProcessed << ", "; \ - std::cerr << _perfHistoryTotal << ", " << _perfHistoryProcessed; \ - std::cerr << std::endl << std::endl; \ - _perfTransProcessed = 0; \ - _perfHistoryProcessed = 0; \ - _perfStatesProcessed = 0; \ - if (!disregardTime)\ - _lastTimeStamp = now; \ -} - -namespace uscxml { - -using namespace Arabica::DOM; -using namespace Arabica::XPath; - -Transformer ChartToPromela::transform(const Interpreter& other) { - return boost::shared_ptr(new ChartToPromela(other)); -} - -void ChartToPromela::writeTo(std::ostream& stream) { - writeProgram(stream); -} - - -void PromelaCodeAnalyzer::addCode(const std::string& code, ChartToPromela* interpreter) { - PromelaParser parser(code); -// parser.dump(); - - // find all strings - std::list astNodes; - astNodes.push_back(parser.ast); - - while(astNodes.size() > 0) { - PromelaParserNode* node = astNodes.front(); - astNodes.pop_front(); - -// node->dump(); - - bool hasValue = false; - int assignedValue = 0; - - - switch (node->type) { - case PML_STRING: { - std::string unquoted = node->value; - if (boost::starts_with(unquoted, "'")) { - unquoted = unquoted.substr(1, unquoted.size() - 2); - } - addLiteral(unquoted); - break; - } - case PML_ASGN: - if (node->operands.back()->type == PML_CONST) { - hasValue = true; - if (isInteger(node->operands.back()->value.c_str(), 10)) { - assignedValue = strTo(node->operands.back()->value); - } - } - if (node->operands.back()->type == PML_STRING) { - // remember strings for later - astNodes.push_back(node->operands.back()); - } - if (node->operands.front()->type == PML_CMPND) { - node = node->operands.front(); - } else { - break; - } -// if (node->operands.front()->type != PML_NAME) -// break; // this will skip array assignments - case PML_CMPND: { - std::string nameOfType; - std::list::iterator opIter = node->operands.begin(); - if ((*opIter)->type != PML_NAME) { - node->dump(); - return; - assert(false); - } - - PromelaTypedef* td = &_typeDefs; - std::string seperator; - - while(opIter != node->operands.end()) { - switch ((*opIter)->type) { - case PML_NAME: - td = &td->types[(*opIter)->value]; - td->occurrences.insert(interpreter); - - nameOfType += seperator + (*opIter)->value; - if (nameOfType.compare("_x") == 0) - _usesPlatformVars = true; - seperator = "_"; - td->name = nameOfType + "_t"; - break; - case PML_VAR_ARRAY: { - PromelaParserNode* name = (*opIter)->operands.front(); - PromelaParserNode* subscript = *(++(*opIter)->operands.begin()); - td = &td->types[name->value]; - td->occurrences.insert(interpreter); - - nameOfType += seperator + name->value; - td->name = nameOfType + "_t"; - - if (isInteger(subscript->value.c_str(), 10)) { - td->arraySize = strTo(subscript->value); - } - break; - } - default: - if ((*opIter)->type == PML_CONST) { - // break fall through from ASGN - break; - } -// node->dump(); -// assert(false); - break; - } - - if (nameOfType.compare("_x_states") == 0) { - _usesInPredicate = true; - } - if (nameOfType.compare("_event_type") == 0) { - addLiteral("internal"); - addLiteral("external"); - addLiteral("platform"); - } - if (nameOfType.compare("_event_origintype") == 0) { - addLiteral("http://www.w3.org/TR/scxml/#SCXMLEventProcessor"); - } - opIter++; - } - - if (hasValue) { - if (td->maxValue < assignedValue) - td->maxValue = assignedValue; - if (td->minValue > assignedValue) - td->minValue = assignedValue; - } - - continue; // skip processing nested AST nodes - } - case PML_NAME: { - _typeDefs.types[node->value].occurrences.insert(interpreter); - _typeDefs.types[node->value].minValue = 0; - _typeDefs.types[node->value].maxValue = 0; - // test325 - if (node->value.compare("_ioprocessors") == 0) { - addCode("_ioprocessors.scxml.location", interpreter); - } - - break; - } - - default: -// node->dump(); - break; -// assert(false); - } - - astNodes.insert(astNodes.end(), node->operands.begin(), node->operands.end()); - - } -} - -void PromelaCodeAnalyzer::addEvent(const std::string& eventName) { - if (_events.find(eventName) != _events.end()) - return; - - addLiteral(eventName, _lastEventIndex); - assert(_strIndex.find(eventName) != _strIndex.end()); - - _eventTrie.addWord(eventName); - _events[eventName] = _strIndex[eventName]; - _lastEventIndex++; -} - -void PromelaCodeAnalyzer::addOrigState(const std::string& stateName) { - if (_origStateIndex.find(stateName) == _origStateIndex.end()) { - _origStateIndex[stateName] = _lastStateIndex++; - createMacroName(stateName); - } -} - -void PromelaCodeAnalyzer::addState(const std::string& stateName) { - if (_states.find(stateName) != _states.end()) - return; - - createMacroName(stateName); -} - -void PromelaCodeAnalyzer::addLiteral(const std::string& literal, int forceIndex) { - if (boost::starts_with(literal, "'")) - throw std::runtime_error("Literal " + literal + " passed with quotes"); - - if (_strLiterals.find(literal) != _strLiterals.end()) - return; - - _strLiterals.insert(literal); - createMacroName(literal); - enumerateLiteral(literal, forceIndex); -} - -int PromelaCodeAnalyzer::enumerateLiteral(const std::string& literal, int forceIndex) { - if (forceIndex >= 0) { - _strIndex[literal] = forceIndex; - return forceIndex; - } - - if (_strIndex.find(literal) != _strIndex.end()) - return _strIndex[literal]; - - _strIndex[literal] = _lastStrIndex++; - return _lastStrIndex + 1; -} - -std::string PromelaCodeAnalyzer::createMacroName(const std::string& literal) { - if (_strMacroNames.find(literal) != _strMacroNames.end()) - return _strMacroNames[literal]; - - // find a suitable macro name for the strings - std::string macroName = literal; //literal.substr(1, literal.size() - 2); - - // cannot start with digit - if (isInteger(macroName.substr(0,1).c_str(), 10)) - macroName = "_" + macroName; - - macroName = macroName.substr(0, MAX_MACRO_CHARS); - boost::to_upper(macroName); - - std::string illegalChars = "#\\/:?\"<>| \n\t()[]{}',.-"; - std::string tmp; - std::string::iterator it = macroName.begin(); - while (it < macroName.end()) { - bool found = illegalChars.find(*it) != std::string::npos; - if(found) { - tmp += '_'; - it++; - while(it < macroName.end() && illegalChars.find(*it) != std::string::npos) { - it++; - } - } else { - tmp += *it++; - } - } - macroName = tmp; - if(macroName.length() < 1) - macroName = "_EMPTY_STRING"; - if(macroName.length() < 2 && macroName[0] == '_') - macroName = "_WEIRD_CHARS"; - - unsigned int index = 2; - while (_macroNameSet.find(macroName) != _macroNameSet.end()) { - std::string suffix = toStr(index); - if (macroName.size() > suffix.size()) { - macroName = macroName.substr(0, macroName.size() - suffix.size()) + suffix; - } else { - macroName = suffix; - } - index++; - } - - _macroNameSet.insert(macroName); - _strMacroNames[literal] = macroName; - return macroName; -} - -std::string PromelaCodeAnalyzer::getTypeReset(const std::string& var, const PromelaTypedef& type, const std::string padding) { - std::stringstream assignment; - - std::map::const_iterator typeIter = type.types.begin(); - while(typeIter != type.types.end()) { - const PromelaTypedef& innerType = typeIter->second; - if (innerType.arraySize > 0) { - for (size_t i = 0; i < innerType.arraySize; i++) { - assignment << padding << var << "." << typeIter->first << "[" << i << "] = 0;" << std::endl; - } - } else if (innerType.types.size() > 0) { - assignment << getTypeReset(var + "." + typeIter->first, typeIter->second, padding); - } else { - assignment << padding << var << "." << typeIter->first << " = 0;" << std::endl; - } - typeIter++; - } - return assignment.str(); - -} - -std::string PromelaCodeAnalyzer::getTypeAssignment(const std::string& varTo, const std::string& varFrom, const PromelaTypedef& type, const std::string padding) { - std::stringstream assignment; - - std::map::const_iterator typeIter = type.types.begin(); - while(typeIter != type.types.end()) { - const PromelaTypedef& innerType = typeIter->second; - if (innerType.arraySize > 0) { - for (size_t i = 0; i < innerType.arraySize; i++) { - assignment << padding << varTo << "." << typeIter->first << "[" << i << "] = " << varFrom << "." << typeIter->first << "[" << i << "];" << std::endl; - } - } else if (innerType.types.size() > 0) { - assignment << getTypeAssignment(varTo + "." + typeIter->first, varFrom + "." + typeIter->first, typeIter->second, padding); - } else { - assignment << padding << varTo << "." << typeIter->first << " = " << varFrom << "." << typeIter->first << ";" << std::endl; - } - typeIter++; - } - return assignment.str(); -} - -std::string PromelaCodeAnalyzer::macroForLiteral(const std::string& literal) { - if (boost::starts_with(literal, "'")) - throw std::runtime_error("Literal " + literal + " passed with quotes"); - - if (_strMacroNames.find(literal) == _strMacroNames.end()) - throw std::runtime_error("No macro for literal '" + literal + "' known"); - return _strMacroNames[literal]; -} - -int PromelaCodeAnalyzer::indexForLiteral(const std::string& literal) { - if (boost::starts_with(literal, "'")) - throw std::runtime_error("Literal " + literal + " passed with quotes"); - - if (_strIndex.find(literal) == _strIndex.end()) - throw std::runtime_error("No index for literal " + literal + " known"); - return _strIndex[literal]; -} - -std::string PromelaCodeAnalyzer::adaptCode(const std::string& code, const std::string& prefix) { -// for (std::map::const_iterator litIter = _strMacroNames.begin(); litIter != _strMacroNames.end(); litIter++) { -// boost::replace_all(replaced, "'" + litIter->first + "'", litIter->second); -// } -// boost::replace_all(replaced, "_event", prefix + "_event"); - // replace all variables from analyzer - - std::string processed = code; - std::stringstream processedStr; - std::list > posList; - std::list >::iterator posIter; - size_t lastPos; - - // prepend all identifiers with our prefix - { - PromelaParser parsed(processed); -// parsed.dump(); - posList = getTokenPositions(code, PML_NAME, parsed.ast); - posList.sort(); - posIter = posList.begin(); - lastPos = 0; - - while (posIter != posList.end()) { - processedStr << code.substr(lastPos, posIter->first - lastPos) << prefix; - lastPos = posIter->first; - posIter++; - } - processedStr << processed.substr(lastPos, processed.size() - lastPos); - - processed = processedStr.str(); - processedStr.clear(); - processedStr.str(""); - } - - // replace string literals - { - PromelaParser parsed(processed); - posList = getTokenPositions(code, PML_STRING, parsed.ast); - posList.sort(); - posIter = posList.begin(); - lastPos = 0; - - while (posIter != posList.end()) { - processedStr << processed.substr(lastPos, posIter->first - lastPos); -// std::cout << processed.substr(posIter->first + 1, posIter->second - posIter->first - 2) << std::endl; - assert(_strMacroNames.find(processed.substr(posIter->first + 1, posIter->second - posIter->first - 2)) != _strMacroNames.end()); - processedStr << _strMacroNames[processed.substr(posIter->first + 1, posIter->second - posIter->first - 2)]; - lastPos = posIter->second; - posIter++; - } - processedStr << processed.substr(lastPos, processed.size() - lastPos); - - processed = processedStr.str(); - processedStr.clear(); - processedStr.str(""); - } - - return processed; -} - -//std::string PromelaCodeAnalyzer::prefixIdentifiers(const std::string& expr, const std::string& prefix) { -// PromelaParser parsed(expr); -// std::list posList = getTokenPositions(expr, PML_NAME, parsed.ast); -// posList.sort(); -// -// std::stringstream prefixed; -// std::list::iterator posIter = posList.begin(); -// size_t lastPos = 0; -// while (posIter != posList.end()) { -// prefixed << expr.substr(lastPos, *posIter - lastPos) << prefix; -// lastPos = *posIter; -// posIter++; -// } -// -// prefixed << expr.substr(lastPos, expr.size() - lastPos); -// return prefixed.str(); -//} - -std::list > PromelaCodeAnalyzer::getTokenPositions(const std::string& expr, int type, PromelaParserNode* ast) { - std::list > posList; - if (ast->type == type && ast->loc != NULL) { -// ast->dump(); - if (type == PML_NAME && ast->parent && - ((ast->parent->type == PML_CMPND && ast->parent->operands.front() != ast) || - (ast->parent->parent && ast->parent->type == PML_VAR_ARRAY && ast->parent->parent->type == PML_CMPND))) { - // field in a compound - } else { - if (ast->loc->firstLine == 0) { - posList.push_back(std::make_pair(ast->loc->firstCol, ast->loc->lastCol)); - } else { - int line = ast->loc->firstLine; - size_t lastPos = 0; - while(line > 0) { - lastPos = expr.find_first_of('\n', lastPos + 1); - line--; - } - posList.push_back(std::make_pair(lastPos + ast->loc->firstCol, lastPos + ast->loc->lastCol)); - } - } - } - for (std::list::iterator opIter = ast->operands.begin(); opIter != ast->operands.end(); opIter++) { - std::list > tmp = getTokenPositions(expr, type, *opIter); - posList.insert(posList.end(), tmp.begin(), tmp.end()); - } - return posList; -} - -std::set PromelaCodeAnalyzer::getEventsWithPrefix(const std::string& prefix) { - std::set eventNames; - std::list trieNodes = _eventTrie.getWordsWithPrefix(prefix); - - std::list::iterator trieIter = trieNodes.begin(); - while(trieIter != trieNodes.end()) { - eventNames.insert((*trieIter)->value); - trieIter++; - } - - return eventNames; -} - -ChartToPromela::~ChartToPromela() { - if (_analyzer != NULL) - delete(_analyzer); - for (std::map, ChartToPromela*>::iterator nestedIter = _machines.begin(); nestedIter != _machines.end(); nestedIter++) { - nestedIter->second->_analyzer = NULL; - delete (nestedIter->second); - } -} - - -void ChartToPromela::writeEvents(std::ostream& stream) { - std::map events = _analyzer->getEvents(); - std::map::iterator eventIter = events.begin(); - stream << "/* event name identifiers */" << std::endl; - while(eventIter != events.end()) { - if (eventIter->first.length() > 0) { - stream << "#define " << _analyzer->macroForLiteral(eventIter->first) << " " << _analyzer->indexForLiteral(eventIter->first); - stream << " /* from \"" << eventIter->first << "\" */" << std::endl; - } - eventIter++; - } -} - -void ChartToPromela::writeStates(std::ostream& stream) { - stream << "/* state name identifiers */" << std::endl; - - std::map::iterator stateIter = _activeConf.begin(); - while(stateIter != _activeConf.end()) { - stream << "#define " << "s" << stateIter->second->activeIndex << " " << stateIter->second->activeIndex; - stream << " /* from \"" << stateIter->first << "\" */" << std::endl; - stateIter++; - } - -// for (size_t i = 0; i < _globalConf.size(); i++) { -// stream << "#define " << "s" << i << " " << i; -// stream << " /* from \"" << ATTR_CAST(_globalStates[i], "id") << "\" */" << std::endl; -// } -} - -void ChartToPromela::writeStateMap(std::ostream& stream) { - stream << "/* original state names */" << std::endl; - std::map origStates = _analyzer->getOrigStates(); - for (std::map::iterator origIter = origStates.begin(); origIter != origStates.end(); origIter++) { - stream << "#define " << _analyzer->macroForLiteral(origIter->first) << " " << origIter->second; - stream << " /* from \"" << origIter->first << "\" */" << std::endl; - } - -// std::map states = _analyzer->getStates(); -// size_t stateIndex = 0; -// for (std::map::iterator stateIter = states.begin(); stateIter != states.end(); stateIter++) { -// stream << "_x" -// std::list origStates = _analyzer->getOrigState(stateIter->first); -// size_t origIndex = 0; -// for (std::list::iterator origIter = origStates.begin(); origIter != origStates.end(); origIter++) { -// -// } -// } -} - -void ChartToPromela::writeHistoryArrays(std::ostream& stream) { - std::map >::iterator histNameIter = _historyMembers.begin(); - while(histNameIter != _historyMembers.end()) { - stream << "/* history assignments for " << histNameIter->first << std::endl; - std::map::iterator histMemberIter = histNameIter->second.begin(); - while(histMemberIter != histNameIter->second.end()) { - stream << " " << histMemberIter->second << ": " << histMemberIter->first << std::endl;; - histMemberIter++; - } - stream << "*/" << std::endl; - stream << "bool " << _prefix << "_hist_" << boost::replace_all_copy(boost::to_lower_copy(histNameIter->first), ".", "_") << "[" << histNameIter->second.size() << "];" << std::endl; - - histNameIter++; - } -} - -void ChartToPromela::writeTypeDefs(std::ostream& stream) { - stream << "/* type definitions */" << std::endl; - PromelaCodeAnalyzer::PromelaTypedef typeDefs = _analyzer->getTypes(); - if (typeDefs.types.size() == 0) - return; - - std::list individualDefs; - std::list currDefs; - currDefs.push_back(typeDefs); - - while(currDefs.size() > 0) { - if (std::find(individualDefs.begin(), individualDefs.end(), currDefs.front()) == individualDefs.end()) { - individualDefs.push_back(currDefs.front()); - for (std::map::iterator typeIter = currDefs.front().types.begin(); typeIter != currDefs.front().types.end(); typeIter++) { - currDefs.push_back(typeIter->second); - } - } - currDefs.pop_front(); - } - individualDefs.pop_front(); - - for (std::list::reverse_iterator rIter = individualDefs.rbegin(); rIter != individualDefs.rend(); rIter++) { - PromelaCodeAnalyzer::PromelaTypedef currDef = *rIter; - - if (currDef.types.size() == 0 || currDef.name.size() == 0) - continue; - - stream << "typedef " << currDef.name << " {" << std::endl; - if (currDef.name.compare("_event_t") ==0) { - if (_analyzer->usesEventField("delay")) { - // make sure delay is the first member for sorted enqueuing to work - stream << " int delay;" << std::endl; -#if NEW_DELAY_RESHUFFLE -#else - stream << " int seqNr;" << std::endl; -#endif - } - stream << " int name;" << std::endl; - if (_analyzer->usesEventField("invokeid")) { - stream << " int invokeid;" << std::endl; - } - } - for (std::map::iterator tIter = currDef.types.begin(); tIter != currDef.types.end(); tIter++) { - if (currDef.name.compare("_event_t") == 0 && (tIter->first.compare("name") == 0 || - tIter->first.compare("seqNr") == 0 || - tIter->first.compare("invokeid") == 0 || - tIter->first.compare("delay") == 0)) { // special treatment for _event - continue; - } - if (currDef.name.compare("_x_t") == 0 && tIter->first.compare("states") == 0) { - stream << " bool states[" << _analyzer->getOrigStates().size() << "];" << std::endl; - continue; - } - if (tIter->second.types.size() == 0) { - stream << " " << declForRange(tIter->first, tIter->second.minValue, tIter->second.maxValue, true) << ";" << std::endl; // not further nested -// stream << " int " << tIter->first << ";" << std::endl; // not further nested - } else { - stream << " " << tIter->second.name << " " << tIter->first << ";" << std::endl; - } - } - stream << "};" << std::endl << std::endl; - } - -// stream << "/* typedef instances */" << std::endl; -// PromelaCodeAnalyzer::PromelaTypedef allTypes = _analyzer->getTypes(); -// std::map::iterator typeIter = allTypes.types.begin(); -// while(typeIter != allTypes.types.end()) { -// if (typeIter->second.types.size() > 0) { -// // an actual typedef -// stream << "hidden " << typeIter->second.name << " " << typeIter->first << ";" << std::endl; -// } else { -// stream << "hidden " << declForRange(typeIter->first, typeIter->second.minValue, typeIter->second.maxValue) << ";" << std::endl; -// } -// typeIter++; -// } - -} - -std::string ChartToPromela::declForRange(const std::string& identifier, long minValue, long maxValue, bool nativeOnly) { -// return "int " + identifier; // just for testing - - // we know nothing about this type - if (minValue == 0 && maxValue == 0) - return "int " + identifier; - - if (minValue < 0) { - // only short or int for negatives - if (minValue < -32769 || maxValue > 32767) - return "int " + identifier; - return "short " + identifier; - } - - // type is definitely positive - if (nativeOnly) { - if (maxValue > 32767) - return "int " + identifier; - if (maxValue > 255) - return "short " + identifier; - if (maxValue > 1) - return "byte " + identifier; - return "bool " + identifier; - } else { - return "unsigned " + identifier + " : " + toStr(BIT_WIDTH(maxValue)); - } -} - - -void ChartToPromela::writeInlineComment(std::ostream& stream, const Arabica::DOM::Node& node) { - if (node.getNodeType() != Node_base::COMMENT_NODE) - return; - - std::string comment = node.getNodeValue(); - boost::trim(comment); - if (!boost::starts_with(comment, "#promela-inline")) - return; - - std::stringstream ssLine(comment); - std::string line; - std::getline(ssLine, line); // consume first line - while(std::getline(ssLine, line)) { - if (line.length() == 0) - continue; - stream << line; - } -} - -std::string ChartToPromela::conditionForHistoryTransition(const GlobalTransition* transition) { - FlatStateIdentifier flatSource(transition->source); - FlatStateIdentifier flatTarget(transition->destination); - std::string condition; - - return condition; -} - -std::string ChartToPromela::conditionalizeForHist(GlobalTransition* transition, int indent) { - std::set transitions; - transitions.insert(transition); - return conditionalizeForHist(transitions); -} - -std::string ChartToPromela::conditionalizeForHist(const std::set& transitions, int indent) { - std::stringstream condition; - std::string memberSep; - - std::set > > histSeen; - - for (std::set::const_iterator transIter = transitions.begin(); transIter != transitions.end(); transIter++) { - if ((*transIter)->histTargets.size() == 0) // there are no history transitions in here! - continue; - - std::map > relevantHist; - std::map > currentHist; - FlatStateIdentifier flatSource((*transIter)->source); - currentHist = flatSource.getHistory(); - - std::set::iterator histTargetIter = (*transIter)->histTargets.begin(); - while(histTargetIter != (*transIter)->histTargets.end()) { - if (currentHist.find(*histTargetIter) != currentHist.end()) { - relevantHist[*histTargetIter] = currentHist[*histTargetIter]; - } - histTargetIter++; - } - if (relevantHist.size() == 0) - continue; - - if (histSeen.find(relevantHist) != histSeen.end()) - continue; - histSeen.insert(relevantHist); - - std::string itemSep; - std::map >::iterator relevanthistIter = relevantHist.begin(); - - if (relevantHist.size() > 0) - condition << memberSep; - - while(relevanthistIter != relevantHist.end()) { - std::list::iterator histItemIter = relevanthistIter->second.begin(); - while(histItemIter != relevanthistIter->second.end()) { - assert(_historyMembers.find(relevanthistIter->first) != _historyMembers.end()); - assert(_historyMembers[relevanthistIter->first].find(*histItemIter) != _historyMembers[relevanthistIter->first].end()); - condition << itemSep << _prefix << "_hist_" << boost::to_lower_copy(_analyzer->macroForLiteral(relevanthistIter->first)) << "[" << _historyMembers[relevanthistIter->first][*histItemIter] << "]"; - itemSep = " && "; - histItemIter++; - } - relevanthistIter++; - } - - if (relevantHist.size() > 0) - memberSep = " || "; - - } - if (condition.str().size() > 0) { - return "(" + condition.str() + ")"; - } else { - assert(false); - } - return "true"; -} - -//std::list ChartToPromela::getTransientContent(GlobalTransition* transition) { -// std::list content; -// GlobalTransition* currTrans = transition; -// for (;;) { -// if (!HAS_ATTR(currState, "transient") || !DOMUtils::attributeIsTrue(ATTR(currState, "transient"))) -// break; -// content.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", currState)); -// content.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "onentry", currState)); -// content.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "onexit", currState)); -// NodeSet transitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", currState); -// currState = _globalConf[ATTR_CAST(transitions[0], "target")]; -// } -// -// return content; -//} - -void ChartToPromela::writeTransition(std::ostream& stream, GlobalTransition* transition, int indent) { - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - std::list::const_iterator histIter; - - if (envVarIsTrue("USCXML_ANNOTATE_NOCOMMENT")) { - stream << std::endl << _prefix << "t" << transition->index << ": /* ######################## */ " << std::endl; - - } else { - - stream << std::endl << _prefix << "t" << transition->index << ": /* ######################## " << std::endl; - FlatStateIdentifier flatActiveSource(transition->source); - stream << " from state: "; - PRETTY_PRINT_LIST(stream, flatActiveSource.getActive()); - stream << std::endl; - // stream << " with history: " << flatActiveSource.getFlatHistory() << std::endl; - stream << " ----- on event: " << (transition->eventDesc.size() > 0 ? transition->eventDesc : "SPONTANEOUS") << " --" << std::endl; - stream << " to state: "; - std::set destinations; - destinations.insert(FlatStateIdentifier(transition->destination)); - histIter = transition->historyTrans.begin(); - while(histIter != transition->historyTrans.end()) { - destinations.insert(FlatStateIdentifier((*histIter)->destination)); - histIter++; - } - std::string seperator = ""; - for (std::set::iterator destIter = destinations.begin(); destIter != destinations.end(); destIter++) { - stream << seperator; - PRETTY_PRINT_LIST(stream, destIter->getActive()); - stream << " with " << (destIter->getFlatHistory().size() > 0 ? destIter->getFlatHistory() : "no history"); - seperator = "\n "; - } - stream << std::endl; - - stream << "############################### */" << std::endl; - } - stream << std::endl; - stream << padding << "skip;" << std::endl; - stream << padding << "d_step {" << std::endl; - if (_writeTransitionPrintfs) - stream << padding << " printf(\"Taking Transition " << _prefix << "t" << transition->index << "\\n\");" << std::endl; - - padding += " "; - indent++; - - // iterators of history transitions executable content - std::map > actionIters; - std::map > actionsInTransition; - - typedef std::map > actionIters_t; - - histIter = transition->historyTrans.begin(); - while(histIter != transition->historyTrans.end()) { - actionIters.insert(std::make_pair((*histIter), std::make_pair((*histIter)->actions.begin(), (*histIter)->actions.end()))); - // add history transitions actions to the set - for (std::list::iterator actionIter = (*histIter)->actions.begin(); actionIter != (*histIter)->actions.end(); actionIter++) { - actionsInTransition[*histIter].insert(*actionIter); - } -// std::copy((*histIter)->actions.begin(), (*histIter)->actions.end(), std::inserter(actionsInTransition[*histIter], actionsInTransition[*histIter].begin())); - histIter++; - } -// std::cout << "###" << std::endl; - for (std::list::iterator actionIter = transition->actions.begin(); actionIter != transition->actions.end(); actionIter++) { - actionsInTransition[transition].insert(*actionIter); - } -// std::copy(transition->actions.begin(), transition->actions.end(), std::inserter(actionsInTransition[transition], actionsInTransition[transition].begin())); - - -// GlobalTransition::Action action; - std::set allBut; - std::list ecSeq; - - for (std::list::const_iterator actionIter = transition->actions.begin(); actionIter != transition->actions.end(); actionIter++) { - // for every executable content in base transition - const GlobalTransition::Action& baseAction = *actionIter; - allBut.clear(); - - for (actionIters_t::iterator histActionIter = actionIters.begin(); histActionIter != actionIters.end(); histActionIter++) { - // iterate every history transition - GlobalTransition* histTrans = histActionIter->first; - if (histActionIter->second.first == histActionIter->second.second) // TODO: is this correct? - continue; - GlobalTransition::Action& histAction = *(histActionIter->second.first); - - // is the current action identical or a generated raise for done.state.ID? -// std::cerr << baseAction << std::endl; -// std::cerr << histAction << std::endl; - if (baseAction != histAction && !baseAction.raiseDone) { -// std::cout << baseAction << std::endl; -// std::cout << histAction << std::endl; - - // executable content differs - will given executable content appear later in history? - if (actionsInTransition[histTrans].find(baseAction) != actionsInTransition[histTrans].end()) { - // yes -> write all exec content exclusive to this history transition until base executable content - while(baseAction != *(histActionIter->second.first)) { - histAction = *(histActionIter->second.first); - ecSeq.push_back(ExecContentSeqItem(ExecContentSeqItem::EXEC_CONTENT_ONLY_FOR, histTrans, histAction)); - actionsInTransition[histTrans].erase(histAction); - histActionIter->second.first++; - } - } else { - // no -> exclude this history transition - allBut.insert(histTrans); - } - } else { - // that's great, they are equal, just increase iterator - histActionIter->second.first++; - } - } - - if (allBut.empty()) { - // everyone has the current actionIter one behind the base action - ecSeq.push_back(ExecContentSeqItem(ExecContentSeqItem::EXEC_CONTENT_EVERY, NULL, baseAction)); - } else { - // everyone but some have this content - ecSeq.push_back(ExecContentSeqItem(ExecContentSeqItem::EXEC_CONTENT_ALL_BUT, allBut, baseAction)); - } - } - - // see what remains in history transitions and add as exclusive - for (actionIters_t::iterator histActionIter = actionIters.begin(); histActionIter != actionIters.end(); histActionIter++) { - GlobalTransition* histTrans = histActionIter->first; - - while(histActionIter->second.first != histActionIter->second.second) { - GlobalTransition::Action& histAction = *(histActionIter->second.first); - ecSeq.push_back(ExecContentSeqItem(ExecContentSeqItem::EXEC_CONTENT_ONLY_FOR, histTrans, histAction)); - histActionIter->second.first++; - } - } - - bool isConditionalized = false; - bool wroteHistoryAssignments = false; - - for (std::list::const_iterator ecIter = ecSeq.begin(); ecIter != ecSeq.end(); ecIter++) { - const GlobalTransition::Action& action = ecIter->action; - - if (action.exited) { - // first onexit handler writes history assignments - if (!wroteHistoryAssignments) { - writeHistoryAssignments(stream, transition, indent); - wroteHistoryAssignments = true; - } - } - - if (!_analyzer->usesInPredicate() && (action.entered || action.exited)) { - continue; - } - - if (!isConditionalized && ecIter->type == ExecContentSeqItem::EXEC_CONTENT_ONLY_FOR) { -// assert(!wroteHistoryAssignments); // we need to move assignments after dispatching? - stream << padding << "if" << std::endl; - stream << padding << ":: " << conditionalizeForHist(ecIter->transitions) << " -> {" << std::endl; - padding += " "; - indent++; - isConditionalized = true; - } else if (!isConditionalized && ecIter->type == ExecContentSeqItem::EXEC_CONTENT_ALL_BUT) { -// assert(!wroteHistoryAssignments); // we need to move assignments after dispatching? - stream << padding << "if" << std::endl; - stream << padding << ":: " << conditionalizeForHist(ecIter->transitions) << " -> skip;" << std::endl; - stream << padding << ":: else -> {" << std::endl; - padding += " "; - indent++; - isConditionalized = true; - } - -#if 0 - switch (ecIter->type) { - case ExecContentSeqItem::EXEC_CONTENT_ALL_BUT: - std::cout << "ALL_BUT" << std::endl; - break; - case ExecContentSeqItem::EXEC_CONTENT_EVERY: - std::cout << "EVERY" << std::endl; - break; - case ExecContentSeqItem::EXEC_CONTENT_ONLY_FOR: - std::cout << "ONLY_FOR" << std::endl; - break; - - default: - break; - } -#endif - - if (action.exited) { - // we left a state - stream << padding << _prefix << "_x.states[" << _analyzer->macroForLiteral(ATTR(action.exited, "id")) << "] = false; " << std::endl; -// continue; - } - - if (action.entered) { - // we entered a state - stream << padding << _prefix << "_x.states[" << _analyzer->macroForLiteral(ATTR(action.entered, "id")) << "] = true; " << std::endl; -// continue; - } - - if (action.transition) { - // this is executable content from a transition - stream << "/* executable content for transition */" << std::endl; - writeExecutableContent(stream, action.transition, indent); -// continue; - } - - if (action.onExit) { -// std::cout<< action.onExit << std::endl; - // executable content from an onexit element - if (action.onExit.getParentNode()) // this should not be necessary? - stream << "/* executable content for exiting state " << ATTR_CAST(action.onExit.getParentNode(), "id") << " */" << std::endl; - writeExecutableContent(stream, action.onExit, indent); -// continue; - } - - if (action.onEntry) { - // executable content from an onentry element - if (action.onEntry.getParentNode()) // this should not be necessary? - stream << "/* executable content for entering state " << ATTR_CAST(action.onEntry.getParentNode(), "id") << " */" << std::endl; - writeExecutableContent(stream, action.onEntry, indent); -// continue; - } - - if (action.raiseDone) { - // executable content from an onentry element - if (action.raiseDone.getParentNode()) // this should not be necessary? - stream << "/* raising done event for " << ATTR_CAST(action.raiseDone.getParentNode(), "id") << " */" << std::endl; - writeExecutableContent(stream, action.raiseDone, indent); - // continue; - } - - if (action.invoke) { - // an invoke element - - if (_machines.find(action.invoke) != _machines.end()) { - stream << padding << _prefix << "start!" << _analyzer->macroForLiteral(_machines[action.invoke]->_invokerid) << ";" << std::endl; - } else { - if (HAS_ATTR_CAST(action.invoke, "id")) { - stream << padding << _prefix << ATTR_CAST(action.invoke, "id") << "Running = true;" << std::endl; - } - } - - } - - if (action.uninvoke) { - if (_machines.find(action.uninvoke) != _machines.end()) { - stream << padding << "do" << std::endl; - stream << padding << ":: " << _prefix << "start??" << _analyzer->macroForLiteral(_machines[action.uninvoke]->_invokerid) << " -> skip" << std::endl; - stream << padding << ":: else -> break;" << std::endl; - stream << padding << "od" << std::endl; - - stream << padding << _machines[action.uninvoke]->_prefix << "canceled = true;" << std::endl; - if (_analyzer->usesEventField("delay")) { - stream << padding << "removePendingEventsForInvoker(" << _analyzer->macroForLiteral(_machines[action.uninvoke]->_invokerid) << ");" << std::endl; - } - } else { - if (HAS_ATTR_CAST(action.uninvoke, "id")) { - stream << padding << _prefix << ATTR_CAST(action.uninvoke, "id") << "Running = false;" << std::endl; - } - } - } - - if (isConditionalized) { - // peek into next content and see if same conditions apply -> keep conditionalization - bool sameCondition = false; - std::list::const_iterator nextIter = ecIter; - nextIter++; - if (nextIter != ecSeq.end() && ecIter->type == nextIter->type && ecIter->transitions == nextIter->transitions) { - sameCondition = true; - } - - if (!sameCondition) { - padding = padding.substr(2); - indent--; - - if (ecIter->type == ExecContentSeqItem::EXEC_CONTENT_ALL_BUT) { - stream << padding << "}" << std::endl; - stream << padding << "fi" << std::endl << std::endl; - } else if(ecIter->type == ExecContentSeqItem::EXEC_CONTENT_ONLY_FOR) { - stream << padding << "}" << std::endl; - stream << padding << ":: else -> skip;" << std::endl; - stream << padding << "fi;" << std::endl << std::endl; - } - isConditionalized = false; - } - } - } - - if (!wroteHistoryAssignments) { - writeHistoryAssignments(stream, transition, indent); - wroteHistoryAssignments = true; - } - - // write new state assignment and goto dispatching - GlobalState* origNewState = NULL; - - // sort history transitions by new active state - std::map > histTargets; - histIter = transition->historyTrans.begin(); - while(histIter != transition->historyTrans.end()) { - origNewState = _activeConf[(*histIter)->activeDestination]; - assert(origNewState != NULL); - histTargets[origNewState].insert(*histIter); - histIter++; - } - - origNewState = _activeConf[transition->activeDestination]; - bool hasHistoryTarget = false; - - for (std::map >::const_iterator histTargetIter = histTargets.begin(); histTargetIter != histTargets.end(); histTargetIter++) { - GlobalState* histNewState = histTargetIter->first; - if (histNewState == origNewState) - continue; - stream << padding << "if" << std::endl; - - if (!envVarIsTrue("USCXML_ANNOTATE_NOCOMMENT")) { - stream << "/* to state "; - FlatStateIdentifier flatActiveDest(histNewState->activeId); - PRETTY_PRINT_LIST(stream, flatActiveDest.getActive()); - stream << " via history */" << std::endl; - } - - stream << padding << ":: " << conditionalizeForHist(histTargetIter->second) << " -> " << _prefix << "s = s" << histNewState->activeIndex << ";" << std::endl; -// writeTransitionClosure(stream, *histTargetIter->second.begin(), histNewState, indent + 1); // is this correct for everyone in set? - - - hasHistoryTarget = true; - } - - origNewState = _activeConf[transition->activeDestination]; - FlatStateIdentifier flatActiveDest(transition->activeDestination); - assert(origNewState != NULL); - - if (!envVarIsTrue("USCXML_ANNOTATE_NOCOMMENT")) { - stream << "/* to state "; - PRETTY_PRINT_LIST(stream, flatActiveDest.getActive()); - stream << " */" << std::endl; - } - if (hasHistoryTarget) { - stream << padding << ":: else -> "; - padding += " "; - indent++; - } - - stream << padding << _prefix << "s = s" << origNewState->activeIndex << ";" << std::endl; - - - if (hasHistoryTarget) { - padding = padding.substr(2); - indent--; -// stream << padding << "}" << std::endl; - stream << padding << "fi;" << std::endl; - } - - TRANSITION_TRACE(transition, false); - - padding = padding.substr(2); - stream << padding << "}" << std::endl; - - // moved up here for goto from d_step - writeTransitionClosure(stream, transition, origNewState, indent-1); - - _perfTransProcessed++; - _perfTransTotal++; - - DUMP_STATS(false); - -} - -void ChartToPromela::writeHistoryAssignments(std::ostream& stream, GlobalTransition* transition, int indent) { - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - - if (transition->historyTrans.size() == 0) - return; - - // GlobalState to *changed* history configuration - std::list histClasses; - - std::set allTrans; - allTrans.insert(transition); - allTrans.insert(transition->historyTrans.begin(), transition->historyTrans.end()); - - // iterate all transitions - std::set::iterator transIter = allTrans.begin(); - while(transIter != allTrans.end()) { - histClasses.push_back(HistoryTransitionClass(*transIter)); - transIter++; - } - - // nothing to do here - if (histClasses.size() == 0) - return; - -// std::cout << histClasses.size() << " / "; - - // now sort into equivalence classes - std::list::iterator outerHistClassIter = histClasses.begin(); - std::list::iterator innerHistClassIter = histClasses.begin(); - while(outerHistClassIter != histClasses.end()) { - HistoryTransitionClass& outerClass = *outerHistClassIter; - - // iterate inner iter for every outer iter and see if we can merge - innerHistClassIter = outerHistClassIter; - innerHistClassIter++; - - while(innerHistClassIter != histClasses.end()) { - // can we merge the inner class into the outer one? - HistoryTransitionClass& innerClass = *innerHistClassIter; - - if (outerClass.matches(innerClass)) { - outerClass.merge(innerClass); - histClasses.erase(innerHistClassIter++); - } else { - innerHistClassIter++; - } - } - - _perfHistoryProcessed++; - _perfHistoryTotal++; - - outerHistClassIter++; - } -// std::cout << histClasses.size() << std::endl; - - bool preambelWritten = false; - std::list::iterator histClassIter = histClasses.begin(); - std::list::iterator defaultHistClassIter = histClasses.end(); - size_t nrMembers = 0; - while(histClassIter != histClasses.end() || defaultHistClassIter != histClasses.end()) { - - // remember iterator position with default transition - if (histClassIter == histClasses.end() && defaultHistClassIter != histClasses.end()) { - histClassIter = defaultHistClassIter; - } else if (histClassIter->members.find(transition) != histClassIter->members.end()) { - defaultHistClassIter = histClassIter; - histClassIter++; - continue; - } - - nrMembers += histClassIter->members.size(); - - if (!preambelWritten && histClasses.size() > 1) { - stream << padding << "if" << std::endl; - preambelWritten = true; - } - - if (histClasses.size() > 1) { - stream << padding << "::" << conditionalizeForHist(histClassIter->members) << " {" << std::endl; - } - - { - std::map >::iterator forgetIter = histClassIter->toForget.begin(); - while(forgetIter != histClassIter->toForget.end()) { - std::set::iterator forgetMemberIter = forgetIter->second.begin(); - while(forgetMemberIter != forgetIter->second.end()) { - stream << padding << _prefix << "_hist_" << boost::to_lower_copy(_analyzer->macroForLiteral(forgetIter->first)); - stream << "[" << _historyMembers[forgetIter->first][*forgetMemberIter] << "] = 0;"; - stream << " \t/* " << *forgetMemberIter << " */" << std::endl; - forgetMemberIter++; - } - forgetIter++; - } - } - - { - std::map >::iterator rememberIter = histClassIter->toRemember.begin(); - while(rememberIter != histClassIter->toRemember.end()) { - std::set::iterator rememberMemberIter = rememberIter->second.begin(); - while(rememberMemberIter != rememberIter->second.end()) { - stream << padding << _prefix << "_hist_" << boost::to_lower_copy(_analyzer->macroForLiteral(rememberIter->first)); - stream << "[" << _historyMembers[rememberIter->first][*rememberMemberIter] << "] = 1;"; - stream << " \t/* " << *rememberMemberIter << " */" << std::endl; - rememberMemberIter++; - } - rememberIter++; - } - } - - if (histClasses.size() > 1) { - stream << padding << "}" << std::endl; - } - - if (histClassIter == defaultHistClassIter) { - break; - } - - histClassIter++; - } - assert(nrMembers == allTrans.size()); - -} - -HistoryTransitionClass::HistoryTransitionClass(GlobalTransition* transition) { - members.insert(transition); - init(transition->source, transition->destination); -} - -HistoryTransitionClass::HistoryTransitionClass(const std::string& from, const std::string& to) { - init(from, to); -} - -void HistoryTransitionClass::init(const std::string& from, const std::string& to) { - if (from == to) - return; - - FlatStateIdentifier flatSource(from); - FlatStateIdentifier flatTarget(to); - - std::map > activeBefore = flatSource.getHistorySets(); - std::map > activeAfter = flatTarget.getHistorySets(); - - std::map >::const_iterator targetHistIter = activeAfter.begin(); - while(targetHistIter != activeAfter.end()) { - // for every history state in target, see if it existed in source - if (activeBefore.find(targetHistIter->first) == activeBefore.end()) { - // this target history did not exist source -> every item is changed - std::set::const_iterator histMemberIter = activeAfter.at(targetHistIter->first).begin(); - while(histMemberIter != activeAfter.at(targetHistIter->first).end()) { - toRemember[targetHistIter->first].insert(*histMemberIter); - histMemberIter++; - } - } else { - // this target *did* already exist, but was it equally assigned? - std::set::const_iterator sourceHistMemberIter = activeBefore.at(targetHistIter->first).begin(); - while(sourceHistMemberIter != activeBefore.at(targetHistIter->first).end()) { - // iterate every item in source and try to find it in target - if (targetHistIter->second.find(*sourceHistMemberIter) == targetHistIter->second.end()) { - // no, source is no longer in target - toForget[targetHistIter->first].insert(*sourceHistMemberIter); - } else { - toKeep[targetHistIter->first].insert(*sourceHistMemberIter); - } - sourceHistMemberIter++; - } - - std::set::const_iterator targetHistMemberIter = activeAfter.at(targetHistIter->first).begin(); - while(targetHistMemberIter != activeAfter.at(targetHistIter->first).end()) { - // iterate member of target history and see if it is new - if (activeBefore.at(targetHistIter->first).find(*targetHistMemberIter) == activeBefore.at(targetHistIter->first).end()) { - // not found -> new assignment - toRemember[targetHistIter->first].insert(*targetHistMemberIter); - } - targetHistMemberIter++; - } - } - targetHistIter++; - } -} - -bool HistoryTransitionClass::matches(const HistoryTransitionClass& other) { - - /* does the given transition match this one?: - 1. everything remembered has to be remembered as well or already enabled - 2. everything forgot has to be forgotten as well or already disabled - and vice versa - */ - - std::map > tmp; - - typedef std::map >::const_iterator histIter_t; - typedef std::set::const_iterator histMemberIter_t; - - // we will remember these - will the other try to forget them? - INTERSECT_MAPS(toRemember, other.toForget, tmp); - if (tmp.size() > 0) - return false; - - // we will keep these - will the other try to forget them? - INTERSECT_MAPS(toKeep, other.toForget, tmp); - if (tmp.size() > 0) - return false; - - // we will forget these - will the other try to keep or even remember? - INTERSECT_MAPS(toForget, other.toKeep, tmp); - if (tmp.size() > 0) - return false; - INTERSECT_MAPS(toForget, other.toRemember, tmp); - if (tmp.size() > 0) - return false; - - return true; -} - -void HistoryTransitionClass::merge(const HistoryTransitionClass& other) { - members.insert(other.members.begin(), other.members.end()); - - std::map >::const_iterator histIter; - - histIter = other.toRemember.begin(); - while(histIter != other.toRemember.end()) { - toRemember[histIter->first].insert(histIter->second.begin(), histIter->second.end()); - histIter++; - } - - histIter = other.toForget.begin(); - while(histIter != other.toForget.end()) { - toForget[histIter->first].insert(histIter->second.begin(), histIter->second.end()); - histIter++; - } - - histIter = other.toKeep.begin(); - while(histIter != other.toKeep.end()) { - toKeep[histIter->first].insert(histIter->second.begin(), histIter->second.end()); - histIter++; - } - -} - -void ChartToPromela::writeTransitionClosure(std::ostream& stream, GlobalTransition* transition, GlobalState* state, int indent) { - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - -// if (_traceTransitions) { -// for (std::set::iterator transRefIter = transition->transitionRefs.begin(); transRefIter != transition->transitionRefs.end(); transRefIter++) { -// stream << padding << _prefix << "transitions[" << *transRefIter << "] = false; " << std::endl; -// } -// } - - if (state->isFinal) { - stream << padding << "goto " << _prefix << "terminate;" << std::endl; - } else { - if (!transition->isEventless) { - stream << padding << _prefix << "spontaneous = true;" << std::endl; - } - stream << padding << "goto " << _prefix << "microStep;" << std::endl; - } -} - -void ChartToPromela::writeExecutableContent(std::ostream& stream, const Arabica::DOM::Node& node, int indent) { - if (!node) - return; - - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - - if (node.getNodeType() == Node_base::TEXT_NODE) { - if (boost::trim_copy(node.getNodeValue()).length() > 0) - stream << beautifyIndentation(ADAPT_SRC(node.getNodeValue()), indent) << std::endl; - } - - if (node.getNodeType() != Node_base::ELEMENT_NODE) - return; // skip anything not an element - - Arabica::DOM::Element nodeElem = Arabica::DOM::Element(node); - - if (false) { - } else if(TAGNAME(nodeElem) == "onentry" || TAGNAME(nodeElem) == "onexit" || TAGNAME(nodeElem) == "transition" || TAGNAME(nodeElem) == "finalize") { - // descent into childs and write their contents - Arabica::DOM::Node child = node.getFirstChild(); - while(child) { - writeExecutableContent(stream, child, indent); - child = child.getNextSibling(); - } - } else if(TAGNAME(nodeElem) == "script") { - NodeSet scriptText = DOMUtils::filterChildType(Node_base::TEXT_NODE, node, true); - for (size_t i = 0; i < scriptText.size(); i++) { - stream << ADAPT_SRC(beautifyIndentation(scriptText[i].getNodeValue(), indent)) << std::endl; - } - - } else if(TAGNAME(nodeElem) == "log") { - std::string label = (HAS_ATTR(nodeElem, "label") ? ATTR(nodeElem, "label") : ""); - std::string expr = (HAS_ATTR(nodeElem, "expr") ? ADAPT_SRC(ATTR(nodeElem, "expr")) : ""); - std::string trimmedExpr = boost::trim_copy(expr); - bool isStringLiteral = (boost::starts_with(trimmedExpr, "\"") || boost::starts_with(trimmedExpr, "'")); - - std::string formatString; - std::string varString; - std::string seperator; - - if (label.size() > 0) { - if (expr.size() > 0) { - formatString += label + ": "; - } else { - formatString += label; - } - } - - if (isStringLiteral) { - formatString += expr; - } else if (expr.size() > 0) { - formatString += "%d"; - varString += seperator + expr; - } - - if (varString.length() > 0) { - stream << padding << "printf(\"" + formatString + "\", " + varString + ");" << std::endl; - } else { - stream << padding << "printf(\"" + formatString + "\");" << std::endl; - } - - } else if(TAGNAME(nodeElem) == "foreach") { - stream << padding << "for (" << _prefix << (HAS_ATTR(nodeElem, "index") ? ATTR(nodeElem, "index") : "_index") << " in " << _prefix << ATTR(nodeElem, "array") << ") {" << std::endl; - if (HAS_ATTR(nodeElem, "item")) { - stream << padding << " " << _prefix << ATTR(nodeElem, "item") << " = " << _prefix << ATTR(nodeElem, "array") << "[" << _prefix << (HAS_ATTR(nodeElem, "index") ? ATTR(nodeElem, "index") : "_index") << "];" << std::endl; - } - Arabica::DOM::Node child = node.getFirstChild(); - while(child) { - writeExecutableContent(stream, child, indent + 1); - child = child.getNextSibling(); - } -// if (HAS_ATTR(nodeElem, "index")) -// stream << padding << " " << _prefix << ATTR(nodeElem, "index") << "++;" << std::endl; - stream << padding << "}" << std::endl; - - } else if(TAGNAME(nodeElem) == "if") { - NodeSet condChain; - condChain.push_back(node); - condChain.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "elseif", node)); - condChain.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "else", node)); - - writeIfBlock(stream, condChain, indent); - - } else if(TAGNAME(nodeElem) == "assign") { - NodeSet assignTexts = DOMUtils::filterChildType(Node_base::TEXT_NODE, nodeElem, true); - assert(assignTexts.size() > 0); - stream << beautifyIndentation(ADAPT_SRC(boost::trim_copy(assignTexts[0].getNodeValue())), indent) << std::endl; - - } else if(TAGNAME(nodeElem) == "send" || TAGNAME(nodeElem) == "raise") { - std::string targetQueue; - std::string insertOp = "!"; - if (TAGNAME(nodeElem) == "raise") { - targetQueue = _prefix + "iQ"; - } else if (!HAS_ATTR(nodeElem, "target")) { - if (_allowEventInterleaving) { - targetQueue = _prefix + "tmpQ"; - } else { - targetQueue = _prefix + "eQ"; - } - } else if (ATTR(nodeElem, "target").compare("#_internal") == 0) { - targetQueue = _prefix + "iQ"; - } else if (ATTR(nodeElem, "target").compare("#_parent") == 0) { - targetQueue = _parent->_prefix + "eQ"; - } else if (boost::starts_with(ATTR(nodeElem, "target"), "#_") && _machinesPerId.find(ATTR(nodeElem, "target").substr(2)) != _machinesPerId.end()) { - targetQueue = _machines[_machinesPerId[ATTR(nodeElem, "target").substr(2)]]->_prefix + "eQ"; - } - if (targetQueue.length() > 0) { - // this is for our external queue - std::string event; - - if (HAS_ATTR(nodeElem, "event")) { - event = _analyzer->macroForLiteral(ATTR(nodeElem, "event")); - } else if (HAS_ATTR(nodeElem, "eventexpr")) { - event = ADAPT_SRC(ATTR(nodeElem, "eventexpr")); - } - if (_analyzer->usesComplexEventStruct()) { - stream << padding << "{" << std::endl; - std::string typeReset = _analyzer->getTypeReset("tmpE", _analyzer->getType("_event"), padding + " "); - std::stringstream typeAssignSS; - typeAssignSS << padding << " tmpE.name = " << event << ";" << std::endl; - - if (HAS_ATTR(nodeElem, "idlocation")) { - typeAssignSS << padding << " /* idlocation */" << std::endl; - typeAssignSS << padding << " _lastSendId = _lastSendId + 1;" << std::endl; - typeAssignSS << padding << " " << _prefix << ATTR(nodeElem, "idlocation") << " = _lastSendId;" << std::endl; - typeAssignSS << padding << " tmpE.sendid = _lastSendId;" << std::endl; - typeAssignSS << padding << " if" << std::endl; - typeAssignSS << padding << " :: _lastSendId == 2147483647 -> _lastSendId = 0;" << std::endl; - typeAssignSS << padding << " :: else -> skip;" << std::endl; - typeAssignSS << padding << " fi;" << std::endl; - } else if (HAS_ATTR(nodeElem, "id")) { - typeAssignSS << padding << " tmpE.sendid = " << _analyzer->macroForLiteral(ATTR(nodeElem, "id")) << ";" << std::endl; - } - - if (_invokerid.length() > 0) { // do not send invokeid if we send / raise to ourself - typeAssignSS << padding << " tmpE.invokeid = " << _analyzer->macroForLiteral(_invokerid) << ";" << std::endl; - } - - if (_analyzer->usesEventField("origintype") && !boost::ends_with(targetQueue, "iQ")) { - typeAssignSS << padding << " tmpE.origintype = " << _analyzer->macroForLiteral("http://www.w3.org/TR/scxml/#SCXMLEventProcessor") << ";" << std::endl; - } - - if (_analyzer->usesEventField("delay")) { -#if NEW_DELAY_RESHUFFLE -#else - insertOp += "!"; - typeAssignSS << padding << " _lastSeqId = _lastSeqId + 1;" << std::endl; -#endif - if (HAS_ATTR_CAST(nodeElem, "delay")) { - typeAssignSS << padding << " tmpE.delay = " << ATTR_CAST(nodeElem, "delay") << ";" << std::endl; - } else if (HAS_ATTR_CAST(nodeElem, "delayexpr")) { - typeAssignSS << padding << " tmpE.delay = " << ADAPT_SRC(ATTR_CAST(nodeElem, "delayexpr")) << ";" << std::endl; - } else { - typeAssignSS << padding << " tmpE.delay = 0;" << std::endl; - } -#if NEW_DELAY_RESHUFFLE -#else - typeAssignSS << padding << " tmpE.seqNr = _lastSeqId;" << std::endl; -#endif - } - - if (_analyzer->usesEventField("type")) { - std::string eventType = (targetQueue.compare("iQ!") == 0 ? _analyzer->macroForLiteral("internal") : _analyzer->macroForLiteral("external")); - typeAssignSS << padding << " tmpE.type = " << eventType << ";" << std::endl; - } - - NodeSet sendParams = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "param", nodeElem); - NodeSet sendContents = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", nodeElem); - std::string sendNameList = ATTR(nodeElem, "namelist"); - if (sendParams.size() > 0) { - for (size_t i = 0; i < sendParams.size(); i++) { - Element paramElem = Element(sendParams[i]); - typeAssignSS << padding << " tmpE.data." << ATTR(paramElem, "name") << " = " << ADAPT_SRC(ATTR(paramElem, "expr")) << ";" << std::endl; - } - } - if (sendNameList.size() > 0) { - std::list nameListIds = tokenize(sendNameList); - std::list::iterator nameIter = nameListIds.begin(); - while(nameIter != nameListIds.end()) { - typeAssignSS << padding << " tmpE.data." << *nameIter << " = " << ADAPT_SRC(*nameIter) << ";" << std::endl; - nameIter++; - } - } - - if (sendParams.size() == 0 && sendNameList.size() == 0 && sendContents.size() > 0) { - Element contentElem = Element(sendContents[0]); - if (contentElem.hasChildNodes() && contentElem.getFirstChild().getNodeType() == Node_base::TEXT_NODE) { - std::string content = spaceNormalize(contentElem.getFirstChild().getNodeValue()); - if (!isNumeric(content.c_str(), 10)) { - typeAssignSS << padding << " tmpE.data = " << _analyzer->macroForLiteral(content) << ";" << std::endl; - } else { - typeAssignSS << padding << " tmpE.data = " << content << ";" << std::endl; - } - } else if (HAS_ATTR(contentElem, "expr")) { - typeAssignSS << padding << " tmpE.data = " << ADAPT_SRC(ATTR(contentElem, "expr")) << ";" << std::endl; - } - } - - // remove all fields from typeReset that are indeed set by typeAssign -// for (std::string assigned; std::getline(typeAssignSS, assigned); ) { -// assigned = assigned.substr(0, assigned.find('=')); -// assigned = assigned.substr(assigned.find('.')); -// std::istringstream typeResetSS (typeReset); -// for (std::string reset; std::getline(typeResetSS, reset); ) { -// if (!boost::find_first(reset, assigned)) { -// stream << reset << std::endl; -// } -// } -// } -// stream << typeAssignSS.str(); - - std::istringstream typeResetSS (typeReset); - for (std::string reset; std::getline(typeResetSS, reset); ) { - std::string resetField = reset.substr(0, reset.find('=')); - resetField = resetField.substr(resetField.find('.')); - for (std::string assigned; std::getline(typeAssignSS, assigned); ) { - if (boost::find_first(resetField, assigned)) { - break; - } - } - stream << reset << std::endl; - } - stream << typeAssignSS.str(); - - - stream << padding << " " << targetQueue << insertOp <<"tmpE;" << std::endl; - -#if NEW_DELAY_RESHUFFLE - if (_analyzer->usesEventField("delay") && !boost::ends_with(targetQueue, "iQ")) { - stream << padding << " insertWithDelay(" << targetQueue << ");" << std::endl; - } -#endif - - stream << padding << "}" << std::endl; - } else { - stream << padding << targetQueue << insertOp << event << ";" << std::endl; - } - } - } else if(TAGNAME(nodeElem) == "cancel") { - if (HAS_ATTR(nodeElem, "sendid")) { - stream << padding << "cancelSendId(" << _analyzer->macroForLiteral(ATTR(nodeElem, "sendid")) << ", " << (_invokerid.size() > 0 ? _analyzer->macroForLiteral(_invokerid) : "0") << ");" << std::endl; - } else if (HAS_ATTR(nodeElem, "sendidexpr")) { - stream << padding << "cancelSendId(" << ADAPT_SRC(ATTR(nodeElem, "sendidexpr")) << ", " << (_invokerid.size() > 0 ? _analyzer->macroForLiteral(_invokerid) : "0") << ");" << std::endl; - } - } else { - std::cerr << "'" << TAGNAME(nodeElem) << "'" << std::endl << nodeElem << std::endl; - assert(false); - } -} - -PromelaInlines::~PromelaInlines() { - return; -} - -std::list PromelaInlines::getRelatedTo(const Arabica::DOM::Node& node, PromelaInline::PromelaInlineType type) { - std::list related; - - std::map, std::list >::iterator inlIter = inlines.begin(); - while (inlIter != inlines.end()) { - std::list::iterator pmlIter = inlIter->second.begin(); - while (pmlIter != inlIter->second.end()) { - if ((type != PromelaInline::PROMELA_NIL || (*pmlIter)->type == type) && (*pmlIter)->relatesTo(node)) { - related.push_back(*pmlIter); - } - pmlIter++; - } - inlIter++; - } - return related; - - return related; -} - -std::list PromelaInlines::getAllOfType(uint32_t type) { - std::list related; - - std::map, std::list >::iterator inlIter = inlines.begin(); - while (inlIter != inlines.end()) { - std::list::iterator pmlIter = inlIter->second.begin(); - while (pmlIter != inlIter->second.end()) { - if ((*pmlIter)->type & type) { - related.push_back(*pmlIter); - } - pmlIter++; - } - inlIter++; - } - return related; -} - -PromelaInline::PromelaInline(const Arabica::DOM::Node& node) : prevSibling(NULL), nextSibling(NULL), type(PROMELA_NIL) { - if (node.getNodeType() != Node_base::COMMENT_NODE && node.getNodeType() != Node_base::TEXT_NODE) - return; // nothing to do - - std::stringstream ssLine(node.getNodeValue()); - std::string line; - - while(std::getline(ssLine, line)) { - // skip to first promela line - boost::trim(line); - if (boost::starts_with(line, "promela")) - break; - } - - if (!boost::starts_with(line, "promela")) - return; - - if (false) { - } else if (boost::starts_with(line, "promela-code")) { - type = PROMELA_CODE; - } else if (boost::starts_with(line, "promela-ltl")) { - type = PROMELA_LTL; - } else if (boost::starts_with(line, "promela-event-all")) { - type = PROMELA_EVENT_ALL_BUT; - } else if (boost::starts_with(line, "promela-event")) { - type = PROMELA_EVENT_ONLY; - } else if (boost::starts_with(line, "promela-progress")) { - type = PROMELA_PROGRESS_LABEL; - } else if (boost::starts_with(line, "promela-accept")) { - type = PROMELA_ACCEPT_LABEL; - } else if (boost::starts_with(line, "promela-end")) { - type = PROMELA_END_LABEL; - } - - std::stringstream contentSS; - size_t endType = line.find_first_of(": \n"); - - std::string seperator; - if (endType != std::string::npos && endType + 1 < line.size()) { - contentSS << line.substr(endType + 1, line.size() - endType + 1); - seperator = "\n"; - } - - while(std::getline(ssLine, line)) { - boost::trim(line); - if (boost::starts_with(line, "promela")) { - std::cerr << "Split multiple #promela pragmas into multiple comments!" << std::endl; - break; - } - contentSS << seperator << line; - seperator = "\n"; - } - content = contentSS.str(); -} - - -PromelaInlines::PromelaInlines(const Arabica::DOM::Node& node) { - NodeSet levelNodes; - levelNodes.push_back(node); - - size_t level = 0; - while(levelNodes.size() > 0) { - PromelaInline* predecessor = NULL; - - // iterate all nodes at given level - for (size_t i = 0; i < levelNodes.size(); i++) { - - // get all comments - NodeSet comments = DOMUtils::filterChildType(Node_base::COMMENT_NODE, levelNodes[i]); - for (size_t j = 0; j < comments.size(); j++) { - PromelaInline* tmp = new PromelaInline(comments[j]); - if (tmp->type == PromelaInline::PROMELA_NIL) { - delete tmp; - continue; - } - - if (predecessor != NULL) { - tmp->prevSibling = predecessor; - predecessor->nextSibling = tmp; - } - tmp->level = level; - tmp->container = Element(levelNodes[i]); - predecessor = tmp; - inlines[levelNodes[i]].push_back(tmp); - allInlines.push_back(tmp); - } - } - - levelNodes = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, levelNodes); - level++; - } -} - -void PromelaInline::dump() { -#if 0 - switch(type) { - case PROMELA_NIL: - std::cerr << "PROMELA_NIL" << std::endl; - break; - case PROMELA_CODE: - std::cerr << "PROMELA_CODE" << std::endl; - break; - case PROMELA_EVENT_SOURCE_ALL: - std::cerr << "PROMELA_EVENT_SOURCE" << std::endl; - break; - case PROMELA_INVOKER: - std::cerr << "PROMELA_INVOKER" << std::endl; - break; - case PROMELA_PROGRESS_LABEL: - std::cerr << "PROMELA_PROGRESS_LABEL" << std::endl; - break; - case PROMELA_ACCEPT_LABEL: - std::cerr << "PROMELA_ACCEPT_LABEL" << std::endl; - break; - case PROMELA_END_LABEL: - std::cerr << "PROMELA_END_LABEL" << std::endl; - break; - } -#endif -} - - -void ChartToPromela::writeIfBlock(std::ostream& stream, const Arabica::XPath::NodeSet& condChain, int indent) { - if (condChain.size() == 0) - return; - - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - - bool noNext = condChain.size() == 1; - bool nextIsElse = false; - if (condChain.size() > 1) { - if (TAGNAME_CAST(condChain[1]) == "else") { - nextIsElse = true; - } - } - - Element ifNode = Element(condChain[0]); - - stream << padding << "if" << std::endl; - // we need to nest the elseifs to resolve promela if semantics - stream << padding << ":: (" << ADAPT_SRC(ATTR(ifNode, "cond")) << ") -> {" << std::endl; - - Arabica::DOM::Node child; - if (TAGNAME(ifNode) == "if") { - child = ifNode.getFirstChild(); - } else { - child = ifNode.getNextSibling(); - } - while(child) { - if (child.getNodeType() == Node_base::ELEMENT_NODE) { - Arabica::DOM::Element childElem = Arabica::DOM::Element(child); - if (TAGNAME(childElem) == "elseif" || TAGNAME_CAST(childElem) == "else") - break; - writeExecutableContent(stream, childElem, indent + 1); - } - child = child.getNextSibling(); - } - stream << padding << "}" << std::endl; - stream << padding << ":: else -> "; - - if (nextIsElse) { - child = condChain[1].getNextSibling(); - stream << "{" << std::endl; - while(child) { - if (child.getNodeType() == Node_base::ELEMENT_NODE) { - writeExecutableContent(stream, child, indent + 1); - } - child = child.getNextSibling(); - } - stream << padding << "}" << std::endl; - - } else if (noNext) { - stream << "skip;" << std::endl; - } else { - stream << "{" << std::endl; - - Arabica::XPath::NodeSet cdrCondChain; - for (size_t i = 1; i < condChain.size(); i++) { - cdrCondChain.push_back(condChain[i]); - } - writeIfBlock(stream, cdrCondChain, indent + 1); - stream << padding << "}" << std::endl; - } - - stream << padding << "fi;" << std::endl; - -} - - -std::string ChartToPromela::beautifyIndentation(const std::string& code, int indent) { - - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - - // remove topmost indentation from every line and reindent - std::stringstream beautifiedSS; - - std::string initialIndent; - bool gotIndent = false; - bool isFirstLine = true; - std::stringstream ssLine(code); - std::string line; - - while(std::getline(ssLine, line)) { - size_t firstChar = line.find_first_not_of(" \t\r\n"); - if (firstChar != std::string::npos) { - if (!gotIndent) { - initialIndent = line.substr(0, firstChar); - gotIndent = true; - } - beautifiedSS << (isFirstLine ? "" : "\n") << padding << boost::replace_first_copy(line, initialIndent, ""); - isFirstLine = false; - } - } - - return beautifiedSS.str(); -} - -void ChartToPromela::writeStrings(std::ostream& stream) { - stream << "/* string literals */" << std::endl; - std::set literals = _analyzer->getLiterals(); - std::map events = _analyzer->getEvents(); - std::map origStates = _analyzer->getOrigStates(); - - for (std::set::const_iterator litIter = literals.begin(); litIter != literals.end(); litIter++) { - if (events.find(*litIter) == events.end() && (origStates.find(*litIter) == origStates.end() || !_analyzer->usesInPredicate())) - stream << "#define " << _analyzer->macroForLiteral(*litIter) << " " << _analyzer->indexForLiteral(*litIter) << " /* " << *litIter << " */" << std::endl; - } -} - -void ChartToPromela::writeDeclarations(std::ostream& stream) { - - stream << "/* global variables " << (_prefix.size() > 0 ? "for " + _prefix : "") << " */" << std::endl; - - // we cannot know our event queue with nested invokers? Adding some for test422 - size_t tolerance = 6; - - if (_analyzer->usesComplexEventStruct()) { - // event is defined with the typedefs - stream << "_event_t " << _prefix << "_event; /* current event */" << std::endl; - stream << "unsigned " << _prefix << "s : " << BIT_WIDTH(_activeConf.size() + 1) << "; /* current state */" << std::endl; - stream << "chan " << _prefix << "iQ = [" << MAX(_internalQueueLength, 1) << "] of {_event_t} /* internal queue */" << std::endl; - stream << "chan " << _prefix << "eQ = [" << _externalQueueLength + tolerance << "] of {_event_t} /* external queue */" << std::endl; - if (_allowEventInterleaving) - stream << "chan " << _prefix << "tmpQ = [" << MAX(_externalQueueLength + tolerance, 1) << "] of {_event_t} /* temporary queue for external events in transitions */" << std::endl; - } else { - stream << "unsigned " << _prefix << "_event : " << BIT_WIDTH(_analyzer->getEvents().size() + 1) << "; /* current event */" << std::endl; - stream << "unsigned " << _prefix << "s : " << BIT_WIDTH(_activeConf.size() + 1) << "; /* current state */" << std::endl; - stream << "chan " << _prefix << "iQ = [" << MAX(_internalQueueLength, 1) << "] of {int} /* internal queue */" << std::endl; - stream << "chan " << _prefix << "eQ = [" << _externalQueueLength + tolerance << "] of {int} /* external queue */" << std::endl; - if (_allowEventInterleaving) - stream << "chan " << _prefix << "tmpQ = [" << MAX(_externalQueueLength + tolerance, 1) << "] of {int} /* temporary queue for external events in transitions */" << std::endl; -// stream << "hidden unsigned " << _prefix << "tmpQItem : " << BIT_WIDTH(_analyzer->getEvents().size() + 1) << ";" << std::endl; - } - if (_machines.size() > 0) { - stream << "chan " << _prefix << "start = [" << _machines.size() << "] of {int} /* nested machines to start at next macrostep */" << std::endl; - } - - if (_hasIndexLessLoops) - stream << "hidden int " << _prefix << "_index; /* helper for indexless foreach loops */" << std::endl; - - stream << "hidden int " << _prefix << "procid; /* the process id running this machine */" << std::endl; - stream << "bool " << _prefix << "spontaneous; /* whether to take spontaneous transitions */" << std::endl; - stream << "bool " << _prefix << "done; /* is the state machine stopped? */" << std::endl; - stream << "bool " << _prefix << "canceled; /* is the state machine canceled? */" << std::endl; - - if (_traceTransitions) - stream << "bool " << _prefix << "transitions[" << indexedTransitions.size() << "]; /* transitions in the optimal transition set */" << std::endl; - - if (_analyzer->getTypes().types.find("_ioprocessors") != _analyzer->getTypes().types.end()) { - stream << "hidden _ioprocessors_t " << _prefix << "_ioprocessors;" << std::endl; - _varInitializers.push_front("_ioprocessors.scxml.location = " + (_invokerid.size() > 0 ? _analyzer->macroForLiteral(_invokerid) : "1") + ";"); - } - - if (_prefix.size() == 0 || _prefix == "MAIN_") { - if (_analyzer->usesEventField("sendid")) { -// stream << "chan sendIdQ = [" << MAX(_externalQueueLength + 1, 1) << "] of {_event_t} /* temporary queue to cancel events per sendidexpr */" << std::endl; - stream << "hidden int _lastSendId = 0; /* sequential counter for send ids */" << std::endl; - } - - if (_analyzer->usesEventField("delay")) { -#if NEW_DELAY_RESHUFFLE -#else - stream << "hidden int _lastSeqId = 0; /* sequential counter for delayed events */" << std::endl; -#endif - } - } -// if (_analyzer->usesPlatformVars()) { -// stream << "_x_t _x;" << std::endl; -// } - - if (_analyzer->usesInPredicate()) { - stream << "_x_t " << _prefix << "_x;" << std::endl; - } - - std::list pmls = pmlInlines.getAllOfType(PromelaInline::PROMELA_EVENT_ALL_BUT | PromelaInline::PROMELA_EVENT_ONLY); - for (std::list::iterator pmlIter = pmls.begin(); pmlIter != pmls.end(); pmlIter++) { - if ((*pmlIter)->container && LOCALNAME((*pmlIter)->container) == "invoke") { - stream << "bool " << _prefix << ATTR_CAST((*pmlIter)->container, "id") << "Running;" << std::endl; - } - } - - stream << std::endl << std::endl; - - // get all data elements - NodeSet datas = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "data", _scxml).asNodeSet(); - - // write their text content - stream << "/* data model variables" << (_prefix.size() > 0 ? " for " + _prefix : "") << " */" << std::endl; - std::set processedIdentifiers; - - // automatic types - PromelaCodeAnalyzer::PromelaTypedef allTypes = _analyzer->getTypes(); - - for (size_t i = 0; i < datas.size(); i++) { - - Node data = datas[i]; - if (isInEmbeddedDocument(data)) - continue; - - std::string identifier = (HAS_ATTR_CAST(data, "id") ? ATTR_CAST(data, "id") : ""); - std::string type = boost::trim_copy(HAS_ATTR_CAST(data, "type") ? ATTR_CAST(data, "type") : ""); - - _dataModelVars.insert(identifier); - if (processedIdentifiers.find(identifier) != processedIdentifiers.end()) - continue; - - processedIdentifiers.insert(identifier); - - if (boost::starts_with(type, "string")) { - type = "int" + type.substr(6, type.length() - 6); - } - - if (type.length() == 0 || type == "auto") { - if (allTypes.types.find(identifier) != allTypes.types.end()) { - type = allTypes.types[identifier].name; - } else { - LOG(ERROR) << "Automatic or no type for '" << identifier << "' but no type resolved"; - continue; - } - } - - std::string arrSize; - size_t bracketPos = type.find("["); - if (bracketPos != std::string::npos) { - arrSize = type.substr(bracketPos, type.length() - bracketPos); - type = type.substr(0, bracketPos); - } - std::string decl = type + " " + _prefix + identifier + arrSize; - stream << decl << ";" << std::endl; - - } - - - // implicit and dynamic types - std::map::iterator typeIter = allTypes.types.begin(); - while(typeIter != allTypes.types.end()) { - if (typeIter->second.occurrences.find(this) == typeIter->second.occurrences.end()) { - typeIter++; - continue; - } - - if (processedIdentifiers.find(typeIter->first) != processedIdentifiers.end()) { - typeIter++; - continue; - } - - if (typeIter->first == "_event" || - typeIter->first == "_x" || - typeIter->first == "_ioprocessors" || - typeIter->first == "_SESSIONID" || - typeIter->first == "_NAME") { - typeIter++; - continue; - } - - processedIdentifiers.insert(typeIter->first); - - if (typeIter->second.types.size() == 0) { - stream << "hidden " << declForRange(_prefix + typeIter->first, typeIter->second.minValue, typeIter->second.maxValue) << ";" << std::endl; - } else { - stream << "hidden " << _prefix << typeIter->second.name << " " << typeIter->first << ";" << std::endl; - } - typeIter++; - } - - stream << std::endl; - -} - -void ChartToPromela::writeEventSources(std::ostream& stream) { -} - -void ChartToPromela::writeStartInvoker(std::ostream& stream, const Arabica::DOM::Node& node, ChartToPromela* invoker, int indent) { - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - - // set from namelist - if (HAS_ATTR_CAST(node, "namelist")) { - std::list namelist = tokenize(ATTR_CAST(node, "namelist")); - for (std::list::iterator nlIter = namelist.begin(); nlIter != namelist.end(); nlIter++) { - if (invoker->_dataModelVars.find(*nlIter) != invoker->_dataModelVars.end()) { - stream << padding << invoker->_prefix << *nlIter << " = " << _prefix << *nlIter << ";" << std::endl; - } - } - } - - // set from params - NodeSet invokeParams = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "param", node); - for (size_t i = 0; i < invokeParams.size(); i++) { - std::string identifier = ATTR_CAST(invokeParams[i], "name"); - std::string expression = ATTR_CAST(invokeParams[i], "expr"); - if (invoker->_dataModelVars.find(identifier) != invoker->_dataModelVars.end()) { - stream << padding << invoker->_prefix << identifier << " = " << ADAPT_SRC(expression) << ";" << std::endl; - } - } - - stream << padding << "run " << invoker->_prefix << "run() priority 20;" << std::endl; - if (HAS_ATTR_CAST(node, "idlocation")) { - stream << padding << ADAPT_SRC(ATTR_CAST(node, "idlocation")) << " = " << _analyzer->macroForLiteral(invoker->_invokerid) << ";" << std::endl; - } - -} - -void ChartToPromela::writeFSM(std::ostream& stream) { - NodeSet transitions; - - stream << "proctype " << (_prefix.size() == 0 ? "machine_" : _prefix) << "run() {" << std::endl; - stream << " d_step {" << std::endl; - stream << " " << _prefix << "done = false;" << std::endl; - stream << " " << _prefix << "canceled = false;" << std::endl; - stream << " " << _prefix << "spontaneous = true;" << std::endl; - stream << " " << _prefix << "procid = _pid;" << std::endl; - stream << " }" << std::endl; - // write initial transition -// transitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", _startState); -// assert(transitions.size() == 1); - - NodeSet scripts = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "script", _scxml, false); - if (scripts.size() > 0) { - stream << std::endl << "/* global scripts */" << std::endl; - for (size_t i = 0; i < scripts.size(); i++) { - writeExecutableContent(stream, scripts[i], 1); - } - stream << std::endl; - } - - stream << std::endl << "/* transition to initial state */" << std::endl; - assert(_start->sortedOutgoing.size() == 1); - // initial transition has to be first one for control flow at start - writeTransition(stream, _start->sortedOutgoing.front(), 1); - stream << std::endl; - - // every other transition - for (std::map::iterator stateIter = _activeConf.begin(); stateIter != _activeConf.end(); stateIter++) { - for (std::list::iterator transIter = stateIter->second->sortedOutgoing.begin(); transIter != stateIter->second->sortedOutgoing.end(); transIter++) { - // don't write invalid transition - if (!(*transIter)->isValid) { - LOG(ERROR) << "Sorted outgoing transitions contains invalid transitions - did you instruct ChartToFSM to keep those?"; - abort(); - } - - // don't write initial transition - if (_start->sortedOutgoing.front() == *transIter) - continue; - // don't write trivial or history transitions - if ((*transIter)->historyBase == NULL) // TODO! -// if ((*transIter)->hasExecutableContent && (*transIter)->historyBase == NULL) - writeTransition(stream, *transIter, 1); - } - _perfStatesProcessed++; - _perfStatesTotal++; - - DUMP_STATS(false); - } - DUMP_STATS(true); - - stream << std::endl; - stream << _prefix << "macroStep: skip;" << std::endl; - if (_allowEventInterleaving) { - stream << " /* push send events to external queue - this needs to be interleavable! */" << std::endl; - stream << " do" << std::endl; - if (_analyzer->usesEventField("delay")) { -#if NEW_DELAY_RESHUFFLE - stream << " :: len(" << _prefix << "tmpQ) != 0 -> { " << _prefix << "tmpQ?" << _prefix << "_event; " << _prefix << "eQ!" << _prefix << "_event; insertWithDelay(" << _prefix << "eQ); }" << std::endl; -#else - stream << " :: len(" << _prefix << "tmpQ) != 0 -> { " << _prefix << "tmpQ?" << _prefix << "_event; " << _prefix << "eQ!!" << _prefix << "_event }" << std::endl; -#endif - } else { - stream << " :: len(" << _prefix << "tmpQ) != 0 -> { " << _prefix << "tmpQ?" << _prefix << "_event; " << _prefix << "eQ!" << _prefix << "_event }" << std::endl; - } - stream << " :: else -> break;" << std::endl; - stream << " od;" << std::endl << std::endl; - } - - if (_machines.size() > 0) { - stream << " /* start pending invokers */" << std::endl; - stream << " int invokerId;" << std::endl; - stream << " do" << std::endl; - stream << " :: " << _prefix << "start?invokerId -> {" << std::endl; - stream << " if " << std::endl; - for (std::map, ChartToPromela*>::iterator machIter = _machines.begin(); machIter != _machines.end(); machIter++) { - stream << " :: invokerId == " << _analyzer->macroForLiteral(machIter->second->_invokerid) << " -> {" << std::endl; - writeStartInvoker(stream, machIter->first, machIter->second, 3); - stream << " }" << std::endl; - } - stream << " :: else -> skip; " << std::endl; - stream << " fi " << std::endl; - stream << " }" << std::endl; - stream << " :: else -> break;" << std::endl; - stream << " od" << std::endl << std::endl; - } - - if (_analyzer->usesEventField("delay") && _machinesAll->size() > 1) { - stream << "/* Determine machines with smallest delay and set their process priority */" << std::endl; - stream << " scheduleMachines();" << std::endl << std::endl; - } - - std::list eventSources = pmlInlines.getAllOfType(PromelaInline::PROMELA_EVENT_ALL_BUT | - PromelaInline::PROMELA_EVENT_ONLY); - - stream << " atomic {" << std::endl; - stream << "/* pop an event */" << std::endl; - stream << " if" << std::endl; - stream << " :: len(" << _prefix << "iQ) != 0 -> " << _prefix << "iQ ? " << _prefix << "_event /* from internal queue */" << std::endl; - if (eventSources.size() > 0) { - stream << " :: len(" << _prefix << "eQ) != 0 -> " << _prefix << "eQ ? " << _prefix << "_event /* from external queue */" << std::endl; - stream << " :: else -> {" << std::endl; - stream << " /* external queue is empty -> automatically enqueue external event */" << std::endl; - stream << " if" << std::endl; - - for (std::list::iterator esIter = eventSources.begin(); esIter != eventSources.end(); esIter++) { - PromelaEventSource es(**esIter); - - std::string condition = "true"; - - if (LOCALNAME(es.container) == "invoke") { - if (HAS_ATTR_CAST(es.container, "id")) { - condition = _prefix + ATTR_CAST(es.container, "id") + "Running"; - } else { - LOG(ERROR) << "Invoker has no id"; - } - } else if (HAS_ATTR(es.container, "id")) { - condition = _prefix + "_x.states[" + _analyzer->macroForLiteral(ATTR(es.container, "id")) + "]"; - } - stream << " :: " << condition << " -> {" << std::endl; - - if (es.type == PromelaInline::PROMELA_EVENT_ALL_BUT) { - std::string excludeEventDescs; - for (std::list::iterator evIter = es.events.array.begin(); evIter != es.events.array.end(); evIter++) { - excludeEventDescs += " " + evIter->atom; - } - - NodeSet transitions = DOMUtils::filterChildElements("transition", es.container, true); - std::set eventNames; - for (size_t i = 0; i < transitions.size(); i++) { - if (!HAS_ATTR_CAST(transitions[i], "event")) - continue; - if (HAS_ATTR_CAST(transitions[i], "cond") && ATTR_CAST(transitions[i], "cond").find("_event.") != std::string::npos) - continue; - std::list events = tokenize(ATTR_CAST(transitions[i], "event")); - for (std::list::iterator evIter = events.begin(); evIter != events.end(); evIter++) { - std::string eventName = *evIter; - if (boost::ends_with(eventName, "*")) - eventName = eventName.substr(0, eventName.size() - 1); - if (boost::ends_with(eventName, ".")) - eventName = eventName.substr(0, eventName.size() - 1); - - // is this event excluded? - if (!nameMatch(excludeEventDescs, eventName)) { - eventNames.insert(eventName); - } - } - } - - if (eventNames.size() > 0) { - stream << " if " << std::endl; - for (std::set::iterator evIter = eventNames.begin(); evIter != eventNames.end(); evIter++) { - stream << " :: true -> { " << _prefix << "_event" << (_analyzer->usesComplexEventStruct() ? ".name" : "")<< " = " << _analyzer->macroForLiteral(*evIter) << " }" << std::endl; - } - stream << " fi " << std::endl; - } - - } else if (es.type == PromelaInline::PROMELA_EVENT_ONLY) { - if (es.events.array.size() > 0) { - stream << " if " << std::endl; - for (std::list::iterator evIter = es.events.array.begin(); evIter != es.events.array.end(); evIter++) { - stream << " :: true -> { " << std::endl; - stream << dataToAssignments(" _event", *evIter); - stream << " } " << std::endl; - } - stream << " fi " << std::endl; - } else { - stream << dataToAssignments(" _event", es.events); - } - } else { - assert(false); - } - stream << " }" << std::endl; - } - - stream << " fi" << std::endl; - stream << " }" << std::endl; - } else { - stream << " :: else -> " << _prefix << "eQ ? " << _prefix << "_event /* from external queue */" << std::endl; - } - stream << " fi;" << std::endl << std::endl; - - - stream << "/* terminate if we are stopped */" << std::endl; - stream << " if" << std::endl; - stream << " :: " << _prefix << "done -> goto " << _prefix << "terminate;" << std::endl; - if (_parent != NULL) { - stream << " :: " << _prefix << "canceled -> goto " << _prefix << "cancel;" << std::endl; - } - stream << " :: else -> skip;" << std::endl; - stream << " fi;" << std::endl << std::endl; - - { - bool finalizeFound = false; - for (std::map, ChartToPromela*>::iterator invIter = _machines.begin(); invIter != _machines.end(); invIter++) { - NodeSet finalizes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "finalize", invIter->first, false); - if (finalizes.size() > 0) { - finalizeFound = true; - break; - } - } - if (finalizeFound) { - stream << "/* event */" << std::endl; - stream << " if" << std::endl; - for (std::map, ChartToPromela*>::iterator invIter = _machines.begin(); invIter != _machines.end(); invIter++) { - NodeSet finalizes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "finalize", invIter->first, false); - if (finalizes.size() > 0) { - stream << " :: " << _prefix << "_event.invokeid == " << _analyzer->macroForLiteral(invIter->second->_invokerid) << " -> {" << std::endl; - writeExecutableContent(stream, finalizes[0], 3); - stream << " } " << std::endl; - } - } - stream << " :: else -> skip;" << std::endl; - stream << " fi;" << std::endl << std::endl; - } - } - - for (std::map, ChartToPromela*>::iterator invIter = _machines.begin(); invIter != _machines.end(); invIter++) { - if (invIter->second == this) { - continue; - } - //std::cout << invIter->first << std::endl; - if (stringIsTrue(ATTR_CAST(invIter->first, "autoforward"))) { - stream << "/* autoforward event to " << invIter->second->_invokerid << " invokers */" << std::endl; - stream << " if" << std::endl; - stream << " :: " << invIter->second->_prefix << "done -> skip;" << std::endl; - stream << " :: " << invIter->second->_prefix << "canceled -> skip;" << std::endl; -#if NEW_DELAY_RESHUFFLE - stream << " :: else -> { " << invIter->second->_prefix << "eQ!" << _prefix << "_event" << "; insertWithDelay(" << invIter->second->_prefix << "eQ" << "); }" << std::endl; -#else - stream << " :: else -> { " << invIter->second->_prefix << "eQ!!" << _prefix << "_event" << " }" << std::endl; -#endif - stream << " fi;" << std::endl << std::endl; - - } - } - stream << std::endl; - - stream << _prefix << "microStep:" << std::endl; - stream << "/* event dispatching per state */" << std::endl; - stream << " if" << std::endl; - - writeEventDispatching(stream); - - stream << "/* this is an error as we dispatched all valid states */" << std::endl; - stream << " :: else -> assert(false);" << std::endl; - stream << " fi;" << std::endl; - stream << std::endl; - stream << _prefix << "terminate: skip;" << std::endl; - - if (_parent != NULL) { - stream << " {" << std::endl; - stream << _analyzer->getTypeReset("tmpE", _analyzer->getType("_event"), " "); - stream << " tmpE.name = " << _analyzer->macroForLiteral("done.invoke." + _invokerid) << ";" << std::endl; - if (_invokerid.length() > 0) { - stream << " tmpE.invokeid = " << _analyzer->macroForLiteral(_invokerid) << ";" << std::endl; - } - if (_analyzer->usesEventField("delay")) { -#if NEW_DELAY_RESHUFFLE - stream << " " << _parent->_prefix << "eQ!tmpE;" << std::endl; - stream << " insertWithDelay(" << _parent->_prefix << "eQ);" << std::endl; - -#else - stream << " _lastSeqId = _lastSeqId + 1;" << std::endl; - stream << " tmpE.seqNr = _lastSeqId;" << std::endl; - stream << " " << _parent->_prefix << "eQ!!tmpE;" << std::endl; -#endif - } else { - stream << " " << _parent->_prefix << "eQ!tmpE;" << std::endl; - } - stream << " }" << std::endl; - stream << _prefix << "cancel: skip;" << std::endl; - if (_analyzer->usesEventField("delay")) - stream << " removePendingEventsForInvoker(" << _analyzer->macroForLiteral(this->_invokerid) << ")" << std::endl; - } - - stream << " }" << std::endl; - stream << "}" << std::endl; -} - -void ChartToPromela::writeRescheduleProcess(std::ostream& stream, int indent) { - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - - if (_allowEventInterleaving) { - stream << padding << "inline rescheduleProcess(smallestDelay, procId, internalQ, externalQ, tempQ) {" << std::endl; - } else { - stream << padding << "inline rescheduleProcess(smallestDelay, procId, internalQ, externalQ) {" << std::endl; - } -// stream << _analyzer->getTypeReset("tmpE", _analyzer->getType("_event"), " "); - - stream << padding << " set_priority(procId, 1);" << std::endl; - stream << padding << " if" << std::endl; - stream << padding << " :: len(internalQ) > 0 -> set_priority(procId, 10);" << std::endl; - stream << padding << " :: else {" << std::endl; - stream << padding << " if" << std::endl; - - stream << padding << " :: len(externalQ) > 0 -> {" << std::endl; - stream << padding << " externalQ?;" << std::endl; - stream << padding << " if" << std::endl; - stream << padding << " :: smallestDelay == tmpE.delay -> set_priority(procId, 10);" << std::endl; - stream << padding << " :: else -> skip;" << std::endl; - stream << padding << " fi;" << std::endl; - stream << padding << " }" << std::endl; - - if (_allowEventInterleaving) { - stream << padding << " :: len(tempQ) > 0 -> {" << std::endl; - stream << padding << " tempQ?;" << std::endl; - stream << padding << " if" << std::endl; - stream << padding << " :: smallestDelay == tmpE.delay -> set_priority(procId, 10);" << std::endl; - stream << padding << " :: else -> skip;" << std::endl; - stream << padding << " fi;" << std::endl; - stream << padding << " }" << std::endl; - } - - stream << padding << " :: else -> skip;" << std::endl; - stream << padding << " fi;" << std::endl; - stream << padding << " }" << std::endl; - stream << padding << " fi;" << std::endl; - stream << padding << "}" << std::endl; -} - -void ChartToPromela::writeDetermineShortestDelay(std::ostream& stream, int indent) { - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - - stream << padding << "inline determineSmallestDelay(smallestDelay, queue) {" << std::endl; -// stream << padding << _analyzer->getTypeReset("tmpE", _analyzer->getType("_event"), " "); - stream << padding << " if" << std::endl; - stream << padding << " :: len(queue) > 0 -> {" << std::endl; - stream << padding << " queue?;" << std::endl; - stream << padding << " if" << std::endl; - stream << padding << " :: (tmpE.delay < smallestDelay) -> { smallestDelay = tmpE.delay; }" << std::endl; - stream << padding << " :: else -> skip;" << std::endl; - stream << padding << " fi;" << std::endl; - stream << padding << " }" << std::endl; - stream << padding << " :: else -> skip;" << std::endl; - stream << padding << " fi;" << std::endl; - stream << padding << "}" << std::endl; -} - -void ChartToPromela::writeInsertWithDelay(std::ostream& stream, int indent) { - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - - uint32_t maxExternalQueueLength = 1; - std::map, ChartToPromela*>::iterator machineIter = _machinesAll->begin(); - while(machineIter != _machinesAll->end()) { - maxExternalQueueLength = MAX(maxExternalQueueLength, machineIter->second->_externalQueueLength); - machineIter++; - } - - maxExternalQueueLength += 6; - - if (maxExternalQueueLength <= 1) { - stream << padding << "/* noop for external queues with length <= 1 */" << std::endl; - stream << padding << "inline insertWithDelay(queue) {}" << std::endl; - } - - stream << padding << "hidden _event_t _iwdQ[" << maxExternalQueueLength - 1 << "];" << std::endl; - stream << padding << "hidden int _iwdQLength = 0;" << std::endl; - stream << padding << "hidden int _iwdIdx1 = 0;" << std::endl; - stream << padding << "hidden int _iwdIdx2 = 0;" << std::endl; - stream << padding << "hidden _event_t _iwdTmpE;" << std::endl; - stream << padding << "hidden _event_t _iwdLastE;" << std::endl; - stream << padding << "bool _iwdInserted = false;" << std::endl; - stream << padding << "" << std::endl; - stream << padding << "/* last event in given queue is potentially at wrong position */" << std::endl; - stream << padding << "inline insertWithDelay(queue) {" << std::endl; - stream << padding << " d_step {" << std::endl; - stream << padding << "" << std::endl; - stream << padding << " /* only process for non-trivial queues */" << std::endl; - stream << padding << " if" << std::endl; - stream << padding << " :: len(queue) > 1 -> {" << std::endl; - stream << padding << "" << std::endl; - stream << padding << " /* move all events but last over and remember the last one */" << std::endl; - stream << padding << " _iwdIdx1 = 0;" << std::endl; - stream << padding << " _iwdQLength = len(queue) - 1;" << std::endl; - stream << padding << "" << std::endl; - stream << padding << " do" << std::endl; - stream << padding << " :: _iwdIdx1 < _iwdQLength -> {" << std::endl; - stream << padding << " queue?_iwdTmpE;" << std::endl; - stream << padding << " _iwdQ[_iwdIdx1].name = _iwdTmpE.name;" << std::endl; - - stream << _analyzer->getTypeAssignment("_iwdQ[_iwdIdx1]", "_iwdTmpE", _analyzer->getType("_event"), padding + " "); - - stream << padding << " _iwdIdx1++;" << std::endl; - stream << padding << " }" << std::endl; - stream << padding << " :: else -> break;" << std::endl; - stream << padding << " od" << std::endl; - stream << padding << "" << std::endl; - stream << padding << " queue?_iwdLastE;" << std::endl; - stream << padding << "" << std::endl; - stream << padding << " /* _iwdQ now contains all but last item in _iwdLastE */" << std::endl; - stream << padding << " assert(len(queue) == 0);" << std::endl; - stream << padding << "" << std::endl; - stream << padding << " /* reinsert into queue and place _iwdLastE correctly */" << std::endl; - stream << padding << " _iwdInserted = false;" << std::endl; - stream << padding << " _iwdIdx2 = 0;" << std::endl; - stream << padding << "" << std::endl; - stream << padding << " do" << std::endl; - stream << padding << " :: _iwdIdx2 < _iwdIdx1 -> {" << std::endl; - stream << padding << " _iwdTmpE.name = _iwdQ[_iwdIdx2].name;" << std::endl; - - stream << _analyzer->getTypeAssignment("_iwdTmpE", "_iwdQ[_iwdIdx2]", _analyzer->getType("_event"), padding + " "); - - stream << padding << "" << std::endl; - stream << padding << " if" << std::endl; - stream << padding << " :: _iwdTmpE.delay > _iwdLastE.delay -> {" << std::endl; - stream << padding << " queue!_iwdLastE;" << std::endl; - stream << padding << " _iwdInserted = true;" << std::endl; - stream << padding << " }" << std::endl; - stream << padding << " :: else -> skip" << std::endl; - stream << padding << " fi;" << std::endl; - stream << padding << "" << std::endl; - stream << padding << " queue!_iwdTmpE;" << std::endl; - stream << padding << " _iwdIdx2++;" << std::endl; - stream << padding << " }" << std::endl; - stream << padding << " :: else -> break;" << std::endl; - stream << padding << " od" << std::endl; - stream << padding << "" << std::endl; - stream << padding << " if" << std::endl; - stream << padding << " :: !_iwdInserted -> queue!_iwdLastE;" << std::endl; - stream << padding << " :: else -> skip;" << std::endl; - stream << padding << " fi;" << std::endl; - stream << padding << "" << std::endl; - stream << padding << " }" << std::endl; - stream << padding << " :: else -> skip;" << std::endl; - stream << padding << " fi;" << std::endl; - stream << padding << " }" << std::endl; - stream << padding << "}" << std::endl; -} - -void ChartToPromela::writeAdvanceTime(std::ostream& stream, int indent) { - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - - stream << padding << "inline advanceTime(increment, queue) {" << std::endl; - stream << padding << " tmpIndex = 0;" << std::endl; - stream << padding << " do" << std::endl; - stream << padding << " :: tmpIndex < len(queue) -> {" << std::endl; - stream << padding << " queue?tmpE;" << std::endl; - stream << padding << " if" << std::endl; - stream << padding << " :: tmpE.delay >= increment -> tmpE.delay = tmpE.delay - increment;" << std::endl; - stream << padding << " :: else -> skip;" << std::endl; - stream << padding << " fi" << std::endl; - stream << padding << " queue!tmpE;" << std::endl; - stream << padding << " tmpIndex++;" << std::endl; - stream << padding << " }" << std::endl; - stream << padding << " :: else -> break;" << std::endl; - stream << padding << " od" << std::endl; - stream << padding << "}" << std::endl; -} - -void ChartToPromela::writeRemovePendingEventsFromInvoker(std::ostream& stream, int indent) { - std::list queues; - queues.push_back("eQ"); - if (_allowEventInterleaving) - queues.push_back("tmpQ"); - - stream << "inline removePendingEventsForInvoker(invokeIdentifier) {" << std::endl; - for (std::map, ChartToPromela*>::iterator queueIter = _machinesAll->begin(); queueIter != _machinesAll->end(); queueIter++) { - for (std::list::iterator qIter = queues.begin(); qIter != queues.end(); qIter++) { - stream << " removePendingEventsForInvokerOnQueue(invokeIdentifier, " << queueIter->second->_prefix << *qIter << ");" << std::endl; - } - } - stream << "}" << std::endl; - stream << std::endl; - - stream << "inline removePendingEventsForInvokerOnQueue(invokeIdentifier, queue) {" << std::endl; - stream << " tmpIndex = 0;" << std::endl; -// stream << _analyzer->getTypeReset("tmpE", _analyzer->getType("_event"), " "); - stream << " do" << std::endl; - stream << " :: tmpIndex < len(queue) -> {" << std::endl; - stream << " queue?tmpE;" << std::endl; - stream << " if" << std::endl; - stream << " :: tmpE.delay == 0 || tmpE.invokeid != invokeIdentifier -> queue!tmpE;" << std::endl; - stream << " :: else -> skip;" << std::endl; - stream << " fi" << std::endl; - stream << " tmpIndex++;" << std::endl; - stream << " }" << std::endl; - stream << " :: else -> break;" << std::endl; - stream << " od" << std::endl; - stream << "}" << std::endl; -} - -void ChartToPromela::writeCancelEvents(std::ostream& stream, int indent) { - std::list queues; - queues.push_back("eQ"); - if (_allowEventInterleaving) - queues.push_back("tmpQ"); - - stream << "inline cancelSendId(sendIdentifier, invokerIdentifier) {" << std::endl; - for (std::map, ChartToPromela*>::iterator queueIter = _machinesAll->begin(); queueIter != _machinesAll->end(); queueIter++) { - for (std::list::iterator qIter = queues.begin(); qIter != queues.end(); qIter++) { - stream << " cancelSendIdOnQueue(sendIdentifier, " << queueIter->second->_prefix << *qIter << ", invokerIdentifier);" << std::endl; - } - } - stream << "}" << std::endl; - stream << std::endl; - - - stream << "inline cancelSendIdOnQueue(sendIdentifier, queue, invokerIdentifier) {" << std::endl; - stream << " tmpIndex = 0;" << std::endl; -// stream << _analyzer->getTypeReset("tmpE", _analyzer->getType("_event"), " "); - stream << " do" << std::endl; - stream << " :: tmpIndex < len(queue) -> {" << std::endl; - stream << " queue?tmpE;" << std::endl; - stream << " if" << std::endl; - stream << " :: tmpE.invokeid != invokerIdentifier || tmpE.sendid != sendIdentifier || tmpE.delay == 0 -> queue!tmpE;" << std::endl; - stream << " :: else -> skip;" << std::endl; - stream << " fi" << std::endl; - stream << " tmpIndex++;" << std::endl; - stream << " }" << std::endl; - stream << " :: else -> break;" << std::endl; - stream << " od" << std::endl; - stream << "}" << std::endl; -} - -void ChartToPromela::writeScheduleMachines(std::ostream& stream, int indent) { - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - - stream << padding << "inline scheduleMachines() {" << std::endl; - std::list queues; - queues.push_back("eQ"); - - if (_allowEventInterleaving) - queues.push_back("tmpQ"); - - stream << " /* schedule state-machines with regard to their event's delay */" << std::endl; - stream << " skip;" << std::endl; - stream << " d_step {" << std::endl; - - stream << std::endl << "/* determine smallest delay */" << std::endl; - stream << " int smallestDelay = 2147483647;" << std::endl; - - for (std::map, ChartToPromela*>::iterator queueIter = _machinesAll->begin(); queueIter != _machinesAll->end(); queueIter++) { - for (std::list::iterator qIter = queues.begin(); qIter != queues.end(); qIter++) { - stream << " determineSmallestDelay(smallestDelay, " << queueIter->second->_prefix << *qIter << ");" << std::endl; - } - } - // stream << " printf(\"======= Lowest delay is %d\\n\", smallestDelay);" << std::endl; - - stream << std::endl << "/* prioritize processes with lowest delay or internal events */" << std::endl; - - for (std::map, ChartToPromela*>::iterator queueIter = _machinesAll->begin(); queueIter != _machinesAll->end(); queueIter++) { - stream << " rescheduleProcess(smallestDelay, " - << queueIter->second->_prefix << "procid, " - << queueIter->second->_prefix << "iQ, " - << queueIter->second->_prefix << "eQ"; - if (_allowEventInterleaving) { - stream << ", " << queueIter->second->_prefix << "tmpQ);" << std::endl; - } else { - stream << ");" << std::endl; - } - } - - stream << std::endl << "/* advance time by subtracting the smallest delay from all event delays */" << std::endl; - stream << " if" << std::endl; - stream << " :: (smallestDelay > 0) -> {" << std::endl; - for (std::map, ChartToPromela*>::iterator queueIter = _machinesAll->begin(); queueIter != _machinesAll->end(); queueIter++) { - for (std::list::iterator qIter = queues.begin(); qIter != queues.end(); qIter++) { - stream << " advanceTime(smallestDelay, " << queueIter->second->_prefix << *qIter << ");" << std::endl; - } - } - stream << " }" << std::endl; - stream << " :: else -> skip;" << std::endl; - stream << " fi;" << std::endl; - stream << " }" << std::endl; - stream << " set_priority(_pid, 10);" << std::endl << std::endl; - stream << padding << "}" << std::endl; -} - -void ChartToPromela::writeEventDispatching(std::ostream& stream) { - for (std::map::iterator stateIter = _activeConf.begin(); stateIter != _activeConf.end(); stateIter++) { - - const std::string& stateId = stateIter->first; - const GlobalState* state = stateIter->second; - - stream << std::endl << "/* ### current state "; - FlatStateIdentifier flatActiveSource(stateId); - PRETTY_PRINT_LIST(stream, flatActiveSource.getActive()); - stream << " ######################## */" << std::endl; - - stream << " :: (" << _prefix << "s == s" << state->activeIndex << ") -> {" << std::endl; - - writeDispatchingBlock(stream, state->sortedOutgoing, 3); - stream << " }" << std::endl; - } -} - -void ChartToPromela::writeDispatchingBlock(std::ostream& stream, std::list transitions, int indent) { - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - - if (transitions.size() == 0) { - stream << "/* no transition applicable */" << std::endl; - stream << padding << _prefix << "spontaneous = false;" << std::endl; - stream << padding << "goto " << _prefix << "macroStep;" << std::endl; - return; - } - - - GlobalTransition* currTrans = transitions.front(); - transitions.pop_front(); - - stream << padding << "if" << std::endl; - - if (currTrans->condition.size() > 0) { - stream << padding << ":: (("; - } else { - stream << padding << ":: ("; - } - - if (currTrans->isEventless) { - stream << _prefix << "spontaneous"; - } else { - std::string eventDescs = currTrans->eventDesc; - - std::list eventNames = tokenize(eventDescs); - std::set eventPrefixes; - std::list::iterator eventNameIter = eventNames.begin(); - while(eventNameIter != eventNames.end()) { - std::string eventDesc = *eventNameIter; - if (boost::ends_with(eventDesc, "*")) - eventDesc = eventDesc.substr(0, eventDesc.size() - 1); - if (boost::ends_with(eventDesc, ".")) - eventDesc = eventDesc.substr(0, eventDesc.size() - 1); - if (eventDesc.length() > 0) { - std::set tmp = _analyzer->getEventsWithPrefix(*eventNameIter); - eventPrefixes.insert(tmp.begin(), tmp.end()); - } - eventNameIter++; - } - - if (eventPrefixes.size() > 0) { - stream << "!" << _prefix << "spontaneous"; - } else { - stream << "!" << _prefix << "spontaneous"; - } - - if (eventPrefixes.size() > 0) - stream << " &&"; - - if (eventPrefixes.size() > 1) - stream << " ("; - - std::string seperator; - std::set::iterator eventIter = eventPrefixes.begin(); - while(eventIter != eventPrefixes.end()) { - if (_analyzer->usesComplexEventStruct()) { - stream << seperator << " " << _prefix << "_event.name == " << _analyzer->macroForLiteral(*eventIter); - } else { - stream << seperator << " " << _prefix << "_event == " << _analyzer->macroForLiteral(*eventIter); - } - seperator = " || "; - eventIter++; - } - - if (eventPrefixes.size() > 1) - stream << ")"; - - } - - stream << ")"; - if (currTrans->condition.size() > 0) { - stream << " && (" + ADAPT_SRC(currTrans->condition) + "))"; - } - if (currTrans->hasExecutableContent || currTrans->historyTrans.size() > 0) { - stream << " -> { " << std::endl; - if (!envVarIsTrue("USCXML_ANNOTATE_NOCOMMENT")) { - stream << "/* transition to "; - FlatStateIdentifier flatActiveSource(currTrans->activeDestination); - PRETTY_PRINT_LIST(stream, flatActiveSource.getActive()); - stream << " */" << std::endl; - } - - if (_traceTransitions) { - for (std::set::iterator transRefIter = currTrans->transitionRefs.begin(); transRefIter != currTrans->transitionRefs.end(); transRefIter++) { - stream << padding << " " << _prefix << "transitions[" << *transRefIter << "] = true; " << std::endl; - } - } - - stream << padding << " goto " << _prefix << "t" << currTrans->index << ";" << std::endl; - stream << padding << "}" << std::endl; - - } else { - - stream << " -> {" << std::endl; - GlobalState* newState = _activeConf[currTrans->activeDestination]; - assert(newState != NULL); - - if (!envVarIsTrue("USCXML_ANNOTATE_NOCOMMENT")) { - stream << "/* new state "; - FlatStateIdentifier flatActiveDest(currTrans->activeDestination); - PRETTY_PRINT_LIST(stream, flatActiveDest.getActive()); - stream << " */" << std::endl; - } - stream << padding << " " << _prefix << "s = s" << newState->activeIndex << ";" << std::endl; - - TRANSITION_TRACE(currTrans, false); - writeTransitionClosure(stream, currTrans, newState, indent + 1); - stream << padding << "}" << std::endl; - } - - stream << padding << ":: else -> {" << std::endl; - - writeDispatchingBlock(stream, transitions, indent + 1); - - stream << padding << "}" << std::endl; - stream << padding << "fi;" << std::endl; -} - -void ChartToPromela::writeMain(std::ostream& stream) { - stream << std::endl; - stream << "init {" << std::endl; - if (_varInitializers.size() > 0) { - stream << "/* initialize data model variables */" << std::endl; - std::list::iterator initIter = _varInitializers.begin(); - while(initIter != _varInitializers.end()) { - stream << ADAPT_SRC(beautifyIndentation(*initIter, 1)) << std::endl; - initIter++; - } - stream << std::endl; - } - - stream << " run " << (_prefix.size() == 0 ? "machine_" : _prefix) << "run() priority 10;" << std::endl; - stream << "}" << std::endl; - -} - - -void ChartToPromela::initNodes() { - // some things we share with our invokers - if (_analyzer == NULL) - _analyzer = new PromelaCodeAnalyzer(); - - if (_machinesAll == NULL) { - _machinesAll = new std::map, ChartToPromela*>(); - (*_machinesAll)[_scxml] = this; - } - - if (_machinesAllPerId == NULL) - _machinesAllPerId = new std::map >(); - - if (_parentTopMost == NULL) - _parentTopMost = this; - - _internalQueueLength = getMinInternalQueueLength(MSG_QUEUE_LENGTH); - _externalQueueLength = getMinExternalQueueLength(MSG_QUEUE_LENGTH); - - // get all states - NodeSet states = getAllStates(); - for (size_t i = 0; i < states.size(); i++) { - if (InterpreterImpl::isInEmbeddedDocument(states[i])) - continue; - Element stateElem(states[i]); - _analyzer->addOrigState(ATTR(stateElem, "id")); - if (isCompound(stateElem) || isParallel(stateElem)) { - _analyzer->addEvent("done.state." + ATTR(stateElem, "id")); - } - } - - { - // shorten UUID ids at invokers for readability - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _scxml, true); - invokes.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "uninvoke", _scxml, true)); - - // make sure all invokers have an id! - for (size_t i = 0; i < invokes.size(); i++) { - if (!HAS_ATTR_CAST(invokes[i], "id")) { - Element invokeElem(invokes[i]); - invokeElem.setAttribute("id", "INV_" + UUID::getUUID().substr(0,5)); - } else if (HAS_ATTR_CAST(invokes[i], "id") && UUID::isUUID(ATTR_CAST(invokes[i], "id"))) { - // shorten UUIDs - Element invokeElem(invokes[i]); - invokeElem.setAttribute("id", "INV_" + ATTR_CAST(invokes[i], "id").substr(0,5)); - } - } - - } - - // are there nestes SCXML invokers? - { - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _scxml, true); - for (size_t i = 0; i < invokes.size(); i++) { - if (!HAS_ATTR_CAST(invokes[i], "type") || - ATTR_CAST(invokes[i], "type") == "scxml" || - ATTR_CAST(invokes[i], "type") == "http://www.w3.org/TR/scxml/#SCXMLEventProcessor" || - ATTR_CAST(invokes[i], "type") == "http://www.w3.org/TR/scxml/") { - assert(HAS_ATTR_CAST(invokes[i], "id")); - Element(invokes[i]).setAttribute("name", ATTR_CAST(invokes[i], "id")); - - _prefix = "MAIN_"; - Interpreter nested; - if (HAS_ATTR_CAST(invokes[i], "src")) { - URL absUrl(ATTR_CAST(invokes[i], "src")); - absUrl.toAbsolute(_baseURL[_scxml]); - nested = Interpreter::fromURL(absUrl); - - } else { - NodeSet nestedContent = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", invokes[i]); - assert(nestedContent.size() == 1); - NodeSet nestedRoot = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "scxml", nestedContent[0]); - assert(nestedRoot.size() == 1); - - DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - Document nestedDoc = domFactory.createDocument(_scxml.getOwnerDocument().getNamespaceURI(), "", 0); - Node importRoot = nestedDoc.importNode(nestedRoot[0], true); - nestedDoc.appendChild(importRoot); - - nested = Interpreter::fromDOM(nestedDoc, _nsInfo, _sourceURL); - } - -// std::cout << invokes[i] << std::endl; - - // we found machines but have no prefix - if (_prefix.length() == 0) - _prefix = "MAIN_"; - - _machines[invokes[i]] = new ChartToPromela(nested); - _machines[invokes[i]]->_analyzer = _analyzer; - _machines[invokes[i]]->_parent = this; - _machines[invokes[i]]->_parentTopMost = _parentTopMost; - _machines[invokes[i]]->_machinesAll = _machinesAll; - (*_machinesAll)[invokes[i]] = _machines[invokes[i]]; - - _machines[invokes[i]]->_invokerid = ATTR_CAST(invokes[i], "id"); - _machines[invokes[i]]->_prefix = ATTR_CAST(invokes[i], "id") + "_"; - - _analyzer->addLiteral(_machines[invokes[i]]->_invokerid); - _analyzer->addEvent("done.invoke." + _machines[invokes[i]]->_invokerid); - - _machinesPerId[ATTR_CAST(invokes[i], "id")] = invokes[i]; - (*_machinesAllPerId)[ATTR_CAST(invokes[i], "id")] = invokes[i]; - } - } - } - - if (_machines.size() > 0) { - _analyzer->addCode("_event.invokeid", this); - } - - // gather all potential members per history - std::map >::iterator histIter = _historyTargets.begin(); - while(histIter != _historyTargets.end()) { - NodeSet histStatesMembers; - bool isDeep = (HAS_ATTR_CAST(histIter->second, "type") && ATTR_CAST(histIter->second, "type") == "deep"); - histStatesMembers.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "state", histIter->second.getParentNode(), isDeep)); - histStatesMembers.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "parallel", histIter->second.getParentNode(), isDeep)); - histStatesMembers.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "final", histIter->second.getParentNode(), isDeep)); - - for (size_t i = 0; i < histStatesMembers.size(); i++) { - _historyMembers[histIter->first].insert(std::make_pair(ATTR_CAST(histStatesMembers[i], "id"), i)); - } - histIter++; - } - - // initialize event trie with all events that might occur - NodeSet internalEventNames; - internalEventNames.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "transition", _scxml).asNodeSet()); - internalEventNames.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "raise", _scxml).asNodeSet()); - internalEventNames.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "send", _scxml).asNodeSet()); - - for (size_t i = 0; i < internalEventNames.size(); i++) { - if (HAS_ATTR_CAST(internalEventNames[i], "event")) { - std::string eventNames = ATTR_CAST(internalEventNames[i], "event"); - std::list events = tokenize(eventNames); - for (std::list::iterator eventIter = events.begin(); - eventIter != events.end(); eventIter++) { - std::string eventName = *eventIter; - if (boost::ends_with(eventName, "*")) - eventName = eventName.substr(0, eventName.size() - 1); - if (boost::ends_with(eventName, ".")) - eventName = eventName.substr(0, eventName.size() - 1); - if (eventName.size() > 0) - _analyzer->addEvent(eventName); - } - } - } - -// _analyzer->addCode("bumpDownArrow = 1; _event.foo = 3; forgetSelectedServer = 1;", this); -// exit(0); - - // transform data / assign json into PROMELA statements - { - NodeSet asgn; - asgn.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "data", _scxml, true)); - asgn.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "assign", _scxml, true)); - - for (size_t i = 0; i < asgn.size(); i++) { - if (isInEmbeddedDocument(asgn[i])) - continue; - - Element asgnElem(asgn[i]); - - std::string key; - if (HAS_ATTR(asgnElem, "id")) { - key = ATTR(asgnElem, "id"); - } else if (HAS_ATTR(asgnElem, "location")) { - key = ATTR(asgnElem, "location"); - } - - if (key.length() == 0) - continue; - - std::string value; - if (HAS_ATTR(asgnElem, "expr")) { - value = ATTR(asgnElem, "expr"); - } else if (HAS_ATTR(asgnElem, "src")) { - URL absUrl(ATTR_CAST(asgnElem, "src")); - absUrl.toAbsolute(_baseURL[_scxml]); - value = absUrl.getInContent(); - } else { - NodeSet textChilds = DOMUtils::filterChildType(Node_base::TEXT_NODE, asgnElem); - if (textChilds.size() > 0) { - for (size_t j = 0; j < textChilds.size(); j++) { - value += textChilds[j].getNodeValue(); - } - } - } - - boost::trim(value); - if (value.size() == 0) - continue; - - // remove all children, we will replae by suitable promela statements - while(asgnElem.hasChildNodes()) - asgnElem.removeChild(asgnElem.getFirstChild()); - - std::string newValue; - Data json = Data::fromJSON(value); - if (!json.empty()) { - newValue = dataToAssignments(key, json); - } else { - newValue = key + " = " + value + ";"; - } - newValue = sanitizeCode(newValue); - _analyzer->addCode(newValue, this); - - if (asgnElem.getLocalName() == "data") - _varInitializers.push_back(newValue); - Text newText = _document.createTextNode(newValue); - asgnElem.insertBefore(newText, Node()); - } - } - - // do we need sendid / invokeid? - { - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _scxml, true); - NodeSet sends = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "send", _scxml, true); - NodeSet cancels = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "cancel", _scxml, true); - - if (cancels.size() > 0) { - _analyzer->addCode("_event.invokeid", this); - } - - for (size_t i = 0; i < sends.size(); i++) { - if (HAS_ATTR_CAST(sends[i], "idlocation")) { - _analyzer->addCode("_event.sendid", this); - } - if (HAS_ATTR_CAST(sends[i], "id")) { - _analyzer->addLiteral(ATTR_CAST(sends[i], "id")); - _analyzer->addCode("_event.sendid", this); - } - } - - // do we need delays? - for (size_t i = 0; i < sends.size(); i++) { - if (HAS_ATTR_CAST(sends[i], "delay") || HAS_ATTR_CAST(sends[i], "delayexpr")) { - _analyzer->addCode("_event.delay", this); -#if NEW_DELAY_RESHUFFLE -#else - _analyzer->addCode("_event.seqNr", this); -#endif - } - } - } - - { - // string literals for raise / send content - NodeSet withContent; - withContent.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "send", _scxml, true)); - withContent.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "raise", _scxml, true)); - - for (size_t i = 0; i < withContent.size(); i++) { - NodeSet content = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", withContent[i], true); - for (size_t j = 0; j < content.size(); j++) { - Element contentElem(content[j]); - std::string content = spaceNormalize(contentElem.getFirstChild().getNodeValue()); - if (!isNumeric(content.c_str(), 10)) - _analyzer->addLiteral(content); - } - } - } - - { - // gather all inline promela comments - pmlInlines = PromelaInlines(_scxml); - if (pmlInlines.getAllOfType(PromelaInline::PROMELA_EVENT_ONLY).size() > 0) - _analyzer->addCode("_x.states", this); - - // register events and string literals - for (std::list::iterator inlIter = pmlInlines.allInlines.begin(); inlIter != pmlInlines.allInlines.end(); inlIter++) { - if ((*inlIter)->type != (PromelaInline::PROMELA_EVENT_ONLY)) - continue; - - Data json = Data::fromJSON((*inlIter)->content); - if (!json.empty()) { - std::list eventNames = PromelaInlines::getEventNames(json); - for (std::list::iterator evIter = eventNames.begin(); evIter != eventNames.end(); evIter++) { - _analyzer->addEvent(*evIter); - } - - std::list stringLiterals = PromelaInlines::getStringLiterals(json); - for (std::list::iterator strIter = stringLiterals.begin(); strIter != stringLiterals.end(); strIter++) { - _analyzer->addLiteral(*strIter); - } - - if (json.array.size() > 0) { - for (size_t i = 0; i < json.array.size(); i++) { - std::string expr = dataToAssignments("_event", json.item(i)); - _analyzer->addCode(expr, this); - } - } else { - std::string expr = dataToAssignments("_event", json); - _analyzer->addCode(expr, this); - - } - - } - } - } - - // add platform variables as string literals - _analyzer->addLiteral(_prefix + "_sessionid"); - _analyzer->addLiteral(_prefix + "_name"); - - if (HAS_ATTR(_scxml, "name")) { - _analyzer->addLiteral(ATTR(_scxml, "name"), _analyzer->indexForLiteral(_prefix + "_sessionid")); - } - - NodeSet contents = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", _scxml, true); - for (size_t i = 0; i < contents.size(); i++) { - Element contentElem = Element(contents[i]); - if (contentElem.hasChildNodes() && contentElem.getFirstChild().getNodeType() == Node_base::TEXT_NODE && contentElem.getChildNodes().getLength() == 1) { - std::string content = contentElem.getFirstChild().getNodeValue(); - _analyzer->addLiteral(spaceNormalize(content)); - } - } - - - // extract and analyze source code - std::set allCode; - std::set allStrings; - { - NodeSet withCond; - withCond.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", _scxml, true)); - withCond.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "if", _scxml, true)); - withCond.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "elseif", _scxml, true)); - for (size_t i = 0; i < withCond.size(); i++) { - Element elem = Element(withCond[i]); - if (HAS_ATTR(elem, "cond")) { - std::string code = ATTR(elem, "cond"); - code = sanitizeCode(code); - elem.setAttribute("cond", code); - allCode.insert(code); - } - } - } - { - NodeSet withExpr; - withExpr.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "log", _scxml, true)); - withExpr.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "data", _scxml, true)); - withExpr.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "assign", _scxml, true)); - withExpr.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", _scxml, true)); - withExpr.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "param", _scxml, true)); - for (size_t i = 0; i < withExpr.size(); i++) { - Element elem = Element(withExpr[i]); - if (HAS_ATTR(elem, "expr")) { - std::string code = ATTR(elem, "expr"); - code = sanitizeCode(code); - elem.setAttribute("expr", code); - allCode.insert(code); - } - } - } - { - NodeSet withLocation; - withLocation.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "assign", _scxml, true)); - for (size_t i = 0; i < withLocation.size(); i++) { - Element elem = Element(withLocation[i]); - if (HAS_ATTR(elem, "location")) { - std::string code = ATTR(elem, "location"); - code = sanitizeCode(code); - elem.setAttribute("location", code); - allCode.insert(code); - } - } - } - { - NodeSet withText; - withText.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "script", _scxml, true)); -// withText.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "data", _scxml, true)); - for (size_t i = 0; i < withText.size(); i++) { - NodeSet texts = DOMUtils::filterChildType(Node_base::TEXT_NODE, withText[i], true); - for (size_t j = 0; j < texts.size(); j++) { - if (texts[j].getNodeValue().size() > 0) { - Text elem = Text(texts[j]); - std::string code = elem.getNodeValue(); - code = sanitizeCode(code); - elem.setNodeValue(code); - allCode.insert(code); - } - } - } - } - { - NodeSet foreachs = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "foreach", _scxml, true); - for (size_t i = 0; i < foreachs.size(); i++) { - if (HAS_ATTR_CAST(foreachs[i], "index")) { - allCode.insert(ATTR_CAST(foreachs[i], "index")); - } else { - _hasIndexLessLoops = true; - } - if (HAS_ATTR_CAST(foreachs[i], "item")) { - allCode.insert(ATTR_CAST(foreachs[i], "item")); - } - } - } - for (std::set::const_iterator codeIter = allCode.begin(); codeIter != allCode.end(); codeIter++) { - _analyzer->addCode(*codeIter, this); - } - - // add all namelist entries to the _event structure - { - NodeSet withNamelist; - withNamelist.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "send", _scxml, true)); - withNamelist.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _scxml, true)); - for (size_t i = 0; i < withNamelist.size(); i++) { - if (HAS_ATTR_CAST(withNamelist[i], "namelist")) { - std::string namelist = ATTR_CAST(withNamelist[i], "namelist"); - std::list names = tokenize(namelist); - for (std::list::iterator nameIter = names.begin(); nameIter != names.end(); nameIter++) { - _analyzer->addCode("_event.data." + *nameIter + " = 0;", this); // introduce for _event_t typedef - } - } - } - } -} - -std::list PromelaInlines::getStringLiterals(const Data& data) { - std::list literals; - if (data.atom.size() > 0 && data.type == Data::VERBATIM) { - literals.push_back(data.atom); - } - if (data.array.size() > 0) { - for (std::list::const_iterator arrIter = data.array.begin(); arrIter != data.array.end(); arrIter++) { - std::list nested = getStringLiterals(*arrIter); - literals.insert(literals.end(), nested.begin(), nested.end()); - } - } - if (data.compound.size() > 0) { - for (std::map::const_iterator compIter = data.compound.begin(); compIter != data.compound.end(); compIter++) { - std::list nested = getStringLiterals(compIter->second); - literals.insert(literals.end(), nested.begin(), nested.end()); - } - } - return literals; -} - -std::list PromelaInlines::getEventNames(const Data& data) { - std::list eventNames; - if (data.compound.size() > 0 && data.hasKey("name")) { - eventNames.push_back(data.at("name")); - } - if (data.array.size() > 0) { - for (std::list::const_iterator arrIter = data.array.begin(); arrIter != data.array.end(); arrIter++) { - std::list nested = getEventNames(*arrIter); - eventNames.insert(eventNames.end(), nested.begin(), nested.end()); - } - } - if (data.compound.size() > 0) { - for (std::map::const_iterator compIter = data.compound.begin(); compIter != data.compound.end(); compIter++) { - std::list nested = getEventNames(compIter->second); - eventNames.insert(eventNames.end(), nested.begin(), nested.end()); - } - } - - return eventNames; -} - -std::string ChartToPromela::dataToAssignments(const std::string& prefix, const Data& data) { - std::stringstream retVal; - if (data.atom.size() > 0) { - if (data.type == Data::VERBATIM) { - retVal << prefix << " = " << _analyzer->macroForLiteral(data.atom) << ";" << std::endl; - } else { - retVal << prefix << " = " << data.atom << ";" << std::endl; - } - } else if (data.compound.size() > 0) { - for (std::map::const_iterator cIter = data.compound.begin(); cIter != data.compound.end(); cIter++) { - retVal << dataToAssignments(prefix + "." + cIter->first, cIter->second); - } - } else if (data.array.size() > 0) { - size_t index = 0; - for(std::list::const_iterator aIter = data.array.begin(); aIter != data.array.end(); aIter++) { - retVal << dataToAssignments(prefix + "[" + toStr(index) + "]", *aIter); - index++; - } - } - return retVal.str(); -} - -std::string ChartToPromela::sanitizeCode(const std::string& code) { - std::string replaced = code; - boost::replace_all(replaced, "\"", "'"); - boost::replace_all(replaced, "_sessionid", "_SESSIONID"); - boost::replace_all(replaced, "_name", "_NAME"); - return replaced; -} - - -void ChartToPromela::writeProgram(std::ostream& stream) { - - _traceTransitions = envVarIsTrue("USCXML_PROMELA_TRANSITION_TRACE"); - _writeTransitionPrintfs = envVarIsTrue("USCXML_PROMELA_TRANSITION_DEBUG"); - - if (!HAS_ATTR(_scxml, "datamodel") || ATTR(_scxml, "datamodel") != "promela") { - LOG(ERROR) << "Can only convert SCXML documents with \"promela\" datamodel"; - return; - } - - if (_start == NULL) { - interpret(); - } - - if (HAS_ATTR(_scxml, "binding") && ATTR(_scxml, "binding") != "early") { - LOG(ERROR) << "Can only convert for early data bindings"; - return; - } - -// std::cerr << _scxml << std::endl; - - stream << "/* " << _sourceURL.asString() << " */" << std::endl; - stream << std::endl; - - initNodes(); - - for (std::map, ChartToPromela*>::iterator nestedIter = _machines.begin(); nestedIter != _machines.end(); nestedIter++) { - if (nestedIter->second->_start == NULL) { - nestedIter->second->interpret(); - } - nestedIter->second->initNodes(); - } - - writeEvents(stream); - stream << std::endl; - writeStates(stream); - stream << std::endl; - writeStrings(stream); - stream << std::endl; - if (_analyzer->usesInPredicate()) { - writeStateMap(stream); - stream << std::endl; - } - if (_historyMembers.size() > 0) { - writeHistoryArrays(stream); - stream << std::endl; - } - writeTypeDefs(stream); - stream << std::endl; - writeDeclarations(stream); - stream << std::endl; - - for (std::map, ChartToPromela*>::iterator nestedIter = _machines.begin(); nestedIter != _machines.end(); nestedIter++) { - nestedIter->second->writeDeclarations(stream); - stream << std::endl; - } - - stream << std::endl << "/* global inline functions */" << std::endl; - - if (_analyzer->usesComplexEventStruct()) { - stream << "hidden _event_t tmpE;" << std::endl; - } else { - stream << "hidden int tmpE;" << std::endl; - } - stream << "hidden int tmpIndex;" << std::endl; - - -#if NEW_DELAY_RESHUFFLE - if (_analyzer->usesEventField("delay")) { - writeInsertWithDelay(stream); - stream << std::endl; - } -#endif - - if (_analyzer->usesEventField("delay") && _machines.size() > 0) { - writeDetermineShortestDelay(stream); - stream << std::endl; - writeAdvanceTime(stream); - stream << std::endl; - writeRescheduleProcess(stream); - stream << std::endl; - writeScheduleMachines(stream); - stream << std::endl; - } - - { - NodeSet cancels = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "cancel", _scxml, true); - if (cancels.size() > 0) { - writeCancelEvents(stream); - stream << std::endl; - } - } - { - NodeSet invokes = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _scxml, true); - if (invokes.size() > 0 && _analyzer->usesEventField("delay")) { - writeRemovePendingEventsFromInvoker(stream); - stream << std::endl; - } - - } - stream << std::endl; - writeEventSources(stream); - stream << std::endl; - writeFSM(stream); - stream << std::endl; - writeMain(stream); - stream << std::endl; - - for (std::map, ChartToPromela*>::iterator nestedIter = _machines.begin(); nestedIter != _machines.end(); nestedIter++) { - nestedIter->second->writeFSM(stream); - stream << std::endl; - } - - // write ltl expression for success - std::stringstream acceptingStates; - std::string seperator; - - for (std::map::iterator stateIter = _activeConf.begin(); stateIter != _activeConf.end(); stateIter++) { - FlatStateIdentifier flatId(stateIter->first); - if (std::find(flatId.getActive().begin(), flatId.getActive().end(), "pass") != flatId.getActive().end()) { - acceptingStates << seperator << _prefix << "s == s" << stateIter->second->activeIndex; - seperator = " || "; - } - } - if (acceptingStates.str().size() > 0) { - stream << "ltl { eventually (" << acceptingStates.str() << ") }" << std::endl; - } -} - -} \ No newline at end of file diff --git a/src/uscxml/transform/ChartToPromela.h b/src/uscxml/transform/ChartToPromela.h deleted file mode 100644 index 82c4e5d..0000000 --- a/src/uscxml/transform/ChartToPromela.h +++ /dev/null @@ -1,447 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef CHARTTOPROMELA_H_RP48RFDJ -#define CHARTTOPROMELA_H_RP48RFDJ - -#include "Transformer.h" -#include "ChartToFSM.h" -#include "uscxml/interpreter/InterpreterDraft6.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/util/Trie.h" - -#include -#include -#include -#include - -namespace uscxml { - -class PromelaCodeAnalyzer; -class ChartToPromela; -class PromelaParserNode; - -class USCXML_API PromelaInline { -public: - enum PromelaInlineType { - PROMELA_NIL = 0x0000, - PROMELA_LTL = 0x0001, - PROMELA_CODE = 0x0002, - PROMELA_EVENT_ALL_BUT = 0x0004, - PROMELA_EVENT_ONLY = 0x0008, - PROMELA_PROGRESS_LABEL = 0x0010, - PROMELA_ACCEPT_LABEL = 0x0020, - PROMELA_END_LABEL = 0x0040 - }; - - PromelaInline(const Arabica::DOM::Node& node); - virtual ~PromelaInline() {} - - operator bool() { - return (type != PROMELA_NIL); - } - - std::list children; - PromelaInline* prevSibling; - PromelaInline* nextSibling; - - virtual void dump(); - - virtual bool relatesTo(const Arabica::DOM::Node& node) { - return container == node; - } - - size_t level; - std::string content; - Arabica::DOM::Element container; - PromelaInlineType type; - -protected: - PromelaInline() : prevSibling(NULL), nextSibling(NULL), type(PROMELA_NIL) {}; -}; - -class USCXML_API PromelaInlines { -public: - - PromelaInlines(const Arabica::DOM::Node& node); - PromelaInlines() {} - - virtual ~PromelaInlines(); - - std::list getRelatedTo(const Arabica::DOM::Node& node, PromelaInline::PromelaInlineType type); - std::list getAllOfType(uint32_t type); - - std::map, std::list > inlines; - std::list allInlines; - - static std::list getStringLiterals(const Data& data); - static std::list getEventNames(const Data& data); - - -}; - -class USCXML_API PromelaEventSource : public PromelaInline { -public: - PromelaEventSource(const PromelaInline& pmlInline) { - type = pmlInline.type; - container = pmlInline.container; - content = pmlInline.content; - events = Data::fromJSON(pmlInline.content); - } - - virtual bool relatesTo(const Arabica::DOM::Node& node) { - return container == node || InterpreterImpl::isDescendant(node, container); - } - - Data events; -}; - -#if 0 - - -class USCXML_API PromelaInlinesAutoEvents : public PromelaInline { -public: - virtual ~PromelaInlinesAutoEvents() {} - virtual bool relatesTo(const Arabica::DOM::Node&); - virtual void setContent(const std::string& content); - virtual void dump(); - - std::map states; -}; - - -class USCXML_API PromelaEventSource { -public: - - enum PromelaEventSourceType { - PROMELA_EVENT_SOURCE_INVALID, - PROMELA_EVENT_SOURCE_INVOKER, - PROMELA_EVENT_SOURCE_GLOBAL, - }; - - PromelaEventSource(); - PromelaEventSource(const PromelaInline& source, PromelaCodeAnalyzer* analyzer = NULL, uint32_t externalQueueLength = 0); - - void writeStart(std::ostream& stream, int indent = 0); - void writeStop(std::ostream& stream, int indent = 0); - void writeDeclarations(std::ostream& stream, int indent = 0); - void writeBody(std::ostream& stream); - - operator bool() { - return type != PROMELA_EVENT_SOURCE_INVALID; - } - - PromelaInline source; - std::string name; - uint32_t externalQueueLength; - uint32_t longestSequence; - - Arabica::DOM::Node container; - std::list > sequences; - PromelaEventSourceType type; - PromelaCodeAnalyzer* analyzer; -}; - -#endif - -class USCXML_API PromelaCodeAnalyzer { -public: - class PromelaTypedef { - public: - PromelaTypedef() : arraySize(0), minValue(0), maxValue(0) {} - std::string name; - std::string type; - size_t arraySize; - size_t minValue; - size_t maxValue; - std::map types; - std::set occurrences; - - bool operator==(const PromelaTypedef& other) const { - return name == other.name; - } - - }; - - PromelaCodeAnalyzer() : _eventTrie("."), _lastStrIndex(1), _lastStateIndex(0), _lastEventIndex(1), _usesInPredicate(false), _usesPlatformVars(false) { - } - - void addCode(const std::string& code, ChartToPromela* interpreter); - void addEvent(const std::string& eventName); - void addState(const std::string& stateName); - void addOrigState(const std::string& stateName); - void addLiteral(const std::string& stateName, int forceIndex = -1); - - bool usesComplexEventStruct() { - return _typeDefs.types.find("_event") != _typeDefs.types.end() && _typeDefs.types["_event"].types.size() > 0; - } - bool usesEventField(const std::string& fieldName) { - if (usesComplexEventStruct() && _typeDefs.types["_event"].types.find(fieldName) != _typeDefs.types["_event"].types.end()) - return true; - return false; - } - - bool usesEventDataField(const std::string& fieldName) { - if (usesComplexEventStruct() && - _typeDefs.types["_event"].types.find("data") != _typeDefs.types["_event"].types.end() && - _typeDefs.types["_event"].types["data"].types.find(fieldName) != _typeDefs.types["_event"].types["data"].types.end()) - return true; - return false; - } - - std::string getTypeAssignment(const std::string& varTo, const std::string& varFrom, const PromelaTypedef& type, const std::string padding = ""); - std::string getTypeReset(const std::string& var, const PromelaTypedef& type, const std::string padding = ""); - - bool usesInPredicate() { - return _usesInPredicate; - } - void usesInPredicate(bool value) { - _usesInPredicate = value; - } - bool usesPlatformVars() { - return _usesPlatformVars; - } - - std::string macroForLiteral(const std::string& literal); - int indexForLiteral(const std::string& literal); - - std::set getLiterals() { - return _strLiterals; - } - std::set getEventsWithPrefix(const std::string& prefix); - std::map& getEvents() { - return _events; - } - - std::map& getStates() { - return _states; - } - - std::map& getOrigStates() { - return _origStateIndex; - } - - - Trie& getTrie() { - return _eventTrie; - } - - std::string adaptCode(const std::string& code, const std::string& prefix); - - static std::string prefixIdentifiers(const std::string& expr, const std::string& prefix); - static std::list > getTokenPositions(const std::string& expr, int type, PromelaParserNode* ast); - - PromelaTypedef& getTypes() { - return _typeDefs; - } - - PromelaTypedef& getType(const std::string& typeName) { - return _typeDefs.types.at(typeName); - } - -protected: - std::string createMacroName(const std::string& literal); - int enumerateLiteral(const std::string& literal, int forceIndex = -1); - - std::set _strLiterals; // all string literals - std::map _strMacroNames; // macronames for string literals - std::map _strIndex; // integer enumeration for string - std::map _origStateIndex; // state enumeration for original states - - std::map _states; - std::map _events; - - PromelaTypedef _typeDefs; - Trie _eventTrie; - -private: - std::set _macroNameSet; // helper set for uniqueness of macros - int _lastStrIndex; - int _lastStateIndex; - int _lastEventIndex; - bool _usesInPredicate; - bool _usesPlatformVars; -}; - -class ExecContentSeqItem { -public: - enum ExecContentType { - EXEC_CONTENT_ALL_BUT, - EXEC_CONTENT_ONLY_FOR, - EXEC_CONTENT_EVERY - }; - - ExecContentSeqItem(ExecContentType type, const std::set& transitions, const GlobalTransition::Action& action) - : type(type), transitions(transitions), action(action) {} - ExecContentSeqItem(ExecContentType type, GlobalTransition* transition, const GlobalTransition::Action& action) - : type(type), action(action) { - transitions.insert(transition); - } - - ExecContentType type; - std::set transitions; - GlobalTransition::Action action; -}; - -class HistoryTransitionClass { -public: - HistoryTransitionClass(GlobalTransition* transition); - HistoryTransitionClass(const std::string& from, const std::string& to); - - void init(const std::string& from, const std::string& to); - - std::map > toRemember; - std::map > toKeep; - std::map > toForget; - - std::set members; - - - void merge(const HistoryTransitionClass& other); - bool matches(const HistoryTransitionClass& other); -}; - -class USCXML_API ChartToPromela : public TransformerImpl, public ChartToFSM { -public: - - virtual ~ChartToPromela(); - static Transformer transform(const Interpreter& other); - - void writeTo(std::ostream& stream); - -protected: - ChartToPromela(const Interpreter& other) - : TransformerImpl(), - ChartToFSM(other), - _analyzer(NULL), - _allowEventInterleaving(false), - _hasIndexLessLoops(false), - _writeTransitionPrintfs(false), - _traceTransitions(false), - _machinesAll(NULL), - _parent(NULL), - _parentTopMost(NULL), - _machinesAllPerId(NULL), - _perfTransProcessed(0), - _perfTransTotal(0), - _perfHistoryProcessed(0), - _perfHistoryTotal(0), - _perfStatesProcessed(0), - _perfStatesTotal(0), - _lastTimeStamp(0) {} - - void initNodes(); - - static std::string beautifyIndentation(const std::string& code, int indent = 0); - - void writeProgram(std::ostream& stream); - - void writeEvents(std::ostream& stream); - void writeStates(std::ostream& stream); - void writeStateMap(std::ostream& stream); - void writeHistoryArrays(std::ostream& stream); - void writeTypeDefs(std::ostream& stream); - void writeStrings(std::ostream& stream); - void writeDeclarations(std::ostream& stream); - void writeEventSources(std::ostream& stream); - void writeTransition(std::ostream& stream, GlobalTransition* transition, int indent = 0); - std::string conditionalizeForHist(const std::set& transitions, int indent = 0); - std::string conditionalizeForHist(GlobalTransition* transition, int indent = 0); - void writeHistoryAssignments(std::ostream& stream, GlobalTransition* transition, int indent = 0); - void writeTransitionClosure(std::ostream& stream, GlobalTransition* transition, GlobalState* state, int indent = 0); - - void writeExecutableContent(std::ostream& stream, const Arabica::DOM::Node& node, int indent = 0); - void writeInlineComment(std::ostream& stream, const Arabica::DOM::Node& node); - void writeFSM(std::ostream& stream); - void writeEventDispatching(std::ostream& stream); - void writeMain(std::ostream& stream); - - void writeIfBlock(std::ostream& stream, const Arabica::XPath::NodeSet& condChain, int indent = 0); - void writeDispatchingBlock(std::ostream& stream, std::list, int indent = 0); - - void writeStartInvoker(std::ostream& stream, const Arabica::DOM::Node& node, ChartToPromela* invoker, int indent = 0); - //void writeRemovePendingEventsFromInvoker(std::ostream& stream, ChartToPromela* invoker, int indent = 0, bool atomic = true); - - void writeDetermineShortestDelay(std::ostream& stream, int indent = 0); - void writeInsertWithDelay(std::ostream& stream, int indent = 0); - void writeAdvanceTime(std::ostream& stream, int indent = 0); - void writeRescheduleProcess(std::ostream& stream, int indent = 0); - void writeScheduleMachines(std::ostream& stream, int indent = 0); - void writeCancelEvents(std::ostream& stream, int indent = 0); - void writeRemovePendingEventsFromInvoker(std::ostream& stream, int indent = 0); - - std::list getTransientContent(GlobalTransition* transition); - //Arabica::DOM::Node getUltimateTarget(const Arabica::DOM::Element& transition); - - static std::string declForRange(const std::string& identifier, long minValue, long maxValue, bool nativeOnly = false); - static std::string conditionForHistoryTransition(const GlobalTransition* transition); - -// std::string replaceStringsInExpression(const std::string& expr); - - std::string sanitizeCode(const std::string& code); - std::string dataToAssignments(const std::string& prefix, const Data& data); - -// Arabica::XPath::NodeSet _globalStates; -// Arabica::DOM::Node _startState; -// std::map > _states; -// std::map, int> _transitions; - - std::list _varInitializers; // pending initializations for arrays - - PromelaCodeAnalyzer* _analyzer; - bool _allowEventInterleaving; - bool _hasIndexLessLoops; - bool _writeTransitionPrintfs; - bool _traceTransitions; - - uint32_t _externalQueueLength; - uint32_t _internalQueueLength; - - PromelaInlines pmlInlines; -// std::map _invokers; -// PromelaEventSource _globalEventSource; - - std::map > _historyMembers; // ids of all history states - std::set _dataModelVars; - - Arabica::DOM::Node _finalize; - std::map, ChartToPromela*> _machines; - std::map, ChartToPromela*>* _machinesAll; - ChartToPromela* _parent; // our invoking interpreter - ChartToPromela* _parentTopMost; - - std::map > _machinesPerId; - std::map >* _machinesAllPerId; - std::string _prefix; // our prefix in case of nested SCXML documents - std::string _invokerid; - - uint64_t _perfTransProcessed; - uint64_t _perfTransTotal; - uint64_t _perfHistoryProcessed; - uint64_t _perfHistoryTotal; - uint64_t _perfStatesProcessed; - uint64_t _perfStatesTotal; - uint64_t _lastTimeStamp; - - friend class PromelaEventSource; -}; - -} - -#endif /* end of include guard: CHARTTOPROMELA_H_RP48RFDJ */ diff --git a/src/uscxml/transform/ChartToTex.cpp b/src/uscxml/transform/ChartToTex.cpp deleted file mode 100644 index 9d30be5..0000000 --- a/src/uscxml/transform/ChartToTex.cpp +++ /dev/null @@ -1,291 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "uscxml/transform/ChartToFSM.h" -#include "uscxml/transform/ChartToTex.h" -#include "uscxml/transform/FlatStateIdentifier.h" - -#include -#include -#include "uscxml/UUID.h" -#include -#include -#include - - -namespace uscxml { - -using namespace Arabica::DOM; -using namespace Arabica::XPath; - -ChartToTex::~ChartToTex() { -} - -Transformer ChartToTex::transform(const Interpreter& other) { - return boost::shared_ptr(new ChartToTex(other)); -} - -void ChartToTex::writeTo(std::ostream& stream) { - writeTex(stream); -} - -void ChartToTex::writeTex(std::ostream& stream) { - _keepInvalidTransitions = true; - if (_start == NULL) { - interpret(); - } - - bool wroteRowStart = false; - std::string seperator; - - for (std::map::iterator stateIter = _globalConf.begin(); stateIter != _globalConf.end(); stateIter++) { - assert(_indexToState.find(stateIter->second->index) == _indexToState.end()); - _indexToState[stateIter->second->index] = stateIter->second; - } - - stream << "% " << _sourceURL.asString() << std::endl; - - stream << "%<*provideCommand>" << std::endl; - stream << "\\providecommand{\\globalStateListCell}[2][c]{%" << std::endl; - stream << " \\begin{tabular}[#1]{@{}l@{}}#2\\end{tabular}}" << std::endl; - stream << "%" << std::endl; - - - stream << std::endl; - -// stream << "\\begin{table}[H]" << std::endl; -// stream << "\\centering" << std::endl; -// stream << "\\begin{tabular}{r | l | L{12em} | l}" << std::endl; - - stream << "\\begin{longtable}{| r | l | l | l |}" << std::endl; - - for (std::map::iterator stateIter = _indexToState.begin(); stateIter != _indexToState.end(); stateIter++) { - GlobalState* currState = stateIter->second; - - stream << "\\hline" << std::endl; - - if (!wroteRowStart) { - stream << "%<*tableRows>" << std::endl; - wroteRowStart = true; - } - - stream << "%<*globalState" << currState->index << ">" << std::endl; - - // state index - stream << "\\tikzmark{statename_" << currState->index << "}" << "$\\widetilde{s}(" << currState->index << ")$ & "; - - // members in active configuration - FlatStateIdentifier flatId(currState->stateId); - stream << "\\globalStateListCell[t]{"; - stream << "\\tikzmark{active_" << currState->index << "}"; - stream << "$\\widetilde{s}_a(" << currState->index << ")$: " << stateListToTex(flatId.getFlatActive(), flatId.getActive().size() == 0) << "\\\\"; - - // already visited states - stream << "\\tikzmark{visited_" << currState->index << "}"; - stream << "$\\widetilde{s}_d(" << currState->index << ")$: " << stateListToTex(flatId.getFlatVisited(), flatId.getVisited().size() == 0) << "\\\\"; - - // history assignments - stream << "\\tikzmark{history_" << currState->index << "}"; - stream << "$\\widetilde{s}_h(" << currState->index << ")$: " << stateListToTex(flatId.getFlatHistory(), flatId.getHistory().size() == 0) << "} & "; - - // all transitions - std::set origTransitions; - for (std::list::iterator transIter = stateIter->second->sortedOutgoing.begin(); transIter != stateIter->second->sortedOutgoing.end(); transIter++) { - GlobalTransition* currTrans = *transIter; - Arabica::XPath::NodeSet members = currTrans->getTransitions(); - for (size_t i = 0; i < members.size(); i++) { - Element transElem(members[i]); - if (HAS_ATTR(transElem, "priority")) { - origTransitions.insert(ATTR(transElem, "priority")); - } else { - origTransitions.insert("initial"); - } - } - } - - if (origTransitions.size() > 0) { - stream << "$\\{ "; - seperator = ""; - for (std::set::reverse_iterator transIter = origTransitions.rbegin(); transIter != origTransitions.rend(); transIter++) { - stream << seperator << "t_{" << *transIter << "}"; - seperator = ", "; - } - stream << " \\}$"; - } else { - stream << "$\\emptyset$"; - } - stream << "\\tikzmark{transitions_" << currState->index << "}"; - stream << " & \\\\ \\hline" << std::endl; - - if (stateIter->second->sortedOutgoing.size() > 0) { - stream << "$\\widetilde{\\mathcal{T}}(" << currState->index << ")$" << std::endl; - - size_t ecIndex = 0; - for (std::list::iterator transIter = stateIter->second->sortedOutgoing.begin(); transIter != stateIter->second->sortedOutgoing.end(); transIter++, ecIndex++) { - GlobalTransition* currTrans = *transIter; - stream << "& "; - stream << "\\tikzmark{trans_set" << currState->index << "_" << ecIndex << "}"; - - if (!currTrans->isValid) - stream << "\\sout{"; - - Arabica::XPath::NodeSet members = currTrans->getTransitions(); - if (members.size() > 0) { - stream << "$\\{ "; - seperator = ""; - for (size_t i = 0; i < members.size(); i++) { - Element transElem(members[i]); - if (HAS_ATTR(transElem, "priority")) { - stream << seperator << "t_{" << ATTR(transElem, "priority") << "}"; - } else { - stream << seperator << "t_{initial}"; - } - seperator = ", "; - } - stream << " \\}$"; - } else { - stream << "$\\emptyset$"; - } - // stream << "& \\sout{$\\{ t_2, t_0 \\}$}, & \\emph{$Inv_4$: nested source states} \\\\" << std::endl; - // stream << "& $\\{ t_2 \\}$ & & $\\widetilde{s}(2)$ \\\\" << std::endl; - // stream << "& $\\{ t_0 \\}$ & & $\\widetilde{s}(4)$ \\\\" << std::endl; - - if (!currTrans->isValid) { -#if 1 - stream << " } & \\emph{"; - switch(currTrans->invalidReason) { - case GlobalTransition::NO_COMMON_EVENT: - stream << "$Inv_1$: "; - break; - case GlobalTransition::MIXES_EVENT_SPONTANEOUS: - stream << "$Inv_2$: "; - break; - case GlobalTransition::SAME_SOURCE_STATE: - stream << "$Inv_3$: "; - break; - case GlobalTransition::CHILD_ENABLED: - stream << "$Inv_4$: "; - break; - case GlobalTransition::PREEMPTING_MEMBERS: - stream << "$Inv_5$: "; - break; - case GlobalTransition::UNCONDITIONAL_MATCH: - stream << "$Opt_1$: "; - break; - case GlobalTransition::UNCONDITIONAL_SUPERSET: - stream << "$Opt_2$: "; - break; - } - stream << currTrans->invalidMsg << "} "; -#endif - stream << "\\tikzmark{exec_content" << currState->index << "_" << ecIndex << "}"; - stream << " & "; - } else { - stream << " & "; - std::stringstream execContentSS; - - seperator = ""; - for (std::list::iterator actionIter = currTrans->actions.begin(); actionIter != currTrans->actions.end(); actionIter++) { - Element execContent; - - if (actionIter->onEntry) - execContent = actionIter->onEntry; - - if (actionIter->raiseDone) - execContent = actionIter->raiseDone; - - if (actionIter->onExit) - execContent = actionIter->onExit; - - if (actionIter->transition) - execContent = actionIter->transition; - - if (execContent) { - if (HAS_ATTR(execContent, "line_start") && HAS_ATTR(execContent, "line_end")) { - size_t lineStart = strTo(ATTR(execContent, "line_start")); - size_t lineEnd = strTo(ATTR(execContent, "line_end")); - lineStart++; - lineEnd--; - if (lineStart == lineEnd) { - execContentSS << seperator << "l_{" << lineStart << "}"; - } else { - execContentSS << seperator << "l_{" << lineStart << "-" << lineEnd << "}"; - } - } - seperator = ", "; - } - } - - if (execContentSS.str().size() > 0) { - stream << "$\\mathcal{X} := (" << execContentSS.str() << ")$"; - } else { - stream << "$\\emptyset$"; - } - stream << "\\tikzmark{exec_content" << currState->index << "_" << ecIndex << "}"; - - stream << " & $\\widetilde{s}(" << _globalConf[currTrans->destination]->index << ")$ "; - stream << "\\tikzmark{target" << currState->index << "_" << ecIndex << "}"; - } - - stream << "\\\\" << std::endl; - } - if (stateIter->second->sortedOutgoing.size() == 0) { - stream << " & & & \\\\" << std::endl; - } - - stream << "\\hline" << std::endl; - } - stream << "%index << ">" << std::endl; - - } - if (wroteRowStart) { - stream << "%" << std::endl; - } - -// stream << "\\end{tabular}" << std::endl; -// stream << "\\end{table}" << std::endl << std::endl; - stream << "\\end{longtable}" << std::endl << std::endl; - -} - -std::string ChartToTex::stateListToTex(const std::string& input, bool isEmpty) { - std::string statesTex; - if (!isEmpty) { - statesTex = input; - boost::replace_all(statesTex, "active:", ""); - boost::replace_all(statesTex, "history:", ""); - boost::replace_all(statesTex, "visited:", ""); - statesTex = "\\texttt{" + texEscape(statesTex) + "}"; - } else { - statesTex = "$\\emptyset$"; - } - return statesTex; -} - -std::string ChartToTex::texEscape(const std::string& input) { - std::string texString(input); - boost::replace_all(texString, "\\", "\\\\"); - boost::replace_all(texString, "{", "\\{"); - boost::replace_all(texString, "}", "\\}"); - boost::replace_all(texString, ",", ", "); - return texString; -} - - -} \ No newline at end of file diff --git a/src/uscxml/transform/ChartToTex.h b/src/uscxml/transform/ChartToTex.h deleted file mode 100644 index de3743e..0000000 --- a/src/uscxml/transform/ChartToTex.h +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef CHARTTOTEX_H_2B7D5889 -#define CHARTTOTEX_H_2B7D5889 - - -#include "Transformer.h" -#include "ChartToFSM.h" -#include "uscxml/Interpreter.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/util/Trie.h" - -#include -#include -#include -#include - -namespace uscxml { - -class USCXML_API ChartToTex : public TransformerImpl, public ChartToFSM { -public: - - virtual ~ChartToTex(); - static Transformer transform(const Interpreter& other); - - void writeTo(std::ostream& stream); - -protected: - ChartToTex(const Interpreter& other) - : TransformerImpl(), - ChartToFSM(other) {} - - void writeTex(std::ostream& stream); - - std::map _indexToState; - -private: - static std::string stateListToTex(const std::string& input, bool isEmpty); - static std::string texEscape(const std::string& input); -}; - -} - -#endif /* end of include guard: CHARTTOTEX_H_2B7D5889 */ diff --git a/src/uscxml/transform/ChartToVHDL.cpp b/src/uscxml/transform/ChartToVHDL.cpp index 127dc91..e80b543 100644 --- a/src/uscxml/transform/ChartToVHDL.cpp +++ b/src/uscxml/transform/ChartToVHDL.cpp @@ -16,16 +16,15 @@ * program. If not, see . * @endcond */ +#if 0 #include "uscxml/transform/ChartToVHDL.h" -#include "uscxml/debug/Complexity.h" -#include #include -#include "uscxml/UUID.h" -#include "uscxml/dom/DOMUtils.h" +#include "uscxml/util/UUID.h" +#include "uscxml/util/DOM.h" #include #include -#include +#include #include #include @@ -1450,4 +1449,6 @@ void ChartToVHDL::writeSystemSignalMapping(std::ostream & stream) { stream << std::endl; } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/src/uscxml/transform/ChartToVHDL.h b/src/uscxml/transform/ChartToVHDL.h index 8e5a3ef..3d8b00d 100644 --- a/src/uscxml/transform/ChartToVHDL.h +++ b/src/uscxml/transform/ChartToVHDL.h @@ -20,15 +20,12 @@ #ifndef CHARTOVHDL_H #define CHARTOVHDL_H -#include "uscxml/interpreter/InterpreterDraft6.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/util/Trie.h" +#include "uscxml/util/DOM.h" +#include "uscxml/transform/Trie.h" #include "Transformer.h" #include "ChartToC.h" -#include -#include -#include +#include #include #include @@ -194,15 +191,15 @@ protected: // event generation void writeExContentBlock(std::ostream & stream, std::string index, - std::list< Arabica::DOM::Element > commandSequence); + std::list commandSequence); Trie _eventTrie; - Arabica::XPath::NodeSet _execContent; + std::list _execContent; private: std::string eventNameEscape(const std::string& eventName); - std::string getLineForExecContent(const Arabica::DOM::Node& elem); + std::string getLineForExecContent(const xercesc::DOMElement* elem); }; diff --git a/src/uscxml/transform/FlatStateIdentifier.h b/src/uscxml/transform/FlatStateIdentifier.h deleted file mode 100644 index 2d62651..0000000 --- a/src/uscxml/transform/FlatStateIdentifier.h +++ /dev/null @@ -1,287 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef FLATSTATEIDENTIFIER_H_E9534AF9 -#define FLATSTATEIDENTIFIER_H_E9534AF9 - -#include "uscxml/Common.h" -#include "uscxml/Convenience.h" -#include "uscxml/dom/DOMUtils.h" - -#include - -#include -#include -#include -#include - -#include - -namespace uscxml { - -class USCXML_API FlatStateIdentifier { -public: - - operator bool() const { - return stateId.length() > 0; - } - - bool operator<( const FlatStateIdentifier& other) const { - return stateId < other.stateId; - } - - FlatStateIdentifier(const Arabica::XPath::NodeSet& activeStates, - const Arabica::XPath::NodeSet& alreadyEnteredStates, - const std::map >& historyStates) { - for (size_t i = 0; i < activeStates.size(); i++) { - active.push_back(ATTR_CAST(activeStates[i], "id")); - } - - for (size_t i = 0; i < alreadyEnteredStates.size(); i++) { - const Arabica::DOM::NodeList& children = alreadyEnteredStates[i].getChildNodes(); - bool isRelevant = false; - for (size_t j = 0; j < children.getLength(); j++) { - if (children.item(j).getNodeType() != Arabica::DOM::Node_base::ELEMENT_NODE) - continue; - if (iequals(LOCALNAME_CAST(children.item(j)), "data") || iequals(LOCALNAME_CAST(children.item(j)), "datamodel")) { - isRelevant = true; - break; - } - } - if (isRelevant) - visited.push_back(ATTR_CAST(alreadyEnteredStates[i], "id")); - } - - std::map >::const_iterator histIter; - for (histIter = historyStates.begin(); histIter != historyStates.end(); histIter++) { - for (size_t i = 0; i < histIter->second.size(); i++) { - histories[histIter->first].push_back(ATTR_CAST(histIter->second[i], "id")); - } - } - - initStateId(); - } - - - FlatStateIdentifier(const std::list& active, - const std::list& visited, - const std::map >& histories) : active(active), visited(visited), histories(histories) { - initStateId(); - } - - static std::string toStateId(const std::list active, - const std::list visited = std::list(), - const std::map > histories = std::map >()) { - FlatStateIdentifier tmp(active, visited, histories); - return tmp.getStateId(); - } - - static std::string toStateId(const Arabica::XPath::NodeSet activeStates, - const Arabica::XPath::NodeSet alreadyEnteredStates = Arabica::XPath::NodeSet(), - const std::map > historyStates = std::map >()) { - FlatStateIdentifier tmp(activeStates, alreadyEnteredStates, historyStates); - return tmp.getStateId(); - } - - FlatStateIdentifier(const std::string& identifier) : stateId(identifier) { - std::string parsedName; - // parse unique state identifier - std::stringstream elemNameSS(identifier); - std::string section; - while(std::getline(elemNameSS, section, ';')) { - if (boost::starts_with(section, "active:{")) { - // active:{s0,s1,s2} - std::stringstream stateSS(section.substr(8, section.size() - 9)); - std::string state; - while(std::getline(stateSS, state, ',')) { - size_t closingBracketPos = state.find("}"); - if (closingBracketPos != std::string::npos) { - state = state.substr(0, closingBracketPos); - } - boost::trim(state); - if (state.length() > 0) { - active.push_back(state); - } - } - } else if (boost::starts_with(section, "visited:{")) { - // entered:{s0,s1,s2} - std::stringstream stateSS(section.substr(9, section.size() - 10)); - std::string state; - while(std::getline(stateSS, state, ',')) { - size_t closingBracketPos = state.find("}"); - if (closingBracketPos != std::string::npos) { - state = state.substr(0, closingBracketPos); - } - boost::trim(state); - if (state.length() > 0) { - visited.push_back(state); - } - } - } else if (boost::starts_with(section, "history:{")) { - // history:{h0:{s1,s2},h1:{s2,s3}} - std::string histEntries(section.substr(9, section.length() - 10)); - - std::string state; - size_t start = 0; - size_t history = 0; - - while((history = histEntries.find(":", start)) != std::string::npos) { - std::string histName = histEntries.substr(start, history - start); - history++; - - size_t end = histEntries.find("}", start); - if (end == std::string::npos) - continue; - - std::stringstream stateSS(histEntries.substr(history + 1, end - history - 1)); - std::string state; - while(std::getline(stateSS, state, ',')) { - size_t closingBracketPos = state.find("}"); - if (closingBracketPos != std::string::npos) { - state = state.substr(0, closingBracketPos); - } - boost::trim(state); - if (state.length() > 0) { - histories[histName].push_back(state); - } - - } - - start = end + 2; - } - } - } - initStateId(); - } - - const std::string& getStateId() const { - return stateId; - } - - const std::list& getActive() const { - return active; - } - const std::string& getFlatActive() const { - return flatActive; - } - - - const std::string& getFlatHistory() const { - return flatHistories; - } - - const std::list& getVisited() const { - return visited; - } - const std::string& getFlatVisited() const { - return flatVisited; - } - - - const std::map > & getHistory() const { - return histories; - } - - const std::map > getHistorySets() { - std::map > histSet; - std::map >::const_iterator histIter = histories.begin(); - while(histIter != histories.end()) { - histSet[histIter->first].insert(histIter->second.begin(), histIter->second.end()); - histIter++; - } - return histSet; - } - -protected: - std::list active; - std::list visited; - std::map > histories; - - std::string flatActive; - std::string flatVisited; - std::string flatHistories; - - std::string stateId; - - void initStateId() { - std::stringstream stateIdSS; - std::string seperator; - - std::stringstream flatActiveSS; - flatActiveSS << "active:{"; - for (std::list::const_iterator actIter = active.begin(); actIter != active.end(); actIter++) { - flatActiveSS << seperator << *actIter; - seperator = ","; - } - flatActiveSS << "}"; - flatActive = flatActiveSS.str(); - stateIdSS << flatActive; - - if (visited.size() > 0) { - std::stringstream flatVisitedSS; - seperator = ""; - flatVisitedSS << "visited:{"; - for (std::list::const_iterator visitIter = visited.begin(); visitIter != visited.end(); visitIter++) { - flatVisitedSS << seperator << *visitIter; - seperator = ","; - } - flatVisitedSS << "}"; - flatVisited = flatVisitedSS.str(); - stateIdSS << ";" << flatVisited; - } - - if (histories.size() > 0) { - std::stringstream flatHistorySS; - seperator = ""; - flatHistorySS << "history:{"; - for (std::map >::const_iterator histIter = histories.begin(); histIter != histories.end(); histIter++) { - flatHistorySS << seperator << histIter->first << ":{"; - seperator = ","; - std::string itemSeperator; - for (std::list::const_iterator histItemIter = histIter->second.begin(); histItemIter != histIter->second.end(); histItemIter++) { - flatHistorySS << itemSeperator << *histItemIter; - itemSeperator = ","; - } - flatHistorySS << "}"; - } - flatHistorySS << "}"; - flatHistories = flatHistorySS.str(); - stateIdSS << ";" << flatHistories; - } - - stateId = stateIdSS.str(); - } - -#if 0 - std::string activeId() { - std::stringstream activeSS; - activeSS << "active-"; - for (std::list::const_iterator activeIter = active.begin(); activeIter != active.end(); activeIter++) { - activeSS << *activeIter << "-"; - } - return activeSS.str(); - } - -#endif - -}; - -} - -#endif /* end of include guard: FLATSTATEIDENTIFIER_H_E9534AF9 */ diff --git a/src/uscxml/transform/Transformer.h b/src/uscxml/transform/Transformer.h index c8498ff..a490533 100644 --- a/src/uscxml/transform/Transformer.h +++ b/src/uscxml/transform/Transformer.h @@ -28,7 +28,15 @@ namespace uscxml { class USCXML_API TransformerImpl { public: - TransformerImpl() {} + TransformerImpl(const Interpreter& other) { + interpreter = other; // we need to keep a reference to retain the document! + other.getImpl()->init(); + _document = other.getImpl()->_document; + _baseURL = other.getImpl()->_baseURL; + _scxml = other.getImpl()->_scxml; + _name = other.getImpl()->_name; + _binding = other.getImpl()->_binding; + } virtual void writeTo(std::ostream& stream) = 0; virtual operator Interpreter() { @@ -39,10 +47,18 @@ protected: std::multimap _extensions; std::list _options; + xercesc::DOMDocument* _document; + xercesc::DOMElement* _scxml; + + Interpreter interpreter; + InterpreterImpl::Binding _binding; + URL _baseURL; + std::string _name; + friend class Transformer; }; -class USCXML_API Transformer : public boost::enable_shared_from_this { +class USCXML_API Transformer { public: // Transformer(const Interpreter& source) { _impl = new (source) } diff --git a/src/uscxml/transform/Trie.cpp b/src/uscxml/transform/Trie.cpp new file mode 100644 index 0000000..8e3aff3 --- /dev/null +++ b/src/uscxml/transform/Trie.cpp @@ -0,0 +1,173 @@ +/** + * @file + * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#include "Trie.h" +#include +#include + +namespace uscxml { + +Trie::Trie() { + root = new TrieNode(); + lastIndex = 0; +} + +Trie::Trie(const std::string& seperator) : seperator(seperator) { + root = new TrieNode(); + lastIndex = 0; +} + +Trie::~Trie() { + delete root; +} + +TrieNode::TrieNode() : hasWord(false) {} + +TrieNode::~TrieNode() { + std::map::iterator childIter = childs.begin(); + while(childIter != childs.end()) { + delete childIter->second; + childIter++; + } +} + +size_t Trie::getNextToken(const std::string& word, size_t offset, std::string& token) { + if (offset == std::string::npos || offset >= word.length()) { + token = ""; + return std::string::npos; + } + if (seperator.size() > 0) { + size_t sepPos = word.find(seperator, offset); + if (sepPos == offset) // starts with a seperator + return getNextToken(word, offset + seperator.length(), token); + if (sepPos == std::string::npos) { + token = word.substr(offset, word.length() - offset); + } else { + token = word.substr(offset, sepPos - offset); + sepPos += seperator.length(); + } + return sepPos; + } + token = word[offset]; + return offset + 1; +} + +std::string Trie::escapeWord(const std::string& word) { + std::string identifier = word; + boost::replace_all(identifier, ".", "_"); + return identifier; +} + +void Trie::addWord(const std::string& word) { + TrieNode* currNode = root; + + std::string prefix; + size_t offset = 0; + + for(;;) { + offset = getNextToken(word, offset, prefix); + + if (prefix.size() > 0) { + if (currNode->childs.find(prefix) == currNode->childs.end()) + currNode->childs[prefix] = new TrieNode(); + currNode = currNode->childs[prefix]; + } + + if (offset == std::string::npos) + break; + } + if (!currNode->hasWord) { + currNode->index = lastIndex++; + currNode->value = word; + currNode->identifier = escapeWord(word); + currNode->hasWord = true; + } +} + +TrieNode* Trie::getNodeWithPrefix(const std::string& prefix) { + std::string token; + size_t offset = 0; + + TrieNode* currNode = root; + + for(;;) { + offset = getNextToken(prefix, offset, token); + if (currNode->childs.find(token) == currNode->childs.end()) { + if (token.size() > 0) + currNode = NULL; + break; + } else { + currNode = currNode->childs[token]; + } + } + return currNode; +} + +std::list Trie::getWordsWithPrefix(const std::string& prefix) { + std::list nodes; + TrieNode* prefixNode = getNodeWithPrefix(prefix); + + if (prefixNode) { + nodes = getChildsWithWords(prefixNode); + } + + return nodes; +} + +std::list Trie::getChildsWithWords(TrieNode* node) { + std::list nodes; + if (node->hasWord) { + nodes.push_back(node); + } + + std::map::iterator childIter = node->childs.begin(); + while(childIter != node->childs.end()) { + std::list otherChilds = getChildsWithWords(childIter->second); + nodes.merge(otherChilds); + childIter++; + } + + return nodes; +} + +void TrieNode::dump(int indent) { + std::string padding; + for (size_t i = 0; i < indent; i++) { + padding += " "; + } + + std::map::iterator childIter = childs.begin(); + while(childIter != childs.end()) { + std::cout << padding << childIter->first; + if (childIter->second->hasWord) { + std::cout << " (word)"; + } + std::cout << std::endl; + childIter->second->dump(indent + 1); + childIter++; + } +} + +void Trie::dump() { + if (root->hasWord) + std::cout << "(word)" << std::endl; + root->dump(); +} + +} \ No newline at end of file diff --git a/src/uscxml/transform/Trie.h b/src/uscxml/transform/Trie.h new file mode 100644 index 0000000..73d75e7 --- /dev/null +++ b/src/uscxml/transform/Trie.h @@ -0,0 +1,64 @@ +/** + * @file + * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#ifndef TRIE_H_UZMQRBO5 +#define TRIE_H_UZMQRBO5 + +#include "uscxml/Common.h" +#include +#include +#include + +namespace uscxml { + +struct USCXML_API TrieNode { + TrieNode(); + virtual ~TrieNode(); + + bool hasWord; + int index; + std::string identifier; + std::string value; + std::map childs; + void dump(int indent = 0); +}; + +struct USCXML_API Trie { + Trie(); + Trie(const std::string& seperator); + virtual ~Trie(); + + void addWord(const std::string& word); + size_t getNextToken(const std::string& word, size_t offset, std::string& token); + std::string escapeWord(const std::string& word); + + TrieNode* getNodeWithPrefix(const std::string& prefix); + std::list getWordsWithPrefix(const std::string& prefix); + std::list getChildsWithWords(TrieNode* node); + void dump(); + + TrieNode* root; + std::string seperator; + int lastIndex; +}; + +} + + +#endif /* end of include guard: TRIE_H_UZMQRBO5 */ diff --git a/src/uscxml/util/Convenience.cpp b/src/uscxml/util/Convenience.cpp new file mode 100644 index 0000000..7ceb875 --- /dev/null +++ b/src/uscxml/util/Convenience.cpp @@ -0,0 +1,177 @@ +/** + * @file + * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#include +#include +#include "Convenience.h" + +namespace uscxml { + +bool isnan(double x) { + return x != x; +} + +bool isNumeric(const char* pszInput, int nNumberBase) { + std::string base = ".-0123456789ABCDEF"; + std::string input = pszInput; + return (input.find_first_not_of(base.substr(0, nNumberBase + 2)) == std::string::npos); +} + +bool isInteger(const char* pszInput, int nNumberBase) { + std::string base = "-0123456789ABCDEF"; + std::string input = pszInput; + return (input.find_first_not_of(base.substr(0, nNumberBase + 1)) == std::string::npos); +} + +bool iequals(const std::string& a, const std::string& b) { + // this impementation beats boost::iequals 2700ms vs 2100ms for test-performance.scxml - we don't care for non-ascii yet + unsigned int size = a.size(); + if (b.size() != size) + return false; + for (unsigned int i = 0; i < size; ++i) + if (tolower(a[i]) != tolower(b[i])) + return false; + return true; +} + +bool equals(const std::string& a, const std::string& b) { + unsigned int size = a.size(); + if (b.size() != size) + return false; + for (unsigned int i = 0; i < size; ++i) + if (a[i] != b[i]) + return false; + return true; +} + +bool stringIsTrue(const std::string& value) { + return (iequals(value, "on") || + iequals(value, "true") || + iequals(value, "1") || + iequals(value, "yes")); +} + +bool envVarIsTrue(const char* name) { + const char* value = getenv(name); + if (value == NULL) + return false; + return stringIsTrue(value); +} + +bool envVarIEquals(const char* name, const char* value) { + const char* envVarValue = getenv(name); + if (envVarValue == NULL) + return false; + return iequals(envVarValue, value); +} + +std::string escape(const std::string& a) { + std::stringstream b; + // see http://en.cppreference.com/w/cpp/language/escape + + std::string::const_iterator it = a.begin(); + while (it != a.end()) { + char c = *it++; + switch (c) { + case '\\': + b << '\\' << '\\'; + break; + case '\0': + b << '\\' << '0'; + break; + case '"': + b << '\\' << '"'; + break; + case '\a': + b << '\\' << 'a'; + break; + case '\b': + b << '\\' << 'b'; + break; + case '\f': + b << '\\' << 'f'; + break; + case '\n': + b << '\\' << 'n'; + break; + case '\r': + b << '\\' << 'r'; + break; + case '\t': + b << '\\' << 't'; + break; + case '\v': + b << '\\' << 'v'; + break; + default: + b << c; + } + } + + return b.str(); +} + +std::string unescape(const std::string& a) { + std::stringstream b; + // see http://en.cppreference.com/w/cpp/language/escape + + std::string::const_iterator it = a.begin(); + while (it != a.end()) { + char c = *it++; + if (c == '\\' && it != a.end()) { + switch (*it++) { + case '\\': + c = '\\'; + break; + case '0': + c = '\0'; + break; + case '"': + c = '"'; + break; + case 'a': + c = '\a'; + break; + case 'b': + c = '\b'; + break; + case 'f': + c = '\f'; + break; + case 'n': + c = '\n'; + break; + case 'r': + c = '\r'; + break; + case 't': + c = '\t'; + break; + case 'v': + c = '\v'; + break; + } + } + b << c; + } + + return b.str(); +} + +} diff --git a/src/uscxml/util/Convenience.h b/src/uscxml/util/Convenience.h new file mode 100644 index 0000000..532bcc0 --- /dev/null +++ b/src/uscxml/util/Convenience.h @@ -0,0 +1,83 @@ +/** + * @file + * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#ifndef CONVENIENCE_H_LU7GZ6CB +#define CONVENIENCE_H_LU7GZ6CB + +#include "uscxml/Common.h" +#include +#include +#include + +namespace uscxml { +inline bool isnan(double x); + +// see http://stackoverflow.com/questions/228005/alternative-to-itoa-for-converting-integer-to-string-c +template std::string toStr(T tmp) { + std::ostringstream outSS; + outSS.precision(std::numeric_limits::digits10 + 1); + outSS << tmp; + return outSS.str(); +} + +template T strTo(std::string tmp) { + T output; + std::istringstream in(tmp); + in >> output; + return output; +} + +class USCXML_API NumAttr { +public: + NumAttr(const std::string& str) { + size_t valueStart = str.find_first_of("0123456789."); + if (valueStart != std::string::npos) { + size_t valueEnd = str.find_last_of("0123456789."); + if (valueEnd != std::string::npos) { + value = str.substr(valueStart, (valueEnd - valueStart) + 1); + size_t unitStart = str.find_first_not_of(" \t", valueEnd + 1); + if (unitStart != std::string::npos) { + size_t unitEnd = str.find_last_of(" \t"); + if (unitEnd != std::string::npos && unitEnd > unitStart) { + unit = str.substr(unitStart, unitEnd - unitStart); + } else { + unit = str.substr(unitStart, str.length() - unitStart); + } + } + } + } + } + + std::string value; + std::string unit; +}; + +bool isNumeric(const char* pszInput, int nNumberBase); +bool isInteger( const char* pszInput, int nNumberBase); +bool iequals(const std::string& a, const std::string& b); +bool equals(const std::string& a, const std::string& b); +bool stringIsTrue(const std::string& value); +bool envVarIsTrue(const char* name); +bool envVarIEquals(const char* name, const char* value); + +std::string escape(const std::string& a); +std::string unescape(const std::string& a); + +} +#endif /* end of include guard: CONVENIENCE_H_LU7GZ6CB */ diff --git a/src/uscxml/util/DOM.cpp b/src/uscxml/util/DOM.cpp new file mode 100644 index 0000000..c7ed1e9 --- /dev/null +++ b/src/uscxml/util/DOM.cpp @@ -0,0 +1,402 @@ +/** + * @file + * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#include + +#include "uscxml/Common.h" +#include "uscxml/util/Convenience.h" +//#include "uscxml/util/UUID.h" +#include "uscxml/util/DOM.h" +//#include "uscxml/util/Convenience.h" + +#include +#include +#include + +#include "easylogging++.h" + +//#include +//#include + +namespace uscxml { + +using namespace xercesc; + +std::ostream& operator<< (std::ostream& os, const DOMNode& node) { + + DOMImplementation *implementation = DOMImplementationRegistry::getDOMImplementation(X("LS")); + DOMLSSerializer *serializer = ((DOMImplementationLS*)implementation)->createLSSerializer(); + if (serializer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true)) + serializer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true); + serializer->setNewLine(XMLString::transcode("\r\n")); + + X output = serializer->writeToString(&node); + os << output; + return os; +} + +std::ostream& operator<< (std::ostream& os, const X& xmlString) { + os << xmlString._localForm; + return os; +} + +std::string DOMUtils::idForNode(const DOMNode* node) { + std::string nodeId; + std::string seperator; + const DOMNode* curr = node; + while(curr) { + switch (curr->getNodeType()) { + case DOMNode::ELEMENT_NODE: { + const DOMElement* elem = dynamic_cast(curr); + if (HAS_ATTR(elem, "id")) { + std::string elementId = ATTR(elem, "id"); + std::replace( elementId.begin(), elementId.end(), '.', '_'); + std::replace( elementId.begin(), elementId.end(), ',', '_'); + + nodeId.insert(0, elementId + seperator); + seperator = "_"; + return nodeId; + } else { + DOMNode* sibling = curr->getPreviousSibling(); + int index = 0; + while(sibling) { + if (sibling->getNodeType() == DOMNode::ELEMENT_NODE) { + if (iequals(TAGNAME_CAST(sibling), TAGNAME(elem))) { + index++; + } + } + sibling = sibling->getPreviousSibling(); + } + nodeId.insert(0, TAGNAME(elem) + toStr(index) + seperator); + seperator = "_"; + } + break; + } + case DOMNode::DOCUMENT_NODE: + return nodeId; + default: + break; + } + + curr = curr->getParentNode(); + } + return nodeId; +} + +std::string DOMUtils::xPathForNode(const DOMNode* node, const std::string& ns) { + std::string xPath; + std::string nsPrefix; + + if (ns.size() > 0) { + nsPrefix = ns + ":"; + } + + if (!node || node->getNodeType() != DOMNode::ELEMENT_NODE) + return xPath; + + const DOMNode* curr = node; + while(curr) { + switch (curr->getNodeType()) { + case DOMNode::ELEMENT_NODE: { + const DOMElement* elem = dynamic_cast(curr); + if (HAS_ATTR(elem, "id")) { + // we assume ids to be unique and return immediately + if (ns == "*") { + xPath.insert(0, "//*[local-name() = \"" + TAGNAME(elem) + "\"][@id=\"" + ATTR(elem, "id") + "\"]"); + } else { + xPath.insert(0, "//" + nsPrefix + TAGNAME(elem) + "[@id=\"" + ATTR(elem, "id") + "\"]"); + } + return xPath; + } else { + // check previous siblings to count our index + DOMNode* sibling = curr->getPreviousSibling(); + int index = 1; // xpath indices start at 1 + while(sibling) { + if (sibling->getNodeType() == DOMNode::ELEMENT_NODE) { + if (iequals(TAGNAME_CAST(sibling), TAGNAME(elem))) { + index++; + } + } + sibling = sibling->getPreviousSibling(); + } + if (ns == "*") { + xPath.insert(0, "/*[local-name() = \"" + TAGNAME(elem) + "\"][" + toStr(index) + "]"); + } else { + xPath.insert(0, "/" + nsPrefix + TAGNAME(elem) + "[" + toStr(index) + "]"); + } + } + break; + } + case DOMNode::DOCUMENT_NODE: + return xPath; + default: + LOG(ERROR) << "Only nodes of type element supported for now"; + return ""; + break; + } + curr = curr->getParentNode(); + } + return xPath; +} + +bool DOMUtils::hasIntersection(const std::list& l1, const std::list& l2) { + for (auto i = l1.begin(); i != l1.end(); i++) { + for (auto j = l2.begin(); j != l2.end(); j++) { + if (*i == *j) + return true; + } + } + return false; +} + +bool DOMUtils::isMember(const DOMNode* node, + const DOMNodeList* list) { + for (size_t i = 0; i < list->getLength(); i++) { + if (list->item(i) == node) + return true; + } + return false; +} + +bool DOMUtils::isMember(const DOMNode* node, + const std::list& list) { + + for (auto listIter = list.begin(); listIter != list.end(); listIter++) { + if ((*listIter) == node) + return true; + } + return false; +} + +bool DOMUtils::isMember(const DOMElement* node, + const std::list& list) { + + for (auto listIter = list.begin(); listIter != list.end(); listIter++) { + if ((*listIter) == node) + return true; + } + return false; +} + +const DOMNode* DOMUtils::getNearestAncestor(const DOMNode* node, const std::string tagName) { + const DOMNode* parent = node->getParentNode(); + while(parent) { + if (parent->getNodeType() == DOMNode::ELEMENT_NODE && + iequals(TAGNAME_CAST(parent), tagName)) { + return parent; + } + parent = parent->getParentNode(); + } + return NULL; +} + +bool DOMUtils::isDescendant(const DOMNode* s1, + const DOMNode* s2) { + if (!s1 || !s2) + return false; + + const DOMNode* parent = s1->getParentNode(); + while(parent) { + if (s2 == parent) + return true; + parent = parent->getParentNode(); + } + return false; +} + +std::list DOMUtils::inPostFixOrder(const std::set& elements, + const DOMElement* root, + const bool includeEmbeddedDoc) { + std::list nodes; + inPostFixOrder(elements, root, includeEmbeddedDoc, nodes); + return nodes; +} + +void DOMUtils::inPostFixOrder(const std::set& elements, + const DOMElement* root, + const bool includeEmbeddedDoc, + std::list& nodes) { + + DOMNodeList* children = root->getChildNodes(); + for (size_t i = 0; i < children->getLength(); i++) { + if (children->item(i)->getNodeType() != DOMNode::ELEMENT_NODE) + continue; + const DOMElement* childElem = dynamic_cast(children->item(i)); + if (!includeEmbeddedDoc && LOCALNAME(childElem) == "scxml") + continue; + inPostFixOrder(elements, childElem, includeEmbeddedDoc, nodes); + + } + for (size_t i = 0; i < children->getLength(); i++) { + if (children->item(i)->getNodeType() != DOMNode::ELEMENT_NODE) + continue; + const DOMElement* childElem = dynamic_cast(children->item(i)); + if (!includeEmbeddedDoc && TAGNAME(childElem) == XML_PREFIX(root).str() + "scxml") + continue; + + if (elements.find(TAGNAME(childElem)) != elements.end()) { + nodes.push_back((DOMElement*)childElem); + } + } +} + +std::list DOMUtils::inDocumentOrder(const std::set& elements, + const DOMElement* root, + const bool includeEmbeddedDoc) { + std::list nodes; + inDocumentOrder(elements, root, includeEmbeddedDoc, nodes); + return nodes; +} + +void DOMUtils::inDocumentOrder(const std::set& elements, + const DOMElement* root, + const bool includeEmbeddedDoc, + std::list& nodes) { + if (elements.find(TAGNAME(root)) != elements.end()) { + nodes.push_back((DOMElement*)root); + } + + DOMNodeList* children = root->getChildNodes(); + for (size_t i = 0; i < children->getLength(); i++) { + if (children->item(i)->getNodeType() != DOMNode::ELEMENT_NODE) + continue; + const DOMElement* childElem = dynamic_cast(children->item(i)); + if (!includeEmbeddedDoc && TAGNAME(childElem) == XML_PREFIX(root).str() + "scxml") + continue; + inDocumentOrder(elements, childElem, includeEmbeddedDoc, nodes); + } +} + +std::list DOMUtils::getElementsByType(const DOMNode* root, + DOMNode::NodeType type) { + std::list result; + std::list stack; + std::list::iterator stackIter; + + if (!root) + return result; + + stack.push_back((DOMNode*)root); + while(stack.size() > 0) { +// for(stackIter = stack.begin(); stackIter != stack.end(); stackIter++) { +// std::cout << stackIter->getNodeType() << " " << stackIter->getLocalName() << " " << stackIter->getNodeValue() << std::endl; +// } +// std::cout << std::endl; + + DOMNode* currNode = stack.back(); + if (currNode->hasChildNodes()) { + stack.push_back(currNode->getFirstChild()); + continue; + } + + // roll back stack and pop everyone without next sibling + do { + currNode = stack.back(); + if (currNode->getNodeType() == type) + result.push_back(currNode); + stack.pop_back(); + if (currNode->getNextSibling()) { + stack.push_back(currNode->getNextSibling()); + break; + } + } while(stack.size() > 0); + } + return result; +} + + +std::list DOMUtils::filterChildElements(const std::string& tagName, + const std::list& nodeSet, + bool recurse) { + + std::list filteredChildElems; + std::list::const_iterator nodeIter = nodeSet.begin(); + while(nodeIter != nodeSet.end()) { + std::list filtered = filterChildElements(tagName, *nodeIter, recurse); + filteredChildElems.merge(filtered); // TODO: guess we want insert? + nodeIter++; + } + return filteredChildElems; +} + +std::list DOMUtils::filterChildElements(const std::string& tagName, + const DOMElement* node, + bool recurse) { + + std::list filteredChildElems; + + if (!node) + return filteredChildElems; + + DOMNodeList* children = node->getChildNodes(); + for (unsigned int i = 0; i < children->getLength(); i++) { + if (children->item(i)->getNodeType() != DOMNode::ELEMENT_NODE) + continue; + const DOMElement* childElem = dynamic_cast(children->item(i)); + + // std::cerr << TAGNAME(childs.item(i)) << std::endl; + if(iequals(TAGNAME(childElem), tagName)) { + filteredChildElems.push_back((DOMElement*)childElem); + } + if (recurse) { + std::list nested = filterChildElements(tagName, childElem, recurse); + filteredChildElems.merge(nested); + } + } + return filteredChildElems; +} + + +std::list DOMUtils::filterChildType(const DOMNode::NodeType type, + const std::list& nodeSet, + bool recurse) { + std::list filteredChildType; + std::list::const_iterator nodeIter = nodeSet.begin(); + while(nodeIter != nodeSet.end()) { + std::list filtered = filterChildType(type, *nodeIter, recurse); + filteredChildType.merge(filtered); + nodeIter++; + } + return filteredChildType; +} + +std::list DOMUtils::filterChildType(const DOMNode::NodeType type, + const DOMNode* node, + bool recurse) { + + std::list filteredChildTypes; + + if (!node) + return filteredChildTypes; + + DOMNodeList* children = node->getChildNodes(); + for (unsigned int i = 0; i < children->getLength(); i++) { + if (children->item(i)->getNodeType() == type) + filteredChildTypes.push_back(children->item(i)); + if (recurse) { + std::list nested = filterChildType(type, children->item(i), recurse); + filteredChildTypes.merge(nested); + + } + } + return filteredChildTypes; +} + + +} \ No newline at end of file diff --git a/src/uscxml/util/DOM.h b/src/uscxml/util/DOM.h new file mode 100644 index 0000000..4eb0e36 --- /dev/null +++ b/src/uscxml/util/DOM.h @@ -0,0 +1,224 @@ +/** + * @file + * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#ifndef DOMUTILS_H_WK0WAEA7 +#define DOMUTILS_H_WK0WAEA7 + +#include +#include +#include + +#include "uscxml/Common.h" +#include +#include + + +/* +#define TAGNAME_CAST(elem) ((Arabica::DOM::Element)elem).getTagName() +#define LOCALNAME_CAST(elem) ((Arabica::DOM::Element)elem).getLocalName() +#define ATTR_CAST(elem, attr) ((Arabica::DOM::Element)elem).getAttribute(attr) +#define ATTR_NODE_CAST(elem, attr) ((Arabica::DOM::Element)elem).getAttributeNode(attr) +#define HAS_ATTR_CAST(elem, attr) ((Arabica::DOM::Element)elem).hasAttribute(attr) + +#define TAGNAME(elem) elem.getTagName() +#define LOCALNAME(elem) elem.getLocalName() +#define ATTR(elem, attr) elem.getAttribute(attr) +#define ATTR_NODE(elem, attr) elem.getAttributeNode(attr) +*/ + +#define HAS_ATTR(elem, attr) (elem)->hasAttribute(X(attr)) +#define HAS_ATTR_CAST(elem, attr) HAS_ATTR(static_cast(elem), attr) +#define ATTR(elem, attr) std::string(X((elem)->getAttribute(X(attr)))) +#define ATTR_CAST(elem, attr) ATTR(static_cast(elem), attr) +#define TAGNAME(elem) std::string(X((elem)->getTagName())) +#define TAGNAME_CAST(elem) TAGNAME(static_cast(elem)) +#define LOCALNAME(elem) std::string(X((elem)->getLocalName())) +#define LOCALNAME_CAST(elem) LOCALNAME(static_cast(elem)) + + + +namespace uscxml { + +class USCXML_API DOMUtils { +public: + + static const xercesc::DOMNode* getNearestAncestor(const xercesc::DOMNode* node, const std::string tagName); + static bool isDescendant(const xercesc::DOMNode* s1, const xercesc::DOMNode* s2); + + + static bool hasIntersection(const std::list& l1, + const std::list& l2); + static bool isMember(const xercesc::DOMElement* node, const std::list& list); + static bool isMember(const xercesc::DOMNode* node, const std::list& list); + static bool isMember(const xercesc::DOMNode* node, const xercesc::DOMNodeList* list); + + static std::string xPathForNode(const xercesc::DOMNode* node, + const std::string& ns = ""); + static std::string idForNode(const xercesc::DOMNode* node); + + static std::list getElementsByType(const xercesc::DOMNode* root, + xercesc::DOMNode::NodeType type); + + static std::list inPostFixOrder(const std::string& element, + const xercesc::DOMElement* root, + const bool includeEmbeddedDoc = false) { + std::set elements; + elements.insert(element); + return inPostFixOrder(elements, root, includeEmbeddedDoc); + } + + static std::list inPostFixOrder(const std::set& elements, + const xercesc::DOMElement* root, + const bool includeEmbeddedDoc = false); + + + static std::list inDocumentOrder(const std::string& element, + const xercesc::DOMElement* root, + const bool includeEmbeddedDoc = false) { + std::set elements; + elements.insert(element); + return inDocumentOrder(elements, root, includeEmbeddedDoc); + } + + static std::list inDocumentOrder(const std::set& elements, + const xercesc::DOMElement* root, + const bool includeEmbeddedDoc = false); + + static std::list filterChildElements(const std::string& tagName, + const xercesc::DOMElement* node, + bool recurse = false); + + static std::list filterChildElements(const std::string& tagName, + const std::list& nodeSet, + bool recurse = false); + + static std::list filterChildType(const xercesc::DOMNode::NodeType type, + const xercesc::DOMNode* node, + bool recurse = false); + + static std::list filterChildType(const xercesc::DOMNode::NodeType type, + const std::list& nodeSet, + bool recurse = false); + +protected: + static void inPostFixOrder(const std::set& elements, + const xercesc::DOMElement* root, + const bool includeEmbeddedDoc, + std::list& nodes); + + static void inDocumentOrder(const std::set& elements, + const xercesc::DOMElement* root, + const bool includeEmbeddedDoc, + std::list& nodes); + + +}; + +// create a prefix from a given element - useful for copying namespace information +#define XML_PREFIX(element) X(element->getPrefix() ? X(element->getPrefix()).str() + ":" : "") + +class USCXML_API X { +public : + + X(X const &other) { + _localForm = other._localForm; + _otherForm = xercesc::XMLString::replicate(other._otherForm); + _deallocOther = true; + } + void operator=(X const &other) { // did we maybe leak before? + _localForm = other._localForm; + _otherForm = xercesc::XMLString::replicate(other._otherForm); + _deallocOther = true; + } + + X(const XMLCh* const toTranscode) { + if (toTranscode != NULL) { + // Call the private transcoding method + char* tmp = xercesc::XMLString::transcode(toTranscode); + _localForm = std::string(tmp); + xercesc::XMLString::release(&tmp); + } + _otherForm = NULL; + _deallocOther = false; + } + + X(const std::string& fromTranscode) { + // Call the private transcoding method + _localForm = fromTranscode; + _otherForm = xercesc::XMLString::transcode(fromTranscode.c_str()); + _deallocOther = true; + } + + X(const char* const fromTranscode) { + // Call the private transcoding method + _localForm = fromTranscode; + _otherForm = xercesc::XMLString::transcode(fromTranscode); + _deallocOther = true; + } + + X(char* fromTranscode) { + // Call the private transcoding method + _localForm = fromTranscode; + _otherForm = xercesc::XMLString::transcode(fromTranscode); + _deallocOther = true; + } + + X() { + _otherForm = NULL; + _deallocOther = false; + } + + ~X() { + if (_deallocOther) + xercesc::XMLString::release(&_otherForm); + } + + const std::string& str() const { + return _localForm; + } + + operator const XMLCh* () { + assert(_otherForm != NULL); // constructor with XMLCh + return _otherForm; + } + + operator bool () { + return _localForm.size() > 0; + } + + operator std::string () { + return _localForm; + } + +protected: + friend USCXML_API std::ostream& operator<< (std::ostream& os, const X& data); + +private: + bool _deallocOther; + std::string _localForm; + XMLCh* _otherForm; +}; + +USCXML_API std::ostream& operator<< (std::ostream& os, const X& xmlString); +USCXML_API std::ostream& operator<< (std::ostream& os, const xercesc::DOMNode& node); + +} + + +#endif /* end of include guard: DOMUTILS_H_WK0WAEA7 */ diff --git a/src/uscxml/util/Predicates.cpp b/src/uscxml/util/Predicates.cpp new file mode 100644 index 0000000..6ac092f --- /dev/null +++ b/src/uscxml/util/Predicates.cpp @@ -0,0 +1,468 @@ +/** + * @file + * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#include "Predicates.h" +#include "uscxml/util/String.h" + +namespace uscxml { + +using namespace xercesc; + +std::list getChildStates(const DOMElement* state, bool properOnly) { + std::list children; + + DOMNodeList* childElems = state->getChildNodes(); + for (size_t i = 0; i < childElems->getLength(); i++) { + if (childElems->item(i)->getNodeType() != DOMNode::ELEMENT_NODE) + continue; + DOMElement* childElem = dynamic_cast(childElems->item(i)); + if (isState(childElem, properOnly)) { + children.push_back(childElem); + } + } + return children; +} + +std::list getChildStates(const std::list& states, bool properOnly) { + std::list children; + for (auto stateIter = states.begin(); stateIter != states.end(); stateIter++) { + std::list tmp = getChildStates(*stateIter, properOnly); + children.merge(tmp); + } + return children; +} + + +DOMElement* getParentState(const DOMElement* element) { + DOMNode* parent = element->getParentNode(); + while(parent && !isState(dynamic_cast(parent))) { + parent = parent->getParentNode(); + } + return dynamic_cast(parent); +} + +DOMElement* getSourceState(const DOMElement* transition) { + if (iequals(TAGNAME_CAST(transition->getParentNode()), XML_PREFIX(transition).str() + "initial")) + return dynamic_cast(transition->getParentNode()->getParentNode()); + return dynamic_cast(transition->getParentNode()); +} + + +/** + See: http://www.w3.org/TR/scxml/#LCCA + The Least Common Compound Ancestor is the or element s such that s is a proper ancestor + of all states on stateList and no descendant of s has this property. Note that there is guaranteed to be + such an element since the wrapper element is a common ancestor of all states. Note also that since + we are speaking of proper ancestor (parent or parent of a parent, etc.) the LCCA is never a member of stateList. + */ + +#define VERBOSE_FIND_LCCA 0 +DOMElement* findLCCA(const std::list& states) { + + std::list ancestors = getProperAncestors(states.front(), NULL); + DOMElement* ancestor = NULL; + + for (auto ancIter = ancestors.begin(); ancIter != ancestors.end(); ancIter++) { + if (!isCompound(dynamic_cast(*ancIter))) + continue; + for (auto stateIter = states.begin(); stateIter != states.end(); stateIter++) { + +#if VERBOSE_FIND_LCCA + std::cerr << "Checking " << ATTR_CAST(states[j], "id") << " and " << ATTR_CAST(ancestors[i], "id") << std::endl; +#endif + + if (!DOMUtils::isDescendant(*stateIter, *ancIter)) + goto NEXT_ANCESTOR; + } + ancestor = *ancIter; + break; +NEXT_ANCESTOR: + ; + } + + // take uppermost root as ancestor + if (!ancestor) + ancestor = ancestors.back(); + +#if VERBOSE_FIND_LCCA + std::cerr << " -> " << ATTR_CAST(ancestor, "id") << " " << ancestor.getLocalName() << std::endl; +#endif + return ancestor; +} + +/* + * If state2 is null, returns the set of all ancestors of state1 in ancestry order + * (state1's parent followed by the parent's parent, etc. up to an including the + * element). If state2 is non-null, returns in ancestry order the set of all ancestors + * of state1, up to but not including state2. (A "proper ancestor" of a state is its + * parent, or the parent's parent, or the parent's parent's parent, etc.))If state2 is + * state1's parent, or equal to state1, or a descendant of state1, this returns the empty set. + */ + +std::list getProperAncestors(const DOMElement* s1, const DOMElement* s2) { + + std::list ancestors; + if (isState(s1)) { + DOMNode* node = (DOMNode*)s1; + while((node = node->getParentNode())) { + if (node->getNodeType() != DOMNode::ELEMENT_NODE) + break; + + const DOMElement* nodeElem = dynamic_cast(node); + if (!isState(nodeElem)) + break; + if (!iequals(LOCALNAME(nodeElem), "parallel") && + !iequals(LOCALNAME(nodeElem), "state") && + !iequals(LOCALNAME(nodeElem), "scxml")) + break; + if (node == s2) + break; + ancestors.push_back(dynamic_cast(node)); + } + } + return ancestors; +} + +std::list getExitSet(const DOMElement* transition, const DOMElement* root) { + std::list statesToExit; + if (HAS_ATTR(transition, "target")) { + DOMElement* domain = getTransitionDomain(transition, root); + if (!domain) + return statesToExit; + + // std::cout << DOMUtils::xPathForNode(domain) << std::endl; + + std::set elements; + elements.insert(XML_PREFIX(transition).str() + "parallel"); + elements.insert(XML_PREFIX(transition).str() + "state"); + elements.insert(XML_PREFIX(transition).str() + "final"); + statesToExit = DOMUtils::inDocumentOrder(elements, domain); + + if (statesToExit.front() == domain) { + statesToExit.pop_front(); // do not include domain itself + } + } + + return statesToExit; +} + +bool conflicts(const DOMElement* t1, const DOMElement* t2, const DOMElement* root) { + return (DOMUtils::hasIntersection(getExitSet(t1, root), getExitSet(t2, root)) || + (getSourceState(t1) == getSourceState(t2)) || + (DOMUtils::isDescendant(getSourceState(t1), getSourceState(t2))) || + (DOMUtils::isDescendant(getSourceState(t2), getSourceState(t1)))); +} + +bool isState(const DOMElement* state, bool properOnly) { + if (!state) + return false; + + std::string localName = LOCALNAME(state); + if (iequals("state", localName)) + return true; + if (iequals("scxml", localName)) + return true; + if (iequals("parallel", localName)) + return true; + if (iequals("final", localName)) + return true; + if (properOnly) + return false; + + if (iequals("history", localName)) + return true; + if (iequals("initial", localName)) + return true; + + return false; +} + +bool isFinal(const DOMElement* state) { + std::string localName = LOCALNAME(state); + if (iequals("final", localName)) + return true; + if (HAS_ATTR(state, "final") && iequals("true", ATTR(state, "final"))) + return true; + return false; +} + +bool isAtomic(const DOMElement* state) { + if (!isState(state)) + return false; + + if (iequals("final", LOCALNAME(state))) + return true; + + if (iequals("parallel", LOCALNAME(state))) + return false; + + if (getChildStates(state).size() > 0) + return false; + + return true; +} + +bool isHistory(const DOMElement* state) { + if (iequals("history", LOCALNAME(state))) + return true; + return false; +} + +bool isParallel(const DOMElement* state) { + if (!isState(state)) + return false; + if (iequals("parallel", LOCALNAME(state))) + return true; + return false; +} + + +bool isCompound(const DOMElement* state) { + if (!isState(state)) + return false; + + if (iequals(LOCALNAME(state), "parallel")) // parallel is no compound state + return false; + + if (getChildStates(state).size() > 0) + return true; + + return false; +} + +std::list getTargetStates(const DOMElement* transition, const DOMElement* root) { + std::list targetStates; + + std::string targetId = ATTR(transition, "target"); + std::list targetIds = tokenize(ATTR(transition, "target")); + + for (auto targetIter = targetIds.begin(); targetIter != targetIds.end(); targetIter++) { + DOMElement* state = getState(*targetIter, root); + if (state) { + targetStates.push_back(state); + } + } + return targetStates; +} + + +DOMElement* getTransitionDomain(const DOMElement* transition, const DOMElement* root) { + std::list tStates = getTargetStates(transition, root); + if (tStates.size() == 0) { + return NULL; + } + std::string transitionType = (HAS_ATTR(transition, "type") ? ATTR(transition, "type") : "external"); + DOMElement* source = getSourceState(transition); + + if (iequals(transitionType, "internal") && isCompound(source)) { + for (auto tIter = tStates.begin(); tIter != tStates.end(); tIter++) { + if (!DOMUtils::isDescendant(*tIter, source)) + goto BREAK_LOOP; + } + return source; + } + +BREAK_LOOP: + tStates.push_front(source); + return findLCCA(tStates); +} + +std::list getStates(const std::list& stateIds, const DOMElement* root) { + std::list states; + std::list::const_iterator tokenIter = stateIds.begin(); + while(tokenIter != stateIds.end()) { + states.push_back(getState(*tokenIter, root)); + tokenIter++; + } + return states; +} + +DOMElement* getState(const std::string& stateId, const DOMElement* root) { + + std::list stateStack; + stateStack.push_back(root); + + while(stateStack.size() > 0) { + const DOMElement* curr = stateStack.front(); + stateStack.pop_front(); + + if (!isState(curr, false)) + assert(false); + +// std::cout << *curr; + + if (HAS_ATTR(curr, "id") && ATTR(curr, "id") == stateId) + return (DOMElement*)curr; + + std::list children = getChildStates(curr, false); + stateStack.insert(stateStack.end(), children.begin(), children.end()); + } + + return NULL; +} + +/** + * In a conformant SCXML document, a compound state may specify either an "initial" + * attribute or an element, but not both. See 3.6 for a + * discussion of the difference between the two notations. If neither the "initial" + * attribute nor an element is specified, the SCXML Processor must use + * the first child state in document order as the default initial state. + */ +std::list getInitialStates(const DOMElement* state, const DOMElement* root) { + if (!state) { + state = root; + } + +#if VERBOSE + std::cerr << "Getting initial state of " << TAGNAME(state) << " " << ATTR(state, "id") << std::endl; +#endif + + if (isAtomic(state)) { + return std::list(); + } + + if (isParallel(state)) { + return getChildStates(state); + } + + if (isCompound(state)) { + // initial attribute at element + if (HAS_ATTR(state, "initial")) { + return getStates(tokenize(ATTR(state, "initial")), root); + } + + // initial element as child + std::list initElems = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "initial", state); + if(initElems.size() > 0 ) { + std::list initTrans = DOMUtils::filterChildElements(XML_PREFIX(initElems.front()).str() + "transition", initElems.front()); + if (initTrans.size() > 0 && HAS_ATTR(initTrans.front(),"target")) { + return getTargetStates(initTrans.front(), root); + } + return std::list(); + } + + // first child state + std::list initStates; + DOMNodeList* children = state->getChildNodes(); + for (size_t i = 0; i < children->getLength(); i++) { + if (children->item(i)->getNodeType() != DOMNode::ELEMENT_NODE) + continue; + DOMElement* childElem = dynamic_cast(children->item(i)); + if (isState(childElem)) { + initStates.push_back(childElem); + return initStates; + } + } + } + + // nothing found + return std::list(); +} + +std::list getReachableStates(const DOMElement* root) { + /** Check which states are reachable */ + + std::list reachable; // total transitive hull + std::list additions; // nodes added in last iteration + std::list current; // new nodes caused by nodes added + additions.push_back((DOMElement*)root); + + while (additions.size() > 0) { + +#if 0 + for (auto stateIter = additions.begin(); stateIter != additions.end(); stateIter++) { + DOMElement* state = *stateIter; + std::cout << (HAS_ATTR(state, "id") ? ATTR(state, "id") : (std::string)X(state->getLocalName())) << ", " << std::endl; + } +#endif + // reachable per initial attribute or document order - size will increase as we append new states + for (auto stateIter = additions.begin(); stateIter != additions.end(); stateIter++) { + // get the state's initial states + DOMElement* state = *stateIter; + std::list initials = getInitialStates(state, root); + for (auto initIter = initials.begin(); initIter != initials.end(); initIter++) { + DOMElement* initial = *initIter; + if (!DOMUtils::isMember(initial, additions) && !DOMUtils::isMember(initial, reachable)) { + current.push_back(initial); + } + } + } + + // reachable per target attribute in transitions + for (auto stateIter = additions.begin(); stateIter != additions.end(); stateIter++) { + DOMElement* state = *stateIter; + std::list transitions = DOMUtils::filterChildElements(XML_PREFIX(state).str() + "transition", state, false); + for (auto transIter = transitions.begin(); transIter != transitions.end(); transIter++) { + DOMElement* transition = *transIter; + std::list targets = getTargetStates(transition, root); + for (auto targetIter = targets.begin(); targetIter != targets.end(); targetIter++) { + DOMElement* target = *targetIter; + if (!DOMUtils::isMember(target, additions) && !DOMUtils::isMember(target, reachable)) { + current.push_back(target); + } + } + } + } + + // reachable via a reachable child state + for (auto stateIter = additions.begin(); stateIter != additions.end(); stateIter++) { + DOMElement* state = *stateIter; + if (isAtomic(state)) { + // iterate the states parents + DOMNode* parent = state->getParentNode(); + while(parent && parent->getNodeType() == DOMNode::ELEMENT_NODE) { + DOMElement* parentElem = static_cast(parent); + if (!isState(parentElem)) { + break; + } + if (!DOMUtils::isMember(parentElem, additions) && !DOMUtils::isMember(parentElem, reachable)) { + current.push_back(parentElem); + } + parent = parent->getParentNode(); + } + } + } + + // add all additions from last iterations to reachable set + reachable.insert(reachable.end(), additions.begin(), additions.end()); + + // set current additions as new additions + additions = current; + + // clear current set for next iteration + current.clear(); + } + + return reachable; +} + + +bool isInEmbeddedDocument(const DOMNode* node) { + // a node is in an embedded document if there is a content element in its parents + const DOMNode* parent = node; + while(parent) { + if(iequals(LOCALNAME(parent), "content")) { + return true; + } + parent = parent->getParentNode(); + } + return false; +} + +} \ No newline at end of file diff --git a/src/uscxml/util/Predicates.h b/src/uscxml/util/Predicates.h new file mode 100644 index 0000000..50c69b6 --- /dev/null +++ b/src/uscxml/util/Predicates.h @@ -0,0 +1,61 @@ +/** + * @file + * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#ifndef PREDICATES_H_D3A20484 +#define PREDICATES_H_D3A20484 + +#include +#include +#include +#include "uscxml/util/DOM.h" +#include "uscxml/util/Convenience.h" + +namespace uscxml { + +std::list getChildStates(const xercesc::DOMElement* state, bool properOnly = true); +std::list getChildStates(const std::list& states, bool properOnly = true); +xercesc::DOMElement* getParentState(const xercesc::DOMElement* element); +xercesc::DOMElement* getSourceState(const xercesc::DOMElement* transition); +xercesc::DOMElement* findLCCA(const std::list& states); +std::list getProperAncestors(const xercesc::DOMElement* s1, const xercesc::DOMElement* s2); + +std::list getTargetStates(const xercesc::DOMElement* transition, const xercesc::DOMElement* root); +std::list getEffectiveTargetStates(const xercesc::DOMElement* transition); +xercesc::DOMElement* getTransitionDomain(const xercesc::DOMElement* transition, const xercesc::DOMElement* root); + +bool isInEmbeddedDocument(const xercesc::DOMNode* node); + +std::list getStates(const std::list& stateIds, const xercesc::DOMElement* root); +xercesc::DOMElement* getState(const std::string& stateId, const xercesc::DOMElement* root); +std::list getInitialStates(const xercesc::DOMElement* state, const xercesc::DOMElement* root); +std::list getReachableStates(const xercesc::DOMElement* root); +std::list getExitSet(const xercesc::DOMElement* transition, const xercesc::DOMElement* root); +bool conflicts(const xercesc::DOMElement* transition1, const xercesc::DOMElement* transition2, const xercesc::DOMElement* root); + +bool isState(const xercesc::DOMElement* state, bool properOnly = true); +bool isCompound(const xercesc::DOMElement* state); +bool isAtomic(const xercesc::DOMElement* state); +bool isParallel(const xercesc::DOMElement* state); +bool isFinal(const xercesc::DOMElement* state); +bool isHistory(const xercesc::DOMElement* state); + + +} + +#endif /* end of include guard: PREDICATES_H_D3A20484 */ diff --git a/src/uscxml/util/Trie.cpp b/src/uscxml/util/Trie.cpp deleted file mode 100644 index 8e3aff3..0000000 --- a/src/uscxml/util/Trie.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "Trie.h" -#include -#include - -namespace uscxml { - -Trie::Trie() { - root = new TrieNode(); - lastIndex = 0; -} - -Trie::Trie(const std::string& seperator) : seperator(seperator) { - root = new TrieNode(); - lastIndex = 0; -} - -Trie::~Trie() { - delete root; -} - -TrieNode::TrieNode() : hasWord(false) {} - -TrieNode::~TrieNode() { - std::map::iterator childIter = childs.begin(); - while(childIter != childs.end()) { - delete childIter->second; - childIter++; - } -} - -size_t Trie::getNextToken(const std::string& word, size_t offset, std::string& token) { - if (offset == std::string::npos || offset >= word.length()) { - token = ""; - return std::string::npos; - } - if (seperator.size() > 0) { - size_t sepPos = word.find(seperator, offset); - if (sepPos == offset) // starts with a seperator - return getNextToken(word, offset + seperator.length(), token); - if (sepPos == std::string::npos) { - token = word.substr(offset, word.length() - offset); - } else { - token = word.substr(offset, sepPos - offset); - sepPos += seperator.length(); - } - return sepPos; - } - token = word[offset]; - return offset + 1; -} - -std::string Trie::escapeWord(const std::string& word) { - std::string identifier = word; - boost::replace_all(identifier, ".", "_"); - return identifier; -} - -void Trie::addWord(const std::string& word) { - TrieNode* currNode = root; - - std::string prefix; - size_t offset = 0; - - for(;;) { - offset = getNextToken(word, offset, prefix); - - if (prefix.size() > 0) { - if (currNode->childs.find(prefix) == currNode->childs.end()) - currNode->childs[prefix] = new TrieNode(); - currNode = currNode->childs[prefix]; - } - - if (offset == std::string::npos) - break; - } - if (!currNode->hasWord) { - currNode->index = lastIndex++; - currNode->value = word; - currNode->identifier = escapeWord(word); - currNode->hasWord = true; - } -} - -TrieNode* Trie::getNodeWithPrefix(const std::string& prefix) { - std::string token; - size_t offset = 0; - - TrieNode* currNode = root; - - for(;;) { - offset = getNextToken(prefix, offset, token); - if (currNode->childs.find(token) == currNode->childs.end()) { - if (token.size() > 0) - currNode = NULL; - break; - } else { - currNode = currNode->childs[token]; - } - } - return currNode; -} - -std::list Trie::getWordsWithPrefix(const std::string& prefix) { - std::list nodes; - TrieNode* prefixNode = getNodeWithPrefix(prefix); - - if (prefixNode) { - nodes = getChildsWithWords(prefixNode); - } - - return nodes; -} - -std::list Trie::getChildsWithWords(TrieNode* node) { - std::list nodes; - if (node->hasWord) { - nodes.push_back(node); - } - - std::map::iterator childIter = node->childs.begin(); - while(childIter != node->childs.end()) { - std::list otherChilds = getChildsWithWords(childIter->second); - nodes.merge(otherChilds); - childIter++; - } - - return nodes; -} - -void TrieNode::dump(int indent) { - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - - std::map::iterator childIter = childs.begin(); - while(childIter != childs.end()) { - std::cout << padding << childIter->first; - if (childIter->second->hasWord) { - std::cout << " (word)"; - } - std::cout << std::endl; - childIter->second->dump(indent + 1); - childIter++; - } -} - -void Trie::dump() { - if (root->hasWord) - std::cout << "(word)" << std::endl; - root->dump(); -} - -} \ No newline at end of file diff --git a/src/uscxml/util/Trie.h b/src/uscxml/util/Trie.h deleted file mode 100644 index 73d75e7..0000000 --- a/src/uscxml/util/Trie.h +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @file - * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#ifndef TRIE_H_UZMQRBO5 -#define TRIE_H_UZMQRBO5 - -#include "uscxml/Common.h" -#include -#include -#include - -namespace uscxml { - -struct USCXML_API TrieNode { - TrieNode(); - virtual ~TrieNode(); - - bool hasWord; - int index; - std::string identifier; - std::string value; - std::map childs; - void dump(int indent = 0); -}; - -struct USCXML_API Trie { - Trie(); - Trie(const std::string& seperator); - virtual ~Trie(); - - void addWord(const std::string& word); - size_t getNextToken(const std::string& word, size_t offset, std::string& token); - std::string escapeWord(const std::string& word); - - TrieNode* getNodeWithPrefix(const std::string& prefix); - std::list getWordsWithPrefix(const std::string& prefix); - std::list getChildsWithWords(TrieNode* node); - void dump(); - - TrieNode* root; - std::string seperator; - int lastIndex; -}; - -} - - -#endif /* end of include guard: TRIE_H_UZMQRBO5 */ diff --git a/src/uscxml/util/URL.cpp b/src/uscxml/util/URL.cpp new file mode 100644 index 0000000..ad271d5 --- /dev/null +++ b/src/uscxml/util/URL.cpp @@ -0,0 +1,773 @@ +/** + * @file + * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#include "URL.h" +#include "uscxml/messages/Event.h" + +#include +#include + +#include +#include "uscxml/config.h" + + +#ifdef _WIN32 +#define getcwd _getcwd +#else +#include // getcwd +//#include +#endif + +namespace uscxml { + +void URLImpl::prepareException(ErrorEvent& exception, int errorCode, const std::string& origUri, UriParserStateA* parser) { + exception.data.compound["uri"].atom = origUri; + + if (parser != NULL && parser->errorPos != NULL) { + const char* startPtr = origUri.c_str(); + while(startPtr != parser->errorPos && *startPtr != '\0') { + exception.data.compound["urk"].atom += " "; + startPtr++; + } + exception.data.compound["urk"].atom += "^"; + } + + switch (errorCode) { + case URI_ERROR_SYNTAX: + exception.data.compound["cause"].atom = "Parsed text violates expected format"; + break; + case URI_ERROR_NULL: + exception.data.compound["cause"].atom = "One of the params passed was NULL although it mustn't be"; + break; + case URI_ERROR_MALLOC: + exception.data.compound["cause"].atom = "Requested memory could not be allocated"; + break; + case URI_ERROR_OUTPUT_TOO_LARGE: + exception.data.compound["cause"].atom = "Some output is to large for the receiving buffer"; + break; + case URI_ERROR_NOT_IMPLEMENTED: + exception.data.compound["cause"].atom = "The called function is not implemented yet"; + break; + case URI_ERROR_RANGE_INVALID: + exception.data.compound["cause"].atom = "The parameters passed contained invalid ranges"; + break; + case URI_ERROR_ADDBASE_REL_BASE: + exception.data.compound["cause"].atom = "Given base is not absolute"; + break; + case URI_ERROR_REMOVEBASE_REL_SOURCE: + exception.data.compound["cause"].atom = "Given base is not absolute"; + break; + + default: + break; + } +} + +URLImpl::URLImpl() : _handle(NULL), _isDownloaded(false), _hasFailed(false) { +} + +URLImpl::URLImpl(const std::string& url) : _orig(url), _handle(NULL), _isDownloaded(false), _hasFailed(false) { + UriParserStateA state; + state.uri = &_uri; + + int err = uriParseUriA(&state, _orig.c_str()); + if (err != URI_SUCCESS) { + UriParserStateA state2; + state2.uri = &_uri; + + char* tmp = (char*)malloc(8 + 3 * _orig.size() + 1); + uriWindowsFilenameToUriStringA(_orig.c_str(), tmp); + _orig = std::string(tmp); + err = uriParseUriA(&state2, _orig.c_str()); + free(tmp); + } + + if (err != URI_SUCCESS) { + UriParserStateA state2; + state2.uri = &_uri; + + char* tmp = (char*)malloc(7 + 3 * _orig.size() + 1 ); + uriUnixFilenameToUriStringA(_orig.c_str(), tmp); + _orig = std::string(tmp); + err = uriParseUriA(&state2, _orig.c_str()); + free(tmp); + } + + if (err != URI_SUCCESS) { + ErrorEvent exc; + prepareException(exc, err, _orig, &state); + throw exc; + } +} + +URLImpl::~URLImpl() { + uriFreeUriMembersA(&_uri); +} + +URL URLImpl::resolve(URLImpl* relative, URLImpl* absolute) { + std::shared_ptr dest(new URLImpl()); + int err = uriAddBaseUriExA(&(dest->_uri), &(relative->_uri), &(absolute->_uri), URI_RESOLVE_IDENTICAL_SCHEME_COMPAT); + if (err != URI_SUCCESS) { + ErrorEvent exc("Cannot resolve " + (std::string)(*relative) + " with " + (std::string)(*absolute)); + prepareException(exc, err, "", NULL); + throw exc; + } + + // serialize as string and reparse to mantain string in _orig + return URL((std::string)(*dest.get())); +} + +URL URLImpl::resolveWithCWD(URLImpl* relative) { + char currPath[FILENAME_MAX]; + if (!getcwd(currPath, sizeof(currPath))) { + ERROR_PLATFORM_THROW("Cannot get current working directory"); + } + currPath[sizeof(currPath) - 1] = '\0'; /* not really required */ + + + std::shared_ptr cwdURL(new URLImpl(std::string("file://") + currPath)); + + return resolve(relative, cwdURL.get()); +} + +URL URLImpl::refer(URLImpl* absoluteSource, URLImpl* absoluteBase) { + std::shared_ptr dest(new URLImpl()); + int err = uriRemoveBaseUriA(&(dest->_uri), &(absoluteSource->_uri), &(absoluteBase->_uri), URI_FALSE); + if (err != URI_SUCCESS) { + ErrorEvent exc("Cannot make a relative reference for " + (std::string)(*absoluteSource) + " with " + (std::string)(*absoluteBase)); + prepareException(exc, err, "", NULL); + throw exc; + } + + // serialize as string and reparse to mantain string in _orig + return URL((std::string)(*dest.get())); +} + +void URLImpl::normalize() { + int err = uriNormalizeSyntaxA(&_uri); + if (err != URI_SUCCESS) { + ErrorEvent exc("Cannot normalize URL " + (std::string)*this); + prepareException(exc, err, _orig, NULL); + throw exc; + } +} + +std::string URLImpl::path() const { + UriPathSegmentA* firstSeg = _uri.pathHead; + UriPathSegmentA* lastSeg = firstSeg; + while(lastSeg->next) { + lastSeg = lastSeg->next; + } + + std::string path; + + // what a mess! + if (_uri.absolutePath || + (_uri.pathHead != NULL && + (_uri.hostText.first != NULL || + _uri.hostData.ip4 != NULL || + _uri.hostData.ip6 != NULL || + _uri.hostData.ipFuture.first != NULL))) { + path += "/"; + } + path += std::string(firstSeg->text.first, lastSeg->text.afterLast - firstSeg->text.first); + return path; +} + +std::list URLImpl::pathComponents() const { + std::list pathList; + + UriPathSegmentA* currSeg = _uri.pathHead; + while(currSeg != NULL) { + pathList.push_back(USCXML_URI_STRING((*currSeg), text)); + currSeg = currSeg->next; + } + + return pathList; +} + +std::map URLImpl::query() const { + UriQueryListA * queryList; + UriQueryListA * currList; + std::map queryMap; + int itemCount; + + int err = uriDissectQueryMallocA(&queryList, &itemCount, _uri.query.first, _uri.query.afterLast); + if (err != URI_SUCCESS) { + ErrorEvent exc("Cannot get query from URL " + (std::string)*this); + prepareException(exc, err, _orig, NULL); + throw exc; + } + + currList = queryList; + while(currList != NULL) { + queryMap[currList->key] = currList->value != NULL ? currList->value : ""; + currList = currList->next; + } + + uriFreeQueryListA(queryList); + + return queryMap; +} + +CURL* URLImpl::getCurlHandle() { + if (_handle == NULL) { + _handle = curl_easy_init(); + if (_handle == NULL) + LOG(ERROR) << "curl_easy_init returned NULL, this is bad!"; + } + return _handle; +} + +size_t URLImpl::writeHandler(void *ptr, size_t size, size_t nmemb, void *userdata) { + URLImpl* url = (URLImpl*)userdata; + url->_rawInContent.write((char*)ptr, size * nmemb); + + std::set::iterator monIter = url->_monitors.begin(); + while(monIter != url->_monitors.end()) { + (*monIter)->contentChunkReceived(URL(url->shared_from_this()), std::string((char*)ptr, size * nmemb)); + monIter++; + } + + return size * nmemb; +} + +size_t URLImpl::headerHandler(void *ptr, size_t size, size_t nmemb, void *userdata) { + URLImpl* url = (URLImpl*)userdata; + url->_rawInHeader.write((char*)ptr, size * nmemb); + + std::set::iterator monIter = url->_monitors.begin(); + while(monIter != url->_monitors.end()) { + (*monIter)->headerChunkReceived(URL(url->shared_from_this()), std::string((char*)ptr, size * nmemb)); + monIter++; + } + + return size * nmemb; +} + +void URLImpl::downloadStarted() { + // LOG(INFO) << "Starting download of " << asString() << std::endl; + _rawInContent.str(""); + _rawInContent.clear(); + _rawInHeader.str(""); + _rawInHeader.clear(); + + _statusMsg = ""; + _statusCode = ""; + + std::set::iterator monIter = _monitors.begin(); + while(monIter != _monitors.end()) { + (*monIter)->downloadStarted(URL(shared_from_this())); + monIter++; + } +} + +void URLImpl::downloadCompleted() { + std::lock_guard lock(_mutex); + + if (iequals(scheme(), "http")) { + // process header fields + std::string line; + while (std::getline(_rawInHeader, line)) { + size_t colon = line.find_first_of(":"); + size_t newline = line.find_first_of("\r\n"); + if (newline == std::string::npos) + newline = line.size(); + + if (colon == std::string::npos) { + _statusMsg = line.substr(0, newline); + if (_statusMsg.length() >= 11) + _statusCode = _statusMsg.substr(9, 3); + } else { + std::string key = line.substr(0, colon); + size_t firstChar = line.find_first_not_of(": ", colon, 2); + if (firstChar == std::string::npos) { + // nothing but spaces? + _inHeaders[line.substr(0, newline)] = ""; + } else { + std::string value = line.substr(firstChar, newline - firstChar); + _inHeaders[key] = value; + } + } + } + } + + _hasFailed = false; + _isDownloaded = true; + _condVar.notify_all(); + + std::set::iterator monIter = _monitors.begin(); + while(monIter != _monitors.end()) { + (*monIter)->downloadCompleted(URL(shared_from_this())); + monIter++; + } +} + +void URLImpl::downloadFailed(CURLcode errorCode) { + std::lock_guard lock(_mutex); + + _error = curl_easy_strerror(errorCode); + _hasFailed = true; + _isDownloaded = false; + _condVar.notify_all(); + + std::set::iterator monIter = _monitors.begin(); + while(monIter != _monitors.end()) { + (*monIter)->downloadFailed(URL(shared_from_this()), errorCode); + monIter++; + } + +} + +const void URLImpl::download(bool blocking) { + std::lock_guard lock(_mutex); + + if (_isDownloaded) + return; + + URL url(shared_from_this()); + URLFetcher::fetchURL(url); + + if (blocking) { + while(!_isDownloaded && !_hasFailed) { + _condVar.wait(_mutex); // wait for notification + } + if (_hasFailed) { + ERROR_COMMUNICATION(exc, _error); +// exc.data = URL(shared_from_this()); + throw exc; + } + if (iequals(scheme(), "http")) { + if (_statusCode.size() > 0 && strTo(_statusCode) > 400) { + ERROR_COMMUNICATION(exc, _error); +// exc.data = URL(shared_from_this()); + if (_error.length() > 0) + exc.data.compound["cause"] = Data(_error, Data::VERBATIM); + throw exc; + } + } + } +} + +URLImpl::operator Data() const { + Data data; + data.compound["url"] = Data(std::string(*this), Data::VERBATIM); + data.compound["host"] = Data(host(), Data::VERBATIM); + data.compound["scheme"] = Data(scheme(), Data::VERBATIM); + data.compound["path"] = Data(path(), Data::VERBATIM); + data.compound["port"] = Data(port(), Data::INTERPRETED); + data.compound["isAbsolute"] = Data(isAbsolute()); + if (_statusCode.length() > 0) + data.compound["statusCode"] = Data(_statusCode, Data::VERBATIM); + if (_statusMsg.length() > 0) + data.compound["statusMsg"] = Data(_statusMsg, Data::VERBATIM); + + std::list pathComps = pathComponents(); + std::list::const_iterator pathIter = pathComps.begin(); + while(pathIter != pathComps.end()) { + data.compound["pathComponent"].array.push_back(Data(*pathIter, Data::VERBATIM)); + pathIter++; + } + + return data; +} + + +URLImpl::operator std::string() const { + int charsRequired = 0; + if (uriToStringCharsRequiredA(&_uri, &charsRequired) != URI_SUCCESS) { + throw ErrorEvent("Cannot recompose URL"); + } + charsRequired++; + + char * uriString; + uriString = (char*)malloc(charsRequired * sizeof(char)); + if (uriString == NULL) { + throw ErrorEvent("Malloc failed"); + } + + if (uriToStringA(uriString, &_uri, charsRequired, NULL) != URI_SUCCESS) { + free(uriString); + throw ErrorEvent("Cannot recompose URL"); + } + + std::string recomposed(uriString); + free(uriString); + return recomposed; + +} + +URLFetcher::URLFetcher() { + _isStarted = false; + _envProxy = NULL; + _multiHandle = curl_multi_init(); + + // read proxy information from environment + // CURLOPT_PROXY; + // CURLOPT_PROXY_TRANSFER_MODE; + // CURLOPT_PROXYAUTH; + // CURLOPT_PROXYHEADER; + // CURLOPT_PROXYPASSWORD; + // CURLOPT_PROXYPORT; + // CURLOPT_PROXYTYPE; + // CURLOPT_PROXYUSERNAME; + // CURLOPT_PROXYUSERPWD; + + /* + see http://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html + e.g. 'socks5://bob:marley@localhost:12345' + */ + _envProxy = getenv("USCXML_PROXY"); + +#if 0 + bool unsupported = false; + CURLcode curlError; + + // exposed just in case + char* envProxyTransferMode = getenv("USCXML_PROXY_TRANSFER_MODE"); + char* envProxyAuth = getenv("USCXML_PROXYAUTH"); + // char* envProxyHeader = getenv("USCXML_PROXYHEADER"); // not available in older curl + char* envProxyPassword = getenv("USCXML_PROXYPASSWORD"); + char* envProxyPort = getenv("USCXML_PROXYPORT"); + // char* envProxyType = getenv("USCXML_PROXYTYPE"); // takes an int, have another look if needed + char* envProxyUsername = getenv("USCXML_PROXYUSERNAME"); + char* envProxyUserPwd = getenv("USCXML_PROXYUSERPWD"); + + /* Name of proxy to use. */ + if (envProxy) + (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXY, envProxy)) == CURLE_OK || + LOG(ERROR) << "Cannot set curl proxy: " << curl_easy_strerror(curlError); + + /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ + if (envProxyTransferMode) + (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXY_TRANSFER_MODE, envProxyTransferMode)) == CURLE_OK || + LOG(ERROR) << "Cannot set curl proxy transfer mode: " << curl_easy_strerror(curlError); + + /* Set this to a bitmask value to enable the particular authentications + methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. + Note that setting multiple bits may cause extra network round-trips. */ + if (envProxyAuth) + (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYAUTH, envProxyAuth)) == CURLE_OK || + LOG(ERROR) << "Cannot set curl proxy authentication: " << curl_easy_strerror(curlError); + +#if 0 + /* This points to a linked list of headers used for proxy requests only, + struct curl_slist kind */ + if (envProxyHeader && unsupported) + (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYHEADER, envProxyHeader)) == CURLE_OK || + LOG(ERROR) << "Cannot set curl proxy header: " << curl_easy_strerror(curlError); +#endif + + /* "name" and "pwd" to use with Proxy when fetching. */ + if (envProxyUsername) + (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYUSERNAME, envProxyUsername)) == CURLE_OK || + LOG(ERROR) << "Cannot set curl proxy username: " << curl_easy_strerror(curlError); + if (envProxyPassword) + (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYPASSWORD, envProxyPassword)) == CURLE_OK || + LOG(ERROR) << "Cannot set curl proxy password: " << curl_easy_strerror(curlError); + + /* Port of the proxy, can be set in the proxy string as well with: + "[host]:[port]" */ + if (envProxyPort) + (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYPORT, envProxyPort)) == CURLE_OK || + LOG(ERROR) << "Cannot set curl proxy port: " << curl_easy_strerror(curlError); + +#if 0 + /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), + CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */ + if (envProxyType && unsupported) + (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYTYPE, envProxyType)) == CURLE_OK || + LOG(ERROR) << "Cannot set curl proxy type: " << curl_easy_strerror(curlError); +#endif + + /* "user:password" to use with proxy. */ + if (envProxyUserPwd) + (curlError = curl_easy_setopt(_multiHandle, CURLOPT_PROXYUSERPWD, envProxyUserPwd)) == CURLE_OK || + LOG(ERROR) << "Cannot set curl proxy user password: " << curl_easy_strerror(curlError); +#endif + + start(); +} + +URLFetcher::~URLFetcher() { + stop(); + curl_multi_cleanup(_multiHandle); +} + +void URLFetcher::fetchURL(URL& url) { + URLFetcher* instance = getInstance(); + std::lock_guard lock(instance->_mutex); + + CURL* handle = url._impl->getCurlHandle(); + assert(handle != NULL); + if (handle == NULL) + return; + + if (instance->_handlesToURLs.find(handle) == instance->_handlesToURLs.end()) { + CURLcode curlError; + + std::string fromURL(url); + + (curlError = curl_easy_setopt(handle, CURLOPT_URL, fromURL.c_str())) == CURLE_OK || + LOG(ERROR) << "Cannot set url to " << std::string(url) << ": " << curl_easy_strerror(curlError); + + // (curlError = curl_easy_setopt(handle, CURLOPT_NOSIGNAL, 1)) == CURLE_OK || + // LOG(ERROR) << "Cannot set curl to ignore signals: " << curl_easy_strerror(curlError); + + // (curlError = curl_easy_setopt(handle, CURLOPT_FORBID_REUSE, 1)) == CURLE_OK || + // LOG(ERROR) << "Cannot force noreuse: " << curl_easy_strerror(curlError); + + // (curlError = curl_easy_setopt(handle, CURLOPT_VERBOSE, 1)) == CURLE_OK || + // LOG(ERROR) << "Cannot set verbose: " << curl_easy_strerror(curlError); + + (curlError = curl_easy_setopt(handle, CURLOPT_WRITEDATA, url._impl.get())) == CURLE_OK || + LOG(ERROR) << "Cannot register this as write userdata: " << curl_easy_strerror(curlError); + + (curlError = curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, URLImpl::writeHandler)) == CURLE_OK || + LOG(ERROR) << "Cannot set write callback: " << curl_easy_strerror(curlError); + + (curlError = curl_easy_setopt(handle, CURLOPT_HEADERFUNCTION, URLImpl::headerHandler)) == CURLE_OK || + LOG(ERROR) << "Cannot request header from curl: " << curl_easy_strerror(curlError); + + (curlError = curl_easy_setopt(handle, CURLOPT_HEADERDATA, url._impl.get())) == CURLE_OK || + LOG(ERROR) << "Cannot register this as header userdata: " << curl_easy_strerror(curlError); + + (curlError = curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, false)) == CURLE_OK || + LOG(ERROR) << "Cannot forfeit peer verification: " << curl_easy_strerror(curlError); + + (curlError = curl_easy_setopt(handle, CURLOPT_USERAGENT, "uscxml/" USCXML_VERSION)) == CURLE_OK || + LOG(ERROR) << "Cannot set our user agent string: " << curl_easy_strerror(curlError); + + (curlError = curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, true)) == CURLE_OK || + LOG(ERROR) << "Cannot enable follow redirects: " << curl_easy_strerror(curlError); + + if (instance->_envProxy) + (curlError = curl_easy_setopt(handle, CURLOPT_PROXY, instance->_envProxy)) == CURLE_OK || + LOG(ERROR) << "Cannot set curl proxy: " << curl_easy_strerror(curlError); + + if (url._impl->_requestType == URLRequestType::POST) { + + (curlError = curl_easy_setopt(handle, CURLOPT_POST, 1)) == CURLE_OK || + LOG(ERROR) << "Cannot set request type to post for " << std::string(url) << ": " << curl_easy_strerror(curlError); + + (curlError = curl_easy_setopt(handle, CURLOPT_COPYPOSTFIELDS, url._impl->_outContent.c_str())) == CURLE_OK || + LOG(ERROR) << "Cannot set post data " << std::string(url) << ": " << curl_easy_strerror(curlError); + + // Disable "Expect: 100-continue" + // curl_slist* disallowed_headers = 0; + // disallowed_headers = curl_slist_append(disallowed_headers, "Expect:"); + // (curlError = curl_easy_setopt(handle, CURLOPT_HTTPHEADER, disallowed_headers)) == CURLE_OK || + // LOG(ERROR) << "Cannot disable Expect 100 header: " << curl_easy_strerror(curlError); + + struct curl_slist* headers = NULL; + std::map::iterator paramIter = url._impl->_outHeader.begin(); + while(paramIter != url._impl->_outHeader.end()) { + // char* key = curl_easy_escape(handle, paramIter->first.c_str(), paramIter->first.length()); + // char* value = curl_easy_escape(handle, paramIter->second.c_str(), paramIter->second.length()); + + const char* value = paramIter->second.c_str(); + + char* header = (char*)malloc(paramIter->first.size() + strlen(value) + 3); + sprintf(header,"%s: %s", paramIter->first.c_str(), value); + headers = curl_slist_append(headers, header); + + // curl_free(key); + // curl_free(value); + paramIter++; + } + + // Disable "Expect: 100-continue" + headers = curl_slist_append(headers, "Expect:"); + + (curlError = curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers)) == CURLE_OK || + LOG(ERROR) << "Cannot headers for " << std::string(url) << ": " << curl_easy_strerror(curlError); + + //curl_slist_free_all(headers); + + + } else if (url._impl->_requestType == URLRequestType::GET) { + (curlError = curl_easy_setopt(handle, CURLOPT_HTTPGET, 1)) == CURLE_OK || + LOG(ERROR) << "Cannot set request type to get for " << std::string(url) << ": " << curl_easy_strerror(curlError); + } + + url._impl->downloadStarted(); + instance->_handlesToURLs[handle] = url; + assert(instance->_handlesToURLs.size() > 0); + + curl_multi_add_handle(instance->_multiHandle, handle); + instance->_condVar.notify_all(); + } +} + +void URLFetcher::breakURL(URL& url) { + URLFetcher* instance = getInstance(); + CURL* handle = url._impl->getCurlHandle(); + + std::lock_guard lock(instance->_mutex); + if (instance->_handlesToURLs.find(handle) != instance->_handlesToURLs.end()) { + url._impl->downloadFailed(CURLE_OK); + curl_multi_remove_handle(instance->_multiHandle, handle); + instance->_handlesToURLs.erase(handle); + } +} + +void URLFetcher::start() { + std::lock_guard lock(_mutex); + if (!_isStarted) { + _isStarted = true; + _thread = new std::thread(URLFetcher::run, this); + } +} + +void URLFetcher::stop() { + std::lock_guard lock(_mutex); + if (_isStarted) { + _isStarted = false; + _thread->join(); + delete _thread; + } +} + +void URLFetcher::run(void* instance) { + URLFetcher* fetcher = (URLFetcher*)instance; + while(fetcher->_isStarted) { + fetcher->perform(); + } + LOG(ERROR) << "URLFetcher thread stopped!"; +} + +void URLFetcher::perform() { + + CURLMsg *msg; /* for picking up messages with the transfer status */ + int msgsLeft; /* how many messages are left */ + int stillRunning; + CURLMcode err; + + { + std::lock_guard lock(_mutex); + if (_handlesToURLs.empty()) { + _condVar.wait(_mutex); + } + err = curl_multi_perform(_multiHandle, &stillRunning); + if (err != CURLM_OK) { + LOG(WARNING) << "curl_multi_perform: " << curl_multi_strerror(err); + } + } + + do { + struct timeval timeout; + int rc; /* select() return code */ + + fd_set fdread, fdwrite, fdexcep; + FD_ZERO(&fdread); + FD_ZERO(&fdwrite); + FD_ZERO(&fdexcep); + + int maxfd = -1; + long curlTimeOut = -1; + + /* set a suitable timeout to play around with */ + timeout.tv_sec = 1; + timeout.tv_usec = 0; + + { + std::lock_guard lock(_mutex); + err = curl_multi_timeout(_multiHandle, &curlTimeOut); + if (err != CURLM_OK) { + LOG(WARNING) << "curl_multi_timeout: " << curl_multi_strerror(err); + } + } + + if(curlTimeOut >= 0) { + timeout.tv_sec = curlTimeOut / 1000; + if(timeout.tv_sec > 1) { + timeout.tv_sec = 1; + } else { + timeout.tv_usec = (curlTimeOut % 1000) * 1000; + } + } + + /* get file descriptors from the transfers */ + { + std::lock_guard lock(_mutex); + err = curl_multi_fdset(_multiHandle, &fdread, &fdwrite, &fdexcep, &maxfd); + if (err != CURLM_OK) { + LOG(WARNING) << "curl_multi_fdset: " << curl_multi_strerror(err); + } + } + + rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); + + switch(rc) { + case -1: + /* select error */ + break; + case 0: /* timeout */ + default: { /* action */ + std::lock_guard lock(_mutex); + err = curl_multi_perform(_multiHandle, &stillRunning); + if (err != CURLM_OK) { + LOG(WARNING) << "curl_multi_perform: " << curl_multi_strerror(err); + } + break; + } + } + + { + std::lock_guard lock(_mutex); + while ((msg = curl_multi_info_read(_multiHandle, &msgsLeft))) { + if (msg->msg == CURLMSG_DONE) { + switch (msg->data.result) { + case CURLE_OK: + _handlesToURLs[msg->easy_handle]._impl->downloadCompleted(); + err = curl_multi_remove_handle(_multiHandle, msg->easy_handle); + if (err != CURLM_OK) { + LOG(WARNING) << "curl_multi_remove_handle: " << curl_multi_strerror(err); + } + + _handlesToURLs.erase(msg->easy_handle); + break; + default: + _handlesToURLs[msg->easy_handle]._impl->downloadFailed(msg->data.result); + err = curl_multi_remove_handle(_multiHandle, msg->easy_handle); + if (err != CURLM_OK) { + LOG(WARNING) << "curl_multi_remove_handle: " << curl_multi_strerror(err); + } + + _handlesToURLs.erase(msg->easy_handle); + } + } else { + LOG(ERROR) << "Curl reports info on unfinished download?!"; + } + } + } + } while(stillRunning && _isStarted); +} + +URLFetcher* URLFetcher::_instance = NULL; + +URLFetcher* URLFetcher::getInstance() { + if (_instance == NULL) { + _instance = new URLFetcher(); + } + return _instance; +} + + +} \ No newline at end of file diff --git a/src/uscxml/util/URL.h b/src/uscxml/util/URL.h new file mode 100644 index 0000000..f545fe8 --- /dev/null +++ b/src/uscxml/util/URL.h @@ -0,0 +1,333 @@ +/** + * @file + * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#ifndef URL_H_9DAEGSMV +#define URL_H_9DAEGSMV + +#include "uscxml/Common.h" +#include "uscxml/messages/Event.h" + +#define DOWNLOAD_IF_NECESSARY if (!_isDownloaded) { download(true); } + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define USCXML_URI_STRING(obj, field) std::string(obj.field.first, obj.field.afterLast - obj.field.first) + +namespace uscxml { + +class URL; + +class USCXML_API URLMonitor { +public: + virtual void downloadStarted(const URL& url) {}; + virtual void downloadCompleted(const URL& url) {}; + virtual void downloadFailed(const URL& url, int errorCode) {}; + virtual void headerChunkReceived(const URL& url, const std::string& headerChunk) {}; + virtual void contentChunkReceived(const URL& url, const std::string& contentChunk) {}; +}; + +enum URLRequestType { + POST, + GET +}; + +class USCXML_API URLImpl : public std::enable_shared_from_this { +public: + URLImpl(const std::string& url); + ~URLImpl(); + + bool isAbsolute() const { + // see https://sourceforge.net/p/uriparser/bugs/3/ + return _uri.absolutePath || ((_uri.hostText.first != nullptr) && (_uri.pathHead != nullptr)); + } + + std::string scheme() const { + return USCXML_URI_STRING(_uri, scheme); + } + + std::string userInfo() const { + return USCXML_URI_STRING(_uri, userInfo); + } + + std::string host() const { + return USCXML_URI_STRING(_uri, hostText); + } + + std::string port() const { + return USCXML_URI_STRING(_uri, portText); + } + + std::string fragment() const { + return USCXML_URI_STRING(_uri, fragment); + } + + std::map query() const; + std::string path() const; + std::list pathComponents() const; + + void normalize(); + + static URL resolve(URLImpl* relativeURL, URLImpl* absoluteURL); + static URL resolveWithCWD(URLImpl* relativeURL); + static URL refer(URLImpl* absoluteSource, URLImpl* absoluteBase); + + void addMonitor(URLMonitor* monitor) { + _monitors.insert(monitor); + } + void removeMonitor(URLMonitor* monitor) { + _monitors.erase(monitor); + } + + // downloading / uploading + void addOutHeader(const std::string& key, const std::string& value) { + _outHeader[key] = value; + } + void setOutContent(const std::string& content) { + _outContent = content; + _requestType = URLRequestType::POST; + } + void setRequestType(URLRequestType requestType) { + _requestType = requestType; + + } + + const std::map getInHeaderFields() { + DOWNLOAD_IF_NECESSARY + return _inHeaders; + } + + const std::string getInHeaderField(const std::string& key) { + DOWNLOAD_IF_NECESSARY + if (_inHeaders.find(key) != _inHeaders.end()) { + return _inHeaders[key]; + } + return ""; + } + + const std::string getStatusCode() const { +// DOWNLOAD_IF_NECESSARY + return _statusCode; + } + + const std::string getStatusMessage() const { +// DOWNLOAD_IF_NECESSARY + return _statusMsg; + } + + const std::string getInContent(bool forceReload = false) { + if (forceReload) + _isDownloaded = false; + DOWNLOAD_IF_NECESSARY + return _rawInContent.str(); + } + + const void download(bool blocking = false); + + operator Data() const; + operator std::string() const; + +protected: + URLImpl(); + UriUriA _uri; + std::string _orig; + + CURL* getCurlHandle(); + static size_t writeHandler(void *ptr, size_t size, size_t nmemb, void *userdata); + static size_t headerHandler(void *ptr, size_t size, size_t nmemb, void *userdata); + + void downloadStarted(); + void downloadCompleted(); + void downloadFailed(CURLcode errorCode); + + static void prepareException(ErrorEvent& exception, int errorCode, const std::string& origUri, UriParserStateA* parser); + + CURL* _handle; + std::stringstream _rawInContent; + std::stringstream _rawInHeader; + std::map _inHeaders; + + std::string _outContent; + std::map _outHeader; + URLRequestType _requestType; + + std::string _statusCode; + std::string _statusMsg; + bool _isDownloaded; + bool _hasFailed; + std::string _error; + + std::condition_variable_any _condVar; + std::recursive_mutex _mutex; + + std::set _monitors; + + friend class URLFetcher; +}; + +class USCXML_API URL { +public: + PIMPL_OPERATORS(URL) + URL(const std::string url) : _impl(new URLImpl(url)) {} + + bool isAbsolute() { + return _impl->isAbsolute(); + } + + std::string scheme() { + return _impl->scheme(); + } + + std::string userInfo() { + return _impl->userInfo(); + } + + std::string host() { + return _impl->host(); + } + + std::string port() { + return _impl->port(); + } + + std::string fragment() { + return _impl->fragment(); + } + + std::map query() { + return _impl->query(); + } + + std::string path() { + return _impl->path(); + } + + std::list pathComponents() { + return _impl->pathComponents(); + } + + void normalize() { + return _impl->normalize(); + } + + static URL resolve(URL relativeURL, URL absoluteURL) { + return URLImpl::resolve(relativeURL._impl.get(), absoluteURL._impl.get()); + } + + static URL resolveWithCWD(URL relativeURL) { + return URLImpl::resolveWithCWD(relativeURL._impl.get()); + } + + static URL refer(URL absoluteSource, URL absoluteBase) { + return URLImpl::refer(absoluteSource._impl.get(), absoluteBase._impl.get()); + } + + void addOutHeader(const std::string& key, const std::string& value) { + return _impl->addOutHeader(key, value); + } + + void setOutContent(const std::string& content) { + return _impl->setOutContent(content); + } + void setRequestType(URLRequestType requestType) { + return _impl->setRequestType(requestType); + } + + const std::map getInHeaderFields() { + return _impl->getInHeaderFields(); + } + + const std::string getInHeaderField(const std::string& key) { + return _impl->getInHeaderField(key); + } + + const std::string getStatusCode() const { + return _impl->getStatusCode(); + } + + const std::string getStatusMessage() const { + return _impl->getStatusMessage(); + } + + const std::string getInContent(bool forceReload = false) { + return _impl->getInContent(forceReload); + } + + const void download(bool blocking = false) const { + return _impl->download(blocking); + } + + void addMonitor(URLMonitor* monitor) { + return _impl->addMonitor(monitor); + } + void removeMonitor(URLMonitor* monitor) { + return _impl->removeMonitor(monitor); + } + + operator Data() const { + return _impl->operator Data(); + } + + operator std::string() { + return (*_impl.get()); + } + +protected: + std::shared_ptr _impl; + friend class URLFetcher; +}; + +class USCXML_API URLFetcher { +public: + static void fetchURL(URL& url); + static void breakURL(URL& url); + + void start(); + void stop(); + +protected: + URLFetcher(); + ~URLFetcher(); + + static URLFetcher* _instance; + static URLFetcher* getInstance(); + + static void run(void* instance); + void perform(); + + std::thread* _thread; + std::condition_variable_any _condVar; + std::recursive_mutex _mutex; + bool _isStarted; + + std::map _handlesToURLs; + CURLM* _multiHandle; + char* _envProxy; +}; + +} + +#endif /* end of include guard: URL_H_9DAEGSMV */ diff --git a/src/uscxml/util/UUID.cpp b/src/uscxml/util/UUID.cpp new file mode 100644 index 0000000..34e3e75 --- /dev/null +++ b/src/uscxml/util/UUID.cpp @@ -0,0 +1,70 @@ +/** + * @file + * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#include "UUID.h" +#include +#include + +namespace uscxml { +boost::uuids::random_generator UUID::uuidGen; + +std::string UUID::getUUID() { + boost::uuids::uuid uuid = uuidGen(); + std::ostringstream os; + os << uuid; + return os.str(); +} + +bool UUID::isUUID(const std::string& uuid) { + if (uuid.size() != 36) + return false; + + if (uuid[8] != '-' || uuid[13] != '-' || uuid[18] != '-' || uuid[23] != '-') + return false; + + for (size_t i = 0; i < 36; i++) { + if (i == 8 || i == 13 || i == 18 || i ==23) + continue; + + char c = uuid[i]; + if (c == 'a' || + c == 'b' || + c == 'c' || + c == 'd' || + c == 'e' || + c == 'f' || + c == '0' || + c == '1' || + c == '2' || + c == '3' || + c == '4' || + c == '5' || + c == '6' || + c == '7' || + c == '8' || + c == '9') { + continue; + } else { + return false; + } + } + return true; +} + +} \ No newline at end of file diff --git a/src/uscxml/util/UUID.h b/src/uscxml/util/UUID.h new file mode 100644 index 0000000..873d963 --- /dev/null +++ b/src/uscxml/util/UUID.h @@ -0,0 +1,39 @@ +/** + * @file + * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#ifndef UUID_H_8X65R2EI +#define UUID_H_8X65R2EI + +#include "uscxml/Common.h" +#include +#include + +namespace uscxml { + +class USCXML_API UUID { +public: + static std::string getUUID(); + static bool isUUID(const std::string& uuid); + static boost::uuids::random_generator uuidGen; +}; + +} + + +#endif /* end of include guard: UUID_H_8X65R2EI */ diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 965fa9d..c3dd6a3 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -20,74 +20,35 @@ function(USCXML_TEST_COMPILE) set_target_properties(${USCXML_TEST_NAME} PROPERTIES FOLDER "Tests") endfunction() -if (NOT WIN32) - USCXML_TEST_COMPILE(NAME test-predicates LABEL general/test-predicates FILES src/test-predicates.cpp) - USCXML_TEST_COMPILE(BUILD_ONLY NAME test-vxml-mmi-socket LABEL general/test-vxml-mmi-socket FILES src/test-vxml-mmi-socket.cpp) - USCXML_TEST_COMPILE(BUILD_ONLY NAME test-vxml-mmi-http LABEL general/test-vxml-mmi-http FILES src/test-vxml-mmi-http.cpp) - USCXML_TEST_COMPILE(BUILD_ONLY NAME test-arabica-xpath LABEL general/test-arabica-xpath FILES src/test-arabica-xpath.cpp) - USCXML_TEST_COMPILE(NAME test-mmi LABEL general/test-mmi FILES src/test-mmi.cpp) - USCXML_TEST_COMPILE(NAME test-trie LABEL general/test-trie FILES src/test-trie.cpp) - USCXML_TEST_COMPILE(NAME test-arabica-namespaces LABEL general/test-arabica-namespaces FILES src/test-arabica-namespaces.cpp) - USCXML_TEST_COMPILE(NAME test-arabica-events LABEL general/test-arabica-events FILES src/test-arabica-events.cpp - ARGS ${CMAKE_CURRENT_SOURCE_DIR}/uscxml/arabica/test-arabica-events.xml) - USCXML_TEST_COMPILE(NAME test-arabica-parsing LABEL general/test-arabica-parsing FILES src/test-arabica-parsing.cpp) - USCXML_TEST_COMPILE(NAME test-promela-parser LABEL general/test-promela-parser FILES src/test-promela-parser.cpp) - target_link_libraries(test-promela-parser uscxml_transform) - USCXML_TEST_COMPILE(BUILD_ONLY NAME test-stress LABEL general/test-stress FILES src/test-stress.cpp) - - USCXML_TEST_COMPILE(NAME test-c-machine LABEL general/test-c-machine FILES - src/test-c-machine.cpp - # ../src/compiled/cxx/StateChart.cpp - # ../src/compiled/cxx/StateChart.h - ) - USCXML_TEST_COMPILE(NAME test-misc LABEL general/test-misc FILES src/test-misc.cpp) - -endif() - -if (APPLE) - USCXML_TEST_COMPILE(BUILD_ONLY NAME test-dirmon LABEL general/test-dirmon FILES src/test-dirmon.cpp) -endif() - -USCXML_TEST_COMPILE(BUILD_ONLY NAME test-sockets LABEL general/test-sockets FILES src/test-sockets.cpp) - -USCXML_TEST_COMPILE(NAME test-issue62 LABEL general/test-issue62 FILES src/issues/test-issue62.cpp) -USCXML_TEST_COMPILE(NAME test-issue63 LABEL general/test-issue63 FILES src/issues/test-issue63.cpp) - +# simple one file tests USCXML_TEST_COMPILE(NAME test-url LABEL general/test-url FILES src/test-url.cpp) -USCXML_TEST_COMPILE(NAME test-doneevent LABEL general/test-doneevent FILES src/test-doneevent.cpp) -USCXML_TEST_COMPILE(NAME test-base64 LABEL general/test-base64 FILES src/test-base64.cpp) -USCXML_TEST_COMPILE(NAME test-eventdelay LABEL general/test-eventdelay FILES src/test-eventdelay.cpp) -USCXML_TEST_COMPILE(NAME test-flat-stateid LABEL general/test-flat-stateid FILES src/test-flat-stateid.cpp) -target_link_libraries(test-flat-stateid uscxml_transform) USCXML_TEST_COMPILE(NAME test-lifecycle LABEL general/test-lifecycle FILES src/test-lifecycle.cpp) -USCXML_TEST_COMPILE(NAME test-issue-reporting LABEL general/test-issue-reporting FILES src/test-issue-reporting.cpp) -USCXML_TEST_COMPILE(NAME test-cmdline-parsing LABEL general/test-cmdline-parsing FILES src/test-cmdline-parsing.cpp) -USCXML_TEST_COMPILE(NAME test-datamodel LABEL general/test-datamodel FILES src/test-datamodel.cpp) - +USCXML_TEST_COMPILE(NAME test-validating LABEL general/test-validating FILES src/test-validating.cpp) -if (EXPECT_FOUND AND TCL_FOUND) - USCXML_TEST_COMPILE(BUILD_ONLY NAME test-expect LABEL general/test-expect FILES src/test-expect.cpp) -endif() +# the one binary to test for pass / fail final states +add_executable(test-state-pass src/test-state-pass.cpp) +target_link_libraries(test-state-pass uscxml) +set_target_properties(test-state-pass PROPERTIES FOLDER "Tests") -if (LIBPURPLE_FOUND) - USCXML_TEST_COMPILE(BUILD_ONLY NAME test-instant-messaging LABEL general/test-instant-messaging FILES src/test-instant-messaging.cpp) -endif() +add_executable(test-gen-c src/test-gen-c.cpp) +target_link_libraries(test-gen-c uscxml) +set_target_properties(test-gen-c PROPERTIES FOLDER "Tests") -if (FFMPEG_FOUND) - USCXML_TEST_COMPILE(BUILD_ONLY NAME test-ffmpeg LABEL general/test-ffmpeg FILES src/test-ffmpeg.cpp) -endif() - -if (SWI_FOUND) - add_test(test-prolog-swi ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser -t2345 ${CMAKE_SOURCE_DIR}/test/uscxml/test-prolog.scxml) -endif() - -if (ECMA_FOUND) - add_test(test-ecmascript ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser ${CMAKE_SOURCE_DIR}/test/uscxml/test-ecmascript.scxml) -endif() - -add_test(test-execution ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser ${CMAKE_SOURCE_DIR}/test/uscxml/test-execution.scxml) -add_test(test-communication ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser -t5493 ${CMAKE_SOURCE_DIR}/test/uscxml/test-communication.scxml) -add_test(test-done-data ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser ${CMAKE_SOURCE_DIR}/test/uscxml/test-donedata.scxml) +# issues +file(GLOB_RECURSE USCXML_ISSUES + issues/*.cpp + issues/*.scxml +) +foreach(USCXML_ISSUE ${USCXML_ISSUES} ) + get_filename_component(ISSUE_NAME ${USCXML_ISSUE} NAME_WE) + get_filename_component(ISSUE_TYPE ${USCXML_ISSUE} EXT) + if (ISSUE_TYPE STREQUAL ".scxml") + add_test(issue/${ISSUE_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-state-pass ${USCXML_ISSUE}) + set_property(TEST issue/${ISSUE_NAME} PROPERTY LABELS issue/${ISSUE_NAME}) + else() + USCXML_TEST_COMPILE(NAME ${ISSUE_NAME} LABEL issues/${ISSUE_NAME} FILES ${USCXML_ISSUE}) + endif() +endforeach() # make sure all headers are self-reliant file(GLOB_RECURSE USCXML_HEADERS @@ -118,39 +79,9 @@ foreach(USCXML_HEADER ${USCXML_HEADERS} ) endforeach() - -# tests for inline SCXML with generated C - -add_executable(test-c-inline src/test-c-inline.c) -set_target_properties(test-c-inline PROPERTIES FOLDER "Tests") - -add_test(NAME "gen/c/inline" - COMMAND ${CMAKE_COMMAND} - -DOUTDIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/gen/c - -DTESTFILE:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/src/test-c-inline.c - -DTARGETLANG=c - -DUSCXML_TRANSFORM_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-transform - -DCC_BIN:FILEPATH=${CC} - -DCXX_BIN:FILEPATH=${CXX} - -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} - -DUSCXML_PLATFORM_ID=${USCXML_PLATFORM_ID} - -DCMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} - -DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR} - -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} - -P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_generated_inline_test.cmake) -set_tests_properties("gen/c/inline" PROPERTIES DEPENDS uscxml-transform) -set_property(TEST "gen/c/inline" PROPERTY LABELS "gen/c/inline") - - # declare W3C tests -if (NOT BUILD_MINIMAL) - # compile and add all reported issues tests - - add_executable(test-w3c src/test-w3c.cpp) - target_link_libraries(test-w3c uscxml uscxml_transform) - set_target_properties(test-w3c PROPERTIES FOLDER "Tests") - +if (NOT BUILD_MINIMAL) # copy resources file(GLOB_RECURSE W3C_RESOURCES w3c/*.txt @@ -159,37 +90,33 @@ if (NOT BUILD_MINIMAL) set(TEST_CLASSES # standard tests generated per datamodel + "namespace" "ecma" - "xpath" + # "xpath" "null" "lua" - "promela" + # "promela" # generated c source "gen/c/ecma" - "gen/c/xpath" + # "gen/c/xpath" "gen/c/lua" - "gen/c/promela" - "gen/vhdl/ecma" + # "gen/c/promela" + # "gen/vhdl/ecma" # state-machine interpreters - "fsm/ecma" - "fsm/xpath" - "fsm/lua" - "fsm/promela" + # "fsm/ecma" + # "fsm/xpath" + # "fsm/lua" + # "fsm/promela" # formal verification - "spin/promela" - - # minimized interpreters - "min/ecma" - "min/xpath" - "min/lua" - "min/promela" + # "spin/promela" # performance tests - "perf/gen/c/ecma" - "perf/ecma") + # "perf/gen/c/ecma" + # "perf/ecma" + ) # prepare directories for test classes and copy resources over foreach(W3C_RESOURCE ${W3C_RESOURCES} ) @@ -234,12 +161,12 @@ if (NOT BUILD_MINIMAL) # normal IRP tests - get all scxml files within foreach(W3C_TEST ${W3C_TESTS} ) get_filename_component(TEST_FILE ${W3C_TEST} NAME) - set(TEST_NAME "${TEST_CLASS}/${TEST_FILE}") + set(TEST_NAME "w3c/${TEST_CLASS}/${TEST_FILE}") if (NOT TEST_NAME MATCHES ".*sub.*") if (IS_STANDARD_TEST) - add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST}) + add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-state-pass ${W3C_TEST}) if (TEST_NAME MATCHES ".*/test250.scxml") set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "entering final state, invocation was not cancelled") @@ -269,22 +196,15 @@ if (NOT BUILD_MINIMAL) -DUSCXML_PLATFORM_ID=${USCXML_PLATFORM_ID} -DCMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} -DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR} + -DXercesC_INCLUDE_DIRS=${XercesC_INCLUDE_DIRS} + -DURIPARSER_INCLUDE_DIR=${URIPARSER_INCLUDE_DIR} + -DLIBEVENT_INCLUDE_DIR=${LIBEVENT_INCLUDE_DIR} -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} - -DSCAFFOLDING_FOR_GENERATED_C:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/src/test-c-machine.cpp - -P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_generated_test.cmake) + -DSCAFFOLDING_FOR_GENERATED_C:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/src/test-gen-c.cpp + -P ${CMAKE_CURRENT_SOURCE_DIR}/ctest/scripts/run_generated_test.cmake) set_tests_properties("${TEST_NAME}" PROPERTIES DEPENDS uscxml-transform) endif() - - elseif (TEST_TYPE MATCHES "^min.*") - - add_test(NAME "${TEST_NAME}" - COMMAND ${CMAKE_COMMAND} - -DOUTDIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/${TEST_CLASS} - -DTESTFILE:FILEPATH=${W3C_TEST} - -DUSCXML_TRANSFORM_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-transform - -DUSCXML_W3C_TEST_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c - -P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_minimized_test.cmake) elseif (TEST_TYPE MATCHES "^spin.*") @@ -299,13 +219,13 @@ if (NOT BUILD_MINIMAL) -DUSCXML_TRANSFORM_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-transform -DSPIN_BIN:FILEPATH=${SPIN} -DCC_BIN:FILEPATH=${CC} - -P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_promela_test.cmake) + -P ${CMAKE_CURRENT_SOURCE_DIR}/ctest/scripts/run_promela_test.cmake) set_tests_properties("${TEST_NAME}" PROPERTIES PASS_REGULAR_EXPRESSION "depth reached [0-9]+, errors: 0") set_tests_properties("${TEST_NAME}" PROPERTIES FAIL_REGULAR_EXPRESSION "depth reached [0-9]+, errors: [1-9]+") elseif (TEST_TYPE MATCHES "^fsm.*") - add_test("${TEST_NAME}" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c -f ${W3C_TEST}) + add_test("${TEST_NAME}" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-state-pass -f ${W3C_TEST}) endif() endif() @@ -320,156 +240,4 @@ if (NOT BUILD_MINIMAL) endforeach() endforeach() - # # iterate all SCXML files in test directory - # foreach( W3C_TEST ${W3C_TESTS} ) - # string(REGEX MATCH "[^//]+/[^//]+.scxml" TEST_NAME ${W3C_TEST}) - # message("TEST_NAME: ${TEST_NAME}") - # if (NOT TEST_NAME MATCHES ".*sub.*") - # - # # add new test - # add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST}) - # set_property(TEST ${TEST_NAME} PROPERTY LABELS ${TEST_NAME}) - # set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # - # if (BUILD_TESTS_W3C_ECMA AND TEST_NAME MATCHES "^ecma\\/.*") - # add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST}) - # set_property(TEST ${TEST_NAME} PROPERTY LABELS ${TEST_NAME}) - # set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # - # # set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "TEST FAILED") - # - # if (TEST_NAME STREQUAL "ecma/test250.scxml") - # set_tests_properties(${TEST_NAME} PROPERTIES - # FAIL_REGULAR_EXPRESSION "entering final state, invocation was not cancelled") - # elseif (TEST_NAME STREQUAL "ecma/test307.scxml") - # set_tests_properties(${TEST_NAME} PROPERTIES - # FAIL_REGULAR_EXPRESSION "error in state") - # endif() - # endif() - # - # if (BUILD_TESTS_GENERATED_C AND TEST_NAME MATCHES "^ecma\\/.*") - # add_test(NAME "gen_c/${TEST_NAME}" - # COMMAND ${CMAKE_COMMAND} - # -DOUTDIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/gen_c - # -DTESTFILE:FILEPATH=${W3C_TEST} - # -DJSC_LIBRARY:FILEPATH=${JSC_LIBRARY} - # -DUSCXML_TRANSFORM_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-transform - # -DCC_BIN:FILEPATH=${CC} - # -DCXX_BIN:FILEPATH=${CXX} - # -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} - # -DUSCXML_PLATFORM_ID=${USCXML_PLATFORM_ID} - # -DCMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} - # -DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR} - # -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} - # -DSCAFFOLDING_FOR_GENERATED_C:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/src/test-c-machine.cpp - # -P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_generated_c_test.cmake) - # set_property(TEST "gen_c/${TEST_NAME}" PROPERTY LABELS "gen_c/${TEST_NAME}") - # set_tests_properties("gen_c/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # set_tests_properties("gen_c/${TEST_NAME}" PROPERTIES DEPENDS uscxml-transform) - # - # endif() - # - # if (BUILD_TESTS_FSM AND BUILD_TESTS_FSM_ECMA AND TEST_NAME MATCHES "^ecma\\/.*") - # add_test("fsm/${TEST_NAME}" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c -f ${W3C_TEST}) - # set_property(TEST "fsm/${TEST_NAME}" PROPERTY LABELS "fsm/${TEST_NAME}") - # set_tests_properties("fsm/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # - # add_test(NAME "minimized/${TEST_NAME}" - # COMMAND ${CMAKE_COMMAND} - # -DOUTDIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/ecma - # -DTESTFILE:FILEPATH=${W3C_TEST} - # -DUSCXML_TRANSFORM_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-transform - # -DUSCXML_W3C_TEST_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c - # -P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_minimized_test.cmake) - # set_property(TEST "minimized/${TEST_NAME}" PROPERTY LABELS "minimized/${TEST_NAME}") - # set_tests_properties("minimized/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # - # set_tests_properties(${TEST_NAME} PROPERTIES DEPENDS uscxml-transform) - # set_tests_properties(${TEST_NAME} PROPERTIES DEPENDS test-w3c) - # - # # add_test(NAME "fsm/minimized/${TEST_NAME}" - # # COMMAND ${CMAKE_COMMAND} - # # -DOUTDIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/ecma - # # -DTESTFILE:FILEPATH=${W3C_TEST} - # # -DUSCXML_TRANSFORM_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-transform - # # -DUSCXML_W3C_TEST_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c - # # -P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_minimized_flat_test.cmake) - # # set_property(TEST "fsm/minimized/${TEST_NAME}" PROPERTY LABELS "fsm/minimized/${TEST_NAME}") - # # set_tests_properties("fsm/minimized/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # - # # set_tests_properties(${TEST_NAME} PROPERTIES DEPENDS uscxml-transform) - # # set_tests_properties(${TEST_NAME} PROPERTIES DEPENDS test-w3c) - # - # endif() - # - # if (BUILD_TESTS_W3C_XPATH AND TEST_NAME MATCHES "^xpath\\/.*") - # add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST}) - # set_property(TEST ${TEST_NAME} PROPERTY LABELS ${TEST_NAME}) - # set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # # set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "TEST FAILED") - # if (BUILD_TESTS_FSM AND BUILD_TESTS_FSM_XPATH) - # add_test("fsm/${TEST_NAME}" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c -f ${W3C_TEST}) - # set_property(TEST "fsm/${TEST_NAME}" PROPERTY LABELS "fsm/${TEST_NAME}") - # set_tests_properties("fsm/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # endif() - # endif() - # - # if (BUILD_DM_LUA AND LUA_FOUND AND BUILD_TESTS_W3C_LUA AND TEST_NAME MATCHES "^lua\\/.*") - # add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST}) - # set_property(TEST ${TEST_NAME} PROPERTY LABELS ${TEST_NAME}) - # set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # # set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "TEST FAILED") - # if (BUILD_TESTS_FSM AND BUILD_TESTS_FSM_LUA) - # add_test("fsm/${TEST_NAME}" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c -f ${W3C_TEST}) - # set_property(TEST "fsm/${TEST_NAME}" PROPERTY LABELS "fsm/${TEST_NAME}") - # set_tests_properties("fsm/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # endif() - # - # endif() - # - # if (BUILD_DM_PROLOG AND SWI_FOUND AND BUILD_TESTS_W3C_PROLOG AND TEST_NAME MATCHES "^prolog\\/.*") - # add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST}) - # set_property(TEST ${TEST_NAME} PROPERTY LABELS ${TEST_NAME}) - # set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # # set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "TEST FAILED") - # if (BUILD_TESTS_FSM AND BUILD_TESTS_FSM_PROLOG) - # add_test("fsm/${TEST_NAME}" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c -f ${W3C_TEST}) - # set_property(TEST "fsm/${TEST_NAME}" PROPERTY LABELS "fsm/${TEST_NAME}") - # set_tests_properties("fsm/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # endif() - # endif() - # - # if (BUILD_DM_PROMELA AND BUILD_TESTS_W3C_PROMELA AND TEST_NAME MATCHES "^promela\\/.*") - # add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST}) - # set_property(TEST ${TEST_NAME} PROPERTY LABELS ${TEST_NAME}) - # set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # # set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "TEST FAILED") - # if (BUILD_TESTS_FSM AND BUILD_TESTS_FSM_PROMELA) - # add_test("fsm/${TEST_NAME}" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c -f ${W3C_TEST}) - # set_property(TEST "fsm/${TEST_NAME}" PROPERTY LABELS "fsm/${TEST_NAME}") - # set_tests_properties("fsm/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # endif() - # endif() - # - # if (CC AND SPIN AND BUILD_DM_PROMELA AND BUILD_TESTS_W3C_PROMELA AND TEST_NAME MATCHES "^promela\\/.*") - # - # add_test(NAME "spin/${TEST_NAME}" - # COMMAND ${CMAKE_COMMAND} - # -DOUTDIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/promela - # -DTESTFILE:FILEPATH=${W3C_TEST} - # -DUSCXML_TRANSFORM_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-transform - # -DSPIN_BIN:FILEPATH=${SPIN} - # -DCC_BIN:FILEPATH=${CC} - # -P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_promela_test.cmake) - # set_property(TEST "spin/${TEST_NAME}" PROPERTY LABELS "spin/${TEST_NAME}") - # set_tests_properties("spin/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT}) - # set_tests_properties("spin/${TEST_NAME}" PROPERTIES PASS_REGULAR_EXPRESSION "depth reached [0-9]+, errors: 0") - # set_tests_properties("spin/${TEST_NAME}" PROPERTIES FAIL_REGULAR_EXPRESSION "depth reached [0-9]+, errors: [1-9]+") - # - # set_tests_properties(${TEST_NAME} PROPERTIES DEPENDS uscxml-transform) - # # set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "TEST FAILED") - # endif() - # - # endif() - # endforeach() endif() \ No newline at end of file diff --git a/test/ctest/CTestCustom.ctest.in b/test/ctest/CTestCustom.ctest.in index 9dfd5b2..e20f00d 100644 --- a/test/ctest/CTestCustom.ctest.in +++ b/test/ctest/CTestCustom.ctest.in @@ -3,15 +3,15 @@ # grep -ori 'manual' . # manual tests: -# "test178.scxml" -# "test230.scxml" -# "test250.scxml" -# "test301.scxml" # Allowed to reject -# "test307.scxml" -# "test313.scxml" # Allowed to be rejected -# "test314.scxml" # Allowed to be rejected -# "test415.scxml" -# "test513.txt" +# "w3c/test178.scxml" +# "w3c/test230.scxml" +# "w3c/test250.scxml" +# "w3c/test301.scxml" # Allowed to reject +# "w3c/test307.scxml" +# "w3c/test313.scxml" # Allowed to be rejected +# "w3c/test314.scxml" # Allowed to be rejected +# "w3c/test415.scxml" +# "w3c/test513.txt" # null datamodel # "test436.scxml" @@ -20,244 +20,244 @@ set(CTEST_CUSTOM_TESTS_IGNORE ### Ignore for ECMAScript datamodel - "ecma/test178.scxml" # Manual - PASSED - "ecma/test230.scxml" # Manual - PASSED - "ecma/test250.scxml" # Manual - PASSED - "ecma/test307.scxml" # Manual - PASSED - "ecma/test313.scxml" # Manual - PASSED - "ecma/test314.scxml" # Manual - PASSED - "ecma/test415.scxml" # Manual - PASSED - # "ecma/test513.txt" # Manual - PASSED + "w3c/ecma/test178.scxml" # Manual - PASSED + "w3c/ecma/test230.scxml" # Manual - PASSED + "w3c/ecma/test250.scxml" # Manual - PASSED + "w3c/ecma/test307.scxml" # Manual - PASSED + "w3c/ecma/test313.scxml" # Manual - PASSED + "w3c/ecma/test314.scxml" # Manual - PASSED + "w3c/ecma/test415.scxml" # Manual - PASSED + # "w3c/ecma/test513.txt" # Manual - PASSED - "ecma/test301.scxml" # Invalid script URL - PASSED - "ecma/test436.scxml" # Tests NULL datamodel - PASSED + "w3c/ecma/test301.scxml" # Invalid script URL - PASSED + "w3c/ecma/test436.scxml" # Tests NULL datamodel - PASSED ### Ignore for flattened ECMAScript datamodel - "fsm/ecma/test178.scxml" # Manual - PASSED - "fsm/ecma/test230.scxml" # Manual - PASSED - "fsm/ecma/test250.scxml" # Manual - PASSED - "fsm/ecma/test307.scxml" # Manual - PASSED - "fsm/ecma/test313.scxml" # Manual - PASSED - "fsm/ecma/test314.scxml" # Manual - PASSED - "fsm/ecma/test415.scxml" # Manual - PASSED - # "fsm/ecma/test513.txt" # Manual - PASSED + "w3c/fsm/ecma/test178.scxml" # Manual - PASSED + "w3c/fsm/ecma/test230.scxml" # Manual - PASSED + "w3c/fsm/ecma/test250.scxml" # Manual - PASSED + "w3c/fsm/ecma/test307.scxml" # Manual - PASSED + "w3c/fsm/ecma/test313.scxml" # Manual - PASSED + "w3c/fsm/ecma/test314.scxml" # Manual - PASSED + "w3c/fsm/ecma/test415.scxml" # Manual - PASSED + # "w3c/fsm/ecma/test513.txt" # Manual - PASSED - "fsm/ecma/test301.scxml" # Invalid script URL - PASSED - "fsm/ecma/test436.scxml" # Tests NULL datamodel - PASSED + "w3c/fsm/ecma/test301.scxml" # Invalid script URL - PASSED + "w3c/fsm/ecma/test436.scxml" # Tests NULL datamodel - PASSED ### Ignore for flattened, minimized ECMAScript datamodel - "fsm/minimized/ecma/test178.scxml" # Manual - PASSED - "fsm/minimized/ecma/test230.scxml" # Manual - PASSED - "fsm/minimized/ecma/test250.scxml" # Manual - PASSED - "fsm/minimized/ecma/test307.scxml" # Manual - PASSED - "fsm/minimized/ecma/test313.scxml" # Manual - PASSED - "fsm/minimized/ecma/test314.scxml" # Manual - PASSED - "fsm/minimized/ecma/test415.scxml" # Manual - PASSED - # "fsm/minimized/ecma/test513.txt" # Manual - PASSED + "w3c/fsm/minimized/ecma/test178.scxml" # Manual - PASSED + "w3c/fsm/minimized/ecma/test230.scxml" # Manual - PASSED + "w3c/fsm/minimized/ecma/test250.scxml" # Manual - PASSED + "w3c/fsm/minimized/ecma/test307.scxml" # Manual - PASSED + "w3c/fsm/minimized/ecma/test313.scxml" # Manual - PASSED + "w3c/fsm/minimized/ecma/test314.scxml" # Manual - PASSED + "w3c/fsm/minimized/ecma/test415.scxml" # Manual - PASSED + # "w3c/fsm/minimized/ecma/test513.txt" # Manual - PASSED - "fsm/minimized/ecma/test301.scxml" # Invalid script URL - PASSED - "fsm/minimized/ecma/test436.scxml" # Tests NULL datamodel - PASSED + "w3c/fsm/minimized/ecma/test301.scxml" # Invalid script URL - PASSED + "w3c/fsm/minimized/ecma/test436.scxml" # Tests NULL datamodel - PASSED ### Just ignore the XPath datamodel tests that hang, most of the rest fails as well - "xpath/test178.scxml" # Manual - PASSED - "xpath/test230.scxml" # Manual - PASSED - "xpath/test250.scxml" # Manual - PASSED - "xpath/test307.scxml" # Manual - PASSED - "xpath/test313.scxml" # Manual - PASSED - "xpath/test314.scxml" # Manual - PASSED - "xpath/test415.scxml" # Manual - PASSED - # "xpath/test513.txt" # Manual - PASSED + "w3c/xpath/test178.scxml" # Manual - PASSED + "w3c/xpath/test230.scxml" # Manual - PASSED + "w3c/xpath/test250.scxml" # Manual - PASSED + "w3c/xpath/test307.scxml" # Manual - PASSED + "w3c/xpath/test313.scxml" # Manual - PASSED + "w3c/xpath/test314.scxml" # Manual - PASSED + "w3c/xpath/test415.scxml" # Manual - PASSED + # "w3c/xpath/test513.txt" # Manual - PASSED - "xpath/test301.scxml" # Invalid script URL - PASSED - "xpath/test436.scxml" # Tests NULL datamodel - PASSED + "w3c/xpath/test301.scxml" # Invalid script URL - PASSED + "w3c/xpath/test436.scxml" # Tests NULL datamodel - PASSED ### Ignore for LUA datamodel - "lua/test178.scxml" # Manual - PASSED - "lua/test230.scxml" # Manual - PASSED - "lua/test250.scxml" # Manual - PASSED - "lua/test307.scxml" # Manual - PASSED - "lua/test313.scxml" # Manual - PASSED - "lua/test314.scxml" # Manual - PASSED - "lua/test415.scxml" # Manual - PASSED - # "lua/test513.txt" # Manual - PASSED + "w3c/lua/test178.scxml" # Manual - PASSED + "w3c/lua/test230.scxml" # Manual - PASSED + "w3c/lua/test250.scxml" # Manual - PASSED + "w3c/lua/test307.scxml" # Manual - PASSED + "w3c/lua/test313.scxml" # Manual - PASSED + "w3c/lua/test314.scxml" # Manual - PASSED + "w3c/lua/test415.scxml" # Manual - PASSED + # "w3c/lua/test513.txt" # Manual - PASSED - "lua/test301.scxml" # Invalid script URL - PASSED - "lua/test436.scxml" # Tests NULL datamodel - PASSED + "w3c/lua/test301.scxml" # Invalid script URL - PASSED + "w3c/lua/test436.scxml" # Tests NULL datamodel - PASSED ### Ignore for Prolog datamodel - "prolog/test178.scxml" # Manual - PASSED - "prolog/test230.scxml" # Manual - PASSED - "prolog/test250.scxml" # Manual - PASSED - "prolog/test307.scxml" # Manual - PASSED - "prolog/test313.scxml" # Manual - PASSED - "prolog/test314.scxml" # Manual - PASSED - "prolog/test415.scxml" # Manual - PASSED - # "lua/test513.txt" # Manual - PASSED + "w3c/prolog/test178.scxml" # Manual - PASSED + "w3c/prolog/test230.scxml" # Manual - PASSED + "w3c/prolog/test250.scxml" # Manual - PASSED + "w3c/prolog/test307.scxml" # Manual - PASSED + "w3c/prolog/test313.scxml" # Manual - PASSED + "w3c/prolog/test314.scxml" # Manual - PASSED + "w3c/prolog/test415.scxml" # Manual - PASSED + # "w3c/lua/test513.txt" # Manual - PASSED - "prolog/test301.scxml" # Invalid script URL - PASSED - "prolog/test436.scxml" # Tests NULL datamodel - PASSED + "w3c/prolog/test301.scxml" # Invalid script URL - PASSED + "w3c/prolog/test436.scxml" # Tests NULL datamodel - PASSED ### Ignore for PROMELA datamodel # manual tests - "promela/test178.scxml" # two identical params in _event.raw - FAILED - "promela/test230.scxml" # autoforwarded events are identical - PASSED - "promela/test250.scxml" # no onexit in cancelled invoker - PASSED - "promela/test307.scxml" # late data-binding - PASSED - "promela/test313.scxml" # Manual - PASSED - "promela/test314.scxml" # Manual - PASSED - "promela/test415.scxml" # terminate on toplevel final - PASSED - # "promela/test513.txt" # manual test - PASSED + "w3c/promela/test178.scxml" # two identical params in _event.raw - FAILED + "w3c/promela/test230.scxml" # autoforwarded events are identical - PASSED + "w3c/promela/test250.scxml" # no onexit in cancelled invoker - PASSED + "w3c/promela/test307.scxml" # late data-binding - PASSED + "w3c/promela/test313.scxml" # Manual - PASSED + "w3c/promela/test314.scxml" # Manual - PASSED + "w3c/promela/test415.scxml" # terminate on toplevel final - PASSED + # "w3c/promela/test513.txt" # manual test - PASSED - "promela/test301.scxml" # reject invalid script - PASSED - "promela/test436.scxml" # Tests NULL datamodel - PASSED + "w3c/promela/test301.scxml" # reject invalid script - PASSED + "w3c/promela/test436.scxml" # Tests NULL datamodel - PASSED - # "promela/test190.scxml" # string concatenation - # "promela/test224.scxml" # string operation startWith - # "promela/test280.scxml" # no runtime checks for undeclared variables - # "promela/test350.scxml" # string concatenation - # "promela/test509.scxml" # string operation contains - # "promela/test518.scxml" # string operation contains - # "promela/test519.scxml" # string operation contains - # "promela/test520.scxml" # string operation contains - # "promela/test525.scxml" # assumes unbound arrays - # "promela/test530.scxml" # assigns DOM node to variable - # "promela/test534.scxml" # string operation contains + # "w3c/promela/test190.scxml" # string concatenation + # "w3c/promela/test224.scxml" # string operation startWith + # "w3c/promela/test280.scxml" # no runtime checks for undeclared variables + # "w3c/promela/test350.scxml" # string concatenation + # "w3c/promela/test509.scxml" # string operation contains + # "w3c/promela/test518.scxml" # string operation contains + # "w3c/promela/test519.scxml" # string operation contains + # "w3c/promela/test520.scxml" # string operation contains + # "w3c/promela/test525.scxml" # assumes unbound arrays + # "w3c/promela/test530.scxml" # assigns DOM node to variable + # "w3c/promela/test534.scxml" # string operation contains ### Ignore for SPIN model checking # manual tests - # "spin/promela/test178.scxml" # two identical params in _event.raw - FAILED - # "spin/promela/test230.scxml" # autoforwarded events are identical - PASSED - # "spin/promela/test250.scxml" # no onexit in cancelled invoker - PASSED - # "spin/promela/test307.scxml" # declare variable via script - FAILED - # "spin/promela/test313.scxml" # assignment of 'return' - # "spin/promela/test314.scxml" # assignment of 'return' - # "spin/promela/test415.scxml" # terminate on toplevel final - PASSED - # "spin/promela/test513.txt" # manual test - FAILED + # "w3c/spin/promela/test178.scxml" # two identical params in _event.raw - FAILED + # "w3c/spin/promela/test230.scxml" # autoforwarded events are identical - PASSED + # "w3c/spin/promela/test250.scxml" # no onexit in cancelled invoker - PASSED + # "w3c/spin/promela/test307.scxml" # declare variable via script - FAILED + # "w3c/spin/promela/test313.scxml" # assignment of 'return' + # "w3c/spin/promela/test314.scxml" # assignment of 'return' + # "w3c/spin/promela/test415.scxml" # terminate on toplevel final - PASSED + # "w3c/spin/promela/test513.txt" # manual test - FAILED - # "spin/promela/test301.scxml" # reject invalid script - PASSED - # "spin/promela/test436.scxml" # In(s) -> _x.states[s] prevents completion as NULL dm is hardcoded + # "w3c/spin/promela/test301.scxml" # reject invalid script - PASSED + # "w3c/spin/promela/test436.scxml" # In(s) -> _x.states[s] prevents completion as NULL dm is hardcoded # fail for syntax - # "spin/promela/test152.scxml" # test that an illegal array or item value causes error.execution - # "spin/promela/test156.scxml" # test that an error causes the foreach to stop execution - # "spin/promela/test224.scxml" # string operation startWith - # "spin/promela/test277.scxml" # platform creates unbound variable if we assign an illegal value to it - # "spin/promela/test280.scxml" # late data binding / undeclared variable - # "spin/promela/test286.scxml" # assignment to a non-declared var causes an error - # "spin/promela/test294.scxml" # mixed types for event.data via donedata - # "spin/promela/test309.scxml" # 'return' as an invalid boolean expression ought to eval to false - # "spin/promela/test311.scxml" # assignment to a non-declared var - # "spin/promela/test312.scxml" # assignment of 'return' - # "spin/promela/test322.scxml" # assignment to _sessionid - # "spin/promela/test324.scxml" # assignment to _name - # "spin/promela/test325.scxml" # assignment from _ioprocessor - # "spin/promela/test326.scxml" # assignment from _ioprocessor - # "spin/promela/test329.scxml" # test that none of the system variables can be modified - # "spin/promela/test344.scxml" # 'return' as a cond - # "spin/promela/test346.scxml" # assignment to system variables - # "spin/promela/test350.scxml" # string concatenation - # "spin/promela/test354.scxml" # mixed types for event.data - # "spin/promela/test401.scxml" # variable not declared - # "spin/promela/test402.scxml" # variable not declared - # "spin/promela/test487.scxml" # assignment of 'return' - # "spin/promela/test509.scxml" # string operation contains - # "spin/promela/test518.scxml" # string operation contains - # "spin/promela/test519.scxml" # string operation contains - # "spin/promela/test520.scxml" # string operation contains - # "spin/promela/test525.scxml" # assumes unbound arrays - # "spin/promela/test530.scxml" # assigns DOM node to variable - # "spin/promela/test534.scxml" # string operation contains + # "w3c/spin/promela/test152.scxml" # test that an illegal array or item value causes error.execution + # "w3c/spin/promela/test156.scxml" # test that an error causes the foreach to stop execution + # "w3c/spin/promela/test224.scxml" # string operation startWith + # "w3c/spin/promela/test277.scxml" # platform creates unbound variable if we assign an illegal value to it + # "w3c/spin/promela/test280.scxml" # late data binding / undeclared variable + # "w3c/spin/promela/test286.scxml" # assignment to a non-declared var causes an error + # "w3c/spin/promela/test294.scxml" # mixed types for event.data via donedata + # "w3c/spin/promela/test309.scxml" # 'return' as an invalid boolean expression ought to eval to false + # "w3c/spin/promela/test311.scxml" # assignment to a non-declared var + # "w3c/spin/promela/test312.scxml" # assignment of 'return' + # "w3c/spin/promela/test322.scxml" # assignment to _sessionid + # "w3c/spin/promela/test324.scxml" # assignment to _name + # "w3c/spin/promela/test325.scxml" # assignment from _ioprocessor + # "w3c/spin/promela/test326.scxml" # assignment from _ioprocessor + # "w3c/spin/promela/test329.scxml" # test that none of the system variables can be modified + # "w3c/spin/promela/test344.scxml" # 'return' as a cond + # "w3c/spin/promela/test346.scxml" # assignment to system variables + # "w3c/spin/promela/test350.scxml" # string concatenation + # "w3c/spin/promela/test354.scxml" # mixed types for event.data + # "w3c/spin/promela/test401.scxml" # variable not declared + # "w3c/spin/promela/test402.scxml" # variable not declared + # "w3c/spin/promela/test487.scxml" # assignment of 'return' + # "w3c/spin/promela/test509.scxml" # string operation contains + # "w3c/spin/promela/test518.scxml" # string operation contains + # "w3c/spin/promela/test519.scxml" # string operation contains + # "w3c/spin/promela/test520.scxml" # string operation contains + # "w3c/spin/promela/test525.scxml" # assumes unbound arrays + # "w3c/spin/promela/test530.scxml" # assigns DOM node to variable + # "w3c/spin/promela/test534.scxml" # string operation contains # fail for semantics - # "spin/promela/test159.scxml" # error raised causes all subsequent elements to be skipped - # "spin/promela/test194.scxml" # illegal target for send - # "spin/promela/test199.scxml" # invalid send type - # "spin/promela/test216.scxml" # nested SCXML document with srcexpr at invoke - # "spin/promela/test298.scxml" # non-existent data model location - # "spin/promela/test331.scxml" # tests _error.type via 'error.execution' - # "spin/promela/test332.scxml" # tests _error.sendid via 'error.execution' - # "spin/promela/test343.scxml" # test that illegal produces error.execution - # "spin/promela/test488.scxml" # illegal expr in produces error.execution - # "spin/promela/test496.scxml" # tests error.communication with illegal target - # "spin/promela/test521.scxml" # tests error.communication with illegal target - # "spin/promela/test528.scxml" # illegal 'expr' produces error.execution - # "spin/promela/test531.scxml" # uses _ioprocessors.basichttp.location - # "spin/promela/test532.scxml" # uses _ioprocessors.basichttp.location - # "spin/promela/test553.scxml" # error in namelist - # "spin/promela/test554.scxml" # evaluation of 's args causes an error - # "spin/promela/test577.scxml" # send without target for basichttp + # "w3c/spin/promela/test159.scxml" # error raised causes all subsequent elements to be skipped + # "w3c/spin/promela/test194.scxml" # illegal target for send + # "w3c/spin/promela/test199.scxml" # invalid send type + # "w3c/spin/promela/test216.scxml" # nested SCXML document with srcexpr at invoke + # "w3c/spin/promela/test298.scxml" # non-existent data model location + # "w3c/spin/promela/test331.scxml" # tests _error.type via 'error.execution' + # "w3c/spin/promela/test332.scxml" # tests _error.sendid via 'error.execution' + # "w3c/spin/promela/test343.scxml" # test that illegal produces error.execution + # "w3c/spin/promela/test488.scxml" # illegal expr in produces error.execution + # "w3c/spin/promela/test496.scxml" # tests error.communication with illegal target + # "w3c/spin/promela/test521.scxml" # tests error.communication with illegal target + # "w3c/spin/promela/test528.scxml" # illegal 'expr' produces error.execution + # "w3c/spin/promela/test531.scxml" # uses _ioprocessors.basichttp.location + # "w3c/spin/promela/test532.scxml" # uses _ioprocessors.basichttp.location + # "w3c/spin/promela/test553.scxml" # error in namelist + # "w3c/spin/promela/test554.scxml" # evaluation of 's args causes an error + # "w3c/spin/promela/test577.scxml" # send without target for basichttp ### Ignore for generated C sources - "gen/c/ecma/test216.scxml" // invoke srcexpr + "w3c/gen/c/ecma/test216.scxml" // invoke srcexpr # we do not support io processors yet - "gen/c/ecma/test201.scxml" # basichttp - "gen/c/ecma/test500.scxml" # _ioprocessors - "gen/c/ecma/test501.scxml" # _ioprocessors - "gen/c/ecma/test509.scxml" # _ioprocessors / basichttp - "gen/c/ecma/test510.scxml" # _ioprocessors / basichttp - "gen/c/ecma/test518.scxml" # _ioprocessors / basichttp - "gen/c/ecma/test519.scxml" # _ioprocessors / basichttp - "gen/c/ecma/test520.scxml" # _ioprocessors / basichttp - "gen/c/ecma/test522.scxml" # _ioprocessors / basichttp - "gen/c/ecma/test531.scxml" # _ioprocessors / basichttp - "gen/c/ecma/test532.scxml" # _ioprocessors / basichttp - "gen/c/ecma/test534.scxml" # _ioprocessors / basichttp - "gen/c/ecma/test567.scxml" # _ioprocessors / basichttp - "gen/c/ecma/test569.scxml" # _ioprocessors - "gen/c/ecma/test577.scxml" # basichttp + "w3c/gen/c/ecma/test201.scxml" # basichttp + "w3c/gen/c/ecma/test500.scxml" # _ioprocessors + "w3c/gen/c/ecma/test501.scxml" # _ioprocessors + "w3c/gen/c/ecma/test509.scxml" # _ioprocessors / basichttp + "w3c/gen/c/ecma/test510.scxml" # _ioprocessors / basichttp + "w3c/gen/c/ecma/test518.scxml" # _ioprocessors / basichttp + "w3c/gen/c/ecma/test519.scxml" # _ioprocessors / basichttp + "w3c/gen/c/ecma/test520.scxml" # _ioprocessors / basichttp + "w3c/gen/c/ecma/test522.scxml" # _ioprocessors / basichttp + "w3c/gen/c/ecma/test531.scxml" # _ioprocessors / basichttp + "w3c/gen/c/ecma/test532.scxml" # _ioprocessors / basichttp + "w3c/gen/c/ecma/test534.scxml" # _ioprocessors / basichttp + "w3c/gen/c/ecma/test567.scxml" # _ioprocessors / basichttp + "w3c/gen/c/ecma/test569.scxml" # _ioprocessors + "w3c/gen/c/ecma/test577.scxml" # basichttp # failing is succeeding - "gen/c/ecma/test301.scxml" + "w3c/gen/c/ecma/test301.scxml" # manual test - "gen/c/ecma/test307.scxml" + "w3c/gen/c/ecma/test307.scxml" # XML DOM in data - "gen/c/ecma/test530.scxml" - "gen/c/ecma/test557.scxml" - "gen/c/ecma/test561.scxml" + "w3c/gen/c/ecma/test530.scxml" + "w3c/gen/c/ecma/test557.scxml" + "w3c/gen/c/ecma/test561.scxml" ### Ignore for delay with performance # timeouts with benchmarking due to delayed events - "perf/gen/c/ecma/test175.scxml" - "perf/gen/c/ecma/test185.scxml" - "perf/gen/c/ecma/test186.scxml" - "perf/gen/c/ecma/test208.scxml" - "perf/gen/c/ecma/test210.scxml" - "perf/gen/c/ecma/test409.scxml" - "perf/gen/c/ecma/test423.scxml" - "perf/gen/c/ecma/test553.scxml" - "perf/gen/c/ecma/test579.scxml" + "w3c/perf/gen/c/ecma/test175.scxml" + "w3c/perf/gen/c/ecma/test185.scxml" + "w3c/perf/gen/c/ecma/test186.scxml" + "w3c/perf/gen/c/ecma/test208.scxml" + "w3c/perf/gen/c/ecma/test210.scxml" + "w3c/perf/gen/c/ecma/test409.scxml" + "w3c/perf/gen/c/ecma/test423.scxml" + "w3c/perf/gen/c/ecma/test553.scxml" + "w3c/perf/gen/c/ecma/test579.scxml" - "perf/ecma/test175.scxml" - "perf/ecma/test185.scxml" - "perf/ecma/test186.scxml" - "perf/ecma/test208.scxml" - "perf/ecma/test210.scxml" - "perf/ecma/test409.scxml" - "perf/ecma/test423.scxml" - "perf/ecma/test553.scxml" - "perf/ecma/test579.scxml" + "w3c/perf/ecma/test175.scxml" + "w3c/perf/ecma/test185.scxml" + "w3c/perf/ecma/test186.scxml" + "w3c/perf/ecma/test208.scxml" + "w3c/perf/ecma/test210.scxml" + "w3c/perf/ecma/test409.scxml" + "w3c/perf/ecma/test423.scxml" + "w3c/perf/ecma/test553.scxml" + "w3c/perf/ecma/test579.scxml" ### Ignore some Header self-sufficient tests - "header/bindings/swig/msvc/inttypes.h" - "header/bindings/swig/wrapped/WrappedDataModel.h" - "header/bindings/swig/wrapped/WrappedExecutableContent.h" - "header/bindings/swig/wrapped/WrappedInterpreterMonitor.h" - "header/bindings/swig/wrapped/WrappedInvoker.h" - "header/bindings/swig/wrapped/WrappedIOProcessor.h" + "w3c/header/bindings/swig/msvc/inttypes.h" + "w3c/header/bindings/swig/wrapped/WrappedDataModel.h" + "w3c/header/bindings/swig/wrapped/WrappedExecutableContent.h" + "w3c/header/bindings/swig/wrapped/WrappedInterpreterMonitor.h" + "w3c/header/bindings/swig/wrapped/WrappedInvoker.h" + "w3c/header/bindings/swig/wrapped/WrappedIOProcessor.h" ) diff --git a/test/issues/test-issue56.scxml b/test/issues/test-issue56.scxml new file mode 100644 index 0000000..31716db --- /dev/null +++ b/test/issues/test-issue56.scxml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/issues/test-issue62.scxml b/test/issues/test-issue62.scxml new file mode 100644 index 0000000..cbf02a6 --- /dev/null +++ b/test/issues/test-issue62.scxml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/issues/test-issue63.scxml b/test/issues/test-issue63.scxml new file mode 100644 index 0000000..e0d6eaf --- /dev/null +++ b/test/issues/test-issue63.scxml @@ -0,0 +1,30 @@ + + + + + + + + string value + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/issues/test-issue64.scxml b/test/issues/test-issue64.scxml new file mode 100644 index 0000000..6db5b1d --- /dev/null +++ b/test/issues/test-issue64.scxml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/issues/test-issue67.scxml b/test/issues/test-issue67.scxml new file mode 100644 index 0000000..a1dfd96 --- /dev/null +++ b/test/issues/test-issue67.scxml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/issues/test-issue68.scxml b/test/issues/test-issue68.scxml new file mode 100644 index 0000000..82d8317 --- /dev/null +++ b/test/issues/test-issue68.scxml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/issues/test-issue69.scxml b/test/issues/test-issue69.scxml new file mode 100644 index 0000000..f5b20ab --- /dev/null +++ b/test/issues/test-issue69.scxml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/src/issues/test-issue56.cpp b/test/src/issues/test-issue56.cpp deleted file mode 100644 index 0330512..0000000 --- a/test/src/issues/test-issue56.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "uscxml/Interpreter.h" - -using namespace uscxml; - -// -- Issue 56 on github -int main(int argc, char** argv) { - std::deque messageQueue; - messageQueue.push_back("a"); - messageQueue.push_back("b"); - messageQueue.push_back("c"); - messageQueue.push_back("d"); - - const char* scxmlContent = - "" - "" - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - ""; - - std::string msg; - - uscxml::Interpreter scxml = uscxml::Interpreter::fromXML(scxmlContent, ""); - scxml.addMonitor(new StateTransitionMonitor()); - - uscxml::InterpreterState state; - // assume initial stable configuration - do { - state = scxml.step(); - } while(state > 0); - - while(state != uscxml::USCXML_FINISHED && !messageQueue.empty()) { - msg = messageQueue.front(); - messageQueue.pop_front(); - - scxml.receive(uscxml::Event(msg, uscxml::Event::EXTERNAL)); - - // step to next stable configuration - do { - state = scxml.step(); - } while(state > 0); - - } - - return EXIT_SUCCESS; - -} \ No newline at end of file diff --git a/test/src/issues/test-issue62.cpp b/test/src/issues/test-issue62.cpp deleted file mode 100644 index db44dad..0000000 --- a/test/src/issues/test-issue62.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#include "uscxml/Interpreter.h" -#include "glog/logging.h" - -using namespace uscxml; - -int main(int argc, char** argv) { - google::LogToStderr(); - google::InitGoogleLogging(argv[0]); - - const char* scxmlContent = - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " "; - - std::string msg; - - uscxml::Interpreter scxml = uscxml::Interpreter(uscxml::Interpreter::fromXML(scxmlContent, "")); - std::list issues = scxml.validate(); - for (std::list::iterator issueIter = issues.begin(); issueIter != issues.end(); issueIter++) { - std::cout << *issueIter; - } - - scxml.addMonitor(new StateTransitionMonitor()); - - uscxml::InterpreterState state; - - // assume initial stable configuration - do { - state = scxml.step(); - } while(state > 0); - - scxml.receive(Event("move_here")); - scxml.receive(Event("inside_invoke")); - - while(state != uscxml::USCXML_FINISHED) { - do { - state = scxml.step(true); - } while(state > 0); - } - - std::cout << "************************************" << std::endl; - std::cout << "Successfully finished state machine!" << std::endl; - - return EXIT_SUCCESS; - -} \ No newline at end of file diff --git a/test/src/issues/test-issue63.cpp b/test/src/issues/test-issue63.cpp deleted file mode 100644 index 5cedcad..0000000 --- a/test/src/issues/test-issue63.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include "uscxml/Interpreter.h" - -#include "glog/logging.h" - -using namespace uscxml; - -int main(int argc, char** argv) { - google::LogToStderr(); - google::InitGoogleLogging(argv[0]); - - const char* scxmlContent = - "" - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " "; - - std::string msg; - - uscxml::Interpreter scxml = uscxml::Interpreter(uscxml::Interpreter::fromXML(scxmlContent, "")); - - std::list issues = scxml.validate(); - for (std::list::iterator issueIter = issues.begin(); issueIter != issues.end(); issueIter++) { - std::cout << *issueIter << std::endl; - } - - scxml.addMonitor(new StateTransitionMonitor()); - - uscxml::InterpreterState state; - - do { - - state = scxml.step(); - } while(state != uscxml::USCXML_FINISHED && state != uscxml::USCXML_DESTROYED); - - std::cout << "************************************" << std::endl; - std::cout << "Successfully finished state machine!" << std::endl; - - return EXIT_SUCCESS; - -} \ No newline at end of file diff --git a/test/src/issues/test-issue64.scxml b/test/src/issues/test-issue64.scxml deleted file mode 100644 index 0969b5f..0000000 --- a/test/src/issues/test-issue64.scxml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/test/src/issues/test-issue67.scxml b/test/src/issues/test-issue67.scxml deleted file mode 100644 index e1fc5fa..0000000 --- a/test/src/issues/test-issue67.scxml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/src/issues/test-issue68.scxml b/test/src/issues/test-issue68.scxml deleted file mode 100644 index cd99bc0..0000000 --- a/test/src/issues/test-issue68.scxml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/src/test-arabica-events.cpp b/test/src/test-arabica-events.cpp deleted file mode 100644 index bcec093..0000000 --- a/test/src/test-arabica-events.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include - -#include "uscxml/config.h" -#include "uscxml/Common.h" -#include -#include -#include -#include -#include -#include - -using namespace Arabica::DOM; - -class CapturingEventListener : public Events::EventListener { -public: - void handleEvent(Events::Event& event) { - std::cout << "Handling captured event " << event.getType() << std::endl; - } -}; - -class BubblingEventListener : public Events::EventListener { -public: - void handleEvent(Events::Event& event) { - std::cout << "Handling bubbling event " << event.getType() << std::endl; - } -}; - -int main(int argc, char** argv) { - if (argc != 2) { - std::cerr << "Expected path to test-arabica-events.xml" << std::endl; - exit(EXIT_FAILURE); - } - - Arabica::SAX::InputSource inputSource(argv[1]); - - Arabica::SAX2DOM::Parser domParser; - Arabica::SAX::CatchErrorHandler errorHandler; - domParser.setErrorHandler(errorHandler); - if(!domParser.parse(inputSource)) { - return -1; - } - Document doc = domParser.getDocument(); - Element elem = doc.getDocumentElement(); - - CapturingEventListener cel; - BubblingEventListener bel; - - Events::EventTarget eventTarget(elem); - eventTarget.addEventListener("DOMNodeInserted", cel, true); - eventTarget.addEventListener("DOMNodeInserted", bel, false); - eventTarget.addEventListener("DOMNodeRemoved", cel, true); - eventTarget.addEventListener("DOMNodeRemoved", bel, false); - eventTarget.addEventListener("DOMAttrModified", cel, true); - eventTarget.addEventListener("DOMAttrModified", bel, false); - - Arabica::XPath::XPath xpath; - Arabica::XPath::NodeSet divs = xpath.evaluate("//div", doc).asNodeSet(); - - for (size_t i = 0; i < divs.size(); i++) { - Element divElem = Element(divs[i]); - divElem.setAttribute("foo", "true"); - divElem.setAttribute("foo", "false"); - - Element fooElem = divElem.getOwnerDocument().createElement("foo"); - divElem.appendChild(fooElem); - divElem.removeChild(fooElem); - } - - -} \ No newline at end of file diff --git a/test/src/test-arabica-namespaces.cpp b/test/src/test-arabica-namespaces.cpp deleted file mode 100644 index 5d5d90d..0000000 --- a/test/src/test-arabica-namespaces.cpp +++ /dev/null @@ -1,215 +0,0 @@ -#include - -#include "uscxml/config.h" -#include "uscxml/Common.h" -#include -#include -#include -#include -#include "uscxml/Interpreter.h" -#include "uscxml/dom/DOMUtils.h" -#include "uscxml/dom/NameSpacingParser.h" - -using namespace Arabica::DOM; -using namespace Arabica::XPath; -using namespace uscxml; - -#define VALIDATE \ -std::pair, NameSpaceInfo> parsed = parse(xmlSS.str());\ -Document origDoc = parsed.first;\ -NameSpaceInfo origNS = parsed.second;\ -validateRootFoo(parsed);\ -insertBar(parsed);\ -std::cout << parsed.first << std::endl;\ -validateRootFooBar(parsed);\ -parsed = cloneDocument(parsed);\ -insertBaz(parsed);\ -std::cout << parsed.first << std::endl;\ -validateRootFooBarBaz(parsed);\ -assert(DOMUtils::filterChildElements(origNS.xmlNSPrefix + "bar", origDoc.getDocumentElement()).size() == 3);\ -assert(DOMUtils::filterChildElements(origNS.xmlNSPrefix + "baz", origDoc.getDocumentElement()).size() == 0); - - -/** - Test DOM manipulations and document cloning with different namespace scenarios - */ - -static Arabica::XPath::XPath _xpath; - -std::pair, NameSpaceInfo> parse(const std::string xmlString) { - NameSpacingParser parser = NameSpacingParser::fromXML(xmlString); - if (parser.errorsReported()) - assert(false); - return std::make_pair(parser.getDocument(), parser.nameSpace); -} - -std::pair, NameSpaceInfo> cloneDocument(std::pair, NameSpaceInfo>& parsed) { - - NameSpaceInfo nsInfo = parsed.second; - Document document = parsed.first; - - Document clonedDocument; - DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - clonedDocument = domFactory.createDocument(document.getNamespaceURI(), "", 0); - - Node child = document.getFirstChild(); - while (child) { - Node newNode = clonedDocument.importNode(child, true); - clonedDocument.appendChild(newNode); - child = child.getNextSibling(); - } - - return std::make_pair(clonedDocument, nsInfo); -} - -void insertBar(std::pair, NameSpaceInfo>& parsed) { - NameSpaceInfo nsInfo = parsed.second; - Document document = parsed.first; - - Node root = document.getDocumentElement(); - for (size_t i = 0; i < 3; i++) { - Element bar = document.createElementNS(nsInfo.nsURL, "bar"); -// if (nsInfo.nsToPrefix.find(nsInfo.nsURL) != nsInfo.nsToPrefix.end()) - nsInfo.setPrefix(bar); - root.appendChild(bar); - } -} - -void insertBaz(std::pair, NameSpaceInfo>& parsed) { - NameSpaceInfo nsInfo = parsed.second; - Document document = parsed.first; - - Node root = document.getDocumentElement(); - for (size_t i = 0; i < 3; i++) { - Element baz = document.createElementNS(nsInfo.nsURL, "baz"); - nsInfo.setPrefix(baz); - root.appendChild(baz); - } -} - -static void validateRootFoo(std::pair, NameSpaceInfo>& parsed) { - - NameSpaceInfo nsInfo = parsed.second; - Document document = parsed.first; - - Node root = document.getDocumentElement(); - _xpath.setNamespaceContext(*nsInfo.getNSContext()); - - assert(TAGNAME_CAST(root) == nsInfo.xmlNSPrefix + "root"); - assert(LOCALNAME_CAST(root) == "root"); - NodeSet foosFiltered = DOMUtils::filterChildElements(nsInfo.xmlNSPrefix + "foo", root); - assert(foosFiltered.size() == 3); - NodeSet foosXPath = _xpath.evaluate("//" + nsInfo.xpathPrefix + "foo", root).asNodeSet(); - assert(foosXPath.size() == 3); - - for (size_t i = 0; i < 3; i++) { - assert(foosFiltered[i] == foosXPath[i]); - assert(TAGNAME_CAST(foosFiltered[i]) == nsInfo.xmlNSPrefix + "foo"); - assert(LOCALNAME_CAST(foosFiltered[i]) == "foo"); - } - -} - -static void validateRootFooBar(std::pair, NameSpaceInfo>& parsed) { - validateRootFoo(parsed); - - NameSpaceInfo nsInfo = parsed.second; - Document document = parsed.first; - - Node root = document.getDocumentElement(); - _xpath.setNamespaceContext(*nsInfo.getNSContext()); - - NodeSet barsFiltered = DOMUtils::filterChildElements(nsInfo.xmlNSPrefix + "bar", root); - assert(barsFiltered.size() == 3); - NodeSet barsXPath = _xpath.evaluate("//" + nsInfo.xpathPrefix + "bar", root).asNodeSet(); - assert(barsXPath.size() == 3); - - for (size_t i = 0; i < 3; i++) { - assert(barsFiltered[i] == barsXPath[i]); - assert(TAGNAME_CAST(barsFiltered[i]) == nsInfo.xmlNSPrefix + "bar"); - assert(LOCALNAME_CAST(barsFiltered[i]) == "bar"); - } - -} - -static void validateRootFooBarBaz(std::pair, NameSpaceInfo>& parsed) { - validateRootFooBar(parsed); - - NameSpaceInfo nsInfo = parsed.second; - Document document = parsed.first; - - Node root = document.getDocumentElement(); - _xpath.setNamespaceContext(*nsInfo.getNSContext()); - - assert(TAGNAME_CAST(root) == nsInfo.xmlNSPrefix + "root"); - assert(LOCALNAME_CAST(root) == "root"); - - NodeSet bazsFiltered = DOMUtils::filterChildElements(nsInfo.xmlNSPrefix + "baz", root); - assert(bazsFiltered.size() == 3); - NodeSet bazsXPath = _xpath.evaluate("//" + nsInfo.xpathPrefix + "baz", root).asNodeSet(); - assert(bazsXPath.size() == 3); - - for (size_t i = 0; i < 3; i++) { - assert(bazsFiltered[i] == bazsXPath[i]); - assert(TAGNAME_CAST(bazsFiltered[i]) == nsInfo.xmlNSPrefix + "baz"); - assert(LOCALNAME_CAST(bazsFiltered[i]) == "baz"); - } - -} - -int main(int argc, char** argv) { - - // No namespaces at all - { - std::stringstream xmlSS; - xmlSS << "" << std::endl; - VALIDATE - } - - // default namespace - { - std::stringstream xmlSS; - xmlSS << "\ - \ - \ - \ - " << std::endl; - VALIDATE - } - - // explicit namespaces - { - std::stringstream xmlSS; - xmlSS << "\ - \ - \ - \ - " << std::endl; - VALIDATE - } - - // mixed namespaces - { - std::stringstream xmlSS; - xmlSS << "\ - \ - \ - \ - \ - " << std::endl; - VALIDATE - } - - // mixed namespaces with different default NS - { - std::stringstream xmlSS; - xmlSS << "\ - \ - \ - \ - \ - " << std::endl; - VALIDATE - } - -} \ No newline at end of file diff --git a/test/src/test-arabica-parsing.cpp b/test/src/test-arabica-parsing.cpp deleted file mode 100644 index 24275fc..0000000 --- a/test/src/test-arabica-parsing.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include - -#include "uscxml/config.h" -#include "uscxml/Common.h" -#include -#include -#include -#include -#include -#include -#include - -using namespace Arabica::DOM; - -int main(int argc, char** argv) { - - { - std::stringstream* ss = new std::stringstream(); - (*ss) << "\n &\n]]>\n"; - // we need an auto_ptr for arabica to assume ownership - std::auto_ptr ssPtr(ss); - Arabica::SAX::InputSource inputSource(ssPtr); - - Arabica::SAX2DOM::Parser domParser; - Arabica::SAX::CatchErrorHandler errorHandler; - domParser.setErrorHandler(errorHandler); - - if(!domParser.parse(inputSource)) { - std::cout << errorHandler.errors(); - return -1; - } - std::cout << domParser.getDocument().getDocumentElement().getFirstChild().getNodeValue() << std::endl; - std::cout << domParser.getDocument() << std::endl; - } - { - Arabica::SAX::InputSource inputSource; - inputSource.setSystemId("/Users/sradomski/Documents/TK/Code/uscxml/test/samples/uscxml/arabica/test-arabica-parsing.xml"); - - Arabica::SAX2DOM::Parser domParser; - Arabica::SAX::CatchErrorHandler errorHandler; - domParser.setErrorHandler(errorHandler); - - if(!domParser.parse(inputSource)) { - std::cout << errorHandler.errors(); - return -1; - } - std::cout << domParser.getDocument() << std::endl; - } - -} \ No newline at end of file diff --git a/test/src/test-arabica-xpath.cpp b/test/src/test-arabica-xpath.cpp deleted file mode 100644 index 9e21624..0000000 --- a/test/src/test-arabica-xpath.cpp +++ /dev/null @@ -1,212 +0,0 @@ -#include - -#include -#include -#include -#include -#include -#include "uscxml/dom/DOMUtils.h" - -#define string_type std::string -#define string_adaptor Arabica::default_string_adaptor - -typedef string_adaptor SA; - -class NodeSetVariableResolver : public Arabica::XPath::VariableResolver { - //typedef string_adaptorstring_adaptor; -public: - virtual Arabica::XPath::XPathValue resolveVariable(const string_type& /* namepace_uri */, - const string_type& name) const { - using namespace Arabica::XPath; - VarMap::const_iterator n = map_.find(name); - if(n == map_.end()) - throw UnboundVariableException(string_adaptor::asStdString(name)); - return XPathValue(new NodeSetValue((*n).second)); - } // resolveVariable - - void setVariable(const string_type& name, const Arabica::XPath::NodeSet& value) { - map_[name] = value; - } // setVariable - -private: - typedef std::map > VarMap; - VarMap map_; -}; // class NodeSetVariableResolver - -Arabica::XPath::XPath parser; -Arabica::DOM::DOMImplementation factory_; -Arabica::DOM::Document document_; - -Arabica::DOM::Element root_; -Arabica::DOM::Element element1_; -Arabica::DOM::Element element2_; -Arabica::DOM::Element element3_; -Arabica::DOM::Element spinkle_; - -Arabica::DOM::Attr attr_; -Arabica::DOM::Text text_; -Arabica::DOM::Comment comment_; -Arabica::DOM::ProcessingInstruction processingInstruction_; -Arabica::DOM::Document chapters_; -Arabica::DOM::Document numbers_; - -class StringVariableResolver : public Arabica::XPath::VariableResolver { -public: - virtual Arabica::XPath::XPathValue resolveVariable(const string_type& /* namespace_uri */, - const string_type& name) const { - using namespace Arabica::XPath; - VarMap::const_iterator n = map_.find(name); - if(n == map_.end()) - throw UnboundVariableException(string_adaptor::asStdString(name)); - return XPathValue(new StringValue((*n).second)); - } // resolveVariable - - void setVariable(const string_type& name, const string_type& value) { - map_[name] = value; - } // setVariable - -private: - typedef std::map VarMap; - VarMap map_; -}; // StringVariableResolver - - -int main(int argc, char** argv) { - - factory_ = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - document_ = factory_.createDocument(SA::construct_from_utf8(""), SA::construct_from_utf8(""), 0); - root_ = document_.createElement("root"); - document_.appendChild(root_); - assert(root_); - - element1_ = document_.createElement(SA::construct_from_utf8("child1")); - element2_ = document_.createElement(SA::construct_from_utf8("child2")); - element3_ = document_.createElement(SA::construct_from_utf8("child3")); - - element1_.setAttribute(SA::construct_from_utf8("one"), SA::construct_from_utf8("1")); - - element2_.setAttribute(SA::construct_from_utf8("one"), SA::construct_from_utf8("1")); - element2_.setAttribute(SA::construct_from_utf8("two"), SA::construct_from_utf8("1")); - element2_.setAttribute(SA::construct_from_utf8("three"), SA::construct_from_utf8("1")); - element2_.setAttribute(SA::construct_from_utf8("four"), SA::construct_from_utf8("1")); - - text_ = document_.createTextNode(SA::construct_from_utf8("data")); - comment_ = document_.createComment(SA::construct_from_utf8("comment")); - processingInstruction_ = document_.createProcessingInstruction(SA::construct_from_utf8("target"), SA::construct_from_utf8("data")); - element2_.appendChild(text_); - spinkle_ = document_.createElement(SA::construct_from_utf8("spinkle")); - element2_.appendChild(spinkle_); - element2_.appendChild(comment_); - element2_.appendChild(processingInstruction_); - - attr_ = element1_.getAttributeNode(SA::construct_from_utf8("one")); - - root_.appendChild(element1_); - root_.appendChild(element2_); - root_.appendChild(element3_); - - chapters_ = factory_.createDocument(SA::construct_from_utf8(""), SA::construct_from_utf8(""), 0); - chapters_.appendChild(chapters_.createElement(SA::construct_from_utf8("document"))); - chapters_.getFirstChild().appendChild(chapters_.createElement(SA::construct_from_utf8("chapter"))).appendChild(chapters_.createTextNode(SA::construct_from_utf8("one"))); - chapters_.getFirstChild().appendChild(chapters_.createElement(SA::construct_from_utf8("chapter"))).appendChild(chapters_.createTextNode(SA::construct_from_utf8("two"))); - chapters_.getFirstChild().appendChild(chapters_.createElement(SA::construct_from_utf8("chapter"))).appendChild(chapters_.createTextNode(SA::construct_from_utf8("three"))); - chapters_.getFirstChild().appendChild(chapters_.createElement(SA::construct_from_utf8("chapter"))).appendChild(chapters_.createTextNode(SA::construct_from_utf8("four"))); - chapters_.getFirstChild().appendChild(chapters_.createElement(SA::construct_from_utf8("chapter"))).appendChild(chapters_.createTextNode(SA::construct_from_utf8("five"))); - - numbers_ = factory_.createDocument(SA::construct_from_utf8(""), SA::construct_from_utf8(""), 0); - numbers_.appendChild(numbers_.createElement(SA::construct_from_utf8("doc"))); - numbers_.getFirstChild().appendChild(numbers_.createElement(SA::construct_from_utf8("number"))).appendChild(numbers_.createTextNode(SA::construct_from_utf8("1"))); - numbers_.getFirstChild().appendChild(numbers_.createElement(SA::construct_from_utf8("number"))).appendChild(numbers_.createTextNode(SA::construct_from_utf8("2"))); - numbers_.getFirstChild().appendChild(numbers_.createElement(SA::construct_from_utf8("number"))).appendChild(numbers_.createTextNode(SA::construct_from_utf8("3"))); - numbers_.getFirstChild().appendChild(numbers_.createElement(SA::construct_from_utf8("number"))).appendChild(numbers_.createTextNode(SA::construct_from_utf8("4"))); - numbers_.getFirstChild().appendChild(numbers_.createElement(SA::construct_from_utf8("number"))).appendChild(numbers_.createTextNode(SA::construct_from_utf8("5"))); - numbers_.getFirstChild().appendChild(numbers_.createElement(SA::construct_from_utf8("number"))).appendChild(numbers_.createTextNode(SA::construct_from_utf8("6"))); - numbers_.getFirstChild().appendChild(numbers_.createElement(SA::construct_from_utf8("number"))).appendChild(numbers_.createTextNode(SA::construct_from_utf8("7"))); - numbers_.getFirstChild().appendChild(numbers_.createElement(SA::construct_from_utf8("number"))).appendChild(numbers_.createTextNode(SA::construct_from_utf8("8"))); - numbers_.getFirstChild().appendChild(numbers_.createElement(SA::construct_from_utf8("number"))).appendChild(numbers_.createTextNode(SA::construct_from_utf8("9"))); - std::cout << document_ << std::endl; - std::cout << numbers_ << std::endl; - std::cout << chapters_ << std::endl; - - if (true) { - using namespace Arabica::XPath; - using namespace Arabica::DOM; - XPathValue result = parser.evaluate(SA::construct_from_utf8("//*"), document_); - for(int i = 0; i < result.asNodeSet().size(); i++) { - Node node = result.asNodeSet()[i]; - std::string xpathExpr = uscxml::DOMUtils::xPathForNode(node); - if (xpathExpr.size()) { - XPathValue innerResult = parser.evaluate(xpathExpr, document_); - assert(innerResult.asNodeSet().size() > 0); - assert(innerResult.asNodeSet().size() == 1); - assert(innerResult.asNodeSet()[0] == node); - } else { - assert(node.getNodeType() != Node_base::ELEMENT_NODE); - } - } - } - - if (false) { - using namespace Arabica::XPath; - StringVariableResolver svr; - svr.setVariable(SA::construct_from_utf8("index"), SA::construct_from_utf8("1")); - - parser.setVariableResolver(svr); - XPathValue result = parser.evaluate(SA::construct_from_utf8("/root/*[@two = $index]"), document_); - assert(NODE_SET == result.type()); - assert(element2_ == result.asNodeSet()[0]); - - parser.resetVariableResolver(); - } // test18 - - if (false) { - using namespace Arabica::XPath; - XPathExpression xpath = parser.compile(SA::construct_from_utf8("root/*[position() = 2]")); - XPathValue result = xpath.evaluate(document_); - - assert(NODE_SET == result.type()); - assert(1 == result.asNodeSet().size()); - Arabica::DOM::Node n = result.asNodeSet()[0]; - assert(element2_ == n); - } // test19 - - if (false) { - using namespace Arabica::XPath; - Arabica::DOM::DocumentFragment frag = document_.createDocumentFragment(); - frag.appendChild(document_.createElement(SA::construct_from_utf8("foo"))); - - NodeSetVariableResolver svr; - NodeSet ns; - ns.push_back(frag); - svr.setVariable(SA::construct_from_utf8("fruit"), ns); - parser.setVariableResolver(svr); - - XPathValue result = parser.evaluate_expr(SA::construct_from_utf8("$fruit/foo|/root/child3"), document_); - assert(NODE_SET == result.type()); - assert(2 == result.asNodeSet().size()); - assert(element3_ == result.asNodeSet()[0]); - } // testUnion11 - - if (false) { - using namespace Arabica::XPath; - XPathValue result = parser.evaluate_expr(SA::construct_from_utf8("local-name(/root)"), document_); - assert(STRING == result.type()); - assert(SA::construct_from_utf8("root") == result.asString()); - } // testLocalNameFn1 - - if (0) { - using namespace Arabica::XPath; - Arabica::DOM::DocumentFragment frag = document_.createDocumentFragment(); - frag.appendChild(document_.createElement("foo")); - - NodeSetVariableResolver svr; - NodeSet ns; - ns.push_back(frag); - svr.setVariable("fruit", ns); - parser.setVariableResolver(svr); - - XPathValue result = parser.evaluate(SA::construct_from_utf8("local-name($fruit/foo) == 'foo'"), document_); - std::cout << result.asBool() << std::endl; - } - -} \ No newline at end of file diff --git a/test/src/test-base64.cpp b/test/src/test-base64.cpp deleted file mode 100644 index 4981a26..0000000 --- a/test/src/test-base64.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "uscxml/util/Base64.hpp" -#include - -#define SOURCE_LEN 10 - -int main(int argc, char** argv) { - std::string data; - std::string base64CPP; - std::string base64C; - - char buffer[SOURCE_LEN]; - for (size_t i = 0; i < SOURCE_LEN; i++) { - buffer[i] = (char)55; - } - - base64C = uscxml::base64Encode(buffer, SOURCE_LEN); - -} \ No newline at end of file diff --git a/test/src/test-c-inline.c b/test/src/test-c-inline.c deleted file mode 100644 index 7b375a9..0000000 --- a/test/src/test-c-inline.c +++ /dev/null @@ -1,191 +0,0 @@ -//#include // EXIT_SUCCESS -//#include // printf -#include // memset - -#undef ON_AVR - -/** - * Preprocess: - * uscxml-transform -tc -i ./gadget-inline-avr.c -o ./gadget-inline-avr.c.scxml.c - */ - -/** INLINE SCXML BEGIN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ledOff(); - - - ledOn(); - - - - -INLINE SCXML END */ - -#define IQ_LENGTH 10 -#define EQ_LENGTH 10 - -const char* iQ[IQ_LENGTH]; -size_t iwPtr = 0; -size_t irPtr = 0; - -const char* eQ[EQ_LENGTH]; -size_t ewPtr = 0; -size_t erPtr = 0; - - -void ledOn() { - printf("Turned on LED!\n"); -} - -void ledOff() { - printf("Turned off LED!\n"); -} - -#include "test-c-inline.c.scxml.c" - -void* dequeue_internal(const uscxml_ctx* ctx) { - if (iwPtr != irPtr) { - size_t tmp = irPtr; - irPtr = (irPtr + 1 >= IQ_LENGTH ? 0 : irPtr + 1); - return iQ[tmp]; - } - return NULL; -} - -void* dequeue_external(const uscxml_ctx* ctx) { - if (ewPtr != erPtr) { - size_t tmp = erPtr; - irPtr = (erPtr + 1 >= EQ_LENGTH ? 0 : erPtr + 1); - return eQ[tmp]; - } - return NULL; -} - -int is_matched(const uscxml_ctx* ctx, const uscxml_transition* transition, const void* event) { - char* tPtr1 = (char*)event; - char* tPtr2 = (char*)transition->event; - while(*tPtr1 && *tPtr2) { - if (tPtr1 != tPtr2) - return 0; - tPtr1++; - tPtr2++; - } - return 1; -} - -int raise(const uscxml_ctx* ctx, const char* event) { - iQ[iwPtr] = event; - iwPtr = (iwPtr + 1 >= IQ_LENGTH ? 0 : iwPtr + 1); - return USCXML_ERR_OK; -} - -int send(const uscxml_ctx* ctx, const char* event) { - eQ[ewPtr] = event; - ewPtr = (ewPtr + 1 >= IQ_LENGTH ? 0 : ewPtr + 1); - return USCXML_ERR_OK; -} - -int main(int argc, char** argv) { - -#ifdef ON_AVR - int ir_led = 9; - int blue_touch = 1; - int red_touch = 2; - int yellow_touch = 3; - - pinMode(ir_led, OUTPUT); - pinMode(blue_touch, INPUT); - pinMode(red_touch, INPUT); - pinMode(yellow_touch, INPUT); - -#endif - - - uscxml_ctx ctx; - int err = USCXML_ERR_OK; - - memset(&ctx, 0, sizeof(uscxml_ctx)); - ctx.machine = &USCXML_MACHINE; - - ctx.exec_content_raise = raise; - ctx.dequeue_internal = dequeue_internal; - ctx.dequeue_external = dequeue_external; - ctx.is_matched = is_matched; - - while(err != USCXML_ERR_DONE) { - - err = uscxml_step(&ctx); -#ifdef ON_AVR - if (err == USCXML_IDLE) { - if (digitalRead(blue) == HIGH) { - send(ctx, "blueHigh"); - } - if (digitalRead(blue) == HIGH) { - send(ctx, "redHigh"); - } - if (digitalRead(blue) == HIGH) { - send(ctx, "greenHigh"); - } - } - delay(20); -#endif - } - - return 0; -} diff --git a/test/src/test-c-inline.c.scxml.c b/test/src/test-c-inline.c.scxml.c deleted file mode 100644 index f3d8b01..0000000 --- a/test/src/test-c-inline.c.scxml.c +++ /dev/null @@ -1,1112 +0,0 @@ -/** - Generated from source: - file:///Users/sradomski/Documents/TK/Code/uscxml/test/src/test-c-inline.c -*/ - -#ifndef USCXML_NO_STDTYPES_H -# include /* explicit types */ -#endif -#include /* NULL */ - -#ifndef USCXML_NO_GEN_C_MACROS - -/** - * All macros used for the scxml types and functions - * - * ** IMPORTANT: Make sure to set the following macros prior to including. ** - * They are used to represent the machine in the types to follow - * and to allocate stack memory during a micro-step function. - * When in doubt, overprovide. - * - * USCXML_NR_STATES_TYPE - * as the smallest type for positive integers that can contain the - * largest number of states from an individual state machine. E.g.: - * < 2^8 states => uint8_t - * < 2^16 states => uint16_t - * < 2^32 states => uint32_t - */ - -#ifndef USCXML_NR_STATES_TYPE -# define USCXML_NR_STATES_TYPE uint8_t -#endif - -/** - * USCXML_NR_TRANS_TYPE - * the same as above but for the number of transitions. - */ - -#ifndef USCXML_NR_TRANS_TYPE -# define USCXML_NR_TRANS_TYPE uint8_t -#endif - -/** - * USCXML_MAX_NR_STATES_BYTES - * the smallest multiple of 8 that, if multiplied by 8, - * is larger than USCXML_NR_STATES_TYPE, e.g: - * 1-8 states => 1 - * 9-16 states => 2 - * 17-24 states => 3 - * 25-32 states => 4 - * ... - */ - -#ifndef USCXML_MAX_NR_STATES_BYTES -# define USCXML_MAX_NR_STATES_BYTES 1 -#endif - -/** - * USCXML_MAX_NR_TRANS_BYTES - * same as above but for transitions. - */ - -#ifndef USCXML_MAX_NR_TRANS_BYTES -# define USCXML_MAX_NR_TRANS_BYTES 1 -#endif - -/** - * USCXML_NUMBER_STATES / USCXML_NUMBER_TRANS - * Per default the number of states / transitions is retrieved from the machine - * info in the uscxml_ctx struct, but you can also hard-code it per macro. - */ - -#ifndef USCXML_NUMBER_STATES -# define USCXML_NUMBER_STATES (ctx->machine->nr_states) -#endif - -#ifndef USCXML_NUMBER_TRANS -# define USCXML_NUMBER_TRANS (ctx->machine->nr_transitions) -#endif - -/** - * USCXML_GET_STATE / USCXML_GET_TRANS - * Per default an individual state or transitions is retrieved from the machine - * info in the uscxml_ctx struct, but you can also hard-code it per macro. - */ - -#ifndef USCXML_GET_STATE -# define USCXML_GET_STATE(i) (ctx->machine->states[i]) -#endif - -#ifndef USCXML_GET_TRANS -# define USCXML_GET_TRANS(i) (ctx->machine->transitions[i]) -#endif - - -/* Common macros below */ - -#define BIT_HAS(idx, bitset) ((bitset[idx >> 3] & (1 << (idx & 7))) != 0) -#define BIT_SET_AT(idx, bitset) bitset[idx >> 3] |= (1 << (idx & 7)); -#define BIT_CLEAR(idx, bitset) bitset[idx >> 3] &= (1 << (idx & 7)) ^ 0xFF; - -#ifdef __GNUC__ -# define likely(x) (__builtin_expect(!!(x), 1)) -# define unlikely(x) (__builtin_expect(!!(x), 0)) -#else -# define likely(x) (x) -# define unlikely(x) (x) -#endif - -/* error return codes */ -#define USCXML_ERR_OK 0 -#define USCXML_ERR_IDLE 1 -#define USCXML_ERR_DONE 2 -#define USCXML_ERR_MISSING_CALLBACK 3 -#define USCXML_ERR_FOREACH_DONE 4 -#define USCXML_ERR_EXEC_CONTENT 5 -#define USCXML_ERR_INVALID_TARGET 6 -#define USCXML_ERR_INVALID_TYPE 7 -#define USCXML_ERR_UNSUPPORTED 8 -#define USCXML_ERR_MACRO 9 - -#define USCXML_TRANS_SPONTANEOUS 0x01 -#define USCXML_TRANS_TARGETLESS 0x02 -#define USCXML_TRANS_INTERNAL 0x04 -#define USCXML_TRANS_HISTORY 0x08 -#define USCXML_TRANS_INITIAL 0x10 - -#define USCXML_STATE_ATOMIC 0x01 -#define USCXML_STATE_PARALLEL 0x02 -#define USCXML_STATE_COMPOUND 0x03 -#define USCXML_STATE_FINAL 0x04 -#define USCXML_STATE_HISTORY_DEEP 0x05 -#define USCXML_STATE_HISTORY_SHALLOW 0x06 -#define USCXML_STATE_INITIAL 0x07 -#define USCXML_STATE_HAS_HISTORY 0x80 /* highest bit */ -#define USCXML_STATE_MASK(t) (t & 0x7F) /* mask highest bit */ - -#define USCXML_CTX_PRISTINE 0x00 -#define USCXML_CTX_SPONTANEOUS 0x01 -#define USCXML_CTX_INITIALIZED 0x02 -#define USCXML_CTX_TOP_LEVEL_FINAL 0x04 -#define USCXML_CTX_TRANSITION_FOUND 0x08 -#define USCXML_CTX_FINISHED 0x10 - -#define USCXML_ELEM_DATA_IS_SET(data) (data->id != NULL) -#define USCXML_ELEM_DONEDATA_IS_SET(donedata) (donedata->content != NULL || donedata->contentexpr != NULL || donedata->params != NULL) -#define USCXML_ELEM_PARAM_IS_SET(param) (param->name != NULL) -#define USCXML_MACHINE_IS_SET(machine) (machine->nr_states > 0) - -#define USCXML_NO_GEN_C_MACROS -#endif - - -#ifndef USCXML_NO_GEN_C_TYPES - -/** - * All types required to represent an SCXML state chart. - * Just predefine the USCXML_NO_GEN_C_TYPES macro if you do not need them. - */ - -typedef struct uscxml_machine uscxml_machine; -typedef struct uscxml_transition uscxml_transition; -typedef struct uscxml_state uscxml_state; -typedef struct uscxml_ctx uscxml_ctx; -typedef struct uscxml_elem_invoke uscxml_elem_invoke; - -typedef struct uscxml_elem_send uscxml_elem_send; -typedef struct uscxml_elem_param uscxml_elem_param; -typedef struct uscxml_elem_data uscxml_elem_data; -typedef struct uscxml_elem_assign uscxml_elem_assign; -typedef struct uscxml_elem_donedata uscxml_elem_donedata; -typedef struct uscxml_elem_foreach uscxml_elem_foreach; - -typedef void* (*dequeue_internal_t)(const uscxml_ctx* ctx); -typedef void* (*dequeue_external_t)(const uscxml_ctx* ctx); -typedef int (*is_enabled_t)(const uscxml_ctx* ctx, const uscxml_transition* transition); -typedef int (*is_matched_t)(const uscxml_ctx* ctx, const uscxml_transition* transition, const void* event); -typedef int (*is_true_t)(const uscxml_ctx* ctx, const char* expr); -typedef int (*exec_content_t)(const uscxml_ctx* ctx, const uscxml_state* state, const void* event); -typedef int (*raise_done_event_t)(const uscxml_ctx* ctx, const uscxml_state* state, const uscxml_elem_donedata* donedata); -typedef int (*invoke_t)(const uscxml_ctx* ctx, const uscxml_state* s, const uscxml_elem_invoke* invocation, unsigned char uninvoke); - -typedef int (*exec_content_log_t)(const uscxml_ctx* ctx, const char* label, const char* expr); -typedef int (*exec_content_raise_t)(const uscxml_ctx* ctx, const char* event); -typedef int (*exec_content_send_t)(const uscxml_ctx* ctx, const uscxml_elem_send* send); -typedef int (*exec_content_foreach_init_t)(const uscxml_ctx* ctx, const uscxml_elem_foreach* foreach); -typedef int (*exec_content_foreach_next_t)(const uscxml_ctx* ctx, const uscxml_elem_foreach* foreach); -typedef int (*exec_content_foreach_done_t)(const uscxml_ctx* ctx, const uscxml_elem_foreach* foreach); -typedef int (*exec_content_assign_t)(const uscxml_ctx* ctx, const uscxml_elem_assign* assign); -typedef int (*exec_content_init_t)(const uscxml_ctx* ctx, const uscxml_elem_data* data); -typedef int (*exec_content_cancel_t)(const uscxml_ctx* ctx, const char* sendid, const char* sendidexpr); -typedef int (*exec_content_finalize_t)(const uscxml_ctx* ctx, const uscxml_elem_invoke* invoker, const void* event); -typedef int (*exec_content_script_t)(const uscxml_ctx* ctx, const char* src, const char* content); - -/** - * A single SCXML state-machine. - */ -struct uscxml_machine { - unsigned char flags; /* Unused */ - USCXML_NR_STATES_TYPE nr_states; /* Make sure to set type per macro! */ - USCXML_NR_TRANS_TYPE nr_transitions; /* Make sure to set type per macro! */ - const char* name; - const char* datamodel; - const char* uuid; /* currently MD5 sum */ - const uscxml_state* states; - const uscxml_transition* transitions; - const uscxml_machine* parent; - const uscxml_elem_donedata* donedata; - const exec_content_t script; /* Global script elements */ -}; - -/** - * All information pertaining to a element. - * With late data binding, blocks of data elements are separated by NULL - * use USCXML_ELEM_DATA_IS_SET to test for end of a block. - */ -struct uscxml_elem_data { - const char* id; - const char* src; - const char* expr; - const char* content; -}; - -/** - * All information pertaining to an element. - */ -struct uscxml_elem_assign { - const char* location; - const char* expr; - const char* content; -}; - -/** - * All information pertaining to any state element. - */ -struct uscxml_state { - const char* name; /* eventual name */ - const USCXML_NR_STATES_TYPE parent; /* parent */ - const exec_content_t on_entry; /* on entry handlers */ - const exec_content_t on_exit; /* on exit handlers */ - const invoke_t invoke; /* invocations */ - const char children[USCXML_MAX_NR_STATES_BYTES]; /* all children */ - const char completion[USCXML_MAX_NR_STATES_BYTES]; /* default completion */ - const char ancestors[USCXML_MAX_NR_STATES_BYTES]; /* all ancestors */ - const uscxml_elem_data* data; /* data with late binding */ - const unsigned char type; /* One of USCXML_STATE_* */ -}; - -/** - * All information pertaining to a element. - */ -struct uscxml_transition { - const USCXML_NR_STATES_TYPE source; - const char target[USCXML_MAX_NR_STATES_BYTES]; - const char* event; - const char* condition; - const is_enabled_t is_enabled; - const exec_content_t on_transition; - const unsigned char type; - const char conflicts[USCXML_MAX_NR_TRANS_BYTES]; - const char exit_set[USCXML_MAX_NR_STATES_BYTES]; -}; - -/** - * All information pertaining to a element. - */ -struct uscxml_elem_foreach { - const char* array; - const char* item; - const char* index; -}; - -/** - * All information pertaining to a element. - * Blocks of params are separated by NULL params, use - * USCXML_ELEM_PARAM_IS_SET to test for end of a block. - */ -struct uscxml_elem_param { - const char* name; - const char* expr; - const char* location; -}; - -/** - * All information pertaining to a element. - */ -struct uscxml_elem_donedata { - const USCXML_NR_STATES_TYPE source; - const char* content; - const char* contentexpr; - const uscxml_elem_param* params; -}; - -/** - * All information pertaining to an element. - */ -struct uscxml_elem_invoke { - const uscxml_machine* machine; - const char* type; - const char* typeexpr; - const char* src; - const char* srcexpr; - const char* id; - const char* idlocation; - const char* sourcename; - const char* namelist; - const unsigned char autoforward; - const uscxml_elem_param* params; - exec_content_finalize_t finalize; - const char* content; - const char* contentexpr; -}; - -/** - * All information pertaining to a element. - */ -struct uscxml_elem_send { - const char* event; - const char* eventexpr; - const char* target; - const char* targetexpr; - const char* type; - const char* typeexpr; - const char* id; - const char* idlocation; - const char* delay; - const char* delayexpr; - const char* namelist; /* not space-separated, still as in attribute value */ - const char* content; - const char* contentexpr; - const uscxml_elem_param* params; -}; - -/** - * Represents an instance of a state-chart at runtime/ - */ -struct uscxml_ctx { - unsigned char flags; - const uscxml_machine* machine; - - char config[USCXML_MAX_NR_STATES_BYTES]; /* Make sure these macros specify a sufficient size */ - char history[USCXML_MAX_NR_STATES_BYTES]; - char invocations[USCXML_MAX_NR_STATES_BYTES]; - char initialized_data[USCXML_MAX_NR_STATES_BYTES]; - - void* user_data; - void* event; - - dequeue_internal_t dequeue_internal; - dequeue_external_t dequeue_external; - is_matched_t is_matched; - is_true_t is_true; - raise_done_event_t raise_done_event; - - exec_content_log_t exec_content_log; - exec_content_raise_t exec_content_raise; - exec_content_send_t exec_content_send; - exec_content_foreach_init_t exec_content_foreach_init; - exec_content_foreach_next_t exec_content_foreach_next; - exec_content_foreach_done_t exec_content_foreach_done; - exec_content_assign_t exec_content_assign; - exec_content_init_t exec_content_init; - exec_content_cancel_t exec_content_cancel; - exec_content_script_t exec_content_script; - - invoke_t invoke; -}; - -#define USCXML_NO_GEN_C_TYPES -#endif - -/* forward declare machines to allow references */ -extern const uscxml_machine _uscxml_C4473F72_machine; - -#ifndef USCXML_NO_ELEM_INFO - -static const uscxml_elem_donedata _uscxml_C4473F72_elem_donedatas[1] = { - /* source, content, contentexpr, params */ - { 0, NULL, NULL, NULL } -}; - -#endif - -#ifndef USCXML_NO_ELEM_INFO - -#endif - -#ifndef USCXML_NO_EXEC_CONTENT - -static int _uscxml_C4473F72_scxml0_parallel0_on_entry_0(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { - int err = USCXML_ERR_OK; - if likely(ctx->exec_content_raise != NULL) { - if unlikely((ctx->exec_content_raise(ctx, "blueHigh")) != USCXML_ERR_OK) return err; - } else { - return USCXML_ERR_MISSING_CALLBACK; - } - return USCXML_ERR_OK; -} - -static int _uscxml_C4473F72_scxml0_parallel0_on_entry(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { - _uscxml_C4473F72_scxml0_parallel0_on_entry_0(ctx, state, event); - return USCXML_ERR_OK; -} - -static int _uscxml_C4473F72_IRLedOff_on_entry_0(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { - int err = USCXML_ERR_OK; -ledOff(); return USCXML_ERR_OK; -} - -static int _uscxml_C4473F72_IRLedOff_on_entry(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { - _uscxml_C4473F72_IRLedOff_on_entry_0(ctx, state, event); - return USCXML_ERR_OK; -} - -static int _uscxml_C4473F72_IRLedOn_on_entry_0(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { - int err = USCXML_ERR_OK; -ledOn(); return USCXML_ERR_OK; -} - -static int _uscxml_C4473F72_IRLedOn_on_entry(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { - _uscxml_C4473F72_IRLedOn_on_entry_0(ctx, state, event); - return USCXML_ERR_OK; -} - -static int _uscxml_C4473F72_interaction_transition0_on_trans(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { - int err = USCXML_ERR_OK; - if likely(ctx->exec_content_raise != NULL) { - if unlikely((ctx->exec_content_raise(ctx, "IROn")) != USCXML_ERR_OK) return err; - } else { - return USCXML_ERR_MISSING_CALLBACK; - } - if likely(ctx->exec_content_raise != NULL) { - if unlikely((ctx->exec_content_raise(ctx, "IROn")) != USCXML_ERR_OK) return err; - } else { - return USCXML_ERR_MISSING_CALLBACK; - } - if likely(ctx->exec_content_raise != NULL) { - if unlikely((ctx->exec_content_raise(ctx, "IROn")) != USCXML_ERR_OK) return err; - } else { - return USCXML_ERR_MISSING_CALLBACK; - } - if likely(ctx->exec_content_raise != NULL) { - if unlikely((ctx->exec_content_raise(ctx, "IROff")) != USCXML_ERR_OK) return err; - } else { - return USCXML_ERR_MISSING_CALLBACK; - } - if likely(ctx->exec_content_raise != NULL) { - if unlikely((ctx->exec_content_raise(ctx, "IROn")) != USCXML_ERR_OK) return err; - } else { - return USCXML_ERR_MISSING_CALLBACK; - } - if likely(ctx->exec_content_raise != NULL) { - if unlikely((ctx->exec_content_raise(ctx, "IROff")) != USCXML_ERR_OK) return err; - } else { - return USCXML_ERR_MISSING_CALLBACK; - } - return USCXML_ERR_OK; -} - -#endif - -#ifndef USCXML_NO_ELEM_INFO - -static const uscxml_state _uscxml_C4473F72_states[6] = { - { /* state number 0 */ - /* name */ NULL, - /* parent */ 0, - /* onentry */ NULL, - /* onexit */ NULL, - /* invoke */ NULL, - /* children */ { 0x02 /* 010000 */ }, - /* completion */ { 0x02 /* 010000 */ }, - /* ancestors */ { 0x00 /* 000000 */ }, - /* data */ NULL, - /* type */ USCXML_STATE_COMPOUND, - }, - { /* state number 1 */ - /* name */ "0a3ff41d-98e6-40fe-b147-cf397c12eb55", - /* parent */ 0, - /* onentry */ _uscxml_C4473F72_scxml0_parallel0_on_entry, - /* onexit */ NULL, - /* invoke */ NULL, - /* children */ { 0x0c /* 001100 */ }, - /* completion */ { 0x0c /* 001100 */ }, - /* ancestors */ { 0x01 /* 100000 */ }, - /* data */ NULL, - /* type */ USCXML_STATE_PARALLEL, - }, - { /* state number 2 */ - /* name */ "interaction", - /* parent */ 1, - /* onentry */ NULL, - /* onexit */ NULL, - /* invoke */ NULL, - /* children */ { 0x00 /* 000000 */ }, - /* completion */ { 0x00 /* 000000 */ }, - /* ancestors */ { 0x03 /* 110000 */ }, - /* data */ NULL, - /* type */ USCXML_STATE_ATOMIC, - }, - { /* state number 3 */ - /* name */ "periphery", - /* parent */ 1, - /* onentry */ NULL, - /* onexit */ NULL, - /* invoke */ NULL, - /* children */ { 0x30 /* 000011 */ }, - /* completion */ { 0x10 /* 000010 */ }, - /* ancestors */ { 0x03 /* 110000 */ }, - /* data */ NULL, - /* type */ USCXML_STATE_COMPOUND, - }, - { /* state number 4 */ - /* name */ "IRLedOff", - /* parent */ 3, - /* onentry */ _uscxml_C4473F72_IRLedOff_on_entry, - /* onexit */ NULL, - /* invoke */ NULL, - /* children */ { 0x00 /* 000000 */ }, - /* completion */ { 0x00 /* 000000 */ }, - /* ancestors */ { 0x0b /* 110100 */ }, - /* data */ NULL, - /* type */ USCXML_STATE_ATOMIC, - }, - { /* state number 5 */ - /* name */ "IRLedOn", - /* parent */ 3, - /* onentry */ _uscxml_C4473F72_IRLedOn_on_entry, - /* onexit */ NULL, - /* invoke */ NULL, - /* children */ { 0x00 /* 000000 */ }, - /* completion */ { 0x00 /* 000000 */ }, - /* ancestors */ { 0x0b /* 110100 */ }, - /* data */ NULL, - /* type */ USCXML_STATE_ATOMIC, - } -}; - -#endif - -#ifndef USCXML_NO_ELEM_INFO - -static const uscxml_transition _uscxml_C4473F72_transitions[3] = { - { /* transition number 0 with priority 0 - target: - */ - /* source */ 2, - /* target */ { NULL }, - /* event */ "blueHigh", - /* condition */ NULL, - /* is_enabled */ NULL, - /* ontrans */ _uscxml_C4473F72_interaction_transition0_on_trans, - /* type */ USCXML_TRANS_TARGETLESS, - /* conflicts */ { 0x01 /* 100 */ }, - /* exit set */ { 0x00 /* 000000 */ } - }, - { /* transition number 1 with priority 1 - target: IRLedOn - */ - /* source */ 3, - /* target */ { 0x20 /* 000001 */ }, - /* event */ "IROn", - /* condition */ NULL, - /* is_enabled */ NULL, - /* ontrans */ NULL, - /* type */ USCXML_TRANS_INTERNAL, - /* conflicts */ { 0x06 /* 011 */ }, - /* exit set */ { 0x30 /* 000011 */ } - }, - { /* transition number 2 with priority 2 - target: IRLedOff - */ - /* source */ 3, - /* target */ { 0x10 /* 000010 */ }, - /* event */ "IROff", - /* condition */ NULL, - /* is_enabled */ NULL, - /* ontrans */ NULL, - /* type */ USCXML_TRANS_INTERNAL, - /* conflicts */ { 0x06 /* 011 */ }, - /* exit set */ { 0x30 /* 000011 */ } - } -}; - -#endif - -#ifndef USCXML_NO_ELEM_INFO - -#ifndef USCXML_MACHINE -# define USCXML_MACHINE _uscxml_C4473F72_machine -#endif -#define USCXML_MACHINE_0 _uscxml_C4473F72_machine - -const uscxml_machine _uscxml_C4473F72_machine = { - /* flags */ 0, - /* nr_states */ 6, - /* nr_transitions */ 3, - /* name */ "", - /* datamodel */ "null", - /* uuid */ "C4473F72ECDBC2BBAE099A8F6849A804", - /* states */ &_uscxml_C4473F72_states[0], - /* transitions */ &_uscxml_C4473F72_transitions[0], - /* parent */ NULL, - /* donedata */ &_uscxml_C4473F72_elem_donedatas[0], - /* script */ NULL -}; - -#endif - -#ifdef USCXML_VERBOSE -/** - * Print name of states contained in a (debugging). - */ -static void printStateNames(const uscxml_ctx* ctx, const char* a, size_t length) { - size_t i; - const char* seperator = ""; - for (i = 0; i < length; i++) { - if (BIT_HAS(i, a)) { - printf("%s%s", seperator, (USCXML_GET_STATE(i).name != NULL ? USCXML_GET_STATE(i).name : "UNK")); - seperator = ", "; - } - } - printf("\n"); -} - -/** - * Print bits set in a in a binary representation (debugging). - */ -static void printBitsetIndices(const char* a, size_t length) { - size_t i; - const char* seperator = ""; - for (i = 0; i < length; i++) { - if (BIT_HAS(i, a)) { - printf("%s%lu", seperator, i); - seperator = ", "; - } - } - printf("\n"); -} -#endif - -#ifndef USCXML_NO_BIT_OPERATIONS -/** - * Return true if there is a common bit in a and b. - */ -static int bit_has_and(const char* a, const char* b, size_t i) { - while(i--) { - if (a[i] & b[i]) - return 1; - } - return 0; -} - -/** - * Set all bits to 0, this corresponds to memset(a, 0, i), - * but does not require string.h or cstring. - */ -static void bit_clear_all(char* a, size_t i) { - while(i--) { - a[i] = 0; - } -} - -/** - * Return true if there is any bit set in a. - */ -static int bit_has_any(const char* a, size_t i) { - while(i--) { - if (a[i] > 0) - return 1; - } - return 0; -} - -/** - * Set all bits from given mask in dest, this is |= for bit arrays. - */ -static void bit_or(char* dest, const char* mask, size_t i) { - while(i--) { - dest[i] |= mask[i]; - } -} - -/** - * Copy all bits from source to dest, this corresponds to memcpy(a, b, i), - * but does not require string.h or cstring. - */ -static void bit_copy(char* dest, const char* source, size_t i) { - while(i--) { - dest[i] = source[i]; - } -} - -/** - * Unset bits from mask in dest. - */ -static void bit_and_not(char* dest, const char* mask, size_t i) { - while(i--) { - dest[i] &= ~mask[i]; - } -} - -/** - * Set bits from mask in dest. - */ -static void bit_and(char* dest, const char* mask, size_t i) { - while(i--) { - dest[i] &= mask[i]; - }; -} - -#define USCXML_NO_BIT_OPERATIONS -#endif - -#ifndef USCXML_NO_STEP_FUNCTION -int uscxml_step(uscxml_ctx* ctx) { - - USCXML_NR_STATES_TYPE i, j, k; - USCXML_NR_STATES_TYPE nr_states_bytes = ((USCXML_NUMBER_STATES + 7) & ~7) >> 3; - USCXML_NR_TRANS_TYPE nr_trans_bytes = ((USCXML_NUMBER_TRANS + 7) & ~7) >> 3; - int err = USCXML_ERR_OK; - char conflicts [USCXML_MAX_NR_TRANS_BYTES]; - char trans_set [USCXML_MAX_NR_TRANS_BYTES]; - char target_set [USCXML_MAX_NR_STATES_BYTES]; - char exit_set [USCXML_MAX_NR_STATES_BYTES]; - char entry_set [USCXML_MAX_NR_STATES_BYTES]; - char tmp_states [USCXML_MAX_NR_STATES_BYTES]; - -#ifdef USCXML_VERBOSE - printf("Config: "); - printStateNames(ctx, ctx->config, USCXML_NUMBER_STATES); -#endif - - if (ctx->flags & USCXML_CTX_FINISHED) - return USCXML_ERR_DONE; - - if (ctx->flags & USCXML_CTX_TOP_LEVEL_FINAL) { - /* exit all remaining states */ - i = USCXML_NUMBER_STATES; - while(i-- > 0) { - if (BIT_HAS(i, ctx->config)) { - /* call all on exit handlers */ - if (USCXML_GET_STATE(i).on_exit != NULL) { - if unlikely((err = USCXML_GET_STATE(i).on_exit(ctx, &USCXML_GET_STATE(i), ctx->event)) != USCXML_ERR_OK) - return err; - } - } - if (BIT_HAS(i, ctx->invocations)) { - if (USCXML_GET_STATE(i).invoke != NULL) - USCXML_GET_STATE(i).invoke(ctx, &USCXML_GET_STATE(i), NULL, 1); - BIT_CLEAR(i, ctx->invocations); - } - } - ctx->flags |= USCXML_CTX_FINISHED; - return USCXML_ERR_DONE; - } - - bit_clear_all(target_set, nr_states_bytes); - bit_clear_all(trans_set, nr_trans_bytes); - if unlikely(ctx->flags == USCXML_CTX_PRISTINE) { - if (ctx->machine->script != NULL) - ctx->machine->script(ctx, &ctx->machine->states[0], NULL); - bit_or(target_set, ctx->machine->states[0].completion, nr_states_bytes); - ctx->flags |= USCXML_CTX_SPONTANEOUS | USCXML_CTX_INITIALIZED; - goto ESTABLISH_ENTRY_SET; - } - -DEQUEUE_EVENT: - if (ctx->flags & USCXML_CTX_SPONTANEOUS) { - ctx->event = NULL; - goto SELECT_TRANSITIONS; - } - if (ctx->dequeue_internal != NULL && (ctx->event = ctx->dequeue_internal(ctx)) != NULL) { - goto SELECT_TRANSITIONS; - } - - /* manage invocations */ - for (i = 0; i < USCXML_NUMBER_STATES; i++) { - /* uninvoke */ - if (!BIT_HAS(i, ctx->config) && BIT_HAS(i, ctx->invocations)) { - if (USCXML_GET_STATE(i).invoke != NULL) - USCXML_GET_STATE(i).invoke(ctx, &USCXML_GET_STATE(i), NULL, 1); - BIT_CLEAR(i, ctx->invocations) - } - /* invoke */ - if (BIT_HAS(i, ctx->config) && !BIT_HAS(i, ctx->invocations)) { - if (USCXML_GET_STATE(i).invoke != NULL) - USCXML_GET_STATE(i).invoke(ctx, &USCXML_GET_STATE(i), NULL, 0); - BIT_SET_AT(i, ctx->invocations) - } - } - - if (ctx->dequeue_external != NULL && (ctx->event = ctx->dequeue_external(ctx)) != NULL) { - goto SELECT_TRANSITIONS; - } - - if (ctx->dequeue_external == NULL) { - return USCXML_ERR_DONE; - } - return USCXML_ERR_IDLE; - -SELECT_TRANSITIONS: - bit_clear_all(conflicts, nr_trans_bytes); - bit_clear_all(exit_set, nr_states_bytes); - for (i = 0; i < USCXML_NUMBER_TRANS; i++) { - /* never select history or initial transitions automatically */ - if unlikely(USCXML_GET_TRANS(i).type & (USCXML_TRANS_HISTORY | USCXML_TRANS_INITIAL)) - continue; - - /* is the transition active? */ - if (BIT_HAS(USCXML_GET_TRANS(i).source, ctx->config)) { - /* is it non-conflicting? */ - if (!BIT_HAS(i, conflicts)) { - /* is it spontaneous with an event or vice versa? */ - if ((USCXML_GET_TRANS(i).event == NULL && ctx->event == NULL) || - (USCXML_GET_TRANS(i).event != NULL && ctx->event != NULL)) { - /* is it enabled? */ - if ((ctx->event == NULL || ctx->is_matched(ctx, &USCXML_GET_TRANS(i), ctx->event) > 0) && - (USCXML_GET_TRANS(i).condition == NULL || - USCXML_GET_TRANS(i).is_enabled(ctx, &USCXML_GET_TRANS(i)) > 0)) { - /* remember that we found a transition */ - ctx->flags |= USCXML_CTX_TRANSITION_FOUND; - - /* transitions that are pre-empted */ - bit_or(conflicts, USCXML_GET_TRANS(i).conflicts, nr_trans_bytes); - - /* states that are directly targeted (resolve as entry-set later) */ - bit_or(target_set, USCXML_GET_TRANS(i).target, nr_states_bytes); - - /* states that will be left */ - bit_or(exit_set, USCXML_GET_TRANS(i).exit_set, nr_states_bytes); - - BIT_SET_AT(i, trans_set); - } - } - } - } - } - bit_and(exit_set, ctx->config, nr_states_bytes); - - if (ctx->flags & USCXML_CTX_TRANSITION_FOUND) { - ctx->flags |= USCXML_CTX_SPONTANEOUS; - ctx->flags &= ~USCXML_CTX_TRANSITION_FOUND; - } else { - ctx->flags &= ~USCXML_CTX_SPONTANEOUS; - goto DEQUEUE_EVENT; - } - -#ifdef USCXML_VERBOSE - printf("Targets: "); - printStateNames(ctx, target_set, USCXML_NUMBER_STATES); -#endif - -#ifdef USCXML_VERBOSE - printf("Exiting: "); - printStateNames(ctx, exit_set, USCXML_NUMBER_STATES); -#endif - -#ifdef USCXML_VERBOSE - printf("History: "); - printStateNames(ctx, ctx->history, USCXML_NUMBER_STATES); -#endif - -/* REMEMBER_HISTORY: */ - for (i = 0; i < USCXML_NUMBER_STATES; i++) { - if unlikely(USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_HISTORY_SHALLOW || - USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_HISTORY_DEEP) { - /* a history state whose parent is about to be exited */ - if unlikely(BIT_HAS(USCXML_GET_STATE(i).parent, exit_set)) { - bit_copy(tmp_states, USCXML_GET_STATE(i).completion, nr_states_bytes); - - /* set those states who were enabled */ - bit_and(tmp_states, ctx->config, nr_states_bytes); - - /* clear current history with completion mask */ - bit_and_not(ctx->history, USCXML_GET_STATE(i).completion, nr_states_bytes); - - /* set history */ - bit_or(ctx->history, tmp_states, nr_states_bytes); - } - } - } - -ESTABLISH_ENTRY_SET: - /* calculate new entry set */ - bit_copy(entry_set, target_set, nr_states_bytes); - - /* iterate for ancestors */ - for (i = 0; i < USCXML_NUMBER_STATES; i++) { - if (BIT_HAS(i, entry_set)) { - bit_or(entry_set, USCXML_GET_STATE(i).ancestors, nr_states_bytes); - } - } - - /* iterate for descendants */ - for (i = 0; i < USCXML_NUMBER_STATES; i++) { - if (BIT_HAS(i, entry_set)) { - switch (USCXML_STATE_MASK(USCXML_GET_STATE(i).type)) { - case USCXML_STATE_PARALLEL: { - bit_or(entry_set, USCXML_GET_STATE(i).completion, nr_states_bytes); - break; - } - case USCXML_STATE_HISTORY_SHALLOW: - case USCXML_STATE_HISTORY_DEEP: { - if (!bit_has_and(USCXML_GET_STATE(i).completion, ctx->history, nr_states_bytes) && - !BIT_HAS(USCXML_GET_STATE(i).parent, ctx->config)) { - /* nothing set for history, look for a default transition */ - for (j = 0; j < USCXML_NUMBER_TRANS; j++) { - if unlikely(ctx->machine->transitions[j].source == i) { - bit_or(entry_set, ctx->machine->transitions[j].target, nr_states_bytes); - if(USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_HISTORY_DEEP && - !bit_has_and(ctx->machine->transitions[j].target, USCXML_GET_STATE(i).children, nr_states_bytes)) { - for (k = i + 1; k < USCXML_NUMBER_STATES; k++) { - if (BIT_HAS(k, ctx->machine->transitions[j].target)) { - bit_or(entry_set, ctx->machine->states[k].ancestors, nr_states_bytes); - break; - } - } - } - BIT_SET_AT(j, trans_set); - break; - } - /* Note: SCXML mandates every history to have a transition! */ - } - } else { - bit_copy(tmp_states, USCXML_GET_STATE(i).completion, nr_states_bytes); - bit_and(tmp_states, ctx->history, nr_states_bytes); - bit_or(entry_set, tmp_states, nr_states_bytes); - if (USCXML_GET_STATE(i).type == (USCXML_STATE_HAS_HISTORY | USCXML_STATE_HISTORY_DEEP)) { - /* a deep history state with nested histories -> more completion */ - for (j = i + 1; j < USCXML_NUMBER_STATES; j++) { - if (BIT_HAS(j, USCXML_GET_STATE(i).completion) && - BIT_HAS(j, entry_set) && - (ctx->machine->states[j].type & USCXML_STATE_HAS_HISTORY)) { - for (k = j + 1; k < USCXML_NUMBER_STATES; k++) { - /* add nested history to entry_set */ - if ((USCXML_STATE_MASK(ctx->machine->states[k].type) == USCXML_STATE_HISTORY_DEEP || - USCXML_STATE_MASK(ctx->machine->states[k].type) == USCXML_STATE_HISTORY_SHALLOW) && - BIT_HAS(k, ctx->machine->states[j].children)) { - /* a nested history state */ - BIT_SET_AT(k, entry_set); - } - } - } - } - } - } - break; - } - case USCXML_STATE_INITIAL: { - for (j = 0; j < USCXML_NUMBER_TRANS; j++) { - if (ctx->machine->transitions[j].source == i) { - BIT_SET_AT(j, trans_set); - BIT_CLEAR(i, entry_set); - bit_or(entry_set, ctx->machine->transitions[j].target, nr_states_bytes); - for (k = i + 1; k < USCXML_NUMBER_STATES; k++) { - if (BIT_HAS(k, ctx->machine->transitions[j].target)) { - bit_or(entry_set, ctx->machine->states[k].ancestors, nr_states_bytes); - } - } - } - } - break; - } - case USCXML_STATE_COMPOUND: { /* we need to check whether one child is already in entry_set */ - if (!bit_has_and(entry_set, USCXML_GET_STATE(i).children, nr_states_bytes) && - (!bit_has_and(ctx->config, USCXML_GET_STATE(i).children, nr_states_bytes) || - bit_has_and(exit_set, USCXML_GET_STATE(i).children, nr_states_bytes))) - { - bit_or(entry_set, USCXML_GET_STATE(i).completion, nr_states_bytes); - if (!bit_has_and(USCXML_GET_STATE(i).completion, USCXML_GET_STATE(i).children, nr_states_bytes)) { - /* deep completion */ - for (j = i + 1; j < USCXML_NUMBER_STATES; j++) { - if (BIT_HAS(j, USCXML_GET_STATE(i).completion)) { - bit_or(entry_set, ctx->machine->states[j].ancestors, nr_states_bytes); - break; /* completion of compound is single state */ - } - } - } - } - break; - } - } - } - } - -#ifdef USCXML_VERBOSE - printf("Transitions: "); - printBitsetIndices(trans_set, sizeof(char) * 8 * nr_trans_bytes); -#endif - -/* EXIT_STATES: */ - i = USCXML_NUMBER_STATES; - while(i-- > 0) { - if (BIT_HAS(i, exit_set) && BIT_HAS(i, ctx->config)) { - /* call all on exit handlers */ - if (USCXML_GET_STATE(i).on_exit != NULL) { - if unlikely((err = USCXML_GET_STATE(i).on_exit(ctx, &USCXML_GET_STATE(i), ctx->event)) != USCXML_ERR_OK) - return err; - } - BIT_CLEAR(i, ctx->config); - } - } - -/* TAKE_TRANSITIONS: */ - for (i = 0; i < USCXML_NUMBER_TRANS; i++) { - if (BIT_HAS(i, trans_set) && (USCXML_GET_TRANS(i).type & (USCXML_TRANS_HISTORY | USCXML_TRANS_INITIAL)) == 0) { - /* call executable content in transition */ - if (USCXML_GET_TRANS(i).on_transition != NULL) { - if unlikely((err = USCXML_GET_TRANS(i).on_transition(ctx, - &ctx->machine->states[USCXML_GET_TRANS(i).source], - ctx->event)) != USCXML_ERR_OK) - return err; - } - } - } - -#ifdef USCXML_VERBOSE - printf("Entering: "); - printStateNames(ctx, entry_set, USCXML_NUMBER_STATES); -#endif - -/* ENTER_STATES: */ - for (i = 0; i < USCXML_NUMBER_STATES; i++) { - if (BIT_HAS(i, entry_set) && !BIT_HAS(i, ctx->config)) { - /* these are no proper states */ - if unlikely(USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_HISTORY_DEEP || - USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_HISTORY_SHALLOW || - USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_INITIAL) - continue; - - BIT_SET_AT(i, ctx->config); - - /* initialize data */ - if (!BIT_HAS(i, ctx->initialized_data)) { - if unlikely(USCXML_GET_STATE(i).data != NULL && ctx->exec_content_init != NULL) { - ctx->exec_content_init(ctx, USCXML_GET_STATE(i).data); - } - BIT_SET_AT(i, ctx->initialized_data); - } - - if (USCXML_GET_STATE(i).on_entry != NULL) { - if unlikely((err = USCXML_GET_STATE(i).on_entry(ctx, &USCXML_GET_STATE(i), ctx->event)) != USCXML_ERR_OK) - return err; - } - - /* take history and initial transitions */ - for (j = 0; j < USCXML_NUMBER_TRANS; j++) { - if unlikely(BIT_HAS(j, trans_set) && - (ctx->machine->transitions[j].type & (USCXML_TRANS_HISTORY | USCXML_TRANS_INITIAL)) && - ctx->machine->states[ctx->machine->transitions[j].source].parent == i) { - /* call executable content in transition */ - if (ctx->machine->transitions[j].on_transition != NULL) { - if unlikely((err = ctx->machine->transitions[j].on_transition(ctx, - &USCXML_GET_STATE(i), - ctx->event)) != USCXML_ERR_OK) - return err; - } - } - } - - /* handle final states */ - if unlikely(USCXML_STATE_MASK(USCXML_GET_STATE(i).type) == USCXML_STATE_FINAL) { - if unlikely(USCXML_GET_STATE(i).ancestors[0] == 0x01) { - ctx->flags |= USCXML_CTX_TOP_LEVEL_FINAL; - } else { - /* raise done event */ - const uscxml_elem_donedata* donedata = &ctx->machine->donedata[0]; - while(USCXML_ELEM_DONEDATA_IS_SET(donedata)) { - if unlikely(donedata->source == i) - break; - donedata++; - } - ctx->raise_done_event(ctx, &ctx->machine->states[USCXML_GET_STATE(i).parent], (USCXML_ELEM_DONEDATA_IS_SET(donedata) ? donedata : NULL)); - } - - /** - * are we the last final state to leave a parallel state?: - * 1. Gather all parallel states in our ancestor chain - * 2. Find all states for which these parallels are ancestors - * 3. Iterate all active final states and remove their ancestors - * 4. If a state remains, not all children of a parallel are final - */ - for (j = 0; j < USCXML_NUMBER_STATES; j++) { - if unlikely(USCXML_STATE_MASK(ctx->machine->states[j].type) == USCXML_STATE_PARALLEL && - BIT_HAS(j, USCXML_GET_STATE(i).ancestors)) { - bit_clear_all(tmp_states, nr_states_bytes); - for (k = 0; k < USCXML_NUMBER_STATES; k++) { - if unlikely(BIT_HAS(j, ctx->machine->states[k].ancestors) && BIT_HAS(k, ctx->config)) { - if (USCXML_STATE_MASK(ctx->machine->states[k].type) == USCXML_STATE_FINAL) { - bit_and_not(tmp_states, ctx->machine->states[k].ancestors, nr_states_bytes); - } else { - BIT_SET_AT(k, tmp_states); - } - } - } - if unlikely(!bit_has_any(tmp_states, nr_states_bytes)) { - ctx->raise_done_event(ctx, &ctx->machine->states[j], NULL); - } - } - } - - } - - } - } - - return USCXML_ERR_OK; -} - -#define USCXML_NO_STEP_FUNCTION -#endif - diff --git a/test/src/test-c-machine.cpp b/test/src/test-c-machine.cpp deleted file mode 100644 index 9ee3f1f..0000000 --- a/test/src/test-c-machine.cpp +++ /dev/null @@ -1,981 +0,0 @@ -#include -#include // malloc -#include // assert -#include // printf -#include // stringstream -#include // deque -#include // trim - -#define USCXML_VERBOSE - -#include "uscxml/config.h" - -#ifdef APPLE -#include -#include -#include -#endif - -#ifndef AUTOINCLUDE_TEST -#include "test-c-machine.scxml.c" -#endif - -#include "uscxml/Convenience.h" -#include "uscxml/URL.h" -#include "uscxml/concurrency/Timer.h" -//#include "uscxml/dom/DOMUtils.h" -#include "uscxml/Factory.h" -//#include "uscxml/Interpreter.h" -#include "uscxml/UUID.h" - -#include "uscxml/concurrency/DelayedEventQueue.h" -#include "uscxml/concurrency/tinythread.h" - -#ifdef BUILD_PROFILING -# include "uscxml/plugins/DataModel.h" -# endif - -#define USER_DATA(ctx) ((StateMachine*)(((uscxml_ctx*)ctx)->user_data)) - -using namespace uscxml; - -class StateMachine : public InterpreterInfo { -public: - StateMachine(const uscxml_machine* machine) : machine(machine), parentMachine(NULL), topMostMachine(NULL), invocation(NULL) { - allMachines[sessionId] = this; - topMostMachine = this; - currentMachine = allMachines.begin(); - init(); - } - - StateMachine(StateMachine* parent, const uscxml_machine* machine, const uscxml_elem_invoke* invoke) : machine(machine), invocation(invoke) { - parentMachine = parent; - topMostMachine = parent->topMostMachine; - init(); - } - - void init() { - sessionId = UUID::getUUID(); - isFinalized = false; - currEvent = NULL; - - // clear and initialize machine context - memset(&ctx, 0, sizeof(uscxml_ctx)); - ctx.machine = machine; - ctx.user_data = (void*)this; - - // register callbacks with scxml context - ctx.is_matched = &isMatched; - ctx.is_true = &isTrue; - ctx.raise_done_event = &raiseDoneEvent; - ctx.invoke = &invoke; - ctx.exec_content_send = &execContentSend; - ctx.exec_content_raise = &execContentRaise; - ctx.exec_content_cancel = &execContentCancel; - ctx.exec_content_log = &execContentLog; - ctx.exec_content_assign = &execContentAssign; - ctx.exec_content_foreach_init = &execContentForeachInit; - ctx.exec_content_foreach_next = &execContentForeachNext; - ctx.exec_content_foreach_done = &execContentForeachDone; - ctx.dequeue_external = &dequeueExternal; - ctx.dequeue_internal = &dequeueInternal; - ctx.exec_content_init = &execContentInit; - ctx.exec_content_script = &execContentScript; - - name = machine->name; - - delayQueue.start(); - dataModel = Factory::getInstance()->createDataModel(machine->datamodel, this); - - if (invocation != NULL) { - /// test 226/240 - initialize from invoke request - if (invocation->params != NULL) { - const uscxml_elem_param* param = invocation->params; - while(USCXML_ELEM_PARAM_IS_SET(param)) { - std::string identifier; - if (param->name != NULL) { - identifier = param->name; - } else if (param->location != NULL) { - identifier = param->location; - } - invokeData[identifier] = parentMachine->dataModel.getStringAsData(param->expr); - param++; - } - } - - if (invocation->namelist != NULL) { - const char* cPtr = invocation->namelist; - const char* aPtr = invocation->namelist; - while(cPtr) { - while (isspace(*cPtr)) - cPtr++; - aPtr = cPtr; - while(*cPtr && !isspace(*cPtr)) - cPtr++; - - if (aPtr == cPtr) - break; - - std::string identifier = std::string(aPtr, cPtr - aPtr); - invokeData[identifier] = parentMachine->dataModel.getStringAsData(identifier); - } - } - } - } - - virtual ~StateMachine() { - if (parentMachine != NULL) { - topMostMachine->allMachines.erase(topMostMachine->invocationIds[invocation]); - } -// finalize(); - - delayQueue.stop(); - delayQueue.cancelAllEvents(); - - while(eq.size() > 0) { - delete eq.front(); - eq.pop_front(); - } - eq.clear(); - while(iq.size() > 0) { - delete iq.front(); - iq.pop_front(); - } - iq.clear(); - } - - bool hasPendingWork() { - return (iq.size() > 0 || - eq.size() > 0 || - ctx.flags & USCXML_CTX_SPONTANEOUS || - ctx.flags == USCXML_CTX_PRISTINE || - memcmp(ctx.config, ctx.invocations, sizeof(ctx.config)) != 0); - } - - bool isDone() { - return ctx.flags & USCXML_CTX_FINISHED; - } - - void finalize() { - if (isFinalized) - return; - - delayQueue.stop(); - delayQueue.cancelAllEvents(); - - if (parentMachine != NULL) { - tthread::lock_guard lock(mutex); - - Event* done = new Event(); - done->invokeid = invokeId; - done->name = "done.invoke." + invokeId; - parentMachine->eq.push_back(done); - } - isFinalized = true; - } - - void reset() { - delayQueue.stop(); - delayQueue.cancelAllEvents(); - - while(eq.size() > 0) { - delete eq.front(); - eq.pop_front(); - } - while(iq.size() > 0) { - delete iq.front(); - iq.pop_front(); - } - - iq.clear(); - eq.clear(); - - init(); - - } - - int step() { - // advance current machine if there are multiple - currentMachine++; - if (currentMachine == allMachines.end()) - currentMachine = allMachines.begin(); - - StateMachine* toRun = currentMachine->second; - if (!toRun->hasPendingWork()) { - return USCXML_ERR_IDLE; - } - - // test 187 - if (toRun->isDone()) { - toRun->finalize(); - return USCXML_ERR_IDLE; - } - - state = uscxml_step(&toRun->ctx); - if (toRun->currEvent != NULL) { - delete toRun->currEvent; - toRun->currEvent = NULL; - } - - return state; - } - - // InterpreterInfo - NameSpaceInfo getNameSpaceInfo() const { - return nsInfo; - } - const std::string& getName() { - return name; - } - const std::string& getSessionId() { - return sessionId; - } - const std::map& getIOProcessors() { - return ioProcs; - } - const std::map& getInvokers() { - return invokers; - } - Arabica::DOM::Document getDocument() const { - return document; - } - - bool isInState(const std::string& stateId) { - for (size_t i = 0 ; i < ctx.machine->nr_states; i++) { - if (ctx.machine->states[i].name != NULL && BIT_HAS(i, ctx.config) && stateId == ctx.machine->states[i].name) - return true; - } - return false; - } - - // callbacks for scxml context - - static int isMatched(const uscxml_ctx* ctx, const uscxml_transition* t, const void* e) { - Event* event = (Event*)e; - return (nameMatch(t->event, event->name.c_str())); - } - - static int isTrue(const uscxml_ctx* ctx, const char* expr) { - try { - return USER_DATA(ctx)->dataModel.evalAsBool(expr); - } catch (Event e) { - execContentRaise(ctx, e.name.c_str()); - } - return false; - } - - static int invoke(const uscxml_ctx* ctx, const uscxml_state* s, const uscxml_elem_invoke* invocation, unsigned char uninvoke) { - std::map &allMachines = USER_DATA(ctx)->topMostMachine->allMachines; - StateMachine* topMachine = USER_DATA(ctx)->topMostMachine; - - if (uninvoke) { - if (invocation->machine != NULL) { - if (topMachine->invocationIds.find(invocation) != topMachine->invocationIds.end() && - allMachines.find(topMachine->invocationIds[invocation]) != allMachines.end()) { - - delete allMachines[topMachine->invocationIds[invocation]]; - topMachine->allMachines.erase(topMachine->invocationIds[invocation]); - topMachine->invocationIds.erase(invocation); - } - } else { - return USCXML_ERR_UNSUPPORTED; - } - } else { - // invocations - if (invocation->machine != NULL) { - // invoke a nested SCXML machine - StateMachine* invokedMachine = NULL; - try { - invokedMachine = new StateMachine(USER_DATA(ctx), invocation->machine, invocation); - } catch (Event e) { - delete invokedMachine; - return USCXML_ERR_EXEC_CONTENT; - } - if (invocation->id != NULL) { - invokedMachine->invokeId = invocation->id; - } else if (invocation->idlocation != NULL) { - // test224 - invokedMachine->invokeId = (invocation->sourcename != NULL ? std::string(invocation->sourcename) + "." : "") + UUID::getUUID(); - USER_DATA(ctx)->dataModel.assign(invocation->idlocation, Data(invokedMachine->invokeId, Data::VERBATIM)); - } else { - delete invokedMachine; - return USCXML_ERR_UNSUPPORTED; - } - allMachines[invokedMachine->invokeId] = invokedMachine; - topMachine->invocationIds[invocation] = invokedMachine->invokeId; - } else { - return USCXML_ERR_UNSUPPORTED; - } - } - return USCXML_ERR_OK; - } - - static int raiseDoneEvent(const uscxml_ctx* ctx, const uscxml_state* state, const uscxml_elem_donedata* donedata) { - Event* e = new Event(); - e->name = std::string("done.state.") + state->name; - - if (donedata) { - if (donedata->content != NULL) { - e->data = Data(donedata->content, Data::VERBATIM); - } else if (donedata->contentexpr != NULL) { - try { - e->data = USER_DATA(ctx)->dataModel.getStringAsData(donedata->contentexpr); - } catch (Event e) { - execContentRaise(ctx, e.name.c_str()); - } - } else { - try { - const uscxml_elem_param* param = donedata->params; - while (param && USCXML_ELEM_PARAM_IS_SET(param)) { - Data paramValue; - if (param->expr != NULL) { - paramValue = USER_DATA(ctx)->dataModel.getStringAsData(param->expr); - } else if(param->location) { - paramValue = USER_DATA(ctx)->dataModel.getStringAsData(param->location); - } - e->params.insert(std::make_pair(param->name, paramValue)); - param++; - } - } catch (Event e) { - execContentRaise(ctx, e.name.c_str()); - } - } - } - -#ifdef USCXML_VERBOSE - printf("Raising Done Event: %s\n", e->name.c_str()); -#endif - USER_DATA(ctx)->iq.push_back(e); - return USCXML_ERR_OK; - } - - static int execContentSend(const uscxml_ctx* ctx, const uscxml_elem_send* send) { - SendRequest* e = new SendRequest(); - - std::string sendid; - if (send->id != NULL) { - sendid = send->id; - } else { - sendid = UUID::getUUID(); - if (send->idlocation != NULL) { - USER_DATA(ctx)->dataModel.assign(send->idlocation, Data(sendid, Data::VERBATIM)); - } else { - e->hideSendId = true; - } - } - e->sendid = sendid; - - std::string target; - if (send->target != NULL) { - e->target = send->target; - } else if (send->targetexpr != NULL) { - e->target = USER_DATA(ctx)->dataModel.evalAsString(send->targetexpr); - } else { - e->target = "#_external"; - } - - if (e->target.size() > 0 && (e->target[0] != '#' || e->target[1] != '_')) { - e->name = "error.execution"; - execContentRaise(ctx, e); - return USCXML_ERR_INVALID_TARGET; - } - - e->origintype = "http://www.w3.org/TR/scxml/#SCXMLEventProcessor"; - e->origin = e->target; - - try { - if (send->type != NULL) { - e->type = send->type; - } else if (send->typeexpr != NULL) { - e->type = USER_DATA(ctx)->dataModel.evalAsString(send->typeexpr); - } else { - e->type = "http://www.w3.org/TR/scxml/#SCXMLEventProcessor"; - } - } catch (Event exc) { - e->name = "error.execution"; - execContentRaise(ctx, e); - return USCXML_ERR_EXEC_CONTENT; - } - - // only one somewhat supported - if (e->type != "http://www.w3.org/TR/scxml/#SCXMLEventProcessor") { - e->name = "error.execution"; - execContentRaise(ctx, e); - return USCXML_ERR_INVALID_TARGET; - } - - e->origintype = e->type; - e->invokeid = USER_DATA(ctx)->invokeId; - - if (send->eventexpr != NULL) { - e->name = USER_DATA(ctx)->dataModel.evalAsString(send->eventexpr); - } else { - e->name = send->event; - } - - try { - const uscxml_elem_param* param = send->params; - while (param && USCXML_ELEM_PARAM_IS_SET(param)) { - Data paramValue; - if (param->expr != NULL) { - paramValue = USER_DATA(ctx)->dataModel.getStringAsData(param->expr); - } else if(param->location) { - paramValue = USER_DATA(ctx)->dataModel.getStringAsData(param->location); - } - e->params.insert(std::make_pair(param->name, paramValue)); - param++; - } - } catch (Event e) { - execContentRaise(ctx, e.name.c_str()); - return USCXML_ERR_EXEC_CONTENT; - } - - try { - if (send->namelist != NULL) { - const char* bPtr = &send->namelist[0]; - const char* ePtr = bPtr; - while(*ePtr != '\0') { - ePtr++; - if (*ePtr == ' ' || *ePtr == '\0') { - std::string key(bPtr, ePtr - bPtr); - e->params.insert(std::make_pair(key, USER_DATA(ctx)->dataModel.getStringAsData(key))); - if (*ePtr == '\0') - break; - bPtr = ++ePtr; - } - } - } - } catch (Event e) { - execContentRaise(ctx, e.name.c_str()); - return USCXML_ERR_EXEC_CONTENT; - } - - if (send->content != NULL) { - // will it parse as json? - Data d = Data::fromJSON(send->content); - if (!d.empty()) { - e->data = d; - } else { - e->data = Data(spaceNormalize(send->content), Data::VERBATIM); - } - } - - size_t delayMs = 0; - std::string delay; - if (send->delayexpr != NULL) { - delay = USER_DATA(ctx)->dataModel.evalAsString(send->delayexpr); - } else if (send->delay != NULL) { - delay = send->delay; - } - if (delay.size() > 0) { - boost::trim(delay); - - NumAttr delayAttr(delay); - if (iequals(delayAttr.unit, "ms")) { - delayMs = strTo(delayAttr.value); - } else if (iequals(delayAttr.unit, "s")) { - delayMs = strTo(delayAttr.value) * 1000; - } else if (delayAttr.unit.length() == 0) { // unit less delay is interpreted as milliseconds - delayMs = strTo(delayAttr.value); - } else { - std::cerr << "Cannot make sense of delay value " << delay << ": does not end in 's' or 'ms'"; - } - } - - if (USER_DATA(ctx)->invokeId.size() > 0) { - e->invokeid = USER_DATA(ctx)->invokeId; - } - - USER_DATA(ctx)->sendIds[sendid] = e; - if (delayMs > 0) { - USER_DATA(ctx)->delayQueue.addEvent(sendid, delayedSend, delayMs, (void*)ctx); - } else { - delayedSend((void*)ctx, sendid); - } - - return USCXML_ERR_OK; - } - - static int execContentRaise(const uscxml_ctx* ctx, Event* e) { - if (boost::starts_with(e->name, "error.")) { - e->eventType = Event::PLATFORM; - } else { - e->eventType = Event::INTERNAL; - } - USER_DATA(ctx)->iq.push_back(e); - return USCXML_ERR_OK; - } - - static int execContentRaise(const uscxml_ctx* ctx, const char* event) { - Event* e = new Event(); - e->name = event; - return execContentRaise(ctx, e); - } - - static int execContentCancel(const uscxml_ctx* ctx, const char* sendid, const char* sendidexpr) { - std::string eventId; - if (sendid != NULL) { - eventId = sendid; - } else if (sendidexpr != NULL) { - eventId = USER_DATA(ctx)->dataModel.evalAsString(sendidexpr); - } - - if (eventId.length() > 0) { - USER_DATA(ctx)->delayQueue.cancelEvent(eventId); - } else { - execContentRaise(ctx, "error.execution"); - return USCXML_ERR_EXEC_CONTENT; - } - return USCXML_ERR_OK; - } - - static int execContentLog(const uscxml_ctx* ctx, const char* label, const char* expr) { - try { - if (label != NULL) { - printf("%s%s", label, (expr != NULL ? ": " : "")); - } - if (expr != NULL) { - std::string msg = USER_DATA(ctx)->dataModel.evalAsString(expr); - printf("%s", msg.c_str()); - } - if (label != NULL || expr != NULL) { - printf("\n"); - } - } catch (Event e) { - execContentRaise(ctx, e.name.c_str()); - return USCXML_ERR_EXEC_CONTENT; - } - return USCXML_ERR_OK; - } - - static int execContentAssign(const uscxml_ctx* ctx, const uscxml_elem_assign* assign) { - std::string key = assign->location; - if (key == "_sessionid" || key == "_name" || key == "_ioprocessors" || key == "_invokers" || key == "_event") { - execContentRaise(ctx, "error.execution"); - return USCXML_ERR_EXEC_CONTENT; - } - - try { -// Data d = USER_DATA(ctx)->dataModel.getStringAsData(expr); - if (assign->expr != NULL) { - Data d = Data(assign->expr, Data::INTERPRETED); - USER_DATA(ctx)->dataModel.assign(key, d); - } else if (assign->content != NULL) { - Data d = Data(assign->content, Data::INTERPRETED); - USER_DATA(ctx)->dataModel.assign(key, d); - } - } catch (Event e) { - execContentRaise(ctx, e.name.c_str()); - return USCXML_ERR_EXEC_CONTENT; - } - return USCXML_ERR_OK; - } - - static int execContentForeachInit(const uscxml_ctx* ctx, const uscxml_elem_foreach* foreach) { - try { - scxml_foreach_info* feInfo = (scxml_foreach_info*)malloc(sizeof(scxml_foreach_info)); - USER_DATA(ctx)->foreachInfo[foreach] = feInfo; - - feInfo->iterations = USER_DATA(ctx)->dataModel.getLength(foreach->array); - feInfo->currIteration = 0; - } catch (Event e) { - execContentRaise(ctx, e.name.c_str()); - return USCXML_ERR_EXEC_CONTENT; - } - return USCXML_ERR_OK; - } - - static int execContentForeachNext(const uscxml_ctx* ctx, const uscxml_elem_foreach* foreach) { - try { - scxml_foreach_info* feInfo = USER_DATA(ctx)->foreachInfo[foreach]; - if (feInfo->currIteration < feInfo->iterations) { - USER_DATA(ctx)->dataModel.setForeach((foreach->item != NULL ? foreach->item : ""), - (foreach->array != NULL ? foreach->array : ""), - (foreach->index != NULL ? foreach->index : ""), - feInfo->currIteration); - feInfo->currIteration++; - return USCXML_ERR_OK; - } - } catch (Event e) { - execContentRaise(ctx, e.name.c_str()); - free(USER_DATA(ctx)->foreachInfo[foreach]); - USER_DATA(ctx)->foreachInfo.erase(foreach); - return USCXML_ERR_EXEC_CONTENT; - } - return USCXML_ERR_FOREACH_DONE; - } - - static int execContentForeachDone(const uscxml_ctx* ctx, const uscxml_elem_foreach* foreach) { - free(USER_DATA(ctx)->foreachInfo[foreach]); - USER_DATA(ctx)->foreachInfo.erase(foreach); - return USCXML_ERR_OK; - } - - static int execContentInit(const uscxml_ctx* ctx, const uscxml_elem_data* data) { - while(USCXML_ELEM_DATA_IS_SET(data)) { - if (USER_DATA(ctx)->invokeData.find(data->id) != USER_DATA(ctx)->invokeData.end()) { - // passed via param or namelist: test245 - try { - USER_DATA(ctx)->dataModel.init(data->id, USER_DATA(ctx)->invokeData[data->id]); - } catch (Event e) { - execContentRaise(ctx, e.name.c_str()); - } - } else { - Data d; - std::stringstream content; - - try { - if (data->expr != NULL) { - d = Data(data->expr, Data::INTERPRETED); - - } else if (data->content != NULL || data->src != NULL) { - if (data->content) { - content << data->content; - } else { - URL sourceURL(data->src); - if (USER_DATA(ctx)->baseURL.size() > 0) { - sourceURL.toAbsolute(USER_DATA(ctx)->baseURL); - } else { - sourceURL.toAbsoluteCwd(); - } - content << sourceURL; - } - /** - * first attempt to parse as structured data, we will try - * as space normalized string literals if this fails below - */ - d = USER_DATA(ctx)->dataModel.getStringAsData(content.str()); - - } else { - d = Data("undefined", Data::INTERPRETED); - } - // this might fail with an unquoted string literal in content - USER_DATA(ctx)->dataModel.init(data->id, d); - - } catch (Event e) { - if (content.str().size() > 0) { - try { - d = Data(escape(spaceNormalize(content.str())), Data::VERBATIM); - USER_DATA(ctx)->dataModel.init(data->id, d); - } catch (Event e) { - execContentRaise(ctx, e.name.c_str()); - } - } else { - execContentRaise(ctx, e.name.c_str()); - } - } - } - data++; - } - return USCXML_ERR_OK; - } - - static int execContentScript(const uscxml_ctx* ctx, const char* src, const char* content) { - if (content != NULL) { - USER_DATA(ctx)->dataModel.eval(Arabica::DOM::Element(), content); - } else if (src != NULL) { - return USCXML_ERR_UNSUPPORTED; - } - return USCXML_ERR_OK; - } - - static void* dequeueExternal(const uscxml_ctx* ctx) { - tthread::lock_guard lock(USER_DATA(ctx)->mutex); - if (USER_DATA(ctx)->eq.size() == 0) - return NULL; - - Event* e = USER_DATA(ctx)->eq.front(); - USER_DATA(ctx)->eq.pop_front(); - USER_DATA(ctx)->currEvent = e; - USER_DATA(ctx)->dataModel.setEvent(*e); - - std::map& allMachines = USER_DATA(ctx)->topMostMachine->allMachines; - if (e->invokeid.size() > 0 && allMachines.find(e->invokeid) != allMachines.end()) { - // we need to check for finalize content - StateMachine* invokedMachine = allMachines[e->invokeid]; - if (invokedMachine->invocation != NULL && invokedMachine->invocation->finalize != NULL) - invokedMachine->invocation->finalize(ctx, - invokedMachine->invocation, - e); - } - - // auto forward event - for (std::map::iterator machIter = allMachines.begin(); machIter != allMachines.end(); machIter++) { - if (machIter->second->parentMachine != NULL && - machIter->second->parentMachine == USER_DATA(ctx) && - machIter->second->invocation->autoforward) { - tthread::lock_guard lock(machIter->second->mutex); - - Event* ne = new Event(*e); - machIter->second->eq.push_back(ne); - } - } - -#ifdef USCXML_VERBOSE - printf("Popping External Event: %s\n", e->name.c_str()); -#endif - return e; - } - - static void* dequeueInternal(const uscxml_ctx* ctx) { - if (USER_DATA(ctx)->iq.size() == 0) - return NULL; - Event* e = USER_DATA(ctx)->iq.front(); - USER_DATA(ctx)->iq.pop_front(); - USER_DATA(ctx)->currEvent = e; - USER_DATA(ctx)->dataModel.setEvent(*e); -#ifdef USCXML_VERBOSE - printf("Popping Internal Event: %s\n", e->name.c_str()); -#endif - return e; - } - - static void delayedSend(void* ctx, std::string eventName) { - tthread::lock_guard lock(USER_DATA(ctx)->mutex); - - SendRequest* sr = USER_DATA(ctx)->sendIds[eventName]; - Event* e = new Event(*sr); - - if (sr->target == "#_internal") { - e->eventType = Event::INTERNAL; -#ifdef USCXML_VERBOSE - printf("Pushing Internal Event: %s\n", e->name.c_str()); -#endif - USER_DATA(ctx)->iq.push_back(e); - } else if (sr->target == "#_external") { - e->eventType = Event::EXTERNAL; -#ifdef USCXML_VERBOSE - printf("Pushing External Event: %s\n", e->name.c_str()); -#endif - USER_DATA(ctx)->eq.push_back(e); - } else if (sr->target == "#_parent") { - e->eventType = Event::EXTERNAL; - if (USER_DATA(ctx)->parentMachine != NULL) { - USER_DATA(ctx)->parentMachine->eq.push_back(e); - } - // TODO: handle invalid parent - } else if (sr->target.substr(0,8) == "#_scxml_") { - std::string sessionId = sr->target.substr(8); - bool sessionFound = false; - for (std::map::iterator machIter = USER_DATA(ctx)->topMostMachine->allMachines.begin(); - machIter != USER_DATA(ctx)->topMostMachine->allMachines.end(); machIter++) { - if (machIter->second->sessionId == sessionId) { - e->eventType = Event::EXTERNAL; - machIter->second->eq.push_back(e); - sessionFound = true; - break; - } - } - if (!sessionFound) { - // test496 - execContentRaise((uscxml_ctx*)ctx, "error.communication"); - } - } else if (sr->target.substr(0,2) == "#_") { - e->eventType = Event::EXTERNAL; - std::string targetId = sr->target.substr(2); - if (USER_DATA(ctx)->topMostMachine->allMachines.find(targetId) != USER_DATA(ctx)->topMostMachine->allMachines.end()) { - USER_DATA(ctx)->topMostMachine->allMachines[targetId]->eq.push_back(e); - } else { - execContentRaise((uscxml_ctx*)ctx, "error.communication"); - } - } else { - assert(false); - } - USER_DATA(ctx)->monitor.notify_all(); - delete sr; - } - - static std::string spaceNormalize(const std::string& text) { - std::stringstream content; - std::string seperator; - - size_t start = 0; - for (size_t i = 0; i < text.size(); i++) { - if (isspace(text[i])) { - if (i > 0 && start < i) { - content << seperator << text.substr(start, i - start); - seperator = " "; - } - while(isspace(text[++i])); // skip whitespaces - start = i; - } else if (i + 1 == text.size()) { - content << seperator << text.substr(start, i + 1 - start); - } - } - return content.str(); - } - - // TODO: isolate InterpreterImpl to reduce header deps on libxml/parser.h - static bool nameMatch(const std::string& eventDescs, const std::string& eventName) { - if(eventDescs.length() == 0 || eventName.length() == 0) - return false; - - // naive case of single descriptor and exact match - if (iequals(eventDescs, eventName)) - return true; - - size_t start = 0; - std::string eventDesc; - for (size_t i = 0; i < eventDescs.size(); i++) { - if (isspace(eventDescs[i])) { - if (i > 0 && start < i - 1) { - eventDesc = eventDescs.substr(start, i - start); - } - while(isspace(eventDescs[++i])); // skip whitespaces - start = i; - } else if (i + 1 == eventDescs.size()) { - eventDesc = eventDescs.substr(start, i + 1 - start); - } - - if (eventDesc.size() > 0) { - // remove optional trailing .* for CCXML compatibility - if (eventDesc.find("*", eventDesc.size() - 1) != std::string::npos) - eventDesc = eventDesc.substr(0, eventDesc.size() - 1); - if (eventDesc.find(".", eventDesc.size() - 1) != std::string::npos) - eventDesc = eventDesc.substr(0, eventDesc.size() - 1); - - // was eventDesc the * wildcard - if (eventDesc.size() == 0) - return true; - - // eventDesc has to be a real prefix of event now and therefore shorter - if (eventDesc.size() > eventName.size()) - goto NEXT_DESC; - - // are they already equal? - if (iequals(eventDesc, eventName)) - return true; - - if (eventName.find(eventDesc) == 0) { - if (eventName.find(".", eventDesc.size()) == eventDesc.size()) - return true; - } -NEXT_DESC: - eventDesc = ""; - } - } - return false; - } - - Event* currEvent; - - std::map invocationIds; - std::map allMachines; - - bool isFinalized; - int state; - uscxml_ctx ctx; - const uscxml_machine* machine; - - StateMachine* parentMachine; - StateMachine* topMostMachine; - std::map::iterator currentMachine; // next machine to advance - - std::string baseURL; - std::string sessionId; - std::string name; - - // in case we were invoked - std::string invokeId; - const uscxml_elem_invoke* invocation; - std::map invokeData; - - std::deque iq; - std::deque eq; - - DataModel dataModel; - -protected: - struct scxml_foreach_info { - size_t iterations; - size_t currIteration; - }; - - NameSpaceInfo nsInfo; - std::map ioProcs; - std::map invokers; - Arabica::DOM::Document document; - - DelayedEventQueue delayQueue; - std::map sendIds; - std::map foreachInfo; - - tthread::condition_variable monitor; - tthread::mutex mutex; -}; - - -int main(int argc, char** argv) { - - int err; - size_t benchmarkRuns = 1; - const char* envBenchmarkRuns = getenv("USCXML_BENCHMARK_ITERATIONS"); - if (envBenchmarkRuns != NULL) { - benchmarkRuns = strTo(envBenchmarkRuns); - } - - size_t remainingRuns = benchmarkRuns; - - double avg = 0; - size_t microSteps = 0; -#ifdef BUILD_PROFILING - double avgDm = 0; -#endif - - StateMachine rootMachine(&USCXML_MACHINE); - - Timer tTotal; - tTotal.start(); - while(remainingRuns-- > 0) { - - Timer t; - t.start(); - microSteps = 0; - - - for (;;) { - err = rootMachine.step(); - if (rootMachine.isDone()) - break; - t.stop(); - microSteps++; - - t.start(); - } - microSteps++; - - assert(rootMachine.ctx.flags & USCXML_CTX_TOP_LEVEL_FINAL); - t.stop(); - - avg += t.elapsed; -#ifdef BUILD_PROFILING - avgDm += rootMachine.dataModel.timer.elapsed; - rootMachine.dataModel.timer.elapsed = 0; -#endif - size_t passIdx = 0; - for (size_t i = 0; i < rootMachine.ctx.machine->nr_states; i++) { - if (rootMachine.ctx.machine->states[i].name && strcmp(rootMachine.ctx.machine->states[i].name, "pass") == 0) { - passIdx = i; - break; - } - } - - if(!BIT_HAS(passIdx, rootMachine.ctx.config)) { - std::cerr << "Interpreter did not end in pass" << std::endl; - exit(EXIT_FAILURE); - } - rootMachine.reset(); - } - tTotal.stop(); - std::cout << benchmarkRuns << " iterations" << std::endl; - std::cout << tTotal.elapsed * 1000.0 << " ms in total" << std::endl; - std::cout << (avg * 1000.0) / (double)benchmarkRuns << " ms per execution" << std::endl; - std::cout << microSteps << " microsteps per iteration" << std::endl; - std::cout << (avg * 1000.0) / ((double)benchmarkRuns * (double)microSteps) << " ms per microstep" << std::endl; -#ifdef BUILD_PROFILING - std::cout << (avgDm * 1000.0) / (double)benchmarkRuns << " ms in dataModel" << std::endl; - std::cout << ((avg - avgDm) * 1000.0) / ((double)benchmarkRuns * (double)microSteps) << " ms per microstep \\wo dataModel" << std::endl; -#endif - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(100)); - return EXIT_SUCCESS; -} diff --git a/test/src/test-c-machine.scxml.c b/test/src/test-c-machine.scxml.c index b75c6a5..4cfc37c 100644 --- a/test/src/test-c-machine.scxml.c +++ b/test/src/test-c-machine.scxml.c @@ -1,6 +1,6 @@ /** Generated from source: - file:///Users/sradomski/Documents/TK/Code/uscxml/test/w3c/ecma/test144.scxml + file:///Users/sradomski/Documents/TK/Code/uscxml2/test/w3c/lua/test240.scxml */ #ifndef USCXML_NO_STDTYPES_H @@ -208,7 +208,7 @@ struct uscxml_machine { }; /** - * All information pertaining to a element. + * All information pertaining to a element-> * With late data binding, blocks of data elements are separated by NULL * use USCXML_ELEM_DATA_IS_SET to test for end of a block. */ @@ -220,7 +220,7 @@ struct uscxml_elem_data { }; /** - * All information pertaining to an element. + * All information pertaining to an element-> */ struct uscxml_elem_assign { const char* location; @@ -229,7 +229,7 @@ struct uscxml_elem_assign { }; /** - * All information pertaining to any state element. + * All information pertaining to any state element-> */ struct uscxml_state { const char* name; /* eventual name */ @@ -237,30 +237,30 @@ struct uscxml_state { const exec_content_t on_entry; /* on entry handlers */ const exec_content_t on_exit; /* on exit handlers */ const invoke_t invoke; /* invocations */ - const char children[USCXML_MAX_NR_STATES_BYTES]; /* all children */ - const char completion[USCXML_MAX_NR_STATES_BYTES]; /* default completion */ - const char ancestors[USCXML_MAX_NR_STATES_BYTES]; /* all ancestors */ + const unsigned char children[USCXML_MAX_NR_STATES_BYTES]; /* all children */ + const unsigned char completion[USCXML_MAX_NR_STATES_BYTES]; /* default completion */ + const unsigned char ancestors[USCXML_MAX_NR_STATES_BYTES]; /* all ancestors */ const uscxml_elem_data* data; /* data with late binding */ const unsigned char type; /* One of USCXML_STATE_* */ }; /** - * All information pertaining to a element. + * All information pertaining to a element-> */ struct uscxml_transition { const USCXML_NR_STATES_TYPE source; - const char target[USCXML_MAX_NR_STATES_BYTES]; + const unsigned char target[USCXML_MAX_NR_STATES_BYTES]; const char* event; const char* condition; const is_enabled_t is_enabled; const exec_content_t on_transition; const unsigned char type; - const char conflicts[USCXML_MAX_NR_TRANS_BYTES]; - const char exit_set[USCXML_MAX_NR_STATES_BYTES]; + const unsigned char conflicts[USCXML_MAX_NR_TRANS_BYTES]; + const unsigned char exit_set[USCXML_MAX_NR_STATES_BYTES]; }; /** - * All information pertaining to a element. + * All information pertaining to a element-> */ struct uscxml_elem_foreach { const char* array; @@ -269,7 +269,7 @@ struct uscxml_elem_foreach { }; /** - * All information pertaining to a element. + * All information pertaining to a element-> * Blocks of params are separated by NULL params, use * USCXML_ELEM_PARAM_IS_SET to test for end of a block. */ @@ -280,7 +280,7 @@ struct uscxml_elem_param { }; /** - * All information pertaining to a element. + * All information pertaining to a element-> */ struct uscxml_elem_donedata { const USCXML_NR_STATES_TYPE source; @@ -290,7 +290,7 @@ struct uscxml_elem_donedata { }; /** - * All information pertaining to an element. + * All information pertaining to an element-> */ struct uscxml_elem_invoke { const uscxml_machine* machine; @@ -310,7 +310,7 @@ struct uscxml_elem_invoke { }; /** - * All information pertaining to a element. + * All information pertaining to a element-> */ struct uscxml_elem_send { const char* event; @@ -336,10 +336,10 @@ struct uscxml_ctx { unsigned char flags; const uscxml_machine* machine; - char config[USCXML_MAX_NR_STATES_BYTES]; /* Make sure these macros specify a sufficient size */ - char history[USCXML_MAX_NR_STATES_BYTES]; - char invocations[USCXML_MAX_NR_STATES_BYTES]; - char initialized_data[USCXML_MAX_NR_STATES_BYTES]; + unsigned char config[USCXML_MAX_NR_STATES_BYTES]; /* Make sure these macros specify a sufficient size */ + unsigned char history[USCXML_MAX_NR_STATES_BYTES]; + unsigned char invocations[USCXML_MAX_NR_STATES_BYTES]; + unsigned char initialized_data[USCXML_MAX_NR_STATES_BYTES]; void* user_data; void* event; @@ -368,11 +368,44 @@ struct uscxml_ctx { #endif /* forward declare machines to allow references */ -extern const uscxml_machine _uscxml_7B67993D_machine; +extern const uscxml_machine _uscxml_F2DFDF85_machine; +extern const uscxml_machine _uscxml_88325DE6_machine; +extern const uscxml_machine _uscxml_8B0504D7_machine; #ifndef USCXML_NO_ELEM_INFO -static const uscxml_elem_donedata _uscxml_7B67993D_elem_donedatas[1] = { +static const uscxml_elem_data _uscxml_F2DFDF85_elem_datas[2] = { + /* id, src, expr, content */ + { "Var1", NULL, "1", NULL }, + { NULL, NULL, NULL, NULL } +}; + +static const uscxml_elem_param _uscxml_F2DFDF85_elem_params[2] = { + /* name, expr, location */ + { "Var1", "1", NULL }, + { NULL, NULL, NULL } +}; + +static const uscxml_elem_send _uscxml_F2DFDF85_elem_sends[1] = { + { + /* event */ "timeout", + /* eventexpr */ NULL, + /* target */ NULL, + /* targetexpr */ NULL, + /* type */ NULL, + /* typeexpr */ NULL, + /* id */ NULL, + /* idlocation */ NULL, + /* delay */ "2000", + /* delayexpr */ NULL, + /* namelist */ NULL, + /* content */ NULL, + /* contentexpr */ NULL, + /* params */ NULL + } +}; + +static const uscxml_elem_donedata _uscxml_F2DFDF85_elem_donedatas[1] = { /* source, content, contentexpr, params */ { 0, NULL, NULL, NULL } }; @@ -381,31 +414,71 @@ static const uscxml_elem_donedata _uscxml_7B67993D_elem_donedatas[1] = { #ifndef USCXML_NO_ELEM_INFO +static const uscxml_elem_invoke _uscxml_F2DFDF85_elem_invokes[2] = { + { + /* machine */ &_uscxml_88325DE6_machine, + /* type */ "http://www.w3.org/TR/scxml/", + /* typeexpr */ NULL, + /* src */ NULL, + /* srcexpr */ NULL, + /* id */ NULL, + /* idlocation */ NULL, + /* sourcename */ "s01", + /* namelist */ "Var1", + /* autoforward */ 0, + /* params */ NULL, + /* finalize */ NULL, + /* content */ NULL, + /* contentexpr */ NULL, + }, + { + /* machine */ &_uscxml_8B0504D7_machine, + /* type */ "http://www.w3.org/TR/scxml/", + /* typeexpr */ NULL, + /* src */ NULL, + /* srcexpr */ NULL, + /* id */ NULL, + /* idlocation */ NULL, + /* sourcename */ "s02", + /* namelist */ NULL, + /* autoforward */ 0, + /* params */ &_uscxml_F2DFDF85_elem_params[0], + /* finalize */ NULL, + /* content */ NULL, + /* contentexpr */ NULL, + } +}; + #endif #ifndef USCXML_NO_EXEC_CONTENT -static int _uscxml_7B67993D_s0_on_entry_0(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { +static int _uscxml_F2DFDF85_s0_on_entry_0(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { int err = USCXML_ERR_OK; - if likely(ctx->exec_content_raise != NULL) { - if unlikely((ctx->exec_content_raise(ctx, "foo")) != USCXML_ERR_OK) return err; - } else { - return USCXML_ERR_MISSING_CALLBACK; - } - if likely(ctx->exec_content_raise != NULL) { - if unlikely((ctx->exec_content_raise(ctx, "bar")) != USCXML_ERR_OK) return err; + if likely(ctx->exec_content_send != NULL) { + if ((ctx->exec_content_send(ctx, &_uscxml_F2DFDF85_elem_sends[0])) != USCXML_ERR_OK) return err; } else { return USCXML_ERR_MISSING_CALLBACK; } return USCXML_ERR_OK; } -static int _uscxml_7B67993D_s0_on_entry(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { - _uscxml_7B67993D_s0_on_entry_0(ctx, state, event); +static int _uscxml_F2DFDF85_s0_on_entry(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { + _uscxml_F2DFDF85_s0_on_entry_0(ctx, state, event); + return USCXML_ERR_OK; +} + +static int _uscxml_F2DFDF85_s01_invoke(const uscxml_ctx* ctx, const uscxml_state* s, const uscxml_elem_invoke* invocation, unsigned char uninvoke) { + ctx->invoke(ctx, s, &_uscxml_F2DFDF85_elem_invokes[0], uninvoke); + return USCXML_ERR_OK; } +static int _uscxml_F2DFDF85_s02_invoke(const uscxml_ctx* ctx, const uscxml_state* s, const uscxml_elem_invoke* invocation, unsigned char uninvoke) { + ctx->invoke(ctx, s, &_uscxml_F2DFDF85_elem_invokes[1], uninvoke); -static int _uscxml_7B67993D_pass_on_entry_0(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { + return USCXML_ERR_OK; +} +static int _uscxml_F2DFDF85_pass_on_entry_0(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { int err = USCXML_ERR_OK; if likely(ctx->exec_content_log != NULL) { if unlikely((ctx->exec_content_log(ctx, "Outcome", "'pass'")) != USCXML_ERR_OK) return err; @@ -415,12 +488,12 @@ static int _uscxml_7B67993D_pass_on_entry_0(const uscxml_ctx* ctx, const uscxml_ return USCXML_ERR_OK; } -static int _uscxml_7B67993D_pass_on_entry(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { - _uscxml_7B67993D_pass_on_entry_0(ctx, state, event); +static int _uscxml_F2DFDF85_pass_on_entry(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { + _uscxml_F2DFDF85_pass_on_entry_0(ctx, state, event); return USCXML_ERR_OK; } -static int _uscxml_7B67993D_fail_on_entry_0(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { +static int _uscxml_F2DFDF85_fail_on_entry_0(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { int err = USCXML_ERR_OK; if likely(ctx->exec_content_log != NULL) { if unlikely((ctx->exec_content_log(ctx, "Outcome", "'fail'")) != USCXML_ERR_OK) return err; @@ -430,8 +503,8 @@ static int _uscxml_7B67993D_fail_on_entry_0(const uscxml_ctx* ctx, const uscxml_ return USCXML_ERR_OK; } -static int _uscxml_7B67993D_fail_on_entry(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { - _uscxml_7B67993D_fail_on_entry_0(ctx, state, event); +static int _uscxml_F2DFDF85_fail_on_entry(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { + _uscxml_F2DFDF85_fail_on_entry_0(ctx, state, event); return USCXML_ERR_OK; } @@ -439,64 +512,76 @@ static int _uscxml_7B67993D_fail_on_entry(const uscxml_ctx* ctx, const uscxml_st #ifndef USCXML_NO_ELEM_INFO -static const uscxml_state _uscxml_7B67993D_states[5] = { +static const uscxml_state _uscxml_F2DFDF85_states[6] = { { /* state number 0 */ /* name */ NULL, /* parent */ 0, /* onentry */ NULL, /* onexit */ NULL, /* invoke */ NULL, - /* children */ { 0x1e /* 01111 */ }, - /* completion */ { 0x02 /* 01000 */ }, - /* ancestors */ { 0x00 /* 00000 */ }, - /* data */ NULL, + /* children */ { 0x32 /* 010011 */ }, + /* completion */ { 0x02 /* 010000 */ }, + /* ancestors */ { 0x00 /* 000000 */ }, + /* data */ &_uscxml_F2DFDF85_elem_datas[0], /* type */ USCXML_STATE_COMPOUND, }, { /* state number 1 */ /* name */ "s0", /* parent */ 0, - /* onentry */ _uscxml_7B67993D_s0_on_entry, + /* onentry */ _uscxml_F2DFDF85_s0_on_entry, /* onexit */ NULL, /* invoke */ NULL, - /* children */ { 0x00 /* 00000 */ }, - /* completion */ { 0x00 /* 00000 */ }, - /* ancestors */ { 0x01 /* 10000 */ }, + /* children */ { 0x0c /* 001100 */ }, + /* completion */ { 0x04 /* 001000 */ }, + /* ancestors */ { 0x01 /* 100000 */ }, /* data */ NULL, - /* type */ USCXML_STATE_ATOMIC, + /* type */ USCXML_STATE_COMPOUND, }, { /* state number 2 */ - /* name */ "s1", - /* parent */ 0, + /* name */ "s01", + /* parent */ 1, /* onentry */ NULL, /* onexit */ NULL, - /* invoke */ NULL, - /* children */ { 0x00 /* 00000 */ }, - /* completion */ { 0x00 /* 00000 */ }, - /* ancestors */ { 0x01 /* 10000 */ }, + /* invoke */ _uscxml_F2DFDF85_s01_invoke, + /* children */ { 0x00 /* 000000 */ }, + /* completion */ { 0x00 /* 000000 */ }, + /* ancestors */ { 0x03 /* 110000 */ }, /* data */ NULL, /* type */ USCXML_STATE_ATOMIC, }, { /* state number 3 */ + /* name */ "s02", + /* parent */ 1, + /* onentry */ NULL, + /* onexit */ NULL, + /* invoke */ _uscxml_F2DFDF85_s02_invoke, + /* children */ { 0x00 /* 000000 */ }, + /* completion */ { 0x00 /* 000000 */ }, + /* ancestors */ { 0x03 /* 110000 */ }, + /* data */ NULL, + /* type */ USCXML_STATE_ATOMIC, + }, + { /* state number 4 */ /* name */ "pass", /* parent */ 0, - /* onentry */ _uscxml_7B67993D_pass_on_entry, + /* onentry */ _uscxml_F2DFDF85_pass_on_entry, /* onexit */ NULL, /* invoke */ NULL, - /* children */ { 0x00 /* 00000 */ }, - /* completion */ { 0x00 /* 00000 */ }, - /* ancestors */ { 0x01 /* 10000 */ }, + /* children */ { 0x00 /* 000000 */ }, + /* completion */ { 0x00 /* 000000 */ }, + /* ancestors */ { 0x01 /* 100000 */ }, /* data */ NULL, /* type */ USCXML_STATE_FINAL, }, - { /* state number 4 */ + { /* state number 5 */ /* name */ "fail", /* parent */ 0, - /* onentry */ _uscxml_7B67993D_fail_on_entry, + /* onentry */ _uscxml_F2DFDF85_fail_on_entry, /* onexit */ NULL, /* invoke */ NULL, - /* children */ { 0x00 /* 00000 */ }, - /* completion */ { 0x00 /* 00000 */ }, - /* ancestors */ { 0x01 /* 10000 */ }, + /* children */ { 0x00 /* 000000 */ }, + /* completion */ { 0x00 /* 000000 */ }, + /* ancestors */ { 0x01 /* 100000 */ }, /* data */ NULL, /* type */ USCXML_STATE_FINAL, } @@ -506,58 +591,71 @@ static const uscxml_state _uscxml_7B67993D_states[5] = { #ifndef USCXML_NO_ELEM_INFO -static const uscxml_transition _uscxml_7B67993D_transitions[4] = { - { /* transition number 0 with priority 0 - target: s1 +static const uscxml_transition _uscxml_F2DFDF85_transitions[5] = { + { /* transition number 1 with priority 0 + target: s02 */ - /* source */ 1, - /* target */ { 0x04 /* 00100 */ }, - /* event */ "foo", + /* source */ 2, + /* target */ { 0x08 /* 000100 */ }, + /* event */ "success", /* condition */ NULL, /* is_enabled */ NULL, /* ontrans */ NULL, /* type */ 0, - /* conflicts */ { 0x0f /* 1111 */ }, - /* exit set */ { 0x1e /* 01111 */ } + /* conflicts */ { 0x1f /* 11111 */ }, + /* exit set */ { 0x0c /* 001100 */ } }, - { /* transition number 1 with priority 1 + { /* transition number 2 with priority 1 target: fail */ - /* source */ 1, - /* target */ { 0x10 /* 00001 */ }, - /* event */ "*", + /* source */ 2, + /* target */ { 0x20 /* 000001 */ }, + /* event */ "failure", /* condition */ NULL, /* is_enabled */ NULL, /* ontrans */ NULL, /* type */ 0, - /* conflicts */ { 0x0f /* 1111 */ }, - /* exit set */ { 0x1e /* 01111 */ } + /* conflicts */ { 0x1f /* 11111 */ }, + /* exit set */ { 0x3e /* 011111 */ } }, - { /* transition number 2 with priority 2 + { /* transition number 3 with priority 2 target: pass */ - /* source */ 2, - /* target */ { 0x08 /* 00010 */ }, - /* event */ "bar", + /* source */ 3, + /* target */ { 0x10 /* 000010 */ }, + /* event */ "success", /* condition */ NULL, /* is_enabled */ NULL, /* ontrans */ NULL, /* type */ 0, - /* conflicts */ { 0x0f /* 1111 */ }, - /* exit set */ { 0x1e /* 01111 */ } + /* conflicts */ { 0x1f /* 11111 */ }, + /* exit set */ { 0x3e /* 011111 */ } }, - { /* transition number 3 with priority 3 + { /* transition number 4 with priority 3 target: fail */ - /* source */ 2, - /* target */ { 0x10 /* 00001 */ }, - /* event */ "*", + /* source */ 3, + /* target */ { 0x20 /* 000001 */ }, + /* event */ "failure", + /* condition */ NULL, + /* is_enabled */ NULL, + /* ontrans */ NULL, + /* type */ 0, + /* conflicts */ { 0x1f /* 11111 */ }, + /* exit set */ { 0x3e /* 011111 */ } + }, + { /* transition number 0 with priority 4 + target: fail + */ + /* source */ 1, + /* target */ { 0x20 /* 000001 */ }, + /* event */ "timeout", /* condition */ NULL, /* is_enabled */ NULL, /* ontrans */ NULL, /* type */ 0, - /* conflicts */ { 0x0f /* 1111 */ }, - /* exit set */ { 0x1e /* 01111 */ } + /* conflicts */ { 0x1f /* 11111 */ }, + /* exit set */ { 0x3e /* 011111 */ } } }; @@ -566,21 +664,390 @@ static const uscxml_transition _uscxml_7B67993D_transitions[4] = { #ifndef USCXML_NO_ELEM_INFO #ifndef USCXML_MACHINE -# define USCXML_MACHINE _uscxml_7B67993D_machine +# define USCXML_MACHINE _uscxml_F2DFDF85_machine #endif -#define USCXML_MACHINE_0 _uscxml_7B67993D_machine +#define USCXML_MACHINE_0 _uscxml_F2DFDF85_machine +#define USCXML_MACHINE_TEST240_SCXML _uscxml_F2DFDF85_machine -const uscxml_machine _uscxml_7B67993D_machine = { +const uscxml_machine _uscxml_F2DFDF85_machine = { /* flags */ 0, - /* nr_states */ 5, - /* nr_transitions */ 4, - /* name */ "", - /* datamodel */ "ecmascript", - /* uuid */ "7B67993D8309FD356AECB23C2C98EE79", - /* states */ &_uscxml_7B67993D_states[0], - /* transitions */ &_uscxml_7B67993D_transitions[0], + /* nr_states */ 6, + /* nr_transitions */ 5, + /* name */ "test240.scxml", + /* datamodel */ "lua", + /* uuid */ "F2DFDF85E1407B6D03CC162B96F43FC7", + /* states */ &_uscxml_F2DFDF85_states[0], + /* transitions */ &_uscxml_F2DFDF85_transitions[0], /* parent */ NULL, - /* donedata */ &_uscxml_7B67993D_elem_donedatas[0], + /* donedata */ &_uscxml_F2DFDF85_elem_donedatas[0], + /* script */ NULL +}; + +#endif + +#ifndef USCXML_NO_ELEM_INFO + +static const uscxml_elem_data _uscxml_88325DE6_elem_datas[2] = { + /* id, src, expr, content */ + { "Var1", NULL, "0", NULL }, + { NULL, NULL, NULL, NULL } +}; + +static const uscxml_elem_send _uscxml_88325DE6_elem_sends[2] = { + { + /* event */ "success", + /* eventexpr */ NULL, + /* target */ "#_parent", + /* targetexpr */ NULL, + /* type */ NULL, + /* typeexpr */ NULL, + /* id */ NULL, + /* idlocation */ NULL, + /* delay */ NULL, + /* delayexpr */ NULL, + /* namelist */ NULL, + /* content */ NULL, + /* contentexpr */ NULL, + /* params */ NULL + }, + { + /* event */ "failure", + /* eventexpr */ NULL, + /* target */ "#_parent", + /* targetexpr */ NULL, + /* type */ NULL, + /* typeexpr */ NULL, + /* id */ NULL, + /* idlocation */ NULL, + /* delay */ NULL, + /* delayexpr */ NULL, + /* namelist */ NULL, + /* content */ NULL, + /* contentexpr */ NULL, + /* params */ NULL + } +}; + +static const uscxml_elem_donedata _uscxml_88325DE6_elem_donedatas[1] = { + /* source, content, contentexpr, params */ + { 0, NULL, NULL, NULL } +}; + +#endif + +#ifndef USCXML_NO_ELEM_INFO + +#endif + +#ifndef USCXML_NO_EXEC_CONTENT + +static int _uscxml_88325DE6_sub01_transition0_is_enabled(const uscxml_ctx* ctx, const uscxml_transition* transition) { + if likely(ctx->is_true != NULL) { + return (ctx->is_true(ctx, "Var1==1")); + } + return USCXML_ERR_MISSING_CALLBACK; +} +static int _uscxml_88325DE6_sub01_transition0_on_trans(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { + int err = USCXML_ERR_OK; + if likely(ctx->exec_content_send != NULL) { + if ((ctx->exec_content_send(ctx, &_uscxml_88325DE6_elem_sends[0])) != USCXML_ERR_OK) return err; + } else { + return USCXML_ERR_MISSING_CALLBACK; + } + return USCXML_ERR_OK; +} + +static int _uscxml_88325DE6_sub01_transition1_on_trans(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { + int err = USCXML_ERR_OK; + if likely(ctx->exec_content_send != NULL) { + if ((ctx->exec_content_send(ctx, &_uscxml_88325DE6_elem_sends[1])) != USCXML_ERR_OK) return err; + } else { + return USCXML_ERR_MISSING_CALLBACK; + } + return USCXML_ERR_OK; +} + +#endif + +#ifndef USCXML_NO_ELEM_INFO + +static const uscxml_state _uscxml_88325DE6_states[3] = { + { /* state number 0 */ + /* name */ NULL, + /* parent */ 0, + /* onentry */ NULL, + /* onexit */ NULL, + /* invoke */ NULL, + /* children */ { 0x06 /* 011 */ }, + /* completion */ { 0x02 /* 010 */ }, + /* ancestors */ { 0x00 /* 000 */ }, + /* data */ &_uscxml_88325DE6_elem_datas[0], + /* type */ USCXML_STATE_COMPOUND, + }, + { /* state number 1 */ + /* name */ "sub01", + /* parent */ 0, + /* onentry */ NULL, + /* onexit */ NULL, + /* invoke */ NULL, + /* children */ { 0x00 /* 000 */ }, + /* completion */ { 0x00 /* 000 */ }, + /* ancestors */ { 0x01 /* 100 */ }, + /* data */ NULL, + /* type */ USCXML_STATE_ATOMIC, + }, + { /* state number 2 */ + /* name */ "subFinal1", + /* parent */ 0, + /* onentry */ NULL, + /* onexit */ NULL, + /* invoke */ NULL, + /* children */ { 0x00 /* 000 */ }, + /* completion */ { 0x00 /* 000 */ }, + /* ancestors */ { 0x01 /* 100 */ }, + /* data */ NULL, + /* type */ USCXML_STATE_FINAL, + } +}; + +#endif + +#ifndef USCXML_NO_ELEM_INFO + +static const uscxml_transition _uscxml_88325DE6_transitions[2] = { + { /* transition number 0 with priority 0 + target: subFinal1 + */ + /* source */ 1, + /* target */ { 0x04 /* 001 */ }, + /* event */ NULL, + /* condition */ "Var1==1", + /* is_enabled */ _uscxml_88325DE6_sub01_transition0_is_enabled, + /* ontrans */ _uscxml_88325DE6_sub01_transition0_on_trans, + /* type */ USCXML_TRANS_SPONTANEOUS, + /* conflicts */ { 0x03 /* 11 */ }, + /* exit set */ { 0x06 /* 011 */ } + }, + { /* transition number 1 with priority 1 + target: subFinal1 + */ + /* source */ 1, + /* target */ { 0x04 /* 001 */ }, + /* event */ NULL, + /* condition */ NULL, + /* is_enabled */ NULL, + /* ontrans */ _uscxml_88325DE6_sub01_transition1_on_trans, + /* type */ USCXML_TRANS_SPONTANEOUS, + /* conflicts */ { 0x03 /* 11 */ }, + /* exit set */ { 0x06 /* 011 */ } + } +}; + +#endif + +#ifndef USCXML_NO_ELEM_INFO + +#ifndef USCXML_MACHINE +# define USCXML_MACHINE _uscxml_88325DE6_machine +#endif +#define USCXML_MACHINE_1 _uscxml_88325DE6_machine +#define USCXML_MACHINE_TEST240_SCXML_S01_INVOKE0_CONTENT0_SCXML0 _uscxml_88325DE6_machine + +const uscxml_machine _uscxml_88325DE6_machine = { + /* flags */ 0, + /* nr_states */ 3, + /* nr_transitions */ 2, + /* name */ "test240.scxml.s01_invoke0_content0_scxml0", + /* datamodel */ "lua", + /* uuid */ "88325DE699193976BBBCF380C181A014", + /* states */ &_uscxml_88325DE6_states[0], + /* transitions */ &_uscxml_88325DE6_transitions[0], + /* parent */ &_uscxml_F2DFDF85_machine, + /* donedata */ &_uscxml_88325DE6_elem_donedatas[0], + /* script */ NULL +}; + +#endif + +#ifndef USCXML_NO_ELEM_INFO + +static const uscxml_elem_data _uscxml_8B0504D7_elem_datas[2] = { + /* id, src, expr, content */ + { "Var1", NULL, "0", NULL }, + { NULL, NULL, NULL, NULL } +}; + +static const uscxml_elem_send _uscxml_8B0504D7_elem_sends[2] = { + { + /* event */ "success", + /* eventexpr */ NULL, + /* target */ "#_parent", + /* targetexpr */ NULL, + /* type */ NULL, + /* typeexpr */ NULL, + /* id */ NULL, + /* idlocation */ NULL, + /* delay */ NULL, + /* delayexpr */ NULL, + /* namelist */ NULL, + /* content */ NULL, + /* contentexpr */ NULL, + /* params */ NULL + }, + { + /* event */ "failure", + /* eventexpr */ NULL, + /* target */ "#_parent", + /* targetexpr */ NULL, + /* type */ NULL, + /* typeexpr */ NULL, + /* id */ NULL, + /* idlocation */ NULL, + /* delay */ NULL, + /* delayexpr */ NULL, + /* namelist */ NULL, + /* content */ NULL, + /* contentexpr */ NULL, + /* params */ NULL + } +}; + +static const uscxml_elem_donedata _uscxml_8B0504D7_elem_donedatas[1] = { + /* source, content, contentexpr, params */ + { 0, NULL, NULL, NULL } +}; + +#endif + +#ifndef USCXML_NO_ELEM_INFO + +#endif + +#ifndef USCXML_NO_EXEC_CONTENT + +static int _uscxml_8B0504D7_sub02_transition0_is_enabled(const uscxml_ctx* ctx, const uscxml_transition* transition) { + if likely(ctx->is_true != NULL) { + return (ctx->is_true(ctx, "Var1==1")); + } + return USCXML_ERR_MISSING_CALLBACK; +} +static int _uscxml_8B0504D7_sub02_transition0_on_trans(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { + int err = USCXML_ERR_OK; + if likely(ctx->exec_content_send != NULL) { + if ((ctx->exec_content_send(ctx, &_uscxml_8B0504D7_elem_sends[0])) != USCXML_ERR_OK) return err; + } else { + return USCXML_ERR_MISSING_CALLBACK; + } + return USCXML_ERR_OK; +} + +static int _uscxml_8B0504D7_sub02_transition1_on_trans(const uscxml_ctx* ctx, const uscxml_state* state, const void* event) { + int err = USCXML_ERR_OK; + if likely(ctx->exec_content_send != NULL) { + if ((ctx->exec_content_send(ctx, &_uscxml_8B0504D7_elem_sends[1])) != USCXML_ERR_OK) return err; + } else { + return USCXML_ERR_MISSING_CALLBACK; + } + return USCXML_ERR_OK; +} + +#endif + +#ifndef USCXML_NO_ELEM_INFO + +static const uscxml_state _uscxml_8B0504D7_states[3] = { + { /* state number 0 */ + /* name */ NULL, + /* parent */ 0, + /* onentry */ NULL, + /* onexit */ NULL, + /* invoke */ NULL, + /* children */ { 0x06 /* 011 */ }, + /* completion */ { 0x02 /* 010 */ }, + /* ancestors */ { 0x00 /* 000 */ }, + /* data */ &_uscxml_8B0504D7_elem_datas[0], + /* type */ USCXML_STATE_COMPOUND, + }, + { /* state number 1 */ + /* name */ "sub02", + /* parent */ 0, + /* onentry */ NULL, + /* onexit */ NULL, + /* invoke */ NULL, + /* children */ { 0x00 /* 000 */ }, + /* completion */ { 0x00 /* 000 */ }, + /* ancestors */ { 0x01 /* 100 */ }, + /* data */ NULL, + /* type */ USCXML_STATE_ATOMIC, + }, + { /* state number 2 */ + /* name */ "subFinal2", + /* parent */ 0, + /* onentry */ NULL, + /* onexit */ NULL, + /* invoke */ NULL, + /* children */ { 0x00 /* 000 */ }, + /* completion */ { 0x00 /* 000 */ }, + /* ancestors */ { 0x01 /* 100 */ }, + /* data */ NULL, + /* type */ USCXML_STATE_FINAL, + } +}; + +#endif + +#ifndef USCXML_NO_ELEM_INFO + +static const uscxml_transition _uscxml_8B0504D7_transitions[2] = { + { /* transition number 0 with priority 0 + target: subFinal2 + */ + /* source */ 1, + /* target */ { 0x04 /* 001 */ }, + /* event */ NULL, + /* condition */ "Var1==1", + /* is_enabled */ _uscxml_8B0504D7_sub02_transition0_is_enabled, + /* ontrans */ _uscxml_8B0504D7_sub02_transition0_on_trans, + /* type */ USCXML_TRANS_SPONTANEOUS, + /* conflicts */ { 0x03 /* 11 */ }, + /* exit set */ { 0x06 /* 011 */ } + }, + { /* transition number 1 with priority 1 + target: subFinal2 + */ + /* source */ 1, + /* target */ { 0x04 /* 001 */ }, + /* event */ NULL, + /* condition */ NULL, + /* is_enabled */ NULL, + /* ontrans */ _uscxml_8B0504D7_sub02_transition1_on_trans, + /* type */ USCXML_TRANS_SPONTANEOUS, + /* conflicts */ { 0x03 /* 11 */ }, + /* exit set */ { 0x06 /* 011 */ } + } +}; + +#endif + +#ifndef USCXML_NO_ELEM_INFO + +#ifndef USCXML_MACHINE +# define USCXML_MACHINE _uscxml_8B0504D7_machine +#endif +#define USCXML_MACHINE_2 _uscxml_8B0504D7_machine +#define USCXML_MACHINE_TEST240_SCXML_S02_INVOKE0_CONTENT0_SCXML0 _uscxml_8B0504D7_machine + +const uscxml_machine _uscxml_8B0504D7_machine = { + /* flags */ 0, + /* nr_states */ 3, + /* nr_transitions */ 2, + /* name */ "test240.scxml.s02_invoke0_content0_scxml0", + /* datamodel */ "lua", + /* uuid */ "8B0504D789C25925F9E8A0C290F83773", + /* states */ &_uscxml_8B0504D7_states[0], + /* transitions */ &_uscxml_8B0504D7_transitions[0], + /* parent */ &_uscxml_F2DFDF85_machine, + /* donedata */ &_uscxml_8B0504D7_elem_donedatas[0], /* script */ NULL }; @@ -590,7 +1057,7 @@ const uscxml_machine _uscxml_7B67993D_machine = { /** * Print name of states contained in a (debugging). */ -static void printStateNames(const uscxml_ctx* ctx, const char* a, size_t length) { +static void printStateNames(const uscxml_ctx* ctx, const unsigned char* a, size_t length) { size_t i; const char* seperator = ""; for (i = 0; i < length; i++) { @@ -605,7 +1072,7 @@ static void printStateNames(const uscxml_ctx* ctx, const char* a, size_t length) /** * Print bits set in a in a binary representation (debugging). */ -static void printBitsetIndices(const char* a, size_t length) { +static void printBitsetIndices(const unsigned char* a, size_t length) { size_t i; const char* seperator = ""; for (i = 0; i < length; i++) { @@ -622,7 +1089,7 @@ static void printBitsetIndices(const char* a, size_t length) { /** * Return true if there is a common bit in a and b. */ -static int bit_has_and(const char* a, const char* b, size_t i) { +static int bit_has_and(const unsigned char* a, const unsigned char* b, size_t i) { while(i--) { if (a[i] & b[i]) return 1; @@ -634,7 +1101,7 @@ static int bit_has_and(const char* a, const char* b, size_t i) { * Set all bits to 0, this corresponds to memset(a, 0, i), * but does not require string.h or cstring. */ -static void bit_clear_all(char* a, size_t i) { +static void bit_clear_all(unsigned char* a, size_t i) { while(i--) { a[i] = 0; } @@ -643,7 +1110,7 @@ static void bit_clear_all(char* a, size_t i) { /** * Return true if there is any bit set in a. */ -static int bit_has_any(const char* a, size_t i) { +static int bit_has_any(unsigned const char* a, size_t i) { while(i--) { if (a[i] > 0) return 1; @@ -654,7 +1121,7 @@ static int bit_has_any(const char* a, size_t i) { /** * Set all bits from given mask in dest, this is |= for bit arrays. */ -static void bit_or(char* dest, const char* mask, size_t i) { +static void bit_or(unsigned char* dest, const unsigned char* mask, size_t i) { while(i--) { dest[i] |= mask[i]; } @@ -664,7 +1131,7 @@ static void bit_or(char* dest, const char* mask, size_t i) { * Copy all bits from source to dest, this corresponds to memcpy(a, b, i), * but does not require string.h or cstring. */ -static void bit_copy(char* dest, const char* source, size_t i) { +static void bit_copy(unsigned char* dest, const unsigned char* source, size_t i) { while(i--) { dest[i] = source[i]; } @@ -673,7 +1140,7 @@ static void bit_copy(char* dest, const char* source, size_t i) { /** * Unset bits from mask in dest. */ -static void bit_and_not(char* dest, const char* mask, size_t i) { +static void bit_and_not(unsigned char* dest, const unsigned char* mask, size_t i) { while(i--) { dest[i] &= ~mask[i]; } @@ -682,7 +1149,7 @@ static void bit_and_not(char* dest, const char* mask, size_t i) { /** * Set bits from mask in dest. */ -static void bit_and(char* dest, const char* mask, size_t i) { +static void bit_and(unsigned char* dest, const unsigned char* mask, size_t i) { while(i--) { dest[i] &= mask[i]; }; @@ -698,12 +1165,12 @@ int uscxml_step(uscxml_ctx* ctx) { USCXML_NR_STATES_TYPE nr_states_bytes = ((USCXML_NUMBER_STATES + 7) & ~7) >> 3; USCXML_NR_TRANS_TYPE nr_trans_bytes = ((USCXML_NUMBER_TRANS + 7) & ~7) >> 3; int err = USCXML_ERR_OK; - char conflicts [USCXML_MAX_NR_TRANS_BYTES]; - char trans_set [USCXML_MAX_NR_TRANS_BYTES]; - char target_set [USCXML_MAX_NR_STATES_BYTES]; - char exit_set [USCXML_MAX_NR_STATES_BYTES]; - char entry_set [USCXML_MAX_NR_STATES_BYTES]; - char tmp_states [USCXML_MAX_NR_STATES_BYTES]; + unsigned char conflicts [USCXML_MAX_NR_TRANS_BYTES]; + unsigned char trans_set [USCXML_MAX_NR_TRANS_BYTES]; + unsigned char target_set [USCXML_MAX_NR_STATES_BYTES]; + unsigned char exit_set [USCXML_MAX_NR_STATES_BYTES]; + unsigned char entry_set [USCXML_MAX_NR_STATES_BYTES]; + unsigned char tmp_states [USCXML_MAX_NR_STATES_BYTES]; #ifdef USCXML_VERBOSE printf("Config: "); @@ -744,6 +1211,7 @@ int uscxml_step(uscxml_ctx* ctx) { goto ESTABLISH_ENTRY_SET; } +DEQUEUE_EVENT: if (ctx->flags & USCXML_CTX_SPONTANEOUS) { ctx->event = NULL; goto SELECT_TRANSITIONS; @@ -794,7 +1262,8 @@ SELECT_TRANSITIONS: (USCXML_GET_TRANS(i).event != NULL && ctx->event != NULL)) { /* is it enabled? */ if ((ctx->event == NULL || ctx->is_matched(ctx, &USCXML_GET_TRANS(i), ctx->event) > 0) && - (USCXML_GET_TRANS(i).condition == NULL || USCXML_GET_TRANS(i).is_enabled(ctx, &USCXML_GET_TRANS(i)) > 0)) { + (USCXML_GET_TRANS(i).condition == NULL || + USCXML_GET_TRANS(i).is_enabled(ctx, &USCXML_GET_TRANS(i)) > 0)) { /* remember that we found a transition */ ctx->flags |= USCXML_CTX_TRANSITION_FOUND; @@ -820,6 +1289,7 @@ SELECT_TRANSITIONS: ctx->flags &= ~USCXML_CTX_TRANSITION_FOUND; } else { ctx->flags &= ~USCXML_CTX_SPONTANEOUS; + goto DEQUEUE_EVENT; } #ifdef USCXML_VERBOSE diff --git a/test/src/test-cmdline-parsing.cpp b/test/src/test-cmdline-parsing.cpp deleted file mode 100644 index edf90bc..0000000 --- a/test/src/test-cmdline-parsing.cpp +++ /dev/null @@ -1,101 +0,0 @@ -#include "uscxml/config.h" -#include "uscxml/Interpreter.h" -#include - -#include - -int main(int argc, char** argv) { - using namespace uscxml; - - if (true) { - int testArgc = 10; - const char* testArgv[] = { - "test-cmdline-parsing", - "--verbose", - "--port=80", - "--ssl-port=8080", - "--certificate=/foo/bar.pem", - "--private-key=/foo/bar.priv", - "--public-key=/foo/bar.pub", - "--plugin-path=/foo/plugins", - "--loglevel=10", - "--disable-http", - 0 - }; - InterpreterOptions options = InterpreterOptions::fromCmdLine(testArgc, (char **)testArgv); - assert(options.verbose); - assert(options.httpPort == 80); - assert(options.httpsPort == 8080); - assert(boost::equals(options.certificate, "/foo/bar.pem")); - assert(boost::equals(options.privateKey, "/foo/bar.priv")); - assert(boost::equals(options.publicKey, "/foo/bar.pub")); - assert(boost::equals(options.pluginPath, "/foo/plugins")); - assert(options.logLevel == 10); - assert(!options.withHTTP); - assert(!options); // invalid as no SCXML document is given - } - - if (true) { - int testArgc = 3; - const char* testArgv[] = { - "test-cmdline-parsing", - "--verbose", - "/foo/bar.scxml", - 0 - }; - InterpreterOptions options = InterpreterOptions::fromCmdLine(testArgc, (char **)testArgv); - assert(options); - assert(options.verbose); - assert(options.interpreters.size() == 1); - assert(options.interpreters.front().first == "/foo/bar.scxml"); - } - - if (true) { - int testArgc = 7; - const char* testArgv[] = { - "test-cmdline-parsing", - "--port=80", - "/foo/bar1.scxml", - "--disable-http", - "/foo/bar2.scxml", - "/foo/bar3.scxml", - "--disable-http", - 0 - }; - InterpreterOptions options = InterpreterOptions::fromCmdLine(testArgc, (char **)testArgv); - assert(options); - assert(options.httpPort == 80); - assert(options.interpreters.size() == 3); - assert(options.interpreters[0].first == "/foo/bar1.scxml"); - assert(options.interpreters[1].first == "/foo/bar2.scxml"); - assert(options.interpreters[2].first == "/foo/bar3.scxml"); - - assert(!options.interpreters[0].second->withHTTP); - assert(options.interpreters[1].second->withHTTP); - assert(!options.interpreters[2].second->withHTTP); - } - - if (true) { - int testArgc = 5; - const char* testArgv[] = { - "test-cmdline-parsing", - "--port=80", - "/foo/bar1.scxml", - "--vrml-path=/foo/bar.test", - "--tmp-path=/foo/bar.test", - 0 - }; - InterpreterOptions options = InterpreterOptions::fromCmdLine(testArgc, (char **)testArgv); - assert(options); - assert(options.httpPort == 80); - assert(options.interpreters.size() == 1); - assert(options.interpreters[0].first == "/foo/bar1.scxml"); - - assert(options.interpreters[0].second->additionalParameters.find("vrml-path") - != options.interpreters[0].second->additionalParameters.end()); - assert(options.interpreters[0].second->additionalParameters.find("tmp-path") - != options.interpreters[0].second->additionalParameters.end()); - } - - return EXIT_SUCCESS; -} \ No newline at end of file diff --git a/test/src/test-datamodel.cpp b/test/src/test-datamodel.cpp deleted file mode 100644 index 0c02ae8..0000000 --- a/test/src/test-datamodel.cpp +++ /dev/null @@ -1,527 +0,0 @@ -#include "uscxml/URL.h" -#include "uscxml/Message.h" -#include "uscxml/Interpreter.h" -#include "uscxml/Factory.h" -#include "uscxml/server/HTTPServer.h" - -#include - -#include -#include -#include - -using namespace uscxml; -using namespace boost; - -class TestDataModelExtension : public DataModelExtension { -public: - TestDataModelExtension() {} - - std::string provides() { - return "_x.platform.pool"; - } - - Data getValueOf(const std::string& member) { - return Data(true); - } - - void setValueOf(const std::string& member, const Data& data) { - std::cout << "Setting " << member << " to " << std::endl << Data::toJSON(data); - } -}; - -int main(int argc, char** argv) { -#ifdef _WIN32 - WSADATA wsaData; - WSAStartup(MAKEWORD(2, 2), &wsaData); -#endif - - { - char* testData = (char*)malloc(1024); - for (size_t i = 0; i < 1024; i++) { - testData[i] = (char)i; - } - - Data data(testData, 1024, "", false); - Blob blob = data.getBinary(); - char* otherData = blob.getData(); - - for (size_t i = 0; i < 1024; i++) { - assert(testData[i] == otherData[i]); - } - - } - - Interpreter interpreter = Interpreter::fromXML("", ""); - DataModel dm(Factory::getInstance()->createDataModel("ecmascript", interpreter.getImpl().get())); - dm.evalAsString("var foo = 12"); - - // TypedArray tests - // taken from https://bitbucket.org/lindenlab/llsd/src/ - { - - dm.evalAsBool("var a;"); - - dm.evalAsBool("Int8Array.BYTES_PER_ELEMENT == 1"); - dm.evalAsBool("a = new Int8Array([1, 2, 3, 4, 5, 6, 7, 8]);"); - assert(dm.evalAsBool("a.BYTES_PER_ELEMENT == 1;")); - assert(dm.evalAsBool("a.byteOffset == 0;")); - assert(dm.evalAsBool("a.byteLength == 8;")); - - dm.evalAsBool("Uint8Array.BYTES_PER_ELEMENT == 1"); - dm.evalAsBool("a = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]);"); - assert(dm.evalAsBool("a.BYTES_PER_ELEMENT == 1;")); - assert(dm.evalAsBool("a.byteOffset == 0;")); - assert(dm.evalAsBool("a.byteLength == 8;")); - - dm.evalAsBool("Int16Array.BYTES_PER_ELEMENT == 2"); - dm.evalAsBool("a = new Int16Array([1, 2, 3, 4, 5, 6, 7, 8]);"); - assert(dm.evalAsBool("a.BYTES_PER_ELEMENT == 2;")); - assert(dm.evalAsBool("a.byteOffset == 0;")); - assert(dm.evalAsBool("a.byteLength == 16;")); - - dm.evalAsBool("Uint16Array.BYTES_PER_ELEMENT == 2"); - dm.evalAsBool("a = new Uint16Array([1, 2, 3, 4, 5, 6, 7, 8]);"); - assert(dm.evalAsBool("a.BYTES_PER_ELEMENT == 2;")); - assert(dm.evalAsBool("a.byteOffset == 0;")); - assert(dm.evalAsBool("a.byteLength == 16;")); - - dm.evalAsBool("Int32Array.BYTES_PER_ELEMENT == 4"); - dm.evalAsBool("a = new Int32Array([1, 2, 3, 4, 5, 6, 7, 8]);"); - assert(dm.evalAsBool("a.BYTES_PER_ELEMENT == 4;")); - assert(dm.evalAsBool("a.byteOffset == 0;")); - assert(dm.evalAsBool("a.byteLength == 32;")); - - dm.evalAsBool("Uint32Array.BYTES_PER_ELEMENT == 4"); - dm.evalAsBool("a = new Uint32Array([1, 2, 3, 4, 5, 6, 7, 8]);"); - assert(dm.evalAsBool("a.BYTES_PER_ELEMENT == 4;")); - assert(dm.evalAsBool("a.byteOffset == 0;")); - assert(dm.evalAsBool("a.byteLength == 32;")); - - dm.evalAsBool("Float32Array.BYTES_PER_ELEMENT == 4"); - dm.evalAsBool("a = new Float32Array([1, 2, 3, 4, 5, 6, 7, 8]);"); - assert(dm.evalAsBool("a.BYTES_PER_ELEMENT == 4;")); - assert(dm.evalAsBool("a.byteOffset == 0;")); - assert(dm.evalAsBool("a.byteLength == 32;")); - - dm.evalAsBool("Float64Array.BYTES_PER_ELEMENT == 8"); - dm.evalAsBool("a = new Float64Array([1, 2, 3, 4, 5, 6, 7, 8]);"); - assert(dm.evalAsBool("a.BYTES_PER_ELEMENT == 8;")); - assert(dm.evalAsBool("a.byteOffset == 0;")); - assert(dm.evalAsBool("a.byteLength == 64;")); - - } - - // ArrayBufferView - { - dm.evalAsBool("var ab = new ArrayBuffer(48);"); - dm.evalAsBool("var i32 = new Int32Array(ab, 16);"); - dm.evalAsBool("i32.set([1, 2, 3, 4, 5, 6, 7, 8]);"); - -// assert(dm.evalAsBool("i32.buffer == ab;")); - assert(dm.evalAsBool("i32.byteOffset == 16;")); - assert(dm.evalAsBool("i32.byteLength == 32;")); - - dm.evalAsBool("var da = new DataView(i32.buffer, 8);"); -// assert(dm.evalAsBool("da.buffer == ab;")); - assert(dm.evalAsBool("da.byteOffset == 8;")); - assert(dm.evalAsBool("da.byteLength == 40;")); - - } - - // TypedArray constructors - { - assert(dm.evalAsBool("new Int8Array([0, 0, 0]).length == 3")); - dm.evalAsBool("var rawbuf = (new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7])).buffer"); - - dm.evalAsBool("var int8 = new Int8Array(4);"); - assert(dm.evalAsBool("int8.BYTES_PER_ELEMENT == 1;")); - assert(dm.evalAsBool("int8.length == 4;")); - assert(dm.evalAsBool("int8.byteLength == 4;")); - assert(dm.evalAsBool("int8.byteOffset == 0;")); -// assert(dm.evalAsBool("int8.get(-1) == undefined;")); -// assert(dm.evalAsBool("int8.get(4) == undefined;")); - - dm.evalAsBool("var int8 = new Int8Array([1, 2, 3, 4, 5, 6]);"); - assert(dm.evalAsBool("int8.length == 6;")); - assert(dm.evalAsBool("int8.byteLength == 6;")); - assert(dm.evalAsBool("int8.byteOffset == 0;")); - assert(dm.evalAsBool("int8.get(3) == 4")); - // assert(dm.evalAsBool("int8.get(-1) == undefined;")); - // assert(dm.evalAsBool("int8.get(6) == undefined;")); - - dm.evalAsBool("var int8 = new Int8Array(rawbuf, 2);"); - assert(dm.evalAsBool("int8.length == 6;")); - assert(dm.evalAsBool("int8.byteLength == 6;")); - assert(dm.evalAsBool("int8.byteOffset == 2;")); - assert(dm.evalAsBool("int8.get(5) == 7")); - dm.evalAsBool("int8.set(0, 112)"); - assert(dm.evalAsBool("int8.get(0) == 112")); - // assert(dm.evalAsBool("int8.get(-1) == undefined;")); - // assert(dm.evalAsBool("int8.get(6) == undefined;")); - - dm.evalAsBool("var int8 = new Int8Array(rawbuf, 8);"); - assert(dm.evalAsBool("int8.length == 0;")); - - dm.evalAsBool("var int8 = new Int8Array(rawbuf, 2, 4);"); - assert(dm.evalAsBool("int8.length == 4;")); - assert(dm.evalAsBool("int8.byteLength == 4;")); - assert(dm.evalAsBool("int8.byteOffset == 2;")); - assert(dm.evalAsBool("int8.get(3) == 5")); - dm.evalAsBool("int8.set(0, 113)"); - assert(dm.evalAsBool("int8.get(0) == 113")); - // assert(dm.evalAsBool("int8.get(-1) == undefined;")); - // assert(dm.evalAsBool("int8.get(4) == undefined;")); - - } - - // TypedArray conversions - { - dm.evalAsBool("\ - function checkArray(typed_array, test) {\ - if(typed_array.length != test.length) { return false; }\ - for (var i = 0; i < test.length; i += 1) {\ - if(typed_array.get(i) != test[i]) { print(\"index \" + i + \": \" + typed_array.get(i) + \" != \" + test[i]); return false; }\ - }\ - return true;\ - }\ - "); - - dm.evalAsBool("var uint8 = new Uint8Array([1, 2, 3, 4]);"); - dm.evalAsBool("var uint16 = new Uint16Array(uint8.buffer);"); - dm.evalAsBool("var uint32 = new Uint32Array(uint8.buffer);"); - - assert(dm.evalAsBool("checkArray(uint8, [1, 2, 3, 4]);")); - dm.evalAsBool("uint16.set(0, 0xffff);"); - assert(dm.evalAsBool("checkArray(uint8, [0xff, 0xff, 3, 4]);")); - dm.evalAsBool("uint16.set(1, 0xeeee);"); - assert(dm.evalAsBool("checkArray(uint8, [0xff, 0xff, 0xee, 0xee]);")); - dm.evalAsBool("uint32.set(0, 0x11111111);"); - assert(dm.evalAsBool("uint16.get(0) == 0x1111;")); - assert(dm.evalAsBool("uint16.get(1) == 0x1111;")); - assert(dm.evalAsBool("checkArray(uint8, [0x11, 0x11, 0x11, 0x11]);")); - - } - - // TypedArray signed/unsigned conversions - { - dm.evalAsBool("var int8 = new Int8Array(1)"); - dm.evalAsBool("var uint8 = new Uint8Array(int8.buffer);"); - dm.evalAsBool("uint8.set(0, 123);"); - assert(dm.evalAsBool("int8.get(0) == 123;")); - dm.evalAsBool("uint8.set(0, 161);"); - assert(dm.evalAsBool("int8.get(0) == -95;")); - dm.evalAsBool("int8.set(0, -120);"); - assert(dm.evalAsBool("uint8.get(0) == 136;")); - dm.evalAsBool("int8.set(0, -1);"); - assert(dm.evalAsBool("uint8.get(0) == 0xff;")); - - dm.evalAsBool("var int16 = new Int16Array(1)"); - dm.evalAsBool("uint16 = new Uint16Array(int16.buffer);"); - dm.evalAsBool("uint16.set(0, 3210);"); - assert(dm.evalAsBool("int16.get(0) == 3210;")); - dm.evalAsBool("uint16.set(0, 49232);"); - assert(dm.evalAsBool("int16.get(0), -16304;")); - dm.evalAsBool("int16.set(0, -16384);"); - assert(dm.evalAsBool("uint16.get(0) == 49152;")); - dm.evalAsBool("int16.set(0, -1);"); - assert(dm.evalAsBool("uint16.get(0) == 0xffff;")); - - dm.evalAsBool("var int32 = new Int32Array(1)"); - dm.evalAsBool("var uint32 = new Uint32Array(int32.buffer)"); - dm.evalAsBool("uint32.set(0, 0x80706050)"); - assert(dm.evalAsBool("int32.get(0) == -2140118960")); - dm.evalAsBool("int32.set(0, -2023406815);"); - assert(dm.evalAsBool("uint32.get(0) == 0x87654321;")); - dm.evalAsBool("int32.set(0, -1);"); - assert(dm.evalAsBool("uint32.get(0) == 0xffffffff;")); - } - - // IEEE754 single precision parsing - { - dm.evalAsBool("\ - function fromBytes(bytes) {\ - var uint8 = new Uint8Array(bytes),\ - dv = new DataView(uint8.buffer);\ - return dv.getFloat32(0);\ - }\ - "); - -#if 0 - assert(dm.evalAsBool("fromBytes([0xff, 0xff, 0xff, 0xff]) == NaN;")); - assert(dm.evalAsBool("fromBytes([0xff, 0xc0, 0x00, 0x01]) == NaN;")); - - assert(dm.evalAsBool("fromBytes([0xff, 0xc0, 0x00, 0x00]) == NaN;")); - assert(dm.evalAsBool("fromBytes([0xff, 0xbf, 0xff, 0xff]) == NaN;")); - assert(dm.evalAsBool("fromBytes([0xff, 0x80, 0x00, 0x01]) == NaN;")); - - assert(dm.evalAsBool("fromBytes([0xff, 0x80, 0x00, 0x00]) == -Infinity;")); - - assert(dm.evalAsBool("fromBytes([0xff, 0x7f, 0xff, 0xff]) == -3.4028234663852886E+38;")); - assert(dm.evalAsBool("fromBytes([0x80, 0x80, 0x00, 0x00]) == -1.1754943508222875E-38;")); - - assert(dm.evalAsBool("fromBytes([0x80, 0x7f, 0xff, 0xff]) == -1.1754942106924411E-38;")); - assert(dm.evalAsBool("fromBytes([0x80, 0x00, 0x00, 0x01]) == -1.4012984643248170E-45;")); - - assert(dm.evalAsBool("isNegativeZero(fromBytes([0x80, 0x00, 0x00, 0x00]));")); - assert(dm.evalAsBool("isPositiveZero(fromBytes([0x00, 0x00, 0x00, 0x00]));")); - - assert(dm.evalAsBool("fromBytes([0x00, 0x00, 0x00, 0x01]) == 1.4012984643248170E-45;")); - assert(dm.evalAsBool("fromBytes([0x00, 0x7f, 0xff, 0xff]) == 1.1754942106924411E-38;")); - - assert(dm.evalAsBool("fromBytes([0x00, 0x80, 0x00, 0x00]) == 1.1754943508222875E-38;")); - assert(dm.evalAsBool("fromBytes([0x7f, 0x7f, 0xff, 0xff]) == 3.4028234663852886E+38;")); - - assert(dm.evalAsBool("fromBytes([0x7f, 0x80, 0x00, 0x00]) == +Infinity;")); - - assert(dm.evalAsBool("fromBytes([0x7f, 0x80, 0x00, 0x01]) == NaN;")); - assert(dm.evalAsBool("fromBytes([0x7f, 0xbf, 0xff, 0xff]) == NaN;")); - assert(dm.evalAsBool("fromBytes([0x7f, 0xc0, 0x00, 0x00]) == NaN;")); - assert(dm.evalAsBool("fromBytes([0x7f, 0xff, 0xff, 0xff]) == NaN;")); -#endif - - } - - // TypedArray setting - { - dm.evalAsBool("var a = new Int32Array([1, 2, 3, 4, 5]);"); - dm.evalAsBool("var b = new Int32Array(5);"); - dm.evalAsBool("b.set(a);"); - assert(dm.evalAsBool("checkArray(b, [1, 2, 3, 4, 5]);")); - - dm.evalAsBool("b.set(new Int32Array([99, 98]), 2);"); - assert(dm.evalAsBool("checkArray(b, [1, 2, 99, 98, 5]);")); - - dm.evalAsBool("b.set(new Int32Array([99, 98, 97]), 2);"); - assert(dm.evalAsBool("checkArray(b, [1, 2, 99, 98, 97]);")); - - // ab = [ 0, 1, 2, 3, 4, 5, 6, 7 ] - // a1 = [ ^, ^, ^, ^, ^, ^, ^, ^ ] - // a2 = [ ^, ^, ^, ^ ] - dm.evalAsBool("var ab = new ArrayBuffer(8);"); - dm.evalAsBool("var a1 = new Uint8Array(ab);"); - dm.evalAsBool("for (var i = 0; i < a1.length; i += 1) { a1.set(i, i); }"); - dm.evalAsBool("var a2 = new Uint8Array(ab, 4);"); - dm.evalAsBool("a1.set(a2, 2);"); - assert(dm.evalAsBool("checkArray(a1, [0, 1, 4, 5, 6, 7, 6, 7]);")); - assert(dm.evalAsBool("checkArray(a2, [6, 7, 6, 7]);")); - - } - - // TypedArray.subarray - { - dm.evalAsBool("var a = new Int32Array([1, 2, 3, 4, 5]);"); - assert(dm.evalAsBool("checkArray(a.subarray(3), [4, 5]);")); - assert(dm.evalAsBool("checkArray(a.subarray(1, 3), [2, 3]);")); - assert(dm.evalAsBool("checkArray(a.subarray(-3), [3, 4, 5]);")); - assert(dm.evalAsBool("checkArray(a.subarray(-3, -1), [3, 4]);")); -// assert(dm.evalAsBool("checkArray(a.subarray(3, 2), []);")); -// assert(dm.evalAsBool("checkArray(a.subarray(-2, -3), []);")); -// assert(dm.evalAsBool("checkArray(a.subarray(4, 1), []);")); -// assert(dm.evalAsBool("checkArray(a.subarray(-1, -4), []);")); - - } - - // DataView constructors - { - dm.evalAsBool("var d = new DataView(new ArrayBuffer(8));"); - - dm.evalAsBool("d.setUint32(0, 0x12345678);"); - assert(dm.evalAsBool("d.getUint32(0), 0x12345678;")); - - dm.evalAsBool("d.setUint32(0, 0x12345678, true);"); - assert(dm.evalAsBool("d.getUint32(0, true), 0x12345678;")); - - dm.evalAsBool("d.setUint32(0, 0x12345678, true);"); - assert(dm.evalAsBool("d.getUint32(0), 0x78563412;")); - - dm.evalAsBool("d.setUint32(0, 0x12345678);"); - assert(dm.evalAsBool("d.getUint32(0, true), 0x78563412;")); - -// assertThrows('no arguments', TypeError, function() { return new DataView(); }); -// assertThrows('non-ArrayBuffer argument', TypeError, function() { return new DataView([]); }); -// assertThrows('non-ArrayBuffer argument', TypeError, function() { return new DataView("bogus"); }); - - } - - // DataView accessors - { - dm.evalAsBool("var u = new Uint8Array(8), d = new DataView(u.buffer);"); - assert(dm.evalAsBool("checkArray(u, [0, 0, 0, 0, 0, 0, 0, 0]);")); - - dm.evalAsBool("d.setUint8(0, 255);"); - assert(dm.evalAsBool("checkArray(u, [0xff, 0, 0, 0, 0, 0, 0, 0]);")); - - dm.evalAsBool("d.setInt8(1, -1);"); - assert(dm.evalAsBool("checkArray(u, [0xff, 0xff, 0, 0, 0, 0, 0, 0]);")); - - dm.evalAsBool("d.setUint16(2, 0x1234);"); - assert(dm.evalAsBool("checkArray(u, [0xff, 0xff, 0x12, 0x34, 0, 0, 0, 0]);")); - - dm.evalAsBool("d.setInt16(4, -1);"); - assert(dm.evalAsBool("checkArray(u, [0xff, 0xff, 0x12, 0x34, 0xff, 0xff, 0, 0]);")); - - dm.evalAsBool("d.setUint32(1, 0x12345678);"); - assert(dm.evalAsBool("checkArray(u, [0xff, 0x12, 0x34, 0x56, 0x78, 0xff, 0, 0]);")); - - dm.evalAsBool("d.setInt32(4, -2023406815);"); - assert(dm.evalAsBool("checkArray(u, [0xff, 0x12, 0x34, 0x56, 0x87, 0x65, 0x43, 0x21]);")); - - dm.evalAsBool("d.setFloat32(2, 1.2E+38);"); - assert(dm.evalAsBool("checkArray(u, [0xff, 0x12, 0x7e, 0xb4, 0x8e, 0x52, 0x43, 0x21]);")); - - dm.evalAsBool("d.setFloat64(0, -1.2345678E+301);"); - assert(dm.evalAsBool("checkArray(u, [0xfe, 0x72, 0x6f, 0x51, 0x5f, 0x61, 0x77, 0xe5]);")); - - dm.evalAsBool("u.set([0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87]);"); - assert(dm.evalAsBool("d.getUint8(0) == 128;")); - assert(dm.evalAsBool("d.getInt8(1) == -127;")); - assert(dm.evalAsBool("d.getUint16(2) == 33411;")); - assert(dm.evalAsBool("d.getInt16(3) == -31868;")); - assert(dm.evalAsBool("d.getUint32(4) == 2223343239;")); - assert(dm.evalAsBool("d.getInt32(2) == -2105310075;")); - assert(dm.evalAsBool("d.getFloat32(2) == -1.932478247535851e-37;")); - assert(dm.evalAsBool("d.getFloat64(0) == -3.116851295377095e-306;")); - - } - - // DataView endian - { - dm.evalAsBool("var rawbuf = (new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7])).buffer;"); - dm.evalAsBool("var d;"); - - dm.evalAsBool("d = new DataView(rawbuf);"); - assert(dm.evalAsBool("d.byteLength == 8;")); - assert(dm.evalAsBool("d.byteOffset == 0;")); -// assertThrows('bounds for buffer', DOMException, d.getUint8.bind(d), -2); // Chrome bug for index -1? -// assertThrows('bounds for buffer', DOMException, d.getUint8.bind(d), 8); -// assertThrows('bounds for buffer', DOMException, d.setUint8.bind(d), -2, 0); -// assertThrows('bounds for buffer', DOMException, d.setUint8.bind(d), 8, 0); - - dm.evalAsBool("d = new DataView(rawbuf, 2);"); - assert(dm.evalAsBool("d.byteLength == 6;")); - assert(dm.evalAsBool("d.byteOffset == 2;")); - assert(dm.evalAsBool("d.getUint8(5) == 7;")); -// assertThrows('bounds for buffer, byteOffset', DOMException, d.getUint8.bind(d), -2); -// assertThrows('bounds for buffer, byteOffset', DOMException, d.getUint8.bind(d), 6); -// assertThrows('bounds for buffer, byteOffset', DOMException, d.setUint8.bind(d), -2, 0); -// assertThrows('bounds for buffer, byteOffset', DOMException, d.setUint8.bind(d), 6, 0); - - dm.evalAsBool("d = new DataView(rawbuf, 8);"); - assert(dm.evalAsBool("d.byteLength == 0;")); - -// assertThrows('invalid byteOffset', DOMException, function() { return new DataView(rawbuf, -1); }); -// assertThrows('invalid byteOffset', DOMException, function() { return new DataView(rawbuf, 9); }); -// assertThrows('invalid byteOffset', DOMException, function() { return new DataView(rawbuf, -1); }); - - dm.evalAsBool("d = new DataView(rawbuf, 2, 4);"); - assert(dm.evalAsBool("d.byteLength == 4;")); - assert(dm.evalAsBool("d.byteOffset == 2;")); - assert(dm.evalAsBool("d.getUint8(3) == 5;")); -// assertThrows('bounds for buffer, byteOffset, length', DOMException, function() { return d.getUint8(-2); }); -// assertThrows('bounds for buffer, byteOffset, length', DOMException, d.getUint8.bind(d), 4); -// assertThrows('bounds for buffer, byteOffset, length', DOMException, d.setUint8.bind(d), -2, 0); -// assertThrows('bounds for buffer, byteOffset, length', DOMException, d.setUint8.bind(d), 4, 0); - -// assertThrows('invalid byteOffset+length', DOMException, function() { return new DataView(rawbuf, 0, 9); }); -// assertThrows('invalid byteOffset+length', DOMException, function() { return new DataView(rawbuf, 8, 1); }); -// assertThrows('invalid byteOffset+length', DOMException, function() { return new DataView(rawbuf, 9, -1); }); - - } - - // Typed Array getters/setters - { - - dm.evalAsBool("var bytes = new Uint8Array([1, 2, 3, 4]);"); - dm.evalAsBool("var uint32s = new Uint32Array(bytes.buffer);"); - - assert(dm.evalAsBool("bytes[1] == 2;")); - dm.evalAsBool("uint32s[0] = 0xffffffff;"); - assert(dm.evalAsBool("bytes[1] == 0xff;")); - - } - - // string replacement - { - std::string content = "$"; - int rplc = dm.replaceExpressions(content); - assert(rplc == 0); - std::cout << content << std::endl; - assert(boost::equals(content, "$")); - } - - { - std::string content = "$sadf ${foo}"; - int rplc = dm.replaceExpressions(content); - assert(rplc == 1); - std::cout << content << std::endl; - assert(boost::equals(content, "$sadf 12")); - } - - { - std::string content = "${"; - int rplc = dm.replaceExpressions(content); - assert(rplc == 0); - std::cout << content << std::endl; - assert(boost::equals(content, "${")); - } - - { - std::string content = "${foo}"; - int rplc = dm.replaceExpressions(content); - assert(rplc == 1); - std::cout << content << std::endl; - assert(boost::equals(content, "12")); - } - - { - std::string content = "${bar}"; - int rplc = dm.replaceExpressions(content); - assert(rplc == 0); - std::cout << content << std::endl; - assert(boost::equals(content, "${bar}")); - } - - { - std::string content = "There are ${bar} monkeys! Really ${foo} monkeys!"; - int rplc = dm.replaceExpressions(content); - assert(rplc == 1); - std::cout << content << std::endl; - assert(boost::equals(content, "There are ${bar} monkeys! Really 12 monkeys!")); - } - - { - std::string content = "There are ${foo} monkeys! Really ${foo} monkeys!"; - int rplc = dm.replaceExpressions(content); - assert(rplc == 2); - std::cout << content << std::endl; - assert(boost::equals(content, "There are 12 monkeys! Really 12 monkeys!")); - } - - { - std::string xml = - "" - " " - " " - " " - " " - " " - " " - ""; - - TestDataModelExtension ext; - Interpreter interpreter = Interpreter::fromXML(xml, ""); - interpreter.addDataModelExtension(&ext); - - InterpreterState state; - - do { - state = interpreter.step(); - } while (state != USCXML_FINISHED && state!= USCXML_DESTROYED); - - - } -} \ No newline at end of file diff --git a/test/src/test-dirmon.cpp b/test/src/test-dirmon.cpp deleted file mode 100644 index 078c50f..0000000 --- a/test/src/test-dirmon.cpp +++ /dev/null @@ -1,83 +0,0 @@ -#include "uscxml/config.h" -#include "uscxml/Message.h" -#include "uscxml/concurrency/tinythread.h" -#include -#include -#include -#include "uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace uscxml; -using namespace boost; - -class Watcher : public DirectoryWatchMonitor { - void handleChanges(DirectoryWatch::Action action, const std::string dir, const std::string file, struct stat fileStat) { - std::cout << "Monitor on " << dir << ": " << action << " for " << file << std::endl; - } -}; - -int main(int argc, char** argv) { - - int mDescriptor = kqueue(); - - struct kevent filters[2]; - struct kevent event; - - struct timespec mTimeOut; - mTimeOut.tv_sec = 20; - mTimeOut.tv_nsec = 20000000; - - int fd1 = open("/Users/sradomski/Desktop/wrls", O_RDONLY); - int fd2 = open("/Users/sradomski/Desktop/tmp", O_RDONLY); - - EV_SET(&filters[0], fd1, EVFILT_VNODE, - EV_ADD | EV_ENABLE | EV_ONESHOT, - NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | NOTE_ATTRIB | NOTE_LINK | NOTE_RENAME | NOTE_REVOKE, - 0, NULL); - EV_SET(&filters[1], fd2, EVFILT_VNODE, - EV_ADD | EV_ENABLE | EV_ONESHOT, - NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | NOTE_ATTRIB | NOTE_LINK | NOTE_RENAME | NOTE_REVOKE, - 0, NULL); - - int nev = 0; - while(true) { - nev = kevent(mDescriptor, filters, 2, &event, 1, &mTimeOut); - if(nev == -1) - perror("kevent"); - else if (nev > 0) { - if (event.fflags & NOTE_DELETE) { - fprintf(stderr, "NOTE_DELETE "); - } - if (event.fflags & NOTE_EXTEND) { - fprintf(stderr, "NOTE_EXTEND "); - } - if (event.fflags & NOTE_WRITE) { - fprintf(stderr, "NOTE_WRITE "); - } - if (event.fflags & NOTE_ATTRIB) { - fprintf(stderr, "NOTE_ATTRIB "); - } - if (event.fflags & NOTE_RENAME) { - fprintf(stderr, "NOTE_RENAME "); - } - } - } - -// Watcher watcher; -// DirectoryWatch* dw = new DirectoryWatch("/Users/sradomski/Desktop/tmp", true); -// dw->addMonitor(&watcher); -// while(true) { -// dw->updateEntries(); -// } -} \ No newline at end of file diff --git a/test/src/test-doneevent.cpp b/test/src/test-doneevent.cpp deleted file mode 100644 index 0330512..0000000 --- a/test/src/test-doneevent.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "uscxml/Interpreter.h" - -using namespace uscxml; - -// -- Issue 56 on github -int main(int argc, char** argv) { - std::deque messageQueue; - messageQueue.push_back("a"); - messageQueue.push_back("b"); - messageQueue.push_back("c"); - messageQueue.push_back("d"); - - const char* scxmlContent = - "" - "" - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - ""; - - std::string msg; - - uscxml::Interpreter scxml = uscxml::Interpreter::fromXML(scxmlContent, ""); - scxml.addMonitor(new StateTransitionMonitor()); - - uscxml::InterpreterState state; - // assume initial stable configuration - do { - state = scxml.step(); - } while(state > 0); - - while(state != uscxml::USCXML_FINISHED && !messageQueue.empty()) { - msg = messageQueue.front(); - messageQueue.pop_front(); - - scxml.receive(uscxml::Event(msg, uscxml::Event::EXTERNAL)); - - // step to next stable configuration - do { - state = scxml.step(); - } while(state > 0); - - } - - return EXIT_SUCCESS; - -} \ No newline at end of file diff --git a/test/src/test-eventdelay.cpp b/test/src/test-eventdelay.cpp deleted file mode 100644 index ce6c923..0000000 --- a/test/src/test-eventdelay.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "uscxml/concurrency/DelayedEventQueue.h" -#include - -int eventCalled = 0; - -#include - -static void callback(void* userData, const std::string eventId) { -// std::cout << eventId << ": " << (const char*)userData << std::endl; - std::cout << eventId << std::endl << std::flush; - eventCalled++; -} - -int main(int argc, char** argv) { - - using namespace uscxml; - DelayedEventQueue* eq = new DelayedEventQueue(); - - std::cout << "Starting" << std::endl; - eq->start(); - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(10)); - -// eq->addEvent("foo", callback, 200, (void*)"event foo"); -// eq->addEvent("bar", callback, 400, (void*)"event bar"); -// eq->addEvent("bar", callback, 600, (void*)"event bar"); -// eq->cancelEvent("bar"); -// eq->addEvent("bar", callback, 300, (void*)"event bar"); -// eq->addEvent("baz", callback, 400, (void*)"event baz"); - - for (unsigned int i = 0; i <= 2000; i += 200) { -// eq->stop(); - std::stringstream ss; - ss << i; - eq->addEvent(ss.str(), callback, i, NULL); - std::cout << "Added " << i << std::endl; -// eq->start(); - } - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(2000)); - -} \ No newline at end of file diff --git a/test/src/test-expect.cpp b/test/src/test-expect.cpp deleted file mode 100644 index 8b1303e..0000000 --- a/test/src/test-expect.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include -#include - -int main(int argc, char** argv) { - int rc = 0; - - Tcl_Interp *interp = Tcl_CreateInterp(); - Tcl_FindExecutable(argv[0]); - - if (Tcl_Init(interp) == TCL_ERROR) { - fprintf(stderr,"Tcl_Init failed: %s\n",Tcl_GetStringResult (interp)); - (void) exit(1); - } - - if (Expect_Init(interp) == TCL_ERROR) { - fprintf(stderr,"Expect_Init failed: %s\n",Tcl_GetStringResult (interp)); - (void) exit(1); - } - - exp_loguser = 1; - exp_is_debugging = 1; - exp_timeout = 3; - - FILE *fp; - int ec; -// char* program = "/usr/bin/telnet localhost 80"; -// if (0 > (ec = exp_spawnl("sh","sh","-c",program,(char *)0))) -// exit(0); -// if (NULL == (fp = fdopen(ec,"r+"))) -// exit(0); -// setbuf(fp,(char *)0); - - if (0 > (ec = exp_spawnl("/usr/bin/telnet", "/usr/bin/telnet","localhost", "80", (char *)0))) - exit(0); - if (NULL == (fp = fdopen(ec,"r+"))) - exit(0); - setbuf(fp,(char *)0); - - switch (exp_fexpectl(fp, - exp_glob, "qConnected to", 1, - exp_glob, "qConnection failed", 2, - exp_end)) { - case 1: - printf("SUCCESS!"); - fprintf(fp, "%s\r", "GET /"); - - break; - case 2: - printf("FAIL!"); - break; - - default: - break; - } - exit(EXIT_SUCCESS); -} \ No newline at end of file diff --git a/test/src/test-ffmpeg.cpp b/test/src/test-ffmpeg.cpp deleted file mode 100644 index 1c99aa5..0000000 --- a/test/src/test-ffmpeg.cpp +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Copyright (c) 2003 Fabrice Bellard - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/** - * @file - * libavformat API example. - * - * Output a media file in any supported libavformat format. - * The default codecs are used. - * @example doc/examples/muxing.c - */ - -#include -#include - -extern "C" { -#include -#include -#include -#include - -#include -#include -#include -#include -#include -} -/* 5 seconds stream duration */ -#define STREAM_FRAME_RATE 25 /* 25 images/s */ -#define STREAM_PIX_FMT AV_PIX_FMT_YUV420P /* default pix_fmt */ -#define BMP_FORMAT AV_PIX_FMT_RGB24 - -static int sws_flags = SWS_BICUBIC; - -/* Add an output stream. */ -static AVStream *add_stream(AVFormatContext *oc, AVCodec **codec, - enum AVCodecID codec_id) { - AVCodecContext *c; - AVStream *st; - - /* find the encoder */ - *codec = avcodec_find_encoder(codec_id); - if (!(*codec)) { - fprintf(stderr, "Could not find encoder for '%s'\n", - avcodec_get_name(codec_id)); - exit(1); - } - - st = avformat_new_stream(oc, *codec); - if (!st) { - fprintf(stderr, "Could not allocate stream\n"); - exit(1); - } - st->id = oc->nb_streams-1; - c = st->codec; - - switch ((*codec)->type) { - case AVMEDIA_TYPE_AUDIO: - c->sample_fmt = AV_SAMPLE_FMT_FLTP; - c->bit_rate = 64000; - c->sample_rate = 44100; - c->channels = 2; - break; - - case AVMEDIA_TYPE_VIDEO: - c->codec_id = codec_id; - - c->bit_rate = 400000; - /* Resolution must be a multiple of two. */ - c->width = 352; - c->height = 288; - /* timebase: This is the fundamental unit of time (in seconds) in terms - * of which frame timestamps are represented. For fixed-fps content, - * timebase should be 1/framerate and timestamp increments should be - * identical to 1. */ - c->time_base.den = STREAM_FRAME_RATE; - c->time_base.num = 1; - c->gop_size = 12; /* emit one intra frame every twelve frames at most */ - c->pix_fmt = STREAM_PIX_FMT; - if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) { - /* just for testing, we also add B frames */ - c->max_b_frames = 2; - } - if (c->codec_id == AV_CODEC_ID_MPEG1VIDEO) { - /* Needed to avoid using macroblocks in which some coeffs overflow. - * This does not happen with normal video, it just happens here as - * the motion of the chroma plane does not match the luma plane. */ - c->mb_decision = 2; - } - break; - - default: - break; - } - - /* Some formats want stream headers to be separate. */ - if (oc->oformat->flags & AVFMT_GLOBALHEADER) - c->flags |= CODEC_FLAG_GLOBAL_HEADER; - - return st; -} - - -/**************************************************************/ -/* video output */ - -static AVFrame *frame; -static AVPicture src_picture, dst_picture; -static int frame_count; - -static void open_video(AVFormatContext *oc, AVCodec *codec, AVStream *st) { - int ret; - AVCodecContext *c = st->codec; - - /* open the codec */ - ret = avcodec_open2(c, codec, NULL); - if (ret < 0) { - fprintf(stderr, "Could not open video codec: %s\n", av_err2str(ret)); - exit(1); - } - - /* allocate and init a re-usable frame */ - frame = avcodec_alloc_frame(); - if (!frame) { - fprintf(stderr, "Could not allocate video frame\n"); - exit(1); - } - - /* Allocate the encoded raw picture. */ - ret = avpicture_alloc(&dst_picture, c->pix_fmt, c->width, c->height); - if (ret < 0) { - fprintf(stderr, "Could not allocate picture: %s\n", av_err2str(ret)); - exit(1); - } - - /* If the output format is not YUV420P, then a temporary YUV420P - * picture is needed too. It is then converted to the required - * output format. */ - if (c->pix_fmt != BMP_FORMAT) { - ret = avpicture_alloc(&src_picture, BMP_FORMAT, c->width, c->height); - if (ret < 0) { - fprintf(stderr, "Could not allocate temporary picture: %s\n", - av_err2str(ret)); - exit(1); - } - } - - /* copy data and linesize picture pointers to frame */ - *((AVPicture *)frame) = dst_picture; -} - - -/* Prepare a dummy image. */ -static void fill_rgba_image(AVPicture *pict, int frame_index, - int width, int height) { - int x, y, i; - - i = frame_index; - - std::stringstream ssFilename; - ssFilename << "/Users/sradomski/Desktop/ctrl/" << (i % 125) << ".bmp"; - - std::ifstream file(ssFilename.str().c_str()); - - file.seekg(0, std::ios::end); - size_t length = file.tellg(); - file.seekg(0, std::ios::beg); - - char* buffer = (char*)malloc(length); - file.read(buffer, length); - - uint32_t offset = 0; - offset += buffer[10] << 0; - offset += buffer[11] << 8; - offset += buffer[12] << 16; - offset += buffer[13] << 24; - offset--; - - for (y = 0; y < height; y++) { - for (x = 0; x < width; x++) { - pict->data[0][y * pict->linesize[0] + x * 3] = buffer[offset++]; - pict->data[0][y * pict->linesize[0] + x * 3 + 1] = buffer[offset++]; - pict->data[0][y * pict->linesize[0] + x * 3 + 2] = buffer[offset++]; - } - } - - free(buffer); -} - -static void write_video_frame(AVFormatContext *oc, AVStream *st) { - int ret; - static struct SwsContext *sws_ctx; - AVCodecContext *c = st->codec; - - if (c->pix_fmt != BMP_FORMAT) { - /* as we only generate a YUV420P picture, we must convert it - * to the codec pixel format if needed */ - if (!sws_ctx) { - sws_ctx = sws_getContext(c->width, c->height, BMP_FORMAT, - c->width, c->height, c->pix_fmt, - sws_flags, NULL, NULL, NULL); - if (!sws_ctx) { - fprintf(stderr, - "Could not initialize the conversion context\n"); - exit(1); - } - } - fill_rgba_image(&src_picture, frame_count, c->width, c->height); - sws_scale(sws_ctx, - (const uint8_t * const *)src_picture.data, src_picture.linesize, - 0, c->height, dst_picture.data, dst_picture.linesize); - } else { - fill_rgba_image(&dst_picture, frame_count, c->width, c->height); - } - - if (oc->oformat->flags & AVFMT_RAWPICTURE) { - /* Raw video case - directly store the picture in the packet */ - AVPacket pkt; - av_init_packet(&pkt); - - pkt.flags |= AV_PKT_FLAG_KEY; - pkt.stream_index = st->index; - pkt.data = dst_picture.data[0]; - pkt.size = sizeof(AVPicture); - - ret = av_interleaved_write_frame(oc, &pkt); - } else { - AVPacket pkt = { 0 }; - int got_packet; - av_init_packet(&pkt); - - /* encode the image */ - ret = avcodec_encode_video2(c, &pkt, frame, &got_packet); - if (ret < 0) { - fprintf(stderr, "Error encoding video frame: %s\n", av_err2str(ret)); - exit(1); - } - /* If size is zero, it means the image was buffered. */ - - if (!ret && got_packet && pkt.size) { - pkt.stream_index = st->index; - - /* Write the compressed frame to the media file. */ - ret = av_interleaved_write_frame(oc, &pkt); - } else { - ret = 0; - } - } - if (ret != 0) { - fprintf(stderr, "Error while writing video frame: %s\n", av_err2str(ret)); - exit(1); - } - frame_count++; -} - -static void close_video(AVFormatContext *oc, AVStream *st) { - avcodec_close(st->codec); - av_free(src_picture.data[0]); - av_free(dst_picture.data[0]); - av_free(frame); -} - -/**************************************************************/ -/* media file output */ - -int main(int argc, char **argv) { - const char *filename; - AVOutputFormat *fmt; - AVFormatContext *oc; - AVStream *video_st; - AVCodec *video_codec; - int ret; - - /* Initialize libavcodec, and register all codecs and formats. */ - av_register_all(); - - filename = "/Users/sradomski/Desktop/test.mpg"; - - /* allocate the output media context */ - avformat_alloc_output_context2(&oc, NULL, NULL, filename); - if (!oc) { - printf("Could not deduce output format from file extension: using MPEG.\n"); - avformat_alloc_output_context2(&oc, NULL, "mpeg", filename); - } - if (!oc) { - return 1; - } - fmt = oc->oformat; - - /* Add the audio and video streams using the default format codecs - * and initialize the codecs. */ - video_st = NULL; - - if (fmt->video_codec != AV_CODEC_ID_NONE) { - video_st = add_stream(oc, &video_codec, fmt->video_codec); - } - - /* Now that all the parameters are set, we can open the audio and - * video codecs and allocate the necessary encode buffers. */ - if (video_st) - open_video(oc, video_codec, video_st); - - /* open the output file, if needed */ - if (!(fmt->flags & AVFMT_NOFILE)) { - ret = avio_open(&oc->pb, filename, AVIO_FLAG_WRITE); - if (ret < 0) { - fprintf(stderr, "Could not open '%s': %s\n", filename, - av_err2str(ret)); - return 1; - } - } - - /* Write the stream header, if any. */ - ret = avformat_write_header(oc, NULL); - if (ret < 0) { - fprintf(stderr, "Error occurred when opening output file: %s\n", - av_err2str(ret)); - return 1; - } - - if (frame) - frame->pts = 0; - for (size_t i = 0; i < 125; i++) { - write_video_frame(oc, video_st); - frame->pts += av_rescale_q(1, video_st->codec->time_base, video_st->time_base); - } - - /* Write the trailer, if any. The trailer must be written before you - * close the CodecContexts open when you wrote the header; otherwise - * av_write_trailer() may try to use memory that was freed on - * av_codec_close(). */ - av_write_trailer(oc); - - /* Close each codec. */ - if (video_st) - close_video(oc, video_st); - - if (!(fmt->flags & AVFMT_NOFILE)) - /* Close the output file. */ - avio_close(oc->pb); - - /* free the stream */ - avformat_free_context(oc); - - return 0; -} diff --git a/test/src/test-flat-stateid.cpp b/test/src/test-flat-stateid.cpp deleted file mode 100644 index 10d83eb..0000000 --- a/test/src/test-flat-stateid.cpp +++ /dev/null @@ -1,86 +0,0 @@ -#include "uscxml/transform/FlatStateIdentifier.h" -#include "uscxml/transform/ChartToPromela.h" -#include - -int main(int argc, char** argv) { - - std::list::const_iterator listIter; - - { - std::string stateId = "active:{}"; - uscxml::FlatStateIdentifier flat1(stateId); - assert(flat1.getActive().size() == 0); - assert(flat1.getVisited().size() == 0); - assert(flat1.getHistory().size() == 0); - - uscxml::FlatStateIdentifier flat2(flat1.getActive(), flat1.getVisited(), flat1.getHistory()); - assert(flat2.getStateId() == stateId); - } - - { - std::string stateId = "active:{s1};visited:{s1,s2}"; - uscxml::FlatStateIdentifier flat1(stateId); - assert(flat1.getActive().size() == 1); - assert(flat1.getVisited().size() == 2); - assert(flat1.getHistory().size() == 0); - - uscxml::FlatStateIdentifier flat2(flat1.getActive(), flat1.getVisited(), flat1.getHistory()); - assert(flat2.getStateId() == stateId); - } - - { - - std::string stateId = "active:{s0,s1,s2};visited:{s0,s1,s2};history:{h0:{s1,s2},h1:{s2,s3}}"; - uscxml::FlatStateIdentifier flat1(stateId); - - listIter = flat1.getActive().begin(); - assert(*listIter++ == "s0"); - assert(*listIter++ == "s1"); - assert(*listIter++ == "s2"); - - listIter = flat1.getVisited().begin(); - assert(*listIter++ == "s0"); - assert(*listIter++ == "s1"); - assert(*listIter++ == "s2"); - - assert(flat1.getHistory().find("h0") != flat1.getHistory().end()); - listIter = flat1.getHistory().at("h0").begin(); - assert(*listIter++ == "s1"); - assert(*listIter++ == "s2"); - - assert(flat1.getHistory().find("h1") != flat1.getHistory().end()); - listIter = flat1.getHistory().at("h1").begin(); - assert(*listIter++ == "s2"); - assert(*listIter++ == "s3"); - - uscxml::FlatStateIdentifier flat2(flat1.getActive(), flat1.getVisited(), flat1.getHistory()); - assert(flat2.getStateId() == stateId); - } - - { - uscxml::HistoryTransitionClass histClass1("history:{h0:{s1, s4, s6}}", "history:{h0:{s0, s6}}"); - - // these will match - uscxml::HistoryTransitionClass histClass1Match1("history:{h0:{s1, s2, s3}}", "history:{h0:{s0}}"); - assert(histClass1.matches(histClass1Match1)); - - histClass1.merge(histClass1Match1); - assert(histClass1.toRemember.at("h0").find("s0") != histClass1.toRemember.at("h0").end()); - assert(histClass1.toRemember.at("h0").size() == 1); - - assert(histClass1.toForget.at("h0").find("s1") != histClass1.toForget.at("h0").end()); - assert(histClass1.toForget.at("h0").find("s2") != histClass1.toForget.at("h0").end()); - assert(histClass1.toForget.at("h0").find("s3") != histClass1.toForget.at("h0").end()); - - uscxml::HistoryTransitionClass histClass1NoMatch1("history:{h0:{s0}}", "history:{h0:{s1}}"); - assert(!histClass1.matches(histClass1NoMatch1)); - - uscxml::HistoryTransitionClass histClass1NoMatch2("history:{h0:{s1, s2, s3}}", "history:{h0:{s4}}"); - assert(!histClass1.matches(histClass1NoMatch2)); - - uscxml::HistoryTransitionClass histClass1NoMatch3("history:{h0:{s1, s2, s6}}", "history:{h0:{s0}}"); - assert(!histClass1.matches(histClass1NoMatch3)); - - } - -} \ No newline at end of file diff --git a/test/src/test-gen-c.cpp b/test/src/test-gen-c.cpp new file mode 100644 index 0000000..8f70b26 --- /dev/null +++ b/test/src/test-gen-c.cpp @@ -0,0 +1,959 @@ +#include +#include // malloc +#include // assert +#include // printf +#include // stringstream +#include // deque +#include // trim + +#define USCXML_VERBOSE + +#include "uscxml/config.h" + +#ifdef APPLE +#include +#include +#include +#endif + +#ifndef AUTOINCLUDE_TEST +#include "test-c-machine.scxml.c" +#endif + +#include "uscxml/util/URL.h" +//#include "uscxml/concurrency/Timer.h" +//#include "uscxml/dom/DOMUtils.h" +#include "uscxml/plugins/Factory.h" +//#include "uscxml/Interpreter.h" +#include "uscxml/util/UUID.h" + +#include "uscxml/interpreter/InterpreterImpl.h" +#include "uscxml/interpreter/EventQueueImpl.h" + +#ifdef BUILD_PROFILING +# include "uscxml/plugins/DataModel.h" +# endif + +#define USER_DATA(ctx) ((StateMachine*)(((uscxml_ctx*)ctx)->user_data)) + +using namespace uscxml; + +class StateMachine : public DataModelCallbacks, public DelayedEventQueueCallbacks { +public: + StateMachine(const uscxml_machine* machine) : machine(machine), parentMachine(NULL), topMostMachine(NULL), invocation(NULL) { + allMachines[sessionId] = this; + topMostMachine = this; + currentMachine = allMachines.begin(); + init(); + } + + StateMachine(StateMachine* parent, const uscxml_machine* machine, const uscxml_elem_invoke* invoke) : machine(machine), invocation(invoke) { + parentMachine = parent; + topMostMachine = parent->topMostMachine; + init(); + } + + const std::string& getName() { + return name; + } + + const std::string& getSessionId() { + return sessionId; + } + const std::map& getIOProcessors() { + return ioProcs; + } + + bool isInState(const std::string& stateId) { + for (size_t i = 0; i < ctx.machine->nr_states; i++) { + if (ctx.machine->states[i].name && + strcmp(ctx.machine->states[i].name, stateId.c_str()) == 0 && + BIT_HAS(i, ctx.config)) { + + return true; + } + } + + return false; + } + + xercesc::DOMDocument* getDocument() const { + return document; + } + const std::map& getInvokers() { + return invokers; + } + + void init() { + sessionId = UUID::getUUID(); + isFinalized = false; + + // clear and initialize machine context + memset(&ctx, 0, sizeof(uscxml_ctx)); + ctx.machine = machine; + ctx.user_data = (void*)this; + + // register callbacks with scxml context + ctx.is_matched = &isMatched; + ctx.is_true = &isTrue; + ctx.raise_done_event = &raiseDoneEvent; + ctx.invoke = &invoke; + ctx.exec_content_send = &execContentSend; + ctx.exec_content_raise = &execContentRaise; + ctx.exec_content_cancel = &execContentCancel; + ctx.exec_content_log = &execContentLog; + ctx.exec_content_assign = &execContentAssign; + ctx.exec_content_foreach_init = &execContentForeachInit; + ctx.exec_content_foreach_next = &execContentForeachNext; + ctx.exec_content_foreach_done = &execContentForeachDone; + ctx.dequeue_external = &dequeueExternal; + ctx.dequeue_internal = &dequeueInternal; + ctx.exec_content_init = &execContentInit; + ctx.exec_content_script = &execContentScript; + + name = machine->name; + + delayQueue = DelayedEventQueue(std::shared_ptr(new DelayedEventQueueImpl(this))); + dataModel = Factory::getInstance()->createDataModel(machine->datamodel, this); + + if (invocation != NULL) { + /// test 226/240 - initialize from invoke request + if (invocation->params != NULL) { + const uscxml_elem_param* param = invocation->params; + while(USCXML_ELEM_PARAM_IS_SET(param)) { + std::string identifier; + if (param->name != NULL) { + identifier = param->name; + } else if (param->location != NULL) { + identifier = param->location; + } + invokeData[identifier] = parentMachine->dataModel.getAsData(param->expr); + param++; + } + } + + if (invocation->namelist != NULL) { + const char* cPtr = invocation->namelist; + const char* aPtr = invocation->namelist; + while(cPtr) { + while (isspace(*cPtr)) + cPtr++; + aPtr = cPtr; + while(*cPtr && !isspace(*cPtr)) + cPtr++; + + if (aPtr == cPtr) + break; + + std::string identifier = std::string(aPtr, cPtr - aPtr); + invokeData[identifier] = parentMachine->dataModel.getAsData(identifier); + } + } + } + } + + virtual ~StateMachine() { + if (parentMachine != NULL) { + topMostMachine->allMachines.erase(topMostMachine->invocationIds[invocation]); + } +// finalize(); + + delayQueue.cancelAllDelayed(); + + while(eq.size() > 0) { + eq.pop_front(); + } + eq.clear(); + while(iq.size() > 0) { + iq.pop_front(); + } + iq.clear(); + } + + bool hasPendingWork() { + return (iq.size() > 0 || + eq.size() > 0 || + ctx.flags & USCXML_CTX_SPONTANEOUS || + ctx.flags == USCXML_CTX_PRISTINE || + memcmp(ctx.config, ctx.invocations, sizeof(ctx.config)) != 0); + } + + bool isDone() { + return ctx.flags & USCXML_CTX_FINISHED; + } + + void finalize() { + if (isFinalized) + return; + + delayQueue.cancelAllDelayed(); + + if (parentMachine != NULL) { + std::lock_guard lock(mutex); + + Event done; + done.invokeid = invokeId; + done.name = "done.invoke." + invokeId; + parentMachine->eq.push_back(done); + } + isFinalized = true; + } + + void reset() { + delayQueue.cancelAllDelayed(); + + while(eq.size() > 0) { + eq.pop_front(); + } + while(iq.size() > 0) { + iq.pop_front(); + } + + iq.clear(); + eq.clear(); + + init(); + + } + + int step() { + // advance current machine if there are multiple + currentMachine++; + if (currentMachine == allMachines.end()) + currentMachine = allMachines.begin(); + + StateMachine* toRun = currentMachine->second; + if (!toRun->hasPendingWork()) { + return USCXML_ERR_IDLE; + } + + // test 187 + if (toRun->isDone()) { + toRun->finalize(); + return USCXML_ERR_IDLE; + } + + state = uscxml_step(&toRun->ctx); + return state; + } + + // callbacks for scxml context + + static int isMatched(const uscxml_ctx* ctx, const uscxml_transition* t, const void* e) { + Event* event = (Event*)e; + return (nameMatch(t->event, event->name.c_str())); + } + + static int isTrue(const uscxml_ctx* ctx, const char* expr) { + try { + return USER_DATA(ctx)->dataModel.evalAsBool(expr); + } catch (Event e) { + execContentRaise(ctx, e.name.c_str()); + } + return false; + } + + static int invoke(const uscxml_ctx* ctx, const uscxml_state* s, const uscxml_elem_invoke* invocation, unsigned char uninvoke) { + std::map &allMachines = USER_DATA(ctx)->topMostMachine->allMachines; + StateMachine* topMachine = USER_DATA(ctx)->topMostMachine; + + if (uninvoke) { + if (invocation->machine != NULL) { + if (topMachine->invocationIds.find(invocation) != topMachine->invocationIds.end() && + allMachines.find(topMachine->invocationIds[invocation]) != allMachines.end()) { + + delete allMachines[topMachine->invocationIds[invocation]]; + topMachine->allMachines.erase(topMachine->invocationIds[invocation]); + topMachine->invocationIds.erase(invocation); + } + } else { + return USCXML_ERR_UNSUPPORTED; + } + } else { + // invocations + if (invocation->machine != NULL) { + // invoke a nested SCXML machine + StateMachine* invokedMachine = NULL; + try { + invokedMachine = new StateMachine(USER_DATA(ctx), invocation->machine, invocation); + } catch (Event e) { + delete invokedMachine; + return USCXML_ERR_EXEC_CONTENT; + } + if (invocation->id != NULL) { + invokedMachine->invokeId = invocation->id; + } else if (invocation->idlocation != NULL) { + // test224 + invokedMachine->invokeId = (invocation->sourcename != NULL ? std::string(invocation->sourcename) + "." : "") + UUID::getUUID(); + USER_DATA(ctx)->dataModel.assign(invocation->idlocation, Data(invokedMachine->invokeId, Data::VERBATIM)); + } else { + invokedMachine->invokeId = UUID::getUUID(); + } + allMachines[invokedMachine->invokeId] = invokedMachine; + topMachine->invocationIds[invocation] = invokedMachine->invokeId; + } else { + return USCXML_ERR_UNSUPPORTED; + } + } + return USCXML_ERR_OK; + } + + static int raiseDoneEvent(const uscxml_ctx* ctx, const uscxml_state* state, const uscxml_elem_donedata* donedata) { + Event e; + e.name = std::string("done.state.") + state->name; + + if (donedata) { + if (donedata->content != NULL) { + e.data = Data(donedata->content, Data::VERBATIM); + } else if (donedata->contentexpr != NULL) { + try { + e.data = USER_DATA(ctx)->dataModel.getAsData(donedata->contentexpr); + } catch (Event e) { + execContentRaise(ctx, e.name.c_str()); + } + } else { + try { + const uscxml_elem_param* param = donedata->params; + while (param && USCXML_ELEM_PARAM_IS_SET(param)) { + Data paramValue; + if (param->expr != NULL) { + paramValue = USER_DATA(ctx)->dataModel.evalAsData(param->expr); + } else if(param->location) { + paramValue = USER_DATA(ctx)->dataModel.evalAsData(param->location); + } + e.params.insert(std::make_pair(param->name, paramValue)); + param++; + } + } catch (Event e) { + execContentRaise(ctx, e.name.c_str()); + } + } + } + +#ifdef USCXML_VERBOSE + printf("Raising Done Event: %s\n", e.name.c_str()); +#endif + USER_DATA(ctx)->iq.push_back(e); + return USCXML_ERR_OK; + } + + static int execContentSend(const uscxml_ctx* ctx, const uscxml_elem_send* send) { + Event e; + + std::string sendid; + if (send->id != NULL) { + sendid = send->id; + } else { + sendid = UUID::getUUID(); + if (send->idlocation != NULL) { + USER_DATA(ctx)->dataModel.assign(send->idlocation, Data(sendid, Data::VERBATIM)); + } else { + e.hideSendId = true; + } + } + e.sendid = sendid; + + std::string target; + if (send->target != NULL) { + target = send->target; + } else if (send->targetexpr != NULL) { + target = USER_DATA(ctx)->dataModel.evalAsData(send->targetexpr).atom; + } else { + target = "#_external"; + } + + if (target.size() > 0 && (target[0] != '#' || target[1] != '_')) { + e.name = "error.execution"; + execContentRaise(ctx, e); + return USCXML_ERR_INVALID_TARGET; + } + + e.origintype = "http://www.w3.org/TR/scxml/#SCXMLEventProcessor"; +// e.origin = target; + + std::string type; + try { + if (send->type != NULL) { + type = send->type; + } else if (send->typeexpr != NULL) { + type = USER_DATA(ctx)->dataModel.evalAsData(send->typeexpr).atom; + } else { + type = "http://www.w3.org/TR/scxml/#SCXMLEventProcessor"; + } + } catch (Event exc) { + e.name = "error.execution"; + execContentRaise(ctx, e); + return USCXML_ERR_EXEC_CONTENT; + } + + // only one somewhat supported + if (type != "http://www.w3.org/TR/scxml/#SCXMLEventProcessor") { + e.name = "error.execution"; + execContentRaise(ctx, e); + return USCXML_ERR_INVALID_TARGET; + } + + e.origintype = type; + e.invokeid = USER_DATA(ctx)->invokeId; + + if (send->eventexpr != NULL) { + e.name = USER_DATA(ctx)->dataModel.evalAsData(send->eventexpr).atom; + } else { + e.name = send->event; + } + + try { + const uscxml_elem_param* param = send->params; + while (param && USCXML_ELEM_PARAM_IS_SET(param)) { + Data paramValue; + if (param->expr != NULL) { + paramValue = USER_DATA(ctx)->dataModel.evalAsData(param->expr); + } else if(param->location) { + paramValue = USER_DATA(ctx)->dataModel.evalAsData(param->location); + } + e.params.insert(std::make_pair(param->name, paramValue)); + param++; + } + } catch (Event e) { + execContentRaise(ctx, e.name.c_str()); + return USCXML_ERR_EXEC_CONTENT; + } + + try { + if (send->namelist != NULL) { + const char* bPtr = &send->namelist[0]; + const char* ePtr = bPtr; + while(*ePtr != '\0') { + ePtr++; + if (*ePtr == ' ' || *ePtr == '\0') { + std::string key(bPtr, ePtr - bPtr); + e.params.insert(std::make_pair(key, USER_DATA(ctx)->dataModel.evalAsData(key))); + if (*ePtr == '\0') + break; + bPtr = ++ePtr; + } + } + } + } catch (Event e) { + execContentRaise(ctx, e.name.c_str()); + return USCXML_ERR_EXEC_CONTENT; + } + + if (send->content != NULL) { + // will it parse as json? + Data d = USER_DATA(ctx)->dataModel.getAsData(send->content); + if (!d.empty()) { + e.data = d; + } else { + e.data = Data(spaceNormalize(send->content), Data::VERBATIM); + } + } + + size_t delayMs = 0; + std::string delay; + if (send->delayexpr != NULL) { + delay = USER_DATA(ctx)->dataModel.evalAsData(send->delayexpr).atom; + } else if (send->delay != NULL) { + delay = send->delay; + } + if (delay.size() > 0) { + boost::trim(delay); + + NumAttr delayAttr(delay); + if (iequals(delayAttr.unit, "ms")) { + delayMs = strTo(delayAttr.value); + } else if (iequals(delayAttr.unit, "s")) { + delayMs = strTo(delayAttr.value) * 1000; + } else if (delayAttr.unit.length() == 0) { // unit less delay is interpreted as milliseconds + delayMs = strTo(delayAttr.value); + } else { + std::cerr << "Cannot make sense of delay value " << delay << ": does not end in 's' or 'ms'"; + } + } + + if (USER_DATA(ctx)->invokeId.size() > 0) { + e.invokeid = USER_DATA(ctx)->invokeId; + } + + USER_DATA(ctx)->sendUUIDs[e.uuid] = std::make_tuple(e.sendid, target, type); + if (delayMs > 0) { + USER_DATA(ctx)->delayQueue.enqueueDelayed(e, delayMs, e.uuid); + } else { + USER_DATA(ctx)->eventReady(e, e.uuid); + } + + return USCXML_ERR_OK; + } + + static int execContentRaise(const uscxml_ctx* ctx, Event& e) { + if (boost::starts_with(e.name, "error.")) { + e.eventType = Event::PLATFORM; + } else { + e.eventType = Event::INTERNAL; + } + USER_DATA(ctx)->iq.push_back(e); + return USCXML_ERR_OK; + } + + static int execContentRaise(const uscxml_ctx* ctx, const char* event) { + Event e; + e.name = event; + return execContentRaise(ctx, e); + } + + static int execContentCancel(const uscxml_ctx* ctx, const char* sendid, const char* sendidexpr) { + std::string eventId; + if (sendid != NULL) { + eventId = sendid; + } else if (sendidexpr != NULL) { + eventId = USER_DATA(ctx)->dataModel.evalAsData(sendidexpr).atom; + } + + if (eventId.length() > 0) { + // find all events with given id + for (auto evIter = USER_DATA(ctx)->sendUUIDs.begin(); evIter != USER_DATA(ctx)->sendUUIDs.end(); evIter++) { + std::string sendid = std::get<0>(evIter->second); + if (eventId == sendid) { + USER_DATA(ctx)->delayQueue.cancelDelayed(evIter->first); + } + } + + } else { + execContentRaise(ctx, "error.execution"); + return USCXML_ERR_EXEC_CONTENT; + } + return USCXML_ERR_OK; + } + + static int execContentLog(const uscxml_ctx* ctx, const char* label, const char* expr) { + try { + if (label != NULL) { + printf("%s%s", label, (expr != NULL ? ": " : "")); + } + if (expr != NULL) { + std::string msg = USER_DATA(ctx)->dataModel.evalAsData(expr).atom; + printf("%s", msg.c_str()); + } + if (label != NULL || expr != NULL) { + printf("\n"); + } + } catch (Event e) { + execContentRaise(ctx, e.name.c_str()); + return USCXML_ERR_EXEC_CONTENT; + } + return USCXML_ERR_OK; + } + + static int execContentAssign(const uscxml_ctx* ctx, const uscxml_elem_assign* assign) { + std::string key = assign->location; + if (key == "_sessionid" || key == "_name" || key == "_ioprocessors" || key == "_invokers" || key == "_event") { + execContentRaise(ctx, "error.execution"); + return USCXML_ERR_EXEC_CONTENT; + } + + try { +// Data d = USER_DATA(ctx)->dataModel.getStringAsData(expr); + if (assign->expr != NULL) { + USER_DATA(ctx)->dataModel.assign(key, + USER_DATA(ctx)->dataModel.evalAsData(assign->expr)); + } else if (assign->content != NULL) { + Data d = Data(assign->content, Data::INTERPRETED); + USER_DATA(ctx)->dataModel.assign(key, d); + } + } catch (Event e) { + execContentRaise(ctx, e.name.c_str()); + return USCXML_ERR_EXEC_CONTENT; + } + return USCXML_ERR_OK; + } + + static int execContentForeachInit(const uscxml_ctx* ctx, const uscxml_elem_foreach* foreach) { + try { + scxml_foreach_info* feInfo = (scxml_foreach_info*)malloc(sizeof(scxml_foreach_info)); + USER_DATA(ctx)->foreachInfo[foreach] = feInfo; + + feInfo->iterations = USER_DATA(ctx)->dataModel.getLength(foreach->array); + feInfo->currIteration = 0; + } catch (Event e) { + execContentRaise(ctx, e.name.c_str()); + return USCXML_ERR_EXEC_CONTENT; + } + return USCXML_ERR_OK; + } + + static int execContentForeachNext(const uscxml_ctx* ctx, const uscxml_elem_foreach* foreach) { + try { + scxml_foreach_info* feInfo = USER_DATA(ctx)->foreachInfo[foreach]; + if (feInfo->currIteration < feInfo->iterations) { + USER_DATA(ctx)->dataModel.setForeach((foreach->item != NULL ? foreach->item : ""), + (foreach->array != NULL ? foreach->array : ""), + (foreach->index != NULL ? foreach->index : ""), + feInfo->currIteration); + feInfo->currIteration++; + return USCXML_ERR_OK; + } + } catch (Event e) { + execContentRaise(ctx, e.name.c_str()); + free(USER_DATA(ctx)->foreachInfo[foreach]); + USER_DATA(ctx)->foreachInfo.erase(foreach); + return USCXML_ERR_EXEC_CONTENT; + } + return USCXML_ERR_FOREACH_DONE; + } + + static int execContentForeachDone(const uscxml_ctx* ctx, const uscxml_elem_foreach* foreach) { + free(USER_DATA(ctx)->foreachInfo[foreach]); + USER_DATA(ctx)->foreachInfo.erase(foreach); + return USCXML_ERR_OK; + } + + static int execContentInit(const uscxml_ctx* ctx, const uscxml_elem_data* data) { + while(USCXML_ELEM_DATA_IS_SET(data)) { + if (USER_DATA(ctx)->invokeData.find(data->id) != USER_DATA(ctx)->invokeData.end()) { + // passed via param or namelist: test245 + try { + USER_DATA(ctx)->dataModel.init(data->id, USER_DATA(ctx)->invokeData[data->id]); + } catch (Event e) { + execContentRaise(ctx, e.name.c_str()); + } + } else { + Data d; + std::stringstream content; + + try { + if (data->expr != NULL) { + d = USER_DATA(ctx)->dataModel.evalAsData(data->expr); + + } else if (data->content != NULL || data->src != NULL) { + if (data->content) { + content << data->content; + } else { + URL sourceURL(data->src); + if (USER_DATA(ctx)->baseURL.size() > 0) { + sourceURL = URL::resolve(sourceURL, USER_DATA(ctx)->baseURL); + } else { + sourceURL = URL::resolveWithCWD(sourceURL); + } + content << sourceURL.getInContent(); + } + /** + * first attempt to parse as structured data, we will try + * as space normalized string literals if this fails below + */ + d = USER_DATA(ctx)->dataModel.getAsData(content.str()); + + } else { + // leave d undefined + } + // this might fail with an unquoted string literal in content + USER_DATA(ctx)->dataModel.init(data->id, d); + + } catch (Event e) { + if (content.str().size() > 0) { + try { + d = Data(escape(spaceNormalize(content.str())), Data::VERBATIM); + USER_DATA(ctx)->dataModel.init(data->id, d); + } catch (Event e) { + execContentRaise(ctx, e.name.c_str()); + } + } else { + execContentRaise(ctx, e.name.c_str()); + } + } + } + data++; + } + return USCXML_ERR_OK; + } + + static int execContentScript(const uscxml_ctx* ctx, const char* src, const char* content) { + if (content != NULL) { + USER_DATA(ctx)->dataModel.evalAsData(content); + } else if (src != NULL) { + return USCXML_ERR_UNSUPPORTED; + } + return USCXML_ERR_OK; + } + + static void* dequeueExternal(const uscxml_ctx* ctx) { + std::lock_guard lock(USER_DATA(ctx)->mutex); + if (USER_DATA(ctx)->eq.size() == 0) + return NULL; + + // set event + USER_DATA(ctx)->currEvent = USER_DATA(ctx)->eq.front(); + USER_DATA(ctx)->eq.pop_front(); + + // get an alias + const Event& e = USER_DATA(ctx)->currEvent; + USER_DATA(ctx)->dataModel.setEvent(e); + + std::map& allMachines = USER_DATA(ctx)->topMostMachine->allMachines; + if (e.invokeid.size() > 0 && allMachines.find(e.invokeid) != allMachines.end()) { + // we need to check for finalize content + StateMachine* invokedMachine = allMachines[e.invokeid]; + if (invokedMachine->invocation != NULL && invokedMachine->invocation->finalize != NULL) + invokedMachine->invocation->finalize(ctx, + invokedMachine->invocation, + &e); + } + + // auto forward event + for (std::map::iterator machIter = allMachines.begin(); machIter != allMachines.end(); machIter++) { + if (machIter->second->parentMachine != NULL && + machIter->second->parentMachine == USER_DATA(ctx) && + machIter->second->invocation->autoforward) { + std::lock_guard lock(machIter->second->mutex); + + Event e2(e); + machIter->second->eq.push_back(e2); + } + } + +#ifdef USCXML_VERBOSE + printf("Popping External Event: %s\n", e.name.c_str()); +#endif + return &USER_DATA(ctx)->currEvent; + } + + static void* dequeueInternal(const uscxml_ctx* ctx) { + if (USER_DATA(ctx)->iq.size() == 0) + return NULL; + // set event + USER_DATA(ctx)->currEvent = USER_DATA(ctx)->iq.front(); + USER_DATA(ctx)->iq.pop_front(); + + // get an alias + const Event& e = USER_DATA(ctx)->currEvent; + USER_DATA(ctx)->dataModel.setEvent(e); + +#ifdef USCXML_VERBOSE + printf("Popping Internal Event: %s\n", e.name.c_str()); +#endif + return &USER_DATA(ctx)->currEvent; + } + + void eventReady(Event& e, const std::string& eventUUID) { + std::lock_guard lock(mutex); + + //std::make_tuple(e.sendid, target, type); + + std::string sendid = std::get<0>(sendUUIDs[e.uuid]); + std::string target = std::get<1>(sendUUIDs[e.uuid]); + std::string type = std::get<2>(sendUUIDs[e.uuid]); + + if (target == "#_internal") { + e.eventType = Event::INTERNAL; +#ifdef USCXML_VERBOSE + printf("Pushing Internal Event: %s\n", e.name.c_str()); +#endif + iq.push_back(e); + } else if (target == "#_external") { + e.eventType = Event::EXTERNAL; +#ifdef USCXML_VERBOSE + printf("Pushing External Event: %s\n", e.name.c_str()); +#endif + eq.push_back(e); + } else if (target == "#_parent") { + e.eventType = Event::EXTERNAL; + if (parentMachine != NULL) { + parentMachine->eq.push_back(e); + } + // TODO: handle invalid parent + } else if (target.substr(0,8) == "#_scxml_") { + std::string sessionId = target.substr(8); + bool sessionFound = false; + for (std::map::iterator machIter = topMostMachine->allMachines.begin(); + machIter != topMostMachine->allMachines.end(); machIter++) { + if (machIter->second->sessionId == sessionId) { + e.eventType = Event::EXTERNAL; + machIter->second->eq.push_back(e); + sessionFound = true; + break; + } + } + if (!sessionFound) { + // test496 + execContentRaise(&ctx, "error.communication"); + } + } else if (target.substr(0,2) == "#_") { + e.eventType = Event::EXTERNAL; + std::string targetId = target.substr(2); + if (topMostMachine->allMachines.find(targetId) != topMostMachine->allMachines.end()) { + topMostMachine->allMachines[targetId]->eq.push_back(e); + } else { + execContentRaise(&ctx, "error.communication"); + } + } else { + assert(false); + } + monitor.notify_all(); + } + + static std::string spaceNormalize(const std::string& text) { + std::stringstream content; + std::string seperator; + + size_t start = 0; + for (size_t i = 0; i < text.size(); i++) { + if (isspace(text[i])) { + if (i > 0 && start < i) { + content << seperator << text.substr(start, i - start); + seperator = " "; + } + while(isspace(text[++i])); // skip whitespaces + start = i; + } else if (i + 1 == text.size()) { + content << seperator << text.substr(start, i + 1 - start); + } + } + return content.str(); + } + + // TODO: isolate InterpreterImpl to reduce header deps on libxml/parser.h + static bool nameMatch(const std::string& eventDescs, const std::string& eventName) { + if(eventDescs.length() == 0 || eventName.length() == 0) + return false; + + // naive case of single descriptor and exact match + if (iequals(eventDescs, eventName)) + return true; + + size_t start = 0; + std::string eventDesc; + for (size_t i = 0; i < eventDescs.size(); i++) { + if (isspace(eventDescs[i])) { + if (i > 0 && start < i - 1) { + eventDesc = eventDescs.substr(start, i - start); + } + while(isspace(eventDescs[++i])); // skip whitespaces + start = i; + } else if (i + 1 == eventDescs.size()) { + eventDesc = eventDescs.substr(start, i + 1 - start); + } + + if (eventDesc.size() > 0) { + // remove optional trailing .* for CCXML compatibility + if (eventDesc.find("*", eventDesc.size() - 1) != std::string::npos) + eventDesc = eventDesc.substr(0, eventDesc.size() - 1); + if (eventDesc.find(".", eventDesc.size() - 1) != std::string::npos) + eventDesc = eventDesc.substr(0, eventDesc.size() - 1); + + // was eventDesc the * wildcard + if (eventDesc.size() == 0) + return true; + + // eventDesc has to be a real prefix of event now and therefore shorter + if (eventDesc.size() > eventName.size()) + goto NEXT_DESC; + + // are they already equal? + if (iequals(eventDesc, eventName)) + return true; + + if (eventName.find(eventDesc) == 0) { + if (eventName.find(".", eventDesc.size()) == eventDesc.size()) + return true; + } +NEXT_DESC: + eventDesc = ""; + } + } + return false; + } + + Event currEvent; + + std::map invocationIds; + std::map allMachines; + + bool isFinalized; + int state; + uscxml_ctx ctx; + const uscxml_machine* machine; + + StateMachine* parentMachine; + StateMachine* topMostMachine; + std::map::iterator currentMachine; // next machine to advance + + std::string baseURL; + std::string sessionId; + std::string name; + + // in case we were invoked + std::string invokeId; + const uscxml_elem_invoke* invocation; + std::map invokeData; + + std::deque iq; + std::deque eq; + + DataModel dataModel; + +protected: + struct scxml_foreach_info { + size_t iterations; + size_t currIteration; + }; + + X xmlPrefix; + std::map ioProcs; + std::map invokers; + xercesc::DOMDocument* document; + + DelayedEventQueue delayQueue; + std::map > sendUUIDs; + std::map foreachInfo; + + std::condition_variable monitor; + std::mutex mutex; +}; + + +int main(int argc, char** argv) { + + int err; + size_t benchmarkRuns = 1; + const char* envBenchmarkRuns = getenv("USCXML_BENCHMARK_ITERATIONS"); + if (envBenchmarkRuns != NULL) { + benchmarkRuns = strTo(envBenchmarkRuns); + } + + size_t remainingRuns = benchmarkRuns; + + size_t microSteps = 0; + + StateMachine rootMachine(&USCXML_MACHINE); + + while(remainingRuns-- > 0) { + + microSteps = 0; + + + for (;;) { + err = rootMachine.step(); + if (rootMachine.isDone()) + break; + microSteps++; + } + microSteps++; + + assert(rootMachine.ctx.flags & USCXML_CTX_TOP_LEVEL_FINAL); + + size_t passIdx = 0; + for (size_t i = 0; i < rootMachine.ctx.machine->nr_states; i++) { + if (rootMachine.ctx.machine->states[i].name && strcmp(rootMachine.ctx.machine->states[i].name, "pass") == 0) { + passIdx = i; + break; + } + } + + if(!BIT_HAS(passIdx, rootMachine.ctx.config)) { + std::cerr << "Interpreter did not end in pass" << std::endl; + exit(EXIT_FAILURE); + } + rootMachine.reset(); + } + + return EXIT_SUCCESS; +} diff --git a/test/src/test-instant-messaging.cpp b/test/src/test-instant-messaging.cpp deleted file mode 100644 index 4375e94..0000000 --- a/test/src/test-instant-messaging.cpp +++ /dev/null @@ -1,286 +0,0 @@ -/* - * pidgin - * - * Pidgin is the legal property of its developers, whose names are too numerous - * to list here. Please refer to the COPYRIGHT file distributed with this - * source distribution. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - * - */ - -#include "purple.h" - -#include - -#include -#include -#ifndef _WIN32 -#include -#else -#include "win32/win32dep.h" -#endif - -#define CUSTOM_USER_DIRECTORY "/dev/null" -#define CUSTOM_PLUGIN_PATH "" -#define PLUGIN_SAVE_PREF "/purple/nullclient/plugins/saved" -#define UI_ID "nullclient" - -/** - * The following eventloop functions are used in both pidgin and purple-text. If your - * application uses glib mainloop, you can safely use this verbatim. - */ -#define PURPLE_GLIB_READ_COND (G_IO_IN | G_IO_HUP | G_IO_ERR) -#define PURPLE_GLIB_WRITE_COND (G_IO_OUT | G_IO_HUP | G_IO_ERR | G_IO_NVAL) - -typedef struct _PurpleGLibIOClosure { - PurpleInputFunction function; - guint result; - gpointer data; -} PurpleGLibIOClosure; - -static void purple_glib_io_destroy(gpointer data) { - g_free(data); -} - -static gboolean purple_glib_io_invoke(GIOChannel *source, GIOCondition condition, gpointer data) { - PurpleGLibIOClosure *closure = (PurpleGLibIOClosure*)data; - int purple_cond = 0; - - if (condition & PURPLE_GLIB_READ_COND) - purple_cond |= PURPLE_INPUT_READ; - if (condition & PURPLE_GLIB_WRITE_COND) - purple_cond |= PURPLE_INPUT_WRITE; - - closure->function(closure->data, g_io_channel_unix_get_fd(source), - (PurpleInputCondition)purple_cond); - - return TRUE; -} - -static guint glib_input_add(gint fd, PurpleInputCondition condition, PurpleInputFunction function, - gpointer data) { - PurpleGLibIOClosure *closure = g_new0(PurpleGLibIOClosure, 1); - GIOChannel *channel; - int cond = 0; - - closure->function = function; - closure->data = data; - - if (condition & PURPLE_INPUT_READ) - cond |= PURPLE_GLIB_READ_COND; - if (condition & PURPLE_INPUT_WRITE) - cond |= PURPLE_GLIB_WRITE_COND; - -#if defined _WIN32 && !defined WINPIDGIN_USE_GLIB_IO_CHANNEL - channel = wpurple_g_io_channel_win32_new_socket(fd); -#else - channel = g_io_channel_unix_new(fd); -#endif - closure->result = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, (GIOCondition)cond, - purple_glib_io_invoke, closure, purple_glib_io_destroy); - - g_io_channel_unref(channel); - return closure->result; -} - -static PurpleEventLoopUiOps glib_eventloops = { - g_timeout_add, - g_source_remove, - glib_input_add, - g_source_remove, - NULL, - g_timeout_add_seconds, - - /* padding */ - NULL, - NULL, - NULL -}; -/*** End of the eventloop functions. ***/ - -/*** Conversation uiops ***/ -static void -null_write_conv(PurpleConversation *conv, const char *who, const char *alias, - const char *message, PurpleMessageFlags flags, time_t mtime) { - const char *name; - if (alias && *alias) - name = alias; - else if (who && *who) - name = who; - else - name = NULL; - - printf("(%s) %s %s: %s\n", purple_conversation_get_name(conv), - purple_utf8_strftime("(%H:%M:%S)", localtime(&mtime)), - name, message); -} - -static PurpleConversationUiOps null_conv_uiops = { - NULL, /* create_conversation */ - NULL, /* destroy_conversation */ - NULL, /* write_chat */ - NULL, /* write_im */ - null_write_conv, /* write_conv */ - NULL, /* chat_add_users */ - NULL, /* chat_rename_user */ - NULL, /* chat_remove_users */ - NULL, /* chat_update_user */ - NULL, /* present */ - NULL, /* has_focus */ - NULL, /* custom_smiley_add */ - NULL, /* custom_smiley_write */ - NULL, /* custom_smiley_close */ - NULL, /* send_confirm */ - NULL, - NULL, - NULL, - NULL -}; - -static void -null_ui_init(void) { - /** - * This should initialize the UI components for all the modules. Here we - * just initialize the UI for conversations. - */ - purple_conversations_set_ui_ops(&null_conv_uiops); -} - -static PurpleCoreUiOps null_core_uiops = { - NULL, - NULL, - null_ui_init, - NULL, - - /* padding */ - NULL, - NULL, - NULL, - NULL -}; - -static void -init_libpurple(void) { - /* Set a custom user directory (optional) */ - purple_util_set_user_dir(CUSTOM_USER_DIRECTORY); - - /* We do not want any debugging for now to keep the noise to a minimum. */ - purple_debug_set_enabled(FALSE); - - /* Set the core-uiops, which is used to - * - initialize the ui specific preferences. - * - initialize the debug ui. - * - initialize the ui components for all the modules. - * - uninitialize the ui components for all the modules when the core terminates. - */ - purple_core_set_ui_ops(&null_core_uiops); - - /* Set the uiops for the eventloop. If your client is glib-based, you can safely - * copy this verbatim. */ - purple_eventloop_set_ui_ops(&glib_eventloops); - - /* Set path to search for plugins. The core (libpurple) takes care of loading the - * core-plugins, which includes the protocol-plugins. So it is not essential to add - * any path here, but it might be desired, especially for ui-specific plugins. */ - purple_plugins_add_search_path(CUSTOM_PLUGIN_PATH); - - /* Now that all the essential stuff has been set, let's try to init the core. It's - * necessary to provide a non-NULL name for the current ui to the core. This name - * is used by stuff that depends on this ui, for example the ui-specific plugins. */ - if (!purple_core_init(UI_ID)) { - /* Initializing the core failed. Terminate. */ - fprintf(stderr, - "libpurple initialization failed. Dumping core.\n" - "Please report this!\n"); - abort(); - } - - /* Load the preferences. */ - purple_prefs_load(); - - /* Load the desired plugins. The client should save the list of loaded plugins in - * the preferences using purple_plugins_save_loaded(PLUGIN_SAVE_PREF) */ - purple_plugins_load_saved(PLUGIN_SAVE_PREF); -} - -static void -signed_on(PurpleConnection *gc, gpointer null) { - PurpleAccount *account = purple_connection_get_account(gc); - printf("Account connected: %s %s\n", purple_account_get_username(account), purple_account_get_protocol_id(account)); -} - -static void -buddy_signed_on(PurpleBuddy *buddy) { - PurpleConnection *gc = purple_account_get_connection(purple_buddy_get_account(buddy)); - PurplePlugin* prpl = purple_connection_get_prpl(gc); - PurplePluginProtocolInfo* prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); - - if (prpl_info->send_file && (prpl_info->can_receive_file && prpl_info->can_receive_file(gc, "sradomski@localhost"))) { - prpl_info->send_file(gc, "sradomski@localhost", "/Users/sradomski/Documents/W3C Standards.pdf"); - } - -} - -static void -connect_to_signals_for_demonstration_purposes_only(void) { - static int handle; - purple_signal_connect(purple_connections_get_handle(), "signed-on", &handle, - PURPLE_CALLBACK(signed_on), NULL); - purple_signal_connect(purple_blist_get_handle(), "buddy-signed-on", &handle, - PURPLE_CALLBACK(buddy_signed_on), NULL); -} - -int main(int argc, char *argv[]) { - GList *iter; - GMainLoop *loop = g_main_loop_new(NULL, FALSE); - PurpleAccount *account; - PurpleSavedStatus *status; - -#ifndef _WIN32 - /* libpurple's built-in DNS resolution forks processes to perform - * blocking lookups without blocking the main process. It does not - * handle SIGCHLD itself, so if the UI does not you quickly get an army - * of zombie subprocesses marching around. - */ - signal(SIGCHLD, SIG_IGN); -#endif - - init_libpurple(); - - printf("libpurple initialized.\n"); - - iter = purple_plugins_get_protocols(); - - /* Create the account */ - account = purple_account_new("uscxml@localhost", "prpl-jabber"); - - /* Get the password for the account */ - purple_account_set_password(account, "password"); - - /* It's necessary to enable the account first. */ - purple_account_set_enabled(account, UI_ID, TRUE); - - /* Now, to connect the account(s), create a status and activate it. */ - status = purple_savedstatus_new(NULL, PURPLE_STATUS_AVAILABLE); - purple_savedstatus_activate(status); - - connect_to_signals_for_demonstration_purposes_only(); - - g_main_loop_run(loop); - - return 0; -} - diff --git a/test/src/test-issue-reporting.cpp b/test/src/test-issue-reporting.cpp deleted file mode 100644 index 84cc096..0000000 --- a/test/src/test-issue-reporting.cpp +++ /dev/null @@ -1,820 +0,0 @@ -#include "uscxml/config.h" -#include "uscxml/Interpreter.h" -#include - -using namespace uscxml; - -std::set issueLocationsForXML(const std::string xml) { - Interpreter interpreter = Interpreter::fromXML(xml, ""); - - // common xmlns and version requirement on scxml attribute - interpreter.getDocument().getDocumentElement().setAttribute("xmlns", "http://www.w3.org/2005/07/scxml"); - interpreter.getDocument().getDocumentElement().setAttribute("version", "1.0"); - - std::list issues = interpreter.validate(); - - std::set issueLocations; - - for (std::list::iterator issueIter = issues.begin(); issueIter != issues.end(); issueIter++) { - std::cout << *issueIter << std::endl; - issueLocations.insert(issueIter->xPath); - } - return issueLocations; -} - -size_t runtimeIssues; -class IssueMonitor : public InterpreterMonitor { -public: - IssueMonitor() { - runtimeIssues = 0; - } - void reportIssue(Interpreter interpreter, const InterpreterIssue& issue) { - runtimeIssues++; - } -}; - -int main(int argc, char** argv) { - - google::InitGoogleLogging(argv[0]); - google::LogToStderr(); - - int iterations = 1; - - while(iterations--) { - - if (1) { - // Potential endless loop - - const char* xml = - "" - " " - " " - " " - " 0\" />" - " " - " " - " " - ""; - - IssueMonitor monitor; - Interpreter interpreter = Interpreter::fromXML(xml, ""); - interpreter.addMonitor(&monitor); - interpreter.interpret(); - - // first reiteration is not counted as it might be valid when raising internal errors - assert(runtimeIssues == 3); - } - - if (1) { - // Unreachable states 1 - - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"bar\"]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Invalid parents - const char* xml = - "" - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("/scxml[1]/onentry[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (0) { - // State has no 'id' attribute - // *** This is not actually an error! *** - const char* xml = - "" - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("/scxml[1]/state[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Duplicate state with id - const char* xml = - "" - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Transition has non-existant target state - - const char* xml = - "" - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/transition[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Useless history 1 - - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//history[@id=\"bar\"]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Useless history 2 - - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//history[@id=\"bar\"]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // No legal completion - - const char* xml = - "" - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]") != issueLocations.end()); - assert(issueLocations.find("//state[@id=\"start\"]/transition[1]") != issueLocations.end()); - assert(issueLocations.size() == 2); - } - - if (1) { - // attribute constraints - - { - // initial attribute and child - const char* xml = - "" - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - { - // initial attribute with atomic state - const char* xml = - "" - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - { - // initial child with atomic state - const char* xml = - "" - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]") != issueLocations.end()); - assert(issueLocations.size() == 2); // also invalid non-child target state in initial - } - - // combinations of namelist, content and param - { - // send with content and namelist, not allowed - const char* xml = - "" - " " - " " - " " - " Foo!" - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/send[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - { - // send with content and params, not allowed - const char* xml = - "" - " " - " " - " " - " " - " Foo!" - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/send[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - { - // send with params and namelist, perfectly acceptable - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.size() == 0); - } - - { - // invoke with content and src, not allowed - const char* xml = - "" - " " - " " - " Foo!" - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/invoke[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - { - // invoke with namelist and param, not allowed - const char* xml = - "" - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/invoke[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - { - // invoke with param and content, perfectly acceptable - const char* xml = - "" - " " - " " - " " - " Foo!" - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.size() == 0); - } - - { - // invoke with namelist and content, perfectly acceptable - const char* xml = - "" - " " - " " - " Foo!" - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.size() == 0); - } - - { - // donedata with content and param, not allowed - const char* xml = - "" - " " - " " - " " - " Foo!" - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/donedata[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - - } - - - if (1) { - // Transition can never be optimally enabled (conditionless, eventless) - - const char* xml = - "" - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/transition[2]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Transition can never be optimally enabled (conditionless, more events) - - const char* xml = - "" - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/transition[2]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - - if (1) { - // Initial attribute has invalid target state - - const char* xml = - "" - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("/scxml[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Initial attribute with target outside of children - - const char* xml = - "" - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Initial transition with target outside of children - - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/initial[1]/transition[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Initial history transition with target outside of children - - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//history[@id=\"bar\"]/transition[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Initial transition with target outside of children - - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/initial[1]/transition[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Initial transition with event - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/initial[1]/transition[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Initial transition with condition - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/initial[1]/transition[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Initial with multiple transitions - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/initial[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Initial with no transitions - const char* xml = - "" - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/initial[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // History transition with event - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//history[@id=\"bar\"]/transition[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // History transition with condition - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//history[@id=\"bar\"]/transition[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Send to unknown IO Processor - - const char* xml = - "" - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/send[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // SCXML document requires unknown datamodel - - const char* xml = - "" - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("/scxml[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Unknown executable content element - - const char* xml = - "" - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/nonexistant[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Syntax error in script - - const char* xml = - "" - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("/scxml[1]/script[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Syntax error in cond attribute - - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/transition[1]") != issueLocations.end()); - assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/if[1]") != issueLocations.end()); - assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/if[1]/elseif[1]") != issueLocations.end()); - assert(issueLocations.size() == 3); - } - - if (1) { - // Syntax error in expr attribute - - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/log[1]") != issueLocations.end()); - assert(issueLocations.find("//data[@id=\"foo\"]") != issueLocations.end()); - assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/assign[1]") != issueLocations.end()); - assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/send[1]/param[1]") != issueLocations.end()); - assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/send[2]/content[1]") != issueLocations.end()); - assert(issueLocations.size() == 5); - } - - if (1) { - // Syntax error with foreach - - const char* xml = - "" - " " - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/foreach[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Syntax error with send - - const char* xml = - "" - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/send[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Syntax error with invoke - - const char* xml = - "" - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/invoke[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - if (1) { - // Syntax error with cancel - - const char* xml = - "" - " " - " " - " " - " " - " " - ""; - - std::set issueLocations = issueLocationsForXML(xml); - assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/cancel[1]") != issueLocations.end()); - assert(issueLocations.size() == 1); - } - - - } - - return EXIT_SUCCESS; -} \ No newline at end of file diff --git a/test/src/test-lifecycle.cpp b/test/src/test-lifecycle.cpp index e61d6db..528d903 100644 --- a/test/src/test-lifecycle.cpp +++ b/test/src/test-lifecycle.cpp @@ -1,21 +1,10 @@ #include "uscxml/config.h" #include "uscxml/Interpreter.h" -#include +#include "uscxml/interpreter/InterpreterMonitor.h" +#include -#include "uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.h" #include - -#ifdef HAS_SIGNAL_H -#include -#endif - -#ifdef HAS_EXECINFO_H -#include -#endif - -#ifdef HAS_DLFCN_H -#include -#endif +#include #ifdef _WIN32 #include "XGetopt.h" @@ -23,74 +12,9 @@ int startedAt; int lastTransitionAt; -bool testIssue56(); - -#ifdef HAS_EXECINFO_H -void printBacktrace(void** array, int size) { - char** messages = backtrace_symbols(array, size); - for (size_t i = 0; i < size && messages != NULL; ++i) { - std::cerr << "\t" << messages[i] << std::endl; - } - std::cerr << std::endl; - free(messages); -} - -#ifdef HAS_DLFCN_H -// see https://gist.github.com/nkuln/2020860 -typedef void (*cxa_throw_type)(void *, void *, void (*) (void *)); -cxa_throw_type orig_cxa_throw = 0; - -void load_orig_throw_code() { - orig_cxa_throw = (cxa_throw_type) dlsym(RTLD_NEXT, "__cxa_throw"); -} - -extern "C" -CXA_THROW_SIGNATURE { - std::cerr << __FUNCTION__ << " will throw exception from " << std::endl; - if (orig_cxa_throw == 0) - load_orig_throw_code(); - - void *array[50]; - size_t size = backtrace(array, 50); - printBacktrace(array, size); - orig_cxa_throw(thrown_exception, pvtinfo, dest); -} -#endif -#endif - - -// see http://stackoverflow.com/questions/2443135/how-do-i-find-where-an-exception-was-thrown-in-c -void customTerminate() { - static bool tried_throw = false; - try { - // try once to re-throw currently active exception - if (!tried_throw) { - throw; - tried_throw = true; - } else { - tried_throw = false; - }; - } catch (const std::exception &e) { - std::cerr << __FUNCTION__ << " caught unhandled exception. what(): " - << e.what() << std::endl; - } catch (const uscxml::Event &e) { - std::cerr << __FUNCTION__ << " caught unhandled exception. Event: " - << e << std::endl; - } catch (...) { - std::cerr << __FUNCTION__ << " caught unknown/unhandled exception." - << std::endl; - } - -#ifdef HAS_EXECINFO_H - void * array[50]; - int size = backtrace(array, 50); - - printBacktrace(array, size); -#endif - abort(); -} using namespace uscxml; +using namespace xercesc; enum CallbackType { USCXML_BEFOREPROCESSINGEVENT, @@ -124,73 +48,67 @@ std::list callBackSeq; class SequenceCheckingMonitor : public InterpreterMonitor { - virtual void beforeProcessingEvent(Interpreter interpreter, const Event& event) { + virtual void beforeProcessingEvent(const Event& event) { CHECK_CALLBACK_TYPE(USCXML_BEFOREPROCESSINGEVENT); } - virtual void beforeMicroStep(Interpreter interpreter) { + virtual void beforeMicroStep() { CHECK_CALLBACK_TYPE(USCXML_BEFOREMICROSTEP); } - virtual void beforeExitingState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - if (!moreComing) - CHECK_CALLBACK_TYPE(USCXML_BEFOREEXITINGSTATE); + virtual void beforeExitingState(const xercesc::DOMElement* state) { + CHECK_CALLBACK_TYPE(USCXML_BEFOREEXITINGSTATE); } - virtual void afterExitingState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - if (!moreComing) - CHECK_CALLBACK_TYPE(USCXML_AFTEREXITINGSTATE); + virtual void afterExitingState(const xercesc::DOMElement* state) { + CHECK_CALLBACK_TYPE(USCXML_AFTEREXITINGSTATE); } - virtual void beforeExecutingContent(Interpreter interpreter, const Arabica::DOM::Element& element) { + virtual void beforeExecutingContent(const xercesc::DOMElement* element) { CHECK_CALLBACK_TYPE(USCXML_BEFOREEXECUTINGCONTENT); } - virtual void afterExecutingContent(Interpreter interpreter, const Arabica::DOM::Element& element) { + virtual void afterExecutingContent(const xercesc::DOMElement* element) { CHECK_CALLBACK_TYPE(USCXML_AFTEREXECUTINGCONTENT); } - virtual void beforeUninvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) { + virtual void beforeUninvoking(const xercesc::DOMElement* invokeElem, const std::string& invokeid) { CHECK_CALLBACK_TYPE(USCXML_BEFOREUNINVOKING); } - virtual void afterUninvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) { + virtual void afterUninvoking(const xercesc::DOMElement* invokeElem, const std::string& invokeid) { CHECK_CALLBACK_TYPE(USCXML_AFTERUNINVOKING); } - virtual void beforeTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing) { - if (!moreComing) - CHECK_CALLBACK_TYPE(USCXML_BEFORETAKINGTRANSITION); + virtual void beforeTakingTransition(const xercesc::DOMElement* transition) { + CHECK_CALLBACK_TYPE(USCXML_BEFORETAKINGTRANSITION); } - virtual void afterTakingTransition(Interpreter interpreter, const Arabica::DOM::Element& transition, bool moreComing) { - if (!moreComing) - CHECK_CALLBACK_TYPE(USCXML_AFTERTAKINGTRANSITION); + virtual void afterTakingTransition(const xercesc::DOMElement* transition) { + CHECK_CALLBACK_TYPE(USCXML_AFTERTAKINGTRANSITION); } - virtual void beforeEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - if (!moreComing) - CHECK_CALLBACK_TYPE(USCXML_BEFOREENTERINGSTATE); + virtual void beforeEnteringState(const xercesc::DOMElement* state) { + CHECK_CALLBACK_TYPE(USCXML_BEFOREENTERINGSTATE); } - virtual void afterEnteringState(Interpreter interpreter, const Arabica::DOM::Element& state, bool moreComing) { - if (!moreComing) - CHECK_CALLBACK_TYPE(USCXML_AFTERENTERINGSTATE); + virtual void afterEnteringState(const xercesc::DOMElement* state) { + CHECK_CALLBACK_TYPE(USCXML_AFTERENTERINGSTATE); } - virtual void beforeInvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) { + virtual void beforeInvoking(const xercesc::DOMElement* invokeElem, const std::string& invokeid) { CHECK_CALLBACK_TYPE(USCXML_BEFOREINVOKING); } - virtual void afterInvoking(Interpreter interpreter, const Arabica::DOM::Element& invokeElem, const std::string& invokeid) { + virtual void afterInvoking(const xercesc::DOMElement* invokeElem, const std::string& invokeid) { CHECK_CALLBACK_TYPE(USCXML_AFTERINVOKING); } - virtual void afterMicroStep(Interpreter interpreter) { + virtual void afterMicroStep() { CHECK_CALLBACK_TYPE(USCXML_AFTERMICROSTEP); } - virtual void onStableConfiguration(Interpreter interpreter) { + virtual void onStableConfiguration() { CHECK_CALLBACK_TYPE(USCXML_ONSTABLECONFIGURATION); } - virtual void beforeCompletion(Interpreter interpreter) { + virtual void beforeCompletion() { CHECK_CALLBACK_TYPE(USCXML_BEFORECOMPLETION); } - virtual void afterCompletion(Interpreter interpreter) { + virtual void afterCompletion() { CHECK_CALLBACK_TYPE(USCXML_AFTERCOMPLETION); } @@ -199,16 +117,7 @@ class SequenceCheckingMonitor : public InterpreterMonitor { int main(int argc, char** argv) { - std::set_terminate(customTerminate); - -#if defined(HAS_SIGNAL_H) && !defined(WIN32) - signal(SIGPIPE, SIG_IGN); -#endif - - google::InitGoogleLogging(argv[0]); - google::LogToStderr(); - - SequenceCheckingMonitor* mon = new SequenceCheckingMonitor(); + SequenceCheckingMonitor mon; int iterations = 1; @@ -230,7 +139,7 @@ int main(int argc, char** argv) { try { const char* xml = ""; Interpreter interpreter = Interpreter::fromXML(xml, ""); - interpreter.addMonitor(mon); + interpreter.setMonitor(&mon); assert(interpreter.getState() == USCXML_INSTANTIATED); interpreter.step(); assert(false); @@ -250,7 +159,7 @@ int main(int argc, char** argv) { " " ""; Interpreter interpreter = Interpreter::fromXML(xml, ""); - interpreter.addMonitor(mon); + interpreter.setMonitor(&mon); assert(interpreter.getState() == USCXML_INSTANTIATED); interpreter.step(); assert(false); @@ -273,39 +182,42 @@ int main(int argc, char** argv) { ""; Interpreter interpreter = Interpreter::fromXML(xml, ""); - interpreter.addMonitor(mon); + interpreter.setMonitor(&mon); - callBackSeq.push_back(USCXML_BEFORETAKINGTRANSITION); - callBackSeq.push_back(USCXML_AFTERTAKINGTRANSITION); - callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); + callBackSeq.push_back(USCXML_BEFOREMICROSTEP); + callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); // scxml callBackSeq.push_back(USCXML_AFTERENTERINGSTATE); + callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); // start + callBackSeq.push_back(USCXML_AFTERENTERINGSTATE); + callBackSeq.push_back(USCXML_AFTERMICROSTEP); callBackSeq.push_back(USCXML_BEFOREMICROSTEP); - callBackSeq.push_back(USCXML_BEFOREEXITINGSTATE); + callBackSeq.push_back(USCXML_BEFOREEXITINGSTATE); // start callBackSeq.push_back(USCXML_AFTEREXITINGSTATE); callBackSeq.push_back(USCXML_BEFORETAKINGTRANSITION); callBackSeq.push_back(USCXML_AFTERTAKINGTRANSITION); - callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); + callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); // s2 callBackSeq.push_back(USCXML_AFTERENTERINGSTATE); callBackSeq.push_back(USCXML_AFTERMICROSTEP); callBackSeq.push_back(USCXML_BEFOREMICROSTEP); - callBackSeq.push_back(USCXML_BEFOREEXITINGSTATE); + callBackSeq.push_back(USCXML_BEFOREEXITINGSTATE); // s2 callBackSeq.push_back(USCXML_AFTEREXITINGSTATE); callBackSeq.push_back(USCXML_BEFORETAKINGTRANSITION); callBackSeq.push_back(USCXML_AFTERTAKINGTRANSITION); - callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); + callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); // final callBackSeq.push_back(USCXML_AFTERENTERINGSTATE); callBackSeq.push_back(USCXML_AFTERMICROSTEP); - callBackSeq.push_back(USCXML_BEFORECOMPLETION); + callBackSeq.push_back(USCXML_BEFORECOMPLETION); // interpreter is finalizing callBackSeq.push_back(USCXML_AFTERCOMPLETION); assert(interpreter.getState() == USCXML_INSTANTIATED); assert(interpreter.step() == USCXML_INITIALIZED); - assert(interpreter.step() == USCXML_MICROSTEPPED); - assert(interpreter.step() == USCXML_MICROSTEPPED); - assert(interpreter.step() == USCXML_FINISHED); + assert(interpreter.step() == USCXML_MICROSTEPPED); // initial config + assert(interpreter.step() == USCXML_MICROSTEPPED); // s2 + assert(interpreter.step() == USCXML_MICROSTEPPED); // done + assert(interpreter.step() == USCXML_FINISHED); // cleaned up assert(callBackSeq.empty()); } @@ -320,19 +232,21 @@ int main(int argc, char** argv) { ""; Interpreter interpreter = Interpreter::fromXML(xml, ""); - interpreter.addMonitor(mon); + interpreter.setMonitor(&mon); - callBackSeq.push_back(USCXML_BEFORETAKINGTRANSITION); - callBackSeq.push_back(USCXML_AFTERTAKINGTRANSITION); - callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); + callBackSeq.push_back(USCXML_BEFOREMICROSTEP); + callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); // scxml + callBackSeq.push_back(USCXML_AFTERENTERINGSTATE); + callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); // start callBackSeq.push_back(USCXML_AFTERENTERINGSTATE); + callBackSeq.push_back(USCXML_AFTERMICROSTEP); callBackSeq.push_back(USCXML_BEFOREMICROSTEP); - callBackSeq.push_back(USCXML_BEFOREEXITINGSTATE); + callBackSeq.push_back(USCXML_BEFOREEXITINGSTATE); // start callBackSeq.push_back(USCXML_AFTEREXITINGSTATE); callBackSeq.push_back(USCXML_BEFORETAKINGTRANSITION); callBackSeq.push_back(USCXML_AFTERTAKINGTRANSITION); - callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); + callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); // done callBackSeq.push_back(USCXML_AFTERENTERINGSTATE); callBackSeq.push_back(USCXML_AFTERMICROSTEP); @@ -342,20 +256,24 @@ int main(int argc, char** argv) { assert(interpreter.getState() == USCXML_INSTANTIATED); assert(interpreter.step() == USCXML_INITIALIZED); assert(interpreter.step() == USCXML_MICROSTEPPED); + assert(interpreter.step() == USCXML_MICROSTEPPED); assert(interpreter.step() == USCXML_FINISHED); + assert(callBackSeq.empty()); interpreter.reset(); - callBackSeq.push_back(USCXML_BEFORETAKINGTRANSITION); - callBackSeq.push_back(USCXML_AFTERTAKINGTRANSITION); - callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); + callBackSeq.push_back(USCXML_BEFOREMICROSTEP); + callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); // scxml + callBackSeq.push_back(USCXML_AFTERENTERINGSTATE); + callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); // start callBackSeq.push_back(USCXML_AFTERENTERINGSTATE); + callBackSeq.push_back(USCXML_AFTERMICROSTEP); callBackSeq.push_back(USCXML_BEFOREMICROSTEP); - callBackSeq.push_back(USCXML_BEFOREEXITINGSTATE); + callBackSeq.push_back(USCXML_BEFOREEXITINGSTATE); // start callBackSeq.push_back(USCXML_AFTEREXITINGSTATE); callBackSeq.push_back(USCXML_BEFORETAKINGTRANSITION); callBackSeq.push_back(USCXML_AFTERTAKINGTRANSITION); - callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); + callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); // done callBackSeq.push_back(USCXML_AFTERENTERINGSTATE); callBackSeq.push_back(USCXML_AFTERMICROSTEP); @@ -365,6 +283,7 @@ int main(int argc, char** argv) { assert(interpreter.getState() == USCXML_INSTANTIATED); assert(interpreter.step() == USCXML_INITIALIZED); assert(interpreter.step() == USCXML_MICROSTEPPED); + assert(interpreter.step() == USCXML_MICROSTEPPED); assert(interpreter.step() == USCXML_FINISHED); } @@ -385,17 +304,19 @@ int main(int argc, char** argv) { ""; Interpreter interpreter = Interpreter::fromXML(xml, ""); - interpreter.addMonitor(mon); - - callBackSeq.push_back(USCXML_BEFORETAKINGTRANSITION); - callBackSeq.push_back(USCXML_AFTERTAKINGTRANSITION); - callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); - callBackSeq.push_back(USCXML_BEFOREEXECUTINGCONTENT); + interpreter.setMonitor(&mon); + callBackSeq.push_back(USCXML_BEFOREMICROSTEP); + callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); // scxml + callBackSeq.push_back(USCXML_AFTERENTERINGSTATE); + callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); // start + callBackSeq.push_back(USCXML_BEFOREEXECUTINGCONTENT); // send callBackSeq.push_back(USCXML_AFTEREXECUTINGCONTENT); callBackSeq.push_back(USCXML_AFTERENTERINGSTATE); - callBackSeq.push_back(USCXML_ONSTABLECONFIGURATION); + callBackSeq.push_back(USCXML_AFTERMICROSTEP); + callBackSeq.push_back(USCXML_ONSTABLECONFIGURATION); callBackSeq.push_back(USCXML_BEFOREPROCESSINGEVENT); + callBackSeq.push_back(USCXML_BEFOREMICROSTEP); callBackSeq.push_back(USCXML_BEFOREEXITINGSTATE); callBackSeq.push_back(USCXML_AFTEREXITINGSTATE); @@ -419,8 +340,10 @@ int main(int argc, char** argv) { assert(interpreter.getState() == USCXML_INSTANTIATED); assert(interpreter.step() == USCXML_INITIALIZED); + assert(interpreter.step() == USCXML_MICROSTEPPED); + assert(interpreter.step() == USCXML_MACROSTEPPED); assert(interpreter.step() == USCXML_IDLE); - assert(interpreter.step(true) == USCXML_MACROSTEPPED); + assert(interpreter.step(true) == USCXML_MICROSTEPPED); assert(interpreter.step() == USCXML_MICROSTEPPED); assert(interpreter.step() == USCXML_FINISHED); } diff --git a/test/src/test-misc.cpp b/test/src/test-misc.cpp deleted file mode 100644 index 504b6a6..0000000 --- a/test/src/test-misc.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "uscxml/config.h" -#include "uscxml/Common.h" -#include "uscxml/concurrency/Timer.h" -#include "uscxml/concurrency/tinythread.h" - -#include - -using namespace uscxml; - -Timer t1; - -bool testTimers() { - { - Measurement m(&t1); - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(1000)); - } - std::cout << t1.elapsed << std::endl; - return true; -} - -int main(int argc, char** argv) { - testTimers(); - return 0; -} \ No newline at end of file diff --git a/test/src/test-mmi.cpp b/test/src/test-mmi.cpp deleted file mode 100644 index 52deeef..0000000 --- a/test/src/test-mmi.cpp +++ /dev/null @@ -1,775 +0,0 @@ -#include -#include - -#include "uscxml/messages/MMIMessages.h" - -#include -#include -#include - -#include -#include - -using namespace uscxml; -using namespace boost; - -Arabica::DOM::Document xmlToDoc(const std::string& xml) { - std::stringstream* ss = new std::stringstream(); - (*ss) << xml; - std::auto_ptr ssPtr(ss); - Arabica::SAX::InputSource inputSource; - inputSource.setByteStream(ssPtr); - - Arabica::SAX2DOM::Parser parser; - parser.parse(inputSource); - return parser.getDocument(); -} - -int main(int argc, char** argv) { - { - // --- NewContextRequest - std::stringstream ss; - ss << ""; - - NewContextRequest msg = NewContextRequest::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "NewContextRequest")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.data, "")); - - NewContextRequest msg2 = NewContextRequest::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "NewContextRequest")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.data, "")); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.request.newcontext"); - assert(ev.origin == msg.source); - } - - { - // --- NewContextResponse - std::stringstream ss; - ss << " "; - NewContextResponse msg = NewContextResponse::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "NewContextResponse")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(msg.status == StatusResponse::SUCCESS); - assert(boost::iequals(msg.statusInfo, "")); - assert(boost::iequals(msg.context, "URI-1")); - assert(boost::iequals(msg.data, "")); - - NewContextResponse msg2 = NewContextResponse::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "NewContextResponse")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(msg2.status == StatusResponse::SUCCESS); - assert(boost::iequals(msg2.statusInfo, "")); - assert(boost::iequals(msg2.context, "URI-1")); - assert(boost::iequals(msg2.data, "")); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.response.newcontext"); - assert(ev.origin == msg.source); - - } - - { - // --- PrepareRequest ContentURL - std::stringstream ss; - ss << " "; - PrepareRequest msg = PrepareRequest::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "PrepareRequest")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "URI-1")); - assert(boost::iequals(msg.data, "")); - assert(boost::iequals(msg.content, "")); - assert(boost::iequals(msg.contentURL.href, "someContentURI")); - assert(boost::iequals(msg.contentURL.maxAge, "")); - assert(boost::iequals(msg.contentURL.fetchTimeout, "1s")); - - PrepareRequest msg2 = PrepareRequest::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "PrepareRequest")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "URI-1")); - assert(boost::iequals(msg2.data, "")); - assert(boost::iequals(msg2.content, "")); - assert(boost::iequals(msg2.contentURL.href, "someContentURI")); - assert(boost::iequals(msg2.contentURL.maxAge, "")); - assert(boost::iequals(msg2.contentURL.fetchTimeout, "1s")); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.request.prepare"); - assert(ev.origin == msg.source); - - } - - { - // --- PrepareRequest Content - std::stringstream ss; - ss << " Hello World! "; - PrepareRequest msg = PrepareRequest::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "PrepareRequest")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "URI-1")); - assert(msg.contentDOM); - - PrepareRequest msg2 = PrepareRequest::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "PrepareRequest")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "URI-1")); - assert(msg2.content.size() > 0); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.request.prepare"); - assert(ev.origin == msg.source); - - } - - { - // --- PrepareResponse - std::stringstream ss; - ss << " "; - PrepareResponse msg = PrepareResponse::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "PrepareResponse")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "someURI")); - assert(msg.status == StatusResponse::SUCCESS); - - PrepareResponse msg2 = PrepareResponse::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "PrepareResponse")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "someURI")); - assert(msg2.status == StatusResponse::SUCCESS); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.response.prepare"); - assert(ev.origin == msg.source); - - } - - { - // --- PrepareResponse - std::stringstream ss; - ss << " NotAuthorized "; - PrepareResponse msg = PrepareResponse::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "PrepareResponse")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "someURI")); - assert(boost::iequals(msg.statusInfo, " NotAuthorized ")); - assert(msg.status == StatusResponse::FAILURE); - - PrepareResponse msg2 = PrepareResponse::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "PrepareResponse")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "someURI")); - assert(boost::iequals(msg2.statusInfo, " NotAuthorized ")); - assert(msg2.status == StatusResponse::FAILURE); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.response.prepare"); - assert(ev.origin == msg.source); - - } - - { - // --- StartRequest - std::stringstream ss; - ss << " "; - StartRequest msg = StartRequest::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "StartRequest")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "URI-1")); - - StartRequest msg2 = StartRequest::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "StartRequest")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "URI-1")); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.request.start"); - assert(ev.origin == msg.source); - - } - - { - // --- StartRequest - std::stringstream ss; - ss << " { \"foo\": 12 } "; - StartRequest msg = StartRequest::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "StartRequest")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "URI-1")); - - StartRequest msg2 = StartRequest::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "StartRequest")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "URI-1")); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.request.start"); - assert(ev.data.compound["foo"] == 12); - assert(ev.origin == msg.source); - - } - - - - { - // --- StartResponse - std::stringstream ss; - ss << " NotAuthorized "; - StartResponse msg = StartResponse::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "StartResponse")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "someURI")); - assert(boost::iequals(msg.statusInfo, " NotAuthorized ")); - assert(msg.status == StatusResponse::FAILURE); - - StartResponse msg2 = StartResponse::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "StartResponse")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "someURI")); - assert(boost::iequals(msg2.statusInfo, " NotAuthorized ")); - assert(msg2.status == StatusResponse::FAILURE); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.response.start"); - assert(ev.origin == msg.source); - - } - - { - // --- DoneNotification - std::stringstream ss; - ss << " Boston Denver "; - DoneNotification msg = DoneNotification::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "DoneNotification")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "someURI")); - assert(msg.data.size() > 0); - assert(msg.status == StatusResponse::SUCCESS); - - DoneNotification msg2 = DoneNotification::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "DoneNotification")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "someURI")); - assert(msg2.data.size() > 0); - assert(msg2.status == StatusResponse::SUCCESS); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.notification.done"); - assert(ev.origin == msg.source); - - } - - { - // --- DoneNotification - std::stringstream ss; - ss << " "; - DoneNotification msg = DoneNotification::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "DoneNotification")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "someURI")); - assert(msg.data.size() > 0); - assert(msg.status == StatusResponse::SUCCESS); - - DoneNotification msg2 = DoneNotification::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "DoneNotification")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "someURI")); - assert(msg2.data.size() > 0); - assert(msg2.status == StatusResponse::SUCCESS); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.notification.done"); - assert(ev.origin == msg.source); - - } - - { - // --- CancelRequest - std::stringstream ss; - ss << " "; - CancelRequest msg = CancelRequest::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "CancelRequest")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "someURI")); - - CancelRequest msg2 = CancelRequest::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "CancelRequest")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "someURI")); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.request.cancel"); - assert(ev.origin == msg.source); - - } - - { - // --- CancelResponse - std::stringstream ss; - ss << " "; - CancelResponse msg = CancelResponse::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "CancelResponse")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "someURI")); - assert(msg.status == StatusResponse::SUCCESS); - - CancelResponse msg2 = CancelResponse::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "CancelResponse")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "someURI")); - assert(msg2.status == StatusResponse::SUCCESS); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.response.cancel"); - assert(ev.origin == msg.source); - - } - - { - // --- PauseRequest - std::stringstream ss; - ss << " "; - PauseRequest msg = PauseRequest::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "PauseRequest")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "someURI")); - - PauseRequest msg2 = PauseRequest::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "PauseRequest")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "someURI")); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.request.pause"); - assert(ev.origin == msg.source); - - } - - { - // --- PauseResponse - std::stringstream ss; - ss << " "; - PauseResponse msg = PauseResponse::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "PauseResponse")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "someURI")); - assert(msg.status == StatusResponse::SUCCESS); - - PauseResponse msg2 = PauseResponse::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "PauseResponse")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "someURI")); - assert(msg2.status == StatusResponse::SUCCESS); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.response.pause"); - assert(ev.origin == msg.source); - - } - - { - // --- ResumeRequest - std::stringstream ss; - ss << " "; - ResumeRequest msg = ResumeRequest::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "ResumeRequest")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "someURI")); - - ResumeRequest msg2 = ResumeRequest::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "ResumeRequest")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "someURI")); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.request.resume"); - assert(ev.origin == msg.source); - - } - - { - // --- ResumeResponse - std::stringstream ss; - ss << " "; - ResumeResponse msg = ResumeResponse::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "ResumeResponse")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "someURI")); - assert(msg.status == StatusResponse::SUCCESS); - - ResumeResponse msg2 = ResumeResponse::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "ResumeResponse")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "someURI")); - assert(msg2.status == StatusResponse::SUCCESS); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.response.resume"); - assert(ev.origin == msg.source); - - } - - { - // --- ExtensionNotification - std::stringstream ss; - ss << " "; - ExtensionNotification msg = ExtensionNotification::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "ExtensionNotification")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "someURI")); - assert(boost::iequals(msg.name, "appEvent")); - - ExtensionNotification msg2 = ExtensionNotification::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "ExtensionNotification")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "someURI")); - assert(boost::iequals(msg2.name, "appEvent")); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "appEvent"); - assert(ev.origin == msg.source); - - } - - { - // --- ExtensionNotification - std::stringstream ss; - ss << " { \"foo\": 12 } "; - ExtensionNotification msg = ExtensionNotification::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "ExtensionNotification")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-1")); - assert(boost::iequals(msg.context, "someURI")); - assert(boost::iequals(msg.name, "appEvent")); - - ExtensionNotification msg2 = ExtensionNotification::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "ExtensionNotification")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-1")); - assert(boost::iequals(msg2.context, "someURI")); - assert(boost::iequals(msg2.name, "appEvent")); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "appEvent"); - assert(ev.data.compound["foo"] == 12); - assert(ev.origin == msg.source); - - } - - { - // --- ClearContextRequest - std::stringstream ss; - ss << " "; - ClearContextRequest msg = ClearContextRequest::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "ClearContextRequest")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-2")); - assert(boost::iequals(msg.context, "someURI")); - - ClearContextRequest msg2 = ClearContextRequest::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "ClearContextRequest")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-2")); - assert(boost::iequals(msg2.context, "someURI")); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.request.clearcontext"); - assert(ev.origin == msg.source); - - } - - { - // --- ClearContextResponse - std::stringstream ss; - ss << " "; - ClearContextResponse msg = ClearContextResponse::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "ClearContextResponse")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-2")); - assert(boost::iequals(msg.context, "someURI")); - assert(msg.status == StatusResponse::SUCCESS); - - ClearContextResponse msg2 = ClearContextResponse::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "ClearContextResponse")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-2")); - assert(boost::iequals(msg2.context, "someURI")); - assert(msg2.status == StatusResponse::SUCCESS); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.response.clearcontext"); - assert(ev.origin == msg.source); - - } - - { - // --- StatusRequest - std::stringstream ss; - ss << " "; - StatusRequest msg = StatusRequest::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "StatusRequest")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-3")); - assert(boost::iequals(msg.context, "aToken")); - assert(msg.automaticUpdate); - - StatusRequest msg2 = StatusRequest::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "StatusRequest")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-3")); - assert(boost::iequals(msg2.context, "aToken")); - assert(msg2.automaticUpdate); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.request.status"); - assert(ev.origin == msg.source); - - } - - { - // --- StatusResponse - std::stringstream ss; - ss << " "; - StatusResponse msg = StatusResponse::fromXML(xmlToDoc(ss.str())); - assert(boost::iequals(msg.tagName, "StatusResponse")); - assert(boost::iequals(msg.source, "someURI")); - assert(boost::iequals(msg.target, "someOtherURI")); - assert(boost::iequals(msg.requestId, "request-3")); - assert(boost::iequals(msg.context, "aToken")); - assert(msg.status == StatusResponse::ALIVE); - - StatusResponse msg2 = StatusResponse::fromXML(msg.toXML()); - assert(boost::iequals(msg2.tagName, "StatusResponse")); - assert(boost::iequals(msg2.source, "someURI")); - assert(boost::iequals(msg2.target, "someOtherURI")); - assert(boost::iequals(msg2.requestId, "request-3")); - assert(boost::iequals(msg2.context, "aToken")); - assert(msg2.status == StatusResponse::ALIVE); - - std::stringstream xml1SS; - std::stringstream xml2SS; - xml1SS << msg.toXML(); - xml2SS << msg2.toXML(); - assert(xml1SS.str() == xml2SS.str()); - - Event ev = msg; - assert(ev.name == "mmi.response.status"); - assert(ev.origin == msg.source); - - } - -} \ No newline at end of file diff --git a/test/src/test-predicates.cpp b/test/src/test-predicates.cpp deleted file mode 100644 index 0aff104..0000000 --- a/test/src/test-predicates.cpp +++ /dev/null @@ -1,140 +0,0 @@ -#define protected public -#include "uscxml/Interpreter.h" -#include "uscxml/util/String.h" -#undef protected -#include - -int main(int argc, char** argv) { - try { - using namespace uscxml; - using namespace Arabica::DOM; - using namespace Arabica::XPath; - - const char* xml = - "" - " " - " " - " " - " " - " " - " " - " " - ""; - - Interpreter interpreter = Interpreter::fromXML(xml, ""); - assert(interpreter); - interpreter.getImpl()->init(); - - Element atomicState = interpreter.getImpl()->getState("atomic"); - assert(InterpreterImpl::isAtomic(atomicState)); - assert(!InterpreterImpl::isParallel(atomicState)); - assert(!InterpreterImpl::isCompound(atomicState)); - - Element compoundState = interpreter.getImpl()->getState("compound"); - assert(!InterpreterImpl::isAtomic(compoundState)); - assert(!InterpreterImpl::isParallel(compoundState)); - assert(InterpreterImpl::isCompound(compoundState)); - - Element parallelState = interpreter.getImpl()->getState("parallel"); - assert(!InterpreterImpl::isAtomic(parallelState)); - assert(InterpreterImpl::isParallel(parallelState)); - assert(!InterpreterImpl::isCompound(parallelState)); // parallel states are not compound! - - NodeSet initialState = interpreter.getImpl()->getInitialStates(); - assert(initialState[0] == atomicState); - - NodeSet childs = interpreter.getImpl()->getChildStates(compoundState); - Node compoundChild1 = interpreter.getImpl()->getState("compoundChild1"); - Node compoundChild2 = interpreter.getImpl()->getState("compoundChild2"); - assert(childs.size() > 0); - assert(InterpreterImpl::isMember(compoundChild1, childs)); - assert(InterpreterImpl::isMember(compoundChild2, childs)); - assert(!InterpreterImpl::isMember(compoundState, childs)); - - assert(InterpreterImpl::isDescendant(compoundChild1, compoundState)); - - { - std::string idrefs("id1"); - std::list tokenizedIdrefs = tokenize(idrefs); - assert(tokenizedIdrefs.size() == 1); - assert(tokenizedIdrefs.front().compare("id1") == 0); - } - - { - std::string idrefs(" id1"); - std::list tokenizedIdrefs = tokenize(idrefs); - assert(tokenizedIdrefs.size() == 1); - assert(tokenizedIdrefs.front().compare("id1") == 0); - } - - { - std::string idrefs(" id1 "); - std::list tokenizedIdrefs = tokenize(idrefs); - assert(tokenizedIdrefs.size() == 1); - assert(tokenizedIdrefs.front().compare("id1") == 0); - } - - { - std::string idrefs(" \tid1\n "); - std::list tokenizedIdrefs = tokenize(idrefs); - assert(tokenizedIdrefs.size() == 1); - assert(tokenizedIdrefs.front().compare("id1") == 0); - } - - { - std::string idrefs("id1 id2 id3"); - std::list tokenizedIdrefs = tokenize(idrefs); - assert(tokenizedIdrefs.size() == 3); - assert(tokenizedIdrefs.front().compare("id1") == 0); - tokenizedIdrefs.pop_front(); - assert(tokenizedIdrefs.front().compare("id2") == 0); - tokenizedIdrefs.pop_front(); - assert(tokenizedIdrefs.front().compare("id3") == 0); - } - - { - std::string idrefs("\t id1 \nid2\n\n id3\t"); - std::list tokenizedIdrefs = tokenize(idrefs); - assert(tokenizedIdrefs.size() == 3); - assert(tokenizedIdrefs.front().compare("id1") == 0); - tokenizedIdrefs.pop_front(); - assert(tokenizedIdrefs.front().compare("id2") == 0); - tokenizedIdrefs.pop_front(); - assert(tokenizedIdrefs.front().compare("id3") == 0); - } - - { - std::string idrefs("id1 \nid2 \tid3"); - std::list tokenizedIdrefs = tokenize(idrefs); - assert(tokenizedIdrefs.size() == 3); - assert(tokenizedIdrefs.front().compare("id1") == 0); - tokenizedIdrefs.pop_front(); - assert(tokenizedIdrefs.front().compare("id2") == 0); - tokenizedIdrefs.pop_front(); - assert(tokenizedIdrefs.front().compare("id3") == 0); - } - - std::string transEvents; - transEvents = "error"; - assert(nameMatch(transEvents, "error")); - assert(!nameMatch(transEvents, "foo")); - - transEvents = " error foo"; - assert(nameMatch(transEvents, "error")); - assert(nameMatch(transEvents, "error.send")); - assert(nameMatch(transEvents, "error.send.failed")); - assert(nameMatch(transEvents, "foo")); - assert(nameMatch(transEvents, "foo.bar")); - assert(!nameMatch(transEvents, "errors.my.custom")); - assert(!nameMatch(transEvents, "errorhandler.mistake")); - // is the event name case sensitive? - // assert(!nameMatch(transEvents, "errOr.send")); - assert(!nameMatch(transEvents, "foobar")); - } catch(std::exception e) { - std::cout << e.what(); - return false; - } catch(uscxml::Event e) { - std::cout << e; - return false; - } -} \ No newline at end of file diff --git a/test/src/test-promela-parser.cpp b/test/src/test-promela-parser.cpp deleted file mode 100644 index f3ac4cc..0000000 --- a/test/src/test-promela-parser.cpp +++ /dev/null @@ -1,316 +0,0 @@ -#define protected public -#include "uscxml/URL.h" -#include "uscxml/Message.h" -#include "uscxml/Interpreter.h" -#include "uscxml/plugins/datamodel/promela/PromelaDataModel.h" -#include "uscxml/plugins/datamodel/promela/PromelaParser.h" -#include "uscxml/transform/ChartToPromela.h" - -#include -#include -#include -#include -#include - -using namespace uscxml; -using namespace boost; -using namespace Arabica::DOM; - -extern int promela_debug; - -void testInlinePromela() { - - DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - Document document = domFactory.createDocument("", "", 0); - - { - std::string test = "\ - promela-code This is foo!\ - "; - - Comment comment = document.createComment(test); - PromelaInline inl(comment); - assert(inl.type == PromelaInline::PROMELA_CODE); - assert(inl.content == "This is foo!"); - } - - { - std::string test = "\ - promela-code\n \ - This is foo!\ - "; - - Comment comment = document.createComment(test); - PromelaInline inl(comment); - assert(inl.type == PromelaInline::PROMELA_CODE); - assert(inl.content == "This is foo!"); - } - - { - std::string test = "\ - promela-event\n \ - [{\"name\": \"e1\", \"data\": { \"foo\": \"some string\" }}, \ - {\"name\": \"e1\", \"data\": { \"bar\": 12 }}]"; - - Comment comment = document.createComment(test); - PromelaInline inl(comment); - assert(inl.type == PromelaInline::PROMELA_EVENT_ONLY); - - PromelaEventSource es(inl); - assert(es.events.array.size() == 2); - - } - - { - Interpreter interpreter = Interpreter::fromURL("/Users/sradomski/Documents/TK/Code/uscxml/test/uscxml/promela/test-event-source-auto.scxml"); - assert(interpreter); - PromelaInlines inls(interpreter.getDocument().getDocumentElement()); - - assert(inls.getAllOfType(PromelaInline::PROMELA_EVENT_ONLY).size() == 1); - assert(inls.getAllOfType(PromelaInline::PROMELA_EVENT_ALL_BUT).size() == 1); - interpreter.getImpl()->getState("s0"); - } - -#if 0 - { - std::string test = "\ - #promela-inline:\n \ - This is foo!\ - "; - PromelaInlines prmInls = PromelaInlines::fromString(test); - assert(prmInls.nrAcceptLabels == 0 && - prmInls.nrCodes == 1 && - prmInls.nrEventSources == 0 && - prmInls.nrEndLabels == 0 && - prmInls.nrAcceptLabels == 0 && - prmInls.nrProgressLabels == 0); - assert(prmInls.code.size() == 1); - assert(prmInls.code.front().type == PromelaInline::PROMELA_CODE); - assert(boost::trim_copy(prmInls.code.front().content) == "This is foo!"); - } - - { - std::string test = "#promela-progress"; - PromelaInlines prmInls = PromelaInlines::fromString(test); - assert(prmInls.nrAcceptLabels == 0 && - prmInls.nrCodes == 0 && - prmInls.nrEventSources == 0 && - prmInls.nrEndLabels == 0 && - prmInls.nrProgressLabels == 1); - assert(prmInls.code.size() == 1); - assert(prmInls.code.front().type == PromelaInline::PROMELA_PROGRESS_LABEL); - } - - { - std::string test = "#promela-accept and then some"; - PromelaInlines prmInls = PromelaInlines::fromString(test); - assert(prmInls.nrAcceptLabels == 1 && - prmInls.nrCodes == 0 && - prmInls.nrEventSources == 0 && - prmInls.nrEndLabels == 0 && - prmInls.nrProgressLabels == 0); - assert(prmInls.code.size() == 1); - assert(prmInls.code.front().type == PromelaInline::PROMELA_ACCEPT_LABEL); - } - - { - std::string test = "#promela-end and then some"; - PromelaInlines prmInls = PromelaInlines::fromString(test); - assert(prmInls.nrAcceptLabels == 0 && - prmInls.nrCodes == 0 && - prmInls.nrEventSources == 0 && - prmInls.nrEndLabels == 1 && - prmInls.nrProgressLabels == 0); - assert(prmInls.code.size() == 1); - assert(prmInls.code.front().type == PromelaInline::PROMELA_END_LABEL); - } - - { - std::string test = "\ - #promela-event-source:\n \ - This is foo!\ - "; - PromelaInlines prmInls = PromelaInlines::fromString(test); - assert(prmInls.nrAcceptLabels == 0 && - prmInls.nrCodes == 0 && - prmInls.nrEventSources == 1 && - prmInls.nrEndLabels == 0 && - prmInls.nrProgressLabels == 0); - assert(prmInls.code.size() == 1); - assert(prmInls.code.front().type == PromelaInline::PROMELA_EVENT_SOURCE); - - PromelaEventSource pmlES(prmInls.code.front()); - assert(pmlES.sequences.size() == 1); - std::list >::iterator seqsIter = pmlES.sequences.begin(); - std::list::iterator seqIter = seqsIter->begin(); - assert(*seqIter++ == "This"); - assert(*seqIter++ == "is"); - assert(*seqIter++ == "foo!"); - assert(seqIter == seqsIter->end()); - seqsIter++; - assert(seqsIter == pmlES.sequences.end()); - } - - { - std::string test = "\ - #promela-event-source:\n \ - This is foo!\n \ - This is bar!\n \ - "; - PromelaInlines prmInls = PromelaInlines::fromString(test); - assert(prmInls.nrAcceptLabels == 0 && - prmInls.nrCodes == 0 && - prmInls.nrEventSources == 1 && - prmInls.nrEndLabels == 0 && - prmInls.nrProgressLabels == 0); - assert(prmInls.code.size() == 1); - assert(prmInls.code.front().type == PromelaInline::PROMELA_EVENT_SOURCE); - - PromelaEventSource pmlES(prmInls.code.front()); - - assert(pmlES.sequences.size() == 2); - std::list >::iterator seqsIter = pmlES.sequences.begin(); - std::list::iterator seqIter = seqsIter->begin(); - assert(*seqIter++ == "This"); - assert(*seqIter++ == "is"); - assert(*seqIter++ == "foo!"); - assert(seqIter == seqsIter->end()); - seqsIter++; - seqIter = seqsIter->begin(); - assert(*seqIter++ == "This"); - assert(*seqIter++ == "is"); - assert(*seqIter++ == "bar!"); - assert(seqIter == seqsIter->end()); - seqsIter++; - assert(seqsIter == pmlES.sequences.end()); - } - - { - std::string test = "\ - #promela-event-source-custom:\n \ - This is foo!\ - "; - PromelaInlines prmInls = PromelaInlines::fromString(test); - assert(prmInls.nrAcceptLabels == 0 && - prmInls.nrCodes == 0 && - prmInls.nrEventSources == 1 && - prmInls.nrEndLabels == 0 && - prmInls.nrProgressLabels == 0); - assert(prmInls.code.size() == 1); - assert(prmInls.code.front().type == PromelaInline::PROMELA_EVENT_SOURCE_CUSTOM); - - PromelaEventSource pmlES(prmInls.code.front()); - - assert(pmlES.sequences.size() == 0); - assert(boost::trim_copy(pmlES.source.content) == "This is foo!"); - } - - { - std::string test = "\ - #promela-event-source-custom:\n \ - This is foo! \n\ - #promela-progress\ - "; - PromelaInlines prmInls = PromelaInlines::fromString(test); - assert(prmInls.nrAcceptLabels == 0 && - prmInls.nrCodes == 0 && - prmInls.nrEventSources == 1 && - prmInls.nrEndLabels == 0 && - prmInls.nrProgressLabels == 1); - assert(prmInls.code.size() == 2); - assert(prmInls.code.front().type == PromelaInline::PROMELA_EVENT_SOURCE_CUSTOM); - - PromelaEventSource pmlES(prmInls.code.front()); - - assert(pmlES.sequences.size() == 0); - assert(boost::trim_copy(pmlES.source.content) == "This is foo!"); - } -#endif -} - -void checkTokenLocations(const std::string& expr, PromelaParserNode* ast) { - if (ast->loc != NULL) { - assert(expr.substr(ast->loc->firstCol, ast->loc->lastCol - ast->loc->firstCol) == ast->value); - } - for (std::list::iterator opIter = ast->operands.begin(); opIter != ast->operands.end(); opIter++) { - checkTokenLocations(expr, *opIter); - } -} - -void testPromelaParser() { - - promela_debug = 0; -#if 1 - std::list expressions; - /* declarations */ - expressions.push_back("bool b1"); - expressions.push_back("bool b1;"); - expressions.push_back("bool b1, b2, b3"); - expressions.push_back("bool b1, b2, b3;"); - expressions.push_back("bool b1, b2 = 3 + 4, b3, b4, b5;"); - expressions.push_back("bool b1; bool b2; bool b3; bool b4;"); - expressions.push_back("bool b1; bool b2; bool b3, b4, b5;"); - expressions.push_back("bit b = 1;"); - expressions.push_back("byte state = 1;"); - expressions.push_back("bool b1, b2 = 1, b3;"); - expressions.push_back("bool busy[3];"); - expressions.push_back("bool busy[3], us[4];"); - expressions.push_back("mtype = {\nred, white, blue,\nabort, accept, ack, sync_ack, close, connect,\ncreate, data, eof, open, reject, sync, transfer,\nFATAL, NON_FATAL, COMPLETE\n}"); - expressions.push_back("typedef D { short f; byte g }; "); - expressions.push_back("x = 1"); - expressions.push_back("x = foo.bar[2].baz; "); - expressions.push_back("_event.data[1].aParam.key1.key2[1].key3.key4"); - expressions.push_back("_event.data.aParam"); - expressions.push_back("_event.data"); - expressions.push_back("_event"); - expressions.push_back("states"); - expressions.push_back("states[1]"); - expressions.push_back("_x.states[1]"); - expressions.push_back("_x.states[1].foo"); - expressions.push_back("_event.data[1].aParam.key1.key2[1].key3.key4"); - expressions.push_back("\n\n\n\n int foo = 3;\n\nint bar = 5;"); - - - /* expressions */ - expressions.push_back("i+1"); - expressions.push_back("(x == false || t == Bturn);"); - expressions.push_back("a + (1 << b)"); - expressions.push_back("(a + 1) << b"); - expressions.push_back("(b < N)"); - expressions.push_back("(mt+1)%MAX;"); - expressions.push_back("state[0] = state[3] + 5 * state[3*2/n]"); - - /* statements */ - expressions.push_back("t = Bturn;"); - expressions.push_back("c++"); - expressions.push_back("state = state - 1"); - expressions.push_back("printf(\"hello world\\n\")"); - expressions.push_back("printf(\"result %d: %d\\n\", id, res, foo, bar)"); - expressions.push_back("printf(\"x = %d\\n\", x)"); - expressions.push_back("(n <= 1)"); - expressions.push_back("res = (a*a+b)/2*a;"); - expressions.push_back("assert(0) /* a forced stop, (Chapter 6) */"); - expressions.push_back("assert(count == 0 || count == 1)"); - expressions.push_back("busy[4 - 3] = 1;"); - - for (std::list::iterator exprIter = expressions.begin(); - exprIter != expressions.end(); - exprIter++) { - try { - std::cout << std::endl << "'" << *exprIter << "':" << std::endl; - PromelaParser ast(*exprIter); - ast.dump(); - if (!boost::contains(*exprIter, "\n")) - checkTokenLocations(*exprIter, ast.ast); - } catch (Event e) { - std::cerr << e << std::endl; - } - } -#endif - -} - -int main(int argc, char** argv) { - testInlinePromela(); - testPromelaParser(); -} \ No newline at end of file diff --git a/test/src/test-sockets.cpp b/test/src/test-sockets.cpp deleted file mode 100644 index 89e6885..0000000 --- a/test/src/test-sockets.cpp +++ /dev/null @@ -1,164 +0,0 @@ -#include "uscxml/config.h" -#include "uscxml/Convenience.h" -#include "uscxml/server/Socket.h" -#include -#include - -#include -#include "event2/thread.h" - -#ifdef HAS_SIGNAL_H -#include -#endif - -#include "uscxml/concurrency/tinythread.h" - -using namespace uscxml; - -class TestServer : public ServerSocket { -public: - TestServer(int domain, int type, int protocol) : ServerSocket(domain, type, protocol) {} - virtual void readCallback(const char* data, size_t size, Connection& conn) { - std::string content(data, size); -// std::cout << "Server got: " << content << std::endl; - std::string urghs("hi!"); - conn.reply(urghs.data(), urghs.size()); - }; -}; - -int packetSeq = 0; - -class LogServer : public ServerSocket { -public: - LogServer(int domain, int type, int protocol) : ServerSocket(domain, type, protocol) {} - virtual void readCallback(const char* data, size_t size, Connection& conn) { - std::string content(data, size); - std::cout << "Server got: " << content << std::endl; - }; -}; - -class CountingPacketServer : public PacketServerSocket { -public: - CountingPacketServer(int domain, int type, int protocol, const std::string& sep) : PacketServerSocket(domain, type, protocol, sep) {} - virtual void readCallback(const std::string& packet, Connection& conn) { -// std::cout << "-- " << packet << std::endl; - size_t seq = strTo(packet); - assert(seq == packetSeq); - packetSeq++; - }; -}; - -class TestClient : public ClientSocket { -public: - TestClient(int domain, int type, int protocol) : ClientSocket(domain, type, protocol) {} - virtual void readCallback(const char* data, size_t size) { - std::string content(data, size); - }; -}; - -int main(int argc, char** argv) { - -#if defined(HAS_SIGNAL_H) && !defined(WIN32) - signal(SIGPIPE, SIG_IGN); -#endif - -#ifndef _WIN32 - evthread_use_pthreads(); -#else - evthread_use_windows_threads(); -#endif - - if (1) { - packetSeq = 0; - CountingPacketServer server(PF_INET, SOCK_STREAM, 0, std::string("tadaa!")); -// LogServer server(PF_INET, SOCK_STREAM, 0); - server.listen("*", 1235); - server.setBlockSizeRead(1); - - TestClient client(PF_INET, SOCK_STREAM, 0); - client.connect("127.0.0.1", 1235); - - int iterations = 1000; - std::stringstream contentSS; - for (size_t i = 0; i < iterations; i++) { - contentSS << toStr(i); - contentSS << "tadaa!"; - } - client.write(contentSS.str()); - - while(packetSeq != iterations) - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(20)); - } - - if (1) { - packetSeq = 0; - CountingPacketServer server(PF_INET, SOCK_STREAM, 0, std::string("\0", 1)); - server.listen("*", 1235); - - TestClient client(PF_INET, SOCK_STREAM, 0); - client.connect("127.0.0.1", 1235); - - int iterations = 1000; - for (size_t i = 0; i < iterations; i++) { - client.write(toStr(i)); - client.write("\0", 1); - } - - while(packetSeq != iterations) - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(20)); - } - - exit(0); - - if (1) { - // start server socket and connect - int iterations = 100; - - TestServer server(PF_INET, SOCK_STREAM, 0); - try { - server.listen("*", 1234); - - while(iterations--) { - std::cout << iterations << std::endl; - TestClient client(PF_INET, SOCK_STREAM, 0); - client.connect("127.0.0.1", 1234); - - std::string hello("hello"); - client.write(hello.data(), hello.size()); - - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(20)); - } - - } catch (std::runtime_error e) { - std::cout << e.what() << std::endl; - } - } - - { - // connect client to server and kill server - int iterations = 100; - - try { - - while(iterations--) { - std::cout << iterations << std::endl; - TestServer* server = new TestServer(PF_INET, SOCK_STREAM, 0); - server->listen("*", 1236 + iterations); - - TestClient client(PF_INET, SOCK_STREAM, 0); - client.connect("127.0.0.1", 1236 + iterations); - - std::string hello("hello"); - client.write(hello.data(), hello.size()); - - delete server; - - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(20)); - } - - } catch (std::runtime_error e) { - std::cout << e.what() << std::endl; - } - - } -} \ No newline at end of file diff --git a/test/src/test-state-pass.cpp b/test/src/test-state-pass.cpp new file mode 100644 index 0000000..943b3dc --- /dev/null +++ b/test/src/test-state-pass.cpp @@ -0,0 +1,89 @@ +#include +#include +#include +#include +#include +#include +#include + +#include "uscxml/Interpreter.h" +#include "uscxml/util/DOM.h" +#include "uscxml/util/String.h" +#include "uscxml/util/UUID.h" +#include "uscxml/util/Predicates.h" +#include "uscxml/util/Convenience.h" // iequals + +#include "easylogging++.h" + +#include "uscxml/messages/Event.h" +#include "uscxml/server/HTTPServer.h" + +#include +#include +#include + +#include // for evutil_socket_t +#include +#include + +#ifdef _WIN32 +#include "XGetopt.h" +#include "XGetopt.cpp" +#else +#include +#endif + +using namespace std; +using namespace xercesc; +using namespace uscxml; + + +int main(int argc, char** argv) { + size_t iterations = 1; + + std::string documentURI; + el::Loggers::reconfigureAllLoggers(el::ConfigurationType::Format, "%datetime %level %fbase:%line: %msg"); + + if (argc < 2) { + exit(EXIT_FAILURE); + } + + int option; + while ((option = getopt(argc, argv, "n:")) != -1) { + switch(option) { + case 'n': + iterations = strTo(optarg); + break; + default: + break; + } + } + + documentURI = argv[optind]; + + HTTPServer::getInstance(7080, 7443); + + while(iterations--) { + try { + Interpreter interpreter = Interpreter::fromURL(documentURI); + + ActionLanguage al; + al.execContent = std::shared_ptr(new BasicContentExecutorImpl(interpreter.getImpl().get())); + interpreter.setActionLanguage(al); + + StateTransitionMonitor mon(interpreter); + interpreter.setMonitor(&mon); + + InterpreterState state = InterpreterState::USCXML_UNDEF; + while(state != USCXML_FINISHED) { + state = interpreter.step(true); + } + assert(interpreter.isInState("pass")); + } catch (Event e) { + std::cerr << "Thrown Event out of Interpreter: " << e; + return EXIT_FAILURE; + } + } + + return 0; +} \ No newline at end of file diff --git a/test/src/test-stress.cpp b/test/src/test-stress.cpp deleted file mode 100644 index 0099f9b..0000000 --- a/test/src/test-stress.cpp +++ /dev/null @@ -1,196 +0,0 @@ -#include "uscxml/config.h" -#include "uscxml/Interpreter.h" -#include "uscxml/Factory.h" -#include "uscxml/server/HTTPServer.h" - -#include - -#include "uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.h" -#include - -#ifdef _WIN32 -#include "XGetopt.h" -#endif - -int startedAt; -int lastTransitionAt; - -#ifdef HAS_SIGNAL_H -#include -#endif - -#ifdef HAS_EXECINFO_H -#include -#endif - -#ifdef HAS_DLFCN_H -#include -#endif - -#ifdef HAS_EXECINFO_H -void printBacktrace(void** array, int size) { - char** messages = backtrace_symbols(array, size); - for (size_t i = 0; i < size && messages != NULL; ++i) { - std::cerr << "\t" << messages[i] << std::endl; - } - std::cerr << std::endl; - free(messages); -} - -#ifdef HAS_DLFCN_H -// see https://gist.github.com/nkuln/2020860 -typedef void (*cxa_throw_type)(void *, void *, void (*) (void *)); -cxa_throw_type orig_cxa_throw = 0; - -void load_orig_throw_code() { - orig_cxa_throw = (cxa_throw_type) dlsym(RTLD_NEXT, "__cxa_throw"); -} - -extern "C" -CXA_THROW_SIGNATURE { - std::cerr << __FUNCTION__ << " will throw exception from " << std::endl; - if (orig_cxa_throw == 0) - load_orig_throw_code(); - - void *array[50]; - size_t size = backtrace(array, 50); - printBacktrace(array, size); - orig_cxa_throw(thrown_exception, pvtinfo, dest); -} -#endif -#endif - - -// see http://stackoverflow.com/questions/2443135/how-do-i-find-where-an-exception-was-thrown-in-c -void customTerminate() { - static bool tried_throw = false; - try { - // try once to re-throw currently active exception - if (!tried_throw) { - tried_throw = true; - throw; - } else { - tried_throw = false; - } - } catch (const std::exception &e) { - std::cerr << __FUNCTION__ << " caught unhandled exception. what(): " - << e.what() << std::endl; - } catch (const uscxml::Event &e) { - std::cerr << __FUNCTION__ << " caught unhandled exception. Event: " - << e << std::endl; - } catch (...) { - std::cerr << __FUNCTION__ << " caught unknown/unhandled exception." - << std::endl; - } - -#ifdef HAS_EXECINFO_H - void * array[50]; - int size = backtrace(array, 50); - - printBacktrace(array, size); -#endif - abort(); -} - -void printUsageAndExit() { - printf("test-stress version " USCXML_VERSION " (" CMAKE_BUILD_TYPE " build - " CMAKE_COMPILER_STRING ")\n"); - printf("Usage\n"); - printf("\ttest-stress"); -#ifdef BUILD_AS_PLUGINS - printf(" [-p pluginPath]"); -#endif - printf(" \n"); - printf("\n"); - exit(1); -} - -class StatusMonitor : public uscxml::InterpreterMonitor { - void beforeTakingTransitions(uscxml::Interpreter interpreter, const Arabica::XPath::NodeSet& transitions) { - lastTransitionAt = time(NULL); - } - -}; - -int main(int argc, char** argv) { - using namespace uscxml; - - std::set_terminate(customTerminate); - -#if defined(HAS_SIGNAL_H) && !defined(WIN32) - signal(SIGPIPE, SIG_IGN); -#endif - - if (argc < 2) { - printUsageAndExit(); - } - - google::InitGoogleLogging(argv[0]); - google::LogToStderr(); - - HTTPServer::getInstance(8088, 8089); -#ifndef _WIN32 - opterr = 0; -#endif - int option; - while ((option = getopt(argc, argv, "vl:p:")) != -1) { - switch(option) { - case 'l': - google::InitGoogleLogging(optarg); - break; - case 'p': - uscxml::Factory::setDefaultPluginPath(optarg); - break; - case '?': - break; - default: - printUsageAndExit(); - break; - } - } - -#if 0 - while(true) { - Interpreter interpreter = Interpreter::fromURI("/Users/sradomski/Documents/TK/Code/uscxml/test/w3c/ecma/test235.scxml"); - interpreter.interpret(); - } -#else - - DirectoryWatch* watcher = new DirectoryWatch(argv[optind], true); - watcher->updateEntries(true); - std::map entries = watcher->getAllEntries(); - - StatusMonitor vm; - - std::map::iterator entryIter = entries.begin(); - while(entryIter != entries.end()) { - if (!boost::ends_with(entryIter->first, ".scxml")) { - entryIter++; - continue; - } - - startedAt = time(NULL); - lastTransitionAt = time(NULL); - - LOG(INFO) << "Processing " << entryIter->first; - Interpreter interpreter = Interpreter::fromURL(std::string(argv[optind]) + PATH_SEPERATOR + entryIter->first); - if (interpreter) { -// interpreter.setCmdLineOptions(argc, argv); - - interpreter.addMonitor(&vm); - - interpreter.start(); - int now = time(NULL); - while(now - startedAt < 20 && now - lastTransitionAt < 2) { - // let the interpreter run for a bit - tthread::this_thread::sleep_for(tthread::chrono::seconds(1)); - now = time(NULL); - } - - } - entryIter++; - } - - delete watcher; -#endif - return EXIT_SUCCESS; -} \ No newline at end of file diff --git a/test/src/test-trie.cpp b/test/src/test-trie.cpp deleted file mode 100644 index 8c7ab15..0000000 --- a/test/src/test-trie.cpp +++ /dev/null @@ -1,92 +0,0 @@ -#include "uscxml/util/Trie.h" -#include -#include - -using namespace uscxml; - -int main(int argc, char** argv) { - { - Trie trie; - int nrTokens = 0; - size_t offset = 0; - std::string word = "this is to be tokenized"; - std::string token; - while((offset = trie.getNextToken(word, offset, token)) != std::string::npos) { - std::cout << "\"" << token << "\" "; - nrTokens++; - } - std::cout << std::endl; - assert(nrTokens == word.length()); - } - - { - Trie trie(" "); - int nrTokens = 0; - size_t offset = 0; - std::string word = "this is to be tokenized"; - std::string token; - while(offset = trie.getNextToken(word, offset, token), token.length() > 0) { - std::cout << "\"" << token << "\" "; - nrTokens++; - } - std::cout << std::endl; - assert(nrTokens == 5); - } - - { - Trie trie("#"); - int nrTokens = 0; - size_t offset = 0; - std::string word = "#bb#bbbb#b#bbb#bb#b#"; - std::string token; - while(offset = trie.getNextToken(word, offset, token), token.length() > 0) { - std::cout << "\"" << token << "\" "; - nrTokens++; - } - std::cout << std::endl; - assert(nrTokens == 6); - } - - { - Trie trie(" "); - int nrTokens = 0; - size_t offset = 0; - std::string word = " this is to be tokenized"; - std::string token; - while(offset = trie.getNextToken(word, offset, token), token.length() > 0) { - std::cout << "\"" << token << "\" "; - nrTokens++; - } - std::cout << std::endl; - assert(nrTokens == 3); - } - - { - Trie trie(""); - trie.addWord("a"); - trie.addWord("b"); - - trie.dump(); - } - - { - Trie trie("."); - trie.addWord("foo.bar"); - trie.addWord("foo.foo"); - trie.addWord("foo.foo.baz"); - trie.addWord("foz.foo.baz"); - trie.addWord("foz.foo"); - - trie.dump(); - - std::list childs; - - childs = trie.getChildsWithWords(trie.root); - assert(childs.size() == 5); - - assert(trie.getNodeWithPrefix("") == trie.root); - - childs = trie.getWordsWithPrefix(""); - assert(childs.size() == 5); - } -} \ No newline at end of file diff --git a/test/src/test-url.cpp b/test/src/test-url.cpp index d4aa0c0..d713c67 100644 --- a/test/src/test-url.cpp +++ b/test/src/test-url.cpp @@ -1,24 +1,22 @@ -#include "uscxml/URL.h" -#include "uscxml/Message.h" +#include "uscxml/util/URL.h" #include "uscxml/Interpreter.h" #include "uscxml/server/HTTPServer.h" #include "uscxml/config.h" -#include - +#include +#include #include -#include #include using namespace uscxml; -using namespace boost; +using namespace xercesc; class TestServlet : public HTTPServlet { public: TestServlet(bool adaptPath) : _canAdaptPath(adaptPath) {} - bool httpRecvRequest(const HTTPServer::Request& request) { + bool requestFromHTTP(const HTTPServer::Request& request) { return true; }; bool canAdaptPath() { @@ -33,13 +31,17 @@ public: }; bool canResolve(const std::string& url) { - Arabica::SAX::InputSource is(url); - Arabica::SAX::InputSourceResolver res1(is, Arabica::default_string_adaptor()); - if(res1.resolve()) { - std::cout << "good: " << url << std::endl; + URL absUrl(url); + if (absUrl.scheme() == "") { + absUrl = URL("file://" + url); + } + + try { + XercesDOMParser* parser = new XercesDOMParser(); + std::string tmp = absUrl; + parser->parse(tmp.c_str()); return true; - } else { - std::cout << "bad: " << url << std::endl; + } catch(...) { return false; } } @@ -60,7 +62,7 @@ void testFileURLs() { absURLs.push_back(URL("file:/fileURLs/text.txt")); // usual filesystem paths - absURLs.push_back(URL("C:\\Windows\\sradomski\\Desktop\\foo.txt")); +// absURLs.push_back(URL("C:\\Windows\\sradomski\\Desktop\\foo.txt")); // absURLs.push_back(URL("C:\\Windows\\Some Spaces\\index.txt")); // absURLs.push_back(URL("C:/Windows/Some Spaces/index.txt")); // absURLs.push_back(URL("/Users/sradomski/Desktop/")); @@ -86,7 +88,7 @@ void testFileURLs() { { relURLs.push_back(URL("file")); relURLs.push_back(URL("file:")); - relURLs.push_back(URL("file://")); +// relURLs.push_back(URL("file://")); // platform specific relURLs.push_back(URL("file:Macintosh%20HD/fileURLs/text.txt")); @@ -102,21 +104,22 @@ void testFileURLs() { } for (std::list::iterator absIter = absURLs.begin(); absIter != absURLs.end(); absIter++) { - absIter->dump(); + std::cout << std::string(*absIter) << std::endl; assert(absIter->isAbsolute()); assert(absIter->scheme() == "file"); assert(absIter->host() == ""); } for (std::list::iterator relIter = relURLs.begin(); relIter != relURLs.end(); relIter++) { + std::cout << std::string(*relIter) << std::endl; assert(!relIter->isAbsolute()); } for (std::list::iterator absIter = absURLs.begin(); absIter != absURLs.end(); absIter++) { for (std::list::iterator relIter = relURLs.begin(); relIter != relURLs.end(); relIter++) { - URL relURL(*relIter); - relURL.toAbsolute(*absIter); - assert(relURL.isAbsolute()); + URL tmp = URL::resolve(*relIter, *absIter); + std::cout << std::string(tmp) << std::endl; + assert(tmp.isAbsolute()); } } @@ -130,12 +133,21 @@ int main(int argc, char** argv) { // some URLs from http://www-archive.mozilla.org/quality/networking/testing/filetests.html +// URL foo("file:/"); +// assert(foo.isAbsolute()); + + HTTPServer::getInstance(8099, 8100); std::string exeName = argv[0]; exeName = exeName.substr(exeName.find_last_of("\\/") + 1); - testFileURLs(); + try { + testFileURLs(); + } catch (Event e) { + LOG(ERROR) << e; + exit(EXIT_FAILURE); + } { try { @@ -167,10 +179,12 @@ int main(int argc, char** argv) { } #endif +#if 0 { try { URL url(argv[0]); + assert(url.isAbsolute()); assert(canResolve(argv[0])); assert(canResolve(url.asString())); @@ -186,6 +200,7 @@ int main(int argc, char** argv) { std::cout << e << std::endl; } } +#endif { TestServlet* testServlet1 = new TestServlet(false); @@ -203,6 +218,7 @@ int main(int argc, char** argv) { HTTPServer::unregisterServlet(testServlet2); } +#if 0 { TestServlet* testServlet1 = new TestServlet(true); TestServlet* testServlet2 = new TestServlet(true); @@ -219,7 +235,7 @@ int main(int argc, char** argv) { HTTPServer::unregisterServlet(testServlet2); HTTPServer::unregisterServlet(testServlet3); } - +#endif { Data data = Data::fromJSON("{\"shiftKey\":false,\"toElement\":{\"id\":\"\",\"localName\":\"body\"},\"clientY\":38,\"y\":38,\"x\":66,\"ctrlKey\":false,\"relatedTarget\":{\"id\":\"\",\"localName\":\"body\"},\"clientX\":66,\"screenY\":288,\"metaKey\":false,\"offsetX\":58,\"altKey\":false,\"offsetY\":30,\"fromElement\":{\"id\":\"foo\",\"localName\":\"div\"},\"screenX\":-1691,\"dataTransfer\":null,\"button\":0,\"pageY\":38,\"layerY\":38,\"pageX\":66,\"charCode\":0,\"which\":0,\"keyCode\":0,\"detail\":0,\"layerX\":66,\"returnValue\":true,\"timeStamp\":1371223991895,\"eventPhase\":2,\"target\":{\"id\":\"foo\",\"localName\":\"div\"},\"defaultPrevented\":false,\"srcElement\":{\"id\":\"foo\",\"localName\":\"div\"},\"type\":\"mouseout\",\"cancelable\":true,\"currentTarget\":{\"id\":\"foo\",\"localName\":\"div\"},\"bubbles\":true,\"cancelBubble\":false}"); std::cout << data << std::endl; @@ -243,35 +259,33 @@ int main(int argc, char** argv) { } { - URL url("http://www.heise.de/index.html"); - std::cout << url.asString() << std::endl; + URL url("http://www.heise.de/de/index.html"); + std::cout << std::string(url) << std::endl; assert(url.isAbsolute()); + assert(iequals(std::string(url), "http://www.heise.de/de/index.html")); assert(iequals(url.scheme(), "http")); assert(iequals(url.host(), "www.heise.de")); - assert(iequals(url.port(), "80")); - assert(iequals(url.path(), "/index.html")); - assert(iequals(url.asString(), "http://www.heise.de/index.html")); - std::stringstream content; - content << url; + assert(iequals(url.path(), "/de/index.html")); + url.download(); } #ifndef _WIN32 { URL url("https://raw.github.com/tklab-tud/uscxml/master/test/samples/uscxml/test-ecmascript.scxml"); - std::cout << url.asString() << std::endl; + std::cout << std::string(url) << std::endl; assert(url.isAbsolute()); assert(iequals(url.scheme(), "https")); - std::stringstream content; - content << url; + url.download(); } #endif +#if 0 { URL url("test/index.html"); assert(iequals(url.scheme(), "")); url.toAbsoluteCwd(); assert(iequals(url.scheme(), "file")); - std::cout << url.asString() << std::endl; + std::cout << std::string(url) << std::endl; } { @@ -280,5 +294,5 @@ int main(int argc, char** argv) { assert(url.isAbsolute()); assert(iequals(url.scheme(), "file")); } - +#endif } \ No newline at end of file diff --git a/test/src/test-validating.cpp b/test/src/test-validating.cpp new file mode 100644 index 0000000..a7a89df --- /dev/null +++ b/test/src/test-validating.cpp @@ -0,0 +1,816 @@ +#include "uscxml/config.h" +#include "uscxml/Interpreter.h" +#include +#include + +using namespace uscxml; + +std::set issueLocationsForXML(const std::string xml) { + Interpreter interpreter = Interpreter::fromXML(xml, ""); + + // common xmlns and version requirement on scxml attribute + interpreter.getImpl()->getDocument()->getDocumentElement()->setAttribute(X("xmlns"), X("http://www.w3.org/2005/07/scxml")); + interpreter.getImpl()->getDocument()->getDocumentElement()->setAttribute(X("version"), X("1.0")); + + std::list issues = interpreter.validate(); + + std::set issueLocations; + + for (std::list::iterator issueIter = issues.begin(); issueIter != issues.end(); issueIter++) { + std::cout << *issueIter << std::endl; + issueLocations.insert(issueIter->xPath); + } + return issueLocations; +} + +size_t runtimeIssues; +class IssueMonitor : public InterpreterMonitor { +public: + IssueMonitor() { + runtimeIssues = 0; + } + void reportIssue(const InterpreterIssue& issue) { + runtimeIssues++; + } +}; + +int main(int argc, char** argv) { + + using namespace xercesc; + + int iterations = 1; + + while(iterations--) { + + if (1) { + // Potential endless loop + + const char* xml = + "" + " " + " " + " " + " 0\" />" + " " + " " + " " + ""; + + IssueMonitor monitor; + Interpreter interpreter = Interpreter::fromXML(xml, ""); + interpreter.setMonitor(&monitor); + + while(interpreter.step() > 0) {} + + // four identical configurations between macrosteps + assert(runtimeIssues == 4); + } + + if (1) { + // Unreachable states 1 + + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"bar\"]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Invalid parents + const char* xml = + "" + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("/scxml[1]/onentry[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (0) { + // State has no 'id' attribute + // *** This is not actually an error! *** + const char* xml = + "" + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("/scxml[1]/state[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Duplicate state with id + const char* xml = + "" + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Transition has non-existant target state + + const char* xml = + "" + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/transition[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Useless history 1 + + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//history[@id=\"bar\"]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Useless history 2 + + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//history[@id=\"bar\"]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // No legal completion + + const char* xml = + "" + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]") != issueLocations.end()); + assert(issueLocations.find("//state[@id=\"start\"]/transition[1]") != issueLocations.end()); + assert(issueLocations.size() == 2); + } + + if (1) { + // attribute constraints + + { + // initial attribute and child + const char* xml = + "" + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + { + // initial attribute with atomic state + const char* xml = + "" + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + { + // initial child with atomic state + const char* xml = + "" + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]") != issueLocations.end()); + assert(issueLocations.size() == 2); // also invalid non-child target state in initial + } + + // combinations of namelist, content and param + { + // send with content and namelist, not allowed + const char* xml = + "" + " " + " " + " " + " Foo!" + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/send[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + { + // send with content and params, not allowed + const char* xml = + "" + " " + " " + " " + " " + " Foo!" + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/send[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + { + // send with params and namelist, perfectly acceptable + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.size() == 0); + } + + { + // invoke with content and src, not allowed + const char* xml = + "" + " " + " " + " Foo!" + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/invoke[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + { + // invoke with namelist and param, not allowed + const char* xml = + "" + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/invoke[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + { + // invoke with param and content, perfectly acceptable + const char* xml = + "" + " " + " " + " " + " Foo!" + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.size() == 0); + } + + { + // invoke with namelist and content, perfectly acceptable + const char* xml = + "" + " " + " " + " Foo!" + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.size() == 0); + } + + { + // donedata with content and param, not allowed + const char* xml = + "" + " " + " " + " " + " Foo!" + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/donedata[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + + } + + if (1) { + // Transition can never be optimally enabled (conditionless, eventless) + + const char* xml = + "" + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/transition[2]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + if (1) { + // Transition can never be optimally enabled (conditionless, more events) + + const char* xml = + "" + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/transition[2]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + + if (1) { + // Initial attribute has invalid target state + + const char* xml = + "" + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("/scxml[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Initial attribute with target outside of children + + const char* xml = + "" + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + if (1) { + // Initial transition with target outside of children + + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/initial[1]/transition[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); // there are actually two issues with the transition + } + if (1) { + // Initial history transition with target outside of children + + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//history[@id=\"bar\"]/transition[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + if (1) { + // Initial transition with target outside of children + + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/initial[1]/transition[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Initial transition with event + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/initial[1]/transition[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Initial transition with condition + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/initial[1]/transition[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Initial with multiple transitions + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/initial[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Initial with no transitions + const char* xml = + "" + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"foo\"]") != issueLocations.end()); // unreachable + assert(issueLocations.find("//state[@id=\"start\"]/initial[1]") != issueLocations.end()); + assert(issueLocations.size() == 2); + } + + if (1) { + // History transition with event + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//history[@id=\"bar\"]/transition[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // History transition with condition + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//history[@id=\"bar\"]/transition[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Send to unknown IO Processor + + const char* xml = + "" + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/send[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // SCXML document requires unknown datamodel + + const char* xml = + "" + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("/scxml[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Unknown executable content element + + const char* xml = + "" + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/nonexistant[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Syntax error in script + + const char* xml = + "" + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("/scxml[1]/script[1]") != issueLocations.end()); + assert(issueLocations.size() == 1); + } + + if (1) { + // Syntax error in cond attribute + + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/transition[1]") != issueLocations.end()); + assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/if[1]") != issueLocations.end()); + assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/if[1]/elseif[1]") != issueLocations.end()); + assert(issueLocations.size() == 3); + } + + if (1) { + // Syntax error in expr attribute + + const char* xml = + "" + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; + + std::set issueLocations = issueLocationsForXML(xml); + assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/log[1]") != issueLocations.end()); + assert(issueLocations.find("//data[@id=\"foo\"]") != issueLocations.end()); + assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/assign[1]") != issueLocations.end()); + assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/send[1]/param[1]") != issueLocations.end()); + assert(issueLocations.find("//state[@id=\"start\"]/onentry[1]/send[2]/content[1]") != issueLocations.end()); + assert(issueLocations.size() == 5); + } + + if (1) { + // Syntax error with foreach + + con

::type type; +}; + +template< typename Pred > +failed ************ (Pred::************ + assert_arg( void (*)(Pred), typename assert_arg_pred::type ) + ); + +template< typename Pred > +failed ************ (boost::mpl::not_::************ + assert_not_arg( void (*)(Pred), typename assert_arg_pred_not::type ) + ); + +template< typename Pred > +AUX778076_ASSERT_ARG(assert) +assert_arg( void (*)(Pred), typename assert_arg_pred_not::type ); + +template< typename Pred > +AUX778076_ASSERT_ARG(assert) +assert_not_arg( void (*)(Pred), typename assert_arg_pred::type ); + + +#else // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER + +template< bool c, typename Pred > struct assert_arg_type_impl +{ + typedef failed ************ Pred::* mwcw83_wknd; + typedef mwcw83_wknd ************* type; +}; + +template< typename Pred > struct assert_arg_type_impl +{ + typedef AUX778076_ASSERT_ARG(assert) type; +}; + +template< typename Pred > struct assert_arg_type + : assert_arg_type_impl< BOOST_MPL_AUX_VALUE_WKND(BOOST_MPL_AUX_NESTED_TYPE_WKND(Pred))::value, Pred > +{ +}; + +template< typename Pred > +typename assert_arg_type::type +assert_arg(void (*)(Pred), int); + +template< typename Pred > +typename assert_arg_type< boost::mpl::not_ >::type +assert_not_arg(void (*)(Pred), int); + +# if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) +template< long x, long y, bool (*r)(failed, failed) > +typename assert_arg_type_impl< false,BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) >::type +assert_rel_arg( BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) ); +# else +template< assert_::relations r, long x, long y > +typename assert_arg_type_impl< false,assert_relation >::type +assert_rel_arg( assert_relation ); +# endif + +#endif // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER + +#undef AUX778076_ASSERT_ARG + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) + +// BOOST_MPL_ASSERT((pred)) + +#define BOOST_MPL_ASSERT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed( \ + boost::mpl::make_assert_arg< \ + typename boost::mpl::eval_assert::type \ + >() \ + ) \ + ) \ + ) \ +/**/ + +// BOOST_MPL_ASSERT_NOT((pred)) + +#define BOOST_MPL_ASSERT_NOT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed( \ + boost::mpl::make_assert_arg< \ + typename boost::mpl::eval_assert_not::type \ + >() \ + ) \ + ) \ + ) \ +/**/ + +#else + +// BOOST_MPL_ASSERT((pred)) + +#define BOOST_MPL_ASSERT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed( \ + boost::mpl::assert_arg( (void (*) pred)0, 1 ) \ + ) \ + ) \ + ) \ +/**/ + +// BOOST_MPL_ASSERT_NOT((pred)) + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +# define BOOST_MPL_ASSERT_NOT(pred) \ +enum { \ + BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion::failed( \ + boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ + ) \ + ) \ +}\ +/**/ +#else +# define BOOST_MPL_ASSERT_NOT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed( \ + boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ + ) \ + ) \ + ) \ +/**/ +#endif + +#endif + +// BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y) + +#if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) + +# if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) +// agurt, 9/nov/06: 'enum' below is a workaround for gcc 4.0.4/4.1.1 bugs #29522 and #29518 +# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \ +enum { BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) }; \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ + boost::mpl::assertion_failed( \ + (boost::mpl::failed ************ ( boost::mpl::assert_relation< \ + boost::mpl::assert_::relations( sizeof( \ + boost::mpl::assert_::arg rel boost::mpl::assert_::arg \ + ) ) \ + , x \ + , y \ + >::************)) 0 ) \ + ) \ + ) \ +/**/ +# else +# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assert_rel,counter) = sizeof( \ + boost::mpl::assert_::arg rel boost::mpl::assert_::arg \ + ) \ + ); \ +BOOST_MPL_AUX_ASSERT_CONSTANT( bool, BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) ); \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ + boost::mpl::assertion_failed( \ + boost::mpl::assert_rel_arg( boost::mpl::assert_relation< \ + boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,counter)) \ + , x \ + , y \ + >() ) \ + ) \ + ) \ + ) \ +/**/ +# endif + +# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ +BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), x, rel, y) \ +/**/ + +#else // !BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES + +# if defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) +# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed<(x rel y)>( boost::mpl::assert_rel_arg( \ + boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))() \ + ) ) \ + ) \ + ) \ +/**/ +# else +# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed<(x rel y)>( (boost::mpl::failed ************ ( \ + boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))::************))0 ) \ + ) \ + ) \ +/**/ +# endif + +#endif + + +// BOOST_MPL_ASSERT_MSG( (pred::value), USER_PROVIDED_MESSAGE, (types) ) + +#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) +# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ +struct msg; \ +typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \ +{ \ + using boost::mpl::assert_::types; \ + static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \ + { return 0; } \ +} BOOST_PP_CAT(mpl_assert_arg,counter); \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ + boost::mpl::assertion<(c)>::failed( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \ + ) \ + ) \ +/**/ +#else +# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ +struct msg; \ +typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \ +{ \ + static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \ + { return 0; } \ +} BOOST_PP_CAT(mpl_assert_arg,counter); \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ + boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \ + ) \ + ) \ +/**/ +#endif + +#define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \ +BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \ +/**/ + +#endif // BOOST_MPL_ASSERT_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/adl_barrier.hpp b/contrib/src/boost/mpl/aux_/adl_barrier.hpp new file mode 100644 index 0000000..3968c24 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/adl_barrier.hpp @@ -0,0 +1,48 @@ + +#ifndef BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED +#define BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) + +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE mpl_ +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace mpl_ { +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE } +# define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) \ + namespace boost { namespace mpl { \ + using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \ + } } \ +/**/ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE { namespace aux {} } +namespace boost { namespace mpl { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE; +namespace aux { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux; } +}} +#endif + +#else // BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE + +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE boost::mpl +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace boost { namespace mpl { +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE }} +# define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) /**/ + +#endif + +#endif // BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/arg_typedef.hpp b/contrib/src/boost/mpl/aux_/arg_typedef.hpp new file mode 100644 index 0000000..362db16 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/arg_typedef.hpp @@ -0,0 +1,31 @@ + +#ifndef BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED +#define BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + +# define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) typedef T name; + +#else + +# define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) /**/ + +#endif + +#endif // BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/arity.hpp b/contrib/src/boost/mpl/aux_/arity.hpp new file mode 100644 index 0000000..d13ab4a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/arity.hpp @@ -0,0 +1,39 @@ + +#ifndef BOOST_MPL_AUX_ARITY_HPP_INCLUDED +#define BOOST_MPL_AUX_ARITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) + +# include +# include + +namespace boost { namespace mpl { namespace aux { + +// agurt, 15/mar/02: it's possible to implement the template so that it will +// "just work" and do not require any specialization, but not on the compilers +// that require the arity workaround in the first place +template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct arity +{ + BOOST_STATIC_CONSTANT(int, value = N); +}; + +}}} + +#endif // BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES + +#endif // BOOST_MPL_AUX_ARITY_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/arity_spec.hpp b/contrib/src/boost/mpl/aux_/arity_spec.hpp new file mode 100644 index 0000000..7c82214 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/arity_spec.hpp @@ -0,0 +1,67 @@ + +#ifndef BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED +#define BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) \ +namespace aux { \ +template< BOOST_MPL_AUX_NTTP_DECL(int, N), BOOST_MPL_PP_PARAMS(i,type T) > \ +struct arity< \ + name< BOOST_MPL_PP_PARAMS(i,T) > \ + , N \ + > \ +{ \ + BOOST_STATIC_CONSTANT(int \ + , value = BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + ); \ +}; \ +} \ +/**/ +#else +# define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) /**/ +#endif + +# define BOOST_MPL_AUX_ARITY_SPEC(i,name) \ + BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,typename,name) \ +/**/ + + +#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ + && !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) \ +namespace aux { \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +struct template_arity< name > \ + : int_ \ +{ \ +}; \ +} \ +/**/ +#else +# define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/ +#endif + + +#endif // BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/common_name_wknd.hpp b/contrib/src/boost/mpl/aux_/common_name_wknd.hpp new file mode 100644 index 0000000..00758b2 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/common_name_wknd.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED +#define BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if BOOST_WORKAROUND(__BORLANDC__, < 0x561) +// agurt, 12/nov/02: to suppress the bogus "Cannot have both a template class +// and function named 'xxx'" diagnostic +# define BOOST_MPL_AUX_COMMON_NAME_WKND(name) \ +namespace name_##wknd { \ +template< typename > void name(); \ +} \ +/**/ + +#else + +# define BOOST_MPL_AUX_COMMON_NAME_WKND(name) /**/ + +#endif // __BORLANDC__ + +#endif // BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/adl.hpp b/contrib/src/boost/mpl/aux_/config/adl.hpp new file mode 100644 index 0000000..e9bdf11 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/adl.hpp @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +// agurt, 25/apr/04: technically, the ADL workaround is only needed for GCC, +// but putting everything expect public, user-specializable metafunctions into +// a separate global namespace has a nice side effect of reducing the length +// of template instantiation symbols, so we apply the workaround on all +// platforms that can handle it + +#if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) \ + && ( BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ + || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ + || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) \ + ) + +# define BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/arrays.hpp b/contrib/src/boost/mpl/aux_/config/arrays.hpp new file mode 100644 index 0000000..a9ea68a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/arrays.hpp @@ -0,0 +1,30 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + ) + +# define BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/bcc.hpp b/contrib/src/boost/mpl/aux_/config/bcc.hpp new file mode 100644 index 0000000..fe4941a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/bcc.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date: 2004-09-02 10:41:37 -0500 (Thu, 02 Sep 2004) $ +// $Revision: 24874 $ + +#include + +#if !defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__BORLANDC__, >= 0x590) \ + && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) + +# define BOOST_MPL_CFG_BCC590_WORKAROUNDS + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/bind.hpp b/contrib/src/boost/mpl/aux_/config/bind.hpp new file mode 100644 index 0000000..10bcb94 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/bind.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED + +// Copyright David Abrahams 2002 +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + ) + +# define BOOST_MPL_CFG_NO_BIND_TEMPLATE + +#endif + +//#define BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +#endif // BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/compiler.hpp b/contrib/src/boost/mpl/aux_/config/compiler.hpp new file mode 100644 index 0000000..7d3e3b6 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/compiler.hpp @@ -0,0 +1,66 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_CFG_COMPILER_DIR) + +# include +# include +# include +# include +# include +# include + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# define BOOST_MPL_CFG_COMPILER_DIR msvc60 + +# elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) +# define BOOST_MPL_CFG_COMPILER_DIR msvc70 + +# elif BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) +# define BOOST_MPL_CFG_COMPILER_DIR gcc + +# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) +# if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define BOOST_MPL_CFG_COMPILER_DIR bcc551 +# elif BOOST_WORKAROUND(__BORLANDC__, >= 0x590) +# define BOOST_MPL_CFG_COMPILER_DIR bcc +# else +# define BOOST_MPL_CFG_COMPILER_DIR bcc_pre590 +# endif + +# elif BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +# define BOOST_MPL_CFG_COMPILER_DIR dmc + +# elif defined(__MWERKS__) +# if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define BOOST_MPL_CFG_COMPILER_DIR mwcw +# else +# define BOOST_MPL_CFG_COMPILER_DIR plain +# endif + +# elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# define BOOST_MPL_CFG_COMPILER_DIR no_ctps + +# elif defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) +# define BOOST_MPL_CFG_COMPILER_DIR no_ttp + +# else +# define BOOST_MPL_CFG_COMPILER_DIR plain +# endif + +#endif // BOOST_MPL_CFG_COMPILER_DIR + +#endif // BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/ctps.hpp b/contrib/src/boost/mpl/aux_/config/ctps.hpp new file mode 100644 index 0000000..af78f47 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/ctps.hpp @@ -0,0 +1,30 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__BORLANDC__, < 0x582) + +# define BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC + +#endif + +// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is defined in + +#endif // BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp b/contrib/src/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp new file mode 100644 index 0000000..9f8ea8c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + +# define BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/dtp.hpp b/contrib/src/boost/mpl/aux_/config/dtp.hpp new file mode 100644 index 0000000..4379b6b --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/dtp.hpp @@ -0,0 +1,46 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +// MWCW 7.x-8.0 "losts" default template parameters of nested class +// templates when their owner classes are passed as arguments to other +// templates; Borland 5.5.1 "forgets" them from the very beginning (if +// the owner class is a class template), and Borland 5.6 isn't even +// able to compile a definition of nested class template with DTP + +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__BORLANDC__, >= 0x560) \ + && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) + +# define BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES + +#endif + + +#if !defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( BOOST_WORKAROUND(__MWERKS__, <= 0x3001) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + || defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ + ) + +# define BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/eti.hpp b/contrib/src/boost/mpl/aux_/config/eti.hpp new file mode 100644 index 0000000..519d433 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/eti.hpp @@ -0,0 +1,47 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +// flags for MSVC 6.5's so-called "early template instantiation bug" +#if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +# define BOOST_MPL_CFG_MSVC_60_ETI_BUG + +#endif + +#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(BOOST_MSVC, == 1300) + +# define BOOST_MPL_CFG_MSVC_70_ETI_BUG + +#endif + +#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \ + || defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \ + ) + +# define BOOST_MPL_CFG_MSVC_ETI_BUG + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/gcc.hpp b/contrib/src/boost/mpl/aux_/config/gcc.hpp new file mode 100644 index 0000000..080495d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/gcc.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if defined(__GNUC__) && !defined(__EDG_VERSION__) +# define BOOST_MPL_CFG_GCC ((__GNUC__ << 8) | __GNUC_MINOR__) +#else +# define BOOST_MPL_CFG_GCC 0 +#endif + +#endif // BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/gpu.hpp b/contrib/src/boost/mpl/aux_/config/gpu.hpp new file mode 100644 index 0000000..0e5ed78 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/gpu.hpp @@ -0,0 +1,35 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED + +// Copyright Eric Niebler 2014 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_GPU_ENABLED) \ + +# define BOOST_MPL_CFG_GPU_ENABLED BOOST_GPU_ENABLED + +#endif + +#if defined __CUDACC__ + +# define BOOST_MPL_CFG_GPU 1 + +#else + +# define BOOST_MPL_CFG_GPU 0 + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/has_apply.hpp b/contrib/src/boost/mpl/aux_/config/has_apply.hpp new file mode 100644 index 0000000..4dc01c6 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/has_apply.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) \ + && ( defined(BOOST_MPL_CFG_NO_HAS_XXX) \ + || BOOST_WORKAROUND(__EDG_VERSION__, < 300) \ + || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ + ) + +# define BOOST_MPL_CFG_NO_HAS_APPLY + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/has_xxx.hpp b/contrib/src/boost/mpl/aux_/config/has_xxx.hpp new file mode 100644 index 0000000..b0f2f8c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/has_xxx.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// Copyright David Abrahams 2002-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +// agurt, 11/jan/03: signals a stub-only 'has_xxx' implementation + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) \ + && ( defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \ + || BOOST_WORKAROUND(__GNUC__, <= 2) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ + ) + +# define BOOST_MPL_CFG_NO_HAS_XXX +# define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/integral.hpp b/contrib/src/boost/mpl/aux_/config/integral.hpp new file mode 100644 index 0000000..144542d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/integral.hpp @@ -0,0 +1,38 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if !defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) + +# define BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS + +#endif + +#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ + ) + +# define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/intel.hpp b/contrib/src/boost/mpl/aux_/config/intel.hpp new file mode 100644 index 0000000..5bd9159 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/intel.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + + +// BOOST_INTEL_CXX_VERSION is defined here: +#include + +#endif // BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/lambda.hpp b/contrib/src/boost/mpl/aux_/config/lambda.hpp new file mode 100644 index 0000000..93fbafe --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/lambda.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +// agurt, 15/jan/02: full-fledged implementation requires both +// template template parameters _and_ partial specialization + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ + && ( defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ + || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + ) + +# define BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/msvc.hpp b/contrib/src/boost/mpl/aux_/config/msvc.hpp new file mode 100644 index 0000000..8a6b924 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/msvc.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + + +// BOOST_MSVC is defined here: +#include + +#endif // BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/msvc_typename.hpp b/contrib/src/boost/mpl/aux_/config/msvc_typename.hpp new file mode 100644 index 0000000..feedc16 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/msvc_typename.hpp @@ -0,0 +1,26 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +# define BOOST_MSVC_TYPENAME +#else +# define BOOST_MSVC_TYPENAME typename +#endif + +#endif // BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/nttp.hpp b/contrib/src/boost/mpl/aux_/config/nttp.hpp new file mode 100644 index 0000000..11125a9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/nttp.hpp @@ -0,0 +1,41 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +// MSVC 6.5 ICE-s on the code as simple as this (see "aux_/nttp_decl.hpp" +// for a workaround): +// +// namespace std { +// template< typename Char > struct string; +// } +// +// void foo(std::string); +// +// namespace boost { namespace mpl { +// template< int > struct arg; +// }} + +#if !defined(BOOST_MPL_CFG_NTTP_BUG) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +# define BOOST_MPL_CFG_NTTP_BUG + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/overload_resolution.hpp b/contrib/src/boost/mpl/aux_/config/overload_resolution.hpp new file mode 100644 index 0000000..61e4486 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/overload_resolution.hpp @@ -0,0 +1,29 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( BOOST_WORKAROUND(__BORLANDC__, < 0x590) \ + || BOOST_WORKAROUND(__MWERKS__, < 0x3001) \ + ) + +# define BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/pp_counter.hpp b/contrib/src/boost/mpl/aux_/config/pp_counter.hpp new file mode 100644 index 0000000..e7fb8d6 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/pp_counter.hpp @@ -0,0 +1,26 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_AUX_PP_COUNTER) +# include +# if BOOST_WORKAROUND(BOOST_MSVC, >= 1300) +# define BOOST_MPL_AUX_PP_COUNTER() __COUNTER__ +# else +# define BOOST_MPL_AUX_PP_COUNTER() __LINE__ +# endif +#endif + +#endif // BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/preprocessor.hpp b/contrib/src/boost/mpl/aux_/config/preprocessor.hpp new file mode 100644 index 0000000..82ebc68 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/preprocessor.hpp @@ -0,0 +1,39 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) \ + && ( BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \ + || BOOST_WORKAROUND(__BORLANDC__, < 0x582) \ + || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \ + ) + +# define BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION + +#endif + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) +# define BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES +#endif + +#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) \ + && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +# define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING +#endif + + +#endif // BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/static_constant.hpp b/contrib/src/boost/mpl/aux_/config/static_constant.hpp new file mode 100644 index 0000000..ece38fb --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/static_constant.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +// BOOST_STATIC_CONSTANT is defined here: +# include +#else +// undef the macro for the preprocessing mode +# undef BOOST_STATIC_CONSTANT +#endif + +#endif // BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/ttp.hpp b/contrib/src/boost/mpl/aux_/config/ttp.hpp new file mode 100644 index 0000000..3aff3f8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/ttp.hpp @@ -0,0 +1,41 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ + && ( defined(BOOST_NO_TEMPLATE_TEMPLATES) \ + || BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x590) ) \ + ) + +# define BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS + +#endif + + +#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + ) + +# define BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/use_preprocessed.hpp b/contrib/src/boost/mpl/aux_/config/use_preprocessed.hpp new file mode 100644 index 0000000..8fd5c60 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/use_preprocessed.hpp @@ -0,0 +1,19 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +// #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/config/workaround.hpp b/contrib/src/boost/mpl/aux_/config/workaround.hpp new file mode 100644 index 0000000..82c6329 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/config/workaround.hpp @@ -0,0 +1,19 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#endif // BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/count_args.hpp b/contrib/src/boost/mpl/aux_/count_args.hpp new file mode 100644 index 0000000..b432d37 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/count_args.hpp @@ -0,0 +1,105 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !defined(AUX778076_COUNT_ARGS_PARAM_NAME) +# define AUX778076_COUNT_ARGS_PARAM_NAME T +#endif + +#if !defined(AUX778076_COUNT_ARGS_TEMPLATE_PARAM) +# define AUX778076_COUNT_ARGS_TEMPLATE_PARAM typename AUX778076_COUNT_ARGS_PARAM_NAME +#endif + +// local macros, #undef-ined at the end of the header + +#if !defined(AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES) + +# include +# include + +# define AUX778076_COUNT_ARGS_REPEAT BOOST_MPL_PP_REPEAT +# define AUX778076_COUNT_ARGS_PARAMS(param) \ + BOOST_MPL_PP_PARAMS( \ + AUX778076_COUNT_ARGS_ARITY \ + , param \ + ) \ + /**/ + +#else + +# include +# include +# include + +# define AUX778076_COUNT_ARGS_REPEAT BOOST_PP_REPEAT +# define AUX778076_COUNT_ARGS_PARAMS(param) \ + BOOST_PP_ENUM_SHIFTED_PARAMS( \ + BOOST_PP_INC(AUX778076_COUNT_ARGS_ARITY) \ + , param \ + ) \ + /**/ + +#endif // AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES + + +#define AUX778076_IS_ARG_TEMPLATE_NAME \ + BOOST_PP_CAT(is_,BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_arg)) \ +/**/ + +#define AUX778076_COUNT_ARGS_FUNC(unused, i, param) \ + BOOST_PP_EXPR_IF(i, +) \ + AUX778076_IS_ARG_TEMPLATE_NAME::value \ +/**/ + +// is__arg +template< AUX778076_COUNT_ARGS_TEMPLATE_PARAM > +struct AUX778076_IS_ARG_TEMPLATE_NAME +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct AUX778076_IS_ARG_TEMPLATE_NAME +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +// _count_args +template< + AUX778076_COUNT_ARGS_PARAMS(AUX778076_COUNT_ARGS_TEMPLATE_PARAM) + > +struct BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_count_args) +{ + BOOST_STATIC_CONSTANT(int, value = AUX778076_COUNT_ARGS_REPEAT( + AUX778076_COUNT_ARGS_ARITY + , AUX778076_COUNT_ARGS_FUNC + , AUX778076_COUNT_ARGS_PARAM_NAME + )); +}; + +#undef AUX778076_COUNT_ARGS_FUNC +#undef AUX778076_IS_ARG_TEMPLATE_NAME +#undef AUX778076_COUNT_ARGS_PARAMS +#undef AUX778076_COUNT_ARGS_REPEAT + +#undef AUX778076_COUNT_ARGS_ARITY +#undef AUX778076_COUNT_ARGS_DEFAULT +#undef AUX778076_COUNT_ARGS_PREFIX +#undef AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES +#undef AUX778076_COUNT_ARGS_TEMPLATE_PARAM +#undef AUX778076_COUNT_ARGS_PARAM_NAME diff --git a/contrib/src/boost/mpl/aux_/full_lambda.hpp b/contrib/src/boost/mpl/aux_/full_lambda.hpp new file mode 100644 index 0000000..918aff5 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/full_lambda.hpp @@ -0,0 +1,354 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED +#define BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +# include +# endif +#endif + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER full_lambda.hpp +# include + +#else + +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +# define AUX778076_LAMBDA_PARAMS(i_, param) \ + BOOST_MPL_PP_PARAMS(i_, param) \ + /**/ + +# define AUX778076_BIND_PARAMS(param) \ + BOOST_MPL_PP_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + ) \ + /**/ + +# define AUX778076_BIND_N_PARAMS(i_, param) \ + BOOST_PP_COMMA_IF(i_) \ + BOOST_MPL_PP_PARAMS(i_, param) \ + /**/ + +# define AUX778076_ARITY_PARAM(param) \ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) \ + /**/ + + +#define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY +namespace aux { + +template< + BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false) + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) > + : false_ +{ +}; + +} // namespace aux +#undef n_ + +template< + typename T + , typename Tag + AUX778076_ARITY_PARAM(typename Arity) + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + + +template< int N, typename Tag > +struct lambda< arg,Tag AUX778076_ARITY_PARAM(int_<-1>) > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect,Tag AUX778076_ARITY_PARAM(int_<1>) > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form +template< + typename F, AUX778076_BIND_PARAMS(typename T) + , typename Tag + > +struct lambda< + bind + , Tag + AUX778076_ARITY_PARAM(int_) + > +{ + typedef false_ is_le; + typedef bind result_; + typedef result_ type; +}; + + +#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) + +template< + typename F + , typename Tag1 + , typename Tag2 + , typename Arity + > +struct lambda< + lambda + , Tag2 + , int_<3> + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + + typedef typename l1::is_le is_le; + typedef bind1< quote1, typename l1::result_ > arity_; + typedef lambda< typename if_::type,Tag2 > l3; + + typedef aux::le_result3 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +#elif !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +#endif + +# undef AUX778076_ARITY_PARAM +# undef AUX778076_BIND_N_PARAMS +# undef AUX778076_BIND_PARAMS +# undef AUX778076_LAMBDA_PARAMS + +#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +BOOST_MPL_AUX_NA_SPEC(2, lambda) +#else +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) +#endif + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 +#define i_ BOOST_PP_FRAME_ITERATION(1) + +#if i_ > 0 + +namespace aux { + +# define AUX778076_RESULT(unused, i_, T) \ + BOOST_PP_COMMA_IF(i_) \ + typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::result_ \ + /**/ + +# define AUX778076_TYPE(unused, i_, T) \ + BOOST_PP_COMMA_IF(i_) \ + typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::type \ + /**/ + +template< + typename IsLE, typename Tag + , template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F + , AUX778076_LAMBDA_PARAMS(i_, typename L) + > +struct BOOST_PP_CAT(le_result,i_) +{ + typedef F< + BOOST_MPL_PP_REPEAT(i_, AUX778076_TYPE, L) + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F + , AUX778076_LAMBDA_PARAMS(i_, typename L) + > +struct BOOST_PP_CAT(le_result,i_)< true_,Tag,F,AUX778076_LAMBDA_PARAMS(i_, L) > +{ + typedef BOOST_PP_CAT(bind,i_)< + BOOST_PP_CAT(quote,i_) + , BOOST_MPL_PP_REPEAT(i_, AUX778076_RESULT, L) + > result_; + + typedef mpl::protect type; +}; + +# undef AUX778076_TYPE +# undef AUX778076_RESULT + +} // namespace aux + + +# define AUX778076_LAMBDA_TYPEDEF(unused, i_, T) \ + typedef lambda< BOOST_PP_CAT(T, BOOST_PP_INC(i_)), Tag > \ + BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \ +/**/ + +# define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \ + typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \ + BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \ +/**/ + +# define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \ + BOOST_PP_COMMA_IF(i_) \ + BOOST_PP_CAT(is_le,BOOST_PP_INC(i_))::value \ +/**/ + +template< + template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F + , AUX778076_LAMBDA_PARAMS(i_, typename T) + , typename Tag + > +struct lambda< + F + , Tag + AUX778076_ARITY_PARAM(int_) + > +{ + BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, T) + BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused) + + typedef typename aux::lambda_or< + BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused) + >::type is_le; + + typedef aux::BOOST_PP_CAT(le_result,i_)< + is_le, Tag, F, AUX778076_LAMBDA_PARAMS(i_, l) + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + + +# undef AUX778076_IS_LAMBDA_EXPR +# undef AUX778076_IS_LE_TYPEDEF +# undef AUX778076_LAMBDA_TYPEDEF + +#endif // i_ > 0 + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) + , typename Tag + > +struct lambda< + BOOST_PP_CAT(bind,i_) + , Tag + AUX778076_ARITY_PARAM(int_) + > +{ + typedef false_ is_le; + typedef BOOST_PP_CAT(bind,i_)< + F + AUX778076_BIND_N_PARAMS(i_, T) + > result_; + + typedef result_ type; +}; + +#undef i_ +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/mpl/aux_/has_apply.hpp b/contrib/src/boost/mpl/aux_/has_apply.hpp new file mode 100644 index 0000000..9c16a35 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/has_apply.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED +#define BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { namespace aux { +#if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false) +#else +template< typename T, typename fallback_ = false_ > +struct has_apply + : fallback_ +{ +}; +#endif +}}} + +#endif // BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/has_rebind.hpp b/contrib/src/boost/mpl/aux_/has_rebind.hpp new file mode 100644 index 0000000..eb4eda6 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/has_rebind.hpp @@ -0,0 +1,99 @@ + +#ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED +#define BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) +# include +#elif BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# include +# include +# include +# include +#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) +# include +# include +# include +# include +# include +#else +# include +# include +# include +#endif + +namespace boost { namespace mpl { namespace aux { + +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) + +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false) + +#elif BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false) + +template< typename T > +struct has_rebind + : if_< + msvc_is_class + , has_rebind_impl + , bool_ + >::type +{ +}; + +#else // the rest + +template< typename T > struct has_rebind_tag {}; +no_tag operator|(has_rebind_tag, void const volatile*); + +# if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) +template< typename T > +struct has_rebind +{ + static has_rebind_tag* get(); + BOOST_STATIC_CONSTANT(bool, value = + sizeof(has_rebind_tag() | get()) == sizeof(yes_tag) + ); +}; +# else // __BORLANDC__ +template< typename T > +struct has_rebind_impl +{ + static T* get(); + BOOST_STATIC_CONSTANT(bool, value = + sizeof(has_rebind_tag() | get()) == sizeof(yes_tag) + ); +}; + +template< typename T > +struct has_rebind + : if_< + is_class + , has_rebind_impl + , bool_ + >::type +{ +}; +# endif // __BORLANDC__ + +#endif + +}}} + +#endif // BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/has_type.hpp b/contrib/src/boost/mpl/aux_/has_type.hpp new file mode 100644 index 0000000..6744ef5 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/has_type.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED +#define BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +namespace boost { namespace mpl { namespace aux { +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_type, type, true) +}}} + +#endif // BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/include_preprocessed.hpp b/contrib/src/boost/mpl/aux_/include_preprocessed.hpp new file mode 100644 index 0000000..c13434c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/include_preprocessed.hpp @@ -0,0 +1,42 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) +# define AUX778076_PREPROCESSED_HEADER \ + BOOST_MPL_CFG_COMPILER_DIR/BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#else +# define AUX778076_PREPROCESSED_HEADER \ + BOOST_PP_CAT(BOOST_MPL_CFG_COMPILER_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#endif + +#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) +# define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER) +# include AUX778076_INCLUDE_STRING +# undef AUX778076_INCLUDE_STRING +#else +# include BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER) +#endif + +# undef AUX778076_PREPROCESSED_HEADER + +#undef BOOST_MPL_PREPROCESSED_HEADER diff --git a/contrib/src/boost/mpl/aux_/integral_wrapper.hpp b/contrib/src/boost/mpl/aux_/integral_wrapper.hpp new file mode 100644 index 0000000..6bc05f7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/integral_wrapper.hpp @@ -0,0 +1,93 @@ + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +#include +#include +#include +#include +#include + +#include + +#if !defined(AUX_WRAPPER_NAME) +# define AUX_WRAPPER_NAME BOOST_PP_CAT(AUX_WRAPPER_VALUE_TYPE,_) +#endif + +#if !defined(AUX_WRAPPER_PARAMS) +# define AUX_WRAPPER_PARAMS(N) BOOST_MPL_AUX_NTTP_DECL(AUX_WRAPPER_VALUE_TYPE, N) +#endif + +#if !defined(AUX_WRAPPER_INST) +# if BOOST_WORKAROUND(__MWERKS__, <= 0x2407) +# define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< value > +# else +# define AUX_WRAPPER_INST(value) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::AUX_WRAPPER_NAME< value > +# endif +#endif + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< AUX_WRAPPER_PARAMS(N) > +struct AUX_WRAPPER_NAME +{ + BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, value = N); +// agurt, 08/mar/03: SGI MIPSpro C++ workaround, have to #ifdef because some +// other compilers (e.g. MSVC) are not particulary happy about it +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + typedef struct AUX_WRAPPER_NAME type; +#else + typedef AUX_WRAPPER_NAME type; +#endif + typedef AUX_WRAPPER_VALUE_TYPE value_type; + typedef integral_c_tag tag; + +// have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC), +// while some other don't like 'value + 1' (Borland), and some don't like +// either +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) + private: + BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1))); + BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1))); + public: + typedef AUX_WRAPPER_INST(next_value) next; + typedef AUX_WRAPPER_INST(prior_value) prior; +#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ + || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \ + || (BOOST_WORKAROUND(__HP_aCC, <= 53800) && (BOOST_WORKAROUND(__hpxstd98, != 1))) + typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)) ) next; + typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)) ) prior; +#else + typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value + 1)) ) next; + typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior; +#endif + + // enables uniform function call syntax for families of overloaded + // functions that return objects of both arithmetic ('int', 'long', + // 'double', etc.) and wrapped integral types (for an example, see + // "mpl/example/power.cpp") + BOOST_CONSTEXPR operator AUX_WRAPPER_VALUE_TYPE() const { return static_cast(this->value); } +}; + +#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) +template< AUX_WRAPPER_PARAMS(N) > +AUX_WRAPPER_VALUE_TYPE const AUX_WRAPPER_INST(N)::value; +#endif + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#undef AUX_WRAPPER_NAME +#undef AUX_WRAPPER_PARAMS +#undef AUX_WRAPPER_INST +#undef AUX_WRAPPER_VALUE_TYPE diff --git a/contrib/src/boost/mpl/aux_/lambda_arity_param.hpp b/contrib/src/boost/mpl/aux_/lambda_arity_param.hpp new file mode 100644 index 0000000..63cfcd4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/lambda_arity_param.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED +#define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +# define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) +#else +# define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) , param +#endif + +#endif // BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/lambda_no_ctps.hpp b/contrib/src/boost/mpl/aux_/lambda_no_ctps.hpp new file mode 100644 index 0000000..9e0d020 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/lambda_no_ctps.hpp @@ -0,0 +1,193 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED +#define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER lambda_no_ctps.hpp +# include + +#else + +# include +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +namespace boost { namespace mpl { + +# define AUX778076_LAMBDA_PARAMS(i_, param) \ + BOOST_MPL_PP_PARAMS(i_, param) \ + /**/ + +namespace aux { + +#define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY +template< + BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false) + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) > + : false_ +{ +}; +#undef n_ + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +# undef AUX778076_LAMBDA_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED + +///// iteration, depth == 1 + +#else + +#define i_ BOOST_PP_FRAME_ITERATION(1) + +# define AUX778076_LAMBDA_TYPEDEF(unused, i_, F) \ + typedef lambda< \ + typename F::BOOST_PP_CAT(arg,BOOST_PP_INC(i_)) \ + , Tag \ + , false_ \ + > BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \ + /**/ + +# define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \ + typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \ + BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \ + /**/ + +# define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \ + BOOST_PP_COMMA_IF(i_) \ + BOOST_MPL_AUX_MSVC_VALUE_WKND(BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)))::value \ + /**/ + +# define AUX778076_LAMBDA_RESULT(unused, i_, unused2) \ + , typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::type \ + /**/ + +template<> struct lambda_impl< int_ > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, F) + BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused) + + typedef aux::lambda_or< + BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused) + > is_le; + + typedef BOOST_PP_CAT(bind,i_)< + typename F::rebind + BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_RESULT, unused) + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +# undef AUX778076_LAMBDA_RESULT +# undef AUX778076_IS_LAMBDA_EXPR +# undef AUX778076_IS_LE_TYPEDEF +# undef AUX778076_LAMBDA_TYPEDEF + +#undef i_ + +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/mpl/aux_/lambda_support.hpp b/contrib/src/boost/mpl/aux_/lambda_support.hpp new file mode 100644 index 0000000..5b2af58 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/lambda_support.hpp @@ -0,0 +1,169 @@ + +#ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED +#define BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) /**/ +# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) /**/ + +#else + +# include +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC(R,typedef_,i,param) \ + typedef_ param BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \ + /**/ + +// agurt, 07/mar/03: restore an old revision for the sake of SGI MIPSpro C++ +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ + typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_ arity; \ + BOOST_PP_LIST_FOR_EACH_I_R( \ + 1 \ + , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ + , typedef \ + , BOOST_PP_TUPLE_TO_LIST(i,params) \ + ) \ + struct rebind \ + { \ + template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ + : name< BOOST_MPL_PP_PARAMS(i,U) > \ + { \ + }; \ + }; \ + /**/ + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ + /**/ + +#elif BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) +// agurt, 18/jan/03: old EDG-based compilers actually enforce 11.4 para 9 +// (in strict mode), so we have to provide an alternative to the +// MSVC-optimized implementation + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ + typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_ arity; \ + BOOST_PP_LIST_FOR_EACH_I_R( \ + 1 \ + , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ + , typedef \ + , BOOST_PP_TUPLE_TO_LIST(i,params) \ + ) \ + struct rebind; \ +/**/ + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ +}; \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +struct name::rebind \ +{ \ + template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ + : name< BOOST_MPL_PP_PARAMS(i,U) > \ + { \ + }; \ +/**/ + +#else // __EDG_VERSION__ + +namespace boost { namespace mpl { namespace aux { +template< typename T > struct has_rebind_tag; +}}} + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ + typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_ arity; \ + BOOST_PP_LIST_FOR_EACH_I_R( \ + 1 \ + , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ + , typedef \ + , BOOST_PP_TUPLE_TO_LIST(i,params) \ + ) \ + friend class BOOST_PP_CAT(name,_rebind); \ + typedef BOOST_PP_CAT(name,_rebind) rebind; \ +/**/ + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +::boost::mpl::aux::yes_tag operator|( \ + ::boost::mpl::aux::has_rebind_tag \ + , name* \ + ); \ +::boost::mpl::aux::no_tag operator|( \ + ::boost::mpl::aux::has_rebind_tag \ + , name< BOOST_MPL_PP_ENUM(i,::boost::mpl::na) >* \ + ); \ +/**/ +#elif !BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +::boost::mpl::aux::yes_tag operator|( \ + ::boost::mpl::aux::has_rebind_tag \ + , ::boost::mpl::aux::has_rebind_tag< name >* \ + ); \ +/**/ +#else +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) /**/ +#endif + +# if !defined(__BORLANDC__) +# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ +}; \ +BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +class BOOST_PP_CAT(name,_rebind) \ +{ \ + public: \ + template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ + : name< BOOST_MPL_PP_PARAMS(i,U) > \ + { \ + }; \ +/**/ +# else +# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ +}; \ +BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +class BOOST_PP_CAT(name,_rebind) \ +{ \ + public: \ + template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ + { \ + typedef typename name< BOOST_MPL_PP_PARAMS(i,U) >::type type; \ + }; \ +/**/ +# endif // __BORLANDC__ + +#endif // __EDG_VERSION__ + +#endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +#endif // BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/logical_op.hpp b/contrib/src/boost/mpl/aux_/logical_op.hpp new file mode 100644 index 0000000..0ba2510 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/logical_op.hpp @@ -0,0 +1,165 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace boost { namespace mpl { + +# define AUX778076_PARAMS(param, sub) \ + BOOST_MPL_PP_PARAMS( \ + BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, sub) \ + , param \ + ) \ + /**/ + +# define AUX778076_SHIFTED_PARAMS(param, sub) \ + BOOST_MPL_PP_EXT_PARAMS( \ + 2, BOOST_MPL_PP_SUB(BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY), sub) \ + , param \ + ) \ + /**/ + +# define AUX778076_SPEC_PARAMS(param) \ + BOOST_MPL_PP_ENUM( \ + BOOST_PP_DEC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ + , param \ + ) \ + /**/ + +namespace aux { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< bool C_, AUX778076_PARAMS(typename T, 1) > +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) + : BOOST_PP_CAT(AUX778076_OP_VALUE1,_) +{ +}; + +template< AUX778076_PARAMS(typename T, 1) > +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< AUX778076_OP_VALUE2,AUX778076_PARAMS(T, 1) > + : BOOST_PP_CAT(AUX778076_OP_NAME,impl)< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , AUX778076_SHIFTED_PARAMS(T, 1) + , BOOST_PP_CAT(AUX778076_OP_VALUE2,_) + > +{ +}; + +template<> +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< + AUX778076_OP_VALUE2 + , AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) + > + : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) +{ +}; + +#else + +template< bool C_ > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) +{ + template< AUX778076_PARAMS(typename T, 1) > struct result_ + : BOOST_PP_CAT(AUX778076_OP_VALUE1,_) + { + }; +}; + +template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) +{ + template< AUX778076_PARAMS(typename T, 1) > struct result_ + : BOOST_PP_CAT(AUX778076_OP_NAME,impl)< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< AUX778076_SHIFTED_PARAMS(T,1),BOOST_PP_CAT(AUX778076_OP_VALUE2,_) > + { + }; + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) + template<> struct result_ + : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) + { + }; +}; +#else +}; + +template<> +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) + ::result_< AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) > + : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) +{ +}; +#endif // BOOST_MSVC == 1300 + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename T, BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) + > +struct AUX778076_OP_NAME +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , AUX778076_SHIFTED_PARAMS(T,0) + > +#else + : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< AUX778076_SHIFTED_PARAMS(T,0) > +#endif +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + BOOST_MPL_LIMIT_METAFUNCTION_ARITY + , AUX778076_OP_NAME + , (AUX778076_PARAMS(T, 0)) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , BOOST_MPL_LIMIT_METAFUNCTION_ARITY + , AUX778076_OP_NAME + ) + +}} + +#undef AUX778076_SPEC_PARAMS +#undef AUX778076_SHIFTED_PARAMS +#undef AUX778076_PARAMS +#undef AUX778076_OP_NAME +#undef AUX778076_OP_VALUE1 +#undef AUX778076_OP_VALUE2 diff --git a/contrib/src/boost/mpl/aux_/msvc_dtw.hpp b/contrib/src/boost/mpl/aux_/msvc_dtw.hpp new file mode 100644 index 0000000..d595b23 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/msvc_dtw.hpp @@ -0,0 +1,68 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +#include + +// local macros, #undef-ined at the end of the header +#define AUX778076_DTW_PARAMS(param) \ + BOOST_MPL_PP_PARAMS(AUX778076_MSVC_DTW_ARITY, param) \ +/**/ + +#define AUX778076_DTW_ORIGINAL_NAME \ + AUX778076_MSVC_DTW_ORIGINAL_NAME \ +/**/ + +// warning: not a well-formed C++ +// workaround for MSVC 6.5's "dependent template typedef bug" + +template< typename F> +struct AUX778076_MSVC_DTW_NAME +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { +#if AUX778076_MSVC_DTW_ARITY > 0 + template< AUX778076_DTW_PARAMS(typename P) > struct AUX778076_DTW_ORIGINAL_NAME + { + typedef int type; + }; + }; + + template< AUX778076_DTW_PARAMS(typename T) > struct result_ + : f_< aux::msvc_never_true::value > + ::template AUX778076_DTW_ORIGINAL_NAME< AUX778076_DTW_PARAMS(T) > + { + }; +#else + template< typename P = int > struct AUX778076_DTW_ORIGINAL_NAME + { + typedef int type; + }; + }; + + template< typename T = int > struct result_ + : f_< aux::msvc_never_true::value > + ::template AUX778076_DTW_ORIGINAL_NAME<> + { + }; +#endif +}; + +#undef AUX778076_DTW_ORIGINAL_NAME +#undef AUX778076_DTW_PARAMS + +#undef AUX778076_MSVC_DTW_NAME +#undef AUX778076_MSVC_DTW_ORIGINAL_NAME +#undef AUX778076_MSVC_DTW_ARITY diff --git a/contrib/src/boost/mpl/aux_/msvc_is_class.hpp b/contrib/src/boost/mpl/aux_/msvc_is_class.hpp new file mode 100644 index 0000000..acd40e3 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/msvc_is_class.hpp @@ -0,0 +1,58 @@ + +#ifndef BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED +#define BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +#include + +namespace boost { namespace mpl { namespace aux { + +template< typename T > struct is_class_helper +{ + typedef int (T::* type)(); +}; + +// MSVC 6.x-specific lightweight 'is_class' implementation; +// Distinguishing feature: does not instantiate the type being tested. +template< typename T > +struct msvc_is_class_impl +{ + template< typename U> + static yes_tag test(type_wrapper*, /*typename*/ is_class_helper::type = 0); + static no_tag test(void const volatile*, ...); + + enum { value = sizeof(test((type_wrapper*)0)) == sizeof(yes_tag) }; + typedef bool_ type; +}; + +// agurt, 17/sep/04: have to check for 'is_reference' upfront to avoid ICEs in +// complex metaprograms +template< typename T > +struct msvc_is_class + : if_< + is_reference + , false_ + , msvc_is_class_impl + >::type +{ +}; + +}}} + +#endif // BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/msvc_never_true.hpp b/contrib/src/boost/mpl/aux_/msvc_never_true.hpp new file mode 100644 index 0000000..2df9b81 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/msvc_never_true.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED +#define BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + +namespace boost { namespace mpl { namespace aux { + +template< typename T > +struct msvc_never_true +{ + enum { value = false }; +}; + +}}} + +#endif // BOOST_MSVC + +#endif // BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/na.hpp b/contrib/src/boost/mpl/aux_/na.hpp new file mode 100644 index 0000000..f079c1e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/na.hpp @@ -0,0 +1,95 @@ + +#ifndef BOOST_MPL_AUX_NA_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< typename T > +struct is_na + : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using false_::value; +#endif +}; + +template<> +struct is_na + : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using true_::value; +#endif +}; + +template< typename T > +struct is_not_na + : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using true_::value; +#endif +}; + +template<> +struct is_not_na + : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using false_::value; +#endif +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +template< typename T, typename U > struct if_na +{ + typedef T type; +}; + +template< typename U > struct if_na +{ + typedef U type; +}; +#else +template< typename T > struct if_na_impl +{ + template< typename U > struct apply + { + typedef T type; + }; +}; + +template<> struct if_na_impl +{ + template< typename U > struct apply + { + typedef U type; + }; +}; + +template< typename T, typename U > struct if_na + : if_na_impl::template apply +{ +}; +#endif + +}} + +#endif // BOOST_MPL_AUX_NA_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/na_assert.hpp b/contrib/src/boost/mpl/aux_/na_assert.hpp new file mode 100644 index 0000000..1983c09 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/na_assert.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !BOOST_WORKAROUND(_MSC_FULL_VER, <= 140050601) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 243) +# include +# define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \ + BOOST_MPL_ASSERT_NOT((boost::mpl::is_na)) \ +/**/ +#else +# include +# define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \ + BOOST_STATIC_ASSERT(!boost::mpl::is_na::value) \ +/**/ +#endif + +#endif // BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/na_fwd.hpp b/contrib/src/boost/mpl/aux_/na_fwd.hpp new file mode 100644 index 0000000..4388241 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/na_fwd.hpp @@ -0,0 +1,31 @@ + +#ifndef BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +// n.a. == not available +struct na +{ + typedef na type; + enum { value = 0 }; +}; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(na) + +#endif // BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/na_spec.hpp b/contrib/src/boost/mpl/aux_/na_spec.hpp new file mode 100644 index 0000000..d052fce --- /dev/null +++ b/contrib/src/boost/mpl/aux_/na_spec.hpp @@ -0,0 +1,175 @@ + +#ifndef BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define BOOST_MPL_AUX_NA_PARAMS(i) \ + BOOST_MPL_PP_ENUM(i, na) \ +/**/ + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ +namespace aux { \ +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \ +struct arity< \ + name< BOOST_MPL_AUX_NA_PARAMS(i) > \ + , N \ + > \ + : int_< BOOST_MPL_LIMIT_METAFUNCTION_ARITY > \ +{ \ +}; \ +} \ +/**/ +#else +# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) /**/ +#endif + +#define BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ +template<> \ +struct name< BOOST_MPL_AUX_NA_PARAMS(i) > \ +{ \ + template< \ + BOOST_MPL_PP_PARAMS(i, typename T) \ + BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \ + > \ + struct apply \ + : name< BOOST_MPL_PP_PARAMS(i, T) > \ + { \ + }; \ +}; \ +/**/ + +#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +template<> \ +struct lambda< \ + name< BOOST_MPL_AUX_NA_PARAMS(i) > \ + , void_ \ + , true_ \ + > \ +{ \ + typedef false_ is_le; \ + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ +}; \ +template<> \ +struct lambda< \ + name< BOOST_MPL_AUX_NA_PARAMS(i) > \ + , void_ \ + , false_ \ + > \ +{ \ + typedef false_ is_le; \ + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ +}; \ +/**/ +#else +# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +template< typename Tag > \ +struct lambda< \ + name< BOOST_MPL_AUX_NA_PARAMS(i) > \ + , Tag \ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \ + > \ +{ \ + typedef false_ is_le; \ + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > result_; \ + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ +}; \ +/**/ +#endif + +#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ + || defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ + && defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) +# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \ +namespace aux { \ +template< BOOST_MPL_PP_PARAMS(j, typename T) > \ +struct template_arity< \ + name< BOOST_MPL_PP_PARAMS(j, T) > \ + > \ + : int_ \ +{ \ +}; \ +\ +template<> \ +struct template_arity< \ + name< BOOST_MPL_PP_ENUM(i, na) > \ + > \ + : int_<-1> \ +{ \ +}; \ +} \ +/**/ +#else +# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) /**/ +#endif + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ +template<> \ +struct name< BOOST_MPL_PP_ENUM(i, int) > \ +{ \ + typedef int type; \ + enum { value = 0 }; \ +}; \ +/**/ +#else +# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) /**/ +#endif + +#define BOOST_MPL_AUX_NA_PARAM(param) param = na + +#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \ +BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ +BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, i, name) \ +/**/ + +#define BOOST_MPL_AUX_NA_SPEC(i, name) \ +BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ +/**/ + +#define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \ +BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ +BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \ +/**/ + + +#endif // BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/nested_type_wknd.hpp b/contrib/src/boost/mpl/aux_/nested_type_wknd.hpp new file mode 100644 index 0000000..4207abd --- /dev/null +++ b/contrib/src/boost/mpl/aux_/nested_type_wknd.hpp @@ -0,0 +1,48 @@ + +#ifndef BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED +#define BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ + || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x530)) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + +namespace boost { namespace mpl { namespace aux { +template< typename T > struct nested_type_wknd + : T::type +{ +}; +}}} + +#if BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \ + aux::nested_type_wknd \ +/**/ +#else +# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \ + ::boost::mpl::aux::nested_type_wknd \ +/**/ +#endif + +#else // !BOOST_MPL_CFG_GCC et al. + +# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) T::type + +#endif + +#endif // BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/nttp_decl.hpp b/contrib/src/boost/mpl/aux_/nttp_decl.hpp new file mode 100644 index 0000000..8c344d8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/nttp_decl.hpp @@ -0,0 +1,35 @@ + +#ifndef BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED +#define BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if defined(BOOST_MPL_CFG_NTTP_BUG) + +typedef bool _mpl_nttp_bool; +typedef int _mpl_nttp_int; +typedef unsigned _mpl_nttp_unsigned; +typedef long _mpl_nttp_long; + +# include +# define BOOST_MPL_AUX_NTTP_DECL(T, x) BOOST_PP_CAT(_mpl_nttp_,T) x /**/ + +#else + +# define BOOST_MPL_AUX_NTTP_DECL(T, x) T x /**/ + +#endif + +#endif // BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp new file mode 100644 index 0000000..5cb50dc --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp new file mode 100644 index 0000000..9654ee3 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/and.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/and.hpp new file mode 100644 index 0000000..f345689 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/apply.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/apply.hpp new file mode 100644 index 0000000..bce7c2c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp new file mode 100644 index 0000000..1ba706f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp new file mode 100644 index 0000000..45b75c7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp @@ -0,0 +1,461 @@ + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + int N, typename F + > +struct apply_wrap_impl0; + +template< typename F, bool F_has_apply > +struct apply_wrap_impl0_bcb { + typedef typename F::template apply type; +}; + +template< typename F > +struct apply_wrap_impl0_bcb< F,true > { + typedef typename F::apply type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 0 + , F + + > +{ + typedef apply_wrap_impl0_bcb< F, aux::has_apply::value >::type type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 1 + , F + + > +{ + typedef typename F::template apply< + + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 2 + , F + + > +{ + typedef typename F::template apply< + + na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 3 + , F + + > +{ + typedef typename F::template apply< + + na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 4 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 5 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap0 + : apply_wrap_impl0< + ::boost::mpl::aux::arity< F,0 >::value + , F + + >::type +{ +}; + +template< + int N, typename F, typename T1 + > +struct apply_wrap_impl1; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 1 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 2 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 3 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 4 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 5 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + : apply_wrap_impl1< + ::boost::mpl::aux::arity< F,1 >::value + , F + , T1 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2 + > +struct apply_wrap_impl2; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 2 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 3 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 4 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 5 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + : apply_wrap_impl2< + ::boost::mpl::aux::arity< F,2 >::value + , F + , T1, T2 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 3 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 4 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 5 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + : apply_wrap_impl3< + ::boost::mpl::aux::arity< F,3 >::value + , F + , T1, T2, T3 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 4 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 5 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + : apply_wrap_impl4< + ::boost::mpl::aux::arity< F,4 >::value + , F + , T1, T2, T3, T4 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5< + 5 + , F + , T1, T2, T3, T4, T5 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + : apply_wrap_impl5< + ::boost::mpl::aux::arity< F,5 >::value + , F + , T1, T2, T3, T4, T5 + >::type +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/arg.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/arg.hpp new file mode 100644 index 0000000..3ac4340 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/arg.hpp @@ -0,0 +1,117 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp new file mode 100644 index 0000000..74b0029 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp @@ -0,0 +1,300 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/bind.hpp new file mode 100644 index 0000000..e769a0c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/bind.hpp @@ -0,0 +1,397 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp new file mode 100644 index 0000000..962b5c9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/bitand.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/bitand.hpp new file mode 100644 index 0000000..527b689 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/bitand.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/bitor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/bitor.hpp new file mode 100644 index 0000000..3f0d5ca --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/bitor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp new file mode 100644 index 0000000..06996c0 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/deque.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/deque.hpp new file mode 100644 index 0000000..06505c9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/divides.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/divides.hpp new file mode 100644 index 0000000..6b4178a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/divides.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp new file mode 100644 index 0000000..901a93c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp new file mode 100644 index 0000000..45ab4e7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp new file mode 100644 index 0000000..8b2bf59 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp @@ -0,0 +1,558 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg,Tag, int_< -1 > > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + , int_<1> + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect,Tag, int_<1> > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +template< + typename F + , typename Tag1 + , typename Tag2 + , typename Arity + > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/greater.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/greater.hpp new file mode 100644 index 0000000..3d1c3dc --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp new file mode 100644 index 0000000..fb01186 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/inherit.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/inherit.hpp new file mode 100644 index 0000000..6adcc01 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/inherit.hpp @@ -0,0 +1,139 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1, typename T2, typename T3, typename T4, typename T5 + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp new file mode 100644 index 0000000..b767e95 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp new file mode 100644 index 0000000..1dd216c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp new file mode 100644 index 0000000..75b30ce --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/less.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/less.hpp new file mode 100644 index 0000000..0b6ce1d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp new file mode 100644 index 0000000..0010e08 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/list.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/list.hpp new file mode 100644 index 0000000..cbd58ac --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/list_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/list_c.hpp new file mode 100644 index 0000000..495c3f7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/map.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/map.hpp new file mode 100644 index 0000000..80ef156 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/minus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/minus.hpp new file mode 100644 index 0000000..cfddc15 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/minus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/modulus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/modulus.hpp new file mode 100644 index 0000000..eb5eff0 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp new file mode 100644 index 0000000..68356ee --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/or.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/or.hpp new file mode 100644 index 0000000..ff7ce9f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp new file mode 100644 index 0000000..b306bbb --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/plus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/plus.hpp new file mode 100644 index 0000000..82539ab --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/plus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/quote.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/quote.hpp new file mode 100644 index 0000000..677a3f9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/quote.hpp @@ -0,0 +1,119 @@ + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > +struct quote_impl + +{ + typedef typename T::type type; +}; + +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + { + typedef typename quote_impl< + F + , aux::has_type< F >::value + >::type type; + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + { + typedef typename quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + >::type type; + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + { + typedef typename quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + >::type type; + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + { + typedef typename quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + >::type type; + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + { + typedef typename quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + >::type type; + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp new file mode 100644 index 0000000..372f0d2 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..44aadf7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< long N > +struct reverse_iter_fold_chunk; + +template<> struct reverse_iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step; + +template< + typename Last + , typename State + > +struct reverse_iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step +{ + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/set.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/set.hpp new file mode 100644 index 0000000..ace3a4f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/set_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/set_c.hpp new file mode 100644 index 0000000..4e6993c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp new file mode 100644 index 0000000..6d19e94 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp new file mode 100644 index 0000000..dd31d97 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp new file mode 100644 index 0000000..b24a0a7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp @@ -0,0 +1,40 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/times.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/times.hpp new file mode 100644 index 0000000..ab100f1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/times.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp new file mode 100644 index 0000000..f391dc1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + { + typedef typename aux::unpack_args_impl< + size::value + , F + , Args + >::type type; + + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/vector.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/vector.hpp new file mode 100644 index 0000000..803e217 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp new file mode 100644 index 0000000..643b7fd --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp new file mode 100644 index 0000000..26de94c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp new file mode 100644 index 0000000..b137cc7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/and.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/and.hpp new file mode 100644 index 0000000..010ad1f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/apply.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/apply.hpp new file mode 100644 index 0000000..e08eacc --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp new file mode 100644 index 0000000..b2ed5d5 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp new file mode 100644 index 0000000..2ffe709 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp @@ -0,0 +1,456 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + int N, typename F + > +struct apply_wrap_impl0; + +template< + typename F + > +struct apply_wrap_impl0< + 0 + , F + + > +{ + typedef typename F::template apply< + +/// since the defaults are "lost", we have to pass *something* even for nullary +/// metafunction classes + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 1 + , F + + > +{ + typedef typename F::template apply< + + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 2 + , F + + > +{ + typedef typename F::template apply< + + na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 3 + , F + + > +{ + typedef typename F::template apply< + + na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 4 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 5 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap0 + : apply_wrap_impl0< + ::boost::mpl::aux::arity< F,0 >::value + , F + + >::type +{ +}; + +template< + int N, typename F, typename T1 + > +struct apply_wrap_impl1; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 1 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 2 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 3 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 4 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 5 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + : apply_wrap_impl1< + ::boost::mpl::aux::arity< F,1 >::value + , F + , T1 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2 + > +struct apply_wrap_impl2; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 2 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 3 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 4 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 5 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + : apply_wrap_impl2< + ::boost::mpl::aux::arity< F,2 >::value + , F + , T1, T2 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 3 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 4 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 5 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + : apply_wrap_impl3< + ::boost::mpl::aux::arity< F,3 >::value + , F + , T1, T2, T3 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 4 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 5 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + : apply_wrap_impl4< + ::boost::mpl::aux::arity< F,4 >::value + , F + , T1, T2, T3, T4 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5< + 5 + , F + , T1, T2, T3, T4, T5 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + : apply_wrap_impl5< + ::boost::mpl::aux::arity< F,5 >::value + , F + , T1, T2, T3, T4, T5 + >::type +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/arg.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/arg.hpp new file mode 100644 index 0000000..6f2f8a8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp new file mode 100644 index 0000000..a29daa0 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp @@ -0,0 +1,306 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bind.hpp new file mode 100644 index 0000000..34b1b5c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bind.hpp @@ -0,0 +1,403 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp new file mode 100644 index 0000000..022cba3 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp new file mode 100644 index 0000000..0bbf54e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp new file mode 100644 index 0000000..55b31cb --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp new file mode 100644 index 0000000..ec19391 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/deque.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/deque.hpp new file mode 100644 index 0000000..de67398 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/divides.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/divides.hpp new file mode 100644 index 0000000..86f1682 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/divides.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp new file mode 100644 index 0000000..62c9945 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp new file mode 100644 index 0000000..9e7a293 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp new file mode 100644 index 0000000..e3eef71 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp @@ -0,0 +1,558 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg,Tag, int_< -1 > > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + , int_<1> + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect,Tag, int_<1> > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +template< + typename F + , typename Tag1 + , typename Tag2 + , typename Arity + > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/greater.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/greater.hpp new file mode 100644 index 0000000..14d8e08 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp new file mode 100644 index 0000000..2603f91 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp new file mode 100644 index 0000000..00f31c4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp new file mode 100644 index 0000000..6951795 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp new file mode 100644 index 0000000..805790e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp new file mode 100644 index 0000000..890a198 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/less.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/less.hpp new file mode 100644 index 0000000..4fe3cd1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp new file mode 100644 index 0000000..ca2894f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/list.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/list.hpp new file mode 100644 index 0000000..4e8ad53 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp new file mode 100644 index 0000000..0b48a7f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/map.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/map.hpp new file mode 100644 index 0000000..837e013 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/minus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/minus.hpp new file mode 100644 index 0000000..71d4913 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/minus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp new file mode 100644 index 0000000..224b349 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp new file mode 100644 index 0000000..98b21b1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/or.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/or.hpp new file mode 100644 index 0000000..31e1aaa --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp new file mode 100644 index 0000000..ff97364 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/plus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/plus.hpp new file mode 100644 index 0000000..a9f6ee7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/plus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/quote.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/quote.hpp new file mode 100644 index 0000000..e7a7f00 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/quote.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp new file mode 100644 index 0000000..7a07414 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..39a4057 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< long N > +struct reverse_iter_fold_chunk; + +template<> struct reverse_iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step; + +template< + typename Last + , typename State + > +struct reverse_iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step +{ + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/set.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/set.hpp new file mode 100644 index 0000000..5721922 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp new file mode 100644 index 0000000..cbeb932 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp new file mode 100644 index 0000000..b5b181c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp new file mode 100644 index 0000000..f7a342e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp new file mode 100644 index 0000000..1164f0f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp @@ -0,0 +1,40 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/times.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/times.hpp new file mode 100644 index 0000000..cb97cc4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/times.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp new file mode 100644 index 0000000..ef7c2b0 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + { + typedef typename aux::unpack_args_impl< + size::value + , F + , Args + >::type type; + + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/vector.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/vector.hpp new file mode 100644 index 0000000..bfa9565 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp new file mode 100644 index 0000000..0f1560d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp new file mode 100644 index 0000000..5cb50dc --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp new file mode 100644 index 0000000..9654ee3 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp new file mode 100644 index 0000000..f345689 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp new file mode 100644 index 0000000..bce7c2c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp new file mode 100644 index 0000000..1ba706f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp new file mode 100644 index 0000000..d88129d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp @@ -0,0 +1,456 @@ + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + int N, typename F + > +struct apply_wrap_impl0; + +template< + typename F + > +struct apply_wrap_impl0< + 0 + , F + + > +{ + typedef typename F::template apply< + +/// since the defaults are "lost", we have to pass *something* even for nullary +/// metafunction classes + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 1 + , F + + > +{ + typedef typename F::template apply< + + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 2 + , F + + > +{ + typedef typename F::template apply< + + na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 3 + , F + + > +{ + typedef typename F::template apply< + + na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 4 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 5 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap0 + : apply_wrap_impl0< + ::boost::mpl::aux::arity< F,0 >::value + , F + + >::type +{ +}; + +template< + int N, typename F, typename T1 + > +struct apply_wrap_impl1; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 1 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 2 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 3 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 4 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 5 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + : apply_wrap_impl1< + ::boost::mpl::aux::arity< F,1 >::value + , F + , T1 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2 + > +struct apply_wrap_impl2; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 2 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 3 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 4 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 5 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + : apply_wrap_impl2< + ::boost::mpl::aux::arity< F,2 >::value + , F + , T1, T2 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 3 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 4 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 5 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + : apply_wrap_impl3< + ::boost::mpl::aux::arity< F,3 >::value + , F + , T1, T2, T3 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 4 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 5 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + : apply_wrap_impl4< + ::boost::mpl::aux::arity< F,4 >::value + , F + , T1, T2, T3, T4 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5< + 5 + , F + , T1, T2, T3, T4, T5 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + : apply_wrap_impl5< + ::boost::mpl::aux::arity< F,5 >::value + , F + , T1, T2, T3, T4, T5 + >::type +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp new file mode 100644 index 0000000..3ac4340 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp @@ -0,0 +1,117 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp new file mode 100644 index 0000000..74b0029 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp @@ -0,0 +1,300 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp new file mode 100644 index 0000000..e769a0c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp @@ -0,0 +1,397 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp new file mode 100644 index 0000000..962b5c9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp new file mode 100644 index 0000000..527b689 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp new file mode 100644 index 0000000..3f0d5ca --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp new file mode 100644 index 0000000..06996c0 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp new file mode 100644 index 0000000..06505c9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp new file mode 100644 index 0000000..6b4178a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp new file mode 100644 index 0000000..901a93c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp new file mode 100644 index 0000000..45ab4e7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp new file mode 100644 index 0000000..8b2bf59 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp @@ -0,0 +1,558 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg,Tag, int_< -1 > > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + , int_<1> + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect,Tag, int_<1> > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +template< + typename F + , typename Tag1 + , typename Tag2 + , typename Arity + > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp new file mode 100644 index 0000000..3d1c3dc --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp new file mode 100644 index 0000000..fb01186 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp new file mode 100644 index 0000000..6adcc01 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp @@ -0,0 +1,139 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1, typename T2, typename T3, typename T4, typename T5 + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp new file mode 100644 index 0000000..b767e95 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp new file mode 100644 index 0000000..1dd216c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp new file mode 100644 index 0000000..75b30ce --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp new file mode 100644 index 0000000..0b6ce1d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp new file mode 100644 index 0000000..0010e08 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp new file mode 100644 index 0000000..cbd58ac --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp new file mode 100644 index 0000000..495c3f7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp new file mode 100644 index 0000000..80ef156 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp new file mode 100644 index 0000000..cfddc15 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp new file mode 100644 index 0000000..eb5eff0 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp new file mode 100644 index 0000000..68356ee --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp new file mode 100644 index 0000000..ff7ce9f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp new file mode 100644 index 0000000..b306bbb --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp new file mode 100644 index 0000000..82539ab --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp new file mode 100644 index 0000000..7f9d18b --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "quote.hpp" header +// -- DO NOT modify by hand! + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp new file mode 100644 index 0000000..372f0d2 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..44aadf7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< long N > +struct reverse_iter_fold_chunk; + +template<> struct reverse_iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step; + +template< + typename Last + , typename State + > +struct reverse_iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step +{ + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp new file mode 100644 index 0000000..ace3a4f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp new file mode 100644 index 0000000..4e6993c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp new file mode 100644 index 0000000..6d19e94 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp new file mode 100644 index 0000000..dd31d97 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp new file mode 100644 index 0000000..b24a0a7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp @@ -0,0 +1,40 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp new file mode 100644 index 0000000..ab100f1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp new file mode 100644 index 0000000..f391dc1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + { + typedef typename aux::unpack_args_impl< + size::value + , F + , Args + >::type type; + + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp new file mode 100644 index 0000000..803e217 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp new file mode 100644 index 0000000..643b7fd --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp new file mode 100644 index 0000000..26de94c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp new file mode 100644 index 0000000..b137cc7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/and.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/and.hpp new file mode 100644 index 0000000..010ad1f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/apply.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/apply.hpp new file mode 100644 index 0000000..e08eacc --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp new file mode 100644 index 0000000..b2ed5d5 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp new file mode 100644 index 0000000..34d51a1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp @@ -0,0 +1,84 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< typename F > +struct apply_wrap0< F,true_ > + : F::apply +{ +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + + : F::template apply +{ +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/arg.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/arg.hpp new file mode 100644 index 0000000..6f2f8a8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp new file mode 100644 index 0000000..1e73429 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp @@ -0,0 +1,406 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F, int dummy_ + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, int dummy_ + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1, int dummy_ + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, int dummy_ + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2, int dummy_ + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, int dummy_ + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/bind.hpp new file mode 100644 index 0000000..94bfe1f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/bind.hpp @@ -0,0 +1,515 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F, int dummy_ + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, int dummy_ + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1, int dummy_ + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, int dummy_ + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2, int dummy_ + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, int dummy_ + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp new file mode 100644 index 0000000..181bc77 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp @@ -0,0 +1,53 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, int dummy_ = 0 + > +struct bind; + +template< + typename F, int dummy_ = 0 + > +struct bind0; + +template< + typename F, typename T1, int dummy_ = 0 + > +struct bind1; + +template< + typename F, typename T1, typename T2, int dummy_ = 0 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ = 0 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ = 0 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ = 0 + > +struct bind5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/bitand.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/bitand.hpp new file mode 100644 index 0000000..0bbf54e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/bitand.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/bitor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/bitor.hpp new file mode 100644 index 0000000..55b31cb --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/bitor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp new file mode 100644 index 0000000..ec19391 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/deque.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/deque.hpp new file mode 100644 index 0000000..de67398 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/divides.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/divides.hpp new file mode 100644 index 0000000..86f1682 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/divides.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp new file mode 100644 index 0000000..62c9945 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp new file mode 100644 index 0000000..9e7a293 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp new file mode 100644 index 0000000..026418c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp @@ -0,0 +1,536 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/greater.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/greater.hpp new file mode 100644 index 0000000..14d8e08 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp new file mode 100644 index 0000000..2603f91 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/inherit.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/inherit.hpp new file mode 100644 index 0000000..00f31c4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp new file mode 100644 index 0000000..6951795 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp new file mode 100644 index 0000000..805790e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp new file mode 100644 index 0000000..890a198 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/less.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/less.hpp new file mode 100644 index 0000000..4fe3cd1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp new file mode 100644 index 0000000..ca2894f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/list.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/list.hpp new file mode 100644 index 0000000..4e8ad53 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/list_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/list_c.hpp new file mode 100644 index 0000000..0b48a7f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/map.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/map.hpp new file mode 100644 index 0000000..837e013 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/minus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/minus.hpp new file mode 100644 index 0000000..71d4913 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/minus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/modulus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/modulus.hpp new file mode 100644 index 0000000..224b349 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp new file mode 100644 index 0000000..98b21b1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/or.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/or.hpp new file mode 100644 index 0000000..31e1aaa --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp new file mode 100644 index 0000000..ff97364 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/plus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/plus.hpp new file mode 100644 index 0000000..a9f6ee7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/plus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/quote.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/quote.hpp new file mode 100644 index 0000000..d7d0420 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/quote.hpp @@ -0,0 +1,123 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > +struct quote_impl + : T +{ +}; + +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< + F + , aux::has_type< F >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > + + { + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp new file mode 100644 index 0000000..c468684 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..658f92a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/set.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/set.hpp new file mode 100644 index 0000000..5721922 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/set_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/set_c.hpp new file mode 100644 index 0000000..cbeb932 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp new file mode 100644 index 0000000..b5b181c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp new file mode 100644 index 0000000..f7a342e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp new file mode 100644 index 0000000..a23fc23 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/times.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/times.hpp new file mode 100644 index 0000000..cb97cc4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/times.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp new file mode 100644 index 0000000..2194ce9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/vector.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/vector.hpp new file mode 100644 index 0000000..bfa9565 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp new file mode 100644 index 0000000..0f1560d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp new file mode 100644 index 0000000..26de94c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp new file mode 100644 index 0000000..b137cc7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/and.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/and.hpp new file mode 100644 index 0000000..010ad1f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/apply.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/apply.hpp new file mode 100644 index 0000000..e08eacc --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp new file mode 100644 index 0000000..b2ed5d5 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp new file mode 100644 index 0000000..34d51a1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp @@ -0,0 +1,84 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< typename F > +struct apply_wrap0< F,true_ > + : F::apply +{ +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + + : F::template apply +{ +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/arg.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/arg.hpp new file mode 100644 index 0000000..6f2f8a8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp new file mode 100644 index 0000000..b070232 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp @@ -0,0 +1,440 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/bind.hpp new file mode 100644 index 0000000..0e9513a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/bind.hpp @@ -0,0 +1,561 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp new file mode 100644 index 0000000..c4a5060 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/bitand.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/bitand.hpp new file mode 100644 index 0000000..0bbf54e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/bitand.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/bitor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/bitor.hpp new file mode 100644 index 0000000..55b31cb --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/bitor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp new file mode 100644 index 0000000..ec19391 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/deque.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/deque.hpp new file mode 100644 index 0000000..de67398 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/divides.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/divides.hpp new file mode 100644 index 0000000..86f1682 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/divides.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp new file mode 100644 index 0000000..62c9945 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp new file mode 100644 index 0000000..9e7a293 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp new file mode 100644 index 0000000..e3eef71 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp @@ -0,0 +1,558 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg,Tag, int_< -1 > > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + , int_<1> + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect,Tag, int_<1> > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +template< + typename F + , typename Tag1 + , typename Tag2 + , typename Arity + > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/greater.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/greater.hpp new file mode 100644 index 0000000..14d8e08 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp new file mode 100644 index 0000000..2603f91 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/inherit.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/inherit.hpp new file mode 100644 index 0000000..00f31c4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp new file mode 100644 index 0000000..6951795 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp new file mode 100644 index 0000000..805790e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp new file mode 100644 index 0000000..890a198 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/less.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/less.hpp new file mode 100644 index 0000000..4fe3cd1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp new file mode 100644 index 0000000..ca2894f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/list.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/list.hpp new file mode 100644 index 0000000..4e8ad53 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/list_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/list_c.hpp new file mode 100644 index 0000000..0b48a7f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/map.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/map.hpp new file mode 100644 index 0000000..837e013 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/minus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/minus.hpp new file mode 100644 index 0000000..71d4913 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/minus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/modulus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/modulus.hpp new file mode 100644 index 0000000..224b349 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp new file mode 100644 index 0000000..98b21b1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/or.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/or.hpp new file mode 100644 index 0000000..31e1aaa --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp new file mode 100644 index 0000000..ff97364 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/plus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/plus.hpp new file mode 100644 index 0000000..a9f6ee7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/plus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/quote.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/quote.hpp new file mode 100644 index 0000000..020f093 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/quote.hpp @@ -0,0 +1,123 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > +struct quote_impl +{ + typedef typename T::type type; +}; + +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< + F + , aux::has_type< F >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > + + { + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp new file mode 100644 index 0000000..c468684 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..658f92a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/set.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/set.hpp new file mode 100644 index 0000000..5721922 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/set_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/set_c.hpp new file mode 100644 index 0000000..cbeb932 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp new file mode 100644 index 0000000..b5b181c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp new file mode 100644 index 0000000..f7a342e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp new file mode 100644 index 0000000..daec4b8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { +template< int N > struct arity_tag +{ + typedef char (&type)[N + 1]; +}; + +template< + int C1, int C2, int C3, int C4, int C5, int C6 + > +struct max_arity +{ + BOOST_STATIC_CONSTANT(int, value = + ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) ) + ); +}; + +arity_tag<0>::type arity_helper(...); + +template< + template< typename P1 > class F + , typename T1 + > +typename arity_tag<1>::type +arity_helper(type_wrapper< F >, arity_tag<1>); + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + > +typename arity_tag<2>::type +arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>); + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + > +typename arity_tag<3>::type +arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>); + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + > +typename arity_tag<4>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>); + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + > +typename arity_tag<5>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>); + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6 + > +typename arity_tag<6>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>); +template< typename F, int N > +struct template_arity_impl +{ + BOOST_STATIC_CONSTANT(int, value = + sizeof(::boost::mpl::aux::arity_helper(type_wrapper(), arity_tag())) - 1 + ); +}; + +template< typename F > +struct template_arity +{ + BOOST_STATIC_CONSTANT(int, value = ( + max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value + )); + typedef mpl::int_ type; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/times.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/times.hpp new file mode 100644 index 0000000..cb97cc4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/times.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp new file mode 100644 index 0000000..2194ce9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/vector.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/vector.hpp new file mode 100644 index 0000000..bfa9565 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp new file mode 100644 index 0000000..0f1560d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp new file mode 100644 index 0000000..36337c8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp @@ -0,0 +1,132 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp new file mode 100644 index 0000000..4ffbe78 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp @@ -0,0 +1,132 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/and.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/and.hpp new file mode 100644 index 0000000..555c800 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/and.hpp @@ -0,0 +1,73 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool C_ > struct and_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : false_ + { + }; +}; + +template<> struct and_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,true_ > + { + }; +}; + +template<> +struct and_impl + ::result_< true_,true_,true_,true_ > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,T5 > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/apply.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/apply.hpp new file mode 100644 index 0000000..a3e2929 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/apply.hpp @@ -0,0 +1,166 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + +{ + typedef typename apply_wrap0< + typename lambda::type + + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +/// workaround for ETI bug +template<> +struct apply0 +{ + typedef int type; +}; + +template< + typename F, typename T1 + > +struct apply1 + +{ + typedef typename apply_wrap1< + typename lambda::type + , T1 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +/// workaround for ETI bug +template<> +struct apply1< int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + +{ + typedef typename apply_wrap2< + typename lambda::type + , T1, T2 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +/// workaround for ETI bug +template<> +struct apply2< int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + +{ + typedef typename apply_wrap3< + typename lambda::type + , T1, T2, T3 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +/// workaround for ETI bug +template<> +struct apply3< int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + +{ + typedef typename apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +/// workaround for ETI bug +template<> +struct apply4< int,int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + +{ + typedef typename apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// workaround for ETI bug +template<> +struct apply5< int,int,int,int,int,int > +{ + typedef int type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp new file mode 100644 index 0000000..f0f86c1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp new file mode 100644 index 0000000..4e89507 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp @@ -0,0 +1,247 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename F> +struct msvc_apply0 +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { + template< typename P = int > struct apply + { + typedef int type; + }; + }; + + template< typename T = int > struct result_ + : f_< aux::msvc_never_true::value > + ::template apply<> + { + }; + +}; + +template< + typename F + > +struct apply_wrap0 +{ + typedef typename msvc_apply0::template result_< + + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap0 +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply1 +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { + template< typename P1 > struct apply + { + typedef int type; + }; + }; + + template< typename T1 > struct result_ + : f_< aux::msvc_never_true::value > + ::template apply + { + }; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 +{ + typedef typename msvc_apply1::template result_< + T1 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap1< int,int > +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply2 +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { + template< typename P1, typename P2 > struct apply + { + typedef int type; + }; + }; + + template< typename T1, typename T2 > struct result_ + : f_< aux::msvc_never_true::value > + ::template apply< T1,T2 > + { + }; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 +{ + typedef typename msvc_apply2::template result_< + T1, T2 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap2< int,int,int > +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply3 +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { + template< typename P1, typename P2, typename P3 > struct apply + { + typedef int type; + }; + }; + + template< typename T1, typename T2, typename T3 > struct result_ + : f_< aux::msvc_never_true::value > + ::template apply< T1,T2,T3 > + { + }; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 +{ + typedef typename msvc_apply3::template result_< + T1, T2, T3 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap3< int,int,int,int > +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply4 +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { + template< + typename P1, typename P2, typename P3, typename P4 + > + struct apply + { + typedef int type; + }; + }; + + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : f_< aux::msvc_never_true::value > + ::template apply< T1,T2,T3,T4 > + { + }; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 +{ + typedef typename msvc_apply4::template result_< + T1, T2, T3, T4 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap4< int,int,int,int,int > +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply5 +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + struct apply + { + typedef int type; + }; + }; + + template< + typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + : f_< aux::msvc_never_true::value > + ::template apply< T1,T2,T3,T4,T5 > + { + }; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 +{ + typedef typename msvc_apply5::template result_< + T1, T2, T3, T4, T5 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap5< int,int,int,int,int,int > +{ + typedef int type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/arg.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/arg.hpp new file mode 100644 index 0000000..6f2f8a8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp new file mode 100644 index 0000000..4f12a40 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp @@ -0,0 +1,328 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool > +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; + }; +}; + +template< typename T > struct is_bind_template; + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,U1,U2,U3,U4,U5 > +{ +}; + +template< int arity_ > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +template< int N > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F + > +aux::yes_tag +is_bind_helper(bind0*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1 + > +aux::yes_tag +is_bind_helper(bind1< F,T1 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2 + > +aux::yes_tag +is_bind_helper(bind2< F,T1,T2 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3 + > +aux::yes_tag +is_bind_helper(bind3< F,T1,T2,T3 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +aux::yes_tag +is_bind_helper(bind4< F,T1,T2,T3,T4 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag +is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bind.hpp new file mode 100644 index 0000000..53c76e8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bind.hpp @@ -0,0 +1,432 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool > +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; + }; +}; + +template< typename T > struct is_bind_template; + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,U1,U2,U3,U4,U5 > +{ +}; + +template< typename T > +struct replace_unnamed_arg_impl +{ + template< typename Arg > struct result_ + { + typedef Arg next; + typedef T type; + }; +}; + +template<> +struct replace_unnamed_arg_impl< arg< -1 > > +{ + template< typename Arg > struct result_ + { + typedef typename next::type next; + typedef Arg type; + }; +}; + +template< typename T, typename Arg > +struct replace_unnamed_arg + : replace_unnamed_arg_impl::template result_ +{ +}; + +template< int arity_ > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +template< int N > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F + > +aux::yes_tag +is_bind_helper(bind0*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1 + > +aux::yes_tag +is_bind_helper(bind1< F,T1 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2 + > +aux::yes_tag +is_bind_helper(bind2< F,T1,T2 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3 + > +aux::yes_tag +is_bind_helper(bind3< F,T1,T2,T3 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +aux::yes_tag +is_bind_helper(bind4< F,T1,T2,T3,T4 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag +is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp new file mode 100644 index 0000000..022cba3 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp new file mode 100644 index 0000000..e96cf1a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp @@ -0,0 +1,149 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitand_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitand_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitand_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitand_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + + : if_< + + is_na + , bitand_2< N1,N2 > + , bitand_< + bitand_2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitand_2 + : aux::msvc_eti_base< typename apply_wrap2< + bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitand_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 & n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitand_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp new file mode 100644 index 0000000..bbc96ab --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp @@ -0,0 +1,149 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitor_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitor_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + + : if_< + + is_na + , bitor_2< N1,N2 > + , bitor_< + bitor_2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitor_2 + : aux::msvc_eti_base< typename apply_wrap2< + bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitor_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 | n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitor_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp new file mode 100644 index 0000000..4c14297 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp @@ -0,0 +1,149 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitxor_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitxor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitxor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitxor_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + + : if_< + + is_na + , bitxor_2< N1,N2 > + , bitxor_< + bitxor_2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitxor_2 + : aux::msvc_eti_base< typename apply_wrap2< + bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitxor_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 ^ n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitxor_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/deque.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/deque.hpp new file mode 100644 index 0000000..a0445d9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/deque.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct deque_chooser; + +} + +namespace aux { + +template<> +struct deque_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef vector0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_deque_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_deque_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct deque_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque_impl +{ + typedef aux::deque_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::deque_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque + : aux::deque_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::deque_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/divides.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/divides.hpp new file mode 100644 index 0000000..7681491 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/divides.hpp @@ -0,0 +1,148 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct divides_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct divides_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct divides_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct divides2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + + : if_< + + is_na + , divides2< N1,N2 > + , divides< + divides2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct divides2 + : aux::msvc_eti_base< typename apply_wrap2< + divides_impl< + typename divides_tag::type + , typename divides_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct divides_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 / n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::divides_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp new file mode 100644 index 0000000..64e9065 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct equal_to_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : aux::msvc_eti_base< typename apply_wrap2< + equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp new file mode 100644 index 0000000..4b3c690 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp @@ -0,0 +1,293 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< int N > +struct fold_chunk; + +template<> struct fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< int N > +struct fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_step; + +template< + typename Last + , typename State + > +struct fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , fold_null_step< Last,State > + , fold_step< First,Last,State,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_step +{ + typedef fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > chunk_; + + typedef typename chunk_::state state; + typedef typename chunk_::iterator iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl + : fold_chunk + ::template result_< First,Last,State,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp new file mode 100644 index 0000000..bf81873 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp @@ -0,0 +1,554 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/greater.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/greater.hpp new file mode 100644 index 0000000..5f5662d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/greater.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct greater_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : aux::msvc_eti_base< typename apply_wrap2< + greater_impl< + typename greater_tag::type + , typename greater_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp new file mode 100644 index 0000000..ae776fc --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct greater_equal_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : aux::msvc_eti_base< typename apply_wrap2< + greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp new file mode 100644 index 0000000..233a1ec --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp @@ -0,0 +1,166 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C1, bool C2 > +struct inherit2_impl +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1, T2 + { + typedef Derived type_; + }; +}; + +template<> +struct inherit2_impl< false,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1 + { + typedef T1 type_; + }; +}; + +template<> +struct inherit2_impl< true,false > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T2 + { + typedef T2 type_; + }; +}; + +template<> +struct inherit2_impl< true,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + { + typedef T1 type_; + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : aux::inherit2_impl< + is_empty_base::value + , is_empty_base::value + >::template result_< inherit2< T1,T2 >,T1, T2 > +{ + typedef typename inherit2::type_ type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp new file mode 100644 index 0000000..6951795 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp new file mode 100644 index 0000000..69aadc4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp @@ -0,0 +1,293 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< int N > +struct iter_fold_chunk; + +template<> struct iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< int N > +struct iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_step; + +template< + typename Last + , typename State + > +struct iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , iter_fold_null_step< Last,State > + , iter_fold_step< First,Last,State,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_step +{ + typedef iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > chunk_; + + typedef typename chunk_::state state; + typedef typename chunk_::iterator iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl + : iter_fold_chunk + ::template result_< First,Last,State,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp new file mode 100644 index 0000000..890a198 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/less.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/less.hpp new file mode 100644 index 0000000..951f060 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/less.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct less_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : aux::msvc_eti_base< typename apply_wrap2< + less_impl< + typename less_tag::type + , typename less_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > + BOOST_MPL_AUX_VALUE_WKND(N1)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp new file mode 100644 index 0000000..a56e692 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct less_equal_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : aux::msvc_eti_base< typename apply_wrap2< + less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/list.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/list.hpp new file mode 100644 index 0000000..e5ea456 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/list.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct list_chooser; + +} + +namespace aux { + +template<> +struct list_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef list0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_list_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_list_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct list_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list_impl +{ + typedef aux::list_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::list_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list + : aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp new file mode 100644 index 0000000..ab25482 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct list_c_chooser; + +} + +namespace aux { + +template<> +struct list_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list1_c< + T, C0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list2_c< + T, C0, C1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list3_c< + T, C0, C1, C2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list4_c< + T, C0, C1, C2, C3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list5_c< + T, C0, C1, C2, C3, C4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list6_c< + T, C0, C1, C2, C3, C4, C5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list7_c< + T, C0, C1, C2, C3, C4, C5, C6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list8_c< + T, C0, C1, C2, C3, C4, C5, C6, C7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list9_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list10_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_list_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_list_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct list_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c_impl +{ + typedef aux::list_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::list_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c + : aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/map.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/map.hpp new file mode 100644 index 0000000..970e0b7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/map.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct map_chooser; + +} + +namespace aux { + +template<> +struct map_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef map0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_map_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_map_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct map_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map_impl +{ + typedef aux::map_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::map_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map + : aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/minus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/minus.hpp new file mode 100644 index 0000000..b47f328 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/minus.hpp @@ -0,0 +1,148 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct minus_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct minus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct minus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct minus2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + + : if_< + + is_na + , minus2< N1,N2 > + , minus< + minus2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct minus2 + : aux::msvc_eti_base< typename apply_wrap2< + minus_impl< + typename minus_tag::type + , typename minus_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct minus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 - n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::minus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp new file mode 100644 index 0000000..c12b3f9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp @@ -0,0 +1,115 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct modulus_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct modulus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct modulus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : aux::msvc_eti_base< typename apply_wrap2< + modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct modulus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 % n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::modulus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp new file mode 100644 index 0000000..6e56b1e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct not_equal_to_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct not_equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct not_equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : aux::msvc_eti_base< typename apply_wrap2< + not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/or.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/or.hpp new file mode 100644 index 0000000..3f7394e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/or.hpp @@ -0,0 +1,73 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool C_ > struct or_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : true_ + { + }; +}; + +template<> struct or_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,false_ > + { + }; +}; + +template<> +struct or_impl + ::result_< false_,false_,false_,false_ > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,T5 > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp new file mode 100644 index 0000000..ff97364 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/plus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/plus.hpp new file mode 100644 index 0000000..1052335 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/plus.hpp @@ -0,0 +1,148 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct plus_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct plus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct plus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct plus2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + + : if_< + + is_na + , plus2< N1,N2 > + , plus< + plus2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct plus2 + : aux::msvc_eti_base< typename apply_wrap2< + plus_impl< + typename plus_tag::type + , typename plus_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct plus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 + n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::plus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/quote.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/quote.hpp new file mode 100644 index 0000000..e7a7f00 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/quote.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp new file mode 100644 index 0000000..adf15b6 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp @@ -0,0 +1,343 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..208ad97 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp @@ -0,0 +1,343 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< long N > +struct reverse_iter_fold_chunk; + +template<> struct reverse_iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< long N > +struct reverse_iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step; + +template< + typename Last + , typename State + > +struct reverse_iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step +{ + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/set.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/set.hpp new file mode 100644 index 0000000..95aaa5c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/set.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_chooser; + +} + +namespace aux { + +template<> +struct set_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef set0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_set_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_set_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct set_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set_impl +{ + typedef aux::set_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::set_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set + : aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp new file mode 100644 index 0000000..1ff34f9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_c_chooser; + +} + +namespace aux { + +template<> +struct set_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set1_c< + T, C0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set2_c< + T, C0, C1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set3_c< + T, C0, C1, C2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set4_c< + T, C0, C1, C2, C3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set5_c< + T, C0, C1, C2, C3, C4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set6_c< + T, C0, C1, C2, C3, C4, C5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set7_c< + T, C0, C1, C2, C3, C4, C5, C6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set8_c< + T, C0, C1, C2, C3, C4, C5, C6, C7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set9_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set10_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_set_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_set_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct set_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c_impl +{ + typedef aux::set_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::set_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c + : aux::set_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::set_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp new file mode 100644 index 0000000..3861ca1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp @@ -0,0 +1,114 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct shift_left_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_left_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_left_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : aux::msvc_eti_base< typename apply_wrap2< + shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct shift_left_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n << s)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + : aux::shift_left_wknd< + typename N::value_type + , typename S::value_type + , N::value + , S::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp new file mode 100644 index 0000000..24ea094 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp @@ -0,0 +1,114 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct shift_right_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_right_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_right_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : aux::msvc_eti_base< typename apply_wrap2< + shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct shift_right_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n >> s)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + : aux::shift_right_wknd< + typename N::value_type + , typename S::value_type + , N::value + , S::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp new file mode 100644 index 0000000..1668771 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +template<> +struct template_arity + : mpl::int_< -1 > +{ +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/times.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/times.hpp new file mode 100644 index 0000000..dee7fd4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/times.hpp @@ -0,0 +1,148 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct times_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct times_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct times_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct times2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + + : if_< + + is_na + , times2< N1,N2 > + , times< + times2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct times2 + : aux::msvc_eti_base< typename apply_wrap2< + times_impl< + typename times_tag::type + , typename times_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct times_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 * n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::times_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp new file mode 100644 index 0000000..26533dd --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp @@ -0,0 +1,109 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl +{ + template< typename F, typename Args > struct apply; +}; + +template<> struct unpack_args_impl<0> +{ + template< typename F, typename Args > struct apply + : apply0< + F + > + { + }; +}; + +template<> struct unpack_args_impl<1> +{ + template< typename F, typename Args > struct apply + : apply1< + F + , typename at_c< Args,0 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<2> +{ + template< typename F, typename Args > struct apply + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<3> +{ + template< typename F, typename Args > struct apply + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<4> +{ + template< typename F, typename Args > struct apply + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<5> +{ + template< typename F, typename Args > struct apply + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > + { + }; +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value > + ::template apply< F,Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/vector.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/vector.hpp new file mode 100644 index 0000000..a6c7b62 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/vector.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct vector_chooser; + +} + +namespace aux { + +template<> +struct vector_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef vector0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_vector_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_vector_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct vector_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector_impl +{ + typedef aux::vector_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::vector_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector + : aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp new file mode 100644 index 0000000..c522d08 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct vector_c_chooser; + +} + +namespace aux { + +template<> +struct vector_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector1_c< + T, T(C0) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector2_c< + T, T(C0), T(C1) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector3_c< + T, T(C0), T(C1), T(C2) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector4_c< + T, T(C0), T(C1), T(C2), T(C3) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector5_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector6_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector7_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector8_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector9_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector10_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector11_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector12_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector13_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector14_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector15_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector16_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector17_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector18_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector19_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector20_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_vector_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_vector_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct vector_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c_impl +{ + typedef aux::vector_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::vector_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c + : aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp new file mode 100644 index 0000000..26de94c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp new file mode 100644 index 0000000..b137cc7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/and.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/and.hpp new file mode 100644 index 0000000..e58640a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/and.hpp @@ -0,0 +1,71 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool C_ > struct and_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : false_ + { + }; +}; + +template<> struct and_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,true_ > + { + }; + + template<> struct result_< true_,true_,true_,true_ > + : true_ + { + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,T5 > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/apply.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/apply.hpp new file mode 100644 index 0000000..d46d030 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/apply.hpp @@ -0,0 +1,160 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +/// workaround for ETI bug +template<> +struct apply0 +{ + typedef int type; +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +/// workaround for ETI bug +template<> +struct apply1< int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +/// workaround for ETI bug +template<> +struct apply2< int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +/// workaround for ETI bug +template<> +struct apply3< int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +/// workaround for ETI bug +template<> +struct apply4< int,int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// workaround for ETI bug +template<> +struct apply5< int,int,int,int,int,int > +{ + typedef int type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp new file mode 100644 index 0000000..f0f86c1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp new file mode 100644 index 0000000..d307517 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp @@ -0,0 +1,138 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + +{ + typedef typename F::template apply< + + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap0 +{ + typedef int type; +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + +{ + typedef typename F::template apply< + T1 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap1< int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + +{ + typedef typename F::template apply< + T1, T2 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap2< int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + +{ + typedef typename F::template apply< + T1, T2, T3 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap3< int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + +{ + typedef typename F::template apply< + T1, T2, T3, T4 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap4< int,int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap5< int,int,int,int,int,int > +{ + typedef int type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/arg.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/arg.hpp new file mode 100644 index 0000000..6f2f8a8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp new file mode 100644 index 0000000..4f12a40 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp @@ -0,0 +1,328 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool > +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; + }; +}; + +template< typename T > struct is_bind_template; + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,U1,U2,U3,U4,U5 > +{ +}; + +template< int arity_ > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +template< int N > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F + > +aux::yes_tag +is_bind_helper(bind0*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1 + > +aux::yes_tag +is_bind_helper(bind1< F,T1 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2 + > +aux::yes_tag +is_bind_helper(bind2< F,T1,T2 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3 + > +aux::yes_tag +is_bind_helper(bind3< F,T1,T2,T3 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +aux::yes_tag +is_bind_helper(bind4< F,T1,T2,T3,T4 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag +is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bind.hpp new file mode 100644 index 0000000..53c76e8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bind.hpp @@ -0,0 +1,432 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool > +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; + }; +}; + +template< typename T > struct is_bind_template; + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,U1,U2,U3,U4,U5 > +{ +}; + +template< typename T > +struct replace_unnamed_arg_impl +{ + template< typename Arg > struct result_ + { + typedef Arg next; + typedef T type; + }; +}; + +template<> +struct replace_unnamed_arg_impl< arg< -1 > > +{ + template< typename Arg > struct result_ + { + typedef typename next::type next; + typedef Arg type; + }; +}; + +template< typename T, typename Arg > +struct replace_unnamed_arg + : replace_unnamed_arg_impl::template result_ +{ +}; + +template< int arity_ > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +template< int N > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F + > +aux::yes_tag +is_bind_helper(bind0*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1 + > +aux::yes_tag +is_bind_helper(bind1< F,T1 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2 + > +aux::yes_tag +is_bind_helper(bind2< F,T1,T2 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3 + > +aux::yes_tag +is_bind_helper(bind3< F,T1,T2,T3 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +aux::yes_tag +is_bind_helper(bind4< F,T1,T2,T3,T4 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag +is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp new file mode 100644 index 0000000..022cba3 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp new file mode 100644 index 0000000..e54b4ce --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp @@ -0,0 +1,151 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitand_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitand_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitand_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitand_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + + : aux::msvc_eti_base< typename if_< + + is_na + , bitand_2< N1,N2 > + , bitand_< + bitand_2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitand_2 + : aux::msvc_eti_base< typename apply_wrap2< + bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitand_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 & n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitand_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp new file mode 100644 index 0000000..3b465b3 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp @@ -0,0 +1,151 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitor_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitor_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + + : aux::msvc_eti_base< typename if_< + + is_na + , bitor_2< N1,N2 > + , bitor_< + bitor_2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitor_2 + : aux::msvc_eti_base< typename apply_wrap2< + bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitor_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 | n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitor_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp new file mode 100644 index 0000000..f7c5d43 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp @@ -0,0 +1,151 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitxor_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitxor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitxor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitxor_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + + : aux::msvc_eti_base< typename if_< + + is_na + , bitxor_2< N1,N2 > + , bitxor_< + bitxor_2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitxor_2 + : aux::msvc_eti_base< typename apply_wrap2< + bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitxor_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 ^ n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitxor_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/deque.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/deque.hpp new file mode 100644 index 0000000..a0445d9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/deque.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct deque_chooser; + +} + +namespace aux { + +template<> +struct deque_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef vector0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_deque_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_deque_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct deque_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque_impl +{ + typedef aux::deque_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::deque_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque + : aux::deque_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::deque_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/divides.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/divides.hpp new file mode 100644 index 0000000..0c60c43 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/divides.hpp @@ -0,0 +1,150 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct divides_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct divides_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct divides_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct divides2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + + : aux::msvc_eti_base< typename if_< + + is_na + , divides2< N1,N2 > + , divides< + divides2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct divides2 + : aux::msvc_eti_base< typename apply_wrap2< + divides_impl< + typename divides_tag::type + , typename divides_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct divides_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 / n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::divides_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp new file mode 100644 index 0000000..107912b --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct equal_to_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : aux::msvc_eti_base< typename apply_wrap2< + equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp new file mode 100644 index 0000000..58066d8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp @@ -0,0 +1,245 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< int N > +struct fold_chunk; + +template<> struct fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; + }; +}; + +template<> struct fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; + }; +}; + +template<> struct fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; + }; +}; + +template<> struct fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; + }; +}; + +template< int N > +struct fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_step; + +template< + typename Last + , typename State + > +struct fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , fold_null_step< Last,State > + , fold_step< First,Last,State,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_step +{ + typedef fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > chunk_; + + typedef typename chunk_::state state; + typedef typename chunk_::iterator iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl + : fold_chunk + ::template result_< First,Last,State,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp new file mode 100644 index 0000000..bf81873 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp @@ -0,0 +1,554 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/greater.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/greater.hpp new file mode 100644 index 0000000..f60a860 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/greater.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct greater_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : aux::msvc_eti_base< typename apply_wrap2< + greater_impl< + typename greater_tag::type + , typename greater_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp new file mode 100644 index 0000000..2ab09fd --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct greater_equal_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : aux::msvc_eti_base< typename apply_wrap2< + greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp new file mode 100644 index 0000000..233a1ec --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp @@ -0,0 +1,166 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C1, bool C2 > +struct inherit2_impl +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1, T2 + { + typedef Derived type_; + }; +}; + +template<> +struct inherit2_impl< false,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1 + { + typedef T1 type_; + }; +}; + +template<> +struct inherit2_impl< true,false > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T2 + { + typedef T2 type_; + }; +}; + +template<> +struct inherit2_impl< true,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + { + typedef T1 type_; + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : aux::inherit2_impl< + is_empty_base::value + , is_empty_base::value + >::template result_< inherit2< T1,T2 >,T1, T2 > +{ + typedef typename inherit2::type_ type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp new file mode 100644 index 0000000..6951795 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp new file mode 100644 index 0000000..50ea754 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp @@ -0,0 +1,245 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< int N > +struct iter_fold_chunk; + +template<> struct iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; + }; +}; + +template<> struct iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; + }; +}; + +template<> struct iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; + }; +}; + +template<> struct iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; + }; +}; + +template< int N > +struct iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_step; + +template< + typename Last + , typename State + > +struct iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , iter_fold_null_step< Last,State > + , iter_fold_step< First,Last,State,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_step +{ + typedef iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > chunk_; + + typedef typename chunk_::state state; + typedef typename chunk_::iterator iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl + : iter_fold_chunk + ::template result_< First,Last,State,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp new file mode 100644 index 0000000..890a198 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/less.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/less.hpp new file mode 100644 index 0000000..72338de --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/less.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct less_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : aux::msvc_eti_base< typename apply_wrap2< + less_impl< + typename less_tag::type + , typename less_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > + BOOST_MPL_AUX_VALUE_WKND(N1)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp new file mode 100644 index 0000000..b588697 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct less_equal_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : aux::msvc_eti_base< typename apply_wrap2< + less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/list.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/list.hpp new file mode 100644 index 0000000..e5ea456 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/list.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct list_chooser; + +} + +namespace aux { + +template<> +struct list_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef list0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_list_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_list_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct list_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list_impl +{ + typedef aux::list_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::list_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list + : aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp new file mode 100644 index 0000000..ab25482 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct list_c_chooser; + +} + +namespace aux { + +template<> +struct list_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list1_c< + T, C0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list2_c< + T, C0, C1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list3_c< + T, C0, C1, C2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list4_c< + T, C0, C1, C2, C3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list5_c< + T, C0, C1, C2, C3, C4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list6_c< + T, C0, C1, C2, C3, C4, C5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list7_c< + T, C0, C1, C2, C3, C4, C5, C6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list8_c< + T, C0, C1, C2, C3, C4, C5, C6, C7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list9_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list10_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_list_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_list_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct list_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c_impl +{ + typedef aux::list_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::list_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c + : aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/map.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/map.hpp new file mode 100644 index 0000000..970e0b7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/map.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct map_chooser; + +} + +namespace aux { + +template<> +struct map_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef map0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_map_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_map_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct map_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map_impl +{ + typedef aux::map_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::map_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map + : aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/minus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/minus.hpp new file mode 100644 index 0000000..3237fa6 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/minus.hpp @@ -0,0 +1,150 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct minus_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct minus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct minus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct minus2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + + : aux::msvc_eti_base< typename if_< + + is_na + , minus2< N1,N2 > + , minus< + minus2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct minus2 + : aux::msvc_eti_base< typename apply_wrap2< + minus_impl< + typename minus_tag::type + , typename minus_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct minus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 - n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::minus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp new file mode 100644 index 0000000..9c672c0 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp @@ -0,0 +1,115 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct modulus_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct modulus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct modulus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : aux::msvc_eti_base< typename apply_wrap2< + modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct modulus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 % n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::modulus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp new file mode 100644 index 0000000..1e48e7f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct not_equal_to_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct not_equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct not_equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : aux::msvc_eti_base< typename apply_wrap2< + not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/or.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/or.hpp new file mode 100644 index 0000000..8d0ba0a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/or.hpp @@ -0,0 +1,71 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool C_ > struct or_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : true_ + { + }; +}; + +template<> struct or_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,false_ > + { + }; + + template<> struct result_< false_,false_,false_,false_ > + : false_ + { + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,T5 > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp new file mode 100644 index 0000000..ff97364 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/plus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/plus.hpp new file mode 100644 index 0000000..c8f3355 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/plus.hpp @@ -0,0 +1,150 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct plus_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct plus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct plus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct plus2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + + : aux::msvc_eti_base< typename if_< + + is_na + , plus2< N1,N2 > + , plus< + plus2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct plus2 + : aux::msvc_eti_base< typename apply_wrap2< + plus_impl< + typename plus_tag::type + , typename plus_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct plus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 + n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::plus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/quote.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/quote.hpp new file mode 100644 index 0000000..b85880f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/quote.hpp @@ -0,0 +1,116 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { +template< bool > struct quote_impl +{ + template< typename T > struct result_ + : T + { + }; +}; + +template<> struct quote_impl +{ + template< typename T > struct result_ + { + typedef T type; + }; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< aux::has_type< F >::value > + ::template result_< F > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< aux::has_type< F< U1,U2 > >::value > + ::template result_< F< U1,U2 > > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< aux::has_type< F< U1,U2,U3 > >::value > + ::template result_< F< U1,U2,U3 > > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< aux::has_type< F< U1,U2,U3,U4 > >::value > + ::template result_< F< U1,U2,U3,U4 > > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< aux::has_type< F< U1,U2,U3,U4,U5 > >::value > + ::template result_< F< U1,U2,U3,U4,U5 > > + + { + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp new file mode 100644 index 0000000..7a07414 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..39a4057 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< long N > +struct reverse_iter_fold_chunk; + +template<> struct reverse_iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step; + +template< + typename Last + , typename State + > +struct reverse_iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step +{ + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/set.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/set.hpp new file mode 100644 index 0000000..95aaa5c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/set.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_chooser; + +} + +namespace aux { + +template<> +struct set_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef set0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_set_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_set_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct set_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set_impl +{ + typedef aux::set_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::set_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set + : aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp new file mode 100644 index 0000000..1ff34f9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_c_chooser; + +} + +namespace aux { + +template<> +struct set_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set1_c< + T, C0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set2_c< + T, C0, C1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set3_c< + T, C0, C1, C2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set4_c< + T, C0, C1, C2, C3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set5_c< + T, C0, C1, C2, C3, C4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set6_c< + T, C0, C1, C2, C3, C4, C5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set7_c< + T, C0, C1, C2, C3, C4, C5, C6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set8_c< + T, C0, C1, C2, C3, C4, C5, C6, C7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set9_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set10_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_set_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_set_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct set_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c_impl +{ + typedef aux::set_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::set_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c + : aux::set_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::set_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp new file mode 100644 index 0000000..176fc00 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp @@ -0,0 +1,114 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct shift_left_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_left_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_left_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : aux::msvc_eti_base< typename apply_wrap2< + shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct shift_left_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n << s)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + : aux::shift_left_wknd< + typename N::value_type + , typename S::value_type + , N::value + , S::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp new file mode 100644 index 0000000..6b6e01f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp @@ -0,0 +1,114 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct shift_right_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_right_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_right_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : aux::msvc_eti_base< typename apply_wrap2< + shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct shift_right_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n >> s)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + : aux::shift_right_wknd< + typename N::value_type + , typename S::value_type + , N::value + , S::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp new file mode 100644 index 0000000..1668771 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +template<> +struct template_arity + : mpl::int_< -1 > +{ +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/times.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/times.hpp new file mode 100644 index 0000000..a6ae333 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/times.hpp @@ -0,0 +1,150 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct times_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct times_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct times_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct times2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + + : aux::msvc_eti_base< typename if_< + + is_na + , times2< N1,N2 > + , times< + times2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct times2 + : aux::msvc_eti_base< typename apply_wrap2< + times_impl< + typename times_tag::type + , typename times_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct times_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 * n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::times_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp new file mode 100644 index 0000000..26533dd --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp @@ -0,0 +1,109 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl +{ + template< typename F, typename Args > struct apply; +}; + +template<> struct unpack_args_impl<0> +{ + template< typename F, typename Args > struct apply + : apply0< + F + > + { + }; +}; + +template<> struct unpack_args_impl<1> +{ + template< typename F, typename Args > struct apply + : apply1< + F + , typename at_c< Args,0 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<2> +{ + template< typename F, typename Args > struct apply + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<3> +{ + template< typename F, typename Args > struct apply + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<4> +{ + template< typename F, typename Args > struct apply + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<5> +{ + template< typename F, typename Args > struct apply + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > + { + }; +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value > + ::template apply< F,Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/vector.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/vector.hpp new file mode 100644 index 0000000..a6c7b62 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/vector.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct vector_chooser; + +} + +namespace aux { + +template<> +struct vector_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef vector0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_vector_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_vector_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct vector_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector_impl +{ + typedef aux::vector_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::vector_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector + : aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp new file mode 100644 index 0000000..c522d08 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct vector_c_chooser; + +} + +namespace aux { + +template<> +struct vector_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector1_c< + T, T(C0) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector2_c< + T, T(C0), T(C1) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector3_c< + T, T(C0), T(C1), T(C2) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector4_c< + T, T(C0), T(C1), T(C2), T(C3) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector5_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector6_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector7_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector8_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector9_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector10_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector11_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector12_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector13_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector14_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector15_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector16_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector17_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector18_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector19_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector20_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_vector_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_vector_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct vector_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c_impl +{ + typedef aux::vector_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::vector_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c + : aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp new file mode 100644 index 0000000..26de94c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp new file mode 100644 index 0000000..b137cc7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/and.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/and.hpp new file mode 100644 index 0000000..010ad1f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/apply.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/apply.hpp new file mode 100644 index 0000000..e08eacc --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp new file mode 100644 index 0000000..b2ed5d5 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp new file mode 100644 index 0000000..2ffe709 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp @@ -0,0 +1,456 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + int N, typename F + > +struct apply_wrap_impl0; + +template< + typename F + > +struct apply_wrap_impl0< + 0 + , F + + > +{ + typedef typename F::template apply< + +/// since the defaults are "lost", we have to pass *something* even for nullary +/// metafunction classes + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 1 + , F + + > +{ + typedef typename F::template apply< + + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 2 + , F + + > +{ + typedef typename F::template apply< + + na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 3 + , F + + > +{ + typedef typename F::template apply< + + na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 4 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 5 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap0 + : apply_wrap_impl0< + ::boost::mpl::aux::arity< F,0 >::value + , F + + >::type +{ +}; + +template< + int N, typename F, typename T1 + > +struct apply_wrap_impl1; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 1 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 2 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 3 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 4 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 5 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + : apply_wrap_impl1< + ::boost::mpl::aux::arity< F,1 >::value + , F + , T1 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2 + > +struct apply_wrap_impl2; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 2 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 3 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 4 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 5 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + : apply_wrap_impl2< + ::boost::mpl::aux::arity< F,2 >::value + , F + , T1, T2 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 3 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 4 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 5 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + : apply_wrap_impl3< + ::boost::mpl::aux::arity< F,3 >::value + , F + , T1, T2, T3 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 4 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 5 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + : apply_wrap_impl4< + ::boost::mpl::aux::arity< F,4 >::value + , F + , T1, T2, T3, T4 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5< + 5 + , F + , T1, T2, T3, T4, T5 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + : apply_wrap_impl5< + ::boost::mpl::aux::arity< F,5 >::value + , F + , T1, T2, T3, T4, T5 + >::type +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/arg.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/arg.hpp new file mode 100644 index 0000000..6f2f8a8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp new file mode 100644 index 0000000..b070232 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp @@ -0,0 +1,440 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bind.hpp new file mode 100644 index 0000000..0e9513a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bind.hpp @@ -0,0 +1,561 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp new file mode 100644 index 0000000..c4a5060 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp new file mode 100644 index 0000000..0bbf54e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp new file mode 100644 index 0000000..55b31cb --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp new file mode 100644 index 0000000..ec19391 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/deque.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/deque.hpp new file mode 100644 index 0000000..de67398 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/divides.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/divides.hpp new file mode 100644 index 0000000..86f1682 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/divides.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp new file mode 100644 index 0000000..62c9945 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp new file mode 100644 index 0000000..9e7a293 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp new file mode 100644 index 0000000..bf81873 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp @@ -0,0 +1,554 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/greater.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/greater.hpp new file mode 100644 index 0000000..14d8e08 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp new file mode 100644 index 0000000..2603f91 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp new file mode 100644 index 0000000..00f31c4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp new file mode 100644 index 0000000..6951795 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp new file mode 100644 index 0000000..805790e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp new file mode 100644 index 0000000..890a198 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/less.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/less.hpp new file mode 100644 index 0000000..4fe3cd1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp new file mode 100644 index 0000000..ca2894f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/list.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/list.hpp new file mode 100644 index 0000000..4e8ad53 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp new file mode 100644 index 0000000..0b48a7f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/map.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/map.hpp new file mode 100644 index 0000000..837e013 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/minus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/minus.hpp new file mode 100644 index 0000000..71d4913 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/minus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp new file mode 100644 index 0000000..224b349 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp new file mode 100644 index 0000000..98b21b1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/or.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/or.hpp new file mode 100644 index 0000000..31e1aaa --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp new file mode 100644 index 0000000..ff97364 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/plus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/plus.hpp new file mode 100644 index 0000000..a9f6ee7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/plus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/quote.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/quote.hpp new file mode 100644 index 0000000..d7d0420 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/quote.hpp @@ -0,0 +1,123 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > +struct quote_impl + : T +{ +}; + +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< + F + , aux::has_type< F >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > + + { + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp new file mode 100644 index 0000000..c468684 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..658f92a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/set.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/set.hpp new file mode 100644 index 0000000..5721922 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp new file mode 100644 index 0000000..cbeb932 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp new file mode 100644 index 0000000..b5b181c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp new file mode 100644 index 0000000..f7a342e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp new file mode 100644 index 0000000..a23fc23 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/times.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/times.hpp new file mode 100644 index 0000000..cb97cc4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/times.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp new file mode 100644 index 0000000..2194ce9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/vector.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/vector.hpp new file mode 100644 index 0000000..bfa9565 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp new file mode 100644 index 0000000..0f1560d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp new file mode 100644 index 0000000..26de94c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp new file mode 100644 index 0000000..b137cc7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/and.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/and.hpp new file mode 100644 index 0000000..555c800 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/and.hpp @@ -0,0 +1,73 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool C_ > struct and_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : false_ + { + }; +}; + +template<> struct and_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,true_ > + { + }; +}; + +template<> +struct and_impl + ::result_< true_,true_,true_,true_ > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,T5 > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp new file mode 100644 index 0000000..9838e79 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp @@ -0,0 +1,268 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +namespace aux { + +template<> +struct apply_chooser<0> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef apply0< + F + > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +namespace aux { + +template<> +struct apply_chooser<1> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef apply1< + F, T1 + > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +namespace aux { + +template<> +struct apply_chooser<2> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef apply2< + F, T1, T2 + > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +namespace aux { + +template<> +struct apply_chooser<3> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef apply3< + F, T1, T2, T3 + > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +namespace aux { + +template<> +struct apply_chooser<4> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef apply4< + F, T1, T2, T3, T4 + > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +namespace aux { + +template<> +struct apply_chooser<5> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef apply5< + F, T1, T2, T3, T4, T5 + > type; + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_apply_arg +{ + static bool const value = true; +}; + +template<> +struct is_apply_arg +{ + static bool const value = false; +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + > +struct apply_count_args +{ + static int const value = is_apply_arg::value + is_apply_arg::value + is_apply_arg::value + is_apply_arg::value + is_apply_arg::value; + +}; + +} + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply + : aux::apply_chooser< + aux::apply_count_args< T1,T2,T3,T4,T5 >::value + >::template result_< F,T1,T2,T3,T4,T5 >::type +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp new file mode 100644 index 0000000..7de6dad --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp @@ -0,0 +1,50 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser; +} + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp new file mode 100644 index 0000000..efa213d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp @@ -0,0 +1,78 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + + : F::template apply +{ +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp new file mode 100644 index 0000000..6f2f8a8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp new file mode 100644 index 0000000..254e5b8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp @@ -0,0 +1,486 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool > +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; + }; +}; + +template< typename T > struct is_bind_template; + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,U1,U2,U3,U4,U5 > +{ +}; + +template< int arity_ > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag is_bind_helper(bind< F,T1,T2,T3,T4,T5 >*); + +template< int N > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F + > +aux::yes_tag +is_bind_helper(bind0*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +namespace aux { + +template<> +struct bind_chooser<0> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind0 type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1 + > +aux::yes_tag +is_bind_helper(bind1< F,T1 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +namespace aux { + +template<> +struct bind_chooser<1> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind1< F,T1 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2 + > +aux::yes_tag +is_bind_helper(bind2< F,T1,T2 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +namespace aux { + +template<> +struct bind_chooser<2> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind2< F,T1,T2 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3 + > +aux::yes_tag +is_bind_helper(bind3< F,T1,T2,T3 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +namespace aux { + +template<> +struct bind_chooser<3> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind3< F,T1,T2,T3 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +aux::yes_tag +is_bind_helper(bind4< F,T1,T2,T3,T4 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +namespace aux { + +template<> +struct bind_chooser<4> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind4< F,T1,T2,T3,T4 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag +is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +namespace aux { + +template<> +struct bind_chooser<5> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind5< F,T1,T2,T3,T4,T5 > type; + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_bind_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_bind_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + > +struct bind_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_bind_arg::value + is_bind_arg::value + + is_bind_arg::value + is_bind_arg::value + + is_bind_arg::value + ); + +}; + +} + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : aux::bind_chooser< + aux::bind_count_args< T1,T2,T3,T4,T5 >::value + >::template result_< F,T1,T2,T3,T4,T5 >::type +{ +}; + +BOOST_MPL_AUX_ARITY_SPEC( + 6 + , bind + ) + +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( + 6 + , bind + ) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp new file mode 100644 index 0000000..12062b4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp @@ -0,0 +1,590 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool > +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; + }; +}; + +template< typename T > struct is_bind_template; + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,U1,U2,U3,U4,U5 > +{ +}; + +template< typename T > +struct replace_unnamed_arg_impl +{ + template< typename Arg > struct result_ + { + typedef Arg next; + typedef T type; + }; +}; + +template<> +struct replace_unnamed_arg_impl< arg< -1 > > +{ + template< typename Arg > struct result_ + { + typedef typename next::type next; + typedef Arg type; + }; +}; + +template< typename T, typename Arg > +struct replace_unnamed_arg + : replace_unnamed_arg_impl::template result_ +{ +}; + +template< int arity_ > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag is_bind_helper(bind< F,T1,T2,T3,T4,T5 >*); + +template< int N > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F + > +aux::yes_tag +is_bind_helper(bind0*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +namespace aux { + +template<> +struct bind_chooser<0> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind0 type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1 + > +aux::yes_tag +is_bind_helper(bind1< F,T1 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +namespace aux { + +template<> +struct bind_chooser<1> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind1< F,T1 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2 + > +aux::yes_tag +is_bind_helper(bind2< F,T1,T2 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +namespace aux { + +template<> +struct bind_chooser<2> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind2< F,T1,T2 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3 + > +aux::yes_tag +is_bind_helper(bind3< F,T1,T2,T3 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +namespace aux { + +template<> +struct bind_chooser<3> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind3< F,T1,T2,T3 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +aux::yes_tag +is_bind_helper(bind4< F,T1,T2,T3,T4 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +namespace aux { + +template<> +struct bind_chooser<4> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind4< F,T1,T2,T3,T4 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag +is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +namespace aux { + +template<> +struct bind_chooser<5> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind5< F,T1,T2,T3,T4,T5 > type; + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_bind_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_bind_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + > +struct bind_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_bind_arg::value + is_bind_arg::value + + is_bind_arg::value + is_bind_arg::value + + is_bind_arg::value + ); + +}; + +} + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : aux::bind_chooser< + aux::bind_count_args< T1,T2,T3,T4,T5 >::value + >::template result_< F,T1,T2,T3,T4,T5 >::type +{ +}; + +BOOST_MPL_AUX_ARITY_SPEC( + 6 + , bind + ) + +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( + 6 + , bind + ) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp new file mode 100644 index 0000000..c4a5060 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp new file mode 100644 index 0000000..020d6ba --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp @@ -0,0 +1,134 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitand_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitand_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitand_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + + : if_< + + is_na + , bitand_2< N1,N2 > + , bitand_< + bitand_2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitand_2 + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp new file mode 100644 index 0000000..0474877 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp @@ -0,0 +1,134 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitor_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + + : if_< + + is_na + , bitor_2< N1,N2 > + , bitor_< + bitor_2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitor_2 + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp new file mode 100644 index 0000000..42a9758 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp @@ -0,0 +1,134 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitxor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitxor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitxor_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + + : if_< + + is_na + , bitxor_2< N1,N2 > + , bitxor_< + bitxor_2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitxor_2 + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp new file mode 100644 index 0000000..a0445d9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct deque_chooser; + +} + +namespace aux { + +template<> +struct deque_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef vector0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_deque_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_deque_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct deque_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque_impl +{ + typedef aux::deque_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::deque_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque + : aux::deque_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::deque_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp new file mode 100644 index 0000000..00636dc --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct divides_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct divides_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct divides2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + + : if_< + + is_na + , divides2< N1,N2 > + , divides< + divides2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct divides2 + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp new file mode 100644 index 0000000..b14cdda --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp new file mode 100644 index 0000000..58066d8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp @@ -0,0 +1,245 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< int N > +struct fold_chunk; + +template<> struct fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; + }; +}; + +template<> struct fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; + }; +}; + +template<> struct fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; + }; +}; + +template<> struct fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; + }; +}; + +template< int N > +struct fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_step; + +template< + typename Last + , typename State + > +struct fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , fold_null_step< Last,State > + , fold_step< First,Last,State,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_step +{ + typedef fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > chunk_; + + typedef typename chunk_::state state; + typedef typename chunk_::iterator iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl + : fold_chunk + ::template result_< First,Last,State,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp new file mode 100644 index 0000000..bf81873 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp @@ -0,0 +1,554 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp new file mode 100644 index 0000000..6fdf8ba --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp new file mode 100644 index 0000000..f848eef --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp new file mode 100644 index 0000000..233a1ec --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp @@ -0,0 +1,166 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C1, bool C2 > +struct inherit2_impl +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1, T2 + { + typedef Derived type_; + }; +}; + +template<> +struct inherit2_impl< false,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1 + { + typedef T1 type_; + }; +}; + +template<> +struct inherit2_impl< true,false > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T2 + { + typedef T2 type_; + }; +}; + +template<> +struct inherit2_impl< true,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + { + typedef T1 type_; + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : aux::inherit2_impl< + is_empty_base::value + , is_empty_base::value + >::template result_< inherit2< T1,T2 >,T1, T2 > +{ + typedef typename inherit2::type_ type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp new file mode 100644 index 0000000..6951795 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp new file mode 100644 index 0000000..50ea754 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp @@ -0,0 +1,245 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< int N > +struct iter_fold_chunk; + +template<> struct iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; + }; +}; + +template<> struct iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; + }; +}; + +template<> struct iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; + }; +}; + +template<> struct iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; + }; +}; + +template< int N > +struct iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_step; + +template< + typename Last + , typename State + > +struct iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , iter_fold_null_step< Last,State > + , iter_fold_step< First,Last,State,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_step +{ + typedef iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > chunk_; + + typedef typename chunk_::state state; + typedef typename chunk_::iterator iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl + : iter_fold_chunk + ::template result_< First,Last,State,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp new file mode 100644 index 0000000..890a198 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/less.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/less.hpp new file mode 100644 index 0000000..7fb35e1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp new file mode 100644 index 0000000..206ecdc --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/list.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/list.hpp new file mode 100644 index 0000000..e5ea456 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/list.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct list_chooser; + +} + +namespace aux { + +template<> +struct list_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef list0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_list_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_list_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct list_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list_impl +{ + typedef aux::list_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::list_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list + : aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp new file mode 100644 index 0000000..ab25482 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct list_c_chooser; + +} + +namespace aux { + +template<> +struct list_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list1_c< + T, C0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list2_c< + T, C0, C1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list3_c< + T, C0, C1, C2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list4_c< + T, C0, C1, C2, C3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list5_c< + T, C0, C1, C2, C3, C4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list6_c< + T, C0, C1, C2, C3, C4, C5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list7_c< + T, C0, C1, C2, C3, C4, C5, C6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list8_c< + T, C0, C1, C2, C3, C4, C5, C6, C7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list9_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list10_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_list_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_list_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct list_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c_impl +{ + typedef aux::list_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::list_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c + : aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/map.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/map.hpp new file mode 100644 index 0000000..970e0b7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/map.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct map_chooser; + +} + +namespace aux { + +template<> +struct map_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef map0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_map_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_map_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct map_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map_impl +{ + typedef aux::map_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::map_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map + : aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp new file mode 100644 index 0000000..7b49450 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct minus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct minus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct minus2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + + : if_< + + is_na + , minus2< N1,N2 > + , minus< + minus2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct minus2 + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp new file mode 100644 index 0000000..8badbab --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct modulus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct modulus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp new file mode 100644 index 0000000..d87d8cd --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct not_equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct not_equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/or.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/or.hpp new file mode 100644 index 0000000..3f7394e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/or.hpp @@ -0,0 +1,73 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool C_ > struct or_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : true_ + { + }; +}; + +template<> struct or_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,false_ > + { + }; +}; + +template<> +struct or_impl + ::result_< false_,false_,false_,false_ > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,T5 > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp new file mode 100644 index 0000000..ff97364 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp new file mode 100644 index 0000000..a55b24c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct plus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct plus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct plus2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + + : if_< + + is_na + , plus2< N1,N2 > + , plus< + plus2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct plus2 + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp new file mode 100644 index 0000000..b85880f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp @@ -0,0 +1,116 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { +template< bool > struct quote_impl +{ + template< typename T > struct result_ + : T + { + }; +}; + +template<> struct quote_impl +{ + template< typename T > struct result_ + { + typedef T type; + }; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< aux::has_type< F >::value > + ::template result_< F > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< aux::has_type< F< U1,U2 > >::value > + ::template result_< F< U1,U2 > > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< aux::has_type< F< U1,U2,U3 > >::value > + ::template result_< F< U1,U2,U3 > > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< aux::has_type< F< U1,U2,U3,U4 > >::value > + ::template result_< F< U1,U2,U3,U4 > > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< aux::has_type< F< U1,U2,U3,U4,U5 > >::value > + ::template result_< F< U1,U2,U3,U4,U5 > > + + { + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp new file mode 100644 index 0000000..7a07414 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..39a4057 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< long N > +struct reverse_iter_fold_chunk; + +template<> struct reverse_iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step; + +template< + typename Last + , typename State + > +struct reverse_iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step +{ + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/set.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/set.hpp new file mode 100644 index 0000000..95aaa5c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/set.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_chooser; + +} + +namespace aux { + +template<> +struct set_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef set0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_set_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_set_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct set_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set_impl +{ + typedef aux::set_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::set_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set + : aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp new file mode 100644 index 0000000..1ff34f9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_c_chooser; + +} + +namespace aux { + +template<> +struct set_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set1_c< + T, C0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set2_c< + T, C0, C1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set3_c< + T, C0, C1, C2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set4_c< + T, C0, C1, C2, C3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set5_c< + T, C0, C1, C2, C3, C4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set6_c< + T, C0, C1, C2, C3, C4, C5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set7_c< + T, C0, C1, C2, C3, C4, C5, C6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set8_c< + T, C0, C1, C2, C3, C4, C5, C6, C7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set9_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set10_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_set_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_set_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct set_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c_impl +{ + typedef aux::set_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::set_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c + : aux::set_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::set_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp new file mode 100644 index 0000000..d14a5e4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_left_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_left_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp new file mode 100644 index 0000000..08c4915 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_right_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_right_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp new file mode 100644 index 0000000..1164f0f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp @@ -0,0 +1,40 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/times.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/times.hpp new file mode 100644 index 0000000..fd773cc --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/times.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct times_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct times_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct times2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + + : if_< + + is_na + , times2< N1,N2 > + , times< + times2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct times2 + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp new file mode 100644 index 0000000..26533dd --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp @@ -0,0 +1,109 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl +{ + template< typename F, typename Args > struct apply; +}; + +template<> struct unpack_args_impl<0> +{ + template< typename F, typename Args > struct apply + : apply0< + F + > + { + }; +}; + +template<> struct unpack_args_impl<1> +{ + template< typename F, typename Args > struct apply + : apply1< + F + , typename at_c< Args,0 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<2> +{ + template< typename F, typename Args > struct apply + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<3> +{ + template< typename F, typename Args > struct apply + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<4> +{ + template< typename F, typename Args > struct apply + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<5> +{ + template< typename F, typename Args > struct apply + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > + { + }; +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value > + ::template apply< F,Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp new file mode 100644 index 0000000..a6c7b62 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct vector_chooser; + +} + +namespace aux { + +template<> +struct vector_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef vector0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_vector_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_vector_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct vector_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector_impl +{ + typedef aux::vector_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::vector_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector + : aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp new file mode 100644 index 0000000..c522d08 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct vector_c_chooser; + +} + +namespace aux { + +template<> +struct vector_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector1_c< + T, T(C0) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector2_c< + T, T(C0), T(C1) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector3_c< + T, T(C0), T(C1), T(C2) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector4_c< + T, T(C0), T(C1), T(C2), T(C3) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector5_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector6_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector7_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector8_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector9_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector10_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector11_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector12_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector13_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector14_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector15_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector16_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector17_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector18_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector19_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector20_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_vector_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_vector_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct vector_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c_impl +{ + typedef aux::vector_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::vector_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c + : aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp new file mode 100644 index 0000000..26de94c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp new file mode 100644 index 0000000..b137cc7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/and.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/and.hpp new file mode 100644 index 0000000..010ad1f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp new file mode 100644 index 0000000..e08eacc --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp new file mode 100644 index 0000000..b2ed5d5 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp new file mode 100644 index 0000000..34d51a1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp @@ -0,0 +1,84 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< typename F > +struct apply_wrap0< F,true_ > + : F::apply +{ +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + + : F::template apply +{ +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp new file mode 100644 index 0000000..6f2f8a8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp new file mode 100644 index 0000000..095b84d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp @@ -0,0 +1,369 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp new file mode 100644 index 0000000..2891440 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp @@ -0,0 +1,466 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp new file mode 100644 index 0000000..c4a5060 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp new file mode 100644 index 0000000..282771b --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp @@ -0,0 +1,157 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitand_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 & n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitand_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp new file mode 100644 index 0000000..bc9c198 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp @@ -0,0 +1,157 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitor_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 | n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitor_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp new file mode 100644 index 0000000..76ce540 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp @@ -0,0 +1,157 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitxor_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 ^ n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitxor_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp new file mode 100644 index 0000000..de67398 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp new file mode 100644 index 0000000..9bc7fb1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp @@ -0,0 +1,156 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct divides_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 / n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::divides_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp new file mode 100644 index 0000000..fa2dc4a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp new file mode 100644 index 0000000..9e7a293 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp new file mode 100644 index 0000000..bf81873 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp @@ -0,0 +1,554 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp new file mode 100644 index 0000000..faa3f2b --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp new file mode 100644 index 0000000..392d142 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp new file mode 100644 index 0000000..00f31c4 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp new file mode 100644 index 0000000..6951795 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp new file mode 100644 index 0000000..805790e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp new file mode 100644 index 0000000..890a198 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/less.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/less.hpp new file mode 100644 index 0000000..6451680 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/less.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > + BOOST_MPL_AUX_VALUE_WKND(N1)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp new file mode 100644 index 0000000..00ae0d3 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/list.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/list.hpp new file mode 100644 index 0000000..4e8ad53 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp new file mode 100644 index 0000000..0b48a7f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/map.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/map.hpp new file mode 100644 index 0000000..837e013 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp new file mode 100644 index 0000000..bb67c59 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp @@ -0,0 +1,156 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct minus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 - n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::minus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp new file mode 100644 index 0000000..6fd0cab --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp @@ -0,0 +1,111 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct modulus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 % n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::modulus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp new file mode 100644 index 0000000..7c940a5 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/or.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/or.hpp new file mode 100644 index 0000000..31e1aaa --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp new file mode 100644 index 0000000..ff97364 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp new file mode 100644 index 0000000..cecead7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp @@ -0,0 +1,156 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct plus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 + n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::plus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp new file mode 100644 index 0000000..e7a7f00 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp new file mode 100644 index 0000000..c468684 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..658f92a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/set.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/set.hpp new file mode 100644 index 0000000..5721922 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp new file mode 100644 index 0000000..cbeb932 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp new file mode 100644 index 0000000..7ef4672 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp @@ -0,0 +1,110 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct shift_left_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n << s)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + : aux::shift_left_wknd< + typename N::value_type + , typename S::value_type + , N::value + , S::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp new file mode 100644 index 0000000..91a98f7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp @@ -0,0 +1,110 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct shift_right_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n >> s)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + : aux::shift_right_wknd< + typename N::value_type + , typename S::value_type + , N::value + , S::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp new file mode 100644 index 0000000..1164f0f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp @@ -0,0 +1,40 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/times.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/times.hpp new file mode 100644 index 0000000..d019b57 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/times.hpp @@ -0,0 +1,156 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct times_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 * n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::times_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp new file mode 100644 index 0000000..2194ce9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp new file mode 100644 index 0000000..bfa9565 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp new file mode 100644 index 0000000..0f1560d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp new file mode 100644 index 0000000..26de94c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp new file mode 100644 index 0000000..b137cc7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/and.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/and.hpp new file mode 100644 index 0000000..163913f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/and.hpp @@ -0,0 +1,64 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/apply.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/apply.hpp new file mode 100644 index 0000000..89d9e4b --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/apply.hpp @@ -0,0 +1,139 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp new file mode 100644 index 0000000..b2ed5d5 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp new file mode 100644 index 0000000..34d51a1 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp @@ -0,0 +1,84 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< typename F > +struct apply_wrap0< F,true_ > + : F::apply +{ +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + + : F::template apply +{ +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/arg.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/arg.hpp new file mode 100644 index 0000000..6f2f8a8 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp new file mode 100644 index 0000000..b070232 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp @@ -0,0 +1,440 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/bind.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/bind.hpp new file mode 100644 index 0000000..0e9513a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/bind.hpp @@ -0,0 +1,561 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp new file mode 100644 index 0000000..c4a5060 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/bitand.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/bitand.hpp new file mode 100644 index 0000000..ee40fb3 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/bitand.hpp @@ -0,0 +1,142 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/bitor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/bitor.hpp new file mode 100644 index 0000000..1e28d3b --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/bitor.hpp @@ -0,0 +1,142 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/bitxor.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/bitxor.hpp new file mode 100644 index 0000000..2ba879d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/bitxor.hpp @@ -0,0 +1,142 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/deque.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/deque.hpp new file mode 100644 index 0000000..de67398 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/divides.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/divides.hpp new file mode 100644 index 0000000..f365d62 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/divides.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/equal_to.hpp new file mode 100644 index 0000000..bbc6bf0 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/equal_to.hpp @@ -0,0 +1,92 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp new file mode 100644 index 0000000..9e7a293 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp new file mode 100644 index 0000000..bf81873 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp @@ -0,0 +1,554 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/greater.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/greater.hpp new file mode 100644 index 0000000..38c8bb3 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/greater.hpp @@ -0,0 +1,92 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp new file mode 100644 index 0000000..2aa8370 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp @@ -0,0 +1,92 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/inherit.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/inherit.hpp new file mode 100644 index 0000000..8b34e71 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/inherit.hpp @@ -0,0 +1,125 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp new file mode 100644 index 0000000..6951795 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp new file mode 100644 index 0000000..805790e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp new file mode 100644 index 0000000..f8f109c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp @@ -0,0 +1,228 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/less.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/less.hpp new file mode 100644 index 0000000..928d0e3 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/less.hpp @@ -0,0 +1,92 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/less_equal.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/less_equal.hpp new file mode 100644 index 0000000..364cd96 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/less_equal.hpp @@ -0,0 +1,92 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/list.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/list.hpp new file mode 100644 index 0000000..4e8ad53 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/list_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/list_c.hpp new file mode 100644 index 0000000..0b48a7f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/map.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/map.hpp new file mode 100644 index 0000000..837e013 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/minus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/minus.hpp new file mode 100644 index 0000000..0b8b5ce --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/minus.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/modulus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/modulus.hpp new file mode 100644 index 0000000..6a64e49 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/modulus.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp new file mode 100644 index 0000000..c08d7f0 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp @@ -0,0 +1,92 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/or.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/or.hpp new file mode 100644 index 0000000..986b2e0 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/or.hpp @@ -0,0 +1,64 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/placeholders.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/placeholders.hpp new file mode 100644 index 0000000..ff97364 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/plus.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/plus.hpp new file mode 100644 index 0000000..ed2e432 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/plus.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/quote.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/quote.hpp new file mode 100644 index 0000000..d7d0420 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/quote.hpp @@ -0,0 +1,123 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > +struct quote_impl + : T +{ +}; + +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< + F + , aux::has_type< F >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > + + { + }; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp new file mode 100644 index 0000000..c468684 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..658f92a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/set.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/set.hpp new file mode 100644 index 0000000..5721922 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/set_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/set_c.hpp new file mode 100644 index 0000000..cbeb932 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/shift_left.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/shift_left.hpp new file mode 100644 index 0000000..cf9c837 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/shift_left.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/shift_right.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/shift_right.hpp new file mode 100644 index 0000000..477229f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/shift_right.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/template_arity.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/template_arity.hpp new file mode 100644 index 0000000..a23fc23 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/template_arity.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/times.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/times.hpp new file mode 100644 index 0000000..ca88d40 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/times.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp new file mode 100644 index 0000000..2194ce9 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/vector.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/vector.hpp new file mode 100644 index 0000000..bfa9565 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessed/plain/vector_c.hpp b/contrib/src/boost/mpl/aux_/preprocessed/plain/vector_c.hpp new file mode 100644 index 0000000..0f1560d --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessed/plain/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/contrib/src/boost/mpl/aux_/preprocessor/add.hpp b/contrib/src/boost/mpl/aux_/preprocessor/add.hpp new file mode 100644 index 0000000..53e646e --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessor/add.hpp @@ -0,0 +1,65 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include + +#if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) +# include + +# define BOOST_MPL_PP_ADD(i,j) \ + BOOST_MPL_PP_ADD_DELAY(i,j) \ + /**/ + +# define BOOST_MPL_PP_ADD_DELAY(i,j) \ + BOOST_PP_CAT(BOOST_MPL_PP_TUPLE_11_ELEM_##i,BOOST_MPL_PP_ADD_##j) \ + /**/ +#else +# define BOOST_MPL_PP_ADD(i,j) \ + BOOST_MPL_PP_ADD_DELAY(i,j) \ + /**/ + +# define BOOST_MPL_PP_ADD_DELAY(i,j) \ + BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_ADD_##j \ + /**/ +#endif + +# define BOOST_MPL_PP_ADD_0 (0,1,2,3,4,5,6,7,8,9,10) +# define BOOST_MPL_PP_ADD_1 (1,2,3,4,5,6,7,8,9,10,0) +# define BOOST_MPL_PP_ADD_2 (2,3,4,5,6,7,8,9,10,0,0) +# define BOOST_MPL_PP_ADD_3 (3,4,5,6,7,8,9,10,0,0,0) +# define BOOST_MPL_PP_ADD_4 (4,5,6,7,8,9,10,0,0,0,0) +# define BOOST_MPL_PP_ADD_5 (5,6,7,8,9,10,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_6 (6,7,8,9,10,0,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_7 (7,8,9,10,0,0,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_8 (8,9,10,0,0,0,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_9 (9,10,0,0,0,0,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_10 (10,0,0,0,0,0,0,0,0,0,0) + +#else + +# include + +# define BOOST_MPL_PP_ADD(i,j) \ + BOOST_PP_ADD(i,j) \ + /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/preprocessor/def_params_tail.hpp b/contrib/src/boost/mpl/aux_/preprocessor/def_params_tail.hpp new file mode 100644 index 0000000..cab3989 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessor/def_params_tail.hpp @@ -0,0 +1,105 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#include +#include +#include +#include + +// BOOST_MPL_PP_DEF_PARAMS_TAIL(1,T,value): , T1 = value, .., Tn = value +// BOOST_MPL_PP_DEF_PARAMS_TAIL(2,T,value): , T2 = value, .., Tn = value +// BOOST_MPL_PP_DEF_PARAMS_TAIL(n,T,value): + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include +# include + +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, value_func) \ + BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_1( \ + i \ + , BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,i) \ + , param \ + , value_func \ + ) \ + /**/ + +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_1(i, n, param, value_func) \ + BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_2(i,n,param,value_func) \ + /**/ + +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_2(i, n, param, value_func) \ + BOOST_PP_COMMA_IF(BOOST_PP_AND(i,n)) \ + BOOST_MPL_PP_DEF_PARAMS_TAIL_##i(n,param,value_func) \ + /**/ + +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_0(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##1 v(),p##2 v(),p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v()) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_1(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##2 v(),p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_2(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_3(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_4(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_5(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4,p5) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_6(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4,p5,p6) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_7(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##8 v(),p##9 v(),p1,p2,p3,p4,p5,p6,p7) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_8(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##9 v(),p1,p2,p3,p4,p5,p6,p7,p8) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_9(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p1,p2,p3,p4,p5,p6,p7,p8,p9) + +#else + +# include +# include +# include +# include +# include +# include + +# define BOOST_MPL_PP_AUX_TAIL_PARAM_FUNC(unused, i, op) \ + , BOOST_PP_CAT( \ + BOOST_PP_TUPLE_ELEM(3, 1, op) \ + , BOOST_PP_ADD_D(1, i, BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(3, 0, op))) \ + ) BOOST_PP_TUPLE_ELEM(3, 2, op)() \ + /**/ + +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, value_func) \ + BOOST_PP_REPEAT( \ + BOOST_PP_SUB_D(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, i) \ + , BOOST_MPL_PP_AUX_TAIL_PARAM_FUNC \ + , (i, param, value_func) \ + ) \ + /**/ + + +#endif // BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES + +#define BOOST_MPL_PP_DEF_PARAMS_TAIL(i, param, value) \ + BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_IDENTITY(=value)) \ + /**/ + +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, param, value) \ + BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_IDENTITY(=value)) \ + /**/ +#else +# define BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, param, value) \ + BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_EMPTY) \ + /**/ +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/preprocessor/default_params.hpp b/contrib/src/boost/mpl/aux_/preprocessor/default_params.hpp new file mode 100644 index 0000000..c3548c6 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessor/default_params.hpp @@ -0,0 +1,67 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +// BOOST_MPL_PP_DEFAULT_PARAMS(0,T,int): +// BOOST_MPL_PP_DEFAULT_PARAMS(1,T,int): T1 = int +// BOOST_MPL_PP_DEFAULT_PARAMS(2,T,int): T1 = int, T2 = int +// BOOST_MPL_PP_DEFAULT_PARAMS(n,T,int): T1 = int, T2 = int, .., Tn = int + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include + +# define BOOST_MPL_PP_DEFAULT_PARAMS(n,p,v) \ + BOOST_PP_CAT(BOOST_MPL_PP_DEFAULT_PARAMS_,n)(p,v) \ + /**/ + +# define BOOST_MPL_PP_DEFAULT_PARAMS_0(p,v) +# define BOOST_MPL_PP_DEFAULT_PARAMS_1(p,v) p##1=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_2(p,v) p##1=v,p##2=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_3(p,v) p##1=v,p##2=v,p##3=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_4(p,v) p##1=v,p##2=v,p##3=v,p##4=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_5(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_6(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_7(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_8(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v,p##8=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_9(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v,p##8=v,p##9=v + +#else + +# include +# include +# include +# include +# include + +# define BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC(unused, i, pv) \ + BOOST_PP_COMMA_IF(i) \ + BOOST_PP_CAT( BOOST_PP_TUPLE_ELEM(2,0,pv), BOOST_PP_INC(i) ) \ + = BOOST_PP_TUPLE_ELEM(2,1,pv) \ + /**/ + +# define BOOST_MPL_PP_DEFAULT_PARAMS(n, param, value) \ + BOOST_PP_REPEAT( \ + n \ + , BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC \ + , (param,value) \ + ) \ + /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/preprocessor/enum.hpp b/contrib/src/boost/mpl/aux_/preprocessor/enum.hpp new file mode 100644 index 0000000..64c5e6a --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessor/enum.hpp @@ -0,0 +1,62 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +// BOOST_MPL_PP_ENUM(0,int): +// BOOST_MPL_PP_ENUM(1,int): int +// BOOST_MPL_PP_ENUM(2,int): int, int +// BOOST_MPL_PP_ENUM(n,int): int, int, .., int + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include + +# define BOOST_MPL_PP_ENUM(n, param) \ + BOOST_PP_CAT(BOOST_MPL_PP_ENUM_,n)(param) \ + /**/ + +# define BOOST_MPL_PP_ENUM_0(p) +# define BOOST_MPL_PP_ENUM_1(p) p +# define BOOST_MPL_PP_ENUM_2(p) p,p +# define BOOST_MPL_PP_ENUM_3(p) p,p,p +# define BOOST_MPL_PP_ENUM_4(p) p,p,p,p +# define BOOST_MPL_PP_ENUM_5(p) p,p,p,p,p +# define BOOST_MPL_PP_ENUM_6(p) p,p,p,p,p,p +# define BOOST_MPL_PP_ENUM_7(p) p,p,p,p,p,p,p +# define BOOST_MPL_PP_ENUM_8(p) p,p,p,p,p,p,p,p +# define BOOST_MPL_PP_ENUM_9(p) p,p,p,p,p,p,p,p,p + +#else + +# include +# include + +# define BOOST_MPL_PP_AUX_ENUM_FUNC(unused, i, param) \ + BOOST_PP_COMMA_IF(i) param \ + /**/ + +# define BOOST_MPL_PP_ENUM(n, param) \ + BOOST_PP_REPEAT( \ + n \ + , BOOST_MPL_PP_AUX_ENUM_FUNC \ + , param \ + ) \ + /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/preprocessor/ext_params.hpp b/contrib/src/boost/mpl/aux_/preprocessor/ext_params.hpp new file mode 100644 index 0000000..f5e6e50 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessor/ext_params.hpp @@ -0,0 +1,78 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +// BOOST_MPL_PP_EXT_PARAMS(2,2,T): +// BOOST_MPL_PP_EXT_PARAMS(2,3,T): T2 +// BOOST_MPL_PP_EXT_PARAMS(2,4,T): T2, T3 +// BOOST_MPL_PP_EXT_PARAMS(2,n,T): T2, T3, .., Tn-1 + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include +# include + +# define BOOST_MPL_PP_EXT_PARAMS(i,j,p) \ + BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,BOOST_MPL_PP_SUB(j,i),p) \ + /**/ + +# define BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,n,p) \ + BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \ + /**/ + +# define BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \ + BOOST_MPL_PP_EXT_PARAMS_##i(n,p) \ + /**/ + +# define BOOST_MPL_PP_EXT_PARAMS_1(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9) +# define BOOST_MPL_PP_EXT_PARAMS_2(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1) +# define BOOST_MPL_PP_EXT_PARAMS_3(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1,p2) +# define BOOST_MPL_PP_EXT_PARAMS_4(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##4,p##5,p##6,p##7,p##8,p##9,p1,p2,p3) +# define BOOST_MPL_PP_EXT_PARAMS_5(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##5,p##6,p##7,p##8,p##9,p1,p2,p3,p4) +# define BOOST_MPL_PP_EXT_PARAMS_6(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##6,p##7,p##8,p##9,p1,p2,p3,p4,p5) +# define BOOST_MPL_PP_EXT_PARAMS_7(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##7,p##8,p##9,p1,p2,p3,p4,p5,p6) +# define BOOST_MPL_PP_EXT_PARAMS_8(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##8,p##9,p1,p2,p3,p4,p5,p6,p7) +# define BOOST_MPL_PP_EXT_PARAMS_9(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##9,p1,p2,p3,p4,p5,p6,p7,p8) + +#else + +# include +# include +# include +# include +# include +# include + +# define BOOST_MPL_PP_AUX_EXT_PARAM_FUNC(unused, i, op) \ + BOOST_PP_COMMA_IF(i) \ + BOOST_PP_CAT( \ + BOOST_PP_TUPLE_ELEM(2,1,op) \ + , BOOST_PP_ADD_D(1, i, BOOST_PP_TUPLE_ELEM(2,0,op)) \ + ) \ + /**/ + +# define BOOST_MPL_PP_EXT_PARAMS(i, j, param) \ + BOOST_PP_REPEAT( \ + BOOST_PP_SUB_D(1,j,i) \ + , BOOST_MPL_PP_AUX_EXT_PARAM_FUNC \ + , (i,param) \ + ) \ + /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/preprocessor/filter_params.hpp b/contrib/src/boost/mpl/aux_/preprocessor/filter_params.hpp new file mode 100644 index 0000000..7c0df4f --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessor/filter_params.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#define BOOST_MPL_PP_FILTER_PARAMS_0(p1,p2,p3,p4,p5,p6,p7,p8,p9) +#define BOOST_MPL_PP_FILTER_PARAMS_1(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1 +#define BOOST_MPL_PP_FILTER_PARAMS_2(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2 +#define BOOST_MPL_PP_FILTER_PARAMS_3(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3 +#define BOOST_MPL_PP_FILTER_PARAMS_4(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4 +#define BOOST_MPL_PP_FILTER_PARAMS_5(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5 +#define BOOST_MPL_PP_FILTER_PARAMS_6(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6 +#define BOOST_MPL_PP_FILTER_PARAMS_7(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7 +#define BOOST_MPL_PP_FILTER_PARAMS_8(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7,p8 +#define BOOST_MPL_PP_FILTER_PARAMS_9(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7,p8,p9 + +#endif // BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/preprocessor/params.hpp b/contrib/src/boost/mpl/aux_/preprocessor/params.hpp new file mode 100644 index 0000000..acad321 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessor/params.hpp @@ -0,0 +1,65 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +// BOOST_MPL_PP_PARAMS(0,T): +// BOOST_MPL_PP_PARAMS(1,T): T1 +// BOOST_MPL_PP_PARAMS(2,T): T1, T2 +// BOOST_MPL_PP_PARAMS(n,T): T1, T2, .., Tn + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include + +# define BOOST_MPL_PP_PARAMS(n,p) \ + BOOST_PP_CAT(BOOST_MPL_PP_PARAMS_,n)(p) \ + /**/ + +# define BOOST_MPL_PP_PARAMS_0(p) +# define BOOST_MPL_PP_PARAMS_1(p) p##1 +# define BOOST_MPL_PP_PARAMS_2(p) p##1,p##2 +# define BOOST_MPL_PP_PARAMS_3(p) p##1,p##2,p##3 +# define BOOST_MPL_PP_PARAMS_4(p) p##1,p##2,p##3,p##4 +# define BOOST_MPL_PP_PARAMS_5(p) p##1,p##2,p##3,p##4,p##5 +# define BOOST_MPL_PP_PARAMS_6(p) p##1,p##2,p##3,p##4,p##5,p##6 +# define BOOST_MPL_PP_PARAMS_7(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7 +# define BOOST_MPL_PP_PARAMS_8(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8 +# define BOOST_MPL_PP_PARAMS_9(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9 + +#else + +# include +# include +# include +# include + +# define BOOST_MPL_PP_AUX_PARAM_FUNC(unused, i, param) \ + BOOST_PP_COMMA_IF(i) \ + BOOST_PP_CAT(param, BOOST_PP_INC(i)) \ + /**/ + +# define BOOST_MPL_PP_PARAMS(n, param) \ + BOOST_PP_REPEAT( \ + n \ + , BOOST_MPL_PP_AUX_PARAM_FUNC \ + , param \ + ) \ + /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/preprocessor/partial_spec_params.hpp b/contrib/src/boost/mpl/aux_/preprocessor/partial_spec_params.hpp new file mode 100644 index 0000000..de5535c --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessor/partial_spec_params.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +#define BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ +BOOST_MPL_PP_PARAMS(n, param) \ +BOOST_PP_COMMA_IF(BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n)) \ +BOOST_MPL_PP_ENUM( \ + BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n) \ + , def \ + ) \ +/**/ + +#endif // BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/preprocessor/range.hpp b/contrib/src/boost/mpl/aux_/preprocessor/range.hpp new file mode 100644 index 0000000..d66eeb5 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessor/range.hpp @@ -0,0 +1,30 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#define BOOST_MPL_PP_RANGE_ITEM(z,n,_) (n) + +#define BOOST_MPL_PP_RANGE(first, length) \ + BOOST_PP_SEQ_SUBSEQ( \ + BOOST_PP_REPEAT(BOOST_PP_ADD(first,length), BOOST_MPL_PP_RANGE_ITEM, _), \ + first, length \ + ) \ +/**/ + +#endif // BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/preprocessor/repeat.hpp b/contrib/src/boost/mpl/aux_/preprocessor/repeat.hpp new file mode 100644 index 0000000..0511367 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessor/repeat.hpp @@ -0,0 +1,51 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include + +# define BOOST_MPL_PP_REPEAT(n,f,param) \ + BOOST_PP_CAT(BOOST_MPL_PP_REPEAT_,n)(f,param) \ + /**/ + +# define BOOST_MPL_PP_REPEAT_0(f,p) +# define BOOST_MPL_PP_REPEAT_1(f,p) f(0,0,p) +# define BOOST_MPL_PP_REPEAT_2(f,p) f(0,0,p) f(0,1,p) +# define BOOST_MPL_PP_REPEAT_3(f,p) f(0,0,p) f(0,1,p) f(0,2,p) +# define BOOST_MPL_PP_REPEAT_4(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) +# define BOOST_MPL_PP_REPEAT_5(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) +# define BOOST_MPL_PP_REPEAT_6(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) +# define BOOST_MPL_PP_REPEAT_7(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) +# define BOOST_MPL_PP_REPEAT_8(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) +# define BOOST_MPL_PP_REPEAT_9(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p) +# define BOOST_MPL_PP_REPEAT_10(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p) f(0,9,p) + +#else + +# include + +# define BOOST_MPL_PP_REPEAT(n,f,param) \ + BOOST_PP_REPEAT(n,f,param) \ + /**/ + +#endif + +#define BOOST_MPL_PP_REPEAT_IDENTITY_FUNC(unused1, unused2, x) x + +#endif // BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/preprocessor/sub.hpp b/contrib/src/boost/mpl/aux_/preprocessor/sub.hpp new file mode 100644 index 0000000..c794c74 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessor/sub.hpp @@ -0,0 +1,65 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include + +#if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) +# include + +# define BOOST_MPL_PP_SUB(i,j) \ + BOOST_MPL_PP_SUB_DELAY(i,j) \ + /**/ + +# define BOOST_MPL_PP_SUB_DELAY(i,j) \ + BOOST_PP_CAT(BOOST_MPL_PP_TUPLE_11_ELEM_##i,BOOST_MPL_PP_SUB_##j) \ + /**/ +#else +# define BOOST_MPL_PP_SUB(i,j) \ + BOOST_MPL_PP_SUB_DELAY(i,j) \ + /**/ + +# define BOOST_MPL_PP_SUB_DELAY(i,j) \ + BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_SUB_##j \ + /**/ +#endif + +# define BOOST_MPL_PP_SUB_0 (0,1,2,3,4,5,6,7,8,9,10) +# define BOOST_MPL_PP_SUB_1 (0,0,1,2,3,4,5,6,7,8,9) +# define BOOST_MPL_PP_SUB_2 (0,0,0,1,2,3,4,5,6,7,8) +# define BOOST_MPL_PP_SUB_3 (0,0,0,0,1,2,3,4,5,6,7) +# define BOOST_MPL_PP_SUB_4 (0,0,0,0,0,1,2,3,4,5,6) +# define BOOST_MPL_PP_SUB_5 (0,0,0,0,0,0,1,2,3,4,5) +# define BOOST_MPL_PP_SUB_6 (0,0,0,0,0,0,0,1,2,3,4) +# define BOOST_MPL_PP_SUB_7 (0,0,0,0,0,0,0,0,1,2,3) +# define BOOST_MPL_PP_SUB_8 (0,0,0,0,0,0,0,0,0,1,2) +# define BOOST_MPL_PP_SUB_9 (0,0,0,0,0,0,0,0,0,0,1) +# define BOOST_MPL_PP_SUB_10 (0,0,0,0,0,0,0,0,0,0,0) + +#else + +# include + +# define BOOST_MPL_PP_SUB(i,j) \ + BOOST_PP_SUB(i,j) \ + /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/preprocessor/tuple.hpp b/contrib/src/boost/mpl/aux_/preprocessor/tuple.hpp new file mode 100644 index 0000000..755bbc5 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/preprocessor/tuple.hpp @@ -0,0 +1,29 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#define BOOST_MPL_PP_TUPLE_11_ELEM_0(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e0 +#define BOOST_MPL_PP_TUPLE_11_ELEM_1(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e1 +#define BOOST_MPL_PP_TUPLE_11_ELEM_2(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e2 +#define BOOST_MPL_PP_TUPLE_11_ELEM_3(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e3 +#define BOOST_MPL_PP_TUPLE_11_ELEM_4(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e4 +#define BOOST_MPL_PP_TUPLE_11_ELEM_5(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e5 +#define BOOST_MPL_PP_TUPLE_11_ELEM_6(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e6 +#define BOOST_MPL_PP_TUPLE_11_ELEM_7(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e7 +#define BOOST_MPL_PP_TUPLE_11_ELEM_8(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e8 +#define BOOST_MPL_PP_TUPLE_11_ELEM_9(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e9 +#define BOOST_MPL_PP_TUPLE_11_ELEM_10(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e10 + +#endif // BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/static_cast.hpp b/contrib/src/boost/mpl/aux_/static_cast.hpp new file mode 100644 index 0000000..f72d1c7 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/static_cast.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED +#define BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ + || BOOST_WORKAROUND(__GNUC__, < 3) \ + || BOOST_WORKAROUND(__MWERKS__, <= 0x3001) +# define BOOST_MPL_AUX_STATIC_CAST(T, expr) (T)(expr) +#else +# define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast(expr) +#endif + +#endif // BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/template_arity.hpp b/contrib/src/boost/mpl/aux_/template_arity.hpp new file mode 100644 index 0000000..f011159 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/template_arity.hpp @@ -0,0 +1,189 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED +#define BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +# include +# endif +# else +# include +# endif +#endif + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER template_arity.hpp +# include + +#else + +# if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) + +# include +# include +# include +# include +# include + +# include +# include +# include +# include +# include + +# define AUX778076_ARITY BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) + +namespace boost { namespace mpl { namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arity_tag +{ + typedef char (&type)[N + 1]; +}; + +# define AUX778076_MAX_ARITY_OP(unused, state, i_) \ + ( BOOST_PP_CAT(C,i_) > 0 ? BOOST_PP_CAT(C,i_) : state ) \ +/**/ + +template< + BOOST_MPL_PP_PARAMS(AUX778076_ARITY, BOOST_MPL_AUX_NTTP_DECL(int, C)) + > +struct max_arity +{ + BOOST_STATIC_CONSTANT(int, value = + BOOST_PP_SEQ_FOLD_LEFT( + AUX778076_MAX_ARITY_OP + , -1 + , BOOST_MPL_PP_RANGE(1, AUX778076_ARITY) + ) + ); +}; + +# undef AUX778076_MAX_ARITY_OP + +arity_tag<0>::type arity_helper(...); + +# define BOOST_PP_ITERATION_LIMITS (1, AUX778076_ARITY) +# define BOOST_PP_FILENAME_1 +# include BOOST_PP_ITERATE() + +template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct template_arity_impl +{ + BOOST_STATIC_CONSTANT(int, value = + sizeof(::boost::mpl::aux::arity_helper(type_wrapper(),arity_tag())) - 1 + ); +}; + +# define AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION(unused, i_, F) \ + BOOST_PP_COMMA_IF(i_) template_arity_impl::value \ +/**/ + +template< typename F > +struct template_arity +{ + BOOST_STATIC_CONSTANT(int, value = ( + max_arity< BOOST_MPL_PP_REPEAT( + AUX778076_ARITY + , AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION + , F + ) >::value + )); + + typedef mpl::int_ type; +}; + +# undef AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION + +# undef AUX778076_ARITY + +}}} + +# endif // BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING +# else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +# include + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_<-1> + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +template<> +struct template_arity + : mpl::int_<-1> +{ +}; +#endif + +}}} + +# endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F + , BOOST_MPL_PP_PARAMS(i_, typename T) + > +typename arity_tag::type +arity_helper(type_wrapper< F >, arity_tag); + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/mpl/aux_/template_arity_fwd.hpp b/contrib/src/boost/mpl/aux_/template_arity_fwd.hpp new file mode 100644 index 0000000..19d63a3 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/template_arity_fwd.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED +#define BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { namespace aux { + +template< typename F > struct template_arity; + +}}} + +#endif // BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/type_wrapper.hpp b/contrib/src/boost/mpl/aux_/type_wrapper.hpp new file mode 100644 index 0000000..f3ac307 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/type_wrapper.hpp @@ -0,0 +1,47 @@ + +#ifndef BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED +#define BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Peter Dimov 2000-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +namespace boost { namespace mpl { namespace aux { + +template< typename T > struct type_wrapper +{ + typedef T type; +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +// agurt 08/may/03: a complicated way to extract the wrapped type; need it +// mostly for the sake of GCC (3.2.x), which ICEs if you try to extract the +// nested 'type' from 'type_wrapper' when the latter was the result of a +// 'typeof' expression +template< typename T > struct wrapped_type; + +template< typename T > struct wrapped_type< type_wrapper > +{ + typedef T type; +}; +#else +template< typename W > struct wrapped_type +{ + typedef typename W::type type; +}; +#endif + +}}} + +#endif // BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/value_wknd.hpp b/contrib/src/boost/mpl/aux_/value_wknd.hpp new file mode 100644 index 0000000..23fefde --- /dev/null +++ b/contrib/src/boost/mpl/aux_/value_wknd.hpp @@ -0,0 +1,89 @@ + +#ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED +#define BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +#if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \ + || defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + +# include + +namespace boost { namespace mpl { namespace aux { +template< typename C_ > struct value_wknd + : C_ +{ +}; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) +template<> struct value_wknd + : int_<1> +{ + using int_<1>::value; +}; +#endif +}}} + + +#if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) +# define BOOST_MPL_AUX_VALUE_WKND(C) \ + ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux::value_wknd< C > \ +/**/ +# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) BOOST_MPL_AUX_VALUE_WKND(C) +#else +# define BOOST_MPL_AUX_VALUE_WKND(C) C +# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) \ + ::boost::mpl::aux::value_wknd< C > \ +/**/ +#endif + +#else // BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS + +# define BOOST_MPL_AUX_VALUE_WKND(C) C +# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) C + +#endif + +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) +# define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \ + BOOST_MPL_AUX_STATIC_CAST(T, C::value) \ +/**/ +#else +# define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \ + BOOST_MPL_AUX_VALUE_WKND(C)::value \ +/**/ +#endif + + +namespace boost { namespace mpl { namespace aux { + +template< typename T > struct value_type_wknd +{ + typedef typename T::value_type type; +}; + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +template<> struct value_type_wknd +{ + typedef int type; +}; +#endif + +}}} + +#endif // BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/aux_/yes_no.hpp b/contrib/src/boost/mpl/aux_/yes_no.hpp new file mode 100644 index 0000000..21a18a2 --- /dev/null +++ b/contrib/src/boost/mpl/aux_/yes_no.hpp @@ -0,0 +1,58 @@ + +#ifndef BOOST_MPL_AUX_YES_NO_HPP_INCLUDED +#define BOOST_MPL_AUX_YES_NO_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + + +namespace boost { namespace mpl { namespace aux { + +typedef char (&no_tag)[1]; +typedef char (&yes_tag)[2]; + +template< bool C_ > struct yes_no_tag +{ + typedef no_tag type; +}; + +template<> struct yes_no_tag +{ + typedef yes_tag type; +}; + + +template< BOOST_MPL_AUX_NTTP_DECL(long, n) > struct weighted_tag +{ +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + typedef char (&type)[n]; +#else + char buf[n]; + typedef weighted_tag type; +#endif +}; + +#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) +template<> struct weighted_tag<0> +{ + typedef char (&type)[1]; +}; +#endif + +}}} + +#endif // BOOST_MPL_AUX_YES_NO_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/bind.hpp b/contrib/src/boost/mpl/bind.hpp new file mode 100644 index 0000000..63ee3f2 --- /dev/null +++ b/contrib/src/boost/mpl/bind.hpp @@ -0,0 +1,551 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_BIND_HPP_INCLUDED +#define BOOST_MPL_BIND_HPP_INCLUDED + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# include +# endif +#endif + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# if defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) +# define BOOST_MPL_PREPROCESSED_HEADER basic_bind.hpp +# else +# define BOOST_MPL_PREPROCESSED_HEADER bind.hpp +# endif +# include + +#else + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +# define AUX778076_APPLY \ + BOOST_PP_CAT(apply_wrap,BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ + /**/ + +# if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +# define AUX778076_DMC_PARAM() , int dummy_ +# else +# define AUX778076_DMC_PARAM() +# endif + +# define AUX778076_BIND_PARAMS(param) \ + BOOST_MPL_PP_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + ) \ + /**/ + +# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + /**/ + +# define AUX778076_BIND_N_PARAMS(n, param) \ + BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ + /**/ + +# define AUX778076_BIND_N_SPEC_PARAMS(n, param, def) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ + /**/ + +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ + AUX778076_BIND_DEFAULT_PARAMS(param, value) \ + /**/ +#else +# define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ + AUX778076_BIND_PARAMS(param) \ + /**/ +#endif + +namespace aux { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< + typename T, AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg +{ + typedef T type; +}; + +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg<-1>,Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +template< + BOOST_MPL_AUX_NTTP_DECL(int, N), AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg< arg,AUX778076_BIND_PARAMS(U) > +{ + typedef typename AUX778076_APPLY, AUX778076_BIND_PARAMS(U)>::type type; +}; + +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< + typename F, AUX778076_BIND_PARAMS(typename T), AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg< bind,AUX778076_BIND_PARAMS(U) > +{ + typedef bind f_; + typedef typename AUX778076_APPLY::type type; +}; +#endif + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +// agurt, 15/jan/02: it's not a intended to be used as a function class, and +// MSVC6.5 has problems with 'apply' name here (the code compiles, but doesn't +// work), so I went with the 'result_' here, and in all other similar cases +template< bool > +struct resolve_arg_impl +{ + template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ + { + typedef typename AUX778076_APPLY< + T + , AUX778076_BIND_PARAMS(U) + >::type type; + }; +}; + +// for 'resolve_bind_arg' +template< typename T > struct is_bind_template; + +template< + typename T, AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,AUX778076_BIND_PARAMS(U) > +{ +}; + +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + +template< typename T > +struct replace_unnamed_arg_impl +{ + template< typename Arg > struct result_ + { + typedef Arg next; + typedef T type; + }; +}; + +template<> +struct replace_unnamed_arg_impl< arg<-1> > +{ + template< typename Arg > struct result_ + { + typedef typename next::type next; + typedef Arg type; + }; +}; + +template< typename T, typename Arg > +struct replace_unnamed_arg + : replace_unnamed_arg_impl::template result_ +{ +}; + +# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +// agurt, 10/mar/02: the forward declaration has to appear before any of +// 'is_bind_helper' overloads, otherwise MSVC6.5 issues an ICE on it +template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +// overload for "main" form +// agurt, 15/mar/02: MSVC 6.5 fails to properly resolve the overload +// in case if we use 'aux::type_wrapper< bind<...> >' here, and all +// 'bind' instantiations form a complete type anyway +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< + typename F, AUX778076_BIND_PARAMS(typename T) + > +aux::yes_tag is_bind_helper(bind*); +#endif + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace aux + + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) +/// if_/eval_if specializations +# define AUX778076_SPEC_NAME if_ +# define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, )) +# include BOOST_PP_ITERATE() + +#if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +# define AUX778076_SPEC_NAME eval_if +# define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, )) +# include BOOST_PP_ITERATE() +#endif +#endif + +// real C++ version is already taken care of +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) + +namespace aux { +// apply_count_args +#define AUX778076_COUNT_ARGS_PREFIX bind +#define AUX778076_COUNT_ARGS_DEFAULT na +#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY +#include +} + +// bind +template< + typename F, AUX778076_BIND_PARAMS(typename T) AUX778076_DMC_PARAM() + > +struct bind + : aux::bind_chooser< + aux::bind_count_args::value + >::template result_< F,AUX778076_BIND_PARAMS(T) >::type +{ +}; + +BOOST_MPL_AUX_ARITY_SPEC( + BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) + , bind + ) + +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( + BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) + , bind + ) + + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +# undef AUX778076_BIND_NESTED_DEFAULT_PARAMS +# undef AUX778076_BIND_N_SPEC_PARAMS +# undef AUX778076_BIND_N_PARAMS +# undef AUX778076_BIND_DEFAULT_PARAMS +# undef AUX778076_BIND_PARAMS +# undef AUX778076_DMC_PARAM +# undef AUX778076_APPLY + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_BIND_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 + +# define i_ BOOST_PP_FRAME_ITERATION(1) + +#if defined(AUX778076_SPEC_NAME) + +// lazy metafunction specialization +template< template< BOOST_MPL_PP_PARAMS(i_, typename T) > class F, typename Tag > +struct BOOST_PP_CAT(quote,i_); + +template< BOOST_MPL_PP_PARAMS(i_, typename T) > struct AUX778076_SPEC_NAME; + +template< + typename Tag AUX778076_BIND_N_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(bind,i_)< + BOOST_PP_CAT(quote,i_) + AUX778076_BIND_N_PARAMS(i_,T) + > +{ + template< + AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) + > + struct apply + { + private: + typedef mpl::arg<1> n1; +# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, )) +# include BOOST_PP_ITERATE() + + typedef typename AUX778076_SPEC_NAME< + typename t1::type + , BOOST_MPL_PP_EXT_PARAMS(2, BOOST_PP_INC(i_), t) + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +#undef AUX778076_SPEC_NAME + +#else // AUX778076_SPEC_NAME + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() + > +struct BOOST_PP_CAT(bind,i_) +{ + template< + AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) + > + struct apply + { + private: +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + + typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg::type f_; + /// +# else + typedef typename aux::resolve_bind_arg::type f_; + +# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +# if i_ > 0 +# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, )) +# include BOOST_PP_ITERATE() +# endif + + public: + +# define AUX778076_ARG(unused, i_, t) \ + BOOST_PP_COMMA_IF(i_) \ + typename BOOST_PP_CAT(t,BOOST_PP_INC(i_))::type \ +/**/ + + typedef typename BOOST_PP_CAT(apply_wrap,i_)< + f_ + BOOST_PP_COMMA_IF(i_) BOOST_MPL_PP_REPEAT(i_, AUX778076_ARG, t) + >::type type; + +# undef AUX778076_ARG + }; +}; + +namespace aux { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T), AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg< + BOOST_PP_CAT(bind,i_),AUX778076_BIND_PARAMS(U) + > +{ + typedef BOOST_PP_CAT(bind,i_) f_; + typedef typename AUX778076_APPLY::type type; +}; + +#else + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) + > +aux::yes_tag +is_bind_helper(BOOST_PP_CAT(bind,i_)*); + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) + +# if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY +/// primary template (not a specialization!) +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() + > +struct bind + : BOOST_PP_CAT(bind,i_) +{ +}; +#else +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() + > +struct bind< F AUX778076_BIND_N_SPEC_PARAMS(i_, T, na) > + : BOOST_PP_CAT(bind,i_) +{ +}; +#endif + +# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +namespace aux { + +template<> +struct bind_chooser +{ + template< + typename F, AUX778076_BIND_PARAMS(typename T) + > + struct result_ + { + typedef BOOST_PP_CAT(bind,i_)< F AUX778076_BIND_N_PARAMS(i_,T) > type; + }; +}; + +} // namespace aux + +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# endif // BOOST_MPL_CFG_NO_BIND_TEMPLATE + +#endif // AUX778076_SPEC_NAME + +# undef i_ + +///// iteration, depth == 2 + +#elif BOOST_PP_ITERATION_DEPTH() == 2 + +# define j_ BOOST_PP_FRAME_ITERATION(2) +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + + typedef aux::replace_unnamed_arg< BOOST_PP_CAT(T,j_),BOOST_PP_CAT(n,j_) > BOOST_PP_CAT(r,j_); + typedef typename BOOST_PP_CAT(r,j_)::type BOOST_PP_CAT(a,j_); + typedef typename BOOST_PP_CAT(r,j_)::next BOOST_PP_CAT(n,BOOST_PP_INC(j_)); + typedef aux::resolve_bind_arg BOOST_PP_CAT(t,j_); + /// +# else + typedef aux::resolve_bind_arg< BOOST_PP_CAT(T,j_),AUX778076_BIND_PARAMS(U)> BOOST_PP_CAT(t,j_); + +# endif +# undef j_ + +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/mpl/bind_fwd.hpp b/contrib/src/boost/mpl/bind_fwd.hpp new file mode 100644 index 0000000..4746edd --- /dev/null +++ b/contrib/src/boost/mpl/bind_fwd.hpp @@ -0,0 +1,99 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_BIND_FWD_HPP_INCLUDED +#define BOOST_MPL_BIND_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER bind_fwd.hpp +# include + +#else + +# include +# include +# include +# include + +# include +# include +# include + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header + +# if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +# define AUX778076_DMC_PARAM() , int dummy_ = 0 +# else +# define AUX778076_DMC_PARAM() +# endif + +# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + AUX778076_DMC_PARAM() \ + /**/ + +# define AUX778076_BIND_N_PARAMS(n, param) \ + BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ + AUX778076_DMC_PARAM() \ + /**/ + +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< + typename F, AUX778076_BIND_DEFAULT_PARAMS(typename T, na) + > +struct bind; +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +# undef AUX778076_BIND_N_PARAMS +# undef AUX778076_BIND_DEFAULT_PARAMS +# undef AUX778076_DMC_PARAM +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_BIND_FWD_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(bind,i_); + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/mpl/bool.hpp b/contrib/src/boost/mpl/bool.hpp new file mode 100644 index 0000000..0a6180c --- /dev/null +++ b/contrib/src/boost/mpl/bool.hpp @@ -0,0 +1,39 @@ + +#ifndef BOOST_MPL_BOOL_HPP_INCLUDED +#define BOOST_MPL_BOOL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< bool C_ > struct bool_ +{ + BOOST_STATIC_CONSTANT(bool, value = C_); + typedef integral_c_tag tag; + typedef bool_ type; + typedef bool value_type; + BOOST_CONSTEXPR operator bool() const { return this->value; } +}; + +#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) +template< bool C_ > +bool const bool_::value; +#endif + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#endif // BOOST_MPL_BOOL_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/bool_fwd.hpp b/contrib/src/boost/mpl/bool_fwd.hpp new file mode 100644 index 0000000..e629252 --- /dev/null +++ b/contrib/src/boost/mpl/bool_fwd.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_BOOL_FWD_HPP_INCLUDED +#define BOOST_MPL_BOOL_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< bool C_ > struct bool_; + +// shorcuts +typedef bool_ true_; +typedef bool_ false_; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +BOOST_MPL_AUX_ADL_BARRIER_DECL(bool_) +BOOST_MPL_AUX_ADL_BARRIER_DECL(true_) +BOOST_MPL_AUX_ADL_BARRIER_DECL(false_) + +#endif // BOOST_MPL_BOOL_FWD_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/eval_if.hpp b/contrib/src/boost/mpl/eval_if.hpp new file mode 100644 index 0000000..e892703 --- /dev/null +++ b/contrib/src/boost/mpl/eval_if.hpp @@ -0,0 +1,71 @@ + +#ifndef BOOST_MPL_EVAL_IF_HPP_INCLUDED +#define BOOST_MPL_EVAL_IF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(C) + , typename BOOST_MPL_AUX_NA_PARAM(F1) + , typename BOOST_MPL_AUX_NA_PARAM(F2) + > +struct eval_if +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \ + && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \ + ) +{ + typedef typename if_::type f_; + typedef typename f_::type type; +#else + : if_::type +{ +#endif + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2)) +}; + +// (almost) copy & paste in order to save one more +// recursively nested template instantiation to user +template< + bool C + , typename F1 + , typename F2 + > +struct eval_if_c +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \ + && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \ + ) +{ + typedef typename if_c::type f_; + typedef typename f_::type type; +#else + : if_c::type +{ +#endif +}; + +BOOST_MPL_AUX_NA_SPEC(3, eval_if) + +}} + +#endif // BOOST_MPL_EVAL_IF_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/has_xxx.hpp b/contrib/src/boost/mpl/has_xxx.hpp new file mode 100644 index 0000000..82e67dd --- /dev/null +++ b/contrib/src/boost/mpl/has_xxx.hpp @@ -0,0 +1,647 @@ + +#ifndef BOOST_MPL_HAS_XXX_HPP_INCLUDED +#define BOOST_MPL_HAS_XXX_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2006 +// Copyright David Abrahams 2002-2003 +// Copyright Daniel Walker 2007 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) ) +# include +#endif + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) + +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + +// agurt, 11/sep/02: MSVC-specific version (< 7.1), based on a USENET +// newsgroup's posting by John Madsen (comp.lang.c++.moderated, +// 1999-11-12 19:17:06 GMT); the code is _not_ standard-conforming, but +// it works way more reliably than the SFINAE-based implementation + +// Modified dwa 8/Oct/02 to handle reference types. + +# include +# include + +namespace boost { namespace mpl { namespace aux { + +struct has_xxx_tag; + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) +template< typename U > struct msvc_incomplete_array +{ + typedef char (&type)[sizeof(U) + 1]; +}; +#endif + +template< typename T > +struct msvc_is_incomplete +{ + // MSVC is capable of some kinds of SFINAE. If U is an incomplete + // type, it won't pick the second overload + static char tester(...); + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) + template< typename U > + static typename msvc_incomplete_array::type tester(type_wrapper); +#else + template< typename U > + static char (& tester(type_wrapper) )[sizeof(U)+1]; +#endif + + BOOST_STATIC_CONSTANT(bool, value = + sizeof(tester(type_wrapper())) == 1 + ); +}; + +template<> +struct msvc_is_incomplete +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +}}} + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, default_) \ +template< typename T, typename name = ::boost::mpl::aux::has_xxx_tag > \ +struct BOOST_PP_CAT(trait,_impl) : T \ +{ \ + static boost::mpl::aux::no_tag \ + test(void(*)(::boost::mpl::aux::has_xxx_tag)); \ + \ + static boost::mpl::aux::yes_tag test(...); \ + \ + BOOST_STATIC_CONSTANT(bool, value = \ + sizeof(test(static_cast(0))) \ + != sizeof(boost::mpl::aux::no_tag) \ + ); \ + typedef boost::mpl::bool_ type; \ +}; \ +\ +template< typename T, typename fallback_ = boost::mpl::bool_ > \ +struct trait \ + : boost::mpl::if_c< \ + boost::mpl::aux::msvc_is_incomplete::value \ + , boost::mpl::bool_ \ + , BOOST_PP_CAT(trait,_impl) \ + >::type \ +{ \ +}; \ +\ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, void) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, bool) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, char) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed char) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned char) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed short) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned short) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed int) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned int) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed long) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned long) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, float) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, double) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, long double) \ +/**/ + +# define BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, T) \ +template<> struct trait \ +{ \ + BOOST_STATIC_CONSTANT(bool, value = false); \ + typedef boost::mpl::bool_ type; \ +}; \ +/**/ + +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ + BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, wchar_t) \ +/**/ +#else +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ +/**/ +#endif + + +// SFINAE-based implementations below are derived from a USENET newsgroup's +// posting by Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST) + +# elif BOOST_WORKAROUND(BOOST_MSVC, <= 1400) \ + || (BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800)) && defined(__CUDACC__)) \ + || BOOST_WORKAROUND(__IBMCPP__, <= 700) + +// MSVC 7.1 & MSVC 8.0 & VACPP + +// agurt, 15/jun/05: replace overload-based SFINAE implementation with SFINAE +// applied to partial specialization to fix some apparently random failures +// (thanks to Daniel Wallin for researching this!) + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ +template< typename T > \ +struct BOOST_PP_CAT(trait, _msvc_sfinae_helper) \ +{ \ + typedef void type; \ +};\ +\ +template< typename T, typename U = void > \ +struct BOOST_PP_CAT(trait,_impl_) \ +{ \ + BOOST_STATIC_CONSTANT(bool, value = false); \ + typedef boost::mpl::bool_ type; \ +}; \ +\ +template< typename T > \ +struct BOOST_PP_CAT(trait,_impl_)< \ + T \ + , typename BOOST_PP_CAT(trait, _msvc_sfinae_helper)< typename T::name >::type \ + > \ +{ \ + BOOST_STATIC_CONSTANT(bool, value = true); \ + typedef boost::mpl::bool_ type; \ +}; \ +\ +template< typename T, typename fallback_ = boost::mpl::bool_ > \ +struct trait \ + : BOOST_PP_CAT(trait,_impl_) \ +{ \ +}; \ +/**/ + +# elif BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) ) + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF(trait, trait_tester, name, default_) \ +template< typename T, bool IS_CLASS > \ +struct trait_tester \ +{ \ + BOOST_STATIC_CONSTANT( bool, value = false ); \ +}; \ +template< typename T > \ +struct trait_tester< T, true > \ +{ \ + struct trait_tester_impl \ + { \ + template < class U > \ + static int resolve( boost::mpl::aux::type_wrapper const volatile * \ + , boost::mpl::aux::type_wrapper* = 0 ); \ + static char resolve( ... ); \ + }; \ + typedef boost::mpl::aux::type_wrapper t_; \ + BOOST_STATIC_CONSTANT( bool, value = ( sizeof( trait_tester_impl::resolve( static_cast< t_ * >(0) ) ) == sizeof(int) ) ); \ +}; \ +template< typename T, typename fallback_ = boost::mpl::bool_ > \ +struct trait \ +{ \ + BOOST_STATIC_CONSTANT( bool, value = (trait_tester< T, boost::is_class< T >::value >::value) ); \ + typedef boost::mpl::bool_< trait< T, fallback_ >::value > type; \ +}; + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ + BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF( trait \ + , BOOST_PP_CAT(trait,_tester) \ + , name \ + , default_ ) \ +/**/ + +# else // other SFINAE-capable compilers + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ +template< typename T, typename fallback_ = boost::mpl::bool_ > \ +struct trait \ +{ \ + struct gcc_3_2_wknd \ + { \ + template< typename U > \ + static boost::mpl::aux::yes_tag test( \ + boost::mpl::aux::type_wrapper const volatile* \ + , boost::mpl::aux::type_wrapper* = 0 \ + ); \ + \ + static boost::mpl::aux::no_tag test(...); \ + }; \ + \ + typedef boost::mpl::aux::type_wrapper t_; \ + BOOST_STATIC_CONSTANT(bool, value = \ + sizeof(gcc_3_2_wknd::test(static_cast(0))) \ + == sizeof(boost::mpl::aux::yes_tag) \ + ); \ + typedef boost::mpl::bool_ type; \ +}; \ +/**/ + +# endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + + +#else // BOOST_MPL_CFG_NO_HAS_XXX + +// placeholder implementation + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ +template< typename T, typename fallback_ = boost::mpl::bool_ > \ +struct trait \ +{ \ + BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \ + typedef fallback_ type; \ +}; \ +/**/ + +#endif + +#define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \ + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(BOOST_PP_CAT(has_,name), name, false) \ +/**/ + + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE) + +// Create a boolean Metafunction to detect a nested template +// member. This implementation is based on a USENET newsgroup's +// posting by Aleksey Gurtovoy (comp.lang.c++.moderated, 2002-03-19), +// Rani Sharoni's USENET posting cited above, the non-template has_xxx +// implementations above, and discussion on the Boost mailing list. + +# if !defined(BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES) +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +# define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 1 +# else +# define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 0 +# endif +# endif + +# if !defined(BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION) +# if (defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS)) +# define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 1 +# else +# define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 0 +# endif +# endif + +# if !defined(BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE) +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +# define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 1 +# else +# define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 0 +# endif +# endif + +// NOTE: Many internal implementation macros take a Boost.Preprocessor +// array argument called args which is of the following form. +// ( 4, ( trait, name, max_arity, default_ ) ) + +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \ + BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _introspect) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ + BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _substitute), n) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) \ + BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _test) \ + /**/ + +// Thanks to Guillaume Melquiond for pointing out the need for the +// "substitute" template as an argument to the overloaded test +// functions to get SFINAE to work for member templates with the +// correct name but different number of arguments. +# define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE(z, n, args) \ + template< \ + template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename V) > class V \ + > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) { \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \ + BOOST_PP_REPEAT( \ + BOOST_PP_ARRAY_ELEM(2, args) \ + , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE \ + , args \ + ) \ + /**/ + +# if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION +# define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ + template< typename V > \ + static boost::mpl::aux::no_tag \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \ + /**/ +# else +# define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ + static boost::mpl::aux::no_tag \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \ + /**/ +# endif + +# if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES +# define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT(z, n, args) \ + template< typename V > \ + static boost::mpl::aux::yes_tag \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ + boost::mpl::aux::type_wrapper< V > const volatile* \ + , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) < \ + V::template BOOST_PP_ARRAY_ELEM(1, args) \ + >* = 0 \ + ); \ + /**/ +# define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ + BOOST_PP_REPEAT( \ + BOOST_PP_ARRAY_ELEM(2, args) \ + , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT \ + , args \ + ) \ + /**/ +# else +# define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ + template< typename V > \ + static boost::mpl::aux::yes_tag \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ + V const volatile* \ + , member_macro(args, V, T)* = 0 \ + ); \ + /**/ +# endif + +# if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION +# define BOOST_MPL_HAS_MEMBER_TEST(args) \ + sizeof(BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U >(0)) \ + == sizeof(boost::mpl::aux::yes_tag) \ + /**/ +# else +# if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES +# define BOOST_MPL_HAS_MEMBER_TEST(args) \ + sizeof( \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ + static_cast< boost::mpl::aux::type_wrapper< U >* >(0) \ + ) \ + ) == sizeof(boost::mpl::aux::yes_tag) \ + /**/ +# else +# define BOOST_MPL_HAS_MEMBER_TEST(args) \ + sizeof( \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ + static_cast< U* >(0) \ + ) \ + ) == sizeof(boost::mpl::aux::yes_tag) \ + /**/ +# endif +# endif + +# define BOOST_MPL_HAS_MEMBER_INTROSPECT( \ + args, substitute_macro, member_macro \ + ) \ + template< typename U > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) { \ + BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \ + BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ + BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ + BOOST_STATIC_CONSTANT( \ + bool, value = BOOST_MPL_HAS_MEMBER_TEST(args) \ + ); \ + typedef boost::mpl::bool_< value > type; \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ + args, introspect_macro, substitute_macro, member_macro \ + ) \ + template< \ + typename T \ + , typename fallback_ \ + = boost::mpl::bool_< BOOST_PP_ARRAY_ELEM(3, args) > \ + > \ + class BOOST_PP_ARRAY_ELEM(0, args) { \ + introspect_macro(args, substitute_macro, member_macro) \ + public: \ + static const bool value \ + = BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< T >::value; \ + typedef typename BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< \ + T \ + >::type type; \ + }; \ + /**/ + +// BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE expands to the full +// implementation of the function-based metafunction. Compile with -E +// to see the preprocessor output for this macro. +# define BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \ + args, substitute_macro, member_macro \ + ) \ + BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ + args \ + , BOOST_MPL_HAS_MEMBER_INTROSPECT \ + , substitute_macro \ + , member_macro \ + ) \ + /**/ + +# if BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE + +# if !defined(BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE) +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +# define BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE 1 +# endif +# endif + +# if !BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, n \ + ) \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ + /**/ +# else +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, n \ + ) \ + BOOST_PP_CAT( \ + boost_mpl_has_xxx_ \ + , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ + ) \ + /**/ +# endif + +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME( \ + args \ + ) \ + BOOST_PP_CAT( \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, 0 \ + ) \ + , _tag \ + ) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ + z, n, args \ + ) \ + template< \ + template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename U) > class U \ + > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, n \ + ) { \ + typedef \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \ + type; \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ + args, substitute_macro \ + ) \ + typedef void \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args); \ + BOOST_PP_REPEAT( \ + BOOST_PP_ARRAY_ELEM(2, args) \ + , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE \ + , args \ + ) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE( \ + args, member_macro \ + ) \ + template< \ + typename U \ + , typename V \ + = BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \ + > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) { \ + BOOST_STATIC_CONSTANT(bool, value = false); \ + typedef boost::mpl::bool_< value > type; \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE( \ + z, n, args \ + ) \ + template< typename U > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< \ + U \ + , typename \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, n \ + )< \ + BOOST_MSVC_TYPENAME U::BOOST_PP_ARRAY_ELEM(1, args)< > \ + >::type \ + > { \ + BOOST_STATIC_CONSTANT(bool, value = true); \ + typedef boost::mpl::bool_< value > type; \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE( \ + args, member_macro \ + ) \ + BOOST_PP_REPEAT( \ + BOOST_PP_ARRAY_ELEM(2, args) \ + , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE \ + , args \ + ) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE( \ + args, substitute_macro, member_macro \ + ) \ + BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE(args, member_macro) \ + BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE(args, member_macro) \ + template< typename U > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \ + : BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U > { \ + }; \ + /**/ + +// BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE expands to the full +// implementation of the template-based metafunction. Compile with -E +// to see the preprocessor output for this macro. +// +// Note that if BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE is +// defined BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE needs +// to be expanded at namespace level before +// BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE can be used. +# define BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \ + args, substitute_macro, member_macro \ + ) \ + BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ + args, substitute_macro \ + ) \ + BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ + args \ + , BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE \ + , substitute_macro \ + , member_macro \ + ) \ + /**/ + +# endif // BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE + +// Note: In the current implementation the parameter and access macros +// are no longer expanded. +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ + BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \ + ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \ + , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \ + , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \ + ) \ + /**/ +# else +# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ + BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \ + ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \ + , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \ + , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \ + ) \ + /**/ +# endif + +#else // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + +// placeholder implementation + +# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ + template< typename T \ + , typename fallback_ = boost::mpl::bool_< default_ > > \ + struct trait { \ + BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \ + typedef fallback_ type; \ + }; \ + /**/ + +#endif // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + +# define BOOST_MPL_HAS_XXX_TEMPLATE_DEF(name) \ + BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF( \ + BOOST_PP_CAT(has_, name), name, false \ + ) \ + /**/ + +#endif // BOOST_MPL_HAS_XXX_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/identity.hpp b/contrib/src/boost/mpl/identity.hpp new file mode 100644 index 0000000..190d2f5 --- /dev/null +++ b/contrib/src/boost/mpl/identity.hpp @@ -0,0 +1,45 @@ + +#ifndef BOOST_MPL_IDENTITY_HPP_INCLUDED +#define BOOST_MPL_IDENTITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct identity +{ + typedef T type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, identity, (T)) +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct make_identity +{ + typedef identity type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, make_identity, (T)) +}; + +BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, identity) +BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, make_identity) + +}} + +#endif // BOOST_MPL_IDENTITY_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/if.hpp b/contrib/src/boost/mpl/if.hpp new file mode 100644 index 0000000..b6bdf6c --- /dev/null +++ b/contrib/src/boost/mpl/if.hpp @@ -0,0 +1,135 @@ + +#ifndef BOOST_MPL_IF_HPP_INCLUDED +#define BOOST_MPL_IF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< + bool C + , typename T1 + , typename T2 + > +struct if_c +{ + typedef T1 type; +}; + +template< + typename T1 + , typename T2 + > +struct if_c +{ + typedef T2 type; +}; + +// agurt, 05/sep/04: nondescriptive parameter names for the sake of DigitalMars +// (and possibly MWCW < 8.0); see http://article.gmane.org/gmane.comp.lib.boost.devel/108959 +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename BOOST_MPL_AUX_NA_PARAM(T3) + > +struct if_ +{ + private: + // agurt, 02/jan/03: two-step 'type' definition for the sake of aCC + typedef if_c< +#if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) + BOOST_MPL_AUX_VALUE_WKND(T1)::value +#else + BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value) +#endif + , T2 + , T3 + > almost_type_; + + public: + typedef typename almost_type_::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(T1,T2,T3)) +}; + +#else + +// no partial class template specialization + +namespace aux { + +template< bool C > +struct if_impl +{ + template< typename T1, typename T2 > struct result_ + { + typedef T1 type; + }; +}; + +template<> +struct if_impl +{ + template< typename T1, typename T2 > struct result_ + { + typedef T2 type; + }; +}; + +} // namespace aux + +template< + bool C_ + , typename T1 + , typename T2 + > +struct if_c +{ + typedef typename aux::if_impl< C_ > + ::template result_::type type; +}; + +// (almost) copy & paste in order to save one more +// recursively nested template instantiation to user +template< + typename BOOST_MPL_AUX_NA_PARAM(C_) + , typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct if_ +{ + enum { msvc_wknd_ = BOOST_MPL_AUX_MSVC_VALUE_WKND(C_)::value }; + + typedef typename aux::if_impl< BOOST_MPL_AUX_STATIC_CAST(bool, msvc_wknd_) > + ::template result_::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C_,T1,T2)) +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +BOOST_MPL_AUX_NA_SPEC(3, if_) + +}} + +#endif // BOOST_MPL_IF_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/int.hpp b/contrib/src/boost/mpl/int.hpp new file mode 100644 index 0000000..b7fa0a7 --- /dev/null +++ b/contrib/src/boost/mpl/int.hpp @@ -0,0 +1,22 @@ + +#ifndef BOOST_MPL_INT_HPP_INCLUDED +#define BOOST_MPL_INT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#define AUX_WRAPPER_VALUE_TYPE int +#include + +#endif // BOOST_MPL_INT_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/int_fwd.hpp b/contrib/src/boost/mpl/int_fwd.hpp new file mode 100644 index 0000000..03d20c1 --- /dev/null +++ b/contrib/src/boost/mpl/int_fwd.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_INT_FWD_HPP_INCLUDED +#define BOOST_MPL_INT_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(int_) + +#endif // BOOST_MPL_INT_FWD_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/integral_c_tag.hpp b/contrib/src/boost/mpl/integral_c_tag.hpp new file mode 100644 index 0000000..b604692 --- /dev/null +++ b/contrib/src/boost/mpl/integral_c_tag.hpp @@ -0,0 +1,26 @@ + +#ifndef BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED +#define BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + + +#include +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +struct integral_c_tag { BOOST_STATIC_CONSTANT(int, value = 0); }; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c_tag) + +#endif // BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/is_placeholder.hpp b/contrib/src/boost/mpl/is_placeholder.hpp new file mode 100644 index 0000000..9f79ef1 --- /dev/null +++ b/contrib/src/boost/mpl/is_placeholder.hpp @@ -0,0 +1,67 @@ + +#ifndef BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED +#define BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< typename T > +struct is_placeholder + : bool_ +{ +}; + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct is_placeholder< arg > + : bool_ +{ +}; + +#else + +namespace aux { + +aux::no_tag is_placeholder_helper(...); + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +aux::yes_tag is_placeholder_helper(aux::type_wrapper< arg >*); + +} // namespace aux + +template< typename T > +struct is_placeholder +{ + static aux::type_wrapper* get(); + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_placeholder_helper(get())) == sizeof(aux::yes_tag) + ); + + typedef bool_ type; +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +}} + +#endif // BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/lambda.hpp b/contrib/src/boost/mpl/lambda.hpp new file mode 100644 index 0000000..cc8f607 --- /dev/null +++ b/contrib/src/boost/mpl/lambda.hpp @@ -0,0 +1,29 @@ + +#ifndef BOOST_MPL_LAMBDA_HPP_INCLUDED +#define BOOST_MPL_LAMBDA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# include +#else +# include +# include +# define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS +#endif + +#endif // BOOST_MPL_LAMBDA_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/lambda_fwd.hpp b/contrib/src/boost/mpl/lambda_fwd.hpp new file mode 100644 index 0000000..57b0426 --- /dev/null +++ b/contrib/src/boost/mpl/lambda_fwd.hpp @@ -0,0 +1,57 @@ + +#ifndef BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED +#define BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) + +# include +# include +# include + +namespace boost { namespace mpl { + +template< + typename T = na + , typename Tag = void_ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM( + typename Arity = int_< aux::template_arity::value > + ) + > +struct lambda; + +}} + +#else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +# include + +namespace boost { namespace mpl { + +template< + typename T = na + , typename Tag = void_ + , typename Protect = true_ + > +struct lambda; + +}} + +#endif + +#endif // BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/limits/arity.hpp b/contrib/src/boost/mpl/limits/arity.hpp new file mode 100644 index 0000000..8c3eb36 --- /dev/null +++ b/contrib/src/boost/mpl/limits/arity.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED +#define BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) +# define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 5 +#endif + +#endif // BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/logical.hpp b/contrib/src/boost/mpl/logical.hpp new file mode 100644 index 0000000..c8236b5 --- /dev/null +++ b/contrib/src/boost/mpl/logical.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_LOGICAL_HPP_INCLUDED +#define BOOST_MPL_LOGICAL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#endif // BOOST_MPL_LOGICAL_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/next.hpp b/contrib/src/boost/mpl/next.hpp new file mode 100644 index 0000000..954b222 --- /dev/null +++ b/contrib/src/boost/mpl/next.hpp @@ -0,0 +1,19 @@ + +#ifndef BOOST_MPL_NEXT_HPP_INCLUDED +#define BOOST_MPL_NEXT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#endif // BOOST_MPL_NEXT_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/next_prior.hpp b/contrib/src/boost/mpl/next_prior.hpp new file mode 100644 index 0000000..d45fa20 --- /dev/null +++ b/contrib/src/boost/mpl/next_prior.hpp @@ -0,0 +1,49 @@ + +#ifndef BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED +#define BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_COMMON_NAME_WKND(next) +BOOST_MPL_AUX_COMMON_NAME_WKND(prior) + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct next +{ + typedef typename T::next type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,next,(T)) +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct prior +{ + typedef typename T::prior type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,prior,(T)) +}; + +BOOST_MPL_AUX_NA_SPEC(1, next) +BOOST_MPL_AUX_NA_SPEC(1, prior) + +}} + +#endif // BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/not.hpp b/contrib/src/boost/mpl/not.hpp new file mode 100644 index 0000000..d5f6025 --- /dev/null +++ b/contrib/src/boost/mpl/not.hpp @@ -0,0 +1,51 @@ + +#ifndef BOOST_MPL_NOT_HPP_INCLUDED +#define BOOST_MPL_NOT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(long, C_) > // 'long' is intentional here +struct not_impl + : bool_ +{ +}; + +} // namespace aux + + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct not_ + : aux::not_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T)::value + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,not_,(T)) +}; + +BOOST_MPL_AUX_NA_SPEC(1,not_) + +}} + +#endif // BOOST_MPL_NOT_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/or.hpp b/contrib/src/boost/mpl/or.hpp new file mode 100644 index 0000000..f9704d5 --- /dev/null +++ b/contrib/src/boost/mpl/or.hpp @@ -0,0 +1,61 @@ + +#ifndef BOOST_MPL_OR_HPP_INCLUDED +#define BOOST_MPL_OR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# include +# include +# include +# include +# include + +// agurt, 19/may/04: workaround a conflict with header's +// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(or)' +// has to be checked in a separate condition, otherwise GCC complains +// about 'or' being an alternative token +#if defined(_MSC_VER) && !defined(__clang__) +#ifndef __GCCXML__ +#if defined(or) +# pragma push_macro("or") +# undef or +# define or(x) +#endif +#endif +#endif + +# define BOOST_MPL_PREPROCESSED_HEADER or.hpp +# include + +#if defined(_MSC_VER) && !defined(__clang__) +#ifndef __GCCXML__ +#if defined(or) +# pragma pop_macro("or") +#endif +#endif +#endif + +#else + +# define AUX778076_OP_NAME or_ +# define AUX778076_OP_VALUE1 true +# define AUX778076_OP_VALUE2 false +# include + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_OR_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/placeholders.hpp b/contrib/src/boost/mpl/placeholders.hpp new file mode 100644 index 0000000..df0373c --- /dev/null +++ b/contrib/src/boost/mpl/placeholders.hpp @@ -0,0 +1,100 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED +#define BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include + +# if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) +# define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) \ + using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \ + /**/ +# else +# define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) /**/ +# endif + +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER placeholders.hpp +# include + +#else + +# include +# include +# include +# include + +// watch out for GNU gettext users, who #define _(x) +#if !defined(_) || defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<-1> _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} +#endif + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY + 1, )) +#include BOOST_PP_ITERATE() + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +typedef arg BOOST_PP_CAT(_,i_); + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(BOOST_PP_CAT(_,i_)) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::BOOST_PP_CAT(_,i_); +} + +}} + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/mpl/protect.hpp b/contrib/src/boost/mpl/protect.hpp new file mode 100644 index 0000000..80574c2 --- /dev/null +++ b/contrib/src/boost/mpl/protect.hpp @@ -0,0 +1,55 @@ + +#ifndef BOOST_MPL_PROTECT_HPP_INCLUDED +#define BOOST_MPL_PROTECT_HPP_INCLUDED + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + , int not_le_ = 0 + > +struct protect : T +{ +#if BOOST_WORKAROUND(__EDG_VERSION__, == 238) + typedef mpl::protect type; +#else + typedef protect type; +#endif +}; + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +namespace aux { +template< BOOST_MPL_AUX_NTTP_DECL(int, N), typename T > +struct arity< protect, N > + : arity +{ +}; +} // namespace aux +#endif + +BOOST_MPL_AUX_NA_SPEC_MAIN(1, protect) +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(1, 1, protect) +#endif + +}} + +#endif // BOOST_MPL_PROTECT_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/quote.hpp b/contrib/src/boost/mpl/quote.hpp new file mode 100644 index 0000000..242c2e7 --- /dev/null +++ b/contrib/src/boost/mpl/quote.hpp @@ -0,0 +1,151 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_QUOTE_HPP_INCLUDED +#define BOOST_MPL_QUOTE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +#endif + +#include +#include + +#if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ + && !defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) +# define BOOST_MPL_CFG_NO_QUOTE_TEMPLATE +#endif + +#if !defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) \ + && defined(BOOST_MPL_CFG_NO_HAS_XXX) +# define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER quote.hpp +# include + +#else + +# include +# include +# include +# include + +# include +# include + +#if !defined(BOOST_MPL_CFG_NO_QUOTE_TEMPLATE) + +namespace boost { namespace mpl { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< typename T, bool has_type_ > +struct quote_impl +// GCC has a problem with metafunction forwarding when T is a +// specialization of a template called 'type'. +# if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4)) \ + && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(0)) \ + && BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, BOOST_TESTED_AT(2)) +{ + typedef typename T::type type; +}; +# else + : T +{ +}; +# endif + +template< typename T > +struct quote_impl +{ + typedef T type; +}; + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +template< bool > struct quote_impl +{ + template< typename T > struct result_ + : T + { + }; +}; + +template<> struct quote_impl +{ + template< typename T > struct result_ + { + typedef T type; + }; +}; + +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_QUOTE_TEMPLATE + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_QUOTE_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F + , typename Tag = void_ + > +struct BOOST_PP_CAT(quote,i_) +{ + template< BOOST_MPL_PP_PARAMS(i_, typename U) > struct apply +#if defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) + { + typedef typename quote_impl< + F< BOOST_MPL_PP_PARAMS(i_, U) > + , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value + >::type type; + }; +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + : quote_impl< + F< BOOST_MPL_PP_PARAMS(i_, U) > + , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value + > + { + }; +#else + : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value > + ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > > + { + }; +#endif +}; + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/contrib/src/boost/mpl/void.hpp b/contrib/src/boost/mpl/void.hpp new file mode 100644 index 0000000..3dcbdd1 --- /dev/null +++ b/contrib/src/boost/mpl/void.hpp @@ -0,0 +1,76 @@ + +#ifndef BOOST_MPL_VOID_HPP_INCLUDED +#define BOOST_MPL_VOID_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +// [JDG Feb-4-2003] made void_ a complete type to allow it to be +// instantiated so that it can be passed in as an object that can be +// used to select an overloaded function. Possible use includes signaling +// a zero arity functor evaluation call. +struct void_ { typedef void_ type; }; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +namespace boost { namespace mpl { + +template< typename T > +struct is_void_ + : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using false_::value; +#endif +}; + +template<> +struct is_void_ + : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using true_::value; +#endif +}; + +template< typename T > +struct is_not_void_ + : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using true_::value; +#endif +}; + +template<> +struct is_not_void_ + : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using false_::value; +#endif +}; + +BOOST_MPL_AUX_NA_SPEC(1, is_void_) +BOOST_MPL_AUX_NA_SPEC(1, is_not_void_) + +}} + +#endif // BOOST_MPL_VOID_HPP_INCLUDED diff --git a/contrib/src/boost/mpl/void_fwd.hpp b/contrib/src/boost/mpl/void_fwd.hpp new file mode 100644 index 0000000..86078b5 --- /dev/null +++ b/contrib/src/boost/mpl/void_fwd.hpp @@ -0,0 +1,26 @@ + +#ifndef BOOST_MPL_VOID_FWD_HPP_INCLUDED +#define BOOST_MPL_VOID_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +struct void_; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(void_) + +#endif // BOOST_MPL_VOID_FWD_HPP_INCLUDED diff --git a/contrib/src/boost/next_prior.hpp b/contrib/src/boost/next_prior.hpp new file mode 100644 index 0000000..7854ec4 --- /dev/null +++ b/contrib/src/boost/next_prior.hpp @@ -0,0 +1,165 @@ +// Boost next_prior.hpp header file ---------------------------------------// + +// (C) Copyright Dave Abrahams and Daniel Walker 1999-2003. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/utility for documentation. + +// Revision History +// 13 Dec 2003 Added next(x, n) and prior(x, n) (Daniel Walker) + +#ifndef BOOST_NEXT_PRIOR_HPP_INCLUDED +#define BOOST_NEXT_PRIOR_HPP_INCLUDED + +#include +#if defined(_MSC_VER) && _MSC_VER <= 1310 +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +// Helper functions for classes like bidirectional iterators not supporting +// operator+ and operator- +// +// Usage: +// const std::list::iterator p = get_some_iterator(); +// const std::list::iterator prev = boost::prior(p); +// const std::list::iterator next = boost::next(prev, 2); + +// Contributed by Dave Abrahams + +namespace next_prior_detail { + +template< typename T, typename Distance, bool HasPlus = has_plus< T, Distance >::value > +struct next_impl2 +{ + static T call(T x, Distance n) + { + std::advance(x, n); + return x; + } +}; + +template< typename T, typename Distance > +struct next_impl2< T, Distance, true > +{ + static T call(T x, Distance n) + { + return x + n; + } +}; + + +template< typename T, typename Distance, bool HasPlusAssign = has_plus_assign< T, Distance >::value > +struct next_impl1 : + public next_impl2< T, Distance > +{ +}; + +template< typename T, typename Distance > +struct next_impl1< T, Distance, true > +{ + static T call(T x, Distance n) + { + x += n; + return x; + } +}; + + +template< + typename T, + typename Distance, + typename PromotedDistance = typename integral_promotion< Distance >::type, +#if !defined(_MSC_VER) || _MSC_VER > 1310 + bool IsUInt = is_unsigned< PromotedDistance >::value +#else + // MSVC 7.1 has problems with applying is_unsigned to non-integral types + bool IsUInt = mpl::and_< is_integral< PromotedDistance >, is_unsigned< PromotedDistance > >::value +#endif +> +struct prior_impl3 +{ + static T call(T x, Distance n) + { + std::advance(x, -n); + return x; + } +}; + +template< typename T, typename Distance, typename PromotedDistance > +struct prior_impl3< T, Distance, PromotedDistance, true > +{ + static T call(T x, Distance n) + { + typedef typename make_signed< PromotedDistance >::type signed_distance; + std::advance(x, -static_cast< signed_distance >(static_cast< PromotedDistance >(n))); + return x; + } +}; + + +template< typename T, typename Distance, bool HasMinus = has_minus< T, Distance >::value > +struct prior_impl2 : + public prior_impl3< T, Distance > +{ +}; + +template< typename T, typename Distance > +struct prior_impl2< T, Distance, true > +{ + static T call(T x, Distance n) + { + return x - n; + } +}; + + +template< typename T, typename Distance, bool HasMinusAssign = has_minus_assign< T, Distance >::value > +struct prior_impl1 : + public prior_impl2< T, Distance > +{ +}; + +template< typename T, typename Distance > +struct prior_impl1< T, Distance, true > +{ + static T call(T x, Distance n) + { + x -= n; + return x; + } +}; + +} // namespace next_prior_detail + +template +inline T next(T x) { return ++x; } + +template +inline T next(T x, Distance n) +{ + return next_prior_detail::next_impl1< T, Distance >::call(x, n); +} + +template +inline T prior(T x) { return --x; } + +template +inline T prior(T x, Distance n) +{ + return next_prior_detail::prior_impl1< T, Distance >::call(x, n); +} + +} // namespace boost + +#endif // BOOST_NEXT_PRIOR_HPP_INCLUDED diff --git a/contrib/src/boost/noncopyable.hpp b/contrib/src/boost/noncopyable.hpp new file mode 100644 index 0000000..e998ee8 --- /dev/null +++ b/contrib/src/boost/noncopyable.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NONCOPYABLE_HPP +#define BOOST_NONCOPYABLE_HPP + +// The header file at this path is deprecated; +// use boost/core/noncopyable.hpp instead. + +#include + +#endif diff --git a/contrib/src/boost/pending/integer_log2.hpp b/contrib/src/boost/pending/integer_log2.hpp new file mode 100644 index 0000000..023ec7a --- /dev/null +++ b/contrib/src/boost/pending/integer_log2.hpp @@ -0,0 +1,9 @@ +#ifndef BOOST_PENDING_INTEGER_LOG2_HPP +#define BOOST_PENDING_INTEGER_LOG2_HPP + +// The header file at this path is deprecated; +// use boost/integer/integer_log2.hpp instead. + +#include + +#endif diff --git a/contrib/src/boost/pending/lowest_bit.hpp b/contrib/src/boost/pending/lowest_bit.hpp new file mode 100644 index 0000000..dd6e6e8 --- /dev/null +++ b/contrib/src/boost/pending/lowest_bit.hpp @@ -0,0 +1,39 @@ +// ----------------------------------------------------------- +// lowest_bit.hpp +// +// Position of the lowest bit 'on' +// +// Copyright (c) 2003-2004, 2008 Gennaro Prota +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +#ifndef BOOST_LOWEST_BIT_HPP_GP_20030301 +#define BOOST_LOWEST_BIT_HPP_GP_20030301 + +#include +#include "boost/pending/integer_log2.hpp" + + +namespace boost { + + template + int lowest_bit(T x) { + + assert(x >= 1); // PRE + + // clear all bits on except the rightmost one, + // then calculate the logarithm base 2 + // + return boost::integer_log2( x - ( x & (x-1) ) ); + + } + + +} + + +#endif // include guard diff --git a/contrib/src/boost/predef.h b/contrib/src/boost/predef.h new file mode 100644 index 0000000..4965337 --- /dev/null +++ b/contrib/src/boost/predef.h @@ -0,0 +1,24 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_H +#define BOOST_PREDEF_H +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#endif diff --git a/contrib/src/boost/predef/architecture.h b/contrib/src/boost/predef/architecture.h new file mode 100644 index 0000000..c433d43 --- /dev/null +++ b/contrib/src/boost/predef/architecture.h @@ -0,0 +1,32 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_ARCHITECTURE_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_ARCHITECTURE_H +#define BOOST_PREDEF_ARCHITECTURE_H +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +/*#include */ + +#endif diff --git a/contrib/src/boost/predef/architecture/alpha.h b/contrib/src/boost/predef/architecture/alpha.h new file mode 100644 index 0000000..5bcade1 --- /dev/null +++ b/contrib/src/boost/predef/architecture/alpha.h @@ -0,0 +1,59 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_ALPHA_H +#define BOOST_PREDEF_ARCHITECTURE_ALPHA_H + +#include +#include + +/*` +[heading `BOOST_ARCH_ALPHA`] + +[@http://en.wikipedia.org/wiki/DEC_Alpha DEC Alpha] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + [[`__alpha__`] [__predef_detection__]] + [[`__alpha`] [__predef_detection__]] + [[`_M_ALPHA`] [__predef_detection__]] + + [[`__alpha_ev4__`] [4.0.0]] + [[`__alpha_ev5__`] [5.0.0]] + [[`__alpha_ev6__`] [6.0.0]] + ] + */ + +#define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__alpha__) || defined(__alpha) || \ + defined(_M_ALPHA) +# undef BOOST_ARCH_ALPHA +# if !defined(BOOST_ARCH_ALPHA) && defined(__alpha_ev4__) +# define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_ALPHA) && defined(__alpha_ev5__) +# define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER(5,0,0) +# endif +# if !defined(BOOST_ARCH_ALPHA) && defined(__alpha_ev6__) +# define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER(6,0,0) +# endif +# if !defined(BOOST_ARCH_ALPHA) +# define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_ALPHA +# define BOOST_ARCH_ALPHA_AVAILABLE +#endif + +#define BOOST_ARCH_ALPHA_NAME "DEC Alpha" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_ALPHA,BOOST_ARCH_ALPHA_NAME) diff --git a/contrib/src/boost/predef/architecture/arm.h b/contrib/src/boost/predef/architecture/arm.h new file mode 100644 index 0000000..b200c62 --- /dev/null +++ b/contrib/src/boost/predef/architecture/arm.h @@ -0,0 +1,70 @@ +/* +Copyright Rene Rivera 2008-2015 +Copyright Franz Detro 2014 +Copyright (c) Microsoft Corporation 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_ARM_H +#define BOOST_PREDEF_ARCHITECTURE_ARM_H + +#include +#include + +/*` +[heading `BOOST_ARCH_ARM`] + +[@http://en.wikipedia.org/wiki/ARM_architecture ARM] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__arm__`] [__predef_detection__]] + [[`__arm64`] [__predef_detection__]] + [[`__thumb__`] [__predef_detection__]] + [[`__TARGET_ARCH_ARM`] [__predef_detection__]] + [[`__TARGET_ARCH_THUMB`] [__predef_detection__]] + [[`_M_ARM`] [__predef_detection__]] + + [[`__arm64`] [8.0.0]] + [[`__TARGET_ARCH_ARM`] [V.0.0]] + [[`__TARGET_ARCH_THUMB`] [V.0.0]] + [[`_M_ARM`] [V.0.0]] + ] + */ + +#define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \ + defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || \ + defined(_M_ARM) +# undef BOOST_ARCH_ARM +# if !defined(BOOST_ARCH_ARM) && defined(__arm64) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0) +# endif +# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_ARM) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_ARM,0,0) +# endif +# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_THUMB) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_THUMB,0,0) +# endif +# if !defined(BOOST_ARCH_ARM) && defined(_M_ARM) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(_M_ARM,0,0) +# endif +# if !defined(BOOST_ARCH_ARM) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_ARM +# define BOOST_ARCH_ARM_AVAILABLE +#endif + +#define BOOST_ARCH_ARM_NAME "ARM" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_ARM,BOOST_ARCH_ARM_NAME) diff --git a/contrib/src/boost/predef/architecture/blackfin.h b/contrib/src/boost/predef/architecture/blackfin.h new file mode 100644 index 0000000..84c58a2 --- /dev/null +++ b/contrib/src/boost/predef/architecture/blackfin.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2013-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_BLACKFIN_H +#define BOOST_PREDEF_ARCHITECTURE_BLACKFIN_H + +#include +#include + +/*` +[heading `BOOST_ARCH_BLACKFIN`] + +Blackfin Processors from Analog Devices. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__bfin__`] [__predef_detection__]] + [[`__BFIN__`] [__predef_detection__]] + [[`bfin`] [__predef_detection__]] + [[`BFIN`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_BLACKFIN BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__bfin__) || defined(__BFIN__) || \ + defined(bfin) || defined(BFIN) +# undef BOOST_ARCH_BLACKFIN +# define BOOST_ARCH_BLACKFIN BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_BLACKFIN +# define BOOST_ARCH_BLACKFIN_AVAILABLE +#endif + +#define BOOST_ARCH_BLACKFIN_NAME "Blackfin" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_BLACKFIN,BOOST_ARCH_BLACKFIN_NAME) diff --git a/contrib/src/boost/predef/architecture/convex.h b/contrib/src/boost/predef/architecture/convex.h new file mode 100644 index 0000000..ac783a9 --- /dev/null +++ b/contrib/src/boost/predef/architecture/convex.h @@ -0,0 +1,65 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_CONVEX_H +#define BOOST_PREDEF_ARCHITECTURE_CONVEX_H + +#include +#include + +/*` +[heading `BOOST_ARCH_CONVEX`] + +[@http://en.wikipedia.org/wiki/Convex_Computer Convex Computer] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__convex__`] [__predef_detection__]] + + [[`__convex_c1__`] [1.0.0]] + [[`__convex_c2__`] [2.0.0]] + [[`__convex_c32__`] [3.2.0]] + [[`__convex_c34__`] [3.4.0]] + [[`__convex_c38__`] [3.8.0]] + ] + */ + +#define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__convex__) +# undef BOOST_ARCH_CONVEX +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c1__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c2__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c32__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(3,2,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c34__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(3,4,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c38__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(3,8,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_CONVEX +# define BOOST_ARCH_CONVEX_AVAILABLE +#endif + +#define BOOST_ARCH_CONVEX_NAME "Convex Computer" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_CONVEX,BOOST_ARCH_CONVEX_NAME) diff --git a/contrib/src/boost/predef/architecture/ia64.h b/contrib/src/boost/predef/architecture/ia64.h new file mode 100644 index 0000000..9b1972b --- /dev/null +++ b/contrib/src/boost/predef/architecture/ia64.h @@ -0,0 +1,49 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_IA64_H +#define BOOST_PREDEF_ARCHITECTURE_IA64_H + +#include +#include + +/*` +[heading `BOOST_ARCH_IA64`] + +[@http://en.wikipedia.org/wiki/Ia64 Intel Itanium 64] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__ia64__`] [__predef_detection__]] + [[`_IA64`] [__predef_detection__]] + [[`__IA64__`] [__predef_detection__]] + [[`__ia64`] [__predef_detection__]] + [[`_M_IA64`] [__predef_detection__]] + [[`__itanium__`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_IA64 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__ia64__) || defined(_IA64) || \ + defined(__IA64__) || defined(__ia64) || \ + defined(_M_IA64) || defined(__itanium__) +# undef BOOST_ARCH_IA64 +# define BOOST_ARCH_IA64 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_IA64 +# define BOOST_ARCH_IA64_AVAILABLE +#endif + +#define BOOST_ARCH_IA64_NAME "Intel Itanium 64" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_IA64,BOOST_ARCH_IA64_NAME) diff --git a/contrib/src/boost/predef/architecture/m68k.h b/contrib/src/boost/predef/architecture/m68k.h new file mode 100644 index 0000000..63ed5f8 --- /dev/null +++ b/contrib/src/boost/predef/architecture/m68k.h @@ -0,0 +1,82 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_M68K_H +#define BOOST_PREDEF_ARCHITECTURE_M68K_H + +#include +#include + +/*` +[heading `BOOST_ARCH_M68K`] + +[@http://en.wikipedia.org/wiki/M68k Motorola 68k] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__m68k__`] [__predef_detection__]] + [[`M68000`] [__predef_detection__]] + + [[`__mc68060__`] [6.0.0]] + [[`mc68060`] [6.0.0]] + [[`__mc68060`] [6.0.0]] + [[`__mc68040__`] [4.0.0]] + [[`mc68040`] [4.0.0]] + [[`__mc68040`] [4.0.0]] + [[`__mc68030__`] [3.0.0]] + [[`mc68030`] [3.0.0]] + [[`__mc68030`] [3.0.0]] + [[`__mc68020__`] [2.0.0]] + [[`mc68020`] [2.0.0]] + [[`__mc68020`] [2.0.0]] + [[`__mc68010__`] [1.0.0]] + [[`mc68010`] [1.0.0]] + [[`__mc68010`] [1.0.0]] + [[`__mc68000__`] [0.0.1]] + [[`mc68000`] [0.0.1]] + [[`__mc68000`] [0.0.1]] + ] + */ + +#define BOOST_ARCH_M68K BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__m68k__) || defined(M68000) +# undef BOOST_ARCH_M68K +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68060__) || defined(mc68060) || defined(__mc68060)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(6,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68040__) || defined(mc68040) || defined(__mc68040)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68030__) || defined(mc68030) || defined(__mc68030)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68020__) || defined(mc68020) || defined(__mc68020)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68010__) || defined(mc68010) || defined(__mc68010)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68000__) || defined(mc68000) || defined(__mc68000)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if !defined(BOOST_ARCH_M68K) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_M68K +# define BOOST_ARCH_M68K_AVAILABLE +#endif + +#define BOOST_ARCH_M68K_NAME "Motorola 68k" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_M68K,BOOST_ARCH_M68K_NAME) diff --git a/contrib/src/boost/predef/architecture/mips.h b/contrib/src/boost/predef/architecture/mips.h new file mode 100644 index 0000000..0189d7d --- /dev/null +++ b/contrib/src/boost/predef/architecture/mips.h @@ -0,0 +1,73 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_MIPS_H +#define BOOST_PREDEF_ARCHITECTURE_MIPS_H + +#include +#include + +/*` +[heading `BOOST_ARCH_MIPS`] + +[@http://en.wikipedia.org/wiki/MIPS_architecture MIPS] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__mips__`] [__predef_detection__]] + [[`__mips`] [__predef_detection__]] + [[`__MIPS__`] [__predef_detection__]] + + [[`__mips`] [V.0.0]] + [[`_MIPS_ISA_MIPS1`] [1.0.0]] + [[`_R3000`] [1.0.0]] + [[`_MIPS_ISA_MIPS2`] [2.0.0]] + [[`__MIPS_ISA2__`] [2.0.0]] + [[`_R4000`] [2.0.0]] + [[`_MIPS_ISA_MIPS3`] [3.0.0]] + [[`__MIPS_ISA3__`] [3.0.0]] + [[`_MIPS_ISA_MIPS4`] [4.0.0]] + [[`__MIPS_ISA4__`] [4.0.0]] + ] + */ + +#define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__mips__) || defined(__mips) || \ + defined(__MIPS__) +# undef BOOST_ARCH_MIPS +# if !defined(BOOST_ARCH_MIPS) && (defined(__mips)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(__mips,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS1) || defined(_R3000)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS2) || defined(__MIPS_ISA2__) || defined(_R4000)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS3) || defined(__MIPS_ISA3__)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS4) || defined(__MIPS_ISA4__)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_MIPS +# define BOOST_ARCH_MIPS_AVAILABLE +#endif + +#define BOOST_ARCH_MIPS_NAME "MIPS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_MIPS,BOOST_ARCH_MIPS_NAME) diff --git a/contrib/src/boost/predef/architecture/parisc.h b/contrib/src/boost/predef/architecture/parisc.h new file mode 100644 index 0000000..7c7625f --- /dev/null +++ b/contrib/src/boost/predef/architecture/parisc.h @@ -0,0 +1,64 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_PARISC_H +#define BOOST_PREDEF_ARCHITECTURE_PARISC_H + +#include +#include + +/*` +[heading `BOOST_ARCH_PARISK`] + +[@http://en.wikipedia.org/wiki/PA-RISC_family HP/PA RISC] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__hppa__`] [__predef_detection__]] + [[`__hppa`] [__predef_detection__]] + [[`__HPPA__`] [__predef_detection__]] + + [[`_PA_RISC1_0`] [1.0.0]] + [[`_PA_RISC1_1`] [1.1.0]] + [[`__HPPA11__`] [1.1.0]] + [[`__PA7100__`] [1.1.0]] + [[`_PA_RISC2_0`] [2.0.0]] + [[`__RISC2_0__`] [2.0.0]] + [[`__HPPA20__`] [2.0.0]] + [[`__PA8000__`] [2.0.0]] + ] + */ + +#define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__hppa__) || defined(__hppa) || defined(__HPPA__) +# undef BOOST_ARCH_PARISC +# if !defined(BOOST_ARCH_PARISC) && (defined(_PA_RISC1_0)) +# define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_PARISC) && (defined(_PA_RISC1_1) || defined(__HPPA11__) || defined(__PA7100__)) +# define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER(1,1,0) +# endif +# if !defined(BOOST_ARCH_PARISC) && (defined(_PA_RISC2_0) || defined(__RISC2_0__) || defined(__HPPA20__) || defined(__PA8000__)) +# define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_PARISC) +# define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_PARISC +# define BOOST_ARCH_PARISC_AVAILABLE +#endif + +#define BOOST_ARCH_PARISC_NAME "HP/PA RISC" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PARISC,BOOST_ARCH_PARISC_NAME) diff --git a/contrib/src/boost/predef/architecture/ppc.h b/contrib/src/boost/predef/architecture/ppc.h new file mode 100644 index 0000000..e8c57c9 --- /dev/null +++ b/contrib/src/boost/predef/architecture/ppc.h @@ -0,0 +1,72 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_PPC_H +#define BOOST_PREDEF_ARCHITECTURE_PPC_H + +#include +#include + +/*` +[heading `BOOST_ARCH_PPC`] + +[@http://en.wikipedia.org/wiki/PowerPC PowerPC] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__powerpc`] [__predef_detection__]] + [[`__powerpc__`] [__predef_detection__]] + [[`__POWERPC__`] [__predef_detection__]] + [[`__ppc__`] [__predef_detection__]] + [[`_M_PPC`] [__predef_detection__]] + [[`_ARCH_PPC`] [__predef_detection__]] + [[`__PPCGECKO__`] [__predef_detection__]] + [[`__PPCBROADWAY__`] [__predef_detection__]] + [[`_XENON`] [__predef_detection__]] + + [[`__ppc601__`] [6.1.0]] + [[`_ARCH_601`] [6.1.0]] + [[`__ppc603__`] [6.3.0]] + [[`_ARCH_603`] [6.3.0]] + [[`__ppc604__`] [6.4.0]] + [[`__ppc604__`] [6.4.0]] + ] + */ + +#define BOOST_ARCH_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__powerpc) || defined(__powerpc__) || \ + defined(__POWERPC__) || defined(__ppc__) || \ + defined(_M_PPC) || defined(_ARCH_PPC) || \ + defined(__PPCGECKO__) || defined(__PPCBROADWAY__) || \ + defined(_XENON) +# undef BOOST_ARCH_PPC +# if !defined (BOOST_ARCH_PPC) && (defined(__ppc601__) || defined(_ARCH_601)) +# define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,1,0) +# endif +# if !defined (BOOST_ARCH_PPC) && (defined(__ppc603__) || defined(_ARCH_603)) +# define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,3,0) +# endif +# if !defined (BOOST_ARCH_PPC) && (defined(__ppc604__) || defined(__ppc604__)) +# define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,4,0) +# endif +# if !defined (BOOST_ARCH_PPC) +# define BOOST_ARCH_PPC BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_PPC +# define BOOST_ARCH_PPC_AVAILABLE +#endif + +#define BOOST_ARCH_PPC_NAME "PowerPC" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PPC,BOOST_ARCH_PPC_NAME) diff --git a/contrib/src/boost/predef/architecture/pyramid.h b/contrib/src/boost/predef/architecture/pyramid.h new file mode 100644 index 0000000..4f13253 --- /dev/null +++ b/contrib/src/boost/predef/architecture/pyramid.h @@ -0,0 +1,42 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_PYRAMID_H +#define BOOST_PREDEF_ARCHITECTURE_PYRAMID_H + +#include +#include + +/*` +[heading `BOOST_ARCH_PYRAMID`] + +Pyramid 9810 architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`pyr`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_PYRAMID BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(pyr) +# undef BOOST_ARCH_PYRAMID +# define BOOST_ARCH_PYRAMID BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_PYRAMID +# define BOOST_ARCH_PYRAMID_AVAILABLE +#endif + +#define BOOST_ARCH_PYRAMID_NAME "Pyramid 9810" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PYRAMID,BOOST_ARCH_PYRAMID_NAME) diff --git a/contrib/src/boost/predef/architecture/rs6k.h b/contrib/src/boost/predef/architecture/rs6k.h new file mode 100644 index 0000000..8a6e9b6 --- /dev/null +++ b/contrib/src/boost/predef/architecture/rs6k.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_RS6K_H +#define BOOST_PREDEF_ARCHITECTURE_RS6K_H + +#include +#include + +/*` +[heading `BOOST_ARCH_RS6000`] + +[@http://en.wikipedia.org/wiki/RS/6000 RS/6000] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__THW_RS6000`] [__predef_detection__]] + [[`_IBMR2`] [__predef_detection__]] + [[`_POWER`] [__predef_detection__]] + [[`_ARCH_PWR`] [__predef_detection__]] + [[`_ARCH_PWR2`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_RS6000 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__THW_RS6000) || defined(_IBMR2) || \ + defined(_POWER) || defined(_ARCH_PWR) || \ + defined(_ARCH_PWR2) +# undef BOOST_ARCH_RS6000 +# define BOOST_ARCH_RS6000 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_RS6000 +# define BOOST_ARCH_RS6000_AVAILABLE +#endif + +#define BOOST_ARCH_RS6000_NAME "RS/6000" + +#define BOOST_ARCH_PWR BOOST_ARCH_RS6000 + +#if BOOST_ARCH_PWR +# define BOOST_ARCH_PWR_AVAILABLE +#endif + +#define BOOST_ARCH_PWR_NAME BOOST_ARCH_RS6000_NAME + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_RS6000,BOOST_ARCH_RS6000_NAME) diff --git a/contrib/src/boost/predef/architecture/sparc.h b/contrib/src/boost/predef/architecture/sparc.h new file mode 100644 index 0000000..a89a510 --- /dev/null +++ b/contrib/src/boost/predef/architecture/sparc.h @@ -0,0 +1,54 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_SPARC_H +#define BOOST_PREDEF_ARCHITECTURE_SPARC_H + +#include +#include + +/*` +[heading `BOOST_ARCH_SPARC`] + +[@http://en.wikipedia.org/wiki/SPARC SPARC] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__sparc__`] [__predef_detection__]] + [[`__sparc`] [__predef_detection__]] + + [[`__sparcv9`] [9.0.0]] + [[`__sparcv8`] [8.0.0]] + ] + */ + +#define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__sparc__) || defined(__sparc) +# undef BOOST_ARCH_SPARC +# if !defined(BOOST_ARCH_SPARC) && defined(__sparcv9) +# define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(9,0,0) +# endif +# if !defined(BOOST_ARCH_SPARC) && defined(__sparcv8) +# define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(8,0,0) +# endif +# if !defined(BOOST_ARCH_SPARC) +# define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_SPARC +# define BOOST_ARCH_SPARC_AVAILABLE +#endif + +#define BOOST_ARCH_SPARC_NAME "SPARC" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SPARC,BOOST_ARCH_SPARC_NAME) diff --git a/contrib/src/boost/predef/architecture/superh.h b/contrib/src/boost/predef/architecture/superh.h new file mode 100644 index 0000000..da0529e --- /dev/null +++ b/contrib/src/boost/predef/architecture/superh.h @@ -0,0 +1,67 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_SUPERH_H +#define BOOST_PREDEF_ARCHITECTURE_SUPERH_H + +#include +#include + +/*` +[heading `BOOST_ARCH_SH`] + +[@http://en.wikipedia.org/wiki/SuperH SuperH] architecture: +If available versions \[1-5\] are specifically detected. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__sh__`] [__predef_detection__]] + + [[`__SH5__`] [5.0.0]] + [[`__SH4__`] [4.0.0]] + [[`__sh3__`] [3.0.0]] + [[`__SH3__`] [3.0.0]] + [[`__sh2__`] [2.0.0]] + [[`__sh1__`] [1.0.0]] + ] + */ + +#define BOOST_ARCH_SH BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__sh__) +# undef BOOST_ARCH_SH +# if !defined(BOOST_ARCH_SH) && (defined(__SH5__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(5,0,0) +# endif +# if !defined(BOOST_ARCH_SH) && (defined(__SH4__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_SH) && (defined(__sh3__) || defined(__SH3__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_SH) && (defined(__sh2__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_SH) && (defined(__sh1__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_SH) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_SH +# define BOOST_ARCH_SH_AVAILABLE +#endif + +#define BOOST_ARCH_SH_NAME "SuperH" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SH,BOOST_ARCH_SH_NAME) diff --git a/contrib/src/boost/predef/architecture/sys370.h b/contrib/src/boost/predef/architecture/sys370.h new file mode 100644 index 0000000..cfd85dc --- /dev/null +++ b/contrib/src/boost/predef/architecture/sys370.h @@ -0,0 +1,43 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_SYS370_H +#define BOOST_PREDEF_ARCHITECTURE_SYS370_H + +#include +#include + +/*` +[heading `BOOST_ARCH_SYS370`] + +[@http://en.wikipedia.org/wiki/System/370 System/370] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__370__`] [__predef_detection__]] + [[`__THW_370__`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_SYS370 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__370__) || defined(__THW_370__) +# undef BOOST_ARCH_SYS370 +# define BOOST_ARCH_SYS370 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_SYS370 +# define BOOST_ARCH_SYS370_AVAILABLE +#endif + +#define BOOST_ARCH_SYS370_NAME "System/370" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SYS370,BOOST_ARCH_SYS370_NAME) diff --git a/contrib/src/boost/predef/architecture/sys390.h b/contrib/src/boost/predef/architecture/sys390.h new file mode 100644 index 0000000..47aff6a --- /dev/null +++ b/contrib/src/boost/predef/architecture/sys390.h @@ -0,0 +1,43 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_SYS390_H +#define BOOST_PREDEF_ARCHITECTURE_SYS390_H + +#include +#include + +/*` +[heading `BOOST_ARCH_SYS390`] + +[@http://en.wikipedia.org/wiki/System/390 System/390] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__s390__`] [__predef_detection__]] + [[`__s390x__`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_SYS390 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__s390__) || defined(__s390x__) +# undef BOOST_ARCH_SYS390 +# define BOOST_ARCH_SYS390 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_SYS390 +# define BOOST_ARCH_SYS390_AVAILABLE +#endif + +#define BOOST_ARCH_SYS390_NAME "System/390" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SYS390,BOOST_ARCH_SYS390_NAME) diff --git a/contrib/src/boost/predef/architecture/x86.h b/contrib/src/boost/predef/architecture/x86.h new file mode 100644 index 0000000..0ef3ef4 --- /dev/null +++ b/contrib/src/boost/predef/architecture/x86.h @@ -0,0 +1,38 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#include +#include + +#ifndef BOOST_PREDEF_ARCHITECTURE_X86_H +#define BOOST_PREDEF_ARCHITECTURE_X86_H + +/*` +[heading `BOOST_ARCH_X86`] + +[@http://en.wikipedia.org/wiki/X86 Intel x86] architecture. This is +a category to indicate that either `BOOST_ARCH_X86_32` or +`BOOST_ARCH_X86_64` is detected. + */ + +#define BOOST_ARCH_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_ARCH_X86_32 || BOOST_ARCH_X86_64 +# undef BOOST_ARCH_X86 +# define BOOST_ARCH_X86 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_X86 +# define BOOST_ARCH_X86_AVAILABLE +#endif + +#define BOOST_ARCH_X86_NAME "Intel x86" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86,BOOST_ARCH_X86_NAME) diff --git a/contrib/src/boost/predef/architecture/x86/32.h b/contrib/src/boost/predef/architecture/x86/32.h new file mode 100644 index 0000000..17fbff5 --- /dev/null +++ b/contrib/src/boost/predef/architecture/x86/32.h @@ -0,0 +1,87 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_X86_32_H +#define BOOST_PREDEF_ARCHITECTURE_X86_32_H + +#include +#include + +/*` +[heading `BOOST_ARCH_X86_32`] + +[@http://en.wikipedia.org/wiki/X86 Intel x86] architecture: +If available versions \[3-6\] are specifically detected. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`i386`] [__predef_detection__]] + [[`__i386__`] [__predef_detection__]] + [[`__i486__`] [__predef_detection__]] + [[`__i586__`] [__predef_detection__]] + [[`__i686__`] [__predef_detection__]] + [[`__i386`] [__predef_detection__]] + [[`_M_IX86`] [__predef_detection__]] + [[`_X86_`] [__predef_detection__]] + [[`__THW_INTEL__`] [__predef_detection__]] + [[`__I86__`] [__predef_detection__]] + [[`__INTEL__`] [__predef_detection__]] + + [[`__I86__`] [V.0.0]] + [[`_M_IX86`] [V.0.0]] + [[`__i686__`] [6.0.0]] + [[`__i586__`] [5.0.0]] + [[`__i486__`] [4.0.0]] + [[`__i386__`] [3.0.0]] + ] + */ + +#define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(i386) || defined(__i386__) || \ + defined(__i486__) || defined(__i586__) || \ + defined(__i686__) || defined(__i386) || \ + defined(_M_IX86) || defined(_X86_) || \ + defined(__THW_INTEL__) || defined(__I86__) || \ + defined(__INTEL__) +# undef BOOST_ARCH_X86_32 +# if !defined(BOOST_ARCH_X86_32) && defined(__I86__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(__I86__,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(_M_IX86) +# define BOOST_ARCH_X86_32 BOOST_PREDEF_MAKE_10_VV00(_M_IX86) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i686__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(6,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i586__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(5,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i486__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i386__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_X86_32 +# define BOOST_ARCH_X86_32_AVAILABLE +#endif + +#define BOOST_ARCH_X86_32_NAME "Intel x86-32" + +#include + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86_32,BOOST_ARCH_X86_32_NAME) diff --git a/contrib/src/boost/predef/architecture/x86/64.h b/contrib/src/boost/predef/architecture/x86/64.h new file mode 100644 index 0000000..f761c92 --- /dev/null +++ b/contrib/src/boost/predef/architecture/x86/64.h @@ -0,0 +1,50 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_X86_64_H +#define BOOST_PREDEF_ARCHITECTURE_X86_64_H + +#include +#include + +/*` +[heading `BOOST_ARCH_X86_64`] + +[@http://en.wikipedia.org/wiki/Ia64 Intel IA-64] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__x86_64`] [__predef_detection__]] + [[`__x86_64__`] [__predef_detection__]] + [[`__amd64__`] [__predef_detection__]] + [[`__amd64`] [__predef_detection__]] + [[`_M_X64`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_X86_64 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__x86_64) || defined(__x86_64__) || \ + defined(__amd64__) || defined(__amd64) || \ + defined(_M_X64) +# undef BOOST_ARCH_X86_64 +# define BOOST_ARCH_X86_64 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_X86_64 +# define BOOST_ARCH_X86_64_AVAILABLE +#endif + +#define BOOST_ARCH_X86_64_NAME "Intel x86-64" + +#include + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86_64,BOOST_ARCH_X86_64_NAME) diff --git a/contrib/src/boost/predef/architecture/z.h b/contrib/src/boost/predef/architecture/z.h new file mode 100644 index 0000000..3d218aa --- /dev/null +++ b/contrib/src/boost/predef/architecture/z.h @@ -0,0 +1,42 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_Z_H +#define BOOST_PREDEF_ARCHITECTURE_Z_H + +#include +#include + +/*` +[heading `BOOST_ARCH_Z`] + +[@http://en.wikipedia.org/wiki/Z/Architecture z/Architecture] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__SYSC_ZARCH__`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_Z BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__SYSC_ZARCH__) +# undef BOOST_ARCH_Z +# define BOOST_ARCH_Z BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_Z +# define BOOST_ARCH_Z_AVAILABLE +#endif + +#define BOOST_ARCH_Z_NAME "z/Architecture" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_Z,BOOST_ARCH_Z_NAME) diff --git a/contrib/src/boost/predef/compiler.h b/contrib/src/boost/predef/compiler.h new file mode 100644 index 0000000..61a4c52 --- /dev/null +++ b/contrib/src/boost/predef/compiler.h @@ -0,0 +1,43 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_COMPILER_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_COMPILER_H +#define BOOST_PREDEF_COMPILER_H +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/contrib/src/boost/predef/compiler/borland.h b/contrib/src/boost/predef/compiler/borland.h new file mode 100644 index 0000000..3677cca --- /dev/null +++ b/contrib/src/boost/predef/compiler/borland.h @@ -0,0 +1,63 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_BORLAND_H +#define BOOST_PREDEF_COMPILER_BORLAND_H + +#include +#include + +/*` +[heading `BOOST_COMP_BORLAND`] + +[@http://en.wikipedia.org/wiki/C_plus_plus_builder Borland C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__BORLANDC__`] [__predef_detection__]] + [[`__CODEGEARC__`] [__predef_detection__]] + + [[`__BORLANDC__`] [V.R.P]] + [[`__CODEGEARC__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_BORLAND BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__BORLANDC__) || defined(__CODEGEARC__) +# if !defined(BOOST_COMP_BORLAND_DETECTION) && (defined(__CODEGEARC__)) +# define BOOST_COMP_BORLAND_DETECTION BOOST_PREDEF_MAKE_0X_VVRP(__CODEGEARC__) +# endif +# if !defined(BOOST_COMP_BORLAND_DETECTION) +# define BOOST_COMP_BORLAND_DETECTION BOOST_PREDEF_MAKE_0X_VVRP(__BORLANDC__) +# endif +#endif + +#ifdef BOOST_COMP_BORLAND_DETECTION +# define BOOST_COMP_BORLAND_AVAILABLE +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_BORLAND_EMULATED BOOST_COMP_BORLAND_DETECTION +# else +# undef BOOST_COMP_BORLAND +# define BOOST_COMP_BORLAND BOOST_COMP_BORLAND_DETECTION +# endif +# include +#endif + +#define BOOST_COMP_BORLAND_NAME "Borland C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_BORLAND,BOOST_COMP_BORLAND_NAME) + +#ifdef BOOST_COMP_BORLAND_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_BORLAND_EMULATED,BOOST_COMP_BORLAND_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/clang.h b/contrib/src/boost/predef/compiler/clang.h new file mode 100644 index 0000000..56678fe --- /dev/null +++ b/contrib/src/boost/predef/compiler/clang.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_CLANG_H +#define BOOST_PREDEF_COMPILER_CLANG_H + +#include +#include + +/*` +[heading `BOOST_COMP_CLANG`] + +[@http://en.wikipedia.org/wiki/Clang Clang] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__clang__`] [__predef_detection__]] + + [[`__clang_major__`, `__clang_minor__`, `__clang_patchlevel__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_CLANG BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__clang__) +# define BOOST_COMP_CLANG_DETECTION BOOST_VERSION_NUMBER(__clang_major__,__clang_minor__,__clang_patchlevel__) +#endif + +#ifdef BOOST_COMP_CLANG_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_CLANG_EMULATED BOOST_COMP_CLANG_DETECTION +# else +# undef BOOST_COMP_CLANG +# define BOOST_COMP_CLANG BOOST_COMP_CLANG_DETECTION +# endif +# define BOOST_COMP_CLANG_AVAILABLE +# include +#endif + +#define BOOST_COMP_CLANG_NAME "Clang" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_CLANG,BOOST_COMP_CLANG_NAME) + +#ifdef BOOST_COMP_CLANG_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_CLANG_EMULATED,BOOST_COMP_CLANG_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/comeau.h b/contrib/src/boost/predef/compiler/comeau.h new file mode 100644 index 0000000..15a4564 --- /dev/null +++ b/contrib/src/boost/predef/compiler/comeau.h @@ -0,0 +1,61 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_COMEAU_H +#define BOOST_PREDEF_COMPILER_COMEAU_H + +#include +#include + +#define BOOST_COMP_COMO BOOST_VERSION_NUMBER_NOT_AVAILABLE + +/*` +[heading `BOOST_COMP_COMO`] + +[@http://en.wikipedia.org/wiki/Comeau_C/C%2B%2B Comeau C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__COMO__`] [__predef_detection__]] + + [[`__COMO_VERSION__`] [V.R.P]] + ] + */ + +#if defined(__COMO__) +# if !defined(BOOST_COMP_COMO_DETECTION) && defined(__COMO_VERSION__) +# define BOOST_COMP_COMO_DETECTION BOOST_PREDEF_MAKE_0X_VRP(__COMO_VERSION__) +# endif +# if !defined(BOOST_COMP_COMO_DETECTION) +# define BOOST_COMP_COMO_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_COMO_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_COMO_EMULATED BOOST_COMP_COMO_DETECTION +# else +# undef BOOST_COMP_COMO +# define BOOST_COMP_COMO BOOST_COMP_COMO_DETECTION +# endif +# define BOOST_COMP_COMO_AVAILABLE +# include +#endif + +#define BOOST_COMP_COMO_NAME "Comeau C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_COMO,BOOST_COMP_COMO_NAME) + +#ifdef BOOST_COMP_COMO_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_COMO_EMULATED,BOOST_COMP_COMO_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/compaq.h b/contrib/src/boost/predef/compiler/compaq.h new file mode 100644 index 0000000..96a79e6 --- /dev/null +++ b/contrib/src/boost/predef/compiler/compaq.h @@ -0,0 +1,66 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_COMPAQ_H +#define BOOST_PREDEF_COMPILER_COMPAQ_H + +#include +#include + +/*` +[heading `BOOST_COMP_DEC`] + +[@http://www.openvms.compaq.com/openvms/brochures/deccplus/ Compaq C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__DECCXX`] [__predef_detection__]] + [[`__DECC`] [__predef_detection__]] + + [[`__DECCXX_VER`] [V.R.P]] + [[`__DECC_VER`] [V.R.P]] + ] + */ + +#define BOOST_COMP_DEC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__DECC) || defined(__DECCXX) +# if !defined(BOOST_COMP_DEC_DETECTION) && defined(__DECCXX_VER) +# define BOOST_COMP_DEC_DETECTION BOOST_PREDEF_MAKE_10_VVRR0PP00(__DECCXX_VER) +# endif +# if !defined(BOOST_COMP_DEC_DETECTION) && defined(__DECC_VER) +# define BOOST_COMP_DEC_DETECTION BOOST_PREDEF_MAKE_10_VVRR0PP00(__DECC_VER) +# endif +# if !defined(BOOST_COMP_DEC_DETECTION) +# define BOOST_COM_DEC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_DEC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_DEC_EMULATED BOOST_COMP_DEC_DETECTION +# else +# undef BOOST_COMP_DEC +# define BOOST_COMP_DEC BOOST_COMP_DEC_DETECTION +# endif +# define BOOST_COMP_DEC_AVAILABLE +# include +#endif + +#define BOOST_COMP_DEC_NAME "Compaq C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DEC,BOOST_COMP_DEC_NAME) + +#ifdef BOOST_COMP_DEC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DEC_EMULATED,BOOST_COMP_DEC_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/diab.h b/contrib/src/boost/predef/compiler/diab.h new file mode 100644 index 0000000..f5a37de --- /dev/null +++ b/contrib/src/boost/predef/compiler/diab.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_DIAB_H +#define BOOST_PREDEF_COMPILER_DIAB_H + +#include +#include + +/*` +[heading `BOOST_COMP_DIAB`] + +[@http://www.windriver.com/products/development_suite/wind_river_compiler/ Diab C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__DCC__`] [__predef_detection__]] + + [[`__VERSION_NUMBER__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_DIAB BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__DCC__) +# define BOOST_COMP_DIAB_DETECTION BOOST_PREDEF_MAKE_10_VRPP(__VERSION_NUMBER__) +#endif + +#ifdef BOOST_COMP_DIAB_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_DIAB_EMULATED BOOST_COMP_DIAB_DETECTION +# else +# undef BOOST_COMP_DIAB +# define BOOST_COMP_DIAB BOOST_COMP_DIAB_DETECTION +# endif +# define BOOST_COMP_DIAB_AVAILABLE +# include +#endif + +#define BOOST_COMP_DIAB_NAME "Diab C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DIAB,BOOST_COMP_DIAB_NAME) + +#ifdef BOOST_COMP_DIAB_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DIAB_EMULATED,BOOST_COMP_DIAB_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/digitalmars.h b/contrib/src/boost/predef/compiler/digitalmars.h new file mode 100644 index 0000000..9bd5850 --- /dev/null +++ b/contrib/src/boost/predef/compiler/digitalmars.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_DIGITALMARS_H +#define BOOST_PREDEF_COMPILER_DIGITALMARS_H + +#include +#include + +/*` +[heading `BOOST_COMP_DMC`] + +[@http://en.wikipedia.org/wiki/Digital_Mars Digital Mars] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__DMC__`] [__predef_detection__]] + + [[`__DMC__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_DMC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__DMC__) +# define BOOST_COMP_DMC_DETECTION BOOST_PREDEF_MAKE_0X_VRP(__DMC__) +#endif + +#ifdef BOOST_COMP_DMC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_DMC_EMULATED BOOST_COMP_DMC_DETECTION +# else +# undef BOOST_COMP_DMC +# define BOOST_COMP_DMC BOOST_COMP_DMC_DETECTION +# endif +# define BOOST_COMP_DMC_AVAILABLE +# include +#endif + +#define BOOST_COMP_DMC_NAME "Digital Mars" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DMC,BOOST_COMP_DMC_NAME) + +#ifdef BOOST_COMP_DMC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DMC_EMULATED,BOOST_COMP_DMC_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/dignus.h b/contrib/src/boost/predef/compiler/dignus.h new file mode 100644 index 0000000..c65d3dc --- /dev/null +++ b/contrib/src/boost/predef/compiler/dignus.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_DIGNUS_H +#define BOOST_PREDEF_COMPILER_DIGNUS_H + +#include +#include + +/*` +[heading `BOOST_COMP_SYSC`] + +[@http://www.dignus.com/dcxx/ Dignus Systems/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__SYSC__`] [__predef_detection__]] + + [[`__SYSC_VER__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_SYSC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__SYSC__) +# define BOOST_COMP_SYSC_DETECTION BOOST_PREDEF_MAKE_10_VRRPP(__SYSC_VER__) +#endif + +#ifdef BOOST_COMP_SYSC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_SYSC_EMULATED BOOST_COMP_SYSC_DETECTION +# else +# undef BOOST_COMP_SYSC +# define BOOST_COMP_SYSC BOOST_COMP_SYSC_DETECTION +# endif +# define BOOST_COMP_SYSC_AVAILABLE +# include +#endif + +#define BOOST_COMP_SYSC_NAME "Dignus Systems/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SYSC,BOOST_COMP_SYSC_NAME) + +#ifdef BOOST_COMP_SYSC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SYSC_EMULATED,BOOST_COMP_SYSC_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/edg.h b/contrib/src/boost/predef/compiler/edg.h new file mode 100644 index 0000000..2ffb9b0 --- /dev/null +++ b/contrib/src/boost/predef/compiler/edg.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_EDG_H +#define BOOST_PREDEF_COMPILER_EDG_H + +#include +#include + +/*` +[heading `BOOST_COMP_EDG`] + +[@http://en.wikipedia.org/wiki/Edison_Design_Group EDG C++ Frontend] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__EDG__`] [__predef_detection__]] + + [[`__EDG_VERSION__`] [V.R.0]] + ] + */ + +#define BOOST_COMP_EDG BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__EDG__) +# define BOOST_COMP_EDG_DETECTION BOOST_PREDEF_MAKE_10_VRR(__EDG_VERSION__) +#endif + +#ifdef BOOST_COMP_EDG_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_EDG_EMULATED BOOST_COMP_EDG_DETECTION +# else +# undef BOOST_COMP_EDG +# define BOOST_COMP_EDG BOOST_COMP_EDG_DETECTION +# endif +# define BOOST_COMP_EDG_AVAILABLE +# include +#endif + +#define BOOST_COMP_EDG_NAME "EDG C++ Frontend" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_EDG,BOOST_COMP_EDG_NAME) + +#ifdef BOOST_COMP_EDG_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_EDG_EMULATED,BOOST_COMP_EDG_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/ekopath.h b/contrib/src/boost/predef/compiler/ekopath.h new file mode 100644 index 0000000..e5cde36 --- /dev/null +++ b/contrib/src/boost/predef/compiler/ekopath.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_EKOPATH_H +#define BOOST_PREDEF_COMPILER_EKOPATH_H + +#include +#include + +/*` +[heading `BOOST_COMP_PATH`] + +[@http://en.wikipedia.org/wiki/PathScale EKOpath] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__PATHCC__`] [__predef_detection__]] + + [[`__PATHCC__`, `__PATHCC_MINOR__`, `__PATHCC_PATCHLEVEL__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_PATH BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__PATHCC__) +# define BOOST_COMP_PATH_DETECTION \ + BOOST_VERSION_NUMBER(__PATHCC__,__PATHCC_MINOR__,__PATHCC_PATCHLEVEL__) +#endif + +#ifdef BOOST_COMP_PATH_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_PATH_EMULATED BOOST_COMP_PATH_DETECTION +# else +# undef BOOST_COMP_PATH +# define BOOST_COMP_PATH BOOST_COMP_PATH_DETECTION +# endif +# define BOOST_COMP_PATH_AVAILABLE +# include +#endif + +#define BOOST_COMP_PATH_NAME "EKOpath" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PATH,BOOST_COMP_PATH_NAME) + +#ifdef BOOST_COMP_PATH_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PATH_EMULATED,BOOST_COMP_PATH_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/gcc.h b/contrib/src/boost/predef/compiler/gcc.h new file mode 100644 index 0000000..c2d7fff --- /dev/null +++ b/contrib/src/boost/predef/compiler/gcc.h @@ -0,0 +1,68 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_GCC_H +#define BOOST_PREDEF_COMPILER_GCC_H + +/* Other compilers that emulate this one need to be detected first. */ + +#include + +#include +#include + +/*` +[heading `BOOST_COMP_GNUC`] + +[@http://en.wikipedia.org/wiki/GNU_Compiler_Collection Gnu GCC C/C++] compiler. +Version number available as major, minor, and patch (if available). + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__GNUC__`] [__predef_detection__]] + + [[`__GNUC__`, `__GNUC_MINOR__`, `__GNUC_PATCHLEVEL__`] [V.R.P]] + [[`__GNUC__`, `__GNUC_MINOR__`] [V.R.0]] + ] + */ + +#define BOOST_COMP_GNUC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__GNUC__) +# if !defined(BOOST_COMP_GNUC_DETECTION) && defined(__GNUC_PATCHLEVEL__) +# define BOOST_COMP_GNUC_DETECTION \ + BOOST_VERSION_NUMBER(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__) +# endif +# if !defined(BOOST_COMP_GNUC_DETECTION) +# define BOOST_COMP_GNUC_DETECTION \ + BOOST_VERSION_NUMBER(__GNUC__,__GNUC_MINOR__,0) +# endif +#endif + +#ifdef BOOST_COMP_GNUC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_GNUC_EMULATED BOOST_COMP_GNUC_DETECTION +# else +# undef BOOST_COMP_GNUC +# define BOOST_COMP_GNUC BOOST_COMP_GNUC_DETECTION +# endif +# define BOOST_COMP_GNUC_AVAILABLE +# include +#endif + +#define BOOST_COMP_GNUC_NAME "Gnu GCC C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GNUC,BOOST_COMP_GNUC_NAME) + +#ifdef BOOST_COMP_GNUC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GNUC_EMULATED,BOOST_COMP_GNUC_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/gcc_xml.h b/contrib/src/boost/predef/compiler/gcc_xml.h new file mode 100644 index 0000000..acae600 --- /dev/null +++ b/contrib/src/boost/predef/compiler/gcc_xml.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_GCC_XML_H +#define BOOST_PREDEF_COMPILER_GCC_XML_H + +#include +#include + +/*` +[heading `BOOST_COMP_GCCXML`] + +[@http://www.gccxml.org/ GCC XML] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__GCCXML__`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_GCCXML BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__GCCXML__) +# define BOOST_COMP_GCCXML_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_GCCXML_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_GCCXML_EMULATED BOOST_COMP_GCCXML_DETECTION +# else +# undef BOOST_COMP_GCCXML +# define BOOST_COMP_GCCXML BOOST_COMP_GCCXML_DETECTION +# endif +# define BOOST_COMP_GCCXML_AVAILABLE +# include +#endif + +#define BOOST_COMP_GCCXML_NAME "GCC XML" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GCCXML,BOOST_COMP_GCCXML_NAME) + +#ifdef BOOST_COMP_GCCXML_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GCCXML_EMULATED,BOOST_COMP_GCCXML_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/greenhills.h b/contrib/src/boost/predef/compiler/greenhills.h new file mode 100644 index 0000000..23b8f01 --- /dev/null +++ b/contrib/src/boost/predef/compiler/greenhills.h @@ -0,0 +1,66 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_GREENHILLS_H +#define BOOST_PREDEF_COMPILER_GREENHILLS_H + +#include +#include + +/*` +[heading `BOOST_COMP_GHS`] + +[@http://en.wikipedia.org/wiki/Green_Hills_Software Green Hills C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__ghs`] [__predef_detection__]] + [[`__ghs__`] [__predef_detection__]] + + [[`__GHS_VERSION_NUMBER__`] [V.R.P]] + [[`__ghs`] [V.R.P]] + ] + */ + +#define BOOST_COMP_GHS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__ghs) || defined(__ghs__) +# if !defined(BOOST_COMP_GHS_DETECTION) && defined(__GHS_VERSION_NUMBER__) +# define BOOST_COMP_GHS_DETECTION BOOST_PREDEF_MAKE_10_VRP(__GHS_VERSION_NUMBER__) +# endif +# if !defined(BOOST_COMP_GHS_DETECTION) && defined(__ghs) +# define BOOST_COMP_GHS_DETECTION BOOST_PREDEF_MAKE_10_VRP(__ghs) +# endif +# if !defined(BOOST_COMP_GHS_DETECTION) +# define BOOST_COMP_GHS_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_GHS_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_GHS_EMULATED BOOST_COMP_GHS_DETECTION +# else +# undef BOOST_COMP_GHS +# define BOOST_COMP_GHS BOOST_COMP_GHS_DETECTION +# endif +# define BOOST_COMP_GHS_AVAILABLE +# include +#endif + +#define BOOST_COMP_GHS_NAME "Green Hills C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GHS,BOOST_COMP_GHS_NAME) + +#ifdef BOOST_COMP_GHS_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GHS_EMULATED,BOOST_COMP_GHS_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/hp_acc.h b/contrib/src/boost/predef/compiler/hp_acc.h new file mode 100644 index 0000000..7b3ffe9 --- /dev/null +++ b/contrib/src/boost/predef/compiler/hp_acc.h @@ -0,0 +1,61 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_HP_ACC_H +#define BOOST_PREDEF_COMPILER_HP_ACC_H + +#include +#include + +/*` +[heading `BOOST_COMP_HPACC`] + +HP aC++ compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__HP_aCC`] [__predef_detection__]] + + [[`__HP_aCC`] [V.R.P]] + ] + */ + +#define BOOST_COMP_HPACC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__HP_aCC) +# if !defined(BOOST_COMP_HPACC_DETECTION) && (__HP_aCC > 1) +# define BOOST_COMP_HPACC_DETECTION BOOST_PREDEF_MAKE_10_VVRRPP(__HP_aCC) +# endif +# if !defined(BOOST_COMP_HPACC_DETECTION) +# define BOOST_COMP_HPACC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_HPACC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_HPACC_EMULATED BOOST_COMP_HPACC_DETECTION +# else +# undef BOOST_COMP_HPACC +# define BOOST_COMP_HPACC BOOST_COMP_HPACC_DETECTION +# endif +# define BOOST_COMP_HPACC_AVAILABLE +# include +#endif + +#define BOOST_COMP_HPACC_NAME "HP aC++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HPACC,BOOST_COMP_HPACC_NAME) + +#ifdef BOOST_COMP_HPACC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HPACC_EMULATED,BOOST_COMP_HPACC_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/iar.h b/contrib/src/boost/predef/compiler/iar.h new file mode 100644 index 0000000..237f492 --- /dev/null +++ b/contrib/src/boost/predef/compiler/iar.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_IAR_H +#define BOOST_PREDEF_COMPILER_IAR_H + +#include +#include + +/*` +[heading `BOOST_COMP_IAR`] + +IAR C/C++ compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__IAR_SYSTEMS_ICC__`] [__predef_detection__]] + + [[`__VER__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_IAR BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__IAR_SYSTEMS_ICC__) +# define BOOST_COMP_IAR_DETECTION BOOST_PREDEF_MAKE_10_VVRR(__VER__) +#endif + +#ifdef BOOST_COMP_IAR_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_IAR_EMULATED BOOST_COMP_IAR_DETECTION +# else +# undef BOOST_COMP_IAR +# define BOOST_COMP_IAR BOOST_COMP_IAR_DETECTION +# endif +# define BOOST_COMP_IAR_AVAILABLE +# include +#endif + +#define BOOST_COMP_IAR_NAME "IAR C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IAR,BOOST_COMP_IAR_NAME) + +#ifdef BOOST_COMP_IAR_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IAR_EMULATED,BOOST_COMP_IAR_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/ibm.h b/contrib/src/boost/predef/compiler/ibm.h new file mode 100644 index 0000000..6931ebd --- /dev/null +++ b/contrib/src/boost/predef/compiler/ibm.h @@ -0,0 +1,72 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_IBM_H +#define BOOST_PREDEF_COMPILER_IBM_H + +#include +#include + +/*` +[heading `BOOST_COMP_IBM`] + +[@http://en.wikipedia.org/wiki/VisualAge IBM XL C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__IBMCPP__`] [__predef_detection__]] + [[`__xlC__`] [__predef_detection__]] + [[`__xlc__`] [__predef_detection__]] + + [[`__COMPILER_VER__`] [V.R.P]] + [[`__xlC__`] [V.R.P]] + [[`__xlc__`] [V.R.P]] + [[`__IBMCPP__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_IBM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__IBMCPP__) || defined(__xlC__) || defined(__xlc__) +# if !defined(BOOST_COMP_IBM_DETECTION) && defined(__COMPILER_VER__) +# define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_0X_VRRPPPP(__COMPILER_VER__) +# endif +# if !defined(BOOST_COMP_IBM_DETECTION) && defined(__xlC__) +# define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_0X_VVRR(__xlC__) +# endif +# if !defined(BOOST_COMP_IBM_DETECTION) && defined(__xlc__) +# define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_0X_VVRR(__xlc__) +# endif +# if !defined(BOOST_COMP_IBM_DETECTION) +# define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_10_VRP(__IBMCPP__) +# endif +#endif + +#ifdef BOOST_COMP_IBM_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_IBM_EMULATED BOOST_COMP_IBM_DETECTION +# else +# undef BOOST_COMP_IBM +# define BOOST_COMP_IBM BOOST_COMP_IBM_DETECTION +# endif +# define BOOST_COMP_IBM_AVAILABLE +# include +#endif + +#define BOOST_COMP_IBM_NAME "IBM XL C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IBM,BOOST_COMP_IBM_NAME) + +#ifdef BOOST_COMP_IBM_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IBM_EMULATED,BOOST_COMP_IBM_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/intel.h b/contrib/src/boost/predef/compiler/intel.h new file mode 100644 index 0000000..65bde67 --- /dev/null +++ b/contrib/src/boost/predef/compiler/intel.h @@ -0,0 +1,65 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_INTEL_H +#define BOOST_PREDEF_COMPILER_INTEL_H + +#include +#include + +/*` +[heading `BOOST_COMP_INTEL`] + +[@http://en.wikipedia.org/wiki/Intel_C%2B%2B Intel C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__INTEL_COMPILER`] [__predef_detection__]] + [[`__ICL`] [__predef_detection__]] + [[`__ICC`] [__predef_detection__]] + [[`__ECC`] [__predef_detection__]] + + [[`__INTEL_COMPILER`] [V.R.P]] + ] + */ + +#define BOOST_COMP_INTEL BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \ + defined(__ECC) +# if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) +# define BOOST_COMP_INTEL_DETECTION BOOST_PREDEF_MAKE_10_VRP(__INTEL_COMPILER) +# endif +# if !defined(BOOST_COMP_INTEL_DETECTION) +# define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_INTEL_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_INTEL_EMULATED BOOST_COMP_INTEL_DETECTION +# else +# undef BOOST_COMP_INTEL +# define BOOST_COMP_INTEL BOOST_COMP_INTEL_DETECTION +# endif +# define BOOST_COMP_INTEL_AVAILABLE +# include +#endif + +#define BOOST_COMP_INTEL_NAME "Intel C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_INTEL,BOOST_COMP_INTEL_NAME) + +#ifdef BOOST_COMP_INTEL_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_INTEL_EMULATED,BOOST_COMP_INTEL_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/kai.h b/contrib/src/boost/predef/compiler/kai.h new file mode 100644 index 0000000..68ce84e --- /dev/null +++ b/contrib/src/boost/predef/compiler/kai.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_KAI_H +#define BOOST_PREDEF_COMPILER_KAI_H + +#include +#include + +/*` +[heading `BOOST_COMP_KCC`] + +Kai C++ compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__KCC`] [__predef_detection__]] + + [[`__KCC_VERSION`] [V.R.P]] + ] + */ + +#define BOOST_COMP_KCC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__KCC) +# define BOOST_COMP_KCC_DETECTION BOOST_PREDEF_MAKE_0X_VRPP(__KCC_VERSION) +#endif + +#ifdef BOOST_COMP_KCC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_KCC_EMULATED BOOST_COMP_KCC_DETECTION +# else +# undef BOOST_COMP_KCC +# define BOOST_COMP_KCC BOOST_COMP_KCC_DETECTION +# endif +# define BOOST_COMP_KCC_AVAILABLE +# include +#endif + +#define BOOST_COMP_KCC_NAME "Kai C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_KCC,BOOST_COMP_KCC_NAME) + +#ifdef BOOST_COMP_KCC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_KCC_EMULATED,BOOST_COMP_KCC_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/llvm.h b/contrib/src/boost/predef/compiler/llvm.h new file mode 100644 index 0000000..de654eb --- /dev/null +++ b/contrib/src/boost/predef/compiler/llvm.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_LLVM_H +#define BOOST_PREDEF_COMPILER_LLVM_H + +/* Other compilers that emulate this one need to be detected first. */ + +#include + +#include +#include + +/*` +[heading `BOOST_COMP_LLVM`] + +[@http://en.wikipedia.org/wiki/LLVM LLVM] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__llvm__`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_LLVM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__llvm__) +# define BOOST_COMP_LLVM_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_LLVM_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_LLVM_EMULATED BOOST_COMP_LLVM_DETECTION +# else +# undef BOOST_COMP_LLVM +# define BOOST_COMP_LLVM BOOST_COMP_LLVM_DETECTION +# endif +# define BOOST_COMP_LLVM_AVAILABLE +# include +#endif + +#define BOOST_COMP_LLVM_NAME "LLVM" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_LLVM,BOOST_COMP_LLVM_NAME) + +#ifdef BOOST_COMP_LLVM_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_LLVM_EMULATED,BOOST_COMP_LLVM_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/metaware.h b/contrib/src/boost/predef/compiler/metaware.h new file mode 100644 index 0000000..1a32039 --- /dev/null +++ b/contrib/src/boost/predef/compiler/metaware.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_METAWARE_H +#define BOOST_PREDEF_COMPILER_METAWARE_H + +#include +#include + +/*` +[heading `BOOST_COMP_HIGHC`] + +MetaWare High C/C++ compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__HIGHC__`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_HIGHC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__HIGHC__) +# define BOOST_COMP_HIGHC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_HIGHC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_HIGHC_EMULATED BOOST_COMP_HIGHC_DETECTION +# else +# undef BOOST_COMP_HIGHC +# define BOOST_COMP_HIGHC BOOST_COMP_HIGHC_DETECTION +# endif +# define BOOST_COMP_HIGHC_AVAILABLE +# include +#endif + +#define BOOST_COMP_HIGHC_NAME "MetaWare High C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HIGHC,BOOST_COMP_HIGHC_NAME) + +#ifdef BOOST_COMP_HIGHC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HIGHC_EMULATED,BOOST_COMP_HIGHC_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/metrowerks.h b/contrib/src/boost/predef/compiler/metrowerks.h new file mode 100644 index 0000000..f2d739b --- /dev/null +++ b/contrib/src/boost/predef/compiler/metrowerks.h @@ -0,0 +1,77 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_METROWERKS_H +#define BOOST_PREDEF_COMPILER_METROWERKS_H + +#include +#include + +/*` +[heading `BOOST_COMP_MWERKS`] + +[@http://en.wikipedia.org/wiki/CodeWarrior Metrowerks CodeWarrior] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MWERKS__`] [__predef_detection__]] + [[`__CWCC__`] [__predef_detection__]] + + [[`__CWCC__`] [V.R.P]] + [[`__MWERKS__`] [V.R.P >= 4.2.0]] + [[`__MWERKS__`] [9.R.0]] + [[`__MWERKS__`] [8.R.0]] + ] + */ + +#define BOOST_COMP_MWERKS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MWERKS__) || defined(__CWCC__) +# if !defined(BOOST_COMP_MWERKS_DETECTION) && defined(__CWCC__) +# define BOOST_COMP_MWERKS_DETECTION BOOST_PREDEF_MAKE_0X_VRPP(__CWCC__) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x4200) +# define BOOST_COMP_MWERKS_DETECTION BOOST_PREDEF_MAKE_0X_VRPP(__MWERKS__) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3204) // note the "skip": 04->9.3 +# define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER(9,(__MWERKS__)%100-1,0) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3200) +# define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER(9,(__MWERKS__)%100,0) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3000) +# define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER(8,(__MWERKS__)%100,0) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) +# define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_MWERKS_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_MWERKS_EMULATED BOOST_COMP_MWERKS_DETECTION +# else +# undef BOOST_COMP_MWERKS +# define BOOST_COMP_MWERKS BOOST_COMP_MWERKS_DETECTION +# endif +# define BOOST_COMP_MWERKS_AVAILABLE +# include +#endif + +#define BOOST_COMP_MWERKS_NAME "Metrowerks CodeWarrior" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MWERKS,BOOST_COMP_MWERKS_NAME) + +#ifdef BOOST_COMP_MWERKS_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MWERKS_EMULATED,BOOST_COMP_MWERKS_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/microtec.h b/contrib/src/boost/predef/compiler/microtec.h new file mode 100644 index 0000000..066a6d2 --- /dev/null +++ b/contrib/src/boost/predef/compiler/microtec.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_MICROTEC_H +#define BOOST_PREDEF_COMPILER_MICROTEC_H + +#include +#include + +/*` +[heading `BOOST_COMP_MRI`] + +[@http://www.mentor.com/microtec/ Microtec C/C++] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_MRI`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_MRI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(_MRI) +# define BOOST_COMP_MRI_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_MRI_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_MRI_EMULATED BOOST_COMP_MRI_DETECTION +# else +# undef BOOST_COMP_MRI +# define BOOST_COMP_MRI BOOST_COMP_MRI_DETECTION +# endif +# define BOOST_COMP_MRI_AVAILABLE +# include +#endif + +#define BOOST_COMP_MRI_NAME "Microtec C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MRI,BOOST_COMP_MRI_NAME) + +#ifdef BOOST_COMP_MRI_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MRI_EMULATED,BOOST_COMP_MRI_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/mpw.h b/contrib/src/boost/predef/compiler/mpw.h new file mode 100644 index 0000000..1183306 --- /dev/null +++ b/contrib/src/boost/predef/compiler/mpw.h @@ -0,0 +1,63 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_MPW_H +#define BOOST_PREDEF_COMPILER_MPW_H + +#include +#include + +/*` +[heading `BOOST_COMP_MPW`] + +[@http://en.wikipedia.org/wiki/Macintosh_Programmer%27s_Workshop MPW C++] compiler. +Version number available as major, and minor. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MRC__`] [__predef_detection__]] + [[`MPW_C`] [__predef_detection__]] + [[`MPW_CPLUS`] [__predef_detection__]] + + [[`__MRC__`] [V.R.0]] + ] + */ + +#define BOOST_COMP_MPW BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MRC__) || defined(MPW_C) || defined(MPW_CPLUS) +# if !defined(BOOST_COMP_MPW_DETECTION) && defined(__MRC__) +# define BOOST_COMP_MPW_DETECTION BOOST_PREDEF_MAKE_0X_VVRR(__MRC__) +# endif +# if !defined(BOOST_COMP_MPW_DETECTION) +# define BOOST_COMP_MPW_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_MPW_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_MPW_EMULATED BOOST_COMP_MPW_DETECTION +# else +# undef BOOST_COMP_MPW +# define BOOST_COMP_MPW BOOST_COMP_MPW_DETECTION +# endif +# define BOOST_COMP_MPW_AVAILABLE +# include +#endif + +#define BOOST_COMP_MPW_NAME "MPW C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MPW,BOOST_COMP_MPW_NAME) + +#ifdef BOOST_COMP_MPW_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MPW_EMULATED,BOOST_COMP_MPW_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/palm.h b/contrib/src/boost/predef/compiler/palm.h new file mode 100644 index 0000000..707925a --- /dev/null +++ b/contrib/src/boost/predef/compiler/palm.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_PALM_H +#define BOOST_PREDEF_COMPILER_PALM_H + +#include +#include + +/*` +[heading `BOOST_COMP_PALM`] + +Palm C/C++ compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_PACC_VER`] [__predef_detection__]] + + [[`_PACC_VER`] [V.R.P]] + ] + */ + +#define BOOST_COMP_PALM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(_PACC_VER) +# define BOOST_COMP_PALM_DETECTION BOOST_PREDEF_MAKE_0X_VRRPP000(_PACC_VER) +#endif + +#ifdef BOOST_COMP_PALM_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_PALM_EMULATED BOOST_COMP_PALM_DETECTION +# else +# undef BOOST_COMP_PALM +# define BOOST_COMP_PALM BOOST_COMP_PALM_DETECTION +# endif +# define BOOST_COMP_PALM_AVAILABLE +# include +#endif + +#define BOOST_COMP_PALM_NAME "Palm C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PALM,BOOST_COMP_PALM_NAME) + +#ifdef BOOST_COMP_PALM_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PALM_EMULATED,BOOST_COMP_PALM_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/pgi.h b/contrib/src/boost/predef/compiler/pgi.h new file mode 100644 index 0000000..e016aeb --- /dev/null +++ b/contrib/src/boost/predef/compiler/pgi.h @@ -0,0 +1,60 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_PGI_H +#define BOOST_PREDEF_COMPILER_PGI_H + +#include +#include + +/*` +[heading `BOOST_COMP_PGI`] + +[@http://en.wikipedia.org/wiki/The_Portland_Group Portland Group C/C++] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__PGI`] [__predef_detection__]] + + [[`__PGIC__`, `__PGIC_MINOR__`, `__PGIC_PATCHLEVEL__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_PGI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__PGI) +# if !defined(BOOST_COMP_PGI_DETECTION) && (defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)) +# define BOOST_COMP_PGI_DETECTION BOOST_VERSION_NUMBER(__PGIC__,__PGIC_MINOR__,__PGIC_PATCHLEVEL__) +# endif +# if !defined(BOOST_COMP_PGI_DETECTION) +# define BOOST_COMP_PGI_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_PGI_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_PGI_EMULATED BOOST_COMP_PGI_DETECTION +# else +# undef BOOST_COMP_PGI +# define BOOST_COMP_PGI BOOST_COMP_PGI_DETECTION +# endif +# define BOOST_COMP_PGI_AVAILABLE +# include +#endif + +#define BOOST_COMP_PGI_NAME "Portland Group C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PGI,BOOST_COMP_PGI_NAME) + +#ifdef BOOST_COMP_PGI_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PGI_EMULATED,BOOST_COMP_PGI_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/sgi_mipspro.h b/contrib/src/boost/predef/compiler/sgi_mipspro.h new file mode 100644 index 0000000..00739f0 --- /dev/null +++ b/contrib/src/boost/predef/compiler/sgi_mipspro.h @@ -0,0 +1,66 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_SGI_MIPSPRO_H +#define BOOST_PREDEF_COMPILER_SGI_MIPSPRO_H + +#include +#include + +/*` +[heading `BOOST_COMP_SGI`] + +[@http://en.wikipedia.org/wiki/MIPSpro SGI MIPSpro] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__sgi`] [__predef_detection__]] + [[`sgi`] [__predef_detection__]] + + [[`_SGI_COMPILER_VERSION`] [V.R.P]] + [[`_COMPILER_VERSION`] [V.R.P]] + ] + */ + +#define BOOST_COMP_SGI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__sgi) || defined(sgi) +# if !defined(BOOST_COMP_SGI_DETECTION) && defined(_SGI_COMPILER_VERSION) +# define BOOST_COMP_SGI_DETECTION BOOST_PREDEF_MAKE_10_VRP(_SGI_COMPILER_VERSION) +# endif +# if !defined(BOOST_COMP_SGI_DETECTION) && defined(_COMPILER_VERSION) +# define BOOST_COMP_SGI_DETECTION BOOST_PREDEF_MAKE_10_VRP(_COMPILER_VERSION) +# endif +# if !defined(BOOST_COMP_SGI_DETECTION) +# define BOOST_COMP_SGI_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_SGI_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_SGI_EMULATED BOOST_COMP_SGI_DETECTION +# else +# undef BOOST_COMP_SGI +# define BOOST_COMP_SGI BOOST_COMP_SGI_DETECTION +# endif +# define BOOST_COMP_SGI_AVAILABLE +# include +#endif + +#define BOOST_COMP_SGI_NAME "SGI MIPSpro" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SGI,BOOST_COMP_SGI_NAME) + +#ifdef BOOST_COMP_SGI_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SGI_EMULATED,BOOST_COMP_SGI_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/sunpro.h b/contrib/src/boost/predef/compiler/sunpro.h new file mode 100644 index 0000000..92c3926 --- /dev/null +++ b/contrib/src/boost/predef/compiler/sunpro.h @@ -0,0 +1,76 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_SUNPRO_H +#define BOOST_PREDEF_COMPILER_SUNPRO_H + +#include +#include + +/*` +[heading `BOOST_COMP_SUNPRO`] + +[@http://en.wikipedia.org/wiki/Oracle_Solaris_Studio Oracle Solaris Studio] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__SUNPRO_CC`] [__predef_detection__]] + [[`__SUNPRO_C`] [__predef_detection__]] + + [[`__SUNPRO_CC`] [V.R.P]] + [[`__SUNPRO_C`] [V.R.P]] + [[`__SUNPRO_CC`] [VV.RR.P]] + [[`__SUNPRO_C`] [VV.RR.P]] + ] + */ + +#define BOOST_COMP_SUNPRO BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__SUNPRO_CC) || defined(__SUNPRO_C) +# if !defined(BOOST_COMP_SUNPRO_DETECTION) && defined(__SUNPRO_CC) +# if (__SUNPRO_CC < 0x5100) +# define BOOST_COMP_SUNPRO_DETECTION BOOST_PREDEF_MAKE_0X_VRP(__SUNPRO_CC) +# else +# define BOOST_COMP_SUNPRO_DETECTION BOOST_PREDEF_MAKE_0X_VVRRP(__SUNPRO_CC) +# endif +# endif +# if !defined(BOOST_COMP_SUNPRO_DETECTION) && defined(__SUNPRO_C) +# if (__SUNPRO_C < 0x5100) +# define BOOST_COMP_SUNPRO_DETECTION BOOST_PREDEF_MAKE_0X_VRP(__SUNPRO_C) +# else +# define BOOST_COMP_SUNPRO_DETECTION BOOST_PREDEF_MAKE_0X_VVRRP(__SUNPRO_C) +# endif +# endif +# if !defined(BOOST_COMP_SUNPRO_DETECTION) +# define BOOST_COMP_SUNPRO_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_SUNPRO_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_SUNPRO_EMULATED BOOST_COMP_SUNPRO_DETECTION +# else +# undef BOOST_COMP_SUNPRO +# define BOOST_COMP_SUNPRO BOOST_COMP_SUNPRO_DETECTION +# endif +# define BOOST_COMP_SUNPRO_AVAILABLE +# include +#endif + +#define BOOST_COMP_SUNPRO_NAME "Oracle Solaris Studio" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SUNPRO,BOOST_COMP_SUNPRO_NAME) + +#ifdef BOOST_COMP_SUNPRO_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SUNPRO_EMULATED,BOOST_COMP_SUNPRO_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/tendra.h b/contrib/src/boost/predef/compiler/tendra.h new file mode 100644 index 0000000..c2bc5e4 --- /dev/null +++ b/contrib/src/boost/predef/compiler/tendra.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_TENDRA_H +#define BOOST_PREDEF_COMPILER_TENDRA_H + +#include +#include + +/*` +[heading `BOOST_COMP_TENDRA`] + +[@http://en.wikipedia.org/wiki/TenDRA_Compiler TenDRA C/C++] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__TenDRA__`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_TENDRA BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__TenDRA__) +# define BOOST_COMP_TENDRA_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_TENDRA_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_TENDRA_EMULATED BOOST_COMP_TENDRA_DETECTION +# else +# undef BOOST_COMP_TENDRA +# define BOOST_COMP_TENDRA BOOST_COMP_TENDRA_DETECTION +# endif +# define BOOST_COMP_TENDRA_AVAILABLE +# include +#endif + +#define BOOST_COMP_TENDRA_NAME "TenDRA C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_TENDRA,BOOST_COMP_TENDRA_NAME) + +#ifdef BOOST_COMP_TENDRA_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_TENDRA_EMULATED,BOOST_COMP_TENDRA_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/visualc.h b/contrib/src/boost/predef/compiler/visualc.h new file mode 100644 index 0000000..9481d9d --- /dev/null +++ b/contrib/src/boost/predef/compiler/visualc.h @@ -0,0 +1,91 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_VISUALC_H +#define BOOST_PREDEF_COMPILER_VISUALC_H + +/* Other compilers that emulate this one need to be detected first. */ + +#include + +#include +#include + +/*` +[heading `BOOST_COMP_MSVC`] + +[@http://en.wikipedia.org/wiki/Visual_studio Microsoft Visual C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_MSC_VER`] [__predef_detection__]] + + [[`_MSC_FULL_VER`] [V.R.P]] + [[`_MSC_VER`] [V.R.0]] + ] + */ + +#define BOOST_COMP_MSVC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(_MSC_VER) +# if !defined (_MSC_FULL_VER) +# define BOOST_COMP_MSVC_BUILD 0 +# else + /* how many digits does the build number have? */ +# if _MSC_FULL_VER / 10000 == _MSC_VER + /* four digits */ +# define BOOST_COMP_MSVC_BUILD (_MSC_FULL_VER % 10000) +# elif _MSC_FULL_VER / 100000 == _MSC_VER + /* five digits */ +# define BOOST_COMP_MSVC_BUILD (_MSC_FULL_VER % 100000) +# else +# error "Cannot determine build number from _MSC_FULL_VER" +# endif +# endif + /* + VS2014 was skipped in the release sequence for MS. Which + means that the compiler and VS product versions are no longer + in sync. Hence we need to use different formulas for + mapping from MSC version to VS product version. + */ +# if (_MSC_VER >= 1900) +# define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\ + _MSC_VER/100-5,\ + _MSC_VER%100,\ + BOOST_COMP_MSVC_BUILD) +# else +# define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\ + _MSC_VER/100-6,\ + _MSC_VER%100,\ + BOOST_COMP_MSVC_BUILD) +# endif +#endif + +#ifdef BOOST_COMP_MSVC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_MSVC_EMULATED BOOST_COMP_MSVC_DETECTION +# else +# undef BOOST_COMP_MSVC +# define BOOST_COMP_MSVC BOOST_COMP_MSVC_DETECTION +# endif +# define BOOST_COMP_MSVC_AVAILABLE +# include +#endif + +#define BOOST_COMP_MSVC_NAME "Microsoft Visual C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MSVC,BOOST_COMP_MSVC_NAME) + +#ifdef BOOST_COMP_MSVC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MSVC_EMULATED,BOOST_COMP_MSVC_NAME) +#endif diff --git a/contrib/src/boost/predef/compiler/watcom.h b/contrib/src/boost/predef/compiler/watcom.h new file mode 100644 index 0000000..b0e7776 --- /dev/null +++ b/contrib/src/boost/predef/compiler/watcom.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_WATCOM_H +#define BOOST_PREDEF_COMPILER_WATCOM_H + +#include +#include + +/*` +[heading `BOOST_COMP_WATCOM`] + +[@http://en.wikipedia.org/wiki/Watcom Watcom C++] compiler. +Version number available as major, and minor. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__WATCOMC__`] [__predef_detection__]] + + [[`__WATCOMC__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_WATCOM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__WATCOMC__) +# define BOOST_COMP_WATCOM_DETECTION BOOST_PREDEF_MAKE_10_VVRR(__WATCOMC__) +#endif + +#ifdef BOOST_COMP_WATCOM_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_WATCOM_EMULATED BOOST_COMP_WATCOM_DETECTION +# else +# undef BOOST_COMP_WATCOM +# define BOOST_COMP_WATCOM BOOST_COMP_WATCOM_DETECTION +# endif +# define BOOST_COMP_WATCOM_AVAILABLE +# include +#endif + +#define BOOST_COMP_WATCOM_NAME "Watcom C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_WATCOM,BOOST_COMP_WATCOM_NAME) + +#ifdef BOOST_COMP_WATCOM_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_WATCOM_EMULATED,BOOST_COMP_WATCOM_NAME) +#endif diff --git a/contrib/src/boost/predef/detail/_cassert.h b/contrib/src/boost/predef/detail/_cassert.h new file mode 100644 index 0000000..940e944 --- /dev/null +++ b/contrib/src/boost/predef/detail/_cassert.h @@ -0,0 +1,17 @@ +/* +Copyright Rene Rivera 2011-2012 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL__CASSERT_H +#define BOOST_PREDEF_DETAIL__CASSERT_H + +#if defined(__cplusplus) +#include +#else +#include +#endif + +#endif diff --git a/contrib/src/boost/predef/detail/_exception.h b/contrib/src/boost/predef/detail/_exception.h new file mode 100644 index 0000000..f5a6687 --- /dev/null +++ b/contrib/src/boost/predef/detail/_exception.h @@ -0,0 +1,15 @@ +/* +Copyright Rene Rivera 2011-2012 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL__EXCEPTION_H +#define BOOST_PREDEF_DETAIL__EXCEPTION_H + +#if defined(__cplusplus) +#include +#endif + +#endif diff --git a/contrib/src/boost/predef/detail/comp_detected.h b/contrib/src/boost/predef/detail/comp_detected.h new file mode 100644 index 0000000..fda1801 --- /dev/null +++ b/contrib/src/boost/predef/detail/comp_detected.h @@ -0,0 +1,10 @@ +/* +Copyright Rene Rivera 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL_COMP_DETECTED +#define BOOST_PREDEF_DETAIL_COMP_DETECTED 1 +#endif diff --git a/contrib/src/boost/predef/detail/os_detected.h b/contrib/src/boost/predef/detail/os_detected.h new file mode 100644 index 0000000..08e10f9 --- /dev/null +++ b/contrib/src/boost/predef/detail/os_detected.h @@ -0,0 +1,10 @@ +/* +Copyright Rene Rivera 2013 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL_OS_DETECTED +#define BOOST_PREDEF_DETAIL_OS_DETECTED 1 +#endif diff --git a/contrib/src/boost/predef/detail/platform_detected.h b/contrib/src/boost/predef/detail/platform_detected.h new file mode 100644 index 0000000..4faf693 --- /dev/null +++ b/contrib/src/boost/predef/detail/platform_detected.h @@ -0,0 +1,10 @@ +/* +Copyright Rene Rivera 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL_PLAT_DETECTED +#define BOOST_PREDEF_DETAIL_PLAT_DETECTED 1 +#endif diff --git a/contrib/src/boost/predef/detail/test.h b/contrib/src/boost/predef/detail/test.h new file mode 100644 index 0000000..546a9e4 --- /dev/null +++ b/contrib/src/boost/predef/detail/test.h @@ -0,0 +1,17 @@ +/* +Copyright Rene Rivera 2011-2012 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL_TEST_H +#define BOOST_PREDEF_DETAIL_TEST_H + +#if !defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) + +#define BOOST_PREDEF_DECLARE_TEST(x,s) + +#endif + +#endif diff --git a/contrib/src/boost/predef/hardware.h b/contrib/src/boost/predef/hardware.h new file mode 100644 index 0000000..972b73a --- /dev/null +++ b/contrib/src/boost/predef/hardware.h @@ -0,0 +1,16 @@ +/* +Copyright Charly Chevalier 2015 +Copyright Joel Falcou 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_HARDWARE_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_HARDWARE_H +#define BOOST_PREDEF_HARDWARE_H +#endif + +#include + +#endif diff --git a/contrib/src/boost/predef/hardware/simd.h b/contrib/src/boost/predef/hardware/simd.h new file mode 100644 index 0000000..4de1e70 --- /dev/null +++ b/contrib/src/boost/predef/hardware/simd.h @@ -0,0 +1,107 @@ +/* +Copyright Charly Chevalier 2015 +Copyright Joel Falcou 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#include +#include +#include +#include + +#ifndef BOOST_PREDEF_HARDWARE_SIMD_H +#define BOOST_PREDEF_HARDWARE_SIMD_H + +#include + +/*` + [section Using the `BOOST_HW_SIMD_*` predefs] + [include ../doc/hardware_simd.qbk] + [endsect] + + [/ --------------------------- ] + + [section `BOOST_HW_SIMD_*`] + + [heading `BOOST_HW_SIMD`] + + The SIMD extension detected for a specific architectures. + Version number depends on the detected extension. + + [table + [[__predef_symbol__] [__predef_version__]] + + [[`BOOST_HW_SIMD_X86_AVAILABLE`] [__predef_detection__]] + [[`BOOST_HW_SIMD_X86_AMD_AVAILABLE`] [__predef_detection__]] + [[`BOOST_HW_SIMD_ARM_AVAILABLE`] [__predef_detection__]] + [[`BOOST_HW_SIMD_PPC_AVAILABLE`] [__predef_detection__]] + ] + + [include ../include/boost/predef/hardware/simd/x86.h] + [include ../include/boost/predef/hardware/simd/x86_amd.h] + [include ../include/boost/predef/hardware/simd/arm.h] + [include ../include/boost/predef/hardware/simd/ppc.h] + + [endsect] + + [/ --------------------------- ] + + [section `BOOST_HW_SIMD_X86_*_VERSION`] + [include ../include/boost/predef/hardware/simd/x86/versions.h] + [endsect] + + [section `BOOST_HW_SIMD_X86_AMD_*_VERSION`] + [include ../include/boost/predef/hardware/simd/x86_amd/versions.h] + [endsect] + + [section `BOOST_HW_SIMD_ARM_*_VERSION`] + [include ../include/boost/predef/hardware/simd/arm/versions.h] + [endsect] + + [section `BOOST_HW_SIMD_PPC_*_VERSION`] + [include ../include/boost/predef/hardware/simd/ppc/versions.h] + [endsect] + + */ + +// We check if SIMD extension of multiples architectures have been detected, +// if yes, then this is an error! +// +// NOTE: _X86_AMD implies _X86, so there is no need to check for it here! +// +#if defined(BOOST_HW_SIMD_ARM_AVAILABLE) && defined(BOOST_HW_SIMD_PPC_AVAILABLE) ||\ + defined(BOOST_HW_SIMD_ARM_AVAILABLE) && defined(BOOST_HW_SIMD_X86_AVAILABLE) ||\ + defined(BOOST_HW_SIMD_PPC_AVAILABLE) && defined(BOOST_HW_SIMD_X86_AVAILABLE) +# error "Multiple SIMD architectures detected, this cannot happen!" +#endif + +#if defined(BOOST_HW_SIMD_X86_AVAILABLE) +# define BOOST_HW_SIMD BOOST_HW_SIMD_X86 +#endif + +#if defined(BOOST_HW_SIMD_X86_AMD_AVAILABLE) +# define BOOST_HW_SIMD BOOST_HW_SIMD_X86_AMD +#endif + +#if defined(BOOST_HW_SIMD_ARM_AVAILABLE) +# define BOOST_HW_SIMD BOOST_HW_SIMD_ARM +#endif + +#if defined(BOOST_HW_SIMD_PPC_AVAILABLE) +# define BOOST_HW_SIMD BOOST_HW_SIMD_PPC +#endif + +#if defined(BOOST_HW_SIMD) +# define BOOST_HW_SIMD_AVAILABLE +#else +# define BOOST_HW_SIMD BOOST_VERSION_NUMBER_NOT_AVAILABLE +#endif + +#define BOOST_HW_SIMD_NAME "Hardware SIMD" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD, BOOST_HW_SIMD_NAME) diff --git a/contrib/src/boost/predef/hardware/simd/arm.h b/contrib/src/boost/predef/hardware/simd/arm.h new file mode 100644 index 0000000..d067c93 --- /dev/null +++ b/contrib/src/boost/predef/hardware/simd/arm.h @@ -0,0 +1,57 @@ +/* +Copyright Charly Chevalier 2015 +Copyright Joel Falcou 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_HARDWARE_SIMD_ARM_H +#define BOOST_PREDEF_HARDWARE_SIMD_ARM_H + +#include +#include + +/*` + [heading `BOOST_HW_SIMD_ARM`] + + The SIMD extension for ARM (*if detected*). + Version number depends on the most recent detected extension. + + [table + [[__predef_symbol__] [__predef_version__]] + + [[`__ARM_NEON__`] [__predef_detection__]] + [[`__aarch64__`] [__predef_detection__]] + [[`_M_ARM`] [__predef_detection__]] + ] + + [table + [[__predef_symbol__] [__predef_version__]] + + [[`__ARM_NEON__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]] + [[`__aarch64__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]] + [[`_M_ARM`] [BOOST_HW_SIMD_ARM_NEON_VERSION]] + ] + + */ + +#define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#undef BOOST_HW_SIMD_ARM +#if !defined(BOOST_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM)) +# define BOOST_HW_SIMD_ARM BOOST_HW_SIMD_ARM_NEON_VERSION +#endif + +#if !defined(BOOST_HW_SIMD_ARM) +# define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE +#else +# define BOOST_HW_SIMD_ARM_AVAILABLE +#endif + +#define BOOST_HW_SIMD_ARM_NAME "ARM SIMD" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_ARM, BOOST_HW_SIMD_ARM_NAME) diff --git a/contrib/src/boost/predef/hardware/simd/arm/versions.h b/contrib/src/boost/predef/hardware/simd/arm/versions.h new file mode 100644 index 0000000..8425b31 --- /dev/null +++ b/contrib/src/boost/predef/hardware/simd/arm/versions.h @@ -0,0 +1,32 @@ +/* +Copyright Charly Chevalier 2015 +Copyright Joel Falcou 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_HARDWARE_SIMD_ARM_VERSIONS_H +#define BOOST_PREDEF_HARDWARE_SIMD_ARM_VERSIONS_H + +#include + +/*` + Those defines represent ARM SIMD extensions versions. + + [note You *MUST* compare them with the predef `BOOST_HW_SIMD_ARM`.] + */ + +// --------------------------------- + +/*` + [heading `BOOST_HW_SIMD_ARM_NEON_VERSION`] + + The [@https://en.wikipedia.org/wiki/ARM_architecture#Advanced_SIMD_.28NEON.29 NEON] + ARM extension version number. + + Version number is: *1.0.0*. + */ +#define BOOST_HW_SIMD_ARM_NEON_VERSION BOOST_VERSION_NUMBER(1, 0, 0) + +#endif diff --git a/contrib/src/boost/predef/hardware/simd/ppc.h b/contrib/src/boost/predef/hardware/simd/ppc.h new file mode 100644 index 0000000..eef25c2 --- /dev/null +++ b/contrib/src/boost/predef/hardware/simd/ppc.h @@ -0,0 +1,69 @@ +/* +Copyright Charly Chevalier 2015 +Copyright Joel Falcou 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_HARDWARE_SIMD_PPC_H +#define BOOST_PREDEF_HARDWARE_SIMD_PPC_H + +#include +#include + +/*` + [heading `BOOST_HW_SIMD_PPC`] + + The SIMD extension for PowerPC (*if detected*). + Version number depends on the most recent detected extension. + + [table + [[__predef_symbol__] [__predef_version__]] + + [[`__VECTOR4DOUBLE__`] [__predef_detection__]] + + [[`__ALTIVEC__`] [__predef_detection__]] + [[`__VEC__`] [__predef_detection__]] + + [[`__VSX__`] [__predef_detection__]] + ] + + [table + [[__predef_symbol__] [__predef_version__]] + + [[`__VECTOR4DOUBLE__`] [BOOST_HW_SIMD_PPC_QPX_VERSION]] + + [[`__ALTIVEC__`] [BOOST_HW_SIMD_PPC_VMX_VERSION]] + [[`__VEC__`] [BOOST_HW_SIMD_PPC_VMX_VERSION]] + + [[`__VSX__`] [BOOST_HW_SIMD_PPC_VSX_VERSION]] + ] + + */ + +#define BOOST_HW_SIMD_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#undef BOOST_HW_SIMD_PPC +#if !defined(BOOST_HW_SIMD_PPC) && defined(__VECTOR4DOUBLE__) +# define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_QPX_VERSION +#endif +#if !defined(BOOST_HW_SIMD_PPC) && defined(__VSX__) +# define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_VSX_VERSION +#endif +#if !defined(BOOST_HW_SIMD_PPC) && (defined(__ALTIVEC__) || defined(__VEC__)) +# define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_VMX_VERSION +#endif + +#if !defined(BOOST_HW_SIMD_PPC) +# define BOOST_HW_SIMD_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE +#else +# define BOOST_HW_SIMD_PPC_AVAILABLE +#endif + +#define BOOST_HW_SIMD_PPC_NAME "PPC SIMD" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_PPC, BOOST_HW_SIMD_PPC_NAME) diff --git a/contrib/src/boost/predef/hardware/simd/ppc/versions.h b/contrib/src/boost/predef/hardware/simd/ppc/versions.h new file mode 100644 index 0000000..ffe3f0b --- /dev/null +++ b/contrib/src/boost/predef/hardware/simd/ppc/versions.h @@ -0,0 +1,51 @@ +/* +Copyright Charly Chevalier 2015 +Copyright Joel Falcou 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_HARDWARE_SIMD_PPC_VERSIONS_H +#define BOOST_PREDEF_HARDWARE_SIMD_PPC_VERSIONS_H + +#include + +/*` + Those defines represent Power PC SIMD extensions versions. + + [note You *MUST* compare them with the predef `BOOST_HW_SIMD_PPC`.] + */ + +// --------------------------------- + +/*` + [heading `BOOST_HW_SIMD_PPC_VMX_VERSION`] + + The [@https://en.wikipedia.org/wiki/AltiVec#VMX128 VMX] powerpc extension + version number. + + Version number is: *1.0.0*. + */ +#define BOOST_HW_SIMD_PPC_VMX_VERSION BOOST_VERSION_NUMBER(1, 0, 0) + +/*` + [heading `BOOST_HW_SIMD_PPC_VSX_VERSION`] + + The [@https://en.wikipedia.org/wiki/AltiVec#VSX VSX] powerpc extension version + number. + + Version number is: *1.1.0*. + */ +#define BOOST_HW_SIMD_PPC_VSX_VERSION BOOST_VERSION_NUMBER(1, 1, 0) + +/*` + [heading `BOOST_HW_SIMD_PPC_QPX_VERSION`] + + The QPX powerpc extension version number. + + Version number is: *2.0.0*. + */ +#define BOOST_HW_SIMD_PPC_QPX_VERSION BOOST_VERSION_NUMBER(2, 0, 0) + +#endif diff --git a/contrib/src/boost/predef/hardware/simd/x86.h b/contrib/src/boost/predef/hardware/simd/x86.h new file mode 100644 index 0000000..0874bc4 --- /dev/null +++ b/contrib/src/boost/predef/hardware/simd/x86.h @@ -0,0 +1,123 @@ +/* +Copyright Charly Chevalier 2015 +Copyright Joel Falcou 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_H +#define BOOST_PREDEF_HARDWARE_SIMD_X86_H + +#include +#include + +/*` + [heading `BOOST_HW_SIMD_X86`] + + The SIMD extension for x86 (*if detected*). + Version number depends on the most recent detected extension. + + [table + [[__predef_symbol__] [__predef_version__]] + + [[`__SSE__`] [__predef_detection__]] + [[`_M_X64`] [__predef_detection__]] + [[`_M_IX86_FP >= 1`] [__predef_detection__]] + + [[`__SSE2__`] [__predef_detection__]] + [[`_M_X64`] [__predef_detection__]] + [[`_M_IX86_FP >= 2`] [__predef_detection__]] + + [[`__SSE3__`] [__predef_detection__]] + + [[`__SSSE3__`] [__predef_detection__]] + + [[`__SSE4_1__`] [__predef_detection__]] + + [[`__SSE4_2__`] [__predef_detection__]] + + [[`__AVX__`] [__predef_detection__]] + + [[`__FMA__`] [__predef_detection__]] + + [[`__AVX2__`] [__predef_detection__]] + ] + + [table + [[__predef_symbol__] [__predef_version__]] + + [[`__SSE__`] [BOOST_HW_SIMD_X86_SSE_VERSION]] + [[`_M_X64`] [BOOST_HW_SIMD_X86_SSE_VERSION]] + [[`_M_IX86_FP >= 1`] [BOOST_HW_SIMD_X86_SSE_VERSION]] + + [[`__SSE2__`] [BOOST_HW_SIMD_X86_SSE2_VERSION]] + [[`_M_X64`] [BOOST_HW_SIMD_X86_SSE2_VERSION]] + [[`_M_IX86_FP >= 2`] [BOOST_HW_SIMD_X86_SSE2_VERSION]] + + [[`__SSE3__`] [BOOST_HW_SIMD_X86_SSE3_VERSION]] + + [[`__SSSE3__`] [BOOST_HW_SIMD_X86_SSSE3_VERSION]] + + [[`__SSE4_1__`] [BOOST_HW_SIMD_X86_SSE4_1_VERSION]] + + [[`__SSE4_2__`] [BOOST_HW_SIMD_X86_SSE4_2_VERSION]] + + [[`__AVX__`] [BOOST_HW_SIMD_X86_AVX_VERSION]] + + [[`__FMA__`] [BOOST_HW_SIMD_X86_FMA3_VERSION]] + + [[`__AVX2__`] [BOOST_HW_SIMD_x86_AVX2_VERSION]] + ] + + */ + +#define BOOST_HW_SIMD_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#undef BOOST_HW_SIMD_X86 +#if !defined(BOOST_HW_SIMD_X86) && defined(__MIC__) +# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_MIC_VERSION +#endif +#if !defined(BOOST_HW_SIMD_X86) && defined(__AVX2__) +# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_AVX2_VERSION +#endif +#if !defined(BOOST_HW_SIMD_X86) && defined(__AVX__) +# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_AVX_VERSION +#endif +#if !defined(BOOST_HW_SIMD_X86) && defined(__FMA__) +# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_FMA_VERSION +#endif +#if !defined(BOOST_HW_SIMD_X86) && defined(__SSE4_2__) +# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE4_2_VERSION +#endif +#if !defined(BOOST_HW_SIMD_X86) && defined(__SSE4_1__) +# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE4_1_VERSION +#endif +#if !defined(BOOST_HW_SIMD_X86) && defined(__SSSE3__) +# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSSE3_VERSION +#endif +#if !defined(BOOST_HW_SIMD_X86) && defined(__SSE3__) +# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE3_VERSION +#endif +#if !defined(BOOST_HW_SIMD_X86) && (defined(__SSE2__) || defined(_M_X64) || _M_IX86_FP >= 2) +# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE2_VERSION +#endif +#if !defined(BOOST_HW_SIMD_X86) && (defined(__SSE__) || defined(_M_X64) || _M_IX86_FP >= 1) +# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE_VERSION +#endif +#if !defined(BOOST_HW_SIMD_X86) && defined(__MMX__) +# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_MMX_VERSION +#endif + +#if !defined(BOOST_HW_SIMD_X86) +# define BOOST_HW_SIMD_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE +#else +# define BOOST_HW_SIMD_X86_AVAILABLE +#endif + +#define BOOST_HW_SIMD_X86_NAME "x86 SIMD" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86, BOOST_HW_SIMD_X86_NAME) diff --git a/contrib/src/boost/predef/hardware/simd/x86/versions.h b/contrib/src/boost/predef/hardware/simd/x86/versions.h new file mode 100644 index 0000000..0c7a4d3 --- /dev/null +++ b/contrib/src/boost/predef/hardware/simd/x86/versions.h @@ -0,0 +1,129 @@ +/* +Copyright Charly Chevalier 2015 +Copyright Joel Falcou 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_VERSIONS_H +#define BOOST_PREDEF_HARDWARE_SIMD_X86_VERSIONS_H + +#include + +/*` + Those defines represent x86 SIMD extensions versions. + + [note You *MUST* compare them with the predef `BOOST_HW_SIMD_X86`.] + */ + +// --------------------------------- + +/*` + [heading `BOOST_HW_SIMD_X86_MMX_VERSION`] + + The [@https://en.wikipedia.org/wiki/MMX_(instruction_set) MMX] x86 extension + version number. + + Version number is: *0.99.0*. + */ +#define BOOST_HW_SIMD_X86_MMX_VERSION BOOST_VERSION_NUMBER(0, 99, 0) + +/*` + [heading `BOOST_HW_SIMD_X86_SSE_VERSION`] + + The [@https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions SSE] x86 extension + version number. + + Version number is: *1.0.0*. + */ +#define BOOST_HW_SIMD_X86_SSE_VERSION BOOST_VERSION_NUMBER(1, 0, 0) + +/*` + [heading `BOOST_HW_SIMD_X86_SSE2_VERSION`] + + The [@https://en.wikipedia.org/wiki/SSE2 SSE2] x86 extension version number. + + Version number is: *2.0.0*. + */ +#define BOOST_HW_SIMD_X86_SSE2_VERSION BOOST_VERSION_NUMBER(2, 0, 0) + +/*` + [heading `BOOST_HW_SIMD_X86_SSE3_VERSION`] + + The [@https://en.wikipedia.org/wiki/SSE3 SSE3] x86 extension version number. + + Version number is: *3.0.0*. + */ +#define BOOST_HW_SIMD_X86_SSE3_VERSION BOOST_VERSION_NUMBER(3, 0, 0) + +/*` + [heading `BOOST_HW_SIMD_X86_SSSE3_VERSION`] + + The [@https://en.wikipedia.org/wiki/SSSE3 SSSE3] x86 extension version number. + + Version number is: *3.1.0*. + */ +#define BOOST_HW_SIMD_X86_SSSE3_VERSION BOOST_VERSION_NUMBER(3, 1, 0) + +/*` + [heading `BOOST_HW_SIMD_X86_SSE4_1_VERSION`] + + The [@https://en.wikipedia.org/wiki/SSE4#SSE4.1 SSE4_1] x86 extension version + number. + + Version number is: *4.1.0*. + */ +#define BOOST_HW_SIMD_X86_SSE4_1_VERSION BOOST_VERSION_NUMBER(4, 1, 0) + +/*` + [heading `BOOST_HW_SIMD_X86_SSE4_2_VERSION`] + + The [@https://en.wikipedia.org/wiki/SSE4##SSE4.2 SSE4_2] x86 extension version + number. + + Version number is: *4.2.0*. + */ +#define BOOST_HW_SIMD_X86_SSE4_2_VERSION BOOST_VERSION_NUMBER(4, 2, 0) + +/*` + [heading `BOOST_HW_SIMD_X86_AVX_VERSION`] + + The [@https://en.wikipedia.org/wiki/Advanced_Vector_Extensions AVX] x86 + extension version number. + + Version number is: *5.0.0*. + */ +#define BOOST_HW_SIMD_X86_AVX_VERSION BOOST_VERSION_NUMBER(5, 0, 0) + +/*` + [heading `BOOST_HW_SIMD_X86_FMA3_VERSION`] + + The [@https://en.wikipedia.org/wiki/FMA_instruction_set FMA3] x86 extension + version number. + + Version number is: *5.2.0*. + */ +#define BOOST_HW_SIMD_X86_FMA3_VERSION BOOST_VERSION_NUMBER(5, 2, 0) + +/*` + [heading `BOOST_HW_SIMD_X86_AVX2_VERSION`] + + The [@https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#Advanced_Vector_Extensions_2 AVX2] + x86 extension version number. + + Version number is: *5.3.0*. + */ +#define BOOST_HW_SIMD_X86_AVX2_VERSION BOOST_VERSION_NUMBER(5, 3, 0) + +/*` + [heading `BOOST_HW_SIMD_X86_MIC_VERSION`] + + The [@https://en.wikipedia.org/wiki/Xeon_Phi MIC] (Xeon Phi) x86 extension + version number. + + Version number is: *9.0.0*. + */ +#define BOOST_HW_SIMD_X86_MIC_VERSION BOOST_VERSION_NUMBER(9, 0, 0) + +#endif diff --git a/contrib/src/boost/predef/hardware/simd/x86_amd.h b/contrib/src/boost/predef/hardware/simd/x86_amd.h new file mode 100644 index 0000000..60fd448 --- /dev/null +++ b/contrib/src/boost/predef/hardware/simd/x86_amd.h @@ -0,0 +1,87 @@ +/* +Copyright Charly Chevalier 2015 +Copyright Joel Falcou 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_AMD_H +#define BOOST_PREDEF_HARDWARE_SIMD_X86_AMD_H + +#include +#include + +/*` + [heading `BOOST_HW_SIMD_X86_AMD`] + + The SIMD extension for x86 (AMD) (*if detected*). + Version number depends on the most recent detected extension. + + [table + [[__predef_symbol__] [__predef_version__]] + + [[`__SSE4A__`] [__predef_detection__]] + + [[`__FMA4__`] [__predef_detection__]] + + [[`__XOP__`] [__predef_detection__]] + + [[`BOOST_HW_SIMD_X86`] [__predef_detection__]] + ] + + [table + [[__predef_symbol__] [__predef_version__]] + + [[`__SSE4A__`] [BOOST_HW_SIMD_x86_SSE4A_VERSION]] + + [[`__FMA4__`] [BOOST_HW_SIMD_x86_FMA4_VERSION]] + + [[`__XOP__`] [BOOST_HW_SIMD_x86_XOP_VERSION]] + + [[`BOOST_HW_SIMD_X86`] [BOOST_HW_SIMD_x86]] + ] + + [note This predef includes every other x86 SIMD extensions and also has other + more specific extensions (FMA4, XOP, SSE4a). You should use this predef + instead of `BOOST_HW_SIMD_X86` to test if those specific extensions have + been detected.] + + */ + +#define BOOST_HW_SIMD_X86_AMD BOOST_VERSION_NUMBER_NOT_AVAILABLE + +// AMD CPUs also use x86 architecture. We first try to detect if any AMD +// specific extension are detected, if yes, then try to detect more recent x86 +// common extensions. + +#undef BOOST_HW_SIMD_X86_AMD +#if !defined(BOOST_HW_SIMD_X86_AMD) && defined(__XOP__) +# define BOOST_HW_SIMD_X86_AMD BOOST_HW_SIMD_X86_AMD_XOP_VERSION +#endif +#if !defined(BOOST_HW_SIMD_X86_AMD) && defined(__FMA4__) +# define BOOST_HW_SIMD_X86_AMD BOOST_HW_SIMD_X86_AMD_FMA4_VERSION +#endif +#if !defined(BOOST_HW_SIMD_X86_AMD) && defined(__SSE4A__) +# define BOOST_HW_SIMD_X86_AMD BOOST_HW_SIMD_X86_AMD_SSE4A_VERSION +#endif + +#if !defined(BOOST_HW_SIMD_X86_AMD) +# define BOOST_HW_SIMD_X86_AMD BOOST_VERSION_NUMBER_NOT_AVAILABLE +#else + // At this point, we know that we have an AMD CPU, we do need to check for + // other x86 extensions to determine the final version number. +# include +# if BOOST_HW_SIMD_X86 > BOOST_HW_SIMD_X86_AMD +# undef BOOST_HW_SIMD_X86_AMD +# define BOOST_HW_SIMD_X86_AMD BOOST_HW_SIMD_X86 +# endif +# define BOOST_HW_SIMD_X86_AMD_AVAILABLE +#endif + +#define BOOST_HW_SIMD_X86_AMD_NAME "x86 (AMD) SIMD" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_AMD, BOOST_HW_SIMD_X86_AMD_NAME) diff --git a/contrib/src/boost/predef/hardware/simd/x86_amd/versions.h b/contrib/src/boost/predef/hardware/simd/x86_amd/versions.h new file mode 100644 index 0000000..a0a9e91 --- /dev/null +++ b/contrib/src/boost/predef/hardware/simd/x86_amd/versions.h @@ -0,0 +1,51 @@ +/* +Copyright Charly Chevalier 2015 +Copyright Joel Falcou 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_AMD_VERSIONS_H +#define BOOST_PREDEF_HARDWARE_SIMD_X86_AMD_VERSIONS_H + +#include + +/*` + Those defines represent x86 (AMD specific) SIMD extensions versions. + + [note You *MUST* compare them with the predef `BOOST_HW_SIMD_X86_AMD`.] + */ + + +// --------------------------------- + +/*` + [heading `BOOST_HW_SIMD_X86_SSE4A_VERSION`] + + [@https://en.wikipedia.org/wiki/SSE4##SSE4A SSE4A] x86 extension (AMD specific). + + Version number is: *4.0.0*. + */ +#define BOOST_HW_SIMD_X86_AMD_SSE4A_VERSION BOOST_VERSION_NUMBER(4, 0, 0) + +/*` + [heading `BOOST_HW_SIMD_X86_XOP_VERSION`] + + [@https://en.wikipedia.org/wiki/XOP_instruction_set XOP] x86 extension (AMD specific). + + Version number is: *5.1.0*. + */ +#define BOOST_HW_SIMD_X86_AMD_FMA4_VERSION BOOST_VERSION_NUMBER(5, 1, 0) + +/*` + [heading `BOOST_HW_SIMD_X86_XOP_VERSION`] + + [@https://en.wikipedia.org/wiki/XOP_instruction_set XOP] x86 extension (AMD specific). + + Version number is: *5.1.1*. + */ +#define BOOST_HW_SIMD_X86_AMD_XOP_VERSION BOOST_VERSION_NUMBER(5, 1, 1) + + +#endif diff --git a/contrib/src/boost/predef/language.h b/contrib/src/boost/predef/language.h new file mode 100644 index 0000000..0a317d5 --- /dev/null +++ b/contrib/src/boost/predef/language.h @@ -0,0 +1,17 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_LANGUAGE_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_LANGUAGE_H +#define BOOST_PREDEF_LANGUAGE_H +#endif + +#include +#include +#include + +#endif diff --git a/contrib/src/boost/predef/language/objc.h b/contrib/src/boost/predef/language/objc.h new file mode 100644 index 0000000..24e3ad3 --- /dev/null +++ b/contrib/src/boost/predef/language/objc.h @@ -0,0 +1,42 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LANGUAGE_OBJC_H +#define BOOST_PREDEF_LANGUAGE_OBJC_H + +#include +#include + +/*` +[heading `BOOST_LANG_OBJC`] + +[@http://en.wikipedia.org/wiki/Objective-C Objective-C] language. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__OBJC__`] [__predef_detection__]] + ] + */ + +#define BOOST_LANG_OBJC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__OBJC__) +# undef BOOST_LANG_OBJC +# define BOOST_LANG_OBJC BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_LANG_OBJC +# define BOOST_LANG_OBJC_AVAILABLE +#endif + +#define BOOST_LANG_OBJC_NAME "Objective-C" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_OBJC,BOOST_LANG_OBJC_NAME) diff --git a/contrib/src/boost/predef/language/stdc.h b/contrib/src/boost/predef/language/stdc.h new file mode 100644 index 0000000..db25c12 --- /dev/null +++ b/contrib/src/boost/predef/language/stdc.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LANGUAGE_STDC_H +#define BOOST_PREDEF_LANGUAGE_STDC_H + +#include +#include + +/*` +[heading `BOOST_LANG_STDC`] + +[@http://en.wikipedia.org/wiki/C_(programming_language) Standard C] language. +If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__STDC__`] [__predef_detection__]] + + [[`__STDC_VERSION__`] [V.R.P]] + ] + */ + +#define BOOST_LANG_STDC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__STDC__) +# undef BOOST_LANG_STDC +# if defined(__STDC_VERSION__) +# if (__STDC_VERSION__ > 100) +# define BOOST_LANG_STDC BOOST_PREDEF_MAKE_YYYYMM(__STDC_VERSION__) +# else +# define BOOST_LANG_STDC BOOST_VERSION_NUMBER_AVAILABLE +# endif +# else +# define BOOST_LANG_STDC BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LANG_STDC +# define BOOST_LANG_STDC_AVAILABLE +#endif + +#define BOOST_LANG_STDC_NAME "Standard C" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDC,BOOST_LANG_STDC_NAME) diff --git a/contrib/src/boost/predef/language/stdcpp.h b/contrib/src/boost/predef/language/stdcpp.h new file mode 100644 index 0000000..34dc8c7 --- /dev/null +++ b/contrib/src/boost/predef/language/stdcpp.h @@ -0,0 +1,121 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LANGUAGE_STDCPP_H +#define BOOST_PREDEF_LANGUAGE_STDCPP_H + +#include +#include + +/*` +[heading `BOOST_LANG_STDCPP`] + +[@http://en.wikipedia.org/wiki/C%2B%2B Standard C++] language. +If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date. +Because of the way the C++ standardization process works the +defined version year will not be the commonly known year of the standard. +Specifically the defined versions are: + +[table Detected Version Number vs. C++ Standard Year + [[Detected Version Number] [Standard Year] [C++ Standard]] + [[27.11.1] [1998] [ISO/IEC 14882:1998]] + [[41.12.1] [2011] [ISO/IEC 14882:2011]] +] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__cplusplus`] [__predef_detection__]] + + [[`__cplusplus`] [YYYY.MM.1]] + ] + */ + +#define BOOST_LANG_STDCPP BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__cplusplus) +# undef BOOST_LANG_STDCPP +# if (__cplusplus > 100) +# define BOOST_LANG_STDCPP BOOST_PREDEF_MAKE_YYYYMM(__cplusplus) +# else +# define BOOST_LANG_STDCPP BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LANG_STDCPP +# define BOOST_LANG_STDCPP_AVAILABLE +#endif + +#define BOOST_LANG_STDCPP_NAME "Standard C++" + +/*` +[heading `BOOST_LANG_STDCPPCLI`] + +[@http://en.wikipedia.org/wiki/C%2B%2B/CLI Standard C++/CLI] language. +If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__cplusplus_cli`] [__predef_detection__]] + + [[`__cplusplus_cli`] [YYYY.MM.1]] + ] + */ + +#define BOOST_LANG_STDCPPCLI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__cplusplus_cli) +# undef BOOST_LANG_STDCPPCLI +# if (__cplusplus_cli > 100) +# define BOOST_LANG_STDCPPCLI BOOST_PREDEF_MAKE_YYYYMM(__cplusplus_cli) +# else +# define BOOST_LANG_STDCPPCLI BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LANG_STDCPPCLI +# define BOOST_LANG_STDCPPCLI_AVAILABLE +#endif + +#define BOOST_LANG_STDCPPCLI_NAME "Standard C++/CLI" + +/*` +[heading `BOOST_LANG_STDECPP`] + +[@http://en.wikipedia.org/wiki/Embedded_C%2B%2B Standard Embedded C++] language. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__embedded_cplusplus`] [__predef_detection__]] + ] + */ + +#define BOOST_LANG_STDECPP BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__embedded_cplusplus) +# undef BOOST_LANG_STDECPP +# define BOOST_LANG_STDECPP BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_LANG_STDECPP +# define BOOST_LANG_STDECPP_AVAILABLE +#endif + +#define BOOST_LANG_STDECPP_NAME "Standard Embedded C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDCPP,BOOST_LANG_STDCPP_NAME) + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDCPPCLI,BOOST_LANG_STDCPPCLI_NAME) + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDECPP,BOOST_LANG_STDECPP_NAME) diff --git a/contrib/src/boost/predef/library.h b/contrib/src/boost/predef/library.h new file mode 100644 index 0000000..40518a9 --- /dev/null +++ b/contrib/src/boost/predef/library.h @@ -0,0 +1,16 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_LIBRARY_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_LIBRARY_H +#define BOOST_PREDEF_LIBRARY_H +#endif + +#include +#include + +#endif diff --git a/contrib/src/boost/predef/library/c.h b/contrib/src/boost/predef/library/c.h new file mode 100644 index 0000000..fa8841e --- /dev/null +++ b/contrib/src/boost/predef/library/c.h @@ -0,0 +1,20 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_LIBRARY_C_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_LIBRARY_C_H +#define BOOST_PREDEF_LIBRARY_C_H +#endif + +#include + +#include +#include +#include +#include + +#endif diff --git a/contrib/src/boost/predef/library/c/_prefix.h b/contrib/src/boost/predef/library/c/_prefix.h new file mode 100644 index 0000000..12bcb0f --- /dev/null +++ b/contrib/src/boost/predef/library/c/_prefix.h @@ -0,0 +1,13 @@ +/* +Copyright Rene Rivera 2008-2013 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C__PREFIX_H +#define BOOST_PREDEF_LIBRARY_C__PREFIX_H + +#include + +#endif diff --git a/contrib/src/boost/predef/library/c/gnu.h b/contrib/src/boost/predef/library/c/gnu.h new file mode 100644 index 0000000..9e4ca89 --- /dev/null +++ b/contrib/src/boost/predef/library/c/gnu.h @@ -0,0 +1,61 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C_GNU_H +#define BOOST_PREDEF_LIBRARY_C_GNU_H + +#include +#include + +#include + +#if defined(__STDC__) +#include +#elif defined(__cplusplus) +#include +#endif + +/*` +[heading `BOOST_LIB_C_GNU`] + +[@http://en.wikipedia.org/wiki/Glibc GNU glibc] Standard C library. +Version number available as major, and minor. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__GLIBC__`] [__predef_detection__]] + [[`__GNU_LIBRARY__`] [__predef_detection__]] + + [[`__GLIBC__`, `__GLIBC_MINOR__`] [V.R.0]] + [[`__GNU_LIBRARY__`, `__GNU_LIBRARY_MINOR__`] [V.R.0]] + ] + */ + +#define BOOST_LIB_C_GNU BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__GLIBC__) || defined(__GNU_LIBRARY__) +# undef BOOST_LIB_C_GNU +# if defined(__GLIBC__) +# define BOOST_LIB_C_GNU \ + BOOST_VERSION_NUMBER(__GLIBC__,__GLIBC_MINOR__,0) +# else +# define BOOST_LIB_C_GNU \ + BOOST_VERSION_NUMBER(__GNU_LIBRARY__,__GNU_LIBRARY_MINOR__,0) +# endif +#endif + +#if BOOST_LIB_C_GNU +# define BOOST_LIB_C_GNU_AVAILABLE +#endif + +#define BOOST_LIB_C_GNU_NAME "GNU" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_GNU,BOOST_LIB_C_GNU_NAME) diff --git a/contrib/src/boost/predef/library/c/uc.h b/contrib/src/boost/predef/library/c/uc.h new file mode 100644 index 0000000..03081e9 --- /dev/null +++ b/contrib/src/boost/predef/library/c/uc.h @@ -0,0 +1,47 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C_UC_H +#define BOOST_PREDEF_LIBRARY_C_UC_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_C_UC`] + +[@http://en.wikipedia.org/wiki/Uclibc uClibc] Standard C library. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__UCLIBC__`] [__predef_detection__]] + + [[`__UCLIBC_MAJOR__`, `__UCLIBC_MINOR__`, `__UCLIBC_SUBLEVEL__`] [V.R.P]] + ] + */ + +#define BOOST_LIB_C_UC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__UCLIBC__) +# undef BOOST_LIB_C_UC +# define BOOST_LIB_C_UC BOOST_VERSION_NUMBER(\ + __UCLIBC_MAJOR__,__UCLIBC_MINOR__,__UCLIBC_SUBLEVEL__) +#endif + +#if BOOST_LIB_C_UC +# define BOOST_LIB_C_UC_AVAILABLE +#endif + +#define BOOST_LIB_C_UC_NAME "uClibc" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_UC,BOOST_LIB_C_UC_NAME) diff --git a/contrib/src/boost/predef/library/c/vms.h b/contrib/src/boost/predef/library/c/vms.h new file mode 100644 index 0000000..685f1a7 --- /dev/null +++ b/contrib/src/boost/predef/library/c/vms.h @@ -0,0 +1,47 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C_VMS_H +#define BOOST_PREDEF_LIBRARY_C_VMS_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_C_VMS`] + +VMS libc Standard C library. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__CRTL_VER`] [__predef_detection__]] + + [[`__CRTL_VER`] [V.R.P]] + ] + */ + +#define BOOST_LIB_C_VMS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__CRTL_VER) +# undef BOOST_LIB_C_VMS +# define BOOST_LIB_C_VMS BOOST_PREDEF_MAKE_10_VVRR0PP00(__CRTL_VER) +#endif + +#if BOOST_LIB_C_VMS +# define BOOST_LIB_C_VMS_AVAILABLE +#endif + +#define BOOST_LIB_C_VMS_NAME "VMS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_VMS,BOOST_LIB_C_VMS_NAME) diff --git a/contrib/src/boost/predef/library/c/zos.h b/contrib/src/boost/predef/library/c/zos.h new file mode 100644 index 0000000..222d355 --- /dev/null +++ b/contrib/src/boost/predef/library/c/zos.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C_ZOS_H +#define BOOST_PREDEF_LIBRARY_C_ZOS_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_C_ZOS`] + +z/OS libc Standard C library. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__LIBREL__`] [__predef_detection__]] + + [[`__LIBREL__`] [V.R.P]] + [[`__TARGET_LIB__`] [V.R.P]] + ] + */ + +#define BOOST_LIB_C_ZOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__LIBREL__) +# undef BOOST_LIB_C_ZOS +# if !defined(BOOST_LIB_C_ZOS) && defined(__LIBREL__) +# define BOOST_LIB_C_ZOS BOOST_PREDEF_MAKE_0X_VRRPPPP(__LIBREL__) +# endif +# if !defined(BOOST_LIB_C_ZOS) && defined(__TARGET_LIB__) +# define BOOST_LIB_C_ZOS BOOST_PREDEF_MAKE_0X_VRRPPPP(__TARGET_LIB__) +# endif +# if !defined(BOOST_LIB_C_ZOS) +# define BOOST_LIB_C_ZOS BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LIB_C_ZOS +# define BOOST_LIB_C_ZOS_AVAILABLE +#endif + +#define BOOST_LIB_C_ZOS_NAME "z/OS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_ZOS,BOOST_LIB_C_ZOS_NAME) diff --git a/contrib/src/boost/predef/library/std.h b/contrib/src/boost/predef/library/std.h new file mode 100644 index 0000000..403b6ff --- /dev/null +++ b/contrib/src/boost/predef/library/std.h @@ -0,0 +1,25 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ +#if !defined(BOOST_PREDEF_LIBRARY_STD_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_LIBRARY_STD_H +#define BOOST_PREDEF_LIBRARY_STD_H +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/contrib/src/boost/predef/library/std/_prefix.h b/contrib/src/boost/predef/library/std/_prefix.h new file mode 100644 index 0000000..932b855 --- /dev/null +++ b/contrib/src/boost/predef/library/std/_prefix.h @@ -0,0 +1,23 @@ +/* +Copyright Rene Rivera 2008-2013 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_PREDEF_LIBRARY_STD__PREFIX_H +#define BOOST_PREDEF_LIBRARY_STD__PREFIX_H + +/* +We need to include an STD header to gives us the context +of which library we are using. The "smallest" code-wise header +seems to be . Boost uses but as far +as I can tell (RR) it's not a stand-alone header in most +implementations. Using also has the benefit of +being available in EC++, so we get a chance to make this work +for embedded users. And since it's not a header impacted by TR1 +there's no magic needed for inclusion in the face of the +Boost.TR1 library. +*/ +#include + +#endif diff --git a/contrib/src/boost/predef/library/std/cxx.h b/contrib/src/boost/predef/library/std/cxx.h new file mode 100644 index 0000000..07b52cd --- /dev/null +++ b/contrib/src/boost/predef/library/std/cxx.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_CXX_H +#define BOOST_PREDEF_LIBRARY_STD_CXX_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_CXX`] + +[@http://libcxx.llvm.org/ libc++] C++ Standard Library. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_LIBCPP_VERSION`] [__predef_detection__]] + + [[`_LIBCPP_VERSION`] [V.0.P]] + ] + */ + +#define BOOST_LIB_STD_CXX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(_LIBCPP_VERSION) +# undef BOOST_LIB_STD_CXX +# define BOOST_LIB_STD_CXX BOOST_PREDEF_MAKE_10_VPPP(_LIBCPP_VERSION) +#endif + +#if BOOST_LIB_STD_CXX +# define BOOST_LIB_STD_CXX_AVAILABLE +#endif + +#define BOOST_LIB_STD_CXX_NAME "libc++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_CXX,BOOST_LIB_STD_CXX_NAME) diff --git a/contrib/src/boost/predef/library/std/dinkumware.h b/contrib/src/boost/predef/library/std/dinkumware.h new file mode 100644 index 0000000..0fc0776 --- /dev/null +++ b/contrib/src/boost/predef/library/std/dinkumware.h @@ -0,0 +1,52 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_DINKUMWARE_H +#define BOOST_PREDEF_LIBRARY_STD_DINKUMWARE_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_DINKUMWARE`] + +[@http://en.wikipedia.org/wiki/Dinkumware Dinkumware] Standard C++ Library. +If available version number as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_YVALS`, `__IBMCPP__`] [__predef_detection__]] + [[`_CPPLIB_VER`] [__predef_detection__]] + + [[`_CPPLIB_VER`] [V.R.0]] + ] + */ + +#define BOOST_LIB_STD_DINKUMWARE BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) +# undef BOOST_LIB_STD_DINKUMWARE +# if defined(_CPPLIB_VER) +# define BOOST_LIB_STD_DINKUMWARE BOOST_PREDEF_MAKE_10_VVRR(_CPPLIB_VER) +# else +# define BOOST_LIB_STD_DINKUMWARE BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LIB_STD_DINKUMWARE +# define BOOST_LIB_STD_DINKUMWARE_AVAILABLE +#endif + +#define BOOST_LIB_STD_DINKUMWARE_NAME "Dinkumware" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_DINKUMWARE,BOOST_LIB_STD_DINKUMWARE_NAME) diff --git a/contrib/src/boost/predef/library/std/libcomo.h b/contrib/src/boost/predef/library/std/libcomo.h new file mode 100644 index 0000000..97d4a53 --- /dev/null +++ b/contrib/src/boost/predef/library/std/libcomo.h @@ -0,0 +1,47 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_LIBCOMO_H +#define BOOST_PREDEF_LIBRARY_STD_LIBCOMO_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_COMO`] + +[@http://www.comeaucomputing.com/libcomo/ Comeau Computing] Standard C++ Library. +Version number available as major. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__LIBCOMO__`] [__predef_detection__]] + + [[`__LIBCOMO_VERSION__`] [V.0.0]] + ] + */ + +#define BOOST_LIB_STD_COMO BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__LIBCOMO__) +# undef BOOST_LIB_STD_COMO +# define BOOST_LIB_STD_COMO BOOST_VERSION_NUMBER(__LIBCOMO_VERSION__,0,0) +#endif + +#if BOOST_LIB_STD_COMO +# define BOOST_LIB_STD_COMO_AVAILABLE +#endif + +#define BOOST_LIB_STD_COMO_NAME "Comeau Computing" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_COMO,BOOST_LIB_STD_COMO_NAME) diff --git a/contrib/src/boost/predef/library/std/modena.h b/contrib/src/boost/predef/library/std/modena.h new file mode 100644 index 0000000..b67ac62 --- /dev/null +++ b/contrib/src/boost/predef/library/std/modena.h @@ -0,0 +1,45 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_MODENA_H +#define BOOST_PREDEF_LIBRARY_STD_MODENA_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_MSIPL`] + +[@http://modena.us/ Modena Software Lib++] Standard C++ Library. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`MSIPL_COMPILE_H`] [__predef_detection__]] + [[`__MSIPL_COMPILE_H`] [__predef_detection__]] + ] + */ + +#define BOOST_LIB_STD_MSIPL BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(MSIPL_COMPILE_H) || defined(__MSIPL_COMPILE_H) +# undef BOOST_LIB_STD_MSIPL +# define BOOST_LIB_STD_MSIPL BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_LIB_STD_MSIPL +# define BOOST_LIB_STD_MSIPL_AVAILABLE +#endif + +#define BOOST_LIB_STD_MSIPL_NAME "Modena Software Lib++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_MSIPL,BOOST_LIB_STD_MSIPL_NAME) diff --git a/contrib/src/boost/predef/library/std/msl.h b/contrib/src/boost/predef/library/std/msl.h new file mode 100644 index 0000000..d73c74c --- /dev/null +++ b/contrib/src/boost/predef/library/std/msl.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_MSL_H +#define BOOST_PREDEF_LIBRARY_STD_MSL_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_MSL`] + +[@http://www.freescale.com/ Metrowerks] Standard C++ Library. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MSL_CPP__`] [__predef_detection__]] + [[`__MSL__`] [__predef_detection__]] + + [[`__MSL_CPP__`] [V.R.P]] + [[`__MSL__`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_MSL BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MSL_CPP__) || defined(__MSL__) +# undef BOOST_LIB_STD_MSL +# if defined(__MSL_CPP__) +# define BOOST_LIB_STD_MSL BOOST_PREDEF_MAKE_0X_VRPP(__MSL_CPP__) +# else +# define BOOST_LIB_STD_MSL BOOST_PREDEF_MAKE_0X_VRPP(__MSL__) +# endif +#endif + +#if BOOST_LIB_STD_MSL +# define BOOST_LIB_STD_MSL_AVAILABLE +#endif + +#define BOOST_LIB_STD_MSL_NAME "Metrowerks" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_MSL,BOOST_LIB_STD_MSL_NAME) diff --git a/contrib/src/boost/predef/library/std/roguewave.h b/contrib/src/boost/predef/library/std/roguewave.h new file mode 100644 index 0000000..9c3f288 --- /dev/null +++ b/contrib/src/boost/predef/library/std/roguewave.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_ROGUEWAVE_H +#define BOOST_PREDEF_LIBRARY_STD_ROGUEWAVE_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_RW`] + +[@http://stdcxx.apache.org/ Roguewave] Standard C++ library. +If available version number as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__STD_RWCOMPILER_H__`] [__predef_detection__]] + [[`_RWSTD_VER`] [__predef_detection__]] + + [[`_RWSTD_VER`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_RW BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) +# undef BOOST_LIB_STD_RW +# if defined(_RWSTD_VER) +# if _RWSTD_VER < 0x010000 +# define BOOST_LIB_STD_RW BOOST_PREDEF_MAKE_0X_VVRRP(_RWSTD_VER) +# else +# define BOOST_LIB_STD_RW BOOST_PREDEF_MAKE_0X_VVRRPP(_RWSTD_VER) +# endif +# else +# define BOOST_LIB_STD_RW BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LIB_STD_RW +# define BOOST_LIB_STD_RW_AVAILABLE +#endif + +#define BOOST_LIB_STD_RW_NAME "Roguewave" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_RW,BOOST_LIB_STD_RW_NAME) diff --git a/contrib/src/boost/predef/library/std/sgi.h b/contrib/src/boost/predef/library/std/sgi.h new file mode 100644 index 0000000..5d19bba --- /dev/null +++ b/contrib/src/boost/predef/library/std/sgi.h @@ -0,0 +1,51 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_SGI_H +#define BOOST_PREDEF_LIBRARY_STD_SGI_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_SGI`] + +[@http://www.sgi.com/tech/stl/ SGI] Standard C++ library. +If available version number as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__STL_CONFIG_H`] [__predef_detection__]] + + [[`__SGI_STL`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_SGI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__STL_CONFIG_H) +# undef BOOST_LIB_STD_SGI +# if defined(__SGI_STL) +# define BOOST_LIB_STD_SGI BOOST_PREDEF_MAKE_0X_VRP(__SGI_STL) +# else +# define BOOST_LIB_STD_SGI BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LIB_STD_SGI +# define BOOST_LIB_STD_SGI_AVAILABLE +#endif + +#define BOOST_LIB_STD_SGI_NAME "SGI" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_SGI,BOOST_LIB_STD_SGI_NAME) diff --git a/contrib/src/boost/predef/library/std/stdcpp3.h b/contrib/src/boost/predef/library/std/stdcpp3.h new file mode 100644 index 0000000..c980292 --- /dev/null +++ b/contrib/src/boost/predef/library/std/stdcpp3.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_STDCPP3_H +#define BOOST_PREDEF_LIBRARY_STD_STDCPP3_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_GNU`] + +[@http://gcc.gnu.org/libstdc++/ GNU libstdc++] Standard C++ library. +Version number available as year (from 1970), month, and day. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__GLIBCXX__`] [__predef_detection__]] + [[`__GLIBCPP__`] [__predef_detection__]] + + [[`__GLIBCXX__`] [V.R.P]] + [[`__GLIBCPP__`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_GNU BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__GLIBCPP__) || defined(__GLIBCXX__) +# undef BOOST_LIB_STD_GNU +# if defined(__GLIBCXX__) +# define BOOST_LIB_STD_GNU BOOST_PREDEF_MAKE_YYYYMMDD(__GLIBCXX__) +# else +# define BOOST_LIB_STD_GNU BOOST_PREDEF_MAKE_YYYYMMDD(__GLIBCPP__) +# endif +#endif + +#if BOOST_LIB_STD_GNU +# define BOOST_LIB_STD_GNU_AVAILABLE +#endif + +#define BOOST_LIB_STD_GNU_NAME "GNU" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_GNU,BOOST_LIB_STD_GNU_NAME) diff --git a/contrib/src/boost/predef/library/std/stlport.h b/contrib/src/boost/predef/library/std/stlport.h new file mode 100644 index 0000000..c09483b --- /dev/null +++ b/contrib/src/boost/predef/library/std/stlport.h @@ -0,0 +1,59 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_STLPORT_H +#define BOOST_PREDEF_LIBRARY_STD_STLPORT_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_STLPORT`] + +[@http://sourceforge.net/projects/stlport/ STLport Standard C++] library. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__SGI_STL_PORT`] [__predef_detection__]] + [[`_STLPORT_VERSION`] [__predef_detection__]] + + [[`_STLPORT_MAJOR`, `_STLPORT_MINOR`, `_STLPORT_PATCHLEVEL`] [V.R.P]] + [[`_STLPORT_VERSION`] [V.R.P]] + [[`__SGI_STL_PORT`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_STLPORT BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) +# undef BOOST_LIB_STD_STLPORT +# if !defined(BOOST_LIB_STD_STLPORT) && defined(_STLPORT_MAJOR) +# define BOOST_LIB_STD_STLPORT \ + BOOST_VERSION_NUMBER(_STLPORT_MAJOR,_STLPORT_MINOR,_STLPORT_PATCHLEVEL) +# endif +# if !defined(BOOST_LIB_STD_STLPORT) && defined(_STLPORT_VERSION) +# define BOOST_LIB_STD_STLPORT BOOST_PREDEF_MAKE_0X_VRP(_STLPORT_VERSION) +# endif +# if !defined(BOOST_LIB_STD_STLPORT) +# define BOOST_LIB_STD_STLPORT BOOST_PREDEF_MAKE_0X_VRP(__SGI_STL_PORT) +# endif +#endif + +#if BOOST_LIB_STD_STLPORT +# define BOOST_LIB_STD_STLPORT_AVAILABLE +#endif + +#define BOOST_LIB_STD_STLPORT_NAME "STLport" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_STLPORT,BOOST_LIB_STD_STLPORT_NAME) diff --git a/contrib/src/boost/predef/library/std/vacpp.h b/contrib/src/boost/predef/library/std/vacpp.h new file mode 100644 index 0000000..632f846 --- /dev/null +++ b/contrib/src/boost/predef/library/std/vacpp.h @@ -0,0 +1,44 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_VACPP_H +#define BOOST_PREDEF_LIBRARY_STD_VACPP_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_IBM`] + +[@http://www.ibm.com/software/awdtools/xlcpp/ IBM VACPP Standard C++] library. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__IBMCPP__`] [__predef_detection__]] + ] + */ + +#define BOOST_LIB_STD_IBM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__IBMCPP__) +# undef BOOST_LIB_STD_IBM +# define BOOST_LIB_STD_IBM BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_LIB_STD_IBM +# define BOOST_LIB_STD_IBM_AVAILABLE +#endif + +#define BOOST_LIB_STD_IBM_NAME "IBM VACPP" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_IBM,BOOST_LIB_STD_IBM_NAME) diff --git a/contrib/src/boost/predef/make.h b/contrib/src/boost/predef/make.h new file mode 100644 index 0000000..4f2f9ee --- /dev/null +++ b/contrib/src/boost/predef/make.h @@ -0,0 +1,89 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ +#include + +#ifndef BOOST_PREDEF_MAKE_H +#define BOOST_PREDEF_MAKE_H + +/* +Shorthands for the common version number formats used by vendors... +*/ + +/*` +[heading `BOOST_PREDEF_MAKE_..` macros] + +These set of macros decompose common vendor version number +macros which are composed version, revision, and patch digits. +The naming convention indicates: + +* The base of the specified version number. "`BOOST_PREDEF_MAKE_0X`" for + hexadecimal digits, and "`BOOST_PREDEF_MAKE_10`" for decimal digits. +* The format of the vendor version number. Where "`V`" indicates the version digits, + "`R`" indicates the revision digits, "`P`" indicates the patch digits, and "`0`" + indicates an ignored digit. + +Macros are: +*/ +/*` `BOOST_PREDEF_MAKE_0X_VRP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VRP(V) BOOST_VERSION_NUMBER((V&0xF00)>>8,(V&0xF0)>>4,(V&0xF)) +/*` `BOOST_PREDEF_MAKE_0X_VVRP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VVRP(V) BOOST_VERSION_NUMBER((V&0xFF00)>>8,(V&0xF0)>>4,(V&0xF)) +/*` `BOOST_PREDEF_MAKE_0X_VRPP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VRPP(V) BOOST_VERSION_NUMBER((V&0xF000)>>12,(V&0xF00)>>8,(V&0xFF)) +/*` `BOOST_PREDEF_MAKE_0X_VVRR(V)` */ +#define BOOST_PREDEF_MAKE_0X_VVRR(V) BOOST_VERSION_NUMBER((V&0xFF00)>>8,(V&0xFF),0) +/*` `BOOST_PREDEF_MAKE_0X_VRRPPPP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VRRPPPP(V) BOOST_VERSION_NUMBER((V&0xF000000)>>24,(V&0xFF0000)>>16,(V&0xFFFF)) +/*` `BOOST_PREDEF_MAKE_0X_VVRRP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VVRRP(V) BOOST_VERSION_NUMBER((V&0xFF000)>>12,(V&0xFF0)>>4,(V&0xF)) +/*` `BOOST_PREDEF_MAKE_0X_VRRPP000(V)` */ +#define BOOST_PREDEF_MAKE_0X_VRRPP000(V) BOOST_VERSION_NUMBER((V&0xF0000000)>>28,(V&0xFF00000)>>20,(V&0xFF000)>>12) +/*` `BOOST_PREDEF_MAKE_0X_VVRRPP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VVRRPP(V) BOOST_VERSION_NUMBER((V&0xFF0000)>>16,(V&0xFF00)>>8,(V&0xFF)) +/*` `BOOST_PREDEF_MAKE_10_VPPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VPPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,0,(V)%1000) +/*` `BOOST_PREDEF_MAKE_10_VRP(V)` */ +#define BOOST_PREDEF_MAKE_10_VRP(V) BOOST_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,(V)%10) +/*` `BOOST_PREDEF_MAKE_10_VRP000(V)` */ +#define BOOST_PREDEF_MAKE_10_VRP000(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,((V)/1000)%10) +/*` `BOOST_PREDEF_MAKE_10_VRPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VRPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,((V)/100)%10,(V)%100) +/*` `BOOST_PREDEF_MAKE_10_VRR(V)` */ +#define BOOST_PREDEF_MAKE_10_VRR(V) BOOST_VERSION_NUMBER(((V)/100)%10,(V)%100,0) +/*` `BOOST_PREDEF_MAKE_10_VRRPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VRRPP(V) BOOST_VERSION_NUMBER(((V)/10000)%10,((V)/100)%100,(V)%100) +/*` `BOOST_PREDEF_MAKE_10_VRR000(V)` */ +#define BOOST_PREDEF_MAKE_10_VRR000(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/1000)%100,0) +/*` `BOOST_PREDEF_MAKE_10_VV00(V)` */ +#define BOOST_PREDEF_MAKE_10_VV00(V) BOOST_VERSION_NUMBER(((V)/100)%100,0,0) +/*` `BOOST_PREDEF_MAKE_10_VVRR(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRR(V) BOOST_VERSION_NUMBER(((V)/100)%100,(V)%100,0) +/*` `BOOST_PREDEF_MAKE_10_VVRRPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRRPP(V) BOOST_VERSION_NUMBER(((V)/10000)%100,((V)/100)%100,(V)%100) +/*` `BOOST_PREDEF_MAKE_10_VVRR0PP00(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRR0PP00(V) BOOST_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,((V)/100)%100) +/*` `BOOST_PREDEF_MAKE_10_VVRR0PPPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRR0PPPP(V) BOOST_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,(V)%10000) +/*` `BOOST_PREDEF_MAKE_10_VVRR00PP00(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRR00PP00(V) BOOST_VERSION_NUMBER(((V)/100000000)%100,((V)/1000000)%100,((V)/100)%100) +/*` +[heading `BOOST_PREDEF_MAKE_*..` date macros] + +Date decomposition macros return a date in the relative to the 1970 +Epoch date. If the month is not available, January 1st is used as the month and day. +If the day is not available, but the month is, the 1st of the month is used as the day. +*/ +/*` `BOOST_PREDEF_MAKE_DATE(Y,M,D)` */ +#define BOOST_PREDEF_MAKE_DATE(Y,M,D) BOOST_VERSION_NUMBER((Y)%10000-1970,(M)%100,(D)%100) +/*` `BOOST_PREDEF_MAKE_YYYYMMDD(V)` */ +#define BOOST_PREDEF_MAKE_YYYYMMDD(V) BOOST_PREDEF_MAKE_DATE(((V)/10000)%10000,((V)/100)%100,(V)%100) +/*` `BOOST_PREDEF_MAKE_YYYY(V)` */ +#define BOOST_PREDEF_MAKE_YYYY(V) BOOST_PREDEF_MAKE_DATE(V,1,1) +/*` `BOOST_PREDEF_MAKE_YYYYMM(V)` */ +#define BOOST_PREDEF_MAKE_YYYYMM(V) BOOST_PREDEF_MAKE_DATE((V)/100,(V)%100,1) + +#endif diff --git a/contrib/src/boost/predef/os.h b/contrib/src/boost/predef/os.h new file mode 100644 index 0000000..bedf99e --- /dev/null +++ b/contrib/src/boost/predef/os.h @@ -0,0 +1,33 @@ +/* +Copyright Rene Rivera 2008-2015 +Copyright Franz Detro 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_OS_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_OS_H +#define BOOST_PREDEF_OS_H +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/contrib/src/boost/predef/os/aix.h b/contrib/src/boost/predef/os/aix.h new file mode 100644 index 0000000..3e5a953 --- /dev/null +++ b/contrib/src/boost/predef/os/aix.h @@ -0,0 +1,66 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_AIX_H +#define BOOST_PREDEF_OS_AIX_H + +#include +#include + +/*` +[heading `BOOST_OS_AIX`] + +[@http://en.wikipedia.org/wiki/AIX_operating_system IBM AIX] operating system. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_AIX`] [__predef_detection__]] + [[`__TOS_AIX__`] [__predef_detection__]] + + [[`_AIX43`] [4.3.0]] + [[`_AIX41`] [4.1.0]] + [[`_AIX32`] [3.2.0]] + [[`_AIX3`] [3.0.0]] + ] + */ + +#define BOOST_OS_AIX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(_AIX) || defined(__TOS_AIX__) \ + ) +# undef BOOST_OS_AIX +# if !defined(BOOST_OS_AIX) && defined(_AIX43) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER(4,3,0) +# endif +# if !defined(BOOST_OS_AIX) && defined(_AIX41) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER(4,1,0) +# endif +# if !defined(BOOST_OS_AIX) && defined(_AIX32) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER(3,2,0) +# endif +# if !defined(BOOST_OS_AIX) && defined(_AIX3) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_OS_AIX) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_AIX +# define BOOST_OS_AIX_AVAILABLE +# include +#endif + +#define BOOST_OS_AIX_NAME "IBM AIX" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_AIX,BOOST_OS_AIX_NAME) diff --git a/contrib/src/boost/predef/os/amigaos.h b/contrib/src/boost/predef/os/amigaos.h new file mode 100644 index 0000000..7b32ddf --- /dev/null +++ b/contrib/src/boost/predef/os/amigaos.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_AMIGAOS_H +#define BOOST_PREDEF_OS_AMIGAOS_H + +#include +#include + +/*` +[heading `BOOST_OS_AMIGAOS`] + +[@http://en.wikipedia.org/wiki/AmigaOS AmigaOS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`AMIGA`] [__predef_detection__]] + [[`__amigaos__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_AMIGAOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(AMIGA) || defined(__amigaos__) \ + ) +# undef BOOST_OS_AMIGAOS +# define BOOST_OS_AMIGAOS BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_AMIGAOS +# define BOOST_OS_AMIGAOS_AVAILABLE +# include +#endif + +#define BOOST_OS_AMIGAOS_NAME "AmigaOS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_AMIGAOS,BOOST_OS_AMIGAOS_NAME) diff --git a/contrib/src/boost/predef/os/android.h b/contrib/src/boost/predef/os/android.h new file mode 100644 index 0000000..00836e7 --- /dev/null +++ b/contrib/src/boost/predef/os/android.h @@ -0,0 +1,45 @@ +/* +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_ADROID_H +#define BOOST_PREDEF_OS_ADROID_H + +#include +#include + +/*` +[heading `BOOST_OS_ANDROID`] + +[@http://en.wikipedia.org/wiki/Android_%28operating_system%29 Android] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__ANDROID__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__ANDROID__) \ + ) +# undef BOOST_OS_ANDROID +# define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_ANDROID +# define BOOST_OS_ANDROID_AVAILABLE +# include +#endif + +#define BOOST_OS_ANDROID_NAME "Android" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_ANDROID,BOOST_OS_ANDROID_NAME) diff --git a/contrib/src/boost/predef/os/beos.h b/contrib/src/boost/predef/os/beos.h new file mode 100644 index 0000000..19f4cb7 --- /dev/null +++ b/contrib/src/boost/predef/os/beos.h @@ -0,0 +1,45 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BEOS_H +#define BOOST_PREDEF_OS_BEOS_H + +#include +#include + +/*` +[heading `BOOST_OS_BEOS`] + +[@http://en.wikipedia.org/wiki/BeOS BeOS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__BEOS__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_BEOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__BEOS__) \ + ) +# undef BOOST_OS_BEOS +# define BOOST_OS_BEOS BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_BEOS +# define BOOST_OS_BEOS_AVAILABLE +# include +#endif + +#define BOOST_OS_BEOS_NAME "BeOS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BEOS,BOOST_OS_BEOS_NAME) diff --git a/contrib/src/boost/predef/os/bsd.h b/contrib/src/boost/predef/os/bsd.h new file mode 100644 index 0000000..fad9aed --- /dev/null +++ b/contrib/src/boost/predef/os/bsd.h @@ -0,0 +1,103 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_H +#define BOOST_PREDEF_OS_BSD_H + +/* Special case: OSX will define BSD predefs if the sys/param.h + * header is included. We can guard against that, but only if we + * detect OSX first. Hence we will force include OSX detection + * before doing any BSD detection. + */ +#include + +#include +#include + +/*` +[heading `BOOST_OS_BSD`] + +[@http://en.wikipedia.org/wiki/Berkeley_Software_Distribution BSD] operating system. + +BSD has various branch operating systems possible and each detected +individually. This detects the following variations and sets a specific +version number macro to match: + +* `BOOST_OS_BSD_DRAGONFLY` [@http://en.wikipedia.org/wiki/DragonFly_BSD DragonFly BSD] +* `BOOST_OS_BSD_FREE` [@http://en.wikipedia.org/wiki/Freebsd FreeBSD] +* `BOOST_OS_BSD_BSDI` [@http://en.wikipedia.org/wiki/BSD/OS BSDi BSD/OS] +* `BOOST_OS_BSD_NET` [@http://en.wikipedia.org/wiki/Netbsd NetBSD] +* `BOOST_OS_BSD_OPEN` [@http://en.wikipedia.org/wiki/Openbsd OpenBSD] + +[note The general `BOOST_OS_BSD` is set in all cases to indicate some form +of BSD. If the above variants is detected the corresponding macro is also set.] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`BSD`] [__predef_detection__]] + [[`_SYSTYPE_BSD`] [__predef_detection__]] + + [[`BSD4_2`] [4.2.0]] + [[`BSD4_3`] [4.3.0]] + [[`BSD4_4`] [4.4.0]] + [[`BSD`] [V.R.0]] + ] + */ + +#include +#include +#include +#include +#include + +#ifndef BOOST_OS_BSD +#define BOOST_OS_BSD BOOST_VERSION_NUMBER_NOT_AVAILABLE +#endif + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(BSD) || \ + defined(_SYSTYPE_BSD) \ + ) +# undef BOOST_OS_BSD +# include +# if !defined(BOOST_OS_BSD) && defined(BSD4_4) +# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,4,0) +# endif +# if !defined(BOOST_OS_BSD) && defined(BSD4_3) +# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,3,0) +# endif +# if !defined(BOOST_OS_BSD) && defined(BSD4_2) +# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,2,0) +# endif +# if !defined(BOOST_OS_BSD) && defined(BSD) +# define BOOST_OS_BSD BOOST_PREDEF_MAKE_10_VVRR(BSD) +# endif +# if !defined(BOOST_OS_BSD) +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_BSD +# define BOOST_OS_BSD_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_NAME "BSD" + +#else + +#include +#include +#include +#include +#include + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD,BOOST_OS_BSD_NAME) diff --git a/contrib/src/boost/predef/os/bsd/bsdi.h b/contrib/src/boost/predef/os/bsd/bsdi.h new file mode 100644 index 0000000..afdcd3e --- /dev/null +++ b/contrib/src/boost/predef/os/bsd/bsdi.h @@ -0,0 +1,48 @@ +/* +Copyright Rene Rivera 2012-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_BSDI_H +#define BOOST_PREDEF_OS_BSD_BSDI_H + +#include + +/*` +[heading `BOOST_OS_BSD_BSDI`] + +[@http://en.wikipedia.org/wiki/BSD/OS BSDi BSD/OS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__bsdi__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_BSD_BSDI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__bsdi__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_BSDI +# define BOOST_OS_BSD_BSDI BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_BSD_BSDI +# define BOOST_OS_BSD_BSDI_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_BSDI_NAME "BSDi BSD/OS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_BSDI,BOOST_OS_BSD_BSDI_NAME) diff --git a/contrib/src/boost/predef/os/bsd/dragonfly.h b/contrib/src/boost/predef/os/bsd/dragonfly.h new file mode 100644 index 0000000..1d07579 --- /dev/null +++ b/contrib/src/boost/predef/os/bsd/dragonfly.h @@ -0,0 +1,50 @@ +/* +Copyright Rene Rivera 2012-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_DRAGONFLY_H +#define BOOST_PREDEF_OS_BSD_DRAGONFLY_H + +#include + +/*` +[heading `BOOST_OS_BSD_DRAGONFLY`] + +[@http://en.wikipedia.org/wiki/DragonFly_BSD DragonFly BSD] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__DragonFly__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_BSD_DRAGONFLY BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__DragonFly__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_DRAGONFLY +# if defined(__DragonFly__) +# define BOOST_OS_DRAGONFLY_BSD BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_BSD_DRAGONFLY +# define BOOST_OS_BSD_DRAGONFLY_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_DRAGONFLY_NAME "DragonFly BSD" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_DRAGONFLY,BOOST_OS_BSD_DRAGONFLY_NAME) diff --git a/contrib/src/boost/predef/os/bsd/free.h b/contrib/src/boost/predef/os/bsd/free.h new file mode 100644 index 0000000..248011a --- /dev/null +++ b/contrib/src/boost/predef/os/bsd/free.h @@ -0,0 +1,60 @@ +/* +Copyright Rene Rivera 2012-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_FREE_H +#define BOOST_PREDEF_OS_BSD_FREE_H + +#include + +/*` +[heading `BOOST_OS_BSD_FREE`] + +[@http://en.wikipedia.org/wiki/Freebsd FreeBSD] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__FreeBSD__`] [__predef_detection__]] + + [[`__FreeBSD_version`] [V.R.P]] + ] + */ + +#define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__FreeBSD__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_FREE +# if defined(__FreeBSD_version) +# if __FreeBSD_version < 500000 +# define BOOST_OS_BSD_FREE \ + BOOST_PREDEF_MAKE_10_VRP000(__FreeBSD_version) +# else +# define BOOST_OS_BSD_FREE \ + BOOST_PREDEF_MAKE_10_VRR000(__FreeBSD_version) +# endif +# else +# define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_BSD_FREE +# define BOOST_OS_BSD_FREE_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_FREE_NAME "Free BSD" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_FREE,BOOST_OS_BSD_FREE_NAME) diff --git a/contrib/src/boost/predef/os/bsd/net.h b/contrib/src/boost/predef/os/bsd/net.h new file mode 100644 index 0000000..387cbde --- /dev/null +++ b/contrib/src/boost/predef/os/bsd/net.h @@ -0,0 +1,84 @@ +/* +Copyright Rene Rivera 2012-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_NET_H +#define BOOST_PREDEF_OS_BSD_NET_H + +#include + +/*` +[heading `BOOST_OS_BSD_NET`] + +[@http://en.wikipedia.org/wiki/Netbsd NetBSD] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__NETBSD__`] [__predef_detection__]] + [[`__NetBSD__`] [__predef_detection__]] + + [[`__NETBSD_version`] [V.R.P]] + [[`NetBSD0_8`] [0.8.0]] + [[`NetBSD0_9`] [0.9.0]] + [[`NetBSD1_0`] [1.0.0]] + [[`__NetBSD_Version`] [V.R.P]] + ] + */ + +#define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__NETBSD__) || defined(__NetBSD__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_NET +# if defined(__NETBSD__) +# if defined(__NETBSD_version) +# if __NETBSD_version < 500000 +# define BOOST_OS_BSD_NET \ + BOOST_PREDEF_MAKE_10_VRP000(__NETBSD_version) +# else +# define BOOST_OS_BSD_NET \ + BOOST_PREDEF_MAKE_10_VRR000(__NETBSD_version) +# endif +# else +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE +# endif +# elif defined(__NetBSD__) +# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_8) +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,8,0) +# endif +# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_9) +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,9,0) +# endif +# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD1_0) +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_OS_BSD_NET) && defined(__NetBSD_Version) +# define BOOST_OS_BSD_NET \ + BOOST_PREDEF_MAKE_10_VVRR00PP00(__NetBSD_Version) +# endif +# if !defined(BOOST_OS_BSD_NET) +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE +# endif +# endif +#endif + +#if BOOST_OS_BSD_NET +# define BOOST_OS_BSD_NET_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_NET_NAME "DragonFly BSD" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_NET,BOOST_OS_BSD_NET_NAME) diff --git a/contrib/src/boost/predef/os/bsd/open.h b/contrib/src/boost/predef/os/bsd/open.h new file mode 100644 index 0000000..423103a --- /dev/null +++ b/contrib/src/boost/predef/os/bsd/open.h @@ -0,0 +1,171 @@ +/* +Copyright Rene Rivera 2012-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_OPEN_H +#define BOOST_PREDEF_OS_BSD_OPEN_H + +#include + +/*` +[heading `BOOST_OS_BSD_OPEN`] + +[@http://en.wikipedia.org/wiki/Openbsd OpenBSD] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__OpenBSD__`] [__predef_detection__]] + + [[`OpenBSD2_0`] [2.0.0]] + [[`OpenBSD2_1`] [2.1.0]] + [[`OpenBSD2_2`] [2.2.0]] + [[`OpenBSD2_3`] [2.3.0]] + [[`OpenBSD2_4`] [2.4.0]] + [[`OpenBSD2_5`] [2.5.0]] + [[`OpenBSD2_6`] [2.6.0]] + [[`OpenBSD2_7`] [2.7.0]] + [[`OpenBSD2_8`] [2.8.0]] + [[`OpenBSD2_9`] [2.9.0]] + [[`OpenBSD3_0`] [3.0.0]] + [[`OpenBSD3_1`] [3.1.0]] + [[`OpenBSD3_2`] [3.2.0]] + [[`OpenBSD3_3`] [3.3.0]] + [[`OpenBSD3_4`] [3.4.0]] + [[`OpenBSD3_5`] [3.5.0]] + [[`OpenBSD3_6`] [3.6.0]] + [[`OpenBSD3_7`] [3.7.0]] + [[`OpenBSD3_8`] [3.8.0]] + [[`OpenBSD3_9`] [3.9.0]] + [[`OpenBSD4_0`] [4.0.0]] + [[`OpenBSD4_1`] [4.1.0]] + [[`OpenBSD4_2`] [4.2.0]] + [[`OpenBSD4_3`] [4.3.0]] + [[`OpenBSD4_4`] [4.4.0]] + [[`OpenBSD4_5`] [4.5.0]] + [[`OpenBSD4_6`] [4.6.0]] + [[`OpenBSD4_7`] [4.7.0]] + [[`OpenBSD4_8`] [4.8.0]] + [[`OpenBSD4_9`] [4.9.0]] + ] + */ + +#define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__OpenBSD__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_OPEN +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_0) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_1) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,1,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_2) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,2,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_3) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,3,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_4) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,4,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_5) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,5,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_6) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,6,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_7) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,7,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_8) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,8,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_9) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,9,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_0) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_1) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,1,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_2) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,2,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_3) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,3,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_4) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,4,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_5) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,5,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_6) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,6,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_7) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,7,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_8) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,8,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_9) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,9,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_0) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_1) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,1,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_2) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,2,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_3) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,3,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_4) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,4,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_5) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,5,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_6) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,6,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_7) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,7,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_8) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,8,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_9) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,9,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_BSD_OPEN +# define BOOST_OS_BSD_OPEN_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_OPEN_NAME "OpenBSD" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_OPEN,BOOST_OS_BSD_OPEN_NAME) diff --git a/contrib/src/boost/predef/os/cygwin.h b/contrib/src/boost/predef/os/cygwin.h new file mode 100644 index 0000000..1985c97 --- /dev/null +++ b/contrib/src/boost/predef/os/cygwin.h @@ -0,0 +1,45 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_CYGWIN_H +#define BOOST_PREDEF_OS_CYGWIN_H + +#include +#include + +/*` +[heading `BOOST_OS_CYGWIN`] + +[@http://en.wikipedia.org/wiki/Cygwin Cygwin] evironment. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__CYGWIN__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_CYGWIN BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__CYGWIN__) \ + ) +# undef BOOST_OS_CYGWIN +# define BOOST_OS_CGYWIN BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_CYGWIN +# define BOOST_OS_CYGWIN_AVAILABLE +# include +#endif + +#define BOOST_OS_CYGWIN_NAME "Cygwin" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_CYGWIN,BOOST_OS_CYGWIN_NAME) diff --git a/contrib/src/boost/predef/os/haiku.h b/contrib/src/boost/predef/os/haiku.h new file mode 100644 index 0000000..d79dbea --- /dev/null +++ b/contrib/src/boost/predef/os/haiku.h @@ -0,0 +1,46 @@ +/* +Copyright Jessica Hamilton 2014 +Copyright Rene Rivera 2014-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_HAIKU_H +#define BOOST_PREDEF_OS_HAIKU_H + +#include +#include + +/*` +[heading `BOOST_OS_HAIKU`] + +[@http://en.wikipedia.org/wiki/Haiku_(operating_system) Haiku] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__HAIKU__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_HAIKU BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__HAIKU__) \ + ) +# undef BOOST_OS_HAIKU +# define BOOST_OS_HAIKU BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_HAIKU +# define BOOST_OS_HAIKU_AVAILABLE +# include +#endif + +#define BOOST_OS_HAIKU_NAME "Haiku" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_HAIKU,BOOST_OS_HAIKU_NAME) diff --git a/contrib/src/boost/predef/os/hpux.h b/contrib/src/boost/predef/os/hpux.h new file mode 100644 index 0000000..29243f4 --- /dev/null +++ b/contrib/src/boost/predef/os/hpux.h @@ -0,0 +1,47 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_HPUX_H +#define BOOST_PREDEF_OS_HPUX_H + +#include +#include + +/*` +[heading `BOOST_OS_HPUX`] + +[@http://en.wikipedia.org/wiki/HP-UX HP-UX] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`hpux`] [__predef_detection__]] + [[`_hpux`] [__predef_detection__]] + [[`__hpux`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_HPUX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(hpux) || defined(_hpux) || defined(__hpux) \ + ) +# undef BOOST_OS_HPUX +# define BOOST_OS_HPUX BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_HPUX +# define BOOST_OS_HPUX_AVAILABLE +# include +#endif + +#define BOOST_OS_HPUX_NAME "HP-UX" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_HPUX,BOOST_OS_HPUX_NAME) diff --git a/contrib/src/boost/predef/os/ios.h b/contrib/src/boost/predef/os/ios.h new file mode 100644 index 0000000..f853815 --- /dev/null +++ b/contrib/src/boost/predef/os/ios.h @@ -0,0 +1,51 @@ +/* +Copyright Franz Detro 2014 +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_IOS_H +#define BOOST_PREDEF_OS_IOS_H + +#include +#include + +/*` +[heading `BOOST_OS_IOS`] + +[@http://en.wikipedia.org/wiki/iOS iOS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__APPLE__`] [__predef_detection__]] + [[`__MACH__`] [__predef_detection__]] + [[`__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__`] [__predef_detection__]] + + [[`__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__`] [__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000]] + ] + */ + +#define BOOST_OS_IOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__APPLE__) && defined(__MACH__) && \ + defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) \ + ) +# undef BOOST_OS_IOS +# define BOOST_OS_IOS (__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000) +#endif + +#if BOOST_OS_IOS +# define BOOST_OS_IOS_AVAILABLE +# include +#endif + +#define BOOST_OS_IOS_NAME "iOS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_IOS,BOOST_OS_IOS_NAME) diff --git a/contrib/src/boost/predef/os/irix.h b/contrib/src/boost/predef/os/irix.h new file mode 100644 index 0000000..fa6ac41 --- /dev/null +++ b/contrib/src/boost/predef/os/irix.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_IRIX_H +#define BOOST_PREDEF_OS_IRIX_H + +#include +#include + +/*` +[heading `BOOST_OS_IRIX`] + +[@http://en.wikipedia.org/wiki/Irix IRIX] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`sgi`] [__predef_detection__]] + [[`__sgi`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_IRIX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(sgi) || defined(__sgi) \ + ) +# undef BOOST_OS_IRIX +# define BOOST_OS_IRIX BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_IRIX +# define BOOST_OS_IRIX_AVAILABLE +# include +#endif + +#define BOOST_OS_IRIX_NAME "IRIX" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_IRIX,BOOST_OS_IRIX_NAME) diff --git a/contrib/src/boost/predef/os/linux.h b/contrib/src/boost/predef/os/linux.h new file mode 100644 index 0000000..a297d08 --- /dev/null +++ b/contrib/src/boost/predef/os/linux.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_LINUX_H +#define BOOST_PREDEF_OS_LINUX_H + +#include +#include + +/*` +[heading `BOOST_OS_LINUX`] + +[@http://en.wikipedia.org/wiki/Linux Linux] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`linux`] [__predef_detection__]] + [[`__linux`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_LINUX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(linux) || defined(__linux) \ + ) +# undef BOOST_OS_LINUX +# define BOOST_OS_LINUX BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_LINUX +# define BOOST_OS_LINUX_AVAILABLE +# include +#endif + +#define BOOST_OS_LINUX_NAME "Linux" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_LINUX,BOOST_OS_LINUX_NAME) diff --git a/contrib/src/boost/predef/os/macos.h b/contrib/src/boost/predef/os/macos.h new file mode 100644 index 0000000..4afb30d --- /dev/null +++ b/contrib/src/boost/predef/os/macos.h @@ -0,0 +1,65 @@ +/* +Copyright Rene Rivera 2008-2015 +Copyright Franz Detro 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_MACOS_H +#define BOOST_PREDEF_OS_MACOS_H + +/* Special case: iOS will define the same predefs as MacOS, and additionally + '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__'. We can guard against that, + but only if we detect iOS first. Hence we will force include iOS detection + * before doing any MacOS detection. + */ +#include + +#include +#include + +/*` +[heading `BOOST_OS_MACOS`] + +[@http://en.wikipedia.org/wiki/Mac_OS Mac OS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`macintosh`] [__predef_detection__]] + [[`Macintosh`] [__predef_detection__]] + [[`__APPLE__`] [__predef_detection__]] + [[`__MACH__`] [__predef_detection__]] + + [[`__APPLE__`, `__MACH__`] [10.0.0]] + [[ /otherwise/ ] [9.0.0]] + ] + */ + +#define BOOST_OS_MACOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(macintosh) || defined(Macintosh) || \ + (defined(__APPLE__) && defined(__MACH__)) \ + ) +# undef BOOST_OS_MACOS +# if !defined(BOOST_OS_MACOS) && defined(__APPLE__) && defined(__MACH__) +# define BOOST_OS_MACOS BOOST_VERSION_NUMBER(10,0,0) +# endif +# if !defined(BOOST_OS_MACOS) +# define BOOST_OS_MACOS BOOST_VERSION_NUMBER(9,0,0) +# endif +#endif + +#if BOOST_OS_MACOS +# define BOOST_OS_MACOS_AVAILABLE +# include +#endif + +#define BOOST_OS_MACOS_NAME "Mac OS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_MACOS,BOOST_OS_MACOS_NAME) diff --git a/contrib/src/boost/predef/os/os400.h b/contrib/src/boost/predef/os/os400.h new file mode 100644 index 0000000..b3446c2 --- /dev/null +++ b/contrib/src/boost/predef/os/os400.h @@ -0,0 +1,45 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_OS400_H +#define BOOST_PREDEF_OS_OS400_H + +#include +#include + +/*` +[heading `BOOST_OS_OS400`] + +[@http://en.wikipedia.org/wiki/IBM_i IBM OS/400] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__OS400__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_OS400 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__OS400__) \ + ) +# undef BOOST_OS_OS400 +# define BOOST_OS_OS400 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_OS400 +# define BOOST_OS_OS400_AVAILABLE +# include +#endif + +#define BOOST_OS_OS400_NAME "IBM OS/400" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_OS400,BOOST_OS_OS400_NAME) diff --git a/contrib/src/boost/predef/os/qnxnto.h b/contrib/src/boost/predef/os/qnxnto.h new file mode 100644 index 0000000..e76fbf2 --- /dev/null +++ b/contrib/src/boost/predef/os/qnxnto.h @@ -0,0 +1,59 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_QNXNTO_H +#define BOOST_PREDEF_OS_QNXNTO_H + +#include +#include + +/*` +[heading `BOOST_OS_QNX`] + +[@http://en.wikipedia.org/wiki/QNX QNX] operating system. +Version number available as major, and minor if possible. And +version 4 is specifically detected. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__QNX__`] [__predef_detection__]] + [[`__QNXNTO__`] [__predef_detection__]] + + [[`_NTO_VERSION`] [V.R.0]] + [[`__QNX__`] [4.0.0]] + ] + */ + +#define BOOST_OS_QNX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__QNX__) || defined(__QNXNTO__) \ + ) +# undef BOOST_OS_QNX +# if !defined(BOOST_OS_QNX) && defined(_NTO_VERSION) +# define BOOST_OS_QNX BOOST_PREDEF_MAKE_10_VVRR(_NTO_VERSION) +# endif +# if !defined(BOOST_OS_QNX) && defined(__QNX__) +# define BOOST_OS_QNX BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_OS_QNX) +# define BOOST_OS_QNX BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_QNX +# define BOOST_OS_QNX_AVAILABLE +# include +#endif + +#define BOOST_OS_QNX_NAME "QNX" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_QNX,BOOST_OS_QNX_NAME) diff --git a/contrib/src/boost/predef/os/solaris.h b/contrib/src/boost/predef/os/solaris.h new file mode 100644 index 0000000..75ddc91 --- /dev/null +++ b/contrib/src/boost/predef/os/solaris.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_SOLARIS_H +#define BOOST_PREDEF_OS_SOLARIS_H + +#include +#include + +/*` +[heading `BOOST_OS_SOLARIS`] + +[@http://en.wikipedia.org/wiki/Solaris_Operating_Environment Solaris] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`sun`] [__predef_detection__]] + [[`__sun`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_SOLARIS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(sun) || defined(__sun) \ + ) +# undef BOOST_OS_SOLARIS +# define BOOST_OS_SOLARIS BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_SOLARIS +# define BOOST_OS_SOLARIS_AVAILABLE +# include +#endif + +#define BOOST_OS_SOLARIS_NAME "Solaris" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_SOLARIS,BOOST_OS_SOLARIS_NAME) diff --git a/contrib/src/boost/predef/os/unix.h b/contrib/src/boost/predef/os/unix.h new file mode 100644 index 0000000..a607104 --- /dev/null +++ b/contrib/src/boost/predef/os/unix.h @@ -0,0 +1,76 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_UNIX_H +#define BOOST_PREDEF_OS_UNIX_H + +#include +#include + +/*` +[heading `BOOST_OS_UNIX`] + +[@http://en.wikipedia.org/wiki/Unix Unix Environment] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`unix`] [__predef_detection__]] + [[`__unix`] [__predef_detection__]] + [[`_XOPEN_SOURCE`] [__predef_detection__]] + [[`_POSIX_SOURCE`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_UNIX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(unix) || defined(__unix) || \ + defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) +# undef BOOST_OS_UNIX +# define BOOST_OS_UNIX BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_UNIX +# define BOOST_OS_UNIX_AVAILABLE +#endif + +#define BOOST_OS_UNIX_NAME "Unix Environment" + +/*` +[heading `BOOST_OS_SVR4`] + +[@http://en.wikipedia.org/wiki/UNIX_System_V SVR4 Environment] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__sysv__`] [__predef_detection__]] + [[`__SVR4`] [__predef_detection__]] + [[`__svr4__`] [__predef_detection__]] + [[`_SYSTYPE_SVR4`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_SVR4 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__sysv__) || defined(__SVR4) || \ + defined(__svr4__) || defined(_SYSTYPE_SVR4) +# undef BOOST_OS_SVR4 +# define BOOST_OS_SVR4 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_SVR4 +# define BOOST_OS_SVR4_AVAILABLE +#endif + +#define BOOST_OS_SVR4_NAME "SVR4 Environment" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_UNIX,BOOST_OS_UNIX_NAME) +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_SVR4,BOOST_OS_SVR4_NAME) diff --git a/contrib/src/boost/predef/os/vms.h b/contrib/src/boost/predef/os/vms.h new file mode 100644 index 0000000..2f8f786 --- /dev/null +++ b/contrib/src/boost/predef/os/vms.h @@ -0,0 +1,52 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_VMS_H +#define BOOST_PREDEF_OS_VMS_H + +#include +#include + +/*` +[heading `BOOST_OS_VMS`] + +[@http://en.wikipedia.org/wiki/Vms VMS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`VMS`] [__predef_detection__]] + [[`__VMS`] [__predef_detection__]] + + [[`__VMS_VER`] [V.R.P]] + ] + */ + +#define BOOST_OS_VMS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(VMS) || defined(__VMS) \ + ) +# undef BOOST_OS_VMS +# if defined(__VMS_VER) +# define BOOST_OS_VMS BOOST_PREDEF_MAKE_10_VVRR00PP00(__VMS_VER) +# else +# define BOOST_OS_VMS BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_VMS +# define BOOST_OS_VMS_AVAILABLE +# include +#endif + +#define BOOST_OS_VMS_NAME "VMS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_VMS,BOOST_OS_VMS_NAME) diff --git a/contrib/src/boost/predef/os/windows.h b/contrib/src/boost/predef/os/windows.h new file mode 100644 index 0000000..9db4390 --- /dev/null +++ b/contrib/src/boost/predef/os/windows.h @@ -0,0 +1,51 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_WINDOWS_H +#define BOOST_PREDEF_OS_WINDOWS_H + +#include +#include + +/*` +[heading `BOOST_OS_WINDOWS`] + +[@http://en.wikipedia.org/wiki/Category:Microsoft_Windows Microsoft Windows] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_WIN32`] [__predef_detection__]] + [[`_WIN64`] [__predef_detection__]] + [[`__WIN32__`] [__predef_detection__]] + [[`__TOS_WIN__`] [__predef_detection__]] + [[`__WINDOWS__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_WINDOWS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(_WIN32) || defined(_WIN64) || \ + defined(__WIN32__) || defined(__TOS_WIN__) || \ + defined(__WINDOWS__) \ + ) +# undef BOOST_OS_WINDOWS +# define BOOST_OS_WINDOWS BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_WINDOWS +# define BOOST_OS_WINDOWS_AVAILABLE +# include +#endif + +#define BOOST_OS_WINDOWS_NAME "Microsoft Windows" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_WINDOWS,BOOST_OS_WINDOWS_NAME) diff --git a/contrib/src/boost/predef/other.h b/contrib/src/boost/predef/other.h new file mode 100644 index 0000000..c09ad49 --- /dev/null +++ b/contrib/src/boost/predef/other.h @@ -0,0 +1,16 @@ +/* +Copyright Rene Rivera 2013-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_OTHER_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_OTHER_H +#define BOOST_PREDEF_OTHER_H +#endif + +#include +/*#include */ + +#endif diff --git a/contrib/src/boost/predef/other/endian.h b/contrib/src/boost/predef/other/endian.h new file mode 100644 index 0000000..6d1f43f --- /dev/null +++ b/contrib/src/boost/predef/other/endian.h @@ -0,0 +1,204 @@ +/* +Copyright Rene Rivera 2013-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ENDIAN_H +#define BOOST_PREDEF_ENDIAN_H + +#include +#include +#include +#include +#include +#include + +/*` +[heading `BOOST_ENDIAN_*`] + +Detection of endian memory ordering. There are four defined macros +in this header that define the various generally possible endian +memory orderings: + +* `BOOST_ENDIAN_BIG_BYTE`, byte-swapped big-endian. +* `BOOST_ENDIAN_BIG_WORD`, word-swapped big-endian. +* `BOOST_ENDIAN_LITTLE_BYTE`, byte-swapped little-endian. +* `BOOST_ENDIAN_LITTLE_WORD`, word-swapped little-endian. + +The detection is conservative in that it only identifies endianness +that it knows for certain. In particular bi-endianness is not +indicated as is it not practically possible to determine the +endianness from anything but an operating system provided +header. And the currently known headers do not define that +programatic bi-endianness is available. + +This implementation is a compilation of various publicly available +information and acquired knowledge: + +# The indispensable documentation of "Pre-defined Compiler Macros" + [@http://sourceforge.net/p/predef/wiki/Endianness Endianness]. +# The various endian specifications available in the + [@http://wikipedia.org/ Wikipedia] computer architecture pages. +# Generally available searches for headers that define endianness. + */ + +#define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_NOT_AVAILABLE +#define BOOST_ENDIAN_BIG_WORD BOOST_VERSION_NUMBER_NOT_AVAILABLE +#define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_NOT_AVAILABLE +#define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_NOT_AVAILABLE + +/* GNU libc provides a header defining __BYTE_ORDER, or _BYTE_ORDER. + * And some OSs provide some for of endian header also. + */ +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ + !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD +# if BOOST_LIB_C_GNU || BOOST_OS_ANDROID +# include +# else +# if BOOST_OS_MACOS +# include +# else +# if BOOST_OS_BSD +# if BOOST_OS_BSD_OPEN +# include +# else +# include +# endif +# endif +# endif +# endif +# if defined(__BYTE_ORDER) +# if defined(__BIG_ENDIAN) && (__BYTE_ORDER == __BIG_ENDIAN) +# undef BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == __LITTLE_ENDIAN) +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if defined(__PDP_ENDIAN) && (__BYTE_ORDER == __PDP_ENDIAN) +# undef BOOST_ENDIAN_LITTLE_WORD +# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE +# endif +# endif +# if !defined(__BYTE_ORDER) && defined(_BYTE_ORDER) +# if defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN) +# undef BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN) +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if defined(_PDP_ENDIAN) && (_BYTE_ORDER == _PDP_ENDIAN) +# undef BOOST_ENDIAN_LITTLE_WORD +# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE +# endif +# endif +#endif + +/* Built-in byte-swpped big-endian macros. + */ +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ + !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD +# if (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)) || \ + (defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)) || \ + defined(__ARMEB__) || \ + defined(__THUMBEB__) || \ + defined(__AARCH64EB__) || \ + defined(_MIPSEB) || \ + defined(__MIPSEB) || \ + defined(__MIPSEB__) +# undef BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +/* Built-in byte-swpped little-endian macros. + */ +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ + !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD +# if (defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \ + (defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)) || \ + defined(__ARMEL__) || \ + defined(__THUMBEL__) || \ + defined(__AARCH64EL__) || \ + defined(_MIPSEL) || \ + defined(__MIPSEL) || \ + defined(__MIPSEL__) +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +/* Some architectures are strictly one endianess (as opposed + * the current common bi-endianess). + */ +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ + !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD +# include +# if BOOST_ARCH_M68K || \ + BOOST_ARCH_PARISC || \ + BOOST_ARCH_SPARC || \ + BOOST_ARCH_SYS370 || \ + BOOST_ARCH_SYS390 || \ + BOOST_ARCH_Z +# undef BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if BOOST_ARCH_AMD64 || \ + BOOST_ARCH_IA64 || \ + BOOST_ARCH_X86 || \ + BOOST_ARCH_BLACKFIN +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +/* Windows on ARM, if not otherwise detected/specified, is always + * byte-swaped little-endian. + */ +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ + !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD +# if BOOST_ARCH_ARM +# include +# if BOOST_OS_WINDOWS +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# endif +#endif + +#if BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE_AVAILABLE +#endif +#if BOOST_ENDIAN_BIG_WORD +# define BOOST_ENDIAN_BIG_WORD_BYTE_AVAILABLE +#endif +#if BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE_AVAILABLE +#endif +#if BOOST_ENDIAN_LITTLE_WORD +# define BOOST_ENDIAN_LITTLE_WORD_BYTE_AVAILABLE +#endif + +#define BOOST_ENDIAN_BIG_BYTE_NAME "Byte-Swapped Big-Endian" +#define BOOST_ENDIAN_BIG_WORD_NAME "Word-Swapped Big-Endian" +#define BOOST_ENDIAN_LITTLE_BYTE_NAME "Byte-Swapped Little-Endian" +#define BOOST_ENDIAN_LITTLE_WORD_NAME "Word-Swapped Little-Endian" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_BIG_BYTE,BOOST_ENDIAN_BIG_BYTE_NAME) + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_BIG_WORD,BOOST_ENDIAN_BIG_WORD_NAME) + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_LITTLE_BYTE,BOOST_ENDIAN_LITTLE_BYTE_NAME) + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_LITTLE_WORD,BOOST_ENDIAN_LITTLE_WORD_NAME) diff --git a/contrib/src/boost/predef/platform.h b/contrib/src/boost/predef/platform.h new file mode 100644 index 0000000..c0c8706 --- /dev/null +++ b/contrib/src/boost/predef/platform.h @@ -0,0 +1,21 @@ +/* +Copyright Rene Rivera 2013-2015 +Copyright (c) Microsoft Corporation 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_PLATFORM_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_PLATFORM_H +#define BOOST_PREDEF_PLATFORM_H +#endif + +#include +#include +#include +#include +#include +/*#include */ + +#endif diff --git a/contrib/src/boost/predef/platform/mingw.h b/contrib/src/boost/predef/platform/mingw.h new file mode 100644 index 0000000..64c5837 --- /dev/null +++ b/contrib/src/boost/predef/platform/mingw.h @@ -0,0 +1,69 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_MINGW_H +#define BOOST_PREDEF_COMPILER_MINGW_H + +#include +#include + +/*` +[heading `BOOST_PLAT_MINGW`] + +[@http://en.wikipedia.org/wiki/MinGW MinGW] platform. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MINGW32__`] [__predef_detection__]] + [[`__MINGW64__`] [__predef_detection__]] + + [[`__MINGW64_VERSION_MAJOR`, `__MINGW64_VERSION_MINOR`] [V.R.0]] + [[`__MINGW32_VERSION_MAJOR`, `__MINGW32_VERSION_MINOR`] [V.R.0]] + ] + */ + +#define BOOST_PLAT_MINGW BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MINGW32__) || defined(__MINGW64__) +# include <_mingw.h> +# if !defined(BOOST_PLAT_MINGW_DETECTION) && (defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR)) +# define BOOST_PLAT_MINGW_DETECTION \ + BOOST_VERSION_NUMBER(__MINGW64_VERSION_MAJOR,__MINGW64_VERSION_MINOR,0) +# endif +# if !defined(BOOST_PLAT_MINGW_DETECTION) && (defined(__MINGW32_VERSION_MAJOR) && defined(__MINGW32_VERSION_MINOR)) +# define BOOST_PLAT_MINGW_DETECTION \ + BOOST_VERSION_NUMBER(__MINGW32_MAJOR_VERSION,__MINGW32_MINOR_VERSION,0) +# endif +# if !defined(BOOST_PLAT_MINGW_DETECTION) +# define BOOST_PLAT_MINGW_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_PLAT_MINGW_DETECTION +# define BOOST_PLAT_MINGW_AVAILABLE +# if defined(BOOST_PREDEF_DETAIL_PLAT_DETECTED) +# define BOOST_PLAT_MINGW_EMULATED BOOST_PLAT_MINGW_DETECTION +# else +# undef BOOST_PLAT_MINGW +# define BOOST_PLAT_MINGW BOOST_PLAT_MINGW_DETECTION +# endif +# include +#endif + +#define BOOST_PLAT_MINGW_NAME "MinGW" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW,BOOST_PLAT_MINGW_NAME) + +#ifdef BOOST_PLAT_MINGW_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW_EMULATED,BOOST_PLAT_MINGW_NAME) +#endif diff --git a/contrib/src/boost/predef/platform/windows_desktop.h b/contrib/src/boost/predef/platform/windows_desktop.h new file mode 100644 index 0000000..62719b4 --- /dev/null +++ b/contrib/src/boost/predef/platform/windows_desktop.h @@ -0,0 +1,45 @@ +/* +Copyright (c) Microsoft Corporation 2014 +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_PLAT_WINDOWS_DESKTOP_H +#define BOOST_PREDEF_PLAT_WINDOWS_DESKTOP_H + +#include +#include +#include + +/*` +[heading `BOOST_PLAT_WINDOWS_DESKTOP`] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`!WINAPI_FAMILY`] [__predef_detection__]] + [[`WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP`] [__predef_detection__]] + ] + */ + +#define BOOST_PLAT_WINDOWS_DESKTOP BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_OS_WINDOWS && \ + ( !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) ) +# undef BOOST_PLAT_WINDOWS_DESKTOP +# define BOOST_PLAT_WINDOWS_DESKTOP BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_PLAT_WINDOWS_DESKTOP +# define BOOST_PLAT_WINDOWS_DESKTOP_AVAILABLE +# include +#endif + +#define BOOST_PLAT_WINDOWS_DESKTOP_NAME "Windows Desktop" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_DESKTOP,BOOST_PLAT_WINDOWS_DESKTOP_NAME) diff --git a/contrib/src/boost/predef/platform/windows_phone.h b/contrib/src/boost/predef/platform/windows_phone.h new file mode 100644 index 0000000..df583ad --- /dev/null +++ b/contrib/src/boost/predef/platform/windows_phone.h @@ -0,0 +1,43 @@ +/* +Copyright (c) Microsoft Corporation 2014 +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_PLAT_WINDOWS_PHONE_H +#define BOOST_PREDEF_PLAT_WINDOWS_PHONE_H + +#include +#include +#include + +/*` +[heading `BOOST_PLAT_WINDOWS_PHONE`] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP`] [__predef_detection__]] + ] + */ + +#define BOOST_PLAT_WINDOWS_PHONE BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP +# undef BOOST_PLAT_WINDOWS_PHONE +# define BOOST_PLAT_WINDOWS_PHONE BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_PLAT_WINDOWS_PHONE +# define BOOST_PLAT_WINDOWS_PHONE_AVAILABLE +# include +#endif + +#define BOOST_PLAT_WINDOWS_PHONE_NAME "Windows Phone" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_PHONE,BOOST_PLAT_WINDOWS_PHONE_NAME) diff --git a/contrib/src/boost/predef/platform/windows_runtime.h b/contrib/src/boost/predef/platform/windows_runtime.h new file mode 100644 index 0000000..03be514 --- /dev/null +++ b/contrib/src/boost/predef/platform/windows_runtime.h @@ -0,0 +1,45 @@ +/* +Copyright (c) Microsoft Corporation 2014 +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_PLAT_WINDOWS_RUNTIME_H +#define BOOST_PREDEF_PLAT_WINDOWS_RUNTIME_H + +#include +#include +#include + +/*` +[heading `BOOST_PLAT_WINDOWS_RUNTIME`] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`WINAPI_FAMILY == WINAPI_FAMILY_APP`] [__predef_detection__]] + [[`WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP`] [__predef_detection__]] + ] + */ + +#define BOOST_PLAT_WINDOWS_RUNTIME BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_OS_WINDOWS && defined(WINAPI_FAMILY) && \ + ( WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP ) +# undef BOOST_PLAT_WINDOWS_RUNTIME +# define BOOST_PLAT_WINDOWS_RUNTIME BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_PLAT_WINDOWS_RUNTIME +# define BOOST_PLAT_WINDOWS_RUNTIME_AVAILABLE +# include +#endif + +#define BOOST_PLAT_WINDOWS_RUNTIME_NAME "Windows Runtime" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_RUNTIME,BOOST_PLAT_WINDOWS_RUNTIME_NAME) diff --git a/contrib/src/boost/predef/platform/windows_store.h b/contrib/src/boost/predef/platform/windows_store.h new file mode 100644 index 0000000..a34968b --- /dev/null +++ b/contrib/src/boost/predef/platform/windows_store.h @@ -0,0 +1,43 @@ +/* +Copyright (c) Microsoft Corporation 2014 +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_PLAT_WINDOWS_STORE_H +#define BOOST_PREDEF_PLAT_WINDOWS_STORE_H + +#include +#include +#include + +/*` +[heading `BOOST_PLAT_WINDOWS_STORE`] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`WINAPI_FAMILY == WINAPI_FAMILY_APP`] [__predef_detection__]] + ] + */ + +#define BOOST_PLAT_WINDOWS_STORE BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP +# undef BOOST_PLAT_WINDOWS_STORE +# define BOOST_PLAT_WINDOWS_STORE BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_PLAT_WINDOWS_STORE +# define BOOST_PLAT_WINDOWS_STORE_AVAILABLE +# include +#endif + +#define BOOST_PLAT_WINDOWS_STORE_NAME "Windows Store" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_STORE,BOOST_PLAT_WINDOWS_STORE_NAME) diff --git a/contrib/src/boost/predef/version.h b/contrib/src/boost/predef/version.h new file mode 100644 index 0000000..2fcdefa --- /dev/null +++ b/contrib/src/boost/predef/version.h @@ -0,0 +1,15 @@ +/* +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_VERSION_H +#define BOOST_PREDEF_VERSION_H + +#include + +#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,4,0) + +#endif diff --git a/contrib/src/boost/predef/version_number.h b/contrib/src/boost/predef/version_number.h new file mode 100644 index 0000000..3903a36 --- /dev/null +++ b/contrib/src/boost/predef/version_number.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2005, 2008-2013 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_VERSION_NUMBER_H +#define BOOST_PREDEF_VERSION_NUMBER_H + +/*` +[heading `BOOST_VERSION_NUMBER`] + +`` +BOOST_VERSION_NUMBER(major,minor,patch) +`` + +Defines standard version numbers, with these properties: + +* Decimal base whole numbers in the range \[0,1000000000). + The number range is designed to allow for a (2,2,5) triplet. + Which fits within a 32 bit value. +* The `major` number can be in the \[0,99\] range. +* The `minor` number can be in the \[0,99\] range. +* The `patch` number can be in the \[0,99999\] range. +* Values can be specified in any base. As the defined value + is an constant expression. +* Value can be directly used in both preprocessor and compiler + expressions for comparison to other similarly defined values. +* The implementation enforces the individual ranges for the + major, minor, and patch numbers. And values over the ranges + are truncated (modulo). + +*/ +#define BOOST_VERSION_NUMBER(major,minor,patch) \ + ( (((major)%100)*10000000) + (((minor)%100)*100000) + ((patch)%100000) ) + +#define BOOST_VERSION_NUMBER_MAX \ + BOOST_VERSION_NUMBER(99,99,99999) + +#define BOOST_VERSION_NUMBER_ZERO \ + BOOST_VERSION_NUMBER(0,0,0) + +#define BOOST_VERSION_NUMBER_MIN \ + BOOST_VERSION_NUMBER(0,0,1) + +#define BOOST_VERSION_NUMBER_AVAILABLE \ + BOOST_VERSION_NUMBER_MIN + +#define BOOST_VERSION_NUMBER_NOT_AVAILABLE \ + BOOST_VERSION_NUMBER_ZERO + +#endif diff --git a/contrib/src/boost/preprocessor/arithmetic/add.hpp b/contrib/src/boost/preprocessor/arithmetic/add.hpp new file mode 100644 index 0000000..5a29f55 --- /dev/null +++ b/contrib/src/boost/preprocessor/arithmetic/add.hpp @@ -0,0 +1,51 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARITHMETIC_ADD_HPP +# define BOOST_PREPROCESSOR_ARITHMETIC_ADD_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ADD */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ADD(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) +# else +# define BOOST_PP_ADD(x, y) BOOST_PP_ADD_I(x, y) +# define BOOST_PP_ADD_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) +# endif +# +# define BOOST_PP_ADD_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_ADD_O(d, xy) BOOST_PP_ADD_O_I xy +# else +# define BOOST_PP_ADD_O(d, xy) BOOST_PP_ADD_O_I(BOOST_PP_TUPLE_ELEM(2, 0, xy), BOOST_PP_TUPLE_ELEM(2, 1, xy)) +# endif +# +# define BOOST_PP_ADD_O_I(x, y) (BOOST_PP_INC(x), BOOST_PP_DEC(y)) +# +# /* BOOST_PP_ADD_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ADD_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) +# else +# define BOOST_PP_ADD_D(d, x, y) BOOST_PP_ADD_D_I(d, x, y) +# define BOOST_PP_ADD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/arithmetic/dec.hpp b/contrib/src/boost/preprocessor/arithmetic/dec.hpp new file mode 100644 index 0000000..23dd0a3 --- /dev/null +++ b/contrib/src/boost/preprocessor/arithmetic/dec.hpp @@ -0,0 +1,289 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DEC_HPP +# define BOOST_PREPROCESSOR_ARITHMETIC_DEC_HPP +# +# include +# +# /* BOOST_PP_DEC */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_DEC(x) BOOST_PP_DEC_I(x) +# else +# define BOOST_PP_DEC(x) BOOST_PP_DEC_OO((x)) +# define BOOST_PP_DEC_OO(par) BOOST_PP_DEC_I ## par +# endif +# +# define BOOST_PP_DEC_I(x) BOOST_PP_DEC_ ## x +# +# define BOOST_PP_DEC_0 0 +# define BOOST_PP_DEC_1 0 +# define BOOST_PP_DEC_2 1 +# define BOOST_PP_DEC_3 2 +# define BOOST_PP_DEC_4 3 +# define BOOST_PP_DEC_5 4 +# define BOOST_PP_DEC_6 5 +# define BOOST_PP_DEC_7 6 +# define BOOST_PP_DEC_8 7 +# define BOOST_PP_DEC_9 8 +# define BOOST_PP_DEC_10 9 +# define BOOST_PP_DEC_11 10 +# define BOOST_PP_DEC_12 11 +# define BOOST_PP_DEC_13 12 +# define BOOST_PP_DEC_14 13 +# define BOOST_PP_DEC_15 14 +# define BOOST_PP_DEC_16 15 +# define BOOST_PP_DEC_17 16 +# define BOOST_PP_DEC_18 17 +# define BOOST_PP_DEC_19 18 +# define BOOST_PP_DEC_20 19 +# define BOOST_PP_DEC_21 20 +# define BOOST_PP_DEC_22 21 +# define BOOST_PP_DEC_23 22 +# define BOOST_PP_DEC_24 23 +# define BOOST_PP_DEC_25 24 +# define BOOST_PP_DEC_26 25 +# define BOOST_PP_DEC_27 26 +# define BOOST_PP_DEC_28 27 +# define BOOST_PP_DEC_29 28 +# define BOOST_PP_DEC_30 29 +# define BOOST_PP_DEC_31 30 +# define BOOST_PP_DEC_32 31 +# define BOOST_PP_DEC_33 32 +# define BOOST_PP_DEC_34 33 +# define BOOST_PP_DEC_35 34 +# define BOOST_PP_DEC_36 35 +# define BOOST_PP_DEC_37 36 +# define BOOST_PP_DEC_38 37 +# define BOOST_PP_DEC_39 38 +# define BOOST_PP_DEC_40 39 +# define BOOST_PP_DEC_41 40 +# define BOOST_PP_DEC_42 41 +# define BOOST_PP_DEC_43 42 +# define BOOST_PP_DEC_44 43 +# define BOOST_PP_DEC_45 44 +# define BOOST_PP_DEC_46 45 +# define BOOST_PP_DEC_47 46 +# define BOOST_PP_DEC_48 47 +# define BOOST_PP_DEC_49 48 +# define BOOST_PP_DEC_50 49 +# define BOOST_PP_DEC_51 50 +# define BOOST_PP_DEC_52 51 +# define BOOST_PP_DEC_53 52 +# define BOOST_PP_DEC_54 53 +# define BOOST_PP_DEC_55 54 +# define BOOST_PP_DEC_56 55 +# define BOOST_PP_DEC_57 56 +# define BOOST_PP_DEC_58 57 +# define BOOST_PP_DEC_59 58 +# define BOOST_PP_DEC_60 59 +# define BOOST_PP_DEC_61 60 +# define BOOST_PP_DEC_62 61 +# define BOOST_PP_DEC_63 62 +# define BOOST_PP_DEC_64 63 +# define BOOST_PP_DEC_65 64 +# define BOOST_PP_DEC_66 65 +# define BOOST_PP_DEC_67 66 +# define BOOST_PP_DEC_68 67 +# define BOOST_PP_DEC_69 68 +# define BOOST_PP_DEC_70 69 +# define BOOST_PP_DEC_71 70 +# define BOOST_PP_DEC_72 71 +# define BOOST_PP_DEC_73 72 +# define BOOST_PP_DEC_74 73 +# define BOOST_PP_DEC_75 74 +# define BOOST_PP_DEC_76 75 +# define BOOST_PP_DEC_77 76 +# define BOOST_PP_DEC_78 77 +# define BOOST_PP_DEC_79 78 +# define BOOST_PP_DEC_80 79 +# define BOOST_PP_DEC_81 80 +# define BOOST_PP_DEC_82 81 +# define BOOST_PP_DEC_83 82 +# define BOOST_PP_DEC_84 83 +# define BOOST_PP_DEC_85 84 +# define BOOST_PP_DEC_86 85 +# define BOOST_PP_DEC_87 86 +# define BOOST_PP_DEC_88 87 +# define BOOST_PP_DEC_89 88 +# define BOOST_PP_DEC_90 89 +# define BOOST_PP_DEC_91 90 +# define BOOST_PP_DEC_92 91 +# define BOOST_PP_DEC_93 92 +# define BOOST_PP_DEC_94 93 +# define BOOST_PP_DEC_95 94 +# define BOOST_PP_DEC_96 95 +# define BOOST_PP_DEC_97 96 +# define BOOST_PP_DEC_98 97 +# define BOOST_PP_DEC_99 98 +# define BOOST_PP_DEC_100 99 +# define BOOST_PP_DEC_101 100 +# define BOOST_PP_DEC_102 101 +# define BOOST_PP_DEC_103 102 +# define BOOST_PP_DEC_104 103 +# define BOOST_PP_DEC_105 104 +# define BOOST_PP_DEC_106 105 +# define BOOST_PP_DEC_107 106 +# define BOOST_PP_DEC_108 107 +# define BOOST_PP_DEC_109 108 +# define BOOST_PP_DEC_110 109 +# define BOOST_PP_DEC_111 110 +# define BOOST_PP_DEC_112 111 +# define BOOST_PP_DEC_113 112 +# define BOOST_PP_DEC_114 113 +# define BOOST_PP_DEC_115 114 +# define BOOST_PP_DEC_116 115 +# define BOOST_PP_DEC_117 116 +# define BOOST_PP_DEC_118 117 +# define BOOST_PP_DEC_119 118 +# define BOOST_PP_DEC_120 119 +# define BOOST_PP_DEC_121 120 +# define BOOST_PP_DEC_122 121 +# define BOOST_PP_DEC_123 122 +# define BOOST_PP_DEC_124 123 +# define BOOST_PP_DEC_125 124 +# define BOOST_PP_DEC_126 125 +# define BOOST_PP_DEC_127 126 +# define BOOST_PP_DEC_128 127 +# define BOOST_PP_DEC_129 128 +# define BOOST_PP_DEC_130 129 +# define BOOST_PP_DEC_131 130 +# define BOOST_PP_DEC_132 131 +# define BOOST_PP_DEC_133 132 +# define BOOST_PP_DEC_134 133 +# define BOOST_PP_DEC_135 134 +# define BOOST_PP_DEC_136 135 +# define BOOST_PP_DEC_137 136 +# define BOOST_PP_DEC_138 137 +# define BOOST_PP_DEC_139 138 +# define BOOST_PP_DEC_140 139 +# define BOOST_PP_DEC_141 140 +# define BOOST_PP_DEC_142 141 +# define BOOST_PP_DEC_143 142 +# define BOOST_PP_DEC_144 143 +# define BOOST_PP_DEC_145 144 +# define BOOST_PP_DEC_146 145 +# define BOOST_PP_DEC_147 146 +# define BOOST_PP_DEC_148 147 +# define BOOST_PP_DEC_149 148 +# define BOOST_PP_DEC_150 149 +# define BOOST_PP_DEC_151 150 +# define BOOST_PP_DEC_152 151 +# define BOOST_PP_DEC_153 152 +# define BOOST_PP_DEC_154 153 +# define BOOST_PP_DEC_155 154 +# define BOOST_PP_DEC_156 155 +# define BOOST_PP_DEC_157 156 +# define BOOST_PP_DEC_158 157 +# define BOOST_PP_DEC_159 158 +# define BOOST_PP_DEC_160 159 +# define BOOST_PP_DEC_161 160 +# define BOOST_PP_DEC_162 161 +# define BOOST_PP_DEC_163 162 +# define BOOST_PP_DEC_164 163 +# define BOOST_PP_DEC_165 164 +# define BOOST_PP_DEC_166 165 +# define BOOST_PP_DEC_167 166 +# define BOOST_PP_DEC_168 167 +# define BOOST_PP_DEC_169 168 +# define BOOST_PP_DEC_170 169 +# define BOOST_PP_DEC_171 170 +# define BOOST_PP_DEC_172 171 +# define BOOST_PP_DEC_173 172 +# define BOOST_PP_DEC_174 173 +# define BOOST_PP_DEC_175 174 +# define BOOST_PP_DEC_176 175 +# define BOOST_PP_DEC_177 176 +# define BOOST_PP_DEC_178 177 +# define BOOST_PP_DEC_179 178 +# define BOOST_PP_DEC_180 179 +# define BOOST_PP_DEC_181 180 +# define BOOST_PP_DEC_182 181 +# define BOOST_PP_DEC_183 182 +# define BOOST_PP_DEC_184 183 +# define BOOST_PP_DEC_185 184 +# define BOOST_PP_DEC_186 185 +# define BOOST_PP_DEC_187 186 +# define BOOST_PP_DEC_188 187 +# define BOOST_PP_DEC_189 188 +# define BOOST_PP_DEC_190 189 +# define BOOST_PP_DEC_191 190 +# define BOOST_PP_DEC_192 191 +# define BOOST_PP_DEC_193 192 +# define BOOST_PP_DEC_194 193 +# define BOOST_PP_DEC_195 194 +# define BOOST_PP_DEC_196 195 +# define BOOST_PP_DEC_197 196 +# define BOOST_PP_DEC_198 197 +# define BOOST_PP_DEC_199 198 +# define BOOST_PP_DEC_200 199 +# define BOOST_PP_DEC_201 200 +# define BOOST_PP_DEC_202 201 +# define BOOST_PP_DEC_203 202 +# define BOOST_PP_DEC_204 203 +# define BOOST_PP_DEC_205 204 +# define BOOST_PP_DEC_206 205 +# define BOOST_PP_DEC_207 206 +# define BOOST_PP_DEC_208 207 +# define BOOST_PP_DEC_209 208 +# define BOOST_PP_DEC_210 209 +# define BOOST_PP_DEC_211 210 +# define BOOST_PP_DEC_212 211 +# define BOOST_PP_DEC_213 212 +# define BOOST_PP_DEC_214 213 +# define BOOST_PP_DEC_215 214 +# define BOOST_PP_DEC_216 215 +# define BOOST_PP_DEC_217 216 +# define BOOST_PP_DEC_218 217 +# define BOOST_PP_DEC_219 218 +# define BOOST_PP_DEC_220 219 +# define BOOST_PP_DEC_221 220 +# define BOOST_PP_DEC_222 221 +# define BOOST_PP_DEC_223 222 +# define BOOST_PP_DEC_224 223 +# define BOOST_PP_DEC_225 224 +# define BOOST_PP_DEC_226 225 +# define BOOST_PP_DEC_227 226 +# define BOOST_PP_DEC_228 227 +# define BOOST_PP_DEC_229 228 +# define BOOST_PP_DEC_230 229 +# define BOOST_PP_DEC_231 230 +# define BOOST_PP_DEC_232 231 +# define BOOST_PP_DEC_233 232 +# define BOOST_PP_DEC_234 233 +# define BOOST_PP_DEC_235 234 +# define BOOST_PP_DEC_236 235 +# define BOOST_PP_DEC_237 236 +# define BOOST_PP_DEC_238 237 +# define BOOST_PP_DEC_239 238 +# define BOOST_PP_DEC_240 239 +# define BOOST_PP_DEC_241 240 +# define BOOST_PP_DEC_242 241 +# define BOOST_PP_DEC_243 242 +# define BOOST_PP_DEC_244 243 +# define BOOST_PP_DEC_245 244 +# define BOOST_PP_DEC_246 245 +# define BOOST_PP_DEC_247 246 +# define BOOST_PP_DEC_248 247 +# define BOOST_PP_DEC_249 248 +# define BOOST_PP_DEC_250 249 +# define BOOST_PP_DEC_251 250 +# define BOOST_PP_DEC_252 251 +# define BOOST_PP_DEC_253 252 +# define BOOST_PP_DEC_254 253 +# define BOOST_PP_DEC_255 254 +# define BOOST_PP_DEC_256 255 +# define BOOST_PP_DEC_257 256 +# +# endif diff --git a/contrib/src/boost/preprocessor/arithmetic/detail/div_base.hpp b/contrib/src/boost/preprocessor/arithmetic/detail/div_base.hpp new file mode 100644 index 0000000..106632a --- /dev/null +++ b/contrib/src/boost/preprocessor/arithmetic/detail/div_base.hpp @@ -0,0 +1,61 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP +# define BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_DIV_BASE */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_DIV_BASE(x, y) BOOST_PP_WHILE(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y)) +# else +# define BOOST_PP_DIV_BASE(x, y) BOOST_PP_DIV_BASE_I(x, y) +# define BOOST_PP_DIV_BASE_I(x, y) BOOST_PP_WHILE(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y)) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_DIV_BASE_P(d, rxy) BOOST_PP_DIV_BASE_P_IM(d, BOOST_PP_TUPLE_REM_3 rxy) +# define BOOST_PP_DIV_BASE_P_IM(d, im) BOOST_PP_DIV_BASE_P_I(d, im) +# else +# define BOOST_PP_DIV_BASE_P(d, rxy) BOOST_PP_DIV_BASE_P_I(d, BOOST_PP_TUPLE_ELEM(3, 0, rxy), BOOST_PP_TUPLE_ELEM(3, 1, rxy), BOOST_PP_TUPLE_ELEM(3, 2, rxy)) +# endif +# +# define BOOST_PP_DIV_BASE_P_I(d, r, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_DIV_BASE_O(d, rxy) BOOST_PP_DIV_BASE_O_IM(d, BOOST_PP_TUPLE_REM_3 rxy) +# define BOOST_PP_DIV_BASE_O_IM(d, im) BOOST_PP_DIV_BASE_O_I(d, im) +# else +# define BOOST_PP_DIV_BASE_O(d, rxy) BOOST_PP_DIV_BASE_O_I(d, BOOST_PP_TUPLE_ELEM(3, 0, rxy), BOOST_PP_TUPLE_ELEM(3, 1, rxy), BOOST_PP_TUPLE_ELEM(3, 2, rxy)) +# endif +# +# define BOOST_PP_DIV_BASE_O_I(d, r, x, y) (BOOST_PP_INC(r), BOOST_PP_SUB_D(d, x, y), y) +# +# /* BOOST_PP_DIV_BASE_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_DIV_BASE_D(d, x, y) BOOST_PP_WHILE_ ## d(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y)) +# else +# define BOOST_PP_DIV_BASE_D(d, x, y) BOOST_PP_DIV_BASE_D_I(d, x, y) +# define BOOST_PP_DIV_BASE_D_I(d, x, y) BOOST_PP_WHILE_ ## d(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y)) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/arithmetic/inc.hpp b/contrib/src/boost/preprocessor/arithmetic/inc.hpp new file mode 100644 index 0000000..1597ab8 --- /dev/null +++ b/contrib/src/boost/preprocessor/arithmetic/inc.hpp @@ -0,0 +1,288 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARITHMETIC_INC_HPP +# define BOOST_PREPROCESSOR_ARITHMETIC_INC_HPP +# +# include +# +# /* BOOST_PP_INC */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_INC(x) BOOST_PP_INC_I(x) +# else +# define BOOST_PP_INC(x) BOOST_PP_INC_OO((x)) +# define BOOST_PP_INC_OO(par) BOOST_PP_INC_I ## par +# endif +# +# define BOOST_PP_INC_I(x) BOOST_PP_INC_ ## x +# +# define BOOST_PP_INC_0 1 +# define BOOST_PP_INC_1 2 +# define BOOST_PP_INC_2 3 +# define BOOST_PP_INC_3 4 +# define BOOST_PP_INC_4 5 +# define BOOST_PP_INC_5 6 +# define BOOST_PP_INC_6 7 +# define BOOST_PP_INC_7 8 +# define BOOST_PP_INC_8 9 +# define BOOST_PP_INC_9 10 +# define BOOST_PP_INC_10 11 +# define BOOST_PP_INC_11 12 +# define BOOST_PP_INC_12 13 +# define BOOST_PP_INC_13 14 +# define BOOST_PP_INC_14 15 +# define BOOST_PP_INC_15 16 +# define BOOST_PP_INC_16 17 +# define BOOST_PP_INC_17 18 +# define BOOST_PP_INC_18 19 +# define BOOST_PP_INC_19 20 +# define BOOST_PP_INC_20 21 +# define BOOST_PP_INC_21 22 +# define BOOST_PP_INC_22 23 +# define BOOST_PP_INC_23 24 +# define BOOST_PP_INC_24 25 +# define BOOST_PP_INC_25 26 +# define BOOST_PP_INC_26 27 +# define BOOST_PP_INC_27 28 +# define BOOST_PP_INC_28 29 +# define BOOST_PP_INC_29 30 +# define BOOST_PP_INC_30 31 +# define BOOST_PP_INC_31 32 +# define BOOST_PP_INC_32 33 +# define BOOST_PP_INC_33 34 +# define BOOST_PP_INC_34 35 +# define BOOST_PP_INC_35 36 +# define BOOST_PP_INC_36 37 +# define BOOST_PP_INC_37 38 +# define BOOST_PP_INC_38 39 +# define BOOST_PP_INC_39 40 +# define BOOST_PP_INC_40 41 +# define BOOST_PP_INC_41 42 +# define BOOST_PP_INC_42 43 +# define BOOST_PP_INC_43 44 +# define BOOST_PP_INC_44 45 +# define BOOST_PP_INC_45 46 +# define BOOST_PP_INC_46 47 +# define BOOST_PP_INC_47 48 +# define BOOST_PP_INC_48 49 +# define BOOST_PP_INC_49 50 +# define BOOST_PP_INC_50 51 +# define BOOST_PP_INC_51 52 +# define BOOST_PP_INC_52 53 +# define BOOST_PP_INC_53 54 +# define BOOST_PP_INC_54 55 +# define BOOST_PP_INC_55 56 +# define BOOST_PP_INC_56 57 +# define BOOST_PP_INC_57 58 +# define BOOST_PP_INC_58 59 +# define BOOST_PP_INC_59 60 +# define BOOST_PP_INC_60 61 +# define BOOST_PP_INC_61 62 +# define BOOST_PP_INC_62 63 +# define BOOST_PP_INC_63 64 +# define BOOST_PP_INC_64 65 +# define BOOST_PP_INC_65 66 +# define BOOST_PP_INC_66 67 +# define BOOST_PP_INC_67 68 +# define BOOST_PP_INC_68 69 +# define BOOST_PP_INC_69 70 +# define BOOST_PP_INC_70 71 +# define BOOST_PP_INC_71 72 +# define BOOST_PP_INC_72 73 +# define BOOST_PP_INC_73 74 +# define BOOST_PP_INC_74 75 +# define BOOST_PP_INC_75 76 +# define BOOST_PP_INC_76 77 +# define BOOST_PP_INC_77 78 +# define BOOST_PP_INC_78 79 +# define BOOST_PP_INC_79 80 +# define BOOST_PP_INC_80 81 +# define BOOST_PP_INC_81 82 +# define BOOST_PP_INC_82 83 +# define BOOST_PP_INC_83 84 +# define BOOST_PP_INC_84 85 +# define BOOST_PP_INC_85 86 +# define BOOST_PP_INC_86 87 +# define BOOST_PP_INC_87 88 +# define BOOST_PP_INC_88 89 +# define BOOST_PP_INC_89 90 +# define BOOST_PP_INC_90 91 +# define BOOST_PP_INC_91 92 +# define BOOST_PP_INC_92 93 +# define BOOST_PP_INC_93 94 +# define BOOST_PP_INC_94 95 +# define BOOST_PP_INC_95 96 +# define BOOST_PP_INC_96 97 +# define BOOST_PP_INC_97 98 +# define BOOST_PP_INC_98 99 +# define BOOST_PP_INC_99 100 +# define BOOST_PP_INC_100 101 +# define BOOST_PP_INC_101 102 +# define BOOST_PP_INC_102 103 +# define BOOST_PP_INC_103 104 +# define BOOST_PP_INC_104 105 +# define BOOST_PP_INC_105 106 +# define BOOST_PP_INC_106 107 +# define BOOST_PP_INC_107 108 +# define BOOST_PP_INC_108 109 +# define BOOST_PP_INC_109 110 +# define BOOST_PP_INC_110 111 +# define BOOST_PP_INC_111 112 +# define BOOST_PP_INC_112 113 +# define BOOST_PP_INC_113 114 +# define BOOST_PP_INC_114 115 +# define BOOST_PP_INC_115 116 +# define BOOST_PP_INC_116 117 +# define BOOST_PP_INC_117 118 +# define BOOST_PP_INC_118 119 +# define BOOST_PP_INC_119 120 +# define BOOST_PP_INC_120 121 +# define BOOST_PP_INC_121 122 +# define BOOST_PP_INC_122 123 +# define BOOST_PP_INC_123 124 +# define BOOST_PP_INC_124 125 +# define BOOST_PP_INC_125 126 +# define BOOST_PP_INC_126 127 +# define BOOST_PP_INC_127 128 +# define BOOST_PP_INC_128 129 +# define BOOST_PP_INC_129 130 +# define BOOST_PP_INC_130 131 +# define BOOST_PP_INC_131 132 +# define BOOST_PP_INC_132 133 +# define BOOST_PP_INC_133 134 +# define BOOST_PP_INC_134 135 +# define BOOST_PP_INC_135 136 +# define BOOST_PP_INC_136 137 +# define BOOST_PP_INC_137 138 +# define BOOST_PP_INC_138 139 +# define BOOST_PP_INC_139 140 +# define BOOST_PP_INC_140 141 +# define BOOST_PP_INC_141 142 +# define BOOST_PP_INC_142 143 +# define BOOST_PP_INC_143 144 +# define BOOST_PP_INC_144 145 +# define BOOST_PP_INC_145 146 +# define BOOST_PP_INC_146 147 +# define BOOST_PP_INC_147 148 +# define BOOST_PP_INC_148 149 +# define BOOST_PP_INC_149 150 +# define BOOST_PP_INC_150 151 +# define BOOST_PP_INC_151 152 +# define BOOST_PP_INC_152 153 +# define BOOST_PP_INC_153 154 +# define BOOST_PP_INC_154 155 +# define BOOST_PP_INC_155 156 +# define BOOST_PP_INC_156 157 +# define BOOST_PP_INC_157 158 +# define BOOST_PP_INC_158 159 +# define BOOST_PP_INC_159 160 +# define BOOST_PP_INC_160 161 +# define BOOST_PP_INC_161 162 +# define BOOST_PP_INC_162 163 +# define BOOST_PP_INC_163 164 +# define BOOST_PP_INC_164 165 +# define BOOST_PP_INC_165 166 +# define BOOST_PP_INC_166 167 +# define BOOST_PP_INC_167 168 +# define BOOST_PP_INC_168 169 +# define BOOST_PP_INC_169 170 +# define BOOST_PP_INC_170 171 +# define BOOST_PP_INC_171 172 +# define BOOST_PP_INC_172 173 +# define BOOST_PP_INC_173 174 +# define BOOST_PP_INC_174 175 +# define BOOST_PP_INC_175 176 +# define BOOST_PP_INC_176 177 +# define BOOST_PP_INC_177 178 +# define BOOST_PP_INC_178 179 +# define BOOST_PP_INC_179 180 +# define BOOST_PP_INC_180 181 +# define BOOST_PP_INC_181 182 +# define BOOST_PP_INC_182 183 +# define BOOST_PP_INC_183 184 +# define BOOST_PP_INC_184 185 +# define BOOST_PP_INC_185 186 +# define BOOST_PP_INC_186 187 +# define BOOST_PP_INC_187 188 +# define BOOST_PP_INC_188 189 +# define BOOST_PP_INC_189 190 +# define BOOST_PP_INC_190 191 +# define BOOST_PP_INC_191 192 +# define BOOST_PP_INC_192 193 +# define BOOST_PP_INC_193 194 +# define BOOST_PP_INC_194 195 +# define BOOST_PP_INC_195 196 +# define BOOST_PP_INC_196 197 +# define BOOST_PP_INC_197 198 +# define BOOST_PP_INC_198 199 +# define BOOST_PP_INC_199 200 +# define BOOST_PP_INC_200 201 +# define BOOST_PP_INC_201 202 +# define BOOST_PP_INC_202 203 +# define BOOST_PP_INC_203 204 +# define BOOST_PP_INC_204 205 +# define BOOST_PP_INC_205 206 +# define BOOST_PP_INC_206 207 +# define BOOST_PP_INC_207 208 +# define BOOST_PP_INC_208 209 +# define BOOST_PP_INC_209 210 +# define BOOST_PP_INC_210 211 +# define BOOST_PP_INC_211 212 +# define BOOST_PP_INC_212 213 +# define BOOST_PP_INC_213 214 +# define BOOST_PP_INC_214 215 +# define BOOST_PP_INC_215 216 +# define BOOST_PP_INC_216 217 +# define BOOST_PP_INC_217 218 +# define BOOST_PP_INC_218 219 +# define BOOST_PP_INC_219 220 +# define BOOST_PP_INC_220 221 +# define BOOST_PP_INC_221 222 +# define BOOST_PP_INC_222 223 +# define BOOST_PP_INC_223 224 +# define BOOST_PP_INC_224 225 +# define BOOST_PP_INC_225 226 +# define BOOST_PP_INC_226 227 +# define BOOST_PP_INC_227 228 +# define BOOST_PP_INC_228 229 +# define BOOST_PP_INC_229 230 +# define BOOST_PP_INC_230 231 +# define BOOST_PP_INC_231 232 +# define BOOST_PP_INC_232 233 +# define BOOST_PP_INC_233 234 +# define BOOST_PP_INC_234 235 +# define BOOST_PP_INC_235 236 +# define BOOST_PP_INC_236 237 +# define BOOST_PP_INC_237 238 +# define BOOST_PP_INC_238 239 +# define BOOST_PP_INC_239 240 +# define BOOST_PP_INC_240 241 +# define BOOST_PP_INC_241 242 +# define BOOST_PP_INC_242 243 +# define BOOST_PP_INC_243 244 +# define BOOST_PP_INC_244 245 +# define BOOST_PP_INC_245 246 +# define BOOST_PP_INC_246 247 +# define BOOST_PP_INC_247 248 +# define BOOST_PP_INC_248 249 +# define BOOST_PP_INC_249 250 +# define BOOST_PP_INC_250 251 +# define BOOST_PP_INC_251 252 +# define BOOST_PP_INC_252 253 +# define BOOST_PP_INC_253 254 +# define BOOST_PP_INC_254 255 +# define BOOST_PP_INC_255 256 +# define BOOST_PP_INC_256 256 +# +# endif diff --git a/contrib/src/boost/preprocessor/arithmetic/mod.hpp b/contrib/src/boost/preprocessor/arithmetic/mod.hpp new file mode 100644 index 0000000..62489d1 --- /dev/null +++ b/contrib/src/boost/preprocessor/arithmetic/mod.hpp @@ -0,0 +1,39 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARITHMETIC_MOD_HPP +# define BOOST_PREPROCESSOR_ARITHMETIC_MOD_HPP +# +# include +# include +# include +# +# /* BOOST_PP_MOD */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_MOD(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y)) +# else +# define BOOST_PP_MOD(x, y) BOOST_PP_MOD_I(x, y) +# define BOOST_PP_MOD_I(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y)) +# endif +# +# /* BOOST_PP_MOD_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_MOD_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y)) +# else +# define BOOST_PP_MOD_D(d, x, y) BOOST_PP_MOD_D_I(d, x, y) +# define BOOST_PP_MOD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y)) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/arithmetic/sub.hpp b/contrib/src/boost/preprocessor/arithmetic/sub.hpp new file mode 100644 index 0000000..5262cda --- /dev/null +++ b/contrib/src/boost/preprocessor/arithmetic/sub.hpp @@ -0,0 +1,50 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARITHMETIC_SUB_HPP +# define BOOST_PREPROCESSOR_ARITHMETIC_SUB_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_SUB */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SUB(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) +# else +# define BOOST_PP_SUB(x, y) BOOST_PP_SUB_I(x, y) +# define BOOST_PP_SUB_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) +# endif +# +# define BOOST_PP_SUB_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I xy +# else +# define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I(BOOST_PP_TUPLE_ELEM(2, 0, xy), BOOST_PP_TUPLE_ELEM(2, 1, xy)) +# endif +# +# define BOOST_PP_SUB_O_I(x, y) (BOOST_PP_DEC(x), BOOST_PP_DEC(y)) +# +# /* BOOST_PP_SUB_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SUB_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) +# else +# define BOOST_PP_SUB_D(d, x, y) BOOST_PP_SUB_D_I(d, x, y) +# define BOOST_PP_SUB_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/array/data.hpp b/contrib/src/boost/preprocessor/array/data.hpp new file mode 100644 index 0000000..10c926a --- /dev/null +++ b/contrib/src/boost/preprocessor/array/data.hpp @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARRAY_DATA_HPP +# define BOOST_PREPROCESSOR_ARRAY_DATA_HPP +# +# include +# include +# +# /* BOOST_PP_ARRAY_DATA */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ARRAY_DATA(array) BOOST_PP_TUPLE_ELEM(2, 1, array) +# else +# define BOOST_PP_ARRAY_DATA(array) BOOST_PP_ARRAY_DATA_I(array) +# define BOOST_PP_ARRAY_DATA_I(array) BOOST_PP_ARRAY_DATA_II array +# define BOOST_PP_ARRAY_DATA_II(size, data) data +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/array/elem.hpp b/contrib/src/boost/preprocessor/array/elem.hpp new file mode 100644 index 0000000..105ba24 --- /dev/null +++ b/contrib/src/boost/preprocessor/array/elem.hpp @@ -0,0 +1,29 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARRAY_ELEM_HPP +# define BOOST_PREPROCESSOR_ARRAY_ELEM_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_ARRAY_ELEM */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array)) +# else +# define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_ARRAY_ELEM_I(i, array) +# define BOOST_PP_ARRAY_ELEM_I(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array)) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/array/size.hpp b/contrib/src/boost/preprocessor/array/size.hpp new file mode 100644 index 0000000..3f370ee --- /dev/null +++ b/contrib/src/boost/preprocessor/array/size.hpp @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARRAY_SIZE_HPP +# define BOOST_PREPROCESSOR_ARRAY_SIZE_HPP +# +# include +# include +# +# /* BOOST_PP_ARRAY_SIZE */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_TUPLE_ELEM(2, 0, array) +# else +# define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_ARRAY_SIZE_I(array) +# define BOOST_PP_ARRAY_SIZE_I(array) BOOST_PP_ARRAY_SIZE_II array +# define BOOST_PP_ARRAY_SIZE_II(size, data) size +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/cat.hpp b/contrib/src/boost/preprocessor/cat.hpp new file mode 100644 index 0000000..5e52850 --- /dev/null +++ b/contrib/src/boost/preprocessor/cat.hpp @@ -0,0 +1,35 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CAT_HPP +# define BOOST_PREPROCESSOR_CAT_HPP +# +# include +# +# /* BOOST_PP_CAT */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b) +# else +# define BOOST_PP_CAT(a, b) BOOST_PP_CAT_OO((a, b)) +# define BOOST_PP_CAT_OO(par) BOOST_PP_CAT_I ## par +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_CAT_I(a, b) a ## b +# else +# define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b) +# define BOOST_PP_CAT_II(p, res) res +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/comma_if.hpp b/contrib/src/boost/preprocessor/comma_if.hpp new file mode 100644 index 0000000..9ceb079 --- /dev/null +++ b/contrib/src/boost/preprocessor/comma_if.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_COMMA_IF_HPP +# define BOOST_PREPROCESSOR_COMMA_IF_HPP +# +# include +# +# endif diff --git a/contrib/src/boost/preprocessor/comparison/less_equal.hpp b/contrib/src/boost/preprocessor/comparison/less_equal.hpp new file mode 100644 index 0000000..1302d54 --- /dev/null +++ b/contrib/src/boost/preprocessor/comparison/less_equal.hpp @@ -0,0 +1,39 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_COMPARISON_LESS_EQUAL_HPP +# define BOOST_PREPROCESSOR_COMPARISON_LESS_EQUAL_HPP +# +# include +# include +# include +# +# /* BOOST_PP_LESS_EQUAL */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LESS_EQUAL(x, y) BOOST_PP_NOT(BOOST_PP_SUB(x, y)) +# else +# define BOOST_PP_LESS_EQUAL(x, y) BOOST_PP_LESS_EQUAL_I(x, y) +# define BOOST_PP_LESS_EQUAL_I(x, y) BOOST_PP_NOT(BOOST_PP_SUB(x, y)) +# endif +# +# /* BOOST_PP_LESS_EQUAL_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LESS_EQUAL_D(d, x, y) BOOST_PP_NOT(BOOST_PP_SUB_D(d, x, y)) +# else +# define BOOST_PP_LESS_EQUAL_D(d, x, y) BOOST_PP_LESS_EQUAL_D_I(d, x, y) +# define BOOST_PP_LESS_EQUAL_D_I(d, x, y) BOOST_PP_NOT(BOOST_PP_SUB_D(d, x, y)) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/comparison/not_equal.hpp b/contrib/src/boost/preprocessor/comparison/not_equal.hpp new file mode 100644 index 0000000..b4b0eae --- /dev/null +++ b/contrib/src/boost/preprocessor/comparison/not_equal.hpp @@ -0,0 +1,814 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_COMPARISON_NOT_EQUAL_HPP +# define BOOST_PREPROCESSOR_COMPARISON_NOT_EQUAL_HPP +# +# include +# include +# include +# +# /* BOOST_PP_NOT_EQUAL */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_NOT_EQUAL(x, y) BOOST_PP_NOT_EQUAL_I(x, y) +# else +# define BOOST_PP_NOT_EQUAL(x, y) BOOST_PP_NOT_EQUAL_OO((x, y)) +# define BOOST_PP_NOT_EQUAL_OO(par) BOOST_PP_NOT_EQUAL_I ## par +# endif +# +# define BOOST_PP_NOT_EQUAL_I(x, y) BOOST_PP_CAT(BOOST_PP_NOT_EQUAL_CHECK_, BOOST_PP_NOT_EQUAL_ ## x(0, BOOST_PP_NOT_EQUAL_ ## y)) +# +# /* BOOST_PP_NOT_EQUAL_D */ +# +# define BOOST_PP_NOT_EQUAL_D(d, x, y) BOOST_PP_NOT_EQUAL(x, y) +# +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_0(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_1(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_2(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_3(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_4(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_5(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_6(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_7(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_8(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_9(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_10(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_11(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_12(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_13(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_14(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_15(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_16(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_17(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_18(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_19(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_20(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_21(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_22(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_23(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_24(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_25(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_26(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_27(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_28(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_29(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_30(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_31(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_32(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_33(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_34(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_35(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_36(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_37(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_38(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_39(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_40(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_41(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_42(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_43(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_44(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_45(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_46(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_47(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_48(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_49(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_50(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_51(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_52(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_53(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_54(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_55(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_56(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_57(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_58(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_59(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_60(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_61(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_62(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_63(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_64(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_65(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_66(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_67(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_68(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_69(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_70(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_71(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_72(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_73(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_74(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_75(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_76(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_77(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_78(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_79(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_80(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_81(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_82(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_83(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_84(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_85(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_86(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_87(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_88(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_89(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_90(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_91(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_92(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_93(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_94(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_95(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_96(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_97(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_98(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_99(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_100(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_101(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_102(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_103(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_104(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_105(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_106(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_107(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_108(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_109(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_110(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_111(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_112(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_113(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_114(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_115(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_116(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_117(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_118(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_119(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_120(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_121(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_122(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_123(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_124(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_125(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_126(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_127(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_128(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_129(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_130(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_131(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_132(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_133(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_134(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_135(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_136(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_137(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_138(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_139(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_140(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_141(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_142(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_143(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_144(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_145(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_146(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_147(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_148(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_149(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_150(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_151(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_152(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_153(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_154(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_155(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_156(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_157(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_158(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_159(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_160(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_161(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_162(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_163(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_164(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_165(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_166(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_167(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_168(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_169(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_170(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_171(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_172(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_173(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_174(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_175(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_176(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_177(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_178(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_179(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_180(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_181(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_182(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_183(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_184(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_185(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_186(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_187(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_188(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_189(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_190(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_191(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_192(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_193(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_194(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_195(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_196(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_197(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_198(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_199(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_200(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_201(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_202(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_203(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_204(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_205(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_206(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_207(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_208(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_209(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_210(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_211(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_212(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_213(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_214(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_215(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_216(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_217(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_218(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_219(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_220(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_221(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_222(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_223(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_224(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_225(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_226(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_227(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_228(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_229(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_230(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_231(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_232(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_233(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_234(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_235(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_236(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_237(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_238(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_239(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_240(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_241(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_242(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_243(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_244(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_245(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_246(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_247(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_248(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_249(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_250(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_251(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_252(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_253(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_254(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_255(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_256(c, y) 0 +# +#if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_NOT_EQUAL_0(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_1(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_2(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_3(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_4(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_5(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_6(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_7(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_8(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_9(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_10(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_11(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_12(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_13(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_14(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_15(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_16(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_17(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_18(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_19(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_20(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_21(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_22(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_23(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_24(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_25(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_26(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_27(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_28(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_29(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_30(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_31(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_32(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_33(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_34(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_35(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_36(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_37(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_38(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_39(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_40(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_41(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_42(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_43(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_44(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_45(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_46(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_47(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_48(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_49(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_50(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_51(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_52(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_53(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_54(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_55(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_56(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_57(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_58(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_59(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_60(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_61(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_62(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_63(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_64(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_65(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_66(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_67(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_68(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_69(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_70(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_71(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_72(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_73(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_74(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_75(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_76(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_77(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_78(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_79(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_80(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_81(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_82(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_83(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_84(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_85(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_86(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_87(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_88(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_89(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_90(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_91(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_92(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_93(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_94(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_95(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_96(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_97(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_98(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_99(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_100(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_101(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_102(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_103(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_104(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_105(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_106(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_107(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_108(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_109(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_110(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_111(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_112(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_113(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_114(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_115(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_116(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_117(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_118(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_119(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_120(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_121(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_122(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_123(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_124(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_125(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_126(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_127(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_128(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_129(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_130(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_131(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_132(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_133(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_134(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_135(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_136(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_137(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_138(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_139(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_140(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_141(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_142(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_143(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_144(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_145(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_146(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_147(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_148(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_149(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_150(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_151(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_152(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_153(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_154(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_155(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_156(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_157(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_158(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_159(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_160(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_161(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_162(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_163(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_164(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_165(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_166(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_167(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_168(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_169(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_170(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_171(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_172(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_173(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_174(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_175(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_176(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_177(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_178(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_179(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_180(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_181(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_182(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_183(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_184(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_185(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_186(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_187(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_188(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_189(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_190(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_191(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_192(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_193(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_194(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_195(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_196(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_197(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_198(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_199(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_200(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_201(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_202(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_203(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_204(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_205(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_206(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_207(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_208(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_209(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_210(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_211(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_212(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_213(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_214(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_215(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_216(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_217(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_218(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_219(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_220(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_221(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_222(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_223(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_224(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_225(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_226(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_227(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_228(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_229(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_230(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_231(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_232(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_233(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_234(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_235(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_236(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_237(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_238(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_239(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_240(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_241(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_242(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_243(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_244(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_245(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_246(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_247(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_248(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_249(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_250(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_251(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_252(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_253(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_254(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_255(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_256(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# else +# define BOOST_PP_NOT_EQUAL_0(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_1(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_2(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_3(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_4(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_5(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_6(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_7(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_8(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_9(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_10(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_11(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_12(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_13(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_14(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_15(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_16(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_17(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_18(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_19(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_20(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_21(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_22(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_23(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_24(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_25(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_26(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_27(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_28(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_29(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_30(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_31(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_32(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_33(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_34(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_35(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_36(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_37(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_38(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_39(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_40(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_41(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_42(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_43(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_44(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_45(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_46(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_47(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_48(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_49(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_50(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_51(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_52(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_53(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_54(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_55(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_56(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_57(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_58(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_59(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_60(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_61(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_62(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_63(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_64(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_65(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_66(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_67(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_68(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_69(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_70(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_71(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_72(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_73(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_74(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_75(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_76(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_77(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_78(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_79(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_80(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_81(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_82(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_83(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_84(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_85(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_86(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_87(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_88(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_89(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_90(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_91(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_92(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_93(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_94(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_95(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_96(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_97(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_98(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_99(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_100(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_101(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_102(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_103(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_104(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_105(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_106(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_107(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_108(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_109(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_110(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_111(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_112(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_113(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_114(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_115(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_116(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_117(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_118(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_119(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_120(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_121(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_122(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_123(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_124(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_125(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_126(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_127(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_128(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_129(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_130(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_131(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_132(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_133(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_134(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_135(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_136(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_137(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_138(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_139(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_140(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_141(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_142(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_143(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_144(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_145(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_146(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_147(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_148(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_149(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_150(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_151(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_152(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_153(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_154(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_155(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_156(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_157(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_158(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_159(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_160(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_161(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_162(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_163(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_164(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_165(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_166(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_167(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_168(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_169(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_170(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_171(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_172(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_173(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_174(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_175(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_176(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_177(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_178(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_179(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_180(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_181(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_182(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_183(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_184(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_185(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_186(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_187(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_188(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_189(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_190(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_191(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_192(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_193(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_194(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_195(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_196(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_197(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_198(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_199(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_200(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_201(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_202(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_203(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_204(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_205(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_206(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_207(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_208(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_209(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_210(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_211(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_212(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_213(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_214(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_215(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_216(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_217(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_218(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_219(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_220(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_221(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_222(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_223(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_224(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_225(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_226(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_227(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_228(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_229(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_230(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_231(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_232(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_233(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_234(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_235(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_236(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_237(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_238(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_239(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_240(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_241(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_242(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_243(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_244(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_245(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_246(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_247(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_248(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_249(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_250(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_251(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_252(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_253(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_254(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_255(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_256(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/config/config.hpp b/contrib/src/boost/preprocessor/config/config.hpp new file mode 100644 index 0000000..835b283 --- /dev/null +++ b/contrib/src/boost/preprocessor/config/config.hpp @@ -0,0 +1,104 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002-2011. * +# * (C) Copyright Edward Diener 2011. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP +# define BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP +# +# /* BOOST_PP_CONFIG_FLAGS */ +# +# define BOOST_PP_CONFIG_STRICT() 0x0001 +# define BOOST_PP_CONFIG_IDEAL() 0x0002 +# +# define BOOST_PP_CONFIG_MSVC() 0x0004 +# define BOOST_PP_CONFIG_MWCC() 0x0008 +# define BOOST_PP_CONFIG_BCC() 0x0010 +# define BOOST_PP_CONFIG_EDG() 0x0020 +# define BOOST_PP_CONFIG_DMC() 0x0040 +# +# ifndef BOOST_PP_CONFIG_FLAGS +# if defined(__GCCXML__) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) +# elif defined(__WAVE__) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) +# elif defined(__MWERKS__) && __MWERKS__ >= 0x3200 +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) +# elif defined(__EDG__) || defined(__EDG_VERSION__) +# if defined(_MSC_VER) && (defined(__INTELLISENSE__) || __EDG_VERSION__ >= 308) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) +# else +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT()) +# endif +# elif defined(__MWERKS__) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MWCC()) +# elif defined(__DMC__) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_DMC()) +# elif defined(__BORLANDC__) && __BORLANDC__ >= 0x581 +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) +# elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_BCC()) +# elif defined(_MSC_VER) && !defined(__clang__) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) +# else +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) +# endif +# endif +# +# /* BOOST_PP_CONFIG_EXTENDED_LINE_INFO */ +# +# ifndef BOOST_PP_CONFIG_EXTENDED_LINE_INFO +# define BOOST_PP_CONFIG_EXTENDED_LINE_INFO 0 +# endif +# +# /* BOOST_PP_CONFIG_ERRORS */ +# +# ifndef BOOST_PP_CONFIG_ERRORS +# ifdef NDEBUG +# define BOOST_PP_CONFIG_ERRORS 0 +# else +# define BOOST_PP_CONFIG_ERRORS 1 +# endif +# endif +# +# /* BOOST_PP_VARIADICS */ +# +# define BOOST_PP_VARIADICS_MSVC 0 +# if !defined BOOST_PP_VARIADICS +# /* variadic support explicitly disabled for all untested compilers */ +# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5130 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI +# define BOOST_PP_VARIADICS 0 +# /* VC++ (C/C++) */ +# elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__)) && !defined __clang__ +# define BOOST_PP_VARIADICS 1 +# undef BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_VARIADICS_MSVC 1 +# /* Wave (C/C++), GCC (C++) */ +# elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && defined __GXX_EXPERIMENTAL_CXX0X__ && __GXX_EXPERIMENTAL_CXX0X__ +# define BOOST_PP_VARIADICS 1 +# /* EDG-based (C/C++), GCC (C), and unknown (C/C++) */ +# elif !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L +# define BOOST_PP_VARIADICS 1 +# else +# define BOOST_PP_VARIADICS 0 +# endif +# elif !BOOST_PP_VARIADICS + 1 < 2 +# undef BOOST_PP_VARIADICS +# define BOOST_PP_VARIADICS 1 +# if defined _MSC_VER && _MSC_VER >= 1400 && (defined(__INTELLISENSE__) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) +# undef BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_VARIADICS_MSVC 1 +# endif +# else +# undef BOOST_PP_VARIADICS +# define BOOST_PP_VARIADICS 0 +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/control/deduce_d.hpp b/contrib/src/boost/preprocessor/control/deduce_d.hpp new file mode 100644 index 0000000..a0276b0 --- /dev/null +++ b/contrib/src/boost/preprocessor/control/deduce_d.hpp @@ -0,0 +1,22 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP +# define BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP +# +# include +# include +# +# /* BOOST_PP_DEDUCE_D */ +# +# define BOOST_PP_DEDUCE_D() BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256) +# +# endif diff --git a/contrib/src/boost/preprocessor/control/detail/dmc/while.hpp b/contrib/src/boost/preprocessor/control/detail/dmc/while.hpp new file mode 100644 index 0000000..95c3135 --- /dev/null +++ b/contrib/src/boost/preprocessor/control/detail/dmc/while.hpp @@ -0,0 +1,536 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP +# define BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP +# +# include +# include +# include +# +# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_C(BOOST_PP_BOOL(p##(2, s)), p, o, s) +# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_C(BOOST_PP_BOOL(p##(3, s)), p, o, s) +# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_C(BOOST_PP_BOOL(p##(4, s)), p, o, s) +# define BOOST_PP_WHILE_4(p, o, s) BOOST_PP_WHILE_4_C(BOOST_PP_BOOL(p##(5, s)), p, o, s) +# define BOOST_PP_WHILE_5(p, o, s) BOOST_PP_WHILE_5_C(BOOST_PP_BOOL(p##(6, s)), p, o, s) +# define BOOST_PP_WHILE_6(p, o, s) BOOST_PP_WHILE_6_C(BOOST_PP_BOOL(p##(7, s)), p, o, s) +# define BOOST_PP_WHILE_7(p, o, s) BOOST_PP_WHILE_7_C(BOOST_PP_BOOL(p##(8, s)), p, o, s) +# define BOOST_PP_WHILE_8(p, o, s) BOOST_PP_WHILE_8_C(BOOST_PP_BOOL(p##(9, s)), p, o, s) +# define BOOST_PP_WHILE_9(p, o, s) BOOST_PP_WHILE_9_C(BOOST_PP_BOOL(p##(10, s)), p, o, s) +# define BOOST_PP_WHILE_10(p, o, s) BOOST_PP_WHILE_10_C(BOOST_PP_BOOL(p##(11, s)), p, o, s) +# define BOOST_PP_WHILE_11(p, o, s) BOOST_PP_WHILE_11_C(BOOST_PP_BOOL(p##(12, s)), p, o, s) +# define BOOST_PP_WHILE_12(p, o, s) BOOST_PP_WHILE_12_C(BOOST_PP_BOOL(p##(13, s)), p, o, s) +# define BOOST_PP_WHILE_13(p, o, s) BOOST_PP_WHILE_13_C(BOOST_PP_BOOL(p##(14, s)), p, o, s) +# define BOOST_PP_WHILE_14(p, o, s) BOOST_PP_WHILE_14_C(BOOST_PP_BOOL(p##(15, s)), p, o, s) +# define BOOST_PP_WHILE_15(p, o, s) BOOST_PP_WHILE_15_C(BOOST_PP_BOOL(p##(16, s)), p, o, s) +# define BOOST_PP_WHILE_16(p, o, s) BOOST_PP_WHILE_16_C(BOOST_PP_BOOL(p##(17, s)), p, o, s) +# define BOOST_PP_WHILE_17(p, o, s) BOOST_PP_WHILE_17_C(BOOST_PP_BOOL(p##(18, s)), p, o, s) +# define BOOST_PP_WHILE_18(p, o, s) BOOST_PP_WHILE_18_C(BOOST_PP_BOOL(p##(19, s)), p, o, s) +# define BOOST_PP_WHILE_19(p, o, s) BOOST_PP_WHILE_19_C(BOOST_PP_BOOL(p##(20, s)), p, o, s) +# define BOOST_PP_WHILE_20(p, o, s) BOOST_PP_WHILE_20_C(BOOST_PP_BOOL(p##(21, s)), p, o, s) +# define BOOST_PP_WHILE_21(p, o, s) BOOST_PP_WHILE_21_C(BOOST_PP_BOOL(p##(22, s)), p, o, s) +# define BOOST_PP_WHILE_22(p, o, s) BOOST_PP_WHILE_22_C(BOOST_PP_BOOL(p##(23, s)), p, o, s) +# define BOOST_PP_WHILE_23(p, o, s) BOOST_PP_WHILE_23_C(BOOST_PP_BOOL(p##(24, s)), p, o, s) +# define BOOST_PP_WHILE_24(p, o, s) BOOST_PP_WHILE_24_C(BOOST_PP_BOOL(p##(25, s)), p, o, s) +# define BOOST_PP_WHILE_25(p, o, s) BOOST_PP_WHILE_25_C(BOOST_PP_BOOL(p##(26, s)), p, o, s) +# define BOOST_PP_WHILE_26(p, o, s) BOOST_PP_WHILE_26_C(BOOST_PP_BOOL(p##(27, s)), p, o, s) +# define BOOST_PP_WHILE_27(p, o, s) BOOST_PP_WHILE_27_C(BOOST_PP_BOOL(p##(28, s)), p, o, s) +# define BOOST_PP_WHILE_28(p, o, s) BOOST_PP_WHILE_28_C(BOOST_PP_BOOL(p##(29, s)), p, o, s) +# define BOOST_PP_WHILE_29(p, o, s) BOOST_PP_WHILE_29_C(BOOST_PP_BOOL(p##(30, s)), p, o, s) +# define BOOST_PP_WHILE_30(p, o, s) BOOST_PP_WHILE_30_C(BOOST_PP_BOOL(p##(31, s)), p, o, s) +# define BOOST_PP_WHILE_31(p, o, s) BOOST_PP_WHILE_31_C(BOOST_PP_BOOL(p##(32, s)), p, o, s) +# define BOOST_PP_WHILE_32(p, o, s) BOOST_PP_WHILE_32_C(BOOST_PP_BOOL(p##(33, s)), p, o, s) +# define BOOST_PP_WHILE_33(p, o, s) BOOST_PP_WHILE_33_C(BOOST_PP_BOOL(p##(34, s)), p, o, s) +# define BOOST_PP_WHILE_34(p, o, s) BOOST_PP_WHILE_34_C(BOOST_PP_BOOL(p##(35, s)), p, o, s) +# define BOOST_PP_WHILE_35(p, o, s) BOOST_PP_WHILE_35_C(BOOST_PP_BOOL(p##(36, s)), p, o, s) +# define BOOST_PP_WHILE_36(p, o, s) BOOST_PP_WHILE_36_C(BOOST_PP_BOOL(p##(37, s)), p, o, s) +# define BOOST_PP_WHILE_37(p, o, s) BOOST_PP_WHILE_37_C(BOOST_PP_BOOL(p##(38, s)), p, o, s) +# define BOOST_PP_WHILE_38(p, o, s) BOOST_PP_WHILE_38_C(BOOST_PP_BOOL(p##(39, s)), p, o, s) +# define BOOST_PP_WHILE_39(p, o, s) BOOST_PP_WHILE_39_C(BOOST_PP_BOOL(p##(40, s)), p, o, s) +# define BOOST_PP_WHILE_40(p, o, s) BOOST_PP_WHILE_40_C(BOOST_PP_BOOL(p##(41, s)), p, o, s) +# define BOOST_PP_WHILE_41(p, o, s) BOOST_PP_WHILE_41_C(BOOST_PP_BOOL(p##(42, s)), p, o, s) +# define BOOST_PP_WHILE_42(p, o, s) BOOST_PP_WHILE_42_C(BOOST_PP_BOOL(p##(43, s)), p, o, s) +# define BOOST_PP_WHILE_43(p, o, s) BOOST_PP_WHILE_43_C(BOOST_PP_BOOL(p##(44, s)), p, o, s) +# define BOOST_PP_WHILE_44(p, o, s) BOOST_PP_WHILE_44_C(BOOST_PP_BOOL(p##(45, s)), p, o, s) +# define BOOST_PP_WHILE_45(p, o, s) BOOST_PP_WHILE_45_C(BOOST_PP_BOOL(p##(46, s)), p, o, s) +# define BOOST_PP_WHILE_46(p, o, s) BOOST_PP_WHILE_46_C(BOOST_PP_BOOL(p##(47, s)), p, o, s) +# define BOOST_PP_WHILE_47(p, o, s) BOOST_PP_WHILE_47_C(BOOST_PP_BOOL(p##(48, s)), p, o, s) +# define BOOST_PP_WHILE_48(p, o, s) BOOST_PP_WHILE_48_C(BOOST_PP_BOOL(p##(49, s)), p, o, s) +# define BOOST_PP_WHILE_49(p, o, s) BOOST_PP_WHILE_49_C(BOOST_PP_BOOL(p##(50, s)), p, o, s) +# define BOOST_PP_WHILE_50(p, o, s) BOOST_PP_WHILE_50_C(BOOST_PP_BOOL(p##(51, s)), p, o, s) +# define BOOST_PP_WHILE_51(p, o, s) BOOST_PP_WHILE_51_C(BOOST_PP_BOOL(p##(52, s)), p, o, s) +# define BOOST_PP_WHILE_52(p, o, s) BOOST_PP_WHILE_52_C(BOOST_PP_BOOL(p##(53, s)), p, o, s) +# define BOOST_PP_WHILE_53(p, o, s) BOOST_PP_WHILE_53_C(BOOST_PP_BOOL(p##(54, s)), p, o, s) +# define BOOST_PP_WHILE_54(p, o, s) BOOST_PP_WHILE_54_C(BOOST_PP_BOOL(p##(55, s)), p, o, s) +# define BOOST_PP_WHILE_55(p, o, s) BOOST_PP_WHILE_55_C(BOOST_PP_BOOL(p##(56, s)), p, o, s) +# define BOOST_PP_WHILE_56(p, o, s) BOOST_PP_WHILE_56_C(BOOST_PP_BOOL(p##(57, s)), p, o, s) +# define BOOST_PP_WHILE_57(p, o, s) BOOST_PP_WHILE_57_C(BOOST_PP_BOOL(p##(58, s)), p, o, s) +# define BOOST_PP_WHILE_58(p, o, s) BOOST_PP_WHILE_58_C(BOOST_PP_BOOL(p##(59, s)), p, o, s) +# define BOOST_PP_WHILE_59(p, o, s) BOOST_PP_WHILE_59_C(BOOST_PP_BOOL(p##(60, s)), p, o, s) +# define BOOST_PP_WHILE_60(p, o, s) BOOST_PP_WHILE_60_C(BOOST_PP_BOOL(p##(61, s)), p, o, s) +# define BOOST_PP_WHILE_61(p, o, s) BOOST_PP_WHILE_61_C(BOOST_PP_BOOL(p##(62, s)), p, o, s) +# define BOOST_PP_WHILE_62(p, o, s) BOOST_PP_WHILE_62_C(BOOST_PP_BOOL(p##(63, s)), p, o, s) +# define BOOST_PP_WHILE_63(p, o, s) BOOST_PP_WHILE_63_C(BOOST_PP_BOOL(p##(64, s)), p, o, s) +# define BOOST_PP_WHILE_64(p, o, s) BOOST_PP_WHILE_64_C(BOOST_PP_BOOL(p##(65, s)), p, o, s) +# define BOOST_PP_WHILE_65(p, o, s) BOOST_PP_WHILE_65_C(BOOST_PP_BOOL(p##(66, s)), p, o, s) +# define BOOST_PP_WHILE_66(p, o, s) BOOST_PP_WHILE_66_C(BOOST_PP_BOOL(p##(67, s)), p, o, s) +# define BOOST_PP_WHILE_67(p, o, s) BOOST_PP_WHILE_67_C(BOOST_PP_BOOL(p##(68, s)), p, o, s) +# define BOOST_PP_WHILE_68(p, o, s) BOOST_PP_WHILE_68_C(BOOST_PP_BOOL(p##(69, s)), p, o, s) +# define BOOST_PP_WHILE_69(p, o, s) BOOST_PP_WHILE_69_C(BOOST_PP_BOOL(p##(70, s)), p, o, s) +# define BOOST_PP_WHILE_70(p, o, s) BOOST_PP_WHILE_70_C(BOOST_PP_BOOL(p##(71, s)), p, o, s) +# define BOOST_PP_WHILE_71(p, o, s) BOOST_PP_WHILE_71_C(BOOST_PP_BOOL(p##(72, s)), p, o, s) +# define BOOST_PP_WHILE_72(p, o, s) BOOST_PP_WHILE_72_C(BOOST_PP_BOOL(p##(73, s)), p, o, s) +# define BOOST_PP_WHILE_73(p, o, s) BOOST_PP_WHILE_73_C(BOOST_PP_BOOL(p##(74, s)), p, o, s) +# define BOOST_PP_WHILE_74(p, o, s) BOOST_PP_WHILE_74_C(BOOST_PP_BOOL(p##(75, s)), p, o, s) +# define BOOST_PP_WHILE_75(p, o, s) BOOST_PP_WHILE_75_C(BOOST_PP_BOOL(p##(76, s)), p, o, s) +# define BOOST_PP_WHILE_76(p, o, s) BOOST_PP_WHILE_76_C(BOOST_PP_BOOL(p##(77, s)), p, o, s) +# define BOOST_PP_WHILE_77(p, o, s) BOOST_PP_WHILE_77_C(BOOST_PP_BOOL(p##(78, s)), p, o, s) +# define BOOST_PP_WHILE_78(p, o, s) BOOST_PP_WHILE_78_C(BOOST_PP_BOOL(p##(79, s)), p, o, s) +# define BOOST_PP_WHILE_79(p, o, s) BOOST_PP_WHILE_79_C(BOOST_PP_BOOL(p##(80, s)), p, o, s) +# define BOOST_PP_WHILE_80(p, o, s) BOOST_PP_WHILE_80_C(BOOST_PP_BOOL(p##(81, s)), p, o, s) +# define BOOST_PP_WHILE_81(p, o, s) BOOST_PP_WHILE_81_C(BOOST_PP_BOOL(p##(82, s)), p, o, s) +# define BOOST_PP_WHILE_82(p, o, s) BOOST_PP_WHILE_82_C(BOOST_PP_BOOL(p##(83, s)), p, o, s) +# define BOOST_PP_WHILE_83(p, o, s) BOOST_PP_WHILE_83_C(BOOST_PP_BOOL(p##(84, s)), p, o, s) +# define BOOST_PP_WHILE_84(p, o, s) BOOST_PP_WHILE_84_C(BOOST_PP_BOOL(p##(85, s)), p, o, s) +# define BOOST_PP_WHILE_85(p, o, s) BOOST_PP_WHILE_85_C(BOOST_PP_BOOL(p##(86, s)), p, o, s) +# define BOOST_PP_WHILE_86(p, o, s) BOOST_PP_WHILE_86_C(BOOST_PP_BOOL(p##(87, s)), p, o, s) +# define BOOST_PP_WHILE_87(p, o, s) BOOST_PP_WHILE_87_C(BOOST_PP_BOOL(p##(88, s)), p, o, s) +# define BOOST_PP_WHILE_88(p, o, s) BOOST_PP_WHILE_88_C(BOOST_PP_BOOL(p##(89, s)), p, o, s) +# define BOOST_PP_WHILE_89(p, o, s) BOOST_PP_WHILE_89_C(BOOST_PP_BOOL(p##(90, s)), p, o, s) +# define BOOST_PP_WHILE_90(p, o, s) BOOST_PP_WHILE_90_C(BOOST_PP_BOOL(p##(91, s)), p, o, s) +# define BOOST_PP_WHILE_91(p, o, s) BOOST_PP_WHILE_91_C(BOOST_PP_BOOL(p##(92, s)), p, o, s) +# define BOOST_PP_WHILE_92(p, o, s) BOOST_PP_WHILE_92_C(BOOST_PP_BOOL(p##(93, s)), p, o, s) +# define BOOST_PP_WHILE_93(p, o, s) BOOST_PP_WHILE_93_C(BOOST_PP_BOOL(p##(94, s)), p, o, s) +# define BOOST_PP_WHILE_94(p, o, s) BOOST_PP_WHILE_94_C(BOOST_PP_BOOL(p##(95, s)), p, o, s) +# define BOOST_PP_WHILE_95(p, o, s) BOOST_PP_WHILE_95_C(BOOST_PP_BOOL(p##(96, s)), p, o, s) +# define BOOST_PP_WHILE_96(p, o, s) BOOST_PP_WHILE_96_C(BOOST_PP_BOOL(p##(97, s)), p, o, s) +# define BOOST_PP_WHILE_97(p, o, s) BOOST_PP_WHILE_97_C(BOOST_PP_BOOL(p##(98, s)), p, o, s) +# define BOOST_PP_WHILE_98(p, o, s) BOOST_PP_WHILE_98_C(BOOST_PP_BOOL(p##(99, s)), p, o, s) +# define BOOST_PP_WHILE_99(p, o, s) BOOST_PP_WHILE_99_C(BOOST_PP_BOOL(p##(100, s)), p, o, s) +# define BOOST_PP_WHILE_100(p, o, s) BOOST_PP_WHILE_100_C(BOOST_PP_BOOL(p##(101, s)), p, o, s) +# define BOOST_PP_WHILE_101(p, o, s) BOOST_PP_WHILE_101_C(BOOST_PP_BOOL(p##(102, s)), p, o, s) +# define BOOST_PP_WHILE_102(p, o, s) BOOST_PP_WHILE_102_C(BOOST_PP_BOOL(p##(103, s)), p, o, s) +# define BOOST_PP_WHILE_103(p, o, s) BOOST_PP_WHILE_103_C(BOOST_PP_BOOL(p##(104, s)), p, o, s) +# define BOOST_PP_WHILE_104(p, o, s) BOOST_PP_WHILE_104_C(BOOST_PP_BOOL(p##(105, s)), p, o, s) +# define BOOST_PP_WHILE_105(p, o, s) BOOST_PP_WHILE_105_C(BOOST_PP_BOOL(p##(106, s)), p, o, s) +# define BOOST_PP_WHILE_106(p, o, s) BOOST_PP_WHILE_106_C(BOOST_PP_BOOL(p##(107, s)), p, o, s) +# define BOOST_PP_WHILE_107(p, o, s) BOOST_PP_WHILE_107_C(BOOST_PP_BOOL(p##(108, s)), p, o, s) +# define BOOST_PP_WHILE_108(p, o, s) BOOST_PP_WHILE_108_C(BOOST_PP_BOOL(p##(109, s)), p, o, s) +# define BOOST_PP_WHILE_109(p, o, s) BOOST_PP_WHILE_109_C(BOOST_PP_BOOL(p##(110, s)), p, o, s) +# define BOOST_PP_WHILE_110(p, o, s) BOOST_PP_WHILE_110_C(BOOST_PP_BOOL(p##(111, s)), p, o, s) +# define BOOST_PP_WHILE_111(p, o, s) BOOST_PP_WHILE_111_C(BOOST_PP_BOOL(p##(112, s)), p, o, s) +# define BOOST_PP_WHILE_112(p, o, s) BOOST_PP_WHILE_112_C(BOOST_PP_BOOL(p##(113, s)), p, o, s) +# define BOOST_PP_WHILE_113(p, o, s) BOOST_PP_WHILE_113_C(BOOST_PP_BOOL(p##(114, s)), p, o, s) +# define BOOST_PP_WHILE_114(p, o, s) BOOST_PP_WHILE_114_C(BOOST_PP_BOOL(p##(115, s)), p, o, s) +# define BOOST_PP_WHILE_115(p, o, s) BOOST_PP_WHILE_115_C(BOOST_PP_BOOL(p##(116, s)), p, o, s) +# define BOOST_PP_WHILE_116(p, o, s) BOOST_PP_WHILE_116_C(BOOST_PP_BOOL(p##(117, s)), p, o, s) +# define BOOST_PP_WHILE_117(p, o, s) BOOST_PP_WHILE_117_C(BOOST_PP_BOOL(p##(118, s)), p, o, s) +# define BOOST_PP_WHILE_118(p, o, s) BOOST_PP_WHILE_118_C(BOOST_PP_BOOL(p##(119, s)), p, o, s) +# define BOOST_PP_WHILE_119(p, o, s) BOOST_PP_WHILE_119_C(BOOST_PP_BOOL(p##(120, s)), p, o, s) +# define BOOST_PP_WHILE_120(p, o, s) BOOST_PP_WHILE_120_C(BOOST_PP_BOOL(p##(121, s)), p, o, s) +# define BOOST_PP_WHILE_121(p, o, s) BOOST_PP_WHILE_121_C(BOOST_PP_BOOL(p##(122, s)), p, o, s) +# define BOOST_PP_WHILE_122(p, o, s) BOOST_PP_WHILE_122_C(BOOST_PP_BOOL(p##(123, s)), p, o, s) +# define BOOST_PP_WHILE_123(p, o, s) BOOST_PP_WHILE_123_C(BOOST_PP_BOOL(p##(124, s)), p, o, s) +# define BOOST_PP_WHILE_124(p, o, s) BOOST_PP_WHILE_124_C(BOOST_PP_BOOL(p##(125, s)), p, o, s) +# define BOOST_PP_WHILE_125(p, o, s) BOOST_PP_WHILE_125_C(BOOST_PP_BOOL(p##(126, s)), p, o, s) +# define BOOST_PP_WHILE_126(p, o, s) BOOST_PP_WHILE_126_C(BOOST_PP_BOOL(p##(127, s)), p, o, s) +# define BOOST_PP_WHILE_127(p, o, s) BOOST_PP_WHILE_127_C(BOOST_PP_BOOL(p##(128, s)), p, o, s) +# define BOOST_PP_WHILE_128(p, o, s) BOOST_PP_WHILE_128_C(BOOST_PP_BOOL(p##(129, s)), p, o, s) +# define BOOST_PP_WHILE_129(p, o, s) BOOST_PP_WHILE_129_C(BOOST_PP_BOOL(p##(130, s)), p, o, s) +# define BOOST_PP_WHILE_130(p, o, s) BOOST_PP_WHILE_130_C(BOOST_PP_BOOL(p##(131, s)), p, o, s) +# define BOOST_PP_WHILE_131(p, o, s) BOOST_PP_WHILE_131_C(BOOST_PP_BOOL(p##(132, s)), p, o, s) +# define BOOST_PP_WHILE_132(p, o, s) BOOST_PP_WHILE_132_C(BOOST_PP_BOOL(p##(133, s)), p, o, s) +# define BOOST_PP_WHILE_133(p, o, s) BOOST_PP_WHILE_133_C(BOOST_PP_BOOL(p##(134, s)), p, o, s) +# define BOOST_PP_WHILE_134(p, o, s) BOOST_PP_WHILE_134_C(BOOST_PP_BOOL(p##(135, s)), p, o, s) +# define BOOST_PP_WHILE_135(p, o, s) BOOST_PP_WHILE_135_C(BOOST_PP_BOOL(p##(136, s)), p, o, s) +# define BOOST_PP_WHILE_136(p, o, s) BOOST_PP_WHILE_136_C(BOOST_PP_BOOL(p##(137, s)), p, o, s) +# define BOOST_PP_WHILE_137(p, o, s) BOOST_PP_WHILE_137_C(BOOST_PP_BOOL(p##(138, s)), p, o, s) +# define BOOST_PP_WHILE_138(p, o, s) BOOST_PP_WHILE_138_C(BOOST_PP_BOOL(p##(139, s)), p, o, s) +# define BOOST_PP_WHILE_139(p, o, s) BOOST_PP_WHILE_139_C(BOOST_PP_BOOL(p##(140, s)), p, o, s) +# define BOOST_PP_WHILE_140(p, o, s) BOOST_PP_WHILE_140_C(BOOST_PP_BOOL(p##(141, s)), p, o, s) +# define BOOST_PP_WHILE_141(p, o, s) BOOST_PP_WHILE_141_C(BOOST_PP_BOOL(p##(142, s)), p, o, s) +# define BOOST_PP_WHILE_142(p, o, s) BOOST_PP_WHILE_142_C(BOOST_PP_BOOL(p##(143, s)), p, o, s) +# define BOOST_PP_WHILE_143(p, o, s) BOOST_PP_WHILE_143_C(BOOST_PP_BOOL(p##(144, s)), p, o, s) +# define BOOST_PP_WHILE_144(p, o, s) BOOST_PP_WHILE_144_C(BOOST_PP_BOOL(p##(145, s)), p, o, s) +# define BOOST_PP_WHILE_145(p, o, s) BOOST_PP_WHILE_145_C(BOOST_PP_BOOL(p##(146, s)), p, o, s) +# define BOOST_PP_WHILE_146(p, o, s) BOOST_PP_WHILE_146_C(BOOST_PP_BOOL(p##(147, s)), p, o, s) +# define BOOST_PP_WHILE_147(p, o, s) BOOST_PP_WHILE_147_C(BOOST_PP_BOOL(p##(148, s)), p, o, s) +# define BOOST_PP_WHILE_148(p, o, s) BOOST_PP_WHILE_148_C(BOOST_PP_BOOL(p##(149, s)), p, o, s) +# define BOOST_PP_WHILE_149(p, o, s) BOOST_PP_WHILE_149_C(BOOST_PP_BOOL(p##(150, s)), p, o, s) +# define BOOST_PP_WHILE_150(p, o, s) BOOST_PP_WHILE_150_C(BOOST_PP_BOOL(p##(151, s)), p, o, s) +# define BOOST_PP_WHILE_151(p, o, s) BOOST_PP_WHILE_151_C(BOOST_PP_BOOL(p##(152, s)), p, o, s) +# define BOOST_PP_WHILE_152(p, o, s) BOOST_PP_WHILE_152_C(BOOST_PP_BOOL(p##(153, s)), p, o, s) +# define BOOST_PP_WHILE_153(p, o, s) BOOST_PP_WHILE_153_C(BOOST_PP_BOOL(p##(154, s)), p, o, s) +# define BOOST_PP_WHILE_154(p, o, s) BOOST_PP_WHILE_154_C(BOOST_PP_BOOL(p##(155, s)), p, o, s) +# define BOOST_PP_WHILE_155(p, o, s) BOOST_PP_WHILE_155_C(BOOST_PP_BOOL(p##(156, s)), p, o, s) +# define BOOST_PP_WHILE_156(p, o, s) BOOST_PP_WHILE_156_C(BOOST_PP_BOOL(p##(157, s)), p, o, s) +# define BOOST_PP_WHILE_157(p, o, s) BOOST_PP_WHILE_157_C(BOOST_PP_BOOL(p##(158, s)), p, o, s) +# define BOOST_PP_WHILE_158(p, o, s) BOOST_PP_WHILE_158_C(BOOST_PP_BOOL(p##(159, s)), p, o, s) +# define BOOST_PP_WHILE_159(p, o, s) BOOST_PP_WHILE_159_C(BOOST_PP_BOOL(p##(160, s)), p, o, s) +# define BOOST_PP_WHILE_160(p, o, s) BOOST_PP_WHILE_160_C(BOOST_PP_BOOL(p##(161, s)), p, o, s) +# define BOOST_PP_WHILE_161(p, o, s) BOOST_PP_WHILE_161_C(BOOST_PP_BOOL(p##(162, s)), p, o, s) +# define BOOST_PP_WHILE_162(p, o, s) BOOST_PP_WHILE_162_C(BOOST_PP_BOOL(p##(163, s)), p, o, s) +# define BOOST_PP_WHILE_163(p, o, s) BOOST_PP_WHILE_163_C(BOOST_PP_BOOL(p##(164, s)), p, o, s) +# define BOOST_PP_WHILE_164(p, o, s) BOOST_PP_WHILE_164_C(BOOST_PP_BOOL(p##(165, s)), p, o, s) +# define BOOST_PP_WHILE_165(p, o, s) BOOST_PP_WHILE_165_C(BOOST_PP_BOOL(p##(166, s)), p, o, s) +# define BOOST_PP_WHILE_166(p, o, s) BOOST_PP_WHILE_166_C(BOOST_PP_BOOL(p##(167, s)), p, o, s) +# define BOOST_PP_WHILE_167(p, o, s) BOOST_PP_WHILE_167_C(BOOST_PP_BOOL(p##(168, s)), p, o, s) +# define BOOST_PP_WHILE_168(p, o, s) BOOST_PP_WHILE_168_C(BOOST_PP_BOOL(p##(169, s)), p, o, s) +# define BOOST_PP_WHILE_169(p, o, s) BOOST_PP_WHILE_169_C(BOOST_PP_BOOL(p##(170, s)), p, o, s) +# define BOOST_PP_WHILE_170(p, o, s) BOOST_PP_WHILE_170_C(BOOST_PP_BOOL(p##(171, s)), p, o, s) +# define BOOST_PP_WHILE_171(p, o, s) BOOST_PP_WHILE_171_C(BOOST_PP_BOOL(p##(172, s)), p, o, s) +# define BOOST_PP_WHILE_172(p, o, s) BOOST_PP_WHILE_172_C(BOOST_PP_BOOL(p##(173, s)), p, o, s) +# define BOOST_PP_WHILE_173(p, o, s) BOOST_PP_WHILE_173_C(BOOST_PP_BOOL(p##(174, s)), p, o, s) +# define BOOST_PP_WHILE_174(p, o, s) BOOST_PP_WHILE_174_C(BOOST_PP_BOOL(p##(175, s)), p, o, s) +# define BOOST_PP_WHILE_175(p, o, s) BOOST_PP_WHILE_175_C(BOOST_PP_BOOL(p##(176, s)), p, o, s) +# define BOOST_PP_WHILE_176(p, o, s) BOOST_PP_WHILE_176_C(BOOST_PP_BOOL(p##(177, s)), p, o, s) +# define BOOST_PP_WHILE_177(p, o, s) BOOST_PP_WHILE_177_C(BOOST_PP_BOOL(p##(178, s)), p, o, s) +# define BOOST_PP_WHILE_178(p, o, s) BOOST_PP_WHILE_178_C(BOOST_PP_BOOL(p##(179, s)), p, o, s) +# define BOOST_PP_WHILE_179(p, o, s) BOOST_PP_WHILE_179_C(BOOST_PP_BOOL(p##(180, s)), p, o, s) +# define BOOST_PP_WHILE_180(p, o, s) BOOST_PP_WHILE_180_C(BOOST_PP_BOOL(p##(181, s)), p, o, s) +# define BOOST_PP_WHILE_181(p, o, s) BOOST_PP_WHILE_181_C(BOOST_PP_BOOL(p##(182, s)), p, o, s) +# define BOOST_PP_WHILE_182(p, o, s) BOOST_PP_WHILE_182_C(BOOST_PP_BOOL(p##(183, s)), p, o, s) +# define BOOST_PP_WHILE_183(p, o, s) BOOST_PP_WHILE_183_C(BOOST_PP_BOOL(p##(184, s)), p, o, s) +# define BOOST_PP_WHILE_184(p, o, s) BOOST_PP_WHILE_184_C(BOOST_PP_BOOL(p##(185, s)), p, o, s) +# define BOOST_PP_WHILE_185(p, o, s) BOOST_PP_WHILE_185_C(BOOST_PP_BOOL(p##(186, s)), p, o, s) +# define BOOST_PP_WHILE_186(p, o, s) BOOST_PP_WHILE_186_C(BOOST_PP_BOOL(p##(187, s)), p, o, s) +# define BOOST_PP_WHILE_187(p, o, s) BOOST_PP_WHILE_187_C(BOOST_PP_BOOL(p##(188, s)), p, o, s) +# define BOOST_PP_WHILE_188(p, o, s) BOOST_PP_WHILE_188_C(BOOST_PP_BOOL(p##(189, s)), p, o, s) +# define BOOST_PP_WHILE_189(p, o, s) BOOST_PP_WHILE_189_C(BOOST_PP_BOOL(p##(190, s)), p, o, s) +# define BOOST_PP_WHILE_190(p, o, s) BOOST_PP_WHILE_190_C(BOOST_PP_BOOL(p##(191, s)), p, o, s) +# define BOOST_PP_WHILE_191(p, o, s) BOOST_PP_WHILE_191_C(BOOST_PP_BOOL(p##(192, s)), p, o, s) +# define BOOST_PP_WHILE_192(p, o, s) BOOST_PP_WHILE_192_C(BOOST_PP_BOOL(p##(193, s)), p, o, s) +# define BOOST_PP_WHILE_193(p, o, s) BOOST_PP_WHILE_193_C(BOOST_PP_BOOL(p##(194, s)), p, o, s) +# define BOOST_PP_WHILE_194(p, o, s) BOOST_PP_WHILE_194_C(BOOST_PP_BOOL(p##(195, s)), p, o, s) +# define BOOST_PP_WHILE_195(p, o, s) BOOST_PP_WHILE_195_C(BOOST_PP_BOOL(p##(196, s)), p, o, s) +# define BOOST_PP_WHILE_196(p, o, s) BOOST_PP_WHILE_196_C(BOOST_PP_BOOL(p##(197, s)), p, o, s) +# define BOOST_PP_WHILE_197(p, o, s) BOOST_PP_WHILE_197_C(BOOST_PP_BOOL(p##(198, s)), p, o, s) +# define BOOST_PP_WHILE_198(p, o, s) BOOST_PP_WHILE_198_C(BOOST_PP_BOOL(p##(199, s)), p, o, s) +# define BOOST_PP_WHILE_199(p, o, s) BOOST_PP_WHILE_199_C(BOOST_PP_BOOL(p##(200, s)), p, o, s) +# define BOOST_PP_WHILE_200(p, o, s) BOOST_PP_WHILE_200_C(BOOST_PP_BOOL(p##(201, s)), p, o, s) +# define BOOST_PP_WHILE_201(p, o, s) BOOST_PP_WHILE_201_C(BOOST_PP_BOOL(p##(202, s)), p, o, s) +# define BOOST_PP_WHILE_202(p, o, s) BOOST_PP_WHILE_202_C(BOOST_PP_BOOL(p##(203, s)), p, o, s) +# define BOOST_PP_WHILE_203(p, o, s) BOOST_PP_WHILE_203_C(BOOST_PP_BOOL(p##(204, s)), p, o, s) +# define BOOST_PP_WHILE_204(p, o, s) BOOST_PP_WHILE_204_C(BOOST_PP_BOOL(p##(205, s)), p, o, s) +# define BOOST_PP_WHILE_205(p, o, s) BOOST_PP_WHILE_205_C(BOOST_PP_BOOL(p##(206, s)), p, o, s) +# define BOOST_PP_WHILE_206(p, o, s) BOOST_PP_WHILE_206_C(BOOST_PP_BOOL(p##(207, s)), p, o, s) +# define BOOST_PP_WHILE_207(p, o, s) BOOST_PP_WHILE_207_C(BOOST_PP_BOOL(p##(208, s)), p, o, s) +# define BOOST_PP_WHILE_208(p, o, s) BOOST_PP_WHILE_208_C(BOOST_PP_BOOL(p##(209, s)), p, o, s) +# define BOOST_PP_WHILE_209(p, o, s) BOOST_PP_WHILE_209_C(BOOST_PP_BOOL(p##(210, s)), p, o, s) +# define BOOST_PP_WHILE_210(p, o, s) BOOST_PP_WHILE_210_C(BOOST_PP_BOOL(p##(211, s)), p, o, s) +# define BOOST_PP_WHILE_211(p, o, s) BOOST_PP_WHILE_211_C(BOOST_PP_BOOL(p##(212, s)), p, o, s) +# define BOOST_PP_WHILE_212(p, o, s) BOOST_PP_WHILE_212_C(BOOST_PP_BOOL(p##(213, s)), p, o, s) +# define BOOST_PP_WHILE_213(p, o, s) BOOST_PP_WHILE_213_C(BOOST_PP_BOOL(p##(214, s)), p, o, s) +# define BOOST_PP_WHILE_214(p, o, s) BOOST_PP_WHILE_214_C(BOOST_PP_BOOL(p##(215, s)), p, o, s) +# define BOOST_PP_WHILE_215(p, o, s) BOOST_PP_WHILE_215_C(BOOST_PP_BOOL(p##(216, s)), p, o, s) +# define BOOST_PP_WHILE_216(p, o, s) BOOST_PP_WHILE_216_C(BOOST_PP_BOOL(p##(217, s)), p, o, s) +# define BOOST_PP_WHILE_217(p, o, s) BOOST_PP_WHILE_217_C(BOOST_PP_BOOL(p##(218, s)), p, o, s) +# define BOOST_PP_WHILE_218(p, o, s) BOOST_PP_WHILE_218_C(BOOST_PP_BOOL(p##(219, s)), p, o, s) +# define BOOST_PP_WHILE_219(p, o, s) BOOST_PP_WHILE_219_C(BOOST_PP_BOOL(p##(220, s)), p, o, s) +# define BOOST_PP_WHILE_220(p, o, s) BOOST_PP_WHILE_220_C(BOOST_PP_BOOL(p##(221, s)), p, o, s) +# define BOOST_PP_WHILE_221(p, o, s) BOOST_PP_WHILE_221_C(BOOST_PP_BOOL(p##(222, s)), p, o, s) +# define BOOST_PP_WHILE_222(p, o, s) BOOST_PP_WHILE_222_C(BOOST_PP_BOOL(p##(223, s)), p, o, s) +# define BOOST_PP_WHILE_223(p, o, s) BOOST_PP_WHILE_223_C(BOOST_PP_BOOL(p##(224, s)), p, o, s) +# define BOOST_PP_WHILE_224(p, o, s) BOOST_PP_WHILE_224_C(BOOST_PP_BOOL(p##(225, s)), p, o, s) +# define BOOST_PP_WHILE_225(p, o, s) BOOST_PP_WHILE_225_C(BOOST_PP_BOOL(p##(226, s)), p, o, s) +# define BOOST_PP_WHILE_226(p, o, s) BOOST_PP_WHILE_226_C(BOOST_PP_BOOL(p##(227, s)), p, o, s) +# define BOOST_PP_WHILE_227(p, o, s) BOOST_PP_WHILE_227_C(BOOST_PP_BOOL(p##(228, s)), p, o, s) +# define BOOST_PP_WHILE_228(p, o, s) BOOST_PP_WHILE_228_C(BOOST_PP_BOOL(p##(229, s)), p, o, s) +# define BOOST_PP_WHILE_229(p, o, s) BOOST_PP_WHILE_229_C(BOOST_PP_BOOL(p##(230, s)), p, o, s) +# define BOOST_PP_WHILE_230(p, o, s) BOOST_PP_WHILE_230_C(BOOST_PP_BOOL(p##(231, s)), p, o, s) +# define BOOST_PP_WHILE_231(p, o, s) BOOST_PP_WHILE_231_C(BOOST_PP_BOOL(p##(232, s)), p, o, s) +# define BOOST_PP_WHILE_232(p, o, s) BOOST_PP_WHILE_232_C(BOOST_PP_BOOL(p##(233, s)), p, o, s) +# define BOOST_PP_WHILE_233(p, o, s) BOOST_PP_WHILE_233_C(BOOST_PP_BOOL(p##(234, s)), p, o, s) +# define BOOST_PP_WHILE_234(p, o, s) BOOST_PP_WHILE_234_C(BOOST_PP_BOOL(p##(235, s)), p, o, s) +# define BOOST_PP_WHILE_235(p, o, s) BOOST_PP_WHILE_235_C(BOOST_PP_BOOL(p##(236, s)), p, o, s) +# define BOOST_PP_WHILE_236(p, o, s) BOOST_PP_WHILE_236_C(BOOST_PP_BOOL(p##(237, s)), p, o, s) +# define BOOST_PP_WHILE_237(p, o, s) BOOST_PP_WHILE_237_C(BOOST_PP_BOOL(p##(238, s)), p, o, s) +# define BOOST_PP_WHILE_238(p, o, s) BOOST_PP_WHILE_238_C(BOOST_PP_BOOL(p##(239, s)), p, o, s) +# define BOOST_PP_WHILE_239(p, o, s) BOOST_PP_WHILE_239_C(BOOST_PP_BOOL(p##(240, s)), p, o, s) +# define BOOST_PP_WHILE_240(p, o, s) BOOST_PP_WHILE_240_C(BOOST_PP_BOOL(p##(241, s)), p, o, s) +# define BOOST_PP_WHILE_241(p, o, s) BOOST_PP_WHILE_241_C(BOOST_PP_BOOL(p##(242, s)), p, o, s) +# define BOOST_PP_WHILE_242(p, o, s) BOOST_PP_WHILE_242_C(BOOST_PP_BOOL(p##(243, s)), p, o, s) +# define BOOST_PP_WHILE_243(p, o, s) BOOST_PP_WHILE_243_C(BOOST_PP_BOOL(p##(244, s)), p, o, s) +# define BOOST_PP_WHILE_244(p, o, s) BOOST_PP_WHILE_244_C(BOOST_PP_BOOL(p##(245, s)), p, o, s) +# define BOOST_PP_WHILE_245(p, o, s) BOOST_PP_WHILE_245_C(BOOST_PP_BOOL(p##(246, s)), p, o, s) +# define BOOST_PP_WHILE_246(p, o, s) BOOST_PP_WHILE_246_C(BOOST_PP_BOOL(p##(247, s)), p, o, s) +# define BOOST_PP_WHILE_247(p, o, s) BOOST_PP_WHILE_247_C(BOOST_PP_BOOL(p##(248, s)), p, o, s) +# define BOOST_PP_WHILE_248(p, o, s) BOOST_PP_WHILE_248_C(BOOST_PP_BOOL(p##(249, s)), p, o, s) +# define BOOST_PP_WHILE_249(p, o, s) BOOST_PP_WHILE_249_C(BOOST_PP_BOOL(p##(250, s)), p, o, s) +# define BOOST_PP_WHILE_250(p, o, s) BOOST_PP_WHILE_250_C(BOOST_PP_BOOL(p##(251, s)), p, o, s) +# define BOOST_PP_WHILE_251(p, o, s) BOOST_PP_WHILE_251_C(BOOST_PP_BOOL(p##(252, s)), p, o, s) +# define BOOST_PP_WHILE_252(p, o, s) BOOST_PP_WHILE_252_C(BOOST_PP_BOOL(p##(253, s)), p, o, s) +# define BOOST_PP_WHILE_253(p, o, s) BOOST_PP_WHILE_253_C(BOOST_PP_BOOL(p##(254, s)), p, o, s) +# define BOOST_PP_WHILE_254(p, o, s) BOOST_PP_WHILE_254_C(BOOST_PP_BOOL(p##(255, s)), p, o, s) +# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_C(BOOST_PP_BOOL(p##(256, s)), p, o, s) +# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_C(BOOST_PP_BOOL(p##(257, s)), p, o, s) +# +# define BOOST_PP_WHILE_1_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_2, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(2, s)) +# define BOOST_PP_WHILE_2_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_3, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(3, s)) +# define BOOST_PP_WHILE_3_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_4, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(4, s)) +# define BOOST_PP_WHILE_4_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_5, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(5, s)) +# define BOOST_PP_WHILE_5_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_6, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(6, s)) +# define BOOST_PP_WHILE_6_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_7, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(7, s)) +# define BOOST_PP_WHILE_7_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_8, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(8, s)) +# define BOOST_PP_WHILE_8_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_9, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(9, s)) +# define BOOST_PP_WHILE_9_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_10, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(10, s)) +# define BOOST_PP_WHILE_10_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_11, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(11, s)) +# define BOOST_PP_WHILE_11_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_12, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(12, s)) +# define BOOST_PP_WHILE_12_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_13, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(13, s)) +# define BOOST_PP_WHILE_13_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_14, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(14, s)) +# define BOOST_PP_WHILE_14_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_15, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(15, s)) +# define BOOST_PP_WHILE_15_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_16, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(16, s)) +# define BOOST_PP_WHILE_16_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_17, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(17, s)) +# define BOOST_PP_WHILE_17_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_18, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(18, s)) +# define BOOST_PP_WHILE_18_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_19, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(19, s)) +# define BOOST_PP_WHILE_19_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_20, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(20, s)) +# define BOOST_PP_WHILE_20_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_21, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(21, s)) +# define BOOST_PP_WHILE_21_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_22, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(22, s)) +# define BOOST_PP_WHILE_22_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_23, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(23, s)) +# define BOOST_PP_WHILE_23_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_24, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(24, s)) +# define BOOST_PP_WHILE_24_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_25, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(25, s)) +# define BOOST_PP_WHILE_25_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_26, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(26, s)) +# define BOOST_PP_WHILE_26_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_27, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(27, s)) +# define BOOST_PP_WHILE_27_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_28, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(28, s)) +# define BOOST_PP_WHILE_28_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_29, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(29, s)) +# define BOOST_PP_WHILE_29_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_30, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(30, s)) +# define BOOST_PP_WHILE_30_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_31, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(31, s)) +# define BOOST_PP_WHILE_31_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_32, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(32, s)) +# define BOOST_PP_WHILE_32_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_33, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(33, s)) +# define BOOST_PP_WHILE_33_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_34, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(34, s)) +# define BOOST_PP_WHILE_34_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_35, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(35, s)) +# define BOOST_PP_WHILE_35_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_36, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(36, s)) +# define BOOST_PP_WHILE_36_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_37, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(37, s)) +# define BOOST_PP_WHILE_37_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_38, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(38, s)) +# define BOOST_PP_WHILE_38_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_39, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(39, s)) +# define BOOST_PP_WHILE_39_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_40, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(40, s)) +# define BOOST_PP_WHILE_40_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_41, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(41, s)) +# define BOOST_PP_WHILE_41_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_42, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(42, s)) +# define BOOST_PP_WHILE_42_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_43, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(43, s)) +# define BOOST_PP_WHILE_43_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_44, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(44, s)) +# define BOOST_PP_WHILE_44_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_45, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(45, s)) +# define BOOST_PP_WHILE_45_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_46, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(46, s)) +# define BOOST_PP_WHILE_46_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_47, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(47, s)) +# define BOOST_PP_WHILE_47_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_48, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(48, s)) +# define BOOST_PP_WHILE_48_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_49, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(49, s)) +# define BOOST_PP_WHILE_49_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_50, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(50, s)) +# define BOOST_PP_WHILE_50_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_51, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(51, s)) +# define BOOST_PP_WHILE_51_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_52, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(52, s)) +# define BOOST_PP_WHILE_52_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_53, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(53, s)) +# define BOOST_PP_WHILE_53_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_54, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(54, s)) +# define BOOST_PP_WHILE_54_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_55, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(55, s)) +# define BOOST_PP_WHILE_55_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_56, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(56, s)) +# define BOOST_PP_WHILE_56_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_57, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(57, s)) +# define BOOST_PP_WHILE_57_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_58, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(58, s)) +# define BOOST_PP_WHILE_58_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_59, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(59, s)) +# define BOOST_PP_WHILE_59_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_60, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(60, s)) +# define BOOST_PP_WHILE_60_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_61, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(61, s)) +# define BOOST_PP_WHILE_61_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_62, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(62, s)) +# define BOOST_PP_WHILE_62_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_63, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(63, s)) +# define BOOST_PP_WHILE_63_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_64, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(64, s)) +# define BOOST_PP_WHILE_64_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_65, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(65, s)) +# define BOOST_PP_WHILE_65_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_66, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(66, s)) +# define BOOST_PP_WHILE_66_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_67, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(67, s)) +# define BOOST_PP_WHILE_67_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_68, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(68, s)) +# define BOOST_PP_WHILE_68_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_69, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(69, s)) +# define BOOST_PP_WHILE_69_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_70, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(70, s)) +# define BOOST_PP_WHILE_70_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_71, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(71, s)) +# define BOOST_PP_WHILE_71_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_72, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(72, s)) +# define BOOST_PP_WHILE_72_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_73, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(73, s)) +# define BOOST_PP_WHILE_73_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_74, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(74, s)) +# define BOOST_PP_WHILE_74_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_75, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(75, s)) +# define BOOST_PP_WHILE_75_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_76, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(76, s)) +# define BOOST_PP_WHILE_76_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_77, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(77, s)) +# define BOOST_PP_WHILE_77_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_78, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(78, s)) +# define BOOST_PP_WHILE_78_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_79, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(79, s)) +# define BOOST_PP_WHILE_79_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_80, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(80, s)) +# define BOOST_PP_WHILE_80_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_81, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(81, s)) +# define BOOST_PP_WHILE_81_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_82, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(82, s)) +# define BOOST_PP_WHILE_82_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_83, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(83, s)) +# define BOOST_PP_WHILE_83_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_84, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(84, s)) +# define BOOST_PP_WHILE_84_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_85, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(85, s)) +# define BOOST_PP_WHILE_85_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_86, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(86, s)) +# define BOOST_PP_WHILE_86_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_87, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(87, s)) +# define BOOST_PP_WHILE_87_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_88, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(88, s)) +# define BOOST_PP_WHILE_88_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_89, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(89, s)) +# define BOOST_PP_WHILE_89_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_90, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(90, s)) +# define BOOST_PP_WHILE_90_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_91, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(91, s)) +# define BOOST_PP_WHILE_91_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_92, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(92, s)) +# define BOOST_PP_WHILE_92_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_93, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(93, s)) +# define BOOST_PP_WHILE_93_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_94, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(94, s)) +# define BOOST_PP_WHILE_94_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_95, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(95, s)) +# define BOOST_PP_WHILE_95_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_96, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(96, s)) +# define BOOST_PP_WHILE_96_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_97, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(97, s)) +# define BOOST_PP_WHILE_97_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_98, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(98, s)) +# define BOOST_PP_WHILE_98_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_99, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(99, s)) +# define BOOST_PP_WHILE_99_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_100, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(100, s)) +# define BOOST_PP_WHILE_100_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_101, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(101, s)) +# define BOOST_PP_WHILE_101_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_102, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(102, s)) +# define BOOST_PP_WHILE_102_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_103, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(103, s)) +# define BOOST_PP_WHILE_103_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_104, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(104, s)) +# define BOOST_PP_WHILE_104_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_105, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(105, s)) +# define BOOST_PP_WHILE_105_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_106, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(106, s)) +# define BOOST_PP_WHILE_106_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_107, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(107, s)) +# define BOOST_PP_WHILE_107_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_108, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(108, s)) +# define BOOST_PP_WHILE_108_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_109, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(109, s)) +# define BOOST_PP_WHILE_109_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_110, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(110, s)) +# define BOOST_PP_WHILE_110_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_111, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(111, s)) +# define BOOST_PP_WHILE_111_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_112, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(112, s)) +# define BOOST_PP_WHILE_112_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_113, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(113, s)) +# define BOOST_PP_WHILE_113_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_114, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(114, s)) +# define BOOST_PP_WHILE_114_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_115, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(115, s)) +# define BOOST_PP_WHILE_115_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_116, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(116, s)) +# define BOOST_PP_WHILE_116_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_117, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(117, s)) +# define BOOST_PP_WHILE_117_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_118, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(118, s)) +# define BOOST_PP_WHILE_118_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_119, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(119, s)) +# define BOOST_PP_WHILE_119_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_120, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(120, s)) +# define BOOST_PP_WHILE_120_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_121, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(121, s)) +# define BOOST_PP_WHILE_121_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_122, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(122, s)) +# define BOOST_PP_WHILE_122_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_123, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(123, s)) +# define BOOST_PP_WHILE_123_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_124, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(124, s)) +# define BOOST_PP_WHILE_124_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_125, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(125, s)) +# define BOOST_PP_WHILE_125_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_126, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(126, s)) +# define BOOST_PP_WHILE_126_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_127, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(127, s)) +# define BOOST_PP_WHILE_127_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_128, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(128, s)) +# define BOOST_PP_WHILE_128_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_129, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(129, s)) +# define BOOST_PP_WHILE_129_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_130, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(130, s)) +# define BOOST_PP_WHILE_130_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_131, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(131, s)) +# define BOOST_PP_WHILE_131_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_132, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(132, s)) +# define BOOST_PP_WHILE_132_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_133, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(133, s)) +# define BOOST_PP_WHILE_133_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_134, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(134, s)) +# define BOOST_PP_WHILE_134_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_135, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(135, s)) +# define BOOST_PP_WHILE_135_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_136, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(136, s)) +# define BOOST_PP_WHILE_136_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_137, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(137, s)) +# define BOOST_PP_WHILE_137_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_138, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(138, s)) +# define BOOST_PP_WHILE_138_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_139, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(139, s)) +# define BOOST_PP_WHILE_139_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_140, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(140, s)) +# define BOOST_PP_WHILE_140_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_141, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(141, s)) +# define BOOST_PP_WHILE_141_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_142, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(142, s)) +# define BOOST_PP_WHILE_142_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_143, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(143, s)) +# define BOOST_PP_WHILE_143_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_144, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(144, s)) +# define BOOST_PP_WHILE_144_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_145, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(145, s)) +# define BOOST_PP_WHILE_145_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_146, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(146, s)) +# define BOOST_PP_WHILE_146_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_147, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(147, s)) +# define BOOST_PP_WHILE_147_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_148, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(148, s)) +# define BOOST_PP_WHILE_148_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_149, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(149, s)) +# define BOOST_PP_WHILE_149_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_150, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(150, s)) +# define BOOST_PP_WHILE_150_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_151, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(151, s)) +# define BOOST_PP_WHILE_151_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_152, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(152, s)) +# define BOOST_PP_WHILE_152_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_153, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(153, s)) +# define BOOST_PP_WHILE_153_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_154, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(154, s)) +# define BOOST_PP_WHILE_154_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_155, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(155, s)) +# define BOOST_PP_WHILE_155_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_156, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(156, s)) +# define BOOST_PP_WHILE_156_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_157, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(157, s)) +# define BOOST_PP_WHILE_157_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_158, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(158, s)) +# define BOOST_PP_WHILE_158_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_159, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(159, s)) +# define BOOST_PP_WHILE_159_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_160, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(160, s)) +# define BOOST_PP_WHILE_160_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_161, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(161, s)) +# define BOOST_PP_WHILE_161_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_162, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(162, s)) +# define BOOST_PP_WHILE_162_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_163, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(163, s)) +# define BOOST_PP_WHILE_163_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_164, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(164, s)) +# define BOOST_PP_WHILE_164_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_165, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(165, s)) +# define BOOST_PP_WHILE_165_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_166, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(166, s)) +# define BOOST_PP_WHILE_166_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_167, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(167, s)) +# define BOOST_PP_WHILE_167_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_168, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(168, s)) +# define BOOST_PP_WHILE_168_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_169, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(169, s)) +# define BOOST_PP_WHILE_169_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_170, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(170, s)) +# define BOOST_PP_WHILE_170_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_171, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(171, s)) +# define BOOST_PP_WHILE_171_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_172, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(172, s)) +# define BOOST_PP_WHILE_172_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_173, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(173, s)) +# define BOOST_PP_WHILE_173_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_174, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(174, s)) +# define BOOST_PP_WHILE_174_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_175, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(175, s)) +# define BOOST_PP_WHILE_175_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_176, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(176, s)) +# define BOOST_PP_WHILE_176_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_177, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(177, s)) +# define BOOST_PP_WHILE_177_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_178, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(178, s)) +# define BOOST_PP_WHILE_178_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_179, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(179, s)) +# define BOOST_PP_WHILE_179_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_180, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(180, s)) +# define BOOST_PP_WHILE_180_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_181, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(181, s)) +# define BOOST_PP_WHILE_181_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_182, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(182, s)) +# define BOOST_PP_WHILE_182_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_183, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(183, s)) +# define BOOST_PP_WHILE_183_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_184, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(184, s)) +# define BOOST_PP_WHILE_184_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_185, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(185, s)) +# define BOOST_PP_WHILE_185_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_186, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(186, s)) +# define BOOST_PP_WHILE_186_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_187, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(187, s)) +# define BOOST_PP_WHILE_187_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_188, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(188, s)) +# define BOOST_PP_WHILE_188_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_189, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(189, s)) +# define BOOST_PP_WHILE_189_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_190, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(190, s)) +# define BOOST_PP_WHILE_190_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_191, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(191, s)) +# define BOOST_PP_WHILE_191_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_192, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(192, s)) +# define BOOST_PP_WHILE_192_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_193, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(193, s)) +# define BOOST_PP_WHILE_193_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_194, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(194, s)) +# define BOOST_PP_WHILE_194_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_195, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(195, s)) +# define BOOST_PP_WHILE_195_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_196, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(196, s)) +# define BOOST_PP_WHILE_196_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_197, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(197, s)) +# define BOOST_PP_WHILE_197_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_198, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(198, s)) +# define BOOST_PP_WHILE_198_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_199, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(199, s)) +# define BOOST_PP_WHILE_199_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_200, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(200, s)) +# define BOOST_PP_WHILE_200_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_201, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(201, s)) +# define BOOST_PP_WHILE_201_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_202, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(202, s)) +# define BOOST_PP_WHILE_202_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_203, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(203, s)) +# define BOOST_PP_WHILE_203_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_204, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(204, s)) +# define BOOST_PP_WHILE_204_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_205, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(205, s)) +# define BOOST_PP_WHILE_205_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_206, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(206, s)) +# define BOOST_PP_WHILE_206_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_207, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(207, s)) +# define BOOST_PP_WHILE_207_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_208, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(208, s)) +# define BOOST_PP_WHILE_208_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_209, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(209, s)) +# define BOOST_PP_WHILE_209_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_210, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(210, s)) +# define BOOST_PP_WHILE_210_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_211, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(211, s)) +# define BOOST_PP_WHILE_211_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_212, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(212, s)) +# define BOOST_PP_WHILE_212_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_213, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(213, s)) +# define BOOST_PP_WHILE_213_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_214, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(214, s)) +# define BOOST_PP_WHILE_214_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_215, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(215, s)) +# define BOOST_PP_WHILE_215_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_216, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(216, s)) +# define BOOST_PP_WHILE_216_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_217, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(217, s)) +# define BOOST_PP_WHILE_217_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_218, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(218, s)) +# define BOOST_PP_WHILE_218_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_219, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(219, s)) +# define BOOST_PP_WHILE_219_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_220, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(220, s)) +# define BOOST_PP_WHILE_220_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_221, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(221, s)) +# define BOOST_PP_WHILE_221_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_222, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(222, s)) +# define BOOST_PP_WHILE_222_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_223, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(223, s)) +# define BOOST_PP_WHILE_223_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_224, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(224, s)) +# define BOOST_PP_WHILE_224_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_225, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(225, s)) +# define BOOST_PP_WHILE_225_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_226, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(226, s)) +# define BOOST_PP_WHILE_226_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_227, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(227, s)) +# define BOOST_PP_WHILE_227_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_228, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(228, s)) +# define BOOST_PP_WHILE_228_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_229, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(229, s)) +# define BOOST_PP_WHILE_229_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_230, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(230, s)) +# define BOOST_PP_WHILE_230_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_231, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(231, s)) +# define BOOST_PP_WHILE_231_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_232, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(232, s)) +# define BOOST_PP_WHILE_232_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_233, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(233, s)) +# define BOOST_PP_WHILE_233_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_234, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(234, s)) +# define BOOST_PP_WHILE_234_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_235, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(235, s)) +# define BOOST_PP_WHILE_235_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_236, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(236, s)) +# define BOOST_PP_WHILE_236_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_237, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(237, s)) +# define BOOST_PP_WHILE_237_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_238, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(238, s)) +# define BOOST_PP_WHILE_238_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_239, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(239, s)) +# define BOOST_PP_WHILE_239_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_240, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(240, s)) +# define BOOST_PP_WHILE_240_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_241, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(241, s)) +# define BOOST_PP_WHILE_241_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_242, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(242, s)) +# define BOOST_PP_WHILE_242_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_243, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(243, s)) +# define BOOST_PP_WHILE_243_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_244, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(244, s)) +# define BOOST_PP_WHILE_244_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_245, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(245, s)) +# define BOOST_PP_WHILE_245_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_246, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(246, s)) +# define BOOST_PP_WHILE_246_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_247, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(247, s)) +# define BOOST_PP_WHILE_247_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_248, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(248, s)) +# define BOOST_PP_WHILE_248_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_249, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(249, s)) +# define BOOST_PP_WHILE_249_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_250, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(250, s)) +# define BOOST_PP_WHILE_250_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_251, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(251, s)) +# define BOOST_PP_WHILE_251_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_252, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(252, s)) +# define BOOST_PP_WHILE_252_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_253, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(253, s)) +# define BOOST_PP_WHILE_253_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_254, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(254, s)) +# define BOOST_PP_WHILE_254_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_255, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(255, s)) +# define BOOST_PP_WHILE_255_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_256, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(256, s)) +# define BOOST_PP_WHILE_256_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_257, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(257, s)) +# +# +# endif diff --git a/contrib/src/boost/preprocessor/control/detail/edg/while.hpp b/contrib/src/boost/preprocessor/control/detail/edg/while.hpp new file mode 100644 index 0000000..ce28eb2 --- /dev/null +++ b/contrib/src/boost/preprocessor/control/detail/edg/while.hpp @@ -0,0 +1,534 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_EDG_WHILE_HPP +# define BOOST_PREPROCESSOR_CONTROL_DETAIL_EDG_WHILE_HPP +# +# include +# include +# +# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_I(p, o, s) +# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_I(p, o, s) +# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_I(p, o, s) +# define BOOST_PP_WHILE_4(p, o, s) BOOST_PP_WHILE_4_I(p, o, s) +# define BOOST_PP_WHILE_5(p, o, s) BOOST_PP_WHILE_5_I(p, o, s) +# define BOOST_PP_WHILE_6(p, o, s) BOOST_PP_WHILE_6_I(p, o, s) +# define BOOST_PP_WHILE_7(p, o, s) BOOST_PP_WHILE_7_I(p, o, s) +# define BOOST_PP_WHILE_8(p, o, s) BOOST_PP_WHILE_8_I(p, o, s) +# define BOOST_PP_WHILE_9(p, o, s) BOOST_PP_WHILE_9_I(p, o, s) +# define BOOST_PP_WHILE_10(p, o, s) BOOST_PP_WHILE_10_I(p, o, s) +# define BOOST_PP_WHILE_11(p, o, s) BOOST_PP_WHILE_11_I(p, o, s) +# define BOOST_PP_WHILE_12(p, o, s) BOOST_PP_WHILE_12_I(p, o, s) +# define BOOST_PP_WHILE_13(p, o, s) BOOST_PP_WHILE_13_I(p, o, s) +# define BOOST_PP_WHILE_14(p, o, s) BOOST_PP_WHILE_14_I(p, o, s) +# define BOOST_PP_WHILE_15(p, o, s) BOOST_PP_WHILE_15_I(p, o, s) +# define BOOST_PP_WHILE_16(p, o, s) BOOST_PP_WHILE_16_I(p, o, s) +# define BOOST_PP_WHILE_17(p, o, s) BOOST_PP_WHILE_17_I(p, o, s) +# define BOOST_PP_WHILE_18(p, o, s) BOOST_PP_WHILE_18_I(p, o, s) +# define BOOST_PP_WHILE_19(p, o, s) BOOST_PP_WHILE_19_I(p, o, s) +# define BOOST_PP_WHILE_20(p, o, s) BOOST_PP_WHILE_20_I(p, o, s) +# define BOOST_PP_WHILE_21(p, o, s) BOOST_PP_WHILE_21_I(p, o, s) +# define BOOST_PP_WHILE_22(p, o, s) BOOST_PP_WHILE_22_I(p, o, s) +# define BOOST_PP_WHILE_23(p, o, s) BOOST_PP_WHILE_23_I(p, o, s) +# define BOOST_PP_WHILE_24(p, o, s) BOOST_PP_WHILE_24_I(p, o, s) +# define BOOST_PP_WHILE_25(p, o, s) BOOST_PP_WHILE_25_I(p, o, s) +# define BOOST_PP_WHILE_26(p, o, s) BOOST_PP_WHILE_26_I(p, o, s) +# define BOOST_PP_WHILE_27(p, o, s) BOOST_PP_WHILE_27_I(p, o, s) +# define BOOST_PP_WHILE_28(p, o, s) BOOST_PP_WHILE_28_I(p, o, s) +# define BOOST_PP_WHILE_29(p, o, s) BOOST_PP_WHILE_29_I(p, o, s) +# define BOOST_PP_WHILE_30(p, o, s) BOOST_PP_WHILE_30_I(p, o, s) +# define BOOST_PP_WHILE_31(p, o, s) BOOST_PP_WHILE_31_I(p, o, s) +# define BOOST_PP_WHILE_32(p, o, s) BOOST_PP_WHILE_32_I(p, o, s) +# define BOOST_PP_WHILE_33(p, o, s) BOOST_PP_WHILE_33_I(p, o, s) +# define BOOST_PP_WHILE_34(p, o, s) BOOST_PP_WHILE_34_I(p, o, s) +# define BOOST_PP_WHILE_35(p, o, s) BOOST_PP_WHILE_35_I(p, o, s) +# define BOOST_PP_WHILE_36(p, o, s) BOOST_PP_WHILE_36_I(p, o, s) +# define BOOST_PP_WHILE_37(p, o, s) BOOST_PP_WHILE_37_I(p, o, s) +# define BOOST_PP_WHILE_38(p, o, s) BOOST_PP_WHILE_38_I(p, o, s) +# define BOOST_PP_WHILE_39(p, o, s) BOOST_PP_WHILE_39_I(p, o, s) +# define BOOST_PP_WHILE_40(p, o, s) BOOST_PP_WHILE_40_I(p, o, s) +# define BOOST_PP_WHILE_41(p, o, s) BOOST_PP_WHILE_41_I(p, o, s) +# define BOOST_PP_WHILE_42(p, o, s) BOOST_PP_WHILE_42_I(p, o, s) +# define BOOST_PP_WHILE_43(p, o, s) BOOST_PP_WHILE_43_I(p, o, s) +# define BOOST_PP_WHILE_44(p, o, s) BOOST_PP_WHILE_44_I(p, o, s) +# define BOOST_PP_WHILE_45(p, o, s) BOOST_PP_WHILE_45_I(p, o, s) +# define BOOST_PP_WHILE_46(p, o, s) BOOST_PP_WHILE_46_I(p, o, s) +# define BOOST_PP_WHILE_47(p, o, s) BOOST_PP_WHILE_47_I(p, o, s) +# define BOOST_PP_WHILE_48(p, o, s) BOOST_PP_WHILE_48_I(p, o, s) +# define BOOST_PP_WHILE_49(p, o, s) BOOST_PP_WHILE_49_I(p, o, s) +# define BOOST_PP_WHILE_50(p, o, s) BOOST_PP_WHILE_50_I(p, o, s) +# define BOOST_PP_WHILE_51(p, o, s) BOOST_PP_WHILE_51_I(p, o, s) +# define BOOST_PP_WHILE_52(p, o, s) BOOST_PP_WHILE_52_I(p, o, s) +# define BOOST_PP_WHILE_53(p, o, s) BOOST_PP_WHILE_53_I(p, o, s) +# define BOOST_PP_WHILE_54(p, o, s) BOOST_PP_WHILE_54_I(p, o, s) +# define BOOST_PP_WHILE_55(p, o, s) BOOST_PP_WHILE_55_I(p, o, s) +# define BOOST_PP_WHILE_56(p, o, s) BOOST_PP_WHILE_56_I(p, o, s) +# define BOOST_PP_WHILE_57(p, o, s) BOOST_PP_WHILE_57_I(p, o, s) +# define BOOST_PP_WHILE_58(p, o, s) BOOST_PP_WHILE_58_I(p, o, s) +# define BOOST_PP_WHILE_59(p, o, s) BOOST_PP_WHILE_59_I(p, o, s) +# define BOOST_PP_WHILE_60(p, o, s) BOOST_PP_WHILE_60_I(p, o, s) +# define BOOST_PP_WHILE_61(p, o, s) BOOST_PP_WHILE_61_I(p, o, s) +# define BOOST_PP_WHILE_62(p, o, s) BOOST_PP_WHILE_62_I(p, o, s) +# define BOOST_PP_WHILE_63(p, o, s) BOOST_PP_WHILE_63_I(p, o, s) +# define BOOST_PP_WHILE_64(p, o, s) BOOST_PP_WHILE_64_I(p, o, s) +# define BOOST_PP_WHILE_65(p, o, s) BOOST_PP_WHILE_65_I(p, o, s) +# define BOOST_PP_WHILE_66(p, o, s) BOOST_PP_WHILE_66_I(p, o, s) +# define BOOST_PP_WHILE_67(p, o, s) BOOST_PP_WHILE_67_I(p, o, s) +# define BOOST_PP_WHILE_68(p, o, s) BOOST_PP_WHILE_68_I(p, o, s) +# define BOOST_PP_WHILE_69(p, o, s) BOOST_PP_WHILE_69_I(p, o, s) +# define BOOST_PP_WHILE_70(p, o, s) BOOST_PP_WHILE_70_I(p, o, s) +# define BOOST_PP_WHILE_71(p, o, s) BOOST_PP_WHILE_71_I(p, o, s) +# define BOOST_PP_WHILE_72(p, o, s) BOOST_PP_WHILE_72_I(p, o, s) +# define BOOST_PP_WHILE_73(p, o, s) BOOST_PP_WHILE_73_I(p, o, s) +# define BOOST_PP_WHILE_74(p, o, s) BOOST_PP_WHILE_74_I(p, o, s) +# define BOOST_PP_WHILE_75(p, o, s) BOOST_PP_WHILE_75_I(p, o, s) +# define BOOST_PP_WHILE_76(p, o, s) BOOST_PP_WHILE_76_I(p, o, s) +# define BOOST_PP_WHILE_77(p, o, s) BOOST_PP_WHILE_77_I(p, o, s) +# define BOOST_PP_WHILE_78(p, o, s) BOOST_PP_WHILE_78_I(p, o, s) +# define BOOST_PP_WHILE_79(p, o, s) BOOST_PP_WHILE_79_I(p, o, s) +# define BOOST_PP_WHILE_80(p, o, s) BOOST_PP_WHILE_80_I(p, o, s) +# define BOOST_PP_WHILE_81(p, o, s) BOOST_PP_WHILE_81_I(p, o, s) +# define BOOST_PP_WHILE_82(p, o, s) BOOST_PP_WHILE_82_I(p, o, s) +# define BOOST_PP_WHILE_83(p, o, s) BOOST_PP_WHILE_83_I(p, o, s) +# define BOOST_PP_WHILE_84(p, o, s) BOOST_PP_WHILE_84_I(p, o, s) +# define BOOST_PP_WHILE_85(p, o, s) BOOST_PP_WHILE_85_I(p, o, s) +# define BOOST_PP_WHILE_86(p, o, s) BOOST_PP_WHILE_86_I(p, o, s) +# define BOOST_PP_WHILE_87(p, o, s) BOOST_PP_WHILE_87_I(p, o, s) +# define BOOST_PP_WHILE_88(p, o, s) BOOST_PP_WHILE_88_I(p, o, s) +# define BOOST_PP_WHILE_89(p, o, s) BOOST_PP_WHILE_89_I(p, o, s) +# define BOOST_PP_WHILE_90(p, o, s) BOOST_PP_WHILE_90_I(p, o, s) +# define BOOST_PP_WHILE_91(p, o, s) BOOST_PP_WHILE_91_I(p, o, s) +# define BOOST_PP_WHILE_92(p, o, s) BOOST_PP_WHILE_92_I(p, o, s) +# define BOOST_PP_WHILE_93(p, o, s) BOOST_PP_WHILE_93_I(p, o, s) +# define BOOST_PP_WHILE_94(p, o, s) BOOST_PP_WHILE_94_I(p, o, s) +# define BOOST_PP_WHILE_95(p, o, s) BOOST_PP_WHILE_95_I(p, o, s) +# define BOOST_PP_WHILE_96(p, o, s) BOOST_PP_WHILE_96_I(p, o, s) +# define BOOST_PP_WHILE_97(p, o, s) BOOST_PP_WHILE_97_I(p, o, s) +# define BOOST_PP_WHILE_98(p, o, s) BOOST_PP_WHILE_98_I(p, o, s) +# define BOOST_PP_WHILE_99(p, o, s) BOOST_PP_WHILE_99_I(p, o, s) +# define BOOST_PP_WHILE_100(p, o, s) BOOST_PP_WHILE_100_I(p, o, s) +# define BOOST_PP_WHILE_101(p, o, s) BOOST_PP_WHILE_101_I(p, o, s) +# define BOOST_PP_WHILE_102(p, o, s) BOOST_PP_WHILE_102_I(p, o, s) +# define BOOST_PP_WHILE_103(p, o, s) BOOST_PP_WHILE_103_I(p, o, s) +# define BOOST_PP_WHILE_104(p, o, s) BOOST_PP_WHILE_104_I(p, o, s) +# define BOOST_PP_WHILE_105(p, o, s) BOOST_PP_WHILE_105_I(p, o, s) +# define BOOST_PP_WHILE_106(p, o, s) BOOST_PP_WHILE_106_I(p, o, s) +# define BOOST_PP_WHILE_107(p, o, s) BOOST_PP_WHILE_107_I(p, o, s) +# define BOOST_PP_WHILE_108(p, o, s) BOOST_PP_WHILE_108_I(p, o, s) +# define BOOST_PP_WHILE_109(p, o, s) BOOST_PP_WHILE_109_I(p, o, s) +# define BOOST_PP_WHILE_110(p, o, s) BOOST_PP_WHILE_110_I(p, o, s) +# define BOOST_PP_WHILE_111(p, o, s) BOOST_PP_WHILE_111_I(p, o, s) +# define BOOST_PP_WHILE_112(p, o, s) BOOST_PP_WHILE_112_I(p, o, s) +# define BOOST_PP_WHILE_113(p, o, s) BOOST_PP_WHILE_113_I(p, o, s) +# define BOOST_PP_WHILE_114(p, o, s) BOOST_PP_WHILE_114_I(p, o, s) +# define BOOST_PP_WHILE_115(p, o, s) BOOST_PP_WHILE_115_I(p, o, s) +# define BOOST_PP_WHILE_116(p, o, s) BOOST_PP_WHILE_116_I(p, o, s) +# define BOOST_PP_WHILE_117(p, o, s) BOOST_PP_WHILE_117_I(p, o, s) +# define BOOST_PP_WHILE_118(p, o, s) BOOST_PP_WHILE_118_I(p, o, s) +# define BOOST_PP_WHILE_119(p, o, s) BOOST_PP_WHILE_119_I(p, o, s) +# define BOOST_PP_WHILE_120(p, o, s) BOOST_PP_WHILE_120_I(p, o, s) +# define BOOST_PP_WHILE_121(p, o, s) BOOST_PP_WHILE_121_I(p, o, s) +# define BOOST_PP_WHILE_122(p, o, s) BOOST_PP_WHILE_122_I(p, o, s) +# define BOOST_PP_WHILE_123(p, o, s) BOOST_PP_WHILE_123_I(p, o, s) +# define BOOST_PP_WHILE_124(p, o, s) BOOST_PP_WHILE_124_I(p, o, s) +# define BOOST_PP_WHILE_125(p, o, s) BOOST_PP_WHILE_125_I(p, o, s) +# define BOOST_PP_WHILE_126(p, o, s) BOOST_PP_WHILE_126_I(p, o, s) +# define BOOST_PP_WHILE_127(p, o, s) BOOST_PP_WHILE_127_I(p, o, s) +# define BOOST_PP_WHILE_128(p, o, s) BOOST_PP_WHILE_128_I(p, o, s) +# define BOOST_PP_WHILE_129(p, o, s) BOOST_PP_WHILE_129_I(p, o, s) +# define BOOST_PP_WHILE_130(p, o, s) BOOST_PP_WHILE_130_I(p, o, s) +# define BOOST_PP_WHILE_131(p, o, s) BOOST_PP_WHILE_131_I(p, o, s) +# define BOOST_PP_WHILE_132(p, o, s) BOOST_PP_WHILE_132_I(p, o, s) +# define BOOST_PP_WHILE_133(p, o, s) BOOST_PP_WHILE_133_I(p, o, s) +# define BOOST_PP_WHILE_134(p, o, s) BOOST_PP_WHILE_134_I(p, o, s) +# define BOOST_PP_WHILE_135(p, o, s) BOOST_PP_WHILE_135_I(p, o, s) +# define BOOST_PP_WHILE_136(p, o, s) BOOST_PP_WHILE_136_I(p, o, s) +# define BOOST_PP_WHILE_137(p, o, s) BOOST_PP_WHILE_137_I(p, o, s) +# define BOOST_PP_WHILE_138(p, o, s) BOOST_PP_WHILE_138_I(p, o, s) +# define BOOST_PP_WHILE_139(p, o, s) BOOST_PP_WHILE_139_I(p, o, s) +# define BOOST_PP_WHILE_140(p, o, s) BOOST_PP_WHILE_140_I(p, o, s) +# define BOOST_PP_WHILE_141(p, o, s) BOOST_PP_WHILE_141_I(p, o, s) +# define BOOST_PP_WHILE_142(p, o, s) BOOST_PP_WHILE_142_I(p, o, s) +# define BOOST_PP_WHILE_143(p, o, s) BOOST_PP_WHILE_143_I(p, o, s) +# define BOOST_PP_WHILE_144(p, o, s) BOOST_PP_WHILE_144_I(p, o, s) +# define BOOST_PP_WHILE_145(p, o, s) BOOST_PP_WHILE_145_I(p, o, s) +# define BOOST_PP_WHILE_146(p, o, s) BOOST_PP_WHILE_146_I(p, o, s) +# define BOOST_PP_WHILE_147(p, o, s) BOOST_PP_WHILE_147_I(p, o, s) +# define BOOST_PP_WHILE_148(p, o, s) BOOST_PP_WHILE_148_I(p, o, s) +# define BOOST_PP_WHILE_149(p, o, s) BOOST_PP_WHILE_149_I(p, o, s) +# define BOOST_PP_WHILE_150(p, o, s) BOOST_PP_WHILE_150_I(p, o, s) +# define BOOST_PP_WHILE_151(p, o, s) BOOST_PP_WHILE_151_I(p, o, s) +# define BOOST_PP_WHILE_152(p, o, s) BOOST_PP_WHILE_152_I(p, o, s) +# define BOOST_PP_WHILE_153(p, o, s) BOOST_PP_WHILE_153_I(p, o, s) +# define BOOST_PP_WHILE_154(p, o, s) BOOST_PP_WHILE_154_I(p, o, s) +# define BOOST_PP_WHILE_155(p, o, s) BOOST_PP_WHILE_155_I(p, o, s) +# define BOOST_PP_WHILE_156(p, o, s) BOOST_PP_WHILE_156_I(p, o, s) +# define BOOST_PP_WHILE_157(p, o, s) BOOST_PP_WHILE_157_I(p, o, s) +# define BOOST_PP_WHILE_158(p, o, s) BOOST_PP_WHILE_158_I(p, o, s) +# define BOOST_PP_WHILE_159(p, o, s) BOOST_PP_WHILE_159_I(p, o, s) +# define BOOST_PP_WHILE_160(p, o, s) BOOST_PP_WHILE_160_I(p, o, s) +# define BOOST_PP_WHILE_161(p, o, s) BOOST_PP_WHILE_161_I(p, o, s) +# define BOOST_PP_WHILE_162(p, o, s) BOOST_PP_WHILE_162_I(p, o, s) +# define BOOST_PP_WHILE_163(p, o, s) BOOST_PP_WHILE_163_I(p, o, s) +# define BOOST_PP_WHILE_164(p, o, s) BOOST_PP_WHILE_164_I(p, o, s) +# define BOOST_PP_WHILE_165(p, o, s) BOOST_PP_WHILE_165_I(p, o, s) +# define BOOST_PP_WHILE_166(p, o, s) BOOST_PP_WHILE_166_I(p, o, s) +# define BOOST_PP_WHILE_167(p, o, s) BOOST_PP_WHILE_167_I(p, o, s) +# define BOOST_PP_WHILE_168(p, o, s) BOOST_PP_WHILE_168_I(p, o, s) +# define BOOST_PP_WHILE_169(p, o, s) BOOST_PP_WHILE_169_I(p, o, s) +# define BOOST_PP_WHILE_170(p, o, s) BOOST_PP_WHILE_170_I(p, o, s) +# define BOOST_PP_WHILE_171(p, o, s) BOOST_PP_WHILE_171_I(p, o, s) +# define BOOST_PP_WHILE_172(p, o, s) BOOST_PP_WHILE_172_I(p, o, s) +# define BOOST_PP_WHILE_173(p, o, s) BOOST_PP_WHILE_173_I(p, o, s) +# define BOOST_PP_WHILE_174(p, o, s) BOOST_PP_WHILE_174_I(p, o, s) +# define BOOST_PP_WHILE_175(p, o, s) BOOST_PP_WHILE_175_I(p, o, s) +# define BOOST_PP_WHILE_176(p, o, s) BOOST_PP_WHILE_176_I(p, o, s) +# define BOOST_PP_WHILE_177(p, o, s) BOOST_PP_WHILE_177_I(p, o, s) +# define BOOST_PP_WHILE_178(p, o, s) BOOST_PP_WHILE_178_I(p, o, s) +# define BOOST_PP_WHILE_179(p, o, s) BOOST_PP_WHILE_179_I(p, o, s) +# define BOOST_PP_WHILE_180(p, o, s) BOOST_PP_WHILE_180_I(p, o, s) +# define BOOST_PP_WHILE_181(p, o, s) BOOST_PP_WHILE_181_I(p, o, s) +# define BOOST_PP_WHILE_182(p, o, s) BOOST_PP_WHILE_182_I(p, o, s) +# define BOOST_PP_WHILE_183(p, o, s) BOOST_PP_WHILE_183_I(p, o, s) +# define BOOST_PP_WHILE_184(p, o, s) BOOST_PP_WHILE_184_I(p, o, s) +# define BOOST_PP_WHILE_185(p, o, s) BOOST_PP_WHILE_185_I(p, o, s) +# define BOOST_PP_WHILE_186(p, o, s) BOOST_PP_WHILE_186_I(p, o, s) +# define BOOST_PP_WHILE_187(p, o, s) BOOST_PP_WHILE_187_I(p, o, s) +# define BOOST_PP_WHILE_188(p, o, s) BOOST_PP_WHILE_188_I(p, o, s) +# define BOOST_PP_WHILE_189(p, o, s) BOOST_PP_WHILE_189_I(p, o, s) +# define BOOST_PP_WHILE_190(p, o, s) BOOST_PP_WHILE_190_I(p, o, s) +# define BOOST_PP_WHILE_191(p, o, s) BOOST_PP_WHILE_191_I(p, o, s) +# define BOOST_PP_WHILE_192(p, o, s) BOOST_PP_WHILE_192_I(p, o, s) +# define BOOST_PP_WHILE_193(p, o, s) BOOST_PP_WHILE_193_I(p, o, s) +# define BOOST_PP_WHILE_194(p, o, s) BOOST_PP_WHILE_194_I(p, o, s) +# define BOOST_PP_WHILE_195(p, o, s) BOOST_PP_WHILE_195_I(p, o, s) +# define BOOST_PP_WHILE_196(p, o, s) BOOST_PP_WHILE_196_I(p, o, s) +# define BOOST_PP_WHILE_197(p, o, s) BOOST_PP_WHILE_197_I(p, o, s) +# define BOOST_PP_WHILE_198(p, o, s) BOOST_PP_WHILE_198_I(p, o, s) +# define BOOST_PP_WHILE_199(p, o, s) BOOST_PP_WHILE_199_I(p, o, s) +# define BOOST_PP_WHILE_200(p, o, s) BOOST_PP_WHILE_200_I(p, o, s) +# define BOOST_PP_WHILE_201(p, o, s) BOOST_PP_WHILE_201_I(p, o, s) +# define BOOST_PP_WHILE_202(p, o, s) BOOST_PP_WHILE_202_I(p, o, s) +# define BOOST_PP_WHILE_203(p, o, s) BOOST_PP_WHILE_203_I(p, o, s) +# define BOOST_PP_WHILE_204(p, o, s) BOOST_PP_WHILE_204_I(p, o, s) +# define BOOST_PP_WHILE_205(p, o, s) BOOST_PP_WHILE_205_I(p, o, s) +# define BOOST_PP_WHILE_206(p, o, s) BOOST_PP_WHILE_206_I(p, o, s) +# define BOOST_PP_WHILE_207(p, o, s) BOOST_PP_WHILE_207_I(p, o, s) +# define BOOST_PP_WHILE_208(p, o, s) BOOST_PP_WHILE_208_I(p, o, s) +# define BOOST_PP_WHILE_209(p, o, s) BOOST_PP_WHILE_209_I(p, o, s) +# define BOOST_PP_WHILE_210(p, o, s) BOOST_PP_WHILE_210_I(p, o, s) +# define BOOST_PP_WHILE_211(p, o, s) BOOST_PP_WHILE_211_I(p, o, s) +# define BOOST_PP_WHILE_212(p, o, s) BOOST_PP_WHILE_212_I(p, o, s) +# define BOOST_PP_WHILE_213(p, o, s) BOOST_PP_WHILE_213_I(p, o, s) +# define BOOST_PP_WHILE_214(p, o, s) BOOST_PP_WHILE_214_I(p, o, s) +# define BOOST_PP_WHILE_215(p, o, s) BOOST_PP_WHILE_215_I(p, o, s) +# define BOOST_PP_WHILE_216(p, o, s) BOOST_PP_WHILE_216_I(p, o, s) +# define BOOST_PP_WHILE_217(p, o, s) BOOST_PP_WHILE_217_I(p, o, s) +# define BOOST_PP_WHILE_218(p, o, s) BOOST_PP_WHILE_218_I(p, o, s) +# define BOOST_PP_WHILE_219(p, o, s) BOOST_PP_WHILE_219_I(p, o, s) +# define BOOST_PP_WHILE_220(p, o, s) BOOST_PP_WHILE_220_I(p, o, s) +# define BOOST_PP_WHILE_221(p, o, s) BOOST_PP_WHILE_221_I(p, o, s) +# define BOOST_PP_WHILE_222(p, o, s) BOOST_PP_WHILE_222_I(p, o, s) +# define BOOST_PP_WHILE_223(p, o, s) BOOST_PP_WHILE_223_I(p, o, s) +# define BOOST_PP_WHILE_224(p, o, s) BOOST_PP_WHILE_224_I(p, o, s) +# define BOOST_PP_WHILE_225(p, o, s) BOOST_PP_WHILE_225_I(p, o, s) +# define BOOST_PP_WHILE_226(p, o, s) BOOST_PP_WHILE_226_I(p, o, s) +# define BOOST_PP_WHILE_227(p, o, s) BOOST_PP_WHILE_227_I(p, o, s) +# define BOOST_PP_WHILE_228(p, o, s) BOOST_PP_WHILE_228_I(p, o, s) +# define BOOST_PP_WHILE_229(p, o, s) BOOST_PP_WHILE_229_I(p, o, s) +# define BOOST_PP_WHILE_230(p, o, s) BOOST_PP_WHILE_230_I(p, o, s) +# define BOOST_PP_WHILE_231(p, o, s) BOOST_PP_WHILE_231_I(p, o, s) +# define BOOST_PP_WHILE_232(p, o, s) BOOST_PP_WHILE_232_I(p, o, s) +# define BOOST_PP_WHILE_233(p, o, s) BOOST_PP_WHILE_233_I(p, o, s) +# define BOOST_PP_WHILE_234(p, o, s) BOOST_PP_WHILE_234_I(p, o, s) +# define BOOST_PP_WHILE_235(p, o, s) BOOST_PP_WHILE_235_I(p, o, s) +# define BOOST_PP_WHILE_236(p, o, s) BOOST_PP_WHILE_236_I(p, o, s) +# define BOOST_PP_WHILE_237(p, o, s) BOOST_PP_WHILE_237_I(p, o, s) +# define BOOST_PP_WHILE_238(p, o, s) BOOST_PP_WHILE_238_I(p, o, s) +# define BOOST_PP_WHILE_239(p, o, s) BOOST_PP_WHILE_239_I(p, o, s) +# define BOOST_PP_WHILE_240(p, o, s) BOOST_PP_WHILE_240_I(p, o, s) +# define BOOST_PP_WHILE_241(p, o, s) BOOST_PP_WHILE_241_I(p, o, s) +# define BOOST_PP_WHILE_242(p, o, s) BOOST_PP_WHILE_242_I(p, o, s) +# define BOOST_PP_WHILE_243(p, o, s) BOOST_PP_WHILE_243_I(p, o, s) +# define BOOST_PP_WHILE_244(p, o, s) BOOST_PP_WHILE_244_I(p, o, s) +# define BOOST_PP_WHILE_245(p, o, s) BOOST_PP_WHILE_245_I(p, o, s) +# define BOOST_PP_WHILE_246(p, o, s) BOOST_PP_WHILE_246_I(p, o, s) +# define BOOST_PP_WHILE_247(p, o, s) BOOST_PP_WHILE_247_I(p, o, s) +# define BOOST_PP_WHILE_248(p, o, s) BOOST_PP_WHILE_248_I(p, o, s) +# define BOOST_PP_WHILE_249(p, o, s) BOOST_PP_WHILE_249_I(p, o, s) +# define BOOST_PP_WHILE_250(p, o, s) BOOST_PP_WHILE_250_I(p, o, s) +# define BOOST_PP_WHILE_251(p, o, s) BOOST_PP_WHILE_251_I(p, o, s) +# define BOOST_PP_WHILE_252(p, o, s) BOOST_PP_WHILE_252_I(p, o, s) +# define BOOST_PP_WHILE_253(p, o, s) BOOST_PP_WHILE_253_I(p, o, s) +# define BOOST_PP_WHILE_254(p, o, s) BOOST_PP_WHILE_254_I(p, o, s) +# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_I(p, o, s) +# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_I(p, o, s) +# +# define BOOST_PP_WHILE_1_I(p, o, s) BOOST_PP_IF(p(2, s), BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, o(2, s)) +# define BOOST_PP_WHILE_2_I(p, o, s) BOOST_PP_IF(p(3, s), BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, o(3, s)) +# define BOOST_PP_WHILE_3_I(p, o, s) BOOST_PP_IF(p(4, s), BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, o(4, s)) +# define BOOST_PP_WHILE_4_I(p, o, s) BOOST_PP_IF(p(5, s), BOOST_PP_WHILE_5, s BOOST_PP_TUPLE_EAT_3)(p, o, o(5, s)) +# define BOOST_PP_WHILE_5_I(p, o, s) BOOST_PP_IF(p(6, s), BOOST_PP_WHILE_6, s BOOST_PP_TUPLE_EAT_3)(p, o, o(6, s)) +# define BOOST_PP_WHILE_6_I(p, o, s) BOOST_PP_IF(p(7, s), BOOST_PP_WHILE_7, s BOOST_PP_TUPLE_EAT_3)(p, o, o(7, s)) +# define BOOST_PP_WHILE_7_I(p, o, s) BOOST_PP_IF(p(8, s), BOOST_PP_WHILE_8, s BOOST_PP_TUPLE_EAT_3)(p, o, o(8, s)) +# define BOOST_PP_WHILE_8_I(p, o, s) BOOST_PP_IF(p(9, s), BOOST_PP_WHILE_9, s BOOST_PP_TUPLE_EAT_3)(p, o, o(9, s)) +# define BOOST_PP_WHILE_9_I(p, o, s) BOOST_PP_IF(p(10, s), BOOST_PP_WHILE_10, s BOOST_PP_TUPLE_EAT_3)(p, o, o(10, s)) +# define BOOST_PP_WHILE_10_I(p, o, s) BOOST_PP_IF(p(11, s), BOOST_PP_WHILE_11, s BOOST_PP_TUPLE_EAT_3)(p, o, o(11, s)) +# define BOOST_PP_WHILE_11_I(p, o, s) BOOST_PP_IF(p(12, s), BOOST_PP_WHILE_12, s BOOST_PP_TUPLE_EAT_3)(p, o, o(12, s)) +# define BOOST_PP_WHILE_12_I(p, o, s) BOOST_PP_IF(p(13, s), BOOST_PP_WHILE_13, s BOOST_PP_TUPLE_EAT_3)(p, o, o(13, s)) +# define BOOST_PP_WHILE_13_I(p, o, s) BOOST_PP_IF(p(14, s), BOOST_PP_WHILE_14, s BOOST_PP_TUPLE_EAT_3)(p, o, o(14, s)) +# define BOOST_PP_WHILE_14_I(p, o, s) BOOST_PP_IF(p(15, s), BOOST_PP_WHILE_15, s BOOST_PP_TUPLE_EAT_3)(p, o, o(15, s)) +# define BOOST_PP_WHILE_15_I(p, o, s) BOOST_PP_IF(p(16, s), BOOST_PP_WHILE_16, s BOOST_PP_TUPLE_EAT_3)(p, o, o(16, s)) +# define BOOST_PP_WHILE_16_I(p, o, s) BOOST_PP_IF(p(17, s), BOOST_PP_WHILE_17, s BOOST_PP_TUPLE_EAT_3)(p, o, o(17, s)) +# define BOOST_PP_WHILE_17_I(p, o, s) BOOST_PP_IF(p(18, s), BOOST_PP_WHILE_18, s BOOST_PP_TUPLE_EAT_3)(p, o, o(18, s)) +# define BOOST_PP_WHILE_18_I(p, o, s) BOOST_PP_IF(p(19, s), BOOST_PP_WHILE_19, s BOOST_PP_TUPLE_EAT_3)(p, o, o(19, s)) +# define BOOST_PP_WHILE_19_I(p, o, s) BOOST_PP_IF(p(20, s), BOOST_PP_WHILE_20, s BOOST_PP_TUPLE_EAT_3)(p, o, o(20, s)) +# define BOOST_PP_WHILE_20_I(p, o, s) BOOST_PP_IF(p(21, s), BOOST_PP_WHILE_21, s BOOST_PP_TUPLE_EAT_3)(p, o, o(21, s)) +# define BOOST_PP_WHILE_21_I(p, o, s) BOOST_PP_IF(p(22, s), BOOST_PP_WHILE_22, s BOOST_PP_TUPLE_EAT_3)(p, o, o(22, s)) +# define BOOST_PP_WHILE_22_I(p, o, s) BOOST_PP_IF(p(23, s), BOOST_PP_WHILE_23, s BOOST_PP_TUPLE_EAT_3)(p, o, o(23, s)) +# define BOOST_PP_WHILE_23_I(p, o, s) BOOST_PP_IF(p(24, s), BOOST_PP_WHILE_24, s BOOST_PP_TUPLE_EAT_3)(p, o, o(24, s)) +# define BOOST_PP_WHILE_24_I(p, o, s) BOOST_PP_IF(p(25, s), BOOST_PP_WHILE_25, s BOOST_PP_TUPLE_EAT_3)(p, o, o(25, s)) +# define BOOST_PP_WHILE_25_I(p, o, s) BOOST_PP_IF(p(26, s), BOOST_PP_WHILE_26, s BOOST_PP_TUPLE_EAT_3)(p, o, o(26, s)) +# define BOOST_PP_WHILE_26_I(p, o, s) BOOST_PP_IF(p(27, s), BOOST_PP_WHILE_27, s BOOST_PP_TUPLE_EAT_3)(p, o, o(27, s)) +# define BOOST_PP_WHILE_27_I(p, o, s) BOOST_PP_IF(p(28, s), BOOST_PP_WHILE_28, s BOOST_PP_TUPLE_EAT_3)(p, o, o(28, s)) +# define BOOST_PP_WHILE_28_I(p, o, s) BOOST_PP_IF(p(29, s), BOOST_PP_WHILE_29, s BOOST_PP_TUPLE_EAT_3)(p, o, o(29, s)) +# define BOOST_PP_WHILE_29_I(p, o, s) BOOST_PP_IF(p(30, s), BOOST_PP_WHILE_30, s BOOST_PP_TUPLE_EAT_3)(p, o, o(30, s)) +# define BOOST_PP_WHILE_30_I(p, o, s) BOOST_PP_IF(p(31, s), BOOST_PP_WHILE_31, s BOOST_PP_TUPLE_EAT_3)(p, o, o(31, s)) +# define BOOST_PP_WHILE_31_I(p, o, s) BOOST_PP_IF(p(32, s), BOOST_PP_WHILE_32, s BOOST_PP_TUPLE_EAT_3)(p, o, o(32, s)) +# define BOOST_PP_WHILE_32_I(p, o, s) BOOST_PP_IF(p(33, s), BOOST_PP_WHILE_33, s BOOST_PP_TUPLE_EAT_3)(p, o, o(33, s)) +# define BOOST_PP_WHILE_33_I(p, o, s) BOOST_PP_IF(p(34, s), BOOST_PP_WHILE_34, s BOOST_PP_TUPLE_EAT_3)(p, o, o(34, s)) +# define BOOST_PP_WHILE_34_I(p, o, s) BOOST_PP_IF(p(35, s), BOOST_PP_WHILE_35, s BOOST_PP_TUPLE_EAT_3)(p, o, o(35, s)) +# define BOOST_PP_WHILE_35_I(p, o, s) BOOST_PP_IF(p(36, s), BOOST_PP_WHILE_36, s BOOST_PP_TUPLE_EAT_3)(p, o, o(36, s)) +# define BOOST_PP_WHILE_36_I(p, o, s) BOOST_PP_IF(p(37, s), BOOST_PP_WHILE_37, s BOOST_PP_TUPLE_EAT_3)(p, o, o(37, s)) +# define BOOST_PP_WHILE_37_I(p, o, s) BOOST_PP_IF(p(38, s), BOOST_PP_WHILE_38, s BOOST_PP_TUPLE_EAT_3)(p, o, o(38, s)) +# define BOOST_PP_WHILE_38_I(p, o, s) BOOST_PP_IF(p(39, s), BOOST_PP_WHILE_39, s BOOST_PP_TUPLE_EAT_3)(p, o, o(39, s)) +# define BOOST_PP_WHILE_39_I(p, o, s) BOOST_PP_IF(p(40, s), BOOST_PP_WHILE_40, s BOOST_PP_TUPLE_EAT_3)(p, o, o(40, s)) +# define BOOST_PP_WHILE_40_I(p, o, s) BOOST_PP_IF(p(41, s), BOOST_PP_WHILE_41, s BOOST_PP_TUPLE_EAT_3)(p, o, o(41, s)) +# define BOOST_PP_WHILE_41_I(p, o, s) BOOST_PP_IF(p(42, s), BOOST_PP_WHILE_42, s BOOST_PP_TUPLE_EAT_3)(p, o, o(42, s)) +# define BOOST_PP_WHILE_42_I(p, o, s) BOOST_PP_IF(p(43, s), BOOST_PP_WHILE_43, s BOOST_PP_TUPLE_EAT_3)(p, o, o(43, s)) +# define BOOST_PP_WHILE_43_I(p, o, s) BOOST_PP_IF(p(44, s), BOOST_PP_WHILE_44, s BOOST_PP_TUPLE_EAT_3)(p, o, o(44, s)) +# define BOOST_PP_WHILE_44_I(p, o, s) BOOST_PP_IF(p(45, s), BOOST_PP_WHILE_45, s BOOST_PP_TUPLE_EAT_3)(p, o, o(45, s)) +# define BOOST_PP_WHILE_45_I(p, o, s) BOOST_PP_IF(p(46, s), BOOST_PP_WHILE_46, s BOOST_PP_TUPLE_EAT_3)(p, o, o(46, s)) +# define BOOST_PP_WHILE_46_I(p, o, s) BOOST_PP_IF(p(47, s), BOOST_PP_WHILE_47, s BOOST_PP_TUPLE_EAT_3)(p, o, o(47, s)) +# define BOOST_PP_WHILE_47_I(p, o, s) BOOST_PP_IF(p(48, s), BOOST_PP_WHILE_48, s BOOST_PP_TUPLE_EAT_3)(p, o, o(48, s)) +# define BOOST_PP_WHILE_48_I(p, o, s) BOOST_PP_IF(p(49, s), BOOST_PP_WHILE_49, s BOOST_PP_TUPLE_EAT_3)(p, o, o(49, s)) +# define BOOST_PP_WHILE_49_I(p, o, s) BOOST_PP_IF(p(50, s), BOOST_PP_WHILE_50, s BOOST_PP_TUPLE_EAT_3)(p, o, o(50, s)) +# define BOOST_PP_WHILE_50_I(p, o, s) BOOST_PP_IF(p(51, s), BOOST_PP_WHILE_51, s BOOST_PP_TUPLE_EAT_3)(p, o, o(51, s)) +# define BOOST_PP_WHILE_51_I(p, o, s) BOOST_PP_IF(p(52, s), BOOST_PP_WHILE_52, s BOOST_PP_TUPLE_EAT_3)(p, o, o(52, s)) +# define BOOST_PP_WHILE_52_I(p, o, s) BOOST_PP_IF(p(53, s), BOOST_PP_WHILE_53, s BOOST_PP_TUPLE_EAT_3)(p, o, o(53, s)) +# define BOOST_PP_WHILE_53_I(p, o, s) BOOST_PP_IF(p(54, s), BOOST_PP_WHILE_54, s BOOST_PP_TUPLE_EAT_3)(p, o, o(54, s)) +# define BOOST_PP_WHILE_54_I(p, o, s) BOOST_PP_IF(p(55, s), BOOST_PP_WHILE_55, s BOOST_PP_TUPLE_EAT_3)(p, o, o(55, s)) +# define BOOST_PP_WHILE_55_I(p, o, s) BOOST_PP_IF(p(56, s), BOOST_PP_WHILE_56, s BOOST_PP_TUPLE_EAT_3)(p, o, o(56, s)) +# define BOOST_PP_WHILE_56_I(p, o, s) BOOST_PP_IF(p(57, s), BOOST_PP_WHILE_57, s BOOST_PP_TUPLE_EAT_3)(p, o, o(57, s)) +# define BOOST_PP_WHILE_57_I(p, o, s) BOOST_PP_IF(p(58, s), BOOST_PP_WHILE_58, s BOOST_PP_TUPLE_EAT_3)(p, o, o(58, s)) +# define BOOST_PP_WHILE_58_I(p, o, s) BOOST_PP_IF(p(59, s), BOOST_PP_WHILE_59, s BOOST_PP_TUPLE_EAT_3)(p, o, o(59, s)) +# define BOOST_PP_WHILE_59_I(p, o, s) BOOST_PP_IF(p(60, s), BOOST_PP_WHILE_60, s BOOST_PP_TUPLE_EAT_3)(p, o, o(60, s)) +# define BOOST_PP_WHILE_60_I(p, o, s) BOOST_PP_IF(p(61, s), BOOST_PP_WHILE_61, s BOOST_PP_TUPLE_EAT_3)(p, o, o(61, s)) +# define BOOST_PP_WHILE_61_I(p, o, s) BOOST_PP_IF(p(62, s), BOOST_PP_WHILE_62, s BOOST_PP_TUPLE_EAT_3)(p, o, o(62, s)) +# define BOOST_PP_WHILE_62_I(p, o, s) BOOST_PP_IF(p(63, s), BOOST_PP_WHILE_63, s BOOST_PP_TUPLE_EAT_3)(p, o, o(63, s)) +# define BOOST_PP_WHILE_63_I(p, o, s) BOOST_PP_IF(p(64, s), BOOST_PP_WHILE_64, s BOOST_PP_TUPLE_EAT_3)(p, o, o(64, s)) +# define BOOST_PP_WHILE_64_I(p, o, s) BOOST_PP_IF(p(65, s), BOOST_PP_WHILE_65, s BOOST_PP_TUPLE_EAT_3)(p, o, o(65, s)) +# define BOOST_PP_WHILE_65_I(p, o, s) BOOST_PP_IF(p(66, s), BOOST_PP_WHILE_66, s BOOST_PP_TUPLE_EAT_3)(p, o, o(66, s)) +# define BOOST_PP_WHILE_66_I(p, o, s) BOOST_PP_IF(p(67, s), BOOST_PP_WHILE_67, s BOOST_PP_TUPLE_EAT_3)(p, o, o(67, s)) +# define BOOST_PP_WHILE_67_I(p, o, s) BOOST_PP_IF(p(68, s), BOOST_PP_WHILE_68, s BOOST_PP_TUPLE_EAT_3)(p, o, o(68, s)) +# define BOOST_PP_WHILE_68_I(p, o, s) BOOST_PP_IF(p(69, s), BOOST_PP_WHILE_69, s BOOST_PP_TUPLE_EAT_3)(p, o, o(69, s)) +# define BOOST_PP_WHILE_69_I(p, o, s) BOOST_PP_IF(p(70, s), BOOST_PP_WHILE_70, s BOOST_PP_TUPLE_EAT_3)(p, o, o(70, s)) +# define BOOST_PP_WHILE_70_I(p, o, s) BOOST_PP_IF(p(71, s), BOOST_PP_WHILE_71, s BOOST_PP_TUPLE_EAT_3)(p, o, o(71, s)) +# define BOOST_PP_WHILE_71_I(p, o, s) BOOST_PP_IF(p(72, s), BOOST_PP_WHILE_72, s BOOST_PP_TUPLE_EAT_3)(p, o, o(72, s)) +# define BOOST_PP_WHILE_72_I(p, o, s) BOOST_PP_IF(p(73, s), BOOST_PP_WHILE_73, s BOOST_PP_TUPLE_EAT_3)(p, o, o(73, s)) +# define BOOST_PP_WHILE_73_I(p, o, s) BOOST_PP_IF(p(74, s), BOOST_PP_WHILE_74, s BOOST_PP_TUPLE_EAT_3)(p, o, o(74, s)) +# define BOOST_PP_WHILE_74_I(p, o, s) BOOST_PP_IF(p(75, s), BOOST_PP_WHILE_75, s BOOST_PP_TUPLE_EAT_3)(p, o, o(75, s)) +# define BOOST_PP_WHILE_75_I(p, o, s) BOOST_PP_IF(p(76, s), BOOST_PP_WHILE_76, s BOOST_PP_TUPLE_EAT_3)(p, o, o(76, s)) +# define BOOST_PP_WHILE_76_I(p, o, s) BOOST_PP_IF(p(77, s), BOOST_PP_WHILE_77, s BOOST_PP_TUPLE_EAT_3)(p, o, o(77, s)) +# define BOOST_PP_WHILE_77_I(p, o, s) BOOST_PP_IF(p(78, s), BOOST_PP_WHILE_78, s BOOST_PP_TUPLE_EAT_3)(p, o, o(78, s)) +# define BOOST_PP_WHILE_78_I(p, o, s) BOOST_PP_IF(p(79, s), BOOST_PP_WHILE_79, s BOOST_PP_TUPLE_EAT_3)(p, o, o(79, s)) +# define BOOST_PP_WHILE_79_I(p, o, s) BOOST_PP_IF(p(80, s), BOOST_PP_WHILE_80, s BOOST_PP_TUPLE_EAT_3)(p, o, o(80, s)) +# define BOOST_PP_WHILE_80_I(p, o, s) BOOST_PP_IF(p(81, s), BOOST_PP_WHILE_81, s BOOST_PP_TUPLE_EAT_3)(p, o, o(81, s)) +# define BOOST_PP_WHILE_81_I(p, o, s) BOOST_PP_IF(p(82, s), BOOST_PP_WHILE_82, s BOOST_PP_TUPLE_EAT_3)(p, o, o(82, s)) +# define BOOST_PP_WHILE_82_I(p, o, s) BOOST_PP_IF(p(83, s), BOOST_PP_WHILE_83, s BOOST_PP_TUPLE_EAT_3)(p, o, o(83, s)) +# define BOOST_PP_WHILE_83_I(p, o, s) BOOST_PP_IF(p(84, s), BOOST_PP_WHILE_84, s BOOST_PP_TUPLE_EAT_3)(p, o, o(84, s)) +# define BOOST_PP_WHILE_84_I(p, o, s) BOOST_PP_IF(p(85, s), BOOST_PP_WHILE_85, s BOOST_PP_TUPLE_EAT_3)(p, o, o(85, s)) +# define BOOST_PP_WHILE_85_I(p, o, s) BOOST_PP_IF(p(86, s), BOOST_PP_WHILE_86, s BOOST_PP_TUPLE_EAT_3)(p, o, o(86, s)) +# define BOOST_PP_WHILE_86_I(p, o, s) BOOST_PP_IF(p(87, s), BOOST_PP_WHILE_87, s BOOST_PP_TUPLE_EAT_3)(p, o, o(87, s)) +# define BOOST_PP_WHILE_87_I(p, o, s) BOOST_PP_IF(p(88, s), BOOST_PP_WHILE_88, s BOOST_PP_TUPLE_EAT_3)(p, o, o(88, s)) +# define BOOST_PP_WHILE_88_I(p, o, s) BOOST_PP_IF(p(89, s), BOOST_PP_WHILE_89, s BOOST_PP_TUPLE_EAT_3)(p, o, o(89, s)) +# define BOOST_PP_WHILE_89_I(p, o, s) BOOST_PP_IF(p(90, s), BOOST_PP_WHILE_90, s BOOST_PP_TUPLE_EAT_3)(p, o, o(90, s)) +# define BOOST_PP_WHILE_90_I(p, o, s) BOOST_PP_IF(p(91, s), BOOST_PP_WHILE_91, s BOOST_PP_TUPLE_EAT_3)(p, o, o(91, s)) +# define BOOST_PP_WHILE_91_I(p, o, s) BOOST_PP_IF(p(92, s), BOOST_PP_WHILE_92, s BOOST_PP_TUPLE_EAT_3)(p, o, o(92, s)) +# define BOOST_PP_WHILE_92_I(p, o, s) BOOST_PP_IF(p(93, s), BOOST_PP_WHILE_93, s BOOST_PP_TUPLE_EAT_3)(p, o, o(93, s)) +# define BOOST_PP_WHILE_93_I(p, o, s) BOOST_PP_IF(p(94, s), BOOST_PP_WHILE_94, s BOOST_PP_TUPLE_EAT_3)(p, o, o(94, s)) +# define BOOST_PP_WHILE_94_I(p, o, s) BOOST_PP_IF(p(95, s), BOOST_PP_WHILE_95, s BOOST_PP_TUPLE_EAT_3)(p, o, o(95, s)) +# define BOOST_PP_WHILE_95_I(p, o, s) BOOST_PP_IF(p(96, s), BOOST_PP_WHILE_96, s BOOST_PP_TUPLE_EAT_3)(p, o, o(96, s)) +# define BOOST_PP_WHILE_96_I(p, o, s) BOOST_PP_IF(p(97, s), BOOST_PP_WHILE_97, s BOOST_PP_TUPLE_EAT_3)(p, o, o(97, s)) +# define BOOST_PP_WHILE_97_I(p, o, s) BOOST_PP_IF(p(98, s), BOOST_PP_WHILE_98, s BOOST_PP_TUPLE_EAT_3)(p, o, o(98, s)) +# define BOOST_PP_WHILE_98_I(p, o, s) BOOST_PP_IF(p(99, s), BOOST_PP_WHILE_99, s BOOST_PP_TUPLE_EAT_3)(p, o, o(99, s)) +# define BOOST_PP_WHILE_99_I(p, o, s) BOOST_PP_IF(p(100, s), BOOST_PP_WHILE_100, s BOOST_PP_TUPLE_EAT_3)(p, o, o(100, s)) +# define BOOST_PP_WHILE_100_I(p, o, s) BOOST_PP_IF(p(101, s), BOOST_PP_WHILE_101, s BOOST_PP_TUPLE_EAT_3)(p, o, o(101, s)) +# define BOOST_PP_WHILE_101_I(p, o, s) BOOST_PP_IF(p(102, s), BOOST_PP_WHILE_102, s BOOST_PP_TUPLE_EAT_3)(p, o, o(102, s)) +# define BOOST_PP_WHILE_102_I(p, o, s) BOOST_PP_IF(p(103, s), BOOST_PP_WHILE_103, s BOOST_PP_TUPLE_EAT_3)(p, o, o(103, s)) +# define BOOST_PP_WHILE_103_I(p, o, s) BOOST_PP_IF(p(104, s), BOOST_PP_WHILE_104, s BOOST_PP_TUPLE_EAT_3)(p, o, o(104, s)) +# define BOOST_PP_WHILE_104_I(p, o, s) BOOST_PP_IF(p(105, s), BOOST_PP_WHILE_105, s BOOST_PP_TUPLE_EAT_3)(p, o, o(105, s)) +# define BOOST_PP_WHILE_105_I(p, o, s) BOOST_PP_IF(p(106, s), BOOST_PP_WHILE_106, s BOOST_PP_TUPLE_EAT_3)(p, o, o(106, s)) +# define BOOST_PP_WHILE_106_I(p, o, s) BOOST_PP_IF(p(107, s), BOOST_PP_WHILE_107, s BOOST_PP_TUPLE_EAT_3)(p, o, o(107, s)) +# define BOOST_PP_WHILE_107_I(p, o, s) BOOST_PP_IF(p(108, s), BOOST_PP_WHILE_108, s BOOST_PP_TUPLE_EAT_3)(p, o, o(108, s)) +# define BOOST_PP_WHILE_108_I(p, o, s) BOOST_PP_IF(p(109, s), BOOST_PP_WHILE_109, s BOOST_PP_TUPLE_EAT_3)(p, o, o(109, s)) +# define BOOST_PP_WHILE_109_I(p, o, s) BOOST_PP_IF(p(110, s), BOOST_PP_WHILE_110, s BOOST_PP_TUPLE_EAT_3)(p, o, o(110, s)) +# define BOOST_PP_WHILE_110_I(p, o, s) BOOST_PP_IF(p(111, s), BOOST_PP_WHILE_111, s BOOST_PP_TUPLE_EAT_3)(p, o, o(111, s)) +# define BOOST_PP_WHILE_111_I(p, o, s) BOOST_PP_IF(p(112, s), BOOST_PP_WHILE_112, s BOOST_PP_TUPLE_EAT_3)(p, o, o(112, s)) +# define BOOST_PP_WHILE_112_I(p, o, s) BOOST_PP_IF(p(113, s), BOOST_PP_WHILE_113, s BOOST_PP_TUPLE_EAT_3)(p, o, o(113, s)) +# define BOOST_PP_WHILE_113_I(p, o, s) BOOST_PP_IF(p(114, s), BOOST_PP_WHILE_114, s BOOST_PP_TUPLE_EAT_3)(p, o, o(114, s)) +# define BOOST_PP_WHILE_114_I(p, o, s) BOOST_PP_IF(p(115, s), BOOST_PP_WHILE_115, s BOOST_PP_TUPLE_EAT_3)(p, o, o(115, s)) +# define BOOST_PP_WHILE_115_I(p, o, s) BOOST_PP_IF(p(116, s), BOOST_PP_WHILE_116, s BOOST_PP_TUPLE_EAT_3)(p, o, o(116, s)) +# define BOOST_PP_WHILE_116_I(p, o, s) BOOST_PP_IF(p(117, s), BOOST_PP_WHILE_117, s BOOST_PP_TUPLE_EAT_3)(p, o, o(117, s)) +# define BOOST_PP_WHILE_117_I(p, o, s) BOOST_PP_IF(p(118, s), BOOST_PP_WHILE_118, s BOOST_PP_TUPLE_EAT_3)(p, o, o(118, s)) +# define BOOST_PP_WHILE_118_I(p, o, s) BOOST_PP_IF(p(119, s), BOOST_PP_WHILE_119, s BOOST_PP_TUPLE_EAT_3)(p, o, o(119, s)) +# define BOOST_PP_WHILE_119_I(p, o, s) BOOST_PP_IF(p(120, s), BOOST_PP_WHILE_120, s BOOST_PP_TUPLE_EAT_3)(p, o, o(120, s)) +# define BOOST_PP_WHILE_120_I(p, o, s) BOOST_PP_IF(p(121, s), BOOST_PP_WHILE_121, s BOOST_PP_TUPLE_EAT_3)(p, o, o(121, s)) +# define BOOST_PP_WHILE_121_I(p, o, s) BOOST_PP_IF(p(122, s), BOOST_PP_WHILE_122, s BOOST_PP_TUPLE_EAT_3)(p, o, o(122, s)) +# define BOOST_PP_WHILE_122_I(p, o, s) BOOST_PP_IF(p(123, s), BOOST_PP_WHILE_123, s BOOST_PP_TUPLE_EAT_3)(p, o, o(123, s)) +# define BOOST_PP_WHILE_123_I(p, o, s) BOOST_PP_IF(p(124, s), BOOST_PP_WHILE_124, s BOOST_PP_TUPLE_EAT_3)(p, o, o(124, s)) +# define BOOST_PP_WHILE_124_I(p, o, s) BOOST_PP_IF(p(125, s), BOOST_PP_WHILE_125, s BOOST_PP_TUPLE_EAT_3)(p, o, o(125, s)) +# define BOOST_PP_WHILE_125_I(p, o, s) BOOST_PP_IF(p(126, s), BOOST_PP_WHILE_126, s BOOST_PP_TUPLE_EAT_3)(p, o, o(126, s)) +# define BOOST_PP_WHILE_126_I(p, o, s) BOOST_PP_IF(p(127, s), BOOST_PP_WHILE_127, s BOOST_PP_TUPLE_EAT_3)(p, o, o(127, s)) +# define BOOST_PP_WHILE_127_I(p, o, s) BOOST_PP_IF(p(128, s), BOOST_PP_WHILE_128, s BOOST_PP_TUPLE_EAT_3)(p, o, o(128, s)) +# define BOOST_PP_WHILE_128_I(p, o, s) BOOST_PP_IF(p(129, s), BOOST_PP_WHILE_129, s BOOST_PP_TUPLE_EAT_3)(p, o, o(129, s)) +# define BOOST_PP_WHILE_129_I(p, o, s) BOOST_PP_IF(p(130, s), BOOST_PP_WHILE_130, s BOOST_PP_TUPLE_EAT_3)(p, o, o(130, s)) +# define BOOST_PP_WHILE_130_I(p, o, s) BOOST_PP_IF(p(131, s), BOOST_PP_WHILE_131, s BOOST_PP_TUPLE_EAT_3)(p, o, o(131, s)) +# define BOOST_PP_WHILE_131_I(p, o, s) BOOST_PP_IF(p(132, s), BOOST_PP_WHILE_132, s BOOST_PP_TUPLE_EAT_3)(p, o, o(132, s)) +# define BOOST_PP_WHILE_132_I(p, o, s) BOOST_PP_IF(p(133, s), BOOST_PP_WHILE_133, s BOOST_PP_TUPLE_EAT_3)(p, o, o(133, s)) +# define BOOST_PP_WHILE_133_I(p, o, s) BOOST_PP_IF(p(134, s), BOOST_PP_WHILE_134, s BOOST_PP_TUPLE_EAT_3)(p, o, o(134, s)) +# define BOOST_PP_WHILE_134_I(p, o, s) BOOST_PP_IF(p(135, s), BOOST_PP_WHILE_135, s BOOST_PP_TUPLE_EAT_3)(p, o, o(135, s)) +# define BOOST_PP_WHILE_135_I(p, o, s) BOOST_PP_IF(p(136, s), BOOST_PP_WHILE_136, s BOOST_PP_TUPLE_EAT_3)(p, o, o(136, s)) +# define BOOST_PP_WHILE_136_I(p, o, s) BOOST_PP_IF(p(137, s), BOOST_PP_WHILE_137, s BOOST_PP_TUPLE_EAT_3)(p, o, o(137, s)) +# define BOOST_PP_WHILE_137_I(p, o, s) BOOST_PP_IF(p(138, s), BOOST_PP_WHILE_138, s BOOST_PP_TUPLE_EAT_3)(p, o, o(138, s)) +# define BOOST_PP_WHILE_138_I(p, o, s) BOOST_PP_IF(p(139, s), BOOST_PP_WHILE_139, s BOOST_PP_TUPLE_EAT_3)(p, o, o(139, s)) +# define BOOST_PP_WHILE_139_I(p, o, s) BOOST_PP_IF(p(140, s), BOOST_PP_WHILE_140, s BOOST_PP_TUPLE_EAT_3)(p, o, o(140, s)) +# define BOOST_PP_WHILE_140_I(p, o, s) BOOST_PP_IF(p(141, s), BOOST_PP_WHILE_141, s BOOST_PP_TUPLE_EAT_3)(p, o, o(141, s)) +# define BOOST_PP_WHILE_141_I(p, o, s) BOOST_PP_IF(p(142, s), BOOST_PP_WHILE_142, s BOOST_PP_TUPLE_EAT_3)(p, o, o(142, s)) +# define BOOST_PP_WHILE_142_I(p, o, s) BOOST_PP_IF(p(143, s), BOOST_PP_WHILE_143, s BOOST_PP_TUPLE_EAT_3)(p, o, o(143, s)) +# define BOOST_PP_WHILE_143_I(p, o, s) BOOST_PP_IF(p(144, s), BOOST_PP_WHILE_144, s BOOST_PP_TUPLE_EAT_3)(p, o, o(144, s)) +# define BOOST_PP_WHILE_144_I(p, o, s) BOOST_PP_IF(p(145, s), BOOST_PP_WHILE_145, s BOOST_PP_TUPLE_EAT_3)(p, o, o(145, s)) +# define BOOST_PP_WHILE_145_I(p, o, s) BOOST_PP_IF(p(146, s), BOOST_PP_WHILE_146, s BOOST_PP_TUPLE_EAT_3)(p, o, o(146, s)) +# define BOOST_PP_WHILE_146_I(p, o, s) BOOST_PP_IF(p(147, s), BOOST_PP_WHILE_147, s BOOST_PP_TUPLE_EAT_3)(p, o, o(147, s)) +# define BOOST_PP_WHILE_147_I(p, o, s) BOOST_PP_IF(p(148, s), BOOST_PP_WHILE_148, s BOOST_PP_TUPLE_EAT_3)(p, o, o(148, s)) +# define BOOST_PP_WHILE_148_I(p, o, s) BOOST_PP_IF(p(149, s), BOOST_PP_WHILE_149, s BOOST_PP_TUPLE_EAT_3)(p, o, o(149, s)) +# define BOOST_PP_WHILE_149_I(p, o, s) BOOST_PP_IF(p(150, s), BOOST_PP_WHILE_150, s BOOST_PP_TUPLE_EAT_3)(p, o, o(150, s)) +# define BOOST_PP_WHILE_150_I(p, o, s) BOOST_PP_IF(p(151, s), BOOST_PP_WHILE_151, s BOOST_PP_TUPLE_EAT_3)(p, o, o(151, s)) +# define BOOST_PP_WHILE_151_I(p, o, s) BOOST_PP_IF(p(152, s), BOOST_PP_WHILE_152, s BOOST_PP_TUPLE_EAT_3)(p, o, o(152, s)) +# define BOOST_PP_WHILE_152_I(p, o, s) BOOST_PP_IF(p(153, s), BOOST_PP_WHILE_153, s BOOST_PP_TUPLE_EAT_3)(p, o, o(153, s)) +# define BOOST_PP_WHILE_153_I(p, o, s) BOOST_PP_IF(p(154, s), BOOST_PP_WHILE_154, s BOOST_PP_TUPLE_EAT_3)(p, o, o(154, s)) +# define BOOST_PP_WHILE_154_I(p, o, s) BOOST_PP_IF(p(155, s), BOOST_PP_WHILE_155, s BOOST_PP_TUPLE_EAT_3)(p, o, o(155, s)) +# define BOOST_PP_WHILE_155_I(p, o, s) BOOST_PP_IF(p(156, s), BOOST_PP_WHILE_156, s BOOST_PP_TUPLE_EAT_3)(p, o, o(156, s)) +# define BOOST_PP_WHILE_156_I(p, o, s) BOOST_PP_IF(p(157, s), BOOST_PP_WHILE_157, s BOOST_PP_TUPLE_EAT_3)(p, o, o(157, s)) +# define BOOST_PP_WHILE_157_I(p, o, s) BOOST_PP_IF(p(158, s), BOOST_PP_WHILE_158, s BOOST_PP_TUPLE_EAT_3)(p, o, o(158, s)) +# define BOOST_PP_WHILE_158_I(p, o, s) BOOST_PP_IF(p(159, s), BOOST_PP_WHILE_159, s BOOST_PP_TUPLE_EAT_3)(p, o, o(159, s)) +# define BOOST_PP_WHILE_159_I(p, o, s) BOOST_PP_IF(p(160, s), BOOST_PP_WHILE_160, s BOOST_PP_TUPLE_EAT_3)(p, o, o(160, s)) +# define BOOST_PP_WHILE_160_I(p, o, s) BOOST_PP_IF(p(161, s), BOOST_PP_WHILE_161, s BOOST_PP_TUPLE_EAT_3)(p, o, o(161, s)) +# define BOOST_PP_WHILE_161_I(p, o, s) BOOST_PP_IF(p(162, s), BOOST_PP_WHILE_162, s BOOST_PP_TUPLE_EAT_3)(p, o, o(162, s)) +# define BOOST_PP_WHILE_162_I(p, o, s) BOOST_PP_IF(p(163, s), BOOST_PP_WHILE_163, s BOOST_PP_TUPLE_EAT_3)(p, o, o(163, s)) +# define BOOST_PP_WHILE_163_I(p, o, s) BOOST_PP_IF(p(164, s), BOOST_PP_WHILE_164, s BOOST_PP_TUPLE_EAT_3)(p, o, o(164, s)) +# define BOOST_PP_WHILE_164_I(p, o, s) BOOST_PP_IF(p(165, s), BOOST_PP_WHILE_165, s BOOST_PP_TUPLE_EAT_3)(p, o, o(165, s)) +# define BOOST_PP_WHILE_165_I(p, o, s) BOOST_PP_IF(p(166, s), BOOST_PP_WHILE_166, s BOOST_PP_TUPLE_EAT_3)(p, o, o(166, s)) +# define BOOST_PP_WHILE_166_I(p, o, s) BOOST_PP_IF(p(167, s), BOOST_PP_WHILE_167, s BOOST_PP_TUPLE_EAT_3)(p, o, o(167, s)) +# define BOOST_PP_WHILE_167_I(p, o, s) BOOST_PP_IF(p(168, s), BOOST_PP_WHILE_168, s BOOST_PP_TUPLE_EAT_3)(p, o, o(168, s)) +# define BOOST_PP_WHILE_168_I(p, o, s) BOOST_PP_IF(p(169, s), BOOST_PP_WHILE_169, s BOOST_PP_TUPLE_EAT_3)(p, o, o(169, s)) +# define BOOST_PP_WHILE_169_I(p, o, s) BOOST_PP_IF(p(170, s), BOOST_PP_WHILE_170, s BOOST_PP_TUPLE_EAT_3)(p, o, o(170, s)) +# define BOOST_PP_WHILE_170_I(p, o, s) BOOST_PP_IF(p(171, s), BOOST_PP_WHILE_171, s BOOST_PP_TUPLE_EAT_3)(p, o, o(171, s)) +# define BOOST_PP_WHILE_171_I(p, o, s) BOOST_PP_IF(p(172, s), BOOST_PP_WHILE_172, s BOOST_PP_TUPLE_EAT_3)(p, o, o(172, s)) +# define BOOST_PP_WHILE_172_I(p, o, s) BOOST_PP_IF(p(173, s), BOOST_PP_WHILE_173, s BOOST_PP_TUPLE_EAT_3)(p, o, o(173, s)) +# define BOOST_PP_WHILE_173_I(p, o, s) BOOST_PP_IF(p(174, s), BOOST_PP_WHILE_174, s BOOST_PP_TUPLE_EAT_3)(p, o, o(174, s)) +# define BOOST_PP_WHILE_174_I(p, o, s) BOOST_PP_IF(p(175, s), BOOST_PP_WHILE_175, s BOOST_PP_TUPLE_EAT_3)(p, o, o(175, s)) +# define BOOST_PP_WHILE_175_I(p, o, s) BOOST_PP_IF(p(176, s), BOOST_PP_WHILE_176, s BOOST_PP_TUPLE_EAT_3)(p, o, o(176, s)) +# define BOOST_PP_WHILE_176_I(p, o, s) BOOST_PP_IF(p(177, s), BOOST_PP_WHILE_177, s BOOST_PP_TUPLE_EAT_3)(p, o, o(177, s)) +# define BOOST_PP_WHILE_177_I(p, o, s) BOOST_PP_IF(p(178, s), BOOST_PP_WHILE_178, s BOOST_PP_TUPLE_EAT_3)(p, o, o(178, s)) +# define BOOST_PP_WHILE_178_I(p, o, s) BOOST_PP_IF(p(179, s), BOOST_PP_WHILE_179, s BOOST_PP_TUPLE_EAT_3)(p, o, o(179, s)) +# define BOOST_PP_WHILE_179_I(p, o, s) BOOST_PP_IF(p(180, s), BOOST_PP_WHILE_180, s BOOST_PP_TUPLE_EAT_3)(p, o, o(180, s)) +# define BOOST_PP_WHILE_180_I(p, o, s) BOOST_PP_IF(p(181, s), BOOST_PP_WHILE_181, s BOOST_PP_TUPLE_EAT_3)(p, o, o(181, s)) +# define BOOST_PP_WHILE_181_I(p, o, s) BOOST_PP_IF(p(182, s), BOOST_PP_WHILE_182, s BOOST_PP_TUPLE_EAT_3)(p, o, o(182, s)) +# define BOOST_PP_WHILE_182_I(p, o, s) BOOST_PP_IF(p(183, s), BOOST_PP_WHILE_183, s BOOST_PP_TUPLE_EAT_3)(p, o, o(183, s)) +# define BOOST_PP_WHILE_183_I(p, o, s) BOOST_PP_IF(p(184, s), BOOST_PP_WHILE_184, s BOOST_PP_TUPLE_EAT_3)(p, o, o(184, s)) +# define BOOST_PP_WHILE_184_I(p, o, s) BOOST_PP_IF(p(185, s), BOOST_PP_WHILE_185, s BOOST_PP_TUPLE_EAT_3)(p, o, o(185, s)) +# define BOOST_PP_WHILE_185_I(p, o, s) BOOST_PP_IF(p(186, s), BOOST_PP_WHILE_186, s BOOST_PP_TUPLE_EAT_3)(p, o, o(186, s)) +# define BOOST_PP_WHILE_186_I(p, o, s) BOOST_PP_IF(p(187, s), BOOST_PP_WHILE_187, s BOOST_PP_TUPLE_EAT_3)(p, o, o(187, s)) +# define BOOST_PP_WHILE_187_I(p, o, s) BOOST_PP_IF(p(188, s), BOOST_PP_WHILE_188, s BOOST_PP_TUPLE_EAT_3)(p, o, o(188, s)) +# define BOOST_PP_WHILE_188_I(p, o, s) BOOST_PP_IF(p(189, s), BOOST_PP_WHILE_189, s BOOST_PP_TUPLE_EAT_3)(p, o, o(189, s)) +# define BOOST_PP_WHILE_189_I(p, o, s) BOOST_PP_IF(p(190, s), BOOST_PP_WHILE_190, s BOOST_PP_TUPLE_EAT_3)(p, o, o(190, s)) +# define BOOST_PP_WHILE_190_I(p, o, s) BOOST_PP_IF(p(191, s), BOOST_PP_WHILE_191, s BOOST_PP_TUPLE_EAT_3)(p, o, o(191, s)) +# define BOOST_PP_WHILE_191_I(p, o, s) BOOST_PP_IF(p(192, s), BOOST_PP_WHILE_192, s BOOST_PP_TUPLE_EAT_3)(p, o, o(192, s)) +# define BOOST_PP_WHILE_192_I(p, o, s) BOOST_PP_IF(p(193, s), BOOST_PP_WHILE_193, s BOOST_PP_TUPLE_EAT_3)(p, o, o(193, s)) +# define BOOST_PP_WHILE_193_I(p, o, s) BOOST_PP_IF(p(194, s), BOOST_PP_WHILE_194, s BOOST_PP_TUPLE_EAT_3)(p, o, o(194, s)) +# define BOOST_PP_WHILE_194_I(p, o, s) BOOST_PP_IF(p(195, s), BOOST_PP_WHILE_195, s BOOST_PP_TUPLE_EAT_3)(p, o, o(195, s)) +# define BOOST_PP_WHILE_195_I(p, o, s) BOOST_PP_IF(p(196, s), BOOST_PP_WHILE_196, s BOOST_PP_TUPLE_EAT_3)(p, o, o(196, s)) +# define BOOST_PP_WHILE_196_I(p, o, s) BOOST_PP_IF(p(197, s), BOOST_PP_WHILE_197, s BOOST_PP_TUPLE_EAT_3)(p, o, o(197, s)) +# define BOOST_PP_WHILE_197_I(p, o, s) BOOST_PP_IF(p(198, s), BOOST_PP_WHILE_198, s BOOST_PP_TUPLE_EAT_3)(p, o, o(198, s)) +# define BOOST_PP_WHILE_198_I(p, o, s) BOOST_PP_IF(p(199, s), BOOST_PP_WHILE_199, s BOOST_PP_TUPLE_EAT_3)(p, o, o(199, s)) +# define BOOST_PP_WHILE_199_I(p, o, s) BOOST_PP_IF(p(200, s), BOOST_PP_WHILE_200, s BOOST_PP_TUPLE_EAT_3)(p, o, o(200, s)) +# define BOOST_PP_WHILE_200_I(p, o, s) BOOST_PP_IF(p(201, s), BOOST_PP_WHILE_201, s BOOST_PP_TUPLE_EAT_3)(p, o, o(201, s)) +# define BOOST_PP_WHILE_201_I(p, o, s) BOOST_PP_IF(p(202, s), BOOST_PP_WHILE_202, s BOOST_PP_TUPLE_EAT_3)(p, o, o(202, s)) +# define BOOST_PP_WHILE_202_I(p, o, s) BOOST_PP_IF(p(203, s), BOOST_PP_WHILE_203, s BOOST_PP_TUPLE_EAT_3)(p, o, o(203, s)) +# define BOOST_PP_WHILE_203_I(p, o, s) BOOST_PP_IF(p(204, s), BOOST_PP_WHILE_204, s BOOST_PP_TUPLE_EAT_3)(p, o, o(204, s)) +# define BOOST_PP_WHILE_204_I(p, o, s) BOOST_PP_IF(p(205, s), BOOST_PP_WHILE_205, s BOOST_PP_TUPLE_EAT_3)(p, o, o(205, s)) +# define BOOST_PP_WHILE_205_I(p, o, s) BOOST_PP_IF(p(206, s), BOOST_PP_WHILE_206, s BOOST_PP_TUPLE_EAT_3)(p, o, o(206, s)) +# define BOOST_PP_WHILE_206_I(p, o, s) BOOST_PP_IF(p(207, s), BOOST_PP_WHILE_207, s BOOST_PP_TUPLE_EAT_3)(p, o, o(207, s)) +# define BOOST_PP_WHILE_207_I(p, o, s) BOOST_PP_IF(p(208, s), BOOST_PP_WHILE_208, s BOOST_PP_TUPLE_EAT_3)(p, o, o(208, s)) +# define BOOST_PP_WHILE_208_I(p, o, s) BOOST_PP_IF(p(209, s), BOOST_PP_WHILE_209, s BOOST_PP_TUPLE_EAT_3)(p, o, o(209, s)) +# define BOOST_PP_WHILE_209_I(p, o, s) BOOST_PP_IF(p(210, s), BOOST_PP_WHILE_210, s BOOST_PP_TUPLE_EAT_3)(p, o, o(210, s)) +# define BOOST_PP_WHILE_210_I(p, o, s) BOOST_PP_IF(p(211, s), BOOST_PP_WHILE_211, s BOOST_PP_TUPLE_EAT_3)(p, o, o(211, s)) +# define BOOST_PP_WHILE_211_I(p, o, s) BOOST_PP_IF(p(212, s), BOOST_PP_WHILE_212, s BOOST_PP_TUPLE_EAT_3)(p, o, o(212, s)) +# define BOOST_PP_WHILE_212_I(p, o, s) BOOST_PP_IF(p(213, s), BOOST_PP_WHILE_213, s BOOST_PP_TUPLE_EAT_3)(p, o, o(213, s)) +# define BOOST_PP_WHILE_213_I(p, o, s) BOOST_PP_IF(p(214, s), BOOST_PP_WHILE_214, s BOOST_PP_TUPLE_EAT_3)(p, o, o(214, s)) +# define BOOST_PP_WHILE_214_I(p, o, s) BOOST_PP_IF(p(215, s), BOOST_PP_WHILE_215, s BOOST_PP_TUPLE_EAT_3)(p, o, o(215, s)) +# define BOOST_PP_WHILE_215_I(p, o, s) BOOST_PP_IF(p(216, s), BOOST_PP_WHILE_216, s BOOST_PP_TUPLE_EAT_3)(p, o, o(216, s)) +# define BOOST_PP_WHILE_216_I(p, o, s) BOOST_PP_IF(p(217, s), BOOST_PP_WHILE_217, s BOOST_PP_TUPLE_EAT_3)(p, o, o(217, s)) +# define BOOST_PP_WHILE_217_I(p, o, s) BOOST_PP_IF(p(218, s), BOOST_PP_WHILE_218, s BOOST_PP_TUPLE_EAT_3)(p, o, o(218, s)) +# define BOOST_PP_WHILE_218_I(p, o, s) BOOST_PP_IF(p(219, s), BOOST_PP_WHILE_219, s BOOST_PP_TUPLE_EAT_3)(p, o, o(219, s)) +# define BOOST_PP_WHILE_219_I(p, o, s) BOOST_PP_IF(p(220, s), BOOST_PP_WHILE_220, s BOOST_PP_TUPLE_EAT_3)(p, o, o(220, s)) +# define BOOST_PP_WHILE_220_I(p, o, s) BOOST_PP_IF(p(221, s), BOOST_PP_WHILE_221, s BOOST_PP_TUPLE_EAT_3)(p, o, o(221, s)) +# define BOOST_PP_WHILE_221_I(p, o, s) BOOST_PP_IF(p(222, s), BOOST_PP_WHILE_222, s BOOST_PP_TUPLE_EAT_3)(p, o, o(222, s)) +# define BOOST_PP_WHILE_222_I(p, o, s) BOOST_PP_IF(p(223, s), BOOST_PP_WHILE_223, s BOOST_PP_TUPLE_EAT_3)(p, o, o(223, s)) +# define BOOST_PP_WHILE_223_I(p, o, s) BOOST_PP_IF(p(224, s), BOOST_PP_WHILE_224, s BOOST_PP_TUPLE_EAT_3)(p, o, o(224, s)) +# define BOOST_PP_WHILE_224_I(p, o, s) BOOST_PP_IF(p(225, s), BOOST_PP_WHILE_225, s BOOST_PP_TUPLE_EAT_3)(p, o, o(225, s)) +# define BOOST_PP_WHILE_225_I(p, o, s) BOOST_PP_IF(p(226, s), BOOST_PP_WHILE_226, s BOOST_PP_TUPLE_EAT_3)(p, o, o(226, s)) +# define BOOST_PP_WHILE_226_I(p, o, s) BOOST_PP_IF(p(227, s), BOOST_PP_WHILE_227, s BOOST_PP_TUPLE_EAT_3)(p, o, o(227, s)) +# define BOOST_PP_WHILE_227_I(p, o, s) BOOST_PP_IF(p(228, s), BOOST_PP_WHILE_228, s BOOST_PP_TUPLE_EAT_3)(p, o, o(228, s)) +# define BOOST_PP_WHILE_228_I(p, o, s) BOOST_PP_IF(p(229, s), BOOST_PP_WHILE_229, s BOOST_PP_TUPLE_EAT_3)(p, o, o(229, s)) +# define BOOST_PP_WHILE_229_I(p, o, s) BOOST_PP_IF(p(230, s), BOOST_PP_WHILE_230, s BOOST_PP_TUPLE_EAT_3)(p, o, o(230, s)) +# define BOOST_PP_WHILE_230_I(p, o, s) BOOST_PP_IF(p(231, s), BOOST_PP_WHILE_231, s BOOST_PP_TUPLE_EAT_3)(p, o, o(231, s)) +# define BOOST_PP_WHILE_231_I(p, o, s) BOOST_PP_IF(p(232, s), BOOST_PP_WHILE_232, s BOOST_PP_TUPLE_EAT_3)(p, o, o(232, s)) +# define BOOST_PP_WHILE_232_I(p, o, s) BOOST_PP_IF(p(233, s), BOOST_PP_WHILE_233, s BOOST_PP_TUPLE_EAT_3)(p, o, o(233, s)) +# define BOOST_PP_WHILE_233_I(p, o, s) BOOST_PP_IF(p(234, s), BOOST_PP_WHILE_234, s BOOST_PP_TUPLE_EAT_3)(p, o, o(234, s)) +# define BOOST_PP_WHILE_234_I(p, o, s) BOOST_PP_IF(p(235, s), BOOST_PP_WHILE_235, s BOOST_PP_TUPLE_EAT_3)(p, o, o(235, s)) +# define BOOST_PP_WHILE_235_I(p, o, s) BOOST_PP_IF(p(236, s), BOOST_PP_WHILE_236, s BOOST_PP_TUPLE_EAT_3)(p, o, o(236, s)) +# define BOOST_PP_WHILE_236_I(p, o, s) BOOST_PP_IF(p(237, s), BOOST_PP_WHILE_237, s BOOST_PP_TUPLE_EAT_3)(p, o, o(237, s)) +# define BOOST_PP_WHILE_237_I(p, o, s) BOOST_PP_IF(p(238, s), BOOST_PP_WHILE_238, s BOOST_PP_TUPLE_EAT_3)(p, o, o(238, s)) +# define BOOST_PP_WHILE_238_I(p, o, s) BOOST_PP_IF(p(239, s), BOOST_PP_WHILE_239, s BOOST_PP_TUPLE_EAT_3)(p, o, o(239, s)) +# define BOOST_PP_WHILE_239_I(p, o, s) BOOST_PP_IF(p(240, s), BOOST_PP_WHILE_240, s BOOST_PP_TUPLE_EAT_3)(p, o, o(240, s)) +# define BOOST_PP_WHILE_240_I(p, o, s) BOOST_PP_IF(p(241, s), BOOST_PP_WHILE_241, s BOOST_PP_TUPLE_EAT_3)(p, o, o(241, s)) +# define BOOST_PP_WHILE_241_I(p, o, s) BOOST_PP_IF(p(242, s), BOOST_PP_WHILE_242, s BOOST_PP_TUPLE_EAT_3)(p, o, o(242, s)) +# define BOOST_PP_WHILE_242_I(p, o, s) BOOST_PP_IF(p(243, s), BOOST_PP_WHILE_243, s BOOST_PP_TUPLE_EAT_3)(p, o, o(243, s)) +# define BOOST_PP_WHILE_243_I(p, o, s) BOOST_PP_IF(p(244, s), BOOST_PP_WHILE_244, s BOOST_PP_TUPLE_EAT_3)(p, o, o(244, s)) +# define BOOST_PP_WHILE_244_I(p, o, s) BOOST_PP_IF(p(245, s), BOOST_PP_WHILE_245, s BOOST_PP_TUPLE_EAT_3)(p, o, o(245, s)) +# define BOOST_PP_WHILE_245_I(p, o, s) BOOST_PP_IF(p(246, s), BOOST_PP_WHILE_246, s BOOST_PP_TUPLE_EAT_3)(p, o, o(246, s)) +# define BOOST_PP_WHILE_246_I(p, o, s) BOOST_PP_IF(p(247, s), BOOST_PP_WHILE_247, s BOOST_PP_TUPLE_EAT_3)(p, o, o(247, s)) +# define BOOST_PP_WHILE_247_I(p, o, s) BOOST_PP_IF(p(248, s), BOOST_PP_WHILE_248, s BOOST_PP_TUPLE_EAT_3)(p, o, o(248, s)) +# define BOOST_PP_WHILE_248_I(p, o, s) BOOST_PP_IF(p(249, s), BOOST_PP_WHILE_249, s BOOST_PP_TUPLE_EAT_3)(p, o, o(249, s)) +# define BOOST_PP_WHILE_249_I(p, o, s) BOOST_PP_IF(p(250, s), BOOST_PP_WHILE_250, s BOOST_PP_TUPLE_EAT_3)(p, o, o(250, s)) +# define BOOST_PP_WHILE_250_I(p, o, s) BOOST_PP_IF(p(251, s), BOOST_PP_WHILE_251, s BOOST_PP_TUPLE_EAT_3)(p, o, o(251, s)) +# define BOOST_PP_WHILE_251_I(p, o, s) BOOST_PP_IF(p(252, s), BOOST_PP_WHILE_252, s BOOST_PP_TUPLE_EAT_3)(p, o, o(252, s)) +# define BOOST_PP_WHILE_252_I(p, o, s) BOOST_PP_IF(p(253, s), BOOST_PP_WHILE_253, s BOOST_PP_TUPLE_EAT_3)(p, o, o(253, s)) +# define BOOST_PP_WHILE_253_I(p, o, s) BOOST_PP_IF(p(254, s), BOOST_PP_WHILE_254, s BOOST_PP_TUPLE_EAT_3)(p, o, o(254, s)) +# define BOOST_PP_WHILE_254_I(p, o, s) BOOST_PP_IF(p(255, s), BOOST_PP_WHILE_255, s BOOST_PP_TUPLE_EAT_3)(p, o, o(255, s)) +# define BOOST_PP_WHILE_255_I(p, o, s) BOOST_PP_IF(p(256, s), BOOST_PP_WHILE_256, s BOOST_PP_TUPLE_EAT_3)(p, o, o(256, s)) +# define BOOST_PP_WHILE_256_I(p, o, s) BOOST_PP_IF(p(257, s), BOOST_PP_WHILE_257, s BOOST_PP_TUPLE_EAT_3)(p, o, o(257, s)) +# +# endif diff --git a/contrib/src/boost/preprocessor/control/detail/msvc/while.hpp b/contrib/src/boost/preprocessor/control/detail/msvc/while.hpp new file mode 100644 index 0000000..e543e41 --- /dev/null +++ b/contrib/src/boost/preprocessor/control/detail/msvc/while.hpp @@ -0,0 +1,277 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_MSVC_WHILE_HPP +# define BOOST_PREPROCESSOR_CONTROL_DETAIL_MSVC_WHILE_HPP +# +# include +# include +# +# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_IF(p(2, s), BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, o(2, s)) +# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_IF(p(3, s), BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, o(3, s)) +# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_IF(p(4, s), BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, o(4, s)) +# define BOOST_PP_WHILE_4(p, o, s) BOOST_PP_IF(p(5, s), BOOST_PP_WHILE_5, s BOOST_PP_TUPLE_EAT_3)(p, o, o(5, s)) +# define BOOST_PP_WHILE_5(p, o, s) BOOST_PP_IF(p(6, s), BOOST_PP_WHILE_6, s BOOST_PP_TUPLE_EAT_3)(p, o, o(6, s)) +# define BOOST_PP_WHILE_6(p, o, s) BOOST_PP_IF(p(7, s), BOOST_PP_WHILE_7, s BOOST_PP_TUPLE_EAT_3)(p, o, o(7, s)) +# define BOOST_PP_WHILE_7(p, o, s) BOOST_PP_IF(p(8, s), BOOST_PP_WHILE_8, s BOOST_PP_TUPLE_EAT_3)(p, o, o(8, s)) +# define BOOST_PP_WHILE_8(p, o, s) BOOST_PP_IF(p(9, s), BOOST_PP_WHILE_9, s BOOST_PP_TUPLE_EAT_3)(p, o, o(9, s)) +# define BOOST_PP_WHILE_9(p, o, s) BOOST_PP_IF(p(10, s), BOOST_PP_WHILE_10, s BOOST_PP_TUPLE_EAT_3)(p, o, o(10, s)) +# define BOOST_PP_WHILE_10(p, o, s) BOOST_PP_IF(p(11, s), BOOST_PP_WHILE_11, s BOOST_PP_TUPLE_EAT_3)(p, o, o(11, s)) +# define BOOST_PP_WHILE_11(p, o, s) BOOST_PP_IF(p(12, s), BOOST_PP_WHILE_12, s BOOST_PP_TUPLE_EAT_3)(p, o, o(12, s)) +# define BOOST_PP_WHILE_12(p, o, s) BOOST_PP_IF(p(13, s), BOOST_PP_WHILE_13, s BOOST_PP_TUPLE_EAT_3)(p, o, o(13, s)) +# define BOOST_PP_WHILE_13(p, o, s) BOOST_PP_IF(p(14, s), BOOST_PP_WHILE_14, s BOOST_PP_TUPLE_EAT_3)(p, o, o(14, s)) +# define BOOST_PP_WHILE_14(p, o, s) BOOST_PP_IF(p(15, s), BOOST_PP_WHILE_15, s BOOST_PP_TUPLE_EAT_3)(p, o, o(15, s)) +# define BOOST_PP_WHILE_15(p, o, s) BOOST_PP_IF(p(16, s), BOOST_PP_WHILE_16, s BOOST_PP_TUPLE_EAT_3)(p, o, o(16, s)) +# define BOOST_PP_WHILE_16(p, o, s) BOOST_PP_IF(p(17, s), BOOST_PP_WHILE_17, s BOOST_PP_TUPLE_EAT_3)(p, o, o(17, s)) +# define BOOST_PP_WHILE_17(p, o, s) BOOST_PP_IF(p(18, s), BOOST_PP_WHILE_18, s BOOST_PP_TUPLE_EAT_3)(p, o, o(18, s)) +# define BOOST_PP_WHILE_18(p, o, s) BOOST_PP_IF(p(19, s), BOOST_PP_WHILE_19, s BOOST_PP_TUPLE_EAT_3)(p, o, o(19, s)) +# define BOOST_PP_WHILE_19(p, o, s) BOOST_PP_IF(p(20, s), BOOST_PP_WHILE_20, s BOOST_PP_TUPLE_EAT_3)(p, o, o(20, s)) +# define BOOST_PP_WHILE_20(p, o, s) BOOST_PP_IF(p(21, s), BOOST_PP_WHILE_21, s BOOST_PP_TUPLE_EAT_3)(p, o, o(21, s)) +# define BOOST_PP_WHILE_21(p, o, s) BOOST_PP_IF(p(22, s), BOOST_PP_WHILE_22, s BOOST_PP_TUPLE_EAT_3)(p, o, o(22, s)) +# define BOOST_PP_WHILE_22(p, o, s) BOOST_PP_IF(p(23, s), BOOST_PP_WHILE_23, s BOOST_PP_TUPLE_EAT_3)(p, o, o(23, s)) +# define BOOST_PP_WHILE_23(p, o, s) BOOST_PP_IF(p(24, s), BOOST_PP_WHILE_24, s BOOST_PP_TUPLE_EAT_3)(p, o, o(24, s)) +# define BOOST_PP_WHILE_24(p, o, s) BOOST_PP_IF(p(25, s), BOOST_PP_WHILE_25, s BOOST_PP_TUPLE_EAT_3)(p, o, o(25, s)) +# define BOOST_PP_WHILE_25(p, o, s) BOOST_PP_IF(p(26, s), BOOST_PP_WHILE_26, s BOOST_PP_TUPLE_EAT_3)(p, o, o(26, s)) +# define BOOST_PP_WHILE_26(p, o, s) BOOST_PP_IF(p(27, s), BOOST_PP_WHILE_27, s BOOST_PP_TUPLE_EAT_3)(p, o, o(27, s)) +# define BOOST_PP_WHILE_27(p, o, s) BOOST_PP_IF(p(28, s), BOOST_PP_WHILE_28, s BOOST_PP_TUPLE_EAT_3)(p, o, o(28, s)) +# define BOOST_PP_WHILE_28(p, o, s) BOOST_PP_IF(p(29, s), BOOST_PP_WHILE_29, s BOOST_PP_TUPLE_EAT_3)(p, o, o(29, s)) +# define BOOST_PP_WHILE_29(p, o, s) BOOST_PP_IF(p(30, s), BOOST_PP_WHILE_30, s BOOST_PP_TUPLE_EAT_3)(p, o, o(30, s)) +# define BOOST_PP_WHILE_30(p, o, s) BOOST_PP_IF(p(31, s), BOOST_PP_WHILE_31, s BOOST_PP_TUPLE_EAT_3)(p, o, o(31, s)) +# define BOOST_PP_WHILE_31(p, o, s) BOOST_PP_IF(p(32, s), BOOST_PP_WHILE_32, s BOOST_PP_TUPLE_EAT_3)(p, o, o(32, s)) +# define BOOST_PP_WHILE_32(p, o, s) BOOST_PP_IF(p(33, s), BOOST_PP_WHILE_33, s BOOST_PP_TUPLE_EAT_3)(p, o, o(33, s)) +# define BOOST_PP_WHILE_33(p, o, s) BOOST_PP_IF(p(34, s), BOOST_PP_WHILE_34, s BOOST_PP_TUPLE_EAT_3)(p, o, o(34, s)) +# define BOOST_PP_WHILE_34(p, o, s) BOOST_PP_IF(p(35, s), BOOST_PP_WHILE_35, s BOOST_PP_TUPLE_EAT_3)(p, o, o(35, s)) +# define BOOST_PP_WHILE_35(p, o, s) BOOST_PP_IF(p(36, s), BOOST_PP_WHILE_36, s BOOST_PP_TUPLE_EAT_3)(p, o, o(36, s)) +# define BOOST_PP_WHILE_36(p, o, s) BOOST_PP_IF(p(37, s), BOOST_PP_WHILE_37, s BOOST_PP_TUPLE_EAT_3)(p, o, o(37, s)) +# define BOOST_PP_WHILE_37(p, o, s) BOOST_PP_IF(p(38, s), BOOST_PP_WHILE_38, s BOOST_PP_TUPLE_EAT_3)(p, o, o(38, s)) +# define BOOST_PP_WHILE_38(p, o, s) BOOST_PP_IF(p(39, s), BOOST_PP_WHILE_39, s BOOST_PP_TUPLE_EAT_3)(p, o, o(39, s)) +# define BOOST_PP_WHILE_39(p, o, s) BOOST_PP_IF(p(40, s), BOOST_PP_WHILE_40, s BOOST_PP_TUPLE_EAT_3)(p, o, o(40, s)) +# define BOOST_PP_WHILE_40(p, o, s) BOOST_PP_IF(p(41, s), BOOST_PP_WHILE_41, s BOOST_PP_TUPLE_EAT_3)(p, o, o(41, s)) +# define BOOST_PP_WHILE_41(p, o, s) BOOST_PP_IF(p(42, s), BOOST_PP_WHILE_42, s BOOST_PP_TUPLE_EAT_3)(p, o, o(42, s)) +# define BOOST_PP_WHILE_42(p, o, s) BOOST_PP_IF(p(43, s), BOOST_PP_WHILE_43, s BOOST_PP_TUPLE_EAT_3)(p, o, o(43, s)) +# define BOOST_PP_WHILE_43(p, o, s) BOOST_PP_IF(p(44, s), BOOST_PP_WHILE_44, s BOOST_PP_TUPLE_EAT_3)(p, o, o(44, s)) +# define BOOST_PP_WHILE_44(p, o, s) BOOST_PP_IF(p(45, s), BOOST_PP_WHILE_45, s BOOST_PP_TUPLE_EAT_3)(p, o, o(45, s)) +# define BOOST_PP_WHILE_45(p, o, s) BOOST_PP_IF(p(46, s), BOOST_PP_WHILE_46, s BOOST_PP_TUPLE_EAT_3)(p, o, o(46, s)) +# define BOOST_PP_WHILE_46(p, o, s) BOOST_PP_IF(p(47, s), BOOST_PP_WHILE_47, s BOOST_PP_TUPLE_EAT_3)(p, o, o(47, s)) +# define BOOST_PP_WHILE_47(p, o, s) BOOST_PP_IF(p(48, s), BOOST_PP_WHILE_48, s BOOST_PP_TUPLE_EAT_3)(p, o, o(48, s)) +# define BOOST_PP_WHILE_48(p, o, s) BOOST_PP_IF(p(49, s), BOOST_PP_WHILE_49, s BOOST_PP_TUPLE_EAT_3)(p, o, o(49, s)) +# define BOOST_PP_WHILE_49(p, o, s) BOOST_PP_IF(p(50, s), BOOST_PP_WHILE_50, s BOOST_PP_TUPLE_EAT_3)(p, o, o(50, s)) +# define BOOST_PP_WHILE_50(p, o, s) BOOST_PP_IF(p(51, s), BOOST_PP_WHILE_51, s BOOST_PP_TUPLE_EAT_3)(p, o, o(51, s)) +# define BOOST_PP_WHILE_51(p, o, s) BOOST_PP_IF(p(52, s), BOOST_PP_WHILE_52, s BOOST_PP_TUPLE_EAT_3)(p, o, o(52, s)) +# define BOOST_PP_WHILE_52(p, o, s) BOOST_PP_IF(p(53, s), BOOST_PP_WHILE_53, s BOOST_PP_TUPLE_EAT_3)(p, o, o(53, s)) +# define BOOST_PP_WHILE_53(p, o, s) BOOST_PP_IF(p(54, s), BOOST_PP_WHILE_54, s BOOST_PP_TUPLE_EAT_3)(p, o, o(54, s)) +# define BOOST_PP_WHILE_54(p, o, s) BOOST_PP_IF(p(55, s), BOOST_PP_WHILE_55, s BOOST_PP_TUPLE_EAT_3)(p, o, o(55, s)) +# define BOOST_PP_WHILE_55(p, o, s) BOOST_PP_IF(p(56, s), BOOST_PP_WHILE_56, s BOOST_PP_TUPLE_EAT_3)(p, o, o(56, s)) +# define BOOST_PP_WHILE_56(p, o, s) BOOST_PP_IF(p(57, s), BOOST_PP_WHILE_57, s BOOST_PP_TUPLE_EAT_3)(p, o, o(57, s)) +# define BOOST_PP_WHILE_57(p, o, s) BOOST_PP_IF(p(58, s), BOOST_PP_WHILE_58, s BOOST_PP_TUPLE_EAT_3)(p, o, o(58, s)) +# define BOOST_PP_WHILE_58(p, o, s) BOOST_PP_IF(p(59, s), BOOST_PP_WHILE_59, s BOOST_PP_TUPLE_EAT_3)(p, o, o(59, s)) +# define BOOST_PP_WHILE_59(p, o, s) BOOST_PP_IF(p(60, s), BOOST_PP_WHILE_60, s BOOST_PP_TUPLE_EAT_3)(p, o, o(60, s)) +# define BOOST_PP_WHILE_60(p, o, s) BOOST_PP_IF(p(61, s), BOOST_PP_WHILE_61, s BOOST_PP_TUPLE_EAT_3)(p, o, o(61, s)) +# define BOOST_PP_WHILE_61(p, o, s) BOOST_PP_IF(p(62, s), BOOST_PP_WHILE_62, s BOOST_PP_TUPLE_EAT_3)(p, o, o(62, s)) +# define BOOST_PP_WHILE_62(p, o, s) BOOST_PP_IF(p(63, s), BOOST_PP_WHILE_63, s BOOST_PP_TUPLE_EAT_3)(p, o, o(63, s)) +# define BOOST_PP_WHILE_63(p, o, s) BOOST_PP_IF(p(64, s), BOOST_PP_WHILE_64, s BOOST_PP_TUPLE_EAT_3)(p, o, o(64, s)) +# define BOOST_PP_WHILE_64(p, o, s) BOOST_PP_IF(p(65, s), BOOST_PP_WHILE_65, s BOOST_PP_TUPLE_EAT_3)(p, o, o(65, s)) +# define BOOST_PP_WHILE_65(p, o, s) BOOST_PP_IF(p(66, s), BOOST_PP_WHILE_66, s BOOST_PP_TUPLE_EAT_3)(p, o, o(66, s)) +# define BOOST_PP_WHILE_66(p, o, s) BOOST_PP_IF(p(67, s), BOOST_PP_WHILE_67, s BOOST_PP_TUPLE_EAT_3)(p, o, o(67, s)) +# define BOOST_PP_WHILE_67(p, o, s) BOOST_PP_IF(p(68, s), BOOST_PP_WHILE_68, s BOOST_PP_TUPLE_EAT_3)(p, o, o(68, s)) +# define BOOST_PP_WHILE_68(p, o, s) BOOST_PP_IF(p(69, s), BOOST_PP_WHILE_69, s BOOST_PP_TUPLE_EAT_3)(p, o, o(69, s)) +# define BOOST_PP_WHILE_69(p, o, s) BOOST_PP_IF(p(70, s), BOOST_PP_WHILE_70, s BOOST_PP_TUPLE_EAT_3)(p, o, o(70, s)) +# define BOOST_PP_WHILE_70(p, o, s) BOOST_PP_IF(p(71, s), BOOST_PP_WHILE_71, s BOOST_PP_TUPLE_EAT_3)(p, o, o(71, s)) +# define BOOST_PP_WHILE_71(p, o, s) BOOST_PP_IF(p(72, s), BOOST_PP_WHILE_72, s BOOST_PP_TUPLE_EAT_3)(p, o, o(72, s)) +# define BOOST_PP_WHILE_72(p, o, s) BOOST_PP_IF(p(73, s), BOOST_PP_WHILE_73, s BOOST_PP_TUPLE_EAT_3)(p, o, o(73, s)) +# define BOOST_PP_WHILE_73(p, o, s) BOOST_PP_IF(p(74, s), BOOST_PP_WHILE_74, s BOOST_PP_TUPLE_EAT_3)(p, o, o(74, s)) +# define BOOST_PP_WHILE_74(p, o, s) BOOST_PP_IF(p(75, s), BOOST_PP_WHILE_75, s BOOST_PP_TUPLE_EAT_3)(p, o, o(75, s)) +# define BOOST_PP_WHILE_75(p, o, s) BOOST_PP_IF(p(76, s), BOOST_PP_WHILE_76, s BOOST_PP_TUPLE_EAT_3)(p, o, o(76, s)) +# define BOOST_PP_WHILE_76(p, o, s) BOOST_PP_IF(p(77, s), BOOST_PP_WHILE_77, s BOOST_PP_TUPLE_EAT_3)(p, o, o(77, s)) +# define BOOST_PP_WHILE_77(p, o, s) BOOST_PP_IF(p(78, s), BOOST_PP_WHILE_78, s BOOST_PP_TUPLE_EAT_3)(p, o, o(78, s)) +# define BOOST_PP_WHILE_78(p, o, s) BOOST_PP_IF(p(79, s), BOOST_PP_WHILE_79, s BOOST_PP_TUPLE_EAT_3)(p, o, o(79, s)) +# define BOOST_PP_WHILE_79(p, o, s) BOOST_PP_IF(p(80, s), BOOST_PP_WHILE_80, s BOOST_PP_TUPLE_EAT_3)(p, o, o(80, s)) +# define BOOST_PP_WHILE_80(p, o, s) BOOST_PP_IF(p(81, s), BOOST_PP_WHILE_81, s BOOST_PP_TUPLE_EAT_3)(p, o, o(81, s)) +# define BOOST_PP_WHILE_81(p, o, s) BOOST_PP_IF(p(82, s), BOOST_PP_WHILE_82, s BOOST_PP_TUPLE_EAT_3)(p, o, o(82, s)) +# define BOOST_PP_WHILE_82(p, o, s) BOOST_PP_IF(p(83, s), BOOST_PP_WHILE_83, s BOOST_PP_TUPLE_EAT_3)(p, o, o(83, s)) +# define BOOST_PP_WHILE_83(p, o, s) BOOST_PP_IF(p(84, s), BOOST_PP_WHILE_84, s BOOST_PP_TUPLE_EAT_3)(p, o, o(84, s)) +# define BOOST_PP_WHILE_84(p, o, s) BOOST_PP_IF(p(85, s), BOOST_PP_WHILE_85, s BOOST_PP_TUPLE_EAT_3)(p, o, o(85, s)) +# define BOOST_PP_WHILE_85(p, o, s) BOOST_PP_IF(p(86, s), BOOST_PP_WHILE_86, s BOOST_PP_TUPLE_EAT_3)(p, o, o(86, s)) +# define BOOST_PP_WHILE_86(p, o, s) BOOST_PP_IF(p(87, s), BOOST_PP_WHILE_87, s BOOST_PP_TUPLE_EAT_3)(p, o, o(87, s)) +# define BOOST_PP_WHILE_87(p, o, s) BOOST_PP_IF(p(88, s), BOOST_PP_WHILE_88, s BOOST_PP_TUPLE_EAT_3)(p, o, o(88, s)) +# define BOOST_PP_WHILE_88(p, o, s) BOOST_PP_IF(p(89, s), BOOST_PP_WHILE_89, s BOOST_PP_TUPLE_EAT_3)(p, o, o(89, s)) +# define BOOST_PP_WHILE_89(p, o, s) BOOST_PP_IF(p(90, s), BOOST_PP_WHILE_90, s BOOST_PP_TUPLE_EAT_3)(p, o, o(90, s)) +# define BOOST_PP_WHILE_90(p, o, s) BOOST_PP_IF(p(91, s), BOOST_PP_WHILE_91, s BOOST_PP_TUPLE_EAT_3)(p, o, o(91, s)) +# define BOOST_PP_WHILE_91(p, o, s) BOOST_PP_IF(p(92, s), BOOST_PP_WHILE_92, s BOOST_PP_TUPLE_EAT_3)(p, o, o(92, s)) +# define BOOST_PP_WHILE_92(p, o, s) BOOST_PP_IF(p(93, s), BOOST_PP_WHILE_93, s BOOST_PP_TUPLE_EAT_3)(p, o, o(93, s)) +# define BOOST_PP_WHILE_93(p, o, s) BOOST_PP_IF(p(94, s), BOOST_PP_WHILE_94, s BOOST_PP_TUPLE_EAT_3)(p, o, o(94, s)) +# define BOOST_PP_WHILE_94(p, o, s) BOOST_PP_IF(p(95, s), BOOST_PP_WHILE_95, s BOOST_PP_TUPLE_EAT_3)(p, o, o(95, s)) +# define BOOST_PP_WHILE_95(p, o, s) BOOST_PP_IF(p(96, s), BOOST_PP_WHILE_96, s BOOST_PP_TUPLE_EAT_3)(p, o, o(96, s)) +# define BOOST_PP_WHILE_96(p, o, s) BOOST_PP_IF(p(97, s), BOOST_PP_WHILE_97, s BOOST_PP_TUPLE_EAT_3)(p, o, o(97, s)) +# define BOOST_PP_WHILE_97(p, o, s) BOOST_PP_IF(p(98, s), BOOST_PP_WHILE_98, s BOOST_PP_TUPLE_EAT_3)(p, o, o(98, s)) +# define BOOST_PP_WHILE_98(p, o, s) BOOST_PP_IF(p(99, s), BOOST_PP_WHILE_99, s BOOST_PP_TUPLE_EAT_3)(p, o, o(99, s)) +# define BOOST_PP_WHILE_99(p, o, s) BOOST_PP_IF(p(100, s), BOOST_PP_WHILE_100, s BOOST_PP_TUPLE_EAT_3)(p, o, o(100, s)) +# define BOOST_PP_WHILE_100(p, o, s) BOOST_PP_IF(p(101, s), BOOST_PP_WHILE_101, s BOOST_PP_TUPLE_EAT_3)(p, o, o(101, s)) +# define BOOST_PP_WHILE_101(p, o, s) BOOST_PP_IF(p(102, s), BOOST_PP_WHILE_102, s BOOST_PP_TUPLE_EAT_3)(p, o, o(102, s)) +# define BOOST_PP_WHILE_102(p, o, s) BOOST_PP_IF(p(103, s), BOOST_PP_WHILE_103, s BOOST_PP_TUPLE_EAT_3)(p, o, o(103, s)) +# define BOOST_PP_WHILE_103(p, o, s) BOOST_PP_IF(p(104, s), BOOST_PP_WHILE_104, s BOOST_PP_TUPLE_EAT_3)(p, o, o(104, s)) +# define BOOST_PP_WHILE_104(p, o, s) BOOST_PP_IF(p(105, s), BOOST_PP_WHILE_105, s BOOST_PP_TUPLE_EAT_3)(p, o, o(105, s)) +# define BOOST_PP_WHILE_105(p, o, s) BOOST_PP_IF(p(106, s), BOOST_PP_WHILE_106, s BOOST_PP_TUPLE_EAT_3)(p, o, o(106, s)) +# define BOOST_PP_WHILE_106(p, o, s) BOOST_PP_IF(p(107, s), BOOST_PP_WHILE_107, s BOOST_PP_TUPLE_EAT_3)(p, o, o(107, s)) +# define BOOST_PP_WHILE_107(p, o, s) BOOST_PP_IF(p(108, s), BOOST_PP_WHILE_108, s BOOST_PP_TUPLE_EAT_3)(p, o, o(108, s)) +# define BOOST_PP_WHILE_108(p, o, s) BOOST_PP_IF(p(109, s), BOOST_PP_WHILE_109, s BOOST_PP_TUPLE_EAT_3)(p, o, o(109, s)) +# define BOOST_PP_WHILE_109(p, o, s) BOOST_PP_IF(p(110, s), BOOST_PP_WHILE_110, s BOOST_PP_TUPLE_EAT_3)(p, o, o(110, s)) +# define BOOST_PP_WHILE_110(p, o, s) BOOST_PP_IF(p(111, s), BOOST_PP_WHILE_111, s BOOST_PP_TUPLE_EAT_3)(p, o, o(111, s)) +# define BOOST_PP_WHILE_111(p, o, s) BOOST_PP_IF(p(112, s), BOOST_PP_WHILE_112, s BOOST_PP_TUPLE_EAT_3)(p, o, o(112, s)) +# define BOOST_PP_WHILE_112(p, o, s) BOOST_PP_IF(p(113, s), BOOST_PP_WHILE_113, s BOOST_PP_TUPLE_EAT_3)(p, o, o(113, s)) +# define BOOST_PP_WHILE_113(p, o, s) BOOST_PP_IF(p(114, s), BOOST_PP_WHILE_114, s BOOST_PP_TUPLE_EAT_3)(p, o, o(114, s)) +# define BOOST_PP_WHILE_114(p, o, s) BOOST_PP_IF(p(115, s), BOOST_PP_WHILE_115, s BOOST_PP_TUPLE_EAT_3)(p, o, o(115, s)) +# define BOOST_PP_WHILE_115(p, o, s) BOOST_PP_IF(p(116, s), BOOST_PP_WHILE_116, s BOOST_PP_TUPLE_EAT_3)(p, o, o(116, s)) +# define BOOST_PP_WHILE_116(p, o, s) BOOST_PP_IF(p(117, s), BOOST_PP_WHILE_117, s BOOST_PP_TUPLE_EAT_3)(p, o, o(117, s)) +# define BOOST_PP_WHILE_117(p, o, s) BOOST_PP_IF(p(118, s), BOOST_PP_WHILE_118, s BOOST_PP_TUPLE_EAT_3)(p, o, o(118, s)) +# define BOOST_PP_WHILE_118(p, o, s) BOOST_PP_IF(p(119, s), BOOST_PP_WHILE_119, s BOOST_PP_TUPLE_EAT_3)(p, o, o(119, s)) +# define BOOST_PP_WHILE_119(p, o, s) BOOST_PP_IF(p(120, s), BOOST_PP_WHILE_120, s BOOST_PP_TUPLE_EAT_3)(p, o, o(120, s)) +# define BOOST_PP_WHILE_120(p, o, s) BOOST_PP_IF(p(121, s), BOOST_PP_WHILE_121, s BOOST_PP_TUPLE_EAT_3)(p, o, o(121, s)) +# define BOOST_PP_WHILE_121(p, o, s) BOOST_PP_IF(p(122, s), BOOST_PP_WHILE_122, s BOOST_PP_TUPLE_EAT_3)(p, o, o(122, s)) +# define BOOST_PP_WHILE_122(p, o, s) BOOST_PP_IF(p(123, s), BOOST_PP_WHILE_123, s BOOST_PP_TUPLE_EAT_3)(p, o, o(123, s)) +# define BOOST_PP_WHILE_123(p, o, s) BOOST_PP_IF(p(124, s), BOOST_PP_WHILE_124, s BOOST_PP_TUPLE_EAT_3)(p, o, o(124, s)) +# define BOOST_PP_WHILE_124(p, o, s) BOOST_PP_IF(p(125, s), BOOST_PP_WHILE_125, s BOOST_PP_TUPLE_EAT_3)(p, o, o(125, s)) +# define BOOST_PP_WHILE_125(p, o, s) BOOST_PP_IF(p(126, s), BOOST_PP_WHILE_126, s BOOST_PP_TUPLE_EAT_3)(p, o, o(126, s)) +# define BOOST_PP_WHILE_126(p, o, s) BOOST_PP_IF(p(127, s), BOOST_PP_WHILE_127, s BOOST_PP_TUPLE_EAT_3)(p, o, o(127, s)) +# define BOOST_PP_WHILE_127(p, o, s) BOOST_PP_IF(p(128, s), BOOST_PP_WHILE_128, s BOOST_PP_TUPLE_EAT_3)(p, o, o(128, s)) +# define BOOST_PP_WHILE_128(p, o, s) BOOST_PP_IF(p(129, s), BOOST_PP_WHILE_129, s BOOST_PP_TUPLE_EAT_3)(p, o, o(129, s)) +# define BOOST_PP_WHILE_129(p, o, s) BOOST_PP_IF(p(130, s), BOOST_PP_WHILE_130, s BOOST_PP_TUPLE_EAT_3)(p, o, o(130, s)) +# define BOOST_PP_WHILE_130(p, o, s) BOOST_PP_IF(p(131, s), BOOST_PP_WHILE_131, s BOOST_PP_TUPLE_EAT_3)(p, o, o(131, s)) +# define BOOST_PP_WHILE_131(p, o, s) BOOST_PP_IF(p(132, s), BOOST_PP_WHILE_132, s BOOST_PP_TUPLE_EAT_3)(p, o, o(132, s)) +# define BOOST_PP_WHILE_132(p, o, s) BOOST_PP_IF(p(133, s), BOOST_PP_WHILE_133, s BOOST_PP_TUPLE_EAT_3)(p, o, o(133, s)) +# define BOOST_PP_WHILE_133(p, o, s) BOOST_PP_IF(p(134, s), BOOST_PP_WHILE_134, s BOOST_PP_TUPLE_EAT_3)(p, o, o(134, s)) +# define BOOST_PP_WHILE_134(p, o, s) BOOST_PP_IF(p(135, s), BOOST_PP_WHILE_135, s BOOST_PP_TUPLE_EAT_3)(p, o, o(135, s)) +# define BOOST_PP_WHILE_135(p, o, s) BOOST_PP_IF(p(136, s), BOOST_PP_WHILE_136, s BOOST_PP_TUPLE_EAT_3)(p, o, o(136, s)) +# define BOOST_PP_WHILE_136(p, o, s) BOOST_PP_IF(p(137, s), BOOST_PP_WHILE_137, s BOOST_PP_TUPLE_EAT_3)(p, o, o(137, s)) +# define BOOST_PP_WHILE_137(p, o, s) BOOST_PP_IF(p(138, s), BOOST_PP_WHILE_138, s BOOST_PP_TUPLE_EAT_3)(p, o, o(138, s)) +# define BOOST_PP_WHILE_138(p, o, s) BOOST_PP_IF(p(139, s), BOOST_PP_WHILE_139, s BOOST_PP_TUPLE_EAT_3)(p, o, o(139, s)) +# define BOOST_PP_WHILE_139(p, o, s) BOOST_PP_IF(p(140, s), BOOST_PP_WHILE_140, s BOOST_PP_TUPLE_EAT_3)(p, o, o(140, s)) +# define BOOST_PP_WHILE_140(p, o, s) BOOST_PP_IF(p(141, s), BOOST_PP_WHILE_141, s BOOST_PP_TUPLE_EAT_3)(p, o, o(141, s)) +# define BOOST_PP_WHILE_141(p, o, s) BOOST_PP_IF(p(142, s), BOOST_PP_WHILE_142, s BOOST_PP_TUPLE_EAT_3)(p, o, o(142, s)) +# define BOOST_PP_WHILE_142(p, o, s) BOOST_PP_IF(p(143, s), BOOST_PP_WHILE_143, s BOOST_PP_TUPLE_EAT_3)(p, o, o(143, s)) +# define BOOST_PP_WHILE_143(p, o, s) BOOST_PP_IF(p(144, s), BOOST_PP_WHILE_144, s BOOST_PP_TUPLE_EAT_3)(p, o, o(144, s)) +# define BOOST_PP_WHILE_144(p, o, s) BOOST_PP_IF(p(145, s), BOOST_PP_WHILE_145, s BOOST_PP_TUPLE_EAT_3)(p, o, o(145, s)) +# define BOOST_PP_WHILE_145(p, o, s) BOOST_PP_IF(p(146, s), BOOST_PP_WHILE_146, s BOOST_PP_TUPLE_EAT_3)(p, o, o(146, s)) +# define BOOST_PP_WHILE_146(p, o, s) BOOST_PP_IF(p(147, s), BOOST_PP_WHILE_147, s BOOST_PP_TUPLE_EAT_3)(p, o, o(147, s)) +# define BOOST_PP_WHILE_147(p, o, s) BOOST_PP_IF(p(148, s), BOOST_PP_WHILE_148, s BOOST_PP_TUPLE_EAT_3)(p, o, o(148, s)) +# define BOOST_PP_WHILE_148(p, o, s) BOOST_PP_IF(p(149, s), BOOST_PP_WHILE_149, s BOOST_PP_TUPLE_EAT_3)(p, o, o(149, s)) +# define BOOST_PP_WHILE_149(p, o, s) BOOST_PP_IF(p(150, s), BOOST_PP_WHILE_150, s BOOST_PP_TUPLE_EAT_3)(p, o, o(150, s)) +# define BOOST_PP_WHILE_150(p, o, s) BOOST_PP_IF(p(151, s), BOOST_PP_WHILE_151, s BOOST_PP_TUPLE_EAT_3)(p, o, o(151, s)) +# define BOOST_PP_WHILE_151(p, o, s) BOOST_PP_IF(p(152, s), BOOST_PP_WHILE_152, s BOOST_PP_TUPLE_EAT_3)(p, o, o(152, s)) +# define BOOST_PP_WHILE_152(p, o, s) BOOST_PP_IF(p(153, s), BOOST_PP_WHILE_153, s BOOST_PP_TUPLE_EAT_3)(p, o, o(153, s)) +# define BOOST_PP_WHILE_153(p, o, s) BOOST_PP_IF(p(154, s), BOOST_PP_WHILE_154, s BOOST_PP_TUPLE_EAT_3)(p, o, o(154, s)) +# define BOOST_PP_WHILE_154(p, o, s) BOOST_PP_IF(p(155, s), BOOST_PP_WHILE_155, s BOOST_PP_TUPLE_EAT_3)(p, o, o(155, s)) +# define BOOST_PP_WHILE_155(p, o, s) BOOST_PP_IF(p(156, s), BOOST_PP_WHILE_156, s BOOST_PP_TUPLE_EAT_3)(p, o, o(156, s)) +# define BOOST_PP_WHILE_156(p, o, s) BOOST_PP_IF(p(157, s), BOOST_PP_WHILE_157, s BOOST_PP_TUPLE_EAT_3)(p, o, o(157, s)) +# define BOOST_PP_WHILE_157(p, o, s) BOOST_PP_IF(p(158, s), BOOST_PP_WHILE_158, s BOOST_PP_TUPLE_EAT_3)(p, o, o(158, s)) +# define BOOST_PP_WHILE_158(p, o, s) BOOST_PP_IF(p(159, s), BOOST_PP_WHILE_159, s BOOST_PP_TUPLE_EAT_3)(p, o, o(159, s)) +# define BOOST_PP_WHILE_159(p, o, s) BOOST_PP_IF(p(160, s), BOOST_PP_WHILE_160, s BOOST_PP_TUPLE_EAT_3)(p, o, o(160, s)) +# define BOOST_PP_WHILE_160(p, o, s) BOOST_PP_IF(p(161, s), BOOST_PP_WHILE_161, s BOOST_PP_TUPLE_EAT_3)(p, o, o(161, s)) +# define BOOST_PP_WHILE_161(p, o, s) BOOST_PP_IF(p(162, s), BOOST_PP_WHILE_162, s BOOST_PP_TUPLE_EAT_3)(p, o, o(162, s)) +# define BOOST_PP_WHILE_162(p, o, s) BOOST_PP_IF(p(163, s), BOOST_PP_WHILE_163, s BOOST_PP_TUPLE_EAT_3)(p, o, o(163, s)) +# define BOOST_PP_WHILE_163(p, o, s) BOOST_PP_IF(p(164, s), BOOST_PP_WHILE_164, s BOOST_PP_TUPLE_EAT_3)(p, o, o(164, s)) +# define BOOST_PP_WHILE_164(p, o, s) BOOST_PP_IF(p(165, s), BOOST_PP_WHILE_165, s BOOST_PP_TUPLE_EAT_3)(p, o, o(165, s)) +# define BOOST_PP_WHILE_165(p, o, s) BOOST_PP_IF(p(166, s), BOOST_PP_WHILE_166, s BOOST_PP_TUPLE_EAT_3)(p, o, o(166, s)) +# define BOOST_PP_WHILE_166(p, o, s) BOOST_PP_IF(p(167, s), BOOST_PP_WHILE_167, s BOOST_PP_TUPLE_EAT_3)(p, o, o(167, s)) +# define BOOST_PP_WHILE_167(p, o, s) BOOST_PP_IF(p(168, s), BOOST_PP_WHILE_168, s BOOST_PP_TUPLE_EAT_3)(p, o, o(168, s)) +# define BOOST_PP_WHILE_168(p, o, s) BOOST_PP_IF(p(169, s), BOOST_PP_WHILE_169, s BOOST_PP_TUPLE_EAT_3)(p, o, o(169, s)) +# define BOOST_PP_WHILE_169(p, o, s) BOOST_PP_IF(p(170, s), BOOST_PP_WHILE_170, s BOOST_PP_TUPLE_EAT_3)(p, o, o(170, s)) +# define BOOST_PP_WHILE_170(p, o, s) BOOST_PP_IF(p(171, s), BOOST_PP_WHILE_171, s BOOST_PP_TUPLE_EAT_3)(p, o, o(171, s)) +# define BOOST_PP_WHILE_171(p, o, s) BOOST_PP_IF(p(172, s), BOOST_PP_WHILE_172, s BOOST_PP_TUPLE_EAT_3)(p, o, o(172, s)) +# define BOOST_PP_WHILE_172(p, o, s) BOOST_PP_IF(p(173, s), BOOST_PP_WHILE_173, s BOOST_PP_TUPLE_EAT_3)(p, o, o(173, s)) +# define BOOST_PP_WHILE_173(p, o, s) BOOST_PP_IF(p(174, s), BOOST_PP_WHILE_174, s BOOST_PP_TUPLE_EAT_3)(p, o, o(174, s)) +# define BOOST_PP_WHILE_174(p, o, s) BOOST_PP_IF(p(175, s), BOOST_PP_WHILE_175, s BOOST_PP_TUPLE_EAT_3)(p, o, o(175, s)) +# define BOOST_PP_WHILE_175(p, o, s) BOOST_PP_IF(p(176, s), BOOST_PP_WHILE_176, s BOOST_PP_TUPLE_EAT_3)(p, o, o(176, s)) +# define BOOST_PP_WHILE_176(p, o, s) BOOST_PP_IF(p(177, s), BOOST_PP_WHILE_177, s BOOST_PP_TUPLE_EAT_3)(p, o, o(177, s)) +# define BOOST_PP_WHILE_177(p, o, s) BOOST_PP_IF(p(178, s), BOOST_PP_WHILE_178, s BOOST_PP_TUPLE_EAT_3)(p, o, o(178, s)) +# define BOOST_PP_WHILE_178(p, o, s) BOOST_PP_IF(p(179, s), BOOST_PP_WHILE_179, s BOOST_PP_TUPLE_EAT_3)(p, o, o(179, s)) +# define BOOST_PP_WHILE_179(p, o, s) BOOST_PP_IF(p(180, s), BOOST_PP_WHILE_180, s BOOST_PP_TUPLE_EAT_3)(p, o, o(180, s)) +# define BOOST_PP_WHILE_180(p, o, s) BOOST_PP_IF(p(181, s), BOOST_PP_WHILE_181, s BOOST_PP_TUPLE_EAT_3)(p, o, o(181, s)) +# define BOOST_PP_WHILE_181(p, o, s) BOOST_PP_IF(p(182, s), BOOST_PP_WHILE_182, s BOOST_PP_TUPLE_EAT_3)(p, o, o(182, s)) +# define BOOST_PP_WHILE_182(p, o, s) BOOST_PP_IF(p(183, s), BOOST_PP_WHILE_183, s BOOST_PP_TUPLE_EAT_3)(p, o, o(183, s)) +# define BOOST_PP_WHILE_183(p, o, s) BOOST_PP_IF(p(184, s), BOOST_PP_WHILE_184, s BOOST_PP_TUPLE_EAT_3)(p, o, o(184, s)) +# define BOOST_PP_WHILE_184(p, o, s) BOOST_PP_IF(p(185, s), BOOST_PP_WHILE_185, s BOOST_PP_TUPLE_EAT_3)(p, o, o(185, s)) +# define BOOST_PP_WHILE_185(p, o, s) BOOST_PP_IF(p(186, s), BOOST_PP_WHILE_186, s BOOST_PP_TUPLE_EAT_3)(p, o, o(186, s)) +# define BOOST_PP_WHILE_186(p, o, s) BOOST_PP_IF(p(187, s), BOOST_PP_WHILE_187, s BOOST_PP_TUPLE_EAT_3)(p, o, o(187, s)) +# define BOOST_PP_WHILE_187(p, o, s) BOOST_PP_IF(p(188, s), BOOST_PP_WHILE_188, s BOOST_PP_TUPLE_EAT_3)(p, o, o(188, s)) +# define BOOST_PP_WHILE_188(p, o, s) BOOST_PP_IF(p(189, s), BOOST_PP_WHILE_189, s BOOST_PP_TUPLE_EAT_3)(p, o, o(189, s)) +# define BOOST_PP_WHILE_189(p, o, s) BOOST_PP_IF(p(190, s), BOOST_PP_WHILE_190, s BOOST_PP_TUPLE_EAT_3)(p, o, o(190, s)) +# define BOOST_PP_WHILE_190(p, o, s) BOOST_PP_IF(p(191, s), BOOST_PP_WHILE_191, s BOOST_PP_TUPLE_EAT_3)(p, o, o(191, s)) +# define BOOST_PP_WHILE_191(p, o, s) BOOST_PP_IF(p(192, s), BOOST_PP_WHILE_192, s BOOST_PP_TUPLE_EAT_3)(p, o, o(192, s)) +# define BOOST_PP_WHILE_192(p, o, s) BOOST_PP_IF(p(193, s), BOOST_PP_WHILE_193, s BOOST_PP_TUPLE_EAT_3)(p, o, o(193, s)) +# define BOOST_PP_WHILE_193(p, o, s) BOOST_PP_IF(p(194, s), BOOST_PP_WHILE_194, s BOOST_PP_TUPLE_EAT_3)(p, o, o(194, s)) +# define BOOST_PP_WHILE_194(p, o, s) BOOST_PP_IF(p(195, s), BOOST_PP_WHILE_195, s BOOST_PP_TUPLE_EAT_3)(p, o, o(195, s)) +# define BOOST_PP_WHILE_195(p, o, s) BOOST_PP_IF(p(196, s), BOOST_PP_WHILE_196, s BOOST_PP_TUPLE_EAT_3)(p, o, o(196, s)) +# define BOOST_PP_WHILE_196(p, o, s) BOOST_PP_IF(p(197, s), BOOST_PP_WHILE_197, s BOOST_PP_TUPLE_EAT_3)(p, o, o(197, s)) +# define BOOST_PP_WHILE_197(p, o, s) BOOST_PP_IF(p(198, s), BOOST_PP_WHILE_198, s BOOST_PP_TUPLE_EAT_3)(p, o, o(198, s)) +# define BOOST_PP_WHILE_198(p, o, s) BOOST_PP_IF(p(199, s), BOOST_PP_WHILE_199, s BOOST_PP_TUPLE_EAT_3)(p, o, o(199, s)) +# define BOOST_PP_WHILE_199(p, o, s) BOOST_PP_IF(p(200, s), BOOST_PP_WHILE_200, s BOOST_PP_TUPLE_EAT_3)(p, o, o(200, s)) +# define BOOST_PP_WHILE_200(p, o, s) BOOST_PP_IF(p(201, s), BOOST_PP_WHILE_201, s BOOST_PP_TUPLE_EAT_3)(p, o, o(201, s)) +# define BOOST_PP_WHILE_201(p, o, s) BOOST_PP_IF(p(202, s), BOOST_PP_WHILE_202, s BOOST_PP_TUPLE_EAT_3)(p, o, o(202, s)) +# define BOOST_PP_WHILE_202(p, o, s) BOOST_PP_IF(p(203, s), BOOST_PP_WHILE_203, s BOOST_PP_TUPLE_EAT_3)(p, o, o(203, s)) +# define BOOST_PP_WHILE_203(p, o, s) BOOST_PP_IF(p(204, s), BOOST_PP_WHILE_204, s BOOST_PP_TUPLE_EAT_3)(p, o, o(204, s)) +# define BOOST_PP_WHILE_204(p, o, s) BOOST_PP_IF(p(205, s), BOOST_PP_WHILE_205, s BOOST_PP_TUPLE_EAT_3)(p, o, o(205, s)) +# define BOOST_PP_WHILE_205(p, o, s) BOOST_PP_IF(p(206, s), BOOST_PP_WHILE_206, s BOOST_PP_TUPLE_EAT_3)(p, o, o(206, s)) +# define BOOST_PP_WHILE_206(p, o, s) BOOST_PP_IF(p(207, s), BOOST_PP_WHILE_207, s BOOST_PP_TUPLE_EAT_3)(p, o, o(207, s)) +# define BOOST_PP_WHILE_207(p, o, s) BOOST_PP_IF(p(208, s), BOOST_PP_WHILE_208, s BOOST_PP_TUPLE_EAT_3)(p, o, o(208, s)) +# define BOOST_PP_WHILE_208(p, o, s) BOOST_PP_IF(p(209, s), BOOST_PP_WHILE_209, s BOOST_PP_TUPLE_EAT_3)(p, o, o(209, s)) +# define BOOST_PP_WHILE_209(p, o, s) BOOST_PP_IF(p(210, s), BOOST_PP_WHILE_210, s BOOST_PP_TUPLE_EAT_3)(p, o, o(210, s)) +# define BOOST_PP_WHILE_210(p, o, s) BOOST_PP_IF(p(211, s), BOOST_PP_WHILE_211, s BOOST_PP_TUPLE_EAT_3)(p, o, o(211, s)) +# define BOOST_PP_WHILE_211(p, o, s) BOOST_PP_IF(p(212, s), BOOST_PP_WHILE_212, s BOOST_PP_TUPLE_EAT_3)(p, o, o(212, s)) +# define BOOST_PP_WHILE_212(p, o, s) BOOST_PP_IF(p(213, s), BOOST_PP_WHILE_213, s BOOST_PP_TUPLE_EAT_3)(p, o, o(213, s)) +# define BOOST_PP_WHILE_213(p, o, s) BOOST_PP_IF(p(214, s), BOOST_PP_WHILE_214, s BOOST_PP_TUPLE_EAT_3)(p, o, o(214, s)) +# define BOOST_PP_WHILE_214(p, o, s) BOOST_PP_IF(p(215, s), BOOST_PP_WHILE_215, s BOOST_PP_TUPLE_EAT_3)(p, o, o(215, s)) +# define BOOST_PP_WHILE_215(p, o, s) BOOST_PP_IF(p(216, s), BOOST_PP_WHILE_216, s BOOST_PP_TUPLE_EAT_3)(p, o, o(216, s)) +# define BOOST_PP_WHILE_216(p, o, s) BOOST_PP_IF(p(217, s), BOOST_PP_WHILE_217, s BOOST_PP_TUPLE_EAT_3)(p, o, o(217, s)) +# define BOOST_PP_WHILE_217(p, o, s) BOOST_PP_IF(p(218, s), BOOST_PP_WHILE_218, s BOOST_PP_TUPLE_EAT_3)(p, o, o(218, s)) +# define BOOST_PP_WHILE_218(p, o, s) BOOST_PP_IF(p(219, s), BOOST_PP_WHILE_219, s BOOST_PP_TUPLE_EAT_3)(p, o, o(219, s)) +# define BOOST_PP_WHILE_219(p, o, s) BOOST_PP_IF(p(220, s), BOOST_PP_WHILE_220, s BOOST_PP_TUPLE_EAT_3)(p, o, o(220, s)) +# define BOOST_PP_WHILE_220(p, o, s) BOOST_PP_IF(p(221, s), BOOST_PP_WHILE_221, s BOOST_PP_TUPLE_EAT_3)(p, o, o(221, s)) +# define BOOST_PP_WHILE_221(p, o, s) BOOST_PP_IF(p(222, s), BOOST_PP_WHILE_222, s BOOST_PP_TUPLE_EAT_3)(p, o, o(222, s)) +# define BOOST_PP_WHILE_222(p, o, s) BOOST_PP_IF(p(223, s), BOOST_PP_WHILE_223, s BOOST_PP_TUPLE_EAT_3)(p, o, o(223, s)) +# define BOOST_PP_WHILE_223(p, o, s) BOOST_PP_IF(p(224, s), BOOST_PP_WHILE_224, s BOOST_PP_TUPLE_EAT_3)(p, o, o(224, s)) +# define BOOST_PP_WHILE_224(p, o, s) BOOST_PP_IF(p(225, s), BOOST_PP_WHILE_225, s BOOST_PP_TUPLE_EAT_3)(p, o, o(225, s)) +# define BOOST_PP_WHILE_225(p, o, s) BOOST_PP_IF(p(226, s), BOOST_PP_WHILE_226, s BOOST_PP_TUPLE_EAT_3)(p, o, o(226, s)) +# define BOOST_PP_WHILE_226(p, o, s) BOOST_PP_IF(p(227, s), BOOST_PP_WHILE_227, s BOOST_PP_TUPLE_EAT_3)(p, o, o(227, s)) +# define BOOST_PP_WHILE_227(p, o, s) BOOST_PP_IF(p(228, s), BOOST_PP_WHILE_228, s BOOST_PP_TUPLE_EAT_3)(p, o, o(228, s)) +# define BOOST_PP_WHILE_228(p, o, s) BOOST_PP_IF(p(229, s), BOOST_PP_WHILE_229, s BOOST_PP_TUPLE_EAT_3)(p, o, o(229, s)) +# define BOOST_PP_WHILE_229(p, o, s) BOOST_PP_IF(p(230, s), BOOST_PP_WHILE_230, s BOOST_PP_TUPLE_EAT_3)(p, o, o(230, s)) +# define BOOST_PP_WHILE_230(p, o, s) BOOST_PP_IF(p(231, s), BOOST_PP_WHILE_231, s BOOST_PP_TUPLE_EAT_3)(p, o, o(231, s)) +# define BOOST_PP_WHILE_231(p, o, s) BOOST_PP_IF(p(232, s), BOOST_PP_WHILE_232, s BOOST_PP_TUPLE_EAT_3)(p, o, o(232, s)) +# define BOOST_PP_WHILE_232(p, o, s) BOOST_PP_IF(p(233, s), BOOST_PP_WHILE_233, s BOOST_PP_TUPLE_EAT_3)(p, o, o(233, s)) +# define BOOST_PP_WHILE_233(p, o, s) BOOST_PP_IF(p(234, s), BOOST_PP_WHILE_234, s BOOST_PP_TUPLE_EAT_3)(p, o, o(234, s)) +# define BOOST_PP_WHILE_234(p, o, s) BOOST_PP_IF(p(235, s), BOOST_PP_WHILE_235, s BOOST_PP_TUPLE_EAT_3)(p, o, o(235, s)) +# define BOOST_PP_WHILE_235(p, o, s) BOOST_PP_IF(p(236, s), BOOST_PP_WHILE_236, s BOOST_PP_TUPLE_EAT_3)(p, o, o(236, s)) +# define BOOST_PP_WHILE_236(p, o, s) BOOST_PP_IF(p(237, s), BOOST_PP_WHILE_237, s BOOST_PP_TUPLE_EAT_3)(p, o, o(237, s)) +# define BOOST_PP_WHILE_237(p, o, s) BOOST_PP_IF(p(238, s), BOOST_PP_WHILE_238, s BOOST_PP_TUPLE_EAT_3)(p, o, o(238, s)) +# define BOOST_PP_WHILE_238(p, o, s) BOOST_PP_IF(p(239, s), BOOST_PP_WHILE_239, s BOOST_PP_TUPLE_EAT_3)(p, o, o(239, s)) +# define BOOST_PP_WHILE_239(p, o, s) BOOST_PP_IF(p(240, s), BOOST_PP_WHILE_240, s BOOST_PP_TUPLE_EAT_3)(p, o, o(240, s)) +# define BOOST_PP_WHILE_240(p, o, s) BOOST_PP_IF(p(241, s), BOOST_PP_WHILE_241, s BOOST_PP_TUPLE_EAT_3)(p, o, o(241, s)) +# define BOOST_PP_WHILE_241(p, o, s) BOOST_PP_IF(p(242, s), BOOST_PP_WHILE_242, s BOOST_PP_TUPLE_EAT_3)(p, o, o(242, s)) +# define BOOST_PP_WHILE_242(p, o, s) BOOST_PP_IF(p(243, s), BOOST_PP_WHILE_243, s BOOST_PP_TUPLE_EAT_3)(p, o, o(243, s)) +# define BOOST_PP_WHILE_243(p, o, s) BOOST_PP_IF(p(244, s), BOOST_PP_WHILE_244, s BOOST_PP_TUPLE_EAT_3)(p, o, o(244, s)) +# define BOOST_PP_WHILE_244(p, o, s) BOOST_PP_IF(p(245, s), BOOST_PP_WHILE_245, s BOOST_PP_TUPLE_EAT_3)(p, o, o(245, s)) +# define BOOST_PP_WHILE_245(p, o, s) BOOST_PP_IF(p(246, s), BOOST_PP_WHILE_246, s BOOST_PP_TUPLE_EAT_3)(p, o, o(246, s)) +# define BOOST_PP_WHILE_246(p, o, s) BOOST_PP_IF(p(247, s), BOOST_PP_WHILE_247, s BOOST_PP_TUPLE_EAT_3)(p, o, o(247, s)) +# define BOOST_PP_WHILE_247(p, o, s) BOOST_PP_IF(p(248, s), BOOST_PP_WHILE_248, s BOOST_PP_TUPLE_EAT_3)(p, o, o(248, s)) +# define BOOST_PP_WHILE_248(p, o, s) BOOST_PP_IF(p(249, s), BOOST_PP_WHILE_249, s BOOST_PP_TUPLE_EAT_3)(p, o, o(249, s)) +# define BOOST_PP_WHILE_249(p, o, s) BOOST_PP_IF(p(250, s), BOOST_PP_WHILE_250, s BOOST_PP_TUPLE_EAT_3)(p, o, o(250, s)) +# define BOOST_PP_WHILE_250(p, o, s) BOOST_PP_IF(p(251, s), BOOST_PP_WHILE_251, s BOOST_PP_TUPLE_EAT_3)(p, o, o(251, s)) +# define BOOST_PP_WHILE_251(p, o, s) BOOST_PP_IF(p(252, s), BOOST_PP_WHILE_252, s BOOST_PP_TUPLE_EAT_3)(p, o, o(252, s)) +# define BOOST_PP_WHILE_252(p, o, s) BOOST_PP_IF(p(253, s), BOOST_PP_WHILE_253, s BOOST_PP_TUPLE_EAT_3)(p, o, o(253, s)) +# define BOOST_PP_WHILE_253(p, o, s) BOOST_PP_IF(p(254, s), BOOST_PP_WHILE_254, s BOOST_PP_TUPLE_EAT_3)(p, o, o(254, s)) +# define BOOST_PP_WHILE_254(p, o, s) BOOST_PP_IF(p(255, s), BOOST_PP_WHILE_255, s BOOST_PP_TUPLE_EAT_3)(p, o, o(255, s)) +# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_IF(p(256, s), BOOST_PP_WHILE_256, s BOOST_PP_TUPLE_EAT_3)(p, o, o(256, s)) +# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_IF(p(257, s), BOOST_PP_WHILE_257, s BOOST_PP_TUPLE_EAT_3)(p, o, o(257, s)) +# +# endif diff --git a/contrib/src/boost/preprocessor/control/detail/while.hpp b/contrib/src/boost/preprocessor/control/detail/while.hpp new file mode 100644 index 0000000..7315e1d --- /dev/null +++ b/contrib/src/boost/preprocessor/control/detail/while.hpp @@ -0,0 +1,536 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP +# define BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP +# +# include +# include +# include +# +# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_C(BOOST_PP_BOOL(p(2, s)), p, o, s) +# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_C(BOOST_PP_BOOL(p(3, s)), p, o, s) +# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_C(BOOST_PP_BOOL(p(4, s)), p, o, s) +# define BOOST_PP_WHILE_4(p, o, s) BOOST_PP_WHILE_4_C(BOOST_PP_BOOL(p(5, s)), p, o, s) +# define BOOST_PP_WHILE_5(p, o, s) BOOST_PP_WHILE_5_C(BOOST_PP_BOOL(p(6, s)), p, o, s) +# define BOOST_PP_WHILE_6(p, o, s) BOOST_PP_WHILE_6_C(BOOST_PP_BOOL(p(7, s)), p, o, s) +# define BOOST_PP_WHILE_7(p, o, s) BOOST_PP_WHILE_7_C(BOOST_PP_BOOL(p(8, s)), p, o, s) +# define BOOST_PP_WHILE_8(p, o, s) BOOST_PP_WHILE_8_C(BOOST_PP_BOOL(p(9, s)), p, o, s) +# define BOOST_PP_WHILE_9(p, o, s) BOOST_PP_WHILE_9_C(BOOST_PP_BOOL(p(10, s)), p, o, s) +# define BOOST_PP_WHILE_10(p, o, s) BOOST_PP_WHILE_10_C(BOOST_PP_BOOL(p(11, s)), p, o, s) +# define BOOST_PP_WHILE_11(p, o, s) BOOST_PP_WHILE_11_C(BOOST_PP_BOOL(p(12, s)), p, o, s) +# define BOOST_PP_WHILE_12(p, o, s) BOOST_PP_WHILE_12_C(BOOST_PP_BOOL(p(13, s)), p, o, s) +# define BOOST_PP_WHILE_13(p, o, s) BOOST_PP_WHILE_13_C(BOOST_PP_BOOL(p(14, s)), p, o, s) +# define BOOST_PP_WHILE_14(p, o, s) BOOST_PP_WHILE_14_C(BOOST_PP_BOOL(p(15, s)), p, o, s) +# define BOOST_PP_WHILE_15(p, o, s) BOOST_PP_WHILE_15_C(BOOST_PP_BOOL(p(16, s)), p, o, s) +# define BOOST_PP_WHILE_16(p, o, s) BOOST_PP_WHILE_16_C(BOOST_PP_BOOL(p(17, s)), p, o, s) +# define BOOST_PP_WHILE_17(p, o, s) BOOST_PP_WHILE_17_C(BOOST_PP_BOOL(p(18, s)), p, o, s) +# define BOOST_PP_WHILE_18(p, o, s) BOOST_PP_WHILE_18_C(BOOST_PP_BOOL(p(19, s)), p, o, s) +# define BOOST_PP_WHILE_19(p, o, s) BOOST_PP_WHILE_19_C(BOOST_PP_BOOL(p(20, s)), p, o, s) +# define BOOST_PP_WHILE_20(p, o, s) BOOST_PP_WHILE_20_C(BOOST_PP_BOOL(p(21, s)), p, o, s) +# define BOOST_PP_WHILE_21(p, o, s) BOOST_PP_WHILE_21_C(BOOST_PP_BOOL(p(22, s)), p, o, s) +# define BOOST_PP_WHILE_22(p, o, s) BOOST_PP_WHILE_22_C(BOOST_PP_BOOL(p(23, s)), p, o, s) +# define BOOST_PP_WHILE_23(p, o, s) BOOST_PP_WHILE_23_C(BOOST_PP_BOOL(p(24, s)), p, o, s) +# define BOOST_PP_WHILE_24(p, o, s) BOOST_PP_WHILE_24_C(BOOST_PP_BOOL(p(25, s)), p, o, s) +# define BOOST_PP_WHILE_25(p, o, s) BOOST_PP_WHILE_25_C(BOOST_PP_BOOL(p(26, s)), p, o, s) +# define BOOST_PP_WHILE_26(p, o, s) BOOST_PP_WHILE_26_C(BOOST_PP_BOOL(p(27, s)), p, o, s) +# define BOOST_PP_WHILE_27(p, o, s) BOOST_PP_WHILE_27_C(BOOST_PP_BOOL(p(28, s)), p, o, s) +# define BOOST_PP_WHILE_28(p, o, s) BOOST_PP_WHILE_28_C(BOOST_PP_BOOL(p(29, s)), p, o, s) +# define BOOST_PP_WHILE_29(p, o, s) BOOST_PP_WHILE_29_C(BOOST_PP_BOOL(p(30, s)), p, o, s) +# define BOOST_PP_WHILE_30(p, o, s) BOOST_PP_WHILE_30_C(BOOST_PP_BOOL(p(31, s)), p, o, s) +# define BOOST_PP_WHILE_31(p, o, s) BOOST_PP_WHILE_31_C(BOOST_PP_BOOL(p(32, s)), p, o, s) +# define BOOST_PP_WHILE_32(p, o, s) BOOST_PP_WHILE_32_C(BOOST_PP_BOOL(p(33, s)), p, o, s) +# define BOOST_PP_WHILE_33(p, o, s) BOOST_PP_WHILE_33_C(BOOST_PP_BOOL(p(34, s)), p, o, s) +# define BOOST_PP_WHILE_34(p, o, s) BOOST_PP_WHILE_34_C(BOOST_PP_BOOL(p(35, s)), p, o, s) +# define BOOST_PP_WHILE_35(p, o, s) BOOST_PP_WHILE_35_C(BOOST_PP_BOOL(p(36, s)), p, o, s) +# define BOOST_PP_WHILE_36(p, o, s) BOOST_PP_WHILE_36_C(BOOST_PP_BOOL(p(37, s)), p, o, s) +# define BOOST_PP_WHILE_37(p, o, s) BOOST_PP_WHILE_37_C(BOOST_PP_BOOL(p(38, s)), p, o, s) +# define BOOST_PP_WHILE_38(p, o, s) BOOST_PP_WHILE_38_C(BOOST_PP_BOOL(p(39, s)), p, o, s) +# define BOOST_PP_WHILE_39(p, o, s) BOOST_PP_WHILE_39_C(BOOST_PP_BOOL(p(40, s)), p, o, s) +# define BOOST_PP_WHILE_40(p, o, s) BOOST_PP_WHILE_40_C(BOOST_PP_BOOL(p(41, s)), p, o, s) +# define BOOST_PP_WHILE_41(p, o, s) BOOST_PP_WHILE_41_C(BOOST_PP_BOOL(p(42, s)), p, o, s) +# define BOOST_PP_WHILE_42(p, o, s) BOOST_PP_WHILE_42_C(BOOST_PP_BOOL(p(43, s)), p, o, s) +# define BOOST_PP_WHILE_43(p, o, s) BOOST_PP_WHILE_43_C(BOOST_PP_BOOL(p(44, s)), p, o, s) +# define BOOST_PP_WHILE_44(p, o, s) BOOST_PP_WHILE_44_C(BOOST_PP_BOOL(p(45, s)), p, o, s) +# define BOOST_PP_WHILE_45(p, o, s) BOOST_PP_WHILE_45_C(BOOST_PP_BOOL(p(46, s)), p, o, s) +# define BOOST_PP_WHILE_46(p, o, s) BOOST_PP_WHILE_46_C(BOOST_PP_BOOL(p(47, s)), p, o, s) +# define BOOST_PP_WHILE_47(p, o, s) BOOST_PP_WHILE_47_C(BOOST_PP_BOOL(p(48, s)), p, o, s) +# define BOOST_PP_WHILE_48(p, o, s) BOOST_PP_WHILE_48_C(BOOST_PP_BOOL(p(49, s)), p, o, s) +# define BOOST_PP_WHILE_49(p, o, s) BOOST_PP_WHILE_49_C(BOOST_PP_BOOL(p(50, s)), p, o, s) +# define BOOST_PP_WHILE_50(p, o, s) BOOST_PP_WHILE_50_C(BOOST_PP_BOOL(p(51, s)), p, o, s) +# define BOOST_PP_WHILE_51(p, o, s) BOOST_PP_WHILE_51_C(BOOST_PP_BOOL(p(52, s)), p, o, s) +# define BOOST_PP_WHILE_52(p, o, s) BOOST_PP_WHILE_52_C(BOOST_PP_BOOL(p(53, s)), p, o, s) +# define BOOST_PP_WHILE_53(p, o, s) BOOST_PP_WHILE_53_C(BOOST_PP_BOOL(p(54, s)), p, o, s) +# define BOOST_PP_WHILE_54(p, o, s) BOOST_PP_WHILE_54_C(BOOST_PP_BOOL(p(55, s)), p, o, s) +# define BOOST_PP_WHILE_55(p, o, s) BOOST_PP_WHILE_55_C(BOOST_PP_BOOL(p(56, s)), p, o, s) +# define BOOST_PP_WHILE_56(p, o, s) BOOST_PP_WHILE_56_C(BOOST_PP_BOOL(p(57, s)), p, o, s) +# define BOOST_PP_WHILE_57(p, o, s) BOOST_PP_WHILE_57_C(BOOST_PP_BOOL(p(58, s)), p, o, s) +# define BOOST_PP_WHILE_58(p, o, s) BOOST_PP_WHILE_58_C(BOOST_PP_BOOL(p(59, s)), p, o, s) +# define BOOST_PP_WHILE_59(p, o, s) BOOST_PP_WHILE_59_C(BOOST_PP_BOOL(p(60, s)), p, o, s) +# define BOOST_PP_WHILE_60(p, o, s) BOOST_PP_WHILE_60_C(BOOST_PP_BOOL(p(61, s)), p, o, s) +# define BOOST_PP_WHILE_61(p, o, s) BOOST_PP_WHILE_61_C(BOOST_PP_BOOL(p(62, s)), p, o, s) +# define BOOST_PP_WHILE_62(p, o, s) BOOST_PP_WHILE_62_C(BOOST_PP_BOOL(p(63, s)), p, o, s) +# define BOOST_PP_WHILE_63(p, o, s) BOOST_PP_WHILE_63_C(BOOST_PP_BOOL(p(64, s)), p, o, s) +# define BOOST_PP_WHILE_64(p, o, s) BOOST_PP_WHILE_64_C(BOOST_PP_BOOL(p(65, s)), p, o, s) +# define BOOST_PP_WHILE_65(p, o, s) BOOST_PP_WHILE_65_C(BOOST_PP_BOOL(p(66, s)), p, o, s) +# define BOOST_PP_WHILE_66(p, o, s) BOOST_PP_WHILE_66_C(BOOST_PP_BOOL(p(67, s)), p, o, s) +# define BOOST_PP_WHILE_67(p, o, s) BOOST_PP_WHILE_67_C(BOOST_PP_BOOL(p(68, s)), p, o, s) +# define BOOST_PP_WHILE_68(p, o, s) BOOST_PP_WHILE_68_C(BOOST_PP_BOOL(p(69, s)), p, o, s) +# define BOOST_PP_WHILE_69(p, o, s) BOOST_PP_WHILE_69_C(BOOST_PP_BOOL(p(70, s)), p, o, s) +# define BOOST_PP_WHILE_70(p, o, s) BOOST_PP_WHILE_70_C(BOOST_PP_BOOL(p(71, s)), p, o, s) +# define BOOST_PP_WHILE_71(p, o, s) BOOST_PP_WHILE_71_C(BOOST_PP_BOOL(p(72, s)), p, o, s) +# define BOOST_PP_WHILE_72(p, o, s) BOOST_PP_WHILE_72_C(BOOST_PP_BOOL(p(73, s)), p, o, s) +# define BOOST_PP_WHILE_73(p, o, s) BOOST_PP_WHILE_73_C(BOOST_PP_BOOL(p(74, s)), p, o, s) +# define BOOST_PP_WHILE_74(p, o, s) BOOST_PP_WHILE_74_C(BOOST_PP_BOOL(p(75, s)), p, o, s) +# define BOOST_PP_WHILE_75(p, o, s) BOOST_PP_WHILE_75_C(BOOST_PP_BOOL(p(76, s)), p, o, s) +# define BOOST_PP_WHILE_76(p, o, s) BOOST_PP_WHILE_76_C(BOOST_PP_BOOL(p(77, s)), p, o, s) +# define BOOST_PP_WHILE_77(p, o, s) BOOST_PP_WHILE_77_C(BOOST_PP_BOOL(p(78, s)), p, o, s) +# define BOOST_PP_WHILE_78(p, o, s) BOOST_PP_WHILE_78_C(BOOST_PP_BOOL(p(79, s)), p, o, s) +# define BOOST_PP_WHILE_79(p, o, s) BOOST_PP_WHILE_79_C(BOOST_PP_BOOL(p(80, s)), p, o, s) +# define BOOST_PP_WHILE_80(p, o, s) BOOST_PP_WHILE_80_C(BOOST_PP_BOOL(p(81, s)), p, o, s) +# define BOOST_PP_WHILE_81(p, o, s) BOOST_PP_WHILE_81_C(BOOST_PP_BOOL(p(82, s)), p, o, s) +# define BOOST_PP_WHILE_82(p, o, s) BOOST_PP_WHILE_82_C(BOOST_PP_BOOL(p(83, s)), p, o, s) +# define BOOST_PP_WHILE_83(p, o, s) BOOST_PP_WHILE_83_C(BOOST_PP_BOOL(p(84, s)), p, o, s) +# define BOOST_PP_WHILE_84(p, o, s) BOOST_PP_WHILE_84_C(BOOST_PP_BOOL(p(85, s)), p, o, s) +# define BOOST_PP_WHILE_85(p, o, s) BOOST_PP_WHILE_85_C(BOOST_PP_BOOL(p(86, s)), p, o, s) +# define BOOST_PP_WHILE_86(p, o, s) BOOST_PP_WHILE_86_C(BOOST_PP_BOOL(p(87, s)), p, o, s) +# define BOOST_PP_WHILE_87(p, o, s) BOOST_PP_WHILE_87_C(BOOST_PP_BOOL(p(88, s)), p, o, s) +# define BOOST_PP_WHILE_88(p, o, s) BOOST_PP_WHILE_88_C(BOOST_PP_BOOL(p(89, s)), p, o, s) +# define BOOST_PP_WHILE_89(p, o, s) BOOST_PP_WHILE_89_C(BOOST_PP_BOOL(p(90, s)), p, o, s) +# define BOOST_PP_WHILE_90(p, o, s) BOOST_PP_WHILE_90_C(BOOST_PP_BOOL(p(91, s)), p, o, s) +# define BOOST_PP_WHILE_91(p, o, s) BOOST_PP_WHILE_91_C(BOOST_PP_BOOL(p(92, s)), p, o, s) +# define BOOST_PP_WHILE_92(p, o, s) BOOST_PP_WHILE_92_C(BOOST_PP_BOOL(p(93, s)), p, o, s) +# define BOOST_PP_WHILE_93(p, o, s) BOOST_PP_WHILE_93_C(BOOST_PP_BOOL(p(94, s)), p, o, s) +# define BOOST_PP_WHILE_94(p, o, s) BOOST_PP_WHILE_94_C(BOOST_PP_BOOL(p(95, s)), p, o, s) +# define BOOST_PP_WHILE_95(p, o, s) BOOST_PP_WHILE_95_C(BOOST_PP_BOOL(p(96, s)), p, o, s) +# define BOOST_PP_WHILE_96(p, o, s) BOOST_PP_WHILE_96_C(BOOST_PP_BOOL(p(97, s)), p, o, s) +# define BOOST_PP_WHILE_97(p, o, s) BOOST_PP_WHILE_97_C(BOOST_PP_BOOL(p(98, s)), p, o, s) +# define BOOST_PP_WHILE_98(p, o, s) BOOST_PP_WHILE_98_C(BOOST_PP_BOOL(p(99, s)), p, o, s) +# define BOOST_PP_WHILE_99(p, o, s) BOOST_PP_WHILE_99_C(BOOST_PP_BOOL(p(100, s)), p, o, s) +# define BOOST_PP_WHILE_100(p, o, s) BOOST_PP_WHILE_100_C(BOOST_PP_BOOL(p(101, s)), p, o, s) +# define BOOST_PP_WHILE_101(p, o, s) BOOST_PP_WHILE_101_C(BOOST_PP_BOOL(p(102, s)), p, o, s) +# define BOOST_PP_WHILE_102(p, o, s) BOOST_PP_WHILE_102_C(BOOST_PP_BOOL(p(103, s)), p, o, s) +# define BOOST_PP_WHILE_103(p, o, s) BOOST_PP_WHILE_103_C(BOOST_PP_BOOL(p(104, s)), p, o, s) +# define BOOST_PP_WHILE_104(p, o, s) BOOST_PP_WHILE_104_C(BOOST_PP_BOOL(p(105, s)), p, o, s) +# define BOOST_PP_WHILE_105(p, o, s) BOOST_PP_WHILE_105_C(BOOST_PP_BOOL(p(106, s)), p, o, s) +# define BOOST_PP_WHILE_106(p, o, s) BOOST_PP_WHILE_106_C(BOOST_PP_BOOL(p(107, s)), p, o, s) +# define BOOST_PP_WHILE_107(p, o, s) BOOST_PP_WHILE_107_C(BOOST_PP_BOOL(p(108, s)), p, o, s) +# define BOOST_PP_WHILE_108(p, o, s) BOOST_PP_WHILE_108_C(BOOST_PP_BOOL(p(109, s)), p, o, s) +# define BOOST_PP_WHILE_109(p, o, s) BOOST_PP_WHILE_109_C(BOOST_PP_BOOL(p(110, s)), p, o, s) +# define BOOST_PP_WHILE_110(p, o, s) BOOST_PP_WHILE_110_C(BOOST_PP_BOOL(p(111, s)), p, o, s) +# define BOOST_PP_WHILE_111(p, o, s) BOOST_PP_WHILE_111_C(BOOST_PP_BOOL(p(112, s)), p, o, s) +# define BOOST_PP_WHILE_112(p, o, s) BOOST_PP_WHILE_112_C(BOOST_PP_BOOL(p(113, s)), p, o, s) +# define BOOST_PP_WHILE_113(p, o, s) BOOST_PP_WHILE_113_C(BOOST_PP_BOOL(p(114, s)), p, o, s) +# define BOOST_PP_WHILE_114(p, o, s) BOOST_PP_WHILE_114_C(BOOST_PP_BOOL(p(115, s)), p, o, s) +# define BOOST_PP_WHILE_115(p, o, s) BOOST_PP_WHILE_115_C(BOOST_PP_BOOL(p(116, s)), p, o, s) +# define BOOST_PP_WHILE_116(p, o, s) BOOST_PP_WHILE_116_C(BOOST_PP_BOOL(p(117, s)), p, o, s) +# define BOOST_PP_WHILE_117(p, o, s) BOOST_PP_WHILE_117_C(BOOST_PP_BOOL(p(118, s)), p, o, s) +# define BOOST_PP_WHILE_118(p, o, s) BOOST_PP_WHILE_118_C(BOOST_PP_BOOL(p(119, s)), p, o, s) +# define BOOST_PP_WHILE_119(p, o, s) BOOST_PP_WHILE_119_C(BOOST_PP_BOOL(p(120, s)), p, o, s) +# define BOOST_PP_WHILE_120(p, o, s) BOOST_PP_WHILE_120_C(BOOST_PP_BOOL(p(121, s)), p, o, s) +# define BOOST_PP_WHILE_121(p, o, s) BOOST_PP_WHILE_121_C(BOOST_PP_BOOL(p(122, s)), p, o, s) +# define BOOST_PP_WHILE_122(p, o, s) BOOST_PP_WHILE_122_C(BOOST_PP_BOOL(p(123, s)), p, o, s) +# define BOOST_PP_WHILE_123(p, o, s) BOOST_PP_WHILE_123_C(BOOST_PP_BOOL(p(124, s)), p, o, s) +# define BOOST_PP_WHILE_124(p, o, s) BOOST_PP_WHILE_124_C(BOOST_PP_BOOL(p(125, s)), p, o, s) +# define BOOST_PP_WHILE_125(p, o, s) BOOST_PP_WHILE_125_C(BOOST_PP_BOOL(p(126, s)), p, o, s) +# define BOOST_PP_WHILE_126(p, o, s) BOOST_PP_WHILE_126_C(BOOST_PP_BOOL(p(127, s)), p, o, s) +# define BOOST_PP_WHILE_127(p, o, s) BOOST_PP_WHILE_127_C(BOOST_PP_BOOL(p(128, s)), p, o, s) +# define BOOST_PP_WHILE_128(p, o, s) BOOST_PP_WHILE_128_C(BOOST_PP_BOOL(p(129, s)), p, o, s) +# define BOOST_PP_WHILE_129(p, o, s) BOOST_PP_WHILE_129_C(BOOST_PP_BOOL(p(130, s)), p, o, s) +# define BOOST_PP_WHILE_130(p, o, s) BOOST_PP_WHILE_130_C(BOOST_PP_BOOL(p(131, s)), p, o, s) +# define BOOST_PP_WHILE_131(p, o, s) BOOST_PP_WHILE_131_C(BOOST_PP_BOOL(p(132, s)), p, o, s) +# define BOOST_PP_WHILE_132(p, o, s) BOOST_PP_WHILE_132_C(BOOST_PP_BOOL(p(133, s)), p, o, s) +# define BOOST_PP_WHILE_133(p, o, s) BOOST_PP_WHILE_133_C(BOOST_PP_BOOL(p(134, s)), p, o, s) +# define BOOST_PP_WHILE_134(p, o, s) BOOST_PP_WHILE_134_C(BOOST_PP_BOOL(p(135, s)), p, o, s) +# define BOOST_PP_WHILE_135(p, o, s) BOOST_PP_WHILE_135_C(BOOST_PP_BOOL(p(136, s)), p, o, s) +# define BOOST_PP_WHILE_136(p, o, s) BOOST_PP_WHILE_136_C(BOOST_PP_BOOL(p(137, s)), p, o, s) +# define BOOST_PP_WHILE_137(p, o, s) BOOST_PP_WHILE_137_C(BOOST_PP_BOOL(p(138, s)), p, o, s) +# define BOOST_PP_WHILE_138(p, o, s) BOOST_PP_WHILE_138_C(BOOST_PP_BOOL(p(139, s)), p, o, s) +# define BOOST_PP_WHILE_139(p, o, s) BOOST_PP_WHILE_139_C(BOOST_PP_BOOL(p(140, s)), p, o, s) +# define BOOST_PP_WHILE_140(p, o, s) BOOST_PP_WHILE_140_C(BOOST_PP_BOOL(p(141, s)), p, o, s) +# define BOOST_PP_WHILE_141(p, o, s) BOOST_PP_WHILE_141_C(BOOST_PP_BOOL(p(142, s)), p, o, s) +# define BOOST_PP_WHILE_142(p, o, s) BOOST_PP_WHILE_142_C(BOOST_PP_BOOL(p(143, s)), p, o, s) +# define BOOST_PP_WHILE_143(p, o, s) BOOST_PP_WHILE_143_C(BOOST_PP_BOOL(p(144, s)), p, o, s) +# define BOOST_PP_WHILE_144(p, o, s) BOOST_PP_WHILE_144_C(BOOST_PP_BOOL(p(145, s)), p, o, s) +# define BOOST_PP_WHILE_145(p, o, s) BOOST_PP_WHILE_145_C(BOOST_PP_BOOL(p(146, s)), p, o, s) +# define BOOST_PP_WHILE_146(p, o, s) BOOST_PP_WHILE_146_C(BOOST_PP_BOOL(p(147, s)), p, o, s) +# define BOOST_PP_WHILE_147(p, o, s) BOOST_PP_WHILE_147_C(BOOST_PP_BOOL(p(148, s)), p, o, s) +# define BOOST_PP_WHILE_148(p, o, s) BOOST_PP_WHILE_148_C(BOOST_PP_BOOL(p(149, s)), p, o, s) +# define BOOST_PP_WHILE_149(p, o, s) BOOST_PP_WHILE_149_C(BOOST_PP_BOOL(p(150, s)), p, o, s) +# define BOOST_PP_WHILE_150(p, o, s) BOOST_PP_WHILE_150_C(BOOST_PP_BOOL(p(151, s)), p, o, s) +# define BOOST_PP_WHILE_151(p, o, s) BOOST_PP_WHILE_151_C(BOOST_PP_BOOL(p(152, s)), p, o, s) +# define BOOST_PP_WHILE_152(p, o, s) BOOST_PP_WHILE_152_C(BOOST_PP_BOOL(p(153, s)), p, o, s) +# define BOOST_PP_WHILE_153(p, o, s) BOOST_PP_WHILE_153_C(BOOST_PP_BOOL(p(154, s)), p, o, s) +# define BOOST_PP_WHILE_154(p, o, s) BOOST_PP_WHILE_154_C(BOOST_PP_BOOL(p(155, s)), p, o, s) +# define BOOST_PP_WHILE_155(p, o, s) BOOST_PP_WHILE_155_C(BOOST_PP_BOOL(p(156, s)), p, o, s) +# define BOOST_PP_WHILE_156(p, o, s) BOOST_PP_WHILE_156_C(BOOST_PP_BOOL(p(157, s)), p, o, s) +# define BOOST_PP_WHILE_157(p, o, s) BOOST_PP_WHILE_157_C(BOOST_PP_BOOL(p(158, s)), p, o, s) +# define BOOST_PP_WHILE_158(p, o, s) BOOST_PP_WHILE_158_C(BOOST_PP_BOOL(p(159, s)), p, o, s) +# define BOOST_PP_WHILE_159(p, o, s) BOOST_PP_WHILE_159_C(BOOST_PP_BOOL(p(160, s)), p, o, s) +# define BOOST_PP_WHILE_160(p, o, s) BOOST_PP_WHILE_160_C(BOOST_PP_BOOL(p(161, s)), p, o, s) +# define BOOST_PP_WHILE_161(p, o, s) BOOST_PP_WHILE_161_C(BOOST_PP_BOOL(p(162, s)), p, o, s) +# define BOOST_PP_WHILE_162(p, o, s) BOOST_PP_WHILE_162_C(BOOST_PP_BOOL(p(163, s)), p, o, s) +# define BOOST_PP_WHILE_163(p, o, s) BOOST_PP_WHILE_163_C(BOOST_PP_BOOL(p(164, s)), p, o, s) +# define BOOST_PP_WHILE_164(p, o, s) BOOST_PP_WHILE_164_C(BOOST_PP_BOOL(p(165, s)), p, o, s) +# define BOOST_PP_WHILE_165(p, o, s) BOOST_PP_WHILE_165_C(BOOST_PP_BOOL(p(166, s)), p, o, s) +# define BOOST_PP_WHILE_166(p, o, s) BOOST_PP_WHILE_166_C(BOOST_PP_BOOL(p(167, s)), p, o, s) +# define BOOST_PP_WHILE_167(p, o, s) BOOST_PP_WHILE_167_C(BOOST_PP_BOOL(p(168, s)), p, o, s) +# define BOOST_PP_WHILE_168(p, o, s) BOOST_PP_WHILE_168_C(BOOST_PP_BOOL(p(169, s)), p, o, s) +# define BOOST_PP_WHILE_169(p, o, s) BOOST_PP_WHILE_169_C(BOOST_PP_BOOL(p(170, s)), p, o, s) +# define BOOST_PP_WHILE_170(p, o, s) BOOST_PP_WHILE_170_C(BOOST_PP_BOOL(p(171, s)), p, o, s) +# define BOOST_PP_WHILE_171(p, o, s) BOOST_PP_WHILE_171_C(BOOST_PP_BOOL(p(172, s)), p, o, s) +# define BOOST_PP_WHILE_172(p, o, s) BOOST_PP_WHILE_172_C(BOOST_PP_BOOL(p(173, s)), p, o, s) +# define BOOST_PP_WHILE_173(p, o, s) BOOST_PP_WHILE_173_C(BOOST_PP_BOOL(p(174, s)), p, o, s) +# define BOOST_PP_WHILE_174(p, o, s) BOOST_PP_WHILE_174_C(BOOST_PP_BOOL(p(175, s)), p, o, s) +# define BOOST_PP_WHILE_175(p, o, s) BOOST_PP_WHILE_175_C(BOOST_PP_BOOL(p(176, s)), p, o, s) +# define BOOST_PP_WHILE_176(p, o, s) BOOST_PP_WHILE_176_C(BOOST_PP_BOOL(p(177, s)), p, o, s) +# define BOOST_PP_WHILE_177(p, o, s) BOOST_PP_WHILE_177_C(BOOST_PP_BOOL(p(178, s)), p, o, s) +# define BOOST_PP_WHILE_178(p, o, s) BOOST_PP_WHILE_178_C(BOOST_PP_BOOL(p(179, s)), p, o, s) +# define BOOST_PP_WHILE_179(p, o, s) BOOST_PP_WHILE_179_C(BOOST_PP_BOOL(p(180, s)), p, o, s) +# define BOOST_PP_WHILE_180(p, o, s) BOOST_PP_WHILE_180_C(BOOST_PP_BOOL(p(181, s)), p, o, s) +# define BOOST_PP_WHILE_181(p, o, s) BOOST_PP_WHILE_181_C(BOOST_PP_BOOL(p(182, s)), p, o, s) +# define BOOST_PP_WHILE_182(p, o, s) BOOST_PP_WHILE_182_C(BOOST_PP_BOOL(p(183, s)), p, o, s) +# define BOOST_PP_WHILE_183(p, o, s) BOOST_PP_WHILE_183_C(BOOST_PP_BOOL(p(184, s)), p, o, s) +# define BOOST_PP_WHILE_184(p, o, s) BOOST_PP_WHILE_184_C(BOOST_PP_BOOL(p(185, s)), p, o, s) +# define BOOST_PP_WHILE_185(p, o, s) BOOST_PP_WHILE_185_C(BOOST_PP_BOOL(p(186, s)), p, o, s) +# define BOOST_PP_WHILE_186(p, o, s) BOOST_PP_WHILE_186_C(BOOST_PP_BOOL(p(187, s)), p, o, s) +# define BOOST_PP_WHILE_187(p, o, s) BOOST_PP_WHILE_187_C(BOOST_PP_BOOL(p(188, s)), p, o, s) +# define BOOST_PP_WHILE_188(p, o, s) BOOST_PP_WHILE_188_C(BOOST_PP_BOOL(p(189, s)), p, o, s) +# define BOOST_PP_WHILE_189(p, o, s) BOOST_PP_WHILE_189_C(BOOST_PP_BOOL(p(190, s)), p, o, s) +# define BOOST_PP_WHILE_190(p, o, s) BOOST_PP_WHILE_190_C(BOOST_PP_BOOL(p(191, s)), p, o, s) +# define BOOST_PP_WHILE_191(p, o, s) BOOST_PP_WHILE_191_C(BOOST_PP_BOOL(p(192, s)), p, o, s) +# define BOOST_PP_WHILE_192(p, o, s) BOOST_PP_WHILE_192_C(BOOST_PP_BOOL(p(193, s)), p, o, s) +# define BOOST_PP_WHILE_193(p, o, s) BOOST_PP_WHILE_193_C(BOOST_PP_BOOL(p(194, s)), p, o, s) +# define BOOST_PP_WHILE_194(p, o, s) BOOST_PP_WHILE_194_C(BOOST_PP_BOOL(p(195, s)), p, o, s) +# define BOOST_PP_WHILE_195(p, o, s) BOOST_PP_WHILE_195_C(BOOST_PP_BOOL(p(196, s)), p, o, s) +# define BOOST_PP_WHILE_196(p, o, s) BOOST_PP_WHILE_196_C(BOOST_PP_BOOL(p(197, s)), p, o, s) +# define BOOST_PP_WHILE_197(p, o, s) BOOST_PP_WHILE_197_C(BOOST_PP_BOOL(p(198, s)), p, o, s) +# define BOOST_PP_WHILE_198(p, o, s) BOOST_PP_WHILE_198_C(BOOST_PP_BOOL(p(199, s)), p, o, s) +# define BOOST_PP_WHILE_199(p, o, s) BOOST_PP_WHILE_199_C(BOOST_PP_BOOL(p(200, s)), p, o, s) +# define BOOST_PP_WHILE_200(p, o, s) BOOST_PP_WHILE_200_C(BOOST_PP_BOOL(p(201, s)), p, o, s) +# define BOOST_PP_WHILE_201(p, o, s) BOOST_PP_WHILE_201_C(BOOST_PP_BOOL(p(202, s)), p, o, s) +# define BOOST_PP_WHILE_202(p, o, s) BOOST_PP_WHILE_202_C(BOOST_PP_BOOL(p(203, s)), p, o, s) +# define BOOST_PP_WHILE_203(p, o, s) BOOST_PP_WHILE_203_C(BOOST_PP_BOOL(p(204, s)), p, o, s) +# define BOOST_PP_WHILE_204(p, o, s) BOOST_PP_WHILE_204_C(BOOST_PP_BOOL(p(205, s)), p, o, s) +# define BOOST_PP_WHILE_205(p, o, s) BOOST_PP_WHILE_205_C(BOOST_PP_BOOL(p(206, s)), p, o, s) +# define BOOST_PP_WHILE_206(p, o, s) BOOST_PP_WHILE_206_C(BOOST_PP_BOOL(p(207, s)), p, o, s) +# define BOOST_PP_WHILE_207(p, o, s) BOOST_PP_WHILE_207_C(BOOST_PP_BOOL(p(208, s)), p, o, s) +# define BOOST_PP_WHILE_208(p, o, s) BOOST_PP_WHILE_208_C(BOOST_PP_BOOL(p(209, s)), p, o, s) +# define BOOST_PP_WHILE_209(p, o, s) BOOST_PP_WHILE_209_C(BOOST_PP_BOOL(p(210, s)), p, o, s) +# define BOOST_PP_WHILE_210(p, o, s) BOOST_PP_WHILE_210_C(BOOST_PP_BOOL(p(211, s)), p, o, s) +# define BOOST_PP_WHILE_211(p, o, s) BOOST_PP_WHILE_211_C(BOOST_PP_BOOL(p(212, s)), p, o, s) +# define BOOST_PP_WHILE_212(p, o, s) BOOST_PP_WHILE_212_C(BOOST_PP_BOOL(p(213, s)), p, o, s) +# define BOOST_PP_WHILE_213(p, o, s) BOOST_PP_WHILE_213_C(BOOST_PP_BOOL(p(214, s)), p, o, s) +# define BOOST_PP_WHILE_214(p, o, s) BOOST_PP_WHILE_214_C(BOOST_PP_BOOL(p(215, s)), p, o, s) +# define BOOST_PP_WHILE_215(p, o, s) BOOST_PP_WHILE_215_C(BOOST_PP_BOOL(p(216, s)), p, o, s) +# define BOOST_PP_WHILE_216(p, o, s) BOOST_PP_WHILE_216_C(BOOST_PP_BOOL(p(217, s)), p, o, s) +# define BOOST_PP_WHILE_217(p, o, s) BOOST_PP_WHILE_217_C(BOOST_PP_BOOL(p(218, s)), p, o, s) +# define BOOST_PP_WHILE_218(p, o, s) BOOST_PP_WHILE_218_C(BOOST_PP_BOOL(p(219, s)), p, o, s) +# define BOOST_PP_WHILE_219(p, o, s) BOOST_PP_WHILE_219_C(BOOST_PP_BOOL(p(220, s)), p, o, s) +# define BOOST_PP_WHILE_220(p, o, s) BOOST_PP_WHILE_220_C(BOOST_PP_BOOL(p(221, s)), p, o, s) +# define BOOST_PP_WHILE_221(p, o, s) BOOST_PP_WHILE_221_C(BOOST_PP_BOOL(p(222, s)), p, o, s) +# define BOOST_PP_WHILE_222(p, o, s) BOOST_PP_WHILE_222_C(BOOST_PP_BOOL(p(223, s)), p, o, s) +# define BOOST_PP_WHILE_223(p, o, s) BOOST_PP_WHILE_223_C(BOOST_PP_BOOL(p(224, s)), p, o, s) +# define BOOST_PP_WHILE_224(p, o, s) BOOST_PP_WHILE_224_C(BOOST_PP_BOOL(p(225, s)), p, o, s) +# define BOOST_PP_WHILE_225(p, o, s) BOOST_PP_WHILE_225_C(BOOST_PP_BOOL(p(226, s)), p, o, s) +# define BOOST_PP_WHILE_226(p, o, s) BOOST_PP_WHILE_226_C(BOOST_PP_BOOL(p(227, s)), p, o, s) +# define BOOST_PP_WHILE_227(p, o, s) BOOST_PP_WHILE_227_C(BOOST_PP_BOOL(p(228, s)), p, o, s) +# define BOOST_PP_WHILE_228(p, o, s) BOOST_PP_WHILE_228_C(BOOST_PP_BOOL(p(229, s)), p, o, s) +# define BOOST_PP_WHILE_229(p, o, s) BOOST_PP_WHILE_229_C(BOOST_PP_BOOL(p(230, s)), p, o, s) +# define BOOST_PP_WHILE_230(p, o, s) BOOST_PP_WHILE_230_C(BOOST_PP_BOOL(p(231, s)), p, o, s) +# define BOOST_PP_WHILE_231(p, o, s) BOOST_PP_WHILE_231_C(BOOST_PP_BOOL(p(232, s)), p, o, s) +# define BOOST_PP_WHILE_232(p, o, s) BOOST_PP_WHILE_232_C(BOOST_PP_BOOL(p(233, s)), p, o, s) +# define BOOST_PP_WHILE_233(p, o, s) BOOST_PP_WHILE_233_C(BOOST_PP_BOOL(p(234, s)), p, o, s) +# define BOOST_PP_WHILE_234(p, o, s) BOOST_PP_WHILE_234_C(BOOST_PP_BOOL(p(235, s)), p, o, s) +# define BOOST_PP_WHILE_235(p, o, s) BOOST_PP_WHILE_235_C(BOOST_PP_BOOL(p(236, s)), p, o, s) +# define BOOST_PP_WHILE_236(p, o, s) BOOST_PP_WHILE_236_C(BOOST_PP_BOOL(p(237, s)), p, o, s) +# define BOOST_PP_WHILE_237(p, o, s) BOOST_PP_WHILE_237_C(BOOST_PP_BOOL(p(238, s)), p, o, s) +# define BOOST_PP_WHILE_238(p, o, s) BOOST_PP_WHILE_238_C(BOOST_PP_BOOL(p(239, s)), p, o, s) +# define BOOST_PP_WHILE_239(p, o, s) BOOST_PP_WHILE_239_C(BOOST_PP_BOOL(p(240, s)), p, o, s) +# define BOOST_PP_WHILE_240(p, o, s) BOOST_PP_WHILE_240_C(BOOST_PP_BOOL(p(241, s)), p, o, s) +# define BOOST_PP_WHILE_241(p, o, s) BOOST_PP_WHILE_241_C(BOOST_PP_BOOL(p(242, s)), p, o, s) +# define BOOST_PP_WHILE_242(p, o, s) BOOST_PP_WHILE_242_C(BOOST_PP_BOOL(p(243, s)), p, o, s) +# define BOOST_PP_WHILE_243(p, o, s) BOOST_PP_WHILE_243_C(BOOST_PP_BOOL(p(244, s)), p, o, s) +# define BOOST_PP_WHILE_244(p, o, s) BOOST_PP_WHILE_244_C(BOOST_PP_BOOL(p(245, s)), p, o, s) +# define BOOST_PP_WHILE_245(p, o, s) BOOST_PP_WHILE_245_C(BOOST_PP_BOOL(p(246, s)), p, o, s) +# define BOOST_PP_WHILE_246(p, o, s) BOOST_PP_WHILE_246_C(BOOST_PP_BOOL(p(247, s)), p, o, s) +# define BOOST_PP_WHILE_247(p, o, s) BOOST_PP_WHILE_247_C(BOOST_PP_BOOL(p(248, s)), p, o, s) +# define BOOST_PP_WHILE_248(p, o, s) BOOST_PP_WHILE_248_C(BOOST_PP_BOOL(p(249, s)), p, o, s) +# define BOOST_PP_WHILE_249(p, o, s) BOOST_PP_WHILE_249_C(BOOST_PP_BOOL(p(250, s)), p, o, s) +# define BOOST_PP_WHILE_250(p, o, s) BOOST_PP_WHILE_250_C(BOOST_PP_BOOL(p(251, s)), p, o, s) +# define BOOST_PP_WHILE_251(p, o, s) BOOST_PP_WHILE_251_C(BOOST_PP_BOOL(p(252, s)), p, o, s) +# define BOOST_PP_WHILE_252(p, o, s) BOOST_PP_WHILE_252_C(BOOST_PP_BOOL(p(253, s)), p, o, s) +# define BOOST_PP_WHILE_253(p, o, s) BOOST_PP_WHILE_253_C(BOOST_PP_BOOL(p(254, s)), p, o, s) +# define BOOST_PP_WHILE_254(p, o, s) BOOST_PP_WHILE_254_C(BOOST_PP_BOOL(p(255, s)), p, o, s) +# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_C(BOOST_PP_BOOL(p(256, s)), p, o, s) +# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_C(BOOST_PP_BOOL(p(257, s)), p, o, s) +# +# define BOOST_PP_WHILE_1_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(2, s)) +# define BOOST_PP_WHILE_2_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(3, s)) +# define BOOST_PP_WHILE_3_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(4, s)) +# define BOOST_PP_WHILE_4_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_5, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(5, s)) +# define BOOST_PP_WHILE_5_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_6, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(6, s)) +# define BOOST_PP_WHILE_6_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_7, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(7, s)) +# define BOOST_PP_WHILE_7_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_8, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(8, s)) +# define BOOST_PP_WHILE_8_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_9, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(9, s)) +# define BOOST_PP_WHILE_9_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_10, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(10, s)) +# define BOOST_PP_WHILE_10_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_11, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(11, s)) +# define BOOST_PP_WHILE_11_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_12, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(12, s)) +# define BOOST_PP_WHILE_12_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_13, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(13, s)) +# define BOOST_PP_WHILE_13_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_14, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(14, s)) +# define BOOST_PP_WHILE_14_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_15, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(15, s)) +# define BOOST_PP_WHILE_15_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_16, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(16, s)) +# define BOOST_PP_WHILE_16_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_17, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(17, s)) +# define BOOST_PP_WHILE_17_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_18, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(18, s)) +# define BOOST_PP_WHILE_18_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_19, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(19, s)) +# define BOOST_PP_WHILE_19_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_20, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(20, s)) +# define BOOST_PP_WHILE_20_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_21, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(21, s)) +# define BOOST_PP_WHILE_21_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_22, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(22, s)) +# define BOOST_PP_WHILE_22_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_23, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(23, s)) +# define BOOST_PP_WHILE_23_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_24, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(24, s)) +# define BOOST_PP_WHILE_24_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_25, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(25, s)) +# define BOOST_PP_WHILE_25_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_26, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(26, s)) +# define BOOST_PP_WHILE_26_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_27, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(27, s)) +# define BOOST_PP_WHILE_27_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_28, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(28, s)) +# define BOOST_PP_WHILE_28_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_29, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(29, s)) +# define BOOST_PP_WHILE_29_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_30, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(30, s)) +# define BOOST_PP_WHILE_30_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_31, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(31, s)) +# define BOOST_PP_WHILE_31_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_32, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(32, s)) +# define BOOST_PP_WHILE_32_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_33, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(33, s)) +# define BOOST_PP_WHILE_33_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_34, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(34, s)) +# define BOOST_PP_WHILE_34_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_35, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(35, s)) +# define BOOST_PP_WHILE_35_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_36, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(36, s)) +# define BOOST_PP_WHILE_36_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_37, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(37, s)) +# define BOOST_PP_WHILE_37_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_38, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(38, s)) +# define BOOST_PP_WHILE_38_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_39, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(39, s)) +# define BOOST_PP_WHILE_39_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_40, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(40, s)) +# define BOOST_PP_WHILE_40_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_41, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(41, s)) +# define BOOST_PP_WHILE_41_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_42, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(42, s)) +# define BOOST_PP_WHILE_42_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_43, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(43, s)) +# define BOOST_PP_WHILE_43_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_44, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(44, s)) +# define BOOST_PP_WHILE_44_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_45, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(45, s)) +# define BOOST_PP_WHILE_45_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_46, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(46, s)) +# define BOOST_PP_WHILE_46_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_47, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(47, s)) +# define BOOST_PP_WHILE_47_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_48, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(48, s)) +# define BOOST_PP_WHILE_48_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_49, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(49, s)) +# define BOOST_PP_WHILE_49_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_50, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(50, s)) +# define BOOST_PP_WHILE_50_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_51, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(51, s)) +# define BOOST_PP_WHILE_51_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_52, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(52, s)) +# define BOOST_PP_WHILE_52_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_53, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(53, s)) +# define BOOST_PP_WHILE_53_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_54, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(54, s)) +# define BOOST_PP_WHILE_54_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_55, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(55, s)) +# define BOOST_PP_WHILE_55_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_56, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(56, s)) +# define BOOST_PP_WHILE_56_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_57, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(57, s)) +# define BOOST_PP_WHILE_57_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_58, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(58, s)) +# define BOOST_PP_WHILE_58_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_59, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(59, s)) +# define BOOST_PP_WHILE_59_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_60, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(60, s)) +# define BOOST_PP_WHILE_60_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_61, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(61, s)) +# define BOOST_PP_WHILE_61_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_62, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(62, s)) +# define BOOST_PP_WHILE_62_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_63, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(63, s)) +# define BOOST_PP_WHILE_63_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_64, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(64, s)) +# define BOOST_PP_WHILE_64_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_65, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(65, s)) +# define BOOST_PP_WHILE_65_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_66, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(66, s)) +# define BOOST_PP_WHILE_66_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_67, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(67, s)) +# define BOOST_PP_WHILE_67_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_68, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(68, s)) +# define BOOST_PP_WHILE_68_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_69, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(69, s)) +# define BOOST_PP_WHILE_69_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_70, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(70, s)) +# define BOOST_PP_WHILE_70_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_71, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(71, s)) +# define BOOST_PP_WHILE_71_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_72, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(72, s)) +# define BOOST_PP_WHILE_72_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_73, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(73, s)) +# define BOOST_PP_WHILE_73_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_74, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(74, s)) +# define BOOST_PP_WHILE_74_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_75, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(75, s)) +# define BOOST_PP_WHILE_75_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_76, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(76, s)) +# define BOOST_PP_WHILE_76_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_77, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(77, s)) +# define BOOST_PP_WHILE_77_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_78, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(78, s)) +# define BOOST_PP_WHILE_78_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_79, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(79, s)) +# define BOOST_PP_WHILE_79_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_80, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(80, s)) +# define BOOST_PP_WHILE_80_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_81, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(81, s)) +# define BOOST_PP_WHILE_81_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_82, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(82, s)) +# define BOOST_PP_WHILE_82_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_83, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(83, s)) +# define BOOST_PP_WHILE_83_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_84, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(84, s)) +# define BOOST_PP_WHILE_84_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_85, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(85, s)) +# define BOOST_PP_WHILE_85_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_86, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(86, s)) +# define BOOST_PP_WHILE_86_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_87, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(87, s)) +# define BOOST_PP_WHILE_87_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_88, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(88, s)) +# define BOOST_PP_WHILE_88_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_89, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(89, s)) +# define BOOST_PP_WHILE_89_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_90, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(90, s)) +# define BOOST_PP_WHILE_90_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_91, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(91, s)) +# define BOOST_PP_WHILE_91_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_92, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(92, s)) +# define BOOST_PP_WHILE_92_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_93, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(93, s)) +# define BOOST_PP_WHILE_93_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_94, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(94, s)) +# define BOOST_PP_WHILE_94_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_95, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(95, s)) +# define BOOST_PP_WHILE_95_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_96, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(96, s)) +# define BOOST_PP_WHILE_96_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_97, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(97, s)) +# define BOOST_PP_WHILE_97_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_98, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(98, s)) +# define BOOST_PP_WHILE_98_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_99, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(99, s)) +# define BOOST_PP_WHILE_99_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_100, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(100, s)) +# define BOOST_PP_WHILE_100_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_101, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(101, s)) +# define BOOST_PP_WHILE_101_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_102, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(102, s)) +# define BOOST_PP_WHILE_102_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_103, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(103, s)) +# define BOOST_PP_WHILE_103_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_104, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(104, s)) +# define BOOST_PP_WHILE_104_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_105, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(105, s)) +# define BOOST_PP_WHILE_105_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_106, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(106, s)) +# define BOOST_PP_WHILE_106_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_107, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(107, s)) +# define BOOST_PP_WHILE_107_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_108, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(108, s)) +# define BOOST_PP_WHILE_108_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_109, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(109, s)) +# define BOOST_PP_WHILE_109_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_110, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(110, s)) +# define BOOST_PP_WHILE_110_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_111, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(111, s)) +# define BOOST_PP_WHILE_111_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_112, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(112, s)) +# define BOOST_PP_WHILE_112_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_113, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(113, s)) +# define BOOST_PP_WHILE_113_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_114, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(114, s)) +# define BOOST_PP_WHILE_114_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_115, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(115, s)) +# define BOOST_PP_WHILE_115_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_116, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(116, s)) +# define BOOST_PP_WHILE_116_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_117, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(117, s)) +# define BOOST_PP_WHILE_117_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_118, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(118, s)) +# define BOOST_PP_WHILE_118_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_119, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(119, s)) +# define BOOST_PP_WHILE_119_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_120, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(120, s)) +# define BOOST_PP_WHILE_120_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_121, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(121, s)) +# define BOOST_PP_WHILE_121_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_122, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(122, s)) +# define BOOST_PP_WHILE_122_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_123, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(123, s)) +# define BOOST_PP_WHILE_123_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_124, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(124, s)) +# define BOOST_PP_WHILE_124_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_125, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(125, s)) +# define BOOST_PP_WHILE_125_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_126, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(126, s)) +# define BOOST_PP_WHILE_126_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_127, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(127, s)) +# define BOOST_PP_WHILE_127_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_128, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(128, s)) +# define BOOST_PP_WHILE_128_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_129, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(129, s)) +# define BOOST_PP_WHILE_129_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_130, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(130, s)) +# define BOOST_PP_WHILE_130_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_131, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(131, s)) +# define BOOST_PP_WHILE_131_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_132, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(132, s)) +# define BOOST_PP_WHILE_132_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_133, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(133, s)) +# define BOOST_PP_WHILE_133_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_134, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(134, s)) +# define BOOST_PP_WHILE_134_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_135, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(135, s)) +# define BOOST_PP_WHILE_135_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_136, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(136, s)) +# define BOOST_PP_WHILE_136_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_137, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(137, s)) +# define BOOST_PP_WHILE_137_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_138, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(138, s)) +# define BOOST_PP_WHILE_138_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_139, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(139, s)) +# define BOOST_PP_WHILE_139_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_140, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(140, s)) +# define BOOST_PP_WHILE_140_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_141, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(141, s)) +# define BOOST_PP_WHILE_141_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_142, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(142, s)) +# define BOOST_PP_WHILE_142_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_143, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(143, s)) +# define BOOST_PP_WHILE_143_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_144, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(144, s)) +# define BOOST_PP_WHILE_144_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_145, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(145, s)) +# define BOOST_PP_WHILE_145_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_146, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(146, s)) +# define BOOST_PP_WHILE_146_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_147, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(147, s)) +# define BOOST_PP_WHILE_147_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_148, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(148, s)) +# define BOOST_PP_WHILE_148_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_149, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(149, s)) +# define BOOST_PP_WHILE_149_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_150, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(150, s)) +# define BOOST_PP_WHILE_150_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_151, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(151, s)) +# define BOOST_PP_WHILE_151_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_152, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(152, s)) +# define BOOST_PP_WHILE_152_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_153, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(153, s)) +# define BOOST_PP_WHILE_153_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_154, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(154, s)) +# define BOOST_PP_WHILE_154_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_155, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(155, s)) +# define BOOST_PP_WHILE_155_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_156, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(156, s)) +# define BOOST_PP_WHILE_156_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_157, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(157, s)) +# define BOOST_PP_WHILE_157_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_158, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(158, s)) +# define BOOST_PP_WHILE_158_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_159, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(159, s)) +# define BOOST_PP_WHILE_159_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_160, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(160, s)) +# define BOOST_PP_WHILE_160_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_161, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(161, s)) +# define BOOST_PP_WHILE_161_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_162, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(162, s)) +# define BOOST_PP_WHILE_162_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_163, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(163, s)) +# define BOOST_PP_WHILE_163_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_164, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(164, s)) +# define BOOST_PP_WHILE_164_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_165, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(165, s)) +# define BOOST_PP_WHILE_165_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_166, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(166, s)) +# define BOOST_PP_WHILE_166_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_167, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(167, s)) +# define BOOST_PP_WHILE_167_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_168, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(168, s)) +# define BOOST_PP_WHILE_168_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_169, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(169, s)) +# define BOOST_PP_WHILE_169_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_170, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(170, s)) +# define BOOST_PP_WHILE_170_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_171, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(171, s)) +# define BOOST_PP_WHILE_171_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_172, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(172, s)) +# define BOOST_PP_WHILE_172_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_173, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(173, s)) +# define BOOST_PP_WHILE_173_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_174, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(174, s)) +# define BOOST_PP_WHILE_174_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_175, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(175, s)) +# define BOOST_PP_WHILE_175_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_176, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(176, s)) +# define BOOST_PP_WHILE_176_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_177, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(177, s)) +# define BOOST_PP_WHILE_177_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_178, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(178, s)) +# define BOOST_PP_WHILE_178_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_179, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(179, s)) +# define BOOST_PP_WHILE_179_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_180, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(180, s)) +# define BOOST_PP_WHILE_180_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_181, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(181, s)) +# define BOOST_PP_WHILE_181_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_182, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(182, s)) +# define BOOST_PP_WHILE_182_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_183, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(183, s)) +# define BOOST_PP_WHILE_183_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_184, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(184, s)) +# define BOOST_PP_WHILE_184_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_185, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(185, s)) +# define BOOST_PP_WHILE_185_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_186, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(186, s)) +# define BOOST_PP_WHILE_186_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_187, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(187, s)) +# define BOOST_PP_WHILE_187_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_188, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(188, s)) +# define BOOST_PP_WHILE_188_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_189, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(189, s)) +# define BOOST_PP_WHILE_189_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_190, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(190, s)) +# define BOOST_PP_WHILE_190_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_191, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(191, s)) +# define BOOST_PP_WHILE_191_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_192, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(192, s)) +# define BOOST_PP_WHILE_192_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_193, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(193, s)) +# define BOOST_PP_WHILE_193_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_194, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(194, s)) +# define BOOST_PP_WHILE_194_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_195, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(195, s)) +# define BOOST_PP_WHILE_195_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_196, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(196, s)) +# define BOOST_PP_WHILE_196_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_197, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(197, s)) +# define BOOST_PP_WHILE_197_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_198, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(198, s)) +# define BOOST_PP_WHILE_198_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_199, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(199, s)) +# define BOOST_PP_WHILE_199_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_200, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(200, s)) +# define BOOST_PP_WHILE_200_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_201, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(201, s)) +# define BOOST_PP_WHILE_201_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_202, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(202, s)) +# define BOOST_PP_WHILE_202_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_203, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(203, s)) +# define BOOST_PP_WHILE_203_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_204, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(204, s)) +# define BOOST_PP_WHILE_204_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_205, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(205, s)) +# define BOOST_PP_WHILE_205_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_206, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(206, s)) +# define BOOST_PP_WHILE_206_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_207, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(207, s)) +# define BOOST_PP_WHILE_207_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_208, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(208, s)) +# define BOOST_PP_WHILE_208_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_209, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(209, s)) +# define BOOST_PP_WHILE_209_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_210, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(210, s)) +# define BOOST_PP_WHILE_210_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_211, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(211, s)) +# define BOOST_PP_WHILE_211_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_212, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(212, s)) +# define BOOST_PP_WHILE_212_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_213, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(213, s)) +# define BOOST_PP_WHILE_213_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_214, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(214, s)) +# define BOOST_PP_WHILE_214_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_215, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(215, s)) +# define BOOST_PP_WHILE_215_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_216, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(216, s)) +# define BOOST_PP_WHILE_216_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_217, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(217, s)) +# define BOOST_PP_WHILE_217_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_218, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(218, s)) +# define BOOST_PP_WHILE_218_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_219, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(219, s)) +# define BOOST_PP_WHILE_219_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_220, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(220, s)) +# define BOOST_PP_WHILE_220_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_221, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(221, s)) +# define BOOST_PP_WHILE_221_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_222, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(222, s)) +# define BOOST_PP_WHILE_222_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_223, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(223, s)) +# define BOOST_PP_WHILE_223_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_224, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(224, s)) +# define BOOST_PP_WHILE_224_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_225, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(225, s)) +# define BOOST_PP_WHILE_225_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_226, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(226, s)) +# define BOOST_PP_WHILE_226_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_227, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(227, s)) +# define BOOST_PP_WHILE_227_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_228, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(228, s)) +# define BOOST_PP_WHILE_228_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_229, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(229, s)) +# define BOOST_PP_WHILE_229_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_230, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(230, s)) +# define BOOST_PP_WHILE_230_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_231, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(231, s)) +# define BOOST_PP_WHILE_231_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_232, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(232, s)) +# define BOOST_PP_WHILE_232_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_233, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(233, s)) +# define BOOST_PP_WHILE_233_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_234, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(234, s)) +# define BOOST_PP_WHILE_234_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_235, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(235, s)) +# define BOOST_PP_WHILE_235_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_236, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(236, s)) +# define BOOST_PP_WHILE_236_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_237, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(237, s)) +# define BOOST_PP_WHILE_237_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_238, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(238, s)) +# define BOOST_PP_WHILE_238_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_239, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(239, s)) +# define BOOST_PP_WHILE_239_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_240, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(240, s)) +# define BOOST_PP_WHILE_240_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_241, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(241, s)) +# define BOOST_PP_WHILE_241_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_242, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(242, s)) +# define BOOST_PP_WHILE_242_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_243, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(243, s)) +# define BOOST_PP_WHILE_243_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_244, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(244, s)) +# define BOOST_PP_WHILE_244_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_245, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(245, s)) +# define BOOST_PP_WHILE_245_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_246, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(246, s)) +# define BOOST_PP_WHILE_246_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_247, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(247, s)) +# define BOOST_PP_WHILE_247_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_248, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(248, s)) +# define BOOST_PP_WHILE_248_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_249, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(249, s)) +# define BOOST_PP_WHILE_249_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_250, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(250, s)) +# define BOOST_PP_WHILE_250_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_251, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(251, s)) +# define BOOST_PP_WHILE_251_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_252, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(252, s)) +# define BOOST_PP_WHILE_252_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_253, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(253, s)) +# define BOOST_PP_WHILE_253_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_254, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(254, s)) +# define BOOST_PP_WHILE_254_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_255, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(255, s)) +# define BOOST_PP_WHILE_255_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_256, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(256, s)) +# define BOOST_PP_WHILE_256_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_257, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(257, s)) +# +# +# endif diff --git a/contrib/src/boost/preprocessor/control/expr_if.hpp b/contrib/src/boost/preprocessor/control/expr_if.hpp new file mode 100644 index 0000000..0e1ab51 --- /dev/null +++ b/contrib/src/boost/preprocessor/control/expr_if.hpp @@ -0,0 +1,30 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_EXPR_IF_HPP +# define BOOST_PREPROCESSOR_CONTROL_EXPR_IF_HPP +# +# include +# include +# include +# +# /* BOOST_PP_EXPR_IF */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_EXPR_IF(cond, expr) BOOST_PP_EXPR_IIF(BOOST_PP_BOOL(cond), expr) +# else +# define BOOST_PP_EXPR_IF(cond, expr) BOOST_PP_EXPR_IF_I(cond, expr) +# define BOOST_PP_EXPR_IF_I(cond, expr) BOOST_PP_EXPR_IIF(BOOST_PP_BOOL(cond), expr) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/control/expr_iif.hpp b/contrib/src/boost/preprocessor/control/expr_iif.hpp new file mode 100644 index 0000000..58f45a4 --- /dev/null +++ b/contrib/src/boost/preprocessor/control/expr_iif.hpp @@ -0,0 +1,31 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_EXPR_IIF_HPP +# define BOOST_PREPROCESSOR_CONTROL_EXPR_IIF_HPP +# +# include +# +# /* BOOST_PP_EXPR_IIF */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_EXPR_IIF(bit, expr) BOOST_PP_EXPR_IIF_I(bit, expr) +# else +# define BOOST_PP_EXPR_IIF(bit, expr) BOOST_PP_EXPR_IIF_OO((bit, expr)) +# define BOOST_PP_EXPR_IIF_OO(par) BOOST_PP_EXPR_IIF_I ## par +# endif +# +# define BOOST_PP_EXPR_IIF_I(bit, expr) BOOST_PP_EXPR_IIF_ ## bit(expr) +# +# define BOOST_PP_EXPR_IIF_0(expr) +# define BOOST_PP_EXPR_IIF_1(expr) expr +# +# endif diff --git a/contrib/src/boost/preprocessor/control/if.hpp b/contrib/src/boost/preprocessor/control/if.hpp new file mode 100644 index 0000000..52cfc3d --- /dev/null +++ b/contrib/src/boost/preprocessor/control/if.hpp @@ -0,0 +1,30 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_IF_HPP +# define BOOST_PREPROCESSOR_CONTROL_IF_HPP +# +# include +# include +# include +# +# /* BOOST_PP_IF */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_IF(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) +# else +# define BOOST_PP_IF(cond, t, f) BOOST_PP_IF_I(cond, t, f) +# define BOOST_PP_IF_I(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/control/iif.hpp b/contrib/src/boost/preprocessor/control/iif.hpp new file mode 100644 index 0000000..fd07817 --- /dev/null +++ b/contrib/src/boost/preprocessor/control/iif.hpp @@ -0,0 +1,34 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_IIF_HPP +# define BOOST_PREPROCESSOR_CONTROL_IIF_HPP +# +# include +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_I(bit, t, f) +# else +# define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_OO((bit, t, f)) +# define BOOST_PP_IIF_OO(par) BOOST_PP_IIF_I ## par +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_ ## bit(t, f) +# else +# define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_II(BOOST_PP_IIF_ ## bit(t, f)) +# define BOOST_PP_IIF_II(id) id +# endif +# +# define BOOST_PP_IIF_0(t, f) f +# define BOOST_PP_IIF_1(t, f) t +# +# endif diff --git a/contrib/src/boost/preprocessor/control/while.hpp b/contrib/src/boost/preprocessor/control/while.hpp new file mode 100644 index 0000000..e8a65ff --- /dev/null +++ b/contrib/src/boost/preprocessor/control/while.hpp @@ -0,0 +1,312 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_WHILE_HPP +# define BOOST_PREPROCESSOR_CONTROL_WHILE_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_WHILE */ +# +# if 0 +# define BOOST_PP_WHILE(pred, op, state) +# endif +# +# define BOOST_PP_WHILE BOOST_PP_CAT(BOOST_PP_WHILE_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_CHECK_, BOOST_PP_LIST_FOLD_RIGHT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)))) +# else +# define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL))) +# endif +# +# define BOOST_PP_WHILE_F(d, _) 0 +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# include +# else +# include +# endif +# +# define BOOST_PP_WHILE_257(p, o, s) BOOST_PP_ERROR(0x0001) +# +# define BOOST_PP_WHILE_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_1(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_2(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_3(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_4(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_5(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_6(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_7(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_8(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_9(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_10(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_11(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_12(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_13(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_14(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_15(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_16(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_17(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_18(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_19(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_20(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_21(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_22(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_23(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_24(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_25(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_26(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_27(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_28(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_29(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_30(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_31(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_32(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_33(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_34(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_35(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_36(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_37(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_38(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_39(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_40(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_41(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_42(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_43(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_44(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_45(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_46(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_47(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_48(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_49(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_50(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_51(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_52(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_53(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_54(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_55(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_56(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_57(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_58(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_59(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_60(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_61(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_62(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_63(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_64(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_65(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_66(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_67(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_68(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_69(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_70(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_71(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_72(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_73(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_74(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_75(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_76(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_77(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_78(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_79(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_80(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_81(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_82(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_83(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_84(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_85(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_86(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_87(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_88(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_89(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_90(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_91(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_92(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_93(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_94(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_95(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_96(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_97(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_98(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_99(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_100(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_101(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_102(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_103(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_104(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_105(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_106(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_107(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_108(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_109(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_110(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_111(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_112(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_113(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_114(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_115(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_116(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_117(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_118(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_119(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_120(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_121(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_122(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_123(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_124(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_125(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_126(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_127(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_128(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_129(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_130(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_131(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_132(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_133(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_134(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_135(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_136(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_137(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_138(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_139(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_140(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_141(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_142(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_143(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_144(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_145(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_146(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_147(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_148(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_149(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_150(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_151(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_152(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_153(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_154(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_155(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_156(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_157(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_158(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_159(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_160(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_161(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_162(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_163(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_164(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_165(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_166(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_167(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_168(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_169(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_170(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_171(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_172(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_173(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_174(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_175(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_176(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_177(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_178(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_179(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_180(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_181(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_182(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_183(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_184(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_185(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_186(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_187(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_188(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_189(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_190(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_191(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_192(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_193(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_194(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_195(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_196(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_197(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_198(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_199(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_200(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_201(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_202(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_203(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_204(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_205(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_206(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_207(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_208(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_209(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_210(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_211(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_212(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_213(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_214(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_215(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_216(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_217(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_218(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_219(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_220(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_221(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_222(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_223(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_224(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_225(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_226(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_227(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_228(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_229(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_230(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_231(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_232(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_233(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_234(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_235(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_236(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_237(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_238(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_239(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_240(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_241(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_242(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_243(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_244(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_245(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_246(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_247(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_248(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_249(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_250(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_251(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_252(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_253(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_254(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_255(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_256(p, o, s) 0 +# +# endif diff --git a/contrib/src/boost/preprocessor/debug/error.hpp b/contrib/src/boost/preprocessor/debug/error.hpp new file mode 100644 index 0000000..c8ae5e7 --- /dev/null +++ b/contrib/src/boost/preprocessor/debug/error.hpp @@ -0,0 +1,33 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DEBUG_ERROR_HPP +# define BOOST_PREPROCESSOR_DEBUG_ERROR_HPP +# +# include +# include +# +# /* BOOST_PP_ERROR */ +# +# if BOOST_PP_CONFIG_ERRORS +# define BOOST_PP_ERROR(code) BOOST_PP_CAT(BOOST_PP_ERROR_, code) +# endif +# +# define BOOST_PP_ERROR_0x0000 BOOST_PP_ERROR(0x0000, BOOST_PP_INDEX_OUT_OF_BOUNDS) +# define BOOST_PP_ERROR_0x0001 BOOST_PP_ERROR(0x0001, BOOST_PP_WHILE_OVERFLOW) +# define BOOST_PP_ERROR_0x0002 BOOST_PP_ERROR(0x0002, BOOST_PP_FOR_OVERFLOW) +# define BOOST_PP_ERROR_0x0003 BOOST_PP_ERROR(0x0003, BOOST_PP_REPEAT_OVERFLOW) +# define BOOST_PP_ERROR_0x0004 BOOST_PP_ERROR(0x0004, BOOST_PP_LIST_FOLD_OVERFLOW) +# define BOOST_PP_ERROR_0x0005 BOOST_PP_ERROR(0x0005, BOOST_PP_SEQ_FOLD_OVERFLOW) +# define BOOST_PP_ERROR_0x0006 BOOST_PP_ERROR(0x0006, BOOST_PP_ARITHMETIC_OVERFLOW) +# define BOOST_PP_ERROR_0x0007 BOOST_PP_ERROR(0x0007, BOOST_PP_DIVISION_BY_ZERO) +# +# endif diff --git a/contrib/src/boost/preprocessor/dec.hpp b/contrib/src/boost/preprocessor/dec.hpp new file mode 100644 index 0000000..d572064 --- /dev/null +++ b/contrib/src/boost/preprocessor/dec.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DEC_HPP +# define BOOST_PREPROCESSOR_DEC_HPP +# +# include +# +# endif diff --git a/contrib/src/boost/preprocessor/detail/auto_rec.hpp b/contrib/src/boost/preprocessor/detail/auto_rec.hpp new file mode 100644 index 0000000..39de1d0 --- /dev/null +++ b/contrib/src/boost/preprocessor/detail/auto_rec.hpp @@ -0,0 +1,293 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# include +# else +# +# ifndef BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP +# define BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP +# +# include +# +# /* BOOST_PP_AUTO_REC */ +# +# define BOOST_PP_AUTO_REC(pred, n) BOOST_PP_NODE_ENTRY_ ## n(pred) +# +# define BOOST_PP_NODE_ENTRY_256(p) BOOST_PP_NODE_128(p)(p)(p)(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_128(p) BOOST_PP_NODE_64(p)(p)(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_64(p) BOOST_PP_NODE_32(p)(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_32(p) BOOST_PP_NODE_16(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_16(p) BOOST_PP_NODE_8(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_8(p) BOOST_PP_NODE_4(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_4(p) BOOST_PP_NODE_2(p)(p) +# define BOOST_PP_NODE_ENTRY_2(p) BOOST_PP_NODE_1(p) +# +# define BOOST_PP_NODE_128(p) BOOST_PP_IIF(p(128), BOOST_PP_NODE_64, BOOST_PP_NODE_192) +# define BOOST_PP_NODE_64(p) BOOST_PP_IIF(p(64), BOOST_PP_NODE_32, BOOST_PP_NODE_96) +# define BOOST_PP_NODE_32(p) BOOST_PP_IIF(p(32), BOOST_PP_NODE_16, BOOST_PP_NODE_48) +# define BOOST_PP_NODE_16(p) BOOST_PP_IIF(p(16), BOOST_PP_NODE_8, BOOST_PP_NODE_24) +# define BOOST_PP_NODE_8(p) BOOST_PP_IIF(p(8), BOOST_PP_NODE_4, BOOST_PP_NODE_12) +# define BOOST_PP_NODE_4(p) BOOST_PP_IIF(p(4), BOOST_PP_NODE_2, BOOST_PP_NODE_6) +# define BOOST_PP_NODE_2(p) BOOST_PP_IIF(p(2), BOOST_PP_NODE_1, BOOST_PP_NODE_3) +# define BOOST_PP_NODE_1(p) BOOST_PP_IIF(p(1), 1, 2) +# define BOOST_PP_NODE_3(p) BOOST_PP_IIF(p(3), 3, 4) +# define BOOST_PP_NODE_6(p) BOOST_PP_IIF(p(6), BOOST_PP_NODE_5, BOOST_PP_NODE_7) +# define BOOST_PP_NODE_5(p) BOOST_PP_IIF(p(5), 5, 6) +# define BOOST_PP_NODE_7(p) BOOST_PP_IIF(p(7), 7, 8) +# define BOOST_PP_NODE_12(p) BOOST_PP_IIF(p(12), BOOST_PP_NODE_10, BOOST_PP_NODE_14) +# define BOOST_PP_NODE_10(p) BOOST_PP_IIF(p(10), BOOST_PP_NODE_9, BOOST_PP_NODE_11) +# define BOOST_PP_NODE_9(p) BOOST_PP_IIF(p(9), 9, 10) +# define BOOST_PP_NODE_11(p) BOOST_PP_IIF(p(11), 11, 12) +# define BOOST_PP_NODE_14(p) BOOST_PP_IIF(p(14), BOOST_PP_NODE_13, BOOST_PP_NODE_15) +# define BOOST_PP_NODE_13(p) BOOST_PP_IIF(p(13), 13, 14) +# define BOOST_PP_NODE_15(p) BOOST_PP_IIF(p(15), 15, 16) +# define BOOST_PP_NODE_24(p) BOOST_PP_IIF(p(24), BOOST_PP_NODE_20, BOOST_PP_NODE_28) +# define BOOST_PP_NODE_20(p) BOOST_PP_IIF(p(20), BOOST_PP_NODE_18, BOOST_PP_NODE_22) +# define BOOST_PP_NODE_18(p) BOOST_PP_IIF(p(18), BOOST_PP_NODE_17, BOOST_PP_NODE_19) +# define BOOST_PP_NODE_17(p) BOOST_PP_IIF(p(17), 17, 18) +# define BOOST_PP_NODE_19(p) BOOST_PP_IIF(p(19), 19, 20) +# define BOOST_PP_NODE_22(p) BOOST_PP_IIF(p(22), BOOST_PP_NODE_21, BOOST_PP_NODE_23) +# define BOOST_PP_NODE_21(p) BOOST_PP_IIF(p(21), 21, 22) +# define BOOST_PP_NODE_23(p) BOOST_PP_IIF(p(23), 23, 24) +# define BOOST_PP_NODE_28(p) BOOST_PP_IIF(p(28), BOOST_PP_NODE_26, BOOST_PP_NODE_30) +# define BOOST_PP_NODE_26(p) BOOST_PP_IIF(p(26), BOOST_PP_NODE_25, BOOST_PP_NODE_27) +# define BOOST_PP_NODE_25(p) BOOST_PP_IIF(p(25), 25, 26) +# define BOOST_PP_NODE_27(p) BOOST_PP_IIF(p(27), 27, 28) +# define BOOST_PP_NODE_30(p) BOOST_PP_IIF(p(30), BOOST_PP_NODE_29, BOOST_PP_NODE_31) +# define BOOST_PP_NODE_29(p) BOOST_PP_IIF(p(29), 29, 30) +# define BOOST_PP_NODE_31(p) BOOST_PP_IIF(p(31), 31, 32) +# define BOOST_PP_NODE_48(p) BOOST_PP_IIF(p(48), BOOST_PP_NODE_40, BOOST_PP_NODE_56) +# define BOOST_PP_NODE_40(p) BOOST_PP_IIF(p(40), BOOST_PP_NODE_36, BOOST_PP_NODE_44) +# define BOOST_PP_NODE_36(p) BOOST_PP_IIF(p(36), BOOST_PP_NODE_34, BOOST_PP_NODE_38) +# define BOOST_PP_NODE_34(p) BOOST_PP_IIF(p(34), BOOST_PP_NODE_33, BOOST_PP_NODE_35) +# define BOOST_PP_NODE_33(p) BOOST_PP_IIF(p(33), 33, 34) +# define BOOST_PP_NODE_35(p) BOOST_PP_IIF(p(35), 35, 36) +# define BOOST_PP_NODE_38(p) BOOST_PP_IIF(p(38), BOOST_PP_NODE_37, BOOST_PP_NODE_39) +# define BOOST_PP_NODE_37(p) BOOST_PP_IIF(p(37), 37, 38) +# define BOOST_PP_NODE_39(p) BOOST_PP_IIF(p(39), 39, 40) +# define BOOST_PP_NODE_44(p) BOOST_PP_IIF(p(44), BOOST_PP_NODE_42, BOOST_PP_NODE_46) +# define BOOST_PP_NODE_42(p) BOOST_PP_IIF(p(42), BOOST_PP_NODE_41, BOOST_PP_NODE_43) +# define BOOST_PP_NODE_41(p) BOOST_PP_IIF(p(41), 41, 42) +# define BOOST_PP_NODE_43(p) BOOST_PP_IIF(p(43), 43, 44) +# define BOOST_PP_NODE_46(p) BOOST_PP_IIF(p(46), BOOST_PP_NODE_45, BOOST_PP_NODE_47) +# define BOOST_PP_NODE_45(p) BOOST_PP_IIF(p(45), 45, 46) +# define BOOST_PP_NODE_47(p) BOOST_PP_IIF(p(47), 47, 48) +# define BOOST_PP_NODE_56(p) BOOST_PP_IIF(p(56), BOOST_PP_NODE_52, BOOST_PP_NODE_60) +# define BOOST_PP_NODE_52(p) BOOST_PP_IIF(p(52), BOOST_PP_NODE_50, BOOST_PP_NODE_54) +# define BOOST_PP_NODE_50(p) BOOST_PP_IIF(p(50), BOOST_PP_NODE_49, BOOST_PP_NODE_51) +# define BOOST_PP_NODE_49(p) BOOST_PP_IIF(p(49), 49, 50) +# define BOOST_PP_NODE_51(p) BOOST_PP_IIF(p(51), 51, 52) +# define BOOST_PP_NODE_54(p) BOOST_PP_IIF(p(54), BOOST_PP_NODE_53, BOOST_PP_NODE_55) +# define BOOST_PP_NODE_53(p) BOOST_PP_IIF(p(53), 53, 54) +# define BOOST_PP_NODE_55(p) BOOST_PP_IIF(p(55), 55, 56) +# define BOOST_PP_NODE_60(p) BOOST_PP_IIF(p(60), BOOST_PP_NODE_58, BOOST_PP_NODE_62) +# define BOOST_PP_NODE_58(p) BOOST_PP_IIF(p(58), BOOST_PP_NODE_57, BOOST_PP_NODE_59) +# define BOOST_PP_NODE_57(p) BOOST_PP_IIF(p(57), 57, 58) +# define BOOST_PP_NODE_59(p) BOOST_PP_IIF(p(59), 59, 60) +# define BOOST_PP_NODE_62(p) BOOST_PP_IIF(p(62), BOOST_PP_NODE_61, BOOST_PP_NODE_63) +# define BOOST_PP_NODE_61(p) BOOST_PP_IIF(p(61), 61, 62) +# define BOOST_PP_NODE_63(p) BOOST_PP_IIF(p(63), 63, 64) +# define BOOST_PP_NODE_96(p) BOOST_PP_IIF(p(96), BOOST_PP_NODE_80, BOOST_PP_NODE_112) +# define BOOST_PP_NODE_80(p) BOOST_PP_IIF(p(80), BOOST_PP_NODE_72, BOOST_PP_NODE_88) +# define BOOST_PP_NODE_72(p) BOOST_PP_IIF(p(72), BOOST_PP_NODE_68, BOOST_PP_NODE_76) +# define BOOST_PP_NODE_68(p) BOOST_PP_IIF(p(68), BOOST_PP_NODE_66, BOOST_PP_NODE_70) +# define BOOST_PP_NODE_66(p) BOOST_PP_IIF(p(66), BOOST_PP_NODE_65, BOOST_PP_NODE_67) +# define BOOST_PP_NODE_65(p) BOOST_PP_IIF(p(65), 65, 66) +# define BOOST_PP_NODE_67(p) BOOST_PP_IIF(p(67), 67, 68) +# define BOOST_PP_NODE_70(p) BOOST_PP_IIF(p(70), BOOST_PP_NODE_69, BOOST_PP_NODE_71) +# define BOOST_PP_NODE_69(p) BOOST_PP_IIF(p(69), 69, 70) +# define BOOST_PP_NODE_71(p) BOOST_PP_IIF(p(71), 71, 72) +# define BOOST_PP_NODE_76(p) BOOST_PP_IIF(p(76), BOOST_PP_NODE_74, BOOST_PP_NODE_78) +# define BOOST_PP_NODE_74(p) BOOST_PP_IIF(p(74), BOOST_PP_NODE_73, BOOST_PP_NODE_75) +# define BOOST_PP_NODE_73(p) BOOST_PP_IIF(p(73), 73, 74) +# define BOOST_PP_NODE_75(p) BOOST_PP_IIF(p(75), 75, 76) +# define BOOST_PP_NODE_78(p) BOOST_PP_IIF(p(78), BOOST_PP_NODE_77, BOOST_PP_NODE_79) +# define BOOST_PP_NODE_77(p) BOOST_PP_IIF(p(77), 77, 78) +# define BOOST_PP_NODE_79(p) BOOST_PP_IIF(p(79), 79, 80) +# define BOOST_PP_NODE_88(p) BOOST_PP_IIF(p(88), BOOST_PP_NODE_84, BOOST_PP_NODE_92) +# define BOOST_PP_NODE_84(p) BOOST_PP_IIF(p(84), BOOST_PP_NODE_82, BOOST_PP_NODE_86) +# define BOOST_PP_NODE_82(p) BOOST_PP_IIF(p(82), BOOST_PP_NODE_81, BOOST_PP_NODE_83) +# define BOOST_PP_NODE_81(p) BOOST_PP_IIF(p(81), 81, 82) +# define BOOST_PP_NODE_83(p) BOOST_PP_IIF(p(83), 83, 84) +# define BOOST_PP_NODE_86(p) BOOST_PP_IIF(p(86), BOOST_PP_NODE_85, BOOST_PP_NODE_87) +# define BOOST_PP_NODE_85(p) BOOST_PP_IIF(p(85), 85, 86) +# define BOOST_PP_NODE_87(p) BOOST_PP_IIF(p(87), 87, 88) +# define BOOST_PP_NODE_92(p) BOOST_PP_IIF(p(92), BOOST_PP_NODE_90, BOOST_PP_NODE_94) +# define BOOST_PP_NODE_90(p) BOOST_PP_IIF(p(90), BOOST_PP_NODE_89, BOOST_PP_NODE_91) +# define BOOST_PP_NODE_89(p) BOOST_PP_IIF(p(89), 89, 90) +# define BOOST_PP_NODE_91(p) BOOST_PP_IIF(p(91), 91, 92) +# define BOOST_PP_NODE_94(p) BOOST_PP_IIF(p(94), BOOST_PP_NODE_93, BOOST_PP_NODE_95) +# define BOOST_PP_NODE_93(p) BOOST_PP_IIF(p(93), 93, 94) +# define BOOST_PP_NODE_95(p) BOOST_PP_IIF(p(95), 95, 96) +# define BOOST_PP_NODE_112(p) BOOST_PP_IIF(p(112), BOOST_PP_NODE_104, BOOST_PP_NODE_120) +# define BOOST_PP_NODE_104(p) BOOST_PP_IIF(p(104), BOOST_PP_NODE_100, BOOST_PP_NODE_108) +# define BOOST_PP_NODE_100(p) BOOST_PP_IIF(p(100), BOOST_PP_NODE_98, BOOST_PP_NODE_102) +# define BOOST_PP_NODE_98(p) BOOST_PP_IIF(p(98), BOOST_PP_NODE_97, BOOST_PP_NODE_99) +# define BOOST_PP_NODE_97(p) BOOST_PP_IIF(p(97), 97, 98) +# define BOOST_PP_NODE_99(p) BOOST_PP_IIF(p(99), 99, 100) +# define BOOST_PP_NODE_102(p) BOOST_PP_IIF(p(102), BOOST_PP_NODE_101, BOOST_PP_NODE_103) +# define BOOST_PP_NODE_101(p) BOOST_PP_IIF(p(101), 101, 102) +# define BOOST_PP_NODE_103(p) BOOST_PP_IIF(p(103), 103, 104) +# define BOOST_PP_NODE_108(p) BOOST_PP_IIF(p(108), BOOST_PP_NODE_106, BOOST_PP_NODE_110) +# define BOOST_PP_NODE_106(p) BOOST_PP_IIF(p(106), BOOST_PP_NODE_105, BOOST_PP_NODE_107) +# define BOOST_PP_NODE_105(p) BOOST_PP_IIF(p(105), 105, 106) +# define BOOST_PP_NODE_107(p) BOOST_PP_IIF(p(107), 107, 108) +# define BOOST_PP_NODE_110(p) BOOST_PP_IIF(p(110), BOOST_PP_NODE_109, BOOST_PP_NODE_111) +# define BOOST_PP_NODE_109(p) BOOST_PP_IIF(p(109), 109, 110) +# define BOOST_PP_NODE_111(p) BOOST_PP_IIF(p(111), 111, 112) +# define BOOST_PP_NODE_120(p) BOOST_PP_IIF(p(120), BOOST_PP_NODE_116, BOOST_PP_NODE_124) +# define BOOST_PP_NODE_116(p) BOOST_PP_IIF(p(116), BOOST_PP_NODE_114, BOOST_PP_NODE_118) +# define BOOST_PP_NODE_114(p) BOOST_PP_IIF(p(114), BOOST_PP_NODE_113, BOOST_PP_NODE_115) +# define BOOST_PP_NODE_113(p) BOOST_PP_IIF(p(113), 113, 114) +# define BOOST_PP_NODE_115(p) BOOST_PP_IIF(p(115), 115, 116) +# define BOOST_PP_NODE_118(p) BOOST_PP_IIF(p(118), BOOST_PP_NODE_117, BOOST_PP_NODE_119) +# define BOOST_PP_NODE_117(p) BOOST_PP_IIF(p(117), 117, 118) +# define BOOST_PP_NODE_119(p) BOOST_PP_IIF(p(119), 119, 120) +# define BOOST_PP_NODE_124(p) BOOST_PP_IIF(p(124), BOOST_PP_NODE_122, BOOST_PP_NODE_126) +# define BOOST_PP_NODE_122(p) BOOST_PP_IIF(p(122), BOOST_PP_NODE_121, BOOST_PP_NODE_123) +# define BOOST_PP_NODE_121(p) BOOST_PP_IIF(p(121), 121, 122) +# define BOOST_PP_NODE_123(p) BOOST_PP_IIF(p(123), 123, 124) +# define BOOST_PP_NODE_126(p) BOOST_PP_IIF(p(126), BOOST_PP_NODE_125, BOOST_PP_NODE_127) +# define BOOST_PP_NODE_125(p) BOOST_PP_IIF(p(125), 125, 126) +# define BOOST_PP_NODE_127(p) BOOST_PP_IIF(p(127), 127, 128) +# define BOOST_PP_NODE_192(p) BOOST_PP_IIF(p(192), BOOST_PP_NODE_160, BOOST_PP_NODE_224) +# define BOOST_PP_NODE_160(p) BOOST_PP_IIF(p(160), BOOST_PP_NODE_144, BOOST_PP_NODE_176) +# define BOOST_PP_NODE_144(p) BOOST_PP_IIF(p(144), BOOST_PP_NODE_136, BOOST_PP_NODE_152) +# define BOOST_PP_NODE_136(p) BOOST_PP_IIF(p(136), BOOST_PP_NODE_132, BOOST_PP_NODE_140) +# define BOOST_PP_NODE_132(p) BOOST_PP_IIF(p(132), BOOST_PP_NODE_130, BOOST_PP_NODE_134) +# define BOOST_PP_NODE_130(p) BOOST_PP_IIF(p(130), BOOST_PP_NODE_129, BOOST_PP_NODE_131) +# define BOOST_PP_NODE_129(p) BOOST_PP_IIF(p(129), 129, 130) +# define BOOST_PP_NODE_131(p) BOOST_PP_IIF(p(131), 131, 132) +# define BOOST_PP_NODE_134(p) BOOST_PP_IIF(p(134), BOOST_PP_NODE_133, BOOST_PP_NODE_135) +# define BOOST_PP_NODE_133(p) BOOST_PP_IIF(p(133), 133, 134) +# define BOOST_PP_NODE_135(p) BOOST_PP_IIF(p(135), 135, 136) +# define BOOST_PP_NODE_140(p) BOOST_PP_IIF(p(140), BOOST_PP_NODE_138, BOOST_PP_NODE_142) +# define BOOST_PP_NODE_138(p) BOOST_PP_IIF(p(138), BOOST_PP_NODE_137, BOOST_PP_NODE_139) +# define BOOST_PP_NODE_137(p) BOOST_PP_IIF(p(137), 137, 138) +# define BOOST_PP_NODE_139(p) BOOST_PP_IIF(p(139), 139, 140) +# define BOOST_PP_NODE_142(p) BOOST_PP_IIF(p(142), BOOST_PP_NODE_141, BOOST_PP_NODE_143) +# define BOOST_PP_NODE_141(p) BOOST_PP_IIF(p(141), 141, 142) +# define BOOST_PP_NODE_143(p) BOOST_PP_IIF(p(143), 143, 144) +# define BOOST_PP_NODE_152(p) BOOST_PP_IIF(p(152), BOOST_PP_NODE_148, BOOST_PP_NODE_156) +# define BOOST_PP_NODE_148(p) BOOST_PP_IIF(p(148), BOOST_PP_NODE_146, BOOST_PP_NODE_150) +# define BOOST_PP_NODE_146(p) BOOST_PP_IIF(p(146), BOOST_PP_NODE_145, BOOST_PP_NODE_147) +# define BOOST_PP_NODE_145(p) BOOST_PP_IIF(p(145), 145, 146) +# define BOOST_PP_NODE_147(p) BOOST_PP_IIF(p(147), 147, 148) +# define BOOST_PP_NODE_150(p) BOOST_PP_IIF(p(150), BOOST_PP_NODE_149, BOOST_PP_NODE_151) +# define BOOST_PP_NODE_149(p) BOOST_PP_IIF(p(149), 149, 150) +# define BOOST_PP_NODE_151(p) BOOST_PP_IIF(p(151), 151, 152) +# define BOOST_PP_NODE_156(p) BOOST_PP_IIF(p(156), BOOST_PP_NODE_154, BOOST_PP_NODE_158) +# define BOOST_PP_NODE_154(p) BOOST_PP_IIF(p(154), BOOST_PP_NODE_153, BOOST_PP_NODE_155) +# define BOOST_PP_NODE_153(p) BOOST_PP_IIF(p(153), 153, 154) +# define BOOST_PP_NODE_155(p) BOOST_PP_IIF(p(155), 155, 156) +# define BOOST_PP_NODE_158(p) BOOST_PP_IIF(p(158), BOOST_PP_NODE_157, BOOST_PP_NODE_159) +# define BOOST_PP_NODE_157(p) BOOST_PP_IIF(p(157), 157, 158) +# define BOOST_PP_NODE_159(p) BOOST_PP_IIF(p(159), 159, 160) +# define BOOST_PP_NODE_176(p) BOOST_PP_IIF(p(176), BOOST_PP_NODE_168, BOOST_PP_NODE_184) +# define BOOST_PP_NODE_168(p) BOOST_PP_IIF(p(168), BOOST_PP_NODE_164, BOOST_PP_NODE_172) +# define BOOST_PP_NODE_164(p) BOOST_PP_IIF(p(164), BOOST_PP_NODE_162, BOOST_PP_NODE_166) +# define BOOST_PP_NODE_162(p) BOOST_PP_IIF(p(162), BOOST_PP_NODE_161, BOOST_PP_NODE_163) +# define BOOST_PP_NODE_161(p) BOOST_PP_IIF(p(161), 161, 162) +# define BOOST_PP_NODE_163(p) BOOST_PP_IIF(p(163), 163, 164) +# define BOOST_PP_NODE_166(p) BOOST_PP_IIF(p(166), BOOST_PP_NODE_165, BOOST_PP_NODE_167) +# define BOOST_PP_NODE_165(p) BOOST_PP_IIF(p(165), 165, 166) +# define BOOST_PP_NODE_167(p) BOOST_PP_IIF(p(167), 167, 168) +# define BOOST_PP_NODE_172(p) BOOST_PP_IIF(p(172), BOOST_PP_NODE_170, BOOST_PP_NODE_174) +# define BOOST_PP_NODE_170(p) BOOST_PP_IIF(p(170), BOOST_PP_NODE_169, BOOST_PP_NODE_171) +# define BOOST_PP_NODE_169(p) BOOST_PP_IIF(p(169), 169, 170) +# define BOOST_PP_NODE_171(p) BOOST_PP_IIF(p(171), 171, 172) +# define BOOST_PP_NODE_174(p) BOOST_PP_IIF(p(174), BOOST_PP_NODE_173, BOOST_PP_NODE_175) +# define BOOST_PP_NODE_173(p) BOOST_PP_IIF(p(173), 173, 174) +# define BOOST_PP_NODE_175(p) BOOST_PP_IIF(p(175), 175, 176) +# define BOOST_PP_NODE_184(p) BOOST_PP_IIF(p(184), BOOST_PP_NODE_180, BOOST_PP_NODE_188) +# define BOOST_PP_NODE_180(p) BOOST_PP_IIF(p(180), BOOST_PP_NODE_178, BOOST_PP_NODE_182) +# define BOOST_PP_NODE_178(p) BOOST_PP_IIF(p(178), BOOST_PP_NODE_177, BOOST_PP_NODE_179) +# define BOOST_PP_NODE_177(p) BOOST_PP_IIF(p(177), 177, 178) +# define BOOST_PP_NODE_179(p) BOOST_PP_IIF(p(179), 179, 180) +# define BOOST_PP_NODE_182(p) BOOST_PP_IIF(p(182), BOOST_PP_NODE_181, BOOST_PP_NODE_183) +# define BOOST_PP_NODE_181(p) BOOST_PP_IIF(p(181), 181, 182) +# define BOOST_PP_NODE_183(p) BOOST_PP_IIF(p(183), 183, 184) +# define BOOST_PP_NODE_188(p) BOOST_PP_IIF(p(188), BOOST_PP_NODE_186, BOOST_PP_NODE_190) +# define BOOST_PP_NODE_186(p) BOOST_PP_IIF(p(186), BOOST_PP_NODE_185, BOOST_PP_NODE_187) +# define BOOST_PP_NODE_185(p) BOOST_PP_IIF(p(185), 185, 186) +# define BOOST_PP_NODE_187(p) BOOST_PP_IIF(p(187), 187, 188) +# define BOOST_PP_NODE_190(p) BOOST_PP_IIF(p(190), BOOST_PP_NODE_189, BOOST_PP_NODE_191) +# define BOOST_PP_NODE_189(p) BOOST_PP_IIF(p(189), 189, 190) +# define BOOST_PP_NODE_191(p) BOOST_PP_IIF(p(191), 191, 192) +# define BOOST_PP_NODE_224(p) BOOST_PP_IIF(p(224), BOOST_PP_NODE_208, BOOST_PP_NODE_240) +# define BOOST_PP_NODE_208(p) BOOST_PP_IIF(p(208), BOOST_PP_NODE_200, BOOST_PP_NODE_216) +# define BOOST_PP_NODE_200(p) BOOST_PP_IIF(p(200), BOOST_PP_NODE_196, BOOST_PP_NODE_204) +# define BOOST_PP_NODE_196(p) BOOST_PP_IIF(p(196), BOOST_PP_NODE_194, BOOST_PP_NODE_198) +# define BOOST_PP_NODE_194(p) BOOST_PP_IIF(p(194), BOOST_PP_NODE_193, BOOST_PP_NODE_195) +# define BOOST_PP_NODE_193(p) BOOST_PP_IIF(p(193), 193, 194) +# define BOOST_PP_NODE_195(p) BOOST_PP_IIF(p(195), 195, 196) +# define BOOST_PP_NODE_198(p) BOOST_PP_IIF(p(198), BOOST_PP_NODE_197, BOOST_PP_NODE_199) +# define BOOST_PP_NODE_197(p) BOOST_PP_IIF(p(197), 197, 198) +# define BOOST_PP_NODE_199(p) BOOST_PP_IIF(p(199), 199, 200) +# define BOOST_PP_NODE_204(p) BOOST_PP_IIF(p(204), BOOST_PP_NODE_202, BOOST_PP_NODE_206) +# define BOOST_PP_NODE_202(p) BOOST_PP_IIF(p(202), BOOST_PP_NODE_201, BOOST_PP_NODE_203) +# define BOOST_PP_NODE_201(p) BOOST_PP_IIF(p(201), 201, 202) +# define BOOST_PP_NODE_203(p) BOOST_PP_IIF(p(203), 203, 204) +# define BOOST_PP_NODE_206(p) BOOST_PP_IIF(p(206), BOOST_PP_NODE_205, BOOST_PP_NODE_207) +# define BOOST_PP_NODE_205(p) BOOST_PP_IIF(p(205), 205, 206) +# define BOOST_PP_NODE_207(p) BOOST_PP_IIF(p(207), 207, 208) +# define BOOST_PP_NODE_216(p) BOOST_PP_IIF(p(216), BOOST_PP_NODE_212, BOOST_PP_NODE_220) +# define BOOST_PP_NODE_212(p) BOOST_PP_IIF(p(212), BOOST_PP_NODE_210, BOOST_PP_NODE_214) +# define BOOST_PP_NODE_210(p) BOOST_PP_IIF(p(210), BOOST_PP_NODE_209, BOOST_PP_NODE_211) +# define BOOST_PP_NODE_209(p) BOOST_PP_IIF(p(209), 209, 210) +# define BOOST_PP_NODE_211(p) BOOST_PP_IIF(p(211), 211, 212) +# define BOOST_PP_NODE_214(p) BOOST_PP_IIF(p(214), BOOST_PP_NODE_213, BOOST_PP_NODE_215) +# define BOOST_PP_NODE_213(p) BOOST_PP_IIF(p(213), 213, 214) +# define BOOST_PP_NODE_215(p) BOOST_PP_IIF(p(215), 215, 216) +# define BOOST_PP_NODE_220(p) BOOST_PP_IIF(p(220), BOOST_PP_NODE_218, BOOST_PP_NODE_222) +# define BOOST_PP_NODE_218(p) BOOST_PP_IIF(p(218), BOOST_PP_NODE_217, BOOST_PP_NODE_219) +# define BOOST_PP_NODE_217(p) BOOST_PP_IIF(p(217), 217, 218) +# define BOOST_PP_NODE_219(p) BOOST_PP_IIF(p(219), 219, 220) +# define BOOST_PP_NODE_222(p) BOOST_PP_IIF(p(222), BOOST_PP_NODE_221, BOOST_PP_NODE_223) +# define BOOST_PP_NODE_221(p) BOOST_PP_IIF(p(221), 221, 222) +# define BOOST_PP_NODE_223(p) BOOST_PP_IIF(p(223), 223, 224) +# define BOOST_PP_NODE_240(p) BOOST_PP_IIF(p(240), BOOST_PP_NODE_232, BOOST_PP_NODE_248) +# define BOOST_PP_NODE_232(p) BOOST_PP_IIF(p(232), BOOST_PP_NODE_228, BOOST_PP_NODE_236) +# define BOOST_PP_NODE_228(p) BOOST_PP_IIF(p(228), BOOST_PP_NODE_226, BOOST_PP_NODE_230) +# define BOOST_PP_NODE_226(p) BOOST_PP_IIF(p(226), BOOST_PP_NODE_225, BOOST_PP_NODE_227) +# define BOOST_PP_NODE_225(p) BOOST_PP_IIF(p(225), 225, 226) +# define BOOST_PP_NODE_227(p) BOOST_PP_IIF(p(227), 227, 228) +# define BOOST_PP_NODE_230(p) BOOST_PP_IIF(p(230), BOOST_PP_NODE_229, BOOST_PP_NODE_231) +# define BOOST_PP_NODE_229(p) BOOST_PP_IIF(p(229), 229, 230) +# define BOOST_PP_NODE_231(p) BOOST_PP_IIF(p(231), 231, 232) +# define BOOST_PP_NODE_236(p) BOOST_PP_IIF(p(236), BOOST_PP_NODE_234, BOOST_PP_NODE_238) +# define BOOST_PP_NODE_234(p) BOOST_PP_IIF(p(234), BOOST_PP_NODE_233, BOOST_PP_NODE_235) +# define BOOST_PP_NODE_233(p) BOOST_PP_IIF(p(233), 233, 234) +# define BOOST_PP_NODE_235(p) BOOST_PP_IIF(p(235), 235, 236) +# define BOOST_PP_NODE_238(p) BOOST_PP_IIF(p(238), BOOST_PP_NODE_237, BOOST_PP_NODE_239) +# define BOOST_PP_NODE_237(p) BOOST_PP_IIF(p(237), 237, 238) +# define BOOST_PP_NODE_239(p) BOOST_PP_IIF(p(239), 239, 240) +# define BOOST_PP_NODE_248(p) BOOST_PP_IIF(p(248), BOOST_PP_NODE_244, BOOST_PP_NODE_252) +# define BOOST_PP_NODE_244(p) BOOST_PP_IIF(p(244), BOOST_PP_NODE_242, BOOST_PP_NODE_246) +# define BOOST_PP_NODE_242(p) BOOST_PP_IIF(p(242), BOOST_PP_NODE_241, BOOST_PP_NODE_243) +# define BOOST_PP_NODE_241(p) BOOST_PP_IIF(p(241), 241, 242) +# define BOOST_PP_NODE_243(p) BOOST_PP_IIF(p(243), 243, 244) +# define BOOST_PP_NODE_246(p) BOOST_PP_IIF(p(246), BOOST_PP_NODE_245, BOOST_PP_NODE_247) +# define BOOST_PP_NODE_245(p) BOOST_PP_IIF(p(245), 245, 246) +# define BOOST_PP_NODE_247(p) BOOST_PP_IIF(p(247), 247, 248) +# define BOOST_PP_NODE_252(p) BOOST_PP_IIF(p(252), BOOST_PP_NODE_250, BOOST_PP_NODE_254) +# define BOOST_PP_NODE_250(p) BOOST_PP_IIF(p(250), BOOST_PP_NODE_249, BOOST_PP_NODE_251) +# define BOOST_PP_NODE_249(p) BOOST_PP_IIF(p(249), 249, 250) +# define BOOST_PP_NODE_251(p) BOOST_PP_IIF(p(251), 251, 252) +# define BOOST_PP_NODE_254(p) BOOST_PP_IIF(p(254), BOOST_PP_NODE_253, BOOST_PP_NODE_255) +# define BOOST_PP_NODE_253(p) BOOST_PP_IIF(p(253), 253, 254) +# define BOOST_PP_NODE_255(p) BOOST_PP_IIF(p(255), 255, 256) +# +# endif +# endif diff --git a/contrib/src/boost/preprocessor/detail/check.hpp b/contrib/src/boost/preprocessor/detail/check.hpp new file mode 100644 index 0000000..63f8ff9 --- /dev/null +++ b/contrib/src/boost/preprocessor/detail/check.hpp @@ -0,0 +1,48 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DETAIL_CHECK_HPP +# define BOOST_PREPROCESSOR_DETAIL_CHECK_HPP +# +# include +# include +# +# /* BOOST_PP_CHECK */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_D(x, type) +# else +# define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_OO((x, type)) +# define BOOST_PP_CHECK_OO(par) BOOST_PP_CHECK_D ## par +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, type x)) +# define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) +# define BOOST_PP_CHECK_2(res, _) res +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(type x) +# define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) +# define BOOST_PP_CHECK_2(chk) BOOST_PP_CHECK_3((BOOST_PP_CHECK_RESULT_ ## chk)) +# define BOOST_PP_CHECK_3(im) BOOST_PP_CHECK_5(BOOST_PP_CHECK_4 im) +# define BOOST_PP_CHECK_4(res, _) res +# define BOOST_PP_CHECK_5(res) res +# else /* DMC */ +# define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_OO((type x)) +# define BOOST_PP_CHECK_OO(par) BOOST_PP_CHECK_0 ## par +# define BOOST_PP_CHECK_0(chk) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, chk)) +# define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) +# define BOOST_PP_CHECK_2(res, _) res +# endif +# +# define BOOST_PP_CHECK_RESULT_1 1, BOOST_PP_NIL +# +# endif diff --git a/contrib/src/boost/preprocessor/detail/dmc/auto_rec.hpp b/contrib/src/boost/preprocessor/detail/dmc/auto_rec.hpp new file mode 100644 index 0000000..37fbe04 --- /dev/null +++ b/contrib/src/boost/preprocessor/detail/dmc/auto_rec.hpp @@ -0,0 +1,286 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP +# define BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP +# +# include +# +# /* BOOST_PP_AUTO_REC */ +# +# define BOOST_PP_AUTO_REC(pred, n) BOOST_PP_NODE_ENTRY_ ## n(pred) +# +# define BOOST_PP_NODE_ENTRY_256(p) BOOST_PP_NODE_128(p)(p)(p)(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_128(p) BOOST_PP_NODE_64(p)(p)(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_64(p) BOOST_PP_NODE_32(p)(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_32(p) BOOST_PP_NODE_16(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_16(p) BOOST_PP_NODE_8(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_8(p) BOOST_PP_NODE_4(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_4(p) BOOST_PP_NODE_2(p)(p) +# define BOOST_PP_NODE_ENTRY_2(p) BOOST_PP_NODE_1(p) +# +# define BOOST_PP_NODE_128(p) BOOST_PP_IIF(p##(128), BOOST_PP_NODE_64, BOOST_PP_NODE_192) +# define BOOST_PP_NODE_64(p) BOOST_PP_IIF(p##(64), BOOST_PP_NODE_32, BOOST_PP_NODE_96) +# define BOOST_PP_NODE_32(p) BOOST_PP_IIF(p##(32), BOOST_PP_NODE_16, BOOST_PP_NODE_48) +# define BOOST_PP_NODE_16(p) BOOST_PP_IIF(p##(16), BOOST_PP_NODE_8, BOOST_PP_NODE_24) +# define BOOST_PP_NODE_8(p) BOOST_PP_IIF(p##(8), BOOST_PP_NODE_4, BOOST_PP_NODE_12) +# define BOOST_PP_NODE_4(p) BOOST_PP_IIF(p##(4), BOOST_PP_NODE_2, BOOST_PP_NODE_6) +# define BOOST_PP_NODE_2(p) BOOST_PP_IIF(p##(2), BOOST_PP_NODE_1, BOOST_PP_NODE_3) +# define BOOST_PP_NODE_1(p) BOOST_PP_IIF(p##(1), 1, 2) +# define BOOST_PP_NODE_3(p) BOOST_PP_IIF(p##(3), 3, 4) +# define BOOST_PP_NODE_6(p) BOOST_PP_IIF(p##(6), BOOST_PP_NODE_5, BOOST_PP_NODE_7) +# define BOOST_PP_NODE_5(p) BOOST_PP_IIF(p##(5), 5, 6) +# define BOOST_PP_NODE_7(p) BOOST_PP_IIF(p##(7), 7, 8) +# define BOOST_PP_NODE_12(p) BOOST_PP_IIF(p##(12), BOOST_PP_NODE_10, BOOST_PP_NODE_14) +# define BOOST_PP_NODE_10(p) BOOST_PP_IIF(p##(10), BOOST_PP_NODE_9, BOOST_PP_NODE_11) +# define BOOST_PP_NODE_9(p) BOOST_PP_IIF(p##(9), 9, 10) +# define BOOST_PP_NODE_11(p) BOOST_PP_IIF(p##(11), 11, 12) +# define BOOST_PP_NODE_14(p) BOOST_PP_IIF(p##(14), BOOST_PP_NODE_13, BOOST_PP_NODE_15) +# define BOOST_PP_NODE_13(p) BOOST_PP_IIF(p##(13), 13, 14) +# define BOOST_PP_NODE_15(p) BOOST_PP_IIF(p##(15), 15, 16) +# define BOOST_PP_NODE_24(p) BOOST_PP_IIF(p##(24), BOOST_PP_NODE_20, BOOST_PP_NODE_28) +# define BOOST_PP_NODE_20(p) BOOST_PP_IIF(p##(20), BOOST_PP_NODE_18, BOOST_PP_NODE_22) +# define BOOST_PP_NODE_18(p) BOOST_PP_IIF(p##(18), BOOST_PP_NODE_17, BOOST_PP_NODE_19) +# define BOOST_PP_NODE_17(p) BOOST_PP_IIF(p##(17), 17, 18) +# define BOOST_PP_NODE_19(p) BOOST_PP_IIF(p##(19), 19, 20) +# define BOOST_PP_NODE_22(p) BOOST_PP_IIF(p##(22), BOOST_PP_NODE_21, BOOST_PP_NODE_23) +# define BOOST_PP_NODE_21(p) BOOST_PP_IIF(p##(21), 21, 22) +# define BOOST_PP_NODE_23(p) BOOST_PP_IIF(p##(23), 23, 24) +# define BOOST_PP_NODE_28(p) BOOST_PP_IIF(p##(28), BOOST_PP_NODE_26, BOOST_PP_NODE_30) +# define BOOST_PP_NODE_26(p) BOOST_PP_IIF(p##(26), BOOST_PP_NODE_25, BOOST_PP_NODE_27) +# define BOOST_PP_NODE_25(p) BOOST_PP_IIF(p##(25), 25, 26) +# define BOOST_PP_NODE_27(p) BOOST_PP_IIF(p##(27), 27, 28) +# define BOOST_PP_NODE_30(p) BOOST_PP_IIF(p##(30), BOOST_PP_NODE_29, BOOST_PP_NODE_31) +# define BOOST_PP_NODE_29(p) BOOST_PP_IIF(p##(29), 29, 30) +# define BOOST_PP_NODE_31(p) BOOST_PP_IIF(p##(31), 31, 32) +# define BOOST_PP_NODE_48(p) BOOST_PP_IIF(p##(48), BOOST_PP_NODE_40, BOOST_PP_NODE_56) +# define BOOST_PP_NODE_40(p) BOOST_PP_IIF(p##(40), BOOST_PP_NODE_36, BOOST_PP_NODE_44) +# define BOOST_PP_NODE_36(p) BOOST_PP_IIF(p##(36), BOOST_PP_NODE_34, BOOST_PP_NODE_38) +# define BOOST_PP_NODE_34(p) BOOST_PP_IIF(p##(34), BOOST_PP_NODE_33, BOOST_PP_NODE_35) +# define BOOST_PP_NODE_33(p) BOOST_PP_IIF(p##(33), 33, 34) +# define BOOST_PP_NODE_35(p) BOOST_PP_IIF(p##(35), 35, 36) +# define BOOST_PP_NODE_38(p) BOOST_PP_IIF(p##(38), BOOST_PP_NODE_37, BOOST_PP_NODE_39) +# define BOOST_PP_NODE_37(p) BOOST_PP_IIF(p##(37), 37, 38) +# define BOOST_PP_NODE_39(p) BOOST_PP_IIF(p##(39), 39, 40) +# define BOOST_PP_NODE_44(p) BOOST_PP_IIF(p##(44), BOOST_PP_NODE_42, BOOST_PP_NODE_46) +# define BOOST_PP_NODE_42(p) BOOST_PP_IIF(p##(42), BOOST_PP_NODE_41, BOOST_PP_NODE_43) +# define BOOST_PP_NODE_41(p) BOOST_PP_IIF(p##(41), 41, 42) +# define BOOST_PP_NODE_43(p) BOOST_PP_IIF(p##(43), 43, 44) +# define BOOST_PP_NODE_46(p) BOOST_PP_IIF(p##(46), BOOST_PP_NODE_45, BOOST_PP_NODE_47) +# define BOOST_PP_NODE_45(p) BOOST_PP_IIF(p##(45), 45, 46) +# define BOOST_PP_NODE_47(p) BOOST_PP_IIF(p##(47), 47, 48) +# define BOOST_PP_NODE_56(p) BOOST_PP_IIF(p##(56), BOOST_PP_NODE_52, BOOST_PP_NODE_60) +# define BOOST_PP_NODE_52(p) BOOST_PP_IIF(p##(52), BOOST_PP_NODE_50, BOOST_PP_NODE_54) +# define BOOST_PP_NODE_50(p) BOOST_PP_IIF(p##(50), BOOST_PP_NODE_49, BOOST_PP_NODE_51) +# define BOOST_PP_NODE_49(p) BOOST_PP_IIF(p##(49), 49, 50) +# define BOOST_PP_NODE_51(p) BOOST_PP_IIF(p##(51), 51, 52) +# define BOOST_PP_NODE_54(p) BOOST_PP_IIF(p##(54), BOOST_PP_NODE_53, BOOST_PP_NODE_55) +# define BOOST_PP_NODE_53(p) BOOST_PP_IIF(p##(53), 53, 54) +# define BOOST_PP_NODE_55(p) BOOST_PP_IIF(p##(55), 55, 56) +# define BOOST_PP_NODE_60(p) BOOST_PP_IIF(p##(60), BOOST_PP_NODE_58, BOOST_PP_NODE_62) +# define BOOST_PP_NODE_58(p) BOOST_PP_IIF(p##(58), BOOST_PP_NODE_57, BOOST_PP_NODE_59) +# define BOOST_PP_NODE_57(p) BOOST_PP_IIF(p##(57), 57, 58) +# define BOOST_PP_NODE_59(p) BOOST_PP_IIF(p##(59), 59, 60) +# define BOOST_PP_NODE_62(p) BOOST_PP_IIF(p##(62), BOOST_PP_NODE_61, BOOST_PP_NODE_63) +# define BOOST_PP_NODE_61(p) BOOST_PP_IIF(p##(61), 61, 62) +# define BOOST_PP_NODE_63(p) BOOST_PP_IIF(p##(63), 63, 64) +# define BOOST_PP_NODE_96(p) BOOST_PP_IIF(p##(96), BOOST_PP_NODE_80, BOOST_PP_NODE_112) +# define BOOST_PP_NODE_80(p) BOOST_PP_IIF(p##(80), BOOST_PP_NODE_72, BOOST_PP_NODE_88) +# define BOOST_PP_NODE_72(p) BOOST_PP_IIF(p##(72), BOOST_PP_NODE_68, BOOST_PP_NODE_76) +# define BOOST_PP_NODE_68(p) BOOST_PP_IIF(p##(68), BOOST_PP_NODE_66, BOOST_PP_NODE_70) +# define BOOST_PP_NODE_66(p) BOOST_PP_IIF(p##(66), BOOST_PP_NODE_65, BOOST_PP_NODE_67) +# define BOOST_PP_NODE_65(p) BOOST_PP_IIF(p##(65), 65, 66) +# define BOOST_PP_NODE_67(p) BOOST_PP_IIF(p##(67), 67, 68) +# define BOOST_PP_NODE_70(p) BOOST_PP_IIF(p##(70), BOOST_PP_NODE_69, BOOST_PP_NODE_71) +# define BOOST_PP_NODE_69(p) BOOST_PP_IIF(p##(69), 69, 70) +# define BOOST_PP_NODE_71(p) BOOST_PP_IIF(p##(71), 71, 72) +# define BOOST_PP_NODE_76(p) BOOST_PP_IIF(p##(76), BOOST_PP_NODE_74, BOOST_PP_NODE_78) +# define BOOST_PP_NODE_74(p) BOOST_PP_IIF(p##(74), BOOST_PP_NODE_73, BOOST_PP_NODE_75) +# define BOOST_PP_NODE_73(p) BOOST_PP_IIF(p##(73), 73, 74) +# define BOOST_PP_NODE_75(p) BOOST_PP_IIF(p##(75), 75, 76) +# define BOOST_PP_NODE_78(p) BOOST_PP_IIF(p##(78), BOOST_PP_NODE_77, BOOST_PP_NODE_79) +# define BOOST_PP_NODE_77(p) BOOST_PP_IIF(p##(77), 77, 78) +# define BOOST_PP_NODE_79(p) BOOST_PP_IIF(p##(79), 79, 80) +# define BOOST_PP_NODE_88(p) BOOST_PP_IIF(p##(88), BOOST_PP_NODE_84, BOOST_PP_NODE_92) +# define BOOST_PP_NODE_84(p) BOOST_PP_IIF(p##(84), BOOST_PP_NODE_82, BOOST_PP_NODE_86) +# define BOOST_PP_NODE_82(p) BOOST_PP_IIF(p##(82), BOOST_PP_NODE_81, BOOST_PP_NODE_83) +# define BOOST_PP_NODE_81(p) BOOST_PP_IIF(p##(81), 81, 82) +# define BOOST_PP_NODE_83(p) BOOST_PP_IIF(p##(83), 83, 84) +# define BOOST_PP_NODE_86(p) BOOST_PP_IIF(p##(86), BOOST_PP_NODE_85, BOOST_PP_NODE_87) +# define BOOST_PP_NODE_85(p) BOOST_PP_IIF(p##(85), 85, 86) +# define BOOST_PP_NODE_87(p) BOOST_PP_IIF(p##(87), 87, 88) +# define BOOST_PP_NODE_92(p) BOOST_PP_IIF(p##(92), BOOST_PP_NODE_90, BOOST_PP_NODE_94) +# define BOOST_PP_NODE_90(p) BOOST_PP_IIF(p##(90), BOOST_PP_NODE_89, BOOST_PP_NODE_91) +# define BOOST_PP_NODE_89(p) BOOST_PP_IIF(p##(89), 89, 90) +# define BOOST_PP_NODE_91(p) BOOST_PP_IIF(p##(91), 91, 92) +# define BOOST_PP_NODE_94(p) BOOST_PP_IIF(p##(94), BOOST_PP_NODE_93, BOOST_PP_NODE_95) +# define BOOST_PP_NODE_93(p) BOOST_PP_IIF(p##(93), 93, 94) +# define BOOST_PP_NODE_95(p) BOOST_PP_IIF(p##(95), 95, 96) +# define BOOST_PP_NODE_112(p) BOOST_PP_IIF(p##(112), BOOST_PP_NODE_104, BOOST_PP_NODE_120) +# define BOOST_PP_NODE_104(p) BOOST_PP_IIF(p##(104), BOOST_PP_NODE_100, BOOST_PP_NODE_108) +# define BOOST_PP_NODE_100(p) BOOST_PP_IIF(p##(100), BOOST_PP_NODE_98, BOOST_PP_NODE_102) +# define BOOST_PP_NODE_98(p) BOOST_PP_IIF(p##(98), BOOST_PP_NODE_97, BOOST_PP_NODE_99) +# define BOOST_PP_NODE_97(p) BOOST_PP_IIF(p##(97), 97, 98) +# define BOOST_PP_NODE_99(p) BOOST_PP_IIF(p##(99), 99, 100) +# define BOOST_PP_NODE_102(p) BOOST_PP_IIF(p##(102), BOOST_PP_NODE_101, BOOST_PP_NODE_103) +# define BOOST_PP_NODE_101(p) BOOST_PP_IIF(p##(101), 101, 102) +# define BOOST_PP_NODE_103(p) BOOST_PP_IIF(p##(103), 103, 104) +# define BOOST_PP_NODE_108(p) BOOST_PP_IIF(p##(108), BOOST_PP_NODE_106, BOOST_PP_NODE_110) +# define BOOST_PP_NODE_106(p) BOOST_PP_IIF(p##(106), BOOST_PP_NODE_105, BOOST_PP_NODE_107) +# define BOOST_PP_NODE_105(p) BOOST_PP_IIF(p##(105), 105, 106) +# define BOOST_PP_NODE_107(p) BOOST_PP_IIF(p##(107), 107, 108) +# define BOOST_PP_NODE_110(p) BOOST_PP_IIF(p##(110), BOOST_PP_NODE_109, BOOST_PP_NODE_111) +# define BOOST_PP_NODE_109(p) BOOST_PP_IIF(p##(109), 109, 110) +# define BOOST_PP_NODE_111(p) BOOST_PP_IIF(p##(111), 111, 112) +# define BOOST_PP_NODE_120(p) BOOST_PP_IIF(p##(120), BOOST_PP_NODE_116, BOOST_PP_NODE_124) +# define BOOST_PP_NODE_116(p) BOOST_PP_IIF(p##(116), BOOST_PP_NODE_114, BOOST_PP_NODE_118) +# define BOOST_PP_NODE_114(p) BOOST_PP_IIF(p##(114), BOOST_PP_NODE_113, BOOST_PP_NODE_115) +# define BOOST_PP_NODE_113(p) BOOST_PP_IIF(p##(113), 113, 114) +# define BOOST_PP_NODE_115(p) BOOST_PP_IIF(p##(115), 115, 116) +# define BOOST_PP_NODE_118(p) BOOST_PP_IIF(p##(118), BOOST_PP_NODE_117, BOOST_PP_NODE_119) +# define BOOST_PP_NODE_117(p) BOOST_PP_IIF(p##(117), 117, 118) +# define BOOST_PP_NODE_119(p) BOOST_PP_IIF(p##(119), 119, 120) +# define BOOST_PP_NODE_124(p) BOOST_PP_IIF(p##(124), BOOST_PP_NODE_122, BOOST_PP_NODE_126) +# define BOOST_PP_NODE_122(p) BOOST_PP_IIF(p##(122), BOOST_PP_NODE_121, BOOST_PP_NODE_123) +# define BOOST_PP_NODE_121(p) BOOST_PP_IIF(p##(121), 121, 122) +# define BOOST_PP_NODE_123(p) BOOST_PP_IIF(p##(123), 123, 124) +# define BOOST_PP_NODE_126(p) BOOST_PP_IIF(p##(126), BOOST_PP_NODE_125, BOOST_PP_NODE_127) +# define BOOST_PP_NODE_125(p) BOOST_PP_IIF(p##(125), 125, 126) +# define BOOST_PP_NODE_127(p) BOOST_PP_IIF(p##(127), 127, 128) +# define BOOST_PP_NODE_192(p) BOOST_PP_IIF(p##(192), BOOST_PP_NODE_160, BOOST_PP_NODE_224) +# define BOOST_PP_NODE_160(p) BOOST_PP_IIF(p##(160), BOOST_PP_NODE_144, BOOST_PP_NODE_176) +# define BOOST_PP_NODE_144(p) BOOST_PP_IIF(p##(144), BOOST_PP_NODE_136, BOOST_PP_NODE_152) +# define BOOST_PP_NODE_136(p) BOOST_PP_IIF(p##(136), BOOST_PP_NODE_132, BOOST_PP_NODE_140) +# define BOOST_PP_NODE_132(p) BOOST_PP_IIF(p##(132), BOOST_PP_NODE_130, BOOST_PP_NODE_134) +# define BOOST_PP_NODE_130(p) BOOST_PP_IIF(p##(130), BOOST_PP_NODE_129, BOOST_PP_NODE_131) +# define BOOST_PP_NODE_129(p) BOOST_PP_IIF(p##(129), 129, 130) +# define BOOST_PP_NODE_131(p) BOOST_PP_IIF(p##(131), 131, 132) +# define BOOST_PP_NODE_134(p) BOOST_PP_IIF(p##(134), BOOST_PP_NODE_133, BOOST_PP_NODE_135) +# define BOOST_PP_NODE_133(p) BOOST_PP_IIF(p##(133), 133, 134) +# define BOOST_PP_NODE_135(p) BOOST_PP_IIF(p##(135), 135, 136) +# define BOOST_PP_NODE_140(p) BOOST_PP_IIF(p##(140), BOOST_PP_NODE_138, BOOST_PP_NODE_142) +# define BOOST_PP_NODE_138(p) BOOST_PP_IIF(p##(138), BOOST_PP_NODE_137, BOOST_PP_NODE_139) +# define BOOST_PP_NODE_137(p) BOOST_PP_IIF(p##(137), 137, 138) +# define BOOST_PP_NODE_139(p) BOOST_PP_IIF(p##(139), 139, 140) +# define BOOST_PP_NODE_142(p) BOOST_PP_IIF(p##(142), BOOST_PP_NODE_141, BOOST_PP_NODE_143) +# define BOOST_PP_NODE_141(p) BOOST_PP_IIF(p##(141), 141, 142) +# define BOOST_PP_NODE_143(p) BOOST_PP_IIF(p##(143), 143, 144) +# define BOOST_PP_NODE_152(p) BOOST_PP_IIF(p##(152), BOOST_PP_NODE_148, BOOST_PP_NODE_156) +# define BOOST_PP_NODE_148(p) BOOST_PP_IIF(p##(148), BOOST_PP_NODE_146, BOOST_PP_NODE_150) +# define BOOST_PP_NODE_146(p) BOOST_PP_IIF(p##(146), BOOST_PP_NODE_145, BOOST_PP_NODE_147) +# define BOOST_PP_NODE_145(p) BOOST_PP_IIF(p##(145), 145, 146) +# define BOOST_PP_NODE_147(p) BOOST_PP_IIF(p##(147), 147, 148) +# define BOOST_PP_NODE_150(p) BOOST_PP_IIF(p##(150), BOOST_PP_NODE_149, BOOST_PP_NODE_151) +# define BOOST_PP_NODE_149(p) BOOST_PP_IIF(p##(149), 149, 150) +# define BOOST_PP_NODE_151(p) BOOST_PP_IIF(p##(151), 151, 152) +# define BOOST_PP_NODE_156(p) BOOST_PP_IIF(p##(156), BOOST_PP_NODE_154, BOOST_PP_NODE_158) +# define BOOST_PP_NODE_154(p) BOOST_PP_IIF(p##(154), BOOST_PP_NODE_153, BOOST_PP_NODE_155) +# define BOOST_PP_NODE_153(p) BOOST_PP_IIF(p##(153), 153, 154) +# define BOOST_PP_NODE_155(p) BOOST_PP_IIF(p##(155), 155, 156) +# define BOOST_PP_NODE_158(p) BOOST_PP_IIF(p##(158), BOOST_PP_NODE_157, BOOST_PP_NODE_159) +# define BOOST_PP_NODE_157(p) BOOST_PP_IIF(p##(157), 157, 158) +# define BOOST_PP_NODE_159(p) BOOST_PP_IIF(p##(159), 159, 160) +# define BOOST_PP_NODE_176(p) BOOST_PP_IIF(p##(176), BOOST_PP_NODE_168, BOOST_PP_NODE_184) +# define BOOST_PP_NODE_168(p) BOOST_PP_IIF(p##(168), BOOST_PP_NODE_164, BOOST_PP_NODE_172) +# define BOOST_PP_NODE_164(p) BOOST_PP_IIF(p##(164), BOOST_PP_NODE_162, BOOST_PP_NODE_166) +# define BOOST_PP_NODE_162(p) BOOST_PP_IIF(p##(162), BOOST_PP_NODE_161, BOOST_PP_NODE_163) +# define BOOST_PP_NODE_161(p) BOOST_PP_IIF(p##(161), 161, 162) +# define BOOST_PP_NODE_163(p) BOOST_PP_IIF(p##(163), 163, 164) +# define BOOST_PP_NODE_166(p) BOOST_PP_IIF(p##(166), BOOST_PP_NODE_165, BOOST_PP_NODE_167) +# define BOOST_PP_NODE_165(p) BOOST_PP_IIF(p##(165), 165, 166) +# define BOOST_PP_NODE_167(p) BOOST_PP_IIF(p##(167), 167, 168) +# define BOOST_PP_NODE_172(p) BOOST_PP_IIF(p##(172), BOOST_PP_NODE_170, BOOST_PP_NODE_174) +# define BOOST_PP_NODE_170(p) BOOST_PP_IIF(p##(170), BOOST_PP_NODE_169, BOOST_PP_NODE_171) +# define BOOST_PP_NODE_169(p) BOOST_PP_IIF(p##(169), 169, 170) +# define BOOST_PP_NODE_171(p) BOOST_PP_IIF(p##(171), 171, 172) +# define BOOST_PP_NODE_174(p) BOOST_PP_IIF(p##(174), BOOST_PP_NODE_173, BOOST_PP_NODE_175) +# define BOOST_PP_NODE_173(p) BOOST_PP_IIF(p##(173), 173, 174) +# define BOOST_PP_NODE_175(p) BOOST_PP_IIF(p##(175), 175, 176) +# define BOOST_PP_NODE_184(p) BOOST_PP_IIF(p##(184), BOOST_PP_NODE_180, BOOST_PP_NODE_188) +# define BOOST_PP_NODE_180(p) BOOST_PP_IIF(p##(180), BOOST_PP_NODE_178, BOOST_PP_NODE_182) +# define BOOST_PP_NODE_178(p) BOOST_PP_IIF(p##(178), BOOST_PP_NODE_177, BOOST_PP_NODE_179) +# define BOOST_PP_NODE_177(p) BOOST_PP_IIF(p##(177), 177, 178) +# define BOOST_PP_NODE_179(p) BOOST_PP_IIF(p##(179), 179, 180) +# define BOOST_PP_NODE_182(p) BOOST_PP_IIF(p##(182), BOOST_PP_NODE_181, BOOST_PP_NODE_183) +# define BOOST_PP_NODE_181(p) BOOST_PP_IIF(p##(181), 181, 182) +# define BOOST_PP_NODE_183(p) BOOST_PP_IIF(p##(183), 183, 184) +# define BOOST_PP_NODE_188(p) BOOST_PP_IIF(p##(188), BOOST_PP_NODE_186, BOOST_PP_NODE_190) +# define BOOST_PP_NODE_186(p) BOOST_PP_IIF(p##(186), BOOST_PP_NODE_185, BOOST_PP_NODE_187) +# define BOOST_PP_NODE_185(p) BOOST_PP_IIF(p##(185), 185, 186) +# define BOOST_PP_NODE_187(p) BOOST_PP_IIF(p##(187), 187, 188) +# define BOOST_PP_NODE_190(p) BOOST_PP_IIF(p##(190), BOOST_PP_NODE_189, BOOST_PP_NODE_191) +# define BOOST_PP_NODE_189(p) BOOST_PP_IIF(p##(189), 189, 190) +# define BOOST_PP_NODE_191(p) BOOST_PP_IIF(p##(191), 191, 192) +# define BOOST_PP_NODE_224(p) BOOST_PP_IIF(p##(224), BOOST_PP_NODE_208, BOOST_PP_NODE_240) +# define BOOST_PP_NODE_208(p) BOOST_PP_IIF(p##(208), BOOST_PP_NODE_200, BOOST_PP_NODE_216) +# define BOOST_PP_NODE_200(p) BOOST_PP_IIF(p##(200), BOOST_PP_NODE_196, BOOST_PP_NODE_204) +# define BOOST_PP_NODE_196(p) BOOST_PP_IIF(p##(196), BOOST_PP_NODE_194, BOOST_PP_NODE_198) +# define BOOST_PP_NODE_194(p) BOOST_PP_IIF(p##(194), BOOST_PP_NODE_193, BOOST_PP_NODE_195) +# define BOOST_PP_NODE_193(p) BOOST_PP_IIF(p##(193), 193, 194) +# define BOOST_PP_NODE_195(p) BOOST_PP_IIF(p##(195), 195, 196) +# define BOOST_PP_NODE_198(p) BOOST_PP_IIF(p##(198), BOOST_PP_NODE_197, BOOST_PP_NODE_199) +# define BOOST_PP_NODE_197(p) BOOST_PP_IIF(p##(197), 197, 198) +# define BOOST_PP_NODE_199(p) BOOST_PP_IIF(p##(199), 199, 200) +# define BOOST_PP_NODE_204(p) BOOST_PP_IIF(p##(204), BOOST_PP_NODE_202, BOOST_PP_NODE_206) +# define BOOST_PP_NODE_202(p) BOOST_PP_IIF(p##(202), BOOST_PP_NODE_201, BOOST_PP_NODE_203) +# define BOOST_PP_NODE_201(p) BOOST_PP_IIF(p##(201), 201, 202) +# define BOOST_PP_NODE_203(p) BOOST_PP_IIF(p##(203), 203, 204) +# define BOOST_PP_NODE_206(p) BOOST_PP_IIF(p##(206), BOOST_PP_NODE_205, BOOST_PP_NODE_207) +# define BOOST_PP_NODE_205(p) BOOST_PP_IIF(p##(205), 205, 206) +# define BOOST_PP_NODE_207(p) BOOST_PP_IIF(p##(207), 207, 208) +# define BOOST_PP_NODE_216(p) BOOST_PP_IIF(p##(216), BOOST_PP_NODE_212, BOOST_PP_NODE_220) +# define BOOST_PP_NODE_212(p) BOOST_PP_IIF(p##(212), BOOST_PP_NODE_210, BOOST_PP_NODE_214) +# define BOOST_PP_NODE_210(p) BOOST_PP_IIF(p##(210), BOOST_PP_NODE_209, BOOST_PP_NODE_211) +# define BOOST_PP_NODE_209(p) BOOST_PP_IIF(p##(209), 209, 210) +# define BOOST_PP_NODE_211(p) BOOST_PP_IIF(p##(211), 211, 212) +# define BOOST_PP_NODE_214(p) BOOST_PP_IIF(p##(214), BOOST_PP_NODE_213, BOOST_PP_NODE_215) +# define BOOST_PP_NODE_213(p) BOOST_PP_IIF(p##(213), 213, 214) +# define BOOST_PP_NODE_215(p) BOOST_PP_IIF(p##(215), 215, 216) +# define BOOST_PP_NODE_220(p) BOOST_PP_IIF(p##(220), BOOST_PP_NODE_218, BOOST_PP_NODE_222) +# define BOOST_PP_NODE_218(p) BOOST_PP_IIF(p##(218), BOOST_PP_NODE_217, BOOST_PP_NODE_219) +# define BOOST_PP_NODE_217(p) BOOST_PP_IIF(p##(217), 217, 218) +# define BOOST_PP_NODE_219(p) BOOST_PP_IIF(p##(219), 219, 220) +# define BOOST_PP_NODE_222(p) BOOST_PP_IIF(p##(222), BOOST_PP_NODE_221, BOOST_PP_NODE_223) +# define BOOST_PP_NODE_221(p) BOOST_PP_IIF(p##(221), 221, 222) +# define BOOST_PP_NODE_223(p) BOOST_PP_IIF(p##(223), 223, 224) +# define BOOST_PP_NODE_240(p) BOOST_PP_IIF(p##(240), BOOST_PP_NODE_232, BOOST_PP_NODE_248) +# define BOOST_PP_NODE_232(p) BOOST_PP_IIF(p##(232), BOOST_PP_NODE_228, BOOST_PP_NODE_236) +# define BOOST_PP_NODE_228(p) BOOST_PP_IIF(p##(228), BOOST_PP_NODE_226, BOOST_PP_NODE_230) +# define BOOST_PP_NODE_226(p) BOOST_PP_IIF(p##(226), BOOST_PP_NODE_225, BOOST_PP_NODE_227) +# define BOOST_PP_NODE_225(p) BOOST_PP_IIF(p##(225), 225, 226) +# define BOOST_PP_NODE_227(p) BOOST_PP_IIF(p##(227), 227, 228) +# define BOOST_PP_NODE_230(p) BOOST_PP_IIF(p##(230), BOOST_PP_NODE_229, BOOST_PP_NODE_231) +# define BOOST_PP_NODE_229(p) BOOST_PP_IIF(p##(229), 229, 230) +# define BOOST_PP_NODE_231(p) BOOST_PP_IIF(p##(231), 231, 232) +# define BOOST_PP_NODE_236(p) BOOST_PP_IIF(p##(236), BOOST_PP_NODE_234, BOOST_PP_NODE_238) +# define BOOST_PP_NODE_234(p) BOOST_PP_IIF(p##(234), BOOST_PP_NODE_233, BOOST_PP_NODE_235) +# define BOOST_PP_NODE_233(p) BOOST_PP_IIF(p##(233), 233, 234) +# define BOOST_PP_NODE_235(p) BOOST_PP_IIF(p##(235), 235, 236) +# define BOOST_PP_NODE_238(p) BOOST_PP_IIF(p##(238), BOOST_PP_NODE_237, BOOST_PP_NODE_239) +# define BOOST_PP_NODE_237(p) BOOST_PP_IIF(p##(237), 237, 238) +# define BOOST_PP_NODE_239(p) BOOST_PP_IIF(p##(239), 239, 240) +# define BOOST_PP_NODE_248(p) BOOST_PP_IIF(p##(248), BOOST_PP_NODE_244, BOOST_PP_NODE_252) +# define BOOST_PP_NODE_244(p) BOOST_PP_IIF(p##(244), BOOST_PP_NODE_242, BOOST_PP_NODE_246) +# define BOOST_PP_NODE_242(p) BOOST_PP_IIF(p##(242), BOOST_PP_NODE_241, BOOST_PP_NODE_243) +# define BOOST_PP_NODE_241(p) BOOST_PP_IIF(p##(241), 241, 242) +# define BOOST_PP_NODE_243(p) BOOST_PP_IIF(p##(243), 243, 244) +# define BOOST_PP_NODE_246(p) BOOST_PP_IIF(p##(246), BOOST_PP_NODE_245, BOOST_PP_NODE_247) +# define BOOST_PP_NODE_245(p) BOOST_PP_IIF(p##(245), 245, 246) +# define BOOST_PP_NODE_247(p) BOOST_PP_IIF(p##(247), 247, 248) +# define BOOST_PP_NODE_252(p) BOOST_PP_IIF(p##(252), BOOST_PP_NODE_250, BOOST_PP_NODE_254) +# define BOOST_PP_NODE_250(p) BOOST_PP_IIF(p##(250), BOOST_PP_NODE_249, BOOST_PP_NODE_251) +# define BOOST_PP_NODE_249(p) BOOST_PP_IIF(p##(249), 249, 250) +# define BOOST_PP_NODE_251(p) BOOST_PP_IIF(p##(251), 251, 252) +# define BOOST_PP_NODE_254(p) BOOST_PP_IIF(p##(254), BOOST_PP_NODE_253, BOOST_PP_NODE_255) +# define BOOST_PP_NODE_253(p) BOOST_PP_IIF(p##(253), 253, 254) +# define BOOST_PP_NODE_255(p) BOOST_PP_IIF(p##(255), 255, 256) +# +# endif diff --git a/contrib/src/boost/preprocessor/detail/is_binary.hpp b/contrib/src/boost/preprocessor/detail/is_binary.hpp new file mode 100644 index 0000000..3428833 --- /dev/null +++ b/contrib/src/boost/preprocessor/detail/is_binary.hpp @@ -0,0 +1,30 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP +# define BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP +# +# include +# include +# +# /* BOOST_PP_IS_BINARY */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_IS_BINARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK) +# else +# define BOOST_PP_IS_BINARY(x) BOOST_PP_IS_BINARY_I(x) +# define BOOST_PP_IS_BINARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK) +# endif +# +# define BOOST_PP_IS_BINARY_CHECK(a, b) 1 +# define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_BINARY_CHECK 0, BOOST_PP_NIL +# +# endif diff --git a/contrib/src/boost/preprocessor/detail/split.hpp b/contrib/src/boost/preprocessor/detail/split.hpp new file mode 100644 index 0000000..f28a723 --- /dev/null +++ b/contrib/src/boost/preprocessor/detail/split.hpp @@ -0,0 +1,35 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# ifndef BOOST_PREPROCESSOR_DETAIL_SPLIT_HPP +# define BOOST_PREPROCESSOR_DETAIL_SPLIT_HPP +# +# include +# +# /* BOOST_PP_SPLIT */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I((n, im)) +# define BOOST_PP_SPLIT_I(par) BOOST_PP_SPLIT_II ## par +# define BOOST_PP_SPLIT_II(n, a, b) BOOST_PP_SPLIT_ ## n(a, b) +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I(n((im))) +# define BOOST_PP_SPLIT_I(n) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_II_ ## n) +# define BOOST_PP_SPLIT_II_0(s) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_0 s) +# define BOOST_PP_SPLIT_II_1(s) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_1 s) +# define BOOST_PP_SPLIT_ID(id) id +# else +# define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I(n)(im) +# define BOOST_PP_SPLIT_I(n) BOOST_PP_SPLIT_ ## n +# endif +# +# define BOOST_PP_SPLIT_0(a, b) a +# define BOOST_PP_SPLIT_1(a, b) b +# +# endif diff --git a/contrib/src/boost/preprocessor/empty.hpp b/contrib/src/boost/preprocessor/empty.hpp new file mode 100644 index 0000000..116ef74 --- /dev/null +++ b/contrib/src/boost/preprocessor/empty.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_EMPTY_HPP +# define BOOST_PREPROCESSOR_EMPTY_HPP +# +# include +# +# endif diff --git a/contrib/src/boost/preprocessor/enum.hpp b/contrib/src/boost/preprocessor/enum.hpp new file mode 100644 index 0000000..ae05bb0 --- /dev/null +++ b/contrib/src/boost/preprocessor/enum.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ENUM_HPP +# define BOOST_PREPROCESSOR_ENUM_HPP +# +# include +# +# endif diff --git a/contrib/src/boost/preprocessor/enum_params.hpp b/contrib/src/boost/preprocessor/enum_params.hpp new file mode 100644 index 0000000..414f8aa --- /dev/null +++ b/contrib/src/boost/preprocessor/enum_params.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_HPP +# define BOOST_PREPROCESSOR_ENUM_PARAMS_HPP +# +# include +# +# endif diff --git a/contrib/src/boost/preprocessor/enum_shifted_params.hpp b/contrib/src/boost/preprocessor/enum_shifted_params.hpp new file mode 100644 index 0000000..462c642 --- /dev/null +++ b/contrib/src/boost/preprocessor/enum_shifted_params.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP +# define BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP +# +# include +# +# endif diff --git a/contrib/src/boost/preprocessor/expr_if.hpp b/contrib/src/boost/preprocessor/expr_if.hpp new file mode 100644 index 0000000..f93e29b --- /dev/null +++ b/contrib/src/boost/preprocessor/expr_if.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_EXPR_IF_HPP +# define BOOST_PREPROCESSOR_EXPR_IF_HPP +# +# include +# +# endif diff --git a/contrib/src/boost/preprocessor/facilities/detail/is_empty.hpp b/contrib/src/boost/preprocessor/facilities/detail/is_empty.hpp new file mode 100644 index 0000000..e044970 --- /dev/null +++ b/contrib/src/boost/preprocessor/facilities/detail/is_empty.hpp @@ -0,0 +1,55 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +#ifndef BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP +#define BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP + +#include + +#if BOOST_PP_VARIADICS_MSVC + +# pragma warning(once:4002) + +#define BOOST_PP_DETAIL_IS_EMPTY_IIF_0(t, b) b +#define BOOST_PP_DETAIL_IS_EMPTY_IIF_1(t, b) t + +#else + +#define BOOST_PP_DETAIL_IS_EMPTY_IIF_0(t, ...) __VA_ARGS__ +#define BOOST_PP_DETAIL_IS_EMPTY_IIF_1(t, ...) t + +#endif + +#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 + +#define BOOST_PP_DETAIL_IS_EMPTY_PROCESS(param) \ + BOOST_PP_IS_BEGIN_PARENS \ + ( \ + BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C param () \ + ) \ +/**/ + +#else + +#define BOOST_PP_DETAIL_IS_EMPTY_PROCESS(...) \ + BOOST_PP_IS_BEGIN_PARENS \ + ( \ + BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C __VA_ARGS__ () \ + ) \ +/**/ + +#endif + +#define BOOST_PP_DETAIL_IS_EMPTY_PRIMITIVE_CAT(a, b) a ## b +#define BOOST_PP_DETAIL_IS_EMPTY_IIF(bit) BOOST_PP_DETAIL_IS_EMPTY_PRIMITIVE_CAT(BOOST_PP_DETAIL_IS_EMPTY_IIF_,bit) +#define BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C(...) () + +#endif /* BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP */ diff --git a/contrib/src/boost/preprocessor/facilities/empty.hpp b/contrib/src/boost/preprocessor/facilities/empty.hpp new file mode 100644 index 0000000..6f215dc --- /dev/null +++ b/contrib/src/boost/preprocessor/facilities/empty.hpp @@ -0,0 +1,23 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP +# define BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP +# +# include +# +# /* BOOST_PP_EMPTY */ +# +# define BOOST_PP_EMPTY() +# +# endif diff --git a/contrib/src/boost/preprocessor/facilities/expand.hpp b/contrib/src/boost/preprocessor/facilities/expand.hpp new file mode 100644 index 0000000..c8661a1 --- /dev/null +++ b/contrib/src/boost/preprocessor/facilities/expand.hpp @@ -0,0 +1,28 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP +# define BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP +# +# include +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_I(x) +# else +# define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_OO((x)) +# define BOOST_PP_EXPAND_OO(par) BOOST_PP_EXPAND_I ## par +# endif +# +# define BOOST_PP_EXPAND_I(x) x +# +# endif diff --git a/contrib/src/boost/preprocessor/facilities/identity.hpp b/contrib/src/boost/preprocessor/facilities/identity.hpp new file mode 100644 index 0000000..8a7834d --- /dev/null +++ b/contrib/src/boost/preprocessor/facilities/identity.hpp @@ -0,0 +1,27 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# /* Revised by Edward Diener (2015) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_IDENTITY_HPP +# define BOOST_PREPROCESSOR_FACILITIES_IDENTITY_HPP +# +# include +# include +# +# /* BOOST_PP_IDENTITY */ +# +# define BOOST_PP_IDENTITY(item) item BOOST_PP_EMPTY +# +# define BOOST_PP_IDENTITY_N(item,n) item BOOST_PP_TUPLE_EAT_N(n) +# +# endif diff --git a/contrib/src/boost/preprocessor/facilities/intercept.hpp b/contrib/src/boost/preprocessor/facilities/intercept.hpp new file mode 100644 index 0000000..41dcc6a --- /dev/null +++ b/contrib/src/boost/preprocessor/facilities/intercept.hpp @@ -0,0 +1,277 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_INTERCEPT_HPP +# define BOOST_PREPROCESSOR_FACILITIES_INTERCEPT_HPP +# +# /* BOOST_PP_INTERCEPT */ +# +# define BOOST_PP_INTERCEPT BOOST_PP_INTERCEPT_ +# +# define BOOST_PP_INTERCEPT_0 +# define BOOST_PP_INTERCEPT_1 +# define BOOST_PP_INTERCEPT_2 +# define BOOST_PP_INTERCEPT_3 +# define BOOST_PP_INTERCEPT_4 +# define BOOST_PP_INTERCEPT_5 +# define BOOST_PP_INTERCEPT_6 +# define BOOST_PP_INTERCEPT_7 +# define BOOST_PP_INTERCEPT_8 +# define BOOST_PP_INTERCEPT_9 +# define BOOST_PP_INTERCEPT_10 +# define BOOST_PP_INTERCEPT_11 +# define BOOST_PP_INTERCEPT_12 +# define BOOST_PP_INTERCEPT_13 +# define BOOST_PP_INTERCEPT_14 +# define BOOST_PP_INTERCEPT_15 +# define BOOST_PP_INTERCEPT_16 +# define BOOST_PP_INTERCEPT_17 +# define BOOST_PP_INTERCEPT_18 +# define BOOST_PP_INTERCEPT_19 +# define BOOST_PP_INTERCEPT_20 +# define BOOST_PP_INTERCEPT_21 +# define BOOST_PP_INTERCEPT_22 +# define BOOST_PP_INTERCEPT_23 +# define BOOST_PP_INTERCEPT_24 +# define BOOST_PP_INTERCEPT_25 +# define BOOST_PP_INTERCEPT_26 +# define BOOST_PP_INTERCEPT_27 +# define BOOST_PP_INTERCEPT_28 +# define BOOST_PP_INTERCEPT_29 +# define BOOST_PP_INTERCEPT_30 +# define BOOST_PP_INTERCEPT_31 +# define BOOST_PP_INTERCEPT_32 +# define BOOST_PP_INTERCEPT_33 +# define BOOST_PP_INTERCEPT_34 +# define BOOST_PP_INTERCEPT_35 +# define BOOST_PP_INTERCEPT_36 +# define BOOST_PP_INTERCEPT_37 +# define BOOST_PP_INTERCEPT_38 +# define BOOST_PP_INTERCEPT_39 +# define BOOST_PP_INTERCEPT_40 +# define BOOST_PP_INTERCEPT_41 +# define BOOST_PP_INTERCEPT_42 +# define BOOST_PP_INTERCEPT_43 +# define BOOST_PP_INTERCEPT_44 +# define BOOST_PP_INTERCEPT_45 +# define BOOST_PP_INTERCEPT_46 +# define BOOST_PP_INTERCEPT_47 +# define BOOST_PP_INTERCEPT_48 +# define BOOST_PP_INTERCEPT_49 +# define BOOST_PP_INTERCEPT_50 +# define BOOST_PP_INTERCEPT_51 +# define BOOST_PP_INTERCEPT_52 +# define BOOST_PP_INTERCEPT_53 +# define BOOST_PP_INTERCEPT_54 +# define BOOST_PP_INTERCEPT_55 +# define BOOST_PP_INTERCEPT_56 +# define BOOST_PP_INTERCEPT_57 +# define BOOST_PP_INTERCEPT_58 +# define BOOST_PP_INTERCEPT_59 +# define BOOST_PP_INTERCEPT_60 +# define BOOST_PP_INTERCEPT_61 +# define BOOST_PP_INTERCEPT_62 +# define BOOST_PP_INTERCEPT_63 +# define BOOST_PP_INTERCEPT_64 +# define BOOST_PP_INTERCEPT_65 +# define BOOST_PP_INTERCEPT_66 +# define BOOST_PP_INTERCEPT_67 +# define BOOST_PP_INTERCEPT_68 +# define BOOST_PP_INTERCEPT_69 +# define BOOST_PP_INTERCEPT_70 +# define BOOST_PP_INTERCEPT_71 +# define BOOST_PP_INTERCEPT_72 +# define BOOST_PP_INTERCEPT_73 +# define BOOST_PP_INTERCEPT_74 +# define BOOST_PP_INTERCEPT_75 +# define BOOST_PP_INTERCEPT_76 +# define BOOST_PP_INTERCEPT_77 +# define BOOST_PP_INTERCEPT_78 +# define BOOST_PP_INTERCEPT_79 +# define BOOST_PP_INTERCEPT_80 +# define BOOST_PP_INTERCEPT_81 +# define BOOST_PP_INTERCEPT_82 +# define BOOST_PP_INTERCEPT_83 +# define BOOST_PP_INTERCEPT_84 +# define BOOST_PP_INTERCEPT_85 +# define BOOST_PP_INTERCEPT_86 +# define BOOST_PP_INTERCEPT_87 +# define BOOST_PP_INTERCEPT_88 +# define BOOST_PP_INTERCEPT_89 +# define BOOST_PP_INTERCEPT_90 +# define BOOST_PP_INTERCEPT_91 +# define BOOST_PP_INTERCEPT_92 +# define BOOST_PP_INTERCEPT_93 +# define BOOST_PP_INTERCEPT_94 +# define BOOST_PP_INTERCEPT_95 +# define BOOST_PP_INTERCEPT_96 +# define BOOST_PP_INTERCEPT_97 +# define BOOST_PP_INTERCEPT_98 +# define BOOST_PP_INTERCEPT_99 +# define BOOST_PP_INTERCEPT_100 +# define BOOST_PP_INTERCEPT_101 +# define BOOST_PP_INTERCEPT_102 +# define BOOST_PP_INTERCEPT_103 +# define BOOST_PP_INTERCEPT_104 +# define BOOST_PP_INTERCEPT_105 +# define BOOST_PP_INTERCEPT_106 +# define BOOST_PP_INTERCEPT_107 +# define BOOST_PP_INTERCEPT_108 +# define BOOST_PP_INTERCEPT_109 +# define BOOST_PP_INTERCEPT_110 +# define BOOST_PP_INTERCEPT_111 +# define BOOST_PP_INTERCEPT_112 +# define BOOST_PP_INTERCEPT_113 +# define BOOST_PP_INTERCEPT_114 +# define BOOST_PP_INTERCEPT_115 +# define BOOST_PP_INTERCEPT_116 +# define BOOST_PP_INTERCEPT_117 +# define BOOST_PP_INTERCEPT_118 +# define BOOST_PP_INTERCEPT_119 +# define BOOST_PP_INTERCEPT_120 +# define BOOST_PP_INTERCEPT_121 +# define BOOST_PP_INTERCEPT_122 +# define BOOST_PP_INTERCEPT_123 +# define BOOST_PP_INTERCEPT_124 +# define BOOST_PP_INTERCEPT_125 +# define BOOST_PP_INTERCEPT_126 +# define BOOST_PP_INTERCEPT_127 +# define BOOST_PP_INTERCEPT_128 +# define BOOST_PP_INTERCEPT_129 +# define BOOST_PP_INTERCEPT_130 +# define BOOST_PP_INTERCEPT_131 +# define BOOST_PP_INTERCEPT_132 +# define BOOST_PP_INTERCEPT_133 +# define BOOST_PP_INTERCEPT_134 +# define BOOST_PP_INTERCEPT_135 +# define BOOST_PP_INTERCEPT_136 +# define BOOST_PP_INTERCEPT_137 +# define BOOST_PP_INTERCEPT_138 +# define BOOST_PP_INTERCEPT_139 +# define BOOST_PP_INTERCEPT_140 +# define BOOST_PP_INTERCEPT_141 +# define BOOST_PP_INTERCEPT_142 +# define BOOST_PP_INTERCEPT_143 +# define BOOST_PP_INTERCEPT_144 +# define BOOST_PP_INTERCEPT_145 +# define BOOST_PP_INTERCEPT_146 +# define BOOST_PP_INTERCEPT_147 +# define BOOST_PP_INTERCEPT_148 +# define BOOST_PP_INTERCEPT_149 +# define BOOST_PP_INTERCEPT_150 +# define BOOST_PP_INTERCEPT_151 +# define BOOST_PP_INTERCEPT_152 +# define BOOST_PP_INTERCEPT_153 +# define BOOST_PP_INTERCEPT_154 +# define BOOST_PP_INTERCEPT_155 +# define BOOST_PP_INTERCEPT_156 +# define BOOST_PP_INTERCEPT_157 +# define BOOST_PP_INTERCEPT_158 +# define BOOST_PP_INTERCEPT_159 +# define BOOST_PP_INTERCEPT_160 +# define BOOST_PP_INTERCEPT_161 +# define BOOST_PP_INTERCEPT_162 +# define BOOST_PP_INTERCEPT_163 +# define BOOST_PP_INTERCEPT_164 +# define BOOST_PP_INTERCEPT_165 +# define BOOST_PP_INTERCEPT_166 +# define BOOST_PP_INTERCEPT_167 +# define BOOST_PP_INTERCEPT_168 +# define BOOST_PP_INTERCEPT_169 +# define BOOST_PP_INTERCEPT_170 +# define BOOST_PP_INTERCEPT_171 +# define BOOST_PP_INTERCEPT_172 +# define BOOST_PP_INTERCEPT_173 +# define BOOST_PP_INTERCEPT_174 +# define BOOST_PP_INTERCEPT_175 +# define BOOST_PP_INTERCEPT_176 +# define BOOST_PP_INTERCEPT_177 +# define BOOST_PP_INTERCEPT_178 +# define BOOST_PP_INTERCEPT_179 +# define BOOST_PP_INTERCEPT_180 +# define BOOST_PP_INTERCEPT_181 +# define BOOST_PP_INTERCEPT_182 +# define BOOST_PP_INTERCEPT_183 +# define BOOST_PP_INTERCEPT_184 +# define BOOST_PP_INTERCEPT_185 +# define BOOST_PP_INTERCEPT_186 +# define BOOST_PP_INTERCEPT_187 +# define BOOST_PP_INTERCEPT_188 +# define BOOST_PP_INTERCEPT_189 +# define BOOST_PP_INTERCEPT_190 +# define BOOST_PP_INTERCEPT_191 +# define BOOST_PP_INTERCEPT_192 +# define BOOST_PP_INTERCEPT_193 +# define BOOST_PP_INTERCEPT_194 +# define BOOST_PP_INTERCEPT_195 +# define BOOST_PP_INTERCEPT_196 +# define BOOST_PP_INTERCEPT_197 +# define BOOST_PP_INTERCEPT_198 +# define BOOST_PP_INTERCEPT_199 +# define BOOST_PP_INTERCEPT_200 +# define BOOST_PP_INTERCEPT_201 +# define BOOST_PP_INTERCEPT_202 +# define BOOST_PP_INTERCEPT_203 +# define BOOST_PP_INTERCEPT_204 +# define BOOST_PP_INTERCEPT_205 +# define BOOST_PP_INTERCEPT_206 +# define BOOST_PP_INTERCEPT_207 +# define BOOST_PP_INTERCEPT_208 +# define BOOST_PP_INTERCEPT_209 +# define BOOST_PP_INTERCEPT_210 +# define BOOST_PP_INTERCEPT_211 +# define BOOST_PP_INTERCEPT_212 +# define BOOST_PP_INTERCEPT_213 +# define BOOST_PP_INTERCEPT_214 +# define BOOST_PP_INTERCEPT_215 +# define BOOST_PP_INTERCEPT_216 +# define BOOST_PP_INTERCEPT_217 +# define BOOST_PP_INTERCEPT_218 +# define BOOST_PP_INTERCEPT_219 +# define BOOST_PP_INTERCEPT_220 +# define BOOST_PP_INTERCEPT_221 +# define BOOST_PP_INTERCEPT_222 +# define BOOST_PP_INTERCEPT_223 +# define BOOST_PP_INTERCEPT_224 +# define BOOST_PP_INTERCEPT_225 +# define BOOST_PP_INTERCEPT_226 +# define BOOST_PP_INTERCEPT_227 +# define BOOST_PP_INTERCEPT_228 +# define BOOST_PP_INTERCEPT_229 +# define BOOST_PP_INTERCEPT_230 +# define BOOST_PP_INTERCEPT_231 +# define BOOST_PP_INTERCEPT_232 +# define BOOST_PP_INTERCEPT_233 +# define BOOST_PP_INTERCEPT_234 +# define BOOST_PP_INTERCEPT_235 +# define BOOST_PP_INTERCEPT_236 +# define BOOST_PP_INTERCEPT_237 +# define BOOST_PP_INTERCEPT_238 +# define BOOST_PP_INTERCEPT_239 +# define BOOST_PP_INTERCEPT_240 +# define BOOST_PP_INTERCEPT_241 +# define BOOST_PP_INTERCEPT_242 +# define BOOST_PP_INTERCEPT_243 +# define BOOST_PP_INTERCEPT_244 +# define BOOST_PP_INTERCEPT_245 +# define BOOST_PP_INTERCEPT_246 +# define BOOST_PP_INTERCEPT_247 +# define BOOST_PP_INTERCEPT_248 +# define BOOST_PP_INTERCEPT_249 +# define BOOST_PP_INTERCEPT_250 +# define BOOST_PP_INTERCEPT_251 +# define BOOST_PP_INTERCEPT_252 +# define BOOST_PP_INTERCEPT_253 +# define BOOST_PP_INTERCEPT_254 +# define BOOST_PP_INTERCEPT_255 +# define BOOST_PP_INTERCEPT_256 +# +# endif diff --git a/contrib/src/boost/preprocessor/facilities/is_1.hpp b/contrib/src/boost/preprocessor/facilities/is_1.hpp new file mode 100644 index 0000000..f286dcd --- /dev/null +++ b/contrib/src/boost/preprocessor/facilities/is_1.hpp @@ -0,0 +1,23 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2003. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_IS_1_HPP +# define BOOST_PREPROCESSOR_FACILITIES_IS_1_HPP +# +# include +# include +# +# /* BOOST_PP_IS_1 */ +# +# define BOOST_PP_IS_1(x) BOOST_PP_IS_EMPTY(BOOST_PP_CAT(BOOST_PP_IS_1_HELPER_, x)) +# define BOOST_PP_IS_1_HELPER_1 +# +# endif diff --git a/contrib/src/boost/preprocessor/facilities/is_empty.hpp b/contrib/src/boost/preprocessor/facilities/is_empty.hpp new file mode 100644 index 0000000..46aadd3 --- /dev/null +++ b/contrib/src/boost/preprocessor/facilities/is_empty.hpp @@ -0,0 +1,56 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2003. +# * (C) Copyright Edward Diener 2014. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP +# define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP +# +# include +# +# if BOOST_PP_VARIADICS +# +# include +# +# else +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# include +# include +# else +# include +# include +# endif +# +# /* BOOST_PP_IS_EMPTY */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(x BOOST_PP_IS_EMPTY_HELPER) +# define BOOST_PP_IS_EMPTY_I(contents) BOOST_PP_TUPLE_ELEM(2, 1, (BOOST_PP_IS_EMPTY_DEF_ ## contents())) +# define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 1, BOOST_PP_IDENTITY(1) +# define BOOST_PP_IS_EMPTY_HELPER() , 0 +# else +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(BOOST_PP_IS_EMPTY_HELPER x ()) +# define BOOST_PP_IS_EMPTY_I(test) BOOST_PP_IS_EMPTY_II(BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PP_IS_EMPTY_DEF_, test))) +# define BOOST_PP_IS_EMPTY_II(id) id +# else +# define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I((BOOST_PP_IS_EMPTY_HELPER x ())) +# define BOOST_PP_IS_EMPTY_I(par) BOOST_PP_IS_EMPTY_II ## par +# define BOOST_PP_IS_EMPTY_II(test) BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PP_IS_EMPTY_DEF_, test)) +# endif +# define BOOST_PP_IS_EMPTY_HELPER() 1 +# define BOOST_PP_IS_EMPTY_DEF_1 1, BOOST_PP_NIL +# define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 0, BOOST_PP_NIL +# endif +# +# endif /* BOOST_PP_VARIADICS */ +# +# endif /* BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP */ diff --git a/contrib/src/boost/preprocessor/facilities/is_empty_variadic.hpp b/contrib/src/boost/preprocessor/facilities/is_empty_variadic.hpp new file mode 100644 index 0000000..eee4062 --- /dev/null +++ b/contrib/src/boost/preprocessor/facilities/is_empty_variadic.hpp @@ -0,0 +1,57 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP +# define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP +# +# include +# +# if BOOST_PP_VARIADICS +# +# include +# include +# +#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 +# +#define BOOST_PP_IS_EMPTY(param) \ + BOOST_PP_DETAIL_IS_EMPTY_IIF \ + ( \ + BOOST_PP_IS_BEGIN_PARENS \ + ( \ + param \ + ) \ + ) \ + ( \ + BOOST_PP_IS_EMPTY_ZERO, \ + BOOST_PP_DETAIL_IS_EMPTY_PROCESS \ + ) \ + (param) \ +/**/ +#define BOOST_PP_IS_EMPTY_ZERO(param) 0 +# else +#define BOOST_PP_IS_EMPTY(...) \ + BOOST_PP_DETAIL_IS_EMPTY_IIF \ + ( \ + BOOST_PP_IS_BEGIN_PARENS \ + ( \ + __VA_ARGS__ \ + ) \ + ) \ + ( \ + BOOST_PP_IS_EMPTY_ZERO, \ + BOOST_PP_DETAIL_IS_EMPTY_PROCESS \ + ) \ + (__VA_ARGS__) \ +/**/ +#define BOOST_PP_IS_EMPTY_ZERO(...) 0 +# endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */ +# endif /* BOOST_PP_VARIADICS */ +# endif /* BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP */ diff --git a/contrib/src/boost/preprocessor/facilities/overload.hpp b/contrib/src/boost/preprocessor/facilities/overload.hpp new file mode 100644 index 0000000..1576316 --- /dev/null +++ b/contrib/src/boost/preprocessor/facilities/overload.hpp @@ -0,0 +1,25 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2011. * +# * (C) Copyright Edward Diener 2011. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP +# define BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP +# +# include +# include +# +# /* BOOST_PP_OVERLOAD */ +# +# if BOOST_PP_VARIADICS +# define BOOST_PP_OVERLOAD(prefix, ...) BOOST_PP_CAT(prefix, BOOST_PP_VARIADIC_SIZE(__VA_ARGS__)) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/identity.hpp b/contrib/src/boost/preprocessor/identity.hpp new file mode 100644 index 0000000..847dd13 --- /dev/null +++ b/contrib/src/boost/preprocessor/identity.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_IDENTITY_HPP +# define BOOST_PREPROCESSOR_IDENTITY_HPP +# +# include +# +# endif diff --git a/contrib/src/boost/preprocessor/inc.hpp b/contrib/src/boost/preprocessor/inc.hpp new file mode 100644 index 0000000..b98d3a6 --- /dev/null +++ b/contrib/src/boost/preprocessor/inc.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_INC_HPP +# define BOOST_PREPROCESSOR_INC_HPP +# +# include +# +# endif diff --git a/contrib/src/boost/preprocessor/iterate.hpp b/contrib/src/boost/preprocessor/iterate.hpp new file mode 100644 index 0000000..e720ec8 --- /dev/null +++ b/contrib/src/boost/preprocessor/iterate.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ITERATE_HPP +# define BOOST_PREPROCESSOR_ITERATE_HPP +# +# include +# +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/bounds/lower1.hpp b/contrib/src/boost/preprocessor/iteration/detail/bounds/lower1.hpp new file mode 100644 index 0000000..6694d0b --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/bounds/lower1.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_START_1 +# +# undef BOOST_PP_ITERATION_START_1_DIGIT_1 +# undef BOOST_PP_ITERATION_START_1_DIGIT_2 +# undef BOOST_PP_ITERATION_START_1_DIGIT_3 +# undef BOOST_PP_ITERATION_START_1_DIGIT_4 +# undef BOOST_PP_ITERATION_START_1_DIGIT_5 +# undef BOOST_PP_ITERATION_START_1_DIGIT_6 +# undef BOOST_PP_ITERATION_START_1_DIGIT_7 +# undef BOOST_PP_ITERATION_START_1_DIGIT_8 +# undef BOOST_PP_ITERATION_START_1_DIGIT_9 +# undef BOOST_PP_ITERATION_START_1_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_START_1_DIGIT_3 +# define BOOST_PP_ITERATION_START_1 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_1_DIGIT_3, BOOST_PP_ITERATION_START_1_DIGIT_2, BOOST_PP_ITERATION_START_1_DIGIT_1) +# elif BOOST_PP_ITERATION_START_1_DIGIT_2 +# define BOOST_PP_ITERATION_START_1 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_1_DIGIT_2, BOOST_PP_ITERATION_START_1_DIGIT_1) +# else +# define BOOST_PP_ITERATION_START_1 BOOST_PP_ITERATION_START_1_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/bounds/lower2.hpp b/contrib/src/boost/preprocessor/iteration/detail/bounds/lower2.hpp new file mode 100644 index 0000000..ece21fc --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/bounds/lower2.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_START_2 +# +# undef BOOST_PP_ITERATION_START_2_DIGIT_1 +# undef BOOST_PP_ITERATION_START_2_DIGIT_2 +# undef BOOST_PP_ITERATION_START_2_DIGIT_3 +# undef BOOST_PP_ITERATION_START_2_DIGIT_4 +# undef BOOST_PP_ITERATION_START_2_DIGIT_5 +# undef BOOST_PP_ITERATION_START_2_DIGIT_6 +# undef BOOST_PP_ITERATION_START_2_DIGIT_7 +# undef BOOST_PP_ITERATION_START_2_DIGIT_8 +# undef BOOST_PP_ITERATION_START_2_DIGIT_9 +# undef BOOST_PP_ITERATION_START_2_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_START_2_DIGIT_3 +# define BOOST_PP_ITERATION_START_2 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_2_DIGIT_3, BOOST_PP_ITERATION_START_2_DIGIT_2, BOOST_PP_ITERATION_START_2_DIGIT_1) +# elif BOOST_PP_ITERATION_START_2_DIGIT_2 +# define BOOST_PP_ITERATION_START_2 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_2_DIGIT_2, BOOST_PP_ITERATION_START_2_DIGIT_1) +# else +# define BOOST_PP_ITERATION_START_2 BOOST_PP_ITERATION_START_2_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/bounds/lower3.hpp b/contrib/src/boost/preprocessor/iteration/detail/bounds/lower3.hpp new file mode 100644 index 0000000..8429eac --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/bounds/lower3.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_START_3 +# +# undef BOOST_PP_ITERATION_START_3_DIGIT_1 +# undef BOOST_PP_ITERATION_START_3_DIGIT_2 +# undef BOOST_PP_ITERATION_START_3_DIGIT_3 +# undef BOOST_PP_ITERATION_START_3_DIGIT_4 +# undef BOOST_PP_ITERATION_START_3_DIGIT_5 +# undef BOOST_PP_ITERATION_START_3_DIGIT_6 +# undef BOOST_PP_ITERATION_START_3_DIGIT_7 +# undef BOOST_PP_ITERATION_START_3_DIGIT_8 +# undef BOOST_PP_ITERATION_START_3_DIGIT_9 +# undef BOOST_PP_ITERATION_START_3_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_START_3_DIGIT_3 +# define BOOST_PP_ITERATION_START_3 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_3_DIGIT_3, BOOST_PP_ITERATION_START_3_DIGIT_2, BOOST_PP_ITERATION_START_3_DIGIT_1) +# elif BOOST_PP_ITERATION_START_3_DIGIT_2 +# define BOOST_PP_ITERATION_START_3 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_3_DIGIT_2, BOOST_PP_ITERATION_START_3_DIGIT_1) +# else +# define BOOST_PP_ITERATION_START_3 BOOST_PP_ITERATION_START_3_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/bounds/lower4.hpp b/contrib/src/boost/preprocessor/iteration/detail/bounds/lower4.hpp new file mode 100644 index 0000000..ba0832f --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/bounds/lower4.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_START_4 +# +# undef BOOST_PP_ITERATION_START_4_DIGIT_1 +# undef BOOST_PP_ITERATION_START_4_DIGIT_2 +# undef BOOST_PP_ITERATION_START_4_DIGIT_3 +# undef BOOST_PP_ITERATION_START_4_DIGIT_4 +# undef BOOST_PP_ITERATION_START_4_DIGIT_5 +# undef BOOST_PP_ITERATION_START_4_DIGIT_6 +# undef BOOST_PP_ITERATION_START_4_DIGIT_7 +# undef BOOST_PP_ITERATION_START_4_DIGIT_8 +# undef BOOST_PP_ITERATION_START_4_DIGIT_9 +# undef BOOST_PP_ITERATION_START_4_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_START_4_DIGIT_3 +# define BOOST_PP_ITERATION_START_4 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_4_DIGIT_3, BOOST_PP_ITERATION_START_4_DIGIT_2, BOOST_PP_ITERATION_START_4_DIGIT_1) +# elif BOOST_PP_ITERATION_START_4_DIGIT_2 +# define BOOST_PP_ITERATION_START_4 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_4_DIGIT_2, BOOST_PP_ITERATION_START_4_DIGIT_1) +# else +# define BOOST_PP_ITERATION_START_4 BOOST_PP_ITERATION_START_4_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/bounds/lower5.hpp b/contrib/src/boost/preprocessor/iteration/detail/bounds/lower5.hpp new file mode 100644 index 0000000..f4888c7 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/bounds/lower5.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_START_5 +# +# undef BOOST_PP_ITERATION_START_5_DIGIT_1 +# undef BOOST_PP_ITERATION_START_5_DIGIT_2 +# undef BOOST_PP_ITERATION_START_5_DIGIT_3 +# undef BOOST_PP_ITERATION_START_5_DIGIT_4 +# undef BOOST_PP_ITERATION_START_5_DIGIT_5 +# undef BOOST_PP_ITERATION_START_5_DIGIT_6 +# undef BOOST_PP_ITERATION_START_5_DIGIT_7 +# undef BOOST_PP_ITERATION_START_5_DIGIT_8 +# undef BOOST_PP_ITERATION_START_5_DIGIT_9 +# undef BOOST_PP_ITERATION_START_5_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_START_5_DIGIT_3 +# define BOOST_PP_ITERATION_START_5 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_5_DIGIT_3, BOOST_PP_ITERATION_START_5_DIGIT_2, BOOST_PP_ITERATION_START_5_DIGIT_1) +# elif BOOST_PP_ITERATION_START_5_DIGIT_2 +# define BOOST_PP_ITERATION_START_5 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_5_DIGIT_2, BOOST_PP_ITERATION_START_5_DIGIT_1) +# else +# define BOOST_PP_ITERATION_START_5 BOOST_PP_ITERATION_START_5_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/bounds/upper1.hpp b/contrib/src/boost/preprocessor/iteration/detail/bounds/upper1.hpp new file mode 100644 index 0000000..50d0fcf --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/bounds/upper1.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_FINISH_1 +# +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_1 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_2 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_3 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_4 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_5 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_6 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_7 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_8 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_9 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_FINISH_1_DIGIT_3 +# define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_1_DIGIT_3, BOOST_PP_ITERATION_FINISH_1_DIGIT_2, BOOST_PP_ITERATION_FINISH_1_DIGIT_1) +# elif BOOST_PP_ITERATION_FINISH_1_DIGIT_2 +# define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_1_DIGIT_2, BOOST_PP_ITERATION_FINISH_1_DIGIT_1) +# else +# define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_ITERATION_FINISH_1_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/bounds/upper2.hpp b/contrib/src/boost/preprocessor/iteration/detail/bounds/upper2.hpp new file mode 100644 index 0000000..faef6f4 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/bounds/upper2.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_FINISH_2 +# +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_1 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_2 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_3 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_4 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_5 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_6 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_7 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_8 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_9 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_FINISH_2_DIGIT_3 +# define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_2_DIGIT_3, BOOST_PP_ITERATION_FINISH_2_DIGIT_2, BOOST_PP_ITERATION_FINISH_2_DIGIT_1) +# elif BOOST_PP_ITERATION_FINISH_2_DIGIT_2 +# define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_2_DIGIT_2, BOOST_PP_ITERATION_FINISH_2_DIGIT_1) +# else +# define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_ITERATION_FINISH_2_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/bounds/upper3.hpp b/contrib/src/boost/preprocessor/iteration/detail/bounds/upper3.hpp new file mode 100644 index 0000000..38d9ade --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/bounds/upper3.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_FINISH_3 +# +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_1 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_2 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_3 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_4 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_5 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_6 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_7 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_8 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_9 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_FINISH_3_DIGIT_3 +# define BOOST_PP_ITERATION_FINISH_3 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_3_DIGIT_3, BOOST_PP_ITERATION_FINISH_3_DIGIT_2, BOOST_PP_ITERATION_FINISH_3_DIGIT_1) +# elif BOOST_PP_ITERATION_FINISH_3_DIGIT_2 +# define BOOST_PP_ITERATION_FINISH_3 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_3_DIGIT_2, BOOST_PP_ITERATION_FINISH_3_DIGIT_1) +# else +# define BOOST_PP_ITERATION_FINISH_3 BOOST_PP_ITERATION_FINISH_3_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/bounds/upper4.hpp b/contrib/src/boost/preprocessor/iteration/detail/bounds/upper4.hpp new file mode 100644 index 0000000..7f771c2 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/bounds/upper4.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_FINISH_4 +# +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_1 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_2 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_3 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_4 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_5 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_6 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_7 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_8 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_9 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_FINISH_4_DIGIT_3 +# define BOOST_PP_ITERATION_FINISH_4 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_4_DIGIT_3, BOOST_PP_ITERATION_FINISH_4_DIGIT_2, BOOST_PP_ITERATION_FINISH_4_DIGIT_1) +# elif BOOST_PP_ITERATION_FINISH_4_DIGIT_2 +# define BOOST_PP_ITERATION_FINISH_4 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_4_DIGIT_2, BOOST_PP_ITERATION_FINISH_4_DIGIT_1) +# else +# define BOOST_PP_ITERATION_FINISH_4 BOOST_PP_ITERATION_FINISH_4_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/bounds/upper5.hpp b/contrib/src/boost/preprocessor/iteration/detail/bounds/upper5.hpp new file mode 100644 index 0000000..9f27d58 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/bounds/upper5.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_FINISH_5 +# +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_1 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_2 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_3 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_4 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_5 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_6 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_7 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_8 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_9 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_FINISH_5_DIGIT_3 +# define BOOST_PP_ITERATION_FINISH_5 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_5_DIGIT_3, BOOST_PP_ITERATION_FINISH_5_DIGIT_2, BOOST_PP_ITERATION_FINISH_5_DIGIT_1) +# elif BOOST_PP_ITERATION_FINISH_5_DIGIT_2 +# define BOOST_PP_ITERATION_FINISH_5 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_5_DIGIT_2, BOOST_PP_ITERATION_FINISH_5_DIGIT_1) +# else +# define BOOST_PP_ITERATION_FINISH_5 BOOST_PP_ITERATION_FINISH_5_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/finish.hpp b/contrib/src/boost/preprocessor/iteration/detail/finish.hpp new file mode 100644 index 0000000..0236944 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/finish.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_LOCAL_FE +# +# undef BOOST_PP_LOCAL_FE_DIGIT_1 +# undef BOOST_PP_LOCAL_FE_DIGIT_2 +# undef BOOST_PP_LOCAL_FE_DIGIT_3 +# undef BOOST_PP_LOCAL_FE_DIGIT_4 +# undef BOOST_PP_LOCAL_FE_DIGIT_5 +# undef BOOST_PP_LOCAL_FE_DIGIT_6 +# undef BOOST_PP_LOCAL_FE_DIGIT_7 +# undef BOOST_PP_LOCAL_FE_DIGIT_8 +# undef BOOST_PP_LOCAL_FE_DIGIT_9 +# undef BOOST_PP_LOCAL_FE_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_LOCAL_FE_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_LOCAL_FE_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_LOCAL_FE_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_LOCAL_FE_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_LOCAL_FE_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_LOCAL_FE_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_LOCAL_FE_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_LOCAL_FE_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_LOCAL_FE_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_LOCAL_FE_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_LOCAL_FE_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_LOCAL_FE_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_LOCAL_FE_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_LOCAL_FE_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_LOCAL_FE_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_LOCAL_FE_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_LOCAL_FE_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_LOCAL_FE_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_LOCAL_FE_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_LOCAL_FE_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_LOCAL_FE_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_LOCAL_FE_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_LOCAL_FE_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_LOCAL_FE_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_LOCAL_FE_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_LOCAL_FE_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_LOCAL_FE_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_LOCAL_FE_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_LOCAL_FE_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_LOCAL_FE_DIGIT_1 9 +# endif +# +# if BOOST_PP_LOCAL_FE_DIGIT_3 +# define BOOST_PP_LOCAL_FE() BOOST_PP_SLOT_CC_3(BOOST_PP_LOCAL_FE_DIGIT_3, BOOST_PP_LOCAL_FE_DIGIT_2, BOOST_PP_LOCAL_FE_DIGIT_1) +# elif BOOST_PP_LOCAL_FE_DIGIT_2 +# define BOOST_PP_LOCAL_FE() BOOST_PP_SLOT_CC_2(BOOST_PP_LOCAL_FE_DIGIT_2, BOOST_PP_LOCAL_FE_DIGIT_1) +# else +# define BOOST_PP_LOCAL_FE() BOOST_PP_LOCAL_FE_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/iter/forward1.hpp b/contrib/src/boost/preprocessor/iteration/detail/iter/forward1.hpp new file mode 100644 index 0000000..3c6a458 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/iter/forward1.hpp @@ -0,0 +1,1342 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if defined(BOOST_PP_ITERATION_LIMITS) +# if !defined(BOOST_PP_FILENAME_1) +# error BOOST_PP_ERROR: depth #1 filename is not defined +# endif +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_ITERATION_FLAGS_1() 0 +# undef BOOST_PP_ITERATION_LIMITS +# elif defined(BOOST_PP_ITERATION_PARAMS_1) +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_1) +# include +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_1) +# include +# define BOOST_PP_FILENAME_1 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_1) +# if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_1) >= 4 +# define BOOST_PP_ITERATION_FLAGS_1() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_1) +# else +# define BOOST_PP_ITERATION_FLAGS_1() 0 +# endif +# else +# error BOOST_PP_ERROR: depth #1 iteration boundaries or filename not defined +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 1 +# +# define BOOST_PP_IS_ITERATING 1 +# +# if (BOOST_PP_ITERATION_START_1) > (BOOST_PP_ITERATION_FINISH_1) +# include +# else +# if BOOST_PP_ITERATION_START_1 <= 0 && BOOST_PP_ITERATION_FINISH_1 >= 0 +# define BOOST_PP_ITERATION_1 0 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 1 && BOOST_PP_ITERATION_FINISH_1 >= 1 +# define BOOST_PP_ITERATION_1 1 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 2 && BOOST_PP_ITERATION_FINISH_1 >= 2 +# define BOOST_PP_ITERATION_1 2 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 3 && BOOST_PP_ITERATION_FINISH_1 >= 3 +# define BOOST_PP_ITERATION_1 3 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 4 && BOOST_PP_ITERATION_FINISH_1 >= 4 +# define BOOST_PP_ITERATION_1 4 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 5 && BOOST_PP_ITERATION_FINISH_1 >= 5 +# define BOOST_PP_ITERATION_1 5 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 6 && BOOST_PP_ITERATION_FINISH_1 >= 6 +# define BOOST_PP_ITERATION_1 6 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 7 && BOOST_PP_ITERATION_FINISH_1 >= 7 +# define BOOST_PP_ITERATION_1 7 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 8 && BOOST_PP_ITERATION_FINISH_1 >= 8 +# define BOOST_PP_ITERATION_1 8 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 9 && BOOST_PP_ITERATION_FINISH_1 >= 9 +# define BOOST_PP_ITERATION_1 9 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 10 && BOOST_PP_ITERATION_FINISH_1 >= 10 +# define BOOST_PP_ITERATION_1 10 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 11 && BOOST_PP_ITERATION_FINISH_1 >= 11 +# define BOOST_PP_ITERATION_1 11 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 12 && BOOST_PP_ITERATION_FINISH_1 >= 12 +# define BOOST_PP_ITERATION_1 12 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 13 && BOOST_PP_ITERATION_FINISH_1 >= 13 +# define BOOST_PP_ITERATION_1 13 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 14 && BOOST_PP_ITERATION_FINISH_1 >= 14 +# define BOOST_PP_ITERATION_1 14 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 15 && BOOST_PP_ITERATION_FINISH_1 >= 15 +# define BOOST_PP_ITERATION_1 15 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 16 && BOOST_PP_ITERATION_FINISH_1 >= 16 +# define BOOST_PP_ITERATION_1 16 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 17 && BOOST_PP_ITERATION_FINISH_1 >= 17 +# define BOOST_PP_ITERATION_1 17 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 18 && BOOST_PP_ITERATION_FINISH_1 >= 18 +# define BOOST_PP_ITERATION_1 18 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 19 && BOOST_PP_ITERATION_FINISH_1 >= 19 +# define BOOST_PP_ITERATION_1 19 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 20 && BOOST_PP_ITERATION_FINISH_1 >= 20 +# define BOOST_PP_ITERATION_1 20 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 21 && BOOST_PP_ITERATION_FINISH_1 >= 21 +# define BOOST_PP_ITERATION_1 21 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 22 && BOOST_PP_ITERATION_FINISH_1 >= 22 +# define BOOST_PP_ITERATION_1 22 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 23 && BOOST_PP_ITERATION_FINISH_1 >= 23 +# define BOOST_PP_ITERATION_1 23 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 24 && BOOST_PP_ITERATION_FINISH_1 >= 24 +# define BOOST_PP_ITERATION_1 24 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 25 && BOOST_PP_ITERATION_FINISH_1 >= 25 +# define BOOST_PP_ITERATION_1 25 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 26 && BOOST_PP_ITERATION_FINISH_1 >= 26 +# define BOOST_PP_ITERATION_1 26 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 27 && BOOST_PP_ITERATION_FINISH_1 >= 27 +# define BOOST_PP_ITERATION_1 27 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 28 && BOOST_PP_ITERATION_FINISH_1 >= 28 +# define BOOST_PP_ITERATION_1 28 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 29 && BOOST_PP_ITERATION_FINISH_1 >= 29 +# define BOOST_PP_ITERATION_1 29 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 30 && BOOST_PP_ITERATION_FINISH_1 >= 30 +# define BOOST_PP_ITERATION_1 30 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 31 && BOOST_PP_ITERATION_FINISH_1 >= 31 +# define BOOST_PP_ITERATION_1 31 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 32 && BOOST_PP_ITERATION_FINISH_1 >= 32 +# define BOOST_PP_ITERATION_1 32 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 33 && BOOST_PP_ITERATION_FINISH_1 >= 33 +# define BOOST_PP_ITERATION_1 33 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 34 && BOOST_PP_ITERATION_FINISH_1 >= 34 +# define BOOST_PP_ITERATION_1 34 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 35 && BOOST_PP_ITERATION_FINISH_1 >= 35 +# define BOOST_PP_ITERATION_1 35 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 36 && BOOST_PP_ITERATION_FINISH_1 >= 36 +# define BOOST_PP_ITERATION_1 36 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 37 && BOOST_PP_ITERATION_FINISH_1 >= 37 +# define BOOST_PP_ITERATION_1 37 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 38 && BOOST_PP_ITERATION_FINISH_1 >= 38 +# define BOOST_PP_ITERATION_1 38 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 39 && BOOST_PP_ITERATION_FINISH_1 >= 39 +# define BOOST_PP_ITERATION_1 39 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 40 && BOOST_PP_ITERATION_FINISH_1 >= 40 +# define BOOST_PP_ITERATION_1 40 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 41 && BOOST_PP_ITERATION_FINISH_1 >= 41 +# define BOOST_PP_ITERATION_1 41 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 42 && BOOST_PP_ITERATION_FINISH_1 >= 42 +# define BOOST_PP_ITERATION_1 42 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 43 && BOOST_PP_ITERATION_FINISH_1 >= 43 +# define BOOST_PP_ITERATION_1 43 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 44 && BOOST_PP_ITERATION_FINISH_1 >= 44 +# define BOOST_PP_ITERATION_1 44 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 45 && BOOST_PP_ITERATION_FINISH_1 >= 45 +# define BOOST_PP_ITERATION_1 45 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 46 && BOOST_PP_ITERATION_FINISH_1 >= 46 +# define BOOST_PP_ITERATION_1 46 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 47 && BOOST_PP_ITERATION_FINISH_1 >= 47 +# define BOOST_PP_ITERATION_1 47 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 48 && BOOST_PP_ITERATION_FINISH_1 >= 48 +# define BOOST_PP_ITERATION_1 48 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 49 && BOOST_PP_ITERATION_FINISH_1 >= 49 +# define BOOST_PP_ITERATION_1 49 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 50 && BOOST_PP_ITERATION_FINISH_1 >= 50 +# define BOOST_PP_ITERATION_1 50 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 51 && BOOST_PP_ITERATION_FINISH_1 >= 51 +# define BOOST_PP_ITERATION_1 51 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 52 && BOOST_PP_ITERATION_FINISH_1 >= 52 +# define BOOST_PP_ITERATION_1 52 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 53 && BOOST_PP_ITERATION_FINISH_1 >= 53 +# define BOOST_PP_ITERATION_1 53 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 54 && BOOST_PP_ITERATION_FINISH_1 >= 54 +# define BOOST_PP_ITERATION_1 54 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 55 && BOOST_PP_ITERATION_FINISH_1 >= 55 +# define BOOST_PP_ITERATION_1 55 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 56 && BOOST_PP_ITERATION_FINISH_1 >= 56 +# define BOOST_PP_ITERATION_1 56 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 57 && BOOST_PP_ITERATION_FINISH_1 >= 57 +# define BOOST_PP_ITERATION_1 57 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 58 && BOOST_PP_ITERATION_FINISH_1 >= 58 +# define BOOST_PP_ITERATION_1 58 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 59 && BOOST_PP_ITERATION_FINISH_1 >= 59 +# define BOOST_PP_ITERATION_1 59 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 60 && BOOST_PP_ITERATION_FINISH_1 >= 60 +# define BOOST_PP_ITERATION_1 60 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 61 && BOOST_PP_ITERATION_FINISH_1 >= 61 +# define BOOST_PP_ITERATION_1 61 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 62 && BOOST_PP_ITERATION_FINISH_1 >= 62 +# define BOOST_PP_ITERATION_1 62 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 63 && BOOST_PP_ITERATION_FINISH_1 >= 63 +# define BOOST_PP_ITERATION_1 63 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 64 && BOOST_PP_ITERATION_FINISH_1 >= 64 +# define BOOST_PP_ITERATION_1 64 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 65 && BOOST_PP_ITERATION_FINISH_1 >= 65 +# define BOOST_PP_ITERATION_1 65 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 66 && BOOST_PP_ITERATION_FINISH_1 >= 66 +# define BOOST_PP_ITERATION_1 66 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 67 && BOOST_PP_ITERATION_FINISH_1 >= 67 +# define BOOST_PP_ITERATION_1 67 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 68 && BOOST_PP_ITERATION_FINISH_1 >= 68 +# define BOOST_PP_ITERATION_1 68 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 69 && BOOST_PP_ITERATION_FINISH_1 >= 69 +# define BOOST_PP_ITERATION_1 69 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 70 && BOOST_PP_ITERATION_FINISH_1 >= 70 +# define BOOST_PP_ITERATION_1 70 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 71 && BOOST_PP_ITERATION_FINISH_1 >= 71 +# define BOOST_PP_ITERATION_1 71 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 72 && BOOST_PP_ITERATION_FINISH_1 >= 72 +# define BOOST_PP_ITERATION_1 72 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 73 && BOOST_PP_ITERATION_FINISH_1 >= 73 +# define BOOST_PP_ITERATION_1 73 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 74 && BOOST_PP_ITERATION_FINISH_1 >= 74 +# define BOOST_PP_ITERATION_1 74 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 75 && BOOST_PP_ITERATION_FINISH_1 >= 75 +# define BOOST_PP_ITERATION_1 75 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 76 && BOOST_PP_ITERATION_FINISH_1 >= 76 +# define BOOST_PP_ITERATION_1 76 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 77 && BOOST_PP_ITERATION_FINISH_1 >= 77 +# define BOOST_PP_ITERATION_1 77 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 78 && BOOST_PP_ITERATION_FINISH_1 >= 78 +# define BOOST_PP_ITERATION_1 78 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 79 && BOOST_PP_ITERATION_FINISH_1 >= 79 +# define BOOST_PP_ITERATION_1 79 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 80 && BOOST_PP_ITERATION_FINISH_1 >= 80 +# define BOOST_PP_ITERATION_1 80 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 81 && BOOST_PP_ITERATION_FINISH_1 >= 81 +# define BOOST_PP_ITERATION_1 81 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 82 && BOOST_PP_ITERATION_FINISH_1 >= 82 +# define BOOST_PP_ITERATION_1 82 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 83 && BOOST_PP_ITERATION_FINISH_1 >= 83 +# define BOOST_PP_ITERATION_1 83 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 84 && BOOST_PP_ITERATION_FINISH_1 >= 84 +# define BOOST_PP_ITERATION_1 84 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 85 && BOOST_PP_ITERATION_FINISH_1 >= 85 +# define BOOST_PP_ITERATION_1 85 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 86 && BOOST_PP_ITERATION_FINISH_1 >= 86 +# define BOOST_PP_ITERATION_1 86 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 87 && BOOST_PP_ITERATION_FINISH_1 >= 87 +# define BOOST_PP_ITERATION_1 87 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 88 && BOOST_PP_ITERATION_FINISH_1 >= 88 +# define BOOST_PP_ITERATION_1 88 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 89 && BOOST_PP_ITERATION_FINISH_1 >= 89 +# define BOOST_PP_ITERATION_1 89 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 90 && BOOST_PP_ITERATION_FINISH_1 >= 90 +# define BOOST_PP_ITERATION_1 90 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 91 && BOOST_PP_ITERATION_FINISH_1 >= 91 +# define BOOST_PP_ITERATION_1 91 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 92 && BOOST_PP_ITERATION_FINISH_1 >= 92 +# define BOOST_PP_ITERATION_1 92 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 93 && BOOST_PP_ITERATION_FINISH_1 >= 93 +# define BOOST_PP_ITERATION_1 93 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 94 && BOOST_PP_ITERATION_FINISH_1 >= 94 +# define BOOST_PP_ITERATION_1 94 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 95 && BOOST_PP_ITERATION_FINISH_1 >= 95 +# define BOOST_PP_ITERATION_1 95 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 96 && BOOST_PP_ITERATION_FINISH_1 >= 96 +# define BOOST_PP_ITERATION_1 96 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 97 && BOOST_PP_ITERATION_FINISH_1 >= 97 +# define BOOST_PP_ITERATION_1 97 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 98 && BOOST_PP_ITERATION_FINISH_1 >= 98 +# define BOOST_PP_ITERATION_1 98 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 99 && BOOST_PP_ITERATION_FINISH_1 >= 99 +# define BOOST_PP_ITERATION_1 99 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 100 && BOOST_PP_ITERATION_FINISH_1 >= 100 +# define BOOST_PP_ITERATION_1 100 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 101 && BOOST_PP_ITERATION_FINISH_1 >= 101 +# define BOOST_PP_ITERATION_1 101 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 102 && BOOST_PP_ITERATION_FINISH_1 >= 102 +# define BOOST_PP_ITERATION_1 102 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 103 && BOOST_PP_ITERATION_FINISH_1 >= 103 +# define BOOST_PP_ITERATION_1 103 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 104 && BOOST_PP_ITERATION_FINISH_1 >= 104 +# define BOOST_PP_ITERATION_1 104 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 105 && BOOST_PP_ITERATION_FINISH_1 >= 105 +# define BOOST_PP_ITERATION_1 105 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 106 && BOOST_PP_ITERATION_FINISH_1 >= 106 +# define BOOST_PP_ITERATION_1 106 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 107 && BOOST_PP_ITERATION_FINISH_1 >= 107 +# define BOOST_PP_ITERATION_1 107 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 108 && BOOST_PP_ITERATION_FINISH_1 >= 108 +# define BOOST_PP_ITERATION_1 108 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 109 && BOOST_PP_ITERATION_FINISH_1 >= 109 +# define BOOST_PP_ITERATION_1 109 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 110 && BOOST_PP_ITERATION_FINISH_1 >= 110 +# define BOOST_PP_ITERATION_1 110 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 111 && BOOST_PP_ITERATION_FINISH_1 >= 111 +# define BOOST_PP_ITERATION_1 111 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 112 && BOOST_PP_ITERATION_FINISH_1 >= 112 +# define BOOST_PP_ITERATION_1 112 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 113 && BOOST_PP_ITERATION_FINISH_1 >= 113 +# define BOOST_PP_ITERATION_1 113 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 114 && BOOST_PP_ITERATION_FINISH_1 >= 114 +# define BOOST_PP_ITERATION_1 114 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 115 && BOOST_PP_ITERATION_FINISH_1 >= 115 +# define BOOST_PP_ITERATION_1 115 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 116 && BOOST_PP_ITERATION_FINISH_1 >= 116 +# define BOOST_PP_ITERATION_1 116 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 117 && BOOST_PP_ITERATION_FINISH_1 >= 117 +# define BOOST_PP_ITERATION_1 117 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 118 && BOOST_PP_ITERATION_FINISH_1 >= 118 +# define BOOST_PP_ITERATION_1 118 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 119 && BOOST_PP_ITERATION_FINISH_1 >= 119 +# define BOOST_PP_ITERATION_1 119 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 120 && BOOST_PP_ITERATION_FINISH_1 >= 120 +# define BOOST_PP_ITERATION_1 120 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 121 && BOOST_PP_ITERATION_FINISH_1 >= 121 +# define BOOST_PP_ITERATION_1 121 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 122 && BOOST_PP_ITERATION_FINISH_1 >= 122 +# define BOOST_PP_ITERATION_1 122 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 123 && BOOST_PP_ITERATION_FINISH_1 >= 123 +# define BOOST_PP_ITERATION_1 123 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 124 && BOOST_PP_ITERATION_FINISH_1 >= 124 +# define BOOST_PP_ITERATION_1 124 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 125 && BOOST_PP_ITERATION_FINISH_1 >= 125 +# define BOOST_PP_ITERATION_1 125 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 126 && BOOST_PP_ITERATION_FINISH_1 >= 126 +# define BOOST_PP_ITERATION_1 126 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 127 && BOOST_PP_ITERATION_FINISH_1 >= 127 +# define BOOST_PP_ITERATION_1 127 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 128 && BOOST_PP_ITERATION_FINISH_1 >= 128 +# define BOOST_PP_ITERATION_1 128 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 129 && BOOST_PP_ITERATION_FINISH_1 >= 129 +# define BOOST_PP_ITERATION_1 129 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 130 && BOOST_PP_ITERATION_FINISH_1 >= 130 +# define BOOST_PP_ITERATION_1 130 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 131 && BOOST_PP_ITERATION_FINISH_1 >= 131 +# define BOOST_PP_ITERATION_1 131 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 132 && BOOST_PP_ITERATION_FINISH_1 >= 132 +# define BOOST_PP_ITERATION_1 132 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 133 && BOOST_PP_ITERATION_FINISH_1 >= 133 +# define BOOST_PP_ITERATION_1 133 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 134 && BOOST_PP_ITERATION_FINISH_1 >= 134 +# define BOOST_PP_ITERATION_1 134 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 135 && BOOST_PP_ITERATION_FINISH_1 >= 135 +# define BOOST_PP_ITERATION_1 135 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 136 && BOOST_PP_ITERATION_FINISH_1 >= 136 +# define BOOST_PP_ITERATION_1 136 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 137 && BOOST_PP_ITERATION_FINISH_1 >= 137 +# define BOOST_PP_ITERATION_1 137 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 138 && BOOST_PP_ITERATION_FINISH_1 >= 138 +# define BOOST_PP_ITERATION_1 138 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 139 && BOOST_PP_ITERATION_FINISH_1 >= 139 +# define BOOST_PP_ITERATION_1 139 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 140 && BOOST_PP_ITERATION_FINISH_1 >= 140 +# define BOOST_PP_ITERATION_1 140 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 141 && BOOST_PP_ITERATION_FINISH_1 >= 141 +# define BOOST_PP_ITERATION_1 141 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 142 && BOOST_PP_ITERATION_FINISH_1 >= 142 +# define BOOST_PP_ITERATION_1 142 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 143 && BOOST_PP_ITERATION_FINISH_1 >= 143 +# define BOOST_PP_ITERATION_1 143 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 144 && BOOST_PP_ITERATION_FINISH_1 >= 144 +# define BOOST_PP_ITERATION_1 144 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 145 && BOOST_PP_ITERATION_FINISH_1 >= 145 +# define BOOST_PP_ITERATION_1 145 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 146 && BOOST_PP_ITERATION_FINISH_1 >= 146 +# define BOOST_PP_ITERATION_1 146 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 147 && BOOST_PP_ITERATION_FINISH_1 >= 147 +# define BOOST_PP_ITERATION_1 147 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 148 && BOOST_PP_ITERATION_FINISH_1 >= 148 +# define BOOST_PP_ITERATION_1 148 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 149 && BOOST_PP_ITERATION_FINISH_1 >= 149 +# define BOOST_PP_ITERATION_1 149 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 150 && BOOST_PP_ITERATION_FINISH_1 >= 150 +# define BOOST_PP_ITERATION_1 150 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 151 && BOOST_PP_ITERATION_FINISH_1 >= 151 +# define BOOST_PP_ITERATION_1 151 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 152 && BOOST_PP_ITERATION_FINISH_1 >= 152 +# define BOOST_PP_ITERATION_1 152 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 153 && BOOST_PP_ITERATION_FINISH_1 >= 153 +# define BOOST_PP_ITERATION_1 153 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 154 && BOOST_PP_ITERATION_FINISH_1 >= 154 +# define BOOST_PP_ITERATION_1 154 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 155 && BOOST_PP_ITERATION_FINISH_1 >= 155 +# define BOOST_PP_ITERATION_1 155 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 156 && BOOST_PP_ITERATION_FINISH_1 >= 156 +# define BOOST_PP_ITERATION_1 156 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 157 && BOOST_PP_ITERATION_FINISH_1 >= 157 +# define BOOST_PP_ITERATION_1 157 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 158 && BOOST_PP_ITERATION_FINISH_1 >= 158 +# define BOOST_PP_ITERATION_1 158 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 159 && BOOST_PP_ITERATION_FINISH_1 >= 159 +# define BOOST_PP_ITERATION_1 159 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 160 && BOOST_PP_ITERATION_FINISH_1 >= 160 +# define BOOST_PP_ITERATION_1 160 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 161 && BOOST_PP_ITERATION_FINISH_1 >= 161 +# define BOOST_PP_ITERATION_1 161 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 162 && BOOST_PP_ITERATION_FINISH_1 >= 162 +# define BOOST_PP_ITERATION_1 162 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 163 && BOOST_PP_ITERATION_FINISH_1 >= 163 +# define BOOST_PP_ITERATION_1 163 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 164 && BOOST_PP_ITERATION_FINISH_1 >= 164 +# define BOOST_PP_ITERATION_1 164 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 165 && BOOST_PP_ITERATION_FINISH_1 >= 165 +# define BOOST_PP_ITERATION_1 165 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 166 && BOOST_PP_ITERATION_FINISH_1 >= 166 +# define BOOST_PP_ITERATION_1 166 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 167 && BOOST_PP_ITERATION_FINISH_1 >= 167 +# define BOOST_PP_ITERATION_1 167 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 168 && BOOST_PP_ITERATION_FINISH_1 >= 168 +# define BOOST_PP_ITERATION_1 168 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 169 && BOOST_PP_ITERATION_FINISH_1 >= 169 +# define BOOST_PP_ITERATION_1 169 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 170 && BOOST_PP_ITERATION_FINISH_1 >= 170 +# define BOOST_PP_ITERATION_1 170 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 171 && BOOST_PP_ITERATION_FINISH_1 >= 171 +# define BOOST_PP_ITERATION_1 171 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 172 && BOOST_PP_ITERATION_FINISH_1 >= 172 +# define BOOST_PP_ITERATION_1 172 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 173 && BOOST_PP_ITERATION_FINISH_1 >= 173 +# define BOOST_PP_ITERATION_1 173 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 174 && BOOST_PP_ITERATION_FINISH_1 >= 174 +# define BOOST_PP_ITERATION_1 174 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 175 && BOOST_PP_ITERATION_FINISH_1 >= 175 +# define BOOST_PP_ITERATION_1 175 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 176 && BOOST_PP_ITERATION_FINISH_1 >= 176 +# define BOOST_PP_ITERATION_1 176 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 177 && BOOST_PP_ITERATION_FINISH_1 >= 177 +# define BOOST_PP_ITERATION_1 177 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 178 && BOOST_PP_ITERATION_FINISH_1 >= 178 +# define BOOST_PP_ITERATION_1 178 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 179 && BOOST_PP_ITERATION_FINISH_1 >= 179 +# define BOOST_PP_ITERATION_1 179 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 180 && BOOST_PP_ITERATION_FINISH_1 >= 180 +# define BOOST_PP_ITERATION_1 180 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 181 && BOOST_PP_ITERATION_FINISH_1 >= 181 +# define BOOST_PP_ITERATION_1 181 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 182 && BOOST_PP_ITERATION_FINISH_1 >= 182 +# define BOOST_PP_ITERATION_1 182 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 183 && BOOST_PP_ITERATION_FINISH_1 >= 183 +# define BOOST_PP_ITERATION_1 183 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 184 && BOOST_PP_ITERATION_FINISH_1 >= 184 +# define BOOST_PP_ITERATION_1 184 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 185 && BOOST_PP_ITERATION_FINISH_1 >= 185 +# define BOOST_PP_ITERATION_1 185 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 186 && BOOST_PP_ITERATION_FINISH_1 >= 186 +# define BOOST_PP_ITERATION_1 186 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 187 && BOOST_PP_ITERATION_FINISH_1 >= 187 +# define BOOST_PP_ITERATION_1 187 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 188 && BOOST_PP_ITERATION_FINISH_1 >= 188 +# define BOOST_PP_ITERATION_1 188 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 189 && BOOST_PP_ITERATION_FINISH_1 >= 189 +# define BOOST_PP_ITERATION_1 189 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 190 && BOOST_PP_ITERATION_FINISH_1 >= 190 +# define BOOST_PP_ITERATION_1 190 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 191 && BOOST_PP_ITERATION_FINISH_1 >= 191 +# define BOOST_PP_ITERATION_1 191 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 192 && BOOST_PP_ITERATION_FINISH_1 >= 192 +# define BOOST_PP_ITERATION_1 192 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 193 && BOOST_PP_ITERATION_FINISH_1 >= 193 +# define BOOST_PP_ITERATION_1 193 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 194 && BOOST_PP_ITERATION_FINISH_1 >= 194 +# define BOOST_PP_ITERATION_1 194 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 195 && BOOST_PP_ITERATION_FINISH_1 >= 195 +# define BOOST_PP_ITERATION_1 195 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 196 && BOOST_PP_ITERATION_FINISH_1 >= 196 +# define BOOST_PP_ITERATION_1 196 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 197 && BOOST_PP_ITERATION_FINISH_1 >= 197 +# define BOOST_PP_ITERATION_1 197 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 198 && BOOST_PP_ITERATION_FINISH_1 >= 198 +# define BOOST_PP_ITERATION_1 198 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 199 && BOOST_PP_ITERATION_FINISH_1 >= 199 +# define BOOST_PP_ITERATION_1 199 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 200 && BOOST_PP_ITERATION_FINISH_1 >= 200 +# define BOOST_PP_ITERATION_1 200 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 201 && BOOST_PP_ITERATION_FINISH_1 >= 201 +# define BOOST_PP_ITERATION_1 201 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 202 && BOOST_PP_ITERATION_FINISH_1 >= 202 +# define BOOST_PP_ITERATION_1 202 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 203 && BOOST_PP_ITERATION_FINISH_1 >= 203 +# define BOOST_PP_ITERATION_1 203 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 204 && BOOST_PP_ITERATION_FINISH_1 >= 204 +# define BOOST_PP_ITERATION_1 204 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 205 && BOOST_PP_ITERATION_FINISH_1 >= 205 +# define BOOST_PP_ITERATION_1 205 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 206 && BOOST_PP_ITERATION_FINISH_1 >= 206 +# define BOOST_PP_ITERATION_1 206 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 207 && BOOST_PP_ITERATION_FINISH_1 >= 207 +# define BOOST_PP_ITERATION_1 207 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 208 && BOOST_PP_ITERATION_FINISH_1 >= 208 +# define BOOST_PP_ITERATION_1 208 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 209 && BOOST_PP_ITERATION_FINISH_1 >= 209 +# define BOOST_PP_ITERATION_1 209 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 210 && BOOST_PP_ITERATION_FINISH_1 >= 210 +# define BOOST_PP_ITERATION_1 210 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 211 && BOOST_PP_ITERATION_FINISH_1 >= 211 +# define BOOST_PP_ITERATION_1 211 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 212 && BOOST_PP_ITERATION_FINISH_1 >= 212 +# define BOOST_PP_ITERATION_1 212 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 213 && BOOST_PP_ITERATION_FINISH_1 >= 213 +# define BOOST_PP_ITERATION_1 213 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 214 && BOOST_PP_ITERATION_FINISH_1 >= 214 +# define BOOST_PP_ITERATION_1 214 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 215 && BOOST_PP_ITERATION_FINISH_1 >= 215 +# define BOOST_PP_ITERATION_1 215 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 216 && BOOST_PP_ITERATION_FINISH_1 >= 216 +# define BOOST_PP_ITERATION_1 216 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 217 && BOOST_PP_ITERATION_FINISH_1 >= 217 +# define BOOST_PP_ITERATION_1 217 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 218 && BOOST_PP_ITERATION_FINISH_1 >= 218 +# define BOOST_PP_ITERATION_1 218 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 219 && BOOST_PP_ITERATION_FINISH_1 >= 219 +# define BOOST_PP_ITERATION_1 219 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 220 && BOOST_PP_ITERATION_FINISH_1 >= 220 +# define BOOST_PP_ITERATION_1 220 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 221 && BOOST_PP_ITERATION_FINISH_1 >= 221 +# define BOOST_PP_ITERATION_1 221 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 222 && BOOST_PP_ITERATION_FINISH_1 >= 222 +# define BOOST_PP_ITERATION_1 222 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 223 && BOOST_PP_ITERATION_FINISH_1 >= 223 +# define BOOST_PP_ITERATION_1 223 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 224 && BOOST_PP_ITERATION_FINISH_1 >= 224 +# define BOOST_PP_ITERATION_1 224 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 225 && BOOST_PP_ITERATION_FINISH_1 >= 225 +# define BOOST_PP_ITERATION_1 225 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 226 && BOOST_PP_ITERATION_FINISH_1 >= 226 +# define BOOST_PP_ITERATION_1 226 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 227 && BOOST_PP_ITERATION_FINISH_1 >= 227 +# define BOOST_PP_ITERATION_1 227 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 228 && BOOST_PP_ITERATION_FINISH_1 >= 228 +# define BOOST_PP_ITERATION_1 228 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 229 && BOOST_PP_ITERATION_FINISH_1 >= 229 +# define BOOST_PP_ITERATION_1 229 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 230 && BOOST_PP_ITERATION_FINISH_1 >= 230 +# define BOOST_PP_ITERATION_1 230 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 231 && BOOST_PP_ITERATION_FINISH_1 >= 231 +# define BOOST_PP_ITERATION_1 231 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 232 && BOOST_PP_ITERATION_FINISH_1 >= 232 +# define BOOST_PP_ITERATION_1 232 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 233 && BOOST_PP_ITERATION_FINISH_1 >= 233 +# define BOOST_PP_ITERATION_1 233 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 234 && BOOST_PP_ITERATION_FINISH_1 >= 234 +# define BOOST_PP_ITERATION_1 234 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 235 && BOOST_PP_ITERATION_FINISH_1 >= 235 +# define BOOST_PP_ITERATION_1 235 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 236 && BOOST_PP_ITERATION_FINISH_1 >= 236 +# define BOOST_PP_ITERATION_1 236 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 237 && BOOST_PP_ITERATION_FINISH_1 >= 237 +# define BOOST_PP_ITERATION_1 237 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 238 && BOOST_PP_ITERATION_FINISH_1 >= 238 +# define BOOST_PP_ITERATION_1 238 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 239 && BOOST_PP_ITERATION_FINISH_1 >= 239 +# define BOOST_PP_ITERATION_1 239 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 240 && BOOST_PP_ITERATION_FINISH_1 >= 240 +# define BOOST_PP_ITERATION_1 240 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 241 && BOOST_PP_ITERATION_FINISH_1 >= 241 +# define BOOST_PP_ITERATION_1 241 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 242 && BOOST_PP_ITERATION_FINISH_1 >= 242 +# define BOOST_PP_ITERATION_1 242 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 243 && BOOST_PP_ITERATION_FINISH_1 >= 243 +# define BOOST_PP_ITERATION_1 243 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 244 && BOOST_PP_ITERATION_FINISH_1 >= 244 +# define BOOST_PP_ITERATION_1 244 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 245 && BOOST_PP_ITERATION_FINISH_1 >= 245 +# define BOOST_PP_ITERATION_1 245 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 246 && BOOST_PP_ITERATION_FINISH_1 >= 246 +# define BOOST_PP_ITERATION_1 246 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 247 && BOOST_PP_ITERATION_FINISH_1 >= 247 +# define BOOST_PP_ITERATION_1 247 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 248 && BOOST_PP_ITERATION_FINISH_1 >= 248 +# define BOOST_PP_ITERATION_1 248 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 249 && BOOST_PP_ITERATION_FINISH_1 >= 249 +# define BOOST_PP_ITERATION_1 249 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 250 && BOOST_PP_ITERATION_FINISH_1 >= 250 +# define BOOST_PP_ITERATION_1 250 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 251 && BOOST_PP_ITERATION_FINISH_1 >= 251 +# define BOOST_PP_ITERATION_1 251 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 252 && BOOST_PP_ITERATION_FINISH_1 >= 252 +# define BOOST_PP_ITERATION_1 252 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 253 && BOOST_PP_ITERATION_FINISH_1 >= 253 +# define BOOST_PP_ITERATION_1 253 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 254 && BOOST_PP_ITERATION_FINISH_1 >= 254 +# define BOOST_PP_ITERATION_1 254 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 255 && BOOST_PP_ITERATION_FINISH_1 >= 255 +# define BOOST_PP_ITERATION_1 255 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 256 && BOOST_PP_ITERATION_FINISH_1 >= 256 +# define BOOST_PP_ITERATION_1 256 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# endif +# +# undef BOOST_PP_IS_ITERATING +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 0 +# +# undef BOOST_PP_ITERATION_START_1 +# undef BOOST_PP_ITERATION_FINISH_1 +# undef BOOST_PP_FILENAME_1 +# +# undef BOOST_PP_ITERATION_FLAGS_1 +# undef BOOST_PP_ITERATION_PARAMS_1 diff --git a/contrib/src/boost/preprocessor/iteration/detail/iter/forward2.hpp b/contrib/src/boost/preprocessor/iteration/detail/iter/forward2.hpp new file mode 100644 index 0000000..e61a329 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/iter/forward2.hpp @@ -0,0 +1,1338 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if defined(BOOST_PP_ITERATION_LIMITS) +# if !defined(BOOST_PP_FILENAME_2) +# error BOOST_PP_ERROR: depth #2 filename is not defined +# endif +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_ITERATION_FLAGS_2() 0 +# undef BOOST_PP_ITERATION_LIMITS +# elif defined(BOOST_PP_ITERATION_PARAMS_2) +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_2) +# include +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_2) +# include +# define BOOST_PP_FILENAME_2 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_2) +# if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_2) >= 4 +# define BOOST_PP_ITERATION_FLAGS_2() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_2) +# else +# define BOOST_PP_ITERATION_FLAGS_2() 0 +# endif +# else +# error BOOST_PP_ERROR: depth #2 iteration boundaries or filename not defined +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 2 +# +# if (BOOST_PP_ITERATION_START_2) > (BOOST_PP_ITERATION_FINISH_2) +# include +# else +# if BOOST_PP_ITERATION_START_2 <= 0 && BOOST_PP_ITERATION_FINISH_2 >= 0 +# define BOOST_PP_ITERATION_2 0 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 1 && BOOST_PP_ITERATION_FINISH_2 >= 1 +# define BOOST_PP_ITERATION_2 1 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 2 && BOOST_PP_ITERATION_FINISH_2 >= 2 +# define BOOST_PP_ITERATION_2 2 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 3 && BOOST_PP_ITERATION_FINISH_2 >= 3 +# define BOOST_PP_ITERATION_2 3 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 4 && BOOST_PP_ITERATION_FINISH_2 >= 4 +# define BOOST_PP_ITERATION_2 4 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 5 && BOOST_PP_ITERATION_FINISH_2 >= 5 +# define BOOST_PP_ITERATION_2 5 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 6 && BOOST_PP_ITERATION_FINISH_2 >= 6 +# define BOOST_PP_ITERATION_2 6 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 7 && BOOST_PP_ITERATION_FINISH_2 >= 7 +# define BOOST_PP_ITERATION_2 7 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 8 && BOOST_PP_ITERATION_FINISH_2 >= 8 +# define BOOST_PP_ITERATION_2 8 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 9 && BOOST_PP_ITERATION_FINISH_2 >= 9 +# define BOOST_PP_ITERATION_2 9 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 10 && BOOST_PP_ITERATION_FINISH_2 >= 10 +# define BOOST_PP_ITERATION_2 10 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 11 && BOOST_PP_ITERATION_FINISH_2 >= 11 +# define BOOST_PP_ITERATION_2 11 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 12 && BOOST_PP_ITERATION_FINISH_2 >= 12 +# define BOOST_PP_ITERATION_2 12 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 13 && BOOST_PP_ITERATION_FINISH_2 >= 13 +# define BOOST_PP_ITERATION_2 13 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 14 && BOOST_PP_ITERATION_FINISH_2 >= 14 +# define BOOST_PP_ITERATION_2 14 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 15 && BOOST_PP_ITERATION_FINISH_2 >= 15 +# define BOOST_PP_ITERATION_2 15 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 16 && BOOST_PP_ITERATION_FINISH_2 >= 16 +# define BOOST_PP_ITERATION_2 16 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 17 && BOOST_PP_ITERATION_FINISH_2 >= 17 +# define BOOST_PP_ITERATION_2 17 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 18 && BOOST_PP_ITERATION_FINISH_2 >= 18 +# define BOOST_PP_ITERATION_2 18 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 19 && BOOST_PP_ITERATION_FINISH_2 >= 19 +# define BOOST_PP_ITERATION_2 19 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 20 && BOOST_PP_ITERATION_FINISH_2 >= 20 +# define BOOST_PP_ITERATION_2 20 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 21 && BOOST_PP_ITERATION_FINISH_2 >= 21 +# define BOOST_PP_ITERATION_2 21 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 22 && BOOST_PP_ITERATION_FINISH_2 >= 22 +# define BOOST_PP_ITERATION_2 22 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 23 && BOOST_PP_ITERATION_FINISH_2 >= 23 +# define BOOST_PP_ITERATION_2 23 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 24 && BOOST_PP_ITERATION_FINISH_2 >= 24 +# define BOOST_PP_ITERATION_2 24 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 25 && BOOST_PP_ITERATION_FINISH_2 >= 25 +# define BOOST_PP_ITERATION_2 25 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 26 && BOOST_PP_ITERATION_FINISH_2 >= 26 +# define BOOST_PP_ITERATION_2 26 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 27 && BOOST_PP_ITERATION_FINISH_2 >= 27 +# define BOOST_PP_ITERATION_2 27 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 28 && BOOST_PP_ITERATION_FINISH_2 >= 28 +# define BOOST_PP_ITERATION_2 28 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 29 && BOOST_PP_ITERATION_FINISH_2 >= 29 +# define BOOST_PP_ITERATION_2 29 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 30 && BOOST_PP_ITERATION_FINISH_2 >= 30 +# define BOOST_PP_ITERATION_2 30 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 31 && BOOST_PP_ITERATION_FINISH_2 >= 31 +# define BOOST_PP_ITERATION_2 31 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 32 && BOOST_PP_ITERATION_FINISH_2 >= 32 +# define BOOST_PP_ITERATION_2 32 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 33 && BOOST_PP_ITERATION_FINISH_2 >= 33 +# define BOOST_PP_ITERATION_2 33 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 34 && BOOST_PP_ITERATION_FINISH_2 >= 34 +# define BOOST_PP_ITERATION_2 34 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 35 && BOOST_PP_ITERATION_FINISH_2 >= 35 +# define BOOST_PP_ITERATION_2 35 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 36 && BOOST_PP_ITERATION_FINISH_2 >= 36 +# define BOOST_PP_ITERATION_2 36 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 37 && BOOST_PP_ITERATION_FINISH_2 >= 37 +# define BOOST_PP_ITERATION_2 37 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 38 && BOOST_PP_ITERATION_FINISH_2 >= 38 +# define BOOST_PP_ITERATION_2 38 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 39 && BOOST_PP_ITERATION_FINISH_2 >= 39 +# define BOOST_PP_ITERATION_2 39 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 40 && BOOST_PP_ITERATION_FINISH_2 >= 40 +# define BOOST_PP_ITERATION_2 40 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 41 && BOOST_PP_ITERATION_FINISH_2 >= 41 +# define BOOST_PP_ITERATION_2 41 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 42 && BOOST_PP_ITERATION_FINISH_2 >= 42 +# define BOOST_PP_ITERATION_2 42 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 43 && BOOST_PP_ITERATION_FINISH_2 >= 43 +# define BOOST_PP_ITERATION_2 43 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 44 && BOOST_PP_ITERATION_FINISH_2 >= 44 +# define BOOST_PP_ITERATION_2 44 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 45 && BOOST_PP_ITERATION_FINISH_2 >= 45 +# define BOOST_PP_ITERATION_2 45 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 46 && BOOST_PP_ITERATION_FINISH_2 >= 46 +# define BOOST_PP_ITERATION_2 46 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 47 && BOOST_PP_ITERATION_FINISH_2 >= 47 +# define BOOST_PP_ITERATION_2 47 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 48 && BOOST_PP_ITERATION_FINISH_2 >= 48 +# define BOOST_PP_ITERATION_2 48 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 49 && BOOST_PP_ITERATION_FINISH_2 >= 49 +# define BOOST_PP_ITERATION_2 49 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 50 && BOOST_PP_ITERATION_FINISH_2 >= 50 +# define BOOST_PP_ITERATION_2 50 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 51 && BOOST_PP_ITERATION_FINISH_2 >= 51 +# define BOOST_PP_ITERATION_2 51 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 52 && BOOST_PP_ITERATION_FINISH_2 >= 52 +# define BOOST_PP_ITERATION_2 52 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 53 && BOOST_PP_ITERATION_FINISH_2 >= 53 +# define BOOST_PP_ITERATION_2 53 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 54 && BOOST_PP_ITERATION_FINISH_2 >= 54 +# define BOOST_PP_ITERATION_2 54 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 55 && BOOST_PP_ITERATION_FINISH_2 >= 55 +# define BOOST_PP_ITERATION_2 55 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 56 && BOOST_PP_ITERATION_FINISH_2 >= 56 +# define BOOST_PP_ITERATION_2 56 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 57 && BOOST_PP_ITERATION_FINISH_2 >= 57 +# define BOOST_PP_ITERATION_2 57 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 58 && BOOST_PP_ITERATION_FINISH_2 >= 58 +# define BOOST_PP_ITERATION_2 58 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 59 && BOOST_PP_ITERATION_FINISH_2 >= 59 +# define BOOST_PP_ITERATION_2 59 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 60 && BOOST_PP_ITERATION_FINISH_2 >= 60 +# define BOOST_PP_ITERATION_2 60 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 61 && BOOST_PP_ITERATION_FINISH_2 >= 61 +# define BOOST_PP_ITERATION_2 61 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 62 && BOOST_PP_ITERATION_FINISH_2 >= 62 +# define BOOST_PP_ITERATION_2 62 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 63 && BOOST_PP_ITERATION_FINISH_2 >= 63 +# define BOOST_PP_ITERATION_2 63 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 64 && BOOST_PP_ITERATION_FINISH_2 >= 64 +# define BOOST_PP_ITERATION_2 64 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 65 && BOOST_PP_ITERATION_FINISH_2 >= 65 +# define BOOST_PP_ITERATION_2 65 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 66 && BOOST_PP_ITERATION_FINISH_2 >= 66 +# define BOOST_PP_ITERATION_2 66 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 67 && BOOST_PP_ITERATION_FINISH_2 >= 67 +# define BOOST_PP_ITERATION_2 67 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 68 && BOOST_PP_ITERATION_FINISH_2 >= 68 +# define BOOST_PP_ITERATION_2 68 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 69 && BOOST_PP_ITERATION_FINISH_2 >= 69 +# define BOOST_PP_ITERATION_2 69 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 70 && BOOST_PP_ITERATION_FINISH_2 >= 70 +# define BOOST_PP_ITERATION_2 70 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 71 && BOOST_PP_ITERATION_FINISH_2 >= 71 +# define BOOST_PP_ITERATION_2 71 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 72 && BOOST_PP_ITERATION_FINISH_2 >= 72 +# define BOOST_PP_ITERATION_2 72 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 73 && BOOST_PP_ITERATION_FINISH_2 >= 73 +# define BOOST_PP_ITERATION_2 73 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 74 && BOOST_PP_ITERATION_FINISH_2 >= 74 +# define BOOST_PP_ITERATION_2 74 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 75 && BOOST_PP_ITERATION_FINISH_2 >= 75 +# define BOOST_PP_ITERATION_2 75 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 76 && BOOST_PP_ITERATION_FINISH_2 >= 76 +# define BOOST_PP_ITERATION_2 76 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 77 && BOOST_PP_ITERATION_FINISH_2 >= 77 +# define BOOST_PP_ITERATION_2 77 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 78 && BOOST_PP_ITERATION_FINISH_2 >= 78 +# define BOOST_PP_ITERATION_2 78 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 79 && BOOST_PP_ITERATION_FINISH_2 >= 79 +# define BOOST_PP_ITERATION_2 79 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 80 && BOOST_PP_ITERATION_FINISH_2 >= 80 +# define BOOST_PP_ITERATION_2 80 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 81 && BOOST_PP_ITERATION_FINISH_2 >= 81 +# define BOOST_PP_ITERATION_2 81 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 82 && BOOST_PP_ITERATION_FINISH_2 >= 82 +# define BOOST_PP_ITERATION_2 82 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 83 && BOOST_PP_ITERATION_FINISH_2 >= 83 +# define BOOST_PP_ITERATION_2 83 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 84 && BOOST_PP_ITERATION_FINISH_2 >= 84 +# define BOOST_PP_ITERATION_2 84 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 85 && BOOST_PP_ITERATION_FINISH_2 >= 85 +# define BOOST_PP_ITERATION_2 85 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 86 && BOOST_PP_ITERATION_FINISH_2 >= 86 +# define BOOST_PP_ITERATION_2 86 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 87 && BOOST_PP_ITERATION_FINISH_2 >= 87 +# define BOOST_PP_ITERATION_2 87 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 88 && BOOST_PP_ITERATION_FINISH_2 >= 88 +# define BOOST_PP_ITERATION_2 88 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 89 && BOOST_PP_ITERATION_FINISH_2 >= 89 +# define BOOST_PP_ITERATION_2 89 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 90 && BOOST_PP_ITERATION_FINISH_2 >= 90 +# define BOOST_PP_ITERATION_2 90 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 91 && BOOST_PP_ITERATION_FINISH_2 >= 91 +# define BOOST_PP_ITERATION_2 91 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 92 && BOOST_PP_ITERATION_FINISH_2 >= 92 +# define BOOST_PP_ITERATION_2 92 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 93 && BOOST_PP_ITERATION_FINISH_2 >= 93 +# define BOOST_PP_ITERATION_2 93 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 94 && BOOST_PP_ITERATION_FINISH_2 >= 94 +# define BOOST_PP_ITERATION_2 94 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 95 && BOOST_PP_ITERATION_FINISH_2 >= 95 +# define BOOST_PP_ITERATION_2 95 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 96 && BOOST_PP_ITERATION_FINISH_2 >= 96 +# define BOOST_PP_ITERATION_2 96 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 97 && BOOST_PP_ITERATION_FINISH_2 >= 97 +# define BOOST_PP_ITERATION_2 97 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 98 && BOOST_PP_ITERATION_FINISH_2 >= 98 +# define BOOST_PP_ITERATION_2 98 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 99 && BOOST_PP_ITERATION_FINISH_2 >= 99 +# define BOOST_PP_ITERATION_2 99 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 100 && BOOST_PP_ITERATION_FINISH_2 >= 100 +# define BOOST_PP_ITERATION_2 100 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 101 && BOOST_PP_ITERATION_FINISH_2 >= 101 +# define BOOST_PP_ITERATION_2 101 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 102 && BOOST_PP_ITERATION_FINISH_2 >= 102 +# define BOOST_PP_ITERATION_2 102 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 103 && BOOST_PP_ITERATION_FINISH_2 >= 103 +# define BOOST_PP_ITERATION_2 103 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 104 && BOOST_PP_ITERATION_FINISH_2 >= 104 +# define BOOST_PP_ITERATION_2 104 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 105 && BOOST_PP_ITERATION_FINISH_2 >= 105 +# define BOOST_PP_ITERATION_2 105 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 106 && BOOST_PP_ITERATION_FINISH_2 >= 106 +# define BOOST_PP_ITERATION_2 106 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 107 && BOOST_PP_ITERATION_FINISH_2 >= 107 +# define BOOST_PP_ITERATION_2 107 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 108 && BOOST_PP_ITERATION_FINISH_2 >= 108 +# define BOOST_PP_ITERATION_2 108 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 109 && BOOST_PP_ITERATION_FINISH_2 >= 109 +# define BOOST_PP_ITERATION_2 109 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 110 && BOOST_PP_ITERATION_FINISH_2 >= 110 +# define BOOST_PP_ITERATION_2 110 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 111 && BOOST_PP_ITERATION_FINISH_2 >= 111 +# define BOOST_PP_ITERATION_2 111 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 112 && BOOST_PP_ITERATION_FINISH_2 >= 112 +# define BOOST_PP_ITERATION_2 112 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 113 && BOOST_PP_ITERATION_FINISH_2 >= 113 +# define BOOST_PP_ITERATION_2 113 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 114 && BOOST_PP_ITERATION_FINISH_2 >= 114 +# define BOOST_PP_ITERATION_2 114 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 115 && BOOST_PP_ITERATION_FINISH_2 >= 115 +# define BOOST_PP_ITERATION_2 115 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 116 && BOOST_PP_ITERATION_FINISH_2 >= 116 +# define BOOST_PP_ITERATION_2 116 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 117 && BOOST_PP_ITERATION_FINISH_2 >= 117 +# define BOOST_PP_ITERATION_2 117 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 118 && BOOST_PP_ITERATION_FINISH_2 >= 118 +# define BOOST_PP_ITERATION_2 118 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 119 && BOOST_PP_ITERATION_FINISH_2 >= 119 +# define BOOST_PP_ITERATION_2 119 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 120 && BOOST_PP_ITERATION_FINISH_2 >= 120 +# define BOOST_PP_ITERATION_2 120 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 121 && BOOST_PP_ITERATION_FINISH_2 >= 121 +# define BOOST_PP_ITERATION_2 121 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 122 && BOOST_PP_ITERATION_FINISH_2 >= 122 +# define BOOST_PP_ITERATION_2 122 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 123 && BOOST_PP_ITERATION_FINISH_2 >= 123 +# define BOOST_PP_ITERATION_2 123 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 124 && BOOST_PP_ITERATION_FINISH_2 >= 124 +# define BOOST_PP_ITERATION_2 124 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 125 && BOOST_PP_ITERATION_FINISH_2 >= 125 +# define BOOST_PP_ITERATION_2 125 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 126 && BOOST_PP_ITERATION_FINISH_2 >= 126 +# define BOOST_PP_ITERATION_2 126 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 127 && BOOST_PP_ITERATION_FINISH_2 >= 127 +# define BOOST_PP_ITERATION_2 127 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 128 && BOOST_PP_ITERATION_FINISH_2 >= 128 +# define BOOST_PP_ITERATION_2 128 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 129 && BOOST_PP_ITERATION_FINISH_2 >= 129 +# define BOOST_PP_ITERATION_2 129 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 130 && BOOST_PP_ITERATION_FINISH_2 >= 130 +# define BOOST_PP_ITERATION_2 130 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 131 && BOOST_PP_ITERATION_FINISH_2 >= 131 +# define BOOST_PP_ITERATION_2 131 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 132 && BOOST_PP_ITERATION_FINISH_2 >= 132 +# define BOOST_PP_ITERATION_2 132 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 133 && BOOST_PP_ITERATION_FINISH_2 >= 133 +# define BOOST_PP_ITERATION_2 133 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 134 && BOOST_PP_ITERATION_FINISH_2 >= 134 +# define BOOST_PP_ITERATION_2 134 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 135 && BOOST_PP_ITERATION_FINISH_2 >= 135 +# define BOOST_PP_ITERATION_2 135 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 136 && BOOST_PP_ITERATION_FINISH_2 >= 136 +# define BOOST_PP_ITERATION_2 136 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 137 && BOOST_PP_ITERATION_FINISH_2 >= 137 +# define BOOST_PP_ITERATION_2 137 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 138 && BOOST_PP_ITERATION_FINISH_2 >= 138 +# define BOOST_PP_ITERATION_2 138 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 139 && BOOST_PP_ITERATION_FINISH_2 >= 139 +# define BOOST_PP_ITERATION_2 139 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 140 && BOOST_PP_ITERATION_FINISH_2 >= 140 +# define BOOST_PP_ITERATION_2 140 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 141 && BOOST_PP_ITERATION_FINISH_2 >= 141 +# define BOOST_PP_ITERATION_2 141 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 142 && BOOST_PP_ITERATION_FINISH_2 >= 142 +# define BOOST_PP_ITERATION_2 142 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 143 && BOOST_PP_ITERATION_FINISH_2 >= 143 +# define BOOST_PP_ITERATION_2 143 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 144 && BOOST_PP_ITERATION_FINISH_2 >= 144 +# define BOOST_PP_ITERATION_2 144 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 145 && BOOST_PP_ITERATION_FINISH_2 >= 145 +# define BOOST_PP_ITERATION_2 145 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 146 && BOOST_PP_ITERATION_FINISH_2 >= 146 +# define BOOST_PP_ITERATION_2 146 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 147 && BOOST_PP_ITERATION_FINISH_2 >= 147 +# define BOOST_PP_ITERATION_2 147 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 148 && BOOST_PP_ITERATION_FINISH_2 >= 148 +# define BOOST_PP_ITERATION_2 148 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 149 && BOOST_PP_ITERATION_FINISH_2 >= 149 +# define BOOST_PP_ITERATION_2 149 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 150 && BOOST_PP_ITERATION_FINISH_2 >= 150 +# define BOOST_PP_ITERATION_2 150 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 151 && BOOST_PP_ITERATION_FINISH_2 >= 151 +# define BOOST_PP_ITERATION_2 151 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 152 && BOOST_PP_ITERATION_FINISH_2 >= 152 +# define BOOST_PP_ITERATION_2 152 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 153 && BOOST_PP_ITERATION_FINISH_2 >= 153 +# define BOOST_PP_ITERATION_2 153 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 154 && BOOST_PP_ITERATION_FINISH_2 >= 154 +# define BOOST_PP_ITERATION_2 154 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 155 && BOOST_PP_ITERATION_FINISH_2 >= 155 +# define BOOST_PP_ITERATION_2 155 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 156 && BOOST_PP_ITERATION_FINISH_2 >= 156 +# define BOOST_PP_ITERATION_2 156 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 157 && BOOST_PP_ITERATION_FINISH_2 >= 157 +# define BOOST_PP_ITERATION_2 157 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 158 && BOOST_PP_ITERATION_FINISH_2 >= 158 +# define BOOST_PP_ITERATION_2 158 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 159 && BOOST_PP_ITERATION_FINISH_2 >= 159 +# define BOOST_PP_ITERATION_2 159 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 160 && BOOST_PP_ITERATION_FINISH_2 >= 160 +# define BOOST_PP_ITERATION_2 160 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 161 && BOOST_PP_ITERATION_FINISH_2 >= 161 +# define BOOST_PP_ITERATION_2 161 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 162 && BOOST_PP_ITERATION_FINISH_2 >= 162 +# define BOOST_PP_ITERATION_2 162 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 163 && BOOST_PP_ITERATION_FINISH_2 >= 163 +# define BOOST_PP_ITERATION_2 163 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 164 && BOOST_PP_ITERATION_FINISH_2 >= 164 +# define BOOST_PP_ITERATION_2 164 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 165 && BOOST_PP_ITERATION_FINISH_2 >= 165 +# define BOOST_PP_ITERATION_2 165 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 166 && BOOST_PP_ITERATION_FINISH_2 >= 166 +# define BOOST_PP_ITERATION_2 166 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 167 && BOOST_PP_ITERATION_FINISH_2 >= 167 +# define BOOST_PP_ITERATION_2 167 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 168 && BOOST_PP_ITERATION_FINISH_2 >= 168 +# define BOOST_PP_ITERATION_2 168 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 169 && BOOST_PP_ITERATION_FINISH_2 >= 169 +# define BOOST_PP_ITERATION_2 169 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 170 && BOOST_PP_ITERATION_FINISH_2 >= 170 +# define BOOST_PP_ITERATION_2 170 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 171 && BOOST_PP_ITERATION_FINISH_2 >= 171 +# define BOOST_PP_ITERATION_2 171 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 172 && BOOST_PP_ITERATION_FINISH_2 >= 172 +# define BOOST_PP_ITERATION_2 172 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 173 && BOOST_PP_ITERATION_FINISH_2 >= 173 +# define BOOST_PP_ITERATION_2 173 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 174 && BOOST_PP_ITERATION_FINISH_2 >= 174 +# define BOOST_PP_ITERATION_2 174 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 175 && BOOST_PP_ITERATION_FINISH_2 >= 175 +# define BOOST_PP_ITERATION_2 175 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 176 && BOOST_PP_ITERATION_FINISH_2 >= 176 +# define BOOST_PP_ITERATION_2 176 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 177 && BOOST_PP_ITERATION_FINISH_2 >= 177 +# define BOOST_PP_ITERATION_2 177 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 178 && BOOST_PP_ITERATION_FINISH_2 >= 178 +# define BOOST_PP_ITERATION_2 178 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 179 && BOOST_PP_ITERATION_FINISH_2 >= 179 +# define BOOST_PP_ITERATION_2 179 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 180 && BOOST_PP_ITERATION_FINISH_2 >= 180 +# define BOOST_PP_ITERATION_2 180 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 181 && BOOST_PP_ITERATION_FINISH_2 >= 181 +# define BOOST_PP_ITERATION_2 181 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 182 && BOOST_PP_ITERATION_FINISH_2 >= 182 +# define BOOST_PP_ITERATION_2 182 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 183 && BOOST_PP_ITERATION_FINISH_2 >= 183 +# define BOOST_PP_ITERATION_2 183 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 184 && BOOST_PP_ITERATION_FINISH_2 >= 184 +# define BOOST_PP_ITERATION_2 184 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 185 && BOOST_PP_ITERATION_FINISH_2 >= 185 +# define BOOST_PP_ITERATION_2 185 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 186 && BOOST_PP_ITERATION_FINISH_2 >= 186 +# define BOOST_PP_ITERATION_2 186 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 187 && BOOST_PP_ITERATION_FINISH_2 >= 187 +# define BOOST_PP_ITERATION_2 187 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 188 && BOOST_PP_ITERATION_FINISH_2 >= 188 +# define BOOST_PP_ITERATION_2 188 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 189 && BOOST_PP_ITERATION_FINISH_2 >= 189 +# define BOOST_PP_ITERATION_2 189 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 190 && BOOST_PP_ITERATION_FINISH_2 >= 190 +# define BOOST_PP_ITERATION_2 190 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 191 && BOOST_PP_ITERATION_FINISH_2 >= 191 +# define BOOST_PP_ITERATION_2 191 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 192 && BOOST_PP_ITERATION_FINISH_2 >= 192 +# define BOOST_PP_ITERATION_2 192 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 193 && BOOST_PP_ITERATION_FINISH_2 >= 193 +# define BOOST_PP_ITERATION_2 193 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 194 && BOOST_PP_ITERATION_FINISH_2 >= 194 +# define BOOST_PP_ITERATION_2 194 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 195 && BOOST_PP_ITERATION_FINISH_2 >= 195 +# define BOOST_PP_ITERATION_2 195 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 196 && BOOST_PP_ITERATION_FINISH_2 >= 196 +# define BOOST_PP_ITERATION_2 196 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 197 && BOOST_PP_ITERATION_FINISH_2 >= 197 +# define BOOST_PP_ITERATION_2 197 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 198 && BOOST_PP_ITERATION_FINISH_2 >= 198 +# define BOOST_PP_ITERATION_2 198 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 199 && BOOST_PP_ITERATION_FINISH_2 >= 199 +# define BOOST_PP_ITERATION_2 199 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 200 && BOOST_PP_ITERATION_FINISH_2 >= 200 +# define BOOST_PP_ITERATION_2 200 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 201 && BOOST_PP_ITERATION_FINISH_2 >= 201 +# define BOOST_PP_ITERATION_2 201 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 202 && BOOST_PP_ITERATION_FINISH_2 >= 202 +# define BOOST_PP_ITERATION_2 202 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 203 && BOOST_PP_ITERATION_FINISH_2 >= 203 +# define BOOST_PP_ITERATION_2 203 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 204 && BOOST_PP_ITERATION_FINISH_2 >= 204 +# define BOOST_PP_ITERATION_2 204 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 205 && BOOST_PP_ITERATION_FINISH_2 >= 205 +# define BOOST_PP_ITERATION_2 205 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 206 && BOOST_PP_ITERATION_FINISH_2 >= 206 +# define BOOST_PP_ITERATION_2 206 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 207 && BOOST_PP_ITERATION_FINISH_2 >= 207 +# define BOOST_PP_ITERATION_2 207 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 208 && BOOST_PP_ITERATION_FINISH_2 >= 208 +# define BOOST_PP_ITERATION_2 208 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 209 && BOOST_PP_ITERATION_FINISH_2 >= 209 +# define BOOST_PP_ITERATION_2 209 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 210 && BOOST_PP_ITERATION_FINISH_2 >= 210 +# define BOOST_PP_ITERATION_2 210 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 211 && BOOST_PP_ITERATION_FINISH_2 >= 211 +# define BOOST_PP_ITERATION_2 211 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 212 && BOOST_PP_ITERATION_FINISH_2 >= 212 +# define BOOST_PP_ITERATION_2 212 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 213 && BOOST_PP_ITERATION_FINISH_2 >= 213 +# define BOOST_PP_ITERATION_2 213 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 214 && BOOST_PP_ITERATION_FINISH_2 >= 214 +# define BOOST_PP_ITERATION_2 214 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 215 && BOOST_PP_ITERATION_FINISH_2 >= 215 +# define BOOST_PP_ITERATION_2 215 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 216 && BOOST_PP_ITERATION_FINISH_2 >= 216 +# define BOOST_PP_ITERATION_2 216 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 217 && BOOST_PP_ITERATION_FINISH_2 >= 217 +# define BOOST_PP_ITERATION_2 217 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 218 && BOOST_PP_ITERATION_FINISH_2 >= 218 +# define BOOST_PP_ITERATION_2 218 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 219 && BOOST_PP_ITERATION_FINISH_2 >= 219 +# define BOOST_PP_ITERATION_2 219 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 220 && BOOST_PP_ITERATION_FINISH_2 >= 220 +# define BOOST_PP_ITERATION_2 220 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 221 && BOOST_PP_ITERATION_FINISH_2 >= 221 +# define BOOST_PP_ITERATION_2 221 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 222 && BOOST_PP_ITERATION_FINISH_2 >= 222 +# define BOOST_PP_ITERATION_2 222 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 223 && BOOST_PP_ITERATION_FINISH_2 >= 223 +# define BOOST_PP_ITERATION_2 223 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 224 && BOOST_PP_ITERATION_FINISH_2 >= 224 +# define BOOST_PP_ITERATION_2 224 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 225 && BOOST_PP_ITERATION_FINISH_2 >= 225 +# define BOOST_PP_ITERATION_2 225 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 226 && BOOST_PP_ITERATION_FINISH_2 >= 226 +# define BOOST_PP_ITERATION_2 226 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 227 && BOOST_PP_ITERATION_FINISH_2 >= 227 +# define BOOST_PP_ITERATION_2 227 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 228 && BOOST_PP_ITERATION_FINISH_2 >= 228 +# define BOOST_PP_ITERATION_2 228 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 229 && BOOST_PP_ITERATION_FINISH_2 >= 229 +# define BOOST_PP_ITERATION_2 229 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 230 && BOOST_PP_ITERATION_FINISH_2 >= 230 +# define BOOST_PP_ITERATION_2 230 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 231 && BOOST_PP_ITERATION_FINISH_2 >= 231 +# define BOOST_PP_ITERATION_2 231 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 232 && BOOST_PP_ITERATION_FINISH_2 >= 232 +# define BOOST_PP_ITERATION_2 232 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 233 && BOOST_PP_ITERATION_FINISH_2 >= 233 +# define BOOST_PP_ITERATION_2 233 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 234 && BOOST_PP_ITERATION_FINISH_2 >= 234 +# define BOOST_PP_ITERATION_2 234 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 235 && BOOST_PP_ITERATION_FINISH_2 >= 235 +# define BOOST_PP_ITERATION_2 235 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 236 && BOOST_PP_ITERATION_FINISH_2 >= 236 +# define BOOST_PP_ITERATION_2 236 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 237 && BOOST_PP_ITERATION_FINISH_2 >= 237 +# define BOOST_PP_ITERATION_2 237 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 238 && BOOST_PP_ITERATION_FINISH_2 >= 238 +# define BOOST_PP_ITERATION_2 238 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 239 && BOOST_PP_ITERATION_FINISH_2 >= 239 +# define BOOST_PP_ITERATION_2 239 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 240 && BOOST_PP_ITERATION_FINISH_2 >= 240 +# define BOOST_PP_ITERATION_2 240 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 241 && BOOST_PP_ITERATION_FINISH_2 >= 241 +# define BOOST_PP_ITERATION_2 241 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 242 && BOOST_PP_ITERATION_FINISH_2 >= 242 +# define BOOST_PP_ITERATION_2 242 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 243 && BOOST_PP_ITERATION_FINISH_2 >= 243 +# define BOOST_PP_ITERATION_2 243 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 244 && BOOST_PP_ITERATION_FINISH_2 >= 244 +# define BOOST_PP_ITERATION_2 244 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 245 && BOOST_PP_ITERATION_FINISH_2 >= 245 +# define BOOST_PP_ITERATION_2 245 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 246 && BOOST_PP_ITERATION_FINISH_2 >= 246 +# define BOOST_PP_ITERATION_2 246 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 247 && BOOST_PP_ITERATION_FINISH_2 >= 247 +# define BOOST_PP_ITERATION_2 247 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 248 && BOOST_PP_ITERATION_FINISH_2 >= 248 +# define BOOST_PP_ITERATION_2 248 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 249 && BOOST_PP_ITERATION_FINISH_2 >= 249 +# define BOOST_PP_ITERATION_2 249 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 250 && BOOST_PP_ITERATION_FINISH_2 >= 250 +# define BOOST_PP_ITERATION_2 250 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 251 && BOOST_PP_ITERATION_FINISH_2 >= 251 +# define BOOST_PP_ITERATION_2 251 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 252 && BOOST_PP_ITERATION_FINISH_2 >= 252 +# define BOOST_PP_ITERATION_2 252 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 253 && BOOST_PP_ITERATION_FINISH_2 >= 253 +# define BOOST_PP_ITERATION_2 253 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 254 && BOOST_PP_ITERATION_FINISH_2 >= 254 +# define BOOST_PP_ITERATION_2 254 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 255 && BOOST_PP_ITERATION_FINISH_2 >= 255 +# define BOOST_PP_ITERATION_2 255 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 256 && BOOST_PP_ITERATION_FINISH_2 >= 256 +# define BOOST_PP_ITERATION_2 256 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 1 +# +# undef BOOST_PP_ITERATION_START_2 +# undef BOOST_PP_ITERATION_FINISH_2 +# undef BOOST_PP_FILENAME_2 +# +# undef BOOST_PP_ITERATION_FLAGS_2 +# undef BOOST_PP_ITERATION_PARAMS_2 diff --git a/contrib/src/boost/preprocessor/iteration/detail/iter/forward3.hpp b/contrib/src/boost/preprocessor/iteration/detail/iter/forward3.hpp new file mode 100644 index 0000000..e68966f --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/iter/forward3.hpp @@ -0,0 +1,1338 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if defined(BOOST_PP_ITERATION_LIMITS) +# if !defined(BOOST_PP_FILENAME_3) +# error BOOST_PP_ERROR: depth #3 filename is not defined +# endif +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_ITERATION_FLAGS_3() 0 +# undef BOOST_PP_ITERATION_LIMITS +# elif defined(BOOST_PP_ITERATION_PARAMS_3) +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_3) +# include +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_3) +# include +# define BOOST_PP_FILENAME_3 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_3) +# if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_3) >= 4 +# define BOOST_PP_ITERATION_FLAGS_3() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_3) +# else +# define BOOST_PP_ITERATION_FLAGS_3() 0 +# endif +# else +# error BOOST_PP_ERROR: depth #3 iteration boundaries or filename not defined +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 3 +# +# if (BOOST_PP_ITERATION_START_3) > (BOOST_PP_ITERATION_FINISH_3) +# include +# else +# if BOOST_PP_ITERATION_START_3 <= 0 && BOOST_PP_ITERATION_FINISH_3 >= 0 +# define BOOST_PP_ITERATION_3 0 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 1 && BOOST_PP_ITERATION_FINISH_3 >= 1 +# define BOOST_PP_ITERATION_3 1 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 2 && BOOST_PP_ITERATION_FINISH_3 >= 2 +# define BOOST_PP_ITERATION_3 2 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 3 && BOOST_PP_ITERATION_FINISH_3 >= 3 +# define BOOST_PP_ITERATION_3 3 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 4 && BOOST_PP_ITERATION_FINISH_3 >= 4 +# define BOOST_PP_ITERATION_3 4 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 5 && BOOST_PP_ITERATION_FINISH_3 >= 5 +# define BOOST_PP_ITERATION_3 5 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 6 && BOOST_PP_ITERATION_FINISH_3 >= 6 +# define BOOST_PP_ITERATION_3 6 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 7 && BOOST_PP_ITERATION_FINISH_3 >= 7 +# define BOOST_PP_ITERATION_3 7 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 8 && BOOST_PP_ITERATION_FINISH_3 >= 8 +# define BOOST_PP_ITERATION_3 8 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 9 && BOOST_PP_ITERATION_FINISH_3 >= 9 +# define BOOST_PP_ITERATION_3 9 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 10 && BOOST_PP_ITERATION_FINISH_3 >= 10 +# define BOOST_PP_ITERATION_3 10 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 11 && BOOST_PP_ITERATION_FINISH_3 >= 11 +# define BOOST_PP_ITERATION_3 11 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 12 && BOOST_PP_ITERATION_FINISH_3 >= 12 +# define BOOST_PP_ITERATION_3 12 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 13 && BOOST_PP_ITERATION_FINISH_3 >= 13 +# define BOOST_PP_ITERATION_3 13 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 14 && BOOST_PP_ITERATION_FINISH_3 >= 14 +# define BOOST_PP_ITERATION_3 14 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 15 && BOOST_PP_ITERATION_FINISH_3 >= 15 +# define BOOST_PP_ITERATION_3 15 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 16 && BOOST_PP_ITERATION_FINISH_3 >= 16 +# define BOOST_PP_ITERATION_3 16 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 17 && BOOST_PP_ITERATION_FINISH_3 >= 17 +# define BOOST_PP_ITERATION_3 17 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 18 && BOOST_PP_ITERATION_FINISH_3 >= 18 +# define BOOST_PP_ITERATION_3 18 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 19 && BOOST_PP_ITERATION_FINISH_3 >= 19 +# define BOOST_PP_ITERATION_3 19 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 20 && BOOST_PP_ITERATION_FINISH_3 >= 20 +# define BOOST_PP_ITERATION_3 20 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 21 && BOOST_PP_ITERATION_FINISH_3 >= 21 +# define BOOST_PP_ITERATION_3 21 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 22 && BOOST_PP_ITERATION_FINISH_3 >= 22 +# define BOOST_PP_ITERATION_3 22 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 23 && BOOST_PP_ITERATION_FINISH_3 >= 23 +# define BOOST_PP_ITERATION_3 23 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 24 && BOOST_PP_ITERATION_FINISH_3 >= 24 +# define BOOST_PP_ITERATION_3 24 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 25 && BOOST_PP_ITERATION_FINISH_3 >= 25 +# define BOOST_PP_ITERATION_3 25 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 26 && BOOST_PP_ITERATION_FINISH_3 >= 26 +# define BOOST_PP_ITERATION_3 26 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 27 && BOOST_PP_ITERATION_FINISH_3 >= 27 +# define BOOST_PP_ITERATION_3 27 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 28 && BOOST_PP_ITERATION_FINISH_3 >= 28 +# define BOOST_PP_ITERATION_3 28 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 29 && BOOST_PP_ITERATION_FINISH_3 >= 29 +# define BOOST_PP_ITERATION_3 29 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 30 && BOOST_PP_ITERATION_FINISH_3 >= 30 +# define BOOST_PP_ITERATION_3 30 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 31 && BOOST_PP_ITERATION_FINISH_3 >= 31 +# define BOOST_PP_ITERATION_3 31 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 32 && BOOST_PP_ITERATION_FINISH_3 >= 32 +# define BOOST_PP_ITERATION_3 32 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 33 && BOOST_PP_ITERATION_FINISH_3 >= 33 +# define BOOST_PP_ITERATION_3 33 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 34 && BOOST_PP_ITERATION_FINISH_3 >= 34 +# define BOOST_PP_ITERATION_3 34 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 35 && BOOST_PP_ITERATION_FINISH_3 >= 35 +# define BOOST_PP_ITERATION_3 35 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 36 && BOOST_PP_ITERATION_FINISH_3 >= 36 +# define BOOST_PP_ITERATION_3 36 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 37 && BOOST_PP_ITERATION_FINISH_3 >= 37 +# define BOOST_PP_ITERATION_3 37 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 38 && BOOST_PP_ITERATION_FINISH_3 >= 38 +# define BOOST_PP_ITERATION_3 38 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 39 && BOOST_PP_ITERATION_FINISH_3 >= 39 +# define BOOST_PP_ITERATION_3 39 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 40 && BOOST_PP_ITERATION_FINISH_3 >= 40 +# define BOOST_PP_ITERATION_3 40 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 41 && BOOST_PP_ITERATION_FINISH_3 >= 41 +# define BOOST_PP_ITERATION_3 41 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 42 && BOOST_PP_ITERATION_FINISH_3 >= 42 +# define BOOST_PP_ITERATION_3 42 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 43 && BOOST_PP_ITERATION_FINISH_3 >= 43 +# define BOOST_PP_ITERATION_3 43 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 44 && BOOST_PP_ITERATION_FINISH_3 >= 44 +# define BOOST_PP_ITERATION_3 44 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 45 && BOOST_PP_ITERATION_FINISH_3 >= 45 +# define BOOST_PP_ITERATION_3 45 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 46 && BOOST_PP_ITERATION_FINISH_3 >= 46 +# define BOOST_PP_ITERATION_3 46 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 47 && BOOST_PP_ITERATION_FINISH_3 >= 47 +# define BOOST_PP_ITERATION_3 47 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 48 && BOOST_PP_ITERATION_FINISH_3 >= 48 +# define BOOST_PP_ITERATION_3 48 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 49 && BOOST_PP_ITERATION_FINISH_3 >= 49 +# define BOOST_PP_ITERATION_3 49 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 50 && BOOST_PP_ITERATION_FINISH_3 >= 50 +# define BOOST_PP_ITERATION_3 50 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 51 && BOOST_PP_ITERATION_FINISH_3 >= 51 +# define BOOST_PP_ITERATION_3 51 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 52 && BOOST_PP_ITERATION_FINISH_3 >= 52 +# define BOOST_PP_ITERATION_3 52 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 53 && BOOST_PP_ITERATION_FINISH_3 >= 53 +# define BOOST_PP_ITERATION_3 53 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 54 && BOOST_PP_ITERATION_FINISH_3 >= 54 +# define BOOST_PP_ITERATION_3 54 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 55 && BOOST_PP_ITERATION_FINISH_3 >= 55 +# define BOOST_PP_ITERATION_3 55 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 56 && BOOST_PP_ITERATION_FINISH_3 >= 56 +# define BOOST_PP_ITERATION_3 56 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 57 && BOOST_PP_ITERATION_FINISH_3 >= 57 +# define BOOST_PP_ITERATION_3 57 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 58 && BOOST_PP_ITERATION_FINISH_3 >= 58 +# define BOOST_PP_ITERATION_3 58 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 59 && BOOST_PP_ITERATION_FINISH_3 >= 59 +# define BOOST_PP_ITERATION_3 59 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 60 && BOOST_PP_ITERATION_FINISH_3 >= 60 +# define BOOST_PP_ITERATION_3 60 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 61 && BOOST_PP_ITERATION_FINISH_3 >= 61 +# define BOOST_PP_ITERATION_3 61 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 62 && BOOST_PP_ITERATION_FINISH_3 >= 62 +# define BOOST_PP_ITERATION_3 62 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 63 && BOOST_PP_ITERATION_FINISH_3 >= 63 +# define BOOST_PP_ITERATION_3 63 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 64 && BOOST_PP_ITERATION_FINISH_3 >= 64 +# define BOOST_PP_ITERATION_3 64 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 65 && BOOST_PP_ITERATION_FINISH_3 >= 65 +# define BOOST_PP_ITERATION_3 65 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 66 && BOOST_PP_ITERATION_FINISH_3 >= 66 +# define BOOST_PP_ITERATION_3 66 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 67 && BOOST_PP_ITERATION_FINISH_3 >= 67 +# define BOOST_PP_ITERATION_3 67 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 68 && BOOST_PP_ITERATION_FINISH_3 >= 68 +# define BOOST_PP_ITERATION_3 68 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 69 && BOOST_PP_ITERATION_FINISH_3 >= 69 +# define BOOST_PP_ITERATION_3 69 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 70 && BOOST_PP_ITERATION_FINISH_3 >= 70 +# define BOOST_PP_ITERATION_3 70 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 71 && BOOST_PP_ITERATION_FINISH_3 >= 71 +# define BOOST_PP_ITERATION_3 71 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 72 && BOOST_PP_ITERATION_FINISH_3 >= 72 +# define BOOST_PP_ITERATION_3 72 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 73 && BOOST_PP_ITERATION_FINISH_3 >= 73 +# define BOOST_PP_ITERATION_3 73 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 74 && BOOST_PP_ITERATION_FINISH_3 >= 74 +# define BOOST_PP_ITERATION_3 74 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 75 && BOOST_PP_ITERATION_FINISH_3 >= 75 +# define BOOST_PP_ITERATION_3 75 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 76 && BOOST_PP_ITERATION_FINISH_3 >= 76 +# define BOOST_PP_ITERATION_3 76 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 77 && BOOST_PP_ITERATION_FINISH_3 >= 77 +# define BOOST_PP_ITERATION_3 77 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 78 && BOOST_PP_ITERATION_FINISH_3 >= 78 +# define BOOST_PP_ITERATION_3 78 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 79 && BOOST_PP_ITERATION_FINISH_3 >= 79 +# define BOOST_PP_ITERATION_3 79 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 80 && BOOST_PP_ITERATION_FINISH_3 >= 80 +# define BOOST_PP_ITERATION_3 80 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 81 && BOOST_PP_ITERATION_FINISH_3 >= 81 +# define BOOST_PP_ITERATION_3 81 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 82 && BOOST_PP_ITERATION_FINISH_3 >= 82 +# define BOOST_PP_ITERATION_3 82 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 83 && BOOST_PP_ITERATION_FINISH_3 >= 83 +# define BOOST_PP_ITERATION_3 83 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 84 && BOOST_PP_ITERATION_FINISH_3 >= 84 +# define BOOST_PP_ITERATION_3 84 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 85 && BOOST_PP_ITERATION_FINISH_3 >= 85 +# define BOOST_PP_ITERATION_3 85 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 86 && BOOST_PP_ITERATION_FINISH_3 >= 86 +# define BOOST_PP_ITERATION_3 86 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 87 && BOOST_PP_ITERATION_FINISH_3 >= 87 +# define BOOST_PP_ITERATION_3 87 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 88 && BOOST_PP_ITERATION_FINISH_3 >= 88 +# define BOOST_PP_ITERATION_3 88 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 89 && BOOST_PP_ITERATION_FINISH_3 >= 89 +# define BOOST_PP_ITERATION_3 89 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 90 && BOOST_PP_ITERATION_FINISH_3 >= 90 +# define BOOST_PP_ITERATION_3 90 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 91 && BOOST_PP_ITERATION_FINISH_3 >= 91 +# define BOOST_PP_ITERATION_3 91 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 92 && BOOST_PP_ITERATION_FINISH_3 >= 92 +# define BOOST_PP_ITERATION_3 92 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 93 && BOOST_PP_ITERATION_FINISH_3 >= 93 +# define BOOST_PP_ITERATION_3 93 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 94 && BOOST_PP_ITERATION_FINISH_3 >= 94 +# define BOOST_PP_ITERATION_3 94 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 95 && BOOST_PP_ITERATION_FINISH_3 >= 95 +# define BOOST_PP_ITERATION_3 95 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 96 && BOOST_PP_ITERATION_FINISH_3 >= 96 +# define BOOST_PP_ITERATION_3 96 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 97 && BOOST_PP_ITERATION_FINISH_3 >= 97 +# define BOOST_PP_ITERATION_3 97 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 98 && BOOST_PP_ITERATION_FINISH_3 >= 98 +# define BOOST_PP_ITERATION_3 98 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 99 && BOOST_PP_ITERATION_FINISH_3 >= 99 +# define BOOST_PP_ITERATION_3 99 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 100 && BOOST_PP_ITERATION_FINISH_3 >= 100 +# define BOOST_PP_ITERATION_3 100 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 101 && BOOST_PP_ITERATION_FINISH_3 >= 101 +# define BOOST_PP_ITERATION_3 101 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 102 && BOOST_PP_ITERATION_FINISH_3 >= 102 +# define BOOST_PP_ITERATION_3 102 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 103 && BOOST_PP_ITERATION_FINISH_3 >= 103 +# define BOOST_PP_ITERATION_3 103 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 104 && BOOST_PP_ITERATION_FINISH_3 >= 104 +# define BOOST_PP_ITERATION_3 104 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 105 && BOOST_PP_ITERATION_FINISH_3 >= 105 +# define BOOST_PP_ITERATION_3 105 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 106 && BOOST_PP_ITERATION_FINISH_3 >= 106 +# define BOOST_PP_ITERATION_3 106 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 107 && BOOST_PP_ITERATION_FINISH_3 >= 107 +# define BOOST_PP_ITERATION_3 107 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 108 && BOOST_PP_ITERATION_FINISH_3 >= 108 +# define BOOST_PP_ITERATION_3 108 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 109 && BOOST_PP_ITERATION_FINISH_3 >= 109 +# define BOOST_PP_ITERATION_3 109 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 110 && BOOST_PP_ITERATION_FINISH_3 >= 110 +# define BOOST_PP_ITERATION_3 110 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 111 && BOOST_PP_ITERATION_FINISH_3 >= 111 +# define BOOST_PP_ITERATION_3 111 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 112 && BOOST_PP_ITERATION_FINISH_3 >= 112 +# define BOOST_PP_ITERATION_3 112 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 113 && BOOST_PP_ITERATION_FINISH_3 >= 113 +# define BOOST_PP_ITERATION_3 113 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 114 && BOOST_PP_ITERATION_FINISH_3 >= 114 +# define BOOST_PP_ITERATION_3 114 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 115 && BOOST_PP_ITERATION_FINISH_3 >= 115 +# define BOOST_PP_ITERATION_3 115 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 116 && BOOST_PP_ITERATION_FINISH_3 >= 116 +# define BOOST_PP_ITERATION_3 116 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 117 && BOOST_PP_ITERATION_FINISH_3 >= 117 +# define BOOST_PP_ITERATION_3 117 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 118 && BOOST_PP_ITERATION_FINISH_3 >= 118 +# define BOOST_PP_ITERATION_3 118 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 119 && BOOST_PP_ITERATION_FINISH_3 >= 119 +# define BOOST_PP_ITERATION_3 119 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 120 && BOOST_PP_ITERATION_FINISH_3 >= 120 +# define BOOST_PP_ITERATION_3 120 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 121 && BOOST_PP_ITERATION_FINISH_3 >= 121 +# define BOOST_PP_ITERATION_3 121 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 122 && BOOST_PP_ITERATION_FINISH_3 >= 122 +# define BOOST_PP_ITERATION_3 122 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 123 && BOOST_PP_ITERATION_FINISH_3 >= 123 +# define BOOST_PP_ITERATION_3 123 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 124 && BOOST_PP_ITERATION_FINISH_3 >= 124 +# define BOOST_PP_ITERATION_3 124 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 125 && BOOST_PP_ITERATION_FINISH_3 >= 125 +# define BOOST_PP_ITERATION_3 125 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 126 && BOOST_PP_ITERATION_FINISH_3 >= 126 +# define BOOST_PP_ITERATION_3 126 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 127 && BOOST_PP_ITERATION_FINISH_3 >= 127 +# define BOOST_PP_ITERATION_3 127 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 128 && BOOST_PP_ITERATION_FINISH_3 >= 128 +# define BOOST_PP_ITERATION_3 128 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 129 && BOOST_PP_ITERATION_FINISH_3 >= 129 +# define BOOST_PP_ITERATION_3 129 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 130 && BOOST_PP_ITERATION_FINISH_3 >= 130 +# define BOOST_PP_ITERATION_3 130 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 131 && BOOST_PP_ITERATION_FINISH_3 >= 131 +# define BOOST_PP_ITERATION_3 131 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 132 && BOOST_PP_ITERATION_FINISH_3 >= 132 +# define BOOST_PP_ITERATION_3 132 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 133 && BOOST_PP_ITERATION_FINISH_3 >= 133 +# define BOOST_PP_ITERATION_3 133 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 134 && BOOST_PP_ITERATION_FINISH_3 >= 134 +# define BOOST_PP_ITERATION_3 134 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 135 && BOOST_PP_ITERATION_FINISH_3 >= 135 +# define BOOST_PP_ITERATION_3 135 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 136 && BOOST_PP_ITERATION_FINISH_3 >= 136 +# define BOOST_PP_ITERATION_3 136 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 137 && BOOST_PP_ITERATION_FINISH_3 >= 137 +# define BOOST_PP_ITERATION_3 137 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 138 && BOOST_PP_ITERATION_FINISH_3 >= 138 +# define BOOST_PP_ITERATION_3 138 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 139 && BOOST_PP_ITERATION_FINISH_3 >= 139 +# define BOOST_PP_ITERATION_3 139 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 140 && BOOST_PP_ITERATION_FINISH_3 >= 140 +# define BOOST_PP_ITERATION_3 140 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 141 && BOOST_PP_ITERATION_FINISH_3 >= 141 +# define BOOST_PP_ITERATION_3 141 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 142 && BOOST_PP_ITERATION_FINISH_3 >= 142 +# define BOOST_PP_ITERATION_3 142 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 143 && BOOST_PP_ITERATION_FINISH_3 >= 143 +# define BOOST_PP_ITERATION_3 143 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 144 && BOOST_PP_ITERATION_FINISH_3 >= 144 +# define BOOST_PP_ITERATION_3 144 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 145 && BOOST_PP_ITERATION_FINISH_3 >= 145 +# define BOOST_PP_ITERATION_3 145 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 146 && BOOST_PP_ITERATION_FINISH_3 >= 146 +# define BOOST_PP_ITERATION_3 146 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 147 && BOOST_PP_ITERATION_FINISH_3 >= 147 +# define BOOST_PP_ITERATION_3 147 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 148 && BOOST_PP_ITERATION_FINISH_3 >= 148 +# define BOOST_PP_ITERATION_3 148 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 149 && BOOST_PP_ITERATION_FINISH_3 >= 149 +# define BOOST_PP_ITERATION_3 149 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 150 && BOOST_PP_ITERATION_FINISH_3 >= 150 +# define BOOST_PP_ITERATION_3 150 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 151 && BOOST_PP_ITERATION_FINISH_3 >= 151 +# define BOOST_PP_ITERATION_3 151 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 152 && BOOST_PP_ITERATION_FINISH_3 >= 152 +# define BOOST_PP_ITERATION_3 152 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 153 && BOOST_PP_ITERATION_FINISH_3 >= 153 +# define BOOST_PP_ITERATION_3 153 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 154 && BOOST_PP_ITERATION_FINISH_3 >= 154 +# define BOOST_PP_ITERATION_3 154 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 155 && BOOST_PP_ITERATION_FINISH_3 >= 155 +# define BOOST_PP_ITERATION_3 155 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 156 && BOOST_PP_ITERATION_FINISH_3 >= 156 +# define BOOST_PP_ITERATION_3 156 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 157 && BOOST_PP_ITERATION_FINISH_3 >= 157 +# define BOOST_PP_ITERATION_3 157 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 158 && BOOST_PP_ITERATION_FINISH_3 >= 158 +# define BOOST_PP_ITERATION_3 158 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 159 && BOOST_PP_ITERATION_FINISH_3 >= 159 +# define BOOST_PP_ITERATION_3 159 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 160 && BOOST_PP_ITERATION_FINISH_3 >= 160 +# define BOOST_PP_ITERATION_3 160 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 161 && BOOST_PP_ITERATION_FINISH_3 >= 161 +# define BOOST_PP_ITERATION_3 161 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 162 && BOOST_PP_ITERATION_FINISH_3 >= 162 +# define BOOST_PP_ITERATION_3 162 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 163 && BOOST_PP_ITERATION_FINISH_3 >= 163 +# define BOOST_PP_ITERATION_3 163 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 164 && BOOST_PP_ITERATION_FINISH_3 >= 164 +# define BOOST_PP_ITERATION_3 164 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 165 && BOOST_PP_ITERATION_FINISH_3 >= 165 +# define BOOST_PP_ITERATION_3 165 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 166 && BOOST_PP_ITERATION_FINISH_3 >= 166 +# define BOOST_PP_ITERATION_3 166 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 167 && BOOST_PP_ITERATION_FINISH_3 >= 167 +# define BOOST_PP_ITERATION_3 167 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 168 && BOOST_PP_ITERATION_FINISH_3 >= 168 +# define BOOST_PP_ITERATION_3 168 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 169 && BOOST_PP_ITERATION_FINISH_3 >= 169 +# define BOOST_PP_ITERATION_3 169 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 170 && BOOST_PP_ITERATION_FINISH_3 >= 170 +# define BOOST_PP_ITERATION_3 170 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 171 && BOOST_PP_ITERATION_FINISH_3 >= 171 +# define BOOST_PP_ITERATION_3 171 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 172 && BOOST_PP_ITERATION_FINISH_3 >= 172 +# define BOOST_PP_ITERATION_3 172 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 173 && BOOST_PP_ITERATION_FINISH_3 >= 173 +# define BOOST_PP_ITERATION_3 173 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 174 && BOOST_PP_ITERATION_FINISH_3 >= 174 +# define BOOST_PP_ITERATION_3 174 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 175 && BOOST_PP_ITERATION_FINISH_3 >= 175 +# define BOOST_PP_ITERATION_3 175 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 176 && BOOST_PP_ITERATION_FINISH_3 >= 176 +# define BOOST_PP_ITERATION_3 176 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 177 && BOOST_PP_ITERATION_FINISH_3 >= 177 +# define BOOST_PP_ITERATION_3 177 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 178 && BOOST_PP_ITERATION_FINISH_3 >= 178 +# define BOOST_PP_ITERATION_3 178 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 179 && BOOST_PP_ITERATION_FINISH_3 >= 179 +# define BOOST_PP_ITERATION_3 179 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 180 && BOOST_PP_ITERATION_FINISH_3 >= 180 +# define BOOST_PP_ITERATION_3 180 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 181 && BOOST_PP_ITERATION_FINISH_3 >= 181 +# define BOOST_PP_ITERATION_3 181 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 182 && BOOST_PP_ITERATION_FINISH_3 >= 182 +# define BOOST_PP_ITERATION_3 182 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 183 && BOOST_PP_ITERATION_FINISH_3 >= 183 +# define BOOST_PP_ITERATION_3 183 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 184 && BOOST_PP_ITERATION_FINISH_3 >= 184 +# define BOOST_PP_ITERATION_3 184 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 185 && BOOST_PP_ITERATION_FINISH_3 >= 185 +# define BOOST_PP_ITERATION_3 185 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 186 && BOOST_PP_ITERATION_FINISH_3 >= 186 +# define BOOST_PP_ITERATION_3 186 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 187 && BOOST_PP_ITERATION_FINISH_3 >= 187 +# define BOOST_PP_ITERATION_3 187 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 188 && BOOST_PP_ITERATION_FINISH_3 >= 188 +# define BOOST_PP_ITERATION_3 188 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 189 && BOOST_PP_ITERATION_FINISH_3 >= 189 +# define BOOST_PP_ITERATION_3 189 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 190 && BOOST_PP_ITERATION_FINISH_3 >= 190 +# define BOOST_PP_ITERATION_3 190 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 191 && BOOST_PP_ITERATION_FINISH_3 >= 191 +# define BOOST_PP_ITERATION_3 191 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 192 && BOOST_PP_ITERATION_FINISH_3 >= 192 +# define BOOST_PP_ITERATION_3 192 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 193 && BOOST_PP_ITERATION_FINISH_3 >= 193 +# define BOOST_PP_ITERATION_3 193 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 194 && BOOST_PP_ITERATION_FINISH_3 >= 194 +# define BOOST_PP_ITERATION_3 194 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 195 && BOOST_PP_ITERATION_FINISH_3 >= 195 +# define BOOST_PP_ITERATION_3 195 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 196 && BOOST_PP_ITERATION_FINISH_3 >= 196 +# define BOOST_PP_ITERATION_3 196 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 197 && BOOST_PP_ITERATION_FINISH_3 >= 197 +# define BOOST_PP_ITERATION_3 197 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 198 && BOOST_PP_ITERATION_FINISH_3 >= 198 +# define BOOST_PP_ITERATION_3 198 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 199 && BOOST_PP_ITERATION_FINISH_3 >= 199 +# define BOOST_PP_ITERATION_3 199 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 200 && BOOST_PP_ITERATION_FINISH_3 >= 200 +# define BOOST_PP_ITERATION_3 200 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 201 && BOOST_PP_ITERATION_FINISH_3 >= 201 +# define BOOST_PP_ITERATION_3 201 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 202 && BOOST_PP_ITERATION_FINISH_3 >= 202 +# define BOOST_PP_ITERATION_3 202 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 203 && BOOST_PP_ITERATION_FINISH_3 >= 203 +# define BOOST_PP_ITERATION_3 203 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 204 && BOOST_PP_ITERATION_FINISH_3 >= 204 +# define BOOST_PP_ITERATION_3 204 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 205 && BOOST_PP_ITERATION_FINISH_3 >= 205 +# define BOOST_PP_ITERATION_3 205 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 206 && BOOST_PP_ITERATION_FINISH_3 >= 206 +# define BOOST_PP_ITERATION_3 206 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 207 && BOOST_PP_ITERATION_FINISH_3 >= 207 +# define BOOST_PP_ITERATION_3 207 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 208 && BOOST_PP_ITERATION_FINISH_3 >= 208 +# define BOOST_PP_ITERATION_3 208 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 209 && BOOST_PP_ITERATION_FINISH_3 >= 209 +# define BOOST_PP_ITERATION_3 209 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 210 && BOOST_PP_ITERATION_FINISH_3 >= 210 +# define BOOST_PP_ITERATION_3 210 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 211 && BOOST_PP_ITERATION_FINISH_3 >= 211 +# define BOOST_PP_ITERATION_3 211 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 212 && BOOST_PP_ITERATION_FINISH_3 >= 212 +# define BOOST_PP_ITERATION_3 212 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 213 && BOOST_PP_ITERATION_FINISH_3 >= 213 +# define BOOST_PP_ITERATION_3 213 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 214 && BOOST_PP_ITERATION_FINISH_3 >= 214 +# define BOOST_PP_ITERATION_3 214 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 215 && BOOST_PP_ITERATION_FINISH_3 >= 215 +# define BOOST_PP_ITERATION_3 215 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 216 && BOOST_PP_ITERATION_FINISH_3 >= 216 +# define BOOST_PP_ITERATION_3 216 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 217 && BOOST_PP_ITERATION_FINISH_3 >= 217 +# define BOOST_PP_ITERATION_3 217 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 218 && BOOST_PP_ITERATION_FINISH_3 >= 218 +# define BOOST_PP_ITERATION_3 218 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 219 && BOOST_PP_ITERATION_FINISH_3 >= 219 +# define BOOST_PP_ITERATION_3 219 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 220 && BOOST_PP_ITERATION_FINISH_3 >= 220 +# define BOOST_PP_ITERATION_3 220 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 221 && BOOST_PP_ITERATION_FINISH_3 >= 221 +# define BOOST_PP_ITERATION_3 221 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 222 && BOOST_PP_ITERATION_FINISH_3 >= 222 +# define BOOST_PP_ITERATION_3 222 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 223 && BOOST_PP_ITERATION_FINISH_3 >= 223 +# define BOOST_PP_ITERATION_3 223 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 224 && BOOST_PP_ITERATION_FINISH_3 >= 224 +# define BOOST_PP_ITERATION_3 224 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 225 && BOOST_PP_ITERATION_FINISH_3 >= 225 +# define BOOST_PP_ITERATION_3 225 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 226 && BOOST_PP_ITERATION_FINISH_3 >= 226 +# define BOOST_PP_ITERATION_3 226 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 227 && BOOST_PP_ITERATION_FINISH_3 >= 227 +# define BOOST_PP_ITERATION_3 227 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 228 && BOOST_PP_ITERATION_FINISH_3 >= 228 +# define BOOST_PP_ITERATION_3 228 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 229 && BOOST_PP_ITERATION_FINISH_3 >= 229 +# define BOOST_PP_ITERATION_3 229 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 230 && BOOST_PP_ITERATION_FINISH_3 >= 230 +# define BOOST_PP_ITERATION_3 230 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 231 && BOOST_PP_ITERATION_FINISH_3 >= 231 +# define BOOST_PP_ITERATION_3 231 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 232 && BOOST_PP_ITERATION_FINISH_3 >= 232 +# define BOOST_PP_ITERATION_3 232 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 233 && BOOST_PP_ITERATION_FINISH_3 >= 233 +# define BOOST_PP_ITERATION_3 233 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 234 && BOOST_PP_ITERATION_FINISH_3 >= 234 +# define BOOST_PP_ITERATION_3 234 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 235 && BOOST_PP_ITERATION_FINISH_3 >= 235 +# define BOOST_PP_ITERATION_3 235 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 236 && BOOST_PP_ITERATION_FINISH_3 >= 236 +# define BOOST_PP_ITERATION_3 236 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 237 && BOOST_PP_ITERATION_FINISH_3 >= 237 +# define BOOST_PP_ITERATION_3 237 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 238 && BOOST_PP_ITERATION_FINISH_3 >= 238 +# define BOOST_PP_ITERATION_3 238 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 239 && BOOST_PP_ITERATION_FINISH_3 >= 239 +# define BOOST_PP_ITERATION_3 239 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 240 && BOOST_PP_ITERATION_FINISH_3 >= 240 +# define BOOST_PP_ITERATION_3 240 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 241 && BOOST_PP_ITERATION_FINISH_3 >= 241 +# define BOOST_PP_ITERATION_3 241 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 242 && BOOST_PP_ITERATION_FINISH_3 >= 242 +# define BOOST_PP_ITERATION_3 242 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 243 && BOOST_PP_ITERATION_FINISH_3 >= 243 +# define BOOST_PP_ITERATION_3 243 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 244 && BOOST_PP_ITERATION_FINISH_3 >= 244 +# define BOOST_PP_ITERATION_3 244 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 245 && BOOST_PP_ITERATION_FINISH_3 >= 245 +# define BOOST_PP_ITERATION_3 245 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 246 && BOOST_PP_ITERATION_FINISH_3 >= 246 +# define BOOST_PP_ITERATION_3 246 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 247 && BOOST_PP_ITERATION_FINISH_3 >= 247 +# define BOOST_PP_ITERATION_3 247 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 248 && BOOST_PP_ITERATION_FINISH_3 >= 248 +# define BOOST_PP_ITERATION_3 248 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 249 && BOOST_PP_ITERATION_FINISH_3 >= 249 +# define BOOST_PP_ITERATION_3 249 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 250 && BOOST_PP_ITERATION_FINISH_3 >= 250 +# define BOOST_PP_ITERATION_3 250 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 251 && BOOST_PP_ITERATION_FINISH_3 >= 251 +# define BOOST_PP_ITERATION_3 251 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 252 && BOOST_PP_ITERATION_FINISH_3 >= 252 +# define BOOST_PP_ITERATION_3 252 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 253 && BOOST_PP_ITERATION_FINISH_3 >= 253 +# define BOOST_PP_ITERATION_3 253 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 254 && BOOST_PP_ITERATION_FINISH_3 >= 254 +# define BOOST_PP_ITERATION_3 254 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 255 && BOOST_PP_ITERATION_FINISH_3 >= 255 +# define BOOST_PP_ITERATION_3 255 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 256 && BOOST_PP_ITERATION_FINISH_3 >= 256 +# define BOOST_PP_ITERATION_3 256 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 2 +# +# undef BOOST_PP_ITERATION_START_3 +# undef BOOST_PP_ITERATION_FINISH_3 +# undef BOOST_PP_FILENAME_3 +# +# undef BOOST_PP_ITERATION_FLAGS_3 +# undef BOOST_PP_ITERATION_PARAMS_3 diff --git a/contrib/src/boost/preprocessor/iteration/detail/iter/forward4.hpp b/contrib/src/boost/preprocessor/iteration/detail/iter/forward4.hpp new file mode 100644 index 0000000..1b4f588 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/iter/forward4.hpp @@ -0,0 +1,1338 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if defined(BOOST_PP_ITERATION_LIMITS) +# if !defined(BOOST_PP_FILENAME_4) +# error BOOST_PP_ERROR: depth #4 filename is not defined +# endif +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_ITERATION_FLAGS_4() 0 +# undef BOOST_PP_ITERATION_LIMITS +# elif defined(BOOST_PP_ITERATION_PARAMS_4) +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_4) +# include +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_4) +# include +# define BOOST_PP_FILENAME_4 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_4) +# if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_4) >= 4 +# define BOOST_PP_ITERATION_FLAGS_4() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_4) +# else +# define BOOST_PP_ITERATION_FLAGS_4() 0 +# endif +# else +# error BOOST_PP_ERROR: depth #4 iteration boundaries or filename not defined +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 4 +# +# if (BOOST_PP_ITERATION_START_4) > (BOOST_PP_ITERATION_FINISH_4) +# include +# else +# if BOOST_PP_ITERATION_START_4 <= 0 && BOOST_PP_ITERATION_FINISH_4 >= 0 +# define BOOST_PP_ITERATION_4 0 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 1 && BOOST_PP_ITERATION_FINISH_4 >= 1 +# define BOOST_PP_ITERATION_4 1 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 2 && BOOST_PP_ITERATION_FINISH_4 >= 2 +# define BOOST_PP_ITERATION_4 2 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 3 && BOOST_PP_ITERATION_FINISH_4 >= 3 +# define BOOST_PP_ITERATION_4 3 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 4 && BOOST_PP_ITERATION_FINISH_4 >= 4 +# define BOOST_PP_ITERATION_4 4 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 5 && BOOST_PP_ITERATION_FINISH_4 >= 5 +# define BOOST_PP_ITERATION_4 5 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 6 && BOOST_PP_ITERATION_FINISH_4 >= 6 +# define BOOST_PP_ITERATION_4 6 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 7 && BOOST_PP_ITERATION_FINISH_4 >= 7 +# define BOOST_PP_ITERATION_4 7 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 8 && BOOST_PP_ITERATION_FINISH_4 >= 8 +# define BOOST_PP_ITERATION_4 8 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 9 && BOOST_PP_ITERATION_FINISH_4 >= 9 +# define BOOST_PP_ITERATION_4 9 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 10 && BOOST_PP_ITERATION_FINISH_4 >= 10 +# define BOOST_PP_ITERATION_4 10 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 11 && BOOST_PP_ITERATION_FINISH_4 >= 11 +# define BOOST_PP_ITERATION_4 11 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 12 && BOOST_PP_ITERATION_FINISH_4 >= 12 +# define BOOST_PP_ITERATION_4 12 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 13 && BOOST_PP_ITERATION_FINISH_4 >= 13 +# define BOOST_PP_ITERATION_4 13 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 14 && BOOST_PP_ITERATION_FINISH_4 >= 14 +# define BOOST_PP_ITERATION_4 14 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 15 && BOOST_PP_ITERATION_FINISH_4 >= 15 +# define BOOST_PP_ITERATION_4 15 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 16 && BOOST_PP_ITERATION_FINISH_4 >= 16 +# define BOOST_PP_ITERATION_4 16 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 17 && BOOST_PP_ITERATION_FINISH_4 >= 17 +# define BOOST_PP_ITERATION_4 17 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 18 && BOOST_PP_ITERATION_FINISH_4 >= 18 +# define BOOST_PP_ITERATION_4 18 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 19 && BOOST_PP_ITERATION_FINISH_4 >= 19 +# define BOOST_PP_ITERATION_4 19 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 20 && BOOST_PP_ITERATION_FINISH_4 >= 20 +# define BOOST_PP_ITERATION_4 20 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 21 && BOOST_PP_ITERATION_FINISH_4 >= 21 +# define BOOST_PP_ITERATION_4 21 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 22 && BOOST_PP_ITERATION_FINISH_4 >= 22 +# define BOOST_PP_ITERATION_4 22 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 23 && BOOST_PP_ITERATION_FINISH_4 >= 23 +# define BOOST_PP_ITERATION_4 23 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 24 && BOOST_PP_ITERATION_FINISH_4 >= 24 +# define BOOST_PP_ITERATION_4 24 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 25 && BOOST_PP_ITERATION_FINISH_4 >= 25 +# define BOOST_PP_ITERATION_4 25 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 26 && BOOST_PP_ITERATION_FINISH_4 >= 26 +# define BOOST_PP_ITERATION_4 26 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 27 && BOOST_PP_ITERATION_FINISH_4 >= 27 +# define BOOST_PP_ITERATION_4 27 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 28 && BOOST_PP_ITERATION_FINISH_4 >= 28 +# define BOOST_PP_ITERATION_4 28 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 29 && BOOST_PP_ITERATION_FINISH_4 >= 29 +# define BOOST_PP_ITERATION_4 29 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 30 && BOOST_PP_ITERATION_FINISH_4 >= 30 +# define BOOST_PP_ITERATION_4 30 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 31 && BOOST_PP_ITERATION_FINISH_4 >= 31 +# define BOOST_PP_ITERATION_4 31 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 32 && BOOST_PP_ITERATION_FINISH_4 >= 32 +# define BOOST_PP_ITERATION_4 32 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 33 && BOOST_PP_ITERATION_FINISH_4 >= 33 +# define BOOST_PP_ITERATION_4 33 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 34 && BOOST_PP_ITERATION_FINISH_4 >= 34 +# define BOOST_PP_ITERATION_4 34 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 35 && BOOST_PP_ITERATION_FINISH_4 >= 35 +# define BOOST_PP_ITERATION_4 35 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 36 && BOOST_PP_ITERATION_FINISH_4 >= 36 +# define BOOST_PP_ITERATION_4 36 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 37 && BOOST_PP_ITERATION_FINISH_4 >= 37 +# define BOOST_PP_ITERATION_4 37 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 38 && BOOST_PP_ITERATION_FINISH_4 >= 38 +# define BOOST_PP_ITERATION_4 38 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 39 && BOOST_PP_ITERATION_FINISH_4 >= 39 +# define BOOST_PP_ITERATION_4 39 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 40 && BOOST_PP_ITERATION_FINISH_4 >= 40 +# define BOOST_PP_ITERATION_4 40 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 41 && BOOST_PP_ITERATION_FINISH_4 >= 41 +# define BOOST_PP_ITERATION_4 41 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 42 && BOOST_PP_ITERATION_FINISH_4 >= 42 +# define BOOST_PP_ITERATION_4 42 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 43 && BOOST_PP_ITERATION_FINISH_4 >= 43 +# define BOOST_PP_ITERATION_4 43 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 44 && BOOST_PP_ITERATION_FINISH_4 >= 44 +# define BOOST_PP_ITERATION_4 44 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 45 && BOOST_PP_ITERATION_FINISH_4 >= 45 +# define BOOST_PP_ITERATION_4 45 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 46 && BOOST_PP_ITERATION_FINISH_4 >= 46 +# define BOOST_PP_ITERATION_4 46 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 47 && BOOST_PP_ITERATION_FINISH_4 >= 47 +# define BOOST_PP_ITERATION_4 47 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 48 && BOOST_PP_ITERATION_FINISH_4 >= 48 +# define BOOST_PP_ITERATION_4 48 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 49 && BOOST_PP_ITERATION_FINISH_4 >= 49 +# define BOOST_PP_ITERATION_4 49 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 50 && BOOST_PP_ITERATION_FINISH_4 >= 50 +# define BOOST_PP_ITERATION_4 50 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 51 && BOOST_PP_ITERATION_FINISH_4 >= 51 +# define BOOST_PP_ITERATION_4 51 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 52 && BOOST_PP_ITERATION_FINISH_4 >= 52 +# define BOOST_PP_ITERATION_4 52 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 53 && BOOST_PP_ITERATION_FINISH_4 >= 53 +# define BOOST_PP_ITERATION_4 53 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 54 && BOOST_PP_ITERATION_FINISH_4 >= 54 +# define BOOST_PP_ITERATION_4 54 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 55 && BOOST_PP_ITERATION_FINISH_4 >= 55 +# define BOOST_PP_ITERATION_4 55 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 56 && BOOST_PP_ITERATION_FINISH_4 >= 56 +# define BOOST_PP_ITERATION_4 56 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 57 && BOOST_PP_ITERATION_FINISH_4 >= 57 +# define BOOST_PP_ITERATION_4 57 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 58 && BOOST_PP_ITERATION_FINISH_4 >= 58 +# define BOOST_PP_ITERATION_4 58 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 59 && BOOST_PP_ITERATION_FINISH_4 >= 59 +# define BOOST_PP_ITERATION_4 59 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 60 && BOOST_PP_ITERATION_FINISH_4 >= 60 +# define BOOST_PP_ITERATION_4 60 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 61 && BOOST_PP_ITERATION_FINISH_4 >= 61 +# define BOOST_PP_ITERATION_4 61 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 62 && BOOST_PP_ITERATION_FINISH_4 >= 62 +# define BOOST_PP_ITERATION_4 62 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 63 && BOOST_PP_ITERATION_FINISH_4 >= 63 +# define BOOST_PP_ITERATION_4 63 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 64 && BOOST_PP_ITERATION_FINISH_4 >= 64 +# define BOOST_PP_ITERATION_4 64 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 65 && BOOST_PP_ITERATION_FINISH_4 >= 65 +# define BOOST_PP_ITERATION_4 65 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 66 && BOOST_PP_ITERATION_FINISH_4 >= 66 +# define BOOST_PP_ITERATION_4 66 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 67 && BOOST_PP_ITERATION_FINISH_4 >= 67 +# define BOOST_PP_ITERATION_4 67 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 68 && BOOST_PP_ITERATION_FINISH_4 >= 68 +# define BOOST_PP_ITERATION_4 68 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 69 && BOOST_PP_ITERATION_FINISH_4 >= 69 +# define BOOST_PP_ITERATION_4 69 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 70 && BOOST_PP_ITERATION_FINISH_4 >= 70 +# define BOOST_PP_ITERATION_4 70 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 71 && BOOST_PP_ITERATION_FINISH_4 >= 71 +# define BOOST_PP_ITERATION_4 71 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 72 && BOOST_PP_ITERATION_FINISH_4 >= 72 +# define BOOST_PP_ITERATION_4 72 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 73 && BOOST_PP_ITERATION_FINISH_4 >= 73 +# define BOOST_PP_ITERATION_4 73 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 74 && BOOST_PP_ITERATION_FINISH_4 >= 74 +# define BOOST_PP_ITERATION_4 74 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 75 && BOOST_PP_ITERATION_FINISH_4 >= 75 +# define BOOST_PP_ITERATION_4 75 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 76 && BOOST_PP_ITERATION_FINISH_4 >= 76 +# define BOOST_PP_ITERATION_4 76 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 77 && BOOST_PP_ITERATION_FINISH_4 >= 77 +# define BOOST_PP_ITERATION_4 77 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 78 && BOOST_PP_ITERATION_FINISH_4 >= 78 +# define BOOST_PP_ITERATION_4 78 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 79 && BOOST_PP_ITERATION_FINISH_4 >= 79 +# define BOOST_PP_ITERATION_4 79 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 80 && BOOST_PP_ITERATION_FINISH_4 >= 80 +# define BOOST_PP_ITERATION_4 80 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 81 && BOOST_PP_ITERATION_FINISH_4 >= 81 +# define BOOST_PP_ITERATION_4 81 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 82 && BOOST_PP_ITERATION_FINISH_4 >= 82 +# define BOOST_PP_ITERATION_4 82 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 83 && BOOST_PP_ITERATION_FINISH_4 >= 83 +# define BOOST_PP_ITERATION_4 83 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 84 && BOOST_PP_ITERATION_FINISH_4 >= 84 +# define BOOST_PP_ITERATION_4 84 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 85 && BOOST_PP_ITERATION_FINISH_4 >= 85 +# define BOOST_PP_ITERATION_4 85 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 86 && BOOST_PP_ITERATION_FINISH_4 >= 86 +# define BOOST_PP_ITERATION_4 86 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 87 && BOOST_PP_ITERATION_FINISH_4 >= 87 +# define BOOST_PP_ITERATION_4 87 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 88 && BOOST_PP_ITERATION_FINISH_4 >= 88 +# define BOOST_PP_ITERATION_4 88 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 89 && BOOST_PP_ITERATION_FINISH_4 >= 89 +# define BOOST_PP_ITERATION_4 89 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 90 && BOOST_PP_ITERATION_FINISH_4 >= 90 +# define BOOST_PP_ITERATION_4 90 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 91 && BOOST_PP_ITERATION_FINISH_4 >= 91 +# define BOOST_PP_ITERATION_4 91 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 92 && BOOST_PP_ITERATION_FINISH_4 >= 92 +# define BOOST_PP_ITERATION_4 92 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 93 && BOOST_PP_ITERATION_FINISH_4 >= 93 +# define BOOST_PP_ITERATION_4 93 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 94 && BOOST_PP_ITERATION_FINISH_4 >= 94 +# define BOOST_PP_ITERATION_4 94 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 95 && BOOST_PP_ITERATION_FINISH_4 >= 95 +# define BOOST_PP_ITERATION_4 95 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 96 && BOOST_PP_ITERATION_FINISH_4 >= 96 +# define BOOST_PP_ITERATION_4 96 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 97 && BOOST_PP_ITERATION_FINISH_4 >= 97 +# define BOOST_PP_ITERATION_4 97 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 98 && BOOST_PP_ITERATION_FINISH_4 >= 98 +# define BOOST_PP_ITERATION_4 98 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 99 && BOOST_PP_ITERATION_FINISH_4 >= 99 +# define BOOST_PP_ITERATION_4 99 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 100 && BOOST_PP_ITERATION_FINISH_4 >= 100 +# define BOOST_PP_ITERATION_4 100 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 101 && BOOST_PP_ITERATION_FINISH_4 >= 101 +# define BOOST_PP_ITERATION_4 101 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 102 && BOOST_PP_ITERATION_FINISH_4 >= 102 +# define BOOST_PP_ITERATION_4 102 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 103 && BOOST_PP_ITERATION_FINISH_4 >= 103 +# define BOOST_PP_ITERATION_4 103 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 104 && BOOST_PP_ITERATION_FINISH_4 >= 104 +# define BOOST_PP_ITERATION_4 104 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 105 && BOOST_PP_ITERATION_FINISH_4 >= 105 +# define BOOST_PP_ITERATION_4 105 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 106 && BOOST_PP_ITERATION_FINISH_4 >= 106 +# define BOOST_PP_ITERATION_4 106 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 107 && BOOST_PP_ITERATION_FINISH_4 >= 107 +# define BOOST_PP_ITERATION_4 107 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 108 && BOOST_PP_ITERATION_FINISH_4 >= 108 +# define BOOST_PP_ITERATION_4 108 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 109 && BOOST_PP_ITERATION_FINISH_4 >= 109 +# define BOOST_PP_ITERATION_4 109 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 110 && BOOST_PP_ITERATION_FINISH_4 >= 110 +# define BOOST_PP_ITERATION_4 110 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 111 && BOOST_PP_ITERATION_FINISH_4 >= 111 +# define BOOST_PP_ITERATION_4 111 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 112 && BOOST_PP_ITERATION_FINISH_4 >= 112 +# define BOOST_PP_ITERATION_4 112 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 113 && BOOST_PP_ITERATION_FINISH_4 >= 113 +# define BOOST_PP_ITERATION_4 113 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 114 && BOOST_PP_ITERATION_FINISH_4 >= 114 +# define BOOST_PP_ITERATION_4 114 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 115 && BOOST_PP_ITERATION_FINISH_4 >= 115 +# define BOOST_PP_ITERATION_4 115 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 116 && BOOST_PP_ITERATION_FINISH_4 >= 116 +# define BOOST_PP_ITERATION_4 116 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 117 && BOOST_PP_ITERATION_FINISH_4 >= 117 +# define BOOST_PP_ITERATION_4 117 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 118 && BOOST_PP_ITERATION_FINISH_4 >= 118 +# define BOOST_PP_ITERATION_4 118 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 119 && BOOST_PP_ITERATION_FINISH_4 >= 119 +# define BOOST_PP_ITERATION_4 119 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 120 && BOOST_PP_ITERATION_FINISH_4 >= 120 +# define BOOST_PP_ITERATION_4 120 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 121 && BOOST_PP_ITERATION_FINISH_4 >= 121 +# define BOOST_PP_ITERATION_4 121 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 122 && BOOST_PP_ITERATION_FINISH_4 >= 122 +# define BOOST_PP_ITERATION_4 122 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 123 && BOOST_PP_ITERATION_FINISH_4 >= 123 +# define BOOST_PP_ITERATION_4 123 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 124 && BOOST_PP_ITERATION_FINISH_4 >= 124 +# define BOOST_PP_ITERATION_4 124 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 125 && BOOST_PP_ITERATION_FINISH_4 >= 125 +# define BOOST_PP_ITERATION_4 125 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 126 && BOOST_PP_ITERATION_FINISH_4 >= 126 +# define BOOST_PP_ITERATION_4 126 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 127 && BOOST_PP_ITERATION_FINISH_4 >= 127 +# define BOOST_PP_ITERATION_4 127 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 128 && BOOST_PP_ITERATION_FINISH_4 >= 128 +# define BOOST_PP_ITERATION_4 128 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 129 && BOOST_PP_ITERATION_FINISH_4 >= 129 +# define BOOST_PP_ITERATION_4 129 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 130 && BOOST_PP_ITERATION_FINISH_4 >= 130 +# define BOOST_PP_ITERATION_4 130 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 131 && BOOST_PP_ITERATION_FINISH_4 >= 131 +# define BOOST_PP_ITERATION_4 131 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 132 && BOOST_PP_ITERATION_FINISH_4 >= 132 +# define BOOST_PP_ITERATION_4 132 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 133 && BOOST_PP_ITERATION_FINISH_4 >= 133 +# define BOOST_PP_ITERATION_4 133 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 134 && BOOST_PP_ITERATION_FINISH_4 >= 134 +# define BOOST_PP_ITERATION_4 134 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 135 && BOOST_PP_ITERATION_FINISH_4 >= 135 +# define BOOST_PP_ITERATION_4 135 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 136 && BOOST_PP_ITERATION_FINISH_4 >= 136 +# define BOOST_PP_ITERATION_4 136 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 137 && BOOST_PP_ITERATION_FINISH_4 >= 137 +# define BOOST_PP_ITERATION_4 137 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 138 && BOOST_PP_ITERATION_FINISH_4 >= 138 +# define BOOST_PP_ITERATION_4 138 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 139 && BOOST_PP_ITERATION_FINISH_4 >= 139 +# define BOOST_PP_ITERATION_4 139 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 140 && BOOST_PP_ITERATION_FINISH_4 >= 140 +# define BOOST_PP_ITERATION_4 140 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 141 && BOOST_PP_ITERATION_FINISH_4 >= 141 +# define BOOST_PP_ITERATION_4 141 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 142 && BOOST_PP_ITERATION_FINISH_4 >= 142 +# define BOOST_PP_ITERATION_4 142 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 143 && BOOST_PP_ITERATION_FINISH_4 >= 143 +# define BOOST_PP_ITERATION_4 143 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 144 && BOOST_PP_ITERATION_FINISH_4 >= 144 +# define BOOST_PP_ITERATION_4 144 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 145 && BOOST_PP_ITERATION_FINISH_4 >= 145 +# define BOOST_PP_ITERATION_4 145 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 146 && BOOST_PP_ITERATION_FINISH_4 >= 146 +# define BOOST_PP_ITERATION_4 146 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 147 && BOOST_PP_ITERATION_FINISH_4 >= 147 +# define BOOST_PP_ITERATION_4 147 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 148 && BOOST_PP_ITERATION_FINISH_4 >= 148 +# define BOOST_PP_ITERATION_4 148 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 149 && BOOST_PP_ITERATION_FINISH_4 >= 149 +# define BOOST_PP_ITERATION_4 149 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 150 && BOOST_PP_ITERATION_FINISH_4 >= 150 +# define BOOST_PP_ITERATION_4 150 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 151 && BOOST_PP_ITERATION_FINISH_4 >= 151 +# define BOOST_PP_ITERATION_4 151 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 152 && BOOST_PP_ITERATION_FINISH_4 >= 152 +# define BOOST_PP_ITERATION_4 152 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 153 && BOOST_PP_ITERATION_FINISH_4 >= 153 +# define BOOST_PP_ITERATION_4 153 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 154 && BOOST_PP_ITERATION_FINISH_4 >= 154 +# define BOOST_PP_ITERATION_4 154 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 155 && BOOST_PP_ITERATION_FINISH_4 >= 155 +# define BOOST_PP_ITERATION_4 155 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 156 && BOOST_PP_ITERATION_FINISH_4 >= 156 +# define BOOST_PP_ITERATION_4 156 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 157 && BOOST_PP_ITERATION_FINISH_4 >= 157 +# define BOOST_PP_ITERATION_4 157 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 158 && BOOST_PP_ITERATION_FINISH_4 >= 158 +# define BOOST_PP_ITERATION_4 158 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 159 && BOOST_PP_ITERATION_FINISH_4 >= 159 +# define BOOST_PP_ITERATION_4 159 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 160 && BOOST_PP_ITERATION_FINISH_4 >= 160 +# define BOOST_PP_ITERATION_4 160 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 161 && BOOST_PP_ITERATION_FINISH_4 >= 161 +# define BOOST_PP_ITERATION_4 161 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 162 && BOOST_PP_ITERATION_FINISH_4 >= 162 +# define BOOST_PP_ITERATION_4 162 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 163 && BOOST_PP_ITERATION_FINISH_4 >= 163 +# define BOOST_PP_ITERATION_4 163 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 164 && BOOST_PP_ITERATION_FINISH_4 >= 164 +# define BOOST_PP_ITERATION_4 164 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 165 && BOOST_PP_ITERATION_FINISH_4 >= 165 +# define BOOST_PP_ITERATION_4 165 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 166 && BOOST_PP_ITERATION_FINISH_4 >= 166 +# define BOOST_PP_ITERATION_4 166 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 167 && BOOST_PP_ITERATION_FINISH_4 >= 167 +# define BOOST_PP_ITERATION_4 167 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 168 && BOOST_PP_ITERATION_FINISH_4 >= 168 +# define BOOST_PP_ITERATION_4 168 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 169 && BOOST_PP_ITERATION_FINISH_4 >= 169 +# define BOOST_PP_ITERATION_4 169 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 170 && BOOST_PP_ITERATION_FINISH_4 >= 170 +# define BOOST_PP_ITERATION_4 170 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 171 && BOOST_PP_ITERATION_FINISH_4 >= 171 +# define BOOST_PP_ITERATION_4 171 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 172 && BOOST_PP_ITERATION_FINISH_4 >= 172 +# define BOOST_PP_ITERATION_4 172 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 173 && BOOST_PP_ITERATION_FINISH_4 >= 173 +# define BOOST_PP_ITERATION_4 173 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 174 && BOOST_PP_ITERATION_FINISH_4 >= 174 +# define BOOST_PP_ITERATION_4 174 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 175 && BOOST_PP_ITERATION_FINISH_4 >= 175 +# define BOOST_PP_ITERATION_4 175 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 176 && BOOST_PP_ITERATION_FINISH_4 >= 176 +# define BOOST_PP_ITERATION_4 176 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 177 && BOOST_PP_ITERATION_FINISH_4 >= 177 +# define BOOST_PP_ITERATION_4 177 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 178 && BOOST_PP_ITERATION_FINISH_4 >= 178 +# define BOOST_PP_ITERATION_4 178 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 179 && BOOST_PP_ITERATION_FINISH_4 >= 179 +# define BOOST_PP_ITERATION_4 179 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 180 && BOOST_PP_ITERATION_FINISH_4 >= 180 +# define BOOST_PP_ITERATION_4 180 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 181 && BOOST_PP_ITERATION_FINISH_4 >= 181 +# define BOOST_PP_ITERATION_4 181 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 182 && BOOST_PP_ITERATION_FINISH_4 >= 182 +# define BOOST_PP_ITERATION_4 182 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 183 && BOOST_PP_ITERATION_FINISH_4 >= 183 +# define BOOST_PP_ITERATION_4 183 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 184 && BOOST_PP_ITERATION_FINISH_4 >= 184 +# define BOOST_PP_ITERATION_4 184 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 185 && BOOST_PP_ITERATION_FINISH_4 >= 185 +# define BOOST_PP_ITERATION_4 185 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 186 && BOOST_PP_ITERATION_FINISH_4 >= 186 +# define BOOST_PP_ITERATION_4 186 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 187 && BOOST_PP_ITERATION_FINISH_4 >= 187 +# define BOOST_PP_ITERATION_4 187 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 188 && BOOST_PP_ITERATION_FINISH_4 >= 188 +# define BOOST_PP_ITERATION_4 188 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 189 && BOOST_PP_ITERATION_FINISH_4 >= 189 +# define BOOST_PP_ITERATION_4 189 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 190 && BOOST_PP_ITERATION_FINISH_4 >= 190 +# define BOOST_PP_ITERATION_4 190 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 191 && BOOST_PP_ITERATION_FINISH_4 >= 191 +# define BOOST_PP_ITERATION_4 191 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 192 && BOOST_PP_ITERATION_FINISH_4 >= 192 +# define BOOST_PP_ITERATION_4 192 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 193 && BOOST_PP_ITERATION_FINISH_4 >= 193 +# define BOOST_PP_ITERATION_4 193 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 194 && BOOST_PP_ITERATION_FINISH_4 >= 194 +# define BOOST_PP_ITERATION_4 194 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 195 && BOOST_PP_ITERATION_FINISH_4 >= 195 +# define BOOST_PP_ITERATION_4 195 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 196 && BOOST_PP_ITERATION_FINISH_4 >= 196 +# define BOOST_PP_ITERATION_4 196 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 197 && BOOST_PP_ITERATION_FINISH_4 >= 197 +# define BOOST_PP_ITERATION_4 197 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 198 && BOOST_PP_ITERATION_FINISH_4 >= 198 +# define BOOST_PP_ITERATION_4 198 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 199 && BOOST_PP_ITERATION_FINISH_4 >= 199 +# define BOOST_PP_ITERATION_4 199 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 200 && BOOST_PP_ITERATION_FINISH_4 >= 200 +# define BOOST_PP_ITERATION_4 200 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 201 && BOOST_PP_ITERATION_FINISH_4 >= 201 +# define BOOST_PP_ITERATION_4 201 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 202 && BOOST_PP_ITERATION_FINISH_4 >= 202 +# define BOOST_PP_ITERATION_4 202 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 203 && BOOST_PP_ITERATION_FINISH_4 >= 203 +# define BOOST_PP_ITERATION_4 203 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 204 && BOOST_PP_ITERATION_FINISH_4 >= 204 +# define BOOST_PP_ITERATION_4 204 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 205 && BOOST_PP_ITERATION_FINISH_4 >= 205 +# define BOOST_PP_ITERATION_4 205 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 206 && BOOST_PP_ITERATION_FINISH_4 >= 206 +# define BOOST_PP_ITERATION_4 206 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 207 && BOOST_PP_ITERATION_FINISH_4 >= 207 +# define BOOST_PP_ITERATION_4 207 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 208 && BOOST_PP_ITERATION_FINISH_4 >= 208 +# define BOOST_PP_ITERATION_4 208 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 209 && BOOST_PP_ITERATION_FINISH_4 >= 209 +# define BOOST_PP_ITERATION_4 209 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 210 && BOOST_PP_ITERATION_FINISH_4 >= 210 +# define BOOST_PP_ITERATION_4 210 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 211 && BOOST_PP_ITERATION_FINISH_4 >= 211 +# define BOOST_PP_ITERATION_4 211 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 212 && BOOST_PP_ITERATION_FINISH_4 >= 212 +# define BOOST_PP_ITERATION_4 212 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 213 && BOOST_PP_ITERATION_FINISH_4 >= 213 +# define BOOST_PP_ITERATION_4 213 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 214 && BOOST_PP_ITERATION_FINISH_4 >= 214 +# define BOOST_PP_ITERATION_4 214 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 215 && BOOST_PP_ITERATION_FINISH_4 >= 215 +# define BOOST_PP_ITERATION_4 215 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 216 && BOOST_PP_ITERATION_FINISH_4 >= 216 +# define BOOST_PP_ITERATION_4 216 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 217 && BOOST_PP_ITERATION_FINISH_4 >= 217 +# define BOOST_PP_ITERATION_4 217 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 218 && BOOST_PP_ITERATION_FINISH_4 >= 218 +# define BOOST_PP_ITERATION_4 218 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 219 && BOOST_PP_ITERATION_FINISH_4 >= 219 +# define BOOST_PP_ITERATION_4 219 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 220 && BOOST_PP_ITERATION_FINISH_4 >= 220 +# define BOOST_PP_ITERATION_4 220 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 221 && BOOST_PP_ITERATION_FINISH_4 >= 221 +# define BOOST_PP_ITERATION_4 221 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 222 && BOOST_PP_ITERATION_FINISH_4 >= 222 +# define BOOST_PP_ITERATION_4 222 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 223 && BOOST_PP_ITERATION_FINISH_4 >= 223 +# define BOOST_PP_ITERATION_4 223 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 224 && BOOST_PP_ITERATION_FINISH_4 >= 224 +# define BOOST_PP_ITERATION_4 224 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 225 && BOOST_PP_ITERATION_FINISH_4 >= 225 +# define BOOST_PP_ITERATION_4 225 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 226 && BOOST_PP_ITERATION_FINISH_4 >= 226 +# define BOOST_PP_ITERATION_4 226 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 227 && BOOST_PP_ITERATION_FINISH_4 >= 227 +# define BOOST_PP_ITERATION_4 227 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 228 && BOOST_PP_ITERATION_FINISH_4 >= 228 +# define BOOST_PP_ITERATION_4 228 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 229 && BOOST_PP_ITERATION_FINISH_4 >= 229 +# define BOOST_PP_ITERATION_4 229 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 230 && BOOST_PP_ITERATION_FINISH_4 >= 230 +# define BOOST_PP_ITERATION_4 230 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 231 && BOOST_PP_ITERATION_FINISH_4 >= 231 +# define BOOST_PP_ITERATION_4 231 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 232 && BOOST_PP_ITERATION_FINISH_4 >= 232 +# define BOOST_PP_ITERATION_4 232 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 233 && BOOST_PP_ITERATION_FINISH_4 >= 233 +# define BOOST_PP_ITERATION_4 233 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 234 && BOOST_PP_ITERATION_FINISH_4 >= 234 +# define BOOST_PP_ITERATION_4 234 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 235 && BOOST_PP_ITERATION_FINISH_4 >= 235 +# define BOOST_PP_ITERATION_4 235 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 236 && BOOST_PP_ITERATION_FINISH_4 >= 236 +# define BOOST_PP_ITERATION_4 236 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 237 && BOOST_PP_ITERATION_FINISH_4 >= 237 +# define BOOST_PP_ITERATION_4 237 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 238 && BOOST_PP_ITERATION_FINISH_4 >= 238 +# define BOOST_PP_ITERATION_4 238 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 239 && BOOST_PP_ITERATION_FINISH_4 >= 239 +# define BOOST_PP_ITERATION_4 239 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 240 && BOOST_PP_ITERATION_FINISH_4 >= 240 +# define BOOST_PP_ITERATION_4 240 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 241 && BOOST_PP_ITERATION_FINISH_4 >= 241 +# define BOOST_PP_ITERATION_4 241 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 242 && BOOST_PP_ITERATION_FINISH_4 >= 242 +# define BOOST_PP_ITERATION_4 242 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 243 && BOOST_PP_ITERATION_FINISH_4 >= 243 +# define BOOST_PP_ITERATION_4 243 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 244 && BOOST_PP_ITERATION_FINISH_4 >= 244 +# define BOOST_PP_ITERATION_4 244 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 245 && BOOST_PP_ITERATION_FINISH_4 >= 245 +# define BOOST_PP_ITERATION_4 245 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 246 && BOOST_PP_ITERATION_FINISH_4 >= 246 +# define BOOST_PP_ITERATION_4 246 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 247 && BOOST_PP_ITERATION_FINISH_4 >= 247 +# define BOOST_PP_ITERATION_4 247 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 248 && BOOST_PP_ITERATION_FINISH_4 >= 248 +# define BOOST_PP_ITERATION_4 248 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 249 && BOOST_PP_ITERATION_FINISH_4 >= 249 +# define BOOST_PP_ITERATION_4 249 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 250 && BOOST_PP_ITERATION_FINISH_4 >= 250 +# define BOOST_PP_ITERATION_4 250 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 251 && BOOST_PP_ITERATION_FINISH_4 >= 251 +# define BOOST_PP_ITERATION_4 251 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 252 && BOOST_PP_ITERATION_FINISH_4 >= 252 +# define BOOST_PP_ITERATION_4 252 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 253 && BOOST_PP_ITERATION_FINISH_4 >= 253 +# define BOOST_PP_ITERATION_4 253 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 254 && BOOST_PP_ITERATION_FINISH_4 >= 254 +# define BOOST_PP_ITERATION_4 254 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 255 && BOOST_PP_ITERATION_FINISH_4 >= 255 +# define BOOST_PP_ITERATION_4 255 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 256 && BOOST_PP_ITERATION_FINISH_4 >= 256 +# define BOOST_PP_ITERATION_4 256 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 3 +# +# undef BOOST_PP_ITERATION_START_4 +# undef BOOST_PP_ITERATION_FINISH_4 +# undef BOOST_PP_FILENAME_4 +# +# undef BOOST_PP_ITERATION_FLAGS_4 +# undef BOOST_PP_ITERATION_PARAMS_4 diff --git a/contrib/src/boost/preprocessor/iteration/detail/iter/forward5.hpp b/contrib/src/boost/preprocessor/iteration/detail/iter/forward5.hpp new file mode 100644 index 0000000..7617607 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/iter/forward5.hpp @@ -0,0 +1,1338 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if defined(BOOST_PP_ITERATION_LIMITS) +# if !defined(BOOST_PP_FILENAME_5) +# error BOOST_PP_ERROR: depth #5 filename is not defined +# endif +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_ITERATION_FLAGS_5() 0 +# undef BOOST_PP_ITERATION_LIMITS +# elif defined(BOOST_PP_ITERATION_PARAMS_5) +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_5) +# include +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_5) +# include +# define BOOST_PP_FILENAME_5 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_5) +# if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_5) >= 4 +# define BOOST_PP_ITERATION_FLAGS_5() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_5) +# else +# define BOOST_PP_ITERATION_FLAGS_5() 0 +# endif +# else +# error BOOST_PP_ERROR: depth #5 iteration boundaries or filename not defined +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 5 +# +# if (BOOST_PP_ITERATION_START_5) > (BOOST_PP_ITERATION_FINISH_5) +# include +# else +# if BOOST_PP_ITERATION_START_5 <= 0 && BOOST_PP_ITERATION_FINISH_5 >= 0 +# define BOOST_PP_ITERATION_5 0 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 1 && BOOST_PP_ITERATION_FINISH_5 >= 1 +# define BOOST_PP_ITERATION_5 1 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 2 && BOOST_PP_ITERATION_FINISH_5 >= 2 +# define BOOST_PP_ITERATION_5 2 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 3 && BOOST_PP_ITERATION_FINISH_5 >= 3 +# define BOOST_PP_ITERATION_5 3 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 4 && BOOST_PP_ITERATION_FINISH_5 >= 4 +# define BOOST_PP_ITERATION_5 4 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 5 && BOOST_PP_ITERATION_FINISH_5 >= 5 +# define BOOST_PP_ITERATION_5 5 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 6 && BOOST_PP_ITERATION_FINISH_5 >= 6 +# define BOOST_PP_ITERATION_5 6 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 7 && BOOST_PP_ITERATION_FINISH_5 >= 7 +# define BOOST_PP_ITERATION_5 7 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 8 && BOOST_PP_ITERATION_FINISH_5 >= 8 +# define BOOST_PP_ITERATION_5 8 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 9 && BOOST_PP_ITERATION_FINISH_5 >= 9 +# define BOOST_PP_ITERATION_5 9 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 10 && BOOST_PP_ITERATION_FINISH_5 >= 10 +# define BOOST_PP_ITERATION_5 10 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 11 && BOOST_PP_ITERATION_FINISH_5 >= 11 +# define BOOST_PP_ITERATION_5 11 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 12 && BOOST_PP_ITERATION_FINISH_5 >= 12 +# define BOOST_PP_ITERATION_5 12 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 13 && BOOST_PP_ITERATION_FINISH_5 >= 13 +# define BOOST_PP_ITERATION_5 13 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 14 && BOOST_PP_ITERATION_FINISH_5 >= 14 +# define BOOST_PP_ITERATION_5 14 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 15 && BOOST_PP_ITERATION_FINISH_5 >= 15 +# define BOOST_PP_ITERATION_5 15 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 16 && BOOST_PP_ITERATION_FINISH_5 >= 16 +# define BOOST_PP_ITERATION_5 16 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 17 && BOOST_PP_ITERATION_FINISH_5 >= 17 +# define BOOST_PP_ITERATION_5 17 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 18 && BOOST_PP_ITERATION_FINISH_5 >= 18 +# define BOOST_PP_ITERATION_5 18 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 19 && BOOST_PP_ITERATION_FINISH_5 >= 19 +# define BOOST_PP_ITERATION_5 19 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 20 && BOOST_PP_ITERATION_FINISH_5 >= 20 +# define BOOST_PP_ITERATION_5 20 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 21 && BOOST_PP_ITERATION_FINISH_5 >= 21 +# define BOOST_PP_ITERATION_5 21 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 22 && BOOST_PP_ITERATION_FINISH_5 >= 22 +# define BOOST_PP_ITERATION_5 22 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 23 && BOOST_PP_ITERATION_FINISH_5 >= 23 +# define BOOST_PP_ITERATION_5 23 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 24 && BOOST_PP_ITERATION_FINISH_5 >= 24 +# define BOOST_PP_ITERATION_5 24 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 25 && BOOST_PP_ITERATION_FINISH_5 >= 25 +# define BOOST_PP_ITERATION_5 25 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 26 && BOOST_PP_ITERATION_FINISH_5 >= 26 +# define BOOST_PP_ITERATION_5 26 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 27 && BOOST_PP_ITERATION_FINISH_5 >= 27 +# define BOOST_PP_ITERATION_5 27 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 28 && BOOST_PP_ITERATION_FINISH_5 >= 28 +# define BOOST_PP_ITERATION_5 28 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 29 && BOOST_PP_ITERATION_FINISH_5 >= 29 +# define BOOST_PP_ITERATION_5 29 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 30 && BOOST_PP_ITERATION_FINISH_5 >= 30 +# define BOOST_PP_ITERATION_5 30 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 31 && BOOST_PP_ITERATION_FINISH_5 >= 31 +# define BOOST_PP_ITERATION_5 31 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 32 && BOOST_PP_ITERATION_FINISH_5 >= 32 +# define BOOST_PP_ITERATION_5 32 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 33 && BOOST_PP_ITERATION_FINISH_5 >= 33 +# define BOOST_PP_ITERATION_5 33 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 34 && BOOST_PP_ITERATION_FINISH_5 >= 34 +# define BOOST_PP_ITERATION_5 34 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 35 && BOOST_PP_ITERATION_FINISH_5 >= 35 +# define BOOST_PP_ITERATION_5 35 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 36 && BOOST_PP_ITERATION_FINISH_5 >= 36 +# define BOOST_PP_ITERATION_5 36 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 37 && BOOST_PP_ITERATION_FINISH_5 >= 37 +# define BOOST_PP_ITERATION_5 37 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 38 && BOOST_PP_ITERATION_FINISH_5 >= 38 +# define BOOST_PP_ITERATION_5 38 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 39 && BOOST_PP_ITERATION_FINISH_5 >= 39 +# define BOOST_PP_ITERATION_5 39 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 40 && BOOST_PP_ITERATION_FINISH_5 >= 40 +# define BOOST_PP_ITERATION_5 40 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 41 && BOOST_PP_ITERATION_FINISH_5 >= 41 +# define BOOST_PP_ITERATION_5 41 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 42 && BOOST_PP_ITERATION_FINISH_5 >= 42 +# define BOOST_PP_ITERATION_5 42 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 43 && BOOST_PP_ITERATION_FINISH_5 >= 43 +# define BOOST_PP_ITERATION_5 43 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 44 && BOOST_PP_ITERATION_FINISH_5 >= 44 +# define BOOST_PP_ITERATION_5 44 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 45 && BOOST_PP_ITERATION_FINISH_5 >= 45 +# define BOOST_PP_ITERATION_5 45 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 46 && BOOST_PP_ITERATION_FINISH_5 >= 46 +# define BOOST_PP_ITERATION_5 46 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 47 && BOOST_PP_ITERATION_FINISH_5 >= 47 +# define BOOST_PP_ITERATION_5 47 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 48 && BOOST_PP_ITERATION_FINISH_5 >= 48 +# define BOOST_PP_ITERATION_5 48 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 49 && BOOST_PP_ITERATION_FINISH_5 >= 49 +# define BOOST_PP_ITERATION_5 49 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 50 && BOOST_PP_ITERATION_FINISH_5 >= 50 +# define BOOST_PP_ITERATION_5 50 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 51 && BOOST_PP_ITERATION_FINISH_5 >= 51 +# define BOOST_PP_ITERATION_5 51 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 52 && BOOST_PP_ITERATION_FINISH_5 >= 52 +# define BOOST_PP_ITERATION_5 52 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 53 && BOOST_PP_ITERATION_FINISH_5 >= 53 +# define BOOST_PP_ITERATION_5 53 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 54 && BOOST_PP_ITERATION_FINISH_5 >= 54 +# define BOOST_PP_ITERATION_5 54 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 55 && BOOST_PP_ITERATION_FINISH_5 >= 55 +# define BOOST_PP_ITERATION_5 55 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 56 && BOOST_PP_ITERATION_FINISH_5 >= 56 +# define BOOST_PP_ITERATION_5 56 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 57 && BOOST_PP_ITERATION_FINISH_5 >= 57 +# define BOOST_PP_ITERATION_5 57 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 58 && BOOST_PP_ITERATION_FINISH_5 >= 58 +# define BOOST_PP_ITERATION_5 58 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 59 && BOOST_PP_ITERATION_FINISH_5 >= 59 +# define BOOST_PP_ITERATION_5 59 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 60 && BOOST_PP_ITERATION_FINISH_5 >= 60 +# define BOOST_PP_ITERATION_5 60 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 61 && BOOST_PP_ITERATION_FINISH_5 >= 61 +# define BOOST_PP_ITERATION_5 61 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 62 && BOOST_PP_ITERATION_FINISH_5 >= 62 +# define BOOST_PP_ITERATION_5 62 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 63 && BOOST_PP_ITERATION_FINISH_5 >= 63 +# define BOOST_PP_ITERATION_5 63 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 64 && BOOST_PP_ITERATION_FINISH_5 >= 64 +# define BOOST_PP_ITERATION_5 64 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 65 && BOOST_PP_ITERATION_FINISH_5 >= 65 +# define BOOST_PP_ITERATION_5 65 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 66 && BOOST_PP_ITERATION_FINISH_5 >= 66 +# define BOOST_PP_ITERATION_5 66 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 67 && BOOST_PP_ITERATION_FINISH_5 >= 67 +# define BOOST_PP_ITERATION_5 67 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 68 && BOOST_PP_ITERATION_FINISH_5 >= 68 +# define BOOST_PP_ITERATION_5 68 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 69 && BOOST_PP_ITERATION_FINISH_5 >= 69 +# define BOOST_PP_ITERATION_5 69 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 70 && BOOST_PP_ITERATION_FINISH_5 >= 70 +# define BOOST_PP_ITERATION_5 70 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 71 && BOOST_PP_ITERATION_FINISH_5 >= 71 +# define BOOST_PP_ITERATION_5 71 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 72 && BOOST_PP_ITERATION_FINISH_5 >= 72 +# define BOOST_PP_ITERATION_5 72 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 73 && BOOST_PP_ITERATION_FINISH_5 >= 73 +# define BOOST_PP_ITERATION_5 73 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 74 && BOOST_PP_ITERATION_FINISH_5 >= 74 +# define BOOST_PP_ITERATION_5 74 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 75 && BOOST_PP_ITERATION_FINISH_5 >= 75 +# define BOOST_PP_ITERATION_5 75 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 76 && BOOST_PP_ITERATION_FINISH_5 >= 76 +# define BOOST_PP_ITERATION_5 76 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 77 && BOOST_PP_ITERATION_FINISH_5 >= 77 +# define BOOST_PP_ITERATION_5 77 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 78 && BOOST_PP_ITERATION_FINISH_5 >= 78 +# define BOOST_PP_ITERATION_5 78 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 79 && BOOST_PP_ITERATION_FINISH_5 >= 79 +# define BOOST_PP_ITERATION_5 79 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 80 && BOOST_PP_ITERATION_FINISH_5 >= 80 +# define BOOST_PP_ITERATION_5 80 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 81 && BOOST_PP_ITERATION_FINISH_5 >= 81 +# define BOOST_PP_ITERATION_5 81 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 82 && BOOST_PP_ITERATION_FINISH_5 >= 82 +# define BOOST_PP_ITERATION_5 82 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 83 && BOOST_PP_ITERATION_FINISH_5 >= 83 +# define BOOST_PP_ITERATION_5 83 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 84 && BOOST_PP_ITERATION_FINISH_5 >= 84 +# define BOOST_PP_ITERATION_5 84 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 85 && BOOST_PP_ITERATION_FINISH_5 >= 85 +# define BOOST_PP_ITERATION_5 85 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 86 && BOOST_PP_ITERATION_FINISH_5 >= 86 +# define BOOST_PP_ITERATION_5 86 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 87 && BOOST_PP_ITERATION_FINISH_5 >= 87 +# define BOOST_PP_ITERATION_5 87 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 88 && BOOST_PP_ITERATION_FINISH_5 >= 88 +# define BOOST_PP_ITERATION_5 88 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 89 && BOOST_PP_ITERATION_FINISH_5 >= 89 +# define BOOST_PP_ITERATION_5 89 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 90 && BOOST_PP_ITERATION_FINISH_5 >= 90 +# define BOOST_PP_ITERATION_5 90 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 91 && BOOST_PP_ITERATION_FINISH_5 >= 91 +# define BOOST_PP_ITERATION_5 91 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 92 && BOOST_PP_ITERATION_FINISH_5 >= 92 +# define BOOST_PP_ITERATION_5 92 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 93 && BOOST_PP_ITERATION_FINISH_5 >= 93 +# define BOOST_PP_ITERATION_5 93 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 94 && BOOST_PP_ITERATION_FINISH_5 >= 94 +# define BOOST_PP_ITERATION_5 94 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 95 && BOOST_PP_ITERATION_FINISH_5 >= 95 +# define BOOST_PP_ITERATION_5 95 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 96 && BOOST_PP_ITERATION_FINISH_5 >= 96 +# define BOOST_PP_ITERATION_5 96 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 97 && BOOST_PP_ITERATION_FINISH_5 >= 97 +# define BOOST_PP_ITERATION_5 97 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 98 && BOOST_PP_ITERATION_FINISH_5 >= 98 +# define BOOST_PP_ITERATION_5 98 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 99 && BOOST_PP_ITERATION_FINISH_5 >= 99 +# define BOOST_PP_ITERATION_5 99 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 100 && BOOST_PP_ITERATION_FINISH_5 >= 100 +# define BOOST_PP_ITERATION_5 100 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 101 && BOOST_PP_ITERATION_FINISH_5 >= 101 +# define BOOST_PP_ITERATION_5 101 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 102 && BOOST_PP_ITERATION_FINISH_5 >= 102 +# define BOOST_PP_ITERATION_5 102 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 103 && BOOST_PP_ITERATION_FINISH_5 >= 103 +# define BOOST_PP_ITERATION_5 103 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 104 && BOOST_PP_ITERATION_FINISH_5 >= 104 +# define BOOST_PP_ITERATION_5 104 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 105 && BOOST_PP_ITERATION_FINISH_5 >= 105 +# define BOOST_PP_ITERATION_5 105 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 106 && BOOST_PP_ITERATION_FINISH_5 >= 106 +# define BOOST_PP_ITERATION_5 106 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 107 && BOOST_PP_ITERATION_FINISH_5 >= 107 +# define BOOST_PP_ITERATION_5 107 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 108 && BOOST_PP_ITERATION_FINISH_5 >= 108 +# define BOOST_PP_ITERATION_5 108 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 109 && BOOST_PP_ITERATION_FINISH_5 >= 109 +# define BOOST_PP_ITERATION_5 109 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 110 && BOOST_PP_ITERATION_FINISH_5 >= 110 +# define BOOST_PP_ITERATION_5 110 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 111 && BOOST_PP_ITERATION_FINISH_5 >= 111 +# define BOOST_PP_ITERATION_5 111 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 112 && BOOST_PP_ITERATION_FINISH_5 >= 112 +# define BOOST_PP_ITERATION_5 112 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 113 && BOOST_PP_ITERATION_FINISH_5 >= 113 +# define BOOST_PP_ITERATION_5 113 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 114 && BOOST_PP_ITERATION_FINISH_5 >= 114 +# define BOOST_PP_ITERATION_5 114 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 115 && BOOST_PP_ITERATION_FINISH_5 >= 115 +# define BOOST_PP_ITERATION_5 115 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 116 && BOOST_PP_ITERATION_FINISH_5 >= 116 +# define BOOST_PP_ITERATION_5 116 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 117 && BOOST_PP_ITERATION_FINISH_5 >= 117 +# define BOOST_PP_ITERATION_5 117 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 118 && BOOST_PP_ITERATION_FINISH_5 >= 118 +# define BOOST_PP_ITERATION_5 118 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 119 && BOOST_PP_ITERATION_FINISH_5 >= 119 +# define BOOST_PP_ITERATION_5 119 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 120 && BOOST_PP_ITERATION_FINISH_5 >= 120 +# define BOOST_PP_ITERATION_5 120 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 121 && BOOST_PP_ITERATION_FINISH_5 >= 121 +# define BOOST_PP_ITERATION_5 121 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 122 && BOOST_PP_ITERATION_FINISH_5 >= 122 +# define BOOST_PP_ITERATION_5 122 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 123 && BOOST_PP_ITERATION_FINISH_5 >= 123 +# define BOOST_PP_ITERATION_5 123 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 124 && BOOST_PP_ITERATION_FINISH_5 >= 124 +# define BOOST_PP_ITERATION_5 124 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 125 && BOOST_PP_ITERATION_FINISH_5 >= 125 +# define BOOST_PP_ITERATION_5 125 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 126 && BOOST_PP_ITERATION_FINISH_5 >= 126 +# define BOOST_PP_ITERATION_5 126 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 127 && BOOST_PP_ITERATION_FINISH_5 >= 127 +# define BOOST_PP_ITERATION_5 127 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 128 && BOOST_PP_ITERATION_FINISH_5 >= 128 +# define BOOST_PP_ITERATION_5 128 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 129 && BOOST_PP_ITERATION_FINISH_5 >= 129 +# define BOOST_PP_ITERATION_5 129 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 130 && BOOST_PP_ITERATION_FINISH_5 >= 130 +# define BOOST_PP_ITERATION_5 130 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 131 && BOOST_PP_ITERATION_FINISH_5 >= 131 +# define BOOST_PP_ITERATION_5 131 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 132 && BOOST_PP_ITERATION_FINISH_5 >= 132 +# define BOOST_PP_ITERATION_5 132 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 133 && BOOST_PP_ITERATION_FINISH_5 >= 133 +# define BOOST_PP_ITERATION_5 133 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 134 && BOOST_PP_ITERATION_FINISH_5 >= 134 +# define BOOST_PP_ITERATION_5 134 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 135 && BOOST_PP_ITERATION_FINISH_5 >= 135 +# define BOOST_PP_ITERATION_5 135 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 136 && BOOST_PP_ITERATION_FINISH_5 >= 136 +# define BOOST_PP_ITERATION_5 136 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 137 && BOOST_PP_ITERATION_FINISH_5 >= 137 +# define BOOST_PP_ITERATION_5 137 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 138 && BOOST_PP_ITERATION_FINISH_5 >= 138 +# define BOOST_PP_ITERATION_5 138 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 139 && BOOST_PP_ITERATION_FINISH_5 >= 139 +# define BOOST_PP_ITERATION_5 139 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 140 && BOOST_PP_ITERATION_FINISH_5 >= 140 +# define BOOST_PP_ITERATION_5 140 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 141 && BOOST_PP_ITERATION_FINISH_5 >= 141 +# define BOOST_PP_ITERATION_5 141 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 142 && BOOST_PP_ITERATION_FINISH_5 >= 142 +# define BOOST_PP_ITERATION_5 142 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 143 && BOOST_PP_ITERATION_FINISH_5 >= 143 +# define BOOST_PP_ITERATION_5 143 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 144 && BOOST_PP_ITERATION_FINISH_5 >= 144 +# define BOOST_PP_ITERATION_5 144 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 145 && BOOST_PP_ITERATION_FINISH_5 >= 145 +# define BOOST_PP_ITERATION_5 145 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 146 && BOOST_PP_ITERATION_FINISH_5 >= 146 +# define BOOST_PP_ITERATION_5 146 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 147 && BOOST_PP_ITERATION_FINISH_5 >= 147 +# define BOOST_PP_ITERATION_5 147 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 148 && BOOST_PP_ITERATION_FINISH_5 >= 148 +# define BOOST_PP_ITERATION_5 148 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 149 && BOOST_PP_ITERATION_FINISH_5 >= 149 +# define BOOST_PP_ITERATION_5 149 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 150 && BOOST_PP_ITERATION_FINISH_5 >= 150 +# define BOOST_PP_ITERATION_5 150 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 151 && BOOST_PP_ITERATION_FINISH_5 >= 151 +# define BOOST_PP_ITERATION_5 151 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 152 && BOOST_PP_ITERATION_FINISH_5 >= 152 +# define BOOST_PP_ITERATION_5 152 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 153 && BOOST_PP_ITERATION_FINISH_5 >= 153 +# define BOOST_PP_ITERATION_5 153 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 154 && BOOST_PP_ITERATION_FINISH_5 >= 154 +# define BOOST_PP_ITERATION_5 154 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 155 && BOOST_PP_ITERATION_FINISH_5 >= 155 +# define BOOST_PP_ITERATION_5 155 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 156 && BOOST_PP_ITERATION_FINISH_5 >= 156 +# define BOOST_PP_ITERATION_5 156 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 157 && BOOST_PP_ITERATION_FINISH_5 >= 157 +# define BOOST_PP_ITERATION_5 157 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 158 && BOOST_PP_ITERATION_FINISH_5 >= 158 +# define BOOST_PP_ITERATION_5 158 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 159 && BOOST_PP_ITERATION_FINISH_5 >= 159 +# define BOOST_PP_ITERATION_5 159 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 160 && BOOST_PP_ITERATION_FINISH_5 >= 160 +# define BOOST_PP_ITERATION_5 160 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 161 && BOOST_PP_ITERATION_FINISH_5 >= 161 +# define BOOST_PP_ITERATION_5 161 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 162 && BOOST_PP_ITERATION_FINISH_5 >= 162 +# define BOOST_PP_ITERATION_5 162 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 163 && BOOST_PP_ITERATION_FINISH_5 >= 163 +# define BOOST_PP_ITERATION_5 163 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 164 && BOOST_PP_ITERATION_FINISH_5 >= 164 +# define BOOST_PP_ITERATION_5 164 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 165 && BOOST_PP_ITERATION_FINISH_5 >= 165 +# define BOOST_PP_ITERATION_5 165 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 166 && BOOST_PP_ITERATION_FINISH_5 >= 166 +# define BOOST_PP_ITERATION_5 166 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 167 && BOOST_PP_ITERATION_FINISH_5 >= 167 +# define BOOST_PP_ITERATION_5 167 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 168 && BOOST_PP_ITERATION_FINISH_5 >= 168 +# define BOOST_PP_ITERATION_5 168 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 169 && BOOST_PP_ITERATION_FINISH_5 >= 169 +# define BOOST_PP_ITERATION_5 169 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 170 && BOOST_PP_ITERATION_FINISH_5 >= 170 +# define BOOST_PP_ITERATION_5 170 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 171 && BOOST_PP_ITERATION_FINISH_5 >= 171 +# define BOOST_PP_ITERATION_5 171 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 172 && BOOST_PP_ITERATION_FINISH_5 >= 172 +# define BOOST_PP_ITERATION_5 172 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 173 && BOOST_PP_ITERATION_FINISH_5 >= 173 +# define BOOST_PP_ITERATION_5 173 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 174 && BOOST_PP_ITERATION_FINISH_5 >= 174 +# define BOOST_PP_ITERATION_5 174 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 175 && BOOST_PP_ITERATION_FINISH_5 >= 175 +# define BOOST_PP_ITERATION_5 175 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 176 && BOOST_PP_ITERATION_FINISH_5 >= 176 +# define BOOST_PP_ITERATION_5 176 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 177 && BOOST_PP_ITERATION_FINISH_5 >= 177 +# define BOOST_PP_ITERATION_5 177 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 178 && BOOST_PP_ITERATION_FINISH_5 >= 178 +# define BOOST_PP_ITERATION_5 178 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 179 && BOOST_PP_ITERATION_FINISH_5 >= 179 +# define BOOST_PP_ITERATION_5 179 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 180 && BOOST_PP_ITERATION_FINISH_5 >= 180 +# define BOOST_PP_ITERATION_5 180 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 181 && BOOST_PP_ITERATION_FINISH_5 >= 181 +# define BOOST_PP_ITERATION_5 181 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 182 && BOOST_PP_ITERATION_FINISH_5 >= 182 +# define BOOST_PP_ITERATION_5 182 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 183 && BOOST_PP_ITERATION_FINISH_5 >= 183 +# define BOOST_PP_ITERATION_5 183 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 184 && BOOST_PP_ITERATION_FINISH_5 >= 184 +# define BOOST_PP_ITERATION_5 184 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 185 && BOOST_PP_ITERATION_FINISH_5 >= 185 +# define BOOST_PP_ITERATION_5 185 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 186 && BOOST_PP_ITERATION_FINISH_5 >= 186 +# define BOOST_PP_ITERATION_5 186 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 187 && BOOST_PP_ITERATION_FINISH_5 >= 187 +# define BOOST_PP_ITERATION_5 187 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 188 && BOOST_PP_ITERATION_FINISH_5 >= 188 +# define BOOST_PP_ITERATION_5 188 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 189 && BOOST_PP_ITERATION_FINISH_5 >= 189 +# define BOOST_PP_ITERATION_5 189 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 190 && BOOST_PP_ITERATION_FINISH_5 >= 190 +# define BOOST_PP_ITERATION_5 190 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 191 && BOOST_PP_ITERATION_FINISH_5 >= 191 +# define BOOST_PP_ITERATION_5 191 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 192 && BOOST_PP_ITERATION_FINISH_5 >= 192 +# define BOOST_PP_ITERATION_5 192 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 193 && BOOST_PP_ITERATION_FINISH_5 >= 193 +# define BOOST_PP_ITERATION_5 193 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 194 && BOOST_PP_ITERATION_FINISH_5 >= 194 +# define BOOST_PP_ITERATION_5 194 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 195 && BOOST_PP_ITERATION_FINISH_5 >= 195 +# define BOOST_PP_ITERATION_5 195 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 196 && BOOST_PP_ITERATION_FINISH_5 >= 196 +# define BOOST_PP_ITERATION_5 196 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 197 && BOOST_PP_ITERATION_FINISH_5 >= 197 +# define BOOST_PP_ITERATION_5 197 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 198 && BOOST_PP_ITERATION_FINISH_5 >= 198 +# define BOOST_PP_ITERATION_5 198 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 199 && BOOST_PP_ITERATION_FINISH_5 >= 199 +# define BOOST_PP_ITERATION_5 199 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 200 && BOOST_PP_ITERATION_FINISH_5 >= 200 +# define BOOST_PP_ITERATION_5 200 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 201 && BOOST_PP_ITERATION_FINISH_5 >= 201 +# define BOOST_PP_ITERATION_5 201 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 202 && BOOST_PP_ITERATION_FINISH_5 >= 202 +# define BOOST_PP_ITERATION_5 202 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 203 && BOOST_PP_ITERATION_FINISH_5 >= 203 +# define BOOST_PP_ITERATION_5 203 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 204 && BOOST_PP_ITERATION_FINISH_5 >= 204 +# define BOOST_PP_ITERATION_5 204 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 205 && BOOST_PP_ITERATION_FINISH_5 >= 205 +# define BOOST_PP_ITERATION_5 205 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 206 && BOOST_PP_ITERATION_FINISH_5 >= 206 +# define BOOST_PP_ITERATION_5 206 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 207 && BOOST_PP_ITERATION_FINISH_5 >= 207 +# define BOOST_PP_ITERATION_5 207 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 208 && BOOST_PP_ITERATION_FINISH_5 >= 208 +# define BOOST_PP_ITERATION_5 208 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 209 && BOOST_PP_ITERATION_FINISH_5 >= 209 +# define BOOST_PP_ITERATION_5 209 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 210 && BOOST_PP_ITERATION_FINISH_5 >= 210 +# define BOOST_PP_ITERATION_5 210 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 211 && BOOST_PP_ITERATION_FINISH_5 >= 211 +# define BOOST_PP_ITERATION_5 211 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 212 && BOOST_PP_ITERATION_FINISH_5 >= 212 +# define BOOST_PP_ITERATION_5 212 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 213 && BOOST_PP_ITERATION_FINISH_5 >= 213 +# define BOOST_PP_ITERATION_5 213 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 214 && BOOST_PP_ITERATION_FINISH_5 >= 214 +# define BOOST_PP_ITERATION_5 214 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 215 && BOOST_PP_ITERATION_FINISH_5 >= 215 +# define BOOST_PP_ITERATION_5 215 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 216 && BOOST_PP_ITERATION_FINISH_5 >= 216 +# define BOOST_PP_ITERATION_5 216 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 217 && BOOST_PP_ITERATION_FINISH_5 >= 217 +# define BOOST_PP_ITERATION_5 217 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 218 && BOOST_PP_ITERATION_FINISH_5 >= 218 +# define BOOST_PP_ITERATION_5 218 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 219 && BOOST_PP_ITERATION_FINISH_5 >= 219 +# define BOOST_PP_ITERATION_5 219 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 220 && BOOST_PP_ITERATION_FINISH_5 >= 220 +# define BOOST_PP_ITERATION_5 220 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 221 && BOOST_PP_ITERATION_FINISH_5 >= 221 +# define BOOST_PP_ITERATION_5 221 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 222 && BOOST_PP_ITERATION_FINISH_5 >= 222 +# define BOOST_PP_ITERATION_5 222 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 223 && BOOST_PP_ITERATION_FINISH_5 >= 223 +# define BOOST_PP_ITERATION_5 223 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 224 && BOOST_PP_ITERATION_FINISH_5 >= 224 +# define BOOST_PP_ITERATION_5 224 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 225 && BOOST_PP_ITERATION_FINISH_5 >= 225 +# define BOOST_PP_ITERATION_5 225 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 226 && BOOST_PP_ITERATION_FINISH_5 >= 226 +# define BOOST_PP_ITERATION_5 226 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 227 && BOOST_PP_ITERATION_FINISH_5 >= 227 +# define BOOST_PP_ITERATION_5 227 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 228 && BOOST_PP_ITERATION_FINISH_5 >= 228 +# define BOOST_PP_ITERATION_5 228 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 229 && BOOST_PP_ITERATION_FINISH_5 >= 229 +# define BOOST_PP_ITERATION_5 229 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 230 && BOOST_PP_ITERATION_FINISH_5 >= 230 +# define BOOST_PP_ITERATION_5 230 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 231 && BOOST_PP_ITERATION_FINISH_5 >= 231 +# define BOOST_PP_ITERATION_5 231 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 232 && BOOST_PP_ITERATION_FINISH_5 >= 232 +# define BOOST_PP_ITERATION_5 232 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 233 && BOOST_PP_ITERATION_FINISH_5 >= 233 +# define BOOST_PP_ITERATION_5 233 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 234 && BOOST_PP_ITERATION_FINISH_5 >= 234 +# define BOOST_PP_ITERATION_5 234 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 235 && BOOST_PP_ITERATION_FINISH_5 >= 235 +# define BOOST_PP_ITERATION_5 235 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 236 && BOOST_PP_ITERATION_FINISH_5 >= 236 +# define BOOST_PP_ITERATION_5 236 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 237 && BOOST_PP_ITERATION_FINISH_5 >= 237 +# define BOOST_PP_ITERATION_5 237 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 238 && BOOST_PP_ITERATION_FINISH_5 >= 238 +# define BOOST_PP_ITERATION_5 238 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 239 && BOOST_PP_ITERATION_FINISH_5 >= 239 +# define BOOST_PP_ITERATION_5 239 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 240 && BOOST_PP_ITERATION_FINISH_5 >= 240 +# define BOOST_PP_ITERATION_5 240 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 241 && BOOST_PP_ITERATION_FINISH_5 >= 241 +# define BOOST_PP_ITERATION_5 241 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 242 && BOOST_PP_ITERATION_FINISH_5 >= 242 +# define BOOST_PP_ITERATION_5 242 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 243 && BOOST_PP_ITERATION_FINISH_5 >= 243 +# define BOOST_PP_ITERATION_5 243 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 244 && BOOST_PP_ITERATION_FINISH_5 >= 244 +# define BOOST_PP_ITERATION_5 244 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 245 && BOOST_PP_ITERATION_FINISH_5 >= 245 +# define BOOST_PP_ITERATION_5 245 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 246 && BOOST_PP_ITERATION_FINISH_5 >= 246 +# define BOOST_PP_ITERATION_5 246 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 247 && BOOST_PP_ITERATION_FINISH_5 >= 247 +# define BOOST_PP_ITERATION_5 247 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 248 && BOOST_PP_ITERATION_FINISH_5 >= 248 +# define BOOST_PP_ITERATION_5 248 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 249 && BOOST_PP_ITERATION_FINISH_5 >= 249 +# define BOOST_PP_ITERATION_5 249 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 250 && BOOST_PP_ITERATION_FINISH_5 >= 250 +# define BOOST_PP_ITERATION_5 250 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 251 && BOOST_PP_ITERATION_FINISH_5 >= 251 +# define BOOST_PP_ITERATION_5 251 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 252 && BOOST_PP_ITERATION_FINISH_5 >= 252 +# define BOOST_PP_ITERATION_5 252 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 253 && BOOST_PP_ITERATION_FINISH_5 >= 253 +# define BOOST_PP_ITERATION_5 253 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 254 && BOOST_PP_ITERATION_FINISH_5 >= 254 +# define BOOST_PP_ITERATION_5 254 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 255 && BOOST_PP_ITERATION_FINISH_5 >= 255 +# define BOOST_PP_ITERATION_5 255 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 256 && BOOST_PP_ITERATION_FINISH_5 >= 256 +# define BOOST_PP_ITERATION_5 256 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 4 +# +# undef BOOST_PP_ITERATION_START_5 +# undef BOOST_PP_ITERATION_FINISH_5 +# undef BOOST_PP_FILENAME_5 +# +# undef BOOST_PP_ITERATION_FLAGS_5 +# undef BOOST_PP_ITERATION_PARAMS_5 diff --git a/contrib/src/boost/preprocessor/iteration/detail/iter/reverse1.hpp b/contrib/src/boost/preprocessor/iteration/detail/iter/reverse1.hpp new file mode 100644 index 0000000..bf88d2f --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/iter/reverse1.hpp @@ -0,0 +1,1296 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if BOOST_PP_ITERATION_FINISH_1 <= 256 && BOOST_PP_ITERATION_START_1 >= 256 +# define BOOST_PP_ITERATION_1 256 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 255 && BOOST_PP_ITERATION_START_1 >= 255 +# define BOOST_PP_ITERATION_1 255 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 254 && BOOST_PP_ITERATION_START_1 >= 254 +# define BOOST_PP_ITERATION_1 254 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 253 && BOOST_PP_ITERATION_START_1 >= 253 +# define BOOST_PP_ITERATION_1 253 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 252 && BOOST_PP_ITERATION_START_1 >= 252 +# define BOOST_PP_ITERATION_1 252 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 251 && BOOST_PP_ITERATION_START_1 >= 251 +# define BOOST_PP_ITERATION_1 251 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 250 && BOOST_PP_ITERATION_START_1 >= 250 +# define BOOST_PP_ITERATION_1 250 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 249 && BOOST_PP_ITERATION_START_1 >= 249 +# define BOOST_PP_ITERATION_1 249 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 248 && BOOST_PP_ITERATION_START_1 >= 248 +# define BOOST_PP_ITERATION_1 248 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 247 && BOOST_PP_ITERATION_START_1 >= 247 +# define BOOST_PP_ITERATION_1 247 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 246 && BOOST_PP_ITERATION_START_1 >= 246 +# define BOOST_PP_ITERATION_1 246 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 245 && BOOST_PP_ITERATION_START_1 >= 245 +# define BOOST_PP_ITERATION_1 245 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 244 && BOOST_PP_ITERATION_START_1 >= 244 +# define BOOST_PP_ITERATION_1 244 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 243 && BOOST_PP_ITERATION_START_1 >= 243 +# define BOOST_PP_ITERATION_1 243 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 242 && BOOST_PP_ITERATION_START_1 >= 242 +# define BOOST_PP_ITERATION_1 242 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 241 && BOOST_PP_ITERATION_START_1 >= 241 +# define BOOST_PP_ITERATION_1 241 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 240 && BOOST_PP_ITERATION_START_1 >= 240 +# define BOOST_PP_ITERATION_1 240 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 239 && BOOST_PP_ITERATION_START_1 >= 239 +# define BOOST_PP_ITERATION_1 239 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 238 && BOOST_PP_ITERATION_START_1 >= 238 +# define BOOST_PP_ITERATION_1 238 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 237 && BOOST_PP_ITERATION_START_1 >= 237 +# define BOOST_PP_ITERATION_1 237 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 236 && BOOST_PP_ITERATION_START_1 >= 236 +# define BOOST_PP_ITERATION_1 236 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 235 && BOOST_PP_ITERATION_START_1 >= 235 +# define BOOST_PP_ITERATION_1 235 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 234 && BOOST_PP_ITERATION_START_1 >= 234 +# define BOOST_PP_ITERATION_1 234 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 233 && BOOST_PP_ITERATION_START_1 >= 233 +# define BOOST_PP_ITERATION_1 233 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 232 && BOOST_PP_ITERATION_START_1 >= 232 +# define BOOST_PP_ITERATION_1 232 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 231 && BOOST_PP_ITERATION_START_1 >= 231 +# define BOOST_PP_ITERATION_1 231 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 230 && BOOST_PP_ITERATION_START_1 >= 230 +# define BOOST_PP_ITERATION_1 230 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 229 && BOOST_PP_ITERATION_START_1 >= 229 +# define BOOST_PP_ITERATION_1 229 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 228 && BOOST_PP_ITERATION_START_1 >= 228 +# define BOOST_PP_ITERATION_1 228 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 227 && BOOST_PP_ITERATION_START_1 >= 227 +# define BOOST_PP_ITERATION_1 227 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 226 && BOOST_PP_ITERATION_START_1 >= 226 +# define BOOST_PP_ITERATION_1 226 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 225 && BOOST_PP_ITERATION_START_1 >= 225 +# define BOOST_PP_ITERATION_1 225 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 224 && BOOST_PP_ITERATION_START_1 >= 224 +# define BOOST_PP_ITERATION_1 224 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 223 && BOOST_PP_ITERATION_START_1 >= 223 +# define BOOST_PP_ITERATION_1 223 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 222 && BOOST_PP_ITERATION_START_1 >= 222 +# define BOOST_PP_ITERATION_1 222 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 221 && BOOST_PP_ITERATION_START_1 >= 221 +# define BOOST_PP_ITERATION_1 221 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 220 && BOOST_PP_ITERATION_START_1 >= 220 +# define BOOST_PP_ITERATION_1 220 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 219 && BOOST_PP_ITERATION_START_1 >= 219 +# define BOOST_PP_ITERATION_1 219 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 218 && BOOST_PP_ITERATION_START_1 >= 218 +# define BOOST_PP_ITERATION_1 218 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 217 && BOOST_PP_ITERATION_START_1 >= 217 +# define BOOST_PP_ITERATION_1 217 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 216 && BOOST_PP_ITERATION_START_1 >= 216 +# define BOOST_PP_ITERATION_1 216 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 215 && BOOST_PP_ITERATION_START_1 >= 215 +# define BOOST_PP_ITERATION_1 215 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 214 && BOOST_PP_ITERATION_START_1 >= 214 +# define BOOST_PP_ITERATION_1 214 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 213 && BOOST_PP_ITERATION_START_1 >= 213 +# define BOOST_PP_ITERATION_1 213 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 212 && BOOST_PP_ITERATION_START_1 >= 212 +# define BOOST_PP_ITERATION_1 212 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 211 && BOOST_PP_ITERATION_START_1 >= 211 +# define BOOST_PP_ITERATION_1 211 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 210 && BOOST_PP_ITERATION_START_1 >= 210 +# define BOOST_PP_ITERATION_1 210 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 209 && BOOST_PP_ITERATION_START_1 >= 209 +# define BOOST_PP_ITERATION_1 209 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 208 && BOOST_PP_ITERATION_START_1 >= 208 +# define BOOST_PP_ITERATION_1 208 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 207 && BOOST_PP_ITERATION_START_1 >= 207 +# define BOOST_PP_ITERATION_1 207 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 206 && BOOST_PP_ITERATION_START_1 >= 206 +# define BOOST_PP_ITERATION_1 206 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 205 && BOOST_PP_ITERATION_START_1 >= 205 +# define BOOST_PP_ITERATION_1 205 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 204 && BOOST_PP_ITERATION_START_1 >= 204 +# define BOOST_PP_ITERATION_1 204 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 203 && BOOST_PP_ITERATION_START_1 >= 203 +# define BOOST_PP_ITERATION_1 203 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 202 && BOOST_PP_ITERATION_START_1 >= 202 +# define BOOST_PP_ITERATION_1 202 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 201 && BOOST_PP_ITERATION_START_1 >= 201 +# define BOOST_PP_ITERATION_1 201 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 200 && BOOST_PP_ITERATION_START_1 >= 200 +# define BOOST_PP_ITERATION_1 200 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 199 && BOOST_PP_ITERATION_START_1 >= 199 +# define BOOST_PP_ITERATION_1 199 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 198 && BOOST_PP_ITERATION_START_1 >= 198 +# define BOOST_PP_ITERATION_1 198 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 197 && BOOST_PP_ITERATION_START_1 >= 197 +# define BOOST_PP_ITERATION_1 197 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 196 && BOOST_PP_ITERATION_START_1 >= 196 +# define BOOST_PP_ITERATION_1 196 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 195 && BOOST_PP_ITERATION_START_1 >= 195 +# define BOOST_PP_ITERATION_1 195 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 194 && BOOST_PP_ITERATION_START_1 >= 194 +# define BOOST_PP_ITERATION_1 194 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 193 && BOOST_PP_ITERATION_START_1 >= 193 +# define BOOST_PP_ITERATION_1 193 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 192 && BOOST_PP_ITERATION_START_1 >= 192 +# define BOOST_PP_ITERATION_1 192 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 191 && BOOST_PP_ITERATION_START_1 >= 191 +# define BOOST_PP_ITERATION_1 191 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 190 && BOOST_PP_ITERATION_START_1 >= 190 +# define BOOST_PP_ITERATION_1 190 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 189 && BOOST_PP_ITERATION_START_1 >= 189 +# define BOOST_PP_ITERATION_1 189 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 188 && BOOST_PP_ITERATION_START_1 >= 188 +# define BOOST_PP_ITERATION_1 188 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 187 && BOOST_PP_ITERATION_START_1 >= 187 +# define BOOST_PP_ITERATION_1 187 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 186 && BOOST_PP_ITERATION_START_1 >= 186 +# define BOOST_PP_ITERATION_1 186 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 185 && BOOST_PP_ITERATION_START_1 >= 185 +# define BOOST_PP_ITERATION_1 185 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 184 && BOOST_PP_ITERATION_START_1 >= 184 +# define BOOST_PP_ITERATION_1 184 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 183 && BOOST_PP_ITERATION_START_1 >= 183 +# define BOOST_PP_ITERATION_1 183 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 182 && BOOST_PP_ITERATION_START_1 >= 182 +# define BOOST_PP_ITERATION_1 182 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 181 && BOOST_PP_ITERATION_START_1 >= 181 +# define BOOST_PP_ITERATION_1 181 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 180 && BOOST_PP_ITERATION_START_1 >= 180 +# define BOOST_PP_ITERATION_1 180 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 179 && BOOST_PP_ITERATION_START_1 >= 179 +# define BOOST_PP_ITERATION_1 179 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 178 && BOOST_PP_ITERATION_START_1 >= 178 +# define BOOST_PP_ITERATION_1 178 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 177 && BOOST_PP_ITERATION_START_1 >= 177 +# define BOOST_PP_ITERATION_1 177 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 176 && BOOST_PP_ITERATION_START_1 >= 176 +# define BOOST_PP_ITERATION_1 176 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 175 && BOOST_PP_ITERATION_START_1 >= 175 +# define BOOST_PP_ITERATION_1 175 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 174 && BOOST_PP_ITERATION_START_1 >= 174 +# define BOOST_PP_ITERATION_1 174 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 173 && BOOST_PP_ITERATION_START_1 >= 173 +# define BOOST_PP_ITERATION_1 173 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 172 && BOOST_PP_ITERATION_START_1 >= 172 +# define BOOST_PP_ITERATION_1 172 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 171 && BOOST_PP_ITERATION_START_1 >= 171 +# define BOOST_PP_ITERATION_1 171 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 170 && BOOST_PP_ITERATION_START_1 >= 170 +# define BOOST_PP_ITERATION_1 170 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 169 && BOOST_PP_ITERATION_START_1 >= 169 +# define BOOST_PP_ITERATION_1 169 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 168 && BOOST_PP_ITERATION_START_1 >= 168 +# define BOOST_PP_ITERATION_1 168 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 167 && BOOST_PP_ITERATION_START_1 >= 167 +# define BOOST_PP_ITERATION_1 167 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 166 && BOOST_PP_ITERATION_START_1 >= 166 +# define BOOST_PP_ITERATION_1 166 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 165 && BOOST_PP_ITERATION_START_1 >= 165 +# define BOOST_PP_ITERATION_1 165 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 164 && BOOST_PP_ITERATION_START_1 >= 164 +# define BOOST_PP_ITERATION_1 164 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 163 && BOOST_PP_ITERATION_START_1 >= 163 +# define BOOST_PP_ITERATION_1 163 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 162 && BOOST_PP_ITERATION_START_1 >= 162 +# define BOOST_PP_ITERATION_1 162 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 161 && BOOST_PP_ITERATION_START_1 >= 161 +# define BOOST_PP_ITERATION_1 161 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 160 && BOOST_PP_ITERATION_START_1 >= 160 +# define BOOST_PP_ITERATION_1 160 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 159 && BOOST_PP_ITERATION_START_1 >= 159 +# define BOOST_PP_ITERATION_1 159 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 158 && BOOST_PP_ITERATION_START_1 >= 158 +# define BOOST_PP_ITERATION_1 158 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 157 && BOOST_PP_ITERATION_START_1 >= 157 +# define BOOST_PP_ITERATION_1 157 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 156 && BOOST_PP_ITERATION_START_1 >= 156 +# define BOOST_PP_ITERATION_1 156 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 155 && BOOST_PP_ITERATION_START_1 >= 155 +# define BOOST_PP_ITERATION_1 155 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 154 && BOOST_PP_ITERATION_START_1 >= 154 +# define BOOST_PP_ITERATION_1 154 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 153 && BOOST_PP_ITERATION_START_1 >= 153 +# define BOOST_PP_ITERATION_1 153 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 152 && BOOST_PP_ITERATION_START_1 >= 152 +# define BOOST_PP_ITERATION_1 152 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 151 && BOOST_PP_ITERATION_START_1 >= 151 +# define BOOST_PP_ITERATION_1 151 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 150 && BOOST_PP_ITERATION_START_1 >= 150 +# define BOOST_PP_ITERATION_1 150 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 149 && BOOST_PP_ITERATION_START_1 >= 149 +# define BOOST_PP_ITERATION_1 149 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 148 && BOOST_PP_ITERATION_START_1 >= 148 +# define BOOST_PP_ITERATION_1 148 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 147 && BOOST_PP_ITERATION_START_1 >= 147 +# define BOOST_PP_ITERATION_1 147 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 146 && BOOST_PP_ITERATION_START_1 >= 146 +# define BOOST_PP_ITERATION_1 146 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 145 && BOOST_PP_ITERATION_START_1 >= 145 +# define BOOST_PP_ITERATION_1 145 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 144 && BOOST_PP_ITERATION_START_1 >= 144 +# define BOOST_PP_ITERATION_1 144 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 143 && BOOST_PP_ITERATION_START_1 >= 143 +# define BOOST_PP_ITERATION_1 143 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 142 && BOOST_PP_ITERATION_START_1 >= 142 +# define BOOST_PP_ITERATION_1 142 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 141 && BOOST_PP_ITERATION_START_1 >= 141 +# define BOOST_PP_ITERATION_1 141 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 140 && BOOST_PP_ITERATION_START_1 >= 140 +# define BOOST_PP_ITERATION_1 140 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 139 && BOOST_PP_ITERATION_START_1 >= 139 +# define BOOST_PP_ITERATION_1 139 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 138 && BOOST_PP_ITERATION_START_1 >= 138 +# define BOOST_PP_ITERATION_1 138 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 137 && BOOST_PP_ITERATION_START_1 >= 137 +# define BOOST_PP_ITERATION_1 137 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 136 && BOOST_PP_ITERATION_START_1 >= 136 +# define BOOST_PP_ITERATION_1 136 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 135 && BOOST_PP_ITERATION_START_1 >= 135 +# define BOOST_PP_ITERATION_1 135 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 134 && BOOST_PP_ITERATION_START_1 >= 134 +# define BOOST_PP_ITERATION_1 134 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 133 && BOOST_PP_ITERATION_START_1 >= 133 +# define BOOST_PP_ITERATION_1 133 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 132 && BOOST_PP_ITERATION_START_1 >= 132 +# define BOOST_PP_ITERATION_1 132 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 131 && BOOST_PP_ITERATION_START_1 >= 131 +# define BOOST_PP_ITERATION_1 131 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 130 && BOOST_PP_ITERATION_START_1 >= 130 +# define BOOST_PP_ITERATION_1 130 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 129 && BOOST_PP_ITERATION_START_1 >= 129 +# define BOOST_PP_ITERATION_1 129 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 128 && BOOST_PP_ITERATION_START_1 >= 128 +# define BOOST_PP_ITERATION_1 128 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 127 && BOOST_PP_ITERATION_START_1 >= 127 +# define BOOST_PP_ITERATION_1 127 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 126 && BOOST_PP_ITERATION_START_1 >= 126 +# define BOOST_PP_ITERATION_1 126 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 125 && BOOST_PP_ITERATION_START_1 >= 125 +# define BOOST_PP_ITERATION_1 125 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 124 && BOOST_PP_ITERATION_START_1 >= 124 +# define BOOST_PP_ITERATION_1 124 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 123 && BOOST_PP_ITERATION_START_1 >= 123 +# define BOOST_PP_ITERATION_1 123 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 122 && BOOST_PP_ITERATION_START_1 >= 122 +# define BOOST_PP_ITERATION_1 122 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 121 && BOOST_PP_ITERATION_START_1 >= 121 +# define BOOST_PP_ITERATION_1 121 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 120 && BOOST_PP_ITERATION_START_1 >= 120 +# define BOOST_PP_ITERATION_1 120 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 119 && BOOST_PP_ITERATION_START_1 >= 119 +# define BOOST_PP_ITERATION_1 119 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 118 && BOOST_PP_ITERATION_START_1 >= 118 +# define BOOST_PP_ITERATION_1 118 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 117 && BOOST_PP_ITERATION_START_1 >= 117 +# define BOOST_PP_ITERATION_1 117 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 116 && BOOST_PP_ITERATION_START_1 >= 116 +# define BOOST_PP_ITERATION_1 116 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 115 && BOOST_PP_ITERATION_START_1 >= 115 +# define BOOST_PP_ITERATION_1 115 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 114 && BOOST_PP_ITERATION_START_1 >= 114 +# define BOOST_PP_ITERATION_1 114 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 113 && BOOST_PP_ITERATION_START_1 >= 113 +# define BOOST_PP_ITERATION_1 113 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 112 && BOOST_PP_ITERATION_START_1 >= 112 +# define BOOST_PP_ITERATION_1 112 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 111 && BOOST_PP_ITERATION_START_1 >= 111 +# define BOOST_PP_ITERATION_1 111 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 110 && BOOST_PP_ITERATION_START_1 >= 110 +# define BOOST_PP_ITERATION_1 110 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 109 && BOOST_PP_ITERATION_START_1 >= 109 +# define BOOST_PP_ITERATION_1 109 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 108 && BOOST_PP_ITERATION_START_1 >= 108 +# define BOOST_PP_ITERATION_1 108 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 107 && BOOST_PP_ITERATION_START_1 >= 107 +# define BOOST_PP_ITERATION_1 107 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 106 && BOOST_PP_ITERATION_START_1 >= 106 +# define BOOST_PP_ITERATION_1 106 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 105 && BOOST_PP_ITERATION_START_1 >= 105 +# define BOOST_PP_ITERATION_1 105 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 104 && BOOST_PP_ITERATION_START_1 >= 104 +# define BOOST_PP_ITERATION_1 104 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 103 && BOOST_PP_ITERATION_START_1 >= 103 +# define BOOST_PP_ITERATION_1 103 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 102 && BOOST_PP_ITERATION_START_1 >= 102 +# define BOOST_PP_ITERATION_1 102 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 101 && BOOST_PP_ITERATION_START_1 >= 101 +# define BOOST_PP_ITERATION_1 101 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 100 && BOOST_PP_ITERATION_START_1 >= 100 +# define BOOST_PP_ITERATION_1 100 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 99 && BOOST_PP_ITERATION_START_1 >= 99 +# define BOOST_PP_ITERATION_1 99 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 98 && BOOST_PP_ITERATION_START_1 >= 98 +# define BOOST_PP_ITERATION_1 98 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 97 && BOOST_PP_ITERATION_START_1 >= 97 +# define BOOST_PP_ITERATION_1 97 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 96 && BOOST_PP_ITERATION_START_1 >= 96 +# define BOOST_PP_ITERATION_1 96 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 95 && BOOST_PP_ITERATION_START_1 >= 95 +# define BOOST_PP_ITERATION_1 95 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 94 && BOOST_PP_ITERATION_START_1 >= 94 +# define BOOST_PP_ITERATION_1 94 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 93 && BOOST_PP_ITERATION_START_1 >= 93 +# define BOOST_PP_ITERATION_1 93 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 92 && BOOST_PP_ITERATION_START_1 >= 92 +# define BOOST_PP_ITERATION_1 92 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 91 && BOOST_PP_ITERATION_START_1 >= 91 +# define BOOST_PP_ITERATION_1 91 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 90 && BOOST_PP_ITERATION_START_1 >= 90 +# define BOOST_PP_ITERATION_1 90 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 89 && BOOST_PP_ITERATION_START_1 >= 89 +# define BOOST_PP_ITERATION_1 89 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 88 && BOOST_PP_ITERATION_START_1 >= 88 +# define BOOST_PP_ITERATION_1 88 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 87 && BOOST_PP_ITERATION_START_1 >= 87 +# define BOOST_PP_ITERATION_1 87 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 86 && BOOST_PP_ITERATION_START_1 >= 86 +# define BOOST_PP_ITERATION_1 86 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 85 && BOOST_PP_ITERATION_START_1 >= 85 +# define BOOST_PP_ITERATION_1 85 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 84 && BOOST_PP_ITERATION_START_1 >= 84 +# define BOOST_PP_ITERATION_1 84 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 83 && BOOST_PP_ITERATION_START_1 >= 83 +# define BOOST_PP_ITERATION_1 83 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 82 && BOOST_PP_ITERATION_START_1 >= 82 +# define BOOST_PP_ITERATION_1 82 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 81 && BOOST_PP_ITERATION_START_1 >= 81 +# define BOOST_PP_ITERATION_1 81 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 80 && BOOST_PP_ITERATION_START_1 >= 80 +# define BOOST_PP_ITERATION_1 80 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 79 && BOOST_PP_ITERATION_START_1 >= 79 +# define BOOST_PP_ITERATION_1 79 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 78 && BOOST_PP_ITERATION_START_1 >= 78 +# define BOOST_PP_ITERATION_1 78 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 77 && BOOST_PP_ITERATION_START_1 >= 77 +# define BOOST_PP_ITERATION_1 77 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 76 && BOOST_PP_ITERATION_START_1 >= 76 +# define BOOST_PP_ITERATION_1 76 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 75 && BOOST_PP_ITERATION_START_1 >= 75 +# define BOOST_PP_ITERATION_1 75 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 74 && BOOST_PP_ITERATION_START_1 >= 74 +# define BOOST_PP_ITERATION_1 74 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 73 && BOOST_PP_ITERATION_START_1 >= 73 +# define BOOST_PP_ITERATION_1 73 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 72 && BOOST_PP_ITERATION_START_1 >= 72 +# define BOOST_PP_ITERATION_1 72 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 71 && BOOST_PP_ITERATION_START_1 >= 71 +# define BOOST_PP_ITERATION_1 71 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 70 && BOOST_PP_ITERATION_START_1 >= 70 +# define BOOST_PP_ITERATION_1 70 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 69 && BOOST_PP_ITERATION_START_1 >= 69 +# define BOOST_PP_ITERATION_1 69 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 68 && BOOST_PP_ITERATION_START_1 >= 68 +# define BOOST_PP_ITERATION_1 68 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 67 && BOOST_PP_ITERATION_START_1 >= 67 +# define BOOST_PP_ITERATION_1 67 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 66 && BOOST_PP_ITERATION_START_1 >= 66 +# define BOOST_PP_ITERATION_1 66 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 65 && BOOST_PP_ITERATION_START_1 >= 65 +# define BOOST_PP_ITERATION_1 65 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 64 && BOOST_PP_ITERATION_START_1 >= 64 +# define BOOST_PP_ITERATION_1 64 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 63 && BOOST_PP_ITERATION_START_1 >= 63 +# define BOOST_PP_ITERATION_1 63 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 62 && BOOST_PP_ITERATION_START_1 >= 62 +# define BOOST_PP_ITERATION_1 62 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 61 && BOOST_PP_ITERATION_START_1 >= 61 +# define BOOST_PP_ITERATION_1 61 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 60 && BOOST_PP_ITERATION_START_1 >= 60 +# define BOOST_PP_ITERATION_1 60 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 59 && BOOST_PP_ITERATION_START_1 >= 59 +# define BOOST_PP_ITERATION_1 59 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 58 && BOOST_PP_ITERATION_START_1 >= 58 +# define BOOST_PP_ITERATION_1 58 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 57 && BOOST_PP_ITERATION_START_1 >= 57 +# define BOOST_PP_ITERATION_1 57 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 56 && BOOST_PP_ITERATION_START_1 >= 56 +# define BOOST_PP_ITERATION_1 56 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 55 && BOOST_PP_ITERATION_START_1 >= 55 +# define BOOST_PP_ITERATION_1 55 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 54 && BOOST_PP_ITERATION_START_1 >= 54 +# define BOOST_PP_ITERATION_1 54 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 53 && BOOST_PP_ITERATION_START_1 >= 53 +# define BOOST_PP_ITERATION_1 53 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 52 && BOOST_PP_ITERATION_START_1 >= 52 +# define BOOST_PP_ITERATION_1 52 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 51 && BOOST_PP_ITERATION_START_1 >= 51 +# define BOOST_PP_ITERATION_1 51 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 50 && BOOST_PP_ITERATION_START_1 >= 50 +# define BOOST_PP_ITERATION_1 50 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 49 && BOOST_PP_ITERATION_START_1 >= 49 +# define BOOST_PP_ITERATION_1 49 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 48 && BOOST_PP_ITERATION_START_1 >= 48 +# define BOOST_PP_ITERATION_1 48 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 47 && BOOST_PP_ITERATION_START_1 >= 47 +# define BOOST_PP_ITERATION_1 47 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 46 && BOOST_PP_ITERATION_START_1 >= 46 +# define BOOST_PP_ITERATION_1 46 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 45 && BOOST_PP_ITERATION_START_1 >= 45 +# define BOOST_PP_ITERATION_1 45 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 44 && BOOST_PP_ITERATION_START_1 >= 44 +# define BOOST_PP_ITERATION_1 44 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 43 && BOOST_PP_ITERATION_START_1 >= 43 +# define BOOST_PP_ITERATION_1 43 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 42 && BOOST_PP_ITERATION_START_1 >= 42 +# define BOOST_PP_ITERATION_1 42 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 41 && BOOST_PP_ITERATION_START_1 >= 41 +# define BOOST_PP_ITERATION_1 41 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 40 && BOOST_PP_ITERATION_START_1 >= 40 +# define BOOST_PP_ITERATION_1 40 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 39 && BOOST_PP_ITERATION_START_1 >= 39 +# define BOOST_PP_ITERATION_1 39 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 38 && BOOST_PP_ITERATION_START_1 >= 38 +# define BOOST_PP_ITERATION_1 38 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 37 && BOOST_PP_ITERATION_START_1 >= 37 +# define BOOST_PP_ITERATION_1 37 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 36 && BOOST_PP_ITERATION_START_1 >= 36 +# define BOOST_PP_ITERATION_1 36 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 35 && BOOST_PP_ITERATION_START_1 >= 35 +# define BOOST_PP_ITERATION_1 35 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 34 && BOOST_PP_ITERATION_START_1 >= 34 +# define BOOST_PP_ITERATION_1 34 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 33 && BOOST_PP_ITERATION_START_1 >= 33 +# define BOOST_PP_ITERATION_1 33 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 32 && BOOST_PP_ITERATION_START_1 >= 32 +# define BOOST_PP_ITERATION_1 32 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 31 && BOOST_PP_ITERATION_START_1 >= 31 +# define BOOST_PP_ITERATION_1 31 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 30 && BOOST_PP_ITERATION_START_1 >= 30 +# define BOOST_PP_ITERATION_1 30 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 29 && BOOST_PP_ITERATION_START_1 >= 29 +# define BOOST_PP_ITERATION_1 29 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 28 && BOOST_PP_ITERATION_START_1 >= 28 +# define BOOST_PP_ITERATION_1 28 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 27 && BOOST_PP_ITERATION_START_1 >= 27 +# define BOOST_PP_ITERATION_1 27 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 26 && BOOST_PP_ITERATION_START_1 >= 26 +# define BOOST_PP_ITERATION_1 26 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 25 && BOOST_PP_ITERATION_START_1 >= 25 +# define BOOST_PP_ITERATION_1 25 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 24 && BOOST_PP_ITERATION_START_1 >= 24 +# define BOOST_PP_ITERATION_1 24 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 23 && BOOST_PP_ITERATION_START_1 >= 23 +# define BOOST_PP_ITERATION_1 23 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 22 && BOOST_PP_ITERATION_START_1 >= 22 +# define BOOST_PP_ITERATION_1 22 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 21 && BOOST_PP_ITERATION_START_1 >= 21 +# define BOOST_PP_ITERATION_1 21 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 20 && BOOST_PP_ITERATION_START_1 >= 20 +# define BOOST_PP_ITERATION_1 20 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 19 && BOOST_PP_ITERATION_START_1 >= 19 +# define BOOST_PP_ITERATION_1 19 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 18 && BOOST_PP_ITERATION_START_1 >= 18 +# define BOOST_PP_ITERATION_1 18 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 17 && BOOST_PP_ITERATION_START_1 >= 17 +# define BOOST_PP_ITERATION_1 17 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 16 && BOOST_PP_ITERATION_START_1 >= 16 +# define BOOST_PP_ITERATION_1 16 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 15 && BOOST_PP_ITERATION_START_1 >= 15 +# define BOOST_PP_ITERATION_1 15 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 14 && BOOST_PP_ITERATION_START_1 >= 14 +# define BOOST_PP_ITERATION_1 14 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 13 && BOOST_PP_ITERATION_START_1 >= 13 +# define BOOST_PP_ITERATION_1 13 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 12 && BOOST_PP_ITERATION_START_1 >= 12 +# define BOOST_PP_ITERATION_1 12 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 11 && BOOST_PP_ITERATION_START_1 >= 11 +# define BOOST_PP_ITERATION_1 11 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 10 && BOOST_PP_ITERATION_START_1 >= 10 +# define BOOST_PP_ITERATION_1 10 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 9 && BOOST_PP_ITERATION_START_1 >= 9 +# define BOOST_PP_ITERATION_1 9 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 8 && BOOST_PP_ITERATION_START_1 >= 8 +# define BOOST_PP_ITERATION_1 8 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 7 && BOOST_PP_ITERATION_START_1 >= 7 +# define BOOST_PP_ITERATION_1 7 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 6 && BOOST_PP_ITERATION_START_1 >= 6 +# define BOOST_PP_ITERATION_1 6 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 5 && BOOST_PP_ITERATION_START_1 >= 5 +# define BOOST_PP_ITERATION_1 5 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 4 && BOOST_PP_ITERATION_START_1 >= 4 +# define BOOST_PP_ITERATION_1 4 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 3 && BOOST_PP_ITERATION_START_1 >= 3 +# define BOOST_PP_ITERATION_1 3 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 2 && BOOST_PP_ITERATION_START_1 >= 2 +# define BOOST_PP_ITERATION_1 2 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 1 && BOOST_PP_ITERATION_START_1 >= 1 +# define BOOST_PP_ITERATION_1 1 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 0 && BOOST_PP_ITERATION_START_1 >= 0 +# define BOOST_PP_ITERATION_1 0 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/iter/reverse2.hpp b/contrib/src/boost/preprocessor/iteration/detail/iter/reverse2.hpp new file mode 100644 index 0000000..521bd24 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/iter/reverse2.hpp @@ -0,0 +1,1296 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if BOOST_PP_ITERATION_FINISH_2 <= 256 && BOOST_PP_ITERATION_START_2 >= 256 +# define BOOST_PP_ITERATION_2 256 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 255 && BOOST_PP_ITERATION_START_2 >= 255 +# define BOOST_PP_ITERATION_2 255 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 254 && BOOST_PP_ITERATION_START_2 >= 254 +# define BOOST_PP_ITERATION_2 254 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 253 && BOOST_PP_ITERATION_START_2 >= 253 +# define BOOST_PP_ITERATION_2 253 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 252 && BOOST_PP_ITERATION_START_2 >= 252 +# define BOOST_PP_ITERATION_2 252 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 251 && BOOST_PP_ITERATION_START_2 >= 251 +# define BOOST_PP_ITERATION_2 251 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 250 && BOOST_PP_ITERATION_START_2 >= 250 +# define BOOST_PP_ITERATION_2 250 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 249 && BOOST_PP_ITERATION_START_2 >= 249 +# define BOOST_PP_ITERATION_2 249 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 248 && BOOST_PP_ITERATION_START_2 >= 248 +# define BOOST_PP_ITERATION_2 248 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 247 && BOOST_PP_ITERATION_START_2 >= 247 +# define BOOST_PP_ITERATION_2 247 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 246 && BOOST_PP_ITERATION_START_2 >= 246 +# define BOOST_PP_ITERATION_2 246 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 245 && BOOST_PP_ITERATION_START_2 >= 245 +# define BOOST_PP_ITERATION_2 245 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 244 && BOOST_PP_ITERATION_START_2 >= 244 +# define BOOST_PP_ITERATION_2 244 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 243 && BOOST_PP_ITERATION_START_2 >= 243 +# define BOOST_PP_ITERATION_2 243 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 242 && BOOST_PP_ITERATION_START_2 >= 242 +# define BOOST_PP_ITERATION_2 242 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 241 && BOOST_PP_ITERATION_START_2 >= 241 +# define BOOST_PP_ITERATION_2 241 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 240 && BOOST_PP_ITERATION_START_2 >= 240 +# define BOOST_PP_ITERATION_2 240 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 239 && BOOST_PP_ITERATION_START_2 >= 239 +# define BOOST_PP_ITERATION_2 239 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 238 && BOOST_PP_ITERATION_START_2 >= 238 +# define BOOST_PP_ITERATION_2 238 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 237 && BOOST_PP_ITERATION_START_2 >= 237 +# define BOOST_PP_ITERATION_2 237 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 236 && BOOST_PP_ITERATION_START_2 >= 236 +# define BOOST_PP_ITERATION_2 236 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 235 && BOOST_PP_ITERATION_START_2 >= 235 +# define BOOST_PP_ITERATION_2 235 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 234 && BOOST_PP_ITERATION_START_2 >= 234 +# define BOOST_PP_ITERATION_2 234 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 233 && BOOST_PP_ITERATION_START_2 >= 233 +# define BOOST_PP_ITERATION_2 233 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 232 && BOOST_PP_ITERATION_START_2 >= 232 +# define BOOST_PP_ITERATION_2 232 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 231 && BOOST_PP_ITERATION_START_2 >= 231 +# define BOOST_PP_ITERATION_2 231 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 230 && BOOST_PP_ITERATION_START_2 >= 230 +# define BOOST_PP_ITERATION_2 230 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 229 && BOOST_PP_ITERATION_START_2 >= 229 +# define BOOST_PP_ITERATION_2 229 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 228 && BOOST_PP_ITERATION_START_2 >= 228 +# define BOOST_PP_ITERATION_2 228 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 227 && BOOST_PP_ITERATION_START_2 >= 227 +# define BOOST_PP_ITERATION_2 227 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 226 && BOOST_PP_ITERATION_START_2 >= 226 +# define BOOST_PP_ITERATION_2 226 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 225 && BOOST_PP_ITERATION_START_2 >= 225 +# define BOOST_PP_ITERATION_2 225 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 224 && BOOST_PP_ITERATION_START_2 >= 224 +# define BOOST_PP_ITERATION_2 224 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 223 && BOOST_PP_ITERATION_START_2 >= 223 +# define BOOST_PP_ITERATION_2 223 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 222 && BOOST_PP_ITERATION_START_2 >= 222 +# define BOOST_PP_ITERATION_2 222 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 221 && BOOST_PP_ITERATION_START_2 >= 221 +# define BOOST_PP_ITERATION_2 221 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 220 && BOOST_PP_ITERATION_START_2 >= 220 +# define BOOST_PP_ITERATION_2 220 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 219 && BOOST_PP_ITERATION_START_2 >= 219 +# define BOOST_PP_ITERATION_2 219 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 218 && BOOST_PP_ITERATION_START_2 >= 218 +# define BOOST_PP_ITERATION_2 218 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 217 && BOOST_PP_ITERATION_START_2 >= 217 +# define BOOST_PP_ITERATION_2 217 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 216 && BOOST_PP_ITERATION_START_2 >= 216 +# define BOOST_PP_ITERATION_2 216 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 215 && BOOST_PP_ITERATION_START_2 >= 215 +# define BOOST_PP_ITERATION_2 215 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 214 && BOOST_PP_ITERATION_START_2 >= 214 +# define BOOST_PP_ITERATION_2 214 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 213 && BOOST_PP_ITERATION_START_2 >= 213 +# define BOOST_PP_ITERATION_2 213 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 212 && BOOST_PP_ITERATION_START_2 >= 212 +# define BOOST_PP_ITERATION_2 212 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 211 && BOOST_PP_ITERATION_START_2 >= 211 +# define BOOST_PP_ITERATION_2 211 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 210 && BOOST_PP_ITERATION_START_2 >= 210 +# define BOOST_PP_ITERATION_2 210 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 209 && BOOST_PP_ITERATION_START_2 >= 209 +# define BOOST_PP_ITERATION_2 209 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 208 && BOOST_PP_ITERATION_START_2 >= 208 +# define BOOST_PP_ITERATION_2 208 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 207 && BOOST_PP_ITERATION_START_2 >= 207 +# define BOOST_PP_ITERATION_2 207 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 206 && BOOST_PP_ITERATION_START_2 >= 206 +# define BOOST_PP_ITERATION_2 206 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 205 && BOOST_PP_ITERATION_START_2 >= 205 +# define BOOST_PP_ITERATION_2 205 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 204 && BOOST_PP_ITERATION_START_2 >= 204 +# define BOOST_PP_ITERATION_2 204 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 203 && BOOST_PP_ITERATION_START_2 >= 203 +# define BOOST_PP_ITERATION_2 203 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 202 && BOOST_PP_ITERATION_START_2 >= 202 +# define BOOST_PP_ITERATION_2 202 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 201 && BOOST_PP_ITERATION_START_2 >= 201 +# define BOOST_PP_ITERATION_2 201 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 200 && BOOST_PP_ITERATION_START_2 >= 200 +# define BOOST_PP_ITERATION_2 200 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 199 && BOOST_PP_ITERATION_START_2 >= 199 +# define BOOST_PP_ITERATION_2 199 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 198 && BOOST_PP_ITERATION_START_2 >= 198 +# define BOOST_PP_ITERATION_2 198 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 197 && BOOST_PP_ITERATION_START_2 >= 197 +# define BOOST_PP_ITERATION_2 197 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 196 && BOOST_PP_ITERATION_START_2 >= 196 +# define BOOST_PP_ITERATION_2 196 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 195 && BOOST_PP_ITERATION_START_2 >= 195 +# define BOOST_PP_ITERATION_2 195 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 194 && BOOST_PP_ITERATION_START_2 >= 194 +# define BOOST_PP_ITERATION_2 194 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 193 && BOOST_PP_ITERATION_START_2 >= 193 +# define BOOST_PP_ITERATION_2 193 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 192 && BOOST_PP_ITERATION_START_2 >= 192 +# define BOOST_PP_ITERATION_2 192 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 191 && BOOST_PP_ITERATION_START_2 >= 191 +# define BOOST_PP_ITERATION_2 191 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 190 && BOOST_PP_ITERATION_START_2 >= 190 +# define BOOST_PP_ITERATION_2 190 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 189 && BOOST_PP_ITERATION_START_2 >= 189 +# define BOOST_PP_ITERATION_2 189 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 188 && BOOST_PP_ITERATION_START_2 >= 188 +# define BOOST_PP_ITERATION_2 188 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 187 && BOOST_PP_ITERATION_START_2 >= 187 +# define BOOST_PP_ITERATION_2 187 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 186 && BOOST_PP_ITERATION_START_2 >= 186 +# define BOOST_PP_ITERATION_2 186 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 185 && BOOST_PP_ITERATION_START_2 >= 185 +# define BOOST_PP_ITERATION_2 185 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 184 && BOOST_PP_ITERATION_START_2 >= 184 +# define BOOST_PP_ITERATION_2 184 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 183 && BOOST_PP_ITERATION_START_2 >= 183 +# define BOOST_PP_ITERATION_2 183 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 182 && BOOST_PP_ITERATION_START_2 >= 182 +# define BOOST_PP_ITERATION_2 182 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 181 && BOOST_PP_ITERATION_START_2 >= 181 +# define BOOST_PP_ITERATION_2 181 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 180 && BOOST_PP_ITERATION_START_2 >= 180 +# define BOOST_PP_ITERATION_2 180 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 179 && BOOST_PP_ITERATION_START_2 >= 179 +# define BOOST_PP_ITERATION_2 179 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 178 && BOOST_PP_ITERATION_START_2 >= 178 +# define BOOST_PP_ITERATION_2 178 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 177 && BOOST_PP_ITERATION_START_2 >= 177 +# define BOOST_PP_ITERATION_2 177 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 176 && BOOST_PP_ITERATION_START_2 >= 176 +# define BOOST_PP_ITERATION_2 176 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 175 && BOOST_PP_ITERATION_START_2 >= 175 +# define BOOST_PP_ITERATION_2 175 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 174 && BOOST_PP_ITERATION_START_2 >= 174 +# define BOOST_PP_ITERATION_2 174 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 173 && BOOST_PP_ITERATION_START_2 >= 173 +# define BOOST_PP_ITERATION_2 173 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 172 && BOOST_PP_ITERATION_START_2 >= 172 +# define BOOST_PP_ITERATION_2 172 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 171 && BOOST_PP_ITERATION_START_2 >= 171 +# define BOOST_PP_ITERATION_2 171 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 170 && BOOST_PP_ITERATION_START_2 >= 170 +# define BOOST_PP_ITERATION_2 170 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 169 && BOOST_PP_ITERATION_START_2 >= 169 +# define BOOST_PP_ITERATION_2 169 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 168 && BOOST_PP_ITERATION_START_2 >= 168 +# define BOOST_PP_ITERATION_2 168 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 167 && BOOST_PP_ITERATION_START_2 >= 167 +# define BOOST_PP_ITERATION_2 167 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 166 && BOOST_PP_ITERATION_START_2 >= 166 +# define BOOST_PP_ITERATION_2 166 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 165 && BOOST_PP_ITERATION_START_2 >= 165 +# define BOOST_PP_ITERATION_2 165 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 164 && BOOST_PP_ITERATION_START_2 >= 164 +# define BOOST_PP_ITERATION_2 164 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 163 && BOOST_PP_ITERATION_START_2 >= 163 +# define BOOST_PP_ITERATION_2 163 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 162 && BOOST_PP_ITERATION_START_2 >= 162 +# define BOOST_PP_ITERATION_2 162 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 161 && BOOST_PP_ITERATION_START_2 >= 161 +# define BOOST_PP_ITERATION_2 161 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 160 && BOOST_PP_ITERATION_START_2 >= 160 +# define BOOST_PP_ITERATION_2 160 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 159 && BOOST_PP_ITERATION_START_2 >= 159 +# define BOOST_PP_ITERATION_2 159 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 158 && BOOST_PP_ITERATION_START_2 >= 158 +# define BOOST_PP_ITERATION_2 158 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 157 && BOOST_PP_ITERATION_START_2 >= 157 +# define BOOST_PP_ITERATION_2 157 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 156 && BOOST_PP_ITERATION_START_2 >= 156 +# define BOOST_PP_ITERATION_2 156 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 155 && BOOST_PP_ITERATION_START_2 >= 155 +# define BOOST_PP_ITERATION_2 155 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 154 && BOOST_PP_ITERATION_START_2 >= 154 +# define BOOST_PP_ITERATION_2 154 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 153 && BOOST_PP_ITERATION_START_2 >= 153 +# define BOOST_PP_ITERATION_2 153 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 152 && BOOST_PP_ITERATION_START_2 >= 152 +# define BOOST_PP_ITERATION_2 152 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 151 && BOOST_PP_ITERATION_START_2 >= 151 +# define BOOST_PP_ITERATION_2 151 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 150 && BOOST_PP_ITERATION_START_2 >= 150 +# define BOOST_PP_ITERATION_2 150 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 149 && BOOST_PP_ITERATION_START_2 >= 149 +# define BOOST_PP_ITERATION_2 149 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 148 && BOOST_PP_ITERATION_START_2 >= 148 +# define BOOST_PP_ITERATION_2 148 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 147 && BOOST_PP_ITERATION_START_2 >= 147 +# define BOOST_PP_ITERATION_2 147 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 146 && BOOST_PP_ITERATION_START_2 >= 146 +# define BOOST_PP_ITERATION_2 146 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 145 && BOOST_PP_ITERATION_START_2 >= 145 +# define BOOST_PP_ITERATION_2 145 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 144 && BOOST_PP_ITERATION_START_2 >= 144 +# define BOOST_PP_ITERATION_2 144 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 143 && BOOST_PP_ITERATION_START_2 >= 143 +# define BOOST_PP_ITERATION_2 143 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 142 && BOOST_PP_ITERATION_START_2 >= 142 +# define BOOST_PP_ITERATION_2 142 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 141 && BOOST_PP_ITERATION_START_2 >= 141 +# define BOOST_PP_ITERATION_2 141 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 140 && BOOST_PP_ITERATION_START_2 >= 140 +# define BOOST_PP_ITERATION_2 140 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 139 && BOOST_PP_ITERATION_START_2 >= 139 +# define BOOST_PP_ITERATION_2 139 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 138 && BOOST_PP_ITERATION_START_2 >= 138 +# define BOOST_PP_ITERATION_2 138 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 137 && BOOST_PP_ITERATION_START_2 >= 137 +# define BOOST_PP_ITERATION_2 137 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 136 && BOOST_PP_ITERATION_START_2 >= 136 +# define BOOST_PP_ITERATION_2 136 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 135 && BOOST_PP_ITERATION_START_2 >= 135 +# define BOOST_PP_ITERATION_2 135 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 134 && BOOST_PP_ITERATION_START_2 >= 134 +# define BOOST_PP_ITERATION_2 134 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 133 && BOOST_PP_ITERATION_START_2 >= 133 +# define BOOST_PP_ITERATION_2 133 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 132 && BOOST_PP_ITERATION_START_2 >= 132 +# define BOOST_PP_ITERATION_2 132 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 131 && BOOST_PP_ITERATION_START_2 >= 131 +# define BOOST_PP_ITERATION_2 131 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 130 && BOOST_PP_ITERATION_START_2 >= 130 +# define BOOST_PP_ITERATION_2 130 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 129 && BOOST_PP_ITERATION_START_2 >= 129 +# define BOOST_PP_ITERATION_2 129 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 128 && BOOST_PP_ITERATION_START_2 >= 128 +# define BOOST_PP_ITERATION_2 128 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 127 && BOOST_PP_ITERATION_START_2 >= 127 +# define BOOST_PP_ITERATION_2 127 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 126 && BOOST_PP_ITERATION_START_2 >= 126 +# define BOOST_PP_ITERATION_2 126 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 125 && BOOST_PP_ITERATION_START_2 >= 125 +# define BOOST_PP_ITERATION_2 125 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 124 && BOOST_PP_ITERATION_START_2 >= 124 +# define BOOST_PP_ITERATION_2 124 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 123 && BOOST_PP_ITERATION_START_2 >= 123 +# define BOOST_PP_ITERATION_2 123 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 122 && BOOST_PP_ITERATION_START_2 >= 122 +# define BOOST_PP_ITERATION_2 122 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 121 && BOOST_PP_ITERATION_START_2 >= 121 +# define BOOST_PP_ITERATION_2 121 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 120 && BOOST_PP_ITERATION_START_2 >= 120 +# define BOOST_PP_ITERATION_2 120 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 119 && BOOST_PP_ITERATION_START_2 >= 119 +# define BOOST_PP_ITERATION_2 119 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 118 && BOOST_PP_ITERATION_START_2 >= 118 +# define BOOST_PP_ITERATION_2 118 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 117 && BOOST_PP_ITERATION_START_2 >= 117 +# define BOOST_PP_ITERATION_2 117 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 116 && BOOST_PP_ITERATION_START_2 >= 116 +# define BOOST_PP_ITERATION_2 116 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 115 && BOOST_PP_ITERATION_START_2 >= 115 +# define BOOST_PP_ITERATION_2 115 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 114 && BOOST_PP_ITERATION_START_2 >= 114 +# define BOOST_PP_ITERATION_2 114 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 113 && BOOST_PP_ITERATION_START_2 >= 113 +# define BOOST_PP_ITERATION_2 113 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 112 && BOOST_PP_ITERATION_START_2 >= 112 +# define BOOST_PP_ITERATION_2 112 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 111 && BOOST_PP_ITERATION_START_2 >= 111 +# define BOOST_PP_ITERATION_2 111 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 110 && BOOST_PP_ITERATION_START_2 >= 110 +# define BOOST_PP_ITERATION_2 110 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 109 && BOOST_PP_ITERATION_START_2 >= 109 +# define BOOST_PP_ITERATION_2 109 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 108 && BOOST_PP_ITERATION_START_2 >= 108 +# define BOOST_PP_ITERATION_2 108 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 107 && BOOST_PP_ITERATION_START_2 >= 107 +# define BOOST_PP_ITERATION_2 107 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 106 && BOOST_PP_ITERATION_START_2 >= 106 +# define BOOST_PP_ITERATION_2 106 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 105 && BOOST_PP_ITERATION_START_2 >= 105 +# define BOOST_PP_ITERATION_2 105 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 104 && BOOST_PP_ITERATION_START_2 >= 104 +# define BOOST_PP_ITERATION_2 104 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 103 && BOOST_PP_ITERATION_START_2 >= 103 +# define BOOST_PP_ITERATION_2 103 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 102 && BOOST_PP_ITERATION_START_2 >= 102 +# define BOOST_PP_ITERATION_2 102 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 101 && BOOST_PP_ITERATION_START_2 >= 101 +# define BOOST_PP_ITERATION_2 101 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 100 && BOOST_PP_ITERATION_START_2 >= 100 +# define BOOST_PP_ITERATION_2 100 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 99 && BOOST_PP_ITERATION_START_2 >= 99 +# define BOOST_PP_ITERATION_2 99 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 98 && BOOST_PP_ITERATION_START_2 >= 98 +# define BOOST_PP_ITERATION_2 98 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 97 && BOOST_PP_ITERATION_START_2 >= 97 +# define BOOST_PP_ITERATION_2 97 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 96 && BOOST_PP_ITERATION_START_2 >= 96 +# define BOOST_PP_ITERATION_2 96 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 95 && BOOST_PP_ITERATION_START_2 >= 95 +# define BOOST_PP_ITERATION_2 95 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 94 && BOOST_PP_ITERATION_START_2 >= 94 +# define BOOST_PP_ITERATION_2 94 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 93 && BOOST_PP_ITERATION_START_2 >= 93 +# define BOOST_PP_ITERATION_2 93 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 92 && BOOST_PP_ITERATION_START_2 >= 92 +# define BOOST_PP_ITERATION_2 92 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 91 && BOOST_PP_ITERATION_START_2 >= 91 +# define BOOST_PP_ITERATION_2 91 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 90 && BOOST_PP_ITERATION_START_2 >= 90 +# define BOOST_PP_ITERATION_2 90 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 89 && BOOST_PP_ITERATION_START_2 >= 89 +# define BOOST_PP_ITERATION_2 89 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 88 && BOOST_PP_ITERATION_START_2 >= 88 +# define BOOST_PP_ITERATION_2 88 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 87 && BOOST_PP_ITERATION_START_2 >= 87 +# define BOOST_PP_ITERATION_2 87 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 86 && BOOST_PP_ITERATION_START_2 >= 86 +# define BOOST_PP_ITERATION_2 86 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 85 && BOOST_PP_ITERATION_START_2 >= 85 +# define BOOST_PP_ITERATION_2 85 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 84 && BOOST_PP_ITERATION_START_2 >= 84 +# define BOOST_PP_ITERATION_2 84 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 83 && BOOST_PP_ITERATION_START_2 >= 83 +# define BOOST_PP_ITERATION_2 83 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 82 && BOOST_PP_ITERATION_START_2 >= 82 +# define BOOST_PP_ITERATION_2 82 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 81 && BOOST_PP_ITERATION_START_2 >= 81 +# define BOOST_PP_ITERATION_2 81 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 80 && BOOST_PP_ITERATION_START_2 >= 80 +# define BOOST_PP_ITERATION_2 80 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 79 && BOOST_PP_ITERATION_START_2 >= 79 +# define BOOST_PP_ITERATION_2 79 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 78 && BOOST_PP_ITERATION_START_2 >= 78 +# define BOOST_PP_ITERATION_2 78 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 77 && BOOST_PP_ITERATION_START_2 >= 77 +# define BOOST_PP_ITERATION_2 77 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 76 && BOOST_PP_ITERATION_START_2 >= 76 +# define BOOST_PP_ITERATION_2 76 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 75 && BOOST_PP_ITERATION_START_2 >= 75 +# define BOOST_PP_ITERATION_2 75 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 74 && BOOST_PP_ITERATION_START_2 >= 74 +# define BOOST_PP_ITERATION_2 74 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 73 && BOOST_PP_ITERATION_START_2 >= 73 +# define BOOST_PP_ITERATION_2 73 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 72 && BOOST_PP_ITERATION_START_2 >= 72 +# define BOOST_PP_ITERATION_2 72 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 71 && BOOST_PP_ITERATION_START_2 >= 71 +# define BOOST_PP_ITERATION_2 71 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 70 && BOOST_PP_ITERATION_START_2 >= 70 +# define BOOST_PP_ITERATION_2 70 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 69 && BOOST_PP_ITERATION_START_2 >= 69 +# define BOOST_PP_ITERATION_2 69 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 68 && BOOST_PP_ITERATION_START_2 >= 68 +# define BOOST_PP_ITERATION_2 68 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 67 && BOOST_PP_ITERATION_START_2 >= 67 +# define BOOST_PP_ITERATION_2 67 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 66 && BOOST_PP_ITERATION_START_2 >= 66 +# define BOOST_PP_ITERATION_2 66 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 65 && BOOST_PP_ITERATION_START_2 >= 65 +# define BOOST_PP_ITERATION_2 65 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 64 && BOOST_PP_ITERATION_START_2 >= 64 +# define BOOST_PP_ITERATION_2 64 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 63 && BOOST_PP_ITERATION_START_2 >= 63 +# define BOOST_PP_ITERATION_2 63 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 62 && BOOST_PP_ITERATION_START_2 >= 62 +# define BOOST_PP_ITERATION_2 62 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 61 && BOOST_PP_ITERATION_START_2 >= 61 +# define BOOST_PP_ITERATION_2 61 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 60 && BOOST_PP_ITERATION_START_2 >= 60 +# define BOOST_PP_ITERATION_2 60 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 59 && BOOST_PP_ITERATION_START_2 >= 59 +# define BOOST_PP_ITERATION_2 59 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 58 && BOOST_PP_ITERATION_START_2 >= 58 +# define BOOST_PP_ITERATION_2 58 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 57 && BOOST_PP_ITERATION_START_2 >= 57 +# define BOOST_PP_ITERATION_2 57 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 56 && BOOST_PP_ITERATION_START_2 >= 56 +# define BOOST_PP_ITERATION_2 56 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 55 && BOOST_PP_ITERATION_START_2 >= 55 +# define BOOST_PP_ITERATION_2 55 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 54 && BOOST_PP_ITERATION_START_2 >= 54 +# define BOOST_PP_ITERATION_2 54 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 53 && BOOST_PP_ITERATION_START_2 >= 53 +# define BOOST_PP_ITERATION_2 53 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 52 && BOOST_PP_ITERATION_START_2 >= 52 +# define BOOST_PP_ITERATION_2 52 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 51 && BOOST_PP_ITERATION_START_2 >= 51 +# define BOOST_PP_ITERATION_2 51 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 50 && BOOST_PP_ITERATION_START_2 >= 50 +# define BOOST_PP_ITERATION_2 50 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 49 && BOOST_PP_ITERATION_START_2 >= 49 +# define BOOST_PP_ITERATION_2 49 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 48 && BOOST_PP_ITERATION_START_2 >= 48 +# define BOOST_PP_ITERATION_2 48 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 47 && BOOST_PP_ITERATION_START_2 >= 47 +# define BOOST_PP_ITERATION_2 47 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 46 && BOOST_PP_ITERATION_START_2 >= 46 +# define BOOST_PP_ITERATION_2 46 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 45 && BOOST_PP_ITERATION_START_2 >= 45 +# define BOOST_PP_ITERATION_2 45 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 44 && BOOST_PP_ITERATION_START_2 >= 44 +# define BOOST_PP_ITERATION_2 44 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 43 && BOOST_PP_ITERATION_START_2 >= 43 +# define BOOST_PP_ITERATION_2 43 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 42 && BOOST_PP_ITERATION_START_2 >= 42 +# define BOOST_PP_ITERATION_2 42 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 41 && BOOST_PP_ITERATION_START_2 >= 41 +# define BOOST_PP_ITERATION_2 41 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 40 && BOOST_PP_ITERATION_START_2 >= 40 +# define BOOST_PP_ITERATION_2 40 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 39 && BOOST_PP_ITERATION_START_2 >= 39 +# define BOOST_PP_ITERATION_2 39 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 38 && BOOST_PP_ITERATION_START_2 >= 38 +# define BOOST_PP_ITERATION_2 38 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 37 && BOOST_PP_ITERATION_START_2 >= 37 +# define BOOST_PP_ITERATION_2 37 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 36 && BOOST_PP_ITERATION_START_2 >= 36 +# define BOOST_PP_ITERATION_2 36 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 35 && BOOST_PP_ITERATION_START_2 >= 35 +# define BOOST_PP_ITERATION_2 35 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 34 && BOOST_PP_ITERATION_START_2 >= 34 +# define BOOST_PP_ITERATION_2 34 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 33 && BOOST_PP_ITERATION_START_2 >= 33 +# define BOOST_PP_ITERATION_2 33 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 32 && BOOST_PP_ITERATION_START_2 >= 32 +# define BOOST_PP_ITERATION_2 32 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 31 && BOOST_PP_ITERATION_START_2 >= 31 +# define BOOST_PP_ITERATION_2 31 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 30 && BOOST_PP_ITERATION_START_2 >= 30 +# define BOOST_PP_ITERATION_2 30 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 29 && BOOST_PP_ITERATION_START_2 >= 29 +# define BOOST_PP_ITERATION_2 29 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 28 && BOOST_PP_ITERATION_START_2 >= 28 +# define BOOST_PP_ITERATION_2 28 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 27 && BOOST_PP_ITERATION_START_2 >= 27 +# define BOOST_PP_ITERATION_2 27 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 26 && BOOST_PP_ITERATION_START_2 >= 26 +# define BOOST_PP_ITERATION_2 26 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 25 && BOOST_PP_ITERATION_START_2 >= 25 +# define BOOST_PP_ITERATION_2 25 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 24 && BOOST_PP_ITERATION_START_2 >= 24 +# define BOOST_PP_ITERATION_2 24 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 23 && BOOST_PP_ITERATION_START_2 >= 23 +# define BOOST_PP_ITERATION_2 23 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 22 && BOOST_PP_ITERATION_START_2 >= 22 +# define BOOST_PP_ITERATION_2 22 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 21 && BOOST_PP_ITERATION_START_2 >= 21 +# define BOOST_PP_ITERATION_2 21 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 20 && BOOST_PP_ITERATION_START_2 >= 20 +# define BOOST_PP_ITERATION_2 20 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 19 && BOOST_PP_ITERATION_START_2 >= 19 +# define BOOST_PP_ITERATION_2 19 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 18 && BOOST_PP_ITERATION_START_2 >= 18 +# define BOOST_PP_ITERATION_2 18 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 17 && BOOST_PP_ITERATION_START_2 >= 17 +# define BOOST_PP_ITERATION_2 17 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 16 && BOOST_PP_ITERATION_START_2 >= 16 +# define BOOST_PP_ITERATION_2 16 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 15 && BOOST_PP_ITERATION_START_2 >= 15 +# define BOOST_PP_ITERATION_2 15 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 14 && BOOST_PP_ITERATION_START_2 >= 14 +# define BOOST_PP_ITERATION_2 14 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 13 && BOOST_PP_ITERATION_START_2 >= 13 +# define BOOST_PP_ITERATION_2 13 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 12 && BOOST_PP_ITERATION_START_2 >= 12 +# define BOOST_PP_ITERATION_2 12 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 11 && BOOST_PP_ITERATION_START_2 >= 11 +# define BOOST_PP_ITERATION_2 11 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 10 && BOOST_PP_ITERATION_START_2 >= 10 +# define BOOST_PP_ITERATION_2 10 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 9 && BOOST_PP_ITERATION_START_2 >= 9 +# define BOOST_PP_ITERATION_2 9 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 8 && BOOST_PP_ITERATION_START_2 >= 8 +# define BOOST_PP_ITERATION_2 8 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 7 && BOOST_PP_ITERATION_START_2 >= 7 +# define BOOST_PP_ITERATION_2 7 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 6 && BOOST_PP_ITERATION_START_2 >= 6 +# define BOOST_PP_ITERATION_2 6 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 5 && BOOST_PP_ITERATION_START_2 >= 5 +# define BOOST_PP_ITERATION_2 5 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 4 && BOOST_PP_ITERATION_START_2 >= 4 +# define BOOST_PP_ITERATION_2 4 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 3 && BOOST_PP_ITERATION_START_2 >= 3 +# define BOOST_PP_ITERATION_2 3 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 2 && BOOST_PP_ITERATION_START_2 >= 2 +# define BOOST_PP_ITERATION_2 2 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 1 && BOOST_PP_ITERATION_START_2 >= 1 +# define BOOST_PP_ITERATION_2 1 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 0 && BOOST_PP_ITERATION_START_2 >= 0 +# define BOOST_PP_ITERATION_2 0 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/iter/reverse3.hpp b/contrib/src/boost/preprocessor/iteration/detail/iter/reverse3.hpp new file mode 100644 index 0000000..0a65514 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/iter/reverse3.hpp @@ -0,0 +1,1296 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if BOOST_PP_ITERATION_FINISH_3 <= 256 && BOOST_PP_ITERATION_START_3 >= 256 +# define BOOST_PP_ITERATION_3 256 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 255 && BOOST_PP_ITERATION_START_3 >= 255 +# define BOOST_PP_ITERATION_3 255 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 254 && BOOST_PP_ITERATION_START_3 >= 254 +# define BOOST_PP_ITERATION_3 254 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 253 && BOOST_PP_ITERATION_START_3 >= 253 +# define BOOST_PP_ITERATION_3 253 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 252 && BOOST_PP_ITERATION_START_3 >= 252 +# define BOOST_PP_ITERATION_3 252 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 251 && BOOST_PP_ITERATION_START_3 >= 251 +# define BOOST_PP_ITERATION_3 251 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 250 && BOOST_PP_ITERATION_START_3 >= 250 +# define BOOST_PP_ITERATION_3 250 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 249 && BOOST_PP_ITERATION_START_3 >= 249 +# define BOOST_PP_ITERATION_3 249 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 248 && BOOST_PP_ITERATION_START_3 >= 248 +# define BOOST_PP_ITERATION_3 248 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 247 && BOOST_PP_ITERATION_START_3 >= 247 +# define BOOST_PP_ITERATION_3 247 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 246 && BOOST_PP_ITERATION_START_3 >= 246 +# define BOOST_PP_ITERATION_3 246 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 245 && BOOST_PP_ITERATION_START_3 >= 245 +# define BOOST_PP_ITERATION_3 245 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 244 && BOOST_PP_ITERATION_START_3 >= 244 +# define BOOST_PP_ITERATION_3 244 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 243 && BOOST_PP_ITERATION_START_3 >= 243 +# define BOOST_PP_ITERATION_3 243 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 242 && BOOST_PP_ITERATION_START_3 >= 242 +# define BOOST_PP_ITERATION_3 242 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 241 && BOOST_PP_ITERATION_START_3 >= 241 +# define BOOST_PP_ITERATION_3 241 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 240 && BOOST_PP_ITERATION_START_3 >= 240 +# define BOOST_PP_ITERATION_3 240 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 239 && BOOST_PP_ITERATION_START_3 >= 239 +# define BOOST_PP_ITERATION_3 239 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 238 && BOOST_PP_ITERATION_START_3 >= 238 +# define BOOST_PP_ITERATION_3 238 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 237 && BOOST_PP_ITERATION_START_3 >= 237 +# define BOOST_PP_ITERATION_3 237 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 236 && BOOST_PP_ITERATION_START_3 >= 236 +# define BOOST_PP_ITERATION_3 236 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 235 && BOOST_PP_ITERATION_START_3 >= 235 +# define BOOST_PP_ITERATION_3 235 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 234 && BOOST_PP_ITERATION_START_3 >= 234 +# define BOOST_PP_ITERATION_3 234 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 233 && BOOST_PP_ITERATION_START_3 >= 233 +# define BOOST_PP_ITERATION_3 233 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 232 && BOOST_PP_ITERATION_START_3 >= 232 +# define BOOST_PP_ITERATION_3 232 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 231 && BOOST_PP_ITERATION_START_3 >= 231 +# define BOOST_PP_ITERATION_3 231 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 230 && BOOST_PP_ITERATION_START_3 >= 230 +# define BOOST_PP_ITERATION_3 230 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 229 && BOOST_PP_ITERATION_START_3 >= 229 +# define BOOST_PP_ITERATION_3 229 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 228 && BOOST_PP_ITERATION_START_3 >= 228 +# define BOOST_PP_ITERATION_3 228 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 227 && BOOST_PP_ITERATION_START_3 >= 227 +# define BOOST_PP_ITERATION_3 227 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 226 && BOOST_PP_ITERATION_START_3 >= 226 +# define BOOST_PP_ITERATION_3 226 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 225 && BOOST_PP_ITERATION_START_3 >= 225 +# define BOOST_PP_ITERATION_3 225 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 224 && BOOST_PP_ITERATION_START_3 >= 224 +# define BOOST_PP_ITERATION_3 224 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 223 && BOOST_PP_ITERATION_START_3 >= 223 +# define BOOST_PP_ITERATION_3 223 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 222 && BOOST_PP_ITERATION_START_3 >= 222 +# define BOOST_PP_ITERATION_3 222 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 221 && BOOST_PP_ITERATION_START_3 >= 221 +# define BOOST_PP_ITERATION_3 221 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 220 && BOOST_PP_ITERATION_START_3 >= 220 +# define BOOST_PP_ITERATION_3 220 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 219 && BOOST_PP_ITERATION_START_3 >= 219 +# define BOOST_PP_ITERATION_3 219 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 218 && BOOST_PP_ITERATION_START_3 >= 218 +# define BOOST_PP_ITERATION_3 218 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 217 && BOOST_PP_ITERATION_START_3 >= 217 +# define BOOST_PP_ITERATION_3 217 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 216 && BOOST_PP_ITERATION_START_3 >= 216 +# define BOOST_PP_ITERATION_3 216 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 215 && BOOST_PP_ITERATION_START_3 >= 215 +# define BOOST_PP_ITERATION_3 215 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 214 && BOOST_PP_ITERATION_START_3 >= 214 +# define BOOST_PP_ITERATION_3 214 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 213 && BOOST_PP_ITERATION_START_3 >= 213 +# define BOOST_PP_ITERATION_3 213 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 212 && BOOST_PP_ITERATION_START_3 >= 212 +# define BOOST_PP_ITERATION_3 212 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 211 && BOOST_PP_ITERATION_START_3 >= 211 +# define BOOST_PP_ITERATION_3 211 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 210 && BOOST_PP_ITERATION_START_3 >= 210 +# define BOOST_PP_ITERATION_3 210 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 209 && BOOST_PP_ITERATION_START_3 >= 209 +# define BOOST_PP_ITERATION_3 209 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 208 && BOOST_PP_ITERATION_START_3 >= 208 +# define BOOST_PP_ITERATION_3 208 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 207 && BOOST_PP_ITERATION_START_3 >= 207 +# define BOOST_PP_ITERATION_3 207 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 206 && BOOST_PP_ITERATION_START_3 >= 206 +# define BOOST_PP_ITERATION_3 206 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 205 && BOOST_PP_ITERATION_START_3 >= 205 +# define BOOST_PP_ITERATION_3 205 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 204 && BOOST_PP_ITERATION_START_3 >= 204 +# define BOOST_PP_ITERATION_3 204 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 203 && BOOST_PP_ITERATION_START_3 >= 203 +# define BOOST_PP_ITERATION_3 203 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 202 && BOOST_PP_ITERATION_START_3 >= 202 +# define BOOST_PP_ITERATION_3 202 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 201 && BOOST_PP_ITERATION_START_3 >= 201 +# define BOOST_PP_ITERATION_3 201 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 200 && BOOST_PP_ITERATION_START_3 >= 200 +# define BOOST_PP_ITERATION_3 200 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 199 && BOOST_PP_ITERATION_START_3 >= 199 +# define BOOST_PP_ITERATION_3 199 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 198 && BOOST_PP_ITERATION_START_3 >= 198 +# define BOOST_PP_ITERATION_3 198 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 197 && BOOST_PP_ITERATION_START_3 >= 197 +# define BOOST_PP_ITERATION_3 197 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 196 && BOOST_PP_ITERATION_START_3 >= 196 +# define BOOST_PP_ITERATION_3 196 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 195 && BOOST_PP_ITERATION_START_3 >= 195 +# define BOOST_PP_ITERATION_3 195 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 194 && BOOST_PP_ITERATION_START_3 >= 194 +# define BOOST_PP_ITERATION_3 194 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 193 && BOOST_PP_ITERATION_START_3 >= 193 +# define BOOST_PP_ITERATION_3 193 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 192 && BOOST_PP_ITERATION_START_3 >= 192 +# define BOOST_PP_ITERATION_3 192 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 191 && BOOST_PP_ITERATION_START_3 >= 191 +# define BOOST_PP_ITERATION_3 191 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 190 && BOOST_PP_ITERATION_START_3 >= 190 +# define BOOST_PP_ITERATION_3 190 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 189 && BOOST_PP_ITERATION_START_3 >= 189 +# define BOOST_PP_ITERATION_3 189 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 188 && BOOST_PP_ITERATION_START_3 >= 188 +# define BOOST_PP_ITERATION_3 188 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 187 && BOOST_PP_ITERATION_START_3 >= 187 +# define BOOST_PP_ITERATION_3 187 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 186 && BOOST_PP_ITERATION_START_3 >= 186 +# define BOOST_PP_ITERATION_3 186 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 185 && BOOST_PP_ITERATION_START_3 >= 185 +# define BOOST_PP_ITERATION_3 185 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 184 && BOOST_PP_ITERATION_START_3 >= 184 +# define BOOST_PP_ITERATION_3 184 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 183 && BOOST_PP_ITERATION_START_3 >= 183 +# define BOOST_PP_ITERATION_3 183 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 182 && BOOST_PP_ITERATION_START_3 >= 182 +# define BOOST_PP_ITERATION_3 182 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 181 && BOOST_PP_ITERATION_START_3 >= 181 +# define BOOST_PP_ITERATION_3 181 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 180 && BOOST_PP_ITERATION_START_3 >= 180 +# define BOOST_PP_ITERATION_3 180 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 179 && BOOST_PP_ITERATION_START_3 >= 179 +# define BOOST_PP_ITERATION_3 179 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 178 && BOOST_PP_ITERATION_START_3 >= 178 +# define BOOST_PP_ITERATION_3 178 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 177 && BOOST_PP_ITERATION_START_3 >= 177 +# define BOOST_PP_ITERATION_3 177 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 176 && BOOST_PP_ITERATION_START_3 >= 176 +# define BOOST_PP_ITERATION_3 176 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 175 && BOOST_PP_ITERATION_START_3 >= 175 +# define BOOST_PP_ITERATION_3 175 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 174 && BOOST_PP_ITERATION_START_3 >= 174 +# define BOOST_PP_ITERATION_3 174 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 173 && BOOST_PP_ITERATION_START_3 >= 173 +# define BOOST_PP_ITERATION_3 173 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 172 && BOOST_PP_ITERATION_START_3 >= 172 +# define BOOST_PP_ITERATION_3 172 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 171 && BOOST_PP_ITERATION_START_3 >= 171 +# define BOOST_PP_ITERATION_3 171 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 170 && BOOST_PP_ITERATION_START_3 >= 170 +# define BOOST_PP_ITERATION_3 170 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 169 && BOOST_PP_ITERATION_START_3 >= 169 +# define BOOST_PP_ITERATION_3 169 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 168 && BOOST_PP_ITERATION_START_3 >= 168 +# define BOOST_PP_ITERATION_3 168 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 167 && BOOST_PP_ITERATION_START_3 >= 167 +# define BOOST_PP_ITERATION_3 167 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 166 && BOOST_PP_ITERATION_START_3 >= 166 +# define BOOST_PP_ITERATION_3 166 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 165 && BOOST_PP_ITERATION_START_3 >= 165 +# define BOOST_PP_ITERATION_3 165 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 164 && BOOST_PP_ITERATION_START_3 >= 164 +# define BOOST_PP_ITERATION_3 164 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 163 && BOOST_PP_ITERATION_START_3 >= 163 +# define BOOST_PP_ITERATION_3 163 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 162 && BOOST_PP_ITERATION_START_3 >= 162 +# define BOOST_PP_ITERATION_3 162 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 161 && BOOST_PP_ITERATION_START_3 >= 161 +# define BOOST_PP_ITERATION_3 161 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 160 && BOOST_PP_ITERATION_START_3 >= 160 +# define BOOST_PP_ITERATION_3 160 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 159 && BOOST_PP_ITERATION_START_3 >= 159 +# define BOOST_PP_ITERATION_3 159 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 158 && BOOST_PP_ITERATION_START_3 >= 158 +# define BOOST_PP_ITERATION_3 158 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 157 && BOOST_PP_ITERATION_START_3 >= 157 +# define BOOST_PP_ITERATION_3 157 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 156 && BOOST_PP_ITERATION_START_3 >= 156 +# define BOOST_PP_ITERATION_3 156 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 155 && BOOST_PP_ITERATION_START_3 >= 155 +# define BOOST_PP_ITERATION_3 155 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 154 && BOOST_PP_ITERATION_START_3 >= 154 +# define BOOST_PP_ITERATION_3 154 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 153 && BOOST_PP_ITERATION_START_3 >= 153 +# define BOOST_PP_ITERATION_3 153 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 152 && BOOST_PP_ITERATION_START_3 >= 152 +# define BOOST_PP_ITERATION_3 152 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 151 && BOOST_PP_ITERATION_START_3 >= 151 +# define BOOST_PP_ITERATION_3 151 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 150 && BOOST_PP_ITERATION_START_3 >= 150 +# define BOOST_PP_ITERATION_3 150 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 149 && BOOST_PP_ITERATION_START_3 >= 149 +# define BOOST_PP_ITERATION_3 149 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 148 && BOOST_PP_ITERATION_START_3 >= 148 +# define BOOST_PP_ITERATION_3 148 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 147 && BOOST_PP_ITERATION_START_3 >= 147 +# define BOOST_PP_ITERATION_3 147 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 146 && BOOST_PP_ITERATION_START_3 >= 146 +# define BOOST_PP_ITERATION_3 146 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 145 && BOOST_PP_ITERATION_START_3 >= 145 +# define BOOST_PP_ITERATION_3 145 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 144 && BOOST_PP_ITERATION_START_3 >= 144 +# define BOOST_PP_ITERATION_3 144 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 143 && BOOST_PP_ITERATION_START_3 >= 143 +# define BOOST_PP_ITERATION_3 143 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 142 && BOOST_PP_ITERATION_START_3 >= 142 +# define BOOST_PP_ITERATION_3 142 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 141 && BOOST_PP_ITERATION_START_3 >= 141 +# define BOOST_PP_ITERATION_3 141 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 140 && BOOST_PP_ITERATION_START_3 >= 140 +# define BOOST_PP_ITERATION_3 140 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 139 && BOOST_PP_ITERATION_START_3 >= 139 +# define BOOST_PP_ITERATION_3 139 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 138 && BOOST_PP_ITERATION_START_3 >= 138 +# define BOOST_PP_ITERATION_3 138 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 137 && BOOST_PP_ITERATION_START_3 >= 137 +# define BOOST_PP_ITERATION_3 137 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 136 && BOOST_PP_ITERATION_START_3 >= 136 +# define BOOST_PP_ITERATION_3 136 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 135 && BOOST_PP_ITERATION_START_3 >= 135 +# define BOOST_PP_ITERATION_3 135 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 134 && BOOST_PP_ITERATION_START_3 >= 134 +# define BOOST_PP_ITERATION_3 134 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 133 && BOOST_PP_ITERATION_START_3 >= 133 +# define BOOST_PP_ITERATION_3 133 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 132 && BOOST_PP_ITERATION_START_3 >= 132 +# define BOOST_PP_ITERATION_3 132 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 131 && BOOST_PP_ITERATION_START_3 >= 131 +# define BOOST_PP_ITERATION_3 131 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 130 && BOOST_PP_ITERATION_START_3 >= 130 +# define BOOST_PP_ITERATION_3 130 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 129 && BOOST_PP_ITERATION_START_3 >= 129 +# define BOOST_PP_ITERATION_3 129 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 128 && BOOST_PP_ITERATION_START_3 >= 128 +# define BOOST_PP_ITERATION_3 128 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 127 && BOOST_PP_ITERATION_START_3 >= 127 +# define BOOST_PP_ITERATION_3 127 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 126 && BOOST_PP_ITERATION_START_3 >= 126 +# define BOOST_PP_ITERATION_3 126 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 125 && BOOST_PP_ITERATION_START_3 >= 125 +# define BOOST_PP_ITERATION_3 125 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 124 && BOOST_PP_ITERATION_START_3 >= 124 +# define BOOST_PP_ITERATION_3 124 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 123 && BOOST_PP_ITERATION_START_3 >= 123 +# define BOOST_PP_ITERATION_3 123 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 122 && BOOST_PP_ITERATION_START_3 >= 122 +# define BOOST_PP_ITERATION_3 122 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 121 && BOOST_PP_ITERATION_START_3 >= 121 +# define BOOST_PP_ITERATION_3 121 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 120 && BOOST_PP_ITERATION_START_3 >= 120 +# define BOOST_PP_ITERATION_3 120 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 119 && BOOST_PP_ITERATION_START_3 >= 119 +# define BOOST_PP_ITERATION_3 119 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 118 && BOOST_PP_ITERATION_START_3 >= 118 +# define BOOST_PP_ITERATION_3 118 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 117 && BOOST_PP_ITERATION_START_3 >= 117 +# define BOOST_PP_ITERATION_3 117 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 116 && BOOST_PP_ITERATION_START_3 >= 116 +# define BOOST_PP_ITERATION_3 116 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 115 && BOOST_PP_ITERATION_START_3 >= 115 +# define BOOST_PP_ITERATION_3 115 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 114 && BOOST_PP_ITERATION_START_3 >= 114 +# define BOOST_PP_ITERATION_3 114 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 113 && BOOST_PP_ITERATION_START_3 >= 113 +# define BOOST_PP_ITERATION_3 113 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 112 && BOOST_PP_ITERATION_START_3 >= 112 +# define BOOST_PP_ITERATION_3 112 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 111 && BOOST_PP_ITERATION_START_3 >= 111 +# define BOOST_PP_ITERATION_3 111 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 110 && BOOST_PP_ITERATION_START_3 >= 110 +# define BOOST_PP_ITERATION_3 110 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 109 && BOOST_PP_ITERATION_START_3 >= 109 +# define BOOST_PP_ITERATION_3 109 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 108 && BOOST_PP_ITERATION_START_3 >= 108 +# define BOOST_PP_ITERATION_3 108 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 107 && BOOST_PP_ITERATION_START_3 >= 107 +# define BOOST_PP_ITERATION_3 107 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 106 && BOOST_PP_ITERATION_START_3 >= 106 +# define BOOST_PP_ITERATION_3 106 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 105 && BOOST_PP_ITERATION_START_3 >= 105 +# define BOOST_PP_ITERATION_3 105 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 104 && BOOST_PP_ITERATION_START_3 >= 104 +# define BOOST_PP_ITERATION_3 104 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 103 && BOOST_PP_ITERATION_START_3 >= 103 +# define BOOST_PP_ITERATION_3 103 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 102 && BOOST_PP_ITERATION_START_3 >= 102 +# define BOOST_PP_ITERATION_3 102 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 101 && BOOST_PP_ITERATION_START_3 >= 101 +# define BOOST_PP_ITERATION_3 101 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 100 && BOOST_PP_ITERATION_START_3 >= 100 +# define BOOST_PP_ITERATION_3 100 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 99 && BOOST_PP_ITERATION_START_3 >= 99 +# define BOOST_PP_ITERATION_3 99 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 98 && BOOST_PP_ITERATION_START_3 >= 98 +# define BOOST_PP_ITERATION_3 98 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 97 && BOOST_PP_ITERATION_START_3 >= 97 +# define BOOST_PP_ITERATION_3 97 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 96 && BOOST_PP_ITERATION_START_3 >= 96 +# define BOOST_PP_ITERATION_3 96 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 95 && BOOST_PP_ITERATION_START_3 >= 95 +# define BOOST_PP_ITERATION_3 95 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 94 && BOOST_PP_ITERATION_START_3 >= 94 +# define BOOST_PP_ITERATION_3 94 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 93 && BOOST_PP_ITERATION_START_3 >= 93 +# define BOOST_PP_ITERATION_3 93 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 92 && BOOST_PP_ITERATION_START_3 >= 92 +# define BOOST_PP_ITERATION_3 92 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 91 && BOOST_PP_ITERATION_START_3 >= 91 +# define BOOST_PP_ITERATION_3 91 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 90 && BOOST_PP_ITERATION_START_3 >= 90 +# define BOOST_PP_ITERATION_3 90 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 89 && BOOST_PP_ITERATION_START_3 >= 89 +# define BOOST_PP_ITERATION_3 89 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 88 && BOOST_PP_ITERATION_START_3 >= 88 +# define BOOST_PP_ITERATION_3 88 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 87 && BOOST_PP_ITERATION_START_3 >= 87 +# define BOOST_PP_ITERATION_3 87 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 86 && BOOST_PP_ITERATION_START_3 >= 86 +# define BOOST_PP_ITERATION_3 86 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 85 && BOOST_PP_ITERATION_START_3 >= 85 +# define BOOST_PP_ITERATION_3 85 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 84 && BOOST_PP_ITERATION_START_3 >= 84 +# define BOOST_PP_ITERATION_3 84 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 83 && BOOST_PP_ITERATION_START_3 >= 83 +# define BOOST_PP_ITERATION_3 83 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 82 && BOOST_PP_ITERATION_START_3 >= 82 +# define BOOST_PP_ITERATION_3 82 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 81 && BOOST_PP_ITERATION_START_3 >= 81 +# define BOOST_PP_ITERATION_3 81 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 80 && BOOST_PP_ITERATION_START_3 >= 80 +# define BOOST_PP_ITERATION_3 80 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 79 && BOOST_PP_ITERATION_START_3 >= 79 +# define BOOST_PP_ITERATION_3 79 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 78 && BOOST_PP_ITERATION_START_3 >= 78 +# define BOOST_PP_ITERATION_3 78 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 77 && BOOST_PP_ITERATION_START_3 >= 77 +# define BOOST_PP_ITERATION_3 77 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 76 && BOOST_PP_ITERATION_START_3 >= 76 +# define BOOST_PP_ITERATION_3 76 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 75 && BOOST_PP_ITERATION_START_3 >= 75 +# define BOOST_PP_ITERATION_3 75 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 74 && BOOST_PP_ITERATION_START_3 >= 74 +# define BOOST_PP_ITERATION_3 74 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 73 && BOOST_PP_ITERATION_START_3 >= 73 +# define BOOST_PP_ITERATION_3 73 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 72 && BOOST_PP_ITERATION_START_3 >= 72 +# define BOOST_PP_ITERATION_3 72 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 71 && BOOST_PP_ITERATION_START_3 >= 71 +# define BOOST_PP_ITERATION_3 71 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 70 && BOOST_PP_ITERATION_START_3 >= 70 +# define BOOST_PP_ITERATION_3 70 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 69 && BOOST_PP_ITERATION_START_3 >= 69 +# define BOOST_PP_ITERATION_3 69 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 68 && BOOST_PP_ITERATION_START_3 >= 68 +# define BOOST_PP_ITERATION_3 68 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 67 && BOOST_PP_ITERATION_START_3 >= 67 +# define BOOST_PP_ITERATION_3 67 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 66 && BOOST_PP_ITERATION_START_3 >= 66 +# define BOOST_PP_ITERATION_3 66 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 65 && BOOST_PP_ITERATION_START_3 >= 65 +# define BOOST_PP_ITERATION_3 65 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 64 && BOOST_PP_ITERATION_START_3 >= 64 +# define BOOST_PP_ITERATION_3 64 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 63 && BOOST_PP_ITERATION_START_3 >= 63 +# define BOOST_PP_ITERATION_3 63 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 62 && BOOST_PP_ITERATION_START_3 >= 62 +# define BOOST_PP_ITERATION_3 62 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 61 && BOOST_PP_ITERATION_START_3 >= 61 +# define BOOST_PP_ITERATION_3 61 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 60 && BOOST_PP_ITERATION_START_3 >= 60 +# define BOOST_PP_ITERATION_3 60 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 59 && BOOST_PP_ITERATION_START_3 >= 59 +# define BOOST_PP_ITERATION_3 59 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 58 && BOOST_PP_ITERATION_START_3 >= 58 +# define BOOST_PP_ITERATION_3 58 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 57 && BOOST_PP_ITERATION_START_3 >= 57 +# define BOOST_PP_ITERATION_3 57 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 56 && BOOST_PP_ITERATION_START_3 >= 56 +# define BOOST_PP_ITERATION_3 56 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 55 && BOOST_PP_ITERATION_START_3 >= 55 +# define BOOST_PP_ITERATION_3 55 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 54 && BOOST_PP_ITERATION_START_3 >= 54 +# define BOOST_PP_ITERATION_3 54 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 53 && BOOST_PP_ITERATION_START_3 >= 53 +# define BOOST_PP_ITERATION_3 53 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 52 && BOOST_PP_ITERATION_START_3 >= 52 +# define BOOST_PP_ITERATION_3 52 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 51 && BOOST_PP_ITERATION_START_3 >= 51 +# define BOOST_PP_ITERATION_3 51 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 50 && BOOST_PP_ITERATION_START_3 >= 50 +# define BOOST_PP_ITERATION_3 50 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 49 && BOOST_PP_ITERATION_START_3 >= 49 +# define BOOST_PP_ITERATION_3 49 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 48 && BOOST_PP_ITERATION_START_3 >= 48 +# define BOOST_PP_ITERATION_3 48 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 47 && BOOST_PP_ITERATION_START_3 >= 47 +# define BOOST_PP_ITERATION_3 47 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 46 && BOOST_PP_ITERATION_START_3 >= 46 +# define BOOST_PP_ITERATION_3 46 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 45 && BOOST_PP_ITERATION_START_3 >= 45 +# define BOOST_PP_ITERATION_3 45 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 44 && BOOST_PP_ITERATION_START_3 >= 44 +# define BOOST_PP_ITERATION_3 44 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 43 && BOOST_PP_ITERATION_START_3 >= 43 +# define BOOST_PP_ITERATION_3 43 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 42 && BOOST_PP_ITERATION_START_3 >= 42 +# define BOOST_PP_ITERATION_3 42 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 41 && BOOST_PP_ITERATION_START_3 >= 41 +# define BOOST_PP_ITERATION_3 41 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 40 && BOOST_PP_ITERATION_START_3 >= 40 +# define BOOST_PP_ITERATION_3 40 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 39 && BOOST_PP_ITERATION_START_3 >= 39 +# define BOOST_PP_ITERATION_3 39 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 38 && BOOST_PP_ITERATION_START_3 >= 38 +# define BOOST_PP_ITERATION_3 38 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 37 && BOOST_PP_ITERATION_START_3 >= 37 +# define BOOST_PP_ITERATION_3 37 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 36 && BOOST_PP_ITERATION_START_3 >= 36 +# define BOOST_PP_ITERATION_3 36 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 35 && BOOST_PP_ITERATION_START_3 >= 35 +# define BOOST_PP_ITERATION_3 35 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 34 && BOOST_PP_ITERATION_START_3 >= 34 +# define BOOST_PP_ITERATION_3 34 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 33 && BOOST_PP_ITERATION_START_3 >= 33 +# define BOOST_PP_ITERATION_3 33 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 32 && BOOST_PP_ITERATION_START_3 >= 32 +# define BOOST_PP_ITERATION_3 32 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 31 && BOOST_PP_ITERATION_START_3 >= 31 +# define BOOST_PP_ITERATION_3 31 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 30 && BOOST_PP_ITERATION_START_3 >= 30 +# define BOOST_PP_ITERATION_3 30 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 29 && BOOST_PP_ITERATION_START_3 >= 29 +# define BOOST_PP_ITERATION_3 29 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 28 && BOOST_PP_ITERATION_START_3 >= 28 +# define BOOST_PP_ITERATION_3 28 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 27 && BOOST_PP_ITERATION_START_3 >= 27 +# define BOOST_PP_ITERATION_3 27 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 26 && BOOST_PP_ITERATION_START_3 >= 26 +# define BOOST_PP_ITERATION_3 26 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 25 && BOOST_PP_ITERATION_START_3 >= 25 +# define BOOST_PP_ITERATION_3 25 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 24 && BOOST_PP_ITERATION_START_3 >= 24 +# define BOOST_PP_ITERATION_3 24 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 23 && BOOST_PP_ITERATION_START_3 >= 23 +# define BOOST_PP_ITERATION_3 23 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 22 && BOOST_PP_ITERATION_START_3 >= 22 +# define BOOST_PP_ITERATION_3 22 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 21 && BOOST_PP_ITERATION_START_3 >= 21 +# define BOOST_PP_ITERATION_3 21 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 20 && BOOST_PP_ITERATION_START_3 >= 20 +# define BOOST_PP_ITERATION_3 20 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 19 && BOOST_PP_ITERATION_START_3 >= 19 +# define BOOST_PP_ITERATION_3 19 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 18 && BOOST_PP_ITERATION_START_3 >= 18 +# define BOOST_PP_ITERATION_3 18 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 17 && BOOST_PP_ITERATION_START_3 >= 17 +# define BOOST_PP_ITERATION_3 17 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 16 && BOOST_PP_ITERATION_START_3 >= 16 +# define BOOST_PP_ITERATION_3 16 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 15 && BOOST_PP_ITERATION_START_3 >= 15 +# define BOOST_PP_ITERATION_3 15 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 14 && BOOST_PP_ITERATION_START_3 >= 14 +# define BOOST_PP_ITERATION_3 14 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 13 && BOOST_PP_ITERATION_START_3 >= 13 +# define BOOST_PP_ITERATION_3 13 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 12 && BOOST_PP_ITERATION_START_3 >= 12 +# define BOOST_PP_ITERATION_3 12 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 11 && BOOST_PP_ITERATION_START_3 >= 11 +# define BOOST_PP_ITERATION_3 11 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 10 && BOOST_PP_ITERATION_START_3 >= 10 +# define BOOST_PP_ITERATION_3 10 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 9 && BOOST_PP_ITERATION_START_3 >= 9 +# define BOOST_PP_ITERATION_3 9 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 8 && BOOST_PP_ITERATION_START_3 >= 8 +# define BOOST_PP_ITERATION_3 8 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 7 && BOOST_PP_ITERATION_START_3 >= 7 +# define BOOST_PP_ITERATION_3 7 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 6 && BOOST_PP_ITERATION_START_3 >= 6 +# define BOOST_PP_ITERATION_3 6 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 5 && BOOST_PP_ITERATION_START_3 >= 5 +# define BOOST_PP_ITERATION_3 5 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 4 && BOOST_PP_ITERATION_START_3 >= 4 +# define BOOST_PP_ITERATION_3 4 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 3 && BOOST_PP_ITERATION_START_3 >= 3 +# define BOOST_PP_ITERATION_3 3 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 2 && BOOST_PP_ITERATION_START_3 >= 2 +# define BOOST_PP_ITERATION_3 2 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 1 && BOOST_PP_ITERATION_START_3 >= 1 +# define BOOST_PP_ITERATION_3 1 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 0 && BOOST_PP_ITERATION_START_3 >= 0 +# define BOOST_PP_ITERATION_3 0 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/iter/reverse4.hpp b/contrib/src/boost/preprocessor/iteration/detail/iter/reverse4.hpp new file mode 100644 index 0000000..3bcfba0 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/iter/reverse4.hpp @@ -0,0 +1,1296 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if BOOST_PP_ITERATION_FINISH_4 <= 256 && BOOST_PP_ITERATION_START_4 >= 256 +# define BOOST_PP_ITERATION_4 256 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 255 && BOOST_PP_ITERATION_START_4 >= 255 +# define BOOST_PP_ITERATION_4 255 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 254 && BOOST_PP_ITERATION_START_4 >= 254 +# define BOOST_PP_ITERATION_4 254 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 253 && BOOST_PP_ITERATION_START_4 >= 253 +# define BOOST_PP_ITERATION_4 253 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 252 && BOOST_PP_ITERATION_START_4 >= 252 +# define BOOST_PP_ITERATION_4 252 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 251 && BOOST_PP_ITERATION_START_4 >= 251 +# define BOOST_PP_ITERATION_4 251 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 250 && BOOST_PP_ITERATION_START_4 >= 250 +# define BOOST_PP_ITERATION_4 250 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 249 && BOOST_PP_ITERATION_START_4 >= 249 +# define BOOST_PP_ITERATION_4 249 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 248 && BOOST_PP_ITERATION_START_4 >= 248 +# define BOOST_PP_ITERATION_4 248 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 247 && BOOST_PP_ITERATION_START_4 >= 247 +# define BOOST_PP_ITERATION_4 247 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 246 && BOOST_PP_ITERATION_START_4 >= 246 +# define BOOST_PP_ITERATION_4 246 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 245 && BOOST_PP_ITERATION_START_4 >= 245 +# define BOOST_PP_ITERATION_4 245 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 244 && BOOST_PP_ITERATION_START_4 >= 244 +# define BOOST_PP_ITERATION_4 244 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 243 && BOOST_PP_ITERATION_START_4 >= 243 +# define BOOST_PP_ITERATION_4 243 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 242 && BOOST_PP_ITERATION_START_4 >= 242 +# define BOOST_PP_ITERATION_4 242 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 241 && BOOST_PP_ITERATION_START_4 >= 241 +# define BOOST_PP_ITERATION_4 241 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 240 && BOOST_PP_ITERATION_START_4 >= 240 +# define BOOST_PP_ITERATION_4 240 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 239 && BOOST_PP_ITERATION_START_4 >= 239 +# define BOOST_PP_ITERATION_4 239 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 238 && BOOST_PP_ITERATION_START_4 >= 238 +# define BOOST_PP_ITERATION_4 238 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 237 && BOOST_PP_ITERATION_START_4 >= 237 +# define BOOST_PP_ITERATION_4 237 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 236 && BOOST_PP_ITERATION_START_4 >= 236 +# define BOOST_PP_ITERATION_4 236 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 235 && BOOST_PP_ITERATION_START_4 >= 235 +# define BOOST_PP_ITERATION_4 235 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 234 && BOOST_PP_ITERATION_START_4 >= 234 +# define BOOST_PP_ITERATION_4 234 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 233 && BOOST_PP_ITERATION_START_4 >= 233 +# define BOOST_PP_ITERATION_4 233 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 232 && BOOST_PP_ITERATION_START_4 >= 232 +# define BOOST_PP_ITERATION_4 232 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 231 && BOOST_PP_ITERATION_START_4 >= 231 +# define BOOST_PP_ITERATION_4 231 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 230 && BOOST_PP_ITERATION_START_4 >= 230 +# define BOOST_PP_ITERATION_4 230 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 229 && BOOST_PP_ITERATION_START_4 >= 229 +# define BOOST_PP_ITERATION_4 229 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 228 && BOOST_PP_ITERATION_START_4 >= 228 +# define BOOST_PP_ITERATION_4 228 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 227 && BOOST_PP_ITERATION_START_4 >= 227 +# define BOOST_PP_ITERATION_4 227 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 226 && BOOST_PP_ITERATION_START_4 >= 226 +# define BOOST_PP_ITERATION_4 226 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 225 && BOOST_PP_ITERATION_START_4 >= 225 +# define BOOST_PP_ITERATION_4 225 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 224 && BOOST_PP_ITERATION_START_4 >= 224 +# define BOOST_PP_ITERATION_4 224 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 223 && BOOST_PP_ITERATION_START_4 >= 223 +# define BOOST_PP_ITERATION_4 223 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 222 && BOOST_PP_ITERATION_START_4 >= 222 +# define BOOST_PP_ITERATION_4 222 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 221 && BOOST_PP_ITERATION_START_4 >= 221 +# define BOOST_PP_ITERATION_4 221 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 220 && BOOST_PP_ITERATION_START_4 >= 220 +# define BOOST_PP_ITERATION_4 220 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 219 && BOOST_PP_ITERATION_START_4 >= 219 +# define BOOST_PP_ITERATION_4 219 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 218 && BOOST_PP_ITERATION_START_4 >= 218 +# define BOOST_PP_ITERATION_4 218 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 217 && BOOST_PP_ITERATION_START_4 >= 217 +# define BOOST_PP_ITERATION_4 217 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 216 && BOOST_PP_ITERATION_START_4 >= 216 +# define BOOST_PP_ITERATION_4 216 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 215 && BOOST_PP_ITERATION_START_4 >= 215 +# define BOOST_PP_ITERATION_4 215 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 214 && BOOST_PP_ITERATION_START_4 >= 214 +# define BOOST_PP_ITERATION_4 214 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 213 && BOOST_PP_ITERATION_START_4 >= 213 +# define BOOST_PP_ITERATION_4 213 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 212 && BOOST_PP_ITERATION_START_4 >= 212 +# define BOOST_PP_ITERATION_4 212 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 211 && BOOST_PP_ITERATION_START_4 >= 211 +# define BOOST_PP_ITERATION_4 211 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 210 && BOOST_PP_ITERATION_START_4 >= 210 +# define BOOST_PP_ITERATION_4 210 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 209 && BOOST_PP_ITERATION_START_4 >= 209 +# define BOOST_PP_ITERATION_4 209 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 208 && BOOST_PP_ITERATION_START_4 >= 208 +# define BOOST_PP_ITERATION_4 208 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 207 && BOOST_PP_ITERATION_START_4 >= 207 +# define BOOST_PP_ITERATION_4 207 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 206 && BOOST_PP_ITERATION_START_4 >= 206 +# define BOOST_PP_ITERATION_4 206 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 205 && BOOST_PP_ITERATION_START_4 >= 205 +# define BOOST_PP_ITERATION_4 205 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 204 && BOOST_PP_ITERATION_START_4 >= 204 +# define BOOST_PP_ITERATION_4 204 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 203 && BOOST_PP_ITERATION_START_4 >= 203 +# define BOOST_PP_ITERATION_4 203 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 202 && BOOST_PP_ITERATION_START_4 >= 202 +# define BOOST_PP_ITERATION_4 202 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 201 && BOOST_PP_ITERATION_START_4 >= 201 +# define BOOST_PP_ITERATION_4 201 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 200 && BOOST_PP_ITERATION_START_4 >= 200 +# define BOOST_PP_ITERATION_4 200 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 199 && BOOST_PP_ITERATION_START_4 >= 199 +# define BOOST_PP_ITERATION_4 199 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 198 && BOOST_PP_ITERATION_START_4 >= 198 +# define BOOST_PP_ITERATION_4 198 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 197 && BOOST_PP_ITERATION_START_4 >= 197 +# define BOOST_PP_ITERATION_4 197 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 196 && BOOST_PP_ITERATION_START_4 >= 196 +# define BOOST_PP_ITERATION_4 196 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 195 && BOOST_PP_ITERATION_START_4 >= 195 +# define BOOST_PP_ITERATION_4 195 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 194 && BOOST_PP_ITERATION_START_4 >= 194 +# define BOOST_PP_ITERATION_4 194 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 193 && BOOST_PP_ITERATION_START_4 >= 193 +# define BOOST_PP_ITERATION_4 193 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 192 && BOOST_PP_ITERATION_START_4 >= 192 +# define BOOST_PP_ITERATION_4 192 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 191 && BOOST_PP_ITERATION_START_4 >= 191 +# define BOOST_PP_ITERATION_4 191 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 190 && BOOST_PP_ITERATION_START_4 >= 190 +# define BOOST_PP_ITERATION_4 190 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 189 && BOOST_PP_ITERATION_START_4 >= 189 +# define BOOST_PP_ITERATION_4 189 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 188 && BOOST_PP_ITERATION_START_4 >= 188 +# define BOOST_PP_ITERATION_4 188 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 187 && BOOST_PP_ITERATION_START_4 >= 187 +# define BOOST_PP_ITERATION_4 187 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 186 && BOOST_PP_ITERATION_START_4 >= 186 +# define BOOST_PP_ITERATION_4 186 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 185 && BOOST_PP_ITERATION_START_4 >= 185 +# define BOOST_PP_ITERATION_4 185 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 184 && BOOST_PP_ITERATION_START_4 >= 184 +# define BOOST_PP_ITERATION_4 184 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 183 && BOOST_PP_ITERATION_START_4 >= 183 +# define BOOST_PP_ITERATION_4 183 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 182 && BOOST_PP_ITERATION_START_4 >= 182 +# define BOOST_PP_ITERATION_4 182 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 181 && BOOST_PP_ITERATION_START_4 >= 181 +# define BOOST_PP_ITERATION_4 181 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 180 && BOOST_PP_ITERATION_START_4 >= 180 +# define BOOST_PP_ITERATION_4 180 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 179 && BOOST_PP_ITERATION_START_4 >= 179 +# define BOOST_PP_ITERATION_4 179 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 178 && BOOST_PP_ITERATION_START_4 >= 178 +# define BOOST_PP_ITERATION_4 178 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 177 && BOOST_PP_ITERATION_START_4 >= 177 +# define BOOST_PP_ITERATION_4 177 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 176 && BOOST_PP_ITERATION_START_4 >= 176 +# define BOOST_PP_ITERATION_4 176 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 175 && BOOST_PP_ITERATION_START_4 >= 175 +# define BOOST_PP_ITERATION_4 175 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 174 && BOOST_PP_ITERATION_START_4 >= 174 +# define BOOST_PP_ITERATION_4 174 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 173 && BOOST_PP_ITERATION_START_4 >= 173 +# define BOOST_PP_ITERATION_4 173 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 172 && BOOST_PP_ITERATION_START_4 >= 172 +# define BOOST_PP_ITERATION_4 172 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 171 && BOOST_PP_ITERATION_START_4 >= 171 +# define BOOST_PP_ITERATION_4 171 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 170 && BOOST_PP_ITERATION_START_4 >= 170 +# define BOOST_PP_ITERATION_4 170 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 169 && BOOST_PP_ITERATION_START_4 >= 169 +# define BOOST_PP_ITERATION_4 169 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 168 && BOOST_PP_ITERATION_START_4 >= 168 +# define BOOST_PP_ITERATION_4 168 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 167 && BOOST_PP_ITERATION_START_4 >= 167 +# define BOOST_PP_ITERATION_4 167 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 166 && BOOST_PP_ITERATION_START_4 >= 166 +# define BOOST_PP_ITERATION_4 166 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 165 && BOOST_PP_ITERATION_START_4 >= 165 +# define BOOST_PP_ITERATION_4 165 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 164 && BOOST_PP_ITERATION_START_4 >= 164 +# define BOOST_PP_ITERATION_4 164 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 163 && BOOST_PP_ITERATION_START_4 >= 163 +# define BOOST_PP_ITERATION_4 163 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 162 && BOOST_PP_ITERATION_START_4 >= 162 +# define BOOST_PP_ITERATION_4 162 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 161 && BOOST_PP_ITERATION_START_4 >= 161 +# define BOOST_PP_ITERATION_4 161 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 160 && BOOST_PP_ITERATION_START_4 >= 160 +# define BOOST_PP_ITERATION_4 160 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 159 && BOOST_PP_ITERATION_START_4 >= 159 +# define BOOST_PP_ITERATION_4 159 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 158 && BOOST_PP_ITERATION_START_4 >= 158 +# define BOOST_PP_ITERATION_4 158 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 157 && BOOST_PP_ITERATION_START_4 >= 157 +# define BOOST_PP_ITERATION_4 157 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 156 && BOOST_PP_ITERATION_START_4 >= 156 +# define BOOST_PP_ITERATION_4 156 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 155 && BOOST_PP_ITERATION_START_4 >= 155 +# define BOOST_PP_ITERATION_4 155 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 154 && BOOST_PP_ITERATION_START_4 >= 154 +# define BOOST_PP_ITERATION_4 154 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 153 && BOOST_PP_ITERATION_START_4 >= 153 +# define BOOST_PP_ITERATION_4 153 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 152 && BOOST_PP_ITERATION_START_4 >= 152 +# define BOOST_PP_ITERATION_4 152 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 151 && BOOST_PP_ITERATION_START_4 >= 151 +# define BOOST_PP_ITERATION_4 151 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 150 && BOOST_PP_ITERATION_START_4 >= 150 +# define BOOST_PP_ITERATION_4 150 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 149 && BOOST_PP_ITERATION_START_4 >= 149 +# define BOOST_PP_ITERATION_4 149 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 148 && BOOST_PP_ITERATION_START_4 >= 148 +# define BOOST_PP_ITERATION_4 148 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 147 && BOOST_PP_ITERATION_START_4 >= 147 +# define BOOST_PP_ITERATION_4 147 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 146 && BOOST_PP_ITERATION_START_4 >= 146 +# define BOOST_PP_ITERATION_4 146 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 145 && BOOST_PP_ITERATION_START_4 >= 145 +# define BOOST_PP_ITERATION_4 145 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 144 && BOOST_PP_ITERATION_START_4 >= 144 +# define BOOST_PP_ITERATION_4 144 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 143 && BOOST_PP_ITERATION_START_4 >= 143 +# define BOOST_PP_ITERATION_4 143 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 142 && BOOST_PP_ITERATION_START_4 >= 142 +# define BOOST_PP_ITERATION_4 142 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 141 && BOOST_PP_ITERATION_START_4 >= 141 +# define BOOST_PP_ITERATION_4 141 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 140 && BOOST_PP_ITERATION_START_4 >= 140 +# define BOOST_PP_ITERATION_4 140 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 139 && BOOST_PP_ITERATION_START_4 >= 139 +# define BOOST_PP_ITERATION_4 139 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 138 && BOOST_PP_ITERATION_START_4 >= 138 +# define BOOST_PP_ITERATION_4 138 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 137 && BOOST_PP_ITERATION_START_4 >= 137 +# define BOOST_PP_ITERATION_4 137 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 136 && BOOST_PP_ITERATION_START_4 >= 136 +# define BOOST_PP_ITERATION_4 136 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 135 && BOOST_PP_ITERATION_START_4 >= 135 +# define BOOST_PP_ITERATION_4 135 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 134 && BOOST_PP_ITERATION_START_4 >= 134 +# define BOOST_PP_ITERATION_4 134 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 133 && BOOST_PP_ITERATION_START_4 >= 133 +# define BOOST_PP_ITERATION_4 133 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 132 && BOOST_PP_ITERATION_START_4 >= 132 +# define BOOST_PP_ITERATION_4 132 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 131 && BOOST_PP_ITERATION_START_4 >= 131 +# define BOOST_PP_ITERATION_4 131 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 130 && BOOST_PP_ITERATION_START_4 >= 130 +# define BOOST_PP_ITERATION_4 130 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 129 && BOOST_PP_ITERATION_START_4 >= 129 +# define BOOST_PP_ITERATION_4 129 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 128 && BOOST_PP_ITERATION_START_4 >= 128 +# define BOOST_PP_ITERATION_4 128 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 127 && BOOST_PP_ITERATION_START_4 >= 127 +# define BOOST_PP_ITERATION_4 127 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 126 && BOOST_PP_ITERATION_START_4 >= 126 +# define BOOST_PP_ITERATION_4 126 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 125 && BOOST_PP_ITERATION_START_4 >= 125 +# define BOOST_PP_ITERATION_4 125 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 124 && BOOST_PP_ITERATION_START_4 >= 124 +# define BOOST_PP_ITERATION_4 124 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 123 && BOOST_PP_ITERATION_START_4 >= 123 +# define BOOST_PP_ITERATION_4 123 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 122 && BOOST_PP_ITERATION_START_4 >= 122 +# define BOOST_PP_ITERATION_4 122 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 121 && BOOST_PP_ITERATION_START_4 >= 121 +# define BOOST_PP_ITERATION_4 121 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 120 && BOOST_PP_ITERATION_START_4 >= 120 +# define BOOST_PP_ITERATION_4 120 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 119 && BOOST_PP_ITERATION_START_4 >= 119 +# define BOOST_PP_ITERATION_4 119 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 118 && BOOST_PP_ITERATION_START_4 >= 118 +# define BOOST_PP_ITERATION_4 118 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 117 && BOOST_PP_ITERATION_START_4 >= 117 +# define BOOST_PP_ITERATION_4 117 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 116 && BOOST_PP_ITERATION_START_4 >= 116 +# define BOOST_PP_ITERATION_4 116 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 115 && BOOST_PP_ITERATION_START_4 >= 115 +# define BOOST_PP_ITERATION_4 115 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 114 && BOOST_PP_ITERATION_START_4 >= 114 +# define BOOST_PP_ITERATION_4 114 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 113 && BOOST_PP_ITERATION_START_4 >= 113 +# define BOOST_PP_ITERATION_4 113 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 112 && BOOST_PP_ITERATION_START_4 >= 112 +# define BOOST_PP_ITERATION_4 112 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 111 && BOOST_PP_ITERATION_START_4 >= 111 +# define BOOST_PP_ITERATION_4 111 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 110 && BOOST_PP_ITERATION_START_4 >= 110 +# define BOOST_PP_ITERATION_4 110 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 109 && BOOST_PP_ITERATION_START_4 >= 109 +# define BOOST_PP_ITERATION_4 109 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 108 && BOOST_PP_ITERATION_START_4 >= 108 +# define BOOST_PP_ITERATION_4 108 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 107 && BOOST_PP_ITERATION_START_4 >= 107 +# define BOOST_PP_ITERATION_4 107 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 106 && BOOST_PP_ITERATION_START_4 >= 106 +# define BOOST_PP_ITERATION_4 106 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 105 && BOOST_PP_ITERATION_START_4 >= 105 +# define BOOST_PP_ITERATION_4 105 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 104 && BOOST_PP_ITERATION_START_4 >= 104 +# define BOOST_PP_ITERATION_4 104 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 103 && BOOST_PP_ITERATION_START_4 >= 103 +# define BOOST_PP_ITERATION_4 103 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 102 && BOOST_PP_ITERATION_START_4 >= 102 +# define BOOST_PP_ITERATION_4 102 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 101 && BOOST_PP_ITERATION_START_4 >= 101 +# define BOOST_PP_ITERATION_4 101 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 100 && BOOST_PP_ITERATION_START_4 >= 100 +# define BOOST_PP_ITERATION_4 100 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 99 && BOOST_PP_ITERATION_START_4 >= 99 +# define BOOST_PP_ITERATION_4 99 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 98 && BOOST_PP_ITERATION_START_4 >= 98 +# define BOOST_PP_ITERATION_4 98 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 97 && BOOST_PP_ITERATION_START_4 >= 97 +# define BOOST_PP_ITERATION_4 97 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 96 && BOOST_PP_ITERATION_START_4 >= 96 +# define BOOST_PP_ITERATION_4 96 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 95 && BOOST_PP_ITERATION_START_4 >= 95 +# define BOOST_PP_ITERATION_4 95 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 94 && BOOST_PP_ITERATION_START_4 >= 94 +# define BOOST_PP_ITERATION_4 94 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 93 && BOOST_PP_ITERATION_START_4 >= 93 +# define BOOST_PP_ITERATION_4 93 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 92 && BOOST_PP_ITERATION_START_4 >= 92 +# define BOOST_PP_ITERATION_4 92 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 91 && BOOST_PP_ITERATION_START_4 >= 91 +# define BOOST_PP_ITERATION_4 91 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 90 && BOOST_PP_ITERATION_START_4 >= 90 +# define BOOST_PP_ITERATION_4 90 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 89 && BOOST_PP_ITERATION_START_4 >= 89 +# define BOOST_PP_ITERATION_4 89 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 88 && BOOST_PP_ITERATION_START_4 >= 88 +# define BOOST_PP_ITERATION_4 88 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 87 && BOOST_PP_ITERATION_START_4 >= 87 +# define BOOST_PP_ITERATION_4 87 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 86 && BOOST_PP_ITERATION_START_4 >= 86 +# define BOOST_PP_ITERATION_4 86 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 85 && BOOST_PP_ITERATION_START_4 >= 85 +# define BOOST_PP_ITERATION_4 85 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 84 && BOOST_PP_ITERATION_START_4 >= 84 +# define BOOST_PP_ITERATION_4 84 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 83 && BOOST_PP_ITERATION_START_4 >= 83 +# define BOOST_PP_ITERATION_4 83 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 82 && BOOST_PP_ITERATION_START_4 >= 82 +# define BOOST_PP_ITERATION_4 82 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 81 && BOOST_PP_ITERATION_START_4 >= 81 +# define BOOST_PP_ITERATION_4 81 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 80 && BOOST_PP_ITERATION_START_4 >= 80 +# define BOOST_PP_ITERATION_4 80 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 79 && BOOST_PP_ITERATION_START_4 >= 79 +# define BOOST_PP_ITERATION_4 79 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 78 && BOOST_PP_ITERATION_START_4 >= 78 +# define BOOST_PP_ITERATION_4 78 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 77 && BOOST_PP_ITERATION_START_4 >= 77 +# define BOOST_PP_ITERATION_4 77 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 76 && BOOST_PP_ITERATION_START_4 >= 76 +# define BOOST_PP_ITERATION_4 76 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 75 && BOOST_PP_ITERATION_START_4 >= 75 +# define BOOST_PP_ITERATION_4 75 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 74 && BOOST_PP_ITERATION_START_4 >= 74 +# define BOOST_PP_ITERATION_4 74 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 73 && BOOST_PP_ITERATION_START_4 >= 73 +# define BOOST_PP_ITERATION_4 73 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 72 && BOOST_PP_ITERATION_START_4 >= 72 +# define BOOST_PP_ITERATION_4 72 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 71 && BOOST_PP_ITERATION_START_4 >= 71 +# define BOOST_PP_ITERATION_4 71 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 70 && BOOST_PP_ITERATION_START_4 >= 70 +# define BOOST_PP_ITERATION_4 70 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 69 && BOOST_PP_ITERATION_START_4 >= 69 +# define BOOST_PP_ITERATION_4 69 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 68 && BOOST_PP_ITERATION_START_4 >= 68 +# define BOOST_PP_ITERATION_4 68 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 67 && BOOST_PP_ITERATION_START_4 >= 67 +# define BOOST_PP_ITERATION_4 67 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 66 && BOOST_PP_ITERATION_START_4 >= 66 +# define BOOST_PP_ITERATION_4 66 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 65 && BOOST_PP_ITERATION_START_4 >= 65 +# define BOOST_PP_ITERATION_4 65 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 64 && BOOST_PP_ITERATION_START_4 >= 64 +# define BOOST_PP_ITERATION_4 64 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 63 && BOOST_PP_ITERATION_START_4 >= 63 +# define BOOST_PP_ITERATION_4 63 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 62 && BOOST_PP_ITERATION_START_4 >= 62 +# define BOOST_PP_ITERATION_4 62 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 61 && BOOST_PP_ITERATION_START_4 >= 61 +# define BOOST_PP_ITERATION_4 61 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 60 && BOOST_PP_ITERATION_START_4 >= 60 +# define BOOST_PP_ITERATION_4 60 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 59 && BOOST_PP_ITERATION_START_4 >= 59 +# define BOOST_PP_ITERATION_4 59 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 58 && BOOST_PP_ITERATION_START_4 >= 58 +# define BOOST_PP_ITERATION_4 58 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 57 && BOOST_PP_ITERATION_START_4 >= 57 +# define BOOST_PP_ITERATION_4 57 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 56 && BOOST_PP_ITERATION_START_4 >= 56 +# define BOOST_PP_ITERATION_4 56 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 55 && BOOST_PP_ITERATION_START_4 >= 55 +# define BOOST_PP_ITERATION_4 55 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 54 && BOOST_PP_ITERATION_START_4 >= 54 +# define BOOST_PP_ITERATION_4 54 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 53 && BOOST_PP_ITERATION_START_4 >= 53 +# define BOOST_PP_ITERATION_4 53 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 52 && BOOST_PP_ITERATION_START_4 >= 52 +# define BOOST_PP_ITERATION_4 52 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 51 && BOOST_PP_ITERATION_START_4 >= 51 +# define BOOST_PP_ITERATION_4 51 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 50 && BOOST_PP_ITERATION_START_4 >= 50 +# define BOOST_PP_ITERATION_4 50 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 49 && BOOST_PP_ITERATION_START_4 >= 49 +# define BOOST_PP_ITERATION_4 49 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 48 && BOOST_PP_ITERATION_START_4 >= 48 +# define BOOST_PP_ITERATION_4 48 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 47 && BOOST_PP_ITERATION_START_4 >= 47 +# define BOOST_PP_ITERATION_4 47 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 46 && BOOST_PP_ITERATION_START_4 >= 46 +# define BOOST_PP_ITERATION_4 46 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 45 && BOOST_PP_ITERATION_START_4 >= 45 +# define BOOST_PP_ITERATION_4 45 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 44 && BOOST_PP_ITERATION_START_4 >= 44 +# define BOOST_PP_ITERATION_4 44 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 43 && BOOST_PP_ITERATION_START_4 >= 43 +# define BOOST_PP_ITERATION_4 43 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 42 && BOOST_PP_ITERATION_START_4 >= 42 +# define BOOST_PP_ITERATION_4 42 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 41 && BOOST_PP_ITERATION_START_4 >= 41 +# define BOOST_PP_ITERATION_4 41 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 40 && BOOST_PP_ITERATION_START_4 >= 40 +# define BOOST_PP_ITERATION_4 40 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 39 && BOOST_PP_ITERATION_START_4 >= 39 +# define BOOST_PP_ITERATION_4 39 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 38 && BOOST_PP_ITERATION_START_4 >= 38 +# define BOOST_PP_ITERATION_4 38 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 37 && BOOST_PP_ITERATION_START_4 >= 37 +# define BOOST_PP_ITERATION_4 37 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 36 && BOOST_PP_ITERATION_START_4 >= 36 +# define BOOST_PP_ITERATION_4 36 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 35 && BOOST_PP_ITERATION_START_4 >= 35 +# define BOOST_PP_ITERATION_4 35 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 34 && BOOST_PP_ITERATION_START_4 >= 34 +# define BOOST_PP_ITERATION_4 34 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 33 && BOOST_PP_ITERATION_START_4 >= 33 +# define BOOST_PP_ITERATION_4 33 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 32 && BOOST_PP_ITERATION_START_4 >= 32 +# define BOOST_PP_ITERATION_4 32 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 31 && BOOST_PP_ITERATION_START_4 >= 31 +# define BOOST_PP_ITERATION_4 31 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 30 && BOOST_PP_ITERATION_START_4 >= 30 +# define BOOST_PP_ITERATION_4 30 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 29 && BOOST_PP_ITERATION_START_4 >= 29 +# define BOOST_PP_ITERATION_4 29 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 28 && BOOST_PP_ITERATION_START_4 >= 28 +# define BOOST_PP_ITERATION_4 28 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 27 && BOOST_PP_ITERATION_START_4 >= 27 +# define BOOST_PP_ITERATION_4 27 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 26 && BOOST_PP_ITERATION_START_4 >= 26 +# define BOOST_PP_ITERATION_4 26 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 25 && BOOST_PP_ITERATION_START_4 >= 25 +# define BOOST_PP_ITERATION_4 25 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 24 && BOOST_PP_ITERATION_START_4 >= 24 +# define BOOST_PP_ITERATION_4 24 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 23 && BOOST_PP_ITERATION_START_4 >= 23 +# define BOOST_PP_ITERATION_4 23 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 22 && BOOST_PP_ITERATION_START_4 >= 22 +# define BOOST_PP_ITERATION_4 22 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 21 && BOOST_PP_ITERATION_START_4 >= 21 +# define BOOST_PP_ITERATION_4 21 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 20 && BOOST_PP_ITERATION_START_4 >= 20 +# define BOOST_PP_ITERATION_4 20 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 19 && BOOST_PP_ITERATION_START_4 >= 19 +# define BOOST_PP_ITERATION_4 19 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 18 && BOOST_PP_ITERATION_START_4 >= 18 +# define BOOST_PP_ITERATION_4 18 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 17 && BOOST_PP_ITERATION_START_4 >= 17 +# define BOOST_PP_ITERATION_4 17 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 16 && BOOST_PP_ITERATION_START_4 >= 16 +# define BOOST_PP_ITERATION_4 16 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 15 && BOOST_PP_ITERATION_START_4 >= 15 +# define BOOST_PP_ITERATION_4 15 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 14 && BOOST_PP_ITERATION_START_4 >= 14 +# define BOOST_PP_ITERATION_4 14 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 13 && BOOST_PP_ITERATION_START_4 >= 13 +# define BOOST_PP_ITERATION_4 13 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 12 && BOOST_PP_ITERATION_START_4 >= 12 +# define BOOST_PP_ITERATION_4 12 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 11 && BOOST_PP_ITERATION_START_4 >= 11 +# define BOOST_PP_ITERATION_4 11 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 10 && BOOST_PP_ITERATION_START_4 >= 10 +# define BOOST_PP_ITERATION_4 10 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 9 && BOOST_PP_ITERATION_START_4 >= 9 +# define BOOST_PP_ITERATION_4 9 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 8 && BOOST_PP_ITERATION_START_4 >= 8 +# define BOOST_PP_ITERATION_4 8 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 7 && BOOST_PP_ITERATION_START_4 >= 7 +# define BOOST_PP_ITERATION_4 7 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 6 && BOOST_PP_ITERATION_START_4 >= 6 +# define BOOST_PP_ITERATION_4 6 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 5 && BOOST_PP_ITERATION_START_4 >= 5 +# define BOOST_PP_ITERATION_4 5 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 4 && BOOST_PP_ITERATION_START_4 >= 4 +# define BOOST_PP_ITERATION_4 4 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 3 && BOOST_PP_ITERATION_START_4 >= 3 +# define BOOST_PP_ITERATION_4 3 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 2 && BOOST_PP_ITERATION_START_4 >= 2 +# define BOOST_PP_ITERATION_4 2 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 1 && BOOST_PP_ITERATION_START_4 >= 1 +# define BOOST_PP_ITERATION_4 1 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 0 && BOOST_PP_ITERATION_START_4 >= 0 +# define BOOST_PP_ITERATION_4 0 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/iter/reverse5.hpp b/contrib/src/boost/preprocessor/iteration/detail/iter/reverse5.hpp new file mode 100644 index 0000000..225a557 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/iter/reverse5.hpp @@ -0,0 +1,1296 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if BOOST_PP_ITERATION_FINISH_5 <= 256 && BOOST_PP_ITERATION_START_5 >= 256 +# define BOOST_PP_ITERATION_5 256 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 255 && BOOST_PP_ITERATION_START_5 >= 255 +# define BOOST_PP_ITERATION_5 255 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 254 && BOOST_PP_ITERATION_START_5 >= 254 +# define BOOST_PP_ITERATION_5 254 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 253 && BOOST_PP_ITERATION_START_5 >= 253 +# define BOOST_PP_ITERATION_5 253 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 252 && BOOST_PP_ITERATION_START_5 >= 252 +# define BOOST_PP_ITERATION_5 252 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 251 && BOOST_PP_ITERATION_START_5 >= 251 +# define BOOST_PP_ITERATION_5 251 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 250 && BOOST_PP_ITERATION_START_5 >= 250 +# define BOOST_PP_ITERATION_5 250 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 249 && BOOST_PP_ITERATION_START_5 >= 249 +# define BOOST_PP_ITERATION_5 249 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 248 && BOOST_PP_ITERATION_START_5 >= 248 +# define BOOST_PP_ITERATION_5 248 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 247 && BOOST_PP_ITERATION_START_5 >= 247 +# define BOOST_PP_ITERATION_5 247 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 246 && BOOST_PP_ITERATION_START_5 >= 246 +# define BOOST_PP_ITERATION_5 246 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 245 && BOOST_PP_ITERATION_START_5 >= 245 +# define BOOST_PP_ITERATION_5 245 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 244 && BOOST_PP_ITERATION_START_5 >= 244 +# define BOOST_PP_ITERATION_5 244 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 243 && BOOST_PP_ITERATION_START_5 >= 243 +# define BOOST_PP_ITERATION_5 243 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 242 && BOOST_PP_ITERATION_START_5 >= 242 +# define BOOST_PP_ITERATION_5 242 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 241 && BOOST_PP_ITERATION_START_5 >= 241 +# define BOOST_PP_ITERATION_5 241 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 240 && BOOST_PP_ITERATION_START_5 >= 240 +# define BOOST_PP_ITERATION_5 240 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 239 && BOOST_PP_ITERATION_START_5 >= 239 +# define BOOST_PP_ITERATION_5 239 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 238 && BOOST_PP_ITERATION_START_5 >= 238 +# define BOOST_PP_ITERATION_5 238 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 237 && BOOST_PP_ITERATION_START_5 >= 237 +# define BOOST_PP_ITERATION_5 237 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 236 && BOOST_PP_ITERATION_START_5 >= 236 +# define BOOST_PP_ITERATION_5 236 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 235 && BOOST_PP_ITERATION_START_5 >= 235 +# define BOOST_PP_ITERATION_5 235 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 234 && BOOST_PP_ITERATION_START_5 >= 234 +# define BOOST_PP_ITERATION_5 234 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 233 && BOOST_PP_ITERATION_START_5 >= 233 +# define BOOST_PP_ITERATION_5 233 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 232 && BOOST_PP_ITERATION_START_5 >= 232 +# define BOOST_PP_ITERATION_5 232 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 231 && BOOST_PP_ITERATION_START_5 >= 231 +# define BOOST_PP_ITERATION_5 231 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 230 && BOOST_PP_ITERATION_START_5 >= 230 +# define BOOST_PP_ITERATION_5 230 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 229 && BOOST_PP_ITERATION_START_5 >= 229 +# define BOOST_PP_ITERATION_5 229 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 228 && BOOST_PP_ITERATION_START_5 >= 228 +# define BOOST_PP_ITERATION_5 228 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 227 && BOOST_PP_ITERATION_START_5 >= 227 +# define BOOST_PP_ITERATION_5 227 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 226 && BOOST_PP_ITERATION_START_5 >= 226 +# define BOOST_PP_ITERATION_5 226 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 225 && BOOST_PP_ITERATION_START_5 >= 225 +# define BOOST_PP_ITERATION_5 225 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 224 && BOOST_PP_ITERATION_START_5 >= 224 +# define BOOST_PP_ITERATION_5 224 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 223 && BOOST_PP_ITERATION_START_5 >= 223 +# define BOOST_PP_ITERATION_5 223 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 222 && BOOST_PP_ITERATION_START_5 >= 222 +# define BOOST_PP_ITERATION_5 222 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 221 && BOOST_PP_ITERATION_START_5 >= 221 +# define BOOST_PP_ITERATION_5 221 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 220 && BOOST_PP_ITERATION_START_5 >= 220 +# define BOOST_PP_ITERATION_5 220 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 219 && BOOST_PP_ITERATION_START_5 >= 219 +# define BOOST_PP_ITERATION_5 219 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 218 && BOOST_PP_ITERATION_START_5 >= 218 +# define BOOST_PP_ITERATION_5 218 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 217 && BOOST_PP_ITERATION_START_5 >= 217 +# define BOOST_PP_ITERATION_5 217 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 216 && BOOST_PP_ITERATION_START_5 >= 216 +# define BOOST_PP_ITERATION_5 216 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 215 && BOOST_PP_ITERATION_START_5 >= 215 +# define BOOST_PP_ITERATION_5 215 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 214 && BOOST_PP_ITERATION_START_5 >= 214 +# define BOOST_PP_ITERATION_5 214 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 213 && BOOST_PP_ITERATION_START_5 >= 213 +# define BOOST_PP_ITERATION_5 213 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 212 && BOOST_PP_ITERATION_START_5 >= 212 +# define BOOST_PP_ITERATION_5 212 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 211 && BOOST_PP_ITERATION_START_5 >= 211 +# define BOOST_PP_ITERATION_5 211 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 210 && BOOST_PP_ITERATION_START_5 >= 210 +# define BOOST_PP_ITERATION_5 210 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 209 && BOOST_PP_ITERATION_START_5 >= 209 +# define BOOST_PP_ITERATION_5 209 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 208 && BOOST_PP_ITERATION_START_5 >= 208 +# define BOOST_PP_ITERATION_5 208 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 207 && BOOST_PP_ITERATION_START_5 >= 207 +# define BOOST_PP_ITERATION_5 207 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 206 && BOOST_PP_ITERATION_START_5 >= 206 +# define BOOST_PP_ITERATION_5 206 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 205 && BOOST_PP_ITERATION_START_5 >= 205 +# define BOOST_PP_ITERATION_5 205 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 204 && BOOST_PP_ITERATION_START_5 >= 204 +# define BOOST_PP_ITERATION_5 204 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 203 && BOOST_PP_ITERATION_START_5 >= 203 +# define BOOST_PP_ITERATION_5 203 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 202 && BOOST_PP_ITERATION_START_5 >= 202 +# define BOOST_PP_ITERATION_5 202 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 201 && BOOST_PP_ITERATION_START_5 >= 201 +# define BOOST_PP_ITERATION_5 201 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 200 && BOOST_PP_ITERATION_START_5 >= 200 +# define BOOST_PP_ITERATION_5 200 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 199 && BOOST_PP_ITERATION_START_5 >= 199 +# define BOOST_PP_ITERATION_5 199 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 198 && BOOST_PP_ITERATION_START_5 >= 198 +# define BOOST_PP_ITERATION_5 198 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 197 && BOOST_PP_ITERATION_START_5 >= 197 +# define BOOST_PP_ITERATION_5 197 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 196 && BOOST_PP_ITERATION_START_5 >= 196 +# define BOOST_PP_ITERATION_5 196 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 195 && BOOST_PP_ITERATION_START_5 >= 195 +# define BOOST_PP_ITERATION_5 195 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 194 && BOOST_PP_ITERATION_START_5 >= 194 +# define BOOST_PP_ITERATION_5 194 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 193 && BOOST_PP_ITERATION_START_5 >= 193 +# define BOOST_PP_ITERATION_5 193 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 192 && BOOST_PP_ITERATION_START_5 >= 192 +# define BOOST_PP_ITERATION_5 192 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 191 && BOOST_PP_ITERATION_START_5 >= 191 +# define BOOST_PP_ITERATION_5 191 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 190 && BOOST_PP_ITERATION_START_5 >= 190 +# define BOOST_PP_ITERATION_5 190 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 189 && BOOST_PP_ITERATION_START_5 >= 189 +# define BOOST_PP_ITERATION_5 189 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 188 && BOOST_PP_ITERATION_START_5 >= 188 +# define BOOST_PP_ITERATION_5 188 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 187 && BOOST_PP_ITERATION_START_5 >= 187 +# define BOOST_PP_ITERATION_5 187 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 186 && BOOST_PP_ITERATION_START_5 >= 186 +# define BOOST_PP_ITERATION_5 186 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 185 && BOOST_PP_ITERATION_START_5 >= 185 +# define BOOST_PP_ITERATION_5 185 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 184 && BOOST_PP_ITERATION_START_5 >= 184 +# define BOOST_PP_ITERATION_5 184 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 183 && BOOST_PP_ITERATION_START_5 >= 183 +# define BOOST_PP_ITERATION_5 183 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 182 && BOOST_PP_ITERATION_START_5 >= 182 +# define BOOST_PP_ITERATION_5 182 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 181 && BOOST_PP_ITERATION_START_5 >= 181 +# define BOOST_PP_ITERATION_5 181 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 180 && BOOST_PP_ITERATION_START_5 >= 180 +# define BOOST_PP_ITERATION_5 180 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 179 && BOOST_PP_ITERATION_START_5 >= 179 +# define BOOST_PP_ITERATION_5 179 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 178 && BOOST_PP_ITERATION_START_5 >= 178 +# define BOOST_PP_ITERATION_5 178 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 177 && BOOST_PP_ITERATION_START_5 >= 177 +# define BOOST_PP_ITERATION_5 177 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 176 && BOOST_PP_ITERATION_START_5 >= 176 +# define BOOST_PP_ITERATION_5 176 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 175 && BOOST_PP_ITERATION_START_5 >= 175 +# define BOOST_PP_ITERATION_5 175 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 174 && BOOST_PP_ITERATION_START_5 >= 174 +# define BOOST_PP_ITERATION_5 174 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 173 && BOOST_PP_ITERATION_START_5 >= 173 +# define BOOST_PP_ITERATION_5 173 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 172 && BOOST_PP_ITERATION_START_5 >= 172 +# define BOOST_PP_ITERATION_5 172 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 171 && BOOST_PP_ITERATION_START_5 >= 171 +# define BOOST_PP_ITERATION_5 171 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 170 && BOOST_PP_ITERATION_START_5 >= 170 +# define BOOST_PP_ITERATION_5 170 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 169 && BOOST_PP_ITERATION_START_5 >= 169 +# define BOOST_PP_ITERATION_5 169 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 168 && BOOST_PP_ITERATION_START_5 >= 168 +# define BOOST_PP_ITERATION_5 168 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 167 && BOOST_PP_ITERATION_START_5 >= 167 +# define BOOST_PP_ITERATION_5 167 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 166 && BOOST_PP_ITERATION_START_5 >= 166 +# define BOOST_PP_ITERATION_5 166 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 165 && BOOST_PP_ITERATION_START_5 >= 165 +# define BOOST_PP_ITERATION_5 165 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 164 && BOOST_PP_ITERATION_START_5 >= 164 +# define BOOST_PP_ITERATION_5 164 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 163 && BOOST_PP_ITERATION_START_5 >= 163 +# define BOOST_PP_ITERATION_5 163 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 162 && BOOST_PP_ITERATION_START_5 >= 162 +# define BOOST_PP_ITERATION_5 162 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 161 && BOOST_PP_ITERATION_START_5 >= 161 +# define BOOST_PP_ITERATION_5 161 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 160 && BOOST_PP_ITERATION_START_5 >= 160 +# define BOOST_PP_ITERATION_5 160 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 159 && BOOST_PP_ITERATION_START_5 >= 159 +# define BOOST_PP_ITERATION_5 159 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 158 && BOOST_PP_ITERATION_START_5 >= 158 +# define BOOST_PP_ITERATION_5 158 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 157 && BOOST_PP_ITERATION_START_5 >= 157 +# define BOOST_PP_ITERATION_5 157 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 156 && BOOST_PP_ITERATION_START_5 >= 156 +# define BOOST_PP_ITERATION_5 156 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 155 && BOOST_PP_ITERATION_START_5 >= 155 +# define BOOST_PP_ITERATION_5 155 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 154 && BOOST_PP_ITERATION_START_5 >= 154 +# define BOOST_PP_ITERATION_5 154 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 153 && BOOST_PP_ITERATION_START_5 >= 153 +# define BOOST_PP_ITERATION_5 153 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 152 && BOOST_PP_ITERATION_START_5 >= 152 +# define BOOST_PP_ITERATION_5 152 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 151 && BOOST_PP_ITERATION_START_5 >= 151 +# define BOOST_PP_ITERATION_5 151 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 150 && BOOST_PP_ITERATION_START_5 >= 150 +# define BOOST_PP_ITERATION_5 150 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 149 && BOOST_PP_ITERATION_START_5 >= 149 +# define BOOST_PP_ITERATION_5 149 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 148 && BOOST_PP_ITERATION_START_5 >= 148 +# define BOOST_PP_ITERATION_5 148 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 147 && BOOST_PP_ITERATION_START_5 >= 147 +# define BOOST_PP_ITERATION_5 147 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 146 && BOOST_PP_ITERATION_START_5 >= 146 +# define BOOST_PP_ITERATION_5 146 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 145 && BOOST_PP_ITERATION_START_5 >= 145 +# define BOOST_PP_ITERATION_5 145 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 144 && BOOST_PP_ITERATION_START_5 >= 144 +# define BOOST_PP_ITERATION_5 144 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 143 && BOOST_PP_ITERATION_START_5 >= 143 +# define BOOST_PP_ITERATION_5 143 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 142 && BOOST_PP_ITERATION_START_5 >= 142 +# define BOOST_PP_ITERATION_5 142 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 141 && BOOST_PP_ITERATION_START_5 >= 141 +# define BOOST_PP_ITERATION_5 141 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 140 && BOOST_PP_ITERATION_START_5 >= 140 +# define BOOST_PP_ITERATION_5 140 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 139 && BOOST_PP_ITERATION_START_5 >= 139 +# define BOOST_PP_ITERATION_5 139 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 138 && BOOST_PP_ITERATION_START_5 >= 138 +# define BOOST_PP_ITERATION_5 138 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 137 && BOOST_PP_ITERATION_START_5 >= 137 +# define BOOST_PP_ITERATION_5 137 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 136 && BOOST_PP_ITERATION_START_5 >= 136 +# define BOOST_PP_ITERATION_5 136 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 135 && BOOST_PP_ITERATION_START_5 >= 135 +# define BOOST_PP_ITERATION_5 135 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 134 && BOOST_PP_ITERATION_START_5 >= 134 +# define BOOST_PP_ITERATION_5 134 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 133 && BOOST_PP_ITERATION_START_5 >= 133 +# define BOOST_PP_ITERATION_5 133 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 132 && BOOST_PP_ITERATION_START_5 >= 132 +# define BOOST_PP_ITERATION_5 132 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 131 && BOOST_PP_ITERATION_START_5 >= 131 +# define BOOST_PP_ITERATION_5 131 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 130 && BOOST_PP_ITERATION_START_5 >= 130 +# define BOOST_PP_ITERATION_5 130 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 129 && BOOST_PP_ITERATION_START_5 >= 129 +# define BOOST_PP_ITERATION_5 129 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 128 && BOOST_PP_ITERATION_START_5 >= 128 +# define BOOST_PP_ITERATION_5 128 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 127 && BOOST_PP_ITERATION_START_5 >= 127 +# define BOOST_PP_ITERATION_5 127 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 126 && BOOST_PP_ITERATION_START_5 >= 126 +# define BOOST_PP_ITERATION_5 126 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 125 && BOOST_PP_ITERATION_START_5 >= 125 +# define BOOST_PP_ITERATION_5 125 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 124 && BOOST_PP_ITERATION_START_5 >= 124 +# define BOOST_PP_ITERATION_5 124 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 123 && BOOST_PP_ITERATION_START_5 >= 123 +# define BOOST_PP_ITERATION_5 123 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 122 && BOOST_PP_ITERATION_START_5 >= 122 +# define BOOST_PP_ITERATION_5 122 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 121 && BOOST_PP_ITERATION_START_5 >= 121 +# define BOOST_PP_ITERATION_5 121 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 120 && BOOST_PP_ITERATION_START_5 >= 120 +# define BOOST_PP_ITERATION_5 120 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 119 && BOOST_PP_ITERATION_START_5 >= 119 +# define BOOST_PP_ITERATION_5 119 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 118 && BOOST_PP_ITERATION_START_5 >= 118 +# define BOOST_PP_ITERATION_5 118 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 117 && BOOST_PP_ITERATION_START_5 >= 117 +# define BOOST_PP_ITERATION_5 117 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 116 && BOOST_PP_ITERATION_START_5 >= 116 +# define BOOST_PP_ITERATION_5 116 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 115 && BOOST_PP_ITERATION_START_5 >= 115 +# define BOOST_PP_ITERATION_5 115 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 114 && BOOST_PP_ITERATION_START_5 >= 114 +# define BOOST_PP_ITERATION_5 114 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 113 && BOOST_PP_ITERATION_START_5 >= 113 +# define BOOST_PP_ITERATION_5 113 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 112 && BOOST_PP_ITERATION_START_5 >= 112 +# define BOOST_PP_ITERATION_5 112 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 111 && BOOST_PP_ITERATION_START_5 >= 111 +# define BOOST_PP_ITERATION_5 111 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 110 && BOOST_PP_ITERATION_START_5 >= 110 +# define BOOST_PP_ITERATION_5 110 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 109 && BOOST_PP_ITERATION_START_5 >= 109 +# define BOOST_PP_ITERATION_5 109 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 108 && BOOST_PP_ITERATION_START_5 >= 108 +# define BOOST_PP_ITERATION_5 108 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 107 && BOOST_PP_ITERATION_START_5 >= 107 +# define BOOST_PP_ITERATION_5 107 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 106 && BOOST_PP_ITERATION_START_5 >= 106 +# define BOOST_PP_ITERATION_5 106 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 105 && BOOST_PP_ITERATION_START_5 >= 105 +# define BOOST_PP_ITERATION_5 105 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 104 && BOOST_PP_ITERATION_START_5 >= 104 +# define BOOST_PP_ITERATION_5 104 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 103 && BOOST_PP_ITERATION_START_5 >= 103 +# define BOOST_PP_ITERATION_5 103 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 102 && BOOST_PP_ITERATION_START_5 >= 102 +# define BOOST_PP_ITERATION_5 102 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 101 && BOOST_PP_ITERATION_START_5 >= 101 +# define BOOST_PP_ITERATION_5 101 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 100 && BOOST_PP_ITERATION_START_5 >= 100 +# define BOOST_PP_ITERATION_5 100 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 99 && BOOST_PP_ITERATION_START_5 >= 99 +# define BOOST_PP_ITERATION_5 99 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 98 && BOOST_PP_ITERATION_START_5 >= 98 +# define BOOST_PP_ITERATION_5 98 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 97 && BOOST_PP_ITERATION_START_5 >= 97 +# define BOOST_PP_ITERATION_5 97 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 96 && BOOST_PP_ITERATION_START_5 >= 96 +# define BOOST_PP_ITERATION_5 96 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 95 && BOOST_PP_ITERATION_START_5 >= 95 +# define BOOST_PP_ITERATION_5 95 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 94 && BOOST_PP_ITERATION_START_5 >= 94 +# define BOOST_PP_ITERATION_5 94 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 93 && BOOST_PP_ITERATION_START_5 >= 93 +# define BOOST_PP_ITERATION_5 93 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 92 && BOOST_PP_ITERATION_START_5 >= 92 +# define BOOST_PP_ITERATION_5 92 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 91 && BOOST_PP_ITERATION_START_5 >= 91 +# define BOOST_PP_ITERATION_5 91 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 90 && BOOST_PP_ITERATION_START_5 >= 90 +# define BOOST_PP_ITERATION_5 90 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 89 && BOOST_PP_ITERATION_START_5 >= 89 +# define BOOST_PP_ITERATION_5 89 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 88 && BOOST_PP_ITERATION_START_5 >= 88 +# define BOOST_PP_ITERATION_5 88 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 87 && BOOST_PP_ITERATION_START_5 >= 87 +# define BOOST_PP_ITERATION_5 87 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 86 && BOOST_PP_ITERATION_START_5 >= 86 +# define BOOST_PP_ITERATION_5 86 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 85 && BOOST_PP_ITERATION_START_5 >= 85 +# define BOOST_PP_ITERATION_5 85 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 84 && BOOST_PP_ITERATION_START_5 >= 84 +# define BOOST_PP_ITERATION_5 84 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 83 && BOOST_PP_ITERATION_START_5 >= 83 +# define BOOST_PP_ITERATION_5 83 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 82 && BOOST_PP_ITERATION_START_5 >= 82 +# define BOOST_PP_ITERATION_5 82 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 81 && BOOST_PP_ITERATION_START_5 >= 81 +# define BOOST_PP_ITERATION_5 81 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 80 && BOOST_PP_ITERATION_START_5 >= 80 +# define BOOST_PP_ITERATION_5 80 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 79 && BOOST_PP_ITERATION_START_5 >= 79 +# define BOOST_PP_ITERATION_5 79 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 78 && BOOST_PP_ITERATION_START_5 >= 78 +# define BOOST_PP_ITERATION_5 78 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 77 && BOOST_PP_ITERATION_START_5 >= 77 +# define BOOST_PP_ITERATION_5 77 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 76 && BOOST_PP_ITERATION_START_5 >= 76 +# define BOOST_PP_ITERATION_5 76 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 75 && BOOST_PP_ITERATION_START_5 >= 75 +# define BOOST_PP_ITERATION_5 75 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 74 && BOOST_PP_ITERATION_START_5 >= 74 +# define BOOST_PP_ITERATION_5 74 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 73 && BOOST_PP_ITERATION_START_5 >= 73 +# define BOOST_PP_ITERATION_5 73 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 72 && BOOST_PP_ITERATION_START_5 >= 72 +# define BOOST_PP_ITERATION_5 72 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 71 && BOOST_PP_ITERATION_START_5 >= 71 +# define BOOST_PP_ITERATION_5 71 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 70 && BOOST_PP_ITERATION_START_5 >= 70 +# define BOOST_PP_ITERATION_5 70 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 69 && BOOST_PP_ITERATION_START_5 >= 69 +# define BOOST_PP_ITERATION_5 69 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 68 && BOOST_PP_ITERATION_START_5 >= 68 +# define BOOST_PP_ITERATION_5 68 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 67 && BOOST_PP_ITERATION_START_5 >= 67 +# define BOOST_PP_ITERATION_5 67 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 66 && BOOST_PP_ITERATION_START_5 >= 66 +# define BOOST_PP_ITERATION_5 66 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 65 && BOOST_PP_ITERATION_START_5 >= 65 +# define BOOST_PP_ITERATION_5 65 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 64 && BOOST_PP_ITERATION_START_5 >= 64 +# define BOOST_PP_ITERATION_5 64 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 63 && BOOST_PP_ITERATION_START_5 >= 63 +# define BOOST_PP_ITERATION_5 63 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 62 && BOOST_PP_ITERATION_START_5 >= 62 +# define BOOST_PP_ITERATION_5 62 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 61 && BOOST_PP_ITERATION_START_5 >= 61 +# define BOOST_PP_ITERATION_5 61 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 60 && BOOST_PP_ITERATION_START_5 >= 60 +# define BOOST_PP_ITERATION_5 60 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 59 && BOOST_PP_ITERATION_START_5 >= 59 +# define BOOST_PP_ITERATION_5 59 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 58 && BOOST_PP_ITERATION_START_5 >= 58 +# define BOOST_PP_ITERATION_5 58 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 57 && BOOST_PP_ITERATION_START_5 >= 57 +# define BOOST_PP_ITERATION_5 57 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 56 && BOOST_PP_ITERATION_START_5 >= 56 +# define BOOST_PP_ITERATION_5 56 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 55 && BOOST_PP_ITERATION_START_5 >= 55 +# define BOOST_PP_ITERATION_5 55 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 54 && BOOST_PP_ITERATION_START_5 >= 54 +# define BOOST_PP_ITERATION_5 54 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 53 && BOOST_PP_ITERATION_START_5 >= 53 +# define BOOST_PP_ITERATION_5 53 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 52 && BOOST_PP_ITERATION_START_5 >= 52 +# define BOOST_PP_ITERATION_5 52 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 51 && BOOST_PP_ITERATION_START_5 >= 51 +# define BOOST_PP_ITERATION_5 51 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 50 && BOOST_PP_ITERATION_START_5 >= 50 +# define BOOST_PP_ITERATION_5 50 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 49 && BOOST_PP_ITERATION_START_5 >= 49 +# define BOOST_PP_ITERATION_5 49 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 48 && BOOST_PP_ITERATION_START_5 >= 48 +# define BOOST_PP_ITERATION_5 48 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 47 && BOOST_PP_ITERATION_START_5 >= 47 +# define BOOST_PP_ITERATION_5 47 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 46 && BOOST_PP_ITERATION_START_5 >= 46 +# define BOOST_PP_ITERATION_5 46 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 45 && BOOST_PP_ITERATION_START_5 >= 45 +# define BOOST_PP_ITERATION_5 45 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 44 && BOOST_PP_ITERATION_START_5 >= 44 +# define BOOST_PP_ITERATION_5 44 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 43 && BOOST_PP_ITERATION_START_5 >= 43 +# define BOOST_PP_ITERATION_5 43 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 42 && BOOST_PP_ITERATION_START_5 >= 42 +# define BOOST_PP_ITERATION_5 42 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 41 && BOOST_PP_ITERATION_START_5 >= 41 +# define BOOST_PP_ITERATION_5 41 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 40 && BOOST_PP_ITERATION_START_5 >= 40 +# define BOOST_PP_ITERATION_5 40 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 39 && BOOST_PP_ITERATION_START_5 >= 39 +# define BOOST_PP_ITERATION_5 39 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 38 && BOOST_PP_ITERATION_START_5 >= 38 +# define BOOST_PP_ITERATION_5 38 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 37 && BOOST_PP_ITERATION_START_5 >= 37 +# define BOOST_PP_ITERATION_5 37 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 36 && BOOST_PP_ITERATION_START_5 >= 36 +# define BOOST_PP_ITERATION_5 36 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 35 && BOOST_PP_ITERATION_START_5 >= 35 +# define BOOST_PP_ITERATION_5 35 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 34 && BOOST_PP_ITERATION_START_5 >= 34 +# define BOOST_PP_ITERATION_5 34 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 33 && BOOST_PP_ITERATION_START_5 >= 33 +# define BOOST_PP_ITERATION_5 33 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 32 && BOOST_PP_ITERATION_START_5 >= 32 +# define BOOST_PP_ITERATION_5 32 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 31 && BOOST_PP_ITERATION_START_5 >= 31 +# define BOOST_PP_ITERATION_5 31 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 30 && BOOST_PP_ITERATION_START_5 >= 30 +# define BOOST_PP_ITERATION_5 30 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 29 && BOOST_PP_ITERATION_START_5 >= 29 +# define BOOST_PP_ITERATION_5 29 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 28 && BOOST_PP_ITERATION_START_5 >= 28 +# define BOOST_PP_ITERATION_5 28 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 27 && BOOST_PP_ITERATION_START_5 >= 27 +# define BOOST_PP_ITERATION_5 27 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 26 && BOOST_PP_ITERATION_START_5 >= 26 +# define BOOST_PP_ITERATION_5 26 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 25 && BOOST_PP_ITERATION_START_5 >= 25 +# define BOOST_PP_ITERATION_5 25 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 24 && BOOST_PP_ITERATION_START_5 >= 24 +# define BOOST_PP_ITERATION_5 24 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 23 && BOOST_PP_ITERATION_START_5 >= 23 +# define BOOST_PP_ITERATION_5 23 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 22 && BOOST_PP_ITERATION_START_5 >= 22 +# define BOOST_PP_ITERATION_5 22 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 21 && BOOST_PP_ITERATION_START_5 >= 21 +# define BOOST_PP_ITERATION_5 21 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 20 && BOOST_PP_ITERATION_START_5 >= 20 +# define BOOST_PP_ITERATION_5 20 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 19 && BOOST_PP_ITERATION_START_5 >= 19 +# define BOOST_PP_ITERATION_5 19 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 18 && BOOST_PP_ITERATION_START_5 >= 18 +# define BOOST_PP_ITERATION_5 18 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 17 && BOOST_PP_ITERATION_START_5 >= 17 +# define BOOST_PP_ITERATION_5 17 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 16 && BOOST_PP_ITERATION_START_5 >= 16 +# define BOOST_PP_ITERATION_5 16 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 15 && BOOST_PP_ITERATION_START_5 >= 15 +# define BOOST_PP_ITERATION_5 15 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 14 && BOOST_PP_ITERATION_START_5 >= 14 +# define BOOST_PP_ITERATION_5 14 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 13 && BOOST_PP_ITERATION_START_5 >= 13 +# define BOOST_PP_ITERATION_5 13 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 12 && BOOST_PP_ITERATION_START_5 >= 12 +# define BOOST_PP_ITERATION_5 12 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 11 && BOOST_PP_ITERATION_START_5 >= 11 +# define BOOST_PP_ITERATION_5 11 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 10 && BOOST_PP_ITERATION_START_5 >= 10 +# define BOOST_PP_ITERATION_5 10 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 9 && BOOST_PP_ITERATION_START_5 >= 9 +# define BOOST_PP_ITERATION_5 9 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 8 && BOOST_PP_ITERATION_START_5 >= 8 +# define BOOST_PP_ITERATION_5 8 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 7 && BOOST_PP_ITERATION_START_5 >= 7 +# define BOOST_PP_ITERATION_5 7 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 6 && BOOST_PP_ITERATION_START_5 >= 6 +# define BOOST_PP_ITERATION_5 6 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 5 && BOOST_PP_ITERATION_START_5 >= 5 +# define BOOST_PP_ITERATION_5 5 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 4 && BOOST_PP_ITERATION_START_5 >= 4 +# define BOOST_PP_ITERATION_5 4 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 3 && BOOST_PP_ITERATION_START_5 >= 3 +# define BOOST_PP_ITERATION_5 3 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 2 && BOOST_PP_ITERATION_START_5 >= 2 +# define BOOST_PP_ITERATION_5 2 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 1 && BOOST_PP_ITERATION_START_5 >= 1 +# define BOOST_PP_ITERATION_5 1 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 0 && BOOST_PP_ITERATION_START_5 >= 0 +# define BOOST_PP_ITERATION_5 0 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/local.hpp b/contrib/src/boost/preprocessor/iteration/detail/local.hpp new file mode 100644 index 0000000..ccddd5e --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/local.hpp @@ -0,0 +1,812 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if !defined(BOOST_PP_LOCAL_LIMITS) +# error BOOST_PP_ERROR: local iteration boundaries are not defined +# elif !defined(BOOST_PP_LOCAL_MACRO) +# error BOOST_PP_ERROR: local iteration target macro is not defined +# else +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LOCAL_S BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_LOCAL_LIMITS) +# define BOOST_PP_LOCAL_F BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_LOCAL_LIMITS) +# else +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_LOCAL_LIMITS) +# include +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_LOCAL_LIMITS) +# include +# define BOOST_PP_LOCAL_S BOOST_PP_LOCAL_SE() +# define BOOST_PP_LOCAL_F BOOST_PP_LOCAL_FE() +# endif +# endif +# +# if (BOOST_PP_LOCAL_S) > (BOOST_PP_LOCAL_F) +# include +# else +# if BOOST_PP_LOCAL_C(0) + BOOST_PP_LOCAL_MACRO(0) +# endif +# if BOOST_PP_LOCAL_C(1) + BOOST_PP_LOCAL_MACRO(1) +# endif +# if BOOST_PP_LOCAL_C(2) + BOOST_PP_LOCAL_MACRO(2) +# endif +# if BOOST_PP_LOCAL_C(3) + BOOST_PP_LOCAL_MACRO(3) +# endif +# if BOOST_PP_LOCAL_C(4) + BOOST_PP_LOCAL_MACRO(4) +# endif +# if BOOST_PP_LOCAL_C(5) + BOOST_PP_LOCAL_MACRO(5) +# endif +# if BOOST_PP_LOCAL_C(6) + BOOST_PP_LOCAL_MACRO(6) +# endif +# if BOOST_PP_LOCAL_C(7) + BOOST_PP_LOCAL_MACRO(7) +# endif +# if BOOST_PP_LOCAL_C(8) + BOOST_PP_LOCAL_MACRO(8) +# endif +# if BOOST_PP_LOCAL_C(9) + BOOST_PP_LOCAL_MACRO(9) +# endif +# if BOOST_PP_LOCAL_C(10) + BOOST_PP_LOCAL_MACRO(10) +# endif +# if BOOST_PP_LOCAL_C(11) + BOOST_PP_LOCAL_MACRO(11) +# endif +# if BOOST_PP_LOCAL_C(12) + BOOST_PP_LOCAL_MACRO(12) +# endif +# if BOOST_PP_LOCAL_C(13) + BOOST_PP_LOCAL_MACRO(13) +# endif +# if BOOST_PP_LOCAL_C(14) + BOOST_PP_LOCAL_MACRO(14) +# endif +# if BOOST_PP_LOCAL_C(15) + BOOST_PP_LOCAL_MACRO(15) +# endif +# if BOOST_PP_LOCAL_C(16) + BOOST_PP_LOCAL_MACRO(16) +# endif +# if BOOST_PP_LOCAL_C(17) + BOOST_PP_LOCAL_MACRO(17) +# endif +# if BOOST_PP_LOCAL_C(18) + BOOST_PP_LOCAL_MACRO(18) +# endif +# if BOOST_PP_LOCAL_C(19) + BOOST_PP_LOCAL_MACRO(19) +# endif +# if BOOST_PP_LOCAL_C(20) + BOOST_PP_LOCAL_MACRO(20) +# endif +# if BOOST_PP_LOCAL_C(21) + BOOST_PP_LOCAL_MACRO(21) +# endif +# if BOOST_PP_LOCAL_C(22) + BOOST_PP_LOCAL_MACRO(22) +# endif +# if BOOST_PP_LOCAL_C(23) + BOOST_PP_LOCAL_MACRO(23) +# endif +# if BOOST_PP_LOCAL_C(24) + BOOST_PP_LOCAL_MACRO(24) +# endif +# if BOOST_PP_LOCAL_C(25) + BOOST_PP_LOCAL_MACRO(25) +# endif +# if BOOST_PP_LOCAL_C(26) + BOOST_PP_LOCAL_MACRO(26) +# endif +# if BOOST_PP_LOCAL_C(27) + BOOST_PP_LOCAL_MACRO(27) +# endif +# if BOOST_PP_LOCAL_C(28) + BOOST_PP_LOCAL_MACRO(28) +# endif +# if BOOST_PP_LOCAL_C(29) + BOOST_PP_LOCAL_MACRO(29) +# endif +# if BOOST_PP_LOCAL_C(30) + BOOST_PP_LOCAL_MACRO(30) +# endif +# if BOOST_PP_LOCAL_C(31) + BOOST_PP_LOCAL_MACRO(31) +# endif +# if BOOST_PP_LOCAL_C(32) + BOOST_PP_LOCAL_MACRO(32) +# endif +# if BOOST_PP_LOCAL_C(33) + BOOST_PP_LOCAL_MACRO(33) +# endif +# if BOOST_PP_LOCAL_C(34) + BOOST_PP_LOCAL_MACRO(34) +# endif +# if BOOST_PP_LOCAL_C(35) + BOOST_PP_LOCAL_MACRO(35) +# endif +# if BOOST_PP_LOCAL_C(36) + BOOST_PP_LOCAL_MACRO(36) +# endif +# if BOOST_PP_LOCAL_C(37) + BOOST_PP_LOCAL_MACRO(37) +# endif +# if BOOST_PP_LOCAL_C(38) + BOOST_PP_LOCAL_MACRO(38) +# endif +# if BOOST_PP_LOCAL_C(39) + BOOST_PP_LOCAL_MACRO(39) +# endif +# if BOOST_PP_LOCAL_C(40) + BOOST_PP_LOCAL_MACRO(40) +# endif +# if BOOST_PP_LOCAL_C(41) + BOOST_PP_LOCAL_MACRO(41) +# endif +# if BOOST_PP_LOCAL_C(42) + BOOST_PP_LOCAL_MACRO(42) +# endif +# if BOOST_PP_LOCAL_C(43) + BOOST_PP_LOCAL_MACRO(43) +# endif +# if BOOST_PP_LOCAL_C(44) + BOOST_PP_LOCAL_MACRO(44) +# endif +# if BOOST_PP_LOCAL_C(45) + BOOST_PP_LOCAL_MACRO(45) +# endif +# if BOOST_PP_LOCAL_C(46) + BOOST_PP_LOCAL_MACRO(46) +# endif +# if BOOST_PP_LOCAL_C(47) + BOOST_PP_LOCAL_MACRO(47) +# endif +# if BOOST_PP_LOCAL_C(48) + BOOST_PP_LOCAL_MACRO(48) +# endif +# if BOOST_PP_LOCAL_C(49) + BOOST_PP_LOCAL_MACRO(49) +# endif +# if BOOST_PP_LOCAL_C(50) + BOOST_PP_LOCAL_MACRO(50) +# endif +# if BOOST_PP_LOCAL_C(51) + BOOST_PP_LOCAL_MACRO(51) +# endif +# if BOOST_PP_LOCAL_C(52) + BOOST_PP_LOCAL_MACRO(52) +# endif +# if BOOST_PP_LOCAL_C(53) + BOOST_PP_LOCAL_MACRO(53) +# endif +# if BOOST_PP_LOCAL_C(54) + BOOST_PP_LOCAL_MACRO(54) +# endif +# if BOOST_PP_LOCAL_C(55) + BOOST_PP_LOCAL_MACRO(55) +# endif +# if BOOST_PP_LOCAL_C(56) + BOOST_PP_LOCAL_MACRO(56) +# endif +# if BOOST_PP_LOCAL_C(57) + BOOST_PP_LOCAL_MACRO(57) +# endif +# if BOOST_PP_LOCAL_C(58) + BOOST_PP_LOCAL_MACRO(58) +# endif +# if BOOST_PP_LOCAL_C(59) + BOOST_PP_LOCAL_MACRO(59) +# endif +# if BOOST_PP_LOCAL_C(60) + BOOST_PP_LOCAL_MACRO(60) +# endif +# if BOOST_PP_LOCAL_C(61) + BOOST_PP_LOCAL_MACRO(61) +# endif +# if BOOST_PP_LOCAL_C(62) + BOOST_PP_LOCAL_MACRO(62) +# endif +# if BOOST_PP_LOCAL_C(63) + BOOST_PP_LOCAL_MACRO(63) +# endif +# if BOOST_PP_LOCAL_C(64) + BOOST_PP_LOCAL_MACRO(64) +# endif +# if BOOST_PP_LOCAL_C(65) + BOOST_PP_LOCAL_MACRO(65) +# endif +# if BOOST_PP_LOCAL_C(66) + BOOST_PP_LOCAL_MACRO(66) +# endif +# if BOOST_PP_LOCAL_C(67) + BOOST_PP_LOCAL_MACRO(67) +# endif +# if BOOST_PP_LOCAL_C(68) + BOOST_PP_LOCAL_MACRO(68) +# endif +# if BOOST_PP_LOCAL_C(69) + BOOST_PP_LOCAL_MACRO(69) +# endif +# if BOOST_PP_LOCAL_C(70) + BOOST_PP_LOCAL_MACRO(70) +# endif +# if BOOST_PP_LOCAL_C(71) + BOOST_PP_LOCAL_MACRO(71) +# endif +# if BOOST_PP_LOCAL_C(72) + BOOST_PP_LOCAL_MACRO(72) +# endif +# if BOOST_PP_LOCAL_C(73) + BOOST_PP_LOCAL_MACRO(73) +# endif +# if BOOST_PP_LOCAL_C(74) + BOOST_PP_LOCAL_MACRO(74) +# endif +# if BOOST_PP_LOCAL_C(75) + BOOST_PP_LOCAL_MACRO(75) +# endif +# if BOOST_PP_LOCAL_C(76) + BOOST_PP_LOCAL_MACRO(76) +# endif +# if BOOST_PP_LOCAL_C(77) + BOOST_PP_LOCAL_MACRO(77) +# endif +# if BOOST_PP_LOCAL_C(78) + BOOST_PP_LOCAL_MACRO(78) +# endif +# if BOOST_PP_LOCAL_C(79) + BOOST_PP_LOCAL_MACRO(79) +# endif +# if BOOST_PP_LOCAL_C(80) + BOOST_PP_LOCAL_MACRO(80) +# endif +# if BOOST_PP_LOCAL_C(81) + BOOST_PP_LOCAL_MACRO(81) +# endif +# if BOOST_PP_LOCAL_C(82) + BOOST_PP_LOCAL_MACRO(82) +# endif +# if BOOST_PP_LOCAL_C(83) + BOOST_PP_LOCAL_MACRO(83) +# endif +# if BOOST_PP_LOCAL_C(84) + BOOST_PP_LOCAL_MACRO(84) +# endif +# if BOOST_PP_LOCAL_C(85) + BOOST_PP_LOCAL_MACRO(85) +# endif +# if BOOST_PP_LOCAL_C(86) + BOOST_PP_LOCAL_MACRO(86) +# endif +# if BOOST_PP_LOCAL_C(87) + BOOST_PP_LOCAL_MACRO(87) +# endif +# if BOOST_PP_LOCAL_C(88) + BOOST_PP_LOCAL_MACRO(88) +# endif +# if BOOST_PP_LOCAL_C(89) + BOOST_PP_LOCAL_MACRO(89) +# endif +# if BOOST_PP_LOCAL_C(90) + BOOST_PP_LOCAL_MACRO(90) +# endif +# if BOOST_PP_LOCAL_C(91) + BOOST_PP_LOCAL_MACRO(91) +# endif +# if BOOST_PP_LOCAL_C(92) + BOOST_PP_LOCAL_MACRO(92) +# endif +# if BOOST_PP_LOCAL_C(93) + BOOST_PP_LOCAL_MACRO(93) +# endif +# if BOOST_PP_LOCAL_C(94) + BOOST_PP_LOCAL_MACRO(94) +# endif +# if BOOST_PP_LOCAL_C(95) + BOOST_PP_LOCAL_MACRO(95) +# endif +# if BOOST_PP_LOCAL_C(96) + BOOST_PP_LOCAL_MACRO(96) +# endif +# if BOOST_PP_LOCAL_C(97) + BOOST_PP_LOCAL_MACRO(97) +# endif +# if BOOST_PP_LOCAL_C(98) + BOOST_PP_LOCAL_MACRO(98) +# endif +# if BOOST_PP_LOCAL_C(99) + BOOST_PP_LOCAL_MACRO(99) +# endif +# if BOOST_PP_LOCAL_C(100) + BOOST_PP_LOCAL_MACRO(100) +# endif +# if BOOST_PP_LOCAL_C(101) + BOOST_PP_LOCAL_MACRO(101) +# endif +# if BOOST_PP_LOCAL_C(102) + BOOST_PP_LOCAL_MACRO(102) +# endif +# if BOOST_PP_LOCAL_C(103) + BOOST_PP_LOCAL_MACRO(103) +# endif +# if BOOST_PP_LOCAL_C(104) + BOOST_PP_LOCAL_MACRO(104) +# endif +# if BOOST_PP_LOCAL_C(105) + BOOST_PP_LOCAL_MACRO(105) +# endif +# if BOOST_PP_LOCAL_C(106) + BOOST_PP_LOCAL_MACRO(106) +# endif +# if BOOST_PP_LOCAL_C(107) + BOOST_PP_LOCAL_MACRO(107) +# endif +# if BOOST_PP_LOCAL_C(108) + BOOST_PP_LOCAL_MACRO(108) +# endif +# if BOOST_PP_LOCAL_C(109) + BOOST_PP_LOCAL_MACRO(109) +# endif +# if BOOST_PP_LOCAL_C(110) + BOOST_PP_LOCAL_MACRO(110) +# endif +# if BOOST_PP_LOCAL_C(111) + BOOST_PP_LOCAL_MACRO(111) +# endif +# if BOOST_PP_LOCAL_C(112) + BOOST_PP_LOCAL_MACRO(112) +# endif +# if BOOST_PP_LOCAL_C(113) + BOOST_PP_LOCAL_MACRO(113) +# endif +# if BOOST_PP_LOCAL_C(114) + BOOST_PP_LOCAL_MACRO(114) +# endif +# if BOOST_PP_LOCAL_C(115) + BOOST_PP_LOCAL_MACRO(115) +# endif +# if BOOST_PP_LOCAL_C(116) + BOOST_PP_LOCAL_MACRO(116) +# endif +# if BOOST_PP_LOCAL_C(117) + BOOST_PP_LOCAL_MACRO(117) +# endif +# if BOOST_PP_LOCAL_C(118) + BOOST_PP_LOCAL_MACRO(118) +# endif +# if BOOST_PP_LOCAL_C(119) + BOOST_PP_LOCAL_MACRO(119) +# endif +# if BOOST_PP_LOCAL_C(120) + BOOST_PP_LOCAL_MACRO(120) +# endif +# if BOOST_PP_LOCAL_C(121) + BOOST_PP_LOCAL_MACRO(121) +# endif +# if BOOST_PP_LOCAL_C(122) + BOOST_PP_LOCAL_MACRO(122) +# endif +# if BOOST_PP_LOCAL_C(123) + BOOST_PP_LOCAL_MACRO(123) +# endif +# if BOOST_PP_LOCAL_C(124) + BOOST_PP_LOCAL_MACRO(124) +# endif +# if BOOST_PP_LOCAL_C(125) + BOOST_PP_LOCAL_MACRO(125) +# endif +# if BOOST_PP_LOCAL_C(126) + BOOST_PP_LOCAL_MACRO(126) +# endif +# if BOOST_PP_LOCAL_C(127) + BOOST_PP_LOCAL_MACRO(127) +# endif +# if BOOST_PP_LOCAL_C(128) + BOOST_PP_LOCAL_MACRO(128) +# endif +# if BOOST_PP_LOCAL_C(129) + BOOST_PP_LOCAL_MACRO(129) +# endif +# if BOOST_PP_LOCAL_C(130) + BOOST_PP_LOCAL_MACRO(130) +# endif +# if BOOST_PP_LOCAL_C(131) + BOOST_PP_LOCAL_MACRO(131) +# endif +# if BOOST_PP_LOCAL_C(132) + BOOST_PP_LOCAL_MACRO(132) +# endif +# if BOOST_PP_LOCAL_C(133) + BOOST_PP_LOCAL_MACRO(133) +# endif +# if BOOST_PP_LOCAL_C(134) + BOOST_PP_LOCAL_MACRO(134) +# endif +# if BOOST_PP_LOCAL_C(135) + BOOST_PP_LOCAL_MACRO(135) +# endif +# if BOOST_PP_LOCAL_C(136) + BOOST_PP_LOCAL_MACRO(136) +# endif +# if BOOST_PP_LOCAL_C(137) + BOOST_PP_LOCAL_MACRO(137) +# endif +# if BOOST_PP_LOCAL_C(138) + BOOST_PP_LOCAL_MACRO(138) +# endif +# if BOOST_PP_LOCAL_C(139) + BOOST_PP_LOCAL_MACRO(139) +# endif +# if BOOST_PP_LOCAL_C(140) + BOOST_PP_LOCAL_MACRO(140) +# endif +# if BOOST_PP_LOCAL_C(141) + BOOST_PP_LOCAL_MACRO(141) +# endif +# if BOOST_PP_LOCAL_C(142) + BOOST_PP_LOCAL_MACRO(142) +# endif +# if BOOST_PP_LOCAL_C(143) + BOOST_PP_LOCAL_MACRO(143) +# endif +# if BOOST_PP_LOCAL_C(144) + BOOST_PP_LOCAL_MACRO(144) +# endif +# if BOOST_PP_LOCAL_C(145) + BOOST_PP_LOCAL_MACRO(145) +# endif +# if BOOST_PP_LOCAL_C(146) + BOOST_PP_LOCAL_MACRO(146) +# endif +# if BOOST_PP_LOCAL_C(147) + BOOST_PP_LOCAL_MACRO(147) +# endif +# if BOOST_PP_LOCAL_C(148) + BOOST_PP_LOCAL_MACRO(148) +# endif +# if BOOST_PP_LOCAL_C(149) + BOOST_PP_LOCAL_MACRO(149) +# endif +# if BOOST_PP_LOCAL_C(150) + BOOST_PP_LOCAL_MACRO(150) +# endif +# if BOOST_PP_LOCAL_C(151) + BOOST_PP_LOCAL_MACRO(151) +# endif +# if BOOST_PP_LOCAL_C(152) + BOOST_PP_LOCAL_MACRO(152) +# endif +# if BOOST_PP_LOCAL_C(153) + BOOST_PP_LOCAL_MACRO(153) +# endif +# if BOOST_PP_LOCAL_C(154) + BOOST_PP_LOCAL_MACRO(154) +# endif +# if BOOST_PP_LOCAL_C(155) + BOOST_PP_LOCAL_MACRO(155) +# endif +# if BOOST_PP_LOCAL_C(156) + BOOST_PP_LOCAL_MACRO(156) +# endif +# if BOOST_PP_LOCAL_C(157) + BOOST_PP_LOCAL_MACRO(157) +# endif +# if BOOST_PP_LOCAL_C(158) + BOOST_PP_LOCAL_MACRO(158) +# endif +# if BOOST_PP_LOCAL_C(159) + BOOST_PP_LOCAL_MACRO(159) +# endif +# if BOOST_PP_LOCAL_C(160) + BOOST_PP_LOCAL_MACRO(160) +# endif +# if BOOST_PP_LOCAL_C(161) + BOOST_PP_LOCAL_MACRO(161) +# endif +# if BOOST_PP_LOCAL_C(162) + BOOST_PP_LOCAL_MACRO(162) +# endif +# if BOOST_PP_LOCAL_C(163) + BOOST_PP_LOCAL_MACRO(163) +# endif +# if BOOST_PP_LOCAL_C(164) + BOOST_PP_LOCAL_MACRO(164) +# endif +# if BOOST_PP_LOCAL_C(165) + BOOST_PP_LOCAL_MACRO(165) +# endif +# if BOOST_PP_LOCAL_C(166) + BOOST_PP_LOCAL_MACRO(166) +# endif +# if BOOST_PP_LOCAL_C(167) + BOOST_PP_LOCAL_MACRO(167) +# endif +# if BOOST_PP_LOCAL_C(168) + BOOST_PP_LOCAL_MACRO(168) +# endif +# if BOOST_PP_LOCAL_C(169) + BOOST_PP_LOCAL_MACRO(169) +# endif +# if BOOST_PP_LOCAL_C(170) + BOOST_PP_LOCAL_MACRO(170) +# endif +# if BOOST_PP_LOCAL_C(171) + BOOST_PP_LOCAL_MACRO(171) +# endif +# if BOOST_PP_LOCAL_C(172) + BOOST_PP_LOCAL_MACRO(172) +# endif +# if BOOST_PP_LOCAL_C(173) + BOOST_PP_LOCAL_MACRO(173) +# endif +# if BOOST_PP_LOCAL_C(174) + BOOST_PP_LOCAL_MACRO(174) +# endif +# if BOOST_PP_LOCAL_C(175) + BOOST_PP_LOCAL_MACRO(175) +# endif +# if BOOST_PP_LOCAL_C(176) + BOOST_PP_LOCAL_MACRO(176) +# endif +# if BOOST_PP_LOCAL_C(177) + BOOST_PP_LOCAL_MACRO(177) +# endif +# if BOOST_PP_LOCAL_C(178) + BOOST_PP_LOCAL_MACRO(178) +# endif +# if BOOST_PP_LOCAL_C(179) + BOOST_PP_LOCAL_MACRO(179) +# endif +# if BOOST_PP_LOCAL_C(180) + BOOST_PP_LOCAL_MACRO(180) +# endif +# if BOOST_PP_LOCAL_C(181) + BOOST_PP_LOCAL_MACRO(181) +# endif +# if BOOST_PP_LOCAL_C(182) + BOOST_PP_LOCAL_MACRO(182) +# endif +# if BOOST_PP_LOCAL_C(183) + BOOST_PP_LOCAL_MACRO(183) +# endif +# if BOOST_PP_LOCAL_C(184) + BOOST_PP_LOCAL_MACRO(184) +# endif +# if BOOST_PP_LOCAL_C(185) + BOOST_PP_LOCAL_MACRO(185) +# endif +# if BOOST_PP_LOCAL_C(186) + BOOST_PP_LOCAL_MACRO(186) +# endif +# if BOOST_PP_LOCAL_C(187) + BOOST_PP_LOCAL_MACRO(187) +# endif +# if BOOST_PP_LOCAL_C(188) + BOOST_PP_LOCAL_MACRO(188) +# endif +# if BOOST_PP_LOCAL_C(189) + BOOST_PP_LOCAL_MACRO(189) +# endif +# if BOOST_PP_LOCAL_C(190) + BOOST_PP_LOCAL_MACRO(190) +# endif +# if BOOST_PP_LOCAL_C(191) + BOOST_PP_LOCAL_MACRO(191) +# endif +# if BOOST_PP_LOCAL_C(192) + BOOST_PP_LOCAL_MACRO(192) +# endif +# if BOOST_PP_LOCAL_C(193) + BOOST_PP_LOCAL_MACRO(193) +# endif +# if BOOST_PP_LOCAL_C(194) + BOOST_PP_LOCAL_MACRO(194) +# endif +# if BOOST_PP_LOCAL_C(195) + BOOST_PP_LOCAL_MACRO(195) +# endif +# if BOOST_PP_LOCAL_C(196) + BOOST_PP_LOCAL_MACRO(196) +# endif +# if BOOST_PP_LOCAL_C(197) + BOOST_PP_LOCAL_MACRO(197) +# endif +# if BOOST_PP_LOCAL_C(198) + BOOST_PP_LOCAL_MACRO(198) +# endif +# if BOOST_PP_LOCAL_C(199) + BOOST_PP_LOCAL_MACRO(199) +# endif +# if BOOST_PP_LOCAL_C(200) + BOOST_PP_LOCAL_MACRO(200) +# endif +# if BOOST_PP_LOCAL_C(201) + BOOST_PP_LOCAL_MACRO(201) +# endif +# if BOOST_PP_LOCAL_C(202) + BOOST_PP_LOCAL_MACRO(202) +# endif +# if BOOST_PP_LOCAL_C(203) + BOOST_PP_LOCAL_MACRO(203) +# endif +# if BOOST_PP_LOCAL_C(204) + BOOST_PP_LOCAL_MACRO(204) +# endif +# if BOOST_PP_LOCAL_C(205) + BOOST_PP_LOCAL_MACRO(205) +# endif +# if BOOST_PP_LOCAL_C(206) + BOOST_PP_LOCAL_MACRO(206) +# endif +# if BOOST_PP_LOCAL_C(207) + BOOST_PP_LOCAL_MACRO(207) +# endif +# if BOOST_PP_LOCAL_C(208) + BOOST_PP_LOCAL_MACRO(208) +# endif +# if BOOST_PP_LOCAL_C(209) + BOOST_PP_LOCAL_MACRO(209) +# endif +# if BOOST_PP_LOCAL_C(210) + BOOST_PP_LOCAL_MACRO(210) +# endif +# if BOOST_PP_LOCAL_C(211) + BOOST_PP_LOCAL_MACRO(211) +# endif +# if BOOST_PP_LOCAL_C(212) + BOOST_PP_LOCAL_MACRO(212) +# endif +# if BOOST_PP_LOCAL_C(213) + BOOST_PP_LOCAL_MACRO(213) +# endif +# if BOOST_PP_LOCAL_C(214) + BOOST_PP_LOCAL_MACRO(214) +# endif +# if BOOST_PP_LOCAL_C(215) + BOOST_PP_LOCAL_MACRO(215) +# endif +# if BOOST_PP_LOCAL_C(216) + BOOST_PP_LOCAL_MACRO(216) +# endif +# if BOOST_PP_LOCAL_C(217) + BOOST_PP_LOCAL_MACRO(217) +# endif +# if BOOST_PP_LOCAL_C(218) + BOOST_PP_LOCAL_MACRO(218) +# endif +# if BOOST_PP_LOCAL_C(219) + BOOST_PP_LOCAL_MACRO(219) +# endif +# if BOOST_PP_LOCAL_C(220) + BOOST_PP_LOCAL_MACRO(220) +# endif +# if BOOST_PP_LOCAL_C(221) + BOOST_PP_LOCAL_MACRO(221) +# endif +# if BOOST_PP_LOCAL_C(222) + BOOST_PP_LOCAL_MACRO(222) +# endif +# if BOOST_PP_LOCAL_C(223) + BOOST_PP_LOCAL_MACRO(223) +# endif +# if BOOST_PP_LOCAL_C(224) + BOOST_PP_LOCAL_MACRO(224) +# endif +# if BOOST_PP_LOCAL_C(225) + BOOST_PP_LOCAL_MACRO(225) +# endif +# if BOOST_PP_LOCAL_C(226) + BOOST_PP_LOCAL_MACRO(226) +# endif +# if BOOST_PP_LOCAL_C(227) + BOOST_PP_LOCAL_MACRO(227) +# endif +# if BOOST_PP_LOCAL_C(228) + BOOST_PP_LOCAL_MACRO(228) +# endif +# if BOOST_PP_LOCAL_C(229) + BOOST_PP_LOCAL_MACRO(229) +# endif +# if BOOST_PP_LOCAL_C(230) + BOOST_PP_LOCAL_MACRO(230) +# endif +# if BOOST_PP_LOCAL_C(231) + BOOST_PP_LOCAL_MACRO(231) +# endif +# if BOOST_PP_LOCAL_C(232) + BOOST_PP_LOCAL_MACRO(232) +# endif +# if BOOST_PP_LOCAL_C(233) + BOOST_PP_LOCAL_MACRO(233) +# endif +# if BOOST_PP_LOCAL_C(234) + BOOST_PP_LOCAL_MACRO(234) +# endif +# if BOOST_PP_LOCAL_C(235) + BOOST_PP_LOCAL_MACRO(235) +# endif +# if BOOST_PP_LOCAL_C(236) + BOOST_PP_LOCAL_MACRO(236) +# endif + +# if BOOST_PP_LOCAL_C(237) + BOOST_PP_LOCAL_MACRO(237) +# endif +# if BOOST_PP_LOCAL_C(238) + BOOST_PP_LOCAL_MACRO(238) +# endif +# if BOOST_PP_LOCAL_C(239) + BOOST_PP_LOCAL_MACRO(239) +# endif +# if BOOST_PP_LOCAL_C(240) + BOOST_PP_LOCAL_MACRO(240) +# endif +# if BOOST_PP_LOCAL_C(241) + BOOST_PP_LOCAL_MACRO(241) +# endif +# if BOOST_PP_LOCAL_C(242) + BOOST_PP_LOCAL_MACRO(242) +# endif +# if BOOST_PP_LOCAL_C(243) + BOOST_PP_LOCAL_MACRO(243) +# endif +# if BOOST_PP_LOCAL_C(244) + BOOST_PP_LOCAL_MACRO(244) +# endif +# if BOOST_PP_LOCAL_C(245) + BOOST_PP_LOCAL_MACRO(245) +# endif +# if BOOST_PP_LOCAL_C(246) + BOOST_PP_LOCAL_MACRO(246) +# endif +# if BOOST_PP_LOCAL_C(247) + BOOST_PP_LOCAL_MACRO(247) +# endif +# if BOOST_PP_LOCAL_C(248) + BOOST_PP_LOCAL_MACRO(248) +# endif +# if BOOST_PP_LOCAL_C(249) + BOOST_PP_LOCAL_MACRO(249) +# endif +# if BOOST_PP_LOCAL_C(250) + BOOST_PP_LOCAL_MACRO(250) +# endif +# if BOOST_PP_LOCAL_C(251) + BOOST_PP_LOCAL_MACRO(251) +# endif +# if BOOST_PP_LOCAL_C(252) + BOOST_PP_LOCAL_MACRO(252) +# endif +# if BOOST_PP_LOCAL_C(253) + BOOST_PP_LOCAL_MACRO(253) +# endif +# if BOOST_PP_LOCAL_C(254) + BOOST_PP_LOCAL_MACRO(254) +# endif +# if BOOST_PP_LOCAL_C(255) + BOOST_PP_LOCAL_MACRO(255) +# endif +# if BOOST_PP_LOCAL_C(256) + BOOST_PP_LOCAL_MACRO(256) +# endif +# endif +# +# undef BOOST_PP_LOCAL_LIMITS +# +# undef BOOST_PP_LOCAL_S +# undef BOOST_PP_LOCAL_F +# +# undef BOOST_PP_LOCAL_MACRO diff --git a/contrib/src/boost/preprocessor/iteration/detail/rlocal.hpp b/contrib/src/boost/preprocessor/iteration/detail/rlocal.hpp new file mode 100644 index 0000000..413afa0 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/rlocal.hpp @@ -0,0 +1,782 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if BOOST_PP_LOCAL_R(256) + BOOST_PP_LOCAL_MACRO(256) +# endif +# if BOOST_PP_LOCAL_R(255) + BOOST_PP_LOCAL_MACRO(255) +# endif +# if BOOST_PP_LOCAL_R(254) + BOOST_PP_LOCAL_MACRO(254) +# endif +# if BOOST_PP_LOCAL_R(253) + BOOST_PP_LOCAL_MACRO(253) +# endif +# if BOOST_PP_LOCAL_R(252) + BOOST_PP_LOCAL_MACRO(252) +# endif +# if BOOST_PP_LOCAL_R(251) + BOOST_PP_LOCAL_MACRO(251) +# endif +# if BOOST_PP_LOCAL_R(250) + BOOST_PP_LOCAL_MACRO(250) +# endif +# if BOOST_PP_LOCAL_R(249) + BOOST_PP_LOCAL_MACRO(249) +# endif +# if BOOST_PP_LOCAL_R(248) + BOOST_PP_LOCAL_MACRO(248) +# endif +# if BOOST_PP_LOCAL_R(247) + BOOST_PP_LOCAL_MACRO(247) +# endif +# if BOOST_PP_LOCAL_R(246) + BOOST_PP_LOCAL_MACRO(246) +# endif +# if BOOST_PP_LOCAL_R(245) + BOOST_PP_LOCAL_MACRO(245) +# endif +# if BOOST_PP_LOCAL_R(244) + BOOST_PP_LOCAL_MACRO(244) +# endif +# if BOOST_PP_LOCAL_R(243) + BOOST_PP_LOCAL_MACRO(243) +# endif +# if BOOST_PP_LOCAL_R(242) + BOOST_PP_LOCAL_MACRO(242) +# endif +# if BOOST_PP_LOCAL_R(241) + BOOST_PP_LOCAL_MACRO(241) +# endif +# if BOOST_PP_LOCAL_R(240) + BOOST_PP_LOCAL_MACRO(240) +# endif +# if BOOST_PP_LOCAL_R(239) + BOOST_PP_LOCAL_MACRO(239) +# endif +# if BOOST_PP_LOCAL_R(238) + BOOST_PP_LOCAL_MACRO(238) +# endif +# if BOOST_PP_LOCAL_R(237) + BOOST_PP_LOCAL_MACRO(237) +# endif +# if BOOST_PP_LOCAL_R(236) + BOOST_PP_LOCAL_MACRO(236) +# endif +# if BOOST_PP_LOCAL_R(235) + BOOST_PP_LOCAL_MACRO(235) +# endif +# if BOOST_PP_LOCAL_R(234) + BOOST_PP_LOCAL_MACRO(234) +# endif +# if BOOST_PP_LOCAL_R(233) + BOOST_PP_LOCAL_MACRO(233) +# endif +# if BOOST_PP_LOCAL_R(232) + BOOST_PP_LOCAL_MACRO(232) +# endif +# if BOOST_PP_LOCAL_R(231) + BOOST_PP_LOCAL_MACRO(231) +# endif +# if BOOST_PP_LOCAL_R(230) + BOOST_PP_LOCAL_MACRO(230) +# endif +# if BOOST_PP_LOCAL_R(229) + BOOST_PP_LOCAL_MACRO(229) +# endif +# if BOOST_PP_LOCAL_R(228) + BOOST_PP_LOCAL_MACRO(228) +# endif +# if BOOST_PP_LOCAL_R(227) + BOOST_PP_LOCAL_MACRO(227) +# endif +# if BOOST_PP_LOCAL_R(226) + BOOST_PP_LOCAL_MACRO(226) +# endif +# if BOOST_PP_LOCAL_R(225) + BOOST_PP_LOCAL_MACRO(225) +# endif +# if BOOST_PP_LOCAL_R(224) + BOOST_PP_LOCAL_MACRO(224) +# endif +# if BOOST_PP_LOCAL_R(223) + BOOST_PP_LOCAL_MACRO(223) +# endif +# if BOOST_PP_LOCAL_R(222) + BOOST_PP_LOCAL_MACRO(222) +# endif +# if BOOST_PP_LOCAL_R(221) + BOOST_PP_LOCAL_MACRO(221) +# endif +# if BOOST_PP_LOCAL_R(220) + BOOST_PP_LOCAL_MACRO(220) +# endif +# if BOOST_PP_LOCAL_R(219) + BOOST_PP_LOCAL_MACRO(219) +# endif +# if BOOST_PP_LOCAL_R(218) + BOOST_PP_LOCAL_MACRO(218) +# endif +# if BOOST_PP_LOCAL_R(217) + BOOST_PP_LOCAL_MACRO(217) +# endif +# if BOOST_PP_LOCAL_R(216) + BOOST_PP_LOCAL_MACRO(216) +# endif +# if BOOST_PP_LOCAL_R(215) + BOOST_PP_LOCAL_MACRO(215) +# endif +# if BOOST_PP_LOCAL_R(214) + BOOST_PP_LOCAL_MACRO(214) +# endif +# if BOOST_PP_LOCAL_R(213) + BOOST_PP_LOCAL_MACRO(213) +# endif +# if BOOST_PP_LOCAL_R(212) + BOOST_PP_LOCAL_MACRO(212) +# endif +# if BOOST_PP_LOCAL_R(211) + BOOST_PP_LOCAL_MACRO(211) +# endif +# if BOOST_PP_LOCAL_R(210) + BOOST_PP_LOCAL_MACRO(210) +# endif +# if BOOST_PP_LOCAL_R(209) + BOOST_PP_LOCAL_MACRO(209) +# endif +# if BOOST_PP_LOCAL_R(208) + BOOST_PP_LOCAL_MACRO(208) +# endif +# if BOOST_PP_LOCAL_R(207) + BOOST_PP_LOCAL_MACRO(207) +# endif +# if BOOST_PP_LOCAL_R(206) + BOOST_PP_LOCAL_MACRO(206) +# endif +# if BOOST_PP_LOCAL_R(205) + BOOST_PP_LOCAL_MACRO(205) +# endif +# if BOOST_PP_LOCAL_R(204) + BOOST_PP_LOCAL_MACRO(204) +# endif +# if BOOST_PP_LOCAL_R(203) + BOOST_PP_LOCAL_MACRO(203) +# endif +# if BOOST_PP_LOCAL_R(202) + BOOST_PP_LOCAL_MACRO(202) +# endif +# if BOOST_PP_LOCAL_R(201) + BOOST_PP_LOCAL_MACRO(201) +# endif +# if BOOST_PP_LOCAL_R(200) + BOOST_PP_LOCAL_MACRO(200) +# endif +# if BOOST_PP_LOCAL_R(199) + BOOST_PP_LOCAL_MACRO(199) +# endif +# if BOOST_PP_LOCAL_R(198) + BOOST_PP_LOCAL_MACRO(198) +# endif +# if BOOST_PP_LOCAL_R(197) + BOOST_PP_LOCAL_MACRO(197) +# endif +# if BOOST_PP_LOCAL_R(196) + BOOST_PP_LOCAL_MACRO(196) +# endif +# if BOOST_PP_LOCAL_R(195) + BOOST_PP_LOCAL_MACRO(195) +# endif +# if BOOST_PP_LOCAL_R(194) + BOOST_PP_LOCAL_MACRO(194) +# endif +# if BOOST_PP_LOCAL_R(193) + BOOST_PP_LOCAL_MACRO(193) +# endif +# if BOOST_PP_LOCAL_R(192) + BOOST_PP_LOCAL_MACRO(192) +# endif +# if BOOST_PP_LOCAL_R(191) + BOOST_PP_LOCAL_MACRO(191) +# endif +# if BOOST_PP_LOCAL_R(190) + BOOST_PP_LOCAL_MACRO(190) +# endif +# if BOOST_PP_LOCAL_R(189) + BOOST_PP_LOCAL_MACRO(189) +# endif +# if BOOST_PP_LOCAL_R(188) + BOOST_PP_LOCAL_MACRO(188) +# endif +# if BOOST_PP_LOCAL_R(187) + BOOST_PP_LOCAL_MACRO(187) +# endif +# if BOOST_PP_LOCAL_R(186) + BOOST_PP_LOCAL_MACRO(186) +# endif +# if BOOST_PP_LOCAL_R(185) + BOOST_PP_LOCAL_MACRO(185) +# endif +# if BOOST_PP_LOCAL_R(184) + BOOST_PP_LOCAL_MACRO(184) +# endif +# if BOOST_PP_LOCAL_R(183) + BOOST_PP_LOCAL_MACRO(183) +# endif +# if BOOST_PP_LOCAL_R(182) + BOOST_PP_LOCAL_MACRO(182) +# endif +# if BOOST_PP_LOCAL_R(181) + BOOST_PP_LOCAL_MACRO(181) +# endif +# if BOOST_PP_LOCAL_R(180) + BOOST_PP_LOCAL_MACRO(180) +# endif +# if BOOST_PP_LOCAL_R(179) + BOOST_PP_LOCAL_MACRO(179) +# endif +# if BOOST_PP_LOCAL_R(178) + BOOST_PP_LOCAL_MACRO(178) +# endif +# if BOOST_PP_LOCAL_R(177) + BOOST_PP_LOCAL_MACRO(177) +# endif +# if BOOST_PP_LOCAL_R(176) + BOOST_PP_LOCAL_MACRO(176) +# endif +# if BOOST_PP_LOCAL_R(175) + BOOST_PP_LOCAL_MACRO(175) +# endif +# if BOOST_PP_LOCAL_R(174) + BOOST_PP_LOCAL_MACRO(174) +# endif +# if BOOST_PP_LOCAL_R(173) + BOOST_PP_LOCAL_MACRO(173) +# endif +# if BOOST_PP_LOCAL_R(172) + BOOST_PP_LOCAL_MACRO(172) +# endif +# if BOOST_PP_LOCAL_R(171) + BOOST_PP_LOCAL_MACRO(171) +# endif +# if BOOST_PP_LOCAL_R(170) + BOOST_PP_LOCAL_MACRO(170) +# endif +# if BOOST_PP_LOCAL_R(169) + BOOST_PP_LOCAL_MACRO(169) +# endif +# if BOOST_PP_LOCAL_R(168) + BOOST_PP_LOCAL_MACRO(168) +# endif +# if BOOST_PP_LOCAL_R(167) + BOOST_PP_LOCAL_MACRO(167) +# endif +# if BOOST_PP_LOCAL_R(166) + BOOST_PP_LOCAL_MACRO(166) +# endif +# if BOOST_PP_LOCAL_R(165) + BOOST_PP_LOCAL_MACRO(165) +# endif +# if BOOST_PP_LOCAL_R(164) + BOOST_PP_LOCAL_MACRO(164) +# endif +# if BOOST_PP_LOCAL_R(163) + BOOST_PP_LOCAL_MACRO(163) +# endif +# if BOOST_PP_LOCAL_R(162) + BOOST_PP_LOCAL_MACRO(162) +# endif +# if BOOST_PP_LOCAL_R(161) + BOOST_PP_LOCAL_MACRO(161) +# endif +# if BOOST_PP_LOCAL_R(160) + BOOST_PP_LOCAL_MACRO(160) +# endif +# if BOOST_PP_LOCAL_R(159) + BOOST_PP_LOCAL_MACRO(159) +# endif +# if BOOST_PP_LOCAL_R(158) + BOOST_PP_LOCAL_MACRO(158) +# endif +# if BOOST_PP_LOCAL_R(157) + BOOST_PP_LOCAL_MACRO(157) +# endif +# if BOOST_PP_LOCAL_R(156) + BOOST_PP_LOCAL_MACRO(156) +# endif +# if BOOST_PP_LOCAL_R(155) + BOOST_PP_LOCAL_MACRO(155) +# endif +# if BOOST_PP_LOCAL_R(154) + BOOST_PP_LOCAL_MACRO(154) +# endif +# if BOOST_PP_LOCAL_R(153) + BOOST_PP_LOCAL_MACRO(153) +# endif +# if BOOST_PP_LOCAL_R(152) + BOOST_PP_LOCAL_MACRO(152) +# endif +# if BOOST_PP_LOCAL_R(151) + BOOST_PP_LOCAL_MACRO(151) +# endif +# if BOOST_PP_LOCAL_R(150) + BOOST_PP_LOCAL_MACRO(150) +# endif +# if BOOST_PP_LOCAL_R(149) + BOOST_PP_LOCAL_MACRO(149) +# endif +# if BOOST_PP_LOCAL_R(148) + BOOST_PP_LOCAL_MACRO(148) +# endif +# if BOOST_PP_LOCAL_R(147) + BOOST_PP_LOCAL_MACRO(147) +# endif +# if BOOST_PP_LOCAL_R(146) + BOOST_PP_LOCAL_MACRO(146) +# endif +# if BOOST_PP_LOCAL_R(145) + BOOST_PP_LOCAL_MACRO(145) +# endif +# if BOOST_PP_LOCAL_R(144) + BOOST_PP_LOCAL_MACRO(144) +# endif +# if BOOST_PP_LOCAL_R(143) + BOOST_PP_LOCAL_MACRO(143) +# endif +# if BOOST_PP_LOCAL_R(142) + BOOST_PP_LOCAL_MACRO(142) +# endif +# if BOOST_PP_LOCAL_R(141) + BOOST_PP_LOCAL_MACRO(141) +# endif +# if BOOST_PP_LOCAL_R(140) + BOOST_PP_LOCAL_MACRO(140) +# endif +# if BOOST_PP_LOCAL_R(139) + BOOST_PP_LOCAL_MACRO(139) +# endif +# if BOOST_PP_LOCAL_R(138) + BOOST_PP_LOCAL_MACRO(138) +# endif +# if BOOST_PP_LOCAL_R(137) + BOOST_PP_LOCAL_MACRO(137) +# endif +# if BOOST_PP_LOCAL_R(136) + BOOST_PP_LOCAL_MACRO(136) +# endif +# if BOOST_PP_LOCAL_R(135) + BOOST_PP_LOCAL_MACRO(135) +# endif +# if BOOST_PP_LOCAL_R(134) + BOOST_PP_LOCAL_MACRO(134) +# endif +# if BOOST_PP_LOCAL_R(133) + BOOST_PP_LOCAL_MACRO(133) +# endif +# if BOOST_PP_LOCAL_R(132) + BOOST_PP_LOCAL_MACRO(132) +# endif +# if BOOST_PP_LOCAL_R(131) + BOOST_PP_LOCAL_MACRO(131) +# endif +# if BOOST_PP_LOCAL_R(130) + BOOST_PP_LOCAL_MACRO(130) +# endif +# if BOOST_PP_LOCAL_R(129) + BOOST_PP_LOCAL_MACRO(129) +# endif +# if BOOST_PP_LOCAL_R(128) + BOOST_PP_LOCAL_MACRO(128) +# endif +# if BOOST_PP_LOCAL_R(127) + BOOST_PP_LOCAL_MACRO(127) +# endif +# if BOOST_PP_LOCAL_R(126) + BOOST_PP_LOCAL_MACRO(126) +# endif +# if BOOST_PP_LOCAL_R(125) + BOOST_PP_LOCAL_MACRO(125) +# endif +# if BOOST_PP_LOCAL_R(124) + BOOST_PP_LOCAL_MACRO(124) +# endif +# if BOOST_PP_LOCAL_R(123) + BOOST_PP_LOCAL_MACRO(123) +# endif +# if BOOST_PP_LOCAL_R(122) + BOOST_PP_LOCAL_MACRO(122) +# endif +# if BOOST_PP_LOCAL_R(121) + BOOST_PP_LOCAL_MACRO(121) +# endif +# if BOOST_PP_LOCAL_R(120) + BOOST_PP_LOCAL_MACRO(120) +# endif +# if BOOST_PP_LOCAL_R(119) + BOOST_PP_LOCAL_MACRO(119) +# endif +# if BOOST_PP_LOCAL_R(118) + BOOST_PP_LOCAL_MACRO(118) +# endif +# if BOOST_PP_LOCAL_R(117) + BOOST_PP_LOCAL_MACRO(117) +# endif +# if BOOST_PP_LOCAL_R(116) + BOOST_PP_LOCAL_MACRO(116) +# endif +# if BOOST_PP_LOCAL_R(115) + BOOST_PP_LOCAL_MACRO(115) +# endif +# if BOOST_PP_LOCAL_R(114) + BOOST_PP_LOCAL_MACRO(114) +# endif +# if BOOST_PP_LOCAL_R(113) + BOOST_PP_LOCAL_MACRO(113) +# endif +# if BOOST_PP_LOCAL_R(112) + BOOST_PP_LOCAL_MACRO(112) +# endif +# if BOOST_PP_LOCAL_R(111) + BOOST_PP_LOCAL_MACRO(111) +# endif +# if BOOST_PP_LOCAL_R(110) + BOOST_PP_LOCAL_MACRO(110) +# endif +# if BOOST_PP_LOCAL_R(109) + BOOST_PP_LOCAL_MACRO(109) +# endif +# if BOOST_PP_LOCAL_R(108) + BOOST_PP_LOCAL_MACRO(108) +# endif +# if BOOST_PP_LOCAL_R(107) + BOOST_PP_LOCAL_MACRO(107) +# endif +# if BOOST_PP_LOCAL_R(106) + BOOST_PP_LOCAL_MACRO(106) +# endif +# if BOOST_PP_LOCAL_R(105) + BOOST_PP_LOCAL_MACRO(105) +# endif +# if BOOST_PP_LOCAL_R(104) + BOOST_PP_LOCAL_MACRO(104) +# endif +# if BOOST_PP_LOCAL_R(103) + BOOST_PP_LOCAL_MACRO(103) +# endif +# if BOOST_PP_LOCAL_R(102) + BOOST_PP_LOCAL_MACRO(102) +# endif +# if BOOST_PP_LOCAL_R(101) + BOOST_PP_LOCAL_MACRO(101) +# endif +# if BOOST_PP_LOCAL_R(100) + BOOST_PP_LOCAL_MACRO(100) +# endif +# if BOOST_PP_LOCAL_R(99) + BOOST_PP_LOCAL_MACRO(99) +# endif +# if BOOST_PP_LOCAL_R(98) + BOOST_PP_LOCAL_MACRO(98) +# endif +# if BOOST_PP_LOCAL_R(97) + BOOST_PP_LOCAL_MACRO(97) +# endif +# if BOOST_PP_LOCAL_R(96) + BOOST_PP_LOCAL_MACRO(96) +# endif +# if BOOST_PP_LOCAL_R(95) + BOOST_PP_LOCAL_MACRO(95) +# endif +# if BOOST_PP_LOCAL_R(94) + BOOST_PP_LOCAL_MACRO(94) +# endif +# if BOOST_PP_LOCAL_R(93) + BOOST_PP_LOCAL_MACRO(93) +# endif +# if BOOST_PP_LOCAL_R(92) + BOOST_PP_LOCAL_MACRO(92) +# endif +# if BOOST_PP_LOCAL_R(91) + BOOST_PP_LOCAL_MACRO(91) +# endif +# if BOOST_PP_LOCAL_R(90) + BOOST_PP_LOCAL_MACRO(90) +# endif +# if BOOST_PP_LOCAL_R(89) + BOOST_PP_LOCAL_MACRO(89) +# endif +# if BOOST_PP_LOCAL_R(88) + BOOST_PP_LOCAL_MACRO(88) +# endif +# if BOOST_PP_LOCAL_R(87) + BOOST_PP_LOCAL_MACRO(87) +# endif +# if BOOST_PP_LOCAL_R(86) + BOOST_PP_LOCAL_MACRO(86) +# endif +# if BOOST_PP_LOCAL_R(85) + BOOST_PP_LOCAL_MACRO(85) +# endif +# if BOOST_PP_LOCAL_R(84) + BOOST_PP_LOCAL_MACRO(84) +# endif +# if BOOST_PP_LOCAL_R(83) + BOOST_PP_LOCAL_MACRO(83) +# endif +# if BOOST_PP_LOCAL_R(82) + BOOST_PP_LOCAL_MACRO(82) +# endif +# if BOOST_PP_LOCAL_R(81) + BOOST_PP_LOCAL_MACRO(81) +# endif +# if BOOST_PP_LOCAL_R(80) + BOOST_PP_LOCAL_MACRO(80) +# endif +# if BOOST_PP_LOCAL_R(79) + BOOST_PP_LOCAL_MACRO(79) +# endif +# if BOOST_PP_LOCAL_R(78) + BOOST_PP_LOCAL_MACRO(78) +# endif +# if BOOST_PP_LOCAL_R(77) + BOOST_PP_LOCAL_MACRO(77) +# endif +# if BOOST_PP_LOCAL_R(76) + BOOST_PP_LOCAL_MACRO(76) +# endif +# if BOOST_PP_LOCAL_R(75) + BOOST_PP_LOCAL_MACRO(75) +# endif +# if BOOST_PP_LOCAL_R(74) + BOOST_PP_LOCAL_MACRO(74) +# endif +# if BOOST_PP_LOCAL_R(73) + BOOST_PP_LOCAL_MACRO(73) +# endif +# if BOOST_PP_LOCAL_R(72) + BOOST_PP_LOCAL_MACRO(72) +# endif +# if BOOST_PP_LOCAL_R(71) + BOOST_PP_LOCAL_MACRO(71) +# endif +# if BOOST_PP_LOCAL_R(70) + BOOST_PP_LOCAL_MACRO(70) +# endif +# if BOOST_PP_LOCAL_R(69) + BOOST_PP_LOCAL_MACRO(69) +# endif +# if BOOST_PP_LOCAL_R(68) + BOOST_PP_LOCAL_MACRO(68) +# endif +# if BOOST_PP_LOCAL_R(67) + BOOST_PP_LOCAL_MACRO(67) +# endif +# if BOOST_PP_LOCAL_R(66) + BOOST_PP_LOCAL_MACRO(66) +# endif +# if BOOST_PP_LOCAL_R(65) + BOOST_PP_LOCAL_MACRO(65) +# endif +# if BOOST_PP_LOCAL_R(64) + BOOST_PP_LOCAL_MACRO(64) +# endif +# if BOOST_PP_LOCAL_R(63) + BOOST_PP_LOCAL_MACRO(63) +# endif +# if BOOST_PP_LOCAL_R(62) + BOOST_PP_LOCAL_MACRO(62) +# endif +# if BOOST_PP_LOCAL_R(61) + BOOST_PP_LOCAL_MACRO(61) +# endif +# if BOOST_PP_LOCAL_R(60) + BOOST_PP_LOCAL_MACRO(60) +# endif +# if BOOST_PP_LOCAL_R(59) + BOOST_PP_LOCAL_MACRO(59) +# endif +# if BOOST_PP_LOCAL_R(58) + BOOST_PP_LOCAL_MACRO(58) +# endif +# if BOOST_PP_LOCAL_R(57) + BOOST_PP_LOCAL_MACRO(57) +# endif +# if BOOST_PP_LOCAL_R(56) + BOOST_PP_LOCAL_MACRO(56) +# endif +# if BOOST_PP_LOCAL_R(55) + BOOST_PP_LOCAL_MACRO(55) +# endif +# if BOOST_PP_LOCAL_R(54) + BOOST_PP_LOCAL_MACRO(54) +# endif +# if BOOST_PP_LOCAL_R(53) + BOOST_PP_LOCAL_MACRO(53) +# endif +# if BOOST_PP_LOCAL_R(52) + BOOST_PP_LOCAL_MACRO(52) +# endif +# if BOOST_PP_LOCAL_R(51) + BOOST_PP_LOCAL_MACRO(51) +# endif +# if BOOST_PP_LOCAL_R(50) + BOOST_PP_LOCAL_MACRO(50) +# endif +# if BOOST_PP_LOCAL_R(49) + BOOST_PP_LOCAL_MACRO(49) +# endif +# if BOOST_PP_LOCAL_R(48) + BOOST_PP_LOCAL_MACRO(48) +# endif +# if BOOST_PP_LOCAL_R(47) + BOOST_PP_LOCAL_MACRO(47) +# endif +# if BOOST_PP_LOCAL_R(46) + BOOST_PP_LOCAL_MACRO(46) +# endif +# if BOOST_PP_LOCAL_R(45) + BOOST_PP_LOCAL_MACRO(45) +# endif +# if BOOST_PP_LOCAL_R(44) + BOOST_PP_LOCAL_MACRO(44) +# endif +# if BOOST_PP_LOCAL_R(43) + BOOST_PP_LOCAL_MACRO(43) +# endif +# if BOOST_PP_LOCAL_R(42) + BOOST_PP_LOCAL_MACRO(42) +# endif +# if BOOST_PP_LOCAL_R(41) + BOOST_PP_LOCAL_MACRO(41) +# endif +# if BOOST_PP_LOCAL_R(40) + BOOST_PP_LOCAL_MACRO(40) +# endif +# if BOOST_PP_LOCAL_R(39) + BOOST_PP_LOCAL_MACRO(39) +# endif +# if BOOST_PP_LOCAL_R(38) + BOOST_PP_LOCAL_MACRO(38) +# endif +# if BOOST_PP_LOCAL_R(37) + BOOST_PP_LOCAL_MACRO(37) +# endif +# if BOOST_PP_LOCAL_R(36) + BOOST_PP_LOCAL_MACRO(36) +# endif +# if BOOST_PP_LOCAL_R(35) + BOOST_PP_LOCAL_MACRO(35) +# endif +# if BOOST_PP_LOCAL_R(34) + BOOST_PP_LOCAL_MACRO(34) +# endif +# if BOOST_PP_LOCAL_R(33) + BOOST_PP_LOCAL_MACRO(33) +# endif +# if BOOST_PP_LOCAL_R(32) + BOOST_PP_LOCAL_MACRO(32) +# endif +# if BOOST_PP_LOCAL_R(31) + BOOST_PP_LOCAL_MACRO(31) +# endif +# if BOOST_PP_LOCAL_R(30) + BOOST_PP_LOCAL_MACRO(30) +# endif +# if BOOST_PP_LOCAL_R(29) + BOOST_PP_LOCAL_MACRO(29) +# endif +# if BOOST_PP_LOCAL_R(28) + BOOST_PP_LOCAL_MACRO(28) +# endif +# if BOOST_PP_LOCAL_R(27) + BOOST_PP_LOCAL_MACRO(27) +# endif +# if BOOST_PP_LOCAL_R(26) + BOOST_PP_LOCAL_MACRO(26) +# endif +# if BOOST_PP_LOCAL_R(25) + BOOST_PP_LOCAL_MACRO(25) +# endif +# if BOOST_PP_LOCAL_R(24) + BOOST_PP_LOCAL_MACRO(24) +# endif +# if BOOST_PP_LOCAL_R(23) + BOOST_PP_LOCAL_MACRO(23) +# endif +# if BOOST_PP_LOCAL_R(22) + BOOST_PP_LOCAL_MACRO(22) +# endif +# if BOOST_PP_LOCAL_R(21) + BOOST_PP_LOCAL_MACRO(21) +# endif +# if BOOST_PP_LOCAL_R(20) + BOOST_PP_LOCAL_MACRO(20) +# endif +# if BOOST_PP_LOCAL_R(19) + BOOST_PP_LOCAL_MACRO(19) +# endif +# if BOOST_PP_LOCAL_R(18) + BOOST_PP_LOCAL_MACRO(18) +# endif +# if BOOST_PP_LOCAL_R(17) + BOOST_PP_LOCAL_MACRO(17) +# endif +# if BOOST_PP_LOCAL_R(16) + BOOST_PP_LOCAL_MACRO(16) +# endif +# if BOOST_PP_LOCAL_R(15) + BOOST_PP_LOCAL_MACRO(15) +# endif +# if BOOST_PP_LOCAL_R(14) + BOOST_PP_LOCAL_MACRO(14) +# endif +# if BOOST_PP_LOCAL_R(13) + BOOST_PP_LOCAL_MACRO(13) +# endif +# if BOOST_PP_LOCAL_R(12) + BOOST_PP_LOCAL_MACRO(12) +# endif +# if BOOST_PP_LOCAL_R(11) + BOOST_PP_LOCAL_MACRO(11) +# endif +# if BOOST_PP_LOCAL_R(10) + BOOST_PP_LOCAL_MACRO(10) +# endif +# if BOOST_PP_LOCAL_R(9) + BOOST_PP_LOCAL_MACRO(9) +# endif +# if BOOST_PP_LOCAL_R(8) + BOOST_PP_LOCAL_MACRO(8) +# endif +# if BOOST_PP_LOCAL_R(7) + BOOST_PP_LOCAL_MACRO(7) +# endif +# if BOOST_PP_LOCAL_R(6) + BOOST_PP_LOCAL_MACRO(6) +# endif +# if BOOST_PP_LOCAL_R(5) + BOOST_PP_LOCAL_MACRO(5) +# endif +# if BOOST_PP_LOCAL_R(4) + BOOST_PP_LOCAL_MACRO(4) +# endif +# if BOOST_PP_LOCAL_R(3) + BOOST_PP_LOCAL_MACRO(3) +# endif +# if BOOST_PP_LOCAL_R(2) + BOOST_PP_LOCAL_MACRO(2) +# endif +# if BOOST_PP_LOCAL_R(1) + BOOST_PP_LOCAL_MACRO(1) +# endif +# if BOOST_PP_LOCAL_R(0) + BOOST_PP_LOCAL_MACRO(0) +# endif diff --git a/contrib/src/boost/preprocessor/iteration/detail/self.hpp b/contrib/src/boost/preprocessor/iteration/detail/self.hpp new file mode 100644 index 0000000..757185c --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/self.hpp @@ -0,0 +1,21 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if !defined(BOOST_PP_INDIRECT_SELF) +# error BOOST_PP_ERROR: no indirect file to include +# endif +# +# define BOOST_PP_IS_SELFISH 1 +# +# include BOOST_PP_INDIRECT_SELF +# +# undef BOOST_PP_IS_SELFISH +# undef BOOST_PP_INDIRECT_SELF diff --git a/contrib/src/boost/preprocessor/iteration/detail/start.hpp b/contrib/src/boost/preprocessor/iteration/detail/start.hpp new file mode 100644 index 0000000..cbf0381 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/detail/start.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_LOCAL_SE +# +# undef BOOST_PP_LOCAL_SE_DIGIT_1 +# undef BOOST_PP_LOCAL_SE_DIGIT_2 +# undef BOOST_PP_LOCAL_SE_DIGIT_3 +# undef BOOST_PP_LOCAL_SE_DIGIT_4 +# undef BOOST_PP_LOCAL_SE_DIGIT_5 +# undef BOOST_PP_LOCAL_SE_DIGIT_6 +# undef BOOST_PP_LOCAL_SE_DIGIT_7 +# undef BOOST_PP_LOCAL_SE_DIGIT_8 +# undef BOOST_PP_LOCAL_SE_DIGIT_9 +# undef BOOST_PP_LOCAL_SE_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_LOCAL_SE_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_LOCAL_SE_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_LOCAL_SE_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_LOCAL_SE_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_LOCAL_SE_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_LOCAL_SE_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_LOCAL_SE_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_LOCAL_SE_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_LOCAL_SE_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_LOCAL_SE_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_LOCAL_SE_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_LOCAL_SE_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_LOCAL_SE_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_LOCAL_SE_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_LOCAL_SE_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_LOCAL_SE_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_LOCAL_SE_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_LOCAL_SE_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_LOCAL_SE_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_LOCAL_SE_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_LOCAL_SE_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_LOCAL_SE_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_LOCAL_SE_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_LOCAL_SE_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_LOCAL_SE_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_LOCAL_SE_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_LOCAL_SE_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_LOCAL_SE_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_LOCAL_SE_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_LOCAL_SE_DIGIT_1 9 +# endif +# +# if BOOST_PP_LOCAL_SE_DIGIT_3 +# define BOOST_PP_LOCAL_SE() BOOST_PP_SLOT_CC_3(BOOST_PP_LOCAL_SE_DIGIT_3, BOOST_PP_LOCAL_SE_DIGIT_2, BOOST_PP_LOCAL_SE_DIGIT_1) +# elif BOOST_PP_LOCAL_SE_DIGIT_2 +# define BOOST_PP_LOCAL_SE() BOOST_PP_SLOT_CC_2(BOOST_PP_LOCAL_SE_DIGIT_2, BOOST_PP_LOCAL_SE_DIGIT_1) +# else +# define BOOST_PP_LOCAL_SE() BOOST_PP_LOCAL_SE_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/iteration/iterate.hpp b/contrib/src/boost/preprocessor/iteration/iterate.hpp new file mode 100644 index 0000000..8f861e7 --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/iterate.hpp @@ -0,0 +1,82 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP +# define BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ITERATION_DEPTH */ +# +# define BOOST_PP_ITERATION_DEPTH() 0 +# +# /* BOOST_PP_ITERATION */ +# +# define BOOST_PP_ITERATION() BOOST_PP_CAT(BOOST_PP_ITERATION_, BOOST_PP_ITERATION_DEPTH()) +# +# /* BOOST_PP_ITERATION_START && BOOST_PP_ITERATION_FINISH */ +# +# define BOOST_PP_ITERATION_START() BOOST_PP_CAT(BOOST_PP_ITERATION_START_, BOOST_PP_ITERATION_DEPTH()) +# define BOOST_PP_ITERATION_FINISH() BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, BOOST_PP_ITERATION_DEPTH()) +# +# /* BOOST_PP_ITERATION_FLAGS */ +# +# define BOOST_PP_ITERATION_FLAGS() (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, BOOST_PP_ITERATION_DEPTH())()) +# +# /* BOOST_PP_FRAME_ITERATION */ +# +# define BOOST_PP_FRAME_ITERATION(i) BOOST_PP_CAT(BOOST_PP_ITERATION_, i) +# +# /* BOOST_PP_FRAME_START && BOOST_PP_FRAME_FINISH */ +# +# define BOOST_PP_FRAME_START(i) BOOST_PP_CAT(BOOST_PP_ITERATION_START_, i) +# define BOOST_PP_FRAME_FINISH(i) BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, i) +# +# /* BOOST_PP_FRAME_FLAGS */ +# +# define BOOST_PP_FRAME_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, i)()) +# +# /* BOOST_PP_RELATIVE_ITERATION */ +# +# define BOOST_PP_RELATIVE_ITERATION(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_) +# +# define BOOST_PP_RELATIVE_0(m) BOOST_PP_CAT(m, BOOST_PP_ITERATION_DEPTH()) +# define BOOST_PP_RELATIVE_1(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())) +# define BOOST_PP_RELATIVE_2(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))) +# define BOOST_PP_RELATIVE_3(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())))) +# define BOOST_PP_RELATIVE_4(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))))) +# +# /* BOOST_PP_RELATIVE_START && BOOST_PP_RELATIVE_FINISH */ +# +# define BOOST_PP_RELATIVE_START(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_START_) +# define BOOST_PP_RELATIVE_FINISH(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FINISH_) +# +# /* BOOST_PP_RELATIVE_FLAGS */ +# +# define BOOST_PP_RELATIVE_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FLAGS_)()) +# +# /* BOOST_PP_ITERATE */ +# +# define BOOST_PP_ITERATE() BOOST_PP_CAT(BOOST_PP_ITERATE_, BOOST_PP_INC(BOOST_PP_ITERATION_DEPTH())) +# +# define BOOST_PP_ITERATE_1 +# define BOOST_PP_ITERATE_2 +# define BOOST_PP_ITERATE_3 +# define BOOST_PP_ITERATE_4 +# define BOOST_PP_ITERATE_5 +# +# endif diff --git a/contrib/src/boost/preprocessor/iteration/local.hpp b/contrib/src/boost/preprocessor/iteration/local.hpp new file mode 100644 index 0000000..289fb1a --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/local.hpp @@ -0,0 +1,26 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP +# define BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP +# +# include +# include +# include +# +# /* BOOST_PP_LOCAL_ITERATE */ +# +# define BOOST_PP_LOCAL_ITERATE() +# +# define BOOST_PP_LOCAL_C(n) (BOOST_PP_LOCAL_S) <= n && (BOOST_PP_LOCAL_F) >= n +# define BOOST_PP_LOCAL_R(n) (BOOST_PP_LOCAL_F) <= n && (BOOST_PP_LOCAL_S) >= n +# +# endif diff --git a/contrib/src/boost/preprocessor/iteration/self.hpp b/contrib/src/boost/preprocessor/iteration/self.hpp new file mode 100644 index 0000000..6e0464c --- /dev/null +++ b/contrib/src/boost/preprocessor/iteration/self.hpp @@ -0,0 +1,19 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ITERATION_SELF_HPP +# define BOOST_PREPROCESSOR_ITERATION_SELF_HPP +# +# /* BOOST_PP_INCLUDE_SELF */ +# +# define BOOST_PP_INCLUDE_SELF() +# +# endif diff --git a/contrib/src/boost/preprocessor/list/adt.hpp b/contrib/src/boost/preprocessor/list/adt.hpp new file mode 100644 index 0000000..b4f12ba --- /dev/null +++ b/contrib/src/boost/preprocessor/list/adt.hpp @@ -0,0 +1,73 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * +# * See http://www.boost.org for most recent version. +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# ifndef BOOST_PREPROCESSOR_LIST_ADT_HPP +# define BOOST_PREPROCESSOR_LIST_ADT_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_LIST_CONS */ +# +# define BOOST_PP_LIST_CONS(head, tail) (head, tail) +# +# /* BOOST_PP_LIST_NIL */ +# +# define BOOST_PP_LIST_NIL BOOST_PP_NIL +# +# /* BOOST_PP_LIST_FIRST */ +# +# define BOOST_PP_LIST_FIRST(list) BOOST_PP_LIST_FIRST_D(list) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I list +# else +# define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I ## list +# endif +# +# define BOOST_PP_LIST_FIRST_I(head, tail) head +# +# /* BOOST_PP_LIST_REST */ +# +# define BOOST_PP_LIST_REST(list) BOOST_PP_LIST_REST_D(list) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I list +# else +# define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I ## list +# endif +# +# define BOOST_PP_LIST_REST_I(head, tail) tail +# +# /* BOOST_PP_LIST_IS_CONS */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC() +# define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_LIST_IS_CONS_D(list) +# define BOOST_PP_LIST_IS_CONS_D(list) BOOST_PP_LIST_IS_CONS_ ## list +# define BOOST_PP_LIST_IS_CONS_(head, tail) 1 +# define BOOST_PP_LIST_IS_CONS_BOOST_PP_NIL 0 +# else +# define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_IS_BINARY(list) +# endif +# +# /* BOOST_PP_LIST_IS_NIL */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC() +# define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_IS_BINARY(list)) +# else +# define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_LIST_IS_CONS(list)) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/list/detail/dmc/fold_left.hpp b/contrib/src/boost/preprocessor/list/detail/dmc/fold_left.hpp new file mode 100644 index 0000000..844ac5b --- /dev/null +++ b/contrib/src/boost/preprocessor/list/detail/dmc/fold_left.hpp @@ -0,0 +1,279 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP +# define BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP +# +# include +# include +# include +# include +# +# define BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_2, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(2, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_3, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(3, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_4, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(4, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_5, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(5, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_6, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(6, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_7, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(7, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_8, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(8, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_9, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(9, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_10, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(10, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_11, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(11, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_12, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(12, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_13, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(13, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_14, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(14, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_15, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(15, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_16, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(16, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_17, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(17, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_18, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(18, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_19, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(19, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_20, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(20, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_21, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(21, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_22, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(22, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_23, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(23, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_24, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(24, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_25, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(25, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_26, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(26, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_27, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(27, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_28, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(28, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_29, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(29, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_30, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(30, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_31, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(31, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_32, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(32, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_33, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(33, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_34, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(34, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_35, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(35, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_36, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(36, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_37, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(37, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_38, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(38, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_39, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(39, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_40, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(40, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_41, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(41, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_42, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(42, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_43, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(43, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_44, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(44, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_45, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(45, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_46, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(46, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_47, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(47, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_48, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(48, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_49, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(49, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_50, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(50, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_51, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(51, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_52, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(52, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_53, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(53, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_54, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(54, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_55, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(55, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_56, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(56, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_57, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(57, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_58, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(58, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_59, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(59, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_60, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(60, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_61, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(61, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_62, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(62, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_63, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(63, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_64, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(64, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_65, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(65, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_66, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(66, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_67, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(67, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_68, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(68, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_69, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(69, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_70, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(70, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_71, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(71, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_72, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(72, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_73, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(73, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_74, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(74, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_75, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(75, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_76, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(76, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_77, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(77, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_78, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(78, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_79, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(79, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_80, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(80, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_81, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(81, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_82, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(82, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_83, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(83, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_84, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(84, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_85, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(85, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_86, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(86, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_87, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(87, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_88, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(88, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_89, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(89, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_90, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(90, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_91, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(91, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_92, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(92, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_93, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(93, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_94, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(94, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_95, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(95, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_96, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(96, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_97, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(97, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_98, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(98, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_99, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(99, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_100, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(100, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_101, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(101, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_102, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(102, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_103, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(103, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_104, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(104, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_105, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(105, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_106, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(106, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_107, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(107, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_108, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(108, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_109, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(109, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_110, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(110, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_111, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(111, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_112, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(112, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_113, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(113, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_114, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(114, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_115, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(115, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_116, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(116, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_117, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(117, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_118, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(118, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_119, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(119, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_120, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(120, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_121, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(121, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_122, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(122, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_123, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(123, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_124, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(124, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_125, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(125, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_126, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(126, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_127, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(127, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_128, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(128, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_129, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(129, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_130, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(130, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_131, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(131, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_132, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(132, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_133, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(133, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_134, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(134, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_135, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(135, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_136, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(136, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_137, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(137, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_138, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(138, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_139, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(139, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_140, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(140, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_141, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(141, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_142, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(142, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_143, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(143, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_144, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(144, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_145, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(145, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_146, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(146, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_147, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(147, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_148, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(148, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_149, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(149, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_150, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(150, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_151, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(151, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_152, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(152, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_153, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(153, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_154, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(154, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_155, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(155, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_156, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(156, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_157, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(157, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_158, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(158, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_159, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(159, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_160, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(160, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_161, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(161, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_162, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(162, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_163, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(163, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_164, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(164, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_165, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(165, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_166, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(166, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_167, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(167, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_168, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(168, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_169, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(169, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_170, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(170, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_171, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(171, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_172, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(172, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_173, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(173, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_174, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(174, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_175, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(175, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_176, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(176, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_177, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(177, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_178, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(178, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_179, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(179, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_180, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(180, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_181, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(181, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_182, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(182, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_183, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(183, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_184, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(184, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_185, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(185, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_186, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(186, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_187, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(187, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_188, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(188, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_189, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(189, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_190, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(190, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_191, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(191, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_192, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(192, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_193, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(193, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_194, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(194, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_195, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(195, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_196, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(196, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_197, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(197, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_198, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(198, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_199, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(199, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_200, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(200, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_201, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(201, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_202, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(202, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_203, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(203, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_204, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(204, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_205, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(205, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_206, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(206, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_207, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(207, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_208, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(208, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_209, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(209, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_210, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(210, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_211, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(211, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_212, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(212, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_213, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(213, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_214, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(214, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_215, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(215, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_216, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(216, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_217, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(217, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_218, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(218, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_219, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(219, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_220, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(220, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_221, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(221, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_222, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(222, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_223, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(223, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_224, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(224, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_225, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(225, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_226, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(226, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_227, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(227, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_228, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(228, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_229, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(229, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_230, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(230, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_231, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(231, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_232, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(232, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_233, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(233, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_234, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(234, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_235, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(235, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_236, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(236, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_237, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(237, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_238, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(238, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_239, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(239, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_240, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(240, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_241, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(241, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_242, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(242, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_243, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(243, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_244, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(244, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_245, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(245, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_246, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(246, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_247, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(247, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_248, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(248, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_249, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(249, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_250, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(250, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_251, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(251, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_252, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(252, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_253, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(253, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_254, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(254, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_255, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(255, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_256, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(256, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_257, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(257, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# +# endif diff --git a/contrib/src/boost/preprocessor/list/detail/edg/fold_left.hpp b/contrib/src/boost/preprocessor/list/detail/edg/fold_left.hpp new file mode 100644 index 0000000..ae9524f --- /dev/null +++ b/contrib/src/boost/preprocessor/list/detail/edg/fold_left.hpp @@ -0,0 +1,536 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_DETAIL_EDG_FOLD_LEFT_HPP +# define BOOST_PREPROCESSOR_LIST_DETAIL_EDG_FOLD_LEFT_HPP +# +# include +# include +# include +# include +# +# define BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) BOOST_PP_LIST_FOLD_LEFT_1_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) BOOST_PP_LIST_FOLD_LEFT_2_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) BOOST_PP_LIST_FOLD_LEFT_3_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) BOOST_PP_LIST_FOLD_LEFT_4_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) BOOST_PP_LIST_FOLD_LEFT_5_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) BOOST_PP_LIST_FOLD_LEFT_6_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) BOOST_PP_LIST_FOLD_LEFT_7_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) BOOST_PP_LIST_FOLD_LEFT_8_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) BOOST_PP_LIST_FOLD_LEFT_9_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) BOOST_PP_LIST_FOLD_LEFT_10_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) BOOST_PP_LIST_FOLD_LEFT_11_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) BOOST_PP_LIST_FOLD_LEFT_12_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) BOOST_PP_LIST_FOLD_LEFT_13_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) BOOST_PP_LIST_FOLD_LEFT_14_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) BOOST_PP_LIST_FOLD_LEFT_15_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) BOOST_PP_LIST_FOLD_LEFT_16_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) BOOST_PP_LIST_FOLD_LEFT_17_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) BOOST_PP_LIST_FOLD_LEFT_18_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) BOOST_PP_LIST_FOLD_LEFT_19_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) BOOST_PP_LIST_FOLD_LEFT_20_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) BOOST_PP_LIST_FOLD_LEFT_21_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) BOOST_PP_LIST_FOLD_LEFT_22_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) BOOST_PP_LIST_FOLD_LEFT_23_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) BOOST_PP_LIST_FOLD_LEFT_24_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) BOOST_PP_LIST_FOLD_LEFT_25_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) BOOST_PP_LIST_FOLD_LEFT_26_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) BOOST_PP_LIST_FOLD_LEFT_27_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) BOOST_PP_LIST_FOLD_LEFT_28_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) BOOST_PP_LIST_FOLD_LEFT_29_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) BOOST_PP_LIST_FOLD_LEFT_30_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) BOOST_PP_LIST_FOLD_LEFT_31_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) BOOST_PP_LIST_FOLD_LEFT_32_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) BOOST_PP_LIST_FOLD_LEFT_33_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) BOOST_PP_LIST_FOLD_LEFT_34_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) BOOST_PP_LIST_FOLD_LEFT_35_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) BOOST_PP_LIST_FOLD_LEFT_36_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) BOOST_PP_LIST_FOLD_LEFT_37_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) BOOST_PP_LIST_FOLD_LEFT_38_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) BOOST_PP_LIST_FOLD_LEFT_39_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) BOOST_PP_LIST_FOLD_LEFT_40_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) BOOST_PP_LIST_FOLD_LEFT_41_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) BOOST_PP_LIST_FOLD_LEFT_42_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) BOOST_PP_LIST_FOLD_LEFT_43_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) BOOST_PP_LIST_FOLD_LEFT_44_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) BOOST_PP_LIST_FOLD_LEFT_45_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) BOOST_PP_LIST_FOLD_LEFT_46_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) BOOST_PP_LIST_FOLD_LEFT_47_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) BOOST_PP_LIST_FOLD_LEFT_48_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) BOOST_PP_LIST_FOLD_LEFT_49_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) BOOST_PP_LIST_FOLD_LEFT_50_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) BOOST_PP_LIST_FOLD_LEFT_51_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) BOOST_PP_LIST_FOLD_LEFT_52_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) BOOST_PP_LIST_FOLD_LEFT_53_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) BOOST_PP_LIST_FOLD_LEFT_54_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) BOOST_PP_LIST_FOLD_LEFT_55_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) BOOST_PP_LIST_FOLD_LEFT_56_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) BOOST_PP_LIST_FOLD_LEFT_57_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) BOOST_PP_LIST_FOLD_LEFT_58_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) BOOST_PP_LIST_FOLD_LEFT_59_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) BOOST_PP_LIST_FOLD_LEFT_60_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) BOOST_PP_LIST_FOLD_LEFT_61_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) BOOST_PP_LIST_FOLD_LEFT_62_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) BOOST_PP_LIST_FOLD_LEFT_63_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) BOOST_PP_LIST_FOLD_LEFT_64_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) BOOST_PP_LIST_FOLD_LEFT_65_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) BOOST_PP_LIST_FOLD_LEFT_66_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) BOOST_PP_LIST_FOLD_LEFT_67_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) BOOST_PP_LIST_FOLD_LEFT_68_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) BOOST_PP_LIST_FOLD_LEFT_69_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) BOOST_PP_LIST_FOLD_LEFT_70_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) BOOST_PP_LIST_FOLD_LEFT_71_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) BOOST_PP_LIST_FOLD_LEFT_72_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) BOOST_PP_LIST_FOLD_LEFT_73_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) BOOST_PP_LIST_FOLD_LEFT_74_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) BOOST_PP_LIST_FOLD_LEFT_75_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) BOOST_PP_LIST_FOLD_LEFT_76_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) BOOST_PP_LIST_FOLD_LEFT_77_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) BOOST_PP_LIST_FOLD_LEFT_78_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) BOOST_PP_LIST_FOLD_LEFT_79_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) BOOST_PP_LIST_FOLD_LEFT_80_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) BOOST_PP_LIST_FOLD_LEFT_81_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) BOOST_PP_LIST_FOLD_LEFT_82_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) BOOST_PP_LIST_FOLD_LEFT_83_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) BOOST_PP_LIST_FOLD_LEFT_84_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) BOOST_PP_LIST_FOLD_LEFT_85_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) BOOST_PP_LIST_FOLD_LEFT_86_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) BOOST_PP_LIST_FOLD_LEFT_87_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) BOOST_PP_LIST_FOLD_LEFT_88_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) BOOST_PP_LIST_FOLD_LEFT_89_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) BOOST_PP_LIST_FOLD_LEFT_90_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) BOOST_PP_LIST_FOLD_LEFT_91_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) BOOST_PP_LIST_FOLD_LEFT_92_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) BOOST_PP_LIST_FOLD_LEFT_93_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) BOOST_PP_LIST_FOLD_LEFT_94_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) BOOST_PP_LIST_FOLD_LEFT_95_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) BOOST_PP_LIST_FOLD_LEFT_96_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) BOOST_PP_LIST_FOLD_LEFT_97_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) BOOST_PP_LIST_FOLD_LEFT_98_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) BOOST_PP_LIST_FOLD_LEFT_99_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) BOOST_PP_LIST_FOLD_LEFT_100_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) BOOST_PP_LIST_FOLD_LEFT_101_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) BOOST_PP_LIST_FOLD_LEFT_102_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) BOOST_PP_LIST_FOLD_LEFT_103_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) BOOST_PP_LIST_FOLD_LEFT_104_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) BOOST_PP_LIST_FOLD_LEFT_105_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) BOOST_PP_LIST_FOLD_LEFT_106_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) BOOST_PP_LIST_FOLD_LEFT_107_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) BOOST_PP_LIST_FOLD_LEFT_108_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) BOOST_PP_LIST_FOLD_LEFT_109_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) BOOST_PP_LIST_FOLD_LEFT_110_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) BOOST_PP_LIST_FOLD_LEFT_111_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) BOOST_PP_LIST_FOLD_LEFT_112_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) BOOST_PP_LIST_FOLD_LEFT_113_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) BOOST_PP_LIST_FOLD_LEFT_114_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) BOOST_PP_LIST_FOLD_LEFT_115_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) BOOST_PP_LIST_FOLD_LEFT_116_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) BOOST_PP_LIST_FOLD_LEFT_117_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) BOOST_PP_LIST_FOLD_LEFT_118_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) BOOST_PP_LIST_FOLD_LEFT_119_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) BOOST_PP_LIST_FOLD_LEFT_120_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) BOOST_PP_LIST_FOLD_LEFT_121_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) BOOST_PP_LIST_FOLD_LEFT_122_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) BOOST_PP_LIST_FOLD_LEFT_123_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) BOOST_PP_LIST_FOLD_LEFT_124_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) BOOST_PP_LIST_FOLD_LEFT_125_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) BOOST_PP_LIST_FOLD_LEFT_126_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) BOOST_PP_LIST_FOLD_LEFT_127_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) BOOST_PP_LIST_FOLD_LEFT_128_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) BOOST_PP_LIST_FOLD_LEFT_129_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) BOOST_PP_LIST_FOLD_LEFT_130_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) BOOST_PP_LIST_FOLD_LEFT_131_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) BOOST_PP_LIST_FOLD_LEFT_132_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) BOOST_PP_LIST_FOLD_LEFT_133_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) BOOST_PP_LIST_FOLD_LEFT_134_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) BOOST_PP_LIST_FOLD_LEFT_135_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) BOOST_PP_LIST_FOLD_LEFT_136_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) BOOST_PP_LIST_FOLD_LEFT_137_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) BOOST_PP_LIST_FOLD_LEFT_138_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) BOOST_PP_LIST_FOLD_LEFT_139_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) BOOST_PP_LIST_FOLD_LEFT_140_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) BOOST_PP_LIST_FOLD_LEFT_141_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) BOOST_PP_LIST_FOLD_LEFT_142_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) BOOST_PP_LIST_FOLD_LEFT_143_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) BOOST_PP_LIST_FOLD_LEFT_144_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) BOOST_PP_LIST_FOLD_LEFT_145_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) BOOST_PP_LIST_FOLD_LEFT_146_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) BOOST_PP_LIST_FOLD_LEFT_147_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) BOOST_PP_LIST_FOLD_LEFT_148_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) BOOST_PP_LIST_FOLD_LEFT_149_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) BOOST_PP_LIST_FOLD_LEFT_150_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) BOOST_PP_LIST_FOLD_LEFT_151_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) BOOST_PP_LIST_FOLD_LEFT_152_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) BOOST_PP_LIST_FOLD_LEFT_153_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) BOOST_PP_LIST_FOLD_LEFT_154_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) BOOST_PP_LIST_FOLD_LEFT_155_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) BOOST_PP_LIST_FOLD_LEFT_156_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) BOOST_PP_LIST_FOLD_LEFT_157_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) BOOST_PP_LIST_FOLD_LEFT_158_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) BOOST_PP_LIST_FOLD_LEFT_159_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) BOOST_PP_LIST_FOLD_LEFT_160_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) BOOST_PP_LIST_FOLD_LEFT_161_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) BOOST_PP_LIST_FOLD_LEFT_162_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) BOOST_PP_LIST_FOLD_LEFT_163_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) BOOST_PP_LIST_FOLD_LEFT_164_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) BOOST_PP_LIST_FOLD_LEFT_165_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) BOOST_PP_LIST_FOLD_LEFT_166_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) BOOST_PP_LIST_FOLD_LEFT_167_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) BOOST_PP_LIST_FOLD_LEFT_168_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) BOOST_PP_LIST_FOLD_LEFT_169_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) BOOST_PP_LIST_FOLD_LEFT_170_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) BOOST_PP_LIST_FOLD_LEFT_171_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) BOOST_PP_LIST_FOLD_LEFT_172_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) BOOST_PP_LIST_FOLD_LEFT_173_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) BOOST_PP_LIST_FOLD_LEFT_174_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) BOOST_PP_LIST_FOLD_LEFT_175_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) BOOST_PP_LIST_FOLD_LEFT_176_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) BOOST_PP_LIST_FOLD_LEFT_177_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) BOOST_PP_LIST_FOLD_LEFT_178_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) BOOST_PP_LIST_FOLD_LEFT_179_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) BOOST_PP_LIST_FOLD_LEFT_180_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) BOOST_PP_LIST_FOLD_LEFT_181_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) BOOST_PP_LIST_FOLD_LEFT_182_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) BOOST_PP_LIST_FOLD_LEFT_183_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) BOOST_PP_LIST_FOLD_LEFT_184_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) BOOST_PP_LIST_FOLD_LEFT_185_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) BOOST_PP_LIST_FOLD_LEFT_186_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) BOOST_PP_LIST_FOLD_LEFT_187_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) BOOST_PP_LIST_FOLD_LEFT_188_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) BOOST_PP_LIST_FOLD_LEFT_189_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) BOOST_PP_LIST_FOLD_LEFT_190_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) BOOST_PP_LIST_FOLD_LEFT_191_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) BOOST_PP_LIST_FOLD_LEFT_192_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) BOOST_PP_LIST_FOLD_LEFT_193_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) BOOST_PP_LIST_FOLD_LEFT_194_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) BOOST_PP_LIST_FOLD_LEFT_195_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) BOOST_PP_LIST_FOLD_LEFT_196_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) BOOST_PP_LIST_FOLD_LEFT_197_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) BOOST_PP_LIST_FOLD_LEFT_198_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) BOOST_PP_LIST_FOLD_LEFT_199_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) BOOST_PP_LIST_FOLD_LEFT_200_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) BOOST_PP_LIST_FOLD_LEFT_201_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) BOOST_PP_LIST_FOLD_LEFT_202_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) BOOST_PP_LIST_FOLD_LEFT_203_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) BOOST_PP_LIST_FOLD_LEFT_204_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) BOOST_PP_LIST_FOLD_LEFT_205_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) BOOST_PP_LIST_FOLD_LEFT_206_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) BOOST_PP_LIST_FOLD_LEFT_207_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) BOOST_PP_LIST_FOLD_LEFT_208_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) BOOST_PP_LIST_FOLD_LEFT_209_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) BOOST_PP_LIST_FOLD_LEFT_210_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) BOOST_PP_LIST_FOLD_LEFT_211_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) BOOST_PP_LIST_FOLD_LEFT_212_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) BOOST_PP_LIST_FOLD_LEFT_213_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) BOOST_PP_LIST_FOLD_LEFT_214_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) BOOST_PP_LIST_FOLD_LEFT_215_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) BOOST_PP_LIST_FOLD_LEFT_216_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) BOOST_PP_LIST_FOLD_LEFT_217_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) BOOST_PP_LIST_FOLD_LEFT_218_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) BOOST_PP_LIST_FOLD_LEFT_219_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) BOOST_PP_LIST_FOLD_LEFT_220_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) BOOST_PP_LIST_FOLD_LEFT_221_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) BOOST_PP_LIST_FOLD_LEFT_222_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) BOOST_PP_LIST_FOLD_LEFT_223_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) BOOST_PP_LIST_FOLD_LEFT_224_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) BOOST_PP_LIST_FOLD_LEFT_225_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) BOOST_PP_LIST_FOLD_LEFT_226_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) BOOST_PP_LIST_FOLD_LEFT_227_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) BOOST_PP_LIST_FOLD_LEFT_228_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) BOOST_PP_LIST_FOLD_LEFT_229_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) BOOST_PP_LIST_FOLD_LEFT_230_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) BOOST_PP_LIST_FOLD_LEFT_231_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) BOOST_PP_LIST_FOLD_LEFT_232_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) BOOST_PP_LIST_FOLD_LEFT_233_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) BOOST_PP_LIST_FOLD_LEFT_234_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) BOOST_PP_LIST_FOLD_LEFT_235_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) BOOST_PP_LIST_FOLD_LEFT_236_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) BOOST_PP_LIST_FOLD_LEFT_237_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) BOOST_PP_LIST_FOLD_LEFT_238_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) BOOST_PP_LIST_FOLD_LEFT_239_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) BOOST_PP_LIST_FOLD_LEFT_240_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) BOOST_PP_LIST_FOLD_LEFT_241_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) BOOST_PP_LIST_FOLD_LEFT_242_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) BOOST_PP_LIST_FOLD_LEFT_243_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) BOOST_PP_LIST_FOLD_LEFT_244_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) BOOST_PP_LIST_FOLD_LEFT_245_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) BOOST_PP_LIST_FOLD_LEFT_246_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) BOOST_PP_LIST_FOLD_LEFT_247_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) BOOST_PP_LIST_FOLD_LEFT_248_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) BOOST_PP_LIST_FOLD_LEFT_249_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) BOOST_PP_LIST_FOLD_LEFT_250_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) BOOST_PP_LIST_FOLD_LEFT_251_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) BOOST_PP_LIST_FOLD_LEFT_252_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) BOOST_PP_LIST_FOLD_LEFT_253_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) BOOST_PP_LIST_FOLD_LEFT_254_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) BOOST_PP_LIST_FOLD_LEFT_255_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) BOOST_PP_LIST_FOLD_LEFT_256_D(o, s, l) +# +# define BOOST_PP_LIST_FOLD_LEFT_1_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_2, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(2, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_2_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_3, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(3, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_3_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_4, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(4, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_4_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_5, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(5, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_5_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_6, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(6, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_6_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_7, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(7, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_7_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_8, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(8, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_8_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_9, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(9, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_9_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_10, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(10, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_10_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_11, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(11, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_11_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_12, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(12, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_12_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_13, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(13, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_13_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_14, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(14, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_14_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_15, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(15, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_15_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_16, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(16, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_16_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_17, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(17, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_17_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_18, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(18, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_18_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_19, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(19, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_19_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_20, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(20, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_20_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_21, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(21, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_21_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_22, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(22, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_22_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_23, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(23, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_23_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_24, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(24, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_24_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_25, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(25, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_25_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_26, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(26, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_26_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_27, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(27, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_27_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_28, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(28, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_28_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_29, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(29, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_29_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_30, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(30, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_30_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_31, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(31, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_31_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_32, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(32, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_32_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_33, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(33, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_33_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_34, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(34, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_34_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_35, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(35, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_35_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_36, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(36, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_36_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_37, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(37, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_37_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_38, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(38, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_38_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_39, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(39, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_39_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_40, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(40, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_40_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_41, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(41, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_41_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_42, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(42, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_42_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_43, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(43, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_43_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_44, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(44, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_44_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_45, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(45, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_45_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_46, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(46, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_46_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_47, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(47, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_47_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_48, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(48, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_48_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_49, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(49, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_49_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_50, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(50, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_50_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_51, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(51, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_51_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_52, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(52, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_52_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_53, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(53, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_53_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_54, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(54, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_54_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_55, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(55, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_55_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_56, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(56, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_56_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_57, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(57, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_57_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_58, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(58, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_58_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_59, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(59, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_59_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_60, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(60, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_60_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_61, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(61, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_61_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_62, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(62, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_62_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_63, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(63, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_63_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_64, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(64, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_64_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_65, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(65, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_65_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_66, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(66, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_66_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_67, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(67, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_67_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_68, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(68, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_68_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_69, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(69, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_69_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_70, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(70, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_70_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_71, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(71, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_71_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_72, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(72, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_72_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_73, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(73, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_73_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_74, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(74, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_74_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_75, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(75, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_75_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_76, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(76, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_76_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_77, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(77, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_77_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_78, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(78, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_78_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_79, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(79, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_79_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_80, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(80, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_80_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_81, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(81, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_81_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_82, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(82, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_82_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_83, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(83, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_83_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_84, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(84, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_84_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_85, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(85, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_85_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_86, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(86, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_86_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_87, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(87, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_87_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_88, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(88, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_88_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_89, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(89, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_89_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_90, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(90, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_90_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_91, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(91, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_91_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_92, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(92, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_92_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_93, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(93, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_93_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_94, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(94, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_94_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_95, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(95, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_95_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_96, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(96, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_96_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_97, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(97, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_97_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_98, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(98, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_98_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_99, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(99, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_99_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_100, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(100, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_100_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_101, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(101, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_101_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_102, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(102, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_102_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_103, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(103, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_103_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_104, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(104, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_104_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_105, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(105, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_105_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_106, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(106, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_106_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_107, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(107, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_107_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_108, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(108, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_108_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_109, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(109, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_109_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_110, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(110, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_110_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_111, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(111, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_111_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_112, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(112, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_112_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_113, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(113, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_113_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_114, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(114, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_114_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_115, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(115, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_115_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_116, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(116, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_116_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_117, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(117, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_117_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_118, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(118, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_118_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_119, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(119, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_119_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_120, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(120, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_120_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_121, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(121, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_121_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_122, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(122, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_122_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_123, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(123, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_123_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_124, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(124, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_124_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_125, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(125, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_125_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_126, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(126, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_126_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_127, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(127, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_127_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_128, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(128, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_128_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_129, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(129, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_129_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_130, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(130, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_130_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_131, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(131, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_131_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_132, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(132, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_132_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_133, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(133, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_133_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_134, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(134, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_134_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_135, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(135, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_135_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_136, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(136, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_136_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_137, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(137, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_137_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_138, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(138, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_138_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_139, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(139, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_139_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_140, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(140, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_140_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_141, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(141, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_141_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_142, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(142, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_142_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_143, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(143, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_143_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_144, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(144, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_144_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_145, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(145, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_145_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_146, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(146, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_146_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_147, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(147, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_147_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_148, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(148, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_148_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_149, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(149, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_149_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_150, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(150, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_150_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_151, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(151, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_151_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_152, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(152, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_152_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_153, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(153, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_153_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_154, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(154, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_154_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_155, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(155, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_155_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_156, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(156, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_156_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_157, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(157, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_157_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_158, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(158, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_158_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_159, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(159, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_159_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_160, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(160, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_160_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_161, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(161, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_161_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_162, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(162, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_162_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_163, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(163, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_163_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_164, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(164, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_164_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_165, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(165, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_165_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_166, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(166, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_166_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_167, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(167, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_167_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_168, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(168, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_168_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_169, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(169, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_169_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_170, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(170, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_170_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_171, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(171, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_171_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_172, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(172, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_172_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_173, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(173, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_173_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_174, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(174, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_174_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_175, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(175, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_175_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_176, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(176, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_176_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_177, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(177, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_177_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_178, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(178, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_178_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_179, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(179, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_179_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_180, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(180, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_180_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_181, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(181, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_181_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_182, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(182, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_182_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_183, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(183, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_183_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_184, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(184, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_184_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_185, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(185, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_185_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_186, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(186, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_186_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_187, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(187, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_187_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_188, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(188, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_188_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_189, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(189, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_189_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_190, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(190, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_190_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_191, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(191, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_191_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_192, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(192, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_192_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_193, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(193, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_193_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_194, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(194, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_194_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_195, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(195, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_195_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_196, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(196, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_196_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_197, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(197, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_197_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_198, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(198, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_198_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_199, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(199, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_199_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_200, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(200, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_200_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_201, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(201, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_201_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_202, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(202, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_202_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_203, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(203, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_203_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_204, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(204, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_204_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_205, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(205, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_205_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_206, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(206, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_206_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_207, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(207, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_207_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_208, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(208, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_208_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_209, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(209, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_209_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_210, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(210, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_210_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_211, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(211, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_211_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_212, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(212, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_212_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_213, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(213, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_213_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_214, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(214, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_214_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_215, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(215, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_215_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_216, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(216, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_216_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_217, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(217, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_217_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_218, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(218, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_218_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_219, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(219, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_219_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_220, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(220, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_220_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_221, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(221, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_221_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_222, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(222, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_222_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_223, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(223, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_223_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_224, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(224, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_224_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_225, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(225, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_225_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_226, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(226, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_226_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_227, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(227, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_227_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_228, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(228, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_228_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_229, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(229, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_229_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_230, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(230, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_230_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_231, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(231, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_231_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_232, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(232, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_232_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_233, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(233, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_233_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_234, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(234, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_234_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_235, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(235, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_235_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_236, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(236, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_236_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_237, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(237, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_237_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_238, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(238, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_238_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_239, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(239, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_239_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_240, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(240, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_240_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_241, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(241, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_241_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_242, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(242, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_242_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_243, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(243, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_243_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_244, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(244, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_244_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_245, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(245, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_245_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_246, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(246, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_246_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_247, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(247, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_247_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_248, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(248, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_248_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_249, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(249, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_249_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_250, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(250, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_250_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_251, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(251, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_251_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_252, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(252, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_252_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_253, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(253, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_253_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_254, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(254, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_254_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_255, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(255, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_255_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_256, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(256, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_256_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_257, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(257, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# +# endif diff --git a/contrib/src/boost/preprocessor/list/detail/edg/fold_right.hpp b/contrib/src/boost/preprocessor/list/detail/edg/fold_right.hpp new file mode 100644 index 0000000..d372d2e --- /dev/null +++ b/contrib/src/boost/preprocessor/list/detail/edg/fold_right.hpp @@ -0,0 +1,794 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_DETAIL_EDG_FOLD_RIGHT_HPP +# define BOOST_PREPROCESSOR_LIST_DETAIL_EDG_FOLD_RIGHT_HPP +# +# include +# include +# include +# +# define BOOST_PP_LIST_FOLD_RIGHT_1(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_1_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_2(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_2_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_3(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_3_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_4(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_4_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_5(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_5_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_6(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_6_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_7(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_7_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_8(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_8_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_9(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_9_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_10(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_10_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_11(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_11_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_12(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_12_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_13(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_13_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_14(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_14_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_15(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_15_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_16(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_16_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_17(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_17_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_18(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_18_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_19(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_19_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_20(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_20_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_21(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_21_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_22(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_22_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_23(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_23_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_24(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_24_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_25(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_25_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_26(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_26_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_27(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_27_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_28(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_28_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_29(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_29_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_30(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_30_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_31(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_31_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_32(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_32_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_33(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_33_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_34(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_34_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_35(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_35_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_36(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_36_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_37(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_37_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_38(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_38_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_39(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_39_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_40(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_40_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_41(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_41_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_42(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_42_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_43(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_43_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_44(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_44_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_45(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_45_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_46(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_46_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_47(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_47_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_48(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_48_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_49(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_49_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_50(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_50_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_51(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_51_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_52(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_52_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_53(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_53_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_54(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_54_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_55(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_55_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_56(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_56_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_57(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_57_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_58(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_58_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_59(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_59_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_60(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_60_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_61(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_61_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_62(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_62_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_63(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_63_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_64(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_64_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_65(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_65_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_66(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_66_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_67(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_67_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_68(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_68_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_69(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_69_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_70(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_70_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_71(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_71_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_72(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_72_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_73(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_73_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_74(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_74_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_75(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_75_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_76(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_76_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_77(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_77_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_78(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_78_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_79(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_79_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_80(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_80_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_81(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_81_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_82(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_82_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_83(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_83_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_84(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_84_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_85(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_85_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_86(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_86_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_87(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_87_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_88(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_88_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_89(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_89_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_90(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_90_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_91(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_91_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_92(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_92_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_93(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_93_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_94(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_94_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_95(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_95_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_96(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_96_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_97(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_97_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_98(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_98_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_99(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_99_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_100(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_100_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_101(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_101_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_102(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_102_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_103(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_103_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_104(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_104_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_105(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_105_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_106(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_106_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_107(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_107_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_108(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_108_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_109(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_109_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_110(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_110_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_111(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_111_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_112(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_112_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_113(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_113_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_114(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_114_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_115(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_115_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_116(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_116_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_117(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_117_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_118(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_118_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_119(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_119_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_120(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_120_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_121(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_121_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_122(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_122_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_123(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_123_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_124(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_124_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_125(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_125_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_126(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_126_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_127(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_127_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_128(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_128_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_129(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_129_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_130(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_130_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_131(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_131_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_132(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_132_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_133(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_133_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_134(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_134_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_135(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_135_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_136(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_136_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_137(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_137_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_138(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_138_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_139(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_139_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_140(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_140_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_141(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_141_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_142(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_142_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_143(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_143_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_144(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_144_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_145(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_145_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_146(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_146_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_147(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_147_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_148(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_148_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_149(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_149_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_150(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_150_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_151(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_151_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_152(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_152_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_153(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_153_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_154(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_154_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_155(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_155_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_156(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_156_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_157(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_157_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_158(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_158_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_159(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_159_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_160(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_160_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_161(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_161_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_162(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_162_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_163(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_163_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_164(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_164_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_165(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_165_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_166(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_166_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_167(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_167_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_168(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_168_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_169(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_169_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_170(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_170_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_171(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_171_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_172(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_172_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_173(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_173_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_174(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_174_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_175(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_175_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_176(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_176_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_177(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_177_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_178(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_178_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_179(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_179_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_180(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_180_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_181(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_181_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_182(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_182_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_183(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_183_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_184(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_184_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_185(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_185_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_186(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_186_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_187(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_187_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_188(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_188_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_189(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_189_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_190(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_190_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_191(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_191_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_192(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_192_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_193(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_193_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_194(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_194_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_195(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_195_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_196(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_196_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_197(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_197_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_198(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_198_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_199(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_199_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_200(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_200_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_201(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_201_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_202(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_202_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_203(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_203_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_204(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_204_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_205(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_205_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_206(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_206_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_207(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_207_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_208(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_208_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_209(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_209_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_210(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_210_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_211(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_211_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_212(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_212_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_213(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_213_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_214(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_214_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_215(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_215_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_216(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_216_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_217(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_217_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_218(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_218_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_219(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_219_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_220(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_220_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_221(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_221_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_222(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_222_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_223(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_223_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_224(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_224_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_225(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_225_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_226(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_226_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_227(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_227_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_228(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_228_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_229(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_229_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_230(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_230_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_231(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_231_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_232(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_232_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_233(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_233_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_234(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_234_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_235(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_235_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_236(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_236_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_237(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_237_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_238(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_238_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_239(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_239_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_240(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_240_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_241(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_241_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_242(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_242_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_243(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_243_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_244(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_244_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_245(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_245_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_246(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_246_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_247(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_247_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_248(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_248_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_249(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_249_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_250(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_250_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_251(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_251_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_252(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_252_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_253(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_253_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_254(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_254_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_255(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_255_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_256(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_256_D(o, s, l) +# +# define BOOST_PP_LIST_FOLD_RIGHT_1_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(2, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_2, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_2_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(3, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_3, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_3_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(4, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_4, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_4_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(5, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_5, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_5_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(6, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_6, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_6_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(7, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_7, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_7_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(8, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_8, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_8_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(9, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_9, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_9_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(10, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_10, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_10_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(11, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_11, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_11_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(12, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_12, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_12_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(13, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_13, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_13_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(14, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_14, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_14_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(15, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_15, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_15_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(16, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_16, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_16_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(17, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_17, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_17_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(18, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_18, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_18_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(19, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_19, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_19_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(20, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_20, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_20_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(21, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_21, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_21_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(22, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_22, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_22_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(23, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_23, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_23_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(24, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_24, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_24_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(25, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_25, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_25_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(26, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_26, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_26_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(27, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_27, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_27_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(28, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_28, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_28_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(29, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_29, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_29_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(30, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_30, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_30_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(31, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_31, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_31_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(32, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_32, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_32_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(33, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_33, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_33_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(34, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_34, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_34_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(35, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_35, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_35_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(36, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_36, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_36_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(37, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_37, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_37_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(38, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_38, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_38_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(39, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_39, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_39_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(40, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_40, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_40_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(41, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_41, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_41_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(42, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_42, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_42_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(43, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_43, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_43_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(44, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_44, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_44_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(45, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_45, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_45_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(46, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_46, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_46_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(47, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_47, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_47_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(48, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_48, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_48_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(49, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_49, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_49_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(50, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_50, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_50_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(51, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_51, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_51_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(52, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_52, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_52_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(53, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_53, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_53_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(54, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_54, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_54_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(55, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_55, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_55_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(56, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_56, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_56_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(57, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_57, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_57_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(58, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_58, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_58_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(59, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_59, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_59_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(60, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_60, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_60_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(61, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_61, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_61_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(62, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_62, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_62_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(63, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_63, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_63_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(64, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_64, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_64_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(65, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_65, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_65_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(66, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_66, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_66_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(67, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_67, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_67_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(68, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_68, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_68_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(69, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_69, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_69_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(70, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_70, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_70_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(71, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_71, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_71_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(72, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_72, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_72_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(73, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_73, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_73_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(74, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_74, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_74_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(75, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_75, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_75_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(76, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_76, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_76_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(77, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_77, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_77_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(78, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_78, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_78_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(79, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_79, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_79_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(80, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_80, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_80_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(81, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_81, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_81_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(82, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_82, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_82_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(83, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_83, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_83_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(84, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_84, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_84_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(85, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_85, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_85_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(86, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_86, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_86_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(87, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_87, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_87_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(88, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_88, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_88_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(89, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_89, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_89_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(90, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_90, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_90_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(91, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_91, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_91_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(92, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_92, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_92_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(93, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_93, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_93_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(94, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_94, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_94_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(95, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_95, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_95_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(96, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_96, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_96_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(97, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_97, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_97_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(98, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_98, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_98_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(99, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_99, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_99_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(100, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_100, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_100_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(101, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_101, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_101_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(102, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_102, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_102_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(103, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_103, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_103_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(104, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_104, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_104_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(105, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_105, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_105_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(106, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_106, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_106_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(107, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_107, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_107_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(108, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_108, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_108_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(109, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_109, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_109_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(110, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_110, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_110_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(111, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_111, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_111_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(112, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_112, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_112_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(113, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_113, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_113_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(114, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_114, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_114_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(115, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_115, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_115_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(116, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_116, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_116_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(117, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_117, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_117_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(118, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_118, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_118_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(119, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_119, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_119_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(120, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_120, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_120_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(121, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_121, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_121_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(122, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_122, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_122_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(123, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_123, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_123_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(124, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_124, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_124_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(125, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_125, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_125_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(126, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_126, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_126_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(127, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_127, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_127_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(128, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_128, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_128_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(129, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_129, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_129_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(130, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_130, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_130_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(131, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_131, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_131_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(132, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_132, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_132_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(133, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_133, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_133_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(134, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_134, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_134_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(135, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_135, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_135_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(136, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_136, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_136_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(137, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_137, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_137_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(138, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_138, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_138_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(139, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_139, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_139_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(140, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_140, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_140_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(141, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_141, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_141_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(142, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_142, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_142_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(143, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_143, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_143_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(144, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_144, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_144_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(145, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_145, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_145_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(146, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_146, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_146_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(147, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_147, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_147_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(148, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_148, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_148_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(149, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_149, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_149_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(150, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_150, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_150_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(151, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_151, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_151_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(152, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_152, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_152_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(153, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_153, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_153_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(154, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_154, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_154_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(155, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_155, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_155_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(156, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_156, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_156_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(157, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_157, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_157_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(158, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_158, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_158_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(159, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_159, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_159_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(160, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_160, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_160_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(161, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_161, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_161_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(162, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_162, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_162_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(163, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_163, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_163_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(164, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_164, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_164_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(165, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_165, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_165_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(166, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_166, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_166_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(167, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_167, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_167_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(168, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_168, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_168_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(169, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_169, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_169_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(170, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_170, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_170_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(171, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_171, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_171_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(172, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_172, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_172_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(173, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_173, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_173_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(174, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_174, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_174_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(175, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_175, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_175_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(176, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_176, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_176_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(177, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_177, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_177_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(178, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_178, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_178_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(179, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_179, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_179_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(180, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_180, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_180_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(181, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_181, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_181_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(182, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_182, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_182_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(183, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_183, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_183_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(184, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_184, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_184_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(185, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_185, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_185_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(186, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_186, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_186_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(187, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_187, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_187_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(188, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_188, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_188_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(189, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_189, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_189_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(190, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_190, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_190_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(191, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_191, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_191_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(192, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_192, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_192_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(193, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_193, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_193_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(194, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_194, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_194_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(195, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_195, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_195_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(196, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_196, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_196_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(197, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_197, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_197_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(198, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_198, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_198_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(199, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_199, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_199_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(200, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_200, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_200_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(201, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_201, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_201_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(202, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_202, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_202_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(203, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_203, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_203_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(204, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_204, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_204_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(205, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_205, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_205_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(206, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_206, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_206_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(207, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_207, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_207_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(208, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_208, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_208_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(209, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_209, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_209_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(210, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_210, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_210_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(211, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_211, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_211_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(212, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_212, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_212_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(213, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_213, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_213_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(214, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_214, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_214_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(215, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_215, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_215_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(216, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_216, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_216_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(217, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_217, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_217_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(218, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_218, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_218_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(219, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_219, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_219_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(220, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_220, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_220_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(221, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_221, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_221_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(222, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_222, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_222_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(223, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_223, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_223_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(224, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_224, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_224_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(225, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_225, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_225_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(226, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_226, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_226_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(227, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_227, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_227_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(228, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_228, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_228_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(229, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_229, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_229_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(230, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_230, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_230_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(231, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_231, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_231_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(232, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_232, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_232_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(233, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_233, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_233_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(234, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_234, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_234_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(235, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_235, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_235_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(236, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_236, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_236_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(237, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_237, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_237_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(238, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_238, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_238_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(239, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_239, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_239_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(240, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_240, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_240_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(241, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_241, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_241_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(242, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_242, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_242_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(243, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_243, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_243_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(244, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_244, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_244_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(245, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_245, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_245_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(246, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_246, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_246_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(247, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_247, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_247_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(248, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_248, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_248_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(249, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_249, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_249_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(250, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_250, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_250_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(251, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_251, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_251_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(252, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_252, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_252_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(253, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_253, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_253_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(254, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_254, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_254_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(255, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_255, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_255_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(256, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_256, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_256_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(257, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_257, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_1(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_2(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_3(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_4(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_5(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_6(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_7(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_8(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_9(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_10(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_11(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_12(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_13(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_14(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_15(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_16(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_17(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_18(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_19(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_20(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_21(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_22(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_23(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_24(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_25(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_26(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_27(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_28(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_29(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_30(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_31(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_32(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_33(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_34(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_35(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_36(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_37(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_38(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_39(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_40(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_41(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_42(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_43(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_44(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_45(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_46(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_47(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_48(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_49(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_50(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_51(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_52(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_53(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_54(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_55(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_56(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_57(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_58(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_59(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_60(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_61(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_62(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_63(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_64(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_65(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_66(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_67(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_68(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_69(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_70(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_71(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_72(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_73(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_74(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_75(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_76(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_77(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_78(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_79(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_80(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_81(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_82(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_83(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_84(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_85(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_86(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_87(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_88(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_89(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_90(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_91(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_92(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_93(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_94(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_95(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_96(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_97(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_98(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_99(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_100(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_101(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_102(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_103(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_104(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_105(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_106(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_107(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_108(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_109(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_110(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_111(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_112(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_113(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_114(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_115(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_116(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_117(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_118(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_119(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_120(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_121(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_122(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_123(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_124(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_125(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_126(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_127(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_128(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_129(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_130(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_131(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_132(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_133(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_134(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_135(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_136(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_137(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_138(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_139(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_140(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_141(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_142(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_143(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_144(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_145(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_146(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_147(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_148(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_149(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_150(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_151(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_152(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_153(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_154(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_155(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_156(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_157(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_158(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_159(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_160(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_161(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_162(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_163(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_164(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_165(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_166(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_167(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_168(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_169(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_170(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_171(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_172(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_173(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_174(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_175(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_176(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_177(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_178(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_179(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_180(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_181(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_182(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_183(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_184(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_185(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_186(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_187(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_188(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_189(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_190(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_191(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_192(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_193(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_194(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_195(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_196(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_197(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_198(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_199(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_200(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_201(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_202(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_203(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_204(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_205(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_206(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_207(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_208(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_209(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_210(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_211(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_212(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_213(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_214(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_215(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_216(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_217(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_218(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_219(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_220(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_221(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_222(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_223(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_224(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_225(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_226(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_227(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_228(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_229(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_230(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_231(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_232(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_233(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_234(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_235(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_236(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_237(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_238(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_239(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_240(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_241(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_242(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_243(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_244(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_245(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_246(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_247(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_248(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_249(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_250(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_251(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_252(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_253(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_254(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_255(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_256(o, s, l) 0 +# +# endif diff --git a/contrib/src/boost/preprocessor/list/detail/fold_left.hpp b/contrib/src/boost/preprocessor/list/detail/fold_left.hpp new file mode 100644 index 0000000..f5fcab7 --- /dev/null +++ b/contrib/src/boost/preprocessor/list/detail/fold_left.hpp @@ -0,0 +1,279 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP +# define BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP +# +# include +# include +# include +# include +# +# define BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_2, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(2, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_3, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(3, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_4, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(4, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_5, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(5, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_6, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(6, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_7, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(7, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_8, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(8, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_9, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(9, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_10, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(10, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_11, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(11, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_12, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(12, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_13, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(13, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_14, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(14, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_15, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(15, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_16, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(16, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_17, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(17, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_18, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(18, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_19, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(19, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_20, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(20, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_21, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(21, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_22, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(22, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_23, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(23, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_24, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(24, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_25, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(25, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_26, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(26, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_27, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(27, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_28, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(28, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_29, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(29, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_30, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(30, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_31, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(31, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_32, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(32, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_33, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(33, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_34, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(34, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_35, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(35, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_36, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(36, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_37, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(37, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_38, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(38, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_39, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(39, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_40, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(40, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_41, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(41, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_42, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(42, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_43, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(43, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_44, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(44, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_45, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(45, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_46, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(46, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_47, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(47, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_48, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(48, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_49, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(49, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_50, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(50, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_51, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(51, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_52, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(52, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_53, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(53, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_54, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(54, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_55, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(55, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_56, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(56, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_57, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(57, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_58, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(58, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_59, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(59, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_60, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(60, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_61, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(61, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_62, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(62, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_63, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(63, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_64, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(64, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_65, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(65, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_66, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(66, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_67, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(67, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_68, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(68, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_69, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(69, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_70, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(70, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_71, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(71, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_72, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(72, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_73, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(73, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_74, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(74, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_75, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(75, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_76, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(76, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_77, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(77, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_78, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(78, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_79, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(79, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_80, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(80, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_81, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(81, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_82, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(82, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_83, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(83, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_84, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(84, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_85, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(85, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_86, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(86, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_87, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(87, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_88, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(88, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_89, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(89, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_90, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(90, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_91, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(91, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_92, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(92, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_93, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(93, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_94, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(94, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_95, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(95, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_96, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(96, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_97, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(97, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_98, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(98, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_99, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(99, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_100, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(100, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_101, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(101, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_102, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(102, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_103, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(103, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_104, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(104, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_105, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(105, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_106, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(106, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_107, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(107, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_108, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(108, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_109, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(109, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_110, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(110, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_111, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(111, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_112, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(112, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_113, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(113, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_114, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(114, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_115, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(115, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_116, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(116, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_117, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(117, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_118, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(118, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_119, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(119, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_120, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(120, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_121, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(121, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_122, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(122, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_123, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(123, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_124, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(124, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_125, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(125, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_126, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(126, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_127, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(127, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_128, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(128, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_129, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(129, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_130, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(130, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_131, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(131, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_132, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(132, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_133, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(133, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_134, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(134, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_135, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(135, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_136, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(136, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_137, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(137, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_138, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(138, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_139, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(139, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_140, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(140, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_141, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(141, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_142, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(142, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_143, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(143, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_144, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(144, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_145, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(145, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_146, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(146, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_147, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(147, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_148, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(148, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_149, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(149, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_150, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(150, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_151, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(151, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_152, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(152, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_153, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(153, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_154, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(154, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_155, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(155, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_156, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(156, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_157, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(157, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_158, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(158, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_159, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(159, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_160, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(160, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_161, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(161, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_162, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(162, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_163, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(163, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_164, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(164, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_165, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(165, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_166, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(166, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_167, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(167, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_168, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(168, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_169, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(169, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_170, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(170, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_171, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(171, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_172, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(172, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_173, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(173, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_174, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(174, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_175, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(175, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_176, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(176, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_177, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(177, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_178, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(178, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_179, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(179, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_180, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(180, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_181, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(181, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_182, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(182, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_183, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(183, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_184, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(184, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_185, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(185, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_186, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(186, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_187, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(187, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_188, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(188, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_189, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(189, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_190, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(190, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_191, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(191, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_192, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(192, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_193, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(193, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_194, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(194, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_195, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(195, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_196, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(196, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_197, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(197, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_198, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(198, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_199, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(199, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_200, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(200, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_201, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(201, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_202, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(202, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_203, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(203, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_204, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(204, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_205, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(205, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_206, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(206, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_207, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(207, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_208, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(208, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_209, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(209, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_210, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(210, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_211, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(211, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_212, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(212, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_213, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(213, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_214, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(214, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_215, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(215, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_216, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(216, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_217, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(217, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_218, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(218, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_219, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(219, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_220, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(220, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_221, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(221, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_222, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(222, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_223, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(223, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_224, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(224, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_225, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(225, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_226, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(226, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_227, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(227, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_228, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(228, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_229, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(229, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_230, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(230, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_231, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(231, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_232, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(232, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_233, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(233, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_234, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(234, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_235, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(235, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_236, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(236, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_237, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(237, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_238, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(238, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_239, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(239, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_240, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(240, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_241, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(241, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_242, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(242, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_243, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(243, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_244, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(244, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_245, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(245, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_246, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(246, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_247, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(247, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_248, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(248, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_249, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(249, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_250, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(250, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_251, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(251, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_252, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(252, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_253, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(253, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_254, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(254, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_255, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(255, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_256, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(256, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_257, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(257, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# +# endif diff --git a/contrib/src/boost/preprocessor/list/detail/fold_right.hpp b/contrib/src/boost/preprocessor/list/detail/fold_right.hpp new file mode 100644 index 0000000..29146d5 --- /dev/null +++ b/contrib/src/boost/preprocessor/list/detail/fold_right.hpp @@ -0,0 +1,277 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_RIGHT_HPP +# define BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_RIGHT_HPP +# +# include +# include +# +# define BOOST_PP_LIST_FOLD_RIGHT_1(o, s, l) BOOST_PP_LIST_FOLD_LEFT_1(o, s, BOOST_PP_LIST_REVERSE_D(1, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_2(o, s, l) BOOST_PP_LIST_FOLD_LEFT_2(o, s, BOOST_PP_LIST_REVERSE_D(2, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_3(o, s, l) BOOST_PP_LIST_FOLD_LEFT_3(o, s, BOOST_PP_LIST_REVERSE_D(3, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_4(o, s, l) BOOST_PP_LIST_FOLD_LEFT_4(o, s, BOOST_PP_LIST_REVERSE_D(4, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_5(o, s, l) BOOST_PP_LIST_FOLD_LEFT_5(o, s, BOOST_PP_LIST_REVERSE_D(5, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_6(o, s, l) BOOST_PP_LIST_FOLD_LEFT_6(o, s, BOOST_PP_LIST_REVERSE_D(6, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_7(o, s, l) BOOST_PP_LIST_FOLD_LEFT_7(o, s, BOOST_PP_LIST_REVERSE_D(7, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_8(o, s, l) BOOST_PP_LIST_FOLD_LEFT_8(o, s, BOOST_PP_LIST_REVERSE_D(8, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_9(o, s, l) BOOST_PP_LIST_FOLD_LEFT_9(o, s, BOOST_PP_LIST_REVERSE_D(9, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_10(o, s, l) BOOST_PP_LIST_FOLD_LEFT_10(o, s, BOOST_PP_LIST_REVERSE_D(10, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_11(o, s, l) BOOST_PP_LIST_FOLD_LEFT_11(o, s, BOOST_PP_LIST_REVERSE_D(11, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_12(o, s, l) BOOST_PP_LIST_FOLD_LEFT_12(o, s, BOOST_PP_LIST_REVERSE_D(12, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_13(o, s, l) BOOST_PP_LIST_FOLD_LEFT_13(o, s, BOOST_PP_LIST_REVERSE_D(13, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_14(o, s, l) BOOST_PP_LIST_FOLD_LEFT_14(o, s, BOOST_PP_LIST_REVERSE_D(14, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_15(o, s, l) BOOST_PP_LIST_FOLD_LEFT_15(o, s, BOOST_PP_LIST_REVERSE_D(15, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_16(o, s, l) BOOST_PP_LIST_FOLD_LEFT_16(o, s, BOOST_PP_LIST_REVERSE_D(16, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_17(o, s, l) BOOST_PP_LIST_FOLD_LEFT_17(o, s, BOOST_PP_LIST_REVERSE_D(17, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_18(o, s, l) BOOST_PP_LIST_FOLD_LEFT_18(o, s, BOOST_PP_LIST_REVERSE_D(18, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_19(o, s, l) BOOST_PP_LIST_FOLD_LEFT_19(o, s, BOOST_PP_LIST_REVERSE_D(19, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_20(o, s, l) BOOST_PP_LIST_FOLD_LEFT_20(o, s, BOOST_PP_LIST_REVERSE_D(20, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_21(o, s, l) BOOST_PP_LIST_FOLD_LEFT_21(o, s, BOOST_PP_LIST_REVERSE_D(21, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_22(o, s, l) BOOST_PP_LIST_FOLD_LEFT_22(o, s, BOOST_PP_LIST_REVERSE_D(22, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_23(o, s, l) BOOST_PP_LIST_FOLD_LEFT_23(o, s, BOOST_PP_LIST_REVERSE_D(23, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_24(o, s, l) BOOST_PP_LIST_FOLD_LEFT_24(o, s, BOOST_PP_LIST_REVERSE_D(24, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_25(o, s, l) BOOST_PP_LIST_FOLD_LEFT_25(o, s, BOOST_PP_LIST_REVERSE_D(25, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_26(o, s, l) BOOST_PP_LIST_FOLD_LEFT_26(o, s, BOOST_PP_LIST_REVERSE_D(26, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_27(o, s, l) BOOST_PP_LIST_FOLD_LEFT_27(o, s, BOOST_PP_LIST_REVERSE_D(27, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_28(o, s, l) BOOST_PP_LIST_FOLD_LEFT_28(o, s, BOOST_PP_LIST_REVERSE_D(28, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_29(o, s, l) BOOST_PP_LIST_FOLD_LEFT_29(o, s, BOOST_PP_LIST_REVERSE_D(29, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_30(o, s, l) BOOST_PP_LIST_FOLD_LEFT_30(o, s, BOOST_PP_LIST_REVERSE_D(30, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_31(o, s, l) BOOST_PP_LIST_FOLD_LEFT_31(o, s, BOOST_PP_LIST_REVERSE_D(31, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_32(o, s, l) BOOST_PP_LIST_FOLD_LEFT_32(o, s, BOOST_PP_LIST_REVERSE_D(32, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_33(o, s, l) BOOST_PP_LIST_FOLD_LEFT_33(o, s, BOOST_PP_LIST_REVERSE_D(33, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_34(o, s, l) BOOST_PP_LIST_FOLD_LEFT_34(o, s, BOOST_PP_LIST_REVERSE_D(34, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_35(o, s, l) BOOST_PP_LIST_FOLD_LEFT_35(o, s, BOOST_PP_LIST_REVERSE_D(35, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_36(o, s, l) BOOST_PP_LIST_FOLD_LEFT_36(o, s, BOOST_PP_LIST_REVERSE_D(36, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_37(o, s, l) BOOST_PP_LIST_FOLD_LEFT_37(o, s, BOOST_PP_LIST_REVERSE_D(37, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_38(o, s, l) BOOST_PP_LIST_FOLD_LEFT_38(o, s, BOOST_PP_LIST_REVERSE_D(38, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_39(o, s, l) BOOST_PP_LIST_FOLD_LEFT_39(o, s, BOOST_PP_LIST_REVERSE_D(39, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_40(o, s, l) BOOST_PP_LIST_FOLD_LEFT_40(o, s, BOOST_PP_LIST_REVERSE_D(40, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_41(o, s, l) BOOST_PP_LIST_FOLD_LEFT_41(o, s, BOOST_PP_LIST_REVERSE_D(41, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_42(o, s, l) BOOST_PP_LIST_FOLD_LEFT_42(o, s, BOOST_PP_LIST_REVERSE_D(42, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_43(o, s, l) BOOST_PP_LIST_FOLD_LEFT_43(o, s, BOOST_PP_LIST_REVERSE_D(43, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_44(o, s, l) BOOST_PP_LIST_FOLD_LEFT_44(o, s, BOOST_PP_LIST_REVERSE_D(44, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_45(o, s, l) BOOST_PP_LIST_FOLD_LEFT_45(o, s, BOOST_PP_LIST_REVERSE_D(45, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_46(o, s, l) BOOST_PP_LIST_FOLD_LEFT_46(o, s, BOOST_PP_LIST_REVERSE_D(46, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_47(o, s, l) BOOST_PP_LIST_FOLD_LEFT_47(o, s, BOOST_PP_LIST_REVERSE_D(47, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_48(o, s, l) BOOST_PP_LIST_FOLD_LEFT_48(o, s, BOOST_PP_LIST_REVERSE_D(48, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_49(o, s, l) BOOST_PP_LIST_FOLD_LEFT_49(o, s, BOOST_PP_LIST_REVERSE_D(49, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_50(o, s, l) BOOST_PP_LIST_FOLD_LEFT_50(o, s, BOOST_PP_LIST_REVERSE_D(50, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_51(o, s, l) BOOST_PP_LIST_FOLD_LEFT_51(o, s, BOOST_PP_LIST_REVERSE_D(51, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_52(o, s, l) BOOST_PP_LIST_FOLD_LEFT_52(o, s, BOOST_PP_LIST_REVERSE_D(52, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_53(o, s, l) BOOST_PP_LIST_FOLD_LEFT_53(o, s, BOOST_PP_LIST_REVERSE_D(53, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_54(o, s, l) BOOST_PP_LIST_FOLD_LEFT_54(o, s, BOOST_PP_LIST_REVERSE_D(54, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_55(o, s, l) BOOST_PP_LIST_FOLD_LEFT_55(o, s, BOOST_PP_LIST_REVERSE_D(55, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_56(o, s, l) BOOST_PP_LIST_FOLD_LEFT_56(o, s, BOOST_PP_LIST_REVERSE_D(56, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_57(o, s, l) BOOST_PP_LIST_FOLD_LEFT_57(o, s, BOOST_PP_LIST_REVERSE_D(57, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_58(o, s, l) BOOST_PP_LIST_FOLD_LEFT_58(o, s, BOOST_PP_LIST_REVERSE_D(58, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_59(o, s, l) BOOST_PP_LIST_FOLD_LEFT_59(o, s, BOOST_PP_LIST_REVERSE_D(59, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_60(o, s, l) BOOST_PP_LIST_FOLD_LEFT_60(o, s, BOOST_PP_LIST_REVERSE_D(60, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_61(o, s, l) BOOST_PP_LIST_FOLD_LEFT_61(o, s, BOOST_PP_LIST_REVERSE_D(61, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_62(o, s, l) BOOST_PP_LIST_FOLD_LEFT_62(o, s, BOOST_PP_LIST_REVERSE_D(62, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_63(o, s, l) BOOST_PP_LIST_FOLD_LEFT_63(o, s, BOOST_PP_LIST_REVERSE_D(63, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_64(o, s, l) BOOST_PP_LIST_FOLD_LEFT_64(o, s, BOOST_PP_LIST_REVERSE_D(64, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_65(o, s, l) BOOST_PP_LIST_FOLD_LEFT_65(o, s, BOOST_PP_LIST_REVERSE_D(65, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_66(o, s, l) BOOST_PP_LIST_FOLD_LEFT_66(o, s, BOOST_PP_LIST_REVERSE_D(66, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_67(o, s, l) BOOST_PP_LIST_FOLD_LEFT_67(o, s, BOOST_PP_LIST_REVERSE_D(67, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_68(o, s, l) BOOST_PP_LIST_FOLD_LEFT_68(o, s, BOOST_PP_LIST_REVERSE_D(68, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_69(o, s, l) BOOST_PP_LIST_FOLD_LEFT_69(o, s, BOOST_PP_LIST_REVERSE_D(69, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_70(o, s, l) BOOST_PP_LIST_FOLD_LEFT_70(o, s, BOOST_PP_LIST_REVERSE_D(70, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_71(o, s, l) BOOST_PP_LIST_FOLD_LEFT_71(o, s, BOOST_PP_LIST_REVERSE_D(71, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_72(o, s, l) BOOST_PP_LIST_FOLD_LEFT_72(o, s, BOOST_PP_LIST_REVERSE_D(72, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_73(o, s, l) BOOST_PP_LIST_FOLD_LEFT_73(o, s, BOOST_PP_LIST_REVERSE_D(73, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_74(o, s, l) BOOST_PP_LIST_FOLD_LEFT_74(o, s, BOOST_PP_LIST_REVERSE_D(74, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_75(o, s, l) BOOST_PP_LIST_FOLD_LEFT_75(o, s, BOOST_PP_LIST_REVERSE_D(75, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_76(o, s, l) BOOST_PP_LIST_FOLD_LEFT_76(o, s, BOOST_PP_LIST_REVERSE_D(76, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_77(o, s, l) BOOST_PP_LIST_FOLD_LEFT_77(o, s, BOOST_PP_LIST_REVERSE_D(77, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_78(o, s, l) BOOST_PP_LIST_FOLD_LEFT_78(o, s, BOOST_PP_LIST_REVERSE_D(78, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_79(o, s, l) BOOST_PP_LIST_FOLD_LEFT_79(o, s, BOOST_PP_LIST_REVERSE_D(79, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_80(o, s, l) BOOST_PP_LIST_FOLD_LEFT_80(o, s, BOOST_PP_LIST_REVERSE_D(80, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_81(o, s, l) BOOST_PP_LIST_FOLD_LEFT_81(o, s, BOOST_PP_LIST_REVERSE_D(81, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_82(o, s, l) BOOST_PP_LIST_FOLD_LEFT_82(o, s, BOOST_PP_LIST_REVERSE_D(82, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_83(o, s, l) BOOST_PP_LIST_FOLD_LEFT_83(o, s, BOOST_PP_LIST_REVERSE_D(83, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_84(o, s, l) BOOST_PP_LIST_FOLD_LEFT_84(o, s, BOOST_PP_LIST_REVERSE_D(84, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_85(o, s, l) BOOST_PP_LIST_FOLD_LEFT_85(o, s, BOOST_PP_LIST_REVERSE_D(85, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_86(o, s, l) BOOST_PP_LIST_FOLD_LEFT_86(o, s, BOOST_PP_LIST_REVERSE_D(86, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_87(o, s, l) BOOST_PP_LIST_FOLD_LEFT_87(o, s, BOOST_PP_LIST_REVERSE_D(87, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_88(o, s, l) BOOST_PP_LIST_FOLD_LEFT_88(o, s, BOOST_PP_LIST_REVERSE_D(88, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_89(o, s, l) BOOST_PP_LIST_FOLD_LEFT_89(o, s, BOOST_PP_LIST_REVERSE_D(89, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_90(o, s, l) BOOST_PP_LIST_FOLD_LEFT_90(o, s, BOOST_PP_LIST_REVERSE_D(90, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_91(o, s, l) BOOST_PP_LIST_FOLD_LEFT_91(o, s, BOOST_PP_LIST_REVERSE_D(91, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_92(o, s, l) BOOST_PP_LIST_FOLD_LEFT_92(o, s, BOOST_PP_LIST_REVERSE_D(92, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_93(o, s, l) BOOST_PP_LIST_FOLD_LEFT_93(o, s, BOOST_PP_LIST_REVERSE_D(93, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_94(o, s, l) BOOST_PP_LIST_FOLD_LEFT_94(o, s, BOOST_PP_LIST_REVERSE_D(94, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_95(o, s, l) BOOST_PP_LIST_FOLD_LEFT_95(o, s, BOOST_PP_LIST_REVERSE_D(95, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_96(o, s, l) BOOST_PP_LIST_FOLD_LEFT_96(o, s, BOOST_PP_LIST_REVERSE_D(96, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_97(o, s, l) BOOST_PP_LIST_FOLD_LEFT_97(o, s, BOOST_PP_LIST_REVERSE_D(97, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_98(o, s, l) BOOST_PP_LIST_FOLD_LEFT_98(o, s, BOOST_PP_LIST_REVERSE_D(98, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_99(o, s, l) BOOST_PP_LIST_FOLD_LEFT_99(o, s, BOOST_PP_LIST_REVERSE_D(99, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_100(o, s, l) BOOST_PP_LIST_FOLD_LEFT_100(o, s, BOOST_PP_LIST_REVERSE_D(100, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_101(o, s, l) BOOST_PP_LIST_FOLD_LEFT_101(o, s, BOOST_PP_LIST_REVERSE_D(101, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_102(o, s, l) BOOST_PP_LIST_FOLD_LEFT_102(o, s, BOOST_PP_LIST_REVERSE_D(102, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_103(o, s, l) BOOST_PP_LIST_FOLD_LEFT_103(o, s, BOOST_PP_LIST_REVERSE_D(103, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_104(o, s, l) BOOST_PP_LIST_FOLD_LEFT_104(o, s, BOOST_PP_LIST_REVERSE_D(104, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_105(o, s, l) BOOST_PP_LIST_FOLD_LEFT_105(o, s, BOOST_PP_LIST_REVERSE_D(105, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_106(o, s, l) BOOST_PP_LIST_FOLD_LEFT_106(o, s, BOOST_PP_LIST_REVERSE_D(106, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_107(o, s, l) BOOST_PP_LIST_FOLD_LEFT_107(o, s, BOOST_PP_LIST_REVERSE_D(107, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_108(o, s, l) BOOST_PP_LIST_FOLD_LEFT_108(o, s, BOOST_PP_LIST_REVERSE_D(108, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_109(o, s, l) BOOST_PP_LIST_FOLD_LEFT_109(o, s, BOOST_PP_LIST_REVERSE_D(109, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_110(o, s, l) BOOST_PP_LIST_FOLD_LEFT_110(o, s, BOOST_PP_LIST_REVERSE_D(110, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_111(o, s, l) BOOST_PP_LIST_FOLD_LEFT_111(o, s, BOOST_PP_LIST_REVERSE_D(111, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_112(o, s, l) BOOST_PP_LIST_FOLD_LEFT_112(o, s, BOOST_PP_LIST_REVERSE_D(112, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_113(o, s, l) BOOST_PP_LIST_FOLD_LEFT_113(o, s, BOOST_PP_LIST_REVERSE_D(113, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_114(o, s, l) BOOST_PP_LIST_FOLD_LEFT_114(o, s, BOOST_PP_LIST_REVERSE_D(114, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_115(o, s, l) BOOST_PP_LIST_FOLD_LEFT_115(o, s, BOOST_PP_LIST_REVERSE_D(115, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_116(o, s, l) BOOST_PP_LIST_FOLD_LEFT_116(o, s, BOOST_PP_LIST_REVERSE_D(116, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_117(o, s, l) BOOST_PP_LIST_FOLD_LEFT_117(o, s, BOOST_PP_LIST_REVERSE_D(117, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_118(o, s, l) BOOST_PP_LIST_FOLD_LEFT_118(o, s, BOOST_PP_LIST_REVERSE_D(118, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_119(o, s, l) BOOST_PP_LIST_FOLD_LEFT_119(o, s, BOOST_PP_LIST_REVERSE_D(119, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_120(o, s, l) BOOST_PP_LIST_FOLD_LEFT_120(o, s, BOOST_PP_LIST_REVERSE_D(120, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_121(o, s, l) BOOST_PP_LIST_FOLD_LEFT_121(o, s, BOOST_PP_LIST_REVERSE_D(121, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_122(o, s, l) BOOST_PP_LIST_FOLD_LEFT_122(o, s, BOOST_PP_LIST_REVERSE_D(122, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_123(o, s, l) BOOST_PP_LIST_FOLD_LEFT_123(o, s, BOOST_PP_LIST_REVERSE_D(123, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_124(o, s, l) BOOST_PP_LIST_FOLD_LEFT_124(o, s, BOOST_PP_LIST_REVERSE_D(124, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_125(o, s, l) BOOST_PP_LIST_FOLD_LEFT_125(o, s, BOOST_PP_LIST_REVERSE_D(125, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_126(o, s, l) BOOST_PP_LIST_FOLD_LEFT_126(o, s, BOOST_PP_LIST_REVERSE_D(126, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_127(o, s, l) BOOST_PP_LIST_FOLD_LEFT_127(o, s, BOOST_PP_LIST_REVERSE_D(127, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_128(o, s, l) BOOST_PP_LIST_FOLD_LEFT_128(o, s, BOOST_PP_LIST_REVERSE_D(128, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_129(o, s, l) BOOST_PP_LIST_FOLD_LEFT_129(o, s, BOOST_PP_LIST_REVERSE_D(129, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_130(o, s, l) BOOST_PP_LIST_FOLD_LEFT_130(o, s, BOOST_PP_LIST_REVERSE_D(130, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_131(o, s, l) BOOST_PP_LIST_FOLD_LEFT_131(o, s, BOOST_PP_LIST_REVERSE_D(131, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_132(o, s, l) BOOST_PP_LIST_FOLD_LEFT_132(o, s, BOOST_PP_LIST_REVERSE_D(132, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_133(o, s, l) BOOST_PP_LIST_FOLD_LEFT_133(o, s, BOOST_PP_LIST_REVERSE_D(133, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_134(o, s, l) BOOST_PP_LIST_FOLD_LEFT_134(o, s, BOOST_PP_LIST_REVERSE_D(134, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_135(o, s, l) BOOST_PP_LIST_FOLD_LEFT_135(o, s, BOOST_PP_LIST_REVERSE_D(135, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_136(o, s, l) BOOST_PP_LIST_FOLD_LEFT_136(o, s, BOOST_PP_LIST_REVERSE_D(136, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_137(o, s, l) BOOST_PP_LIST_FOLD_LEFT_137(o, s, BOOST_PP_LIST_REVERSE_D(137, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_138(o, s, l) BOOST_PP_LIST_FOLD_LEFT_138(o, s, BOOST_PP_LIST_REVERSE_D(138, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_139(o, s, l) BOOST_PP_LIST_FOLD_LEFT_139(o, s, BOOST_PP_LIST_REVERSE_D(139, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_140(o, s, l) BOOST_PP_LIST_FOLD_LEFT_140(o, s, BOOST_PP_LIST_REVERSE_D(140, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_141(o, s, l) BOOST_PP_LIST_FOLD_LEFT_141(o, s, BOOST_PP_LIST_REVERSE_D(141, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_142(o, s, l) BOOST_PP_LIST_FOLD_LEFT_142(o, s, BOOST_PP_LIST_REVERSE_D(142, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_143(o, s, l) BOOST_PP_LIST_FOLD_LEFT_143(o, s, BOOST_PP_LIST_REVERSE_D(143, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_144(o, s, l) BOOST_PP_LIST_FOLD_LEFT_144(o, s, BOOST_PP_LIST_REVERSE_D(144, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_145(o, s, l) BOOST_PP_LIST_FOLD_LEFT_145(o, s, BOOST_PP_LIST_REVERSE_D(145, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_146(o, s, l) BOOST_PP_LIST_FOLD_LEFT_146(o, s, BOOST_PP_LIST_REVERSE_D(146, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_147(o, s, l) BOOST_PP_LIST_FOLD_LEFT_147(o, s, BOOST_PP_LIST_REVERSE_D(147, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_148(o, s, l) BOOST_PP_LIST_FOLD_LEFT_148(o, s, BOOST_PP_LIST_REVERSE_D(148, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_149(o, s, l) BOOST_PP_LIST_FOLD_LEFT_149(o, s, BOOST_PP_LIST_REVERSE_D(149, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_150(o, s, l) BOOST_PP_LIST_FOLD_LEFT_150(o, s, BOOST_PP_LIST_REVERSE_D(150, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_151(o, s, l) BOOST_PP_LIST_FOLD_LEFT_151(o, s, BOOST_PP_LIST_REVERSE_D(151, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_152(o, s, l) BOOST_PP_LIST_FOLD_LEFT_152(o, s, BOOST_PP_LIST_REVERSE_D(152, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_153(o, s, l) BOOST_PP_LIST_FOLD_LEFT_153(o, s, BOOST_PP_LIST_REVERSE_D(153, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_154(o, s, l) BOOST_PP_LIST_FOLD_LEFT_154(o, s, BOOST_PP_LIST_REVERSE_D(154, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_155(o, s, l) BOOST_PP_LIST_FOLD_LEFT_155(o, s, BOOST_PP_LIST_REVERSE_D(155, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_156(o, s, l) BOOST_PP_LIST_FOLD_LEFT_156(o, s, BOOST_PP_LIST_REVERSE_D(156, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_157(o, s, l) BOOST_PP_LIST_FOLD_LEFT_157(o, s, BOOST_PP_LIST_REVERSE_D(157, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_158(o, s, l) BOOST_PP_LIST_FOLD_LEFT_158(o, s, BOOST_PP_LIST_REVERSE_D(158, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_159(o, s, l) BOOST_PP_LIST_FOLD_LEFT_159(o, s, BOOST_PP_LIST_REVERSE_D(159, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_160(o, s, l) BOOST_PP_LIST_FOLD_LEFT_160(o, s, BOOST_PP_LIST_REVERSE_D(160, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_161(o, s, l) BOOST_PP_LIST_FOLD_LEFT_161(o, s, BOOST_PP_LIST_REVERSE_D(161, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_162(o, s, l) BOOST_PP_LIST_FOLD_LEFT_162(o, s, BOOST_PP_LIST_REVERSE_D(162, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_163(o, s, l) BOOST_PP_LIST_FOLD_LEFT_163(o, s, BOOST_PP_LIST_REVERSE_D(163, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_164(o, s, l) BOOST_PP_LIST_FOLD_LEFT_164(o, s, BOOST_PP_LIST_REVERSE_D(164, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_165(o, s, l) BOOST_PP_LIST_FOLD_LEFT_165(o, s, BOOST_PP_LIST_REVERSE_D(165, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_166(o, s, l) BOOST_PP_LIST_FOLD_LEFT_166(o, s, BOOST_PP_LIST_REVERSE_D(166, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_167(o, s, l) BOOST_PP_LIST_FOLD_LEFT_167(o, s, BOOST_PP_LIST_REVERSE_D(167, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_168(o, s, l) BOOST_PP_LIST_FOLD_LEFT_168(o, s, BOOST_PP_LIST_REVERSE_D(168, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_169(o, s, l) BOOST_PP_LIST_FOLD_LEFT_169(o, s, BOOST_PP_LIST_REVERSE_D(169, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_170(o, s, l) BOOST_PP_LIST_FOLD_LEFT_170(o, s, BOOST_PP_LIST_REVERSE_D(170, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_171(o, s, l) BOOST_PP_LIST_FOLD_LEFT_171(o, s, BOOST_PP_LIST_REVERSE_D(171, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_172(o, s, l) BOOST_PP_LIST_FOLD_LEFT_172(o, s, BOOST_PP_LIST_REVERSE_D(172, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_173(o, s, l) BOOST_PP_LIST_FOLD_LEFT_173(o, s, BOOST_PP_LIST_REVERSE_D(173, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_174(o, s, l) BOOST_PP_LIST_FOLD_LEFT_174(o, s, BOOST_PP_LIST_REVERSE_D(174, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_175(o, s, l) BOOST_PP_LIST_FOLD_LEFT_175(o, s, BOOST_PP_LIST_REVERSE_D(175, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_176(o, s, l) BOOST_PP_LIST_FOLD_LEFT_176(o, s, BOOST_PP_LIST_REVERSE_D(176, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_177(o, s, l) BOOST_PP_LIST_FOLD_LEFT_177(o, s, BOOST_PP_LIST_REVERSE_D(177, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_178(o, s, l) BOOST_PP_LIST_FOLD_LEFT_178(o, s, BOOST_PP_LIST_REVERSE_D(178, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_179(o, s, l) BOOST_PP_LIST_FOLD_LEFT_179(o, s, BOOST_PP_LIST_REVERSE_D(179, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_180(o, s, l) BOOST_PP_LIST_FOLD_LEFT_180(o, s, BOOST_PP_LIST_REVERSE_D(180, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_181(o, s, l) BOOST_PP_LIST_FOLD_LEFT_181(o, s, BOOST_PP_LIST_REVERSE_D(181, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_182(o, s, l) BOOST_PP_LIST_FOLD_LEFT_182(o, s, BOOST_PP_LIST_REVERSE_D(182, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_183(o, s, l) BOOST_PP_LIST_FOLD_LEFT_183(o, s, BOOST_PP_LIST_REVERSE_D(183, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_184(o, s, l) BOOST_PP_LIST_FOLD_LEFT_184(o, s, BOOST_PP_LIST_REVERSE_D(184, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_185(o, s, l) BOOST_PP_LIST_FOLD_LEFT_185(o, s, BOOST_PP_LIST_REVERSE_D(185, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_186(o, s, l) BOOST_PP_LIST_FOLD_LEFT_186(o, s, BOOST_PP_LIST_REVERSE_D(186, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_187(o, s, l) BOOST_PP_LIST_FOLD_LEFT_187(o, s, BOOST_PP_LIST_REVERSE_D(187, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_188(o, s, l) BOOST_PP_LIST_FOLD_LEFT_188(o, s, BOOST_PP_LIST_REVERSE_D(188, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_189(o, s, l) BOOST_PP_LIST_FOLD_LEFT_189(o, s, BOOST_PP_LIST_REVERSE_D(189, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_190(o, s, l) BOOST_PP_LIST_FOLD_LEFT_190(o, s, BOOST_PP_LIST_REVERSE_D(190, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_191(o, s, l) BOOST_PP_LIST_FOLD_LEFT_191(o, s, BOOST_PP_LIST_REVERSE_D(191, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_192(o, s, l) BOOST_PP_LIST_FOLD_LEFT_192(o, s, BOOST_PP_LIST_REVERSE_D(192, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_193(o, s, l) BOOST_PP_LIST_FOLD_LEFT_193(o, s, BOOST_PP_LIST_REVERSE_D(193, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_194(o, s, l) BOOST_PP_LIST_FOLD_LEFT_194(o, s, BOOST_PP_LIST_REVERSE_D(194, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_195(o, s, l) BOOST_PP_LIST_FOLD_LEFT_195(o, s, BOOST_PP_LIST_REVERSE_D(195, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_196(o, s, l) BOOST_PP_LIST_FOLD_LEFT_196(o, s, BOOST_PP_LIST_REVERSE_D(196, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_197(o, s, l) BOOST_PP_LIST_FOLD_LEFT_197(o, s, BOOST_PP_LIST_REVERSE_D(197, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_198(o, s, l) BOOST_PP_LIST_FOLD_LEFT_198(o, s, BOOST_PP_LIST_REVERSE_D(198, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_199(o, s, l) BOOST_PP_LIST_FOLD_LEFT_199(o, s, BOOST_PP_LIST_REVERSE_D(199, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_200(o, s, l) BOOST_PP_LIST_FOLD_LEFT_200(o, s, BOOST_PP_LIST_REVERSE_D(200, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_201(o, s, l) BOOST_PP_LIST_FOLD_LEFT_201(o, s, BOOST_PP_LIST_REVERSE_D(201, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_202(o, s, l) BOOST_PP_LIST_FOLD_LEFT_202(o, s, BOOST_PP_LIST_REVERSE_D(202, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_203(o, s, l) BOOST_PP_LIST_FOLD_LEFT_203(o, s, BOOST_PP_LIST_REVERSE_D(203, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_204(o, s, l) BOOST_PP_LIST_FOLD_LEFT_204(o, s, BOOST_PP_LIST_REVERSE_D(204, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_205(o, s, l) BOOST_PP_LIST_FOLD_LEFT_205(o, s, BOOST_PP_LIST_REVERSE_D(205, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_206(o, s, l) BOOST_PP_LIST_FOLD_LEFT_206(o, s, BOOST_PP_LIST_REVERSE_D(206, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_207(o, s, l) BOOST_PP_LIST_FOLD_LEFT_207(o, s, BOOST_PP_LIST_REVERSE_D(207, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_208(o, s, l) BOOST_PP_LIST_FOLD_LEFT_208(o, s, BOOST_PP_LIST_REVERSE_D(208, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_209(o, s, l) BOOST_PP_LIST_FOLD_LEFT_209(o, s, BOOST_PP_LIST_REVERSE_D(209, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_210(o, s, l) BOOST_PP_LIST_FOLD_LEFT_210(o, s, BOOST_PP_LIST_REVERSE_D(210, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_211(o, s, l) BOOST_PP_LIST_FOLD_LEFT_211(o, s, BOOST_PP_LIST_REVERSE_D(211, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_212(o, s, l) BOOST_PP_LIST_FOLD_LEFT_212(o, s, BOOST_PP_LIST_REVERSE_D(212, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_213(o, s, l) BOOST_PP_LIST_FOLD_LEFT_213(o, s, BOOST_PP_LIST_REVERSE_D(213, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_214(o, s, l) BOOST_PP_LIST_FOLD_LEFT_214(o, s, BOOST_PP_LIST_REVERSE_D(214, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_215(o, s, l) BOOST_PP_LIST_FOLD_LEFT_215(o, s, BOOST_PP_LIST_REVERSE_D(215, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_216(o, s, l) BOOST_PP_LIST_FOLD_LEFT_216(o, s, BOOST_PP_LIST_REVERSE_D(216, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_217(o, s, l) BOOST_PP_LIST_FOLD_LEFT_217(o, s, BOOST_PP_LIST_REVERSE_D(217, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_218(o, s, l) BOOST_PP_LIST_FOLD_LEFT_218(o, s, BOOST_PP_LIST_REVERSE_D(218, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_219(o, s, l) BOOST_PP_LIST_FOLD_LEFT_219(o, s, BOOST_PP_LIST_REVERSE_D(219, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_220(o, s, l) BOOST_PP_LIST_FOLD_LEFT_220(o, s, BOOST_PP_LIST_REVERSE_D(220, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_221(o, s, l) BOOST_PP_LIST_FOLD_LEFT_221(o, s, BOOST_PP_LIST_REVERSE_D(221, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_222(o, s, l) BOOST_PP_LIST_FOLD_LEFT_222(o, s, BOOST_PP_LIST_REVERSE_D(222, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_223(o, s, l) BOOST_PP_LIST_FOLD_LEFT_223(o, s, BOOST_PP_LIST_REVERSE_D(223, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_224(o, s, l) BOOST_PP_LIST_FOLD_LEFT_224(o, s, BOOST_PP_LIST_REVERSE_D(224, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_225(o, s, l) BOOST_PP_LIST_FOLD_LEFT_225(o, s, BOOST_PP_LIST_REVERSE_D(225, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_226(o, s, l) BOOST_PP_LIST_FOLD_LEFT_226(o, s, BOOST_PP_LIST_REVERSE_D(226, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_227(o, s, l) BOOST_PP_LIST_FOLD_LEFT_227(o, s, BOOST_PP_LIST_REVERSE_D(227, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_228(o, s, l) BOOST_PP_LIST_FOLD_LEFT_228(o, s, BOOST_PP_LIST_REVERSE_D(228, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_229(o, s, l) BOOST_PP_LIST_FOLD_LEFT_229(o, s, BOOST_PP_LIST_REVERSE_D(229, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_230(o, s, l) BOOST_PP_LIST_FOLD_LEFT_230(o, s, BOOST_PP_LIST_REVERSE_D(230, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_231(o, s, l) BOOST_PP_LIST_FOLD_LEFT_231(o, s, BOOST_PP_LIST_REVERSE_D(231, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_232(o, s, l) BOOST_PP_LIST_FOLD_LEFT_232(o, s, BOOST_PP_LIST_REVERSE_D(232, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_233(o, s, l) BOOST_PP_LIST_FOLD_LEFT_233(o, s, BOOST_PP_LIST_REVERSE_D(233, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_234(o, s, l) BOOST_PP_LIST_FOLD_LEFT_234(o, s, BOOST_PP_LIST_REVERSE_D(234, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_235(o, s, l) BOOST_PP_LIST_FOLD_LEFT_235(o, s, BOOST_PP_LIST_REVERSE_D(235, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_236(o, s, l) BOOST_PP_LIST_FOLD_LEFT_236(o, s, BOOST_PP_LIST_REVERSE_D(236, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_237(o, s, l) BOOST_PP_LIST_FOLD_LEFT_237(o, s, BOOST_PP_LIST_REVERSE_D(237, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_238(o, s, l) BOOST_PP_LIST_FOLD_LEFT_238(o, s, BOOST_PP_LIST_REVERSE_D(238, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_239(o, s, l) BOOST_PP_LIST_FOLD_LEFT_239(o, s, BOOST_PP_LIST_REVERSE_D(239, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_240(o, s, l) BOOST_PP_LIST_FOLD_LEFT_240(o, s, BOOST_PP_LIST_REVERSE_D(240, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_241(o, s, l) BOOST_PP_LIST_FOLD_LEFT_241(o, s, BOOST_PP_LIST_REVERSE_D(241, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_242(o, s, l) BOOST_PP_LIST_FOLD_LEFT_242(o, s, BOOST_PP_LIST_REVERSE_D(242, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_243(o, s, l) BOOST_PP_LIST_FOLD_LEFT_243(o, s, BOOST_PP_LIST_REVERSE_D(243, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_244(o, s, l) BOOST_PP_LIST_FOLD_LEFT_244(o, s, BOOST_PP_LIST_REVERSE_D(244, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_245(o, s, l) BOOST_PP_LIST_FOLD_LEFT_245(o, s, BOOST_PP_LIST_REVERSE_D(245, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_246(o, s, l) BOOST_PP_LIST_FOLD_LEFT_246(o, s, BOOST_PP_LIST_REVERSE_D(246, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_247(o, s, l) BOOST_PP_LIST_FOLD_LEFT_247(o, s, BOOST_PP_LIST_REVERSE_D(247, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_248(o, s, l) BOOST_PP_LIST_FOLD_LEFT_248(o, s, BOOST_PP_LIST_REVERSE_D(248, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_249(o, s, l) BOOST_PP_LIST_FOLD_LEFT_249(o, s, BOOST_PP_LIST_REVERSE_D(249, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_250(o, s, l) BOOST_PP_LIST_FOLD_LEFT_250(o, s, BOOST_PP_LIST_REVERSE_D(250, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_251(o, s, l) BOOST_PP_LIST_FOLD_LEFT_251(o, s, BOOST_PP_LIST_REVERSE_D(251, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_252(o, s, l) BOOST_PP_LIST_FOLD_LEFT_252(o, s, BOOST_PP_LIST_REVERSE_D(252, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_253(o, s, l) BOOST_PP_LIST_FOLD_LEFT_253(o, s, BOOST_PP_LIST_REVERSE_D(253, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_254(o, s, l) BOOST_PP_LIST_FOLD_LEFT_254(o, s, BOOST_PP_LIST_REVERSE_D(254, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_255(o, s, l) BOOST_PP_LIST_FOLD_LEFT_255(o, s, BOOST_PP_LIST_REVERSE_D(255, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_256(o, s, l) BOOST_PP_LIST_FOLD_LEFT_256(o, s, BOOST_PP_LIST_REVERSE_D(256, l)) +# +# endif diff --git a/contrib/src/boost/preprocessor/list/fold_left.hpp b/contrib/src/boost/preprocessor/list/fold_left.hpp new file mode 100644 index 0000000..f235aec --- /dev/null +++ b/contrib/src/boost/preprocessor/list/fold_left.hpp @@ -0,0 +1,303 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_FOLD_LEFT_HPP +# define BOOST_PREPROCESSOR_LIST_FOLD_LEFT_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_LIST_FOLD_LEFT */ +# +# if 0 +# define BOOST_PP_LIST_FOLD_LEFT(op, state, list) +# endif +# +# define BOOST_PP_LIST_FOLD_LEFT BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) +# +# define BOOST_PP_LIST_FOLD_LEFT_257(o, s, l) BOOST_PP_ERROR(0x0004) +# +# define BOOST_PP_LIST_FOLD_LEFT_D(d, o, s, l) BOOST_PP_LIST_FOLD_LEFT_ ## d(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_2ND BOOST_PP_LIST_FOLD_LEFT +# define BOOST_PP_LIST_FOLD_LEFT_2ND_D BOOST_PP_LIST_FOLD_LEFT_D +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# include +# else +# include +# endif +# +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) 0 +# +# endif diff --git a/contrib/src/boost/preprocessor/list/fold_right.hpp b/contrib/src/boost/preprocessor/list/fold_right.hpp new file mode 100644 index 0000000..ce18afe --- /dev/null +++ b/contrib/src/boost/preprocessor/list/fold_right.hpp @@ -0,0 +1,40 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP +# define BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP +# +# include +# include +# include +# include +# +# if 0 +# define BOOST_PP_LIST_FOLD_RIGHT(op, state, list) +# endif +# +# define BOOST_PP_LIST_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) +# +# define BOOST_PP_LIST_FOLD_RIGHT_257(o, s, l) BOOST_PP_ERROR(0x0004) +# +# define BOOST_PP_LIST_FOLD_RIGHT_D(d, o, s, l) BOOST_PP_LIST_FOLD_RIGHT_ ## d(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_2ND BOOST_PP_LIST_FOLD_RIGHT +# define BOOST_PP_LIST_FOLD_RIGHT_2ND_D BOOST_PP_LIST_FOLD_RIGHT_D +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# include +# else +# include +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/list/for_each_i.hpp b/contrib/src/boost/preprocessor/list/for_each_i.hpp new file mode 100644 index 0000000..8f02e2e --- /dev/null +++ b/contrib/src/boost/preprocessor/list/for_each_i.hpp @@ -0,0 +1,65 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_LIST_FOR_EACH_I_HPP +# define BOOST_PREPROCESSOR_LIST_LIST_FOR_EACH_I_HPP +# +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_LIST_FOR_EACH_I */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_LIST_FOR_EACH_I(macro, data, list) BOOST_PP_FOR((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) +# else +# define BOOST_PP_LIST_FOR_EACH_I(macro, data, list) BOOST_PP_LIST_FOR_EACH_I_I(macro, data, list) +# define BOOST_PP_LIST_FOR_EACH_I_I(macro, data, list) BOOST_PP_FOR((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_LIST_FOR_EACH_I_P(r, x) BOOST_PP_LIST_FOR_EACH_I_P_D x +# define BOOST_PP_LIST_FOR_EACH_I_P_D(m, d, l, i) BOOST_PP_LIST_IS_CONS(l) +# else +# define BOOST_PP_LIST_FOR_EACH_I_P(r, x) BOOST_PP_LIST_IS_CONS(BOOST_PP_TUPLE_ELEM(4, 2, x)) +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_LIST_FOR_EACH_I_O(r, x) BOOST_PP_LIST_FOR_EACH_I_O_D x +# define BOOST_PP_LIST_FOR_EACH_I_O_D(m, d, l, i) (m, d, BOOST_PP_LIST_REST(l), BOOST_PP_INC(i)) +# else +# define BOOST_PP_LIST_FOR_EACH_I_O(r, x) (BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_LIST_REST(BOOST_PP_TUPLE_ELEM(4, 2, x)), BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(4, 3, x))) +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_FOR_EACH_I_M(r, x) BOOST_PP_LIST_FOR_EACH_I_M_D(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) +# else +# define BOOST_PP_LIST_FOR_EACH_I_M(r, x) BOOST_PP_LIST_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_REM_4 x) +# define BOOST_PP_LIST_FOR_EACH_I_M_I(r, x_e) BOOST_PP_LIST_FOR_EACH_I_M_D(r, x_e) +# endif +# +# define BOOST_PP_LIST_FOR_EACH_I_M_D(r, m, d, l, i) m(r, d, i, BOOST_PP_LIST_FIRST(l)) +# +# /* BOOST_PP_LIST_FOR_EACH_I_R */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_FOR_EACH_I_R(r, macro, data, list) BOOST_PP_FOR_ ## r((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) +# else +# define BOOST_PP_LIST_FOR_EACH_I_R(r, macro, data, list) BOOST_PP_LIST_FOR_EACH_I_R_I(r, macro, data, list) +# define BOOST_PP_LIST_FOR_EACH_I_R_I(r, macro, data, list) BOOST_PP_FOR_ ## r((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/list/reverse.hpp b/contrib/src/boost/preprocessor/list/reverse.hpp new file mode 100644 index 0000000..651da05 --- /dev/null +++ b/contrib/src/boost/preprocessor/list/reverse.hpp @@ -0,0 +1,40 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_REVERSE_HPP +# define BOOST_PREPROCESSOR_LIST_REVERSE_HPP +# +# include +# include +# +# /* BOOST_PP_LIST_REVERSE */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) +# else +# define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_REVERSE_I(list) +# define BOOST_PP_LIST_REVERSE_I(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) +# endif +# +# define BOOST_PP_LIST_REVERSE_O(d, s, x) (x, s) +# +# /* BOOST_PP_LIST_REVERSE_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) +# else +# define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_REVERSE_D_I(d, list) +# define BOOST_PP_LIST_REVERSE_D_I(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/logical/and.hpp b/contrib/src/boost/preprocessor/logical/and.hpp new file mode 100644 index 0000000..8590365 --- /dev/null +++ b/contrib/src/boost/preprocessor/logical/and.hpp @@ -0,0 +1,30 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_AND_HPP +# define BOOST_PREPROCESSOR_LOGICAL_AND_HPP +# +# include +# include +# include +# +# /* BOOST_PP_AND */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_AND(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) +# else +# define BOOST_PP_AND(p, q) BOOST_PP_AND_I(p, q) +# define BOOST_PP_AND_I(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/logical/bitand.hpp b/contrib/src/boost/preprocessor/logical/bitand.hpp new file mode 100644 index 0000000..74e9527 --- /dev/null +++ b/contrib/src/boost/preprocessor/logical/bitand.hpp @@ -0,0 +1,38 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP +# define BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP +# +# include +# +# /* BOOST_PP_BITAND */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_I(x, y) +# else +# define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_OO((x, y)) +# define BOOST_PP_BITAND_OO(par) BOOST_PP_BITAND_I ## par +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ ## x ## y +# else +# define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ID(BOOST_PP_BITAND_ ## x ## y) +# define BOOST_PP_BITAND_ID(res) res +# endif +# +# define BOOST_PP_BITAND_00 0 +# define BOOST_PP_BITAND_01 0 +# define BOOST_PP_BITAND_10 0 +# define BOOST_PP_BITAND_11 1 +# +# endif diff --git a/contrib/src/boost/preprocessor/logical/bool.hpp b/contrib/src/boost/preprocessor/logical/bool.hpp new file mode 100644 index 0000000..fc01b5b --- /dev/null +++ b/contrib/src/boost/preprocessor/logical/bool.hpp @@ -0,0 +1,288 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP +# define BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP +# +# include +# +# /* BOOST_PP_BOOL */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_BOOL(x) BOOST_PP_BOOL_I(x) +# else +# define BOOST_PP_BOOL(x) BOOST_PP_BOOL_OO((x)) +# define BOOST_PP_BOOL_OO(par) BOOST_PP_BOOL_I ## par +# endif +# +# define BOOST_PP_BOOL_I(x) BOOST_PP_BOOL_ ## x +# +# define BOOST_PP_BOOL_0 0 +# define BOOST_PP_BOOL_1 1 +# define BOOST_PP_BOOL_2 1 +# define BOOST_PP_BOOL_3 1 +# define BOOST_PP_BOOL_4 1 +# define BOOST_PP_BOOL_5 1 +# define BOOST_PP_BOOL_6 1 +# define BOOST_PP_BOOL_7 1 +# define BOOST_PP_BOOL_8 1 +# define BOOST_PP_BOOL_9 1 +# define BOOST_PP_BOOL_10 1 +# define BOOST_PP_BOOL_11 1 +# define BOOST_PP_BOOL_12 1 +# define BOOST_PP_BOOL_13 1 +# define BOOST_PP_BOOL_14 1 +# define BOOST_PP_BOOL_15 1 +# define BOOST_PP_BOOL_16 1 +# define BOOST_PP_BOOL_17 1 +# define BOOST_PP_BOOL_18 1 +# define BOOST_PP_BOOL_19 1 +# define BOOST_PP_BOOL_20 1 +# define BOOST_PP_BOOL_21 1 +# define BOOST_PP_BOOL_22 1 +# define BOOST_PP_BOOL_23 1 +# define BOOST_PP_BOOL_24 1 +# define BOOST_PP_BOOL_25 1 +# define BOOST_PP_BOOL_26 1 +# define BOOST_PP_BOOL_27 1 +# define BOOST_PP_BOOL_28 1 +# define BOOST_PP_BOOL_29 1 +# define BOOST_PP_BOOL_30 1 +# define BOOST_PP_BOOL_31 1 +# define BOOST_PP_BOOL_32 1 +# define BOOST_PP_BOOL_33 1 +# define BOOST_PP_BOOL_34 1 +# define BOOST_PP_BOOL_35 1 +# define BOOST_PP_BOOL_36 1 +# define BOOST_PP_BOOL_37 1 +# define BOOST_PP_BOOL_38 1 +# define BOOST_PP_BOOL_39 1 +# define BOOST_PP_BOOL_40 1 +# define BOOST_PP_BOOL_41 1 +# define BOOST_PP_BOOL_42 1 +# define BOOST_PP_BOOL_43 1 +# define BOOST_PP_BOOL_44 1 +# define BOOST_PP_BOOL_45 1 +# define BOOST_PP_BOOL_46 1 +# define BOOST_PP_BOOL_47 1 +# define BOOST_PP_BOOL_48 1 +# define BOOST_PP_BOOL_49 1 +# define BOOST_PP_BOOL_50 1 +# define BOOST_PP_BOOL_51 1 +# define BOOST_PP_BOOL_52 1 +# define BOOST_PP_BOOL_53 1 +# define BOOST_PP_BOOL_54 1 +# define BOOST_PP_BOOL_55 1 +# define BOOST_PP_BOOL_56 1 +# define BOOST_PP_BOOL_57 1 +# define BOOST_PP_BOOL_58 1 +# define BOOST_PP_BOOL_59 1 +# define BOOST_PP_BOOL_60 1 +# define BOOST_PP_BOOL_61 1 +# define BOOST_PP_BOOL_62 1 +# define BOOST_PP_BOOL_63 1 +# define BOOST_PP_BOOL_64 1 +# define BOOST_PP_BOOL_65 1 +# define BOOST_PP_BOOL_66 1 +# define BOOST_PP_BOOL_67 1 +# define BOOST_PP_BOOL_68 1 +# define BOOST_PP_BOOL_69 1 +# define BOOST_PP_BOOL_70 1 +# define BOOST_PP_BOOL_71 1 +# define BOOST_PP_BOOL_72 1 +# define BOOST_PP_BOOL_73 1 +# define BOOST_PP_BOOL_74 1 +# define BOOST_PP_BOOL_75 1 +# define BOOST_PP_BOOL_76 1 +# define BOOST_PP_BOOL_77 1 +# define BOOST_PP_BOOL_78 1 +# define BOOST_PP_BOOL_79 1 +# define BOOST_PP_BOOL_80 1 +# define BOOST_PP_BOOL_81 1 +# define BOOST_PP_BOOL_82 1 +# define BOOST_PP_BOOL_83 1 +# define BOOST_PP_BOOL_84 1 +# define BOOST_PP_BOOL_85 1 +# define BOOST_PP_BOOL_86 1 +# define BOOST_PP_BOOL_87 1 +# define BOOST_PP_BOOL_88 1 +# define BOOST_PP_BOOL_89 1 +# define BOOST_PP_BOOL_90 1 +# define BOOST_PP_BOOL_91 1 +# define BOOST_PP_BOOL_92 1 +# define BOOST_PP_BOOL_93 1 +# define BOOST_PP_BOOL_94 1 +# define BOOST_PP_BOOL_95 1 +# define BOOST_PP_BOOL_96 1 +# define BOOST_PP_BOOL_97 1 +# define BOOST_PP_BOOL_98 1 +# define BOOST_PP_BOOL_99 1 +# define BOOST_PP_BOOL_100 1 +# define BOOST_PP_BOOL_101 1 +# define BOOST_PP_BOOL_102 1 +# define BOOST_PP_BOOL_103 1 +# define BOOST_PP_BOOL_104 1 +# define BOOST_PP_BOOL_105 1 +# define BOOST_PP_BOOL_106 1 +# define BOOST_PP_BOOL_107 1 +# define BOOST_PP_BOOL_108 1 +# define BOOST_PP_BOOL_109 1 +# define BOOST_PP_BOOL_110 1 +# define BOOST_PP_BOOL_111 1 +# define BOOST_PP_BOOL_112 1 +# define BOOST_PP_BOOL_113 1 +# define BOOST_PP_BOOL_114 1 +# define BOOST_PP_BOOL_115 1 +# define BOOST_PP_BOOL_116 1 +# define BOOST_PP_BOOL_117 1 +# define BOOST_PP_BOOL_118 1 +# define BOOST_PP_BOOL_119 1 +# define BOOST_PP_BOOL_120 1 +# define BOOST_PP_BOOL_121 1 +# define BOOST_PP_BOOL_122 1 +# define BOOST_PP_BOOL_123 1 +# define BOOST_PP_BOOL_124 1 +# define BOOST_PP_BOOL_125 1 +# define BOOST_PP_BOOL_126 1 +# define BOOST_PP_BOOL_127 1 +# define BOOST_PP_BOOL_128 1 +# define BOOST_PP_BOOL_129 1 +# define BOOST_PP_BOOL_130 1 +# define BOOST_PP_BOOL_131 1 +# define BOOST_PP_BOOL_132 1 +# define BOOST_PP_BOOL_133 1 +# define BOOST_PP_BOOL_134 1 +# define BOOST_PP_BOOL_135 1 +# define BOOST_PP_BOOL_136 1 +# define BOOST_PP_BOOL_137 1 +# define BOOST_PP_BOOL_138 1 +# define BOOST_PP_BOOL_139 1 +# define BOOST_PP_BOOL_140 1 +# define BOOST_PP_BOOL_141 1 +# define BOOST_PP_BOOL_142 1 +# define BOOST_PP_BOOL_143 1 +# define BOOST_PP_BOOL_144 1 +# define BOOST_PP_BOOL_145 1 +# define BOOST_PP_BOOL_146 1 +# define BOOST_PP_BOOL_147 1 +# define BOOST_PP_BOOL_148 1 +# define BOOST_PP_BOOL_149 1 +# define BOOST_PP_BOOL_150 1 +# define BOOST_PP_BOOL_151 1 +# define BOOST_PP_BOOL_152 1 +# define BOOST_PP_BOOL_153 1 +# define BOOST_PP_BOOL_154 1 +# define BOOST_PP_BOOL_155 1 +# define BOOST_PP_BOOL_156 1 +# define BOOST_PP_BOOL_157 1 +# define BOOST_PP_BOOL_158 1 +# define BOOST_PP_BOOL_159 1 +# define BOOST_PP_BOOL_160 1 +# define BOOST_PP_BOOL_161 1 +# define BOOST_PP_BOOL_162 1 +# define BOOST_PP_BOOL_163 1 +# define BOOST_PP_BOOL_164 1 +# define BOOST_PP_BOOL_165 1 +# define BOOST_PP_BOOL_166 1 +# define BOOST_PP_BOOL_167 1 +# define BOOST_PP_BOOL_168 1 +# define BOOST_PP_BOOL_169 1 +# define BOOST_PP_BOOL_170 1 +# define BOOST_PP_BOOL_171 1 +# define BOOST_PP_BOOL_172 1 +# define BOOST_PP_BOOL_173 1 +# define BOOST_PP_BOOL_174 1 +# define BOOST_PP_BOOL_175 1 +# define BOOST_PP_BOOL_176 1 +# define BOOST_PP_BOOL_177 1 +# define BOOST_PP_BOOL_178 1 +# define BOOST_PP_BOOL_179 1 +# define BOOST_PP_BOOL_180 1 +# define BOOST_PP_BOOL_181 1 +# define BOOST_PP_BOOL_182 1 +# define BOOST_PP_BOOL_183 1 +# define BOOST_PP_BOOL_184 1 +# define BOOST_PP_BOOL_185 1 +# define BOOST_PP_BOOL_186 1 +# define BOOST_PP_BOOL_187 1 +# define BOOST_PP_BOOL_188 1 +# define BOOST_PP_BOOL_189 1 +# define BOOST_PP_BOOL_190 1 +# define BOOST_PP_BOOL_191 1 +# define BOOST_PP_BOOL_192 1 +# define BOOST_PP_BOOL_193 1 +# define BOOST_PP_BOOL_194 1 +# define BOOST_PP_BOOL_195 1 +# define BOOST_PP_BOOL_196 1 +# define BOOST_PP_BOOL_197 1 +# define BOOST_PP_BOOL_198 1 +# define BOOST_PP_BOOL_199 1 +# define BOOST_PP_BOOL_200 1 +# define BOOST_PP_BOOL_201 1 +# define BOOST_PP_BOOL_202 1 +# define BOOST_PP_BOOL_203 1 +# define BOOST_PP_BOOL_204 1 +# define BOOST_PP_BOOL_205 1 +# define BOOST_PP_BOOL_206 1 +# define BOOST_PP_BOOL_207 1 +# define BOOST_PP_BOOL_208 1 +# define BOOST_PP_BOOL_209 1 +# define BOOST_PP_BOOL_210 1 +# define BOOST_PP_BOOL_211 1 +# define BOOST_PP_BOOL_212 1 +# define BOOST_PP_BOOL_213 1 +# define BOOST_PP_BOOL_214 1 +# define BOOST_PP_BOOL_215 1 +# define BOOST_PP_BOOL_216 1 +# define BOOST_PP_BOOL_217 1 +# define BOOST_PP_BOOL_218 1 +# define BOOST_PP_BOOL_219 1 +# define BOOST_PP_BOOL_220 1 +# define BOOST_PP_BOOL_221 1 +# define BOOST_PP_BOOL_222 1 +# define BOOST_PP_BOOL_223 1 +# define BOOST_PP_BOOL_224 1 +# define BOOST_PP_BOOL_225 1 +# define BOOST_PP_BOOL_226 1 +# define BOOST_PP_BOOL_227 1 +# define BOOST_PP_BOOL_228 1 +# define BOOST_PP_BOOL_229 1 +# define BOOST_PP_BOOL_230 1 +# define BOOST_PP_BOOL_231 1 +# define BOOST_PP_BOOL_232 1 +# define BOOST_PP_BOOL_233 1 +# define BOOST_PP_BOOL_234 1 +# define BOOST_PP_BOOL_235 1 +# define BOOST_PP_BOOL_236 1 +# define BOOST_PP_BOOL_237 1 +# define BOOST_PP_BOOL_238 1 +# define BOOST_PP_BOOL_239 1 +# define BOOST_PP_BOOL_240 1 +# define BOOST_PP_BOOL_241 1 +# define BOOST_PP_BOOL_242 1 +# define BOOST_PP_BOOL_243 1 +# define BOOST_PP_BOOL_244 1 +# define BOOST_PP_BOOL_245 1 +# define BOOST_PP_BOOL_246 1 +# define BOOST_PP_BOOL_247 1 +# define BOOST_PP_BOOL_248 1 +# define BOOST_PP_BOOL_249 1 +# define BOOST_PP_BOOL_250 1 +# define BOOST_PP_BOOL_251 1 +# define BOOST_PP_BOOL_252 1 +# define BOOST_PP_BOOL_253 1 +# define BOOST_PP_BOOL_254 1 +# define BOOST_PP_BOOL_255 1 +# define BOOST_PP_BOOL_256 1 +# +# endif diff --git a/contrib/src/boost/preprocessor/logical/compl.hpp b/contrib/src/boost/preprocessor/logical/compl.hpp new file mode 100644 index 0000000..ad4c7a4 --- /dev/null +++ b/contrib/src/boost/preprocessor/logical/compl.hpp @@ -0,0 +1,36 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_COMPL_HPP +# define BOOST_PREPROCESSOR_LOGICAL_COMPL_HPP +# +# include +# +# /* BOOST_PP_COMPL */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_COMPL(x) BOOST_PP_COMPL_I(x) +# else +# define BOOST_PP_COMPL(x) BOOST_PP_COMPL_OO((x)) +# define BOOST_PP_COMPL_OO(par) BOOST_PP_COMPL_I ## par +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ ## x +# else +# define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ID(BOOST_PP_COMPL_ ## x) +# define BOOST_PP_COMPL_ID(id) id +# endif +# +# define BOOST_PP_COMPL_0 1 +# define BOOST_PP_COMPL_1 0 +# +# endif diff --git a/contrib/src/boost/preprocessor/logical/not.hpp b/contrib/src/boost/preprocessor/logical/not.hpp new file mode 100644 index 0000000..b509d3f --- /dev/null +++ b/contrib/src/boost/preprocessor/logical/not.hpp @@ -0,0 +1,30 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_NOT_HPP +# define BOOST_PREPROCESSOR_LOGICAL_NOT_HPP +# +# include +# include +# include +# +# /* BOOST_PP_NOT */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_NOT(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) +# else +# define BOOST_PP_NOT(x) BOOST_PP_NOT_I(x) +# define BOOST_PP_NOT_I(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/punctuation/comma.hpp b/contrib/src/boost/preprocessor/punctuation/comma.hpp new file mode 100644 index 0000000..38c2e0e --- /dev/null +++ b/contrib/src/boost/preprocessor/punctuation/comma.hpp @@ -0,0 +1,21 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP +# define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP +# +# /* BOOST_PP_COMMA */ +# +# define BOOST_PP_COMMA() , +# +# endif diff --git a/contrib/src/boost/preprocessor/punctuation/comma_if.hpp b/contrib/src/boost/preprocessor/punctuation/comma_if.hpp new file mode 100644 index 0000000..c711f36 --- /dev/null +++ b/contrib/src/boost/preprocessor/punctuation/comma_if.hpp @@ -0,0 +1,31 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP +# define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_COMMA_IF */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_COMMA_IF(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() +# else +# define BOOST_PP_COMMA_IF(cond) BOOST_PP_COMMA_IF_I(cond) +# define BOOST_PP_COMMA_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/punctuation/detail/is_begin_parens.hpp b/contrib/src/boost/preprocessor/punctuation/detail/is_begin_parens.hpp new file mode 100644 index 0000000..c94ccf3 --- /dev/null +++ b/contrib/src/boost/preprocessor/punctuation/detail/is_begin_parens.hpp @@ -0,0 +1,48 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +#ifndef BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP +#define BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP + +#if BOOST_PP_VARIADICS_MSVC + +#include + +#define BOOST_PP_DETAIL_VD_IBP_CAT(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b) +#define BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_II(a ## b) +#define BOOST_PP_DETAIL_VD_IBP_CAT_II(res) res + +#define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \ + BOOST_PP_DETAIL_VD_IBP_CAT(BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__),BOOST_PP_EMPTY()) \ +/**/ + +#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1 1 + +#else + +#define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \ + BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__) \ +/**/ + +#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1 + +#endif /* BOOST_PP_VARIADICS_MSVC */ + +#define BOOST_PP_DETAIL_IBP_SPLIT_0(a, ...) a +#define BOOST_PP_DETAIL_IBP_SPLIT_1(a, ...) __VA_ARGS__ + +#define BOOST_PP_DETAIL_IBP_CAT(a, ...) BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a,__VA_ARGS__) +#define BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__ + +#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_1 1, +#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_BOOST_PP_DETAIL_IBP_IS_VARIADIC_C 0, + +#endif /* BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP */ diff --git a/contrib/src/boost/preprocessor/punctuation/is_begin_parens.hpp b/contrib/src/boost/preprocessor/punctuation/is_begin_parens.hpp new file mode 100644 index 0000000..20b32bc --- /dev/null +++ b/contrib/src/boost/preprocessor/punctuation/is_begin_parens.hpp @@ -0,0 +1,51 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP +# define BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP + +# include + +#if BOOST_PP_VARIADICS + +#include + +#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 + +#define BOOST_PP_IS_BEGIN_PARENS(param) \ + BOOST_PP_DETAIL_IBP_SPLIT \ + ( \ + 0, \ + BOOST_PP_DETAIL_IBP_CAT \ + ( \ + BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \ + BOOST_PP_DETAIL_IBP_IS_VARIADIC_C param \ + ) \ + ) \ +/**/ + +#else + +#define BOOST_PP_IS_BEGIN_PARENS(...) \ + BOOST_PP_DETAIL_IBP_SPLIT \ + ( \ + 0, \ + BOOST_PP_DETAIL_IBP_CAT \ + ( \ + BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \ + BOOST_PP_DETAIL_IBP_IS_VARIADIC_C __VA_ARGS__ \ + ) \ + ) \ +/**/ + +#endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */ +#endif /* BOOST_PP_VARIADICS */ +#endif /* BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP */ diff --git a/contrib/src/boost/preprocessor/repeat.hpp b/contrib/src/boost/preprocessor/repeat.hpp new file mode 100644 index 0000000..7c47ee8 --- /dev/null +++ b/contrib/src/boost/preprocessor/repeat.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPEAT_HPP +# define BOOST_PREPROCESSOR_REPEAT_HPP +# +# include +# +# endif diff --git a/contrib/src/boost/preprocessor/repetition/detail/dmc/for.hpp b/contrib/src/boost/preprocessor/repetition/detail/dmc/for.hpp new file mode 100644 index 0000000..1d907ff --- /dev/null +++ b/contrib/src/boost/preprocessor/repetition/detail/dmc/for.hpp @@ -0,0 +1,536 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP +# define BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP +# +# include +# include +# include +# include +# +# define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_FOR_1_C(BOOST_PP_BOOL(p##(2, s)), s, p, o, m) +# define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_FOR_2_C(BOOST_PP_BOOL(p##(3, s)), s, p, o, m) +# define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_FOR_3_C(BOOST_PP_BOOL(p##(4, s)), s, p, o, m) +# define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_FOR_4_C(BOOST_PP_BOOL(p##(5, s)), s, p, o, m) +# define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_FOR_5_C(BOOST_PP_BOOL(p##(6, s)), s, p, o, m) +# define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_FOR_6_C(BOOST_PP_BOOL(p##(7, s)), s, p, o, m) +# define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_FOR_7_C(BOOST_PP_BOOL(p##(8, s)), s, p, o, m) +# define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_FOR_8_C(BOOST_PP_BOOL(p##(9, s)), s, p, o, m) +# define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_FOR_9_C(BOOST_PP_BOOL(p##(10, s)), s, p, o, m) +# define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_FOR_10_C(BOOST_PP_BOOL(p##(11, s)), s, p, o, m) +# define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_FOR_11_C(BOOST_PP_BOOL(p##(12, s)), s, p, o, m) +# define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_FOR_12_C(BOOST_PP_BOOL(p##(13, s)), s, p, o, m) +# define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_FOR_13_C(BOOST_PP_BOOL(p##(14, s)), s, p, o, m) +# define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_FOR_14_C(BOOST_PP_BOOL(p##(15, s)), s, p, o, m) +# define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_FOR_15_C(BOOST_PP_BOOL(p##(16, s)), s, p, o, m) +# define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_FOR_16_C(BOOST_PP_BOOL(p##(17, s)), s, p, o, m) +# define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_FOR_17_C(BOOST_PP_BOOL(p##(18, s)), s, p, o, m) +# define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_FOR_18_C(BOOST_PP_BOOL(p##(19, s)), s, p, o, m) +# define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_FOR_19_C(BOOST_PP_BOOL(p##(20, s)), s, p, o, m) +# define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_FOR_20_C(BOOST_PP_BOOL(p##(21, s)), s, p, o, m) +# define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_FOR_21_C(BOOST_PP_BOOL(p##(22, s)), s, p, o, m) +# define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_FOR_22_C(BOOST_PP_BOOL(p##(23, s)), s, p, o, m) +# define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_FOR_23_C(BOOST_PP_BOOL(p##(24, s)), s, p, o, m) +# define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_FOR_24_C(BOOST_PP_BOOL(p##(25, s)), s, p, o, m) +# define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_FOR_25_C(BOOST_PP_BOOL(p##(26, s)), s, p, o, m) +# define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_FOR_26_C(BOOST_PP_BOOL(p##(27, s)), s, p, o, m) +# define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_FOR_27_C(BOOST_PP_BOOL(p##(28, s)), s, p, o, m) +# define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_FOR_28_C(BOOST_PP_BOOL(p##(29, s)), s, p, o, m) +# define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_FOR_29_C(BOOST_PP_BOOL(p##(30, s)), s, p, o, m) +# define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_FOR_30_C(BOOST_PP_BOOL(p##(31, s)), s, p, o, m) +# define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_FOR_31_C(BOOST_PP_BOOL(p##(32, s)), s, p, o, m) +# define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_FOR_32_C(BOOST_PP_BOOL(p##(33, s)), s, p, o, m) +# define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_FOR_33_C(BOOST_PP_BOOL(p##(34, s)), s, p, o, m) +# define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_FOR_34_C(BOOST_PP_BOOL(p##(35, s)), s, p, o, m) +# define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_FOR_35_C(BOOST_PP_BOOL(p##(36, s)), s, p, o, m) +# define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_FOR_36_C(BOOST_PP_BOOL(p##(37, s)), s, p, o, m) +# define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_FOR_37_C(BOOST_PP_BOOL(p##(38, s)), s, p, o, m) +# define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_FOR_38_C(BOOST_PP_BOOL(p##(39, s)), s, p, o, m) +# define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_FOR_39_C(BOOST_PP_BOOL(p##(40, s)), s, p, o, m) +# define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_FOR_40_C(BOOST_PP_BOOL(p##(41, s)), s, p, o, m) +# define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_FOR_41_C(BOOST_PP_BOOL(p##(42, s)), s, p, o, m) +# define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_FOR_42_C(BOOST_PP_BOOL(p##(43, s)), s, p, o, m) +# define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_FOR_43_C(BOOST_PP_BOOL(p##(44, s)), s, p, o, m) +# define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_FOR_44_C(BOOST_PP_BOOL(p##(45, s)), s, p, o, m) +# define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_FOR_45_C(BOOST_PP_BOOL(p##(46, s)), s, p, o, m) +# define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_FOR_46_C(BOOST_PP_BOOL(p##(47, s)), s, p, o, m) +# define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_FOR_47_C(BOOST_PP_BOOL(p##(48, s)), s, p, o, m) +# define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_FOR_48_C(BOOST_PP_BOOL(p##(49, s)), s, p, o, m) +# define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_FOR_49_C(BOOST_PP_BOOL(p##(50, s)), s, p, o, m) +# define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_FOR_50_C(BOOST_PP_BOOL(p##(51, s)), s, p, o, m) +# define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_FOR_51_C(BOOST_PP_BOOL(p##(52, s)), s, p, o, m) +# define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_FOR_52_C(BOOST_PP_BOOL(p##(53, s)), s, p, o, m) +# define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_FOR_53_C(BOOST_PP_BOOL(p##(54, s)), s, p, o, m) +# define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_FOR_54_C(BOOST_PP_BOOL(p##(55, s)), s, p, o, m) +# define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_FOR_55_C(BOOST_PP_BOOL(p##(56, s)), s, p, o, m) +# define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_FOR_56_C(BOOST_PP_BOOL(p##(57, s)), s, p, o, m) +# define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_FOR_57_C(BOOST_PP_BOOL(p##(58, s)), s, p, o, m) +# define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_FOR_58_C(BOOST_PP_BOOL(p##(59, s)), s, p, o, m) +# define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_FOR_59_C(BOOST_PP_BOOL(p##(60, s)), s, p, o, m) +# define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_FOR_60_C(BOOST_PP_BOOL(p##(61, s)), s, p, o, m) +# define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_FOR_61_C(BOOST_PP_BOOL(p##(62, s)), s, p, o, m) +# define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_FOR_62_C(BOOST_PP_BOOL(p##(63, s)), s, p, o, m) +# define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_FOR_63_C(BOOST_PP_BOOL(p##(64, s)), s, p, o, m) +# define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_FOR_64_C(BOOST_PP_BOOL(p##(65, s)), s, p, o, m) +# define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_FOR_65_C(BOOST_PP_BOOL(p##(66, s)), s, p, o, m) +# define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_FOR_66_C(BOOST_PP_BOOL(p##(67, s)), s, p, o, m) +# define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_FOR_67_C(BOOST_PP_BOOL(p##(68, s)), s, p, o, m) +# define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_FOR_68_C(BOOST_PP_BOOL(p##(69, s)), s, p, o, m) +# define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_FOR_69_C(BOOST_PP_BOOL(p##(70, s)), s, p, o, m) +# define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_FOR_70_C(BOOST_PP_BOOL(p##(71, s)), s, p, o, m) +# define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_FOR_71_C(BOOST_PP_BOOL(p##(72, s)), s, p, o, m) +# define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_FOR_72_C(BOOST_PP_BOOL(p##(73, s)), s, p, o, m) +# define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_FOR_73_C(BOOST_PP_BOOL(p##(74, s)), s, p, o, m) +# define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_FOR_74_C(BOOST_PP_BOOL(p##(75, s)), s, p, o, m) +# define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_FOR_75_C(BOOST_PP_BOOL(p##(76, s)), s, p, o, m) +# define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_FOR_76_C(BOOST_PP_BOOL(p##(77, s)), s, p, o, m) +# define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_FOR_77_C(BOOST_PP_BOOL(p##(78, s)), s, p, o, m) +# define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_FOR_78_C(BOOST_PP_BOOL(p##(79, s)), s, p, o, m) +# define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_FOR_79_C(BOOST_PP_BOOL(p##(80, s)), s, p, o, m) +# define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_FOR_80_C(BOOST_PP_BOOL(p##(81, s)), s, p, o, m) +# define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_FOR_81_C(BOOST_PP_BOOL(p##(82, s)), s, p, o, m) +# define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_FOR_82_C(BOOST_PP_BOOL(p##(83, s)), s, p, o, m) +# define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_FOR_83_C(BOOST_PP_BOOL(p##(84, s)), s, p, o, m) +# define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_FOR_84_C(BOOST_PP_BOOL(p##(85, s)), s, p, o, m) +# define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_FOR_85_C(BOOST_PP_BOOL(p##(86, s)), s, p, o, m) +# define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_FOR_86_C(BOOST_PP_BOOL(p##(87, s)), s, p, o, m) +# define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_FOR_87_C(BOOST_PP_BOOL(p##(88, s)), s, p, o, m) +# define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_FOR_88_C(BOOST_PP_BOOL(p##(89, s)), s, p, o, m) +# define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_FOR_89_C(BOOST_PP_BOOL(p##(90, s)), s, p, o, m) +# define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_FOR_90_C(BOOST_PP_BOOL(p##(91, s)), s, p, o, m) +# define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_FOR_91_C(BOOST_PP_BOOL(p##(92, s)), s, p, o, m) +# define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_FOR_92_C(BOOST_PP_BOOL(p##(93, s)), s, p, o, m) +# define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_FOR_93_C(BOOST_PP_BOOL(p##(94, s)), s, p, o, m) +# define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_FOR_94_C(BOOST_PP_BOOL(p##(95, s)), s, p, o, m) +# define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_FOR_95_C(BOOST_PP_BOOL(p##(96, s)), s, p, o, m) +# define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_FOR_96_C(BOOST_PP_BOOL(p##(97, s)), s, p, o, m) +# define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_FOR_97_C(BOOST_PP_BOOL(p##(98, s)), s, p, o, m) +# define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_FOR_98_C(BOOST_PP_BOOL(p##(99, s)), s, p, o, m) +# define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_FOR_99_C(BOOST_PP_BOOL(p##(100, s)), s, p, o, m) +# define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_FOR_100_C(BOOST_PP_BOOL(p##(101, s)), s, p, o, m) +# define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_FOR_101_C(BOOST_PP_BOOL(p##(102, s)), s, p, o, m) +# define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_FOR_102_C(BOOST_PP_BOOL(p##(103, s)), s, p, o, m) +# define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_FOR_103_C(BOOST_PP_BOOL(p##(104, s)), s, p, o, m) +# define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_FOR_104_C(BOOST_PP_BOOL(p##(105, s)), s, p, o, m) +# define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_FOR_105_C(BOOST_PP_BOOL(p##(106, s)), s, p, o, m) +# define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_FOR_106_C(BOOST_PP_BOOL(p##(107, s)), s, p, o, m) +# define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_FOR_107_C(BOOST_PP_BOOL(p##(108, s)), s, p, o, m) +# define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_FOR_108_C(BOOST_PP_BOOL(p##(109, s)), s, p, o, m) +# define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_FOR_109_C(BOOST_PP_BOOL(p##(110, s)), s, p, o, m) +# define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_FOR_110_C(BOOST_PP_BOOL(p##(111, s)), s, p, o, m) +# define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_FOR_111_C(BOOST_PP_BOOL(p##(112, s)), s, p, o, m) +# define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_FOR_112_C(BOOST_PP_BOOL(p##(113, s)), s, p, o, m) +# define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_FOR_113_C(BOOST_PP_BOOL(p##(114, s)), s, p, o, m) +# define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_FOR_114_C(BOOST_PP_BOOL(p##(115, s)), s, p, o, m) +# define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_FOR_115_C(BOOST_PP_BOOL(p##(116, s)), s, p, o, m) +# define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_FOR_116_C(BOOST_PP_BOOL(p##(117, s)), s, p, o, m) +# define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_FOR_117_C(BOOST_PP_BOOL(p##(118, s)), s, p, o, m) +# define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_FOR_118_C(BOOST_PP_BOOL(p##(119, s)), s, p, o, m) +# define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_FOR_119_C(BOOST_PP_BOOL(p##(120, s)), s, p, o, m) +# define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_FOR_120_C(BOOST_PP_BOOL(p##(121, s)), s, p, o, m) +# define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_FOR_121_C(BOOST_PP_BOOL(p##(122, s)), s, p, o, m) +# define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_FOR_122_C(BOOST_PP_BOOL(p##(123, s)), s, p, o, m) +# define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_FOR_123_C(BOOST_PP_BOOL(p##(124, s)), s, p, o, m) +# define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_FOR_124_C(BOOST_PP_BOOL(p##(125, s)), s, p, o, m) +# define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_FOR_125_C(BOOST_PP_BOOL(p##(126, s)), s, p, o, m) +# define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_FOR_126_C(BOOST_PP_BOOL(p##(127, s)), s, p, o, m) +# define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_FOR_127_C(BOOST_PP_BOOL(p##(128, s)), s, p, o, m) +# define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_FOR_128_C(BOOST_PP_BOOL(p##(129, s)), s, p, o, m) +# define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_FOR_129_C(BOOST_PP_BOOL(p##(130, s)), s, p, o, m) +# define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_FOR_130_C(BOOST_PP_BOOL(p##(131, s)), s, p, o, m) +# define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_FOR_131_C(BOOST_PP_BOOL(p##(132, s)), s, p, o, m) +# define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_FOR_132_C(BOOST_PP_BOOL(p##(133, s)), s, p, o, m) +# define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_FOR_133_C(BOOST_PP_BOOL(p##(134, s)), s, p, o, m) +# define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_FOR_134_C(BOOST_PP_BOOL(p##(135, s)), s, p, o, m) +# define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_FOR_135_C(BOOST_PP_BOOL(p##(136, s)), s, p, o, m) +# define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_FOR_136_C(BOOST_PP_BOOL(p##(137, s)), s, p, o, m) +# define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_FOR_137_C(BOOST_PP_BOOL(p##(138, s)), s, p, o, m) +# define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_FOR_138_C(BOOST_PP_BOOL(p##(139, s)), s, p, o, m) +# define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_FOR_139_C(BOOST_PP_BOOL(p##(140, s)), s, p, o, m) +# define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_FOR_140_C(BOOST_PP_BOOL(p##(141, s)), s, p, o, m) +# define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_FOR_141_C(BOOST_PP_BOOL(p##(142, s)), s, p, o, m) +# define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_FOR_142_C(BOOST_PP_BOOL(p##(143, s)), s, p, o, m) +# define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_FOR_143_C(BOOST_PP_BOOL(p##(144, s)), s, p, o, m) +# define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_FOR_144_C(BOOST_PP_BOOL(p##(145, s)), s, p, o, m) +# define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_FOR_145_C(BOOST_PP_BOOL(p##(146, s)), s, p, o, m) +# define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_FOR_146_C(BOOST_PP_BOOL(p##(147, s)), s, p, o, m) +# define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_FOR_147_C(BOOST_PP_BOOL(p##(148, s)), s, p, o, m) +# define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_FOR_148_C(BOOST_PP_BOOL(p##(149, s)), s, p, o, m) +# define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_FOR_149_C(BOOST_PP_BOOL(p##(150, s)), s, p, o, m) +# define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_FOR_150_C(BOOST_PP_BOOL(p##(151, s)), s, p, o, m) +# define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_FOR_151_C(BOOST_PP_BOOL(p##(152, s)), s, p, o, m) +# define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_FOR_152_C(BOOST_PP_BOOL(p##(153, s)), s, p, o, m) +# define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_FOR_153_C(BOOST_PP_BOOL(p##(154, s)), s, p, o, m) +# define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_FOR_154_C(BOOST_PP_BOOL(p##(155, s)), s, p, o, m) +# define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_FOR_155_C(BOOST_PP_BOOL(p##(156, s)), s, p, o, m) +# define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_FOR_156_C(BOOST_PP_BOOL(p##(157, s)), s, p, o, m) +# define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_FOR_157_C(BOOST_PP_BOOL(p##(158, s)), s, p, o, m) +# define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_FOR_158_C(BOOST_PP_BOOL(p##(159, s)), s, p, o, m) +# define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_FOR_159_C(BOOST_PP_BOOL(p##(160, s)), s, p, o, m) +# define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_FOR_160_C(BOOST_PP_BOOL(p##(161, s)), s, p, o, m) +# define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_FOR_161_C(BOOST_PP_BOOL(p##(162, s)), s, p, o, m) +# define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_FOR_162_C(BOOST_PP_BOOL(p##(163, s)), s, p, o, m) +# define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_FOR_163_C(BOOST_PP_BOOL(p##(164, s)), s, p, o, m) +# define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_FOR_164_C(BOOST_PP_BOOL(p##(165, s)), s, p, o, m) +# define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_FOR_165_C(BOOST_PP_BOOL(p##(166, s)), s, p, o, m) +# define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_FOR_166_C(BOOST_PP_BOOL(p##(167, s)), s, p, o, m) +# define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_FOR_167_C(BOOST_PP_BOOL(p##(168, s)), s, p, o, m) +# define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_FOR_168_C(BOOST_PP_BOOL(p##(169, s)), s, p, o, m) +# define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_FOR_169_C(BOOST_PP_BOOL(p##(170, s)), s, p, o, m) +# define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_FOR_170_C(BOOST_PP_BOOL(p##(171, s)), s, p, o, m) +# define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_FOR_171_C(BOOST_PP_BOOL(p##(172, s)), s, p, o, m) +# define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_FOR_172_C(BOOST_PP_BOOL(p##(173, s)), s, p, o, m) +# define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_FOR_173_C(BOOST_PP_BOOL(p##(174, s)), s, p, o, m) +# define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_FOR_174_C(BOOST_PP_BOOL(p##(175, s)), s, p, o, m) +# define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_FOR_175_C(BOOST_PP_BOOL(p##(176, s)), s, p, o, m) +# define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_FOR_176_C(BOOST_PP_BOOL(p##(177, s)), s, p, o, m) +# define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_FOR_177_C(BOOST_PP_BOOL(p##(178, s)), s, p, o, m) +# define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_FOR_178_C(BOOST_PP_BOOL(p##(179, s)), s, p, o, m) +# define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_FOR_179_C(BOOST_PP_BOOL(p##(180, s)), s, p, o, m) +# define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_FOR_180_C(BOOST_PP_BOOL(p##(181, s)), s, p, o, m) +# define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_FOR_181_C(BOOST_PP_BOOL(p##(182, s)), s, p, o, m) +# define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_FOR_182_C(BOOST_PP_BOOL(p##(183, s)), s, p, o, m) +# define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_FOR_183_C(BOOST_PP_BOOL(p##(184, s)), s, p, o, m) +# define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_FOR_184_C(BOOST_PP_BOOL(p##(185, s)), s, p, o, m) +# define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_FOR_185_C(BOOST_PP_BOOL(p##(186, s)), s, p, o, m) +# define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_FOR_186_C(BOOST_PP_BOOL(p##(187, s)), s, p, o, m) +# define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_FOR_187_C(BOOST_PP_BOOL(p##(188, s)), s, p, o, m) +# define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_FOR_188_C(BOOST_PP_BOOL(p##(189, s)), s, p, o, m) +# define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_FOR_189_C(BOOST_PP_BOOL(p##(190, s)), s, p, o, m) +# define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_FOR_190_C(BOOST_PP_BOOL(p##(191, s)), s, p, o, m) +# define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_FOR_191_C(BOOST_PP_BOOL(p##(192, s)), s, p, o, m) +# define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_FOR_192_C(BOOST_PP_BOOL(p##(193, s)), s, p, o, m) +# define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_FOR_193_C(BOOST_PP_BOOL(p##(194, s)), s, p, o, m) +# define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_FOR_194_C(BOOST_PP_BOOL(p##(195, s)), s, p, o, m) +# define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_FOR_195_C(BOOST_PP_BOOL(p##(196, s)), s, p, o, m) +# define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_FOR_196_C(BOOST_PP_BOOL(p##(197, s)), s, p, o, m) +# define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_FOR_197_C(BOOST_PP_BOOL(p##(198, s)), s, p, o, m) +# define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_FOR_198_C(BOOST_PP_BOOL(p##(199, s)), s, p, o, m) +# define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_FOR_199_C(BOOST_PP_BOOL(p##(200, s)), s, p, o, m) +# define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_FOR_200_C(BOOST_PP_BOOL(p##(201, s)), s, p, o, m) +# define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_FOR_201_C(BOOST_PP_BOOL(p##(202, s)), s, p, o, m) +# define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_FOR_202_C(BOOST_PP_BOOL(p##(203, s)), s, p, o, m) +# define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_FOR_203_C(BOOST_PP_BOOL(p##(204, s)), s, p, o, m) +# define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_FOR_204_C(BOOST_PP_BOOL(p##(205, s)), s, p, o, m) +# define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_FOR_205_C(BOOST_PP_BOOL(p##(206, s)), s, p, o, m) +# define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_FOR_206_C(BOOST_PP_BOOL(p##(207, s)), s, p, o, m) +# define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_FOR_207_C(BOOST_PP_BOOL(p##(208, s)), s, p, o, m) +# define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_FOR_208_C(BOOST_PP_BOOL(p##(209, s)), s, p, o, m) +# define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_FOR_209_C(BOOST_PP_BOOL(p##(210, s)), s, p, o, m) +# define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_FOR_210_C(BOOST_PP_BOOL(p##(211, s)), s, p, o, m) +# define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_FOR_211_C(BOOST_PP_BOOL(p##(212, s)), s, p, o, m) +# define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_FOR_212_C(BOOST_PP_BOOL(p##(213, s)), s, p, o, m) +# define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_FOR_213_C(BOOST_PP_BOOL(p##(214, s)), s, p, o, m) +# define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_FOR_214_C(BOOST_PP_BOOL(p##(215, s)), s, p, o, m) +# define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_FOR_215_C(BOOST_PP_BOOL(p##(216, s)), s, p, o, m) +# define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_FOR_216_C(BOOST_PP_BOOL(p##(217, s)), s, p, o, m) +# define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_FOR_217_C(BOOST_PP_BOOL(p##(218, s)), s, p, o, m) +# define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_FOR_218_C(BOOST_PP_BOOL(p##(219, s)), s, p, o, m) +# define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_FOR_219_C(BOOST_PP_BOOL(p##(220, s)), s, p, o, m) +# define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_FOR_220_C(BOOST_PP_BOOL(p##(221, s)), s, p, o, m) +# define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_FOR_221_C(BOOST_PP_BOOL(p##(222, s)), s, p, o, m) +# define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_FOR_222_C(BOOST_PP_BOOL(p##(223, s)), s, p, o, m) +# define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_FOR_223_C(BOOST_PP_BOOL(p##(224, s)), s, p, o, m) +# define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_FOR_224_C(BOOST_PP_BOOL(p##(225, s)), s, p, o, m) +# define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_FOR_225_C(BOOST_PP_BOOL(p##(226, s)), s, p, o, m) +# define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_FOR_226_C(BOOST_PP_BOOL(p##(227, s)), s, p, o, m) +# define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_FOR_227_C(BOOST_PP_BOOL(p##(228, s)), s, p, o, m) +# define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_FOR_228_C(BOOST_PP_BOOL(p##(229, s)), s, p, o, m) +# define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_FOR_229_C(BOOST_PP_BOOL(p##(230, s)), s, p, o, m) +# define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_FOR_230_C(BOOST_PP_BOOL(p##(231, s)), s, p, o, m) +# define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_FOR_231_C(BOOST_PP_BOOL(p##(232, s)), s, p, o, m) +# define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_FOR_232_C(BOOST_PP_BOOL(p##(233, s)), s, p, o, m) +# define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_FOR_233_C(BOOST_PP_BOOL(p##(234, s)), s, p, o, m) +# define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_FOR_234_C(BOOST_PP_BOOL(p##(235, s)), s, p, o, m) +# define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_FOR_235_C(BOOST_PP_BOOL(p##(236, s)), s, p, o, m) +# define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_FOR_236_C(BOOST_PP_BOOL(p##(237, s)), s, p, o, m) +# define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_FOR_237_C(BOOST_PP_BOOL(p##(238, s)), s, p, o, m) +# define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_FOR_238_C(BOOST_PP_BOOL(p##(239, s)), s, p, o, m) +# define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_FOR_239_C(BOOST_PP_BOOL(p##(240, s)), s, p, o, m) +# define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_FOR_240_C(BOOST_PP_BOOL(p##(241, s)), s, p, o, m) +# define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_FOR_241_C(BOOST_PP_BOOL(p##(242, s)), s, p, o, m) +# define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_FOR_242_C(BOOST_PP_BOOL(p##(243, s)), s, p, o, m) +# define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_FOR_243_C(BOOST_PP_BOOL(p##(244, s)), s, p, o, m) +# define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_FOR_244_C(BOOST_PP_BOOL(p##(245, s)), s, p, o, m) +# define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_FOR_245_C(BOOST_PP_BOOL(p##(246, s)), s, p, o, m) +# define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_FOR_246_C(BOOST_PP_BOOL(p##(247, s)), s, p, o, m) +# define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_FOR_247_C(BOOST_PP_BOOL(p##(248, s)), s, p, o, m) +# define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_FOR_248_C(BOOST_PP_BOOL(p##(249, s)), s, p, o, m) +# define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_FOR_249_C(BOOST_PP_BOOL(p##(250, s)), s, p, o, m) +# define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_FOR_250_C(BOOST_PP_BOOL(p##(251, s)), s, p, o, m) +# define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_FOR_251_C(BOOST_PP_BOOL(p##(252, s)), s, p, o, m) +# define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_FOR_252_C(BOOST_PP_BOOL(p##(253, s)), s, p, o, m) +# define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_FOR_253_C(BOOST_PP_BOOL(p##(254, s)), s, p, o, m) +# define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_FOR_254_C(BOOST_PP_BOOL(p##(255, s)), s, p, o, m) +# define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_FOR_255_C(BOOST_PP_BOOL(p##(256, s)), s, p, o, m) +# define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_FOR_256_C(BOOST_PP_BOOL(p##(257, s)), s, p, o, m) +# +# define BOOST_PP_FOR_1_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IIF(c, BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(2, s), p, o, m) +# define BOOST_PP_FOR_2_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IIF(c, BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(3, s), p, o, m) +# define BOOST_PP_FOR_3_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IIF(c, BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(4, s), p, o, m) +# define BOOST_PP_FOR_4_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IIF(c, BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(5, s), p, o, m) +# define BOOST_PP_FOR_5_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IIF(c, BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(6, s), p, o, m) +# define BOOST_PP_FOR_6_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IIF(c, BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(7, s), p, o, m) +# define BOOST_PP_FOR_7_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IIF(c, BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(8, s), p, o, m) +# define BOOST_PP_FOR_8_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IIF(c, BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(9, s), p, o, m) +# define BOOST_PP_FOR_9_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IIF(c, BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(10, s), p, o, m) +# define BOOST_PP_FOR_10_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IIF(c, BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(11, s), p, o, m) +# define BOOST_PP_FOR_11_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IIF(c, BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(12, s), p, o, m) +# define BOOST_PP_FOR_12_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IIF(c, BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(13, s), p, o, m) +# define BOOST_PP_FOR_13_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IIF(c, BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(14, s), p, o, m) +# define BOOST_PP_FOR_14_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IIF(c, BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(15, s), p, o, m) +# define BOOST_PP_FOR_15_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IIF(c, BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(16, s), p, o, m) +# define BOOST_PP_FOR_16_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IIF(c, BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(17, s), p, o, m) +# define BOOST_PP_FOR_17_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IIF(c, BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(18, s), p, o, m) +# define BOOST_PP_FOR_18_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IIF(c, BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(19, s), p, o, m) +# define BOOST_PP_FOR_19_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IIF(c, BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(20, s), p, o, m) +# define BOOST_PP_FOR_20_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IIF(c, BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(21, s), p, o, m) +# define BOOST_PP_FOR_21_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IIF(c, BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(22, s), p, o, m) +# define BOOST_PP_FOR_22_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IIF(c, BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(23, s), p, o, m) +# define BOOST_PP_FOR_23_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IIF(c, BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(24, s), p, o, m) +# define BOOST_PP_FOR_24_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IIF(c, BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(25, s), p, o, m) +# define BOOST_PP_FOR_25_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IIF(c, BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(26, s), p, o, m) +# define BOOST_PP_FOR_26_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IIF(c, BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(27, s), p, o, m) +# define BOOST_PP_FOR_27_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IIF(c, BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(28, s), p, o, m) +# define BOOST_PP_FOR_28_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IIF(c, BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(29, s), p, o, m) +# define BOOST_PP_FOR_29_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IIF(c, BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(30, s), p, o, m) +# define BOOST_PP_FOR_30_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IIF(c, BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(31, s), p, o, m) +# define BOOST_PP_FOR_31_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IIF(c, BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(32, s), p, o, m) +# define BOOST_PP_FOR_32_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IIF(c, BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(33, s), p, o, m) +# define BOOST_PP_FOR_33_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IIF(c, BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(34, s), p, o, m) +# define BOOST_PP_FOR_34_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IIF(c, BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(35, s), p, o, m) +# define BOOST_PP_FOR_35_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IIF(c, BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(36, s), p, o, m) +# define BOOST_PP_FOR_36_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IIF(c, BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(37, s), p, o, m) +# define BOOST_PP_FOR_37_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IIF(c, BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(38, s), p, o, m) +# define BOOST_PP_FOR_38_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IIF(c, BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(39, s), p, o, m) +# define BOOST_PP_FOR_39_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IIF(c, BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(40, s), p, o, m) +# define BOOST_PP_FOR_40_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IIF(c, BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(41, s), p, o, m) +# define BOOST_PP_FOR_41_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IIF(c, BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(42, s), p, o, m) +# define BOOST_PP_FOR_42_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IIF(c, BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(43, s), p, o, m) +# define BOOST_PP_FOR_43_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IIF(c, BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(44, s), p, o, m) +# define BOOST_PP_FOR_44_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IIF(c, BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(45, s), p, o, m) +# define BOOST_PP_FOR_45_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IIF(c, BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(46, s), p, o, m) +# define BOOST_PP_FOR_46_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IIF(c, BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(47, s), p, o, m) +# define BOOST_PP_FOR_47_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IIF(c, BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(48, s), p, o, m) +# define BOOST_PP_FOR_48_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IIF(c, BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(49, s), p, o, m) +# define BOOST_PP_FOR_49_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IIF(c, BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(50, s), p, o, m) +# define BOOST_PP_FOR_50_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IIF(c, BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(51, s), p, o, m) +# define BOOST_PP_FOR_51_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IIF(c, BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(52, s), p, o, m) +# define BOOST_PP_FOR_52_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IIF(c, BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(53, s), p, o, m) +# define BOOST_PP_FOR_53_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IIF(c, BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(54, s), p, o, m) +# define BOOST_PP_FOR_54_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IIF(c, BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(55, s), p, o, m) +# define BOOST_PP_FOR_55_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IIF(c, BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(56, s), p, o, m) +# define BOOST_PP_FOR_56_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IIF(c, BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(57, s), p, o, m) +# define BOOST_PP_FOR_57_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IIF(c, BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(58, s), p, o, m) +# define BOOST_PP_FOR_58_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IIF(c, BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(59, s), p, o, m) +# define BOOST_PP_FOR_59_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IIF(c, BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(60, s), p, o, m) +# define BOOST_PP_FOR_60_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IIF(c, BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(61, s), p, o, m) +# define BOOST_PP_FOR_61_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IIF(c, BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(62, s), p, o, m) +# define BOOST_PP_FOR_62_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IIF(c, BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(63, s), p, o, m) +# define BOOST_PP_FOR_63_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IIF(c, BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(64, s), p, o, m) +# define BOOST_PP_FOR_64_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IIF(c, BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(65, s), p, o, m) +# define BOOST_PP_FOR_65_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IIF(c, BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(66, s), p, o, m) +# define BOOST_PP_FOR_66_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IIF(c, BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(67, s), p, o, m) +# define BOOST_PP_FOR_67_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IIF(c, BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(68, s), p, o, m) +# define BOOST_PP_FOR_68_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IIF(c, BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(69, s), p, o, m) +# define BOOST_PP_FOR_69_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IIF(c, BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(70, s), p, o, m) +# define BOOST_PP_FOR_70_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IIF(c, BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(71, s), p, o, m) +# define BOOST_PP_FOR_71_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IIF(c, BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(72, s), p, o, m) +# define BOOST_PP_FOR_72_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IIF(c, BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(73, s), p, o, m) +# define BOOST_PP_FOR_73_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IIF(c, BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(74, s), p, o, m) +# define BOOST_PP_FOR_74_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IIF(c, BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(75, s), p, o, m) +# define BOOST_PP_FOR_75_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IIF(c, BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(76, s), p, o, m) +# define BOOST_PP_FOR_76_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IIF(c, BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(77, s), p, o, m) +# define BOOST_PP_FOR_77_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IIF(c, BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(78, s), p, o, m) +# define BOOST_PP_FOR_78_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IIF(c, BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(79, s), p, o, m) +# define BOOST_PP_FOR_79_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IIF(c, BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(80, s), p, o, m) +# define BOOST_PP_FOR_80_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IIF(c, BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(81, s), p, o, m) +# define BOOST_PP_FOR_81_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IIF(c, BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(82, s), p, o, m) +# define BOOST_PP_FOR_82_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IIF(c, BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(83, s), p, o, m) +# define BOOST_PP_FOR_83_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IIF(c, BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(84, s), p, o, m) +# define BOOST_PP_FOR_84_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IIF(c, BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(85, s), p, o, m) +# define BOOST_PP_FOR_85_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IIF(c, BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(86, s), p, o, m) +# define BOOST_PP_FOR_86_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IIF(c, BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(87, s), p, o, m) +# define BOOST_PP_FOR_87_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IIF(c, BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(88, s), p, o, m) +# define BOOST_PP_FOR_88_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IIF(c, BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(89, s), p, o, m) +# define BOOST_PP_FOR_89_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IIF(c, BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(90, s), p, o, m) +# define BOOST_PP_FOR_90_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IIF(c, BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(91, s), p, o, m) +# define BOOST_PP_FOR_91_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IIF(c, BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(92, s), p, o, m) +# define BOOST_PP_FOR_92_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IIF(c, BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(93, s), p, o, m) +# define BOOST_PP_FOR_93_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IIF(c, BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(94, s), p, o, m) +# define BOOST_PP_FOR_94_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IIF(c, BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(95, s), p, o, m) +# define BOOST_PP_FOR_95_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IIF(c, BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(96, s), p, o, m) +# define BOOST_PP_FOR_96_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IIF(c, BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(97, s), p, o, m) +# define BOOST_PP_FOR_97_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IIF(c, BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(98, s), p, o, m) +# define BOOST_PP_FOR_98_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IIF(c, BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(99, s), p, o, m) +# define BOOST_PP_FOR_99_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IIF(c, BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(100, s), p, o, m) +# define BOOST_PP_FOR_100_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IIF(c, BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(101, s), p, o, m) +# define BOOST_PP_FOR_101_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IIF(c, BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(102, s), p, o, m) +# define BOOST_PP_FOR_102_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IIF(c, BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(103, s), p, o, m) +# define BOOST_PP_FOR_103_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IIF(c, BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(104, s), p, o, m) +# define BOOST_PP_FOR_104_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IIF(c, BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(105, s), p, o, m) +# define BOOST_PP_FOR_105_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IIF(c, BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(106, s), p, o, m) +# define BOOST_PP_FOR_106_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IIF(c, BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(107, s), p, o, m) +# define BOOST_PP_FOR_107_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IIF(c, BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(108, s), p, o, m) +# define BOOST_PP_FOR_108_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IIF(c, BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(109, s), p, o, m) +# define BOOST_PP_FOR_109_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IIF(c, BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(110, s), p, o, m) +# define BOOST_PP_FOR_110_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IIF(c, BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(111, s), p, o, m) +# define BOOST_PP_FOR_111_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IIF(c, BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(112, s), p, o, m) +# define BOOST_PP_FOR_112_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IIF(c, BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(113, s), p, o, m) +# define BOOST_PP_FOR_113_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IIF(c, BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(114, s), p, o, m) +# define BOOST_PP_FOR_114_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IIF(c, BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(115, s), p, o, m) +# define BOOST_PP_FOR_115_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IIF(c, BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(116, s), p, o, m) +# define BOOST_PP_FOR_116_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IIF(c, BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(117, s), p, o, m) +# define BOOST_PP_FOR_117_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IIF(c, BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(118, s), p, o, m) +# define BOOST_PP_FOR_118_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IIF(c, BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(119, s), p, o, m) +# define BOOST_PP_FOR_119_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IIF(c, BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(120, s), p, o, m) +# define BOOST_PP_FOR_120_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IIF(c, BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(121, s), p, o, m) +# define BOOST_PP_FOR_121_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IIF(c, BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(122, s), p, o, m) +# define BOOST_PP_FOR_122_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IIF(c, BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(123, s), p, o, m) +# define BOOST_PP_FOR_123_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IIF(c, BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(124, s), p, o, m) +# define BOOST_PP_FOR_124_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IIF(c, BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(125, s), p, o, m) +# define BOOST_PP_FOR_125_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IIF(c, BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(126, s), p, o, m) +# define BOOST_PP_FOR_126_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IIF(c, BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(127, s), p, o, m) +# define BOOST_PP_FOR_127_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IIF(c, BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(128, s), p, o, m) +# define BOOST_PP_FOR_128_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IIF(c, BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(129, s), p, o, m) +# define BOOST_PP_FOR_129_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IIF(c, BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(130, s), p, o, m) +# define BOOST_PP_FOR_130_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IIF(c, BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(131, s), p, o, m) +# define BOOST_PP_FOR_131_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IIF(c, BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(132, s), p, o, m) +# define BOOST_PP_FOR_132_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IIF(c, BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(133, s), p, o, m) +# define BOOST_PP_FOR_133_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IIF(c, BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(134, s), p, o, m) +# define BOOST_PP_FOR_134_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IIF(c, BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(135, s), p, o, m) +# define BOOST_PP_FOR_135_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IIF(c, BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(136, s), p, o, m) +# define BOOST_PP_FOR_136_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IIF(c, BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(137, s), p, o, m) +# define BOOST_PP_FOR_137_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IIF(c, BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(138, s), p, o, m) +# define BOOST_PP_FOR_138_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IIF(c, BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(139, s), p, o, m) +# define BOOST_PP_FOR_139_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IIF(c, BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(140, s), p, o, m) +# define BOOST_PP_FOR_140_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IIF(c, BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(141, s), p, o, m) +# define BOOST_PP_FOR_141_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IIF(c, BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(142, s), p, o, m) +# define BOOST_PP_FOR_142_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IIF(c, BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(143, s), p, o, m) +# define BOOST_PP_FOR_143_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IIF(c, BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(144, s), p, o, m) +# define BOOST_PP_FOR_144_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IIF(c, BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(145, s), p, o, m) +# define BOOST_PP_FOR_145_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IIF(c, BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(146, s), p, o, m) +# define BOOST_PP_FOR_146_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IIF(c, BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(147, s), p, o, m) +# define BOOST_PP_FOR_147_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IIF(c, BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(148, s), p, o, m) +# define BOOST_PP_FOR_148_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IIF(c, BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(149, s), p, o, m) +# define BOOST_PP_FOR_149_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IIF(c, BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(150, s), p, o, m) +# define BOOST_PP_FOR_150_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IIF(c, BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(151, s), p, o, m) +# define BOOST_PP_FOR_151_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IIF(c, BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(152, s), p, o, m) +# define BOOST_PP_FOR_152_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IIF(c, BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(153, s), p, o, m) +# define BOOST_PP_FOR_153_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IIF(c, BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(154, s), p, o, m) +# define BOOST_PP_FOR_154_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IIF(c, BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(155, s), p, o, m) +# define BOOST_PP_FOR_155_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IIF(c, BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(156, s), p, o, m) +# define BOOST_PP_FOR_156_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IIF(c, BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(157, s), p, o, m) +# define BOOST_PP_FOR_157_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IIF(c, BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(158, s), p, o, m) +# define BOOST_PP_FOR_158_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IIF(c, BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(159, s), p, o, m) +# define BOOST_PP_FOR_159_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IIF(c, BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(160, s), p, o, m) +# define BOOST_PP_FOR_160_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IIF(c, BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(161, s), p, o, m) +# define BOOST_PP_FOR_161_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IIF(c, BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(162, s), p, o, m) +# define BOOST_PP_FOR_162_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IIF(c, BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(163, s), p, o, m) +# define BOOST_PP_FOR_163_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IIF(c, BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(164, s), p, o, m) +# define BOOST_PP_FOR_164_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IIF(c, BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(165, s), p, o, m) +# define BOOST_PP_FOR_165_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IIF(c, BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(166, s), p, o, m) +# define BOOST_PP_FOR_166_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IIF(c, BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(167, s), p, o, m) +# define BOOST_PP_FOR_167_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IIF(c, BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(168, s), p, o, m) +# define BOOST_PP_FOR_168_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IIF(c, BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(169, s), p, o, m) +# define BOOST_PP_FOR_169_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IIF(c, BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(170, s), p, o, m) +# define BOOST_PP_FOR_170_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IIF(c, BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(171, s), p, o, m) +# define BOOST_PP_FOR_171_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IIF(c, BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(172, s), p, o, m) +# define BOOST_PP_FOR_172_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IIF(c, BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(173, s), p, o, m) +# define BOOST_PP_FOR_173_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IIF(c, BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(174, s), p, o, m) +# define BOOST_PP_FOR_174_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IIF(c, BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(175, s), p, o, m) +# define BOOST_PP_FOR_175_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IIF(c, BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(176, s), p, o, m) +# define BOOST_PP_FOR_176_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IIF(c, BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(177, s), p, o, m) +# define BOOST_PP_FOR_177_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IIF(c, BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(178, s), p, o, m) +# define BOOST_PP_FOR_178_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IIF(c, BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(179, s), p, o, m) +# define BOOST_PP_FOR_179_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IIF(c, BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(180, s), p, o, m) +# define BOOST_PP_FOR_180_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IIF(c, BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(181, s), p, o, m) +# define BOOST_PP_FOR_181_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IIF(c, BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(182, s), p, o, m) +# define BOOST_PP_FOR_182_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IIF(c, BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(183, s), p, o, m) +# define BOOST_PP_FOR_183_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IIF(c, BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(184, s), p, o, m) +# define BOOST_PP_FOR_184_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IIF(c, BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(185, s), p, o, m) +# define BOOST_PP_FOR_185_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IIF(c, BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(186, s), p, o, m) +# define BOOST_PP_FOR_186_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IIF(c, BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(187, s), p, o, m) +# define BOOST_PP_FOR_187_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IIF(c, BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(188, s), p, o, m) +# define BOOST_PP_FOR_188_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IIF(c, BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(189, s), p, o, m) +# define BOOST_PP_FOR_189_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IIF(c, BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(190, s), p, o, m) +# define BOOST_PP_FOR_190_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IIF(c, BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(191, s), p, o, m) +# define BOOST_PP_FOR_191_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IIF(c, BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(192, s), p, o, m) +# define BOOST_PP_FOR_192_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IIF(c, BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(193, s), p, o, m) +# define BOOST_PP_FOR_193_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IIF(c, BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(194, s), p, o, m) +# define BOOST_PP_FOR_194_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IIF(c, BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(195, s), p, o, m) +# define BOOST_PP_FOR_195_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IIF(c, BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(196, s), p, o, m) +# define BOOST_PP_FOR_196_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IIF(c, BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(197, s), p, o, m) +# define BOOST_PP_FOR_197_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IIF(c, BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(198, s), p, o, m) +# define BOOST_PP_FOR_198_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IIF(c, BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(199, s), p, o, m) +# define BOOST_PP_FOR_199_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IIF(c, BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(200, s), p, o, m) +# define BOOST_PP_FOR_200_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IIF(c, BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(201, s), p, o, m) +# define BOOST_PP_FOR_201_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IIF(c, BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(202, s), p, o, m) +# define BOOST_PP_FOR_202_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IIF(c, BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(203, s), p, o, m) +# define BOOST_PP_FOR_203_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IIF(c, BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(204, s), p, o, m) +# define BOOST_PP_FOR_204_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IIF(c, BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(205, s), p, o, m) +# define BOOST_PP_FOR_205_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IIF(c, BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(206, s), p, o, m) +# define BOOST_PP_FOR_206_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IIF(c, BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(207, s), p, o, m) +# define BOOST_PP_FOR_207_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IIF(c, BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(208, s), p, o, m) +# define BOOST_PP_FOR_208_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IIF(c, BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(209, s), p, o, m) +# define BOOST_PP_FOR_209_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IIF(c, BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(210, s), p, o, m) +# define BOOST_PP_FOR_210_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IIF(c, BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(211, s), p, o, m) +# define BOOST_PP_FOR_211_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IIF(c, BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(212, s), p, o, m) +# define BOOST_PP_FOR_212_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IIF(c, BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(213, s), p, o, m) +# define BOOST_PP_FOR_213_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IIF(c, BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(214, s), p, o, m) +# define BOOST_PP_FOR_214_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IIF(c, BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(215, s), p, o, m) +# define BOOST_PP_FOR_215_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IIF(c, BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(216, s), p, o, m) +# define BOOST_PP_FOR_216_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IIF(c, BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(217, s), p, o, m) +# define BOOST_PP_FOR_217_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IIF(c, BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(218, s), p, o, m) +# define BOOST_PP_FOR_218_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IIF(c, BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(219, s), p, o, m) +# define BOOST_PP_FOR_219_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IIF(c, BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(220, s), p, o, m) +# define BOOST_PP_FOR_220_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IIF(c, BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(221, s), p, o, m) +# define BOOST_PP_FOR_221_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IIF(c, BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(222, s), p, o, m) +# define BOOST_PP_FOR_222_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IIF(c, BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(223, s), p, o, m) +# define BOOST_PP_FOR_223_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IIF(c, BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(224, s), p, o, m) +# define BOOST_PP_FOR_224_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IIF(c, BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(225, s), p, o, m) +# define BOOST_PP_FOR_225_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IIF(c, BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(226, s), p, o, m) +# define BOOST_PP_FOR_226_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IIF(c, BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(227, s), p, o, m) +# define BOOST_PP_FOR_227_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IIF(c, BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(228, s), p, o, m) +# define BOOST_PP_FOR_228_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IIF(c, BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(229, s), p, o, m) +# define BOOST_PP_FOR_229_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IIF(c, BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(230, s), p, o, m) +# define BOOST_PP_FOR_230_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IIF(c, BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(231, s), p, o, m) +# define BOOST_PP_FOR_231_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IIF(c, BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(232, s), p, o, m) +# define BOOST_PP_FOR_232_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IIF(c, BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(233, s), p, o, m) +# define BOOST_PP_FOR_233_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IIF(c, BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(234, s), p, o, m) +# define BOOST_PP_FOR_234_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IIF(c, BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(235, s), p, o, m) +# define BOOST_PP_FOR_235_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IIF(c, BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(236, s), p, o, m) +# define BOOST_PP_FOR_236_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IIF(c, BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(237, s), p, o, m) +# define BOOST_PP_FOR_237_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IIF(c, BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(238, s), p, o, m) +# define BOOST_PP_FOR_238_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IIF(c, BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(239, s), p, o, m) +# define BOOST_PP_FOR_239_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IIF(c, BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(240, s), p, o, m) +# define BOOST_PP_FOR_240_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IIF(c, BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(241, s), p, o, m) +# define BOOST_PP_FOR_241_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IIF(c, BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(242, s), p, o, m) +# define BOOST_PP_FOR_242_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IIF(c, BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(243, s), p, o, m) +# define BOOST_PP_FOR_243_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IIF(c, BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(244, s), p, o, m) +# define BOOST_PP_FOR_244_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IIF(c, BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(245, s), p, o, m) +# define BOOST_PP_FOR_245_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IIF(c, BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(246, s), p, o, m) +# define BOOST_PP_FOR_246_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IIF(c, BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(247, s), p, o, m) +# define BOOST_PP_FOR_247_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IIF(c, BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(248, s), p, o, m) +# define BOOST_PP_FOR_248_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IIF(c, BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(249, s), p, o, m) +# define BOOST_PP_FOR_249_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IIF(c, BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(250, s), p, o, m) +# define BOOST_PP_FOR_250_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IIF(c, BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(251, s), p, o, m) +# define BOOST_PP_FOR_251_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IIF(c, BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(252, s), p, o, m) +# define BOOST_PP_FOR_252_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IIF(c, BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(253, s), p, o, m) +# define BOOST_PP_FOR_253_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IIF(c, BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(254, s), p, o, m) +# define BOOST_PP_FOR_254_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IIF(c, BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(255, s), p, o, m) +# define BOOST_PP_FOR_255_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IIF(c, BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(256, s), p, o, m) +# define BOOST_PP_FOR_256_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IIF(c, BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(257, s), p, o, m) +# +# endif diff --git a/contrib/src/boost/preprocessor/repetition/detail/edg/for.hpp b/contrib/src/boost/preprocessor/repetition/detail/edg/for.hpp new file mode 100644 index 0000000..212921a --- /dev/null +++ b/contrib/src/boost/preprocessor/repetition/detail/edg/for.hpp @@ -0,0 +1,534 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_EDG_FOR_HPP +# define BOOST_PREPROCESSOR_REPETITION_DETAIL_EDG_FOR_HPP +# +# include +# include +# +# define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_FOR_1_I(s, p, o, m) +# define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_FOR_2_I(s, p, o, m) +# define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_FOR_3_I(s, p, o, m) +# define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_FOR_4_I(s, p, o, m) +# define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_FOR_5_I(s, p, o, m) +# define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_FOR_6_I(s, p, o, m) +# define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_FOR_7_I(s, p, o, m) +# define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_FOR_8_I(s, p, o, m) +# define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_FOR_9_I(s, p, o, m) +# define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_FOR_10_I(s, p, o, m) +# define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_FOR_11_I(s, p, o, m) +# define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_FOR_12_I(s, p, o, m) +# define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_FOR_13_I(s, p, o, m) +# define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_FOR_14_I(s, p, o, m) +# define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_FOR_15_I(s, p, o, m) +# define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_FOR_16_I(s, p, o, m) +# define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_FOR_17_I(s, p, o, m) +# define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_FOR_18_I(s, p, o, m) +# define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_FOR_19_I(s, p, o, m) +# define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_FOR_20_I(s, p, o, m) +# define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_FOR_21_I(s, p, o, m) +# define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_FOR_22_I(s, p, o, m) +# define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_FOR_23_I(s, p, o, m) +# define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_FOR_24_I(s, p, o, m) +# define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_FOR_25_I(s, p, o, m) +# define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_FOR_26_I(s, p, o, m) +# define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_FOR_27_I(s, p, o, m) +# define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_FOR_28_I(s, p, o, m) +# define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_FOR_29_I(s, p, o, m) +# define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_FOR_30_I(s, p, o, m) +# define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_FOR_31_I(s, p, o, m) +# define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_FOR_32_I(s, p, o, m) +# define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_FOR_33_I(s, p, o, m) +# define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_FOR_34_I(s, p, o, m) +# define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_FOR_35_I(s, p, o, m) +# define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_FOR_36_I(s, p, o, m) +# define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_FOR_37_I(s, p, o, m) +# define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_FOR_38_I(s, p, o, m) +# define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_FOR_39_I(s, p, o, m) +# define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_FOR_40_I(s, p, o, m) +# define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_FOR_41_I(s, p, o, m) +# define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_FOR_42_I(s, p, o, m) +# define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_FOR_43_I(s, p, o, m) +# define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_FOR_44_I(s, p, o, m) +# define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_FOR_45_I(s, p, o, m) +# define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_FOR_46_I(s, p, o, m) +# define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_FOR_47_I(s, p, o, m) +# define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_FOR_48_I(s, p, o, m) +# define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_FOR_49_I(s, p, o, m) +# define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_FOR_50_I(s, p, o, m) +# define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_FOR_51_I(s, p, o, m) +# define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_FOR_52_I(s, p, o, m) +# define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_FOR_53_I(s, p, o, m) +# define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_FOR_54_I(s, p, o, m) +# define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_FOR_55_I(s, p, o, m) +# define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_FOR_56_I(s, p, o, m) +# define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_FOR_57_I(s, p, o, m) +# define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_FOR_58_I(s, p, o, m) +# define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_FOR_59_I(s, p, o, m) +# define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_FOR_60_I(s, p, o, m) +# define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_FOR_61_I(s, p, o, m) +# define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_FOR_62_I(s, p, o, m) +# define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_FOR_63_I(s, p, o, m) +# define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_FOR_64_I(s, p, o, m) +# define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_FOR_65_I(s, p, o, m) +# define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_FOR_66_I(s, p, o, m) +# define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_FOR_67_I(s, p, o, m) +# define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_FOR_68_I(s, p, o, m) +# define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_FOR_69_I(s, p, o, m) +# define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_FOR_70_I(s, p, o, m) +# define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_FOR_71_I(s, p, o, m) +# define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_FOR_72_I(s, p, o, m) +# define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_FOR_73_I(s, p, o, m) +# define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_FOR_74_I(s, p, o, m) +# define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_FOR_75_I(s, p, o, m) +# define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_FOR_76_I(s, p, o, m) +# define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_FOR_77_I(s, p, o, m) +# define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_FOR_78_I(s, p, o, m) +# define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_FOR_79_I(s, p, o, m) +# define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_FOR_80_I(s, p, o, m) +# define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_FOR_81_I(s, p, o, m) +# define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_FOR_82_I(s, p, o, m) +# define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_FOR_83_I(s, p, o, m) +# define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_FOR_84_I(s, p, o, m) +# define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_FOR_85_I(s, p, o, m) +# define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_FOR_86_I(s, p, o, m) +# define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_FOR_87_I(s, p, o, m) +# define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_FOR_88_I(s, p, o, m) +# define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_FOR_89_I(s, p, o, m) +# define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_FOR_90_I(s, p, o, m) +# define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_FOR_91_I(s, p, o, m) +# define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_FOR_92_I(s, p, o, m) +# define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_FOR_93_I(s, p, o, m) +# define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_FOR_94_I(s, p, o, m) +# define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_FOR_95_I(s, p, o, m) +# define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_FOR_96_I(s, p, o, m) +# define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_FOR_97_I(s, p, o, m) +# define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_FOR_98_I(s, p, o, m) +# define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_FOR_99_I(s, p, o, m) +# define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_FOR_100_I(s, p, o, m) +# define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_FOR_101_I(s, p, o, m) +# define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_FOR_102_I(s, p, o, m) +# define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_FOR_103_I(s, p, o, m) +# define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_FOR_104_I(s, p, o, m) +# define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_FOR_105_I(s, p, o, m) +# define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_FOR_106_I(s, p, o, m) +# define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_FOR_107_I(s, p, o, m) +# define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_FOR_108_I(s, p, o, m) +# define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_FOR_109_I(s, p, o, m) +# define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_FOR_110_I(s, p, o, m) +# define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_FOR_111_I(s, p, o, m) +# define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_FOR_112_I(s, p, o, m) +# define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_FOR_113_I(s, p, o, m) +# define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_FOR_114_I(s, p, o, m) +# define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_FOR_115_I(s, p, o, m) +# define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_FOR_116_I(s, p, o, m) +# define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_FOR_117_I(s, p, o, m) +# define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_FOR_118_I(s, p, o, m) +# define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_FOR_119_I(s, p, o, m) +# define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_FOR_120_I(s, p, o, m) +# define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_FOR_121_I(s, p, o, m) +# define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_FOR_122_I(s, p, o, m) +# define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_FOR_123_I(s, p, o, m) +# define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_FOR_124_I(s, p, o, m) +# define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_FOR_125_I(s, p, o, m) +# define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_FOR_126_I(s, p, o, m) +# define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_FOR_127_I(s, p, o, m) +# define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_FOR_128_I(s, p, o, m) +# define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_FOR_129_I(s, p, o, m) +# define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_FOR_130_I(s, p, o, m) +# define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_FOR_131_I(s, p, o, m) +# define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_FOR_132_I(s, p, o, m) +# define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_FOR_133_I(s, p, o, m) +# define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_FOR_134_I(s, p, o, m) +# define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_FOR_135_I(s, p, o, m) +# define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_FOR_136_I(s, p, o, m) +# define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_FOR_137_I(s, p, o, m) +# define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_FOR_138_I(s, p, o, m) +# define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_FOR_139_I(s, p, o, m) +# define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_FOR_140_I(s, p, o, m) +# define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_FOR_141_I(s, p, o, m) +# define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_FOR_142_I(s, p, o, m) +# define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_FOR_143_I(s, p, o, m) +# define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_FOR_144_I(s, p, o, m) +# define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_FOR_145_I(s, p, o, m) +# define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_FOR_146_I(s, p, o, m) +# define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_FOR_147_I(s, p, o, m) +# define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_FOR_148_I(s, p, o, m) +# define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_FOR_149_I(s, p, o, m) +# define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_FOR_150_I(s, p, o, m) +# define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_FOR_151_I(s, p, o, m) +# define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_FOR_152_I(s, p, o, m) +# define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_FOR_153_I(s, p, o, m) +# define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_FOR_154_I(s, p, o, m) +# define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_FOR_155_I(s, p, o, m) +# define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_FOR_156_I(s, p, o, m) +# define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_FOR_157_I(s, p, o, m) +# define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_FOR_158_I(s, p, o, m) +# define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_FOR_159_I(s, p, o, m) +# define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_FOR_160_I(s, p, o, m) +# define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_FOR_161_I(s, p, o, m) +# define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_FOR_162_I(s, p, o, m) +# define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_FOR_163_I(s, p, o, m) +# define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_FOR_164_I(s, p, o, m) +# define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_FOR_165_I(s, p, o, m) +# define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_FOR_166_I(s, p, o, m) +# define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_FOR_167_I(s, p, o, m) +# define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_FOR_168_I(s, p, o, m) +# define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_FOR_169_I(s, p, o, m) +# define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_FOR_170_I(s, p, o, m) +# define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_FOR_171_I(s, p, o, m) +# define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_FOR_172_I(s, p, o, m) +# define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_FOR_173_I(s, p, o, m) +# define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_FOR_174_I(s, p, o, m) +# define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_FOR_175_I(s, p, o, m) +# define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_FOR_176_I(s, p, o, m) +# define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_FOR_177_I(s, p, o, m) +# define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_FOR_178_I(s, p, o, m) +# define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_FOR_179_I(s, p, o, m) +# define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_FOR_180_I(s, p, o, m) +# define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_FOR_181_I(s, p, o, m) +# define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_FOR_182_I(s, p, o, m) +# define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_FOR_183_I(s, p, o, m) +# define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_FOR_184_I(s, p, o, m) +# define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_FOR_185_I(s, p, o, m) +# define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_FOR_186_I(s, p, o, m) +# define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_FOR_187_I(s, p, o, m) +# define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_FOR_188_I(s, p, o, m) +# define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_FOR_189_I(s, p, o, m) +# define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_FOR_190_I(s, p, o, m) +# define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_FOR_191_I(s, p, o, m) +# define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_FOR_192_I(s, p, o, m) +# define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_FOR_193_I(s, p, o, m) +# define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_FOR_194_I(s, p, o, m) +# define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_FOR_195_I(s, p, o, m) +# define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_FOR_196_I(s, p, o, m) +# define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_FOR_197_I(s, p, o, m) +# define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_FOR_198_I(s, p, o, m) +# define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_FOR_199_I(s, p, o, m) +# define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_FOR_200_I(s, p, o, m) +# define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_FOR_201_I(s, p, o, m) +# define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_FOR_202_I(s, p, o, m) +# define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_FOR_203_I(s, p, o, m) +# define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_FOR_204_I(s, p, o, m) +# define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_FOR_205_I(s, p, o, m) +# define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_FOR_206_I(s, p, o, m) +# define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_FOR_207_I(s, p, o, m) +# define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_FOR_208_I(s, p, o, m) +# define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_FOR_209_I(s, p, o, m) +# define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_FOR_210_I(s, p, o, m) +# define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_FOR_211_I(s, p, o, m) +# define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_FOR_212_I(s, p, o, m) +# define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_FOR_213_I(s, p, o, m) +# define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_FOR_214_I(s, p, o, m) +# define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_FOR_215_I(s, p, o, m) +# define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_FOR_216_I(s, p, o, m) +# define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_FOR_217_I(s, p, o, m) +# define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_FOR_218_I(s, p, o, m) +# define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_FOR_219_I(s, p, o, m) +# define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_FOR_220_I(s, p, o, m) +# define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_FOR_221_I(s, p, o, m) +# define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_FOR_222_I(s, p, o, m) +# define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_FOR_223_I(s, p, o, m) +# define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_FOR_224_I(s, p, o, m) +# define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_FOR_225_I(s, p, o, m) +# define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_FOR_226_I(s, p, o, m) +# define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_FOR_227_I(s, p, o, m) +# define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_FOR_228_I(s, p, o, m) +# define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_FOR_229_I(s, p, o, m) +# define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_FOR_230_I(s, p, o, m) +# define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_FOR_231_I(s, p, o, m) +# define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_FOR_232_I(s, p, o, m) +# define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_FOR_233_I(s, p, o, m) +# define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_FOR_234_I(s, p, o, m) +# define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_FOR_235_I(s, p, o, m) +# define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_FOR_236_I(s, p, o, m) +# define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_FOR_237_I(s, p, o, m) +# define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_FOR_238_I(s, p, o, m) +# define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_FOR_239_I(s, p, o, m) +# define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_FOR_240_I(s, p, o, m) +# define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_FOR_241_I(s, p, o, m) +# define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_FOR_242_I(s, p, o, m) +# define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_FOR_243_I(s, p, o, m) +# define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_FOR_244_I(s, p, o, m) +# define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_FOR_245_I(s, p, o, m) +# define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_FOR_246_I(s, p, o, m) +# define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_FOR_247_I(s, p, o, m) +# define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_FOR_248_I(s, p, o, m) +# define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_FOR_249_I(s, p, o, m) +# define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_FOR_250_I(s, p, o, m) +# define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_FOR_251_I(s, p, o, m) +# define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_FOR_252_I(s, p, o, m) +# define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_FOR_253_I(s, p, o, m) +# define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_FOR_254_I(s, p, o, m) +# define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_FOR_255_I(s, p, o, m) +# define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_FOR_256_I(s, p, o, m) +# +# define BOOST_PP_FOR_1_I(s, p, o, m) BOOST_PP_IF(p(2, s), m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IF(p(2, s), BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(o(2, s), p, o, m) +# define BOOST_PP_FOR_2_I(s, p, o, m) BOOST_PP_IF(p(3, s), m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IF(p(3, s), BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(o(3, s), p, o, m) +# define BOOST_PP_FOR_3_I(s, p, o, m) BOOST_PP_IF(p(4, s), m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IF(p(4, s), BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(o(4, s), p, o, m) +# define BOOST_PP_FOR_4_I(s, p, o, m) BOOST_PP_IF(p(5, s), m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IF(p(5, s), BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(o(5, s), p, o, m) +# define BOOST_PP_FOR_5_I(s, p, o, m) BOOST_PP_IF(p(6, s), m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IF(p(6, s), BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(o(6, s), p, o, m) +# define BOOST_PP_FOR_6_I(s, p, o, m) BOOST_PP_IF(p(7, s), m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IF(p(7, s), BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(o(7, s), p, o, m) +# define BOOST_PP_FOR_7_I(s, p, o, m) BOOST_PP_IF(p(8, s), m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IF(p(8, s), BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(o(8, s), p, o, m) +# define BOOST_PP_FOR_8_I(s, p, o, m) BOOST_PP_IF(p(9, s), m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IF(p(9, s), BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(o(9, s), p, o, m) +# define BOOST_PP_FOR_9_I(s, p, o, m) BOOST_PP_IF(p(10, s), m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IF(p(10, s), BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(o(10, s), p, o, m) +# define BOOST_PP_FOR_10_I(s, p, o, m) BOOST_PP_IF(p(11, s), m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IF(p(11, s), BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(o(11, s), p, o, m) +# define BOOST_PP_FOR_11_I(s, p, o, m) BOOST_PP_IF(p(12, s), m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IF(p(12, s), BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(o(12, s), p, o, m) +# define BOOST_PP_FOR_12_I(s, p, o, m) BOOST_PP_IF(p(13, s), m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IF(p(13, s), BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(o(13, s), p, o, m) +# define BOOST_PP_FOR_13_I(s, p, o, m) BOOST_PP_IF(p(14, s), m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IF(p(14, s), BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(o(14, s), p, o, m) +# define BOOST_PP_FOR_14_I(s, p, o, m) BOOST_PP_IF(p(15, s), m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IF(p(15, s), BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(o(15, s), p, o, m) +# define BOOST_PP_FOR_15_I(s, p, o, m) BOOST_PP_IF(p(16, s), m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IF(p(16, s), BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(o(16, s), p, o, m) +# define BOOST_PP_FOR_16_I(s, p, o, m) BOOST_PP_IF(p(17, s), m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IF(p(17, s), BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(o(17, s), p, o, m) +# define BOOST_PP_FOR_17_I(s, p, o, m) BOOST_PP_IF(p(18, s), m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IF(p(18, s), BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(o(18, s), p, o, m) +# define BOOST_PP_FOR_18_I(s, p, o, m) BOOST_PP_IF(p(19, s), m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IF(p(19, s), BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(o(19, s), p, o, m) +# define BOOST_PP_FOR_19_I(s, p, o, m) BOOST_PP_IF(p(20, s), m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IF(p(20, s), BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(o(20, s), p, o, m) +# define BOOST_PP_FOR_20_I(s, p, o, m) BOOST_PP_IF(p(21, s), m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IF(p(21, s), BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(o(21, s), p, o, m) +# define BOOST_PP_FOR_21_I(s, p, o, m) BOOST_PP_IF(p(22, s), m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IF(p(22, s), BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(o(22, s), p, o, m) +# define BOOST_PP_FOR_22_I(s, p, o, m) BOOST_PP_IF(p(23, s), m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IF(p(23, s), BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(o(23, s), p, o, m) +# define BOOST_PP_FOR_23_I(s, p, o, m) BOOST_PP_IF(p(24, s), m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IF(p(24, s), BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(o(24, s), p, o, m) +# define BOOST_PP_FOR_24_I(s, p, o, m) BOOST_PP_IF(p(25, s), m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IF(p(25, s), BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(o(25, s), p, o, m) +# define BOOST_PP_FOR_25_I(s, p, o, m) BOOST_PP_IF(p(26, s), m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IF(p(26, s), BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(o(26, s), p, o, m) +# define BOOST_PP_FOR_26_I(s, p, o, m) BOOST_PP_IF(p(27, s), m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IF(p(27, s), BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(o(27, s), p, o, m) +# define BOOST_PP_FOR_27_I(s, p, o, m) BOOST_PP_IF(p(28, s), m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IF(p(28, s), BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(o(28, s), p, o, m) +# define BOOST_PP_FOR_28_I(s, p, o, m) BOOST_PP_IF(p(29, s), m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IF(p(29, s), BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(o(29, s), p, o, m) +# define BOOST_PP_FOR_29_I(s, p, o, m) BOOST_PP_IF(p(30, s), m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IF(p(30, s), BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(o(30, s), p, o, m) +# define BOOST_PP_FOR_30_I(s, p, o, m) BOOST_PP_IF(p(31, s), m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IF(p(31, s), BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(o(31, s), p, o, m) +# define BOOST_PP_FOR_31_I(s, p, o, m) BOOST_PP_IF(p(32, s), m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IF(p(32, s), BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(o(32, s), p, o, m) +# define BOOST_PP_FOR_32_I(s, p, o, m) BOOST_PP_IF(p(33, s), m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IF(p(33, s), BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(o(33, s), p, o, m) +# define BOOST_PP_FOR_33_I(s, p, o, m) BOOST_PP_IF(p(34, s), m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IF(p(34, s), BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(o(34, s), p, o, m) +# define BOOST_PP_FOR_34_I(s, p, o, m) BOOST_PP_IF(p(35, s), m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IF(p(35, s), BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(o(35, s), p, o, m) +# define BOOST_PP_FOR_35_I(s, p, o, m) BOOST_PP_IF(p(36, s), m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IF(p(36, s), BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(o(36, s), p, o, m) +# define BOOST_PP_FOR_36_I(s, p, o, m) BOOST_PP_IF(p(37, s), m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IF(p(37, s), BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(o(37, s), p, o, m) +# define BOOST_PP_FOR_37_I(s, p, o, m) BOOST_PP_IF(p(38, s), m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IF(p(38, s), BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(o(38, s), p, o, m) +# define BOOST_PP_FOR_38_I(s, p, o, m) BOOST_PP_IF(p(39, s), m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IF(p(39, s), BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(o(39, s), p, o, m) +# define BOOST_PP_FOR_39_I(s, p, o, m) BOOST_PP_IF(p(40, s), m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IF(p(40, s), BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(o(40, s), p, o, m) +# define BOOST_PP_FOR_40_I(s, p, o, m) BOOST_PP_IF(p(41, s), m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IF(p(41, s), BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(o(41, s), p, o, m) +# define BOOST_PP_FOR_41_I(s, p, o, m) BOOST_PP_IF(p(42, s), m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IF(p(42, s), BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(o(42, s), p, o, m) +# define BOOST_PP_FOR_42_I(s, p, o, m) BOOST_PP_IF(p(43, s), m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IF(p(43, s), BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(o(43, s), p, o, m) +# define BOOST_PP_FOR_43_I(s, p, o, m) BOOST_PP_IF(p(44, s), m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IF(p(44, s), BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(o(44, s), p, o, m) +# define BOOST_PP_FOR_44_I(s, p, o, m) BOOST_PP_IF(p(45, s), m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IF(p(45, s), BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(o(45, s), p, o, m) +# define BOOST_PP_FOR_45_I(s, p, o, m) BOOST_PP_IF(p(46, s), m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IF(p(46, s), BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(o(46, s), p, o, m) +# define BOOST_PP_FOR_46_I(s, p, o, m) BOOST_PP_IF(p(47, s), m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IF(p(47, s), BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(o(47, s), p, o, m) +# define BOOST_PP_FOR_47_I(s, p, o, m) BOOST_PP_IF(p(48, s), m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IF(p(48, s), BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(o(48, s), p, o, m) +# define BOOST_PP_FOR_48_I(s, p, o, m) BOOST_PP_IF(p(49, s), m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IF(p(49, s), BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(o(49, s), p, o, m) +# define BOOST_PP_FOR_49_I(s, p, o, m) BOOST_PP_IF(p(50, s), m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IF(p(50, s), BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(o(50, s), p, o, m) +# define BOOST_PP_FOR_50_I(s, p, o, m) BOOST_PP_IF(p(51, s), m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IF(p(51, s), BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(o(51, s), p, o, m) +# define BOOST_PP_FOR_51_I(s, p, o, m) BOOST_PP_IF(p(52, s), m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IF(p(52, s), BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(o(52, s), p, o, m) +# define BOOST_PP_FOR_52_I(s, p, o, m) BOOST_PP_IF(p(53, s), m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IF(p(53, s), BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(o(53, s), p, o, m) +# define BOOST_PP_FOR_53_I(s, p, o, m) BOOST_PP_IF(p(54, s), m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IF(p(54, s), BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(o(54, s), p, o, m) +# define BOOST_PP_FOR_54_I(s, p, o, m) BOOST_PP_IF(p(55, s), m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IF(p(55, s), BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(o(55, s), p, o, m) +# define BOOST_PP_FOR_55_I(s, p, o, m) BOOST_PP_IF(p(56, s), m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IF(p(56, s), BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(o(56, s), p, o, m) +# define BOOST_PP_FOR_56_I(s, p, o, m) BOOST_PP_IF(p(57, s), m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IF(p(57, s), BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(o(57, s), p, o, m) +# define BOOST_PP_FOR_57_I(s, p, o, m) BOOST_PP_IF(p(58, s), m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IF(p(58, s), BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(o(58, s), p, o, m) +# define BOOST_PP_FOR_58_I(s, p, o, m) BOOST_PP_IF(p(59, s), m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IF(p(59, s), BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(o(59, s), p, o, m) +# define BOOST_PP_FOR_59_I(s, p, o, m) BOOST_PP_IF(p(60, s), m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IF(p(60, s), BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(o(60, s), p, o, m) +# define BOOST_PP_FOR_60_I(s, p, o, m) BOOST_PP_IF(p(61, s), m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IF(p(61, s), BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(o(61, s), p, o, m) +# define BOOST_PP_FOR_61_I(s, p, o, m) BOOST_PP_IF(p(62, s), m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IF(p(62, s), BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(o(62, s), p, o, m) +# define BOOST_PP_FOR_62_I(s, p, o, m) BOOST_PP_IF(p(63, s), m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IF(p(63, s), BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(o(63, s), p, o, m) +# define BOOST_PP_FOR_63_I(s, p, o, m) BOOST_PP_IF(p(64, s), m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IF(p(64, s), BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(o(64, s), p, o, m) +# define BOOST_PP_FOR_64_I(s, p, o, m) BOOST_PP_IF(p(65, s), m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IF(p(65, s), BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(o(65, s), p, o, m) +# define BOOST_PP_FOR_65_I(s, p, o, m) BOOST_PP_IF(p(66, s), m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IF(p(66, s), BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(o(66, s), p, o, m) +# define BOOST_PP_FOR_66_I(s, p, o, m) BOOST_PP_IF(p(67, s), m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IF(p(67, s), BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(o(67, s), p, o, m) +# define BOOST_PP_FOR_67_I(s, p, o, m) BOOST_PP_IF(p(68, s), m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IF(p(68, s), BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(o(68, s), p, o, m) +# define BOOST_PP_FOR_68_I(s, p, o, m) BOOST_PP_IF(p(69, s), m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IF(p(69, s), BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(o(69, s), p, o, m) +# define BOOST_PP_FOR_69_I(s, p, o, m) BOOST_PP_IF(p(70, s), m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IF(p(70, s), BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(o(70, s), p, o, m) +# define BOOST_PP_FOR_70_I(s, p, o, m) BOOST_PP_IF(p(71, s), m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IF(p(71, s), BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(o(71, s), p, o, m) +# define BOOST_PP_FOR_71_I(s, p, o, m) BOOST_PP_IF(p(72, s), m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IF(p(72, s), BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(o(72, s), p, o, m) +# define BOOST_PP_FOR_72_I(s, p, o, m) BOOST_PP_IF(p(73, s), m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IF(p(73, s), BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(o(73, s), p, o, m) +# define BOOST_PP_FOR_73_I(s, p, o, m) BOOST_PP_IF(p(74, s), m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IF(p(74, s), BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(o(74, s), p, o, m) +# define BOOST_PP_FOR_74_I(s, p, o, m) BOOST_PP_IF(p(75, s), m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IF(p(75, s), BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(o(75, s), p, o, m) +# define BOOST_PP_FOR_75_I(s, p, o, m) BOOST_PP_IF(p(76, s), m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IF(p(76, s), BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(o(76, s), p, o, m) +# define BOOST_PP_FOR_76_I(s, p, o, m) BOOST_PP_IF(p(77, s), m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IF(p(77, s), BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(o(77, s), p, o, m) +# define BOOST_PP_FOR_77_I(s, p, o, m) BOOST_PP_IF(p(78, s), m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IF(p(78, s), BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(o(78, s), p, o, m) +# define BOOST_PP_FOR_78_I(s, p, o, m) BOOST_PP_IF(p(79, s), m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IF(p(79, s), BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(o(79, s), p, o, m) +# define BOOST_PP_FOR_79_I(s, p, o, m) BOOST_PP_IF(p(80, s), m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IF(p(80, s), BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(o(80, s), p, o, m) +# define BOOST_PP_FOR_80_I(s, p, o, m) BOOST_PP_IF(p(81, s), m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IF(p(81, s), BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(o(81, s), p, o, m) +# define BOOST_PP_FOR_81_I(s, p, o, m) BOOST_PP_IF(p(82, s), m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IF(p(82, s), BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(o(82, s), p, o, m) +# define BOOST_PP_FOR_82_I(s, p, o, m) BOOST_PP_IF(p(83, s), m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IF(p(83, s), BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(o(83, s), p, o, m) +# define BOOST_PP_FOR_83_I(s, p, o, m) BOOST_PP_IF(p(84, s), m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IF(p(84, s), BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(o(84, s), p, o, m) +# define BOOST_PP_FOR_84_I(s, p, o, m) BOOST_PP_IF(p(85, s), m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IF(p(85, s), BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(o(85, s), p, o, m) +# define BOOST_PP_FOR_85_I(s, p, o, m) BOOST_PP_IF(p(86, s), m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IF(p(86, s), BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(o(86, s), p, o, m) +# define BOOST_PP_FOR_86_I(s, p, o, m) BOOST_PP_IF(p(87, s), m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IF(p(87, s), BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(o(87, s), p, o, m) +# define BOOST_PP_FOR_87_I(s, p, o, m) BOOST_PP_IF(p(88, s), m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IF(p(88, s), BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(o(88, s), p, o, m) +# define BOOST_PP_FOR_88_I(s, p, o, m) BOOST_PP_IF(p(89, s), m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IF(p(89, s), BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(o(89, s), p, o, m) +# define BOOST_PP_FOR_89_I(s, p, o, m) BOOST_PP_IF(p(90, s), m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IF(p(90, s), BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(o(90, s), p, o, m) +# define BOOST_PP_FOR_90_I(s, p, o, m) BOOST_PP_IF(p(91, s), m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IF(p(91, s), BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(o(91, s), p, o, m) +# define BOOST_PP_FOR_91_I(s, p, o, m) BOOST_PP_IF(p(92, s), m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IF(p(92, s), BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(o(92, s), p, o, m) +# define BOOST_PP_FOR_92_I(s, p, o, m) BOOST_PP_IF(p(93, s), m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IF(p(93, s), BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(o(93, s), p, o, m) +# define BOOST_PP_FOR_93_I(s, p, o, m) BOOST_PP_IF(p(94, s), m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IF(p(94, s), BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(o(94, s), p, o, m) +# define BOOST_PP_FOR_94_I(s, p, o, m) BOOST_PP_IF(p(95, s), m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IF(p(95, s), BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(o(95, s), p, o, m) +# define BOOST_PP_FOR_95_I(s, p, o, m) BOOST_PP_IF(p(96, s), m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IF(p(96, s), BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(o(96, s), p, o, m) +# define BOOST_PP_FOR_96_I(s, p, o, m) BOOST_PP_IF(p(97, s), m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IF(p(97, s), BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(o(97, s), p, o, m) +# define BOOST_PP_FOR_97_I(s, p, o, m) BOOST_PP_IF(p(98, s), m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IF(p(98, s), BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(o(98, s), p, o, m) +# define BOOST_PP_FOR_98_I(s, p, o, m) BOOST_PP_IF(p(99, s), m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IF(p(99, s), BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(o(99, s), p, o, m) +# define BOOST_PP_FOR_99_I(s, p, o, m) BOOST_PP_IF(p(100, s), m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IF(p(100, s), BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(o(100, s), p, o, m) +# define BOOST_PP_FOR_100_I(s, p, o, m) BOOST_PP_IF(p(101, s), m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IF(p(101, s), BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(o(101, s), p, o, m) +# define BOOST_PP_FOR_101_I(s, p, o, m) BOOST_PP_IF(p(102, s), m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IF(p(102, s), BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(o(102, s), p, o, m) +# define BOOST_PP_FOR_102_I(s, p, o, m) BOOST_PP_IF(p(103, s), m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IF(p(103, s), BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(o(103, s), p, o, m) +# define BOOST_PP_FOR_103_I(s, p, o, m) BOOST_PP_IF(p(104, s), m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IF(p(104, s), BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(o(104, s), p, o, m) +# define BOOST_PP_FOR_104_I(s, p, o, m) BOOST_PP_IF(p(105, s), m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IF(p(105, s), BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(o(105, s), p, o, m) +# define BOOST_PP_FOR_105_I(s, p, o, m) BOOST_PP_IF(p(106, s), m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IF(p(106, s), BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(o(106, s), p, o, m) +# define BOOST_PP_FOR_106_I(s, p, o, m) BOOST_PP_IF(p(107, s), m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IF(p(107, s), BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(o(107, s), p, o, m) +# define BOOST_PP_FOR_107_I(s, p, o, m) BOOST_PP_IF(p(108, s), m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IF(p(108, s), BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(o(108, s), p, o, m) +# define BOOST_PP_FOR_108_I(s, p, o, m) BOOST_PP_IF(p(109, s), m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IF(p(109, s), BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(o(109, s), p, o, m) +# define BOOST_PP_FOR_109_I(s, p, o, m) BOOST_PP_IF(p(110, s), m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IF(p(110, s), BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(o(110, s), p, o, m) +# define BOOST_PP_FOR_110_I(s, p, o, m) BOOST_PP_IF(p(111, s), m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IF(p(111, s), BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(o(111, s), p, o, m) +# define BOOST_PP_FOR_111_I(s, p, o, m) BOOST_PP_IF(p(112, s), m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IF(p(112, s), BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(o(112, s), p, o, m) +# define BOOST_PP_FOR_112_I(s, p, o, m) BOOST_PP_IF(p(113, s), m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IF(p(113, s), BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(o(113, s), p, o, m) +# define BOOST_PP_FOR_113_I(s, p, o, m) BOOST_PP_IF(p(114, s), m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IF(p(114, s), BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(o(114, s), p, o, m) +# define BOOST_PP_FOR_114_I(s, p, o, m) BOOST_PP_IF(p(115, s), m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IF(p(115, s), BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(o(115, s), p, o, m) +# define BOOST_PP_FOR_115_I(s, p, o, m) BOOST_PP_IF(p(116, s), m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IF(p(116, s), BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(o(116, s), p, o, m) +# define BOOST_PP_FOR_116_I(s, p, o, m) BOOST_PP_IF(p(117, s), m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IF(p(117, s), BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(o(117, s), p, o, m) +# define BOOST_PP_FOR_117_I(s, p, o, m) BOOST_PP_IF(p(118, s), m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IF(p(118, s), BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(o(118, s), p, o, m) +# define BOOST_PP_FOR_118_I(s, p, o, m) BOOST_PP_IF(p(119, s), m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IF(p(119, s), BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(o(119, s), p, o, m) +# define BOOST_PP_FOR_119_I(s, p, o, m) BOOST_PP_IF(p(120, s), m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IF(p(120, s), BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(o(120, s), p, o, m) +# define BOOST_PP_FOR_120_I(s, p, o, m) BOOST_PP_IF(p(121, s), m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IF(p(121, s), BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(o(121, s), p, o, m) +# define BOOST_PP_FOR_121_I(s, p, o, m) BOOST_PP_IF(p(122, s), m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IF(p(122, s), BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(o(122, s), p, o, m) +# define BOOST_PP_FOR_122_I(s, p, o, m) BOOST_PP_IF(p(123, s), m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IF(p(123, s), BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(o(123, s), p, o, m) +# define BOOST_PP_FOR_123_I(s, p, o, m) BOOST_PP_IF(p(124, s), m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IF(p(124, s), BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(o(124, s), p, o, m) +# define BOOST_PP_FOR_124_I(s, p, o, m) BOOST_PP_IF(p(125, s), m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IF(p(125, s), BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(o(125, s), p, o, m) +# define BOOST_PP_FOR_125_I(s, p, o, m) BOOST_PP_IF(p(126, s), m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IF(p(126, s), BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(o(126, s), p, o, m) +# define BOOST_PP_FOR_126_I(s, p, o, m) BOOST_PP_IF(p(127, s), m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IF(p(127, s), BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(o(127, s), p, o, m) +# define BOOST_PP_FOR_127_I(s, p, o, m) BOOST_PP_IF(p(128, s), m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IF(p(128, s), BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(o(128, s), p, o, m) +# define BOOST_PP_FOR_128_I(s, p, o, m) BOOST_PP_IF(p(129, s), m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IF(p(129, s), BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(o(129, s), p, o, m) +# define BOOST_PP_FOR_129_I(s, p, o, m) BOOST_PP_IF(p(130, s), m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IF(p(130, s), BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(o(130, s), p, o, m) +# define BOOST_PP_FOR_130_I(s, p, o, m) BOOST_PP_IF(p(131, s), m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IF(p(131, s), BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(o(131, s), p, o, m) +# define BOOST_PP_FOR_131_I(s, p, o, m) BOOST_PP_IF(p(132, s), m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IF(p(132, s), BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(o(132, s), p, o, m) +# define BOOST_PP_FOR_132_I(s, p, o, m) BOOST_PP_IF(p(133, s), m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IF(p(133, s), BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(o(133, s), p, o, m) +# define BOOST_PP_FOR_133_I(s, p, o, m) BOOST_PP_IF(p(134, s), m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IF(p(134, s), BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(o(134, s), p, o, m) +# define BOOST_PP_FOR_134_I(s, p, o, m) BOOST_PP_IF(p(135, s), m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IF(p(135, s), BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(o(135, s), p, o, m) +# define BOOST_PP_FOR_135_I(s, p, o, m) BOOST_PP_IF(p(136, s), m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IF(p(136, s), BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(o(136, s), p, o, m) +# define BOOST_PP_FOR_136_I(s, p, o, m) BOOST_PP_IF(p(137, s), m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IF(p(137, s), BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(o(137, s), p, o, m) +# define BOOST_PP_FOR_137_I(s, p, o, m) BOOST_PP_IF(p(138, s), m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IF(p(138, s), BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(o(138, s), p, o, m) +# define BOOST_PP_FOR_138_I(s, p, o, m) BOOST_PP_IF(p(139, s), m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IF(p(139, s), BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(o(139, s), p, o, m) +# define BOOST_PP_FOR_139_I(s, p, o, m) BOOST_PP_IF(p(140, s), m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IF(p(140, s), BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(o(140, s), p, o, m) +# define BOOST_PP_FOR_140_I(s, p, o, m) BOOST_PP_IF(p(141, s), m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IF(p(141, s), BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(o(141, s), p, o, m) +# define BOOST_PP_FOR_141_I(s, p, o, m) BOOST_PP_IF(p(142, s), m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IF(p(142, s), BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(o(142, s), p, o, m) +# define BOOST_PP_FOR_142_I(s, p, o, m) BOOST_PP_IF(p(143, s), m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IF(p(143, s), BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(o(143, s), p, o, m) +# define BOOST_PP_FOR_143_I(s, p, o, m) BOOST_PP_IF(p(144, s), m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IF(p(144, s), BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(o(144, s), p, o, m) +# define BOOST_PP_FOR_144_I(s, p, o, m) BOOST_PP_IF(p(145, s), m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IF(p(145, s), BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(o(145, s), p, o, m) +# define BOOST_PP_FOR_145_I(s, p, o, m) BOOST_PP_IF(p(146, s), m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IF(p(146, s), BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(o(146, s), p, o, m) +# define BOOST_PP_FOR_146_I(s, p, o, m) BOOST_PP_IF(p(147, s), m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IF(p(147, s), BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(o(147, s), p, o, m) +# define BOOST_PP_FOR_147_I(s, p, o, m) BOOST_PP_IF(p(148, s), m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IF(p(148, s), BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(o(148, s), p, o, m) +# define BOOST_PP_FOR_148_I(s, p, o, m) BOOST_PP_IF(p(149, s), m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IF(p(149, s), BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(o(149, s), p, o, m) +# define BOOST_PP_FOR_149_I(s, p, o, m) BOOST_PP_IF(p(150, s), m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IF(p(150, s), BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(o(150, s), p, o, m) +# define BOOST_PP_FOR_150_I(s, p, o, m) BOOST_PP_IF(p(151, s), m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IF(p(151, s), BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(o(151, s), p, o, m) +# define BOOST_PP_FOR_151_I(s, p, o, m) BOOST_PP_IF(p(152, s), m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IF(p(152, s), BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(o(152, s), p, o, m) +# define BOOST_PP_FOR_152_I(s, p, o, m) BOOST_PP_IF(p(153, s), m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IF(p(153, s), BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(o(153, s), p, o, m) +# define BOOST_PP_FOR_153_I(s, p, o, m) BOOST_PP_IF(p(154, s), m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IF(p(154, s), BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(o(154, s), p, o, m) +# define BOOST_PP_FOR_154_I(s, p, o, m) BOOST_PP_IF(p(155, s), m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IF(p(155, s), BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(o(155, s), p, o, m) +# define BOOST_PP_FOR_155_I(s, p, o, m) BOOST_PP_IF(p(156, s), m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IF(p(156, s), BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(o(156, s), p, o, m) +# define BOOST_PP_FOR_156_I(s, p, o, m) BOOST_PP_IF(p(157, s), m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IF(p(157, s), BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(o(157, s), p, o, m) +# define BOOST_PP_FOR_157_I(s, p, o, m) BOOST_PP_IF(p(158, s), m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IF(p(158, s), BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(o(158, s), p, o, m) +# define BOOST_PP_FOR_158_I(s, p, o, m) BOOST_PP_IF(p(159, s), m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IF(p(159, s), BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(o(159, s), p, o, m) +# define BOOST_PP_FOR_159_I(s, p, o, m) BOOST_PP_IF(p(160, s), m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IF(p(160, s), BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(o(160, s), p, o, m) +# define BOOST_PP_FOR_160_I(s, p, o, m) BOOST_PP_IF(p(161, s), m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IF(p(161, s), BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(o(161, s), p, o, m) +# define BOOST_PP_FOR_161_I(s, p, o, m) BOOST_PP_IF(p(162, s), m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IF(p(162, s), BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(o(162, s), p, o, m) +# define BOOST_PP_FOR_162_I(s, p, o, m) BOOST_PP_IF(p(163, s), m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IF(p(163, s), BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(o(163, s), p, o, m) +# define BOOST_PP_FOR_163_I(s, p, o, m) BOOST_PP_IF(p(164, s), m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IF(p(164, s), BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(o(164, s), p, o, m) +# define BOOST_PP_FOR_164_I(s, p, o, m) BOOST_PP_IF(p(165, s), m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IF(p(165, s), BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(o(165, s), p, o, m) +# define BOOST_PP_FOR_165_I(s, p, o, m) BOOST_PP_IF(p(166, s), m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IF(p(166, s), BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(o(166, s), p, o, m) +# define BOOST_PP_FOR_166_I(s, p, o, m) BOOST_PP_IF(p(167, s), m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IF(p(167, s), BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(o(167, s), p, o, m) +# define BOOST_PP_FOR_167_I(s, p, o, m) BOOST_PP_IF(p(168, s), m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IF(p(168, s), BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(o(168, s), p, o, m) +# define BOOST_PP_FOR_168_I(s, p, o, m) BOOST_PP_IF(p(169, s), m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IF(p(169, s), BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(o(169, s), p, o, m) +# define BOOST_PP_FOR_169_I(s, p, o, m) BOOST_PP_IF(p(170, s), m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IF(p(170, s), BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(o(170, s), p, o, m) +# define BOOST_PP_FOR_170_I(s, p, o, m) BOOST_PP_IF(p(171, s), m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IF(p(171, s), BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(o(171, s), p, o, m) +# define BOOST_PP_FOR_171_I(s, p, o, m) BOOST_PP_IF(p(172, s), m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IF(p(172, s), BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(o(172, s), p, o, m) +# define BOOST_PP_FOR_172_I(s, p, o, m) BOOST_PP_IF(p(173, s), m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IF(p(173, s), BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(o(173, s), p, o, m) +# define BOOST_PP_FOR_173_I(s, p, o, m) BOOST_PP_IF(p(174, s), m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IF(p(174, s), BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(o(174, s), p, o, m) +# define BOOST_PP_FOR_174_I(s, p, o, m) BOOST_PP_IF(p(175, s), m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IF(p(175, s), BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(o(175, s), p, o, m) +# define BOOST_PP_FOR_175_I(s, p, o, m) BOOST_PP_IF(p(176, s), m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IF(p(176, s), BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(o(176, s), p, o, m) +# define BOOST_PP_FOR_176_I(s, p, o, m) BOOST_PP_IF(p(177, s), m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IF(p(177, s), BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(o(177, s), p, o, m) +# define BOOST_PP_FOR_177_I(s, p, o, m) BOOST_PP_IF(p(178, s), m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IF(p(178, s), BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(o(178, s), p, o, m) +# define BOOST_PP_FOR_178_I(s, p, o, m) BOOST_PP_IF(p(179, s), m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IF(p(179, s), BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(o(179, s), p, o, m) +# define BOOST_PP_FOR_179_I(s, p, o, m) BOOST_PP_IF(p(180, s), m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IF(p(180, s), BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(o(180, s), p, o, m) +# define BOOST_PP_FOR_180_I(s, p, o, m) BOOST_PP_IF(p(181, s), m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IF(p(181, s), BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(o(181, s), p, o, m) +# define BOOST_PP_FOR_181_I(s, p, o, m) BOOST_PP_IF(p(182, s), m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IF(p(182, s), BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(o(182, s), p, o, m) +# define BOOST_PP_FOR_182_I(s, p, o, m) BOOST_PP_IF(p(183, s), m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IF(p(183, s), BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(o(183, s), p, o, m) +# define BOOST_PP_FOR_183_I(s, p, o, m) BOOST_PP_IF(p(184, s), m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IF(p(184, s), BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(o(184, s), p, o, m) +# define BOOST_PP_FOR_184_I(s, p, o, m) BOOST_PP_IF(p(185, s), m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IF(p(185, s), BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(o(185, s), p, o, m) +# define BOOST_PP_FOR_185_I(s, p, o, m) BOOST_PP_IF(p(186, s), m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IF(p(186, s), BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(o(186, s), p, o, m) +# define BOOST_PP_FOR_186_I(s, p, o, m) BOOST_PP_IF(p(187, s), m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IF(p(187, s), BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(o(187, s), p, o, m) +# define BOOST_PP_FOR_187_I(s, p, o, m) BOOST_PP_IF(p(188, s), m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IF(p(188, s), BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(o(188, s), p, o, m) +# define BOOST_PP_FOR_188_I(s, p, o, m) BOOST_PP_IF(p(189, s), m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IF(p(189, s), BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(o(189, s), p, o, m) +# define BOOST_PP_FOR_189_I(s, p, o, m) BOOST_PP_IF(p(190, s), m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IF(p(190, s), BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(o(190, s), p, o, m) +# define BOOST_PP_FOR_190_I(s, p, o, m) BOOST_PP_IF(p(191, s), m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IF(p(191, s), BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(o(191, s), p, o, m) +# define BOOST_PP_FOR_191_I(s, p, o, m) BOOST_PP_IF(p(192, s), m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IF(p(192, s), BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(o(192, s), p, o, m) +# define BOOST_PP_FOR_192_I(s, p, o, m) BOOST_PP_IF(p(193, s), m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IF(p(193, s), BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(o(193, s), p, o, m) +# define BOOST_PP_FOR_193_I(s, p, o, m) BOOST_PP_IF(p(194, s), m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IF(p(194, s), BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(o(194, s), p, o, m) +# define BOOST_PP_FOR_194_I(s, p, o, m) BOOST_PP_IF(p(195, s), m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IF(p(195, s), BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(o(195, s), p, o, m) +# define BOOST_PP_FOR_195_I(s, p, o, m) BOOST_PP_IF(p(196, s), m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IF(p(196, s), BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(o(196, s), p, o, m) +# define BOOST_PP_FOR_196_I(s, p, o, m) BOOST_PP_IF(p(197, s), m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IF(p(197, s), BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(o(197, s), p, o, m) +# define BOOST_PP_FOR_197_I(s, p, o, m) BOOST_PP_IF(p(198, s), m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IF(p(198, s), BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(o(198, s), p, o, m) +# define BOOST_PP_FOR_198_I(s, p, o, m) BOOST_PP_IF(p(199, s), m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IF(p(199, s), BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(o(199, s), p, o, m) +# define BOOST_PP_FOR_199_I(s, p, o, m) BOOST_PP_IF(p(200, s), m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IF(p(200, s), BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(o(200, s), p, o, m) +# define BOOST_PP_FOR_200_I(s, p, o, m) BOOST_PP_IF(p(201, s), m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IF(p(201, s), BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(o(201, s), p, o, m) +# define BOOST_PP_FOR_201_I(s, p, o, m) BOOST_PP_IF(p(202, s), m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IF(p(202, s), BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(o(202, s), p, o, m) +# define BOOST_PP_FOR_202_I(s, p, o, m) BOOST_PP_IF(p(203, s), m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IF(p(203, s), BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(o(203, s), p, o, m) +# define BOOST_PP_FOR_203_I(s, p, o, m) BOOST_PP_IF(p(204, s), m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IF(p(204, s), BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(o(204, s), p, o, m) +# define BOOST_PP_FOR_204_I(s, p, o, m) BOOST_PP_IF(p(205, s), m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IF(p(205, s), BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(o(205, s), p, o, m) +# define BOOST_PP_FOR_205_I(s, p, o, m) BOOST_PP_IF(p(206, s), m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IF(p(206, s), BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(o(206, s), p, o, m) +# define BOOST_PP_FOR_206_I(s, p, o, m) BOOST_PP_IF(p(207, s), m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IF(p(207, s), BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(o(207, s), p, o, m) +# define BOOST_PP_FOR_207_I(s, p, o, m) BOOST_PP_IF(p(208, s), m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IF(p(208, s), BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(o(208, s), p, o, m) +# define BOOST_PP_FOR_208_I(s, p, o, m) BOOST_PP_IF(p(209, s), m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IF(p(209, s), BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(o(209, s), p, o, m) +# define BOOST_PP_FOR_209_I(s, p, o, m) BOOST_PP_IF(p(210, s), m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IF(p(210, s), BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(o(210, s), p, o, m) +# define BOOST_PP_FOR_210_I(s, p, o, m) BOOST_PP_IF(p(211, s), m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IF(p(211, s), BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(o(211, s), p, o, m) +# define BOOST_PP_FOR_211_I(s, p, o, m) BOOST_PP_IF(p(212, s), m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IF(p(212, s), BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(o(212, s), p, o, m) +# define BOOST_PP_FOR_212_I(s, p, o, m) BOOST_PP_IF(p(213, s), m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IF(p(213, s), BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(o(213, s), p, o, m) +# define BOOST_PP_FOR_213_I(s, p, o, m) BOOST_PP_IF(p(214, s), m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IF(p(214, s), BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(o(214, s), p, o, m) +# define BOOST_PP_FOR_214_I(s, p, o, m) BOOST_PP_IF(p(215, s), m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IF(p(215, s), BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(o(215, s), p, o, m) +# define BOOST_PP_FOR_215_I(s, p, o, m) BOOST_PP_IF(p(216, s), m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IF(p(216, s), BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(o(216, s), p, o, m) +# define BOOST_PP_FOR_216_I(s, p, o, m) BOOST_PP_IF(p(217, s), m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IF(p(217, s), BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(o(217, s), p, o, m) +# define BOOST_PP_FOR_217_I(s, p, o, m) BOOST_PP_IF(p(218, s), m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IF(p(218, s), BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(o(218, s), p, o, m) +# define BOOST_PP_FOR_218_I(s, p, o, m) BOOST_PP_IF(p(219, s), m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IF(p(219, s), BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(o(219, s), p, o, m) +# define BOOST_PP_FOR_219_I(s, p, o, m) BOOST_PP_IF(p(220, s), m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IF(p(220, s), BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(o(220, s), p, o, m) +# define BOOST_PP_FOR_220_I(s, p, o, m) BOOST_PP_IF(p(221, s), m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IF(p(221, s), BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(o(221, s), p, o, m) +# define BOOST_PP_FOR_221_I(s, p, o, m) BOOST_PP_IF(p(222, s), m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IF(p(222, s), BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(o(222, s), p, o, m) +# define BOOST_PP_FOR_222_I(s, p, o, m) BOOST_PP_IF(p(223, s), m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IF(p(223, s), BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(o(223, s), p, o, m) +# define BOOST_PP_FOR_223_I(s, p, o, m) BOOST_PP_IF(p(224, s), m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IF(p(224, s), BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(o(224, s), p, o, m) +# define BOOST_PP_FOR_224_I(s, p, o, m) BOOST_PP_IF(p(225, s), m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IF(p(225, s), BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(o(225, s), p, o, m) +# define BOOST_PP_FOR_225_I(s, p, o, m) BOOST_PP_IF(p(226, s), m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IF(p(226, s), BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(o(226, s), p, o, m) +# define BOOST_PP_FOR_226_I(s, p, o, m) BOOST_PP_IF(p(227, s), m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IF(p(227, s), BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(o(227, s), p, o, m) +# define BOOST_PP_FOR_227_I(s, p, o, m) BOOST_PP_IF(p(228, s), m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IF(p(228, s), BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(o(228, s), p, o, m) +# define BOOST_PP_FOR_228_I(s, p, o, m) BOOST_PP_IF(p(229, s), m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IF(p(229, s), BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(o(229, s), p, o, m) +# define BOOST_PP_FOR_229_I(s, p, o, m) BOOST_PP_IF(p(230, s), m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IF(p(230, s), BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(o(230, s), p, o, m) +# define BOOST_PP_FOR_230_I(s, p, o, m) BOOST_PP_IF(p(231, s), m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IF(p(231, s), BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(o(231, s), p, o, m) +# define BOOST_PP_FOR_231_I(s, p, o, m) BOOST_PP_IF(p(232, s), m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IF(p(232, s), BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(o(232, s), p, o, m) +# define BOOST_PP_FOR_232_I(s, p, o, m) BOOST_PP_IF(p(233, s), m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IF(p(233, s), BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(o(233, s), p, o, m) +# define BOOST_PP_FOR_233_I(s, p, o, m) BOOST_PP_IF(p(234, s), m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IF(p(234, s), BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(o(234, s), p, o, m) +# define BOOST_PP_FOR_234_I(s, p, o, m) BOOST_PP_IF(p(235, s), m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IF(p(235, s), BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(o(235, s), p, o, m) +# define BOOST_PP_FOR_235_I(s, p, o, m) BOOST_PP_IF(p(236, s), m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IF(p(236, s), BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(o(236, s), p, o, m) +# define BOOST_PP_FOR_236_I(s, p, o, m) BOOST_PP_IF(p(237, s), m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IF(p(237, s), BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(o(237, s), p, o, m) +# define BOOST_PP_FOR_237_I(s, p, o, m) BOOST_PP_IF(p(238, s), m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IF(p(238, s), BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(o(238, s), p, o, m) +# define BOOST_PP_FOR_238_I(s, p, o, m) BOOST_PP_IF(p(239, s), m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IF(p(239, s), BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(o(239, s), p, o, m) +# define BOOST_PP_FOR_239_I(s, p, o, m) BOOST_PP_IF(p(240, s), m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IF(p(240, s), BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(o(240, s), p, o, m) +# define BOOST_PP_FOR_240_I(s, p, o, m) BOOST_PP_IF(p(241, s), m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IF(p(241, s), BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(o(241, s), p, o, m) +# define BOOST_PP_FOR_241_I(s, p, o, m) BOOST_PP_IF(p(242, s), m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IF(p(242, s), BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(o(242, s), p, o, m) +# define BOOST_PP_FOR_242_I(s, p, o, m) BOOST_PP_IF(p(243, s), m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IF(p(243, s), BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(o(243, s), p, o, m) +# define BOOST_PP_FOR_243_I(s, p, o, m) BOOST_PP_IF(p(244, s), m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IF(p(244, s), BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(o(244, s), p, o, m) +# define BOOST_PP_FOR_244_I(s, p, o, m) BOOST_PP_IF(p(245, s), m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IF(p(245, s), BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(o(245, s), p, o, m) +# define BOOST_PP_FOR_245_I(s, p, o, m) BOOST_PP_IF(p(246, s), m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IF(p(246, s), BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(o(246, s), p, o, m) +# define BOOST_PP_FOR_246_I(s, p, o, m) BOOST_PP_IF(p(247, s), m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IF(p(247, s), BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(o(247, s), p, o, m) +# define BOOST_PP_FOR_247_I(s, p, o, m) BOOST_PP_IF(p(248, s), m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IF(p(248, s), BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(o(248, s), p, o, m) +# define BOOST_PP_FOR_248_I(s, p, o, m) BOOST_PP_IF(p(249, s), m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IF(p(249, s), BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(o(249, s), p, o, m) +# define BOOST_PP_FOR_249_I(s, p, o, m) BOOST_PP_IF(p(250, s), m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IF(p(250, s), BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(o(250, s), p, o, m) +# define BOOST_PP_FOR_250_I(s, p, o, m) BOOST_PP_IF(p(251, s), m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IF(p(251, s), BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(o(251, s), p, o, m) +# define BOOST_PP_FOR_251_I(s, p, o, m) BOOST_PP_IF(p(252, s), m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IF(p(252, s), BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(o(252, s), p, o, m) +# define BOOST_PP_FOR_252_I(s, p, o, m) BOOST_PP_IF(p(253, s), m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IF(p(253, s), BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(o(253, s), p, o, m) +# define BOOST_PP_FOR_253_I(s, p, o, m) BOOST_PP_IF(p(254, s), m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IF(p(254, s), BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(o(254, s), p, o, m) +# define BOOST_PP_FOR_254_I(s, p, o, m) BOOST_PP_IF(p(255, s), m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IF(p(255, s), BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(o(255, s), p, o, m) +# define BOOST_PP_FOR_255_I(s, p, o, m) BOOST_PP_IF(p(256, s), m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IF(p(256, s), BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(o(256, s), p, o, m) +# define BOOST_PP_FOR_256_I(s, p, o, m) BOOST_PP_IF(p(257, s), m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IF(p(257, s), BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(o(257, s), p, o, m) +# +# endif diff --git a/contrib/src/boost/preprocessor/repetition/detail/for.hpp b/contrib/src/boost/preprocessor/repetition/detail/for.hpp new file mode 100644 index 0000000..2770f2c --- /dev/null +++ b/contrib/src/boost/preprocessor/repetition/detail/for.hpp @@ -0,0 +1,536 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP +# define BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP +# +# include +# include +# include +# include +# +# define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_FOR_1_C(BOOST_PP_BOOL(p(2, s)), s, p, o, m) +# define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_FOR_2_C(BOOST_PP_BOOL(p(3, s)), s, p, o, m) +# define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_FOR_3_C(BOOST_PP_BOOL(p(4, s)), s, p, o, m) +# define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_FOR_4_C(BOOST_PP_BOOL(p(5, s)), s, p, o, m) +# define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_FOR_5_C(BOOST_PP_BOOL(p(6, s)), s, p, o, m) +# define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_FOR_6_C(BOOST_PP_BOOL(p(7, s)), s, p, o, m) +# define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_FOR_7_C(BOOST_PP_BOOL(p(8, s)), s, p, o, m) +# define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_FOR_8_C(BOOST_PP_BOOL(p(9, s)), s, p, o, m) +# define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_FOR_9_C(BOOST_PP_BOOL(p(10, s)), s, p, o, m) +# define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_FOR_10_C(BOOST_PP_BOOL(p(11, s)), s, p, o, m) +# define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_FOR_11_C(BOOST_PP_BOOL(p(12, s)), s, p, o, m) +# define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_FOR_12_C(BOOST_PP_BOOL(p(13, s)), s, p, o, m) +# define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_FOR_13_C(BOOST_PP_BOOL(p(14, s)), s, p, o, m) +# define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_FOR_14_C(BOOST_PP_BOOL(p(15, s)), s, p, o, m) +# define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_FOR_15_C(BOOST_PP_BOOL(p(16, s)), s, p, o, m) +# define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_FOR_16_C(BOOST_PP_BOOL(p(17, s)), s, p, o, m) +# define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_FOR_17_C(BOOST_PP_BOOL(p(18, s)), s, p, o, m) +# define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_FOR_18_C(BOOST_PP_BOOL(p(19, s)), s, p, o, m) +# define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_FOR_19_C(BOOST_PP_BOOL(p(20, s)), s, p, o, m) +# define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_FOR_20_C(BOOST_PP_BOOL(p(21, s)), s, p, o, m) +# define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_FOR_21_C(BOOST_PP_BOOL(p(22, s)), s, p, o, m) +# define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_FOR_22_C(BOOST_PP_BOOL(p(23, s)), s, p, o, m) +# define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_FOR_23_C(BOOST_PP_BOOL(p(24, s)), s, p, o, m) +# define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_FOR_24_C(BOOST_PP_BOOL(p(25, s)), s, p, o, m) +# define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_FOR_25_C(BOOST_PP_BOOL(p(26, s)), s, p, o, m) +# define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_FOR_26_C(BOOST_PP_BOOL(p(27, s)), s, p, o, m) +# define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_FOR_27_C(BOOST_PP_BOOL(p(28, s)), s, p, o, m) +# define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_FOR_28_C(BOOST_PP_BOOL(p(29, s)), s, p, o, m) +# define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_FOR_29_C(BOOST_PP_BOOL(p(30, s)), s, p, o, m) +# define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_FOR_30_C(BOOST_PP_BOOL(p(31, s)), s, p, o, m) +# define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_FOR_31_C(BOOST_PP_BOOL(p(32, s)), s, p, o, m) +# define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_FOR_32_C(BOOST_PP_BOOL(p(33, s)), s, p, o, m) +# define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_FOR_33_C(BOOST_PP_BOOL(p(34, s)), s, p, o, m) +# define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_FOR_34_C(BOOST_PP_BOOL(p(35, s)), s, p, o, m) +# define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_FOR_35_C(BOOST_PP_BOOL(p(36, s)), s, p, o, m) +# define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_FOR_36_C(BOOST_PP_BOOL(p(37, s)), s, p, o, m) +# define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_FOR_37_C(BOOST_PP_BOOL(p(38, s)), s, p, o, m) +# define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_FOR_38_C(BOOST_PP_BOOL(p(39, s)), s, p, o, m) +# define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_FOR_39_C(BOOST_PP_BOOL(p(40, s)), s, p, o, m) +# define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_FOR_40_C(BOOST_PP_BOOL(p(41, s)), s, p, o, m) +# define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_FOR_41_C(BOOST_PP_BOOL(p(42, s)), s, p, o, m) +# define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_FOR_42_C(BOOST_PP_BOOL(p(43, s)), s, p, o, m) +# define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_FOR_43_C(BOOST_PP_BOOL(p(44, s)), s, p, o, m) +# define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_FOR_44_C(BOOST_PP_BOOL(p(45, s)), s, p, o, m) +# define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_FOR_45_C(BOOST_PP_BOOL(p(46, s)), s, p, o, m) +# define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_FOR_46_C(BOOST_PP_BOOL(p(47, s)), s, p, o, m) +# define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_FOR_47_C(BOOST_PP_BOOL(p(48, s)), s, p, o, m) +# define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_FOR_48_C(BOOST_PP_BOOL(p(49, s)), s, p, o, m) +# define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_FOR_49_C(BOOST_PP_BOOL(p(50, s)), s, p, o, m) +# define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_FOR_50_C(BOOST_PP_BOOL(p(51, s)), s, p, o, m) +# define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_FOR_51_C(BOOST_PP_BOOL(p(52, s)), s, p, o, m) +# define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_FOR_52_C(BOOST_PP_BOOL(p(53, s)), s, p, o, m) +# define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_FOR_53_C(BOOST_PP_BOOL(p(54, s)), s, p, o, m) +# define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_FOR_54_C(BOOST_PP_BOOL(p(55, s)), s, p, o, m) +# define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_FOR_55_C(BOOST_PP_BOOL(p(56, s)), s, p, o, m) +# define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_FOR_56_C(BOOST_PP_BOOL(p(57, s)), s, p, o, m) +# define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_FOR_57_C(BOOST_PP_BOOL(p(58, s)), s, p, o, m) +# define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_FOR_58_C(BOOST_PP_BOOL(p(59, s)), s, p, o, m) +# define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_FOR_59_C(BOOST_PP_BOOL(p(60, s)), s, p, o, m) +# define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_FOR_60_C(BOOST_PP_BOOL(p(61, s)), s, p, o, m) +# define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_FOR_61_C(BOOST_PP_BOOL(p(62, s)), s, p, o, m) +# define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_FOR_62_C(BOOST_PP_BOOL(p(63, s)), s, p, o, m) +# define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_FOR_63_C(BOOST_PP_BOOL(p(64, s)), s, p, o, m) +# define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_FOR_64_C(BOOST_PP_BOOL(p(65, s)), s, p, o, m) +# define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_FOR_65_C(BOOST_PP_BOOL(p(66, s)), s, p, o, m) +# define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_FOR_66_C(BOOST_PP_BOOL(p(67, s)), s, p, o, m) +# define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_FOR_67_C(BOOST_PP_BOOL(p(68, s)), s, p, o, m) +# define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_FOR_68_C(BOOST_PP_BOOL(p(69, s)), s, p, o, m) +# define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_FOR_69_C(BOOST_PP_BOOL(p(70, s)), s, p, o, m) +# define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_FOR_70_C(BOOST_PP_BOOL(p(71, s)), s, p, o, m) +# define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_FOR_71_C(BOOST_PP_BOOL(p(72, s)), s, p, o, m) +# define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_FOR_72_C(BOOST_PP_BOOL(p(73, s)), s, p, o, m) +# define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_FOR_73_C(BOOST_PP_BOOL(p(74, s)), s, p, o, m) +# define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_FOR_74_C(BOOST_PP_BOOL(p(75, s)), s, p, o, m) +# define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_FOR_75_C(BOOST_PP_BOOL(p(76, s)), s, p, o, m) +# define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_FOR_76_C(BOOST_PP_BOOL(p(77, s)), s, p, o, m) +# define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_FOR_77_C(BOOST_PP_BOOL(p(78, s)), s, p, o, m) +# define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_FOR_78_C(BOOST_PP_BOOL(p(79, s)), s, p, o, m) +# define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_FOR_79_C(BOOST_PP_BOOL(p(80, s)), s, p, o, m) +# define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_FOR_80_C(BOOST_PP_BOOL(p(81, s)), s, p, o, m) +# define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_FOR_81_C(BOOST_PP_BOOL(p(82, s)), s, p, o, m) +# define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_FOR_82_C(BOOST_PP_BOOL(p(83, s)), s, p, o, m) +# define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_FOR_83_C(BOOST_PP_BOOL(p(84, s)), s, p, o, m) +# define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_FOR_84_C(BOOST_PP_BOOL(p(85, s)), s, p, o, m) +# define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_FOR_85_C(BOOST_PP_BOOL(p(86, s)), s, p, o, m) +# define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_FOR_86_C(BOOST_PP_BOOL(p(87, s)), s, p, o, m) +# define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_FOR_87_C(BOOST_PP_BOOL(p(88, s)), s, p, o, m) +# define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_FOR_88_C(BOOST_PP_BOOL(p(89, s)), s, p, o, m) +# define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_FOR_89_C(BOOST_PP_BOOL(p(90, s)), s, p, o, m) +# define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_FOR_90_C(BOOST_PP_BOOL(p(91, s)), s, p, o, m) +# define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_FOR_91_C(BOOST_PP_BOOL(p(92, s)), s, p, o, m) +# define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_FOR_92_C(BOOST_PP_BOOL(p(93, s)), s, p, o, m) +# define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_FOR_93_C(BOOST_PP_BOOL(p(94, s)), s, p, o, m) +# define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_FOR_94_C(BOOST_PP_BOOL(p(95, s)), s, p, o, m) +# define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_FOR_95_C(BOOST_PP_BOOL(p(96, s)), s, p, o, m) +# define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_FOR_96_C(BOOST_PP_BOOL(p(97, s)), s, p, o, m) +# define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_FOR_97_C(BOOST_PP_BOOL(p(98, s)), s, p, o, m) +# define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_FOR_98_C(BOOST_PP_BOOL(p(99, s)), s, p, o, m) +# define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_FOR_99_C(BOOST_PP_BOOL(p(100, s)), s, p, o, m) +# define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_FOR_100_C(BOOST_PP_BOOL(p(101, s)), s, p, o, m) +# define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_FOR_101_C(BOOST_PP_BOOL(p(102, s)), s, p, o, m) +# define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_FOR_102_C(BOOST_PP_BOOL(p(103, s)), s, p, o, m) +# define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_FOR_103_C(BOOST_PP_BOOL(p(104, s)), s, p, o, m) +# define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_FOR_104_C(BOOST_PP_BOOL(p(105, s)), s, p, o, m) +# define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_FOR_105_C(BOOST_PP_BOOL(p(106, s)), s, p, o, m) +# define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_FOR_106_C(BOOST_PP_BOOL(p(107, s)), s, p, o, m) +# define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_FOR_107_C(BOOST_PP_BOOL(p(108, s)), s, p, o, m) +# define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_FOR_108_C(BOOST_PP_BOOL(p(109, s)), s, p, o, m) +# define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_FOR_109_C(BOOST_PP_BOOL(p(110, s)), s, p, o, m) +# define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_FOR_110_C(BOOST_PP_BOOL(p(111, s)), s, p, o, m) +# define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_FOR_111_C(BOOST_PP_BOOL(p(112, s)), s, p, o, m) +# define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_FOR_112_C(BOOST_PP_BOOL(p(113, s)), s, p, o, m) +# define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_FOR_113_C(BOOST_PP_BOOL(p(114, s)), s, p, o, m) +# define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_FOR_114_C(BOOST_PP_BOOL(p(115, s)), s, p, o, m) +# define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_FOR_115_C(BOOST_PP_BOOL(p(116, s)), s, p, o, m) +# define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_FOR_116_C(BOOST_PP_BOOL(p(117, s)), s, p, o, m) +# define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_FOR_117_C(BOOST_PP_BOOL(p(118, s)), s, p, o, m) +# define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_FOR_118_C(BOOST_PP_BOOL(p(119, s)), s, p, o, m) +# define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_FOR_119_C(BOOST_PP_BOOL(p(120, s)), s, p, o, m) +# define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_FOR_120_C(BOOST_PP_BOOL(p(121, s)), s, p, o, m) +# define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_FOR_121_C(BOOST_PP_BOOL(p(122, s)), s, p, o, m) +# define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_FOR_122_C(BOOST_PP_BOOL(p(123, s)), s, p, o, m) +# define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_FOR_123_C(BOOST_PP_BOOL(p(124, s)), s, p, o, m) +# define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_FOR_124_C(BOOST_PP_BOOL(p(125, s)), s, p, o, m) +# define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_FOR_125_C(BOOST_PP_BOOL(p(126, s)), s, p, o, m) +# define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_FOR_126_C(BOOST_PP_BOOL(p(127, s)), s, p, o, m) +# define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_FOR_127_C(BOOST_PP_BOOL(p(128, s)), s, p, o, m) +# define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_FOR_128_C(BOOST_PP_BOOL(p(129, s)), s, p, o, m) +# define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_FOR_129_C(BOOST_PP_BOOL(p(130, s)), s, p, o, m) +# define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_FOR_130_C(BOOST_PP_BOOL(p(131, s)), s, p, o, m) +# define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_FOR_131_C(BOOST_PP_BOOL(p(132, s)), s, p, o, m) +# define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_FOR_132_C(BOOST_PP_BOOL(p(133, s)), s, p, o, m) +# define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_FOR_133_C(BOOST_PP_BOOL(p(134, s)), s, p, o, m) +# define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_FOR_134_C(BOOST_PP_BOOL(p(135, s)), s, p, o, m) +# define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_FOR_135_C(BOOST_PP_BOOL(p(136, s)), s, p, o, m) +# define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_FOR_136_C(BOOST_PP_BOOL(p(137, s)), s, p, o, m) +# define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_FOR_137_C(BOOST_PP_BOOL(p(138, s)), s, p, o, m) +# define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_FOR_138_C(BOOST_PP_BOOL(p(139, s)), s, p, o, m) +# define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_FOR_139_C(BOOST_PP_BOOL(p(140, s)), s, p, o, m) +# define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_FOR_140_C(BOOST_PP_BOOL(p(141, s)), s, p, o, m) +# define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_FOR_141_C(BOOST_PP_BOOL(p(142, s)), s, p, o, m) +# define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_FOR_142_C(BOOST_PP_BOOL(p(143, s)), s, p, o, m) +# define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_FOR_143_C(BOOST_PP_BOOL(p(144, s)), s, p, o, m) +# define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_FOR_144_C(BOOST_PP_BOOL(p(145, s)), s, p, o, m) +# define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_FOR_145_C(BOOST_PP_BOOL(p(146, s)), s, p, o, m) +# define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_FOR_146_C(BOOST_PP_BOOL(p(147, s)), s, p, o, m) +# define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_FOR_147_C(BOOST_PP_BOOL(p(148, s)), s, p, o, m) +# define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_FOR_148_C(BOOST_PP_BOOL(p(149, s)), s, p, o, m) +# define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_FOR_149_C(BOOST_PP_BOOL(p(150, s)), s, p, o, m) +# define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_FOR_150_C(BOOST_PP_BOOL(p(151, s)), s, p, o, m) +# define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_FOR_151_C(BOOST_PP_BOOL(p(152, s)), s, p, o, m) +# define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_FOR_152_C(BOOST_PP_BOOL(p(153, s)), s, p, o, m) +# define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_FOR_153_C(BOOST_PP_BOOL(p(154, s)), s, p, o, m) +# define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_FOR_154_C(BOOST_PP_BOOL(p(155, s)), s, p, o, m) +# define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_FOR_155_C(BOOST_PP_BOOL(p(156, s)), s, p, o, m) +# define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_FOR_156_C(BOOST_PP_BOOL(p(157, s)), s, p, o, m) +# define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_FOR_157_C(BOOST_PP_BOOL(p(158, s)), s, p, o, m) +# define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_FOR_158_C(BOOST_PP_BOOL(p(159, s)), s, p, o, m) +# define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_FOR_159_C(BOOST_PP_BOOL(p(160, s)), s, p, o, m) +# define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_FOR_160_C(BOOST_PP_BOOL(p(161, s)), s, p, o, m) +# define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_FOR_161_C(BOOST_PP_BOOL(p(162, s)), s, p, o, m) +# define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_FOR_162_C(BOOST_PP_BOOL(p(163, s)), s, p, o, m) +# define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_FOR_163_C(BOOST_PP_BOOL(p(164, s)), s, p, o, m) +# define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_FOR_164_C(BOOST_PP_BOOL(p(165, s)), s, p, o, m) +# define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_FOR_165_C(BOOST_PP_BOOL(p(166, s)), s, p, o, m) +# define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_FOR_166_C(BOOST_PP_BOOL(p(167, s)), s, p, o, m) +# define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_FOR_167_C(BOOST_PP_BOOL(p(168, s)), s, p, o, m) +# define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_FOR_168_C(BOOST_PP_BOOL(p(169, s)), s, p, o, m) +# define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_FOR_169_C(BOOST_PP_BOOL(p(170, s)), s, p, o, m) +# define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_FOR_170_C(BOOST_PP_BOOL(p(171, s)), s, p, o, m) +# define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_FOR_171_C(BOOST_PP_BOOL(p(172, s)), s, p, o, m) +# define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_FOR_172_C(BOOST_PP_BOOL(p(173, s)), s, p, o, m) +# define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_FOR_173_C(BOOST_PP_BOOL(p(174, s)), s, p, o, m) +# define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_FOR_174_C(BOOST_PP_BOOL(p(175, s)), s, p, o, m) +# define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_FOR_175_C(BOOST_PP_BOOL(p(176, s)), s, p, o, m) +# define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_FOR_176_C(BOOST_PP_BOOL(p(177, s)), s, p, o, m) +# define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_FOR_177_C(BOOST_PP_BOOL(p(178, s)), s, p, o, m) +# define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_FOR_178_C(BOOST_PP_BOOL(p(179, s)), s, p, o, m) +# define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_FOR_179_C(BOOST_PP_BOOL(p(180, s)), s, p, o, m) +# define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_FOR_180_C(BOOST_PP_BOOL(p(181, s)), s, p, o, m) +# define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_FOR_181_C(BOOST_PP_BOOL(p(182, s)), s, p, o, m) +# define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_FOR_182_C(BOOST_PP_BOOL(p(183, s)), s, p, o, m) +# define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_FOR_183_C(BOOST_PP_BOOL(p(184, s)), s, p, o, m) +# define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_FOR_184_C(BOOST_PP_BOOL(p(185, s)), s, p, o, m) +# define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_FOR_185_C(BOOST_PP_BOOL(p(186, s)), s, p, o, m) +# define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_FOR_186_C(BOOST_PP_BOOL(p(187, s)), s, p, o, m) +# define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_FOR_187_C(BOOST_PP_BOOL(p(188, s)), s, p, o, m) +# define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_FOR_188_C(BOOST_PP_BOOL(p(189, s)), s, p, o, m) +# define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_FOR_189_C(BOOST_PP_BOOL(p(190, s)), s, p, o, m) +# define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_FOR_190_C(BOOST_PP_BOOL(p(191, s)), s, p, o, m) +# define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_FOR_191_C(BOOST_PP_BOOL(p(192, s)), s, p, o, m) +# define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_FOR_192_C(BOOST_PP_BOOL(p(193, s)), s, p, o, m) +# define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_FOR_193_C(BOOST_PP_BOOL(p(194, s)), s, p, o, m) +# define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_FOR_194_C(BOOST_PP_BOOL(p(195, s)), s, p, o, m) +# define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_FOR_195_C(BOOST_PP_BOOL(p(196, s)), s, p, o, m) +# define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_FOR_196_C(BOOST_PP_BOOL(p(197, s)), s, p, o, m) +# define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_FOR_197_C(BOOST_PP_BOOL(p(198, s)), s, p, o, m) +# define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_FOR_198_C(BOOST_PP_BOOL(p(199, s)), s, p, o, m) +# define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_FOR_199_C(BOOST_PP_BOOL(p(200, s)), s, p, o, m) +# define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_FOR_200_C(BOOST_PP_BOOL(p(201, s)), s, p, o, m) +# define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_FOR_201_C(BOOST_PP_BOOL(p(202, s)), s, p, o, m) +# define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_FOR_202_C(BOOST_PP_BOOL(p(203, s)), s, p, o, m) +# define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_FOR_203_C(BOOST_PP_BOOL(p(204, s)), s, p, o, m) +# define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_FOR_204_C(BOOST_PP_BOOL(p(205, s)), s, p, o, m) +# define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_FOR_205_C(BOOST_PP_BOOL(p(206, s)), s, p, o, m) +# define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_FOR_206_C(BOOST_PP_BOOL(p(207, s)), s, p, o, m) +# define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_FOR_207_C(BOOST_PP_BOOL(p(208, s)), s, p, o, m) +# define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_FOR_208_C(BOOST_PP_BOOL(p(209, s)), s, p, o, m) +# define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_FOR_209_C(BOOST_PP_BOOL(p(210, s)), s, p, o, m) +# define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_FOR_210_C(BOOST_PP_BOOL(p(211, s)), s, p, o, m) +# define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_FOR_211_C(BOOST_PP_BOOL(p(212, s)), s, p, o, m) +# define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_FOR_212_C(BOOST_PP_BOOL(p(213, s)), s, p, o, m) +# define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_FOR_213_C(BOOST_PP_BOOL(p(214, s)), s, p, o, m) +# define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_FOR_214_C(BOOST_PP_BOOL(p(215, s)), s, p, o, m) +# define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_FOR_215_C(BOOST_PP_BOOL(p(216, s)), s, p, o, m) +# define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_FOR_216_C(BOOST_PP_BOOL(p(217, s)), s, p, o, m) +# define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_FOR_217_C(BOOST_PP_BOOL(p(218, s)), s, p, o, m) +# define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_FOR_218_C(BOOST_PP_BOOL(p(219, s)), s, p, o, m) +# define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_FOR_219_C(BOOST_PP_BOOL(p(220, s)), s, p, o, m) +# define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_FOR_220_C(BOOST_PP_BOOL(p(221, s)), s, p, o, m) +# define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_FOR_221_C(BOOST_PP_BOOL(p(222, s)), s, p, o, m) +# define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_FOR_222_C(BOOST_PP_BOOL(p(223, s)), s, p, o, m) +# define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_FOR_223_C(BOOST_PP_BOOL(p(224, s)), s, p, o, m) +# define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_FOR_224_C(BOOST_PP_BOOL(p(225, s)), s, p, o, m) +# define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_FOR_225_C(BOOST_PP_BOOL(p(226, s)), s, p, o, m) +# define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_FOR_226_C(BOOST_PP_BOOL(p(227, s)), s, p, o, m) +# define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_FOR_227_C(BOOST_PP_BOOL(p(228, s)), s, p, o, m) +# define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_FOR_228_C(BOOST_PP_BOOL(p(229, s)), s, p, o, m) +# define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_FOR_229_C(BOOST_PP_BOOL(p(230, s)), s, p, o, m) +# define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_FOR_230_C(BOOST_PP_BOOL(p(231, s)), s, p, o, m) +# define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_FOR_231_C(BOOST_PP_BOOL(p(232, s)), s, p, o, m) +# define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_FOR_232_C(BOOST_PP_BOOL(p(233, s)), s, p, o, m) +# define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_FOR_233_C(BOOST_PP_BOOL(p(234, s)), s, p, o, m) +# define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_FOR_234_C(BOOST_PP_BOOL(p(235, s)), s, p, o, m) +# define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_FOR_235_C(BOOST_PP_BOOL(p(236, s)), s, p, o, m) +# define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_FOR_236_C(BOOST_PP_BOOL(p(237, s)), s, p, o, m) +# define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_FOR_237_C(BOOST_PP_BOOL(p(238, s)), s, p, o, m) +# define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_FOR_238_C(BOOST_PP_BOOL(p(239, s)), s, p, o, m) +# define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_FOR_239_C(BOOST_PP_BOOL(p(240, s)), s, p, o, m) +# define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_FOR_240_C(BOOST_PP_BOOL(p(241, s)), s, p, o, m) +# define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_FOR_241_C(BOOST_PP_BOOL(p(242, s)), s, p, o, m) +# define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_FOR_242_C(BOOST_PP_BOOL(p(243, s)), s, p, o, m) +# define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_FOR_243_C(BOOST_PP_BOOL(p(244, s)), s, p, o, m) +# define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_FOR_244_C(BOOST_PP_BOOL(p(245, s)), s, p, o, m) +# define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_FOR_245_C(BOOST_PP_BOOL(p(246, s)), s, p, o, m) +# define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_FOR_246_C(BOOST_PP_BOOL(p(247, s)), s, p, o, m) +# define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_FOR_247_C(BOOST_PP_BOOL(p(248, s)), s, p, o, m) +# define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_FOR_248_C(BOOST_PP_BOOL(p(249, s)), s, p, o, m) +# define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_FOR_249_C(BOOST_PP_BOOL(p(250, s)), s, p, o, m) +# define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_FOR_250_C(BOOST_PP_BOOL(p(251, s)), s, p, o, m) +# define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_FOR_251_C(BOOST_PP_BOOL(p(252, s)), s, p, o, m) +# define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_FOR_252_C(BOOST_PP_BOOL(p(253, s)), s, p, o, m) +# define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_FOR_253_C(BOOST_PP_BOOL(p(254, s)), s, p, o, m) +# define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_FOR_254_C(BOOST_PP_BOOL(p(255, s)), s, p, o, m) +# define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_FOR_255_C(BOOST_PP_BOOL(p(256, s)), s, p, o, m) +# define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_FOR_256_C(BOOST_PP_BOOL(p(257, s)), s, p, o, m) +# +# define BOOST_PP_FOR_1_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IIF(c, BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(2, s), p, o, m) +# define BOOST_PP_FOR_2_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IIF(c, BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(3, s), p, o, m) +# define BOOST_PP_FOR_3_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IIF(c, BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(4, s), p, o, m) +# define BOOST_PP_FOR_4_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IIF(c, BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(5, s), p, o, m) +# define BOOST_PP_FOR_5_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IIF(c, BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(6, s), p, o, m) +# define BOOST_PP_FOR_6_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IIF(c, BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(7, s), p, o, m) +# define BOOST_PP_FOR_7_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IIF(c, BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(8, s), p, o, m) +# define BOOST_PP_FOR_8_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IIF(c, BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(9, s), p, o, m) +# define BOOST_PP_FOR_9_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IIF(c, BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(10, s), p, o, m) +# define BOOST_PP_FOR_10_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IIF(c, BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(11, s), p, o, m) +# define BOOST_PP_FOR_11_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IIF(c, BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(12, s), p, o, m) +# define BOOST_PP_FOR_12_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IIF(c, BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(13, s), p, o, m) +# define BOOST_PP_FOR_13_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IIF(c, BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(14, s), p, o, m) +# define BOOST_PP_FOR_14_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IIF(c, BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(15, s), p, o, m) +# define BOOST_PP_FOR_15_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IIF(c, BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(16, s), p, o, m) +# define BOOST_PP_FOR_16_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IIF(c, BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(17, s), p, o, m) +# define BOOST_PP_FOR_17_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IIF(c, BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(18, s), p, o, m) +# define BOOST_PP_FOR_18_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IIF(c, BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(19, s), p, o, m) +# define BOOST_PP_FOR_19_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IIF(c, BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(20, s), p, o, m) +# define BOOST_PP_FOR_20_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IIF(c, BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(21, s), p, o, m) +# define BOOST_PP_FOR_21_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IIF(c, BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(22, s), p, o, m) +# define BOOST_PP_FOR_22_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IIF(c, BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(23, s), p, o, m) +# define BOOST_PP_FOR_23_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IIF(c, BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(24, s), p, o, m) +# define BOOST_PP_FOR_24_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IIF(c, BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(25, s), p, o, m) +# define BOOST_PP_FOR_25_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IIF(c, BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(26, s), p, o, m) +# define BOOST_PP_FOR_26_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IIF(c, BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(27, s), p, o, m) +# define BOOST_PP_FOR_27_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IIF(c, BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(28, s), p, o, m) +# define BOOST_PP_FOR_28_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IIF(c, BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(29, s), p, o, m) +# define BOOST_PP_FOR_29_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IIF(c, BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(30, s), p, o, m) +# define BOOST_PP_FOR_30_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IIF(c, BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(31, s), p, o, m) +# define BOOST_PP_FOR_31_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IIF(c, BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(32, s), p, o, m) +# define BOOST_PP_FOR_32_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IIF(c, BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(33, s), p, o, m) +# define BOOST_PP_FOR_33_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IIF(c, BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(34, s), p, o, m) +# define BOOST_PP_FOR_34_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IIF(c, BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(35, s), p, o, m) +# define BOOST_PP_FOR_35_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IIF(c, BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(36, s), p, o, m) +# define BOOST_PP_FOR_36_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IIF(c, BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(37, s), p, o, m) +# define BOOST_PP_FOR_37_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IIF(c, BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(38, s), p, o, m) +# define BOOST_PP_FOR_38_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IIF(c, BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(39, s), p, o, m) +# define BOOST_PP_FOR_39_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IIF(c, BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(40, s), p, o, m) +# define BOOST_PP_FOR_40_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IIF(c, BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(41, s), p, o, m) +# define BOOST_PP_FOR_41_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IIF(c, BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(42, s), p, o, m) +# define BOOST_PP_FOR_42_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IIF(c, BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(43, s), p, o, m) +# define BOOST_PP_FOR_43_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IIF(c, BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(44, s), p, o, m) +# define BOOST_PP_FOR_44_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IIF(c, BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(45, s), p, o, m) +# define BOOST_PP_FOR_45_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IIF(c, BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(46, s), p, o, m) +# define BOOST_PP_FOR_46_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IIF(c, BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(47, s), p, o, m) +# define BOOST_PP_FOR_47_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IIF(c, BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(48, s), p, o, m) +# define BOOST_PP_FOR_48_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IIF(c, BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(49, s), p, o, m) +# define BOOST_PP_FOR_49_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IIF(c, BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(50, s), p, o, m) +# define BOOST_PP_FOR_50_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IIF(c, BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(51, s), p, o, m) +# define BOOST_PP_FOR_51_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IIF(c, BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(52, s), p, o, m) +# define BOOST_PP_FOR_52_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IIF(c, BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(53, s), p, o, m) +# define BOOST_PP_FOR_53_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IIF(c, BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(54, s), p, o, m) +# define BOOST_PP_FOR_54_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IIF(c, BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(55, s), p, o, m) +# define BOOST_PP_FOR_55_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IIF(c, BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(56, s), p, o, m) +# define BOOST_PP_FOR_56_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IIF(c, BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(57, s), p, o, m) +# define BOOST_PP_FOR_57_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IIF(c, BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(58, s), p, o, m) +# define BOOST_PP_FOR_58_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IIF(c, BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(59, s), p, o, m) +# define BOOST_PP_FOR_59_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IIF(c, BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(60, s), p, o, m) +# define BOOST_PP_FOR_60_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IIF(c, BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(61, s), p, o, m) +# define BOOST_PP_FOR_61_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IIF(c, BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(62, s), p, o, m) +# define BOOST_PP_FOR_62_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IIF(c, BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(63, s), p, o, m) +# define BOOST_PP_FOR_63_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IIF(c, BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(64, s), p, o, m) +# define BOOST_PP_FOR_64_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IIF(c, BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(65, s), p, o, m) +# define BOOST_PP_FOR_65_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IIF(c, BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(66, s), p, o, m) +# define BOOST_PP_FOR_66_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IIF(c, BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(67, s), p, o, m) +# define BOOST_PP_FOR_67_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IIF(c, BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(68, s), p, o, m) +# define BOOST_PP_FOR_68_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IIF(c, BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(69, s), p, o, m) +# define BOOST_PP_FOR_69_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IIF(c, BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(70, s), p, o, m) +# define BOOST_PP_FOR_70_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IIF(c, BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(71, s), p, o, m) +# define BOOST_PP_FOR_71_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IIF(c, BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(72, s), p, o, m) +# define BOOST_PP_FOR_72_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IIF(c, BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(73, s), p, o, m) +# define BOOST_PP_FOR_73_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IIF(c, BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(74, s), p, o, m) +# define BOOST_PP_FOR_74_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IIF(c, BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(75, s), p, o, m) +# define BOOST_PP_FOR_75_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IIF(c, BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(76, s), p, o, m) +# define BOOST_PP_FOR_76_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IIF(c, BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(77, s), p, o, m) +# define BOOST_PP_FOR_77_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IIF(c, BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(78, s), p, o, m) +# define BOOST_PP_FOR_78_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IIF(c, BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(79, s), p, o, m) +# define BOOST_PP_FOR_79_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IIF(c, BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(80, s), p, o, m) +# define BOOST_PP_FOR_80_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IIF(c, BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(81, s), p, o, m) +# define BOOST_PP_FOR_81_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IIF(c, BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(82, s), p, o, m) +# define BOOST_PP_FOR_82_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IIF(c, BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(83, s), p, o, m) +# define BOOST_PP_FOR_83_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IIF(c, BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(84, s), p, o, m) +# define BOOST_PP_FOR_84_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IIF(c, BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(85, s), p, o, m) +# define BOOST_PP_FOR_85_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IIF(c, BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(86, s), p, o, m) +# define BOOST_PP_FOR_86_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IIF(c, BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(87, s), p, o, m) +# define BOOST_PP_FOR_87_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IIF(c, BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(88, s), p, o, m) +# define BOOST_PP_FOR_88_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IIF(c, BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(89, s), p, o, m) +# define BOOST_PP_FOR_89_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IIF(c, BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(90, s), p, o, m) +# define BOOST_PP_FOR_90_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IIF(c, BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(91, s), p, o, m) +# define BOOST_PP_FOR_91_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IIF(c, BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(92, s), p, o, m) +# define BOOST_PP_FOR_92_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IIF(c, BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(93, s), p, o, m) +# define BOOST_PP_FOR_93_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IIF(c, BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(94, s), p, o, m) +# define BOOST_PP_FOR_94_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IIF(c, BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(95, s), p, o, m) +# define BOOST_PP_FOR_95_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IIF(c, BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(96, s), p, o, m) +# define BOOST_PP_FOR_96_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IIF(c, BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(97, s), p, o, m) +# define BOOST_PP_FOR_97_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IIF(c, BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(98, s), p, o, m) +# define BOOST_PP_FOR_98_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IIF(c, BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(99, s), p, o, m) +# define BOOST_PP_FOR_99_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IIF(c, BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(100, s), p, o, m) +# define BOOST_PP_FOR_100_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IIF(c, BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(101, s), p, o, m) +# define BOOST_PP_FOR_101_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IIF(c, BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(102, s), p, o, m) +# define BOOST_PP_FOR_102_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IIF(c, BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(103, s), p, o, m) +# define BOOST_PP_FOR_103_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IIF(c, BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(104, s), p, o, m) +# define BOOST_PP_FOR_104_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IIF(c, BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(105, s), p, o, m) +# define BOOST_PP_FOR_105_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IIF(c, BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(106, s), p, o, m) +# define BOOST_PP_FOR_106_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IIF(c, BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(107, s), p, o, m) +# define BOOST_PP_FOR_107_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IIF(c, BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(108, s), p, o, m) +# define BOOST_PP_FOR_108_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IIF(c, BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(109, s), p, o, m) +# define BOOST_PP_FOR_109_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IIF(c, BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(110, s), p, o, m) +# define BOOST_PP_FOR_110_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IIF(c, BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(111, s), p, o, m) +# define BOOST_PP_FOR_111_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IIF(c, BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(112, s), p, o, m) +# define BOOST_PP_FOR_112_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IIF(c, BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(113, s), p, o, m) +# define BOOST_PP_FOR_113_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IIF(c, BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(114, s), p, o, m) +# define BOOST_PP_FOR_114_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IIF(c, BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(115, s), p, o, m) +# define BOOST_PP_FOR_115_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IIF(c, BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(116, s), p, o, m) +# define BOOST_PP_FOR_116_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IIF(c, BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(117, s), p, o, m) +# define BOOST_PP_FOR_117_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IIF(c, BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(118, s), p, o, m) +# define BOOST_PP_FOR_118_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IIF(c, BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(119, s), p, o, m) +# define BOOST_PP_FOR_119_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IIF(c, BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(120, s), p, o, m) +# define BOOST_PP_FOR_120_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IIF(c, BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(121, s), p, o, m) +# define BOOST_PP_FOR_121_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IIF(c, BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(122, s), p, o, m) +# define BOOST_PP_FOR_122_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IIF(c, BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(123, s), p, o, m) +# define BOOST_PP_FOR_123_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IIF(c, BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(124, s), p, o, m) +# define BOOST_PP_FOR_124_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IIF(c, BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(125, s), p, o, m) +# define BOOST_PP_FOR_125_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IIF(c, BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(126, s), p, o, m) +# define BOOST_PP_FOR_126_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IIF(c, BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(127, s), p, o, m) +# define BOOST_PP_FOR_127_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IIF(c, BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(128, s), p, o, m) +# define BOOST_PP_FOR_128_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IIF(c, BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(129, s), p, o, m) +# define BOOST_PP_FOR_129_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IIF(c, BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(130, s), p, o, m) +# define BOOST_PP_FOR_130_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IIF(c, BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(131, s), p, o, m) +# define BOOST_PP_FOR_131_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IIF(c, BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(132, s), p, o, m) +# define BOOST_PP_FOR_132_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IIF(c, BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(133, s), p, o, m) +# define BOOST_PP_FOR_133_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IIF(c, BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(134, s), p, o, m) +# define BOOST_PP_FOR_134_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IIF(c, BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(135, s), p, o, m) +# define BOOST_PP_FOR_135_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IIF(c, BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(136, s), p, o, m) +# define BOOST_PP_FOR_136_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IIF(c, BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(137, s), p, o, m) +# define BOOST_PP_FOR_137_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IIF(c, BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(138, s), p, o, m) +# define BOOST_PP_FOR_138_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IIF(c, BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(139, s), p, o, m) +# define BOOST_PP_FOR_139_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IIF(c, BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(140, s), p, o, m) +# define BOOST_PP_FOR_140_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IIF(c, BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(141, s), p, o, m) +# define BOOST_PP_FOR_141_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IIF(c, BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(142, s), p, o, m) +# define BOOST_PP_FOR_142_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IIF(c, BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(143, s), p, o, m) +# define BOOST_PP_FOR_143_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IIF(c, BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(144, s), p, o, m) +# define BOOST_PP_FOR_144_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IIF(c, BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(145, s), p, o, m) +# define BOOST_PP_FOR_145_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IIF(c, BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(146, s), p, o, m) +# define BOOST_PP_FOR_146_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IIF(c, BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(147, s), p, o, m) +# define BOOST_PP_FOR_147_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IIF(c, BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(148, s), p, o, m) +# define BOOST_PP_FOR_148_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IIF(c, BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(149, s), p, o, m) +# define BOOST_PP_FOR_149_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IIF(c, BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(150, s), p, o, m) +# define BOOST_PP_FOR_150_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IIF(c, BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(151, s), p, o, m) +# define BOOST_PP_FOR_151_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IIF(c, BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(152, s), p, o, m) +# define BOOST_PP_FOR_152_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IIF(c, BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(153, s), p, o, m) +# define BOOST_PP_FOR_153_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IIF(c, BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(154, s), p, o, m) +# define BOOST_PP_FOR_154_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IIF(c, BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(155, s), p, o, m) +# define BOOST_PP_FOR_155_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IIF(c, BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(156, s), p, o, m) +# define BOOST_PP_FOR_156_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IIF(c, BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(157, s), p, o, m) +# define BOOST_PP_FOR_157_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IIF(c, BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(158, s), p, o, m) +# define BOOST_PP_FOR_158_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IIF(c, BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(159, s), p, o, m) +# define BOOST_PP_FOR_159_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IIF(c, BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(160, s), p, o, m) +# define BOOST_PP_FOR_160_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IIF(c, BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(161, s), p, o, m) +# define BOOST_PP_FOR_161_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IIF(c, BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(162, s), p, o, m) +# define BOOST_PP_FOR_162_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IIF(c, BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(163, s), p, o, m) +# define BOOST_PP_FOR_163_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IIF(c, BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(164, s), p, o, m) +# define BOOST_PP_FOR_164_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IIF(c, BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(165, s), p, o, m) +# define BOOST_PP_FOR_165_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IIF(c, BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(166, s), p, o, m) +# define BOOST_PP_FOR_166_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IIF(c, BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(167, s), p, o, m) +# define BOOST_PP_FOR_167_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IIF(c, BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(168, s), p, o, m) +# define BOOST_PP_FOR_168_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IIF(c, BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(169, s), p, o, m) +# define BOOST_PP_FOR_169_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IIF(c, BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(170, s), p, o, m) +# define BOOST_PP_FOR_170_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IIF(c, BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(171, s), p, o, m) +# define BOOST_PP_FOR_171_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IIF(c, BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(172, s), p, o, m) +# define BOOST_PP_FOR_172_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IIF(c, BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(173, s), p, o, m) +# define BOOST_PP_FOR_173_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IIF(c, BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(174, s), p, o, m) +# define BOOST_PP_FOR_174_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IIF(c, BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(175, s), p, o, m) +# define BOOST_PP_FOR_175_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IIF(c, BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(176, s), p, o, m) +# define BOOST_PP_FOR_176_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IIF(c, BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(177, s), p, o, m) +# define BOOST_PP_FOR_177_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IIF(c, BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(178, s), p, o, m) +# define BOOST_PP_FOR_178_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IIF(c, BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(179, s), p, o, m) +# define BOOST_PP_FOR_179_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IIF(c, BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(180, s), p, o, m) +# define BOOST_PP_FOR_180_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IIF(c, BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(181, s), p, o, m) +# define BOOST_PP_FOR_181_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IIF(c, BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(182, s), p, o, m) +# define BOOST_PP_FOR_182_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IIF(c, BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(183, s), p, o, m) +# define BOOST_PP_FOR_183_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IIF(c, BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(184, s), p, o, m) +# define BOOST_PP_FOR_184_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IIF(c, BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(185, s), p, o, m) +# define BOOST_PP_FOR_185_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IIF(c, BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(186, s), p, o, m) +# define BOOST_PP_FOR_186_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IIF(c, BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(187, s), p, o, m) +# define BOOST_PP_FOR_187_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IIF(c, BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(188, s), p, o, m) +# define BOOST_PP_FOR_188_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IIF(c, BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(189, s), p, o, m) +# define BOOST_PP_FOR_189_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IIF(c, BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(190, s), p, o, m) +# define BOOST_PP_FOR_190_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IIF(c, BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(191, s), p, o, m) +# define BOOST_PP_FOR_191_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IIF(c, BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(192, s), p, o, m) +# define BOOST_PP_FOR_192_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IIF(c, BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(193, s), p, o, m) +# define BOOST_PP_FOR_193_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IIF(c, BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(194, s), p, o, m) +# define BOOST_PP_FOR_194_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IIF(c, BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(195, s), p, o, m) +# define BOOST_PP_FOR_195_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IIF(c, BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(196, s), p, o, m) +# define BOOST_PP_FOR_196_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IIF(c, BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(197, s), p, o, m) +# define BOOST_PP_FOR_197_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IIF(c, BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(198, s), p, o, m) +# define BOOST_PP_FOR_198_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IIF(c, BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(199, s), p, o, m) +# define BOOST_PP_FOR_199_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IIF(c, BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(200, s), p, o, m) +# define BOOST_PP_FOR_200_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IIF(c, BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(201, s), p, o, m) +# define BOOST_PP_FOR_201_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IIF(c, BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(202, s), p, o, m) +# define BOOST_PP_FOR_202_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IIF(c, BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(203, s), p, o, m) +# define BOOST_PP_FOR_203_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IIF(c, BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(204, s), p, o, m) +# define BOOST_PP_FOR_204_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IIF(c, BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(205, s), p, o, m) +# define BOOST_PP_FOR_205_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IIF(c, BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(206, s), p, o, m) +# define BOOST_PP_FOR_206_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IIF(c, BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(207, s), p, o, m) +# define BOOST_PP_FOR_207_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IIF(c, BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(208, s), p, o, m) +# define BOOST_PP_FOR_208_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IIF(c, BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(209, s), p, o, m) +# define BOOST_PP_FOR_209_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IIF(c, BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(210, s), p, o, m) +# define BOOST_PP_FOR_210_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IIF(c, BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(211, s), p, o, m) +# define BOOST_PP_FOR_211_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IIF(c, BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(212, s), p, o, m) +# define BOOST_PP_FOR_212_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IIF(c, BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(213, s), p, o, m) +# define BOOST_PP_FOR_213_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IIF(c, BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(214, s), p, o, m) +# define BOOST_PP_FOR_214_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IIF(c, BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(215, s), p, o, m) +# define BOOST_PP_FOR_215_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IIF(c, BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(216, s), p, o, m) +# define BOOST_PP_FOR_216_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IIF(c, BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(217, s), p, o, m) +# define BOOST_PP_FOR_217_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IIF(c, BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(218, s), p, o, m) +# define BOOST_PP_FOR_218_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IIF(c, BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(219, s), p, o, m) +# define BOOST_PP_FOR_219_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IIF(c, BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(220, s), p, o, m) +# define BOOST_PP_FOR_220_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IIF(c, BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(221, s), p, o, m) +# define BOOST_PP_FOR_221_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IIF(c, BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(222, s), p, o, m) +# define BOOST_PP_FOR_222_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IIF(c, BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(223, s), p, o, m) +# define BOOST_PP_FOR_223_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IIF(c, BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(224, s), p, o, m) +# define BOOST_PP_FOR_224_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IIF(c, BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(225, s), p, o, m) +# define BOOST_PP_FOR_225_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IIF(c, BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(226, s), p, o, m) +# define BOOST_PP_FOR_226_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IIF(c, BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(227, s), p, o, m) +# define BOOST_PP_FOR_227_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IIF(c, BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(228, s), p, o, m) +# define BOOST_PP_FOR_228_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IIF(c, BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(229, s), p, o, m) +# define BOOST_PP_FOR_229_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IIF(c, BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(230, s), p, o, m) +# define BOOST_PP_FOR_230_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IIF(c, BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(231, s), p, o, m) +# define BOOST_PP_FOR_231_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IIF(c, BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(232, s), p, o, m) +# define BOOST_PP_FOR_232_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IIF(c, BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(233, s), p, o, m) +# define BOOST_PP_FOR_233_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IIF(c, BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(234, s), p, o, m) +# define BOOST_PP_FOR_234_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IIF(c, BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(235, s), p, o, m) +# define BOOST_PP_FOR_235_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IIF(c, BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(236, s), p, o, m) +# define BOOST_PP_FOR_236_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IIF(c, BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(237, s), p, o, m) +# define BOOST_PP_FOR_237_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IIF(c, BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(238, s), p, o, m) +# define BOOST_PP_FOR_238_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IIF(c, BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(239, s), p, o, m) +# define BOOST_PP_FOR_239_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IIF(c, BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(240, s), p, o, m) +# define BOOST_PP_FOR_240_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IIF(c, BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(241, s), p, o, m) +# define BOOST_PP_FOR_241_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IIF(c, BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(242, s), p, o, m) +# define BOOST_PP_FOR_242_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IIF(c, BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(243, s), p, o, m) +# define BOOST_PP_FOR_243_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IIF(c, BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(244, s), p, o, m) +# define BOOST_PP_FOR_244_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IIF(c, BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(245, s), p, o, m) +# define BOOST_PP_FOR_245_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IIF(c, BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(246, s), p, o, m) +# define BOOST_PP_FOR_246_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IIF(c, BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(247, s), p, o, m) +# define BOOST_PP_FOR_247_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IIF(c, BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(248, s), p, o, m) +# define BOOST_PP_FOR_248_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IIF(c, BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(249, s), p, o, m) +# define BOOST_PP_FOR_249_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IIF(c, BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(250, s), p, o, m) +# define BOOST_PP_FOR_250_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IIF(c, BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(251, s), p, o, m) +# define BOOST_PP_FOR_251_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IIF(c, BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(252, s), p, o, m) +# define BOOST_PP_FOR_252_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IIF(c, BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(253, s), p, o, m) +# define BOOST_PP_FOR_253_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IIF(c, BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(254, s), p, o, m) +# define BOOST_PP_FOR_254_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IIF(c, BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(255, s), p, o, m) +# define BOOST_PP_FOR_255_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IIF(c, BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(256, s), p, o, m) +# define BOOST_PP_FOR_256_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IIF(c, BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(257, s), p, o, m) +# +# endif diff --git a/contrib/src/boost/preprocessor/repetition/detail/msvc/for.hpp b/contrib/src/boost/preprocessor/repetition/detail/msvc/for.hpp new file mode 100644 index 0000000..35c1996 --- /dev/null +++ b/contrib/src/boost/preprocessor/repetition/detail/msvc/for.hpp @@ -0,0 +1,277 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_MSVC_FOR_HPP +# define BOOST_PREPROCESSOR_REPETITION_DETAIL_MSVC_FOR_HPP +# +# include +# include +# +# define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_IF(p(2, s), m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IF(p(2, s), BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(o(2, s), p, o, m) +# define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_IF(p(3, s), m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IF(p(3, s), BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(o(3, s), p, o, m) +# define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_IF(p(4, s), m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IF(p(4, s), BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(o(4, s), p, o, m) +# define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_IF(p(5, s), m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IF(p(5, s), BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(o(5, s), p, o, m) +# define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_IF(p(6, s), m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IF(p(6, s), BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(o(6, s), p, o, m) +# define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_IF(p(7, s), m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IF(p(7, s), BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(o(7, s), p, o, m) +# define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_IF(p(8, s), m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IF(p(8, s), BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(o(8, s), p, o, m) +# define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_IF(p(9, s), m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IF(p(9, s), BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(o(9, s), p, o, m) +# define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_IF(p(10, s), m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IF(p(10, s), BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(o(10, s), p, o, m) +# define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_IF(p(11, s), m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IF(p(11, s), BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(o(11, s), p, o, m) +# define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_IF(p(12, s), m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IF(p(12, s), BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(o(12, s), p, o, m) +# define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_IF(p(13, s), m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IF(p(13, s), BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(o(13, s), p, o, m) +# define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_IF(p(14, s), m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IF(p(14, s), BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(o(14, s), p, o, m) +# define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_IF(p(15, s), m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IF(p(15, s), BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(o(15, s), p, o, m) +# define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_IF(p(16, s), m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IF(p(16, s), BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(o(16, s), p, o, m) +# define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_IF(p(17, s), m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IF(p(17, s), BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(o(17, s), p, o, m) +# define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_IF(p(18, s), m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IF(p(18, s), BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(o(18, s), p, o, m) +# define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_IF(p(19, s), m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IF(p(19, s), BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(o(19, s), p, o, m) +# define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_IF(p(20, s), m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IF(p(20, s), BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(o(20, s), p, o, m) +# define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_IF(p(21, s), m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IF(p(21, s), BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(o(21, s), p, o, m) +# define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_IF(p(22, s), m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IF(p(22, s), BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(o(22, s), p, o, m) +# define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_IF(p(23, s), m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IF(p(23, s), BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(o(23, s), p, o, m) +# define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_IF(p(24, s), m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IF(p(24, s), BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(o(24, s), p, o, m) +# define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_IF(p(25, s), m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IF(p(25, s), BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(o(25, s), p, o, m) +# define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_IF(p(26, s), m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IF(p(26, s), BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(o(26, s), p, o, m) +# define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_IF(p(27, s), m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IF(p(27, s), BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(o(27, s), p, o, m) +# define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_IF(p(28, s), m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IF(p(28, s), BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(o(28, s), p, o, m) +# define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_IF(p(29, s), m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IF(p(29, s), BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(o(29, s), p, o, m) +# define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_IF(p(30, s), m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IF(p(30, s), BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(o(30, s), p, o, m) +# define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_IF(p(31, s), m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IF(p(31, s), BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(o(31, s), p, o, m) +# define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_IF(p(32, s), m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IF(p(32, s), BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(o(32, s), p, o, m) +# define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_IF(p(33, s), m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IF(p(33, s), BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(o(33, s), p, o, m) +# define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_IF(p(34, s), m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IF(p(34, s), BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(o(34, s), p, o, m) +# define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_IF(p(35, s), m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IF(p(35, s), BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(o(35, s), p, o, m) +# define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_IF(p(36, s), m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IF(p(36, s), BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(o(36, s), p, o, m) +# define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_IF(p(37, s), m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IF(p(37, s), BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(o(37, s), p, o, m) +# define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_IF(p(38, s), m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IF(p(38, s), BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(o(38, s), p, o, m) +# define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_IF(p(39, s), m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IF(p(39, s), BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(o(39, s), p, o, m) +# define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_IF(p(40, s), m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IF(p(40, s), BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(o(40, s), p, o, m) +# define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_IF(p(41, s), m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IF(p(41, s), BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(o(41, s), p, o, m) +# define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_IF(p(42, s), m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IF(p(42, s), BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(o(42, s), p, o, m) +# define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_IF(p(43, s), m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IF(p(43, s), BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(o(43, s), p, o, m) +# define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_IF(p(44, s), m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IF(p(44, s), BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(o(44, s), p, o, m) +# define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_IF(p(45, s), m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IF(p(45, s), BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(o(45, s), p, o, m) +# define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_IF(p(46, s), m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IF(p(46, s), BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(o(46, s), p, o, m) +# define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_IF(p(47, s), m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IF(p(47, s), BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(o(47, s), p, o, m) +# define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_IF(p(48, s), m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IF(p(48, s), BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(o(48, s), p, o, m) +# define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_IF(p(49, s), m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IF(p(49, s), BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(o(49, s), p, o, m) +# define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_IF(p(50, s), m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IF(p(50, s), BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(o(50, s), p, o, m) +# define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_IF(p(51, s), m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IF(p(51, s), BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(o(51, s), p, o, m) +# define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_IF(p(52, s), m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IF(p(52, s), BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(o(52, s), p, o, m) +# define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_IF(p(53, s), m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IF(p(53, s), BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(o(53, s), p, o, m) +# define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_IF(p(54, s), m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IF(p(54, s), BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(o(54, s), p, o, m) +# define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_IF(p(55, s), m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IF(p(55, s), BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(o(55, s), p, o, m) +# define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_IF(p(56, s), m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IF(p(56, s), BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(o(56, s), p, o, m) +# define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_IF(p(57, s), m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IF(p(57, s), BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(o(57, s), p, o, m) +# define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_IF(p(58, s), m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IF(p(58, s), BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(o(58, s), p, o, m) +# define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_IF(p(59, s), m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IF(p(59, s), BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(o(59, s), p, o, m) +# define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_IF(p(60, s), m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IF(p(60, s), BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(o(60, s), p, o, m) +# define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_IF(p(61, s), m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IF(p(61, s), BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(o(61, s), p, o, m) +# define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_IF(p(62, s), m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IF(p(62, s), BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(o(62, s), p, o, m) +# define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_IF(p(63, s), m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IF(p(63, s), BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(o(63, s), p, o, m) +# define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_IF(p(64, s), m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IF(p(64, s), BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(o(64, s), p, o, m) +# define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_IF(p(65, s), m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IF(p(65, s), BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(o(65, s), p, o, m) +# define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_IF(p(66, s), m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IF(p(66, s), BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(o(66, s), p, o, m) +# define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_IF(p(67, s), m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IF(p(67, s), BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(o(67, s), p, o, m) +# define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_IF(p(68, s), m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IF(p(68, s), BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(o(68, s), p, o, m) +# define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_IF(p(69, s), m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IF(p(69, s), BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(o(69, s), p, o, m) +# define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_IF(p(70, s), m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IF(p(70, s), BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(o(70, s), p, o, m) +# define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_IF(p(71, s), m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IF(p(71, s), BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(o(71, s), p, o, m) +# define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_IF(p(72, s), m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IF(p(72, s), BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(o(72, s), p, o, m) +# define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_IF(p(73, s), m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IF(p(73, s), BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(o(73, s), p, o, m) +# define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_IF(p(74, s), m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IF(p(74, s), BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(o(74, s), p, o, m) +# define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_IF(p(75, s), m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IF(p(75, s), BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(o(75, s), p, o, m) +# define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_IF(p(76, s), m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IF(p(76, s), BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(o(76, s), p, o, m) +# define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_IF(p(77, s), m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IF(p(77, s), BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(o(77, s), p, o, m) +# define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_IF(p(78, s), m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IF(p(78, s), BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(o(78, s), p, o, m) +# define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_IF(p(79, s), m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IF(p(79, s), BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(o(79, s), p, o, m) +# define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_IF(p(80, s), m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IF(p(80, s), BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(o(80, s), p, o, m) +# define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_IF(p(81, s), m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IF(p(81, s), BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(o(81, s), p, o, m) +# define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_IF(p(82, s), m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IF(p(82, s), BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(o(82, s), p, o, m) +# define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_IF(p(83, s), m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IF(p(83, s), BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(o(83, s), p, o, m) +# define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_IF(p(84, s), m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IF(p(84, s), BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(o(84, s), p, o, m) +# define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_IF(p(85, s), m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IF(p(85, s), BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(o(85, s), p, o, m) +# define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_IF(p(86, s), m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IF(p(86, s), BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(o(86, s), p, o, m) +# define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_IF(p(87, s), m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IF(p(87, s), BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(o(87, s), p, o, m) +# define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_IF(p(88, s), m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IF(p(88, s), BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(o(88, s), p, o, m) +# define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_IF(p(89, s), m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IF(p(89, s), BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(o(89, s), p, o, m) +# define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_IF(p(90, s), m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IF(p(90, s), BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(o(90, s), p, o, m) +# define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_IF(p(91, s), m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IF(p(91, s), BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(o(91, s), p, o, m) +# define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_IF(p(92, s), m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IF(p(92, s), BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(o(92, s), p, o, m) +# define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_IF(p(93, s), m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IF(p(93, s), BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(o(93, s), p, o, m) +# define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_IF(p(94, s), m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IF(p(94, s), BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(o(94, s), p, o, m) +# define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_IF(p(95, s), m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IF(p(95, s), BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(o(95, s), p, o, m) +# define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_IF(p(96, s), m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IF(p(96, s), BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(o(96, s), p, o, m) +# define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_IF(p(97, s), m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IF(p(97, s), BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(o(97, s), p, o, m) +# define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_IF(p(98, s), m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IF(p(98, s), BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(o(98, s), p, o, m) +# define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_IF(p(99, s), m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IF(p(99, s), BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(o(99, s), p, o, m) +# define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_IF(p(100, s), m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IF(p(100, s), BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(o(100, s), p, o, m) +# define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_IF(p(101, s), m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IF(p(101, s), BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(o(101, s), p, o, m) +# define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_IF(p(102, s), m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IF(p(102, s), BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(o(102, s), p, o, m) +# define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_IF(p(103, s), m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IF(p(103, s), BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(o(103, s), p, o, m) +# define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_IF(p(104, s), m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IF(p(104, s), BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(o(104, s), p, o, m) +# define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_IF(p(105, s), m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IF(p(105, s), BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(o(105, s), p, o, m) +# define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_IF(p(106, s), m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IF(p(106, s), BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(o(106, s), p, o, m) +# define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_IF(p(107, s), m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IF(p(107, s), BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(o(107, s), p, o, m) +# define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_IF(p(108, s), m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IF(p(108, s), BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(o(108, s), p, o, m) +# define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_IF(p(109, s), m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IF(p(109, s), BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(o(109, s), p, o, m) +# define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_IF(p(110, s), m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IF(p(110, s), BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(o(110, s), p, o, m) +# define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_IF(p(111, s), m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IF(p(111, s), BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(o(111, s), p, o, m) +# define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_IF(p(112, s), m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IF(p(112, s), BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(o(112, s), p, o, m) +# define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_IF(p(113, s), m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IF(p(113, s), BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(o(113, s), p, o, m) +# define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_IF(p(114, s), m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IF(p(114, s), BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(o(114, s), p, o, m) +# define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_IF(p(115, s), m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IF(p(115, s), BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(o(115, s), p, o, m) +# define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_IF(p(116, s), m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IF(p(116, s), BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(o(116, s), p, o, m) +# define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_IF(p(117, s), m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IF(p(117, s), BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(o(117, s), p, o, m) +# define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_IF(p(118, s), m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IF(p(118, s), BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(o(118, s), p, o, m) +# define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_IF(p(119, s), m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IF(p(119, s), BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(o(119, s), p, o, m) +# define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_IF(p(120, s), m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IF(p(120, s), BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(o(120, s), p, o, m) +# define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_IF(p(121, s), m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IF(p(121, s), BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(o(121, s), p, o, m) +# define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_IF(p(122, s), m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IF(p(122, s), BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(o(122, s), p, o, m) +# define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_IF(p(123, s), m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IF(p(123, s), BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(o(123, s), p, o, m) +# define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_IF(p(124, s), m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IF(p(124, s), BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(o(124, s), p, o, m) +# define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_IF(p(125, s), m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IF(p(125, s), BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(o(125, s), p, o, m) +# define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_IF(p(126, s), m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IF(p(126, s), BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(o(126, s), p, o, m) +# define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_IF(p(127, s), m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IF(p(127, s), BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(o(127, s), p, o, m) +# define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_IF(p(128, s), m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IF(p(128, s), BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(o(128, s), p, o, m) +# define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_IF(p(129, s), m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IF(p(129, s), BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(o(129, s), p, o, m) +# define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_IF(p(130, s), m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IF(p(130, s), BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(o(130, s), p, o, m) +# define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_IF(p(131, s), m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IF(p(131, s), BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(o(131, s), p, o, m) +# define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_IF(p(132, s), m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IF(p(132, s), BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(o(132, s), p, o, m) +# define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_IF(p(133, s), m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IF(p(133, s), BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(o(133, s), p, o, m) +# define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_IF(p(134, s), m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IF(p(134, s), BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(o(134, s), p, o, m) +# define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_IF(p(135, s), m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IF(p(135, s), BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(o(135, s), p, o, m) +# define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_IF(p(136, s), m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IF(p(136, s), BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(o(136, s), p, o, m) +# define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_IF(p(137, s), m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IF(p(137, s), BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(o(137, s), p, o, m) +# define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_IF(p(138, s), m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IF(p(138, s), BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(o(138, s), p, o, m) +# define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_IF(p(139, s), m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IF(p(139, s), BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(o(139, s), p, o, m) +# define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_IF(p(140, s), m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IF(p(140, s), BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(o(140, s), p, o, m) +# define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_IF(p(141, s), m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IF(p(141, s), BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(o(141, s), p, o, m) +# define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_IF(p(142, s), m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IF(p(142, s), BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(o(142, s), p, o, m) +# define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_IF(p(143, s), m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IF(p(143, s), BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(o(143, s), p, o, m) +# define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_IF(p(144, s), m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IF(p(144, s), BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(o(144, s), p, o, m) +# define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_IF(p(145, s), m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IF(p(145, s), BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(o(145, s), p, o, m) +# define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_IF(p(146, s), m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IF(p(146, s), BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(o(146, s), p, o, m) +# define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_IF(p(147, s), m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IF(p(147, s), BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(o(147, s), p, o, m) +# define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_IF(p(148, s), m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IF(p(148, s), BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(o(148, s), p, o, m) +# define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_IF(p(149, s), m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IF(p(149, s), BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(o(149, s), p, o, m) +# define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_IF(p(150, s), m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IF(p(150, s), BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(o(150, s), p, o, m) +# define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_IF(p(151, s), m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IF(p(151, s), BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(o(151, s), p, o, m) +# define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_IF(p(152, s), m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IF(p(152, s), BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(o(152, s), p, o, m) +# define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_IF(p(153, s), m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IF(p(153, s), BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(o(153, s), p, o, m) +# define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_IF(p(154, s), m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IF(p(154, s), BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(o(154, s), p, o, m) +# define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_IF(p(155, s), m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IF(p(155, s), BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(o(155, s), p, o, m) +# define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_IF(p(156, s), m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IF(p(156, s), BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(o(156, s), p, o, m) +# define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_IF(p(157, s), m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IF(p(157, s), BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(o(157, s), p, o, m) +# define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_IF(p(158, s), m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IF(p(158, s), BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(o(158, s), p, o, m) +# define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_IF(p(159, s), m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IF(p(159, s), BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(o(159, s), p, o, m) +# define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_IF(p(160, s), m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IF(p(160, s), BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(o(160, s), p, o, m) +# define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_IF(p(161, s), m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IF(p(161, s), BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(o(161, s), p, o, m) +# define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_IF(p(162, s), m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IF(p(162, s), BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(o(162, s), p, o, m) +# define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_IF(p(163, s), m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IF(p(163, s), BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(o(163, s), p, o, m) +# define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_IF(p(164, s), m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IF(p(164, s), BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(o(164, s), p, o, m) +# define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_IF(p(165, s), m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IF(p(165, s), BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(o(165, s), p, o, m) +# define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_IF(p(166, s), m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IF(p(166, s), BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(o(166, s), p, o, m) +# define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_IF(p(167, s), m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IF(p(167, s), BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(o(167, s), p, o, m) +# define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_IF(p(168, s), m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IF(p(168, s), BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(o(168, s), p, o, m) +# define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_IF(p(169, s), m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IF(p(169, s), BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(o(169, s), p, o, m) +# define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_IF(p(170, s), m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IF(p(170, s), BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(o(170, s), p, o, m) +# define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_IF(p(171, s), m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IF(p(171, s), BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(o(171, s), p, o, m) +# define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_IF(p(172, s), m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IF(p(172, s), BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(o(172, s), p, o, m) +# define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_IF(p(173, s), m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IF(p(173, s), BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(o(173, s), p, o, m) +# define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_IF(p(174, s), m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IF(p(174, s), BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(o(174, s), p, o, m) +# define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_IF(p(175, s), m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IF(p(175, s), BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(o(175, s), p, o, m) +# define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_IF(p(176, s), m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IF(p(176, s), BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(o(176, s), p, o, m) +# define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_IF(p(177, s), m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IF(p(177, s), BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(o(177, s), p, o, m) +# define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_IF(p(178, s), m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IF(p(178, s), BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(o(178, s), p, o, m) +# define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_IF(p(179, s), m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IF(p(179, s), BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(o(179, s), p, o, m) +# define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_IF(p(180, s), m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IF(p(180, s), BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(o(180, s), p, o, m) +# define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_IF(p(181, s), m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IF(p(181, s), BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(o(181, s), p, o, m) +# define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_IF(p(182, s), m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IF(p(182, s), BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(o(182, s), p, o, m) +# define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_IF(p(183, s), m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IF(p(183, s), BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(o(183, s), p, o, m) +# define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_IF(p(184, s), m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IF(p(184, s), BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(o(184, s), p, o, m) +# define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_IF(p(185, s), m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IF(p(185, s), BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(o(185, s), p, o, m) +# define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_IF(p(186, s), m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IF(p(186, s), BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(o(186, s), p, o, m) +# define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_IF(p(187, s), m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IF(p(187, s), BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(o(187, s), p, o, m) +# define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_IF(p(188, s), m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IF(p(188, s), BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(o(188, s), p, o, m) +# define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_IF(p(189, s), m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IF(p(189, s), BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(o(189, s), p, o, m) +# define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_IF(p(190, s), m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IF(p(190, s), BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(o(190, s), p, o, m) +# define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_IF(p(191, s), m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IF(p(191, s), BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(o(191, s), p, o, m) +# define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_IF(p(192, s), m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IF(p(192, s), BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(o(192, s), p, o, m) +# define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_IF(p(193, s), m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IF(p(193, s), BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(o(193, s), p, o, m) +# define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_IF(p(194, s), m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IF(p(194, s), BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(o(194, s), p, o, m) +# define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_IF(p(195, s), m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IF(p(195, s), BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(o(195, s), p, o, m) +# define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_IF(p(196, s), m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IF(p(196, s), BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(o(196, s), p, o, m) +# define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_IF(p(197, s), m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IF(p(197, s), BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(o(197, s), p, o, m) +# define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_IF(p(198, s), m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IF(p(198, s), BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(o(198, s), p, o, m) +# define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_IF(p(199, s), m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IF(p(199, s), BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(o(199, s), p, o, m) +# define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_IF(p(200, s), m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IF(p(200, s), BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(o(200, s), p, o, m) +# define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_IF(p(201, s), m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IF(p(201, s), BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(o(201, s), p, o, m) +# define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_IF(p(202, s), m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IF(p(202, s), BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(o(202, s), p, o, m) +# define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_IF(p(203, s), m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IF(p(203, s), BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(o(203, s), p, o, m) +# define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_IF(p(204, s), m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IF(p(204, s), BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(o(204, s), p, o, m) +# define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_IF(p(205, s), m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IF(p(205, s), BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(o(205, s), p, o, m) +# define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_IF(p(206, s), m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IF(p(206, s), BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(o(206, s), p, o, m) +# define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_IF(p(207, s), m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IF(p(207, s), BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(o(207, s), p, o, m) +# define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_IF(p(208, s), m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IF(p(208, s), BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(o(208, s), p, o, m) +# define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_IF(p(209, s), m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IF(p(209, s), BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(o(209, s), p, o, m) +# define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_IF(p(210, s), m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IF(p(210, s), BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(o(210, s), p, o, m) +# define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_IF(p(211, s), m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IF(p(211, s), BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(o(211, s), p, o, m) +# define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_IF(p(212, s), m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IF(p(212, s), BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(o(212, s), p, o, m) +# define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_IF(p(213, s), m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IF(p(213, s), BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(o(213, s), p, o, m) +# define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_IF(p(214, s), m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IF(p(214, s), BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(o(214, s), p, o, m) +# define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_IF(p(215, s), m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IF(p(215, s), BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(o(215, s), p, o, m) +# define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_IF(p(216, s), m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IF(p(216, s), BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(o(216, s), p, o, m) +# define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_IF(p(217, s), m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IF(p(217, s), BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(o(217, s), p, o, m) +# define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_IF(p(218, s), m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IF(p(218, s), BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(o(218, s), p, o, m) +# define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_IF(p(219, s), m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IF(p(219, s), BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(o(219, s), p, o, m) +# define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_IF(p(220, s), m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IF(p(220, s), BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(o(220, s), p, o, m) +# define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_IF(p(221, s), m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IF(p(221, s), BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(o(221, s), p, o, m) +# define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_IF(p(222, s), m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IF(p(222, s), BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(o(222, s), p, o, m) +# define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_IF(p(223, s), m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IF(p(223, s), BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(o(223, s), p, o, m) +# define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_IF(p(224, s), m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IF(p(224, s), BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(o(224, s), p, o, m) +# define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_IF(p(225, s), m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IF(p(225, s), BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(o(225, s), p, o, m) +# define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_IF(p(226, s), m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IF(p(226, s), BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(o(226, s), p, o, m) +# define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_IF(p(227, s), m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IF(p(227, s), BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(o(227, s), p, o, m) +# define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_IF(p(228, s), m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IF(p(228, s), BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(o(228, s), p, o, m) +# define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_IF(p(229, s), m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IF(p(229, s), BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(o(229, s), p, o, m) +# define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_IF(p(230, s), m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IF(p(230, s), BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(o(230, s), p, o, m) +# define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_IF(p(231, s), m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IF(p(231, s), BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(o(231, s), p, o, m) +# define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_IF(p(232, s), m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IF(p(232, s), BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(o(232, s), p, o, m) +# define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_IF(p(233, s), m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IF(p(233, s), BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(o(233, s), p, o, m) +# define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_IF(p(234, s), m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IF(p(234, s), BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(o(234, s), p, o, m) +# define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_IF(p(235, s), m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IF(p(235, s), BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(o(235, s), p, o, m) +# define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_IF(p(236, s), m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IF(p(236, s), BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(o(236, s), p, o, m) +# define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_IF(p(237, s), m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IF(p(237, s), BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(o(237, s), p, o, m) +# define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_IF(p(238, s), m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IF(p(238, s), BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(o(238, s), p, o, m) +# define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_IF(p(239, s), m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IF(p(239, s), BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(o(239, s), p, o, m) +# define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_IF(p(240, s), m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IF(p(240, s), BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(o(240, s), p, o, m) +# define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_IF(p(241, s), m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IF(p(241, s), BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(o(241, s), p, o, m) +# define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_IF(p(242, s), m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IF(p(242, s), BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(o(242, s), p, o, m) +# define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_IF(p(243, s), m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IF(p(243, s), BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(o(243, s), p, o, m) +# define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_IF(p(244, s), m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IF(p(244, s), BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(o(244, s), p, o, m) +# define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_IF(p(245, s), m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IF(p(245, s), BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(o(245, s), p, o, m) +# define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_IF(p(246, s), m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IF(p(246, s), BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(o(246, s), p, o, m) +# define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_IF(p(247, s), m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IF(p(247, s), BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(o(247, s), p, o, m) +# define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_IF(p(248, s), m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IF(p(248, s), BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(o(248, s), p, o, m) +# define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_IF(p(249, s), m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IF(p(249, s), BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(o(249, s), p, o, m) +# define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_IF(p(250, s), m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IF(p(250, s), BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(o(250, s), p, o, m) +# define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_IF(p(251, s), m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IF(p(251, s), BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(o(251, s), p, o, m) +# define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_IF(p(252, s), m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IF(p(252, s), BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(o(252, s), p, o, m) +# define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_IF(p(253, s), m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IF(p(253, s), BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(o(253, s), p, o, m) +# define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_IF(p(254, s), m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IF(p(254, s), BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(o(254, s), p, o, m) +# define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_IF(p(255, s), m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IF(p(255, s), BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(o(255, s), p, o, m) +# define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_IF(p(256, s), m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IF(p(256, s), BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(o(256, s), p, o, m) +# define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_IF(p(257, s), m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IF(p(257, s), BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(o(257, s), p, o, m) +# +# endif diff --git a/contrib/src/boost/preprocessor/repetition/enum.hpp b/contrib/src/boost/preprocessor/repetition/enum.hpp new file mode 100644 index 0000000..0198cd9 --- /dev/null +++ b/contrib/src/boost/preprocessor/repetition/enum.hpp @@ -0,0 +1,66 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ENUM */ +# +# if 0 +# define BOOST_PP_ENUM(count, macro, data) +# endif +# +# define BOOST_PP_ENUM BOOST_PP_CAT(BOOST_PP_ENUM_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d)) +# define BOOST_PP_ENUM_2(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_M_2, (m, d)) +# define BOOST_PP_ENUM_3(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_M_3, (m, d)) +# else +# define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_ENUM_1_I(c, m, d) +# define BOOST_PP_ENUM_2(c, m, d) BOOST_PP_ENUM_2_I(c, m, d) +# define BOOST_PP_ENUM_3(c, m, d) BOOST_PP_ENUM_3_I(c, m, d) +# define BOOST_PP_ENUM_1_I(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d)) +# define BOOST_PP_ENUM_2_I(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_M_2, (m, d)) +# define BOOST_PP_ENUM_3_I(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_M_3, (m, d)) +# endif +# +# define BOOST_PP_ENUM_4(c, m, d) BOOST_PP_ERROR(0x0003) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_ENUM_M_1(z, n, md) BOOST_PP_ENUM_M_1_IM(z, n, BOOST_PP_TUPLE_REM_2 md) +# define BOOST_PP_ENUM_M_2(z, n, md) BOOST_PP_ENUM_M_2_IM(z, n, BOOST_PP_TUPLE_REM_2 md) +# define BOOST_PP_ENUM_M_3(z, n, md) BOOST_PP_ENUM_M_3_IM(z, n, BOOST_PP_TUPLE_REM_2 md) +# define BOOST_PP_ENUM_M_1_IM(z, n, im) BOOST_PP_ENUM_M_1_I(z, n, im) +# define BOOST_PP_ENUM_M_2_IM(z, n, im) BOOST_PP_ENUM_M_2_I(z, n, im) +# define BOOST_PP_ENUM_M_3_IM(z, n, im) BOOST_PP_ENUM_M_3_I(z, n, im) +# else +# define BOOST_PP_ENUM_M_1(z, n, md) BOOST_PP_ENUM_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) +# define BOOST_PP_ENUM_M_2(z, n, md) BOOST_PP_ENUM_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) +# define BOOST_PP_ENUM_M_3(z, n, md) BOOST_PP_ENUM_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) +# endif +# +# define BOOST_PP_ENUM_M_1_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d) +# define BOOST_PP_ENUM_M_2_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d) +# define BOOST_PP_ENUM_M_3_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d) +# +# endif diff --git a/contrib/src/boost/preprocessor/repetition/enum_binary_params.hpp b/contrib/src/boost/preprocessor/repetition/enum_binary_params.hpp new file mode 100644 index 0000000..a2c1048 --- /dev/null +++ b/contrib/src/boost/preprocessor/repetition/enum_binary_params.hpp @@ -0,0 +1,54 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_BINARY_PARAMS_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_BINARY_PARAMS_HPP +# +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ENUM_BINARY_PARAMS */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_BINARY_PARAMS(count, p1, p2) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) +# else +# define BOOST_PP_ENUM_BINARY_PARAMS(count, p1, p2) BOOST_PP_ENUM_BINARY_PARAMS_I(count, p1, p2) +# define BOOST_PP_ENUM_BINARY_PARAMS_I(count, p1, p2) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_ENUM_BINARY_PARAMS_M(z, n, pp) BOOST_PP_ENUM_BINARY_PARAMS_M_IM(z, n, BOOST_PP_TUPLE_REM_2 pp) +# define BOOST_PP_ENUM_BINARY_PARAMS_M_IM(z, n, im) BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, im) +# else +# define BOOST_PP_ENUM_BINARY_PARAMS_M(z, n, pp) BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, pp), BOOST_PP_TUPLE_ELEM(2, 1, pp)) +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, p1, p2) BOOST_PP_ENUM_BINARY_PARAMS_M_II(z, n, p1, p2) +# define BOOST_PP_ENUM_BINARY_PARAMS_M_II(z, n, p1, p2) BOOST_PP_COMMA_IF(n) p1 ## n p2 ## n +# else +# define BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, p1, p2) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(p1, n) BOOST_PP_CAT(p2, n) +# endif +# +# /* BOOST_PP_ENUM_BINARY_PARAMS_Z */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_BINARY_PARAMS_Z(z, count, p1, p2) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) +# else +# define BOOST_PP_ENUM_BINARY_PARAMS_Z(z, count, p1, p2) BOOST_PP_ENUM_BINARY_PARAMS_Z_I(z, count, p1, p2) +# define BOOST_PP_ENUM_BINARY_PARAMS_Z_I(z, count, p1, p2) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/repetition/enum_params.hpp b/contrib/src/boost/preprocessor/repetition/enum_params.hpp new file mode 100644 index 0000000..65a2369 --- /dev/null +++ b/contrib/src/boost/preprocessor/repetition/enum_params.hpp @@ -0,0 +1,41 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP +# +# include +# include +# include +# +# /* BOOST_PP_ENUM_PARAMS */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_ENUM_PARAMS_I(count, param) +# define BOOST_PP_ENUM_PARAMS_I(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) +# endif +# +# define BOOST_PP_ENUM_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) param ## n +# +# /* BOOST_PP_ENUM_PARAMS_Z */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) +# define BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/repetition/enum_shifted_params.hpp b/contrib/src/boost/preprocessor/repetition/enum_shifted_params.hpp new file mode 100644 index 0000000..88b2bf4 --- /dev/null +++ b/contrib/src/boost/preprocessor/repetition/enum_shifted_params.hpp @@ -0,0 +1,44 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP +# +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ENUM_SHIFTED_PARAMS */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) +# define BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) +# endif +# +# define BOOST_PP_ENUM_SHIFTED_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(param, BOOST_PP_INC(n)) +# +# /* BOOST_PP_ENUM_SHIFTED_PARAMS_Z */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) +# define BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/repetition/enum_trailing_params.hpp b/contrib/src/boost/preprocessor/repetition/enum_trailing_params.hpp new file mode 100644 index 0000000..f7520db --- /dev/null +++ b/contrib/src/boost/preprocessor/repetition/enum_trailing_params.hpp @@ -0,0 +1,38 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_PARAMS_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_PARAMS_HPP +# +# include +# include +# +# /* BOOST_PP_ENUM_TRAILING_PARAMS */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_TRAILING_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_TRAILING_PARAMS(count, param) BOOST_PP_ENUM_TRAILING_PARAMS_I(count, param) +# define BOOST_PP_ENUM_TRAILING_PARAMS_I(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) +# endif +# +# define BOOST_PP_ENUM_TRAILING_PARAMS_M(z, n, param) , param ## n +# +# /* BOOST_PP_ENUM_TRAILING_PARAMS_Z */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, count, param) BOOST_PP_ENUM_TRAILING_PARAMS_Z_I(z, count, param) +# define BOOST_PP_ENUM_TRAILING_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/repetition/for.hpp b/contrib/src/boost/preprocessor/repetition/for.hpp new file mode 100644 index 0000000..c38946b --- /dev/null +++ b/contrib/src/boost/preprocessor/repetition/for.hpp @@ -0,0 +1,324 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_FOR_HPP +# define BOOST_PREPROCESSOR_REPETITION_FOR_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_FOR */ +# +# if 0 +# define BOOST_PP_FOR(state, pred, op, macro) +# endif +# +# define BOOST_PP_FOR BOOST_PP_CAT(BOOST_PP_FOR_, BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 256)) +# +# define BOOST_PP_FOR_P(n) BOOST_PP_CAT(BOOST_PP_FOR_CHECK_, BOOST_PP_FOR_ ## n(1, BOOST_PP_FOR_SR_P, BOOST_PP_FOR_SR_O, BOOST_PP_FOR_SR_M)) +# +# define BOOST_PP_FOR_SR_P(r, s) s +# define BOOST_PP_FOR_SR_O(r, s) 0 +# define BOOST_PP_FOR_SR_M(r, s) BOOST_PP_NIL +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# include +# else +# include +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_FOR_257_PR(s, p) BOOST_PP_BOOL(p##(257, s)) +# else +# define BOOST_PP_FOR_257_PR(s, p) BOOST_PP_BOOL(p(257, s)) +# endif + +# define BOOST_PP_FOR_257_ERROR() BOOST_PP_ERROR(0x0002) +# define BOOST_PP_FOR_257(s, p, o, m) \ + BOOST_PP_IIF \ + ( \ + BOOST_PP_FOR_257_PR(s,p), \ + BOOST_PP_FOR_257_ERROR, \ + BOOST_PP_EMPTY \ + ) \ + () \ +/**/ +// # define BOOST_PP_FOR_257(s, p, o, m) BOOST_PP_ERROR(0x0002) +# +# define BOOST_PP_FOR_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_1(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_2(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_3(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_4(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_5(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_6(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_7(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_8(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_9(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_10(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_11(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_12(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_13(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_14(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_15(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_16(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_17(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_18(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_19(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_20(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_21(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_22(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_23(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_24(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_25(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_26(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_27(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_28(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_29(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_30(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_31(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_32(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_33(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_34(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_35(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_36(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_37(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_38(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_39(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_40(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_41(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_42(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_43(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_44(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_45(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_46(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_47(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_48(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_49(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_50(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_51(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_52(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_53(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_54(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_55(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_56(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_57(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_58(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_59(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_60(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_61(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_62(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_63(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_64(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_65(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_66(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_67(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_68(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_69(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_70(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_71(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_72(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_73(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_74(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_75(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_76(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_77(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_78(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_79(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_80(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_81(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_82(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_83(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_84(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_85(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_86(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_87(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_88(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_89(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_90(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_91(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_92(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_93(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_94(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_95(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_96(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_97(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_98(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_99(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_100(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_101(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_102(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_103(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_104(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_105(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_106(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_107(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_108(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_109(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_110(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_111(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_112(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_113(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_114(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_115(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_116(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_117(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_118(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_119(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_120(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_121(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_122(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_123(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_124(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_125(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_126(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_127(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_128(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_129(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_130(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_131(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_132(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_133(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_134(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_135(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_136(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_137(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_138(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_139(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_140(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_141(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_142(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_143(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_144(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_145(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_146(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_147(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_148(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_149(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_150(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_151(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_152(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_153(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_154(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_155(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_156(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_157(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_158(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_159(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_160(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_161(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_162(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_163(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_164(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_165(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_166(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_167(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_168(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_169(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_170(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_171(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_172(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_173(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_174(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_175(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_176(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_177(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_178(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_179(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_180(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_181(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_182(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_183(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_184(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_185(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_186(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_187(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_188(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_189(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_190(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_191(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_192(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_193(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_194(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_195(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_196(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_197(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_198(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_199(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_200(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_201(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_202(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_203(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_204(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_205(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_206(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_207(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_208(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_209(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_210(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_211(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_212(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_213(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_214(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_215(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_216(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_217(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_218(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_219(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_220(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_221(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_222(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_223(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_224(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_225(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_226(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_227(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_228(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_229(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_230(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_231(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_232(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_233(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_234(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_235(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_236(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_237(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_238(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_239(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_240(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_241(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_242(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_243(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_244(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_245(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_246(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_247(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_248(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_249(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_250(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_251(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_252(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_253(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_254(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_255(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_256(s, p, o, m) 0 +# +# endif diff --git a/contrib/src/boost/preprocessor/repetition/repeat.hpp b/contrib/src/boost/preprocessor/repetition/repeat.hpp new file mode 100644 index 0000000..0172738 --- /dev/null +++ b/contrib/src/boost/preprocessor/repetition/repeat.hpp @@ -0,0 +1,825 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP +# define BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_REPEAT */ +# +# if 0 +# define BOOST_PP_REPEAT(count, macro, data) +# endif +# +# define BOOST_PP_REPEAT BOOST_PP_CAT(BOOST_PP_REPEAT_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) +# +# define BOOST_PP_REPEAT_P(n) BOOST_PP_CAT(BOOST_PP_REPEAT_CHECK_, BOOST_PP_REPEAT_ ## n(1, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3, BOOST_PP_NIL)) +# +# define BOOST_PP_REPEAT_CHECK_BOOST_PP_NIL 1 +# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_1(c, m, d) 0 +# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_2(c, m, d) 0 +# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_3(c, m, d) 0 +# +# define BOOST_PP_REPEAT_1(c, m, d) BOOST_PP_REPEAT_1_I(c, m, d) +# define BOOST_PP_REPEAT_2(c, m, d) BOOST_PP_REPEAT_2_I(c, m, d) +# define BOOST_PP_REPEAT_3(c, m, d) BOOST_PP_REPEAT_3_I(c, m, d) +# define BOOST_PP_REPEAT_4(c, m, d) BOOST_PP_ERROR(0x0003) +# +# define BOOST_PP_REPEAT_1_I(c, m, d) BOOST_PP_REPEAT_1_ ## c(m, d) +# define BOOST_PP_REPEAT_2_I(c, m, d) BOOST_PP_REPEAT_2_ ## c(m, d) +# define BOOST_PP_REPEAT_3_I(c, m, d) BOOST_PP_REPEAT_3_ ## c(m, d) +# +# define BOOST_PP_REPEAT_1ST BOOST_PP_REPEAT_1 +# define BOOST_PP_REPEAT_2ND BOOST_PP_REPEAT_2 +# define BOOST_PP_REPEAT_3RD BOOST_PP_REPEAT_3 +# +# define BOOST_PP_REPEAT_1_0(m, d) +# define BOOST_PP_REPEAT_1_1(m, d) m(2, 0, d) +# define BOOST_PP_REPEAT_1_2(m, d) BOOST_PP_REPEAT_1_1(m, d) m(2, 1, d) +# define BOOST_PP_REPEAT_1_3(m, d) BOOST_PP_REPEAT_1_2(m, d) m(2, 2, d) +# define BOOST_PP_REPEAT_1_4(m, d) BOOST_PP_REPEAT_1_3(m, d) m(2, 3, d) +# define BOOST_PP_REPEAT_1_5(m, d) BOOST_PP_REPEAT_1_4(m, d) m(2, 4, d) +# define BOOST_PP_REPEAT_1_6(m, d) BOOST_PP_REPEAT_1_5(m, d) m(2, 5, d) +# define BOOST_PP_REPEAT_1_7(m, d) BOOST_PP_REPEAT_1_6(m, d) m(2, 6, d) +# define BOOST_PP_REPEAT_1_8(m, d) BOOST_PP_REPEAT_1_7(m, d) m(2, 7, d) +# define BOOST_PP_REPEAT_1_9(m, d) BOOST_PP_REPEAT_1_8(m, d) m(2, 8, d) +# define BOOST_PP_REPEAT_1_10(m, d) BOOST_PP_REPEAT_1_9(m, d) m(2, 9, d) +# define BOOST_PP_REPEAT_1_11(m, d) BOOST_PP_REPEAT_1_10(m, d) m(2, 10, d) +# define BOOST_PP_REPEAT_1_12(m, d) BOOST_PP_REPEAT_1_11(m, d) m(2, 11, d) +# define BOOST_PP_REPEAT_1_13(m, d) BOOST_PP_REPEAT_1_12(m, d) m(2, 12, d) +# define BOOST_PP_REPEAT_1_14(m, d) BOOST_PP_REPEAT_1_13(m, d) m(2, 13, d) +# define BOOST_PP_REPEAT_1_15(m, d) BOOST_PP_REPEAT_1_14(m, d) m(2, 14, d) +# define BOOST_PP_REPEAT_1_16(m, d) BOOST_PP_REPEAT_1_15(m, d) m(2, 15, d) +# define BOOST_PP_REPEAT_1_17(m, d) BOOST_PP_REPEAT_1_16(m, d) m(2, 16, d) +# define BOOST_PP_REPEAT_1_18(m, d) BOOST_PP_REPEAT_1_17(m, d) m(2, 17, d) +# define BOOST_PP_REPEAT_1_19(m, d) BOOST_PP_REPEAT_1_18(m, d) m(2, 18, d) +# define BOOST_PP_REPEAT_1_20(m, d) BOOST_PP_REPEAT_1_19(m, d) m(2, 19, d) +# define BOOST_PP_REPEAT_1_21(m, d) BOOST_PP_REPEAT_1_20(m, d) m(2, 20, d) +# define BOOST_PP_REPEAT_1_22(m, d) BOOST_PP_REPEAT_1_21(m, d) m(2, 21, d) +# define BOOST_PP_REPEAT_1_23(m, d) BOOST_PP_REPEAT_1_22(m, d) m(2, 22, d) +# define BOOST_PP_REPEAT_1_24(m, d) BOOST_PP_REPEAT_1_23(m, d) m(2, 23, d) +# define BOOST_PP_REPEAT_1_25(m, d) BOOST_PP_REPEAT_1_24(m, d) m(2, 24, d) +# define BOOST_PP_REPEAT_1_26(m, d) BOOST_PP_REPEAT_1_25(m, d) m(2, 25, d) +# define BOOST_PP_REPEAT_1_27(m, d) BOOST_PP_REPEAT_1_26(m, d) m(2, 26, d) +# define BOOST_PP_REPEAT_1_28(m, d) BOOST_PP_REPEAT_1_27(m, d) m(2, 27, d) +# define BOOST_PP_REPEAT_1_29(m, d) BOOST_PP_REPEAT_1_28(m, d) m(2, 28, d) +# define BOOST_PP_REPEAT_1_30(m, d) BOOST_PP_REPEAT_1_29(m, d) m(2, 29, d) +# define BOOST_PP_REPEAT_1_31(m, d) BOOST_PP_REPEAT_1_30(m, d) m(2, 30, d) +# define BOOST_PP_REPEAT_1_32(m, d) BOOST_PP_REPEAT_1_31(m, d) m(2, 31, d) +# define BOOST_PP_REPEAT_1_33(m, d) BOOST_PP_REPEAT_1_32(m, d) m(2, 32, d) +# define BOOST_PP_REPEAT_1_34(m, d) BOOST_PP_REPEAT_1_33(m, d) m(2, 33, d) +# define BOOST_PP_REPEAT_1_35(m, d) BOOST_PP_REPEAT_1_34(m, d) m(2, 34, d) +# define BOOST_PP_REPEAT_1_36(m, d) BOOST_PP_REPEAT_1_35(m, d) m(2, 35, d) +# define BOOST_PP_REPEAT_1_37(m, d) BOOST_PP_REPEAT_1_36(m, d) m(2, 36, d) +# define BOOST_PP_REPEAT_1_38(m, d) BOOST_PP_REPEAT_1_37(m, d) m(2, 37, d) +# define BOOST_PP_REPEAT_1_39(m, d) BOOST_PP_REPEAT_1_38(m, d) m(2, 38, d) +# define BOOST_PP_REPEAT_1_40(m, d) BOOST_PP_REPEAT_1_39(m, d) m(2, 39, d) +# define BOOST_PP_REPEAT_1_41(m, d) BOOST_PP_REPEAT_1_40(m, d) m(2, 40, d) +# define BOOST_PP_REPEAT_1_42(m, d) BOOST_PP_REPEAT_1_41(m, d) m(2, 41, d) +# define BOOST_PP_REPEAT_1_43(m, d) BOOST_PP_REPEAT_1_42(m, d) m(2, 42, d) +# define BOOST_PP_REPEAT_1_44(m, d) BOOST_PP_REPEAT_1_43(m, d) m(2, 43, d) +# define BOOST_PP_REPEAT_1_45(m, d) BOOST_PP_REPEAT_1_44(m, d) m(2, 44, d) +# define BOOST_PP_REPEAT_1_46(m, d) BOOST_PP_REPEAT_1_45(m, d) m(2, 45, d) +# define BOOST_PP_REPEAT_1_47(m, d) BOOST_PP_REPEAT_1_46(m, d) m(2, 46, d) +# define BOOST_PP_REPEAT_1_48(m, d) BOOST_PP_REPEAT_1_47(m, d) m(2, 47, d) +# define BOOST_PP_REPEAT_1_49(m, d) BOOST_PP_REPEAT_1_48(m, d) m(2, 48, d) +# define BOOST_PP_REPEAT_1_50(m, d) BOOST_PP_REPEAT_1_49(m, d) m(2, 49, d) +# define BOOST_PP_REPEAT_1_51(m, d) BOOST_PP_REPEAT_1_50(m, d) m(2, 50, d) +# define BOOST_PP_REPEAT_1_52(m, d) BOOST_PP_REPEAT_1_51(m, d) m(2, 51, d) +# define BOOST_PP_REPEAT_1_53(m, d) BOOST_PP_REPEAT_1_52(m, d) m(2, 52, d) +# define BOOST_PP_REPEAT_1_54(m, d) BOOST_PP_REPEAT_1_53(m, d) m(2, 53, d) +# define BOOST_PP_REPEAT_1_55(m, d) BOOST_PP_REPEAT_1_54(m, d) m(2, 54, d) +# define BOOST_PP_REPEAT_1_56(m, d) BOOST_PP_REPEAT_1_55(m, d) m(2, 55, d) +# define BOOST_PP_REPEAT_1_57(m, d) BOOST_PP_REPEAT_1_56(m, d) m(2, 56, d) +# define BOOST_PP_REPEAT_1_58(m, d) BOOST_PP_REPEAT_1_57(m, d) m(2, 57, d) +# define BOOST_PP_REPEAT_1_59(m, d) BOOST_PP_REPEAT_1_58(m, d) m(2, 58, d) +# define BOOST_PP_REPEAT_1_60(m, d) BOOST_PP_REPEAT_1_59(m, d) m(2, 59, d) +# define BOOST_PP_REPEAT_1_61(m, d) BOOST_PP_REPEAT_1_60(m, d) m(2, 60, d) +# define BOOST_PP_REPEAT_1_62(m, d) BOOST_PP_REPEAT_1_61(m, d) m(2, 61, d) +# define BOOST_PP_REPEAT_1_63(m, d) BOOST_PP_REPEAT_1_62(m, d) m(2, 62, d) +# define BOOST_PP_REPEAT_1_64(m, d) BOOST_PP_REPEAT_1_63(m, d) m(2, 63, d) +# define BOOST_PP_REPEAT_1_65(m, d) BOOST_PP_REPEAT_1_64(m, d) m(2, 64, d) +# define BOOST_PP_REPEAT_1_66(m, d) BOOST_PP_REPEAT_1_65(m, d) m(2, 65, d) +# define BOOST_PP_REPEAT_1_67(m, d) BOOST_PP_REPEAT_1_66(m, d) m(2, 66, d) +# define BOOST_PP_REPEAT_1_68(m, d) BOOST_PP_REPEAT_1_67(m, d) m(2, 67, d) +# define BOOST_PP_REPEAT_1_69(m, d) BOOST_PP_REPEAT_1_68(m, d) m(2, 68, d) +# define BOOST_PP_REPEAT_1_70(m, d) BOOST_PP_REPEAT_1_69(m, d) m(2, 69, d) +# define BOOST_PP_REPEAT_1_71(m, d) BOOST_PP_REPEAT_1_70(m, d) m(2, 70, d) +# define BOOST_PP_REPEAT_1_72(m, d) BOOST_PP_REPEAT_1_71(m, d) m(2, 71, d) +# define BOOST_PP_REPEAT_1_73(m, d) BOOST_PP_REPEAT_1_72(m, d) m(2, 72, d) +# define BOOST_PP_REPEAT_1_74(m, d) BOOST_PP_REPEAT_1_73(m, d) m(2, 73, d) +# define BOOST_PP_REPEAT_1_75(m, d) BOOST_PP_REPEAT_1_74(m, d) m(2, 74, d) +# define BOOST_PP_REPEAT_1_76(m, d) BOOST_PP_REPEAT_1_75(m, d) m(2, 75, d) +# define BOOST_PP_REPEAT_1_77(m, d) BOOST_PP_REPEAT_1_76(m, d) m(2, 76, d) +# define BOOST_PP_REPEAT_1_78(m, d) BOOST_PP_REPEAT_1_77(m, d) m(2, 77, d) +# define BOOST_PP_REPEAT_1_79(m, d) BOOST_PP_REPEAT_1_78(m, d) m(2, 78, d) +# define BOOST_PP_REPEAT_1_80(m, d) BOOST_PP_REPEAT_1_79(m, d) m(2, 79, d) +# define BOOST_PP_REPEAT_1_81(m, d) BOOST_PP_REPEAT_1_80(m, d) m(2, 80, d) +# define BOOST_PP_REPEAT_1_82(m, d) BOOST_PP_REPEAT_1_81(m, d) m(2, 81, d) +# define BOOST_PP_REPEAT_1_83(m, d) BOOST_PP_REPEAT_1_82(m, d) m(2, 82, d) +# define BOOST_PP_REPEAT_1_84(m, d) BOOST_PP_REPEAT_1_83(m, d) m(2, 83, d) +# define BOOST_PP_REPEAT_1_85(m, d) BOOST_PP_REPEAT_1_84(m, d) m(2, 84, d) +# define BOOST_PP_REPEAT_1_86(m, d) BOOST_PP_REPEAT_1_85(m, d) m(2, 85, d) +# define BOOST_PP_REPEAT_1_87(m, d) BOOST_PP_REPEAT_1_86(m, d) m(2, 86, d) +# define BOOST_PP_REPEAT_1_88(m, d) BOOST_PP_REPEAT_1_87(m, d) m(2, 87, d) +# define BOOST_PP_REPEAT_1_89(m, d) BOOST_PP_REPEAT_1_88(m, d) m(2, 88, d) +# define BOOST_PP_REPEAT_1_90(m, d) BOOST_PP_REPEAT_1_89(m, d) m(2, 89, d) +# define BOOST_PP_REPEAT_1_91(m, d) BOOST_PP_REPEAT_1_90(m, d) m(2, 90, d) +# define BOOST_PP_REPEAT_1_92(m, d) BOOST_PP_REPEAT_1_91(m, d) m(2, 91, d) +# define BOOST_PP_REPEAT_1_93(m, d) BOOST_PP_REPEAT_1_92(m, d) m(2, 92, d) +# define BOOST_PP_REPEAT_1_94(m, d) BOOST_PP_REPEAT_1_93(m, d) m(2, 93, d) +# define BOOST_PP_REPEAT_1_95(m, d) BOOST_PP_REPEAT_1_94(m, d) m(2, 94, d) +# define BOOST_PP_REPEAT_1_96(m, d) BOOST_PP_REPEAT_1_95(m, d) m(2, 95, d) +# define BOOST_PP_REPEAT_1_97(m, d) BOOST_PP_REPEAT_1_96(m, d) m(2, 96, d) +# define BOOST_PP_REPEAT_1_98(m, d) BOOST_PP_REPEAT_1_97(m, d) m(2, 97, d) +# define BOOST_PP_REPEAT_1_99(m, d) BOOST_PP_REPEAT_1_98(m, d) m(2, 98, d) +# define BOOST_PP_REPEAT_1_100(m, d) BOOST_PP_REPEAT_1_99(m, d) m(2, 99, d) +# define BOOST_PP_REPEAT_1_101(m, d) BOOST_PP_REPEAT_1_100(m, d) m(2, 100, d) +# define BOOST_PP_REPEAT_1_102(m, d) BOOST_PP_REPEAT_1_101(m, d) m(2, 101, d) +# define BOOST_PP_REPEAT_1_103(m, d) BOOST_PP_REPEAT_1_102(m, d) m(2, 102, d) +# define BOOST_PP_REPEAT_1_104(m, d) BOOST_PP_REPEAT_1_103(m, d) m(2, 103, d) +# define BOOST_PP_REPEAT_1_105(m, d) BOOST_PP_REPEAT_1_104(m, d) m(2, 104, d) +# define BOOST_PP_REPEAT_1_106(m, d) BOOST_PP_REPEAT_1_105(m, d) m(2, 105, d) +# define BOOST_PP_REPEAT_1_107(m, d) BOOST_PP_REPEAT_1_106(m, d) m(2, 106, d) +# define BOOST_PP_REPEAT_1_108(m, d) BOOST_PP_REPEAT_1_107(m, d) m(2, 107, d) +# define BOOST_PP_REPEAT_1_109(m, d) BOOST_PP_REPEAT_1_108(m, d) m(2, 108, d) +# define BOOST_PP_REPEAT_1_110(m, d) BOOST_PP_REPEAT_1_109(m, d) m(2, 109, d) +# define BOOST_PP_REPEAT_1_111(m, d) BOOST_PP_REPEAT_1_110(m, d) m(2, 110, d) +# define BOOST_PP_REPEAT_1_112(m, d) BOOST_PP_REPEAT_1_111(m, d) m(2, 111, d) +# define BOOST_PP_REPEAT_1_113(m, d) BOOST_PP_REPEAT_1_112(m, d) m(2, 112, d) +# define BOOST_PP_REPEAT_1_114(m, d) BOOST_PP_REPEAT_1_113(m, d) m(2, 113, d) +# define BOOST_PP_REPEAT_1_115(m, d) BOOST_PP_REPEAT_1_114(m, d) m(2, 114, d) +# define BOOST_PP_REPEAT_1_116(m, d) BOOST_PP_REPEAT_1_115(m, d) m(2, 115, d) +# define BOOST_PP_REPEAT_1_117(m, d) BOOST_PP_REPEAT_1_116(m, d) m(2, 116, d) +# define BOOST_PP_REPEAT_1_118(m, d) BOOST_PP_REPEAT_1_117(m, d) m(2, 117, d) +# define BOOST_PP_REPEAT_1_119(m, d) BOOST_PP_REPEAT_1_118(m, d) m(2, 118, d) +# define BOOST_PP_REPEAT_1_120(m, d) BOOST_PP_REPEAT_1_119(m, d) m(2, 119, d) +# define BOOST_PP_REPEAT_1_121(m, d) BOOST_PP_REPEAT_1_120(m, d) m(2, 120, d) +# define BOOST_PP_REPEAT_1_122(m, d) BOOST_PP_REPEAT_1_121(m, d) m(2, 121, d) +# define BOOST_PP_REPEAT_1_123(m, d) BOOST_PP_REPEAT_1_122(m, d) m(2, 122, d) +# define BOOST_PP_REPEAT_1_124(m, d) BOOST_PP_REPEAT_1_123(m, d) m(2, 123, d) +# define BOOST_PP_REPEAT_1_125(m, d) BOOST_PP_REPEAT_1_124(m, d) m(2, 124, d) +# define BOOST_PP_REPEAT_1_126(m, d) BOOST_PP_REPEAT_1_125(m, d) m(2, 125, d) +# define BOOST_PP_REPEAT_1_127(m, d) BOOST_PP_REPEAT_1_126(m, d) m(2, 126, d) +# define BOOST_PP_REPEAT_1_128(m, d) BOOST_PP_REPEAT_1_127(m, d) m(2, 127, d) +# define BOOST_PP_REPEAT_1_129(m, d) BOOST_PP_REPEAT_1_128(m, d) m(2, 128, d) +# define BOOST_PP_REPEAT_1_130(m, d) BOOST_PP_REPEAT_1_129(m, d) m(2, 129, d) +# define BOOST_PP_REPEAT_1_131(m, d) BOOST_PP_REPEAT_1_130(m, d) m(2, 130, d) +# define BOOST_PP_REPEAT_1_132(m, d) BOOST_PP_REPEAT_1_131(m, d) m(2, 131, d) +# define BOOST_PP_REPEAT_1_133(m, d) BOOST_PP_REPEAT_1_132(m, d) m(2, 132, d) +# define BOOST_PP_REPEAT_1_134(m, d) BOOST_PP_REPEAT_1_133(m, d) m(2, 133, d) +# define BOOST_PP_REPEAT_1_135(m, d) BOOST_PP_REPEAT_1_134(m, d) m(2, 134, d) +# define BOOST_PP_REPEAT_1_136(m, d) BOOST_PP_REPEAT_1_135(m, d) m(2, 135, d) +# define BOOST_PP_REPEAT_1_137(m, d) BOOST_PP_REPEAT_1_136(m, d) m(2, 136, d) +# define BOOST_PP_REPEAT_1_138(m, d) BOOST_PP_REPEAT_1_137(m, d) m(2, 137, d) +# define BOOST_PP_REPEAT_1_139(m, d) BOOST_PP_REPEAT_1_138(m, d) m(2, 138, d) +# define BOOST_PP_REPEAT_1_140(m, d) BOOST_PP_REPEAT_1_139(m, d) m(2, 139, d) +# define BOOST_PP_REPEAT_1_141(m, d) BOOST_PP_REPEAT_1_140(m, d) m(2, 140, d) +# define BOOST_PP_REPEAT_1_142(m, d) BOOST_PP_REPEAT_1_141(m, d) m(2, 141, d) +# define BOOST_PP_REPEAT_1_143(m, d) BOOST_PP_REPEAT_1_142(m, d) m(2, 142, d) +# define BOOST_PP_REPEAT_1_144(m, d) BOOST_PP_REPEAT_1_143(m, d) m(2, 143, d) +# define BOOST_PP_REPEAT_1_145(m, d) BOOST_PP_REPEAT_1_144(m, d) m(2, 144, d) +# define BOOST_PP_REPEAT_1_146(m, d) BOOST_PP_REPEAT_1_145(m, d) m(2, 145, d) +# define BOOST_PP_REPEAT_1_147(m, d) BOOST_PP_REPEAT_1_146(m, d) m(2, 146, d) +# define BOOST_PP_REPEAT_1_148(m, d) BOOST_PP_REPEAT_1_147(m, d) m(2, 147, d) +# define BOOST_PP_REPEAT_1_149(m, d) BOOST_PP_REPEAT_1_148(m, d) m(2, 148, d) +# define BOOST_PP_REPEAT_1_150(m, d) BOOST_PP_REPEAT_1_149(m, d) m(2, 149, d) +# define BOOST_PP_REPEAT_1_151(m, d) BOOST_PP_REPEAT_1_150(m, d) m(2, 150, d) +# define BOOST_PP_REPEAT_1_152(m, d) BOOST_PP_REPEAT_1_151(m, d) m(2, 151, d) +# define BOOST_PP_REPEAT_1_153(m, d) BOOST_PP_REPEAT_1_152(m, d) m(2, 152, d) +# define BOOST_PP_REPEAT_1_154(m, d) BOOST_PP_REPEAT_1_153(m, d) m(2, 153, d) +# define BOOST_PP_REPEAT_1_155(m, d) BOOST_PP_REPEAT_1_154(m, d) m(2, 154, d) +# define BOOST_PP_REPEAT_1_156(m, d) BOOST_PP_REPEAT_1_155(m, d) m(2, 155, d) +# define BOOST_PP_REPEAT_1_157(m, d) BOOST_PP_REPEAT_1_156(m, d) m(2, 156, d) +# define BOOST_PP_REPEAT_1_158(m, d) BOOST_PP_REPEAT_1_157(m, d) m(2, 157, d) +# define BOOST_PP_REPEAT_1_159(m, d) BOOST_PP_REPEAT_1_158(m, d) m(2, 158, d) +# define BOOST_PP_REPEAT_1_160(m, d) BOOST_PP_REPEAT_1_159(m, d) m(2, 159, d) +# define BOOST_PP_REPEAT_1_161(m, d) BOOST_PP_REPEAT_1_160(m, d) m(2, 160, d) +# define BOOST_PP_REPEAT_1_162(m, d) BOOST_PP_REPEAT_1_161(m, d) m(2, 161, d) +# define BOOST_PP_REPEAT_1_163(m, d) BOOST_PP_REPEAT_1_162(m, d) m(2, 162, d) +# define BOOST_PP_REPEAT_1_164(m, d) BOOST_PP_REPEAT_1_163(m, d) m(2, 163, d) +# define BOOST_PP_REPEAT_1_165(m, d) BOOST_PP_REPEAT_1_164(m, d) m(2, 164, d) +# define BOOST_PP_REPEAT_1_166(m, d) BOOST_PP_REPEAT_1_165(m, d) m(2, 165, d) +# define BOOST_PP_REPEAT_1_167(m, d) BOOST_PP_REPEAT_1_166(m, d) m(2, 166, d) +# define BOOST_PP_REPEAT_1_168(m, d) BOOST_PP_REPEAT_1_167(m, d) m(2, 167, d) +# define BOOST_PP_REPEAT_1_169(m, d) BOOST_PP_REPEAT_1_168(m, d) m(2, 168, d) +# define BOOST_PP_REPEAT_1_170(m, d) BOOST_PP_REPEAT_1_169(m, d) m(2, 169, d) +# define BOOST_PP_REPEAT_1_171(m, d) BOOST_PP_REPEAT_1_170(m, d) m(2, 170, d) +# define BOOST_PP_REPEAT_1_172(m, d) BOOST_PP_REPEAT_1_171(m, d) m(2, 171, d) +# define BOOST_PP_REPEAT_1_173(m, d) BOOST_PP_REPEAT_1_172(m, d) m(2, 172, d) +# define BOOST_PP_REPEAT_1_174(m, d) BOOST_PP_REPEAT_1_173(m, d) m(2, 173, d) +# define BOOST_PP_REPEAT_1_175(m, d) BOOST_PP_REPEAT_1_174(m, d) m(2, 174, d) +# define BOOST_PP_REPEAT_1_176(m, d) BOOST_PP_REPEAT_1_175(m, d) m(2, 175, d) +# define BOOST_PP_REPEAT_1_177(m, d) BOOST_PP_REPEAT_1_176(m, d) m(2, 176, d) +# define BOOST_PP_REPEAT_1_178(m, d) BOOST_PP_REPEAT_1_177(m, d) m(2, 177, d) +# define BOOST_PP_REPEAT_1_179(m, d) BOOST_PP_REPEAT_1_178(m, d) m(2, 178, d) +# define BOOST_PP_REPEAT_1_180(m, d) BOOST_PP_REPEAT_1_179(m, d) m(2, 179, d) +# define BOOST_PP_REPEAT_1_181(m, d) BOOST_PP_REPEAT_1_180(m, d) m(2, 180, d) +# define BOOST_PP_REPEAT_1_182(m, d) BOOST_PP_REPEAT_1_181(m, d) m(2, 181, d) +# define BOOST_PP_REPEAT_1_183(m, d) BOOST_PP_REPEAT_1_182(m, d) m(2, 182, d) +# define BOOST_PP_REPEAT_1_184(m, d) BOOST_PP_REPEAT_1_183(m, d) m(2, 183, d) +# define BOOST_PP_REPEAT_1_185(m, d) BOOST_PP_REPEAT_1_184(m, d) m(2, 184, d) +# define BOOST_PP_REPEAT_1_186(m, d) BOOST_PP_REPEAT_1_185(m, d) m(2, 185, d) +# define BOOST_PP_REPEAT_1_187(m, d) BOOST_PP_REPEAT_1_186(m, d) m(2, 186, d) +# define BOOST_PP_REPEAT_1_188(m, d) BOOST_PP_REPEAT_1_187(m, d) m(2, 187, d) +# define BOOST_PP_REPEAT_1_189(m, d) BOOST_PP_REPEAT_1_188(m, d) m(2, 188, d) +# define BOOST_PP_REPEAT_1_190(m, d) BOOST_PP_REPEAT_1_189(m, d) m(2, 189, d) +# define BOOST_PP_REPEAT_1_191(m, d) BOOST_PP_REPEAT_1_190(m, d) m(2, 190, d) +# define BOOST_PP_REPEAT_1_192(m, d) BOOST_PP_REPEAT_1_191(m, d) m(2, 191, d) +# define BOOST_PP_REPEAT_1_193(m, d) BOOST_PP_REPEAT_1_192(m, d) m(2, 192, d) +# define BOOST_PP_REPEAT_1_194(m, d) BOOST_PP_REPEAT_1_193(m, d) m(2, 193, d) +# define BOOST_PP_REPEAT_1_195(m, d) BOOST_PP_REPEAT_1_194(m, d) m(2, 194, d) +# define BOOST_PP_REPEAT_1_196(m, d) BOOST_PP_REPEAT_1_195(m, d) m(2, 195, d) +# define BOOST_PP_REPEAT_1_197(m, d) BOOST_PP_REPEAT_1_196(m, d) m(2, 196, d) +# define BOOST_PP_REPEAT_1_198(m, d) BOOST_PP_REPEAT_1_197(m, d) m(2, 197, d) +# define BOOST_PP_REPEAT_1_199(m, d) BOOST_PP_REPEAT_1_198(m, d) m(2, 198, d) +# define BOOST_PP_REPEAT_1_200(m, d) BOOST_PP_REPEAT_1_199(m, d) m(2, 199, d) +# define BOOST_PP_REPEAT_1_201(m, d) BOOST_PP_REPEAT_1_200(m, d) m(2, 200, d) +# define BOOST_PP_REPEAT_1_202(m, d) BOOST_PP_REPEAT_1_201(m, d) m(2, 201, d) +# define BOOST_PP_REPEAT_1_203(m, d) BOOST_PP_REPEAT_1_202(m, d) m(2, 202, d) +# define BOOST_PP_REPEAT_1_204(m, d) BOOST_PP_REPEAT_1_203(m, d) m(2, 203, d) +# define BOOST_PP_REPEAT_1_205(m, d) BOOST_PP_REPEAT_1_204(m, d) m(2, 204, d) +# define BOOST_PP_REPEAT_1_206(m, d) BOOST_PP_REPEAT_1_205(m, d) m(2, 205, d) +# define BOOST_PP_REPEAT_1_207(m, d) BOOST_PP_REPEAT_1_206(m, d) m(2, 206, d) +# define BOOST_PP_REPEAT_1_208(m, d) BOOST_PP_REPEAT_1_207(m, d) m(2, 207, d) +# define BOOST_PP_REPEAT_1_209(m, d) BOOST_PP_REPEAT_1_208(m, d) m(2, 208, d) +# define BOOST_PP_REPEAT_1_210(m, d) BOOST_PP_REPEAT_1_209(m, d) m(2, 209, d) +# define BOOST_PP_REPEAT_1_211(m, d) BOOST_PP_REPEAT_1_210(m, d) m(2, 210, d) +# define BOOST_PP_REPEAT_1_212(m, d) BOOST_PP_REPEAT_1_211(m, d) m(2, 211, d) +# define BOOST_PP_REPEAT_1_213(m, d) BOOST_PP_REPEAT_1_212(m, d) m(2, 212, d) +# define BOOST_PP_REPEAT_1_214(m, d) BOOST_PP_REPEAT_1_213(m, d) m(2, 213, d) +# define BOOST_PP_REPEAT_1_215(m, d) BOOST_PP_REPEAT_1_214(m, d) m(2, 214, d) +# define BOOST_PP_REPEAT_1_216(m, d) BOOST_PP_REPEAT_1_215(m, d) m(2, 215, d) +# define BOOST_PP_REPEAT_1_217(m, d) BOOST_PP_REPEAT_1_216(m, d) m(2, 216, d) +# define BOOST_PP_REPEAT_1_218(m, d) BOOST_PP_REPEAT_1_217(m, d) m(2, 217, d) +# define BOOST_PP_REPEAT_1_219(m, d) BOOST_PP_REPEAT_1_218(m, d) m(2, 218, d) +# define BOOST_PP_REPEAT_1_220(m, d) BOOST_PP_REPEAT_1_219(m, d) m(2, 219, d) +# define BOOST_PP_REPEAT_1_221(m, d) BOOST_PP_REPEAT_1_220(m, d) m(2, 220, d) +# define BOOST_PP_REPEAT_1_222(m, d) BOOST_PP_REPEAT_1_221(m, d) m(2, 221, d) +# define BOOST_PP_REPEAT_1_223(m, d) BOOST_PP_REPEAT_1_222(m, d) m(2, 222, d) +# define BOOST_PP_REPEAT_1_224(m, d) BOOST_PP_REPEAT_1_223(m, d) m(2, 223, d) +# define BOOST_PP_REPEAT_1_225(m, d) BOOST_PP_REPEAT_1_224(m, d) m(2, 224, d) +# define BOOST_PP_REPEAT_1_226(m, d) BOOST_PP_REPEAT_1_225(m, d) m(2, 225, d) +# define BOOST_PP_REPEAT_1_227(m, d) BOOST_PP_REPEAT_1_226(m, d) m(2, 226, d) +# define BOOST_PP_REPEAT_1_228(m, d) BOOST_PP_REPEAT_1_227(m, d) m(2, 227, d) +# define BOOST_PP_REPEAT_1_229(m, d) BOOST_PP_REPEAT_1_228(m, d) m(2, 228, d) +# define BOOST_PP_REPEAT_1_230(m, d) BOOST_PP_REPEAT_1_229(m, d) m(2, 229, d) +# define BOOST_PP_REPEAT_1_231(m, d) BOOST_PP_REPEAT_1_230(m, d) m(2, 230, d) +# define BOOST_PP_REPEAT_1_232(m, d) BOOST_PP_REPEAT_1_231(m, d) m(2, 231, d) +# define BOOST_PP_REPEAT_1_233(m, d) BOOST_PP_REPEAT_1_232(m, d) m(2, 232, d) +# define BOOST_PP_REPEAT_1_234(m, d) BOOST_PP_REPEAT_1_233(m, d) m(2, 233, d) +# define BOOST_PP_REPEAT_1_235(m, d) BOOST_PP_REPEAT_1_234(m, d) m(2, 234, d) +# define BOOST_PP_REPEAT_1_236(m, d) BOOST_PP_REPEAT_1_235(m, d) m(2, 235, d) +# define BOOST_PP_REPEAT_1_237(m, d) BOOST_PP_REPEAT_1_236(m, d) m(2, 236, d) +# define BOOST_PP_REPEAT_1_238(m, d) BOOST_PP_REPEAT_1_237(m, d) m(2, 237, d) +# define BOOST_PP_REPEAT_1_239(m, d) BOOST_PP_REPEAT_1_238(m, d) m(2, 238, d) +# define BOOST_PP_REPEAT_1_240(m, d) BOOST_PP_REPEAT_1_239(m, d) m(2, 239, d) +# define BOOST_PP_REPEAT_1_241(m, d) BOOST_PP_REPEAT_1_240(m, d) m(2, 240, d) +# define BOOST_PP_REPEAT_1_242(m, d) BOOST_PP_REPEAT_1_241(m, d) m(2, 241, d) +# define BOOST_PP_REPEAT_1_243(m, d) BOOST_PP_REPEAT_1_242(m, d) m(2, 242, d) +# define BOOST_PP_REPEAT_1_244(m, d) BOOST_PP_REPEAT_1_243(m, d) m(2, 243, d) +# define BOOST_PP_REPEAT_1_245(m, d) BOOST_PP_REPEAT_1_244(m, d) m(2, 244, d) +# define BOOST_PP_REPEAT_1_246(m, d) BOOST_PP_REPEAT_1_245(m, d) m(2, 245, d) +# define BOOST_PP_REPEAT_1_247(m, d) BOOST_PP_REPEAT_1_246(m, d) m(2, 246, d) +# define BOOST_PP_REPEAT_1_248(m, d) BOOST_PP_REPEAT_1_247(m, d) m(2, 247, d) +# define BOOST_PP_REPEAT_1_249(m, d) BOOST_PP_REPEAT_1_248(m, d) m(2, 248, d) +# define BOOST_PP_REPEAT_1_250(m, d) BOOST_PP_REPEAT_1_249(m, d) m(2, 249, d) +# define BOOST_PP_REPEAT_1_251(m, d) BOOST_PP_REPEAT_1_250(m, d) m(2, 250, d) +# define BOOST_PP_REPEAT_1_252(m, d) BOOST_PP_REPEAT_1_251(m, d) m(2, 251, d) +# define BOOST_PP_REPEAT_1_253(m, d) BOOST_PP_REPEAT_1_252(m, d) m(2, 252, d) +# define BOOST_PP_REPEAT_1_254(m, d) BOOST_PP_REPEAT_1_253(m, d) m(2, 253, d) +# define BOOST_PP_REPEAT_1_255(m, d) BOOST_PP_REPEAT_1_254(m, d) m(2, 254, d) +# define BOOST_PP_REPEAT_1_256(m, d) BOOST_PP_REPEAT_1_255(m, d) m(2, 255, d) +# +# define BOOST_PP_REPEAT_2_0(m, d) +# define BOOST_PP_REPEAT_2_1(m, d) m(3, 0, d) +# define BOOST_PP_REPEAT_2_2(m, d) BOOST_PP_REPEAT_2_1(m, d) m(3, 1, d) +# define BOOST_PP_REPEAT_2_3(m, d) BOOST_PP_REPEAT_2_2(m, d) m(3, 2, d) +# define BOOST_PP_REPEAT_2_4(m, d) BOOST_PP_REPEAT_2_3(m, d) m(3, 3, d) +# define BOOST_PP_REPEAT_2_5(m, d) BOOST_PP_REPEAT_2_4(m, d) m(3, 4, d) +# define BOOST_PP_REPEAT_2_6(m, d) BOOST_PP_REPEAT_2_5(m, d) m(3, 5, d) +# define BOOST_PP_REPEAT_2_7(m, d) BOOST_PP_REPEAT_2_6(m, d) m(3, 6, d) +# define BOOST_PP_REPEAT_2_8(m, d) BOOST_PP_REPEAT_2_7(m, d) m(3, 7, d) +# define BOOST_PP_REPEAT_2_9(m, d) BOOST_PP_REPEAT_2_8(m, d) m(3, 8, d) +# define BOOST_PP_REPEAT_2_10(m, d) BOOST_PP_REPEAT_2_9(m, d) m(3, 9, d) +# define BOOST_PP_REPEAT_2_11(m, d) BOOST_PP_REPEAT_2_10(m, d) m(3, 10, d) +# define BOOST_PP_REPEAT_2_12(m, d) BOOST_PP_REPEAT_2_11(m, d) m(3, 11, d) +# define BOOST_PP_REPEAT_2_13(m, d) BOOST_PP_REPEAT_2_12(m, d) m(3, 12, d) +# define BOOST_PP_REPEAT_2_14(m, d) BOOST_PP_REPEAT_2_13(m, d) m(3, 13, d) +# define BOOST_PP_REPEAT_2_15(m, d) BOOST_PP_REPEAT_2_14(m, d) m(3, 14, d) +# define BOOST_PP_REPEAT_2_16(m, d) BOOST_PP_REPEAT_2_15(m, d) m(3, 15, d) +# define BOOST_PP_REPEAT_2_17(m, d) BOOST_PP_REPEAT_2_16(m, d) m(3, 16, d) +# define BOOST_PP_REPEAT_2_18(m, d) BOOST_PP_REPEAT_2_17(m, d) m(3, 17, d) +# define BOOST_PP_REPEAT_2_19(m, d) BOOST_PP_REPEAT_2_18(m, d) m(3, 18, d) +# define BOOST_PP_REPEAT_2_20(m, d) BOOST_PP_REPEAT_2_19(m, d) m(3, 19, d) +# define BOOST_PP_REPEAT_2_21(m, d) BOOST_PP_REPEAT_2_20(m, d) m(3, 20, d) +# define BOOST_PP_REPEAT_2_22(m, d) BOOST_PP_REPEAT_2_21(m, d) m(3, 21, d) +# define BOOST_PP_REPEAT_2_23(m, d) BOOST_PP_REPEAT_2_22(m, d) m(3, 22, d) +# define BOOST_PP_REPEAT_2_24(m, d) BOOST_PP_REPEAT_2_23(m, d) m(3, 23, d) +# define BOOST_PP_REPEAT_2_25(m, d) BOOST_PP_REPEAT_2_24(m, d) m(3, 24, d) +# define BOOST_PP_REPEAT_2_26(m, d) BOOST_PP_REPEAT_2_25(m, d) m(3, 25, d) +# define BOOST_PP_REPEAT_2_27(m, d) BOOST_PP_REPEAT_2_26(m, d) m(3, 26, d) +# define BOOST_PP_REPEAT_2_28(m, d) BOOST_PP_REPEAT_2_27(m, d) m(3, 27, d) +# define BOOST_PP_REPEAT_2_29(m, d) BOOST_PP_REPEAT_2_28(m, d) m(3, 28, d) +# define BOOST_PP_REPEAT_2_30(m, d) BOOST_PP_REPEAT_2_29(m, d) m(3, 29, d) +# define BOOST_PP_REPEAT_2_31(m, d) BOOST_PP_REPEAT_2_30(m, d) m(3, 30, d) +# define BOOST_PP_REPEAT_2_32(m, d) BOOST_PP_REPEAT_2_31(m, d) m(3, 31, d) +# define BOOST_PP_REPEAT_2_33(m, d) BOOST_PP_REPEAT_2_32(m, d) m(3, 32, d) +# define BOOST_PP_REPEAT_2_34(m, d) BOOST_PP_REPEAT_2_33(m, d) m(3, 33, d) +# define BOOST_PP_REPEAT_2_35(m, d) BOOST_PP_REPEAT_2_34(m, d) m(3, 34, d) +# define BOOST_PP_REPEAT_2_36(m, d) BOOST_PP_REPEAT_2_35(m, d) m(3, 35, d) +# define BOOST_PP_REPEAT_2_37(m, d) BOOST_PP_REPEAT_2_36(m, d) m(3, 36, d) +# define BOOST_PP_REPEAT_2_38(m, d) BOOST_PP_REPEAT_2_37(m, d) m(3, 37, d) +# define BOOST_PP_REPEAT_2_39(m, d) BOOST_PP_REPEAT_2_38(m, d) m(3, 38, d) +# define BOOST_PP_REPEAT_2_40(m, d) BOOST_PP_REPEAT_2_39(m, d) m(3, 39, d) +# define BOOST_PP_REPEAT_2_41(m, d) BOOST_PP_REPEAT_2_40(m, d) m(3, 40, d) +# define BOOST_PP_REPEAT_2_42(m, d) BOOST_PP_REPEAT_2_41(m, d) m(3, 41, d) +# define BOOST_PP_REPEAT_2_43(m, d) BOOST_PP_REPEAT_2_42(m, d) m(3, 42, d) +# define BOOST_PP_REPEAT_2_44(m, d) BOOST_PP_REPEAT_2_43(m, d) m(3, 43, d) +# define BOOST_PP_REPEAT_2_45(m, d) BOOST_PP_REPEAT_2_44(m, d) m(3, 44, d) +# define BOOST_PP_REPEAT_2_46(m, d) BOOST_PP_REPEAT_2_45(m, d) m(3, 45, d) +# define BOOST_PP_REPEAT_2_47(m, d) BOOST_PP_REPEAT_2_46(m, d) m(3, 46, d) +# define BOOST_PP_REPEAT_2_48(m, d) BOOST_PP_REPEAT_2_47(m, d) m(3, 47, d) +# define BOOST_PP_REPEAT_2_49(m, d) BOOST_PP_REPEAT_2_48(m, d) m(3, 48, d) +# define BOOST_PP_REPEAT_2_50(m, d) BOOST_PP_REPEAT_2_49(m, d) m(3, 49, d) +# define BOOST_PP_REPEAT_2_51(m, d) BOOST_PP_REPEAT_2_50(m, d) m(3, 50, d) +# define BOOST_PP_REPEAT_2_52(m, d) BOOST_PP_REPEAT_2_51(m, d) m(3, 51, d) +# define BOOST_PP_REPEAT_2_53(m, d) BOOST_PP_REPEAT_2_52(m, d) m(3, 52, d) +# define BOOST_PP_REPEAT_2_54(m, d) BOOST_PP_REPEAT_2_53(m, d) m(3, 53, d) +# define BOOST_PP_REPEAT_2_55(m, d) BOOST_PP_REPEAT_2_54(m, d) m(3, 54, d) +# define BOOST_PP_REPEAT_2_56(m, d) BOOST_PP_REPEAT_2_55(m, d) m(3, 55, d) +# define BOOST_PP_REPEAT_2_57(m, d) BOOST_PP_REPEAT_2_56(m, d) m(3, 56, d) +# define BOOST_PP_REPEAT_2_58(m, d) BOOST_PP_REPEAT_2_57(m, d) m(3, 57, d) +# define BOOST_PP_REPEAT_2_59(m, d) BOOST_PP_REPEAT_2_58(m, d) m(3, 58, d) +# define BOOST_PP_REPEAT_2_60(m, d) BOOST_PP_REPEAT_2_59(m, d) m(3, 59, d) +# define BOOST_PP_REPEAT_2_61(m, d) BOOST_PP_REPEAT_2_60(m, d) m(3, 60, d) +# define BOOST_PP_REPEAT_2_62(m, d) BOOST_PP_REPEAT_2_61(m, d) m(3, 61, d) +# define BOOST_PP_REPEAT_2_63(m, d) BOOST_PP_REPEAT_2_62(m, d) m(3, 62, d) +# define BOOST_PP_REPEAT_2_64(m, d) BOOST_PP_REPEAT_2_63(m, d) m(3, 63, d) +# define BOOST_PP_REPEAT_2_65(m, d) BOOST_PP_REPEAT_2_64(m, d) m(3, 64, d) +# define BOOST_PP_REPEAT_2_66(m, d) BOOST_PP_REPEAT_2_65(m, d) m(3, 65, d) +# define BOOST_PP_REPEAT_2_67(m, d) BOOST_PP_REPEAT_2_66(m, d) m(3, 66, d) +# define BOOST_PP_REPEAT_2_68(m, d) BOOST_PP_REPEAT_2_67(m, d) m(3, 67, d) +# define BOOST_PP_REPEAT_2_69(m, d) BOOST_PP_REPEAT_2_68(m, d) m(3, 68, d) +# define BOOST_PP_REPEAT_2_70(m, d) BOOST_PP_REPEAT_2_69(m, d) m(3, 69, d) +# define BOOST_PP_REPEAT_2_71(m, d) BOOST_PP_REPEAT_2_70(m, d) m(3, 70, d) +# define BOOST_PP_REPEAT_2_72(m, d) BOOST_PP_REPEAT_2_71(m, d) m(3, 71, d) +# define BOOST_PP_REPEAT_2_73(m, d) BOOST_PP_REPEAT_2_72(m, d) m(3, 72, d) +# define BOOST_PP_REPEAT_2_74(m, d) BOOST_PP_REPEAT_2_73(m, d) m(3, 73, d) +# define BOOST_PP_REPEAT_2_75(m, d) BOOST_PP_REPEAT_2_74(m, d) m(3, 74, d) +# define BOOST_PP_REPEAT_2_76(m, d) BOOST_PP_REPEAT_2_75(m, d) m(3, 75, d) +# define BOOST_PP_REPEAT_2_77(m, d) BOOST_PP_REPEAT_2_76(m, d) m(3, 76, d) +# define BOOST_PP_REPEAT_2_78(m, d) BOOST_PP_REPEAT_2_77(m, d) m(3, 77, d) +# define BOOST_PP_REPEAT_2_79(m, d) BOOST_PP_REPEAT_2_78(m, d) m(3, 78, d) +# define BOOST_PP_REPEAT_2_80(m, d) BOOST_PP_REPEAT_2_79(m, d) m(3, 79, d) +# define BOOST_PP_REPEAT_2_81(m, d) BOOST_PP_REPEAT_2_80(m, d) m(3, 80, d) +# define BOOST_PP_REPEAT_2_82(m, d) BOOST_PP_REPEAT_2_81(m, d) m(3, 81, d) +# define BOOST_PP_REPEAT_2_83(m, d) BOOST_PP_REPEAT_2_82(m, d) m(3, 82, d) +# define BOOST_PP_REPEAT_2_84(m, d) BOOST_PP_REPEAT_2_83(m, d) m(3, 83, d) +# define BOOST_PP_REPEAT_2_85(m, d) BOOST_PP_REPEAT_2_84(m, d) m(3, 84, d) +# define BOOST_PP_REPEAT_2_86(m, d) BOOST_PP_REPEAT_2_85(m, d) m(3, 85, d) +# define BOOST_PP_REPEAT_2_87(m, d) BOOST_PP_REPEAT_2_86(m, d) m(3, 86, d) +# define BOOST_PP_REPEAT_2_88(m, d) BOOST_PP_REPEAT_2_87(m, d) m(3, 87, d) +# define BOOST_PP_REPEAT_2_89(m, d) BOOST_PP_REPEAT_2_88(m, d) m(3, 88, d) +# define BOOST_PP_REPEAT_2_90(m, d) BOOST_PP_REPEAT_2_89(m, d) m(3, 89, d) +# define BOOST_PP_REPEAT_2_91(m, d) BOOST_PP_REPEAT_2_90(m, d) m(3, 90, d) +# define BOOST_PP_REPEAT_2_92(m, d) BOOST_PP_REPEAT_2_91(m, d) m(3, 91, d) +# define BOOST_PP_REPEAT_2_93(m, d) BOOST_PP_REPEAT_2_92(m, d) m(3, 92, d) +# define BOOST_PP_REPEAT_2_94(m, d) BOOST_PP_REPEAT_2_93(m, d) m(3, 93, d) +# define BOOST_PP_REPEAT_2_95(m, d) BOOST_PP_REPEAT_2_94(m, d) m(3, 94, d) +# define BOOST_PP_REPEAT_2_96(m, d) BOOST_PP_REPEAT_2_95(m, d) m(3, 95, d) +# define BOOST_PP_REPEAT_2_97(m, d) BOOST_PP_REPEAT_2_96(m, d) m(3, 96, d) +# define BOOST_PP_REPEAT_2_98(m, d) BOOST_PP_REPEAT_2_97(m, d) m(3, 97, d) +# define BOOST_PP_REPEAT_2_99(m, d) BOOST_PP_REPEAT_2_98(m, d) m(3, 98, d) +# define BOOST_PP_REPEAT_2_100(m, d) BOOST_PP_REPEAT_2_99(m, d) m(3, 99, d) +# define BOOST_PP_REPEAT_2_101(m, d) BOOST_PP_REPEAT_2_100(m, d) m(3, 100, d) +# define BOOST_PP_REPEAT_2_102(m, d) BOOST_PP_REPEAT_2_101(m, d) m(3, 101, d) +# define BOOST_PP_REPEAT_2_103(m, d) BOOST_PP_REPEAT_2_102(m, d) m(3, 102, d) +# define BOOST_PP_REPEAT_2_104(m, d) BOOST_PP_REPEAT_2_103(m, d) m(3, 103, d) +# define BOOST_PP_REPEAT_2_105(m, d) BOOST_PP_REPEAT_2_104(m, d) m(3, 104, d) +# define BOOST_PP_REPEAT_2_106(m, d) BOOST_PP_REPEAT_2_105(m, d) m(3, 105, d) +# define BOOST_PP_REPEAT_2_107(m, d) BOOST_PP_REPEAT_2_106(m, d) m(3, 106, d) +# define BOOST_PP_REPEAT_2_108(m, d) BOOST_PP_REPEAT_2_107(m, d) m(3, 107, d) +# define BOOST_PP_REPEAT_2_109(m, d) BOOST_PP_REPEAT_2_108(m, d) m(3, 108, d) +# define BOOST_PP_REPEAT_2_110(m, d) BOOST_PP_REPEAT_2_109(m, d) m(3, 109, d) +# define BOOST_PP_REPEAT_2_111(m, d) BOOST_PP_REPEAT_2_110(m, d) m(3, 110, d) +# define BOOST_PP_REPEAT_2_112(m, d) BOOST_PP_REPEAT_2_111(m, d) m(3, 111, d) +# define BOOST_PP_REPEAT_2_113(m, d) BOOST_PP_REPEAT_2_112(m, d) m(3, 112, d) +# define BOOST_PP_REPEAT_2_114(m, d) BOOST_PP_REPEAT_2_113(m, d) m(3, 113, d) +# define BOOST_PP_REPEAT_2_115(m, d) BOOST_PP_REPEAT_2_114(m, d) m(3, 114, d) +# define BOOST_PP_REPEAT_2_116(m, d) BOOST_PP_REPEAT_2_115(m, d) m(3, 115, d) +# define BOOST_PP_REPEAT_2_117(m, d) BOOST_PP_REPEAT_2_116(m, d) m(3, 116, d) +# define BOOST_PP_REPEAT_2_118(m, d) BOOST_PP_REPEAT_2_117(m, d) m(3, 117, d) +# define BOOST_PP_REPEAT_2_119(m, d) BOOST_PP_REPEAT_2_118(m, d) m(3, 118, d) +# define BOOST_PP_REPEAT_2_120(m, d) BOOST_PP_REPEAT_2_119(m, d) m(3, 119, d) +# define BOOST_PP_REPEAT_2_121(m, d) BOOST_PP_REPEAT_2_120(m, d) m(3, 120, d) +# define BOOST_PP_REPEAT_2_122(m, d) BOOST_PP_REPEAT_2_121(m, d) m(3, 121, d) +# define BOOST_PP_REPEAT_2_123(m, d) BOOST_PP_REPEAT_2_122(m, d) m(3, 122, d) +# define BOOST_PP_REPEAT_2_124(m, d) BOOST_PP_REPEAT_2_123(m, d) m(3, 123, d) +# define BOOST_PP_REPEAT_2_125(m, d) BOOST_PP_REPEAT_2_124(m, d) m(3, 124, d) +# define BOOST_PP_REPEAT_2_126(m, d) BOOST_PP_REPEAT_2_125(m, d) m(3, 125, d) +# define BOOST_PP_REPEAT_2_127(m, d) BOOST_PP_REPEAT_2_126(m, d) m(3, 126, d) +# define BOOST_PP_REPEAT_2_128(m, d) BOOST_PP_REPEAT_2_127(m, d) m(3, 127, d) +# define BOOST_PP_REPEAT_2_129(m, d) BOOST_PP_REPEAT_2_128(m, d) m(3, 128, d) +# define BOOST_PP_REPEAT_2_130(m, d) BOOST_PP_REPEAT_2_129(m, d) m(3, 129, d) +# define BOOST_PP_REPEAT_2_131(m, d) BOOST_PP_REPEAT_2_130(m, d) m(3, 130, d) +# define BOOST_PP_REPEAT_2_132(m, d) BOOST_PP_REPEAT_2_131(m, d) m(3, 131, d) +# define BOOST_PP_REPEAT_2_133(m, d) BOOST_PP_REPEAT_2_132(m, d) m(3, 132, d) +# define BOOST_PP_REPEAT_2_134(m, d) BOOST_PP_REPEAT_2_133(m, d) m(3, 133, d) +# define BOOST_PP_REPEAT_2_135(m, d) BOOST_PP_REPEAT_2_134(m, d) m(3, 134, d) +# define BOOST_PP_REPEAT_2_136(m, d) BOOST_PP_REPEAT_2_135(m, d) m(3, 135, d) +# define BOOST_PP_REPEAT_2_137(m, d) BOOST_PP_REPEAT_2_136(m, d) m(3, 136, d) +# define BOOST_PP_REPEAT_2_138(m, d) BOOST_PP_REPEAT_2_137(m, d) m(3, 137, d) +# define BOOST_PP_REPEAT_2_139(m, d) BOOST_PP_REPEAT_2_138(m, d) m(3, 138, d) +# define BOOST_PP_REPEAT_2_140(m, d) BOOST_PP_REPEAT_2_139(m, d) m(3, 139, d) +# define BOOST_PP_REPEAT_2_141(m, d) BOOST_PP_REPEAT_2_140(m, d) m(3, 140, d) +# define BOOST_PP_REPEAT_2_142(m, d) BOOST_PP_REPEAT_2_141(m, d) m(3, 141, d) +# define BOOST_PP_REPEAT_2_143(m, d) BOOST_PP_REPEAT_2_142(m, d) m(3, 142, d) +# define BOOST_PP_REPEAT_2_144(m, d) BOOST_PP_REPEAT_2_143(m, d) m(3, 143, d) +# define BOOST_PP_REPEAT_2_145(m, d) BOOST_PP_REPEAT_2_144(m, d) m(3, 144, d) +# define BOOST_PP_REPEAT_2_146(m, d) BOOST_PP_REPEAT_2_145(m, d) m(3, 145, d) +# define BOOST_PP_REPEAT_2_147(m, d) BOOST_PP_REPEAT_2_146(m, d) m(3, 146, d) +# define BOOST_PP_REPEAT_2_148(m, d) BOOST_PP_REPEAT_2_147(m, d) m(3, 147, d) +# define BOOST_PP_REPEAT_2_149(m, d) BOOST_PP_REPEAT_2_148(m, d) m(3, 148, d) +# define BOOST_PP_REPEAT_2_150(m, d) BOOST_PP_REPEAT_2_149(m, d) m(3, 149, d) +# define BOOST_PP_REPEAT_2_151(m, d) BOOST_PP_REPEAT_2_150(m, d) m(3, 150, d) +# define BOOST_PP_REPEAT_2_152(m, d) BOOST_PP_REPEAT_2_151(m, d) m(3, 151, d) +# define BOOST_PP_REPEAT_2_153(m, d) BOOST_PP_REPEAT_2_152(m, d) m(3, 152, d) +# define BOOST_PP_REPEAT_2_154(m, d) BOOST_PP_REPEAT_2_153(m, d) m(3, 153, d) +# define BOOST_PP_REPEAT_2_155(m, d) BOOST_PP_REPEAT_2_154(m, d) m(3, 154, d) +# define BOOST_PP_REPEAT_2_156(m, d) BOOST_PP_REPEAT_2_155(m, d) m(3, 155, d) +# define BOOST_PP_REPEAT_2_157(m, d) BOOST_PP_REPEAT_2_156(m, d) m(3, 156, d) +# define BOOST_PP_REPEAT_2_158(m, d) BOOST_PP_REPEAT_2_157(m, d) m(3, 157, d) +# define BOOST_PP_REPEAT_2_159(m, d) BOOST_PP_REPEAT_2_158(m, d) m(3, 158, d) +# define BOOST_PP_REPEAT_2_160(m, d) BOOST_PP_REPEAT_2_159(m, d) m(3, 159, d) +# define BOOST_PP_REPEAT_2_161(m, d) BOOST_PP_REPEAT_2_160(m, d) m(3, 160, d) +# define BOOST_PP_REPEAT_2_162(m, d) BOOST_PP_REPEAT_2_161(m, d) m(3, 161, d) +# define BOOST_PP_REPEAT_2_163(m, d) BOOST_PP_REPEAT_2_162(m, d) m(3, 162, d) +# define BOOST_PP_REPEAT_2_164(m, d) BOOST_PP_REPEAT_2_163(m, d) m(3, 163, d) +# define BOOST_PP_REPEAT_2_165(m, d) BOOST_PP_REPEAT_2_164(m, d) m(3, 164, d) +# define BOOST_PP_REPEAT_2_166(m, d) BOOST_PP_REPEAT_2_165(m, d) m(3, 165, d) +# define BOOST_PP_REPEAT_2_167(m, d) BOOST_PP_REPEAT_2_166(m, d) m(3, 166, d) +# define BOOST_PP_REPEAT_2_168(m, d) BOOST_PP_REPEAT_2_167(m, d) m(3, 167, d) +# define BOOST_PP_REPEAT_2_169(m, d) BOOST_PP_REPEAT_2_168(m, d) m(3, 168, d) +# define BOOST_PP_REPEAT_2_170(m, d) BOOST_PP_REPEAT_2_169(m, d) m(3, 169, d) +# define BOOST_PP_REPEAT_2_171(m, d) BOOST_PP_REPEAT_2_170(m, d) m(3, 170, d) +# define BOOST_PP_REPEAT_2_172(m, d) BOOST_PP_REPEAT_2_171(m, d) m(3, 171, d) +# define BOOST_PP_REPEAT_2_173(m, d) BOOST_PP_REPEAT_2_172(m, d) m(3, 172, d) +# define BOOST_PP_REPEAT_2_174(m, d) BOOST_PP_REPEAT_2_173(m, d) m(3, 173, d) +# define BOOST_PP_REPEAT_2_175(m, d) BOOST_PP_REPEAT_2_174(m, d) m(3, 174, d) +# define BOOST_PP_REPEAT_2_176(m, d) BOOST_PP_REPEAT_2_175(m, d) m(3, 175, d) +# define BOOST_PP_REPEAT_2_177(m, d) BOOST_PP_REPEAT_2_176(m, d) m(3, 176, d) +# define BOOST_PP_REPEAT_2_178(m, d) BOOST_PP_REPEAT_2_177(m, d) m(3, 177, d) +# define BOOST_PP_REPEAT_2_179(m, d) BOOST_PP_REPEAT_2_178(m, d) m(3, 178, d) +# define BOOST_PP_REPEAT_2_180(m, d) BOOST_PP_REPEAT_2_179(m, d) m(3, 179, d) +# define BOOST_PP_REPEAT_2_181(m, d) BOOST_PP_REPEAT_2_180(m, d) m(3, 180, d) +# define BOOST_PP_REPEAT_2_182(m, d) BOOST_PP_REPEAT_2_181(m, d) m(3, 181, d) +# define BOOST_PP_REPEAT_2_183(m, d) BOOST_PP_REPEAT_2_182(m, d) m(3, 182, d) +# define BOOST_PP_REPEAT_2_184(m, d) BOOST_PP_REPEAT_2_183(m, d) m(3, 183, d) +# define BOOST_PP_REPEAT_2_185(m, d) BOOST_PP_REPEAT_2_184(m, d) m(3, 184, d) +# define BOOST_PP_REPEAT_2_186(m, d) BOOST_PP_REPEAT_2_185(m, d) m(3, 185, d) +# define BOOST_PP_REPEAT_2_187(m, d) BOOST_PP_REPEAT_2_186(m, d) m(3, 186, d) +# define BOOST_PP_REPEAT_2_188(m, d) BOOST_PP_REPEAT_2_187(m, d) m(3, 187, d) +# define BOOST_PP_REPEAT_2_189(m, d) BOOST_PP_REPEAT_2_188(m, d) m(3, 188, d) +# define BOOST_PP_REPEAT_2_190(m, d) BOOST_PP_REPEAT_2_189(m, d) m(3, 189, d) +# define BOOST_PP_REPEAT_2_191(m, d) BOOST_PP_REPEAT_2_190(m, d) m(3, 190, d) +# define BOOST_PP_REPEAT_2_192(m, d) BOOST_PP_REPEAT_2_191(m, d) m(3, 191, d) +# define BOOST_PP_REPEAT_2_193(m, d) BOOST_PP_REPEAT_2_192(m, d) m(3, 192, d) +# define BOOST_PP_REPEAT_2_194(m, d) BOOST_PP_REPEAT_2_193(m, d) m(3, 193, d) +# define BOOST_PP_REPEAT_2_195(m, d) BOOST_PP_REPEAT_2_194(m, d) m(3, 194, d) +# define BOOST_PP_REPEAT_2_196(m, d) BOOST_PP_REPEAT_2_195(m, d) m(3, 195, d) +# define BOOST_PP_REPEAT_2_197(m, d) BOOST_PP_REPEAT_2_196(m, d) m(3, 196, d) +# define BOOST_PP_REPEAT_2_198(m, d) BOOST_PP_REPEAT_2_197(m, d) m(3, 197, d) +# define BOOST_PP_REPEAT_2_199(m, d) BOOST_PP_REPEAT_2_198(m, d) m(3, 198, d) +# define BOOST_PP_REPEAT_2_200(m, d) BOOST_PP_REPEAT_2_199(m, d) m(3, 199, d) +# define BOOST_PP_REPEAT_2_201(m, d) BOOST_PP_REPEAT_2_200(m, d) m(3, 200, d) +# define BOOST_PP_REPEAT_2_202(m, d) BOOST_PP_REPEAT_2_201(m, d) m(3, 201, d) +# define BOOST_PP_REPEAT_2_203(m, d) BOOST_PP_REPEAT_2_202(m, d) m(3, 202, d) +# define BOOST_PP_REPEAT_2_204(m, d) BOOST_PP_REPEAT_2_203(m, d) m(3, 203, d) +# define BOOST_PP_REPEAT_2_205(m, d) BOOST_PP_REPEAT_2_204(m, d) m(3, 204, d) +# define BOOST_PP_REPEAT_2_206(m, d) BOOST_PP_REPEAT_2_205(m, d) m(3, 205, d) +# define BOOST_PP_REPEAT_2_207(m, d) BOOST_PP_REPEAT_2_206(m, d) m(3, 206, d) +# define BOOST_PP_REPEAT_2_208(m, d) BOOST_PP_REPEAT_2_207(m, d) m(3, 207, d) +# define BOOST_PP_REPEAT_2_209(m, d) BOOST_PP_REPEAT_2_208(m, d) m(3, 208, d) +# define BOOST_PP_REPEAT_2_210(m, d) BOOST_PP_REPEAT_2_209(m, d) m(3, 209, d) +# define BOOST_PP_REPEAT_2_211(m, d) BOOST_PP_REPEAT_2_210(m, d) m(3, 210, d) +# define BOOST_PP_REPEAT_2_212(m, d) BOOST_PP_REPEAT_2_211(m, d) m(3, 211, d) +# define BOOST_PP_REPEAT_2_213(m, d) BOOST_PP_REPEAT_2_212(m, d) m(3, 212, d) +# define BOOST_PP_REPEAT_2_214(m, d) BOOST_PP_REPEAT_2_213(m, d) m(3, 213, d) +# define BOOST_PP_REPEAT_2_215(m, d) BOOST_PP_REPEAT_2_214(m, d) m(3, 214, d) +# define BOOST_PP_REPEAT_2_216(m, d) BOOST_PP_REPEAT_2_215(m, d) m(3, 215, d) +# define BOOST_PP_REPEAT_2_217(m, d) BOOST_PP_REPEAT_2_216(m, d) m(3, 216, d) +# define BOOST_PP_REPEAT_2_218(m, d) BOOST_PP_REPEAT_2_217(m, d) m(3, 217, d) +# define BOOST_PP_REPEAT_2_219(m, d) BOOST_PP_REPEAT_2_218(m, d) m(3, 218, d) +# define BOOST_PP_REPEAT_2_220(m, d) BOOST_PP_REPEAT_2_219(m, d) m(3, 219, d) +# define BOOST_PP_REPEAT_2_221(m, d) BOOST_PP_REPEAT_2_220(m, d) m(3, 220, d) +# define BOOST_PP_REPEAT_2_222(m, d) BOOST_PP_REPEAT_2_221(m, d) m(3, 221, d) +# define BOOST_PP_REPEAT_2_223(m, d) BOOST_PP_REPEAT_2_222(m, d) m(3, 222, d) +# define BOOST_PP_REPEAT_2_224(m, d) BOOST_PP_REPEAT_2_223(m, d) m(3, 223, d) +# define BOOST_PP_REPEAT_2_225(m, d) BOOST_PP_REPEAT_2_224(m, d) m(3, 224, d) +# define BOOST_PP_REPEAT_2_226(m, d) BOOST_PP_REPEAT_2_225(m, d) m(3, 225, d) +# define BOOST_PP_REPEAT_2_227(m, d) BOOST_PP_REPEAT_2_226(m, d) m(3, 226, d) +# define BOOST_PP_REPEAT_2_228(m, d) BOOST_PP_REPEAT_2_227(m, d) m(3, 227, d) +# define BOOST_PP_REPEAT_2_229(m, d) BOOST_PP_REPEAT_2_228(m, d) m(3, 228, d) +# define BOOST_PP_REPEAT_2_230(m, d) BOOST_PP_REPEAT_2_229(m, d) m(3, 229, d) +# define BOOST_PP_REPEAT_2_231(m, d) BOOST_PP_REPEAT_2_230(m, d) m(3, 230, d) +# define BOOST_PP_REPEAT_2_232(m, d) BOOST_PP_REPEAT_2_231(m, d) m(3, 231, d) +# define BOOST_PP_REPEAT_2_233(m, d) BOOST_PP_REPEAT_2_232(m, d) m(3, 232, d) +# define BOOST_PP_REPEAT_2_234(m, d) BOOST_PP_REPEAT_2_233(m, d) m(3, 233, d) +# define BOOST_PP_REPEAT_2_235(m, d) BOOST_PP_REPEAT_2_234(m, d) m(3, 234, d) +# define BOOST_PP_REPEAT_2_236(m, d) BOOST_PP_REPEAT_2_235(m, d) m(3, 235, d) +# define BOOST_PP_REPEAT_2_237(m, d) BOOST_PP_REPEAT_2_236(m, d) m(3, 236, d) +# define BOOST_PP_REPEAT_2_238(m, d) BOOST_PP_REPEAT_2_237(m, d) m(3, 237, d) +# define BOOST_PP_REPEAT_2_239(m, d) BOOST_PP_REPEAT_2_238(m, d) m(3, 238, d) +# define BOOST_PP_REPEAT_2_240(m, d) BOOST_PP_REPEAT_2_239(m, d) m(3, 239, d) +# define BOOST_PP_REPEAT_2_241(m, d) BOOST_PP_REPEAT_2_240(m, d) m(3, 240, d) +# define BOOST_PP_REPEAT_2_242(m, d) BOOST_PP_REPEAT_2_241(m, d) m(3, 241, d) +# define BOOST_PP_REPEAT_2_243(m, d) BOOST_PP_REPEAT_2_242(m, d) m(3, 242, d) +# define BOOST_PP_REPEAT_2_244(m, d) BOOST_PP_REPEAT_2_243(m, d) m(3, 243, d) +# define BOOST_PP_REPEAT_2_245(m, d) BOOST_PP_REPEAT_2_244(m, d) m(3, 244, d) +# define BOOST_PP_REPEAT_2_246(m, d) BOOST_PP_REPEAT_2_245(m, d) m(3, 245, d) +# define BOOST_PP_REPEAT_2_247(m, d) BOOST_PP_REPEAT_2_246(m, d) m(3, 246, d) +# define BOOST_PP_REPEAT_2_248(m, d) BOOST_PP_REPEAT_2_247(m, d) m(3, 247, d) +# define BOOST_PP_REPEAT_2_249(m, d) BOOST_PP_REPEAT_2_248(m, d) m(3, 248, d) +# define BOOST_PP_REPEAT_2_250(m, d) BOOST_PP_REPEAT_2_249(m, d) m(3, 249, d) +# define BOOST_PP_REPEAT_2_251(m, d) BOOST_PP_REPEAT_2_250(m, d) m(3, 250, d) +# define BOOST_PP_REPEAT_2_252(m, d) BOOST_PP_REPEAT_2_251(m, d) m(3, 251, d) +# define BOOST_PP_REPEAT_2_253(m, d) BOOST_PP_REPEAT_2_252(m, d) m(3, 252, d) +# define BOOST_PP_REPEAT_2_254(m, d) BOOST_PP_REPEAT_2_253(m, d) m(3, 253, d) +# define BOOST_PP_REPEAT_2_255(m, d) BOOST_PP_REPEAT_2_254(m, d) m(3, 254, d) +# define BOOST_PP_REPEAT_2_256(m, d) BOOST_PP_REPEAT_2_255(m, d) m(3, 255, d) +# +# define BOOST_PP_REPEAT_3_0(m, d) +# define BOOST_PP_REPEAT_3_1(m, d) m(4, 0, d) +# define BOOST_PP_REPEAT_3_2(m, d) BOOST_PP_REPEAT_3_1(m, d) m(4, 1, d) +# define BOOST_PP_REPEAT_3_3(m, d) BOOST_PP_REPEAT_3_2(m, d) m(4, 2, d) +# define BOOST_PP_REPEAT_3_4(m, d) BOOST_PP_REPEAT_3_3(m, d) m(4, 3, d) +# define BOOST_PP_REPEAT_3_5(m, d) BOOST_PP_REPEAT_3_4(m, d) m(4, 4, d) +# define BOOST_PP_REPEAT_3_6(m, d) BOOST_PP_REPEAT_3_5(m, d) m(4, 5, d) +# define BOOST_PP_REPEAT_3_7(m, d) BOOST_PP_REPEAT_3_6(m, d) m(4, 6, d) +# define BOOST_PP_REPEAT_3_8(m, d) BOOST_PP_REPEAT_3_7(m, d) m(4, 7, d) +# define BOOST_PP_REPEAT_3_9(m, d) BOOST_PP_REPEAT_3_8(m, d) m(4, 8, d) +# define BOOST_PP_REPEAT_3_10(m, d) BOOST_PP_REPEAT_3_9(m, d) m(4, 9, d) +# define BOOST_PP_REPEAT_3_11(m, d) BOOST_PP_REPEAT_3_10(m, d) m(4, 10, d) +# define BOOST_PP_REPEAT_3_12(m, d) BOOST_PP_REPEAT_3_11(m, d) m(4, 11, d) +# define BOOST_PP_REPEAT_3_13(m, d) BOOST_PP_REPEAT_3_12(m, d) m(4, 12, d) +# define BOOST_PP_REPEAT_3_14(m, d) BOOST_PP_REPEAT_3_13(m, d) m(4, 13, d) +# define BOOST_PP_REPEAT_3_15(m, d) BOOST_PP_REPEAT_3_14(m, d) m(4, 14, d) +# define BOOST_PP_REPEAT_3_16(m, d) BOOST_PP_REPEAT_3_15(m, d) m(4, 15, d) +# define BOOST_PP_REPEAT_3_17(m, d) BOOST_PP_REPEAT_3_16(m, d) m(4, 16, d) +# define BOOST_PP_REPEAT_3_18(m, d) BOOST_PP_REPEAT_3_17(m, d) m(4, 17, d) +# define BOOST_PP_REPEAT_3_19(m, d) BOOST_PP_REPEAT_3_18(m, d) m(4, 18, d) +# define BOOST_PP_REPEAT_3_20(m, d) BOOST_PP_REPEAT_3_19(m, d) m(4, 19, d) +# define BOOST_PP_REPEAT_3_21(m, d) BOOST_PP_REPEAT_3_20(m, d) m(4, 20, d) +# define BOOST_PP_REPEAT_3_22(m, d) BOOST_PP_REPEAT_3_21(m, d) m(4, 21, d) +# define BOOST_PP_REPEAT_3_23(m, d) BOOST_PP_REPEAT_3_22(m, d) m(4, 22, d) +# define BOOST_PP_REPEAT_3_24(m, d) BOOST_PP_REPEAT_3_23(m, d) m(4, 23, d) +# define BOOST_PP_REPEAT_3_25(m, d) BOOST_PP_REPEAT_3_24(m, d) m(4, 24, d) +# define BOOST_PP_REPEAT_3_26(m, d) BOOST_PP_REPEAT_3_25(m, d) m(4, 25, d) +# define BOOST_PP_REPEAT_3_27(m, d) BOOST_PP_REPEAT_3_26(m, d) m(4, 26, d) +# define BOOST_PP_REPEAT_3_28(m, d) BOOST_PP_REPEAT_3_27(m, d) m(4, 27, d) +# define BOOST_PP_REPEAT_3_29(m, d) BOOST_PP_REPEAT_3_28(m, d) m(4, 28, d) +# define BOOST_PP_REPEAT_3_30(m, d) BOOST_PP_REPEAT_3_29(m, d) m(4, 29, d) +# define BOOST_PP_REPEAT_3_31(m, d) BOOST_PP_REPEAT_3_30(m, d) m(4, 30, d) +# define BOOST_PP_REPEAT_3_32(m, d) BOOST_PP_REPEAT_3_31(m, d) m(4, 31, d) +# define BOOST_PP_REPEAT_3_33(m, d) BOOST_PP_REPEAT_3_32(m, d) m(4, 32, d) +# define BOOST_PP_REPEAT_3_34(m, d) BOOST_PP_REPEAT_3_33(m, d) m(4, 33, d) +# define BOOST_PP_REPEAT_3_35(m, d) BOOST_PP_REPEAT_3_34(m, d) m(4, 34, d) +# define BOOST_PP_REPEAT_3_36(m, d) BOOST_PP_REPEAT_3_35(m, d) m(4, 35, d) +# define BOOST_PP_REPEAT_3_37(m, d) BOOST_PP_REPEAT_3_36(m, d) m(4, 36, d) +# define BOOST_PP_REPEAT_3_38(m, d) BOOST_PP_REPEAT_3_37(m, d) m(4, 37, d) +# define BOOST_PP_REPEAT_3_39(m, d) BOOST_PP_REPEAT_3_38(m, d) m(4, 38, d) +# define BOOST_PP_REPEAT_3_40(m, d) BOOST_PP_REPEAT_3_39(m, d) m(4, 39, d) +# define BOOST_PP_REPEAT_3_41(m, d) BOOST_PP_REPEAT_3_40(m, d) m(4, 40, d) +# define BOOST_PP_REPEAT_3_42(m, d) BOOST_PP_REPEAT_3_41(m, d) m(4, 41, d) +# define BOOST_PP_REPEAT_3_43(m, d) BOOST_PP_REPEAT_3_42(m, d) m(4, 42, d) +# define BOOST_PP_REPEAT_3_44(m, d) BOOST_PP_REPEAT_3_43(m, d) m(4, 43, d) +# define BOOST_PP_REPEAT_3_45(m, d) BOOST_PP_REPEAT_3_44(m, d) m(4, 44, d) +# define BOOST_PP_REPEAT_3_46(m, d) BOOST_PP_REPEAT_3_45(m, d) m(4, 45, d) +# define BOOST_PP_REPEAT_3_47(m, d) BOOST_PP_REPEAT_3_46(m, d) m(4, 46, d) +# define BOOST_PP_REPEAT_3_48(m, d) BOOST_PP_REPEAT_3_47(m, d) m(4, 47, d) +# define BOOST_PP_REPEAT_3_49(m, d) BOOST_PP_REPEAT_3_48(m, d) m(4, 48, d) +# define BOOST_PP_REPEAT_3_50(m, d) BOOST_PP_REPEAT_3_49(m, d) m(4, 49, d) +# define BOOST_PP_REPEAT_3_51(m, d) BOOST_PP_REPEAT_3_50(m, d) m(4, 50, d) +# define BOOST_PP_REPEAT_3_52(m, d) BOOST_PP_REPEAT_3_51(m, d) m(4, 51, d) +# define BOOST_PP_REPEAT_3_53(m, d) BOOST_PP_REPEAT_3_52(m, d) m(4, 52, d) +# define BOOST_PP_REPEAT_3_54(m, d) BOOST_PP_REPEAT_3_53(m, d) m(4, 53, d) +# define BOOST_PP_REPEAT_3_55(m, d) BOOST_PP_REPEAT_3_54(m, d) m(4, 54, d) +# define BOOST_PP_REPEAT_3_56(m, d) BOOST_PP_REPEAT_3_55(m, d) m(4, 55, d) +# define BOOST_PP_REPEAT_3_57(m, d) BOOST_PP_REPEAT_3_56(m, d) m(4, 56, d) +# define BOOST_PP_REPEAT_3_58(m, d) BOOST_PP_REPEAT_3_57(m, d) m(4, 57, d) +# define BOOST_PP_REPEAT_3_59(m, d) BOOST_PP_REPEAT_3_58(m, d) m(4, 58, d) +# define BOOST_PP_REPEAT_3_60(m, d) BOOST_PP_REPEAT_3_59(m, d) m(4, 59, d) +# define BOOST_PP_REPEAT_3_61(m, d) BOOST_PP_REPEAT_3_60(m, d) m(4, 60, d) +# define BOOST_PP_REPEAT_3_62(m, d) BOOST_PP_REPEAT_3_61(m, d) m(4, 61, d) +# define BOOST_PP_REPEAT_3_63(m, d) BOOST_PP_REPEAT_3_62(m, d) m(4, 62, d) +# define BOOST_PP_REPEAT_3_64(m, d) BOOST_PP_REPEAT_3_63(m, d) m(4, 63, d) +# define BOOST_PP_REPEAT_3_65(m, d) BOOST_PP_REPEAT_3_64(m, d) m(4, 64, d) +# define BOOST_PP_REPEAT_3_66(m, d) BOOST_PP_REPEAT_3_65(m, d) m(4, 65, d) +# define BOOST_PP_REPEAT_3_67(m, d) BOOST_PP_REPEAT_3_66(m, d) m(4, 66, d) +# define BOOST_PP_REPEAT_3_68(m, d) BOOST_PP_REPEAT_3_67(m, d) m(4, 67, d) +# define BOOST_PP_REPEAT_3_69(m, d) BOOST_PP_REPEAT_3_68(m, d) m(4, 68, d) +# define BOOST_PP_REPEAT_3_70(m, d) BOOST_PP_REPEAT_3_69(m, d) m(4, 69, d) +# define BOOST_PP_REPEAT_3_71(m, d) BOOST_PP_REPEAT_3_70(m, d) m(4, 70, d) +# define BOOST_PP_REPEAT_3_72(m, d) BOOST_PP_REPEAT_3_71(m, d) m(4, 71, d) +# define BOOST_PP_REPEAT_3_73(m, d) BOOST_PP_REPEAT_3_72(m, d) m(4, 72, d) +# define BOOST_PP_REPEAT_3_74(m, d) BOOST_PP_REPEAT_3_73(m, d) m(4, 73, d) +# define BOOST_PP_REPEAT_3_75(m, d) BOOST_PP_REPEAT_3_74(m, d) m(4, 74, d) +# define BOOST_PP_REPEAT_3_76(m, d) BOOST_PP_REPEAT_3_75(m, d) m(4, 75, d) +# define BOOST_PP_REPEAT_3_77(m, d) BOOST_PP_REPEAT_3_76(m, d) m(4, 76, d) +# define BOOST_PP_REPEAT_3_78(m, d) BOOST_PP_REPEAT_3_77(m, d) m(4, 77, d) +# define BOOST_PP_REPEAT_3_79(m, d) BOOST_PP_REPEAT_3_78(m, d) m(4, 78, d) +# define BOOST_PP_REPEAT_3_80(m, d) BOOST_PP_REPEAT_3_79(m, d) m(4, 79, d) +# define BOOST_PP_REPEAT_3_81(m, d) BOOST_PP_REPEAT_3_80(m, d) m(4, 80, d) +# define BOOST_PP_REPEAT_3_82(m, d) BOOST_PP_REPEAT_3_81(m, d) m(4, 81, d) +# define BOOST_PP_REPEAT_3_83(m, d) BOOST_PP_REPEAT_3_82(m, d) m(4, 82, d) +# define BOOST_PP_REPEAT_3_84(m, d) BOOST_PP_REPEAT_3_83(m, d) m(4, 83, d) +# define BOOST_PP_REPEAT_3_85(m, d) BOOST_PP_REPEAT_3_84(m, d) m(4, 84, d) +# define BOOST_PP_REPEAT_3_86(m, d) BOOST_PP_REPEAT_3_85(m, d) m(4, 85, d) +# define BOOST_PP_REPEAT_3_87(m, d) BOOST_PP_REPEAT_3_86(m, d) m(4, 86, d) +# define BOOST_PP_REPEAT_3_88(m, d) BOOST_PP_REPEAT_3_87(m, d) m(4, 87, d) +# define BOOST_PP_REPEAT_3_89(m, d) BOOST_PP_REPEAT_3_88(m, d) m(4, 88, d) +# define BOOST_PP_REPEAT_3_90(m, d) BOOST_PP_REPEAT_3_89(m, d) m(4, 89, d) +# define BOOST_PP_REPEAT_3_91(m, d) BOOST_PP_REPEAT_3_90(m, d) m(4, 90, d) +# define BOOST_PP_REPEAT_3_92(m, d) BOOST_PP_REPEAT_3_91(m, d) m(4, 91, d) +# define BOOST_PP_REPEAT_3_93(m, d) BOOST_PP_REPEAT_3_92(m, d) m(4, 92, d) +# define BOOST_PP_REPEAT_3_94(m, d) BOOST_PP_REPEAT_3_93(m, d) m(4, 93, d) +# define BOOST_PP_REPEAT_3_95(m, d) BOOST_PP_REPEAT_3_94(m, d) m(4, 94, d) +# define BOOST_PP_REPEAT_3_96(m, d) BOOST_PP_REPEAT_3_95(m, d) m(4, 95, d) +# define BOOST_PP_REPEAT_3_97(m, d) BOOST_PP_REPEAT_3_96(m, d) m(4, 96, d) +# define BOOST_PP_REPEAT_3_98(m, d) BOOST_PP_REPEAT_3_97(m, d) m(4, 97, d) +# define BOOST_PP_REPEAT_3_99(m, d) BOOST_PP_REPEAT_3_98(m, d) m(4, 98, d) +# define BOOST_PP_REPEAT_3_100(m, d) BOOST_PP_REPEAT_3_99(m, d) m(4, 99, d) +# define BOOST_PP_REPEAT_3_101(m, d) BOOST_PP_REPEAT_3_100(m, d) m(4, 100, d) +# define BOOST_PP_REPEAT_3_102(m, d) BOOST_PP_REPEAT_3_101(m, d) m(4, 101, d) +# define BOOST_PP_REPEAT_3_103(m, d) BOOST_PP_REPEAT_3_102(m, d) m(4, 102, d) +# define BOOST_PP_REPEAT_3_104(m, d) BOOST_PP_REPEAT_3_103(m, d) m(4, 103, d) +# define BOOST_PP_REPEAT_3_105(m, d) BOOST_PP_REPEAT_3_104(m, d) m(4, 104, d) +# define BOOST_PP_REPEAT_3_106(m, d) BOOST_PP_REPEAT_3_105(m, d) m(4, 105, d) +# define BOOST_PP_REPEAT_3_107(m, d) BOOST_PP_REPEAT_3_106(m, d) m(4, 106, d) +# define BOOST_PP_REPEAT_3_108(m, d) BOOST_PP_REPEAT_3_107(m, d) m(4, 107, d) +# define BOOST_PP_REPEAT_3_109(m, d) BOOST_PP_REPEAT_3_108(m, d) m(4, 108, d) +# define BOOST_PP_REPEAT_3_110(m, d) BOOST_PP_REPEAT_3_109(m, d) m(4, 109, d) +# define BOOST_PP_REPEAT_3_111(m, d) BOOST_PP_REPEAT_3_110(m, d) m(4, 110, d) +# define BOOST_PP_REPEAT_3_112(m, d) BOOST_PP_REPEAT_3_111(m, d) m(4, 111, d) +# define BOOST_PP_REPEAT_3_113(m, d) BOOST_PP_REPEAT_3_112(m, d) m(4, 112, d) +# define BOOST_PP_REPEAT_3_114(m, d) BOOST_PP_REPEAT_3_113(m, d) m(4, 113, d) +# define BOOST_PP_REPEAT_3_115(m, d) BOOST_PP_REPEAT_3_114(m, d) m(4, 114, d) +# define BOOST_PP_REPEAT_3_116(m, d) BOOST_PP_REPEAT_3_115(m, d) m(4, 115, d) +# define BOOST_PP_REPEAT_3_117(m, d) BOOST_PP_REPEAT_3_116(m, d) m(4, 116, d) +# define BOOST_PP_REPEAT_3_118(m, d) BOOST_PP_REPEAT_3_117(m, d) m(4, 117, d) +# define BOOST_PP_REPEAT_3_119(m, d) BOOST_PP_REPEAT_3_118(m, d) m(4, 118, d) +# define BOOST_PP_REPEAT_3_120(m, d) BOOST_PP_REPEAT_3_119(m, d) m(4, 119, d) +# define BOOST_PP_REPEAT_3_121(m, d) BOOST_PP_REPEAT_3_120(m, d) m(4, 120, d) +# define BOOST_PP_REPEAT_3_122(m, d) BOOST_PP_REPEAT_3_121(m, d) m(4, 121, d) +# define BOOST_PP_REPEAT_3_123(m, d) BOOST_PP_REPEAT_3_122(m, d) m(4, 122, d) +# define BOOST_PP_REPEAT_3_124(m, d) BOOST_PP_REPEAT_3_123(m, d) m(4, 123, d) +# define BOOST_PP_REPEAT_3_125(m, d) BOOST_PP_REPEAT_3_124(m, d) m(4, 124, d) +# define BOOST_PP_REPEAT_3_126(m, d) BOOST_PP_REPEAT_3_125(m, d) m(4, 125, d) +# define BOOST_PP_REPEAT_3_127(m, d) BOOST_PP_REPEAT_3_126(m, d) m(4, 126, d) +# define BOOST_PP_REPEAT_3_128(m, d) BOOST_PP_REPEAT_3_127(m, d) m(4, 127, d) +# define BOOST_PP_REPEAT_3_129(m, d) BOOST_PP_REPEAT_3_128(m, d) m(4, 128, d) +# define BOOST_PP_REPEAT_3_130(m, d) BOOST_PP_REPEAT_3_129(m, d) m(4, 129, d) +# define BOOST_PP_REPEAT_3_131(m, d) BOOST_PP_REPEAT_3_130(m, d) m(4, 130, d) +# define BOOST_PP_REPEAT_3_132(m, d) BOOST_PP_REPEAT_3_131(m, d) m(4, 131, d) +# define BOOST_PP_REPEAT_3_133(m, d) BOOST_PP_REPEAT_3_132(m, d) m(4, 132, d) +# define BOOST_PP_REPEAT_3_134(m, d) BOOST_PP_REPEAT_3_133(m, d) m(4, 133, d) +# define BOOST_PP_REPEAT_3_135(m, d) BOOST_PP_REPEAT_3_134(m, d) m(4, 134, d) +# define BOOST_PP_REPEAT_3_136(m, d) BOOST_PP_REPEAT_3_135(m, d) m(4, 135, d) +# define BOOST_PP_REPEAT_3_137(m, d) BOOST_PP_REPEAT_3_136(m, d) m(4, 136, d) +# define BOOST_PP_REPEAT_3_138(m, d) BOOST_PP_REPEAT_3_137(m, d) m(4, 137, d) +# define BOOST_PP_REPEAT_3_139(m, d) BOOST_PP_REPEAT_3_138(m, d) m(4, 138, d) +# define BOOST_PP_REPEAT_3_140(m, d) BOOST_PP_REPEAT_3_139(m, d) m(4, 139, d) +# define BOOST_PP_REPEAT_3_141(m, d) BOOST_PP_REPEAT_3_140(m, d) m(4, 140, d) +# define BOOST_PP_REPEAT_3_142(m, d) BOOST_PP_REPEAT_3_141(m, d) m(4, 141, d) +# define BOOST_PP_REPEAT_3_143(m, d) BOOST_PP_REPEAT_3_142(m, d) m(4, 142, d) +# define BOOST_PP_REPEAT_3_144(m, d) BOOST_PP_REPEAT_3_143(m, d) m(4, 143, d) +# define BOOST_PP_REPEAT_3_145(m, d) BOOST_PP_REPEAT_3_144(m, d) m(4, 144, d) +# define BOOST_PP_REPEAT_3_146(m, d) BOOST_PP_REPEAT_3_145(m, d) m(4, 145, d) +# define BOOST_PP_REPEAT_3_147(m, d) BOOST_PP_REPEAT_3_146(m, d) m(4, 146, d) +# define BOOST_PP_REPEAT_3_148(m, d) BOOST_PP_REPEAT_3_147(m, d) m(4, 147, d) +# define BOOST_PP_REPEAT_3_149(m, d) BOOST_PP_REPEAT_3_148(m, d) m(4, 148, d) +# define BOOST_PP_REPEAT_3_150(m, d) BOOST_PP_REPEAT_3_149(m, d) m(4, 149, d) +# define BOOST_PP_REPEAT_3_151(m, d) BOOST_PP_REPEAT_3_150(m, d) m(4, 150, d) +# define BOOST_PP_REPEAT_3_152(m, d) BOOST_PP_REPEAT_3_151(m, d) m(4, 151, d) +# define BOOST_PP_REPEAT_3_153(m, d) BOOST_PP_REPEAT_3_152(m, d) m(4, 152, d) +# define BOOST_PP_REPEAT_3_154(m, d) BOOST_PP_REPEAT_3_153(m, d) m(4, 153, d) +# define BOOST_PP_REPEAT_3_155(m, d) BOOST_PP_REPEAT_3_154(m, d) m(4, 154, d) +# define BOOST_PP_REPEAT_3_156(m, d) BOOST_PP_REPEAT_3_155(m, d) m(4, 155, d) +# define BOOST_PP_REPEAT_3_157(m, d) BOOST_PP_REPEAT_3_156(m, d) m(4, 156, d) +# define BOOST_PP_REPEAT_3_158(m, d) BOOST_PP_REPEAT_3_157(m, d) m(4, 157, d) +# define BOOST_PP_REPEAT_3_159(m, d) BOOST_PP_REPEAT_3_158(m, d) m(4, 158, d) +# define BOOST_PP_REPEAT_3_160(m, d) BOOST_PP_REPEAT_3_159(m, d) m(4, 159, d) +# define BOOST_PP_REPEAT_3_161(m, d) BOOST_PP_REPEAT_3_160(m, d) m(4, 160, d) +# define BOOST_PP_REPEAT_3_162(m, d) BOOST_PP_REPEAT_3_161(m, d) m(4, 161, d) +# define BOOST_PP_REPEAT_3_163(m, d) BOOST_PP_REPEAT_3_162(m, d) m(4, 162, d) +# define BOOST_PP_REPEAT_3_164(m, d) BOOST_PP_REPEAT_3_163(m, d) m(4, 163, d) +# define BOOST_PP_REPEAT_3_165(m, d) BOOST_PP_REPEAT_3_164(m, d) m(4, 164, d) +# define BOOST_PP_REPEAT_3_166(m, d) BOOST_PP_REPEAT_3_165(m, d) m(4, 165, d) +# define BOOST_PP_REPEAT_3_167(m, d) BOOST_PP_REPEAT_3_166(m, d) m(4, 166, d) +# define BOOST_PP_REPEAT_3_168(m, d) BOOST_PP_REPEAT_3_167(m, d) m(4, 167, d) +# define BOOST_PP_REPEAT_3_169(m, d) BOOST_PP_REPEAT_3_168(m, d) m(4, 168, d) +# define BOOST_PP_REPEAT_3_170(m, d) BOOST_PP_REPEAT_3_169(m, d) m(4, 169, d) +# define BOOST_PP_REPEAT_3_171(m, d) BOOST_PP_REPEAT_3_170(m, d) m(4, 170, d) +# define BOOST_PP_REPEAT_3_172(m, d) BOOST_PP_REPEAT_3_171(m, d) m(4, 171, d) +# define BOOST_PP_REPEAT_3_173(m, d) BOOST_PP_REPEAT_3_172(m, d) m(4, 172, d) +# define BOOST_PP_REPEAT_3_174(m, d) BOOST_PP_REPEAT_3_173(m, d) m(4, 173, d) +# define BOOST_PP_REPEAT_3_175(m, d) BOOST_PP_REPEAT_3_174(m, d) m(4, 174, d) +# define BOOST_PP_REPEAT_3_176(m, d) BOOST_PP_REPEAT_3_175(m, d) m(4, 175, d) +# define BOOST_PP_REPEAT_3_177(m, d) BOOST_PP_REPEAT_3_176(m, d) m(4, 176, d) +# define BOOST_PP_REPEAT_3_178(m, d) BOOST_PP_REPEAT_3_177(m, d) m(4, 177, d) +# define BOOST_PP_REPEAT_3_179(m, d) BOOST_PP_REPEAT_3_178(m, d) m(4, 178, d) +# define BOOST_PP_REPEAT_3_180(m, d) BOOST_PP_REPEAT_3_179(m, d) m(4, 179, d) +# define BOOST_PP_REPEAT_3_181(m, d) BOOST_PP_REPEAT_3_180(m, d) m(4, 180, d) +# define BOOST_PP_REPEAT_3_182(m, d) BOOST_PP_REPEAT_3_181(m, d) m(4, 181, d) +# define BOOST_PP_REPEAT_3_183(m, d) BOOST_PP_REPEAT_3_182(m, d) m(4, 182, d) +# define BOOST_PP_REPEAT_3_184(m, d) BOOST_PP_REPEAT_3_183(m, d) m(4, 183, d) +# define BOOST_PP_REPEAT_3_185(m, d) BOOST_PP_REPEAT_3_184(m, d) m(4, 184, d) +# define BOOST_PP_REPEAT_3_186(m, d) BOOST_PP_REPEAT_3_185(m, d) m(4, 185, d) +# define BOOST_PP_REPEAT_3_187(m, d) BOOST_PP_REPEAT_3_186(m, d) m(4, 186, d) +# define BOOST_PP_REPEAT_3_188(m, d) BOOST_PP_REPEAT_3_187(m, d) m(4, 187, d) +# define BOOST_PP_REPEAT_3_189(m, d) BOOST_PP_REPEAT_3_188(m, d) m(4, 188, d) +# define BOOST_PP_REPEAT_3_190(m, d) BOOST_PP_REPEAT_3_189(m, d) m(4, 189, d) +# define BOOST_PP_REPEAT_3_191(m, d) BOOST_PP_REPEAT_3_190(m, d) m(4, 190, d) +# define BOOST_PP_REPEAT_3_192(m, d) BOOST_PP_REPEAT_3_191(m, d) m(4, 191, d) +# define BOOST_PP_REPEAT_3_193(m, d) BOOST_PP_REPEAT_3_192(m, d) m(4, 192, d) +# define BOOST_PP_REPEAT_3_194(m, d) BOOST_PP_REPEAT_3_193(m, d) m(4, 193, d) +# define BOOST_PP_REPEAT_3_195(m, d) BOOST_PP_REPEAT_3_194(m, d) m(4, 194, d) +# define BOOST_PP_REPEAT_3_196(m, d) BOOST_PP_REPEAT_3_195(m, d) m(4, 195, d) +# define BOOST_PP_REPEAT_3_197(m, d) BOOST_PP_REPEAT_3_196(m, d) m(4, 196, d) +# define BOOST_PP_REPEAT_3_198(m, d) BOOST_PP_REPEAT_3_197(m, d) m(4, 197, d) +# define BOOST_PP_REPEAT_3_199(m, d) BOOST_PP_REPEAT_3_198(m, d) m(4, 198, d) +# define BOOST_PP_REPEAT_3_200(m, d) BOOST_PP_REPEAT_3_199(m, d) m(4, 199, d) +# define BOOST_PP_REPEAT_3_201(m, d) BOOST_PP_REPEAT_3_200(m, d) m(4, 200, d) +# define BOOST_PP_REPEAT_3_202(m, d) BOOST_PP_REPEAT_3_201(m, d) m(4, 201, d) +# define BOOST_PP_REPEAT_3_203(m, d) BOOST_PP_REPEAT_3_202(m, d) m(4, 202, d) +# define BOOST_PP_REPEAT_3_204(m, d) BOOST_PP_REPEAT_3_203(m, d) m(4, 203, d) +# define BOOST_PP_REPEAT_3_205(m, d) BOOST_PP_REPEAT_3_204(m, d) m(4, 204, d) +# define BOOST_PP_REPEAT_3_206(m, d) BOOST_PP_REPEAT_3_205(m, d) m(4, 205, d) +# define BOOST_PP_REPEAT_3_207(m, d) BOOST_PP_REPEAT_3_206(m, d) m(4, 206, d) +# define BOOST_PP_REPEAT_3_208(m, d) BOOST_PP_REPEAT_3_207(m, d) m(4, 207, d) +# define BOOST_PP_REPEAT_3_209(m, d) BOOST_PP_REPEAT_3_208(m, d) m(4, 208, d) +# define BOOST_PP_REPEAT_3_210(m, d) BOOST_PP_REPEAT_3_209(m, d) m(4, 209, d) +# define BOOST_PP_REPEAT_3_211(m, d) BOOST_PP_REPEAT_3_210(m, d) m(4, 210, d) +# define BOOST_PP_REPEAT_3_212(m, d) BOOST_PP_REPEAT_3_211(m, d) m(4, 211, d) +# define BOOST_PP_REPEAT_3_213(m, d) BOOST_PP_REPEAT_3_212(m, d) m(4, 212, d) +# define BOOST_PP_REPEAT_3_214(m, d) BOOST_PP_REPEAT_3_213(m, d) m(4, 213, d) +# define BOOST_PP_REPEAT_3_215(m, d) BOOST_PP_REPEAT_3_214(m, d) m(4, 214, d) +# define BOOST_PP_REPEAT_3_216(m, d) BOOST_PP_REPEAT_3_215(m, d) m(4, 215, d) +# define BOOST_PP_REPEAT_3_217(m, d) BOOST_PP_REPEAT_3_216(m, d) m(4, 216, d) +# define BOOST_PP_REPEAT_3_218(m, d) BOOST_PP_REPEAT_3_217(m, d) m(4, 217, d) +# define BOOST_PP_REPEAT_3_219(m, d) BOOST_PP_REPEAT_3_218(m, d) m(4, 218, d) +# define BOOST_PP_REPEAT_3_220(m, d) BOOST_PP_REPEAT_3_219(m, d) m(4, 219, d) +# define BOOST_PP_REPEAT_3_221(m, d) BOOST_PP_REPEAT_3_220(m, d) m(4, 220, d) +# define BOOST_PP_REPEAT_3_222(m, d) BOOST_PP_REPEAT_3_221(m, d) m(4, 221, d) +# define BOOST_PP_REPEAT_3_223(m, d) BOOST_PP_REPEAT_3_222(m, d) m(4, 222, d) +# define BOOST_PP_REPEAT_3_224(m, d) BOOST_PP_REPEAT_3_223(m, d) m(4, 223, d) +# define BOOST_PP_REPEAT_3_225(m, d) BOOST_PP_REPEAT_3_224(m, d) m(4, 224, d) +# define BOOST_PP_REPEAT_3_226(m, d) BOOST_PP_REPEAT_3_225(m, d) m(4, 225, d) +# define BOOST_PP_REPEAT_3_227(m, d) BOOST_PP_REPEAT_3_226(m, d) m(4, 226, d) +# define BOOST_PP_REPEAT_3_228(m, d) BOOST_PP_REPEAT_3_227(m, d) m(4, 227, d) +# define BOOST_PP_REPEAT_3_229(m, d) BOOST_PP_REPEAT_3_228(m, d) m(4, 228, d) +# define BOOST_PP_REPEAT_3_230(m, d) BOOST_PP_REPEAT_3_229(m, d) m(4, 229, d) +# define BOOST_PP_REPEAT_3_231(m, d) BOOST_PP_REPEAT_3_230(m, d) m(4, 230, d) +# define BOOST_PP_REPEAT_3_232(m, d) BOOST_PP_REPEAT_3_231(m, d) m(4, 231, d) +# define BOOST_PP_REPEAT_3_233(m, d) BOOST_PP_REPEAT_3_232(m, d) m(4, 232, d) +# define BOOST_PP_REPEAT_3_234(m, d) BOOST_PP_REPEAT_3_233(m, d) m(4, 233, d) +# define BOOST_PP_REPEAT_3_235(m, d) BOOST_PP_REPEAT_3_234(m, d) m(4, 234, d) +# define BOOST_PP_REPEAT_3_236(m, d) BOOST_PP_REPEAT_3_235(m, d) m(4, 235, d) +# define BOOST_PP_REPEAT_3_237(m, d) BOOST_PP_REPEAT_3_236(m, d) m(4, 236, d) +# define BOOST_PP_REPEAT_3_238(m, d) BOOST_PP_REPEAT_3_237(m, d) m(4, 237, d) +# define BOOST_PP_REPEAT_3_239(m, d) BOOST_PP_REPEAT_3_238(m, d) m(4, 238, d) +# define BOOST_PP_REPEAT_3_240(m, d) BOOST_PP_REPEAT_3_239(m, d) m(4, 239, d) +# define BOOST_PP_REPEAT_3_241(m, d) BOOST_PP_REPEAT_3_240(m, d) m(4, 240, d) +# define BOOST_PP_REPEAT_3_242(m, d) BOOST_PP_REPEAT_3_241(m, d) m(4, 241, d) +# define BOOST_PP_REPEAT_3_243(m, d) BOOST_PP_REPEAT_3_242(m, d) m(4, 242, d) +# define BOOST_PP_REPEAT_3_244(m, d) BOOST_PP_REPEAT_3_243(m, d) m(4, 243, d) +# define BOOST_PP_REPEAT_3_245(m, d) BOOST_PP_REPEAT_3_244(m, d) m(4, 244, d) +# define BOOST_PP_REPEAT_3_246(m, d) BOOST_PP_REPEAT_3_245(m, d) m(4, 245, d) +# define BOOST_PP_REPEAT_3_247(m, d) BOOST_PP_REPEAT_3_246(m, d) m(4, 246, d) +# define BOOST_PP_REPEAT_3_248(m, d) BOOST_PP_REPEAT_3_247(m, d) m(4, 247, d) +# define BOOST_PP_REPEAT_3_249(m, d) BOOST_PP_REPEAT_3_248(m, d) m(4, 248, d) +# define BOOST_PP_REPEAT_3_250(m, d) BOOST_PP_REPEAT_3_249(m, d) m(4, 249, d) +# define BOOST_PP_REPEAT_3_251(m, d) BOOST_PP_REPEAT_3_250(m, d) m(4, 250, d) +# define BOOST_PP_REPEAT_3_252(m, d) BOOST_PP_REPEAT_3_251(m, d) m(4, 251, d) +# define BOOST_PP_REPEAT_3_253(m, d) BOOST_PP_REPEAT_3_252(m, d) m(4, 252, d) +# define BOOST_PP_REPEAT_3_254(m, d) BOOST_PP_REPEAT_3_253(m, d) m(4, 253, d) +# define BOOST_PP_REPEAT_3_255(m, d) BOOST_PP_REPEAT_3_254(m, d) m(4, 254, d) +# define BOOST_PP_REPEAT_3_256(m, d) BOOST_PP_REPEAT_3_255(m, d) m(4, 255, d) +# +# endif diff --git a/contrib/src/boost/preprocessor/repetition/repeat_from_to.hpp b/contrib/src/boost/preprocessor/repetition/repeat_from_to.hpp new file mode 100644 index 0000000..efe539e --- /dev/null +++ b/contrib/src/boost/preprocessor/repetition/repeat_from_to.hpp @@ -0,0 +1,87 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_REPEAT_FROM_TO_HPP +# define BOOST_PREPROCESSOR_REPETITION_REPEAT_FROM_TO_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_REPEAT_FROM_TO */ +# +# if 0 +# define BOOST_PP_REPEAT_FROM_TO(first, last, macro, data) +# endif +# +# define BOOST_PP_REPEAT_FROM_TO BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) +# +# define BOOST_PP_REPEAT_FROM_TO_1(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_1(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt) +# define BOOST_PP_REPEAT_FROM_TO_2(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_2(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt) +# define BOOST_PP_REPEAT_FROM_TO_3(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_3(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt) +# define BOOST_PP_REPEAT_FROM_TO_4(f, l, m, dt) BOOST_PP_ERROR(0x0003) +# +# define BOOST_PP_REPEAT_FROM_TO_1ST BOOST_PP_REPEAT_FROM_TO_1 +# define BOOST_PP_REPEAT_FROM_TO_2ND BOOST_PP_REPEAT_FROM_TO_2 +# define BOOST_PP_REPEAT_FROM_TO_3RD BOOST_PP_REPEAT_FROM_TO_3 +# +# /* BOOST_PP_REPEAT_FROM_TO_D */ +# +# if 0 +# define BOOST_PP_REPEAT_FROM_TO_D(d, first, last, macro, data) +# endif +# +# define BOOST_PP_REPEAT_FROM_TO_D BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_D_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_REPEAT_FROM_TO_D_1(d, f, l, m, dt) BOOST_PP_REPEAT_1(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_1, (d, f, m, dt)) +# define BOOST_PP_REPEAT_FROM_TO_D_2(d, f, l, m, dt) BOOST_PP_REPEAT_2(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_2, (d, f, m, dt)) +# define BOOST_PP_REPEAT_FROM_TO_D_3(d, f, l, m, dt) BOOST_PP_REPEAT_3(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_3, (d, f, m, dt)) +# else +# define BOOST_PP_REPEAT_FROM_TO_D_1(d, f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_1_I(d, f, l, m, dt) +# define BOOST_PP_REPEAT_FROM_TO_D_2(d, f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_2_I(d, f, l, m, dt) +# define BOOST_PP_REPEAT_FROM_TO_D_3(d, f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_3_I(d, f, l, m, dt) +# define BOOST_PP_REPEAT_FROM_TO_D_1_I(d, f, l, m, dt) BOOST_PP_REPEAT_1(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_1, (d, f, m, dt)) +# define BOOST_PP_REPEAT_FROM_TO_D_2_I(d, f, l, m, dt) BOOST_PP_REPEAT_2(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_2, (d, f, m, dt)) +# define BOOST_PP_REPEAT_FROM_TO_D_3_I(d, f, l, m, dt) BOOST_PP_REPEAT_3(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_3, (d, f, m, dt)) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_REPEAT_FROM_TO_M_1(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_1_IM(z, n, BOOST_PP_TUPLE_REM_4 dfmd) +# define BOOST_PP_REPEAT_FROM_TO_M_2(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_2_IM(z, n, BOOST_PP_TUPLE_REM_4 dfmd) +# define BOOST_PP_REPEAT_FROM_TO_M_3(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_3_IM(z, n, BOOST_PP_TUPLE_REM_4 dfmd) +# define BOOST_PP_REPEAT_FROM_TO_M_1_IM(z, n, im) BOOST_PP_REPEAT_FROM_TO_M_1_I(z, n, im) +# define BOOST_PP_REPEAT_FROM_TO_M_2_IM(z, n, im) BOOST_PP_REPEAT_FROM_TO_M_2_I(z, n, im) +# define BOOST_PP_REPEAT_FROM_TO_M_3_IM(z, n, im) BOOST_PP_REPEAT_FROM_TO_M_3_I(z, n, im) +# else +# define BOOST_PP_REPEAT_FROM_TO_M_1(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(4, 0, dfmd), BOOST_PP_TUPLE_ELEM(4, 1, dfmd), BOOST_PP_TUPLE_ELEM(4, 2, dfmd), BOOST_PP_TUPLE_ELEM(4, 3, dfmd)) +# define BOOST_PP_REPEAT_FROM_TO_M_2(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(4, 0, dfmd), BOOST_PP_TUPLE_ELEM(4, 1, dfmd), BOOST_PP_TUPLE_ELEM(4, 2, dfmd), BOOST_PP_TUPLE_ELEM(4, 3, dfmd)) +# define BOOST_PP_REPEAT_FROM_TO_M_3(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(4, 0, dfmd), BOOST_PP_TUPLE_ELEM(4, 1, dfmd), BOOST_PP_TUPLE_ELEM(4, 2, dfmd), BOOST_PP_TUPLE_ELEM(4, 3, dfmd)) +# endif +# +# define BOOST_PP_REPEAT_FROM_TO_M_1_I(z, n, d, f, m, dt) BOOST_PP_REPEAT_FROM_TO_M_1_II(z, BOOST_PP_ADD_D(d, n, f), m, dt) +# define BOOST_PP_REPEAT_FROM_TO_M_2_I(z, n, d, f, m, dt) BOOST_PP_REPEAT_FROM_TO_M_2_II(z, BOOST_PP_ADD_D(d, n, f), m, dt) +# define BOOST_PP_REPEAT_FROM_TO_M_3_I(z, n, d, f, m, dt) BOOST_PP_REPEAT_FROM_TO_M_3_II(z, BOOST_PP_ADD_D(d, n, f), m, dt) +# +# define BOOST_PP_REPEAT_FROM_TO_M_1_II(z, n, m, dt) m(z, n, dt) +# define BOOST_PP_REPEAT_FROM_TO_M_2_II(z, n, m, dt) m(z, n, dt) +# define BOOST_PP_REPEAT_FROM_TO_M_3_II(z, n, m, dt) m(z, n, dt) +# +# endif diff --git a/contrib/src/boost/preprocessor/seq/cat.hpp b/contrib/src/boost/preprocessor/seq/cat.hpp new file mode 100644 index 0000000..b6b09ff --- /dev/null +++ b/contrib/src/boost/preprocessor/seq/cat.hpp @@ -0,0 +1,49 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_CAT_HPP +# define BOOST_PREPROCESSOR_SEQ_CAT_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_CAT */ +# +# define BOOST_PP_SEQ_CAT(seq) \ + BOOST_PP_IF( \ + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \ + BOOST_PP_SEQ_CAT_I, \ + BOOST_PP_SEQ_HEAD \ + )(seq) \ + /**/ +# define BOOST_PP_SEQ_CAT_I(seq) BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq)) +# +# define BOOST_PP_SEQ_CAT_O(s, st, elem) BOOST_PP_SEQ_CAT_O_I(st, elem) +# define BOOST_PP_SEQ_CAT_O_I(a, b) a ## b +# +# /* BOOST_PP_SEQ_CAT_S */ +# +# define BOOST_PP_SEQ_CAT_S(s, seq) \ + BOOST_PP_IF( \ + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \ + BOOST_PP_SEQ_CAT_S_I_A, \ + BOOST_PP_SEQ_CAT_S_I_B \ + )(s, seq) \ + /**/ +# define BOOST_PP_SEQ_CAT_S_I_A(s, seq) BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq)) +# define BOOST_PP_SEQ_CAT_S_I_B(s, seq) BOOST_PP_SEQ_HEAD(seq) +# +# endif diff --git a/contrib/src/boost/preprocessor/seq/detail/is_empty.hpp b/contrib/src/boost/preprocessor/seq/detail/is_empty.hpp new file mode 100644 index 0000000..1a80a2f --- /dev/null +++ b/contrib/src/boost/preprocessor/seq/detail/is_empty.hpp @@ -0,0 +1,49 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2015. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_DETAIL_IS_EMPTY_HPP +# define BOOST_PREPROCESSOR_SEQ_DETAIL_IS_EMPTY_HPP +# +# include +# include +# include +# include +# include +# +/* An empty seq is one that is just BOOST_PP_SEQ_NIL */ +# +# define BOOST_PP_SEQ_DETAIL_IS_EMPTY(seq) \ + BOOST_PP_COMPL \ + ( \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq) \ + ) \ +/**/ +# +# define BOOST_PP_SEQ_DETAIL_IS_EMPTY_SIZE(size) \ + BOOST_PP_COMPL \ + ( \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size) \ + ) \ +/**/ +# +# define BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq) \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq)) \ +/**/ +# +# define BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size) \ + BOOST_PP_BOOL(size) \ +/**/ +# +# define BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq) \ + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq (nil))) \ +/**/ +# +# endif diff --git a/contrib/src/boost/preprocessor/seq/detail/split.hpp b/contrib/src/boost/preprocessor/seq/detail/split.hpp new file mode 100644 index 0000000..7c33931 --- /dev/null +++ b/contrib/src/boost/preprocessor/seq/detail/split.hpp @@ -0,0 +1,284 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_DETAIL_SPLIT_HPP +# define BOOST_PREPROCESSOR_SEQ_DETAIL_SPLIT_HPP +# +# include +# +# /* BOOST_PP_SEQ_SPLIT */ +# +# define BOOST_PP_SEQ_SPLIT(n, seq) BOOST_PP_SEQ_SPLIT_D(n, seq) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_SPLIT_D(n, seq) (BOOST_PP_SEQ_SPLIT_ ## n seq) +# else +# define BOOST_PP_SEQ_SPLIT_D(n, seq) (BOOST_PP_SEQ_SPLIT_ ## n ## seq) +# endif +# +# define BOOST_PP_SEQ_SPLIT_1(x) (x), +# define BOOST_PP_SEQ_SPLIT_2(x) (x) BOOST_PP_SEQ_SPLIT_1 +# define BOOST_PP_SEQ_SPLIT_3(x) (x) BOOST_PP_SEQ_SPLIT_2 +# define BOOST_PP_SEQ_SPLIT_4(x) (x) BOOST_PP_SEQ_SPLIT_3 +# define BOOST_PP_SEQ_SPLIT_5(x) (x) BOOST_PP_SEQ_SPLIT_4 +# define BOOST_PP_SEQ_SPLIT_6(x) (x) BOOST_PP_SEQ_SPLIT_5 +# define BOOST_PP_SEQ_SPLIT_7(x) (x) BOOST_PP_SEQ_SPLIT_6 +# define BOOST_PP_SEQ_SPLIT_8(x) (x) BOOST_PP_SEQ_SPLIT_7 +# define BOOST_PP_SEQ_SPLIT_9(x) (x) BOOST_PP_SEQ_SPLIT_8 +# define BOOST_PP_SEQ_SPLIT_10(x) (x) BOOST_PP_SEQ_SPLIT_9 +# define BOOST_PP_SEQ_SPLIT_11(x) (x) BOOST_PP_SEQ_SPLIT_10 +# define BOOST_PP_SEQ_SPLIT_12(x) (x) BOOST_PP_SEQ_SPLIT_11 +# define BOOST_PP_SEQ_SPLIT_13(x) (x) BOOST_PP_SEQ_SPLIT_12 +# define BOOST_PP_SEQ_SPLIT_14(x) (x) BOOST_PP_SEQ_SPLIT_13 +# define BOOST_PP_SEQ_SPLIT_15(x) (x) BOOST_PP_SEQ_SPLIT_14 +# define BOOST_PP_SEQ_SPLIT_16(x) (x) BOOST_PP_SEQ_SPLIT_15 +# define BOOST_PP_SEQ_SPLIT_17(x) (x) BOOST_PP_SEQ_SPLIT_16 +# define BOOST_PP_SEQ_SPLIT_18(x) (x) BOOST_PP_SEQ_SPLIT_17 +# define BOOST_PP_SEQ_SPLIT_19(x) (x) BOOST_PP_SEQ_SPLIT_18 +# define BOOST_PP_SEQ_SPLIT_20(x) (x) BOOST_PP_SEQ_SPLIT_19 +# define BOOST_PP_SEQ_SPLIT_21(x) (x) BOOST_PP_SEQ_SPLIT_20 +# define BOOST_PP_SEQ_SPLIT_22(x) (x) BOOST_PP_SEQ_SPLIT_21 +# define BOOST_PP_SEQ_SPLIT_23(x) (x) BOOST_PP_SEQ_SPLIT_22 +# define BOOST_PP_SEQ_SPLIT_24(x) (x) BOOST_PP_SEQ_SPLIT_23 +# define BOOST_PP_SEQ_SPLIT_25(x) (x) BOOST_PP_SEQ_SPLIT_24 +# define BOOST_PP_SEQ_SPLIT_26(x) (x) BOOST_PP_SEQ_SPLIT_25 +# define BOOST_PP_SEQ_SPLIT_27(x) (x) BOOST_PP_SEQ_SPLIT_26 +# define BOOST_PP_SEQ_SPLIT_28(x) (x) BOOST_PP_SEQ_SPLIT_27 +# define BOOST_PP_SEQ_SPLIT_29(x) (x) BOOST_PP_SEQ_SPLIT_28 +# define BOOST_PP_SEQ_SPLIT_30(x) (x) BOOST_PP_SEQ_SPLIT_29 +# define BOOST_PP_SEQ_SPLIT_31(x) (x) BOOST_PP_SEQ_SPLIT_30 +# define BOOST_PP_SEQ_SPLIT_32(x) (x) BOOST_PP_SEQ_SPLIT_31 +# define BOOST_PP_SEQ_SPLIT_33(x) (x) BOOST_PP_SEQ_SPLIT_32 +# define BOOST_PP_SEQ_SPLIT_34(x) (x) BOOST_PP_SEQ_SPLIT_33 +# define BOOST_PP_SEQ_SPLIT_35(x) (x) BOOST_PP_SEQ_SPLIT_34 +# define BOOST_PP_SEQ_SPLIT_36(x) (x) BOOST_PP_SEQ_SPLIT_35 +# define BOOST_PP_SEQ_SPLIT_37(x) (x) BOOST_PP_SEQ_SPLIT_36 +# define BOOST_PP_SEQ_SPLIT_38(x) (x) BOOST_PP_SEQ_SPLIT_37 +# define BOOST_PP_SEQ_SPLIT_39(x) (x) BOOST_PP_SEQ_SPLIT_38 +# define BOOST_PP_SEQ_SPLIT_40(x) (x) BOOST_PP_SEQ_SPLIT_39 +# define BOOST_PP_SEQ_SPLIT_41(x) (x) BOOST_PP_SEQ_SPLIT_40 +# define BOOST_PP_SEQ_SPLIT_42(x) (x) BOOST_PP_SEQ_SPLIT_41 +# define BOOST_PP_SEQ_SPLIT_43(x) (x) BOOST_PP_SEQ_SPLIT_42 +# define BOOST_PP_SEQ_SPLIT_44(x) (x) BOOST_PP_SEQ_SPLIT_43 +# define BOOST_PP_SEQ_SPLIT_45(x) (x) BOOST_PP_SEQ_SPLIT_44 +# define BOOST_PP_SEQ_SPLIT_46(x) (x) BOOST_PP_SEQ_SPLIT_45 +# define BOOST_PP_SEQ_SPLIT_47(x) (x) BOOST_PP_SEQ_SPLIT_46 +# define BOOST_PP_SEQ_SPLIT_48(x) (x) BOOST_PP_SEQ_SPLIT_47 +# define BOOST_PP_SEQ_SPLIT_49(x) (x) BOOST_PP_SEQ_SPLIT_48 +# define BOOST_PP_SEQ_SPLIT_50(x) (x) BOOST_PP_SEQ_SPLIT_49 +# define BOOST_PP_SEQ_SPLIT_51(x) (x) BOOST_PP_SEQ_SPLIT_50 +# define BOOST_PP_SEQ_SPLIT_52(x) (x) BOOST_PP_SEQ_SPLIT_51 +# define BOOST_PP_SEQ_SPLIT_53(x) (x) BOOST_PP_SEQ_SPLIT_52 +# define BOOST_PP_SEQ_SPLIT_54(x) (x) BOOST_PP_SEQ_SPLIT_53 +# define BOOST_PP_SEQ_SPLIT_55(x) (x) BOOST_PP_SEQ_SPLIT_54 +# define BOOST_PP_SEQ_SPLIT_56(x) (x) BOOST_PP_SEQ_SPLIT_55 +# define BOOST_PP_SEQ_SPLIT_57(x) (x) BOOST_PP_SEQ_SPLIT_56 +# define BOOST_PP_SEQ_SPLIT_58(x) (x) BOOST_PP_SEQ_SPLIT_57 +# define BOOST_PP_SEQ_SPLIT_59(x) (x) BOOST_PP_SEQ_SPLIT_58 +# define BOOST_PP_SEQ_SPLIT_60(x) (x) BOOST_PP_SEQ_SPLIT_59 +# define BOOST_PP_SEQ_SPLIT_61(x) (x) BOOST_PP_SEQ_SPLIT_60 +# define BOOST_PP_SEQ_SPLIT_62(x) (x) BOOST_PP_SEQ_SPLIT_61 +# define BOOST_PP_SEQ_SPLIT_63(x) (x) BOOST_PP_SEQ_SPLIT_62 +# define BOOST_PP_SEQ_SPLIT_64(x) (x) BOOST_PP_SEQ_SPLIT_63 +# define BOOST_PP_SEQ_SPLIT_65(x) (x) BOOST_PP_SEQ_SPLIT_64 +# define BOOST_PP_SEQ_SPLIT_66(x) (x) BOOST_PP_SEQ_SPLIT_65 +# define BOOST_PP_SEQ_SPLIT_67(x) (x) BOOST_PP_SEQ_SPLIT_66 +# define BOOST_PP_SEQ_SPLIT_68(x) (x) BOOST_PP_SEQ_SPLIT_67 +# define BOOST_PP_SEQ_SPLIT_69(x) (x) BOOST_PP_SEQ_SPLIT_68 +# define BOOST_PP_SEQ_SPLIT_70(x) (x) BOOST_PP_SEQ_SPLIT_69 +# define BOOST_PP_SEQ_SPLIT_71(x) (x) BOOST_PP_SEQ_SPLIT_70 +# define BOOST_PP_SEQ_SPLIT_72(x) (x) BOOST_PP_SEQ_SPLIT_71 +# define BOOST_PP_SEQ_SPLIT_73(x) (x) BOOST_PP_SEQ_SPLIT_72 +# define BOOST_PP_SEQ_SPLIT_74(x) (x) BOOST_PP_SEQ_SPLIT_73 +# define BOOST_PP_SEQ_SPLIT_75(x) (x) BOOST_PP_SEQ_SPLIT_74 +# define BOOST_PP_SEQ_SPLIT_76(x) (x) BOOST_PP_SEQ_SPLIT_75 +# define BOOST_PP_SEQ_SPLIT_77(x) (x) BOOST_PP_SEQ_SPLIT_76 +# define BOOST_PP_SEQ_SPLIT_78(x) (x) BOOST_PP_SEQ_SPLIT_77 +# define BOOST_PP_SEQ_SPLIT_79(x) (x) BOOST_PP_SEQ_SPLIT_78 +# define BOOST_PP_SEQ_SPLIT_80(x) (x) BOOST_PP_SEQ_SPLIT_79 +# define BOOST_PP_SEQ_SPLIT_81(x) (x) BOOST_PP_SEQ_SPLIT_80 +# define BOOST_PP_SEQ_SPLIT_82(x) (x) BOOST_PP_SEQ_SPLIT_81 +# define BOOST_PP_SEQ_SPLIT_83(x) (x) BOOST_PP_SEQ_SPLIT_82 +# define BOOST_PP_SEQ_SPLIT_84(x) (x) BOOST_PP_SEQ_SPLIT_83 +# define BOOST_PP_SEQ_SPLIT_85(x) (x) BOOST_PP_SEQ_SPLIT_84 +# define BOOST_PP_SEQ_SPLIT_86(x) (x) BOOST_PP_SEQ_SPLIT_85 +# define BOOST_PP_SEQ_SPLIT_87(x) (x) BOOST_PP_SEQ_SPLIT_86 +# define BOOST_PP_SEQ_SPLIT_88(x) (x) BOOST_PP_SEQ_SPLIT_87 +# define BOOST_PP_SEQ_SPLIT_89(x) (x) BOOST_PP_SEQ_SPLIT_88 +# define BOOST_PP_SEQ_SPLIT_90(x) (x) BOOST_PP_SEQ_SPLIT_89 +# define BOOST_PP_SEQ_SPLIT_91(x) (x) BOOST_PP_SEQ_SPLIT_90 +# define BOOST_PP_SEQ_SPLIT_92(x) (x) BOOST_PP_SEQ_SPLIT_91 +# define BOOST_PP_SEQ_SPLIT_93(x) (x) BOOST_PP_SEQ_SPLIT_92 +# define BOOST_PP_SEQ_SPLIT_94(x) (x) BOOST_PP_SEQ_SPLIT_93 +# define BOOST_PP_SEQ_SPLIT_95(x) (x) BOOST_PP_SEQ_SPLIT_94 +# define BOOST_PP_SEQ_SPLIT_96(x) (x) BOOST_PP_SEQ_SPLIT_95 +# define BOOST_PP_SEQ_SPLIT_97(x) (x) BOOST_PP_SEQ_SPLIT_96 +# define BOOST_PP_SEQ_SPLIT_98(x) (x) BOOST_PP_SEQ_SPLIT_97 +# define BOOST_PP_SEQ_SPLIT_99(x) (x) BOOST_PP_SEQ_SPLIT_98 +# define BOOST_PP_SEQ_SPLIT_100(x) (x) BOOST_PP_SEQ_SPLIT_99 +# define BOOST_PP_SEQ_SPLIT_101(x) (x) BOOST_PP_SEQ_SPLIT_100 +# define BOOST_PP_SEQ_SPLIT_102(x) (x) BOOST_PP_SEQ_SPLIT_101 +# define BOOST_PP_SEQ_SPLIT_103(x) (x) BOOST_PP_SEQ_SPLIT_102 +# define BOOST_PP_SEQ_SPLIT_104(x) (x) BOOST_PP_SEQ_SPLIT_103 +# define BOOST_PP_SEQ_SPLIT_105(x) (x) BOOST_PP_SEQ_SPLIT_104 +# define BOOST_PP_SEQ_SPLIT_106(x) (x) BOOST_PP_SEQ_SPLIT_105 +# define BOOST_PP_SEQ_SPLIT_107(x) (x) BOOST_PP_SEQ_SPLIT_106 +# define BOOST_PP_SEQ_SPLIT_108(x) (x) BOOST_PP_SEQ_SPLIT_107 +# define BOOST_PP_SEQ_SPLIT_109(x) (x) BOOST_PP_SEQ_SPLIT_108 +# define BOOST_PP_SEQ_SPLIT_110(x) (x) BOOST_PP_SEQ_SPLIT_109 +# define BOOST_PP_SEQ_SPLIT_111(x) (x) BOOST_PP_SEQ_SPLIT_110 +# define BOOST_PP_SEQ_SPLIT_112(x) (x) BOOST_PP_SEQ_SPLIT_111 +# define BOOST_PP_SEQ_SPLIT_113(x) (x) BOOST_PP_SEQ_SPLIT_112 +# define BOOST_PP_SEQ_SPLIT_114(x) (x) BOOST_PP_SEQ_SPLIT_113 +# define BOOST_PP_SEQ_SPLIT_115(x) (x) BOOST_PP_SEQ_SPLIT_114 +# define BOOST_PP_SEQ_SPLIT_116(x) (x) BOOST_PP_SEQ_SPLIT_115 +# define BOOST_PP_SEQ_SPLIT_117(x) (x) BOOST_PP_SEQ_SPLIT_116 +# define BOOST_PP_SEQ_SPLIT_118(x) (x) BOOST_PP_SEQ_SPLIT_117 +# define BOOST_PP_SEQ_SPLIT_119(x) (x) BOOST_PP_SEQ_SPLIT_118 +# define BOOST_PP_SEQ_SPLIT_120(x) (x) BOOST_PP_SEQ_SPLIT_119 +# define BOOST_PP_SEQ_SPLIT_121(x) (x) BOOST_PP_SEQ_SPLIT_120 +# define BOOST_PP_SEQ_SPLIT_122(x) (x) BOOST_PP_SEQ_SPLIT_121 +# define BOOST_PP_SEQ_SPLIT_123(x) (x) BOOST_PP_SEQ_SPLIT_122 +# define BOOST_PP_SEQ_SPLIT_124(x) (x) BOOST_PP_SEQ_SPLIT_123 +# define BOOST_PP_SEQ_SPLIT_125(x) (x) BOOST_PP_SEQ_SPLIT_124 +# define BOOST_PP_SEQ_SPLIT_126(x) (x) BOOST_PP_SEQ_SPLIT_125 +# define BOOST_PP_SEQ_SPLIT_127(x) (x) BOOST_PP_SEQ_SPLIT_126 +# define BOOST_PP_SEQ_SPLIT_128(x) (x) BOOST_PP_SEQ_SPLIT_127 +# define BOOST_PP_SEQ_SPLIT_129(x) (x) BOOST_PP_SEQ_SPLIT_128 +# define BOOST_PP_SEQ_SPLIT_130(x) (x) BOOST_PP_SEQ_SPLIT_129 +# define BOOST_PP_SEQ_SPLIT_131(x) (x) BOOST_PP_SEQ_SPLIT_130 +# define BOOST_PP_SEQ_SPLIT_132(x) (x) BOOST_PP_SEQ_SPLIT_131 +# define BOOST_PP_SEQ_SPLIT_133(x) (x) BOOST_PP_SEQ_SPLIT_132 +# define BOOST_PP_SEQ_SPLIT_134(x) (x) BOOST_PP_SEQ_SPLIT_133 +# define BOOST_PP_SEQ_SPLIT_135(x) (x) BOOST_PP_SEQ_SPLIT_134 +# define BOOST_PP_SEQ_SPLIT_136(x) (x) BOOST_PP_SEQ_SPLIT_135 +# define BOOST_PP_SEQ_SPLIT_137(x) (x) BOOST_PP_SEQ_SPLIT_136 +# define BOOST_PP_SEQ_SPLIT_138(x) (x) BOOST_PP_SEQ_SPLIT_137 +# define BOOST_PP_SEQ_SPLIT_139(x) (x) BOOST_PP_SEQ_SPLIT_138 +# define BOOST_PP_SEQ_SPLIT_140(x) (x) BOOST_PP_SEQ_SPLIT_139 +# define BOOST_PP_SEQ_SPLIT_141(x) (x) BOOST_PP_SEQ_SPLIT_140 +# define BOOST_PP_SEQ_SPLIT_142(x) (x) BOOST_PP_SEQ_SPLIT_141 +# define BOOST_PP_SEQ_SPLIT_143(x) (x) BOOST_PP_SEQ_SPLIT_142 +# define BOOST_PP_SEQ_SPLIT_144(x) (x) BOOST_PP_SEQ_SPLIT_143 +# define BOOST_PP_SEQ_SPLIT_145(x) (x) BOOST_PP_SEQ_SPLIT_144 +# define BOOST_PP_SEQ_SPLIT_146(x) (x) BOOST_PP_SEQ_SPLIT_145 +# define BOOST_PP_SEQ_SPLIT_147(x) (x) BOOST_PP_SEQ_SPLIT_146 +# define BOOST_PP_SEQ_SPLIT_148(x) (x) BOOST_PP_SEQ_SPLIT_147 +# define BOOST_PP_SEQ_SPLIT_149(x) (x) BOOST_PP_SEQ_SPLIT_148 +# define BOOST_PP_SEQ_SPLIT_150(x) (x) BOOST_PP_SEQ_SPLIT_149 +# define BOOST_PP_SEQ_SPLIT_151(x) (x) BOOST_PP_SEQ_SPLIT_150 +# define BOOST_PP_SEQ_SPLIT_152(x) (x) BOOST_PP_SEQ_SPLIT_151 +# define BOOST_PP_SEQ_SPLIT_153(x) (x) BOOST_PP_SEQ_SPLIT_152 +# define BOOST_PP_SEQ_SPLIT_154(x) (x) BOOST_PP_SEQ_SPLIT_153 +# define BOOST_PP_SEQ_SPLIT_155(x) (x) BOOST_PP_SEQ_SPLIT_154 +# define BOOST_PP_SEQ_SPLIT_156(x) (x) BOOST_PP_SEQ_SPLIT_155 +# define BOOST_PP_SEQ_SPLIT_157(x) (x) BOOST_PP_SEQ_SPLIT_156 +# define BOOST_PP_SEQ_SPLIT_158(x) (x) BOOST_PP_SEQ_SPLIT_157 +# define BOOST_PP_SEQ_SPLIT_159(x) (x) BOOST_PP_SEQ_SPLIT_158 +# define BOOST_PP_SEQ_SPLIT_160(x) (x) BOOST_PP_SEQ_SPLIT_159 +# define BOOST_PP_SEQ_SPLIT_161(x) (x) BOOST_PP_SEQ_SPLIT_160 +# define BOOST_PP_SEQ_SPLIT_162(x) (x) BOOST_PP_SEQ_SPLIT_161 +# define BOOST_PP_SEQ_SPLIT_163(x) (x) BOOST_PP_SEQ_SPLIT_162 +# define BOOST_PP_SEQ_SPLIT_164(x) (x) BOOST_PP_SEQ_SPLIT_163 +# define BOOST_PP_SEQ_SPLIT_165(x) (x) BOOST_PP_SEQ_SPLIT_164 +# define BOOST_PP_SEQ_SPLIT_166(x) (x) BOOST_PP_SEQ_SPLIT_165 +# define BOOST_PP_SEQ_SPLIT_167(x) (x) BOOST_PP_SEQ_SPLIT_166 +# define BOOST_PP_SEQ_SPLIT_168(x) (x) BOOST_PP_SEQ_SPLIT_167 +# define BOOST_PP_SEQ_SPLIT_169(x) (x) BOOST_PP_SEQ_SPLIT_168 +# define BOOST_PP_SEQ_SPLIT_170(x) (x) BOOST_PP_SEQ_SPLIT_169 +# define BOOST_PP_SEQ_SPLIT_171(x) (x) BOOST_PP_SEQ_SPLIT_170 +# define BOOST_PP_SEQ_SPLIT_172(x) (x) BOOST_PP_SEQ_SPLIT_171 +# define BOOST_PP_SEQ_SPLIT_173(x) (x) BOOST_PP_SEQ_SPLIT_172 +# define BOOST_PP_SEQ_SPLIT_174(x) (x) BOOST_PP_SEQ_SPLIT_173 +# define BOOST_PP_SEQ_SPLIT_175(x) (x) BOOST_PP_SEQ_SPLIT_174 +# define BOOST_PP_SEQ_SPLIT_176(x) (x) BOOST_PP_SEQ_SPLIT_175 +# define BOOST_PP_SEQ_SPLIT_177(x) (x) BOOST_PP_SEQ_SPLIT_176 +# define BOOST_PP_SEQ_SPLIT_178(x) (x) BOOST_PP_SEQ_SPLIT_177 +# define BOOST_PP_SEQ_SPLIT_179(x) (x) BOOST_PP_SEQ_SPLIT_178 +# define BOOST_PP_SEQ_SPLIT_180(x) (x) BOOST_PP_SEQ_SPLIT_179 +# define BOOST_PP_SEQ_SPLIT_181(x) (x) BOOST_PP_SEQ_SPLIT_180 +# define BOOST_PP_SEQ_SPLIT_182(x) (x) BOOST_PP_SEQ_SPLIT_181 +# define BOOST_PP_SEQ_SPLIT_183(x) (x) BOOST_PP_SEQ_SPLIT_182 +# define BOOST_PP_SEQ_SPLIT_184(x) (x) BOOST_PP_SEQ_SPLIT_183 +# define BOOST_PP_SEQ_SPLIT_185(x) (x) BOOST_PP_SEQ_SPLIT_184 +# define BOOST_PP_SEQ_SPLIT_186(x) (x) BOOST_PP_SEQ_SPLIT_185 +# define BOOST_PP_SEQ_SPLIT_187(x) (x) BOOST_PP_SEQ_SPLIT_186 +# define BOOST_PP_SEQ_SPLIT_188(x) (x) BOOST_PP_SEQ_SPLIT_187 +# define BOOST_PP_SEQ_SPLIT_189(x) (x) BOOST_PP_SEQ_SPLIT_188 +# define BOOST_PP_SEQ_SPLIT_190(x) (x) BOOST_PP_SEQ_SPLIT_189 +# define BOOST_PP_SEQ_SPLIT_191(x) (x) BOOST_PP_SEQ_SPLIT_190 +# define BOOST_PP_SEQ_SPLIT_192(x) (x) BOOST_PP_SEQ_SPLIT_191 +# define BOOST_PP_SEQ_SPLIT_193(x) (x) BOOST_PP_SEQ_SPLIT_192 +# define BOOST_PP_SEQ_SPLIT_194(x) (x) BOOST_PP_SEQ_SPLIT_193 +# define BOOST_PP_SEQ_SPLIT_195(x) (x) BOOST_PP_SEQ_SPLIT_194 +# define BOOST_PP_SEQ_SPLIT_196(x) (x) BOOST_PP_SEQ_SPLIT_195 +# define BOOST_PP_SEQ_SPLIT_197(x) (x) BOOST_PP_SEQ_SPLIT_196 +# define BOOST_PP_SEQ_SPLIT_198(x) (x) BOOST_PP_SEQ_SPLIT_197 +# define BOOST_PP_SEQ_SPLIT_199(x) (x) BOOST_PP_SEQ_SPLIT_198 +# define BOOST_PP_SEQ_SPLIT_200(x) (x) BOOST_PP_SEQ_SPLIT_199 +# define BOOST_PP_SEQ_SPLIT_201(x) (x) BOOST_PP_SEQ_SPLIT_200 +# define BOOST_PP_SEQ_SPLIT_202(x) (x) BOOST_PP_SEQ_SPLIT_201 +# define BOOST_PP_SEQ_SPLIT_203(x) (x) BOOST_PP_SEQ_SPLIT_202 +# define BOOST_PP_SEQ_SPLIT_204(x) (x) BOOST_PP_SEQ_SPLIT_203 +# define BOOST_PP_SEQ_SPLIT_205(x) (x) BOOST_PP_SEQ_SPLIT_204 +# define BOOST_PP_SEQ_SPLIT_206(x) (x) BOOST_PP_SEQ_SPLIT_205 +# define BOOST_PP_SEQ_SPLIT_207(x) (x) BOOST_PP_SEQ_SPLIT_206 +# define BOOST_PP_SEQ_SPLIT_208(x) (x) BOOST_PP_SEQ_SPLIT_207 +# define BOOST_PP_SEQ_SPLIT_209(x) (x) BOOST_PP_SEQ_SPLIT_208 +# define BOOST_PP_SEQ_SPLIT_210(x) (x) BOOST_PP_SEQ_SPLIT_209 +# define BOOST_PP_SEQ_SPLIT_211(x) (x) BOOST_PP_SEQ_SPLIT_210 +# define BOOST_PP_SEQ_SPLIT_212(x) (x) BOOST_PP_SEQ_SPLIT_211 +# define BOOST_PP_SEQ_SPLIT_213(x) (x) BOOST_PP_SEQ_SPLIT_212 +# define BOOST_PP_SEQ_SPLIT_214(x) (x) BOOST_PP_SEQ_SPLIT_213 +# define BOOST_PP_SEQ_SPLIT_215(x) (x) BOOST_PP_SEQ_SPLIT_214 +# define BOOST_PP_SEQ_SPLIT_216(x) (x) BOOST_PP_SEQ_SPLIT_215 +# define BOOST_PP_SEQ_SPLIT_217(x) (x) BOOST_PP_SEQ_SPLIT_216 +# define BOOST_PP_SEQ_SPLIT_218(x) (x) BOOST_PP_SEQ_SPLIT_217 +# define BOOST_PP_SEQ_SPLIT_219(x) (x) BOOST_PP_SEQ_SPLIT_218 +# define BOOST_PP_SEQ_SPLIT_220(x) (x) BOOST_PP_SEQ_SPLIT_219 +# define BOOST_PP_SEQ_SPLIT_221(x) (x) BOOST_PP_SEQ_SPLIT_220 +# define BOOST_PP_SEQ_SPLIT_222(x) (x) BOOST_PP_SEQ_SPLIT_221 +# define BOOST_PP_SEQ_SPLIT_223(x) (x) BOOST_PP_SEQ_SPLIT_222 +# define BOOST_PP_SEQ_SPLIT_224(x) (x) BOOST_PP_SEQ_SPLIT_223 +# define BOOST_PP_SEQ_SPLIT_225(x) (x) BOOST_PP_SEQ_SPLIT_224 +# define BOOST_PP_SEQ_SPLIT_226(x) (x) BOOST_PP_SEQ_SPLIT_225 +# define BOOST_PP_SEQ_SPLIT_227(x) (x) BOOST_PP_SEQ_SPLIT_226 +# define BOOST_PP_SEQ_SPLIT_228(x) (x) BOOST_PP_SEQ_SPLIT_227 +# define BOOST_PP_SEQ_SPLIT_229(x) (x) BOOST_PP_SEQ_SPLIT_228 +# define BOOST_PP_SEQ_SPLIT_230(x) (x) BOOST_PP_SEQ_SPLIT_229 +# define BOOST_PP_SEQ_SPLIT_231(x) (x) BOOST_PP_SEQ_SPLIT_230 +# define BOOST_PP_SEQ_SPLIT_232(x) (x) BOOST_PP_SEQ_SPLIT_231 +# define BOOST_PP_SEQ_SPLIT_233(x) (x) BOOST_PP_SEQ_SPLIT_232 +# define BOOST_PP_SEQ_SPLIT_234(x) (x) BOOST_PP_SEQ_SPLIT_233 +# define BOOST_PP_SEQ_SPLIT_235(x) (x) BOOST_PP_SEQ_SPLIT_234 +# define BOOST_PP_SEQ_SPLIT_236(x) (x) BOOST_PP_SEQ_SPLIT_235 +# define BOOST_PP_SEQ_SPLIT_237(x) (x) BOOST_PP_SEQ_SPLIT_236 +# define BOOST_PP_SEQ_SPLIT_238(x) (x) BOOST_PP_SEQ_SPLIT_237 +# define BOOST_PP_SEQ_SPLIT_239(x) (x) BOOST_PP_SEQ_SPLIT_238 +# define BOOST_PP_SEQ_SPLIT_240(x) (x) BOOST_PP_SEQ_SPLIT_239 +# define BOOST_PP_SEQ_SPLIT_241(x) (x) BOOST_PP_SEQ_SPLIT_240 +# define BOOST_PP_SEQ_SPLIT_242(x) (x) BOOST_PP_SEQ_SPLIT_241 +# define BOOST_PP_SEQ_SPLIT_243(x) (x) BOOST_PP_SEQ_SPLIT_242 +# define BOOST_PP_SEQ_SPLIT_244(x) (x) BOOST_PP_SEQ_SPLIT_243 +# define BOOST_PP_SEQ_SPLIT_245(x) (x) BOOST_PP_SEQ_SPLIT_244 +# define BOOST_PP_SEQ_SPLIT_246(x) (x) BOOST_PP_SEQ_SPLIT_245 +# define BOOST_PP_SEQ_SPLIT_247(x) (x) BOOST_PP_SEQ_SPLIT_246 +# define BOOST_PP_SEQ_SPLIT_248(x) (x) BOOST_PP_SEQ_SPLIT_247 +# define BOOST_PP_SEQ_SPLIT_249(x) (x) BOOST_PP_SEQ_SPLIT_248 +# define BOOST_PP_SEQ_SPLIT_250(x) (x) BOOST_PP_SEQ_SPLIT_249 +# define BOOST_PP_SEQ_SPLIT_251(x) (x) BOOST_PP_SEQ_SPLIT_250 +# define BOOST_PP_SEQ_SPLIT_252(x) (x) BOOST_PP_SEQ_SPLIT_251 +# define BOOST_PP_SEQ_SPLIT_253(x) (x) BOOST_PP_SEQ_SPLIT_252 +# define BOOST_PP_SEQ_SPLIT_254(x) (x) BOOST_PP_SEQ_SPLIT_253 +# define BOOST_PP_SEQ_SPLIT_255(x) (x) BOOST_PP_SEQ_SPLIT_254 +# define BOOST_PP_SEQ_SPLIT_256(x) (x) BOOST_PP_SEQ_SPLIT_255 +# +# endif diff --git a/contrib/src/boost/preprocessor/seq/elem.hpp b/contrib/src/boost/preprocessor/seq/elem.hpp new file mode 100644 index 0000000..9c7a4b2 --- /dev/null +++ b/contrib/src/boost/preprocessor/seq/elem.hpp @@ -0,0 +1,304 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_ELEM_HPP +# define BOOST_PREPROCESSOR_SEQ_ELEM_HPP +# +# include +# include +# include +# +# /* BOOST_PP_SEQ_ELEM */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_ELEM(i, seq) BOOST_PP_SEQ_ELEM_I(i, seq) +# else +# define BOOST_PP_SEQ_ELEM(i, seq) BOOST_PP_SEQ_ELEM_I((i, seq)) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_SEQ_ELEM_I(i, seq) BOOST_PP_SEQ_ELEM_II((BOOST_PP_SEQ_ELEM_ ## i seq)) +# define BOOST_PP_SEQ_ELEM_II(res) BOOST_PP_SEQ_ELEM_IV(BOOST_PP_SEQ_ELEM_III res) +# define BOOST_PP_SEQ_ELEM_III(x, _) x BOOST_PP_EMPTY() +# define BOOST_PP_SEQ_ELEM_IV(x) x +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_ELEM_I(par) BOOST_PP_SEQ_ELEM_II ## par +# define BOOST_PP_SEQ_ELEM_II(i, seq) BOOST_PP_SEQ_ELEM_III(BOOST_PP_SEQ_ELEM_ ## i ## seq) +# define BOOST_PP_SEQ_ELEM_III(im) BOOST_PP_SEQ_ELEM_IV(im) +# define BOOST_PP_SEQ_ELEM_IV(x, _) x +# else +# if defined(__IBMC__) || defined(__IBMCPP__) +# define BOOST_PP_SEQ_ELEM_I(i, seq) BOOST_PP_SEQ_ELEM_II(BOOST_PP_CAT(BOOST_PP_SEQ_ELEM_ ## i, seq)) +# else +# define BOOST_PP_SEQ_ELEM_I(i, seq) BOOST_PP_SEQ_ELEM_II(BOOST_PP_SEQ_ELEM_ ## i seq) +# endif +# define BOOST_PP_SEQ_ELEM_II(im) BOOST_PP_SEQ_ELEM_III(im) +# define BOOST_PP_SEQ_ELEM_III(x, _) x +# endif +# +# define BOOST_PP_SEQ_ELEM_0(x) x, BOOST_PP_NIL +# define BOOST_PP_SEQ_ELEM_1(_) BOOST_PP_SEQ_ELEM_0 +# define BOOST_PP_SEQ_ELEM_2(_) BOOST_PP_SEQ_ELEM_1 +# define BOOST_PP_SEQ_ELEM_3(_) BOOST_PP_SEQ_ELEM_2 +# define BOOST_PP_SEQ_ELEM_4(_) BOOST_PP_SEQ_ELEM_3 +# define BOOST_PP_SEQ_ELEM_5(_) BOOST_PP_SEQ_ELEM_4 +# define BOOST_PP_SEQ_ELEM_6(_) BOOST_PP_SEQ_ELEM_5 +# define BOOST_PP_SEQ_ELEM_7(_) BOOST_PP_SEQ_ELEM_6 +# define BOOST_PP_SEQ_ELEM_8(_) BOOST_PP_SEQ_ELEM_7 +# define BOOST_PP_SEQ_ELEM_9(_) BOOST_PP_SEQ_ELEM_8 +# define BOOST_PP_SEQ_ELEM_10(_) BOOST_PP_SEQ_ELEM_9 +# define BOOST_PP_SEQ_ELEM_11(_) BOOST_PP_SEQ_ELEM_10 +# define BOOST_PP_SEQ_ELEM_12(_) BOOST_PP_SEQ_ELEM_11 +# define BOOST_PP_SEQ_ELEM_13(_) BOOST_PP_SEQ_ELEM_12 +# define BOOST_PP_SEQ_ELEM_14(_) BOOST_PP_SEQ_ELEM_13 +# define BOOST_PP_SEQ_ELEM_15(_) BOOST_PP_SEQ_ELEM_14 +# define BOOST_PP_SEQ_ELEM_16(_) BOOST_PP_SEQ_ELEM_15 +# define BOOST_PP_SEQ_ELEM_17(_) BOOST_PP_SEQ_ELEM_16 +# define BOOST_PP_SEQ_ELEM_18(_) BOOST_PP_SEQ_ELEM_17 +# define BOOST_PP_SEQ_ELEM_19(_) BOOST_PP_SEQ_ELEM_18 +# define BOOST_PP_SEQ_ELEM_20(_) BOOST_PP_SEQ_ELEM_19 +# define BOOST_PP_SEQ_ELEM_21(_) BOOST_PP_SEQ_ELEM_20 +# define BOOST_PP_SEQ_ELEM_22(_) BOOST_PP_SEQ_ELEM_21 +# define BOOST_PP_SEQ_ELEM_23(_) BOOST_PP_SEQ_ELEM_22 +# define BOOST_PP_SEQ_ELEM_24(_) BOOST_PP_SEQ_ELEM_23 +# define BOOST_PP_SEQ_ELEM_25(_) BOOST_PP_SEQ_ELEM_24 +# define BOOST_PP_SEQ_ELEM_26(_) BOOST_PP_SEQ_ELEM_25 +# define BOOST_PP_SEQ_ELEM_27(_) BOOST_PP_SEQ_ELEM_26 +# define BOOST_PP_SEQ_ELEM_28(_) BOOST_PP_SEQ_ELEM_27 +# define BOOST_PP_SEQ_ELEM_29(_) BOOST_PP_SEQ_ELEM_28 +# define BOOST_PP_SEQ_ELEM_30(_) BOOST_PP_SEQ_ELEM_29 +# define BOOST_PP_SEQ_ELEM_31(_) BOOST_PP_SEQ_ELEM_30 +# define BOOST_PP_SEQ_ELEM_32(_) BOOST_PP_SEQ_ELEM_31 +# define BOOST_PP_SEQ_ELEM_33(_) BOOST_PP_SEQ_ELEM_32 +# define BOOST_PP_SEQ_ELEM_34(_) BOOST_PP_SEQ_ELEM_33 +# define BOOST_PP_SEQ_ELEM_35(_) BOOST_PP_SEQ_ELEM_34 +# define BOOST_PP_SEQ_ELEM_36(_) BOOST_PP_SEQ_ELEM_35 +# define BOOST_PP_SEQ_ELEM_37(_) BOOST_PP_SEQ_ELEM_36 +# define BOOST_PP_SEQ_ELEM_38(_) BOOST_PP_SEQ_ELEM_37 +# define BOOST_PP_SEQ_ELEM_39(_) BOOST_PP_SEQ_ELEM_38 +# define BOOST_PP_SEQ_ELEM_40(_) BOOST_PP_SEQ_ELEM_39 +# define BOOST_PP_SEQ_ELEM_41(_) BOOST_PP_SEQ_ELEM_40 +# define BOOST_PP_SEQ_ELEM_42(_) BOOST_PP_SEQ_ELEM_41 +# define BOOST_PP_SEQ_ELEM_43(_) BOOST_PP_SEQ_ELEM_42 +# define BOOST_PP_SEQ_ELEM_44(_) BOOST_PP_SEQ_ELEM_43 +# define BOOST_PP_SEQ_ELEM_45(_) BOOST_PP_SEQ_ELEM_44 +# define BOOST_PP_SEQ_ELEM_46(_) BOOST_PP_SEQ_ELEM_45 +# define BOOST_PP_SEQ_ELEM_47(_) BOOST_PP_SEQ_ELEM_46 +# define BOOST_PP_SEQ_ELEM_48(_) BOOST_PP_SEQ_ELEM_47 +# define BOOST_PP_SEQ_ELEM_49(_) BOOST_PP_SEQ_ELEM_48 +# define BOOST_PP_SEQ_ELEM_50(_) BOOST_PP_SEQ_ELEM_49 +# define BOOST_PP_SEQ_ELEM_51(_) BOOST_PP_SEQ_ELEM_50 +# define BOOST_PP_SEQ_ELEM_52(_) BOOST_PP_SEQ_ELEM_51 +# define BOOST_PP_SEQ_ELEM_53(_) BOOST_PP_SEQ_ELEM_52 +# define BOOST_PP_SEQ_ELEM_54(_) BOOST_PP_SEQ_ELEM_53 +# define BOOST_PP_SEQ_ELEM_55(_) BOOST_PP_SEQ_ELEM_54 +# define BOOST_PP_SEQ_ELEM_56(_) BOOST_PP_SEQ_ELEM_55 +# define BOOST_PP_SEQ_ELEM_57(_) BOOST_PP_SEQ_ELEM_56 +# define BOOST_PP_SEQ_ELEM_58(_) BOOST_PP_SEQ_ELEM_57 +# define BOOST_PP_SEQ_ELEM_59(_) BOOST_PP_SEQ_ELEM_58 +# define BOOST_PP_SEQ_ELEM_60(_) BOOST_PP_SEQ_ELEM_59 +# define BOOST_PP_SEQ_ELEM_61(_) BOOST_PP_SEQ_ELEM_60 +# define BOOST_PP_SEQ_ELEM_62(_) BOOST_PP_SEQ_ELEM_61 +# define BOOST_PP_SEQ_ELEM_63(_) BOOST_PP_SEQ_ELEM_62 +# define BOOST_PP_SEQ_ELEM_64(_) BOOST_PP_SEQ_ELEM_63 +# define BOOST_PP_SEQ_ELEM_65(_) BOOST_PP_SEQ_ELEM_64 +# define BOOST_PP_SEQ_ELEM_66(_) BOOST_PP_SEQ_ELEM_65 +# define BOOST_PP_SEQ_ELEM_67(_) BOOST_PP_SEQ_ELEM_66 +# define BOOST_PP_SEQ_ELEM_68(_) BOOST_PP_SEQ_ELEM_67 +# define BOOST_PP_SEQ_ELEM_69(_) BOOST_PP_SEQ_ELEM_68 +# define BOOST_PP_SEQ_ELEM_70(_) BOOST_PP_SEQ_ELEM_69 +# define BOOST_PP_SEQ_ELEM_71(_) BOOST_PP_SEQ_ELEM_70 +# define BOOST_PP_SEQ_ELEM_72(_) BOOST_PP_SEQ_ELEM_71 +# define BOOST_PP_SEQ_ELEM_73(_) BOOST_PP_SEQ_ELEM_72 +# define BOOST_PP_SEQ_ELEM_74(_) BOOST_PP_SEQ_ELEM_73 +# define BOOST_PP_SEQ_ELEM_75(_) BOOST_PP_SEQ_ELEM_74 +# define BOOST_PP_SEQ_ELEM_76(_) BOOST_PP_SEQ_ELEM_75 +# define BOOST_PP_SEQ_ELEM_77(_) BOOST_PP_SEQ_ELEM_76 +# define BOOST_PP_SEQ_ELEM_78(_) BOOST_PP_SEQ_ELEM_77 +# define BOOST_PP_SEQ_ELEM_79(_) BOOST_PP_SEQ_ELEM_78 +# define BOOST_PP_SEQ_ELEM_80(_) BOOST_PP_SEQ_ELEM_79 +# define BOOST_PP_SEQ_ELEM_81(_) BOOST_PP_SEQ_ELEM_80 +# define BOOST_PP_SEQ_ELEM_82(_) BOOST_PP_SEQ_ELEM_81 +# define BOOST_PP_SEQ_ELEM_83(_) BOOST_PP_SEQ_ELEM_82 +# define BOOST_PP_SEQ_ELEM_84(_) BOOST_PP_SEQ_ELEM_83 +# define BOOST_PP_SEQ_ELEM_85(_) BOOST_PP_SEQ_ELEM_84 +# define BOOST_PP_SEQ_ELEM_86(_) BOOST_PP_SEQ_ELEM_85 +# define BOOST_PP_SEQ_ELEM_87(_) BOOST_PP_SEQ_ELEM_86 +# define BOOST_PP_SEQ_ELEM_88(_) BOOST_PP_SEQ_ELEM_87 +# define BOOST_PP_SEQ_ELEM_89(_) BOOST_PP_SEQ_ELEM_88 +# define BOOST_PP_SEQ_ELEM_90(_) BOOST_PP_SEQ_ELEM_89 +# define BOOST_PP_SEQ_ELEM_91(_) BOOST_PP_SEQ_ELEM_90 +# define BOOST_PP_SEQ_ELEM_92(_) BOOST_PP_SEQ_ELEM_91 +# define BOOST_PP_SEQ_ELEM_93(_) BOOST_PP_SEQ_ELEM_92 +# define BOOST_PP_SEQ_ELEM_94(_) BOOST_PP_SEQ_ELEM_93 +# define BOOST_PP_SEQ_ELEM_95(_) BOOST_PP_SEQ_ELEM_94 +# define BOOST_PP_SEQ_ELEM_96(_) BOOST_PP_SEQ_ELEM_95 +# define BOOST_PP_SEQ_ELEM_97(_) BOOST_PP_SEQ_ELEM_96 +# define BOOST_PP_SEQ_ELEM_98(_) BOOST_PP_SEQ_ELEM_97 +# define BOOST_PP_SEQ_ELEM_99(_) BOOST_PP_SEQ_ELEM_98 +# define BOOST_PP_SEQ_ELEM_100(_) BOOST_PP_SEQ_ELEM_99 +# define BOOST_PP_SEQ_ELEM_101(_) BOOST_PP_SEQ_ELEM_100 +# define BOOST_PP_SEQ_ELEM_102(_) BOOST_PP_SEQ_ELEM_101 +# define BOOST_PP_SEQ_ELEM_103(_) BOOST_PP_SEQ_ELEM_102 +# define BOOST_PP_SEQ_ELEM_104(_) BOOST_PP_SEQ_ELEM_103 +# define BOOST_PP_SEQ_ELEM_105(_) BOOST_PP_SEQ_ELEM_104 +# define BOOST_PP_SEQ_ELEM_106(_) BOOST_PP_SEQ_ELEM_105 +# define BOOST_PP_SEQ_ELEM_107(_) BOOST_PP_SEQ_ELEM_106 +# define BOOST_PP_SEQ_ELEM_108(_) BOOST_PP_SEQ_ELEM_107 +# define BOOST_PP_SEQ_ELEM_109(_) BOOST_PP_SEQ_ELEM_108 +# define BOOST_PP_SEQ_ELEM_110(_) BOOST_PP_SEQ_ELEM_109 +# define BOOST_PP_SEQ_ELEM_111(_) BOOST_PP_SEQ_ELEM_110 +# define BOOST_PP_SEQ_ELEM_112(_) BOOST_PP_SEQ_ELEM_111 +# define BOOST_PP_SEQ_ELEM_113(_) BOOST_PP_SEQ_ELEM_112 +# define BOOST_PP_SEQ_ELEM_114(_) BOOST_PP_SEQ_ELEM_113 +# define BOOST_PP_SEQ_ELEM_115(_) BOOST_PP_SEQ_ELEM_114 +# define BOOST_PP_SEQ_ELEM_116(_) BOOST_PP_SEQ_ELEM_115 +# define BOOST_PP_SEQ_ELEM_117(_) BOOST_PP_SEQ_ELEM_116 +# define BOOST_PP_SEQ_ELEM_118(_) BOOST_PP_SEQ_ELEM_117 +# define BOOST_PP_SEQ_ELEM_119(_) BOOST_PP_SEQ_ELEM_118 +# define BOOST_PP_SEQ_ELEM_120(_) BOOST_PP_SEQ_ELEM_119 +# define BOOST_PP_SEQ_ELEM_121(_) BOOST_PP_SEQ_ELEM_120 +# define BOOST_PP_SEQ_ELEM_122(_) BOOST_PP_SEQ_ELEM_121 +# define BOOST_PP_SEQ_ELEM_123(_) BOOST_PP_SEQ_ELEM_122 +# define BOOST_PP_SEQ_ELEM_124(_) BOOST_PP_SEQ_ELEM_123 +# define BOOST_PP_SEQ_ELEM_125(_) BOOST_PP_SEQ_ELEM_124 +# define BOOST_PP_SEQ_ELEM_126(_) BOOST_PP_SEQ_ELEM_125 +# define BOOST_PP_SEQ_ELEM_127(_) BOOST_PP_SEQ_ELEM_126 +# define BOOST_PP_SEQ_ELEM_128(_) BOOST_PP_SEQ_ELEM_127 +# define BOOST_PP_SEQ_ELEM_129(_) BOOST_PP_SEQ_ELEM_128 +# define BOOST_PP_SEQ_ELEM_130(_) BOOST_PP_SEQ_ELEM_129 +# define BOOST_PP_SEQ_ELEM_131(_) BOOST_PP_SEQ_ELEM_130 +# define BOOST_PP_SEQ_ELEM_132(_) BOOST_PP_SEQ_ELEM_131 +# define BOOST_PP_SEQ_ELEM_133(_) BOOST_PP_SEQ_ELEM_132 +# define BOOST_PP_SEQ_ELEM_134(_) BOOST_PP_SEQ_ELEM_133 +# define BOOST_PP_SEQ_ELEM_135(_) BOOST_PP_SEQ_ELEM_134 +# define BOOST_PP_SEQ_ELEM_136(_) BOOST_PP_SEQ_ELEM_135 +# define BOOST_PP_SEQ_ELEM_137(_) BOOST_PP_SEQ_ELEM_136 +# define BOOST_PP_SEQ_ELEM_138(_) BOOST_PP_SEQ_ELEM_137 +# define BOOST_PP_SEQ_ELEM_139(_) BOOST_PP_SEQ_ELEM_138 +# define BOOST_PP_SEQ_ELEM_140(_) BOOST_PP_SEQ_ELEM_139 +# define BOOST_PP_SEQ_ELEM_141(_) BOOST_PP_SEQ_ELEM_140 +# define BOOST_PP_SEQ_ELEM_142(_) BOOST_PP_SEQ_ELEM_141 +# define BOOST_PP_SEQ_ELEM_143(_) BOOST_PP_SEQ_ELEM_142 +# define BOOST_PP_SEQ_ELEM_144(_) BOOST_PP_SEQ_ELEM_143 +# define BOOST_PP_SEQ_ELEM_145(_) BOOST_PP_SEQ_ELEM_144 +# define BOOST_PP_SEQ_ELEM_146(_) BOOST_PP_SEQ_ELEM_145 +# define BOOST_PP_SEQ_ELEM_147(_) BOOST_PP_SEQ_ELEM_146 +# define BOOST_PP_SEQ_ELEM_148(_) BOOST_PP_SEQ_ELEM_147 +# define BOOST_PP_SEQ_ELEM_149(_) BOOST_PP_SEQ_ELEM_148 +# define BOOST_PP_SEQ_ELEM_150(_) BOOST_PP_SEQ_ELEM_149 +# define BOOST_PP_SEQ_ELEM_151(_) BOOST_PP_SEQ_ELEM_150 +# define BOOST_PP_SEQ_ELEM_152(_) BOOST_PP_SEQ_ELEM_151 +# define BOOST_PP_SEQ_ELEM_153(_) BOOST_PP_SEQ_ELEM_152 +# define BOOST_PP_SEQ_ELEM_154(_) BOOST_PP_SEQ_ELEM_153 +# define BOOST_PP_SEQ_ELEM_155(_) BOOST_PP_SEQ_ELEM_154 +# define BOOST_PP_SEQ_ELEM_156(_) BOOST_PP_SEQ_ELEM_155 +# define BOOST_PP_SEQ_ELEM_157(_) BOOST_PP_SEQ_ELEM_156 +# define BOOST_PP_SEQ_ELEM_158(_) BOOST_PP_SEQ_ELEM_157 +# define BOOST_PP_SEQ_ELEM_159(_) BOOST_PP_SEQ_ELEM_158 +# define BOOST_PP_SEQ_ELEM_160(_) BOOST_PP_SEQ_ELEM_159 +# define BOOST_PP_SEQ_ELEM_161(_) BOOST_PP_SEQ_ELEM_160 +# define BOOST_PP_SEQ_ELEM_162(_) BOOST_PP_SEQ_ELEM_161 +# define BOOST_PP_SEQ_ELEM_163(_) BOOST_PP_SEQ_ELEM_162 +# define BOOST_PP_SEQ_ELEM_164(_) BOOST_PP_SEQ_ELEM_163 +# define BOOST_PP_SEQ_ELEM_165(_) BOOST_PP_SEQ_ELEM_164 +# define BOOST_PP_SEQ_ELEM_166(_) BOOST_PP_SEQ_ELEM_165 +# define BOOST_PP_SEQ_ELEM_167(_) BOOST_PP_SEQ_ELEM_166 +# define BOOST_PP_SEQ_ELEM_168(_) BOOST_PP_SEQ_ELEM_167 +# define BOOST_PP_SEQ_ELEM_169(_) BOOST_PP_SEQ_ELEM_168 +# define BOOST_PP_SEQ_ELEM_170(_) BOOST_PP_SEQ_ELEM_169 +# define BOOST_PP_SEQ_ELEM_171(_) BOOST_PP_SEQ_ELEM_170 +# define BOOST_PP_SEQ_ELEM_172(_) BOOST_PP_SEQ_ELEM_171 +# define BOOST_PP_SEQ_ELEM_173(_) BOOST_PP_SEQ_ELEM_172 +# define BOOST_PP_SEQ_ELEM_174(_) BOOST_PP_SEQ_ELEM_173 +# define BOOST_PP_SEQ_ELEM_175(_) BOOST_PP_SEQ_ELEM_174 +# define BOOST_PP_SEQ_ELEM_176(_) BOOST_PP_SEQ_ELEM_175 +# define BOOST_PP_SEQ_ELEM_177(_) BOOST_PP_SEQ_ELEM_176 +# define BOOST_PP_SEQ_ELEM_178(_) BOOST_PP_SEQ_ELEM_177 +# define BOOST_PP_SEQ_ELEM_179(_) BOOST_PP_SEQ_ELEM_178 +# define BOOST_PP_SEQ_ELEM_180(_) BOOST_PP_SEQ_ELEM_179 +# define BOOST_PP_SEQ_ELEM_181(_) BOOST_PP_SEQ_ELEM_180 +# define BOOST_PP_SEQ_ELEM_182(_) BOOST_PP_SEQ_ELEM_181 +# define BOOST_PP_SEQ_ELEM_183(_) BOOST_PP_SEQ_ELEM_182 +# define BOOST_PP_SEQ_ELEM_184(_) BOOST_PP_SEQ_ELEM_183 +# define BOOST_PP_SEQ_ELEM_185(_) BOOST_PP_SEQ_ELEM_184 +# define BOOST_PP_SEQ_ELEM_186(_) BOOST_PP_SEQ_ELEM_185 +# define BOOST_PP_SEQ_ELEM_187(_) BOOST_PP_SEQ_ELEM_186 +# define BOOST_PP_SEQ_ELEM_188(_) BOOST_PP_SEQ_ELEM_187 +# define BOOST_PP_SEQ_ELEM_189(_) BOOST_PP_SEQ_ELEM_188 +# define BOOST_PP_SEQ_ELEM_190(_) BOOST_PP_SEQ_ELEM_189 +# define BOOST_PP_SEQ_ELEM_191(_) BOOST_PP_SEQ_ELEM_190 +# define BOOST_PP_SEQ_ELEM_192(_) BOOST_PP_SEQ_ELEM_191 +# define BOOST_PP_SEQ_ELEM_193(_) BOOST_PP_SEQ_ELEM_192 +# define BOOST_PP_SEQ_ELEM_194(_) BOOST_PP_SEQ_ELEM_193 +# define BOOST_PP_SEQ_ELEM_195(_) BOOST_PP_SEQ_ELEM_194 +# define BOOST_PP_SEQ_ELEM_196(_) BOOST_PP_SEQ_ELEM_195 +# define BOOST_PP_SEQ_ELEM_197(_) BOOST_PP_SEQ_ELEM_196 +# define BOOST_PP_SEQ_ELEM_198(_) BOOST_PP_SEQ_ELEM_197 +# define BOOST_PP_SEQ_ELEM_199(_) BOOST_PP_SEQ_ELEM_198 +# define BOOST_PP_SEQ_ELEM_200(_) BOOST_PP_SEQ_ELEM_199 +# define BOOST_PP_SEQ_ELEM_201(_) BOOST_PP_SEQ_ELEM_200 +# define BOOST_PP_SEQ_ELEM_202(_) BOOST_PP_SEQ_ELEM_201 +# define BOOST_PP_SEQ_ELEM_203(_) BOOST_PP_SEQ_ELEM_202 +# define BOOST_PP_SEQ_ELEM_204(_) BOOST_PP_SEQ_ELEM_203 +# define BOOST_PP_SEQ_ELEM_205(_) BOOST_PP_SEQ_ELEM_204 +# define BOOST_PP_SEQ_ELEM_206(_) BOOST_PP_SEQ_ELEM_205 +# define BOOST_PP_SEQ_ELEM_207(_) BOOST_PP_SEQ_ELEM_206 +# define BOOST_PP_SEQ_ELEM_208(_) BOOST_PP_SEQ_ELEM_207 +# define BOOST_PP_SEQ_ELEM_209(_) BOOST_PP_SEQ_ELEM_208 +# define BOOST_PP_SEQ_ELEM_210(_) BOOST_PP_SEQ_ELEM_209 +# define BOOST_PP_SEQ_ELEM_211(_) BOOST_PP_SEQ_ELEM_210 +# define BOOST_PP_SEQ_ELEM_212(_) BOOST_PP_SEQ_ELEM_211 +# define BOOST_PP_SEQ_ELEM_213(_) BOOST_PP_SEQ_ELEM_212 +# define BOOST_PP_SEQ_ELEM_214(_) BOOST_PP_SEQ_ELEM_213 +# define BOOST_PP_SEQ_ELEM_215(_) BOOST_PP_SEQ_ELEM_214 +# define BOOST_PP_SEQ_ELEM_216(_) BOOST_PP_SEQ_ELEM_215 +# define BOOST_PP_SEQ_ELEM_217(_) BOOST_PP_SEQ_ELEM_216 +# define BOOST_PP_SEQ_ELEM_218(_) BOOST_PP_SEQ_ELEM_217 +# define BOOST_PP_SEQ_ELEM_219(_) BOOST_PP_SEQ_ELEM_218 +# define BOOST_PP_SEQ_ELEM_220(_) BOOST_PP_SEQ_ELEM_219 +# define BOOST_PP_SEQ_ELEM_221(_) BOOST_PP_SEQ_ELEM_220 +# define BOOST_PP_SEQ_ELEM_222(_) BOOST_PP_SEQ_ELEM_221 +# define BOOST_PP_SEQ_ELEM_223(_) BOOST_PP_SEQ_ELEM_222 +# define BOOST_PP_SEQ_ELEM_224(_) BOOST_PP_SEQ_ELEM_223 +# define BOOST_PP_SEQ_ELEM_225(_) BOOST_PP_SEQ_ELEM_224 +# define BOOST_PP_SEQ_ELEM_226(_) BOOST_PP_SEQ_ELEM_225 +# define BOOST_PP_SEQ_ELEM_227(_) BOOST_PP_SEQ_ELEM_226 +# define BOOST_PP_SEQ_ELEM_228(_) BOOST_PP_SEQ_ELEM_227 +# define BOOST_PP_SEQ_ELEM_229(_) BOOST_PP_SEQ_ELEM_228 +# define BOOST_PP_SEQ_ELEM_230(_) BOOST_PP_SEQ_ELEM_229 +# define BOOST_PP_SEQ_ELEM_231(_) BOOST_PP_SEQ_ELEM_230 +# define BOOST_PP_SEQ_ELEM_232(_) BOOST_PP_SEQ_ELEM_231 +# define BOOST_PP_SEQ_ELEM_233(_) BOOST_PP_SEQ_ELEM_232 +# define BOOST_PP_SEQ_ELEM_234(_) BOOST_PP_SEQ_ELEM_233 +# define BOOST_PP_SEQ_ELEM_235(_) BOOST_PP_SEQ_ELEM_234 +# define BOOST_PP_SEQ_ELEM_236(_) BOOST_PP_SEQ_ELEM_235 +# define BOOST_PP_SEQ_ELEM_237(_) BOOST_PP_SEQ_ELEM_236 +# define BOOST_PP_SEQ_ELEM_238(_) BOOST_PP_SEQ_ELEM_237 +# define BOOST_PP_SEQ_ELEM_239(_) BOOST_PP_SEQ_ELEM_238 +# define BOOST_PP_SEQ_ELEM_240(_) BOOST_PP_SEQ_ELEM_239 +# define BOOST_PP_SEQ_ELEM_241(_) BOOST_PP_SEQ_ELEM_240 +# define BOOST_PP_SEQ_ELEM_242(_) BOOST_PP_SEQ_ELEM_241 +# define BOOST_PP_SEQ_ELEM_243(_) BOOST_PP_SEQ_ELEM_242 +# define BOOST_PP_SEQ_ELEM_244(_) BOOST_PP_SEQ_ELEM_243 +# define BOOST_PP_SEQ_ELEM_245(_) BOOST_PP_SEQ_ELEM_244 +# define BOOST_PP_SEQ_ELEM_246(_) BOOST_PP_SEQ_ELEM_245 +# define BOOST_PP_SEQ_ELEM_247(_) BOOST_PP_SEQ_ELEM_246 +# define BOOST_PP_SEQ_ELEM_248(_) BOOST_PP_SEQ_ELEM_247 +# define BOOST_PP_SEQ_ELEM_249(_) BOOST_PP_SEQ_ELEM_248 +# define BOOST_PP_SEQ_ELEM_250(_) BOOST_PP_SEQ_ELEM_249 +# define BOOST_PP_SEQ_ELEM_251(_) BOOST_PP_SEQ_ELEM_250 +# define BOOST_PP_SEQ_ELEM_252(_) BOOST_PP_SEQ_ELEM_251 +# define BOOST_PP_SEQ_ELEM_253(_) BOOST_PP_SEQ_ELEM_252 +# define BOOST_PP_SEQ_ELEM_254(_) BOOST_PP_SEQ_ELEM_253 +# define BOOST_PP_SEQ_ELEM_255(_) BOOST_PP_SEQ_ELEM_254 +# +# endif diff --git a/contrib/src/boost/preprocessor/seq/enum.hpp b/contrib/src/boost/preprocessor/seq/enum.hpp new file mode 100644 index 0000000..b63b242 --- /dev/null +++ b/contrib/src/boost/preprocessor/seq/enum.hpp @@ -0,0 +1,288 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_ENUM_HPP +# define BOOST_PREPROCESSOR_SEQ_ENUM_HPP +# +# include +# include +# include +# +# /* BOOST_PP_SEQ_ENUM */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM_I(seq) +# define BOOST_PP_SEQ_ENUM_I(seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_SEQ_SIZE(seq)) seq +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM_I(BOOST_PP_SEQ_SIZE(seq), seq) +# define BOOST_PP_SEQ_ENUM_I(size, seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, size) seq +# else +# define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_SEQ_SIZE(seq)) seq +# endif +# +# define BOOST_PP_SEQ_ENUM_1(x) x +# define BOOST_PP_SEQ_ENUM_2(x) x, BOOST_PP_SEQ_ENUM_1 +# define BOOST_PP_SEQ_ENUM_3(x) x, BOOST_PP_SEQ_ENUM_2 +# define BOOST_PP_SEQ_ENUM_4(x) x, BOOST_PP_SEQ_ENUM_3 +# define BOOST_PP_SEQ_ENUM_5(x) x, BOOST_PP_SEQ_ENUM_4 +# define BOOST_PP_SEQ_ENUM_6(x) x, BOOST_PP_SEQ_ENUM_5 +# define BOOST_PP_SEQ_ENUM_7(x) x, BOOST_PP_SEQ_ENUM_6 +# define BOOST_PP_SEQ_ENUM_8(x) x, BOOST_PP_SEQ_ENUM_7 +# define BOOST_PP_SEQ_ENUM_9(x) x, BOOST_PP_SEQ_ENUM_8 +# define BOOST_PP_SEQ_ENUM_10(x) x, BOOST_PP_SEQ_ENUM_9 +# define BOOST_PP_SEQ_ENUM_11(x) x, BOOST_PP_SEQ_ENUM_10 +# define BOOST_PP_SEQ_ENUM_12(x) x, BOOST_PP_SEQ_ENUM_11 +# define BOOST_PP_SEQ_ENUM_13(x) x, BOOST_PP_SEQ_ENUM_12 +# define BOOST_PP_SEQ_ENUM_14(x) x, BOOST_PP_SEQ_ENUM_13 +# define BOOST_PP_SEQ_ENUM_15(x) x, BOOST_PP_SEQ_ENUM_14 +# define BOOST_PP_SEQ_ENUM_16(x) x, BOOST_PP_SEQ_ENUM_15 +# define BOOST_PP_SEQ_ENUM_17(x) x, BOOST_PP_SEQ_ENUM_16 +# define BOOST_PP_SEQ_ENUM_18(x) x, BOOST_PP_SEQ_ENUM_17 +# define BOOST_PP_SEQ_ENUM_19(x) x, BOOST_PP_SEQ_ENUM_18 +# define BOOST_PP_SEQ_ENUM_20(x) x, BOOST_PP_SEQ_ENUM_19 +# define BOOST_PP_SEQ_ENUM_21(x) x, BOOST_PP_SEQ_ENUM_20 +# define BOOST_PP_SEQ_ENUM_22(x) x, BOOST_PP_SEQ_ENUM_21 +# define BOOST_PP_SEQ_ENUM_23(x) x, BOOST_PP_SEQ_ENUM_22 +# define BOOST_PP_SEQ_ENUM_24(x) x, BOOST_PP_SEQ_ENUM_23 +# define BOOST_PP_SEQ_ENUM_25(x) x, BOOST_PP_SEQ_ENUM_24 +# define BOOST_PP_SEQ_ENUM_26(x) x, BOOST_PP_SEQ_ENUM_25 +# define BOOST_PP_SEQ_ENUM_27(x) x, BOOST_PP_SEQ_ENUM_26 +# define BOOST_PP_SEQ_ENUM_28(x) x, BOOST_PP_SEQ_ENUM_27 +# define BOOST_PP_SEQ_ENUM_29(x) x, BOOST_PP_SEQ_ENUM_28 +# define BOOST_PP_SEQ_ENUM_30(x) x, BOOST_PP_SEQ_ENUM_29 +# define BOOST_PP_SEQ_ENUM_31(x) x, BOOST_PP_SEQ_ENUM_30 +# define BOOST_PP_SEQ_ENUM_32(x) x, BOOST_PP_SEQ_ENUM_31 +# define BOOST_PP_SEQ_ENUM_33(x) x, BOOST_PP_SEQ_ENUM_32 +# define BOOST_PP_SEQ_ENUM_34(x) x, BOOST_PP_SEQ_ENUM_33 +# define BOOST_PP_SEQ_ENUM_35(x) x, BOOST_PP_SEQ_ENUM_34 +# define BOOST_PP_SEQ_ENUM_36(x) x, BOOST_PP_SEQ_ENUM_35 +# define BOOST_PP_SEQ_ENUM_37(x) x, BOOST_PP_SEQ_ENUM_36 +# define BOOST_PP_SEQ_ENUM_38(x) x, BOOST_PP_SEQ_ENUM_37 +# define BOOST_PP_SEQ_ENUM_39(x) x, BOOST_PP_SEQ_ENUM_38 +# define BOOST_PP_SEQ_ENUM_40(x) x, BOOST_PP_SEQ_ENUM_39 +# define BOOST_PP_SEQ_ENUM_41(x) x, BOOST_PP_SEQ_ENUM_40 +# define BOOST_PP_SEQ_ENUM_42(x) x, BOOST_PP_SEQ_ENUM_41 +# define BOOST_PP_SEQ_ENUM_43(x) x, BOOST_PP_SEQ_ENUM_42 +# define BOOST_PP_SEQ_ENUM_44(x) x, BOOST_PP_SEQ_ENUM_43 +# define BOOST_PP_SEQ_ENUM_45(x) x, BOOST_PP_SEQ_ENUM_44 +# define BOOST_PP_SEQ_ENUM_46(x) x, BOOST_PP_SEQ_ENUM_45 +# define BOOST_PP_SEQ_ENUM_47(x) x, BOOST_PP_SEQ_ENUM_46 +# define BOOST_PP_SEQ_ENUM_48(x) x, BOOST_PP_SEQ_ENUM_47 +# define BOOST_PP_SEQ_ENUM_49(x) x, BOOST_PP_SEQ_ENUM_48 +# define BOOST_PP_SEQ_ENUM_50(x) x, BOOST_PP_SEQ_ENUM_49 +# define BOOST_PP_SEQ_ENUM_51(x) x, BOOST_PP_SEQ_ENUM_50 +# define BOOST_PP_SEQ_ENUM_52(x) x, BOOST_PP_SEQ_ENUM_51 +# define BOOST_PP_SEQ_ENUM_53(x) x, BOOST_PP_SEQ_ENUM_52 +# define BOOST_PP_SEQ_ENUM_54(x) x, BOOST_PP_SEQ_ENUM_53 +# define BOOST_PP_SEQ_ENUM_55(x) x, BOOST_PP_SEQ_ENUM_54 +# define BOOST_PP_SEQ_ENUM_56(x) x, BOOST_PP_SEQ_ENUM_55 +# define BOOST_PP_SEQ_ENUM_57(x) x, BOOST_PP_SEQ_ENUM_56 +# define BOOST_PP_SEQ_ENUM_58(x) x, BOOST_PP_SEQ_ENUM_57 +# define BOOST_PP_SEQ_ENUM_59(x) x, BOOST_PP_SEQ_ENUM_58 +# define BOOST_PP_SEQ_ENUM_60(x) x, BOOST_PP_SEQ_ENUM_59 +# define BOOST_PP_SEQ_ENUM_61(x) x, BOOST_PP_SEQ_ENUM_60 +# define BOOST_PP_SEQ_ENUM_62(x) x, BOOST_PP_SEQ_ENUM_61 +# define BOOST_PP_SEQ_ENUM_63(x) x, BOOST_PP_SEQ_ENUM_62 +# define BOOST_PP_SEQ_ENUM_64(x) x, BOOST_PP_SEQ_ENUM_63 +# define BOOST_PP_SEQ_ENUM_65(x) x, BOOST_PP_SEQ_ENUM_64 +# define BOOST_PP_SEQ_ENUM_66(x) x, BOOST_PP_SEQ_ENUM_65 +# define BOOST_PP_SEQ_ENUM_67(x) x, BOOST_PP_SEQ_ENUM_66 +# define BOOST_PP_SEQ_ENUM_68(x) x, BOOST_PP_SEQ_ENUM_67 +# define BOOST_PP_SEQ_ENUM_69(x) x, BOOST_PP_SEQ_ENUM_68 +# define BOOST_PP_SEQ_ENUM_70(x) x, BOOST_PP_SEQ_ENUM_69 +# define BOOST_PP_SEQ_ENUM_71(x) x, BOOST_PP_SEQ_ENUM_70 +# define BOOST_PP_SEQ_ENUM_72(x) x, BOOST_PP_SEQ_ENUM_71 +# define BOOST_PP_SEQ_ENUM_73(x) x, BOOST_PP_SEQ_ENUM_72 +# define BOOST_PP_SEQ_ENUM_74(x) x, BOOST_PP_SEQ_ENUM_73 +# define BOOST_PP_SEQ_ENUM_75(x) x, BOOST_PP_SEQ_ENUM_74 +# define BOOST_PP_SEQ_ENUM_76(x) x, BOOST_PP_SEQ_ENUM_75 +# define BOOST_PP_SEQ_ENUM_77(x) x, BOOST_PP_SEQ_ENUM_76 +# define BOOST_PP_SEQ_ENUM_78(x) x, BOOST_PP_SEQ_ENUM_77 +# define BOOST_PP_SEQ_ENUM_79(x) x, BOOST_PP_SEQ_ENUM_78 +# define BOOST_PP_SEQ_ENUM_80(x) x, BOOST_PP_SEQ_ENUM_79 +# define BOOST_PP_SEQ_ENUM_81(x) x, BOOST_PP_SEQ_ENUM_80 +# define BOOST_PP_SEQ_ENUM_82(x) x, BOOST_PP_SEQ_ENUM_81 +# define BOOST_PP_SEQ_ENUM_83(x) x, BOOST_PP_SEQ_ENUM_82 +# define BOOST_PP_SEQ_ENUM_84(x) x, BOOST_PP_SEQ_ENUM_83 +# define BOOST_PP_SEQ_ENUM_85(x) x, BOOST_PP_SEQ_ENUM_84 +# define BOOST_PP_SEQ_ENUM_86(x) x, BOOST_PP_SEQ_ENUM_85 +# define BOOST_PP_SEQ_ENUM_87(x) x, BOOST_PP_SEQ_ENUM_86 +# define BOOST_PP_SEQ_ENUM_88(x) x, BOOST_PP_SEQ_ENUM_87 +# define BOOST_PP_SEQ_ENUM_89(x) x, BOOST_PP_SEQ_ENUM_88 +# define BOOST_PP_SEQ_ENUM_90(x) x, BOOST_PP_SEQ_ENUM_89 +# define BOOST_PP_SEQ_ENUM_91(x) x, BOOST_PP_SEQ_ENUM_90 +# define BOOST_PP_SEQ_ENUM_92(x) x, BOOST_PP_SEQ_ENUM_91 +# define BOOST_PP_SEQ_ENUM_93(x) x, BOOST_PP_SEQ_ENUM_92 +# define BOOST_PP_SEQ_ENUM_94(x) x, BOOST_PP_SEQ_ENUM_93 +# define BOOST_PP_SEQ_ENUM_95(x) x, BOOST_PP_SEQ_ENUM_94 +# define BOOST_PP_SEQ_ENUM_96(x) x, BOOST_PP_SEQ_ENUM_95 +# define BOOST_PP_SEQ_ENUM_97(x) x, BOOST_PP_SEQ_ENUM_96 +# define BOOST_PP_SEQ_ENUM_98(x) x, BOOST_PP_SEQ_ENUM_97 +# define BOOST_PP_SEQ_ENUM_99(x) x, BOOST_PP_SEQ_ENUM_98 +# define BOOST_PP_SEQ_ENUM_100(x) x, BOOST_PP_SEQ_ENUM_99 +# define BOOST_PP_SEQ_ENUM_101(x) x, BOOST_PP_SEQ_ENUM_100 +# define BOOST_PP_SEQ_ENUM_102(x) x, BOOST_PP_SEQ_ENUM_101 +# define BOOST_PP_SEQ_ENUM_103(x) x, BOOST_PP_SEQ_ENUM_102 +# define BOOST_PP_SEQ_ENUM_104(x) x, BOOST_PP_SEQ_ENUM_103 +# define BOOST_PP_SEQ_ENUM_105(x) x, BOOST_PP_SEQ_ENUM_104 +# define BOOST_PP_SEQ_ENUM_106(x) x, BOOST_PP_SEQ_ENUM_105 +# define BOOST_PP_SEQ_ENUM_107(x) x, BOOST_PP_SEQ_ENUM_106 +# define BOOST_PP_SEQ_ENUM_108(x) x, BOOST_PP_SEQ_ENUM_107 +# define BOOST_PP_SEQ_ENUM_109(x) x, BOOST_PP_SEQ_ENUM_108 +# define BOOST_PP_SEQ_ENUM_110(x) x, BOOST_PP_SEQ_ENUM_109 +# define BOOST_PP_SEQ_ENUM_111(x) x, BOOST_PP_SEQ_ENUM_110 +# define BOOST_PP_SEQ_ENUM_112(x) x, BOOST_PP_SEQ_ENUM_111 +# define BOOST_PP_SEQ_ENUM_113(x) x, BOOST_PP_SEQ_ENUM_112 +# define BOOST_PP_SEQ_ENUM_114(x) x, BOOST_PP_SEQ_ENUM_113 +# define BOOST_PP_SEQ_ENUM_115(x) x, BOOST_PP_SEQ_ENUM_114 +# define BOOST_PP_SEQ_ENUM_116(x) x, BOOST_PP_SEQ_ENUM_115 +# define BOOST_PP_SEQ_ENUM_117(x) x, BOOST_PP_SEQ_ENUM_116 +# define BOOST_PP_SEQ_ENUM_118(x) x, BOOST_PP_SEQ_ENUM_117 +# define BOOST_PP_SEQ_ENUM_119(x) x, BOOST_PP_SEQ_ENUM_118 +# define BOOST_PP_SEQ_ENUM_120(x) x, BOOST_PP_SEQ_ENUM_119 +# define BOOST_PP_SEQ_ENUM_121(x) x, BOOST_PP_SEQ_ENUM_120 +# define BOOST_PP_SEQ_ENUM_122(x) x, BOOST_PP_SEQ_ENUM_121 +# define BOOST_PP_SEQ_ENUM_123(x) x, BOOST_PP_SEQ_ENUM_122 +# define BOOST_PP_SEQ_ENUM_124(x) x, BOOST_PP_SEQ_ENUM_123 +# define BOOST_PP_SEQ_ENUM_125(x) x, BOOST_PP_SEQ_ENUM_124 +# define BOOST_PP_SEQ_ENUM_126(x) x, BOOST_PP_SEQ_ENUM_125 +# define BOOST_PP_SEQ_ENUM_127(x) x, BOOST_PP_SEQ_ENUM_126 +# define BOOST_PP_SEQ_ENUM_128(x) x, BOOST_PP_SEQ_ENUM_127 +# define BOOST_PP_SEQ_ENUM_129(x) x, BOOST_PP_SEQ_ENUM_128 +# define BOOST_PP_SEQ_ENUM_130(x) x, BOOST_PP_SEQ_ENUM_129 +# define BOOST_PP_SEQ_ENUM_131(x) x, BOOST_PP_SEQ_ENUM_130 +# define BOOST_PP_SEQ_ENUM_132(x) x, BOOST_PP_SEQ_ENUM_131 +# define BOOST_PP_SEQ_ENUM_133(x) x, BOOST_PP_SEQ_ENUM_132 +# define BOOST_PP_SEQ_ENUM_134(x) x, BOOST_PP_SEQ_ENUM_133 +# define BOOST_PP_SEQ_ENUM_135(x) x, BOOST_PP_SEQ_ENUM_134 +# define BOOST_PP_SEQ_ENUM_136(x) x, BOOST_PP_SEQ_ENUM_135 +# define BOOST_PP_SEQ_ENUM_137(x) x, BOOST_PP_SEQ_ENUM_136 +# define BOOST_PP_SEQ_ENUM_138(x) x, BOOST_PP_SEQ_ENUM_137 +# define BOOST_PP_SEQ_ENUM_139(x) x, BOOST_PP_SEQ_ENUM_138 +# define BOOST_PP_SEQ_ENUM_140(x) x, BOOST_PP_SEQ_ENUM_139 +# define BOOST_PP_SEQ_ENUM_141(x) x, BOOST_PP_SEQ_ENUM_140 +# define BOOST_PP_SEQ_ENUM_142(x) x, BOOST_PP_SEQ_ENUM_141 +# define BOOST_PP_SEQ_ENUM_143(x) x, BOOST_PP_SEQ_ENUM_142 +# define BOOST_PP_SEQ_ENUM_144(x) x, BOOST_PP_SEQ_ENUM_143 +# define BOOST_PP_SEQ_ENUM_145(x) x, BOOST_PP_SEQ_ENUM_144 +# define BOOST_PP_SEQ_ENUM_146(x) x, BOOST_PP_SEQ_ENUM_145 +# define BOOST_PP_SEQ_ENUM_147(x) x, BOOST_PP_SEQ_ENUM_146 +# define BOOST_PP_SEQ_ENUM_148(x) x, BOOST_PP_SEQ_ENUM_147 +# define BOOST_PP_SEQ_ENUM_149(x) x, BOOST_PP_SEQ_ENUM_148 +# define BOOST_PP_SEQ_ENUM_150(x) x, BOOST_PP_SEQ_ENUM_149 +# define BOOST_PP_SEQ_ENUM_151(x) x, BOOST_PP_SEQ_ENUM_150 +# define BOOST_PP_SEQ_ENUM_152(x) x, BOOST_PP_SEQ_ENUM_151 +# define BOOST_PP_SEQ_ENUM_153(x) x, BOOST_PP_SEQ_ENUM_152 +# define BOOST_PP_SEQ_ENUM_154(x) x, BOOST_PP_SEQ_ENUM_153 +# define BOOST_PP_SEQ_ENUM_155(x) x, BOOST_PP_SEQ_ENUM_154 +# define BOOST_PP_SEQ_ENUM_156(x) x, BOOST_PP_SEQ_ENUM_155 +# define BOOST_PP_SEQ_ENUM_157(x) x, BOOST_PP_SEQ_ENUM_156 +# define BOOST_PP_SEQ_ENUM_158(x) x, BOOST_PP_SEQ_ENUM_157 +# define BOOST_PP_SEQ_ENUM_159(x) x, BOOST_PP_SEQ_ENUM_158 +# define BOOST_PP_SEQ_ENUM_160(x) x, BOOST_PP_SEQ_ENUM_159 +# define BOOST_PP_SEQ_ENUM_161(x) x, BOOST_PP_SEQ_ENUM_160 +# define BOOST_PP_SEQ_ENUM_162(x) x, BOOST_PP_SEQ_ENUM_161 +# define BOOST_PP_SEQ_ENUM_163(x) x, BOOST_PP_SEQ_ENUM_162 +# define BOOST_PP_SEQ_ENUM_164(x) x, BOOST_PP_SEQ_ENUM_163 +# define BOOST_PP_SEQ_ENUM_165(x) x, BOOST_PP_SEQ_ENUM_164 +# define BOOST_PP_SEQ_ENUM_166(x) x, BOOST_PP_SEQ_ENUM_165 +# define BOOST_PP_SEQ_ENUM_167(x) x, BOOST_PP_SEQ_ENUM_166 +# define BOOST_PP_SEQ_ENUM_168(x) x, BOOST_PP_SEQ_ENUM_167 +# define BOOST_PP_SEQ_ENUM_169(x) x, BOOST_PP_SEQ_ENUM_168 +# define BOOST_PP_SEQ_ENUM_170(x) x, BOOST_PP_SEQ_ENUM_169 +# define BOOST_PP_SEQ_ENUM_171(x) x, BOOST_PP_SEQ_ENUM_170 +# define BOOST_PP_SEQ_ENUM_172(x) x, BOOST_PP_SEQ_ENUM_171 +# define BOOST_PP_SEQ_ENUM_173(x) x, BOOST_PP_SEQ_ENUM_172 +# define BOOST_PP_SEQ_ENUM_174(x) x, BOOST_PP_SEQ_ENUM_173 +# define BOOST_PP_SEQ_ENUM_175(x) x, BOOST_PP_SEQ_ENUM_174 +# define BOOST_PP_SEQ_ENUM_176(x) x, BOOST_PP_SEQ_ENUM_175 +# define BOOST_PP_SEQ_ENUM_177(x) x, BOOST_PP_SEQ_ENUM_176 +# define BOOST_PP_SEQ_ENUM_178(x) x, BOOST_PP_SEQ_ENUM_177 +# define BOOST_PP_SEQ_ENUM_179(x) x, BOOST_PP_SEQ_ENUM_178 +# define BOOST_PP_SEQ_ENUM_180(x) x, BOOST_PP_SEQ_ENUM_179 +# define BOOST_PP_SEQ_ENUM_181(x) x, BOOST_PP_SEQ_ENUM_180 +# define BOOST_PP_SEQ_ENUM_182(x) x, BOOST_PP_SEQ_ENUM_181 +# define BOOST_PP_SEQ_ENUM_183(x) x, BOOST_PP_SEQ_ENUM_182 +# define BOOST_PP_SEQ_ENUM_184(x) x, BOOST_PP_SEQ_ENUM_183 +# define BOOST_PP_SEQ_ENUM_185(x) x, BOOST_PP_SEQ_ENUM_184 +# define BOOST_PP_SEQ_ENUM_186(x) x, BOOST_PP_SEQ_ENUM_185 +# define BOOST_PP_SEQ_ENUM_187(x) x, BOOST_PP_SEQ_ENUM_186 +# define BOOST_PP_SEQ_ENUM_188(x) x, BOOST_PP_SEQ_ENUM_187 +# define BOOST_PP_SEQ_ENUM_189(x) x, BOOST_PP_SEQ_ENUM_188 +# define BOOST_PP_SEQ_ENUM_190(x) x, BOOST_PP_SEQ_ENUM_189 +# define BOOST_PP_SEQ_ENUM_191(x) x, BOOST_PP_SEQ_ENUM_190 +# define BOOST_PP_SEQ_ENUM_192(x) x, BOOST_PP_SEQ_ENUM_191 +# define BOOST_PP_SEQ_ENUM_193(x) x, BOOST_PP_SEQ_ENUM_192 +# define BOOST_PP_SEQ_ENUM_194(x) x, BOOST_PP_SEQ_ENUM_193 +# define BOOST_PP_SEQ_ENUM_195(x) x, BOOST_PP_SEQ_ENUM_194 +# define BOOST_PP_SEQ_ENUM_196(x) x, BOOST_PP_SEQ_ENUM_195 +# define BOOST_PP_SEQ_ENUM_197(x) x, BOOST_PP_SEQ_ENUM_196 +# define BOOST_PP_SEQ_ENUM_198(x) x, BOOST_PP_SEQ_ENUM_197 +# define BOOST_PP_SEQ_ENUM_199(x) x, BOOST_PP_SEQ_ENUM_198 +# define BOOST_PP_SEQ_ENUM_200(x) x, BOOST_PP_SEQ_ENUM_199 +# define BOOST_PP_SEQ_ENUM_201(x) x, BOOST_PP_SEQ_ENUM_200 +# define BOOST_PP_SEQ_ENUM_202(x) x, BOOST_PP_SEQ_ENUM_201 +# define BOOST_PP_SEQ_ENUM_203(x) x, BOOST_PP_SEQ_ENUM_202 +# define BOOST_PP_SEQ_ENUM_204(x) x, BOOST_PP_SEQ_ENUM_203 +# define BOOST_PP_SEQ_ENUM_205(x) x, BOOST_PP_SEQ_ENUM_204 +# define BOOST_PP_SEQ_ENUM_206(x) x, BOOST_PP_SEQ_ENUM_205 +# define BOOST_PP_SEQ_ENUM_207(x) x, BOOST_PP_SEQ_ENUM_206 +# define BOOST_PP_SEQ_ENUM_208(x) x, BOOST_PP_SEQ_ENUM_207 +# define BOOST_PP_SEQ_ENUM_209(x) x, BOOST_PP_SEQ_ENUM_208 +# define BOOST_PP_SEQ_ENUM_210(x) x, BOOST_PP_SEQ_ENUM_209 +# define BOOST_PP_SEQ_ENUM_211(x) x, BOOST_PP_SEQ_ENUM_210 +# define BOOST_PP_SEQ_ENUM_212(x) x, BOOST_PP_SEQ_ENUM_211 +# define BOOST_PP_SEQ_ENUM_213(x) x, BOOST_PP_SEQ_ENUM_212 +# define BOOST_PP_SEQ_ENUM_214(x) x, BOOST_PP_SEQ_ENUM_213 +# define BOOST_PP_SEQ_ENUM_215(x) x, BOOST_PP_SEQ_ENUM_214 +# define BOOST_PP_SEQ_ENUM_216(x) x, BOOST_PP_SEQ_ENUM_215 +# define BOOST_PP_SEQ_ENUM_217(x) x, BOOST_PP_SEQ_ENUM_216 +# define BOOST_PP_SEQ_ENUM_218(x) x, BOOST_PP_SEQ_ENUM_217 +# define BOOST_PP_SEQ_ENUM_219(x) x, BOOST_PP_SEQ_ENUM_218 +# define BOOST_PP_SEQ_ENUM_220(x) x, BOOST_PP_SEQ_ENUM_219 +# define BOOST_PP_SEQ_ENUM_221(x) x, BOOST_PP_SEQ_ENUM_220 +# define BOOST_PP_SEQ_ENUM_222(x) x, BOOST_PP_SEQ_ENUM_221 +# define BOOST_PP_SEQ_ENUM_223(x) x, BOOST_PP_SEQ_ENUM_222 +# define BOOST_PP_SEQ_ENUM_224(x) x, BOOST_PP_SEQ_ENUM_223 +# define BOOST_PP_SEQ_ENUM_225(x) x, BOOST_PP_SEQ_ENUM_224 +# define BOOST_PP_SEQ_ENUM_226(x) x, BOOST_PP_SEQ_ENUM_225 +# define BOOST_PP_SEQ_ENUM_227(x) x, BOOST_PP_SEQ_ENUM_226 +# define BOOST_PP_SEQ_ENUM_228(x) x, BOOST_PP_SEQ_ENUM_227 +# define BOOST_PP_SEQ_ENUM_229(x) x, BOOST_PP_SEQ_ENUM_228 +# define BOOST_PP_SEQ_ENUM_230(x) x, BOOST_PP_SEQ_ENUM_229 +# define BOOST_PP_SEQ_ENUM_231(x) x, BOOST_PP_SEQ_ENUM_230 +# define BOOST_PP_SEQ_ENUM_232(x) x, BOOST_PP_SEQ_ENUM_231 +# define BOOST_PP_SEQ_ENUM_233(x) x, BOOST_PP_SEQ_ENUM_232 +# define BOOST_PP_SEQ_ENUM_234(x) x, BOOST_PP_SEQ_ENUM_233 +# define BOOST_PP_SEQ_ENUM_235(x) x, BOOST_PP_SEQ_ENUM_234 +# define BOOST_PP_SEQ_ENUM_236(x) x, BOOST_PP_SEQ_ENUM_235 +# define BOOST_PP_SEQ_ENUM_237(x) x, BOOST_PP_SEQ_ENUM_236 +# define BOOST_PP_SEQ_ENUM_238(x) x, BOOST_PP_SEQ_ENUM_237 +# define BOOST_PP_SEQ_ENUM_239(x) x, BOOST_PP_SEQ_ENUM_238 +# define BOOST_PP_SEQ_ENUM_240(x) x, BOOST_PP_SEQ_ENUM_239 +# define BOOST_PP_SEQ_ENUM_241(x) x, BOOST_PP_SEQ_ENUM_240 +# define BOOST_PP_SEQ_ENUM_242(x) x, BOOST_PP_SEQ_ENUM_241 +# define BOOST_PP_SEQ_ENUM_243(x) x, BOOST_PP_SEQ_ENUM_242 +# define BOOST_PP_SEQ_ENUM_244(x) x, BOOST_PP_SEQ_ENUM_243 +# define BOOST_PP_SEQ_ENUM_245(x) x, BOOST_PP_SEQ_ENUM_244 +# define BOOST_PP_SEQ_ENUM_246(x) x, BOOST_PP_SEQ_ENUM_245 +# define BOOST_PP_SEQ_ENUM_247(x) x, BOOST_PP_SEQ_ENUM_246 +# define BOOST_PP_SEQ_ENUM_248(x) x, BOOST_PP_SEQ_ENUM_247 +# define BOOST_PP_SEQ_ENUM_249(x) x, BOOST_PP_SEQ_ENUM_248 +# define BOOST_PP_SEQ_ENUM_250(x) x, BOOST_PP_SEQ_ENUM_249 +# define BOOST_PP_SEQ_ENUM_251(x) x, BOOST_PP_SEQ_ENUM_250 +# define BOOST_PP_SEQ_ENUM_252(x) x, BOOST_PP_SEQ_ENUM_251 +# define BOOST_PP_SEQ_ENUM_253(x) x, BOOST_PP_SEQ_ENUM_252 +# define BOOST_PP_SEQ_ENUM_254(x) x, BOOST_PP_SEQ_ENUM_253 +# define BOOST_PP_SEQ_ENUM_255(x) x, BOOST_PP_SEQ_ENUM_254 +# define BOOST_PP_SEQ_ENUM_256(x) x, BOOST_PP_SEQ_ENUM_255 +# +# endif diff --git a/contrib/src/boost/preprocessor/seq/first_n.hpp b/contrib/src/boost/preprocessor/seq/first_n.hpp new file mode 100644 index 0000000..c3c0716 --- /dev/null +++ b/contrib/src/boost/preprocessor/seq/first_n.hpp @@ -0,0 +1,30 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP +# define BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FIRST_N */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) +# else +# define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_SEQ_FIRST_N_I(n, seq) +# define BOOST_PP_SEQ_FIRST_N_I(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/seq/fold_left.hpp b/contrib/src/boost/preprocessor/seq/fold_left.hpp new file mode 100644 index 0000000..ab051b6 --- /dev/null +++ b/contrib/src/boost/preprocessor/seq/fold_left.hpp @@ -0,0 +1,1070 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FOLD_LEFT_HPP +# define BOOST_PREPROCESSOR_SEQ_FOLD_LEFT_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FOLD_LEFT */ +# +# if 0 +# define BOOST_PP_SEQ_FOLD_LEFT(op, state, seq) ... +# endif +# +# define BOOST_PP_SEQ_FOLD_LEFT BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_LEFT_, BOOST_PP_AUTO_REC(BOOST_PP_SEQ_FOLD_LEFT_P, 256)) +# define BOOST_PP_SEQ_FOLD_LEFT_P(n) BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_LEFT_CHECK_, BOOST_PP_SEQ_FOLD_LEFT_I_ ## n(BOOST_PP_SEQ_FOLD_LEFT_O, BOOST_PP_NIL, (nil), 1)) +# define BOOST_PP_SEQ_FOLD_LEFT_O(s, st, _) st +# +# define BOOST_PP_SEQ_FOLD_LEFT_257(op, st, ss) BOOST_PP_ERROR(0x0005) +# define BOOST_PP_SEQ_FOLD_LEFT_I_257(op, st, ss, sz) BOOST_PP_ERROR(0x0005) +# +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) 0 +# +# define BOOST_PP_SEQ_FOLD_LEFT_F(op, st, ss, sz) st +# +# define BOOST_PP_SEQ_FOLD_LEFT_1(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_2(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_3(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_4(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_5(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_6(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_7(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_8(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_9(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_10(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_11(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_12(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_13(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_14(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_15(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_16(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_17(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_18(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_19(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_20(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_21(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_22(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_23(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_24(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_25(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_26(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_27(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_28(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_29(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_30(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_31(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_32(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_33(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_34(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_35(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_36(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_37(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_38(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_39(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_40(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_41(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_42(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_43(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_44(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_45(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_46(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_47(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_48(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_49(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_50(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_51(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_52(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_53(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_54(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_55(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_56(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_57(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_58(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_59(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_60(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_61(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_62(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_63(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_64(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_65(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_66(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_67(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_68(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_69(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_70(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_71(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_72(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_73(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_74(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_75(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_76(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_77(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_78(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_79(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_80(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_81(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_82(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_83(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_84(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_85(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_86(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_87(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_88(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_89(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_90(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_91(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_92(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_93(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_94(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_95(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_96(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_97(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_98(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_99(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_100(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_101(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_102(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_103(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_104(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_105(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_106(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_107(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_108(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_109(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_110(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_111(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_112(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_113(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_114(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_115(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_116(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_117(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_118(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_119(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_120(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_121(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_122(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_123(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_124(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_125(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_126(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_127(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_128(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_129(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_130(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_131(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_132(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_133(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_134(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_135(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_136(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_137(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_138(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_139(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_140(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_141(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_142(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_143(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_144(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_145(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_146(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_147(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_148(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_149(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_150(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_151(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_152(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_153(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_154(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_155(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_156(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_157(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_158(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_159(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_160(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_161(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_162(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_163(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_164(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_165(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_166(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_167(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_168(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_169(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_170(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_171(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_172(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_173(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_174(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_175(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_176(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_177(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_178(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_179(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_180(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_181(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_182(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_183(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_184(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_185(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_186(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_187(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_188(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_189(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_190(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_191(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_192(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_193(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_194(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_195(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_196(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_197(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_198(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_199(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_200(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_201(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_202(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_203(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_204(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_205(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_206(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_207(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_208(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_209(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_210(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_211(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_212(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_213(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_214(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_215(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_216(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_217(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_218(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_219(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_220(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_221(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_222(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_223(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_224(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_225(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_226(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_227(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_228(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_229(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_230(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_231(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_232(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_233(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_234(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_235(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_236(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_237(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_238(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_239(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_240(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_241(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_242(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_243(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_244(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_245(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_246(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_247(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_248(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_249(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_250(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_251(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_252(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_253(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_254(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_255(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_256(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_2, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(2, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_3, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(3, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_4, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(4, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_5, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(5, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_6, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(6, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_7, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(7, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_8, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(8, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_9, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(9, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_10, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(10, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_11, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(11, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_12, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(12, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_13, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(13, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_14, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(14, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_15, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(15, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_16, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(16, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_17, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(17, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_18, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(18, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_19, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(19, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_20, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(20, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_21, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(21, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_22, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(22, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_23, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(23, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_24, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(24, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_25, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(25, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_26, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(26, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_27, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(27, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_28, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(28, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_29, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(29, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_30, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(30, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_31, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(31, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_32, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(32, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_33, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(33, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_34, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(34, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_35, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(35, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_36, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(36, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_37, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(37, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_38, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(38, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_39, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(39, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_40, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(40, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_41, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(41, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_42, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(42, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_43, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(43, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_44, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(44, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_45, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(45, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_46, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(46, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_47, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(47, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_48, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(48, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_49, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(49, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_50, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(50, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_51, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(51, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_52, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(52, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_53, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(53, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_54, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(54, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_55, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(55, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_56, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(56, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_57, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(57, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_58, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(58, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_59, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(59, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_60, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(60, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_61, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(61, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_62, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(62, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_63, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(63, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_64, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(64, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_65, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(65, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_66, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(66, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_67, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(67, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_68, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(68, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_69, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(69, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_70, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(70, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_71, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(71, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_72, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(72, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_73, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(73, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_74, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(74, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_75, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(75, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_76, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(76, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_77, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(77, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_78, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(78, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_79, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(79, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_80, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(80, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_81, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(81, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_82, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(82, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_83, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(83, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_84, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(84, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_85, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(85, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_86, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(86, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_87, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(87, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_88, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(88, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_89, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(89, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_90, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(90, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_91, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(91, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_92, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(92, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_93, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(93, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_94, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(94, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_95, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(95, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_96, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(96, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_97, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(97, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_98, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(98, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_99, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(99, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_100, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(100, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_101, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(101, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_102, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(102, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_103, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(103, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_104, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(104, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_105, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(105, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_106, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(106, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_107, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(107, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_108, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(108, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_109, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(109, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_110, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(110, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_111, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(111, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_112, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(112, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_113, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(113, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_114, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(114, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_115, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(115, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_116, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(116, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_117, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(117, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_118, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(118, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_119, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(119, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_120, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(120, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_121, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(121, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_122, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(122, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_123, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(123, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_124, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(124, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_125, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(125, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_126, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(126, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_127, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(127, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_128, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(128, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_129, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(129, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_130, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(130, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_131, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(131, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_132, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(132, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_133, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(133, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_134, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(134, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_135, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(135, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_136, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(136, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_137, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(137, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_138, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(138, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_139, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(139, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_140, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(140, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_141, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(141, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_142, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(142, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_143, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(143, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_144, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(144, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_145, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(145, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_146, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(146, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_147, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(147, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_148, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(148, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_149, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(149, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_150, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(150, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_151, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(151, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_152, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(152, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_153, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(153, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_154, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(154, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_155, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(155, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_156, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(156, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_157, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(157, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_158, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(158, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_159, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(159, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_160, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(160, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_161, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(161, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_162, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(162, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_163, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(163, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_164, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(164, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_165, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(165, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_166, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(166, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_167, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(167, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_168, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(168, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_169, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(169, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_170, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(170, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_171, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(171, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_172, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(172, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_173, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(173, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_174, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(174, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_175, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(175, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_176, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(176, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_177, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(177, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_178, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(178, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_179, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(179, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_180, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(180, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_181, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(181, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_182, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(182, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_183, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(183, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_184, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(184, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_185, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(185, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_186, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(186, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_187, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(187, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_188, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(188, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_189, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(189, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_190, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(190, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_191, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(191, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_192, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(192, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_193, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(193, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_194, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(194, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_195, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(195, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_196, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(196, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_197, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(197, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_198, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(198, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_199, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(199, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_200, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(200, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_201, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(201, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_202, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(202, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_203, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(203, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_204, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(204, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_205, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(205, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_206, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(206, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_207, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(207, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_208, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(208, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_209, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(209, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_210, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(210, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_211, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(211, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_212, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(212, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_213, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(213, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_214, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(214, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_215, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(215, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_216, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(216, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_217, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(217, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_218, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(218, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_219, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(219, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_220, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(220, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_221, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(221, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_222, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(222, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_223, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(223, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_224, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(224, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_225, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(225, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_226, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(226, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_227, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(227, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_228, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(228, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_229, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(229, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_230, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(230, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_231, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(231, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_232, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(232, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_233, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(233, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_234, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(234, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_235, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(235, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_236, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(236, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_237, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(237, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_238, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(238, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_239, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(239, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_240, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(240, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_241, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(241, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_242, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(242, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_243, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(243, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_244, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(244, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_245, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(245, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_246, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(246, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_247, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(247, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_248, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(248, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_249, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(249, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_250, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(250, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_251, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(251, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_252, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(252, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_253, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(253, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_254, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(254, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_255, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(255, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_256, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(256, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_257, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(257, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# else +# define BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_2, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(2, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_3, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(3, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_4, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(4, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_5, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(5, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_6, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(6, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_7, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(7, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_8, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(8, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_9, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(9, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_10, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(10, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_11, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(11, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_12, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(12, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_13, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(13, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_14, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(14, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_15, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(15, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_16, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(16, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_17, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(17, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_18, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(18, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_19, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(19, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_20, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(20, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_21, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(21, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_22, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(22, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_23, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(23, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_24, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(24, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_25, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(25, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_26, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(26, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_27, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(27, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_28, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(28, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_29, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(29, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_30, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(30, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_31, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(31, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_32, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(32, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_33, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(33, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_34, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(34, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_35, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(35, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_36, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(36, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_37, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(37, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_38, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(38, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_39, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(39, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_40, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(40, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_41, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(41, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_42, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(42, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_43, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(43, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_44, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(44, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_45, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(45, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_46, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(46, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_47, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(47, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_48, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(48, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_49, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(49, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_50, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(50, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_51, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(51, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_52, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(52, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_53, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(53, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_54, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(54, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_55, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(55, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_56, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(56, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_57, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(57, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_58, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(58, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_59, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(59, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_60, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(60, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_61, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(61, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_62, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(62, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_63, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(63, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_64, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(64, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_65, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(65, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_66, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(66, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_67, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(67, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_68, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(68, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_69, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(69, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_70, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(70, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_71, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(71, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_72, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(72, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_73, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(73, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_74, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(74, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_75, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(75, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_76, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(76, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_77, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(77, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_78, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(78, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_79, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(79, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_80, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(80, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_81, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(81, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_82, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(82, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_83, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(83, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_84, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(84, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_85, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(85, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_86, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(86, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_87, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(87, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_88, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(88, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_89, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(89, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_90, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(90, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_91, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(91, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_92, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(92, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_93, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(93, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_94, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(94, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_95, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(95, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_96, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(96, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_97, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(97, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_98, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(98, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_99, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(99, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_100, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(100, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_101, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(101, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_102, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(102, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_103, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(103, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_104, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(104, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_105, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(105, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_106, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(106, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_107, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(107, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_108, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(108, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_109, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(109, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_110, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(110, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_111, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(111, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_112, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(112, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_113, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(113, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_114, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(114, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_115, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(115, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_116, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(116, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_117, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(117, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_118, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(118, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_119, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(119, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_120, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(120, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_121, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(121, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_122, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(122, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_123, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(123, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_124, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(124, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_125, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(125, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_126, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(126, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_127, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(127, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_128, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(128, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_129, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(129, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_130, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(130, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_131, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(131, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_132, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(132, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_133, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(133, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_134, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(134, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_135, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(135, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_136, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(136, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_137, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(137, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_138, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(138, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_139, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(139, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_140, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(140, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_141, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(141, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_142, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(142, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_143, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(143, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_144, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(144, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_145, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(145, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_146, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(146, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_147, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(147, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_148, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(148, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_149, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(149, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_150, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(150, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_151, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(151, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_152, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(152, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_153, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(153, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_154, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(154, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_155, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(155, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_156, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(156, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_157, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(157, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_158, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(158, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_159, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(159, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_160, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(160, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_161, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(161, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_162, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(162, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_163, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(163, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_164, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(164, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_165, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(165, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_166, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(166, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_167, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(167, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_168, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(168, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_169, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(169, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_170, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(170, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_171, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(171, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_172, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(172, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_173, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(173, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_174, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(174, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_175, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(175, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_176, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(176, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_177, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(177, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_178, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(178, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_179, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(179, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_180, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(180, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_181, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(181, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_182, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(182, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_183, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(183, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_184, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(184, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_185, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(185, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_186, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(186, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_187, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(187, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_188, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(188, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_189, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(189, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_190, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(190, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_191, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(191, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_192, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(192, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_193, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(193, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_194, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(194, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_195, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(195, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_196, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(196, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_197, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(197, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_198, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(198, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_199, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(199, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_200, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(200, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_201, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(201, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_202, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(202, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_203, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(203, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_204, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(204, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_205, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(205, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_206, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(206, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_207, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(207, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_208, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(208, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_209, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(209, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_210, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(210, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_211, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(211, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_212, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(212, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_213, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(213, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_214, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(214, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_215, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(215, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_216, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(216, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_217, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(217, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_218, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(218, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_219, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(219, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_220, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(220, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_221, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(221, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_222, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(222, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_223, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(223, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_224, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(224, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_225, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(225, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_226, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(226, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_227, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(227, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_228, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(228, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_229, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(229, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_230, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(230, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_231, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(231, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_232, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(232, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_233, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(233, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_234, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(234, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_235, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(235, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_236, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(236, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_237, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(237, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_238, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(238, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_239, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(239, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_240, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(240, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_241, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(241, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_242, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(242, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_243, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(243, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_244, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(244, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_245, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(245, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_246, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(246, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_247, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(247, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_248, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(248, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_249, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(249, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_250, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(250, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_251, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(251, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_252, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(252, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_253, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(253, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_254, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(254, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_255, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(255, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_256, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(256, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_257, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(257, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/seq/for_each_i.hpp b/contrib/src/boost/preprocessor/seq/for_each_i.hpp new file mode 100644 index 0000000..81028d7 --- /dev/null +++ b/contrib/src/boost/preprocessor/seq/for_each_i.hpp @@ -0,0 +1,109 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP +# define BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FOR_EACH_I */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq) +# else +# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) +# define BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EXEC(macro, data, seq) BOOST_PP_FOR((macro, data, seq, 0, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) +# define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY(macro, data, seq) +# +# define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq) \ + BOOST_PP_IIF \ + ( \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \ + BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EXEC, \ + BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY \ + ) \ + (macro, data, seq) \ +/**/ +# +# define BOOST_PP_SEQ_FOR_EACH_I_P(r, x) BOOST_PP_TUPLE_ELEM(5, 4, x) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I x +# else +# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I(BOOST_PP_TUPLE_ELEM(5, 0, x), BOOST_PP_TUPLE_ELEM(5, 1, x), BOOST_PP_TUPLE_ELEM(5, 2, x), BOOST_PP_TUPLE_ELEM(5, 3, x), BOOST_PP_TUPLE_ELEM(5, 4, x)) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_I_O_I(macro, data, seq, i, sz) \ + BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, BOOST_PP_DEC(sz)) \ +/**/ +# define BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, sz) \ + ( \ + macro, \ + data, \ + BOOST_PP_IF \ + ( \ + sz, \ + BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL, \ + BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL \ + ) \ + (seq), \ + BOOST_PP_INC(i), \ + sz \ + ) \ +/**/ +# define BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL(seq) BOOST_PP_SEQ_TAIL(seq) +# define BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL(seq) BOOST_PP_NIL +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, BOOST_PP_TUPLE_REM_5 x) +# define BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, im) +# else +# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_ELEM(5, 0, x), BOOST_PP_TUPLE_ELEM(5, 1, x), BOOST_PP_TUPLE_ELEM(5, 2, x), BOOST_PP_TUPLE_ELEM(5, 3, x), BOOST_PP_TUPLE_ELEM(5, 4, x)) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq)) +# +# /* BOOST_PP_SEQ_FOR_EACH_I_R */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq) +# else +# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) +# define BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EXEC(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq, 0, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) +# define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY(r, macro, data, seq) +# +# define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq) \ + BOOST_PP_IIF \ + ( \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \ + BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EXEC, \ + BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY \ + ) \ + (r, macro, data, seq) \ +/**/ +# +# endif diff --git a/contrib/src/boost/preprocessor/seq/rest_n.hpp b/contrib/src/boost/preprocessor/seq/rest_n.hpp new file mode 100644 index 0000000..4aefba4 --- /dev/null +++ b/contrib/src/boost/preprocessor/seq/rest_n.hpp @@ -0,0 +1,46 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_REST_N_HPP +# define BOOST_PREPROCESSOR_SEQ_REST_N_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_REST_N */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq)) +# else +# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq) +# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq)) +# endif +# +# define BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, size) \ + BOOST_PP_EXPR_IIF \ + ( \ + BOOST_PP_BITAND \ + ( \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size), \ + BOOST_PP_NOT_EQUAL(n,size) \ + ), \ + BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))() \ + ) \ +/**/ +# +# endif diff --git a/contrib/src/boost/preprocessor/seq/seq.hpp b/contrib/src/boost/preprocessor/seq/seq.hpp new file mode 100644 index 0000000..f5ca84c --- /dev/null +++ b/contrib/src/boost/preprocessor/seq/seq.hpp @@ -0,0 +1,44 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_SEQ_HPP +# define BOOST_PREPROCESSOR_SEQ_SEQ_HPP +# +# include +# include +# +# /* BOOST_PP_SEQ_HEAD */ +# +# define BOOST_PP_SEQ_HEAD(seq) BOOST_PP_SEQ_ELEM(0, seq) +# +# /* BOOST_PP_SEQ_TAIL */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_1((seq)) +# define BOOST_PP_SEQ_TAIL_1(par) BOOST_PP_SEQ_TAIL_2 ## par +# define BOOST_PP_SEQ_TAIL_2(seq) BOOST_PP_SEQ_TAIL_I ## seq +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_ID(BOOST_PP_SEQ_TAIL_I seq) +# define BOOST_PP_SEQ_TAIL_ID(id) id +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_D(seq) +# define BOOST_PP_SEQ_TAIL_D(seq) BOOST_PP_SEQ_TAIL_I seq +# else +# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_I seq +# endif +# +# define BOOST_PP_SEQ_TAIL_I(x) +# +# /* BOOST_PP_SEQ_NIL */ +# +# define BOOST_PP_SEQ_NIL(x) (x) +# +# endif diff --git a/contrib/src/boost/preprocessor/seq/size.hpp b/contrib/src/boost/preprocessor/seq/size.hpp new file mode 100644 index 0000000..b5c8d9d --- /dev/null +++ b/contrib/src/boost/preprocessor/seq/size.hpp @@ -0,0 +1,548 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_SIZE_HPP +# define BOOST_PREPROCESSOR_SEQ_SIZE_HPP +# +# include +# include +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_SEQ_SIZE_I((seq)) +# define BOOST_PP_SEQ_SIZE_I(par) BOOST_PP_SEQ_SIZE_II ## par +# define BOOST_PP_SEQ_SIZE_II(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 ## seq) +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() || BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_SEQ_SIZE_I(seq) +# define BOOST_PP_SEQ_SIZE_I(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 seq) +# elif defined(__IBMC__) || defined(__IBMCPP__) +# define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_0, seq)) +# else +# define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 seq) +# endif +# +# define BOOST_PP_SEQ_SIZE_0(_) BOOST_PP_SEQ_SIZE_1 +# define BOOST_PP_SEQ_SIZE_1(_) BOOST_PP_SEQ_SIZE_2 +# define BOOST_PP_SEQ_SIZE_2(_) BOOST_PP_SEQ_SIZE_3 +# define BOOST_PP_SEQ_SIZE_3(_) BOOST_PP_SEQ_SIZE_4 +# define BOOST_PP_SEQ_SIZE_4(_) BOOST_PP_SEQ_SIZE_5 +# define BOOST_PP_SEQ_SIZE_5(_) BOOST_PP_SEQ_SIZE_6 +# define BOOST_PP_SEQ_SIZE_6(_) BOOST_PP_SEQ_SIZE_7 +# define BOOST_PP_SEQ_SIZE_7(_) BOOST_PP_SEQ_SIZE_8 +# define BOOST_PP_SEQ_SIZE_8(_) BOOST_PP_SEQ_SIZE_9 +# define BOOST_PP_SEQ_SIZE_9(_) BOOST_PP_SEQ_SIZE_10 +# define BOOST_PP_SEQ_SIZE_10(_) BOOST_PP_SEQ_SIZE_11 +# define BOOST_PP_SEQ_SIZE_11(_) BOOST_PP_SEQ_SIZE_12 +# define BOOST_PP_SEQ_SIZE_12(_) BOOST_PP_SEQ_SIZE_13 +# define BOOST_PP_SEQ_SIZE_13(_) BOOST_PP_SEQ_SIZE_14 +# define BOOST_PP_SEQ_SIZE_14(_) BOOST_PP_SEQ_SIZE_15 +# define BOOST_PP_SEQ_SIZE_15(_) BOOST_PP_SEQ_SIZE_16 +# define BOOST_PP_SEQ_SIZE_16(_) BOOST_PP_SEQ_SIZE_17 +# define BOOST_PP_SEQ_SIZE_17(_) BOOST_PP_SEQ_SIZE_18 +# define BOOST_PP_SEQ_SIZE_18(_) BOOST_PP_SEQ_SIZE_19 +# define BOOST_PP_SEQ_SIZE_19(_) BOOST_PP_SEQ_SIZE_20 +# define BOOST_PP_SEQ_SIZE_20(_) BOOST_PP_SEQ_SIZE_21 +# define BOOST_PP_SEQ_SIZE_21(_) BOOST_PP_SEQ_SIZE_22 +# define BOOST_PP_SEQ_SIZE_22(_) BOOST_PP_SEQ_SIZE_23 +# define BOOST_PP_SEQ_SIZE_23(_) BOOST_PP_SEQ_SIZE_24 +# define BOOST_PP_SEQ_SIZE_24(_) BOOST_PP_SEQ_SIZE_25 +# define BOOST_PP_SEQ_SIZE_25(_) BOOST_PP_SEQ_SIZE_26 +# define BOOST_PP_SEQ_SIZE_26(_) BOOST_PP_SEQ_SIZE_27 +# define BOOST_PP_SEQ_SIZE_27(_) BOOST_PP_SEQ_SIZE_28 +# define BOOST_PP_SEQ_SIZE_28(_) BOOST_PP_SEQ_SIZE_29 +# define BOOST_PP_SEQ_SIZE_29(_) BOOST_PP_SEQ_SIZE_30 +# define BOOST_PP_SEQ_SIZE_30(_) BOOST_PP_SEQ_SIZE_31 +# define BOOST_PP_SEQ_SIZE_31(_) BOOST_PP_SEQ_SIZE_32 +# define BOOST_PP_SEQ_SIZE_32(_) BOOST_PP_SEQ_SIZE_33 +# define BOOST_PP_SEQ_SIZE_33(_) BOOST_PP_SEQ_SIZE_34 +# define BOOST_PP_SEQ_SIZE_34(_) BOOST_PP_SEQ_SIZE_35 +# define BOOST_PP_SEQ_SIZE_35(_) BOOST_PP_SEQ_SIZE_36 +# define BOOST_PP_SEQ_SIZE_36(_) BOOST_PP_SEQ_SIZE_37 +# define BOOST_PP_SEQ_SIZE_37(_) BOOST_PP_SEQ_SIZE_38 +# define BOOST_PP_SEQ_SIZE_38(_) BOOST_PP_SEQ_SIZE_39 +# define BOOST_PP_SEQ_SIZE_39(_) BOOST_PP_SEQ_SIZE_40 +# define BOOST_PP_SEQ_SIZE_40(_) BOOST_PP_SEQ_SIZE_41 +# define BOOST_PP_SEQ_SIZE_41(_) BOOST_PP_SEQ_SIZE_42 +# define BOOST_PP_SEQ_SIZE_42(_) BOOST_PP_SEQ_SIZE_43 +# define BOOST_PP_SEQ_SIZE_43(_) BOOST_PP_SEQ_SIZE_44 +# define BOOST_PP_SEQ_SIZE_44(_) BOOST_PP_SEQ_SIZE_45 +# define BOOST_PP_SEQ_SIZE_45(_) BOOST_PP_SEQ_SIZE_46 +# define BOOST_PP_SEQ_SIZE_46(_) BOOST_PP_SEQ_SIZE_47 +# define BOOST_PP_SEQ_SIZE_47(_) BOOST_PP_SEQ_SIZE_48 +# define BOOST_PP_SEQ_SIZE_48(_) BOOST_PP_SEQ_SIZE_49 +# define BOOST_PP_SEQ_SIZE_49(_) BOOST_PP_SEQ_SIZE_50 +# define BOOST_PP_SEQ_SIZE_50(_) BOOST_PP_SEQ_SIZE_51 +# define BOOST_PP_SEQ_SIZE_51(_) BOOST_PP_SEQ_SIZE_52 +# define BOOST_PP_SEQ_SIZE_52(_) BOOST_PP_SEQ_SIZE_53 +# define BOOST_PP_SEQ_SIZE_53(_) BOOST_PP_SEQ_SIZE_54 +# define BOOST_PP_SEQ_SIZE_54(_) BOOST_PP_SEQ_SIZE_55 +# define BOOST_PP_SEQ_SIZE_55(_) BOOST_PP_SEQ_SIZE_56 +# define BOOST_PP_SEQ_SIZE_56(_) BOOST_PP_SEQ_SIZE_57 +# define BOOST_PP_SEQ_SIZE_57(_) BOOST_PP_SEQ_SIZE_58 +# define BOOST_PP_SEQ_SIZE_58(_) BOOST_PP_SEQ_SIZE_59 +# define BOOST_PP_SEQ_SIZE_59(_) BOOST_PP_SEQ_SIZE_60 +# define BOOST_PP_SEQ_SIZE_60(_) BOOST_PP_SEQ_SIZE_61 +# define BOOST_PP_SEQ_SIZE_61(_) BOOST_PP_SEQ_SIZE_62 +# define BOOST_PP_SEQ_SIZE_62(_) BOOST_PP_SEQ_SIZE_63 +# define BOOST_PP_SEQ_SIZE_63(_) BOOST_PP_SEQ_SIZE_64 +# define BOOST_PP_SEQ_SIZE_64(_) BOOST_PP_SEQ_SIZE_65 +# define BOOST_PP_SEQ_SIZE_65(_) BOOST_PP_SEQ_SIZE_66 +# define BOOST_PP_SEQ_SIZE_66(_) BOOST_PP_SEQ_SIZE_67 +# define BOOST_PP_SEQ_SIZE_67(_) BOOST_PP_SEQ_SIZE_68 +# define BOOST_PP_SEQ_SIZE_68(_) BOOST_PP_SEQ_SIZE_69 +# define BOOST_PP_SEQ_SIZE_69(_) BOOST_PP_SEQ_SIZE_70 +# define BOOST_PP_SEQ_SIZE_70(_) BOOST_PP_SEQ_SIZE_71 +# define BOOST_PP_SEQ_SIZE_71(_) BOOST_PP_SEQ_SIZE_72 +# define BOOST_PP_SEQ_SIZE_72(_) BOOST_PP_SEQ_SIZE_73 +# define BOOST_PP_SEQ_SIZE_73(_) BOOST_PP_SEQ_SIZE_74 +# define BOOST_PP_SEQ_SIZE_74(_) BOOST_PP_SEQ_SIZE_75 +# define BOOST_PP_SEQ_SIZE_75(_) BOOST_PP_SEQ_SIZE_76 +# define BOOST_PP_SEQ_SIZE_76(_) BOOST_PP_SEQ_SIZE_77 +# define BOOST_PP_SEQ_SIZE_77(_) BOOST_PP_SEQ_SIZE_78 +# define BOOST_PP_SEQ_SIZE_78(_) BOOST_PP_SEQ_SIZE_79 +# define BOOST_PP_SEQ_SIZE_79(_) BOOST_PP_SEQ_SIZE_80 +# define BOOST_PP_SEQ_SIZE_80(_) BOOST_PP_SEQ_SIZE_81 +# define BOOST_PP_SEQ_SIZE_81(_) BOOST_PP_SEQ_SIZE_82 +# define BOOST_PP_SEQ_SIZE_82(_) BOOST_PP_SEQ_SIZE_83 +# define BOOST_PP_SEQ_SIZE_83(_) BOOST_PP_SEQ_SIZE_84 +# define BOOST_PP_SEQ_SIZE_84(_) BOOST_PP_SEQ_SIZE_85 +# define BOOST_PP_SEQ_SIZE_85(_) BOOST_PP_SEQ_SIZE_86 +# define BOOST_PP_SEQ_SIZE_86(_) BOOST_PP_SEQ_SIZE_87 +# define BOOST_PP_SEQ_SIZE_87(_) BOOST_PP_SEQ_SIZE_88 +# define BOOST_PP_SEQ_SIZE_88(_) BOOST_PP_SEQ_SIZE_89 +# define BOOST_PP_SEQ_SIZE_89(_) BOOST_PP_SEQ_SIZE_90 +# define BOOST_PP_SEQ_SIZE_90(_) BOOST_PP_SEQ_SIZE_91 +# define BOOST_PP_SEQ_SIZE_91(_) BOOST_PP_SEQ_SIZE_92 +# define BOOST_PP_SEQ_SIZE_92(_) BOOST_PP_SEQ_SIZE_93 +# define BOOST_PP_SEQ_SIZE_93(_) BOOST_PP_SEQ_SIZE_94 +# define BOOST_PP_SEQ_SIZE_94(_) BOOST_PP_SEQ_SIZE_95 +# define BOOST_PP_SEQ_SIZE_95(_) BOOST_PP_SEQ_SIZE_96 +# define BOOST_PP_SEQ_SIZE_96(_) BOOST_PP_SEQ_SIZE_97 +# define BOOST_PP_SEQ_SIZE_97(_) BOOST_PP_SEQ_SIZE_98 +# define BOOST_PP_SEQ_SIZE_98(_) BOOST_PP_SEQ_SIZE_99 +# define BOOST_PP_SEQ_SIZE_99(_) BOOST_PP_SEQ_SIZE_100 +# define BOOST_PP_SEQ_SIZE_100(_) BOOST_PP_SEQ_SIZE_101 +# define BOOST_PP_SEQ_SIZE_101(_) BOOST_PP_SEQ_SIZE_102 +# define BOOST_PP_SEQ_SIZE_102(_) BOOST_PP_SEQ_SIZE_103 +# define BOOST_PP_SEQ_SIZE_103(_) BOOST_PP_SEQ_SIZE_104 +# define BOOST_PP_SEQ_SIZE_104(_) BOOST_PP_SEQ_SIZE_105 +# define BOOST_PP_SEQ_SIZE_105(_) BOOST_PP_SEQ_SIZE_106 +# define BOOST_PP_SEQ_SIZE_106(_) BOOST_PP_SEQ_SIZE_107 +# define BOOST_PP_SEQ_SIZE_107(_) BOOST_PP_SEQ_SIZE_108 +# define BOOST_PP_SEQ_SIZE_108(_) BOOST_PP_SEQ_SIZE_109 +# define BOOST_PP_SEQ_SIZE_109(_) BOOST_PP_SEQ_SIZE_110 +# define BOOST_PP_SEQ_SIZE_110(_) BOOST_PP_SEQ_SIZE_111 +# define BOOST_PP_SEQ_SIZE_111(_) BOOST_PP_SEQ_SIZE_112 +# define BOOST_PP_SEQ_SIZE_112(_) BOOST_PP_SEQ_SIZE_113 +# define BOOST_PP_SEQ_SIZE_113(_) BOOST_PP_SEQ_SIZE_114 +# define BOOST_PP_SEQ_SIZE_114(_) BOOST_PP_SEQ_SIZE_115 +# define BOOST_PP_SEQ_SIZE_115(_) BOOST_PP_SEQ_SIZE_116 +# define BOOST_PP_SEQ_SIZE_116(_) BOOST_PP_SEQ_SIZE_117 +# define BOOST_PP_SEQ_SIZE_117(_) BOOST_PP_SEQ_SIZE_118 +# define BOOST_PP_SEQ_SIZE_118(_) BOOST_PP_SEQ_SIZE_119 +# define BOOST_PP_SEQ_SIZE_119(_) BOOST_PP_SEQ_SIZE_120 +# define BOOST_PP_SEQ_SIZE_120(_) BOOST_PP_SEQ_SIZE_121 +# define BOOST_PP_SEQ_SIZE_121(_) BOOST_PP_SEQ_SIZE_122 +# define BOOST_PP_SEQ_SIZE_122(_) BOOST_PP_SEQ_SIZE_123 +# define BOOST_PP_SEQ_SIZE_123(_) BOOST_PP_SEQ_SIZE_124 +# define BOOST_PP_SEQ_SIZE_124(_) BOOST_PP_SEQ_SIZE_125 +# define BOOST_PP_SEQ_SIZE_125(_) BOOST_PP_SEQ_SIZE_126 +# define BOOST_PP_SEQ_SIZE_126(_) BOOST_PP_SEQ_SIZE_127 +# define BOOST_PP_SEQ_SIZE_127(_) BOOST_PP_SEQ_SIZE_128 +# define BOOST_PP_SEQ_SIZE_128(_) BOOST_PP_SEQ_SIZE_129 +# define BOOST_PP_SEQ_SIZE_129(_) BOOST_PP_SEQ_SIZE_130 +# define BOOST_PP_SEQ_SIZE_130(_) BOOST_PP_SEQ_SIZE_131 +# define BOOST_PP_SEQ_SIZE_131(_) BOOST_PP_SEQ_SIZE_132 +# define BOOST_PP_SEQ_SIZE_132(_) BOOST_PP_SEQ_SIZE_133 +# define BOOST_PP_SEQ_SIZE_133(_) BOOST_PP_SEQ_SIZE_134 +# define BOOST_PP_SEQ_SIZE_134(_) BOOST_PP_SEQ_SIZE_135 +# define BOOST_PP_SEQ_SIZE_135(_) BOOST_PP_SEQ_SIZE_136 +# define BOOST_PP_SEQ_SIZE_136(_) BOOST_PP_SEQ_SIZE_137 +# define BOOST_PP_SEQ_SIZE_137(_) BOOST_PP_SEQ_SIZE_138 +# define BOOST_PP_SEQ_SIZE_138(_) BOOST_PP_SEQ_SIZE_139 +# define BOOST_PP_SEQ_SIZE_139(_) BOOST_PP_SEQ_SIZE_140 +# define BOOST_PP_SEQ_SIZE_140(_) BOOST_PP_SEQ_SIZE_141 +# define BOOST_PP_SEQ_SIZE_141(_) BOOST_PP_SEQ_SIZE_142 +# define BOOST_PP_SEQ_SIZE_142(_) BOOST_PP_SEQ_SIZE_143 +# define BOOST_PP_SEQ_SIZE_143(_) BOOST_PP_SEQ_SIZE_144 +# define BOOST_PP_SEQ_SIZE_144(_) BOOST_PP_SEQ_SIZE_145 +# define BOOST_PP_SEQ_SIZE_145(_) BOOST_PP_SEQ_SIZE_146 +# define BOOST_PP_SEQ_SIZE_146(_) BOOST_PP_SEQ_SIZE_147 +# define BOOST_PP_SEQ_SIZE_147(_) BOOST_PP_SEQ_SIZE_148 +# define BOOST_PP_SEQ_SIZE_148(_) BOOST_PP_SEQ_SIZE_149 +# define BOOST_PP_SEQ_SIZE_149(_) BOOST_PP_SEQ_SIZE_150 +# define BOOST_PP_SEQ_SIZE_150(_) BOOST_PP_SEQ_SIZE_151 +# define BOOST_PP_SEQ_SIZE_151(_) BOOST_PP_SEQ_SIZE_152 +# define BOOST_PP_SEQ_SIZE_152(_) BOOST_PP_SEQ_SIZE_153 +# define BOOST_PP_SEQ_SIZE_153(_) BOOST_PP_SEQ_SIZE_154 +# define BOOST_PP_SEQ_SIZE_154(_) BOOST_PP_SEQ_SIZE_155 +# define BOOST_PP_SEQ_SIZE_155(_) BOOST_PP_SEQ_SIZE_156 +# define BOOST_PP_SEQ_SIZE_156(_) BOOST_PP_SEQ_SIZE_157 +# define BOOST_PP_SEQ_SIZE_157(_) BOOST_PP_SEQ_SIZE_158 +# define BOOST_PP_SEQ_SIZE_158(_) BOOST_PP_SEQ_SIZE_159 +# define BOOST_PP_SEQ_SIZE_159(_) BOOST_PP_SEQ_SIZE_160 +# define BOOST_PP_SEQ_SIZE_160(_) BOOST_PP_SEQ_SIZE_161 +# define BOOST_PP_SEQ_SIZE_161(_) BOOST_PP_SEQ_SIZE_162 +# define BOOST_PP_SEQ_SIZE_162(_) BOOST_PP_SEQ_SIZE_163 +# define BOOST_PP_SEQ_SIZE_163(_) BOOST_PP_SEQ_SIZE_164 +# define BOOST_PP_SEQ_SIZE_164(_) BOOST_PP_SEQ_SIZE_165 +# define BOOST_PP_SEQ_SIZE_165(_) BOOST_PP_SEQ_SIZE_166 +# define BOOST_PP_SEQ_SIZE_166(_) BOOST_PP_SEQ_SIZE_167 +# define BOOST_PP_SEQ_SIZE_167(_) BOOST_PP_SEQ_SIZE_168 +# define BOOST_PP_SEQ_SIZE_168(_) BOOST_PP_SEQ_SIZE_169 +# define BOOST_PP_SEQ_SIZE_169(_) BOOST_PP_SEQ_SIZE_170 +# define BOOST_PP_SEQ_SIZE_170(_) BOOST_PP_SEQ_SIZE_171 +# define BOOST_PP_SEQ_SIZE_171(_) BOOST_PP_SEQ_SIZE_172 +# define BOOST_PP_SEQ_SIZE_172(_) BOOST_PP_SEQ_SIZE_173 +# define BOOST_PP_SEQ_SIZE_173(_) BOOST_PP_SEQ_SIZE_174 +# define BOOST_PP_SEQ_SIZE_174(_) BOOST_PP_SEQ_SIZE_175 +# define BOOST_PP_SEQ_SIZE_175(_) BOOST_PP_SEQ_SIZE_176 +# define BOOST_PP_SEQ_SIZE_176(_) BOOST_PP_SEQ_SIZE_177 +# define BOOST_PP_SEQ_SIZE_177(_) BOOST_PP_SEQ_SIZE_178 +# define BOOST_PP_SEQ_SIZE_178(_) BOOST_PP_SEQ_SIZE_179 +# define BOOST_PP_SEQ_SIZE_179(_) BOOST_PP_SEQ_SIZE_180 +# define BOOST_PP_SEQ_SIZE_180(_) BOOST_PP_SEQ_SIZE_181 +# define BOOST_PP_SEQ_SIZE_181(_) BOOST_PP_SEQ_SIZE_182 +# define BOOST_PP_SEQ_SIZE_182(_) BOOST_PP_SEQ_SIZE_183 +# define BOOST_PP_SEQ_SIZE_183(_) BOOST_PP_SEQ_SIZE_184 +# define BOOST_PP_SEQ_SIZE_184(_) BOOST_PP_SEQ_SIZE_185 +# define BOOST_PP_SEQ_SIZE_185(_) BOOST_PP_SEQ_SIZE_186 +# define BOOST_PP_SEQ_SIZE_186(_) BOOST_PP_SEQ_SIZE_187 +# define BOOST_PP_SEQ_SIZE_187(_) BOOST_PP_SEQ_SIZE_188 +# define BOOST_PP_SEQ_SIZE_188(_) BOOST_PP_SEQ_SIZE_189 +# define BOOST_PP_SEQ_SIZE_189(_) BOOST_PP_SEQ_SIZE_190 +# define BOOST_PP_SEQ_SIZE_190(_) BOOST_PP_SEQ_SIZE_191 +# define BOOST_PP_SEQ_SIZE_191(_) BOOST_PP_SEQ_SIZE_192 +# define BOOST_PP_SEQ_SIZE_192(_) BOOST_PP_SEQ_SIZE_193 +# define BOOST_PP_SEQ_SIZE_193(_) BOOST_PP_SEQ_SIZE_194 +# define BOOST_PP_SEQ_SIZE_194(_) BOOST_PP_SEQ_SIZE_195 +# define BOOST_PP_SEQ_SIZE_195(_) BOOST_PP_SEQ_SIZE_196 +# define BOOST_PP_SEQ_SIZE_196(_) BOOST_PP_SEQ_SIZE_197 +# define BOOST_PP_SEQ_SIZE_197(_) BOOST_PP_SEQ_SIZE_198 +# define BOOST_PP_SEQ_SIZE_198(_) BOOST_PP_SEQ_SIZE_199 +# define BOOST_PP_SEQ_SIZE_199(_) BOOST_PP_SEQ_SIZE_200 +# define BOOST_PP_SEQ_SIZE_200(_) BOOST_PP_SEQ_SIZE_201 +# define BOOST_PP_SEQ_SIZE_201(_) BOOST_PP_SEQ_SIZE_202 +# define BOOST_PP_SEQ_SIZE_202(_) BOOST_PP_SEQ_SIZE_203 +# define BOOST_PP_SEQ_SIZE_203(_) BOOST_PP_SEQ_SIZE_204 +# define BOOST_PP_SEQ_SIZE_204(_) BOOST_PP_SEQ_SIZE_205 +# define BOOST_PP_SEQ_SIZE_205(_) BOOST_PP_SEQ_SIZE_206 +# define BOOST_PP_SEQ_SIZE_206(_) BOOST_PP_SEQ_SIZE_207 +# define BOOST_PP_SEQ_SIZE_207(_) BOOST_PP_SEQ_SIZE_208 +# define BOOST_PP_SEQ_SIZE_208(_) BOOST_PP_SEQ_SIZE_209 +# define BOOST_PP_SEQ_SIZE_209(_) BOOST_PP_SEQ_SIZE_210 +# define BOOST_PP_SEQ_SIZE_210(_) BOOST_PP_SEQ_SIZE_211 +# define BOOST_PP_SEQ_SIZE_211(_) BOOST_PP_SEQ_SIZE_212 +# define BOOST_PP_SEQ_SIZE_212(_) BOOST_PP_SEQ_SIZE_213 +# define BOOST_PP_SEQ_SIZE_213(_) BOOST_PP_SEQ_SIZE_214 +# define BOOST_PP_SEQ_SIZE_214(_) BOOST_PP_SEQ_SIZE_215 +# define BOOST_PP_SEQ_SIZE_215(_) BOOST_PP_SEQ_SIZE_216 +# define BOOST_PP_SEQ_SIZE_216(_) BOOST_PP_SEQ_SIZE_217 +# define BOOST_PP_SEQ_SIZE_217(_) BOOST_PP_SEQ_SIZE_218 +# define BOOST_PP_SEQ_SIZE_218(_) BOOST_PP_SEQ_SIZE_219 +# define BOOST_PP_SEQ_SIZE_219(_) BOOST_PP_SEQ_SIZE_220 +# define BOOST_PP_SEQ_SIZE_220(_) BOOST_PP_SEQ_SIZE_221 +# define BOOST_PP_SEQ_SIZE_221(_) BOOST_PP_SEQ_SIZE_222 +# define BOOST_PP_SEQ_SIZE_222(_) BOOST_PP_SEQ_SIZE_223 +# define BOOST_PP_SEQ_SIZE_223(_) BOOST_PP_SEQ_SIZE_224 +# define BOOST_PP_SEQ_SIZE_224(_) BOOST_PP_SEQ_SIZE_225 +# define BOOST_PP_SEQ_SIZE_225(_) BOOST_PP_SEQ_SIZE_226 +# define BOOST_PP_SEQ_SIZE_226(_) BOOST_PP_SEQ_SIZE_227 +# define BOOST_PP_SEQ_SIZE_227(_) BOOST_PP_SEQ_SIZE_228 +# define BOOST_PP_SEQ_SIZE_228(_) BOOST_PP_SEQ_SIZE_229 +# define BOOST_PP_SEQ_SIZE_229(_) BOOST_PP_SEQ_SIZE_230 +# define BOOST_PP_SEQ_SIZE_230(_) BOOST_PP_SEQ_SIZE_231 +# define BOOST_PP_SEQ_SIZE_231(_) BOOST_PP_SEQ_SIZE_232 +# define BOOST_PP_SEQ_SIZE_232(_) BOOST_PP_SEQ_SIZE_233 +# define BOOST_PP_SEQ_SIZE_233(_) BOOST_PP_SEQ_SIZE_234 +# define BOOST_PP_SEQ_SIZE_234(_) BOOST_PP_SEQ_SIZE_235 +# define BOOST_PP_SEQ_SIZE_235(_) BOOST_PP_SEQ_SIZE_236 +# define BOOST_PP_SEQ_SIZE_236(_) BOOST_PP_SEQ_SIZE_237 +# define BOOST_PP_SEQ_SIZE_237(_) BOOST_PP_SEQ_SIZE_238 +# define BOOST_PP_SEQ_SIZE_238(_) BOOST_PP_SEQ_SIZE_239 +# define BOOST_PP_SEQ_SIZE_239(_) BOOST_PP_SEQ_SIZE_240 +# define BOOST_PP_SEQ_SIZE_240(_) BOOST_PP_SEQ_SIZE_241 +# define BOOST_PP_SEQ_SIZE_241(_) BOOST_PP_SEQ_SIZE_242 +# define BOOST_PP_SEQ_SIZE_242(_) BOOST_PP_SEQ_SIZE_243 +# define BOOST_PP_SEQ_SIZE_243(_) BOOST_PP_SEQ_SIZE_244 +# define BOOST_PP_SEQ_SIZE_244(_) BOOST_PP_SEQ_SIZE_245 +# define BOOST_PP_SEQ_SIZE_245(_) BOOST_PP_SEQ_SIZE_246 +# define BOOST_PP_SEQ_SIZE_246(_) BOOST_PP_SEQ_SIZE_247 +# define BOOST_PP_SEQ_SIZE_247(_) BOOST_PP_SEQ_SIZE_248 +# define BOOST_PP_SEQ_SIZE_248(_) BOOST_PP_SEQ_SIZE_249 +# define BOOST_PP_SEQ_SIZE_249(_) BOOST_PP_SEQ_SIZE_250 +# define BOOST_PP_SEQ_SIZE_250(_) BOOST_PP_SEQ_SIZE_251 +# define BOOST_PP_SEQ_SIZE_251(_) BOOST_PP_SEQ_SIZE_252 +# define BOOST_PP_SEQ_SIZE_252(_) BOOST_PP_SEQ_SIZE_253 +# define BOOST_PP_SEQ_SIZE_253(_) BOOST_PP_SEQ_SIZE_254 +# define BOOST_PP_SEQ_SIZE_254(_) BOOST_PP_SEQ_SIZE_255 +# define BOOST_PP_SEQ_SIZE_255(_) BOOST_PP_SEQ_SIZE_256 +# define BOOST_PP_SEQ_SIZE_256(_) BOOST_PP_SEQ_SIZE_257 +# +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_0 0 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_1 1 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_2 2 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_3 3 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_4 4 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_5 5 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_6 6 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_7 7 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_8 8 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_9 9 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_10 10 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_11 11 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_12 12 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_13 13 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_14 14 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_15 15 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_16 16 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_17 17 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_18 18 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_19 19 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_20 20 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_21 21 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_22 22 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_23 23 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_24 24 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_25 25 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_26 26 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_27 27 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_28 28 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_29 29 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_30 30 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_31 31 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_32 32 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_33 33 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_34 34 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_35 35 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_36 36 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_37 37 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_38 38 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_39 39 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_40 40 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_41 41 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_42 42 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_43 43 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_44 44 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_45 45 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_46 46 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_47 47 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_48 48 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_49 49 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_50 50 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_51 51 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_52 52 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_53 53 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_54 54 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_55 55 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_56 56 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_57 57 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_58 58 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_59 59 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_60 60 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_61 61 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_62 62 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_63 63 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_64 64 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_65 65 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_66 66 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_67 67 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_68 68 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_69 69 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_70 70 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_71 71 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_72 72 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_73 73 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_74 74 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_75 75 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_76 76 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_77 77 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_78 78 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_79 79 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_80 80 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_81 81 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_82 82 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_83 83 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_84 84 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_85 85 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_86 86 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_87 87 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_88 88 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_89 89 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_90 90 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_91 91 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_92 92 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_93 93 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_94 94 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_95 95 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_96 96 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_97 97 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_98 98 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_99 99 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_100 100 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_101 101 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_102 102 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_103 103 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_104 104 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_105 105 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_106 106 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_107 107 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_108 108 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_109 109 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_110 110 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_111 111 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_112 112 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_113 113 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_114 114 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_115 115 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_116 116 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_117 117 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_118 118 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_119 119 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_120 120 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_121 121 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_122 122 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_123 123 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_124 124 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_125 125 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_126 126 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_127 127 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_128 128 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_129 129 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_130 130 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_131 131 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_132 132 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_133 133 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_134 134 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_135 135 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_136 136 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_137 137 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_138 138 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_139 139 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_140 140 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_141 141 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_142 142 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_143 143 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_144 144 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_145 145 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_146 146 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_147 147 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_148 148 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_149 149 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_150 150 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_151 151 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_152 152 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_153 153 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_154 154 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_155 155 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_156 156 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_157 157 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_158 158 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_159 159 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_160 160 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_161 161 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_162 162 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_163 163 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_164 164 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_165 165 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_166 166 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_167 167 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_168 168 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_169 169 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_170 170 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_171 171 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_172 172 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_173 173 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_174 174 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_175 175 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_176 176 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_177 177 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_178 178 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_179 179 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_180 180 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_181 181 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_182 182 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_183 183 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_184 184 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_185 185 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_186 186 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_187 187 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_188 188 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_189 189 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_190 190 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_191 191 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_192 192 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_193 193 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_194 194 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_195 195 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_196 196 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_197 197 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_198 198 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_199 199 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_200 200 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_201 201 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_202 202 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_203 203 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_204 204 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_205 205 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_206 206 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_207 207 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_208 208 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_209 209 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_210 210 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_211 211 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_212 212 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_213 213 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_214 214 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_215 215 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_216 216 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_217 217 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_218 218 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_219 219 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_220 220 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_221 221 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_222 222 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_223 223 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_224 224 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_225 225 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_226 226 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_227 227 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_228 228 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_229 229 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_230 230 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_231 231 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_232 232 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_233 233 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_234 234 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_235 235 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_236 236 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_237 237 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_238 238 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_239 239 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_240 240 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_241 241 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_242 242 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_243 243 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_244 244 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_245 245 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_246 246 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_247 247 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_248 248 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_249 249 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_250 250 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_251 251 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_252 252 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_253 253 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_254 254 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_255 255 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_256 256 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_257 257 +# +# endif diff --git a/contrib/src/boost/preprocessor/seq/subseq.hpp b/contrib/src/boost/preprocessor/seq/subseq.hpp new file mode 100644 index 0000000..fb242f1 --- /dev/null +++ b/contrib/src/boost/preprocessor/seq/subseq.hpp @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_SUBSEQ_HPP +# define BOOST_PREPROCESSOR_SEQ_SUBSEQ_HPP +# +# include +# include +# include +# +# /* BOOST_PP_SEQ_SUBSEQ */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_SUBSEQ(seq, i, len) BOOST_PP_SEQ_FIRST_N(len, BOOST_PP_SEQ_REST_N(i, seq)) +# else +# define BOOST_PP_SEQ_SUBSEQ(seq, i, len) BOOST_PP_SEQ_SUBSEQ_I(seq, i, len) +# define BOOST_PP_SEQ_SUBSEQ_I(seq, i, len) BOOST_PP_SEQ_FIRST_N(len, BOOST_PP_SEQ_REST_N(i, seq)) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/seq/transform.hpp b/contrib/src/boost/preprocessor/seq/transform.hpp new file mode 100644 index 0000000..79d8108 --- /dev/null +++ b/contrib/src/boost/preprocessor/seq/transform.hpp @@ -0,0 +1,48 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_TRANSFORM_HPP +# define BOOST_PREPROCESSOR_SEQ_TRANSFORM_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_TRANSFORM */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_TRANSFORM(op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) +# else +# define BOOST_PP_SEQ_TRANSFORM(op, data, seq) BOOST_PP_SEQ_TRANSFORM_I(op, data, seq) +# define BOOST_PP_SEQ_TRANSFORM_I(op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_TRANSFORM_O(s, state, elem) BOOST_PP_SEQ_TRANSFORM_O_IM(s, BOOST_PP_TUPLE_REM_3 state, elem) +# define BOOST_PP_SEQ_TRANSFORM_O_IM(s, im, elem) BOOST_PP_SEQ_TRANSFORM_O_I(s, im, elem) +# else +# define BOOST_PP_SEQ_TRANSFORM_O(s, state, elem) BOOST_PP_SEQ_TRANSFORM_O_I(s, BOOST_PP_TUPLE_ELEM(3, 0, state), BOOST_PP_TUPLE_ELEM(3, 1, state), BOOST_PP_TUPLE_ELEM(3, 2, state), elem) +# endif +# +# define BOOST_PP_SEQ_TRANSFORM_O_I(s, op, data, res, elem) (op, data, res (op(s, data, elem))) +# +# /* BOOST_PP_SEQ_TRANSFORM_S */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_TRANSFORM_S(s, op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) +# else +# define BOOST_PP_SEQ_TRANSFORM_S(s, op, data, seq) BOOST_PP_SEQ_TRANSFORM_S_I(s, op, data, seq) +# define BOOST_PP_SEQ_TRANSFORM_S_I(s, op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/slot/detail/counter.hpp b/contrib/src/boost/preprocessor/slot/detail/counter.hpp new file mode 100644 index 0000000..a1c0df1 --- /dev/null +++ b/contrib/src/boost/preprocessor/slot/detail/counter.hpp @@ -0,0 +1,269 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2005. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# define BOOST_PP_VALUE BOOST_PP_COUNTER + 1 +# +# include +# +# undef BOOST_PP_COUNTER +# +# undef BOOST_PP_COUNTER_DIGIT_1 +# undef BOOST_PP_COUNTER_DIGIT_2 +# undef BOOST_PP_COUNTER_DIGIT_3 +# undef BOOST_PP_COUNTER_DIGIT_4 +# undef BOOST_PP_COUNTER_DIGIT_5 +# undef BOOST_PP_COUNTER_DIGIT_6 +# undef BOOST_PP_COUNTER_DIGIT_7 +# undef BOOST_PP_COUNTER_DIGIT_8 +# undef BOOST_PP_COUNTER_DIGIT_9 +# undef BOOST_PP_COUNTER_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_10 == 0 +# define BOOST_PP_COUNTER_DIGIT_10 0 +# elif BOOST_PP_SLOT_TEMP_10 == 1 +# define BOOST_PP_COUNTER_DIGIT_10 1 +# elif BOOST_PP_SLOT_TEMP_10 == 2 +# define BOOST_PP_COUNTER_DIGIT_10 2 +# elif BOOST_PP_SLOT_TEMP_10 == 3 +# define BOOST_PP_COUNTER_DIGIT_10 3 +# elif BOOST_PP_SLOT_TEMP_10 == 4 +# define BOOST_PP_COUNTER_DIGIT_10 4 +# elif BOOST_PP_SLOT_TEMP_10 == 5 +# define BOOST_PP_COUNTER_DIGIT_10 5 +# elif BOOST_PP_SLOT_TEMP_10 == 6 +# define BOOST_PP_COUNTER_DIGIT_10 6 +# elif BOOST_PP_SLOT_TEMP_10 == 7 +# define BOOST_PP_COUNTER_DIGIT_10 7 +# elif BOOST_PP_SLOT_TEMP_10 == 8 +# define BOOST_PP_COUNTER_DIGIT_10 8 +# elif BOOST_PP_SLOT_TEMP_10 == 9 +# define BOOST_PP_COUNTER_DIGIT_10 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_9 == 0 +# define BOOST_PP_COUNTER_DIGIT_9 0 +# elif BOOST_PP_SLOT_TEMP_9 == 1 +# define BOOST_PP_COUNTER_DIGIT_9 1 +# elif BOOST_PP_SLOT_TEMP_9 == 2 +# define BOOST_PP_COUNTER_DIGIT_9 2 +# elif BOOST_PP_SLOT_TEMP_9 == 3 +# define BOOST_PP_COUNTER_DIGIT_9 3 +# elif BOOST_PP_SLOT_TEMP_9 == 4 +# define BOOST_PP_COUNTER_DIGIT_9 4 +# elif BOOST_PP_SLOT_TEMP_9 == 5 +# define BOOST_PP_COUNTER_DIGIT_9 5 +# elif BOOST_PP_SLOT_TEMP_9 == 6 +# define BOOST_PP_COUNTER_DIGIT_9 6 +# elif BOOST_PP_SLOT_TEMP_9 == 7 +# define BOOST_PP_COUNTER_DIGIT_9 7 +# elif BOOST_PP_SLOT_TEMP_9 == 8 +# define BOOST_PP_COUNTER_DIGIT_9 8 +# elif BOOST_PP_SLOT_TEMP_9 == 9 +# define BOOST_PP_COUNTER_DIGIT_9 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_8 == 0 +# define BOOST_PP_COUNTER_DIGIT_8 0 +# elif BOOST_PP_SLOT_TEMP_8 == 1 +# define BOOST_PP_COUNTER_DIGIT_8 1 +# elif BOOST_PP_SLOT_TEMP_8 == 2 +# define BOOST_PP_COUNTER_DIGIT_8 2 +# elif BOOST_PP_SLOT_TEMP_8 == 3 +# define BOOST_PP_COUNTER_DIGIT_8 3 +# elif BOOST_PP_SLOT_TEMP_8 == 4 +# define BOOST_PP_COUNTER_DIGIT_8 4 +# elif BOOST_PP_SLOT_TEMP_8 == 5 +# define BOOST_PP_COUNTER_DIGIT_8 5 +# elif BOOST_PP_SLOT_TEMP_8 == 6 +# define BOOST_PP_COUNTER_DIGIT_8 6 +# elif BOOST_PP_SLOT_TEMP_8 == 7 +# define BOOST_PP_COUNTER_DIGIT_8 7 +# elif BOOST_PP_SLOT_TEMP_8 == 8 +# define BOOST_PP_COUNTER_DIGIT_8 8 +# elif BOOST_PP_SLOT_TEMP_8 == 9 +# define BOOST_PP_COUNTER_DIGIT_8 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_7 == 0 +# define BOOST_PP_COUNTER_DIGIT_7 0 +# elif BOOST_PP_SLOT_TEMP_7 == 1 +# define BOOST_PP_COUNTER_DIGIT_7 1 +# elif BOOST_PP_SLOT_TEMP_7 == 2 +# define BOOST_PP_COUNTER_DIGIT_7 2 +# elif BOOST_PP_SLOT_TEMP_7 == 3 +# define BOOST_PP_COUNTER_DIGIT_7 3 +# elif BOOST_PP_SLOT_TEMP_7 == 4 +# define BOOST_PP_COUNTER_DIGIT_7 4 +# elif BOOST_PP_SLOT_TEMP_7 == 5 +# define BOOST_PP_COUNTER_DIGIT_7 5 +# elif BOOST_PP_SLOT_TEMP_7 == 6 +# define BOOST_PP_COUNTER_DIGIT_7 6 +# elif BOOST_PP_SLOT_TEMP_7 == 7 +# define BOOST_PP_COUNTER_DIGIT_7 7 +# elif BOOST_PP_SLOT_TEMP_7 == 8 +# define BOOST_PP_COUNTER_DIGIT_7 8 +# elif BOOST_PP_SLOT_TEMP_7 == 9 +# define BOOST_PP_COUNTER_DIGIT_7 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_6 == 0 +# define BOOST_PP_COUNTER_DIGIT_6 0 +# elif BOOST_PP_SLOT_TEMP_6 == 1 +# define BOOST_PP_COUNTER_DIGIT_6 1 +# elif BOOST_PP_SLOT_TEMP_6 == 2 +# define BOOST_PP_COUNTER_DIGIT_6 2 +# elif BOOST_PP_SLOT_TEMP_6 == 3 +# define BOOST_PP_COUNTER_DIGIT_6 3 +# elif BOOST_PP_SLOT_TEMP_6 == 4 +# define BOOST_PP_COUNTER_DIGIT_6 4 +# elif BOOST_PP_SLOT_TEMP_6 == 5 +# define BOOST_PP_COUNTER_DIGIT_6 5 +# elif BOOST_PP_SLOT_TEMP_6 == 6 +# define BOOST_PP_COUNTER_DIGIT_6 6 +# elif BOOST_PP_SLOT_TEMP_6 == 7 +# define BOOST_PP_COUNTER_DIGIT_6 7 +# elif BOOST_PP_SLOT_TEMP_6 == 8 +# define BOOST_PP_COUNTER_DIGIT_6 8 +# elif BOOST_PP_SLOT_TEMP_6 == 9 +# define BOOST_PP_COUNTER_DIGIT_6 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_5 == 0 +# define BOOST_PP_COUNTER_DIGIT_5 0 +# elif BOOST_PP_SLOT_TEMP_5 == 1 +# define BOOST_PP_COUNTER_DIGIT_5 1 +# elif BOOST_PP_SLOT_TEMP_5 == 2 +# define BOOST_PP_COUNTER_DIGIT_5 2 +# elif BOOST_PP_SLOT_TEMP_5 == 3 +# define BOOST_PP_COUNTER_DIGIT_5 3 +# elif BOOST_PP_SLOT_TEMP_5 == 4 +# define BOOST_PP_COUNTER_DIGIT_5 4 +# elif BOOST_PP_SLOT_TEMP_5 == 5 +# define BOOST_PP_COUNTER_DIGIT_5 5 +# elif BOOST_PP_SLOT_TEMP_5 == 6 +# define BOOST_PP_COUNTER_DIGIT_5 6 +# elif BOOST_PP_SLOT_TEMP_5 == 7 +# define BOOST_PP_COUNTER_DIGIT_5 7 +# elif BOOST_PP_SLOT_TEMP_5 == 8 +# define BOOST_PP_COUNTER_DIGIT_5 8 +# elif BOOST_PP_SLOT_TEMP_5 == 9 +# define BOOST_PP_COUNTER_DIGIT_5 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_4 == 0 +# define BOOST_PP_COUNTER_DIGIT_4 0 +# elif BOOST_PP_SLOT_TEMP_4 == 1 +# define BOOST_PP_COUNTER_DIGIT_4 1 +# elif BOOST_PP_SLOT_TEMP_4 == 2 +# define BOOST_PP_COUNTER_DIGIT_4 2 +# elif BOOST_PP_SLOT_TEMP_4 == 3 +# define BOOST_PP_COUNTER_DIGIT_4 3 +# elif BOOST_PP_SLOT_TEMP_4 == 4 +# define BOOST_PP_COUNTER_DIGIT_4 4 +# elif BOOST_PP_SLOT_TEMP_4 == 5 +# define BOOST_PP_COUNTER_DIGIT_4 5 +# elif BOOST_PP_SLOT_TEMP_4 == 6 +# define BOOST_PP_COUNTER_DIGIT_4 6 +# elif BOOST_PP_SLOT_TEMP_4 == 7 +# define BOOST_PP_COUNTER_DIGIT_4 7 +# elif BOOST_PP_SLOT_TEMP_4 == 8 +# define BOOST_PP_COUNTER_DIGIT_4 8 +# elif BOOST_PP_SLOT_TEMP_4 == 9 +# define BOOST_PP_COUNTER_DIGIT_4 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_COUNTER_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_COUNTER_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_COUNTER_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_COUNTER_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_COUNTER_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_COUNTER_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_COUNTER_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_COUNTER_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_COUNTER_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_COUNTER_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_COUNTER_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_COUNTER_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_COUNTER_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_COUNTER_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_COUNTER_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_COUNTER_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_COUNTER_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_COUNTER_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_COUNTER_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_COUNTER_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_COUNTER_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_COUNTER_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_COUNTER_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_COUNTER_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_COUNTER_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_COUNTER_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_COUNTER_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_COUNTER_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_COUNTER_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_COUNTER_DIGIT_1 9 +# endif +# +# if BOOST_PP_COUNTER_DIGIT_10 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_10(BOOST_PP_COUNTER_DIGIT_10, BOOST_PP_COUNTER_DIGIT_9, BOOST_PP_COUNTER_DIGIT_8, BOOST_PP_COUNTER_DIGIT_7, BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_9 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_9(BOOST_PP_COUNTER_DIGIT_9, BOOST_PP_COUNTER_DIGIT_8, BOOST_PP_COUNTER_DIGIT_7, BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_8 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_8(BOOST_PP_COUNTER_DIGIT_8, BOOST_PP_COUNTER_DIGIT_7, BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_7 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_7(BOOST_PP_COUNTER_DIGIT_7, BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_6 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_6(BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_5 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_5(BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_4 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_4(BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_3 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_3(BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_2 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_2(BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# else +# define BOOST_PP_COUNTER BOOST_PP_COUNTER_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/slot/detail/def.hpp b/contrib/src/boost/preprocessor/slot/detail/def.hpp new file mode 100644 index 0000000..885099e --- /dev/null +++ b/contrib/src/boost/preprocessor/slot/detail/def.hpp @@ -0,0 +1,49 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SLOT_DETAIL_DEF_HPP +# define BOOST_PREPROCESSOR_SLOT_DETAIL_DEF_HPP +# +# /* BOOST_PP_SLOT_OFFSET_x */ +# +# define BOOST_PP_SLOT_OFFSET_10(x) (x) % 1000000000UL +# define BOOST_PP_SLOT_OFFSET_9(x) BOOST_PP_SLOT_OFFSET_10(x) % 100000000UL +# define BOOST_PP_SLOT_OFFSET_8(x) BOOST_PP_SLOT_OFFSET_9(x) % 10000000UL +# define BOOST_PP_SLOT_OFFSET_7(x) BOOST_PP_SLOT_OFFSET_8(x) % 1000000UL +# define BOOST_PP_SLOT_OFFSET_6(x) BOOST_PP_SLOT_OFFSET_7(x) % 100000UL +# define BOOST_PP_SLOT_OFFSET_5(x) BOOST_PP_SLOT_OFFSET_6(x) % 10000UL +# define BOOST_PP_SLOT_OFFSET_4(x) BOOST_PP_SLOT_OFFSET_5(x) % 1000UL +# define BOOST_PP_SLOT_OFFSET_3(x) BOOST_PP_SLOT_OFFSET_4(x) % 100UL +# define BOOST_PP_SLOT_OFFSET_2(x) BOOST_PP_SLOT_OFFSET_3(x) % 10UL +# +# /* BOOST_PP_SLOT_CC_x */ +# +# define BOOST_PP_SLOT_CC_2(a, b) BOOST_PP_SLOT_CC_2_D(a, b) +# define BOOST_PP_SLOT_CC_3(a, b, c) BOOST_PP_SLOT_CC_3_D(a, b, c) +# define BOOST_PP_SLOT_CC_4(a, b, c, d) BOOST_PP_SLOT_CC_4_D(a, b, c, d) +# define BOOST_PP_SLOT_CC_5(a, b, c, d, e) BOOST_PP_SLOT_CC_5_D(a, b, c, d, e) +# define BOOST_PP_SLOT_CC_6(a, b, c, d, e, f) BOOST_PP_SLOT_CC_6_D(a, b, c, d, e, f) +# define BOOST_PP_SLOT_CC_7(a, b, c, d, e, f, g) BOOST_PP_SLOT_CC_7_D(a, b, c, d, e, f, g) +# define BOOST_PP_SLOT_CC_8(a, b, c, d, e, f, g, h) BOOST_PP_SLOT_CC_8_D(a, b, c, d, e, f, g, h) +# define BOOST_PP_SLOT_CC_9(a, b, c, d, e, f, g, h, i) BOOST_PP_SLOT_CC_9_D(a, b, c, d, e, f, g, h, i) +# define BOOST_PP_SLOT_CC_10(a, b, c, d, e, f, g, h, i, j) BOOST_PP_SLOT_CC_10_D(a, b, c, d, e, f, g, h, i, j) +# +# define BOOST_PP_SLOT_CC_2_D(a, b) a ## b +# define BOOST_PP_SLOT_CC_3_D(a, b, c) a ## b ## c +# define BOOST_PP_SLOT_CC_4_D(a, b, c, d) a ## b ## c ## d +# define BOOST_PP_SLOT_CC_5_D(a, b, c, d, e) a ## b ## c ## d ## e +# define BOOST_PP_SLOT_CC_6_D(a, b, c, d, e, f) a ## b ## c ## d ## e ## f +# define BOOST_PP_SLOT_CC_7_D(a, b, c, d, e, f, g) a ## b ## c ## d ## e ## f ## g +# define BOOST_PP_SLOT_CC_8_D(a, b, c, d, e, f, g, h) a ## b ## c ## d ## e ## f ## g ## h +# define BOOST_PP_SLOT_CC_9_D(a, b, c, d, e, f, g, h, i) a ## b ## c ## d ## e ## f ## g ## h ## i +# define BOOST_PP_SLOT_CC_10_D(a, b, c, d, e, f, g, h, i, j) a ## b ## c ## d ## e ## f ## g ## h ## i ## j +# +# endif diff --git a/contrib/src/boost/preprocessor/slot/detail/shared.hpp b/contrib/src/boost/preprocessor/slot/detail/shared.hpp new file mode 100644 index 0000000..c97ac54 --- /dev/null +++ b/contrib/src/boost/preprocessor/slot/detail/shared.hpp @@ -0,0 +1,247 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PP_VALUE +# error BOOST_PP_ERROR: BOOST_PP_VALUE is not defined +# endif +# +# undef BOOST_PP_SLOT_TEMP_1 +# undef BOOST_PP_SLOT_TEMP_2 +# undef BOOST_PP_SLOT_TEMP_3 +# undef BOOST_PP_SLOT_TEMP_4 +# undef BOOST_PP_SLOT_TEMP_5 +# undef BOOST_PP_SLOT_TEMP_6 +# undef BOOST_PP_SLOT_TEMP_7 +# undef BOOST_PP_SLOT_TEMP_8 +# undef BOOST_PP_SLOT_TEMP_9 +# undef BOOST_PP_SLOT_TEMP_10 +# +# if (BOOST_PP_VALUE) / 1000000000UL == 0 +# define BOOST_PP_SLOT_TEMP_10 0 +# elif (BOOST_PP_VALUE) / 1000000000UL == 1 +# define BOOST_PP_SLOT_TEMP_10 1 +# elif (BOOST_PP_VALUE) / 1000000000UL == 2 +# define BOOST_PP_SLOT_TEMP_10 2 +# elif (BOOST_PP_VALUE) / 1000000000UL == 3 +# define BOOST_PP_SLOT_TEMP_10 3 +# elif (BOOST_PP_VALUE) / 1000000000UL == 4 +# define BOOST_PP_SLOT_TEMP_10 4 +# elif (BOOST_PP_VALUE) / 1000000000UL == 5 +# define BOOST_PP_SLOT_TEMP_10 5 +# elif (BOOST_PP_VALUE) / 1000000000UL == 6 +# define BOOST_PP_SLOT_TEMP_10 6 +# elif (BOOST_PP_VALUE) / 1000000000UL == 7 +# define BOOST_PP_SLOT_TEMP_10 7 +# elif (BOOST_PP_VALUE) / 1000000000UL == 8 +# define BOOST_PP_SLOT_TEMP_10 8 +# elif (BOOST_PP_VALUE) / 1000000000UL == 9 +# define BOOST_PP_SLOT_TEMP_10 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 0 +# define BOOST_PP_SLOT_TEMP_9 0 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 1 +# define BOOST_PP_SLOT_TEMP_9 1 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 2 +# define BOOST_PP_SLOT_TEMP_9 2 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 3 +# define BOOST_PP_SLOT_TEMP_9 3 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 4 +# define BOOST_PP_SLOT_TEMP_9 4 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 5 +# define BOOST_PP_SLOT_TEMP_9 5 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 6 +# define BOOST_PP_SLOT_TEMP_9 6 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 7 +# define BOOST_PP_SLOT_TEMP_9 7 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 8 +# define BOOST_PP_SLOT_TEMP_9 8 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 9 +# define BOOST_PP_SLOT_TEMP_9 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 0 +# define BOOST_PP_SLOT_TEMP_8 0 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 1 +# define BOOST_PP_SLOT_TEMP_8 1 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 2 +# define BOOST_PP_SLOT_TEMP_8 2 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 3 +# define BOOST_PP_SLOT_TEMP_8 3 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 4 +# define BOOST_PP_SLOT_TEMP_8 4 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 5 +# define BOOST_PP_SLOT_TEMP_8 5 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 6 +# define BOOST_PP_SLOT_TEMP_8 6 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 7 +# define BOOST_PP_SLOT_TEMP_8 7 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 8 +# define BOOST_PP_SLOT_TEMP_8 8 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 9 +# define BOOST_PP_SLOT_TEMP_8 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 0 +# define BOOST_PP_SLOT_TEMP_7 0 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 1 +# define BOOST_PP_SLOT_TEMP_7 1 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 2 +# define BOOST_PP_SLOT_TEMP_7 2 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 3 +# define BOOST_PP_SLOT_TEMP_7 3 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 4 +# define BOOST_PP_SLOT_TEMP_7 4 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 5 +# define BOOST_PP_SLOT_TEMP_7 5 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 6 +# define BOOST_PP_SLOT_TEMP_7 6 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 7 +# define BOOST_PP_SLOT_TEMP_7 7 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 8 +# define BOOST_PP_SLOT_TEMP_7 8 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 9 +# define BOOST_PP_SLOT_TEMP_7 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 0 +# define BOOST_PP_SLOT_TEMP_6 0 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 1 +# define BOOST_PP_SLOT_TEMP_6 1 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 2 +# define BOOST_PP_SLOT_TEMP_6 2 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 3 +# define BOOST_PP_SLOT_TEMP_6 3 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 4 +# define BOOST_PP_SLOT_TEMP_6 4 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 5 +# define BOOST_PP_SLOT_TEMP_6 5 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 6 +# define BOOST_PP_SLOT_TEMP_6 6 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 7 +# define BOOST_PP_SLOT_TEMP_6 7 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 8 +# define BOOST_PP_SLOT_TEMP_6 8 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 9 +# define BOOST_PP_SLOT_TEMP_6 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 0 +# define BOOST_PP_SLOT_TEMP_5 0 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 1 +# define BOOST_PP_SLOT_TEMP_5 1 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 2 +# define BOOST_PP_SLOT_TEMP_5 2 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 3 +# define BOOST_PP_SLOT_TEMP_5 3 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 4 +# define BOOST_PP_SLOT_TEMP_5 4 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 5 +# define BOOST_PP_SLOT_TEMP_5 5 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 6 +# define BOOST_PP_SLOT_TEMP_5 6 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 7 +# define BOOST_PP_SLOT_TEMP_5 7 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 8 +# define BOOST_PP_SLOT_TEMP_5 8 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 9 +# define BOOST_PP_SLOT_TEMP_5 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 0 +# define BOOST_PP_SLOT_TEMP_4 0 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 1 +# define BOOST_PP_SLOT_TEMP_4 1 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 2 +# define BOOST_PP_SLOT_TEMP_4 2 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 3 +# define BOOST_PP_SLOT_TEMP_4 3 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 4 +# define BOOST_PP_SLOT_TEMP_4 4 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 5 +# define BOOST_PP_SLOT_TEMP_4 5 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 6 +# define BOOST_PP_SLOT_TEMP_4 6 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 7 +# define BOOST_PP_SLOT_TEMP_4 7 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 8 +# define BOOST_PP_SLOT_TEMP_4 8 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 9 +# define BOOST_PP_SLOT_TEMP_4 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 0 +# define BOOST_PP_SLOT_TEMP_3 0 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 1 +# define BOOST_PP_SLOT_TEMP_3 1 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 2 +# define BOOST_PP_SLOT_TEMP_3 2 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 3 +# define BOOST_PP_SLOT_TEMP_3 3 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 4 +# define BOOST_PP_SLOT_TEMP_3 4 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 5 +# define BOOST_PP_SLOT_TEMP_3 5 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 6 +# define BOOST_PP_SLOT_TEMP_3 6 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 7 +# define BOOST_PP_SLOT_TEMP_3 7 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 8 +# define BOOST_PP_SLOT_TEMP_3 8 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 9 +# define BOOST_PP_SLOT_TEMP_3 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 0 +# define BOOST_PP_SLOT_TEMP_2 0 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 1 +# define BOOST_PP_SLOT_TEMP_2 1 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 2 +# define BOOST_PP_SLOT_TEMP_2 2 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 3 +# define BOOST_PP_SLOT_TEMP_2 3 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 4 +# define BOOST_PP_SLOT_TEMP_2 4 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 5 +# define BOOST_PP_SLOT_TEMP_2 5 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 6 +# define BOOST_PP_SLOT_TEMP_2 6 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 7 +# define BOOST_PP_SLOT_TEMP_2 7 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 8 +# define BOOST_PP_SLOT_TEMP_2 8 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 9 +# define BOOST_PP_SLOT_TEMP_2 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 0 +# define BOOST_PP_SLOT_TEMP_1 0 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 1 +# define BOOST_PP_SLOT_TEMP_1 1 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 2 +# define BOOST_PP_SLOT_TEMP_1 2 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 3 +# define BOOST_PP_SLOT_TEMP_1 3 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 4 +# define BOOST_PP_SLOT_TEMP_1 4 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 5 +# define BOOST_PP_SLOT_TEMP_1 5 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 6 +# define BOOST_PP_SLOT_TEMP_1 6 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 7 +# define BOOST_PP_SLOT_TEMP_1 7 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 8 +# define BOOST_PP_SLOT_TEMP_1 8 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 9 +# define BOOST_PP_SLOT_TEMP_1 9 +# endif +# +# undef BOOST_PP_VALUE diff --git a/contrib/src/boost/preprocessor/slot/detail/slot1.hpp b/contrib/src/boost/preprocessor/slot/detail/slot1.hpp new file mode 100644 index 0000000..b22748e --- /dev/null +++ b/contrib/src/boost/preprocessor/slot/detail/slot1.hpp @@ -0,0 +1,267 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_SLOT_1 +# +# undef BOOST_PP_SLOT_1_DIGIT_1 +# undef BOOST_PP_SLOT_1_DIGIT_2 +# undef BOOST_PP_SLOT_1_DIGIT_3 +# undef BOOST_PP_SLOT_1_DIGIT_4 +# undef BOOST_PP_SLOT_1_DIGIT_5 +# undef BOOST_PP_SLOT_1_DIGIT_6 +# undef BOOST_PP_SLOT_1_DIGIT_7 +# undef BOOST_PP_SLOT_1_DIGIT_8 +# undef BOOST_PP_SLOT_1_DIGIT_9 +# undef BOOST_PP_SLOT_1_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_10 == 0 +# define BOOST_PP_SLOT_1_DIGIT_10 0 +# elif BOOST_PP_SLOT_TEMP_10 == 1 +# define BOOST_PP_SLOT_1_DIGIT_10 1 +# elif BOOST_PP_SLOT_TEMP_10 == 2 +# define BOOST_PP_SLOT_1_DIGIT_10 2 +# elif BOOST_PP_SLOT_TEMP_10 == 3 +# define BOOST_PP_SLOT_1_DIGIT_10 3 +# elif BOOST_PP_SLOT_TEMP_10 == 4 +# define BOOST_PP_SLOT_1_DIGIT_10 4 +# elif BOOST_PP_SLOT_TEMP_10 == 5 +# define BOOST_PP_SLOT_1_DIGIT_10 5 +# elif BOOST_PP_SLOT_TEMP_10 == 6 +# define BOOST_PP_SLOT_1_DIGIT_10 6 +# elif BOOST_PP_SLOT_TEMP_10 == 7 +# define BOOST_PP_SLOT_1_DIGIT_10 7 +# elif BOOST_PP_SLOT_TEMP_10 == 8 +# define BOOST_PP_SLOT_1_DIGIT_10 8 +# elif BOOST_PP_SLOT_TEMP_10 == 9 +# define BOOST_PP_SLOT_1_DIGIT_10 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_9 == 0 +# define BOOST_PP_SLOT_1_DIGIT_9 0 +# elif BOOST_PP_SLOT_TEMP_9 == 1 +# define BOOST_PP_SLOT_1_DIGIT_9 1 +# elif BOOST_PP_SLOT_TEMP_9 == 2 +# define BOOST_PP_SLOT_1_DIGIT_9 2 +# elif BOOST_PP_SLOT_TEMP_9 == 3 +# define BOOST_PP_SLOT_1_DIGIT_9 3 +# elif BOOST_PP_SLOT_TEMP_9 == 4 +# define BOOST_PP_SLOT_1_DIGIT_9 4 +# elif BOOST_PP_SLOT_TEMP_9 == 5 +# define BOOST_PP_SLOT_1_DIGIT_9 5 +# elif BOOST_PP_SLOT_TEMP_9 == 6 +# define BOOST_PP_SLOT_1_DIGIT_9 6 +# elif BOOST_PP_SLOT_TEMP_9 == 7 +# define BOOST_PP_SLOT_1_DIGIT_9 7 +# elif BOOST_PP_SLOT_TEMP_9 == 8 +# define BOOST_PP_SLOT_1_DIGIT_9 8 +# elif BOOST_PP_SLOT_TEMP_9 == 9 +# define BOOST_PP_SLOT_1_DIGIT_9 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_8 == 0 +# define BOOST_PP_SLOT_1_DIGIT_8 0 +# elif BOOST_PP_SLOT_TEMP_8 == 1 +# define BOOST_PP_SLOT_1_DIGIT_8 1 +# elif BOOST_PP_SLOT_TEMP_8 == 2 +# define BOOST_PP_SLOT_1_DIGIT_8 2 +# elif BOOST_PP_SLOT_TEMP_8 == 3 +# define BOOST_PP_SLOT_1_DIGIT_8 3 +# elif BOOST_PP_SLOT_TEMP_8 == 4 +# define BOOST_PP_SLOT_1_DIGIT_8 4 +# elif BOOST_PP_SLOT_TEMP_8 == 5 +# define BOOST_PP_SLOT_1_DIGIT_8 5 +# elif BOOST_PP_SLOT_TEMP_8 == 6 +# define BOOST_PP_SLOT_1_DIGIT_8 6 +# elif BOOST_PP_SLOT_TEMP_8 == 7 +# define BOOST_PP_SLOT_1_DIGIT_8 7 +# elif BOOST_PP_SLOT_TEMP_8 == 8 +# define BOOST_PP_SLOT_1_DIGIT_8 8 +# elif BOOST_PP_SLOT_TEMP_8 == 9 +# define BOOST_PP_SLOT_1_DIGIT_8 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_7 == 0 +# define BOOST_PP_SLOT_1_DIGIT_7 0 +# elif BOOST_PP_SLOT_TEMP_7 == 1 +# define BOOST_PP_SLOT_1_DIGIT_7 1 +# elif BOOST_PP_SLOT_TEMP_7 == 2 +# define BOOST_PP_SLOT_1_DIGIT_7 2 +# elif BOOST_PP_SLOT_TEMP_7 == 3 +# define BOOST_PP_SLOT_1_DIGIT_7 3 +# elif BOOST_PP_SLOT_TEMP_7 == 4 +# define BOOST_PP_SLOT_1_DIGIT_7 4 +# elif BOOST_PP_SLOT_TEMP_7 == 5 +# define BOOST_PP_SLOT_1_DIGIT_7 5 +# elif BOOST_PP_SLOT_TEMP_7 == 6 +# define BOOST_PP_SLOT_1_DIGIT_7 6 +# elif BOOST_PP_SLOT_TEMP_7 == 7 +# define BOOST_PP_SLOT_1_DIGIT_7 7 +# elif BOOST_PP_SLOT_TEMP_7 == 8 +# define BOOST_PP_SLOT_1_DIGIT_7 8 +# elif BOOST_PP_SLOT_TEMP_7 == 9 +# define BOOST_PP_SLOT_1_DIGIT_7 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_6 == 0 +# define BOOST_PP_SLOT_1_DIGIT_6 0 +# elif BOOST_PP_SLOT_TEMP_6 == 1 +# define BOOST_PP_SLOT_1_DIGIT_6 1 +# elif BOOST_PP_SLOT_TEMP_6 == 2 +# define BOOST_PP_SLOT_1_DIGIT_6 2 +# elif BOOST_PP_SLOT_TEMP_6 == 3 +# define BOOST_PP_SLOT_1_DIGIT_6 3 +# elif BOOST_PP_SLOT_TEMP_6 == 4 +# define BOOST_PP_SLOT_1_DIGIT_6 4 +# elif BOOST_PP_SLOT_TEMP_6 == 5 +# define BOOST_PP_SLOT_1_DIGIT_6 5 +# elif BOOST_PP_SLOT_TEMP_6 == 6 +# define BOOST_PP_SLOT_1_DIGIT_6 6 +# elif BOOST_PP_SLOT_TEMP_6 == 7 +# define BOOST_PP_SLOT_1_DIGIT_6 7 +# elif BOOST_PP_SLOT_TEMP_6 == 8 +# define BOOST_PP_SLOT_1_DIGIT_6 8 +# elif BOOST_PP_SLOT_TEMP_6 == 9 +# define BOOST_PP_SLOT_1_DIGIT_6 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_5 == 0 +# define BOOST_PP_SLOT_1_DIGIT_5 0 +# elif BOOST_PP_SLOT_TEMP_5 == 1 +# define BOOST_PP_SLOT_1_DIGIT_5 1 +# elif BOOST_PP_SLOT_TEMP_5 == 2 +# define BOOST_PP_SLOT_1_DIGIT_5 2 +# elif BOOST_PP_SLOT_TEMP_5 == 3 +# define BOOST_PP_SLOT_1_DIGIT_5 3 +# elif BOOST_PP_SLOT_TEMP_5 == 4 +# define BOOST_PP_SLOT_1_DIGIT_5 4 +# elif BOOST_PP_SLOT_TEMP_5 == 5 +# define BOOST_PP_SLOT_1_DIGIT_5 5 +# elif BOOST_PP_SLOT_TEMP_5 == 6 +# define BOOST_PP_SLOT_1_DIGIT_5 6 +# elif BOOST_PP_SLOT_TEMP_5 == 7 +# define BOOST_PP_SLOT_1_DIGIT_5 7 +# elif BOOST_PP_SLOT_TEMP_5 == 8 +# define BOOST_PP_SLOT_1_DIGIT_5 8 +# elif BOOST_PP_SLOT_TEMP_5 == 9 +# define BOOST_PP_SLOT_1_DIGIT_5 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_4 == 0 +# define BOOST_PP_SLOT_1_DIGIT_4 0 +# elif BOOST_PP_SLOT_TEMP_4 == 1 +# define BOOST_PP_SLOT_1_DIGIT_4 1 +# elif BOOST_PP_SLOT_TEMP_4 == 2 +# define BOOST_PP_SLOT_1_DIGIT_4 2 +# elif BOOST_PP_SLOT_TEMP_4 == 3 +# define BOOST_PP_SLOT_1_DIGIT_4 3 +# elif BOOST_PP_SLOT_TEMP_4 == 4 +# define BOOST_PP_SLOT_1_DIGIT_4 4 +# elif BOOST_PP_SLOT_TEMP_4 == 5 +# define BOOST_PP_SLOT_1_DIGIT_4 5 +# elif BOOST_PP_SLOT_TEMP_4 == 6 +# define BOOST_PP_SLOT_1_DIGIT_4 6 +# elif BOOST_PP_SLOT_TEMP_4 == 7 +# define BOOST_PP_SLOT_1_DIGIT_4 7 +# elif BOOST_PP_SLOT_TEMP_4 == 8 +# define BOOST_PP_SLOT_1_DIGIT_4 8 +# elif BOOST_PP_SLOT_TEMP_4 == 9 +# define BOOST_PP_SLOT_1_DIGIT_4 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_SLOT_1_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_SLOT_1_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_SLOT_1_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_SLOT_1_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_SLOT_1_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_SLOT_1_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_SLOT_1_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_SLOT_1_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_SLOT_1_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_SLOT_1_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_SLOT_1_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_SLOT_1_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_SLOT_1_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_SLOT_1_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_SLOT_1_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_SLOT_1_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_SLOT_1_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_SLOT_1_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_SLOT_1_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_SLOT_1_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_SLOT_1_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_SLOT_1_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_SLOT_1_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_SLOT_1_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_SLOT_1_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_SLOT_1_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_SLOT_1_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_SLOT_1_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_SLOT_1_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_SLOT_1_DIGIT_1 9 +# endif +# +# if BOOST_PP_SLOT_1_DIGIT_10 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_1_DIGIT_10, BOOST_PP_SLOT_1_DIGIT_9, BOOST_PP_SLOT_1_DIGIT_8, BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_9 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_1_DIGIT_9, BOOST_PP_SLOT_1_DIGIT_8, BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_8 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_1_DIGIT_8, BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_7 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_6 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_5 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_4 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_3 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_2 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# else +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_1_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/slot/detail/slot2.hpp b/contrib/src/boost/preprocessor/slot/detail/slot2.hpp new file mode 100644 index 0000000..5d5258c --- /dev/null +++ b/contrib/src/boost/preprocessor/slot/detail/slot2.hpp @@ -0,0 +1,267 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_SLOT_2 +# +# undef BOOST_PP_SLOT_2_DIGIT_1 +# undef BOOST_PP_SLOT_2_DIGIT_2 +# undef BOOST_PP_SLOT_2_DIGIT_3 +# undef BOOST_PP_SLOT_2_DIGIT_4 +# undef BOOST_PP_SLOT_2_DIGIT_5 +# undef BOOST_PP_SLOT_2_DIGIT_6 +# undef BOOST_PP_SLOT_2_DIGIT_7 +# undef BOOST_PP_SLOT_2_DIGIT_8 +# undef BOOST_PP_SLOT_2_DIGIT_9 +# undef BOOST_PP_SLOT_2_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_10 == 0 +# define BOOST_PP_SLOT_2_DIGIT_10 0 +# elif BOOST_PP_SLOT_TEMP_10 == 1 +# define BOOST_PP_SLOT_2_DIGIT_10 1 +# elif BOOST_PP_SLOT_TEMP_10 == 2 +# define BOOST_PP_SLOT_2_DIGIT_10 2 +# elif BOOST_PP_SLOT_TEMP_10 == 3 +# define BOOST_PP_SLOT_2_DIGIT_10 3 +# elif BOOST_PP_SLOT_TEMP_10 == 4 +# define BOOST_PP_SLOT_2_DIGIT_10 4 +# elif BOOST_PP_SLOT_TEMP_10 == 5 +# define BOOST_PP_SLOT_2_DIGIT_10 5 +# elif BOOST_PP_SLOT_TEMP_10 == 6 +# define BOOST_PP_SLOT_2_DIGIT_10 6 +# elif BOOST_PP_SLOT_TEMP_10 == 7 +# define BOOST_PP_SLOT_2_DIGIT_10 7 +# elif BOOST_PP_SLOT_TEMP_10 == 8 +# define BOOST_PP_SLOT_2_DIGIT_10 8 +# elif BOOST_PP_SLOT_TEMP_10 == 9 +# define BOOST_PP_SLOT_2_DIGIT_10 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_9 == 0 +# define BOOST_PP_SLOT_2_DIGIT_9 0 +# elif BOOST_PP_SLOT_TEMP_9 == 1 +# define BOOST_PP_SLOT_2_DIGIT_9 1 +# elif BOOST_PP_SLOT_TEMP_9 == 2 +# define BOOST_PP_SLOT_2_DIGIT_9 2 +# elif BOOST_PP_SLOT_TEMP_9 == 3 +# define BOOST_PP_SLOT_2_DIGIT_9 3 +# elif BOOST_PP_SLOT_TEMP_9 == 4 +# define BOOST_PP_SLOT_2_DIGIT_9 4 +# elif BOOST_PP_SLOT_TEMP_9 == 5 +# define BOOST_PP_SLOT_2_DIGIT_9 5 +# elif BOOST_PP_SLOT_TEMP_9 == 6 +# define BOOST_PP_SLOT_2_DIGIT_9 6 +# elif BOOST_PP_SLOT_TEMP_9 == 7 +# define BOOST_PP_SLOT_2_DIGIT_9 7 +# elif BOOST_PP_SLOT_TEMP_9 == 8 +# define BOOST_PP_SLOT_2_DIGIT_9 8 +# elif BOOST_PP_SLOT_TEMP_9 == 9 +# define BOOST_PP_SLOT_2_DIGIT_9 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_8 == 0 +# define BOOST_PP_SLOT_2_DIGIT_8 0 +# elif BOOST_PP_SLOT_TEMP_8 == 1 +# define BOOST_PP_SLOT_2_DIGIT_8 1 +# elif BOOST_PP_SLOT_TEMP_8 == 2 +# define BOOST_PP_SLOT_2_DIGIT_8 2 +# elif BOOST_PP_SLOT_TEMP_8 == 3 +# define BOOST_PP_SLOT_2_DIGIT_8 3 +# elif BOOST_PP_SLOT_TEMP_8 == 4 +# define BOOST_PP_SLOT_2_DIGIT_8 4 +# elif BOOST_PP_SLOT_TEMP_8 == 5 +# define BOOST_PP_SLOT_2_DIGIT_8 5 +# elif BOOST_PP_SLOT_TEMP_8 == 6 +# define BOOST_PP_SLOT_2_DIGIT_8 6 +# elif BOOST_PP_SLOT_TEMP_8 == 7 +# define BOOST_PP_SLOT_2_DIGIT_8 7 +# elif BOOST_PP_SLOT_TEMP_8 == 8 +# define BOOST_PP_SLOT_2_DIGIT_8 8 +# elif BOOST_PP_SLOT_TEMP_8 == 9 +# define BOOST_PP_SLOT_2_DIGIT_8 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_7 == 0 +# define BOOST_PP_SLOT_2_DIGIT_7 0 +# elif BOOST_PP_SLOT_TEMP_7 == 1 +# define BOOST_PP_SLOT_2_DIGIT_7 1 +# elif BOOST_PP_SLOT_TEMP_7 == 2 +# define BOOST_PP_SLOT_2_DIGIT_7 2 +# elif BOOST_PP_SLOT_TEMP_7 == 3 +# define BOOST_PP_SLOT_2_DIGIT_7 3 +# elif BOOST_PP_SLOT_TEMP_7 == 4 +# define BOOST_PP_SLOT_2_DIGIT_7 4 +# elif BOOST_PP_SLOT_TEMP_7 == 5 +# define BOOST_PP_SLOT_2_DIGIT_7 5 +# elif BOOST_PP_SLOT_TEMP_7 == 6 +# define BOOST_PP_SLOT_2_DIGIT_7 6 +# elif BOOST_PP_SLOT_TEMP_7 == 7 +# define BOOST_PP_SLOT_2_DIGIT_7 7 +# elif BOOST_PP_SLOT_TEMP_7 == 8 +# define BOOST_PP_SLOT_2_DIGIT_7 8 +# elif BOOST_PP_SLOT_TEMP_7 == 9 +# define BOOST_PP_SLOT_2_DIGIT_7 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_6 == 0 +# define BOOST_PP_SLOT_2_DIGIT_6 0 +# elif BOOST_PP_SLOT_TEMP_6 == 1 +# define BOOST_PP_SLOT_2_DIGIT_6 1 +# elif BOOST_PP_SLOT_TEMP_6 == 2 +# define BOOST_PP_SLOT_2_DIGIT_6 2 +# elif BOOST_PP_SLOT_TEMP_6 == 3 +# define BOOST_PP_SLOT_2_DIGIT_6 3 +# elif BOOST_PP_SLOT_TEMP_6 == 4 +# define BOOST_PP_SLOT_2_DIGIT_6 4 +# elif BOOST_PP_SLOT_TEMP_6 == 5 +# define BOOST_PP_SLOT_2_DIGIT_6 5 +# elif BOOST_PP_SLOT_TEMP_6 == 6 +# define BOOST_PP_SLOT_2_DIGIT_6 6 +# elif BOOST_PP_SLOT_TEMP_6 == 7 +# define BOOST_PP_SLOT_2_DIGIT_6 7 +# elif BOOST_PP_SLOT_TEMP_6 == 8 +# define BOOST_PP_SLOT_2_DIGIT_6 8 +# elif BOOST_PP_SLOT_TEMP_6 == 9 +# define BOOST_PP_SLOT_2_DIGIT_6 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_5 == 0 +# define BOOST_PP_SLOT_2_DIGIT_5 0 +# elif BOOST_PP_SLOT_TEMP_5 == 1 +# define BOOST_PP_SLOT_2_DIGIT_5 1 +# elif BOOST_PP_SLOT_TEMP_5 == 2 +# define BOOST_PP_SLOT_2_DIGIT_5 2 +# elif BOOST_PP_SLOT_TEMP_5 == 3 +# define BOOST_PP_SLOT_2_DIGIT_5 3 +# elif BOOST_PP_SLOT_TEMP_5 == 4 +# define BOOST_PP_SLOT_2_DIGIT_5 4 +# elif BOOST_PP_SLOT_TEMP_5 == 5 +# define BOOST_PP_SLOT_2_DIGIT_5 5 +# elif BOOST_PP_SLOT_TEMP_5 == 6 +# define BOOST_PP_SLOT_2_DIGIT_5 6 +# elif BOOST_PP_SLOT_TEMP_5 == 7 +# define BOOST_PP_SLOT_2_DIGIT_5 7 +# elif BOOST_PP_SLOT_TEMP_5 == 8 +# define BOOST_PP_SLOT_2_DIGIT_5 8 +# elif BOOST_PP_SLOT_TEMP_5 == 9 +# define BOOST_PP_SLOT_2_DIGIT_5 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_4 == 0 +# define BOOST_PP_SLOT_2_DIGIT_4 0 +# elif BOOST_PP_SLOT_TEMP_4 == 1 +# define BOOST_PP_SLOT_2_DIGIT_4 1 +# elif BOOST_PP_SLOT_TEMP_4 == 2 +# define BOOST_PP_SLOT_2_DIGIT_4 2 +# elif BOOST_PP_SLOT_TEMP_4 == 3 +# define BOOST_PP_SLOT_2_DIGIT_4 3 +# elif BOOST_PP_SLOT_TEMP_4 == 4 +# define BOOST_PP_SLOT_2_DIGIT_4 4 +# elif BOOST_PP_SLOT_TEMP_4 == 5 +# define BOOST_PP_SLOT_2_DIGIT_4 5 +# elif BOOST_PP_SLOT_TEMP_4 == 6 +# define BOOST_PP_SLOT_2_DIGIT_4 6 +# elif BOOST_PP_SLOT_TEMP_4 == 7 +# define BOOST_PP_SLOT_2_DIGIT_4 7 +# elif BOOST_PP_SLOT_TEMP_4 == 8 +# define BOOST_PP_SLOT_2_DIGIT_4 8 +# elif BOOST_PP_SLOT_TEMP_4 == 9 +# define BOOST_PP_SLOT_2_DIGIT_4 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_SLOT_2_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_SLOT_2_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_SLOT_2_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_SLOT_2_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_SLOT_2_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_SLOT_2_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_SLOT_2_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_SLOT_2_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_SLOT_2_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_SLOT_2_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_SLOT_2_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_SLOT_2_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_SLOT_2_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_SLOT_2_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_SLOT_2_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_SLOT_2_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_SLOT_2_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_SLOT_2_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_SLOT_2_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_SLOT_2_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_SLOT_2_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_SLOT_2_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_SLOT_2_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_SLOT_2_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_SLOT_2_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_SLOT_2_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_SLOT_2_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_SLOT_2_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_SLOT_2_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_SLOT_2_DIGIT_1 9 +# endif +# +# if BOOST_PP_SLOT_2_DIGIT_10 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_2_DIGIT_10, BOOST_PP_SLOT_2_DIGIT_9, BOOST_PP_SLOT_2_DIGIT_8, BOOST_PP_SLOT_2_DIGIT_7, BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_9 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_2_DIGIT_9, BOOST_PP_SLOT_2_DIGIT_8, BOOST_PP_SLOT_2_DIGIT_7, BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_8 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_2_DIGIT_8, BOOST_PP_SLOT_2_DIGIT_7, BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_7 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_2_DIGIT_7, BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_6 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_5 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_4 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_3 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_2 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# else +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_2_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/slot/detail/slot3.hpp b/contrib/src/boost/preprocessor/slot/detail/slot3.hpp new file mode 100644 index 0000000..005cf21 --- /dev/null +++ b/contrib/src/boost/preprocessor/slot/detail/slot3.hpp @@ -0,0 +1,267 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_SLOT_3 +# +# undef BOOST_PP_SLOT_3_DIGIT_1 +# undef BOOST_PP_SLOT_3_DIGIT_2 +# undef BOOST_PP_SLOT_3_DIGIT_3 +# undef BOOST_PP_SLOT_3_DIGIT_4 +# undef BOOST_PP_SLOT_3_DIGIT_5 +# undef BOOST_PP_SLOT_3_DIGIT_6 +# undef BOOST_PP_SLOT_3_DIGIT_7 +# undef BOOST_PP_SLOT_3_DIGIT_8 +# undef BOOST_PP_SLOT_3_DIGIT_9 +# undef BOOST_PP_SLOT_3_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_10 == 0 +# define BOOST_PP_SLOT_3_DIGIT_10 0 +# elif BOOST_PP_SLOT_TEMP_10 == 1 +# define BOOST_PP_SLOT_3_DIGIT_10 1 +# elif BOOST_PP_SLOT_TEMP_10 == 2 +# define BOOST_PP_SLOT_3_DIGIT_10 2 +# elif BOOST_PP_SLOT_TEMP_10 == 3 +# define BOOST_PP_SLOT_3_DIGIT_10 3 +# elif BOOST_PP_SLOT_TEMP_10 == 4 +# define BOOST_PP_SLOT_3_DIGIT_10 4 +# elif BOOST_PP_SLOT_TEMP_10 == 5 +# define BOOST_PP_SLOT_3_DIGIT_10 5 +# elif BOOST_PP_SLOT_TEMP_10 == 6 +# define BOOST_PP_SLOT_3_DIGIT_10 6 +# elif BOOST_PP_SLOT_TEMP_10 == 7 +# define BOOST_PP_SLOT_3_DIGIT_10 7 +# elif BOOST_PP_SLOT_TEMP_10 == 8 +# define BOOST_PP_SLOT_3_DIGIT_10 8 +# elif BOOST_PP_SLOT_TEMP_10 == 9 +# define BOOST_PP_SLOT_3_DIGIT_10 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_9 == 0 +# define BOOST_PP_SLOT_3_DIGIT_9 0 +# elif BOOST_PP_SLOT_TEMP_9 == 1 +# define BOOST_PP_SLOT_3_DIGIT_9 1 +# elif BOOST_PP_SLOT_TEMP_9 == 2 +# define BOOST_PP_SLOT_3_DIGIT_9 2 +# elif BOOST_PP_SLOT_TEMP_9 == 3 +# define BOOST_PP_SLOT_3_DIGIT_9 3 +# elif BOOST_PP_SLOT_TEMP_9 == 4 +# define BOOST_PP_SLOT_3_DIGIT_9 4 +# elif BOOST_PP_SLOT_TEMP_9 == 5 +# define BOOST_PP_SLOT_3_DIGIT_9 5 +# elif BOOST_PP_SLOT_TEMP_9 == 6 +# define BOOST_PP_SLOT_3_DIGIT_9 6 +# elif BOOST_PP_SLOT_TEMP_9 == 7 +# define BOOST_PP_SLOT_3_DIGIT_9 7 +# elif BOOST_PP_SLOT_TEMP_9 == 8 +# define BOOST_PP_SLOT_3_DIGIT_9 8 +# elif BOOST_PP_SLOT_TEMP_9 == 9 +# define BOOST_PP_SLOT_3_DIGIT_9 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_8 == 0 +# define BOOST_PP_SLOT_3_DIGIT_8 0 +# elif BOOST_PP_SLOT_TEMP_8 == 1 +# define BOOST_PP_SLOT_3_DIGIT_8 1 +# elif BOOST_PP_SLOT_TEMP_8 == 2 +# define BOOST_PP_SLOT_3_DIGIT_8 2 +# elif BOOST_PP_SLOT_TEMP_8 == 3 +# define BOOST_PP_SLOT_3_DIGIT_8 3 +# elif BOOST_PP_SLOT_TEMP_8 == 4 +# define BOOST_PP_SLOT_3_DIGIT_8 4 +# elif BOOST_PP_SLOT_TEMP_8 == 5 +# define BOOST_PP_SLOT_3_DIGIT_8 5 +# elif BOOST_PP_SLOT_TEMP_8 == 6 +# define BOOST_PP_SLOT_3_DIGIT_8 6 +# elif BOOST_PP_SLOT_TEMP_8 == 7 +# define BOOST_PP_SLOT_3_DIGIT_8 7 +# elif BOOST_PP_SLOT_TEMP_8 == 8 +# define BOOST_PP_SLOT_3_DIGIT_8 8 +# elif BOOST_PP_SLOT_TEMP_8 == 9 +# define BOOST_PP_SLOT_3_DIGIT_8 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_7 == 0 +# define BOOST_PP_SLOT_3_DIGIT_7 0 +# elif BOOST_PP_SLOT_TEMP_7 == 1 +# define BOOST_PP_SLOT_3_DIGIT_7 1 +# elif BOOST_PP_SLOT_TEMP_7 == 2 +# define BOOST_PP_SLOT_3_DIGIT_7 2 +# elif BOOST_PP_SLOT_TEMP_7 == 3 +# define BOOST_PP_SLOT_3_DIGIT_7 3 +# elif BOOST_PP_SLOT_TEMP_7 == 4 +# define BOOST_PP_SLOT_3_DIGIT_7 4 +# elif BOOST_PP_SLOT_TEMP_7 == 5 +# define BOOST_PP_SLOT_3_DIGIT_7 5 +# elif BOOST_PP_SLOT_TEMP_7 == 6 +# define BOOST_PP_SLOT_3_DIGIT_7 6 +# elif BOOST_PP_SLOT_TEMP_7 == 7 +# define BOOST_PP_SLOT_3_DIGIT_7 7 +# elif BOOST_PP_SLOT_TEMP_7 == 8 +# define BOOST_PP_SLOT_3_DIGIT_7 8 +# elif BOOST_PP_SLOT_TEMP_7 == 9 +# define BOOST_PP_SLOT_3_DIGIT_7 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_6 == 0 +# define BOOST_PP_SLOT_3_DIGIT_6 0 +# elif BOOST_PP_SLOT_TEMP_6 == 1 +# define BOOST_PP_SLOT_3_DIGIT_6 1 +# elif BOOST_PP_SLOT_TEMP_6 == 2 +# define BOOST_PP_SLOT_3_DIGIT_6 2 +# elif BOOST_PP_SLOT_TEMP_6 == 3 +# define BOOST_PP_SLOT_3_DIGIT_6 3 +# elif BOOST_PP_SLOT_TEMP_6 == 4 +# define BOOST_PP_SLOT_3_DIGIT_6 4 +# elif BOOST_PP_SLOT_TEMP_6 == 5 +# define BOOST_PP_SLOT_3_DIGIT_6 5 +# elif BOOST_PP_SLOT_TEMP_6 == 6 +# define BOOST_PP_SLOT_3_DIGIT_6 6 +# elif BOOST_PP_SLOT_TEMP_6 == 7 +# define BOOST_PP_SLOT_3_DIGIT_6 7 +# elif BOOST_PP_SLOT_TEMP_6 == 8 +# define BOOST_PP_SLOT_3_DIGIT_6 8 +# elif BOOST_PP_SLOT_TEMP_6 == 9 +# define BOOST_PP_SLOT_3_DIGIT_6 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_5 == 0 +# define BOOST_PP_SLOT_3_DIGIT_5 0 +# elif BOOST_PP_SLOT_TEMP_5 == 1 +# define BOOST_PP_SLOT_3_DIGIT_5 1 +# elif BOOST_PP_SLOT_TEMP_5 == 2 +# define BOOST_PP_SLOT_3_DIGIT_5 2 +# elif BOOST_PP_SLOT_TEMP_5 == 3 +# define BOOST_PP_SLOT_3_DIGIT_5 3 +# elif BOOST_PP_SLOT_TEMP_5 == 4 +# define BOOST_PP_SLOT_3_DIGIT_5 4 +# elif BOOST_PP_SLOT_TEMP_5 == 5 +# define BOOST_PP_SLOT_3_DIGIT_5 5 +# elif BOOST_PP_SLOT_TEMP_5 == 6 +# define BOOST_PP_SLOT_3_DIGIT_5 6 +# elif BOOST_PP_SLOT_TEMP_5 == 7 +# define BOOST_PP_SLOT_3_DIGIT_5 7 +# elif BOOST_PP_SLOT_TEMP_5 == 8 +# define BOOST_PP_SLOT_3_DIGIT_5 8 +# elif BOOST_PP_SLOT_TEMP_5 == 9 +# define BOOST_PP_SLOT_3_DIGIT_5 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_4 == 0 +# define BOOST_PP_SLOT_3_DIGIT_4 0 +# elif BOOST_PP_SLOT_TEMP_4 == 1 +# define BOOST_PP_SLOT_3_DIGIT_4 1 +# elif BOOST_PP_SLOT_TEMP_4 == 2 +# define BOOST_PP_SLOT_3_DIGIT_4 2 +# elif BOOST_PP_SLOT_TEMP_4 == 3 +# define BOOST_PP_SLOT_3_DIGIT_4 3 +# elif BOOST_PP_SLOT_TEMP_4 == 4 +# define BOOST_PP_SLOT_3_DIGIT_4 4 +# elif BOOST_PP_SLOT_TEMP_4 == 5 +# define BOOST_PP_SLOT_3_DIGIT_4 5 +# elif BOOST_PP_SLOT_TEMP_4 == 6 +# define BOOST_PP_SLOT_3_DIGIT_4 6 +# elif BOOST_PP_SLOT_TEMP_4 == 7 +# define BOOST_PP_SLOT_3_DIGIT_4 7 +# elif BOOST_PP_SLOT_TEMP_4 == 8 +# define BOOST_PP_SLOT_3_DIGIT_4 8 +# elif BOOST_PP_SLOT_TEMP_4 == 9 +# define BOOST_PP_SLOT_3_DIGIT_4 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_SLOT_3_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_SLOT_3_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_SLOT_3_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_SLOT_3_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_SLOT_3_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_SLOT_3_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_SLOT_3_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_SLOT_3_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_SLOT_3_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_SLOT_3_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_SLOT_3_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_SLOT_3_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_SLOT_3_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_SLOT_3_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_SLOT_3_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_SLOT_3_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_SLOT_3_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_SLOT_3_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_SLOT_3_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_SLOT_3_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_SLOT_3_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_SLOT_3_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_SLOT_3_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_SLOT_3_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_SLOT_3_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_SLOT_3_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_SLOT_3_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_SLOT_3_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_SLOT_3_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_SLOT_3_DIGIT_1 9 +# endif +# +# if BOOST_PP_SLOT_3_DIGIT_10 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_3_DIGIT_10, BOOST_PP_SLOT_3_DIGIT_9, BOOST_PP_SLOT_3_DIGIT_8, BOOST_PP_SLOT_3_DIGIT_7, BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_9 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_3_DIGIT_9, BOOST_PP_SLOT_3_DIGIT_8, BOOST_PP_SLOT_3_DIGIT_7, BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_8 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_3_DIGIT_8, BOOST_PP_SLOT_3_DIGIT_7, BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_7 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_3_DIGIT_7, BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_6 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_5 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_4 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_3 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_2 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# else +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_3_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/slot/detail/slot4.hpp b/contrib/src/boost/preprocessor/slot/detail/slot4.hpp new file mode 100644 index 0000000..9aa4d8a --- /dev/null +++ b/contrib/src/boost/preprocessor/slot/detail/slot4.hpp @@ -0,0 +1,267 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_SLOT_4 +# +# undef BOOST_PP_SLOT_4_DIGIT_1 +# undef BOOST_PP_SLOT_4_DIGIT_2 +# undef BOOST_PP_SLOT_4_DIGIT_3 +# undef BOOST_PP_SLOT_4_DIGIT_4 +# undef BOOST_PP_SLOT_4_DIGIT_5 +# undef BOOST_PP_SLOT_4_DIGIT_6 +# undef BOOST_PP_SLOT_4_DIGIT_7 +# undef BOOST_PP_SLOT_4_DIGIT_8 +# undef BOOST_PP_SLOT_4_DIGIT_9 +# undef BOOST_PP_SLOT_4_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_10 == 0 +# define BOOST_PP_SLOT_4_DIGIT_10 0 +# elif BOOST_PP_SLOT_TEMP_10 == 1 +# define BOOST_PP_SLOT_4_DIGIT_10 1 +# elif BOOST_PP_SLOT_TEMP_10 == 2 +# define BOOST_PP_SLOT_4_DIGIT_10 2 +# elif BOOST_PP_SLOT_TEMP_10 == 3 +# define BOOST_PP_SLOT_4_DIGIT_10 3 +# elif BOOST_PP_SLOT_TEMP_10 == 4 +# define BOOST_PP_SLOT_4_DIGIT_10 4 +# elif BOOST_PP_SLOT_TEMP_10 == 5 +# define BOOST_PP_SLOT_4_DIGIT_10 5 +# elif BOOST_PP_SLOT_TEMP_10 == 6 +# define BOOST_PP_SLOT_4_DIGIT_10 6 +# elif BOOST_PP_SLOT_TEMP_10 == 7 +# define BOOST_PP_SLOT_4_DIGIT_10 7 +# elif BOOST_PP_SLOT_TEMP_10 == 8 +# define BOOST_PP_SLOT_4_DIGIT_10 8 +# elif BOOST_PP_SLOT_TEMP_10 == 9 +# define BOOST_PP_SLOT_4_DIGIT_10 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_9 == 0 +# define BOOST_PP_SLOT_4_DIGIT_9 0 +# elif BOOST_PP_SLOT_TEMP_9 == 1 +# define BOOST_PP_SLOT_4_DIGIT_9 1 +# elif BOOST_PP_SLOT_TEMP_9 == 2 +# define BOOST_PP_SLOT_4_DIGIT_9 2 +# elif BOOST_PP_SLOT_TEMP_9 == 3 +# define BOOST_PP_SLOT_4_DIGIT_9 3 +# elif BOOST_PP_SLOT_TEMP_9 == 4 +# define BOOST_PP_SLOT_4_DIGIT_9 4 +# elif BOOST_PP_SLOT_TEMP_9 == 5 +# define BOOST_PP_SLOT_4_DIGIT_9 5 +# elif BOOST_PP_SLOT_TEMP_9 == 6 +# define BOOST_PP_SLOT_4_DIGIT_9 6 +# elif BOOST_PP_SLOT_TEMP_9 == 7 +# define BOOST_PP_SLOT_4_DIGIT_9 7 +# elif BOOST_PP_SLOT_TEMP_9 == 8 +# define BOOST_PP_SLOT_4_DIGIT_9 8 +# elif BOOST_PP_SLOT_TEMP_9 == 9 +# define BOOST_PP_SLOT_4_DIGIT_9 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_8 == 0 +# define BOOST_PP_SLOT_4_DIGIT_8 0 +# elif BOOST_PP_SLOT_TEMP_8 == 1 +# define BOOST_PP_SLOT_4_DIGIT_8 1 +# elif BOOST_PP_SLOT_TEMP_8 == 2 +# define BOOST_PP_SLOT_4_DIGIT_8 2 +# elif BOOST_PP_SLOT_TEMP_8 == 3 +# define BOOST_PP_SLOT_4_DIGIT_8 3 +# elif BOOST_PP_SLOT_TEMP_8 == 4 +# define BOOST_PP_SLOT_4_DIGIT_8 4 +# elif BOOST_PP_SLOT_TEMP_8 == 5 +# define BOOST_PP_SLOT_4_DIGIT_8 5 +# elif BOOST_PP_SLOT_TEMP_8 == 6 +# define BOOST_PP_SLOT_4_DIGIT_8 6 +# elif BOOST_PP_SLOT_TEMP_8 == 7 +# define BOOST_PP_SLOT_4_DIGIT_8 7 +# elif BOOST_PP_SLOT_TEMP_8 == 8 +# define BOOST_PP_SLOT_4_DIGIT_8 8 +# elif BOOST_PP_SLOT_TEMP_8 == 9 +# define BOOST_PP_SLOT_4_DIGIT_8 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_7 == 0 +# define BOOST_PP_SLOT_4_DIGIT_7 0 +# elif BOOST_PP_SLOT_TEMP_7 == 1 +# define BOOST_PP_SLOT_4_DIGIT_7 1 +# elif BOOST_PP_SLOT_TEMP_7 == 2 +# define BOOST_PP_SLOT_4_DIGIT_7 2 +# elif BOOST_PP_SLOT_TEMP_7 == 3 +# define BOOST_PP_SLOT_4_DIGIT_7 3 +# elif BOOST_PP_SLOT_TEMP_7 == 4 +# define BOOST_PP_SLOT_4_DIGIT_7 4 +# elif BOOST_PP_SLOT_TEMP_7 == 5 +# define BOOST_PP_SLOT_4_DIGIT_7 5 +# elif BOOST_PP_SLOT_TEMP_7 == 6 +# define BOOST_PP_SLOT_4_DIGIT_7 6 +# elif BOOST_PP_SLOT_TEMP_7 == 7 +# define BOOST_PP_SLOT_4_DIGIT_7 7 +# elif BOOST_PP_SLOT_TEMP_7 == 8 +# define BOOST_PP_SLOT_4_DIGIT_7 8 +# elif BOOST_PP_SLOT_TEMP_7 == 9 +# define BOOST_PP_SLOT_4_DIGIT_7 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_6 == 0 +# define BOOST_PP_SLOT_4_DIGIT_6 0 +# elif BOOST_PP_SLOT_TEMP_6 == 1 +# define BOOST_PP_SLOT_4_DIGIT_6 1 +# elif BOOST_PP_SLOT_TEMP_6 == 2 +# define BOOST_PP_SLOT_4_DIGIT_6 2 +# elif BOOST_PP_SLOT_TEMP_6 == 3 +# define BOOST_PP_SLOT_4_DIGIT_6 3 +# elif BOOST_PP_SLOT_TEMP_6 == 4 +# define BOOST_PP_SLOT_4_DIGIT_6 4 +# elif BOOST_PP_SLOT_TEMP_6 == 5 +# define BOOST_PP_SLOT_4_DIGIT_6 5 +# elif BOOST_PP_SLOT_TEMP_6 == 6 +# define BOOST_PP_SLOT_4_DIGIT_6 6 +# elif BOOST_PP_SLOT_TEMP_6 == 7 +# define BOOST_PP_SLOT_4_DIGIT_6 7 +# elif BOOST_PP_SLOT_TEMP_6 == 8 +# define BOOST_PP_SLOT_4_DIGIT_6 8 +# elif BOOST_PP_SLOT_TEMP_6 == 9 +# define BOOST_PP_SLOT_4_DIGIT_6 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_5 == 0 +# define BOOST_PP_SLOT_4_DIGIT_5 0 +# elif BOOST_PP_SLOT_TEMP_5 == 1 +# define BOOST_PP_SLOT_4_DIGIT_5 1 +# elif BOOST_PP_SLOT_TEMP_5 == 2 +# define BOOST_PP_SLOT_4_DIGIT_5 2 +# elif BOOST_PP_SLOT_TEMP_5 == 3 +# define BOOST_PP_SLOT_4_DIGIT_5 3 +# elif BOOST_PP_SLOT_TEMP_5 == 4 +# define BOOST_PP_SLOT_4_DIGIT_5 4 +# elif BOOST_PP_SLOT_TEMP_5 == 5 +# define BOOST_PP_SLOT_4_DIGIT_5 5 +# elif BOOST_PP_SLOT_TEMP_5 == 6 +# define BOOST_PP_SLOT_4_DIGIT_5 6 +# elif BOOST_PP_SLOT_TEMP_5 == 7 +# define BOOST_PP_SLOT_4_DIGIT_5 7 +# elif BOOST_PP_SLOT_TEMP_5 == 8 +# define BOOST_PP_SLOT_4_DIGIT_5 8 +# elif BOOST_PP_SLOT_TEMP_5 == 9 +# define BOOST_PP_SLOT_4_DIGIT_5 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_4 == 0 +# define BOOST_PP_SLOT_4_DIGIT_4 0 +# elif BOOST_PP_SLOT_TEMP_4 == 1 +# define BOOST_PP_SLOT_4_DIGIT_4 1 +# elif BOOST_PP_SLOT_TEMP_4 == 2 +# define BOOST_PP_SLOT_4_DIGIT_4 2 +# elif BOOST_PP_SLOT_TEMP_4 == 3 +# define BOOST_PP_SLOT_4_DIGIT_4 3 +# elif BOOST_PP_SLOT_TEMP_4 == 4 +# define BOOST_PP_SLOT_4_DIGIT_4 4 +# elif BOOST_PP_SLOT_TEMP_4 == 5 +# define BOOST_PP_SLOT_4_DIGIT_4 5 +# elif BOOST_PP_SLOT_TEMP_4 == 6 +# define BOOST_PP_SLOT_4_DIGIT_4 6 +# elif BOOST_PP_SLOT_TEMP_4 == 7 +# define BOOST_PP_SLOT_4_DIGIT_4 7 +# elif BOOST_PP_SLOT_TEMP_4 == 8 +# define BOOST_PP_SLOT_4_DIGIT_4 8 +# elif BOOST_PP_SLOT_TEMP_4 == 9 +# define BOOST_PP_SLOT_4_DIGIT_4 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_SLOT_4_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_SLOT_4_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_SLOT_4_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_SLOT_4_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_SLOT_4_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_SLOT_4_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_SLOT_4_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_SLOT_4_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_SLOT_4_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_SLOT_4_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_SLOT_4_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_SLOT_4_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_SLOT_4_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_SLOT_4_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_SLOT_4_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_SLOT_4_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_SLOT_4_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_SLOT_4_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_SLOT_4_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_SLOT_4_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_SLOT_4_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_SLOT_4_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_SLOT_4_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_SLOT_4_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_SLOT_4_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_SLOT_4_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_SLOT_4_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_SLOT_4_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_SLOT_4_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_SLOT_4_DIGIT_1 9 +# endif +# +# if BOOST_PP_SLOT_4_DIGIT_10 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_4_DIGIT_10, BOOST_PP_SLOT_4_DIGIT_9, BOOST_PP_SLOT_4_DIGIT_8, BOOST_PP_SLOT_4_DIGIT_7, BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_9 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_4_DIGIT_9, BOOST_PP_SLOT_4_DIGIT_8, BOOST_PP_SLOT_4_DIGIT_7, BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_8 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_4_DIGIT_8, BOOST_PP_SLOT_4_DIGIT_7, BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_7 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_4_DIGIT_7, BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_6 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_5 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_4 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_3 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_2 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# else +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_4_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/slot/detail/slot5.hpp b/contrib/src/boost/preprocessor/slot/detail/slot5.hpp new file mode 100644 index 0000000..d17535d --- /dev/null +++ b/contrib/src/boost/preprocessor/slot/detail/slot5.hpp @@ -0,0 +1,267 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_SLOT_5 +# +# undef BOOST_PP_SLOT_5_DIGIT_1 +# undef BOOST_PP_SLOT_5_DIGIT_2 +# undef BOOST_PP_SLOT_5_DIGIT_3 +# undef BOOST_PP_SLOT_5_DIGIT_4 +# undef BOOST_PP_SLOT_5_DIGIT_5 +# undef BOOST_PP_SLOT_5_DIGIT_6 +# undef BOOST_PP_SLOT_5_DIGIT_7 +# undef BOOST_PP_SLOT_5_DIGIT_8 +# undef BOOST_PP_SLOT_5_DIGIT_9 +# undef BOOST_PP_SLOT_5_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_10 == 0 +# define BOOST_PP_SLOT_5_DIGIT_10 0 +# elif BOOST_PP_SLOT_TEMP_10 == 1 +# define BOOST_PP_SLOT_5_DIGIT_10 1 +# elif BOOST_PP_SLOT_TEMP_10 == 2 +# define BOOST_PP_SLOT_5_DIGIT_10 2 +# elif BOOST_PP_SLOT_TEMP_10 == 3 +# define BOOST_PP_SLOT_5_DIGIT_10 3 +# elif BOOST_PP_SLOT_TEMP_10 == 4 +# define BOOST_PP_SLOT_5_DIGIT_10 4 +# elif BOOST_PP_SLOT_TEMP_10 == 5 +# define BOOST_PP_SLOT_5_DIGIT_10 5 +# elif BOOST_PP_SLOT_TEMP_10 == 6 +# define BOOST_PP_SLOT_5_DIGIT_10 6 +# elif BOOST_PP_SLOT_TEMP_10 == 7 +# define BOOST_PP_SLOT_5_DIGIT_10 7 +# elif BOOST_PP_SLOT_TEMP_10 == 8 +# define BOOST_PP_SLOT_5_DIGIT_10 8 +# elif BOOST_PP_SLOT_TEMP_10 == 9 +# define BOOST_PP_SLOT_5_DIGIT_10 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_9 == 0 +# define BOOST_PP_SLOT_5_DIGIT_9 0 +# elif BOOST_PP_SLOT_TEMP_9 == 1 +# define BOOST_PP_SLOT_5_DIGIT_9 1 +# elif BOOST_PP_SLOT_TEMP_9 == 2 +# define BOOST_PP_SLOT_5_DIGIT_9 2 +# elif BOOST_PP_SLOT_TEMP_9 == 3 +# define BOOST_PP_SLOT_5_DIGIT_9 3 +# elif BOOST_PP_SLOT_TEMP_9 == 4 +# define BOOST_PP_SLOT_5_DIGIT_9 4 +# elif BOOST_PP_SLOT_TEMP_9 == 5 +# define BOOST_PP_SLOT_5_DIGIT_9 5 +# elif BOOST_PP_SLOT_TEMP_9 == 6 +# define BOOST_PP_SLOT_5_DIGIT_9 6 +# elif BOOST_PP_SLOT_TEMP_9 == 7 +# define BOOST_PP_SLOT_5_DIGIT_9 7 +# elif BOOST_PP_SLOT_TEMP_9 == 8 +# define BOOST_PP_SLOT_5_DIGIT_9 8 +# elif BOOST_PP_SLOT_TEMP_9 == 9 +# define BOOST_PP_SLOT_5_DIGIT_9 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_8 == 0 +# define BOOST_PP_SLOT_5_DIGIT_8 0 +# elif BOOST_PP_SLOT_TEMP_8 == 1 +# define BOOST_PP_SLOT_5_DIGIT_8 1 +# elif BOOST_PP_SLOT_TEMP_8 == 2 +# define BOOST_PP_SLOT_5_DIGIT_8 2 +# elif BOOST_PP_SLOT_TEMP_8 == 3 +# define BOOST_PP_SLOT_5_DIGIT_8 3 +# elif BOOST_PP_SLOT_TEMP_8 == 4 +# define BOOST_PP_SLOT_5_DIGIT_8 4 +# elif BOOST_PP_SLOT_TEMP_8 == 5 +# define BOOST_PP_SLOT_5_DIGIT_8 5 +# elif BOOST_PP_SLOT_TEMP_8 == 6 +# define BOOST_PP_SLOT_5_DIGIT_8 6 +# elif BOOST_PP_SLOT_TEMP_8 == 7 +# define BOOST_PP_SLOT_5_DIGIT_8 7 +# elif BOOST_PP_SLOT_TEMP_8 == 8 +# define BOOST_PP_SLOT_5_DIGIT_8 8 +# elif BOOST_PP_SLOT_TEMP_8 == 9 +# define BOOST_PP_SLOT_5_DIGIT_8 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_7 == 0 +# define BOOST_PP_SLOT_5_DIGIT_7 0 +# elif BOOST_PP_SLOT_TEMP_7 == 1 +# define BOOST_PP_SLOT_5_DIGIT_7 1 +# elif BOOST_PP_SLOT_TEMP_7 == 2 +# define BOOST_PP_SLOT_5_DIGIT_7 2 +# elif BOOST_PP_SLOT_TEMP_7 == 3 +# define BOOST_PP_SLOT_5_DIGIT_7 3 +# elif BOOST_PP_SLOT_TEMP_7 == 4 +# define BOOST_PP_SLOT_5_DIGIT_7 4 +# elif BOOST_PP_SLOT_TEMP_7 == 5 +# define BOOST_PP_SLOT_5_DIGIT_7 5 +# elif BOOST_PP_SLOT_TEMP_7 == 6 +# define BOOST_PP_SLOT_5_DIGIT_7 6 +# elif BOOST_PP_SLOT_TEMP_7 == 7 +# define BOOST_PP_SLOT_5_DIGIT_7 7 +# elif BOOST_PP_SLOT_TEMP_7 == 8 +# define BOOST_PP_SLOT_5_DIGIT_7 8 +# elif BOOST_PP_SLOT_TEMP_7 == 9 +# define BOOST_PP_SLOT_5_DIGIT_7 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_6 == 0 +# define BOOST_PP_SLOT_5_DIGIT_6 0 +# elif BOOST_PP_SLOT_TEMP_6 == 1 +# define BOOST_PP_SLOT_5_DIGIT_6 1 +# elif BOOST_PP_SLOT_TEMP_6 == 2 +# define BOOST_PP_SLOT_5_DIGIT_6 2 +# elif BOOST_PP_SLOT_TEMP_6 == 3 +# define BOOST_PP_SLOT_5_DIGIT_6 3 +# elif BOOST_PP_SLOT_TEMP_6 == 4 +# define BOOST_PP_SLOT_5_DIGIT_6 4 +# elif BOOST_PP_SLOT_TEMP_6 == 5 +# define BOOST_PP_SLOT_5_DIGIT_6 5 +# elif BOOST_PP_SLOT_TEMP_6 == 6 +# define BOOST_PP_SLOT_5_DIGIT_6 6 +# elif BOOST_PP_SLOT_TEMP_6 == 7 +# define BOOST_PP_SLOT_5_DIGIT_6 7 +# elif BOOST_PP_SLOT_TEMP_6 == 8 +# define BOOST_PP_SLOT_5_DIGIT_6 8 +# elif BOOST_PP_SLOT_TEMP_6 == 9 +# define BOOST_PP_SLOT_5_DIGIT_6 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_5 == 0 +# define BOOST_PP_SLOT_5_DIGIT_5 0 +# elif BOOST_PP_SLOT_TEMP_5 == 1 +# define BOOST_PP_SLOT_5_DIGIT_5 1 +# elif BOOST_PP_SLOT_TEMP_5 == 2 +# define BOOST_PP_SLOT_5_DIGIT_5 2 +# elif BOOST_PP_SLOT_TEMP_5 == 3 +# define BOOST_PP_SLOT_5_DIGIT_5 3 +# elif BOOST_PP_SLOT_TEMP_5 == 4 +# define BOOST_PP_SLOT_5_DIGIT_5 4 +# elif BOOST_PP_SLOT_TEMP_5 == 5 +# define BOOST_PP_SLOT_5_DIGIT_5 5 +# elif BOOST_PP_SLOT_TEMP_5 == 6 +# define BOOST_PP_SLOT_5_DIGIT_5 6 +# elif BOOST_PP_SLOT_TEMP_5 == 7 +# define BOOST_PP_SLOT_5_DIGIT_5 7 +# elif BOOST_PP_SLOT_TEMP_5 == 8 +# define BOOST_PP_SLOT_5_DIGIT_5 8 +# elif BOOST_PP_SLOT_TEMP_5 == 9 +# define BOOST_PP_SLOT_5_DIGIT_5 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_4 == 0 +# define BOOST_PP_SLOT_5_DIGIT_4 0 +# elif BOOST_PP_SLOT_TEMP_4 == 1 +# define BOOST_PP_SLOT_5_DIGIT_4 1 +# elif BOOST_PP_SLOT_TEMP_4 == 2 +# define BOOST_PP_SLOT_5_DIGIT_4 2 +# elif BOOST_PP_SLOT_TEMP_4 == 3 +# define BOOST_PP_SLOT_5_DIGIT_4 3 +# elif BOOST_PP_SLOT_TEMP_4 == 4 +# define BOOST_PP_SLOT_5_DIGIT_4 4 +# elif BOOST_PP_SLOT_TEMP_4 == 5 +# define BOOST_PP_SLOT_5_DIGIT_4 5 +# elif BOOST_PP_SLOT_TEMP_4 == 6 +# define BOOST_PP_SLOT_5_DIGIT_4 6 +# elif BOOST_PP_SLOT_TEMP_4 == 7 +# define BOOST_PP_SLOT_5_DIGIT_4 7 +# elif BOOST_PP_SLOT_TEMP_4 == 8 +# define BOOST_PP_SLOT_5_DIGIT_4 8 +# elif BOOST_PP_SLOT_TEMP_4 == 9 +# define BOOST_PP_SLOT_5_DIGIT_4 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_SLOT_5_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_SLOT_5_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_SLOT_5_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_SLOT_5_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_SLOT_5_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_SLOT_5_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_SLOT_5_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_SLOT_5_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_SLOT_5_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_SLOT_5_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_SLOT_5_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_SLOT_5_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_SLOT_5_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_SLOT_5_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_SLOT_5_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_SLOT_5_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_SLOT_5_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_SLOT_5_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_SLOT_5_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_SLOT_5_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_SLOT_5_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_SLOT_5_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_SLOT_5_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_SLOT_5_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_SLOT_5_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_SLOT_5_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_SLOT_5_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_SLOT_5_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_SLOT_5_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_SLOT_5_DIGIT_1 9 +# endif +# +# if BOOST_PP_SLOT_5_DIGIT_10 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_5_DIGIT_10, BOOST_PP_SLOT_5_DIGIT_9, BOOST_PP_SLOT_5_DIGIT_8, BOOST_PP_SLOT_5_DIGIT_7, BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_9 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_5_DIGIT_9, BOOST_PP_SLOT_5_DIGIT_8, BOOST_PP_SLOT_5_DIGIT_7, BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_8 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_5_DIGIT_8, BOOST_PP_SLOT_5_DIGIT_7, BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_7 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_5_DIGIT_7, BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_6 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_5 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_4 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_3 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_2 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# else +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_5_DIGIT_1 +# endif diff --git a/contrib/src/boost/preprocessor/slot/slot.hpp b/contrib/src/boost/preprocessor/slot/slot.hpp new file mode 100644 index 0000000..147b097 --- /dev/null +++ b/contrib/src/boost/preprocessor/slot/slot.hpp @@ -0,0 +1,32 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SLOT_SLOT_HPP +# define BOOST_PREPROCESSOR_SLOT_SLOT_HPP +# +# include +# include +# +# /* BOOST_PP_ASSIGN_SLOT */ +# +# define BOOST_PP_ASSIGN_SLOT(i) BOOST_PP_CAT(BOOST_PP_ASSIGN_SLOT_, i) +# +# define BOOST_PP_ASSIGN_SLOT_1 +# define BOOST_PP_ASSIGN_SLOT_2 +# define BOOST_PP_ASSIGN_SLOT_3 +# define BOOST_PP_ASSIGN_SLOT_4 +# define BOOST_PP_ASSIGN_SLOT_5 +# +# /* BOOST_PP_SLOT */ +# +# define BOOST_PP_SLOT(i) BOOST_PP_CAT(BOOST_PP_SLOT_, i)() +# +# endif diff --git a/contrib/src/boost/preprocessor/stringize.hpp b/contrib/src/boost/preprocessor/stringize.hpp new file mode 100644 index 0000000..64dd5fd --- /dev/null +++ b/contrib/src/boost/preprocessor/stringize.hpp @@ -0,0 +1,33 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_STRINGIZE_HPP +# define BOOST_PREPROCESSOR_STRINGIZE_HPP +# +# include +# +# /* BOOST_PP_STRINGIZE */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_A((text)) +# define BOOST_PP_STRINGIZE_A(arg) BOOST_PP_STRINGIZE_I arg +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_OO((text)) +# define BOOST_PP_STRINGIZE_OO(par) BOOST_PP_STRINGIZE_I ## par +# else +# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text) +# endif +# +# define BOOST_PP_STRINGIZE_I(text) #text +# +# endif diff --git a/contrib/src/boost/preprocessor/tuple/detail/is_single_return.hpp b/contrib/src/boost/preprocessor/tuple/detail/is_single_return.hpp new file mode 100644 index 0000000..02a4fb2 --- /dev/null +++ b/contrib/src/boost/preprocessor/tuple/detail/is_single_return.hpp @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP +# define BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP +# +# include +# +# /* BOOST_PP_TUPLE_IS_SINGLE_RETURN */ +# +# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC +# include +# include +# include +# define BOOST_PP_TUPLE_IS_SINGLE_RETURN(sr,nsr,tuple) \ + BOOST_PP_IIF(BOOST_PP_IS_1(BOOST_PP_TUPLE_SIZE(tuple)),sr,nsr) \ + /**/ +# endif /* BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC */ +# +# endif /* BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP */ diff --git a/contrib/src/boost/preprocessor/tuple/eat.hpp b/contrib/src/boost/preprocessor/tuple/eat.hpp new file mode 100644 index 0000000..7e8a100 --- /dev/null +++ b/contrib/src/boost/preprocessor/tuple/eat.hpp @@ -0,0 +1,115 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002-2011) */ +# /* Revised by Edward Diener (2011,2015) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_EAT_HPP +# define BOOST_PREPROCESSOR_TUPLE_EAT_HPP +# +# include +# +# /* BOOST_PP_EAT */ +# +# if BOOST_PP_VARIADICS +# define BOOST_PP_EAT(...) +# else +# define BOOST_PP_EAT(x) +# endif +# +# /* BOOST_PP_TUPLE_EAT */ +# +# if BOOST_PP_VARIADICS +# define BOOST_PP_TUPLE_EAT(size) BOOST_PP_EAT +# else +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_I(size) +# else +# define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_OO((size)) +# define BOOST_PP_TUPLE_EAT_OO(par) BOOST_PP_TUPLE_EAT_I ## par +# endif +# define BOOST_PP_TUPLE_EAT_I(size) BOOST_PP_TUPLE_EAT_ ## size +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_EAT_N(size) BOOST_PP_TUPLE_EAT_N_I(size) +# else +# define BOOST_PP_TUPLE_EAT_N(size) BOOST_PP_TUPLE_EAT_N_OO((size)) +# define BOOST_PP_TUPLE_EAT_N_OO(par) BOOST_PP_TUPLE_EAT_N_I ## par +# endif +# define BOOST_PP_TUPLE_EAT_N_I(size) BOOST_PP_TUPLE_EAT_ ## size +# +# define BOOST_PP_TUPLE_EAT_1(e0) +# define BOOST_PP_TUPLE_EAT_2(e0, e1) +# define BOOST_PP_TUPLE_EAT_3(e0, e1, e2) +# define BOOST_PP_TUPLE_EAT_4(e0, e1, e2, e3) +# define BOOST_PP_TUPLE_EAT_5(e0, e1, e2, e3, e4) +# define BOOST_PP_TUPLE_EAT_6(e0, e1, e2, e3, e4, e5) +# define BOOST_PP_TUPLE_EAT_7(e0, e1, e2, e3, e4, e5, e6) +# define BOOST_PP_TUPLE_EAT_8(e0, e1, e2, e3, e4, e5, e6, e7) +# define BOOST_PP_TUPLE_EAT_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) +# define BOOST_PP_TUPLE_EAT_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) +# define BOOST_PP_TUPLE_EAT_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) +# define BOOST_PP_TUPLE_EAT_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) +# define BOOST_PP_TUPLE_EAT_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) +# define BOOST_PP_TUPLE_EAT_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) +# define BOOST_PP_TUPLE_EAT_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) +# define BOOST_PP_TUPLE_EAT_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) +# define BOOST_PP_TUPLE_EAT_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) +# define BOOST_PP_TUPLE_EAT_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) +# define BOOST_PP_TUPLE_EAT_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) +# define BOOST_PP_TUPLE_EAT_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) +# define BOOST_PP_TUPLE_EAT_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) +# define BOOST_PP_TUPLE_EAT_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) +# define BOOST_PP_TUPLE_EAT_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) +# define BOOST_PP_TUPLE_EAT_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) +# define BOOST_PP_TUPLE_EAT_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) +# define BOOST_PP_TUPLE_EAT_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) +# define BOOST_PP_TUPLE_EAT_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) +# define BOOST_PP_TUPLE_EAT_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) +# define BOOST_PP_TUPLE_EAT_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) +# define BOOST_PP_TUPLE_EAT_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) +# define BOOST_PP_TUPLE_EAT_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) +# define BOOST_PP_TUPLE_EAT_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) +# define BOOST_PP_TUPLE_EAT_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) +# define BOOST_PP_TUPLE_EAT_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) +# define BOOST_PP_TUPLE_EAT_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) +# define BOOST_PP_TUPLE_EAT_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) +# define BOOST_PP_TUPLE_EAT_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) +# define BOOST_PP_TUPLE_EAT_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) +# define BOOST_PP_TUPLE_EAT_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) +# define BOOST_PP_TUPLE_EAT_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) +# define BOOST_PP_TUPLE_EAT_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) +# define BOOST_PP_TUPLE_EAT_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) +# define BOOST_PP_TUPLE_EAT_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) +# define BOOST_PP_TUPLE_EAT_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) +# define BOOST_PP_TUPLE_EAT_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) +# define BOOST_PP_TUPLE_EAT_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) +# define BOOST_PP_TUPLE_EAT_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) +# define BOOST_PP_TUPLE_EAT_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) +# define BOOST_PP_TUPLE_EAT_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) +# define BOOST_PP_TUPLE_EAT_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) +# define BOOST_PP_TUPLE_EAT_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) +# define BOOST_PP_TUPLE_EAT_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) +# define BOOST_PP_TUPLE_EAT_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) +# define BOOST_PP_TUPLE_EAT_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) +# define BOOST_PP_TUPLE_EAT_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) +# define BOOST_PP_TUPLE_EAT_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) +# define BOOST_PP_TUPLE_EAT_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) +# define BOOST_PP_TUPLE_EAT_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) +# define BOOST_PP_TUPLE_EAT_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) +# define BOOST_PP_TUPLE_EAT_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) +# define BOOST_PP_TUPLE_EAT_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) +# define BOOST_PP_TUPLE_EAT_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) +# define BOOST_PP_TUPLE_EAT_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) +# define BOOST_PP_TUPLE_EAT_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) +# +# endif diff --git a/contrib/src/boost/preprocessor/tuple/elem.hpp b/contrib/src/boost/preprocessor/tuple/elem.hpp new file mode 100644 index 0000000..88044d3 --- /dev/null +++ b/contrib/src/boost/preprocessor/tuple/elem.hpp @@ -0,0 +1,201 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002-2011) */ +# /* Revised by Edward Diener (2011,2014) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_ELEM_HPP +# define BOOST_PREPROCESSOR_TUPLE_ELEM_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__)) +# define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) +# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,) +/* + Use BOOST_PP_REM_CAT if it is a single element tuple ( which might be empty ) + else use BOOST_PP_REM. This fixes a VC++ problem with an empty tuple and BOOST_PP_TUPLE_ELEM + functionality. See tuple_elem_bug_test.cxx. +*/ +# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) \ + BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple)) \ + /**/ +# else +# define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__)(__VA_ARGS__) +# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_REM tuple) +# endif +# define BOOST_PP_TUPLE_ELEM_O_3(size, n, tuple) BOOST_PP_TUPLE_ELEM_O_2(n, tuple) +# else +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_, n), BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size), tuple)) +# define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) +# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,) +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I_OO((size, n, tuple)) +# define BOOST_PP_TUPLE_ELEM_I_OO(par) BOOST_PP_TUPLE_ELEM_I ## par +# define BOOST_PP_TUPLE_ELEM_I(size, n, tuple) BOOST_PP_TUPLE_ELEM_II((n, BOOST_PP_TUPLE_ELEM_E_ ## size ## tuple)) +# define BOOST_PP_TUPLE_ELEM_II(par) BOOST_PP_TUPLE_ELEM_III_OO(par) +# define BOOST_PP_TUPLE_ELEM_III_OO(par) BOOST_PP_TUPLE_ELEM_III ## par +# define BOOST_PP_TUPLE_ELEM_III(n, etuple) BOOST_PP_TUPLE_ELEM_ ## n ## etuple +# else +# define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_, n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size) tuple) +# define BOOST_PP_TUPLE_ELEM_I(x) x +# endif +# define BOOST_PP_TUPLE_ELEM_E_1(e0) (e0, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_2(e0, e1) (e0, e1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_3(e0, e1, e2) (e0, e1, e2, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_4(e0, e1, e2, e3) (e0, e1, e2, e3, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_5(e0, e1, e2, e3, e4) (e0, e1, e2, e3, e4, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_6(e0, e1, e2, e3, e4, e5) (e0, e1, e2, e3, e4, e5, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_7(e0, e1, e2, e3, e4, e5, e6) (e0, e1, e2, e3, e4, e5, e6, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_8(e0, e1, e2, e3, e4, e5, e6, e7) (e0, e1, e2, e3, e4, e5, e6, e7, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) (e0, e1, e2, e3, e4, e5, e6, e7, e8, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, ?) +# define BOOST_PP_TUPLE_ELEM_E_64 +# define BOOST_PP_TUPLE_ELEM_0(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e0 +# define BOOST_PP_TUPLE_ELEM_1(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e1 +# define BOOST_PP_TUPLE_ELEM_2(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e2 +# define BOOST_PP_TUPLE_ELEM_3(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e3 +# define BOOST_PP_TUPLE_ELEM_4(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e4 +# define BOOST_PP_TUPLE_ELEM_5(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e5 +# define BOOST_PP_TUPLE_ELEM_6(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e6 +# define BOOST_PP_TUPLE_ELEM_7(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e7 +# define BOOST_PP_TUPLE_ELEM_8(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e8 +# define BOOST_PP_TUPLE_ELEM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e9 +# define BOOST_PP_TUPLE_ELEM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e10 +# define BOOST_PP_TUPLE_ELEM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e11 +# define BOOST_PP_TUPLE_ELEM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e12 +# define BOOST_PP_TUPLE_ELEM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e13 +# define BOOST_PP_TUPLE_ELEM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e14 +# define BOOST_PP_TUPLE_ELEM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e15 +# define BOOST_PP_TUPLE_ELEM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e16 +# define BOOST_PP_TUPLE_ELEM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e17 +# define BOOST_PP_TUPLE_ELEM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e18 +# define BOOST_PP_TUPLE_ELEM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e19 +# define BOOST_PP_TUPLE_ELEM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e20 +# define BOOST_PP_TUPLE_ELEM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e21 +# define BOOST_PP_TUPLE_ELEM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e22 +# define BOOST_PP_TUPLE_ELEM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e23 +# define BOOST_PP_TUPLE_ELEM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e24 +# define BOOST_PP_TUPLE_ELEM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e25 +# define BOOST_PP_TUPLE_ELEM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e26 +# define BOOST_PP_TUPLE_ELEM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e27 +# define BOOST_PP_TUPLE_ELEM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e28 +# define BOOST_PP_TUPLE_ELEM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e29 +# define BOOST_PP_TUPLE_ELEM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e30 +# define BOOST_PP_TUPLE_ELEM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e31 +# define BOOST_PP_TUPLE_ELEM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e32 +# define BOOST_PP_TUPLE_ELEM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e33 +# define BOOST_PP_TUPLE_ELEM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e34 +# define BOOST_PP_TUPLE_ELEM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e35 +# define BOOST_PP_TUPLE_ELEM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e36 +# define BOOST_PP_TUPLE_ELEM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e37 +# define BOOST_PP_TUPLE_ELEM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e38 +# define BOOST_PP_TUPLE_ELEM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e39 +# define BOOST_PP_TUPLE_ELEM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e40 +# define BOOST_PP_TUPLE_ELEM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e41 +# define BOOST_PP_TUPLE_ELEM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e42 +# define BOOST_PP_TUPLE_ELEM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e43 +# define BOOST_PP_TUPLE_ELEM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e44 +# define BOOST_PP_TUPLE_ELEM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e45 +# define BOOST_PP_TUPLE_ELEM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e46 +# define BOOST_PP_TUPLE_ELEM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e47 +# define BOOST_PP_TUPLE_ELEM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e48 +# define BOOST_PP_TUPLE_ELEM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e49 +# define BOOST_PP_TUPLE_ELEM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e50 +# define BOOST_PP_TUPLE_ELEM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e51 +# define BOOST_PP_TUPLE_ELEM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e52 +# define BOOST_PP_TUPLE_ELEM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e53 +# define BOOST_PP_TUPLE_ELEM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e54 +# define BOOST_PP_TUPLE_ELEM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e55 +# define BOOST_PP_TUPLE_ELEM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e56 +# define BOOST_PP_TUPLE_ELEM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e57 +# define BOOST_PP_TUPLE_ELEM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e58 +# define BOOST_PP_TUPLE_ELEM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e59 +# define BOOST_PP_TUPLE_ELEM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e60 +# define BOOST_PP_TUPLE_ELEM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e61 +# define BOOST_PP_TUPLE_ELEM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e62 +# define BOOST_PP_TUPLE_ELEM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e63 +# endif +# +# /* directly used elsewhere in Boost... */ +# +# define BOOST_PP_TUPLE_ELEM_1_0(a) a +# +# define BOOST_PP_TUPLE_ELEM_2_0(a, b) a +# define BOOST_PP_TUPLE_ELEM_2_1(a, b) b +# +# define BOOST_PP_TUPLE_ELEM_3_0(a, b, c) a +# define BOOST_PP_TUPLE_ELEM_3_1(a, b, c) b +# define BOOST_PP_TUPLE_ELEM_3_2(a, b, c) c +# +# endif diff --git a/contrib/src/boost/preprocessor/tuple/rem.hpp b/contrib/src/boost/preprocessor/tuple/rem.hpp new file mode 100644 index 0000000..c934447 --- /dev/null +++ b/contrib/src/boost/preprocessor/tuple/rem.hpp @@ -0,0 +1,149 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002-2011. * +# * (C) Copyright Edward Diener 2011,2013. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_REM_HPP +# define BOOST_PREPROCESSOR_TUPLE_REM_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_REM */ +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC + /* To be used internally when __VA_ARGS__ could be empty ( or is a single element ) */ +# define BOOST_PP_REM_CAT(...) BOOST_PP_CAT(__VA_ARGS__,) +# endif +# define BOOST_PP_REM(...) __VA_ARGS__ +# else +# define BOOST_PP_REM(x) x +# endif +# +# /* BOOST_PP_TUPLE_REM */ +# +/* + VC++8.0 cannot handle the variadic version of BOOST_PP_TUPLE_REM(size) +*/ +# if BOOST_PP_VARIADICS && !(BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400) +# if BOOST_PP_VARIADICS_MSVC + /* To be used internally when the size could be 0 ( or 1 ) */ +# define BOOST_PP_TUPLE_REM_CAT(size) BOOST_PP_REM_CAT +# endif +# define BOOST_PP_TUPLE_REM(size) BOOST_PP_REM +# else +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_REM(size) BOOST_PP_TUPLE_REM_I(size) +# else +# define BOOST_PP_TUPLE_REM(size) BOOST_PP_TUPLE_REM_OO((size)) +# define BOOST_PP_TUPLE_REM_OO(par) BOOST_PP_TUPLE_REM_I ## par +# endif +# define BOOST_PP_TUPLE_REM_I(size) BOOST_PP_TUPLE_REM_ ## size +# endif +# define BOOST_PP_TUPLE_REM_0() +# define BOOST_PP_TUPLE_REM_1(e0) e0 +# define BOOST_PP_TUPLE_REM_2(e0, e1) e0, e1 +# define BOOST_PP_TUPLE_REM_3(e0, e1, e2) e0, e1, e2 +# define BOOST_PP_TUPLE_REM_4(e0, e1, e2, e3) e0, e1, e2, e3 +# define BOOST_PP_TUPLE_REM_5(e0, e1, e2, e3, e4) e0, e1, e2, e3, e4 +# define BOOST_PP_TUPLE_REM_6(e0, e1, e2, e3, e4, e5) e0, e1, e2, e3, e4, e5 +# define BOOST_PP_TUPLE_REM_7(e0, e1, e2, e3, e4, e5, e6) e0, e1, e2, e3, e4, e5, e6 +# define BOOST_PP_TUPLE_REM_8(e0, e1, e2, e3, e4, e5, e6, e7) e0, e1, e2, e3, e4, e5, e6, e7 +# define BOOST_PP_TUPLE_REM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) e0, e1, e2, e3, e4, e5, e6, e7, e8 +# define BOOST_PP_TUPLE_REM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9 +# define BOOST_PP_TUPLE_REM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10 +# define BOOST_PP_TUPLE_REM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11 +# define BOOST_PP_TUPLE_REM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12 +# define BOOST_PP_TUPLE_REM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13 +# define BOOST_PP_TUPLE_REM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14 +# define BOOST_PP_TUPLE_REM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15 +# define BOOST_PP_TUPLE_REM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16 +# define BOOST_PP_TUPLE_REM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17 +# define BOOST_PP_TUPLE_REM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18 +# define BOOST_PP_TUPLE_REM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19 +# define BOOST_PP_TUPLE_REM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20 +# define BOOST_PP_TUPLE_REM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21 +# define BOOST_PP_TUPLE_REM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22 +# define BOOST_PP_TUPLE_REM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23 +# define BOOST_PP_TUPLE_REM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24 +# define BOOST_PP_TUPLE_REM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25 +# define BOOST_PP_TUPLE_REM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26 +# define BOOST_PP_TUPLE_REM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27 +# define BOOST_PP_TUPLE_REM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28 +# define BOOST_PP_TUPLE_REM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29 +# define BOOST_PP_TUPLE_REM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30 +# define BOOST_PP_TUPLE_REM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31 +# define BOOST_PP_TUPLE_REM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32 +# define BOOST_PP_TUPLE_REM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33 +# define BOOST_PP_TUPLE_REM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34 +# define BOOST_PP_TUPLE_REM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35 +# define BOOST_PP_TUPLE_REM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36 +# define BOOST_PP_TUPLE_REM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37 +# define BOOST_PP_TUPLE_REM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38 +# define BOOST_PP_TUPLE_REM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39 +# define BOOST_PP_TUPLE_REM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40 +# define BOOST_PP_TUPLE_REM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41 +# define BOOST_PP_TUPLE_REM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42 +# define BOOST_PP_TUPLE_REM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43 +# define BOOST_PP_TUPLE_REM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44 +# define BOOST_PP_TUPLE_REM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45 +# define BOOST_PP_TUPLE_REM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46 +# define BOOST_PP_TUPLE_REM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47 +# define BOOST_PP_TUPLE_REM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48 +# define BOOST_PP_TUPLE_REM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49 +# define BOOST_PP_TUPLE_REM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50 +# define BOOST_PP_TUPLE_REM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51 +# define BOOST_PP_TUPLE_REM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52 +# define BOOST_PP_TUPLE_REM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53 +# define BOOST_PP_TUPLE_REM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54 +# define BOOST_PP_TUPLE_REM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55 +# define BOOST_PP_TUPLE_REM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56 +# define BOOST_PP_TUPLE_REM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57 +# define BOOST_PP_TUPLE_REM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58 +# define BOOST_PP_TUPLE_REM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59 +# define BOOST_PP_TUPLE_REM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60 +# define BOOST_PP_TUPLE_REM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61 +# define BOOST_PP_TUPLE_REM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62 +# define BOOST_PP_TUPLE_REM_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63 +# +# /* BOOST_PP_TUPLE_REM_CTOR */ +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__), (__VA_ARGS__)) +# define BOOST_PP_TUPLE_REM_CTOR_I(m, args) BOOST_PP_TUPLE_REM_CTOR_II(m, args) +# define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(m ## args,) +# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple) +# else +# define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__)(__VA_ARGS__) +# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_REM tuple +# endif +# define BOOST_PP_TUPLE_REM_CTOR_O_2(size, tuple) BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) +# else +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple) +# else +# define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_D(size, tuple) +# define BOOST_PP_TUPLE_REM_CTOR_D(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple) +# endif +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) ext tuple +# else +# define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) BOOST_PP_TUPLE_REM_CTOR_OO((ext, tuple)) +# define BOOST_PP_TUPLE_REM_CTOR_OO(par) BOOST_PP_TUPLE_REM_CTOR_II ## par +# define BOOST_PP_TUPLE_REM_CTOR_II(ext, tuple) ext ## tuple +# endif +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/tuple/size.hpp b/contrib/src/boost/preprocessor/tuple/size.hpp new file mode 100644 index 0000000..675c065 --- /dev/null +++ b/contrib/src/boost/preprocessor/tuple/size.hpp @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2011. * +# * (C) Copyright Paul Mensonides 2011. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_SIZE_HPP +# define BOOST_PREPROCESSOR_TUPLE_SIZE_HPP +# +# include +# include +# include +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE tuple,) +# else +# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_VARIADIC_SIZE tuple +# endif +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/tuple/to_list.hpp b/contrib/src/boost/preprocessor/tuple/to_list.hpp new file mode 100644 index 0000000..da7828f --- /dev/null +++ b/contrib/src/boost/preprocessor/tuple/to_list.hpp @@ -0,0 +1,118 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002-2011) */ +# /* Revised by Edward Diener (2011) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP +# define BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_TUPLE_TO_LIST */ +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__), (__VA_ARGS__)) +# define BOOST_PP_TUPLE_TO_LIST_I(m, args) BOOST_PP_TUPLE_TO_LIST_II(m, args) +# define BOOST_PP_TUPLE_TO_LIST_II(m, args) BOOST_PP_CAT(m ## args,) +# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_TUPLE_SIZE(tuple)) tuple +# else +# define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__)(__VA_ARGS__) +# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_VARIADIC_SIZE tuple) tuple +# endif +# define BOOST_PP_TUPLE_TO_LIST_O_2(size, tuple) BOOST_PP_TUPLE_TO_LIST_O_1(tuple) +# else +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_I(size, tuple) +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s t +# else +# define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_II(BOOST_PP_TUPLE_TO_LIST_ ## s t) +# define BOOST_PP_TUPLE_TO_LIST_II(res) res +# endif +# else +# define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_OO((size, tuple)) +# define BOOST_PP_TUPLE_TO_LIST_OO(par) BOOST_PP_TUPLE_TO_LIST_I ## par +# define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s ## t +# endif +# endif +# +# define BOOST_PP_TUPLE_TO_LIST_1(e0) (e0, BOOST_PP_NIL) +# define BOOST_PP_TUPLE_TO_LIST_2(e0, e1) (e0, (e1, BOOST_PP_NIL)) +# define BOOST_PP_TUPLE_TO_LIST_3(e0, e1, e2) (e0, (e1, (e2, BOOST_PP_NIL))) +# define BOOST_PP_TUPLE_TO_LIST_4(e0, e1, e2, e3) (e0, (e1, (e2, (e3, BOOST_PP_NIL)))) +# define BOOST_PP_TUPLE_TO_LIST_5(e0, e1, e2, e3, e4) (e0, (e1, (e2, (e3, (e4, BOOST_PP_NIL))))) +# define BOOST_PP_TUPLE_TO_LIST_6(e0, e1, e2, e3, e4, e5) (e0, (e1, (e2, (e3, (e4, (e5, BOOST_PP_NIL)))))) +# define BOOST_PP_TUPLE_TO_LIST_7(e0, e1, e2, e3, e4, e5, e6) (e0, (e1, (e2, (e3, (e4, (e5, (e6, BOOST_PP_NIL))))))) +# define BOOST_PP_TUPLE_TO_LIST_8(e0, e1, e2, e3, e4, e5, e6, e7) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, BOOST_PP_NIL)))))))) +# define BOOST_PP_TUPLE_TO_LIST_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, BOOST_PP_NIL))))))))) +# define BOOST_PP_TUPLE_TO_LIST_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, BOOST_PP_NIL)))))))))) +# define BOOST_PP_TUPLE_TO_LIST_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, BOOST_PP_NIL))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, BOOST_PP_NIL)))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, BOOST_PP_NIL))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, BOOST_PP_NIL)))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, BOOST_PP_NIL))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, BOOST_PP_NIL)))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, BOOST_PP_NIL))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, BOOST_PP_NIL)))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, BOOST_PP_NIL))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, BOOST_PP_NIL)))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, BOOST_PP_NIL))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, BOOST_PP_NIL)))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, BOOST_PP_NIL))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, BOOST_PP_NIL)))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, BOOST_PP_NIL))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, BOOST_PP_NIL)))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, BOOST_PP_NIL))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, BOOST_PP_NIL)))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, BOOST_PP_NIL))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, BOOST_PP_NIL)))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, BOOST_PP_NIL))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, BOOST_PP_NIL)))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, BOOST_PP_NIL))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, BOOST_PP_NIL)))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, BOOST_PP_NIL))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, (e61, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, (e61, (e62, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, (e61, (e62, (e63, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# +# endif diff --git a/contrib/src/boost/preprocessor/variadic/elem.hpp b/contrib/src/boost/preprocessor/variadic/elem.hpp new file mode 100644 index 0000000..be38a94 --- /dev/null +++ b/contrib/src/boost/preprocessor/variadic/elem.hpp @@ -0,0 +1,94 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2011. * +# * (C) Copyright Paul Mensonides 2011. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_VARIADIC_ELEM_HPP +# define BOOST_PREPROCESSOR_VARIADIC_ELEM_HPP +# +# include +# include +# +# /* BOOST_PP_VARIADIC_ELEM */ +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_VARIADIC_ELEM(n, ...) BOOST_PP_VARIADIC_ELEM_I(n,__VA_ARGS__) +# define BOOST_PP_VARIADIC_ELEM_I(n, ...) BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_VARIADIC_ELEM_, n)(__VA_ARGS__,),) +# else +# define BOOST_PP_VARIADIC_ELEM(n, ...) BOOST_PP_CAT(BOOST_PP_VARIADIC_ELEM_, n)(__VA_ARGS__,) +# endif +# define BOOST_PP_VARIADIC_ELEM_0(e0, ...) e0 +# define BOOST_PP_VARIADIC_ELEM_1(e0, e1, ...) e1 +# define BOOST_PP_VARIADIC_ELEM_2(e0, e1, e2, ...) e2 +# define BOOST_PP_VARIADIC_ELEM_3(e0, e1, e2, e3, ...) e3 +# define BOOST_PP_VARIADIC_ELEM_4(e0, e1, e2, e3, e4, ...) e4 +# define BOOST_PP_VARIADIC_ELEM_5(e0, e1, e2, e3, e4, e5, ...) e5 +# define BOOST_PP_VARIADIC_ELEM_6(e0, e1, e2, e3, e4, e5, e6, ...) e6 +# define BOOST_PP_VARIADIC_ELEM_7(e0, e1, e2, e3, e4, e5, e6, e7, ...) e7 +# define BOOST_PP_VARIADIC_ELEM_8(e0, e1, e2, e3, e4, e5, e6, e7, e8, ...) e8 +# define BOOST_PP_VARIADIC_ELEM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ...) e9 +# define BOOST_PP_VARIADIC_ELEM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, ...) e10 +# define BOOST_PP_VARIADIC_ELEM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, ...) e11 +# define BOOST_PP_VARIADIC_ELEM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, ...) e12 +# define BOOST_PP_VARIADIC_ELEM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, ...) e13 +# define BOOST_PP_VARIADIC_ELEM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, ...) e14 +# define BOOST_PP_VARIADIC_ELEM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, ...) e15 +# define BOOST_PP_VARIADIC_ELEM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, ...) e16 +# define BOOST_PP_VARIADIC_ELEM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, ...) e17 +# define BOOST_PP_VARIADIC_ELEM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, ...) e18 +# define BOOST_PP_VARIADIC_ELEM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, ...) e19 +# define BOOST_PP_VARIADIC_ELEM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, ...) e20 +# define BOOST_PP_VARIADIC_ELEM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, ...) e21 +# define BOOST_PP_VARIADIC_ELEM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, ...) e22 +# define BOOST_PP_VARIADIC_ELEM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, ...) e23 +# define BOOST_PP_VARIADIC_ELEM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, ...) e24 +# define BOOST_PP_VARIADIC_ELEM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, ...) e25 +# define BOOST_PP_VARIADIC_ELEM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, ...) e26 +# define BOOST_PP_VARIADIC_ELEM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, ...) e27 +# define BOOST_PP_VARIADIC_ELEM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, ...) e28 +# define BOOST_PP_VARIADIC_ELEM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, ...) e29 +# define BOOST_PP_VARIADIC_ELEM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, ...) e30 +# define BOOST_PP_VARIADIC_ELEM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, ...) e31 +# define BOOST_PP_VARIADIC_ELEM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, ...) e32 +# define BOOST_PP_VARIADIC_ELEM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, ...) e33 +# define BOOST_PP_VARIADIC_ELEM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, ...) e34 +# define BOOST_PP_VARIADIC_ELEM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, ...) e35 +# define BOOST_PP_VARIADIC_ELEM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, ...) e36 +# define BOOST_PP_VARIADIC_ELEM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, ...) e37 +# define BOOST_PP_VARIADIC_ELEM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, ...) e38 +# define BOOST_PP_VARIADIC_ELEM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, ...) e39 +# define BOOST_PP_VARIADIC_ELEM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, ...) e40 +# define BOOST_PP_VARIADIC_ELEM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, ...) e41 +# define BOOST_PP_VARIADIC_ELEM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, ...) e42 +# define BOOST_PP_VARIADIC_ELEM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, ...) e43 +# define BOOST_PP_VARIADIC_ELEM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, ...) e44 +# define BOOST_PP_VARIADIC_ELEM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, ...) e45 +# define BOOST_PP_VARIADIC_ELEM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, ...) e46 +# define BOOST_PP_VARIADIC_ELEM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, ...) e47 +# define BOOST_PP_VARIADIC_ELEM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, ...) e48 +# define BOOST_PP_VARIADIC_ELEM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, ...) e49 +# define BOOST_PP_VARIADIC_ELEM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, ...) e50 +# define BOOST_PP_VARIADIC_ELEM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, ...) e51 +# define BOOST_PP_VARIADIC_ELEM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, ...) e52 +# define BOOST_PP_VARIADIC_ELEM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, ...) e53 +# define BOOST_PP_VARIADIC_ELEM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, ...) e54 +# define BOOST_PP_VARIADIC_ELEM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, ...) e55 +# define BOOST_PP_VARIADIC_ELEM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, ...) e56 +# define BOOST_PP_VARIADIC_ELEM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, ...) e57 +# define BOOST_PP_VARIADIC_ELEM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, ...) e58 +# define BOOST_PP_VARIADIC_ELEM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, ...) e59 +# define BOOST_PP_VARIADIC_ELEM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, ...) e60 +# define BOOST_PP_VARIADIC_ELEM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, ...) e61 +# define BOOST_PP_VARIADIC_ELEM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, ...) e62 +# define BOOST_PP_VARIADIC_ELEM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, ...) e63 +# endif +# +# endif diff --git a/contrib/src/boost/preprocessor/variadic/size.hpp b/contrib/src/boost/preprocessor/variadic/size.hpp new file mode 100644 index 0000000..b92a5ff --- /dev/null +++ b/contrib/src/boost/preprocessor/variadic/size.hpp @@ -0,0 +1,30 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2011. * +# * (C) Copyright Paul Mensonides 2011. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_VARIADIC_SIZE_HPP +# define BOOST_PREPROCESSOR_VARIADIC_SIZE_HPP +# +# include +# include +# +# /* BOOST_PP_VARIADIC_SIZE */ +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),) +# else +# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,) +# endif +# define BOOST_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size +# endif +# +# endif diff --git a/contrib/src/boost/random/detail/config.hpp b/contrib/src/boost/random/detail/config.hpp new file mode 100644 index 0000000..724ab19 --- /dev/null +++ b/contrib/src/boost/random/detail/config.hpp @@ -0,0 +1,18 @@ +/* boost random/detail/config.hpp header file + * + * Copyright Steven Watanabe 2009 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + */ + +#include + +#if (defined(BOOST_NO_OPERATORS_IN_NAMESPACE) || defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)) \ + && !defined(BOOST_MSVC) + #define BOOST_RANDOM_NO_STREAM_OPERATORS +#endif diff --git a/contrib/src/boost/random/detail/const_mod.hpp b/contrib/src/boost/random/detail/const_mod.hpp new file mode 100644 index 0000000..e0a43ab --- /dev/null +++ b/contrib/src/boost/random/detail/const_mod.hpp @@ -0,0 +1,216 @@ +/* boost random/detail/const_mod.hpp header file + * + * Copyright Jens Maurer 2000-2001 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + * + * Revision history + * 2001-02-18 moved to individual header files + */ + +#ifndef BOOST_RANDOM_CONST_MOD_HPP +#define BOOST_RANDOM_CONST_MOD_HPP + +#include +#include +#include +#include +#include + +#include + +namespace boost { +namespace random { + +template +class const_mod +{ +public: + static IntType apply(IntType x) + { + if(((unsigned_m() - 1) & unsigned_m()) == 0) + return (unsigned_type(x)) & (unsigned_m() - 1); + else { + IntType suppress_warnings = (m == 0); + BOOST_ASSERT(suppress_warnings == 0); + return x % (m + suppress_warnings); + } + } + + static IntType add(IntType x, IntType c) + { + if(((unsigned_m() - 1) & unsigned_m()) == 0) + return (unsigned_type(x) + unsigned_type(c)) & (unsigned_m() - 1); + else if(c == 0) + return x; + else if(x < m - c) + return x + c; + else + return x - (m - c); + } + + static IntType mult(IntType a, IntType x) + { + if(((unsigned_m() - 1) & unsigned_m()) == 0) + return unsigned_type(a) * unsigned_type(x) & (unsigned_m() - 1); + else if(a == 0) + return 0; + else if(a == 1) + return x; + else if(m <= traits::const_max/a) // i.e. a*m <= max + return mult_small(a, x); + else if(traits::is_signed && (m%a < m/a)) + return mult_schrage(a, x); + else + return mult_general(a, x); + } + + static IntType mult_add(IntType a, IntType x, IntType c) + { + if(((unsigned_m() - 1) & unsigned_m()) == 0) + return (unsigned_type(a) * unsigned_type(x) + unsigned_type(c)) & (unsigned_m() - 1); + else if(a == 0) + return c; + else if(m <= (traits::const_max-c)/a) { // i.e. a*m+c <= max + IntType suppress_warnings = (m == 0); + BOOST_ASSERT(suppress_warnings == 0); + return (a*x+c) % (m + suppress_warnings); + } else + return add(mult(a, x), c); + } + + static IntType pow(IntType a, boost::uintmax_t exponent) + { + IntType result = 1; + while(exponent != 0) { + if(exponent % 2 == 1) { + result = mult(result, a); + } + a = mult(a, a); + exponent /= 2; + } + return result; + } + + static IntType invert(IntType x) + { return x == 0 ? 0 : (m == 0? invert_euclidian0(x) : invert_euclidian(x)); } + +private: + typedef integer_traits traits; + typedef typename make_unsigned::type unsigned_type; + + const_mod(); // don't instantiate + + static IntType mult_small(IntType a, IntType x) + { + IntType suppress_warnings = (m == 0); + BOOST_ASSERT(suppress_warnings == 0); + return a*x % (m + suppress_warnings); + } + + static IntType mult_schrage(IntType a, IntType value) + { + const IntType q = m / a; + const IntType r = m % a; + + BOOST_ASSERT(r < q); // check that overflow cannot happen + + return sub(a*(value%q), r*(value/q)); + } + + static IntType mult_general(IntType a, IntType b) + { + IntType suppress_warnings = (m == 0); + BOOST_ASSERT(suppress_warnings == 0); + IntType modulus = m + suppress_warnings; + BOOST_ASSERT(modulus == m); + if(::boost::uintmax_t(modulus) <= + (::std::numeric_limits< ::boost::uintmax_t>::max)() / modulus) + { + return static_cast(boost::uintmax_t(a) * b % modulus); + } else { + return static_cast(detail::mulmod(a, b, modulus)); + } + } + + static IntType sub(IntType a, IntType b) + { + if(a < b) + return m - (b - a); + else + return a - b; + } + + static unsigned_type unsigned_m() + { + if(m == 0) { + return unsigned_type((std::numeric_limits::max)()) + 1; + } else { + return unsigned_type(m); + } + } + + // invert c in the finite field (mod m) (m must be prime) + static IntType invert_euclidian(IntType c) + { + // we are interested in the gcd factor for c, because this is our inverse + BOOST_ASSERT(c > 0); + IntType l1 = 0; + IntType l2 = 1; + IntType n = c; + IntType p = m; + for(;;) { + IntType q = p / n; + l1 += q * l2; + p -= q * n; + if(p == 0) + return l2; + IntType q2 = n / p; + l2 += q2 * l1; + n -= q2 * p; + if(n == 0) + return m - l1; + } + } + + // invert c in the finite field (mod m) (c must be relatively prime to m) + static IntType invert_euclidian0(IntType c) + { + // we are interested in the gcd factor for c, because this is our inverse + BOOST_ASSERT(c > 0); + if(c == 1) return 1; + IntType l1 = 0; + IntType l2 = 1; + IntType n = c; + IntType p = m; + IntType max = (std::numeric_limits::max)(); + IntType q = max / n; + BOOST_ASSERT(max % n != n - 1 && "c must be relatively prime to m."); + l1 += q * l2; + p = max - q * n + 1; + for(;;) { + if(p == 0) + return l2; + IntType q2 = n / p; + l2 += q2 * l1; + n -= q2 * p; + if(n == 0) + return m - l1; + q = p / n; + l1 += q * l2; + p -= q * n; + } + } +}; + +} // namespace random +} // namespace boost + +#include + +#endif // BOOST_RANDOM_CONST_MOD_HPP diff --git a/contrib/src/boost/random/detail/disable_warnings.hpp b/contrib/src/boost/random/detail/disable_warnings.hpp new file mode 100644 index 0000000..4582dcb --- /dev/null +++ b/contrib/src/boost/random/detail/disable_warnings.hpp @@ -0,0 +1,29 @@ +/* boost random/detail/disable_warnings.hpp header file + * + * Copyright Steven Watanabe 2009 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + * + */ + +// No #include guard. This header is intended to be included multiple times. + +#include + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4512) +#pragma warning(disable:4127) +#pragma warning(disable:4724) +#pragma warning(disable:4800) // 'int' : forcing value to bool 'true' or 'false' (performance warning) +#endif + +#if defined(BOOST_GCC) && BOOST_GCC >= 40600 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wlogical-op" +#endif diff --git a/contrib/src/boost/random/detail/enable_warnings.hpp b/contrib/src/boost/random/detail/enable_warnings.hpp new file mode 100644 index 0000000..24f3bb3 --- /dev/null +++ b/contrib/src/boost/random/detail/enable_warnings.hpp @@ -0,0 +1,22 @@ +/* boost random/detail/enable_warnings.hpp header file + * + * Copyright Steven Watanabe 2009 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + * + */ + +// No #include guard. This header is intended to be included multiple times. + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#if defined(BOOST_GCC) && BOOST_GCC >= 40600 +#pragma GCC diagnostic pop +#endif diff --git a/contrib/src/boost/random/detail/generator_bits.hpp b/contrib/src/boost/random/detail/generator_bits.hpp new file mode 100644 index 0000000..0527614 --- /dev/null +++ b/contrib/src/boost/random/detail/generator_bits.hpp @@ -0,0 +1,36 @@ +/* boost random/detail/generator_bits.hpp header file + * + * Copyright Steven Watanabe 2011 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + * + */ + +#ifndef BOOST_RANDOM_DETAIL_GENERATOR_BITS_HPP +#define BOOST_RANDOM_DETAIL_GENERATOR_BITS_HPP + +#include + +namespace boost { +namespace random { +namespace detail { + +// This is a temporary measure that retains backwards +// compatibility. +template +struct generator_bits { + static std::size_t value() { + return std::numeric_limits::digits; + } +}; + +} // namespace detail +} // namespace random +} // namespace boost + +#endif // BOOST_RANDOM_DETAIL_GENERATOR_BITS_HPP diff --git a/contrib/src/boost/random/detail/generator_seed_seq.hpp b/contrib/src/boost/random/detail/generator_seed_seq.hpp new file mode 100644 index 0000000..7e13483 --- /dev/null +++ b/contrib/src/boost/random/detail/generator_seed_seq.hpp @@ -0,0 +1,40 @@ +/* boost random/mersenne_twister.hpp header file + * + * Copyright Jens Maurer 2000-2001 + * Copyright Steven Watanabe 2010 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + * + */ + +#ifndef BOOST_RANDOM_DETAIL_GENERATOR_SEED_SEQ_HPP_INCLUDED +#define BOOST_RANDOM_DETAIL_GENERATOR_SEED_SEQ_HPP_INCLUDED + +namespace boost { +namespace random { +namespace detail { + +template +class generator_seed_seq { +public: + generator_seed_seq(Generator& g) : gen(&g) {} + template + void generate(It first, It last) { + for(; first != last; ++first) { + *first = (*gen)(); + } + } +private: + Generator* gen; +}; + +} +} +} + +#endif diff --git a/contrib/src/boost/random/detail/integer_log2.hpp b/contrib/src/boost/random/detail/integer_log2.hpp new file mode 100644 index 0000000..248243a --- /dev/null +++ b/contrib/src/boost/random/detail/integer_log2.hpp @@ -0,0 +1,84 @@ +/* boost random/detail/integer_log2.hpp header file + * + * Copyright Steven Watanabe 2011 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + * + */ + +#ifndef BOOST_RANDOM_DETAIL_INTEGER_LOG2_HPP +#define BOOST_RANDOM_DETAIL_INTEGER_LOG2_HPP + +#include +#include +#include + +namespace boost { +namespace random { +namespace detail { + +#if !defined(BOOST_NO_CXX11_CONSTEXPR) +#define BOOST_RANDOM_DETAIL_CONSTEXPR constexpr +#elif defined(BOOST_MSVC) +#define BOOST_RANDOM_DETAIL_CONSTEXPR __forceinline +#elif defined(__GNUC__) && __GNUC__ >= 4 +#define BOOST_RANDOM_DETAIL_CONSTEXPR inline __attribute__((__const__)) __attribute__((__always_inline__)) +#else +#define BOOST_RANDOM_DETAIL_CONSTEXPR inline +#endif + +template +struct integer_log2_impl +{ +#if defined(BOOST_NO_CXX11_CONSTEXPR) + template + BOOST_RANDOM_DETAIL_CONSTEXPR static int apply(T t, int accum) + { + int update = ((t >> Shift) != 0) * Shift; + return integer_log2_impl::apply(t >> update, accum + update); + } +#else + template + BOOST_RANDOM_DETAIL_CONSTEXPR static int apply2(T t, int accum, int update) + { + return integer_log2_impl::apply(t >> update, accum + update); + } + + template + BOOST_RANDOM_DETAIL_CONSTEXPR static int apply(T t, int accum) + { + return apply2(t, accum, ((t >> Shift) != 0) * Shift); + } +#endif +}; + +template<> +struct integer_log2_impl<1> +{ + template + BOOST_RANDOM_DETAIL_CONSTEXPR static int apply(T t, int accum) + { + return int(t >> 1) + accum; + } +}; + +template +BOOST_RANDOM_DETAIL_CONSTEXPR int integer_log2(T t) +{ + return integer_log2_impl< + ::boost::detail::max_pow2_less< + ::std::numeric_limits::digits, 4 + >::value + >::apply(t, 0); +} + +} // namespace detail +} // namespace random +} // namespace boost + +#endif // BOOST_RANDOM_DETAIL_INTEGER_LOG2_HPP diff --git a/contrib/src/boost/random/detail/large_arithmetic.hpp b/contrib/src/boost/random/detail/large_arithmetic.hpp new file mode 100644 index 0000000..66f6b4e --- /dev/null +++ b/contrib/src/boost/random/detail/large_arithmetic.hpp @@ -0,0 +1,122 @@ +/* boost random/detail/large_arithmetic.hpp header file + * + * Copyright Steven Watanabe 2011 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + */ + +#ifndef BOOST_RANDOM_DETAIL_LARGE_ARITHMETIC_HPP +#define BOOST_RANDOM_DETAIL_LARGE_ARITHMETIC_HPP + +#include +#include +#include +#include + +#include + +namespace boost { +namespace random { +namespace detail { + +struct div_t { + boost::uintmax_t quotient; + boost::uintmax_t remainder; +}; + +inline div_t muldivmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t m) +{ + const int bits = + ::std::numeric_limits< ::boost::uintmax_t>::digits / 2; + const ::boost::uintmax_t mask = (::boost::uintmax_t(1) << bits) - 1; + typedef ::boost::uint_t::fast digit_t; + + int shift = std::numeric_limits< ::boost::uintmax_t>::digits - 1 + - detail::integer_log2(m); + + a <<= shift; + m <<= shift; + + digit_t product[4] = { 0, 0, 0, 0 }; + digit_t a_[2] = { digit_t(a & mask), digit_t((a >> bits) & mask) }; + digit_t b_[2] = { digit_t(b & mask), digit_t((b >> bits) & mask) }; + digit_t m_[2] = { digit_t(m & mask), digit_t((m >> bits) & mask) }; + + // multiply a * b + for(int i = 0; i < 2; ++i) { + digit_t carry = 0; + for(int j = 0; j < 2; ++j) { + ::boost::uint64_t temp = ::boost::uintmax_t(a_[i]) * b_[j] + + carry + product[i + j]; + product[i + j] = digit_t(temp & mask); + carry = digit_t(temp >> bits); + } + if(carry != 0) { + product[i + 2] += carry; + } + } + + digit_t quotient[2]; + + if(m == 0) { + div_t result = { + ((::boost::uintmax_t(product[3]) << bits) | product[2]), + ((::boost::uintmax_t(product[1]) << bits) | product[0]) >> shift, + }; + return result; + } + + // divide product / m + for(int i = 3; i >= 2; --i) { + ::boost::uintmax_t temp = + ::boost::uintmax_t(product[i]) << bits | product[i - 1]; + + digit_t q = digit_t((product[i] == m_[1]) ? mask : temp / m_[1]); + + ::boost::uintmax_t rem = + ((temp - ::boost::uintmax_t(q) * m_[1]) << bits) + product[i - 2]; + + ::boost::uintmax_t diff = m_[0] * ::boost::uintmax_t(q); + + int error = 0; + if(diff > rem) { + if(diff - rem > m) { + error = 2; + } else { + error = 1; + } + } + q -= error; + rem = rem + error * m - diff; + + quotient[i - 2] = q; + product[i] = 0; + product[i-1] = static_cast((rem >> bits) & mask); + product[i-2] = static_cast(rem & mask); + } + + div_t result = { + ((::boost::uintmax_t(quotient[1]) << bits) | quotient[0]), + ((::boost::uintmax_t(product[1]) << bits) | product[0]) >> shift, + }; + return result; +} + +inline boost::uintmax_t muldiv(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t m) +{ return detail::muldivmod(a, b, m).quotient; } + +inline boost::uintmax_t mulmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t m) +{ return detail::muldivmod(a, b, m).remainder; } + +} // namespace detail +} // namespace random +} // namespace boost + +#include + +#endif // BOOST_RANDOM_DETAIL_LARGE_ARITHMETIC_HPP diff --git a/contrib/src/boost/random/detail/operators.hpp b/contrib/src/boost/random/detail/operators.hpp new file mode 100644 index 0000000..597343c --- /dev/null +++ b/contrib/src/boost/random/detail/operators.hpp @@ -0,0 +1,84 @@ +/* boost random/detail/operators.hpp header file + * + * Copyright Steven Watanabe 2010-2011 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + */ + +#ifndef BOOST_RANDOM_DETAIL_OPERATORS_HPP +#define BOOST_RANDOM_DETAIL_OPERATORS_HPP + +#include +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310) \ + || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100)) + +#define BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, T, t) \ + template \ + friend std::basic_ostream& \ + operator<<(std::basic_ostream& os, const T& t) { \ + t.print(os, t); \ + return os; \ + } \ + template \ + static std::basic_ostream& \ + print(std::basic_ostream& os, const T& t) + +#define BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, T, t) \ + template \ + friend std::basic_istream& \ + operator>>(std::basic_istream& is, T& t) { \ + t.read(is, t); \ + return is; \ + } \ + template \ + static std::basic_istream& \ + read(std::basic_istream& is, T& t) + +#endif + +#if defined(__BORLANDC__) + +#define BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(T, lhs, rhs) \ + bool operator==(const T& rhs) const \ + { return T::is_equal(*this, rhs); } \ + static bool is_equal(const T& lhs, const T& rhs) + +#define BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(T) \ + bool operator!=(const T& rhs) const \ + { return !T::is_equal(*this, rhs); } + +#endif + +#ifndef BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR +#define BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, T, t) \ + template \ + friend std::basic_ostream& \ + operator<<(std::basic_ostream& os, const T& t) +#endif + +#ifndef BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR +#define BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, T, t) \ + template \ + friend std::basic_istream& \ + operator>>(std::basic_istream& is, T& t) +#endif + +#ifndef BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR +#define BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(T, lhs, rhs) \ + friend bool operator==(const T& lhs, const T& rhs) +#endif + +#ifndef BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR +#define BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(T) \ + friend bool operator!=(const T& lhs, const T& rhs) \ + { return !(lhs == rhs); } +#endif + +#endif diff --git a/contrib/src/boost/random/detail/polynomial.hpp b/contrib/src/boost/random/detail/polynomial.hpp new file mode 100644 index 0000000..a8c4b26 --- /dev/null +++ b/contrib/src/boost/random/detail/polynomial.hpp @@ -0,0 +1,384 @@ +/* boost random/detail/polynomial.hpp header file + * + * Copyright Steven Watanabe 2014 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + */ + +#ifndef BOOST_RANDOM_DETAIL_POLYNOMIAL_HPP +#define BOOST_RANDOM_DETAIL_POLYNOMIAL_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace random { +namespace detail { + +class polynomial_ops { +public: + typedef unsigned long digit_t; + + static void add(std::size_t size, const digit_t * lhs, + const digit_t * rhs, digit_t * output) + { + for(std::size_t i = 0; i < size; ++i) { + output[i] = lhs[i] ^ rhs[i]; + } + } + + static void add_shifted_inplace(std::size_t size, const digit_t * lhs, + digit_t * output, std::size_t shift) + { + if(shift == 0) { + add(size, lhs, output, output); + return; + } + std::size_t bits = std::numeric_limits::digits; + digit_t prev = 0; + for(std::size_t i = 0; i < size; ++i) { + digit_t tmp = lhs[i]; + output[i] ^= (tmp << shift) | (prev >> (bits-shift)); + prev = tmp; + } + output[size] ^= (prev >> (bits-shift)); + } + + static void multiply_simple(std::size_t size, const digit_t * lhs, + const digit_t * rhs, digit_t * output) + { + std::size_t bits = std::numeric_limits::digits; + for(std::size_t i = 0; i < 2*size; ++i) { + output[i] = 0; + } + for(std::size_t i = 0; i < size; ++i) { + for(std::size_t j = 0; j < bits; ++j) { + if((lhs[i] & (digit_t(1) << j)) != 0) { + add_shifted_inplace(size, rhs, output + i, j); + } + } + } + } + + // memory requirements: (size - cutoff) * 4 + next_smaller + static void multiply_karatsuba(std::size_t size, + const digit_t * lhs, const digit_t * rhs, + digit_t * output) + { + if(size < 64) { + multiply_simple(size, lhs, rhs, output); + return; + } + // split in half + std::size_t cutoff = size/2; + multiply_karatsuba(cutoff, lhs, rhs, output); + multiply_karatsuba(size - cutoff, lhs + cutoff, rhs + cutoff, + output + cutoff*2); + std::vector local1(size - cutoff); + std::vector local2(size - cutoff); + // combine the digits for the inner multiply + add(cutoff, lhs, lhs + cutoff, &local1[0]); + if(size & 1) local1[cutoff] = lhs[size - 1]; + add(cutoff, rhs + cutoff, rhs, &local2[0]); + if(size & 1) local2[cutoff] = rhs[size - 1]; + std::vector local3((size - cutoff) * 2); + multiply_karatsuba(size - cutoff, &local1[0], &local2[0], &local3[0]); + add(cutoff * 2, output, &local3[0], &local3[0]); + add((size - cutoff) * 2, output + cutoff*2, &local3[0], &local3[0]); + // Finally, add the inner result + add((size - cutoff) * 2, output + cutoff, &local3[0], output + cutoff); + } + + static void multiply_add_karatsuba(std::size_t size, + const digit_t * lhs, const digit_t * rhs, + digit_t * output) + { + std::vector buf(size * 2); + multiply_karatsuba(size, lhs, rhs, &buf[0]); + add(size * 2, &buf[0], output, output); + } + + static void multiply(const digit_t * lhs, std::size_t lhs_size, + const digit_t * rhs, std::size_t rhs_size, + digit_t * output) + { + std::fill_n(output, lhs_size + rhs_size, digit_t(0)); + multiply_add(lhs, lhs_size, rhs, rhs_size, output); + } + + static void multiply_add(const digit_t * lhs, std::size_t lhs_size, + const digit_t * rhs, std::size_t rhs_size, + digit_t * output) + { + // split into pieces that can be passed to + // karatsuba multiply. + while(lhs_size != 0) { + if(lhs_size < rhs_size) { + std::swap(lhs, rhs); + std::swap(lhs_size, rhs_size); + } + + multiply_add_karatsuba(rhs_size, lhs, rhs, output); + + lhs += rhs_size; + lhs_size -= rhs_size; + output += rhs_size; + } + } + + static void copy_bits(const digit_t * x, std::size_t low, std::size_t high, + digit_t * out) + { + const std::size_t bits = std::numeric_limits::digits; + std::size_t offset = low/bits; + x += offset; + low -= offset*bits; + high -= offset*bits; + std::size_t n = (high-low)/bits; + if(low == 0) { + for(std::size_t i = 0; i < n; ++i) { + out[i] = x[i]; + } + } else { + for(std::size_t i = 0; i < n; ++i) { + out[i] = (x[i] >> low) | (x[i+1] << (bits-low)); + } + } + if((high-low)%bits) { + digit_t low_mask = (digit_t(1) << ((high-low)%bits)) - 1; + digit_t result = (x[n] >> low); + if(low != 0 && (n+1)*bits < high) { + result |= (x[n+1] << (bits-low)); + } + out[n] = (result & low_mask); + } + } + + static void shift_left(digit_t * val, std::size_t size, std::size_t shift) + { + const std::size_t bits = std::numeric_limits::digits; + BOOST_ASSERT(shift > 0); + BOOST_ASSERT(shift < bits); + digit_t prev = 0; + for(std::size_t i = 0; i < size; ++i) { + digit_t tmp = val[i]; + val[i] = (prev >> (bits - shift)) | (val[i] << shift); + prev = tmp; + } + } + + static digit_t sqr(digit_t val) { + const std::size_t bits = std::numeric_limits::digits; + digit_t mask = (digit_t(1) << bits/2) - 1; + for(std::size_t i = bits; i > 1; i /= 2) { + val = ((val & ~mask) << i/2) | (val & mask); + mask = mask & (mask >> i/4); + mask = mask | (mask << i/2); + } + return val; + } + + static void sqr(digit_t * val, std::size_t size) + { + const std::size_t bits = std::numeric_limits::digits; + digit_t mask = (digit_t(1) << bits/2) - 1; + for(std::size_t i = 0; i < size; ++i) { + digit_t x = val[size - i - 1]; + val[(size - i - 1) * 2] = sqr(x & mask); + val[(size - i - 1) * 2 + 1] = sqr(x >> bits/2); + } + } + + // optimized for the case when the modulus has few bits set. + struct sparse_mod { + sparse_mod(const digit_t * divisor, std::size_t divisor_bits) + { + const std::size_t bits = std::numeric_limits::digits; + _remainder_bits = divisor_bits - 1; + for(std::size_t i = 0; i < divisor_bits; ++i) { + if(divisor[i/bits] & (digit_t(1) << i%bits)) { + _bit_indices.push_back(i); + } + } + BOOST_ASSERT(_bit_indices.back() == divisor_bits - 1); + _bit_indices.pop_back(); + if(_bit_indices.empty()) { + _block_bits = divisor_bits; + _lower_bits = 0; + } else { + _block_bits = divisor_bits - _bit_indices.back() - 1; + _lower_bits = _bit_indices.back() + 1; + } + + _partial_quotient.resize((_block_bits + bits - 1)/bits); + } + void operator()(digit_t * dividend, std::size_t dividend_bits) + { + const std::size_t bits = std::numeric_limits::digits; + while(dividend_bits > _remainder_bits) { + std::size_t block_start = (std::max)(dividend_bits - _block_bits, _remainder_bits); + std::size_t block_size = (dividend_bits - block_start + bits - 1) / bits; + copy_bits(dividend, block_start, dividend_bits, &_partial_quotient[0]); + for(std::size_t i = 0; i < _bit_indices.size(); ++i) { + std::size_t pos = _bit_indices[i] + block_start - _remainder_bits; + add_shifted_inplace(block_size, &_partial_quotient[0], dividend + pos/bits, pos%bits); + } + add_shifted_inplace(block_size, &_partial_quotient[0], dividend + block_start/bits, block_start%bits); + dividend_bits = block_start; + } + } + std::vector _partial_quotient; + std::size_t _remainder_bits; + std::size_t _block_bits; + std::size_t _lower_bits; + std::vector _bit_indices; + }; + + // base should have the same number of bits as mod + // base, and mod should both be able to hold a power + // of 2 >= mod_bits. out needs to be twice as large. + static void mod_pow_x(boost::uintmax_t exponent, const digit_t * mod, std::size_t mod_bits, digit_t * out) + { + const std::size_t bits = std::numeric_limits::digits; + const std::size_t n = (mod_bits + bits - 1) / bits; + const std::size_t highbit = mod_bits - 1; + if(exponent == 0) { + out[0] = 1; + std::fill_n(out + 1, n - 1, digit_t(0)); + return; + } + boost::uintmax_t i = std::numeric_limits::digits - 1; + while(((boost::uintmax_t(1) << i) & exponent) == 0) { + --i; + } + out[0] = 2; + std::fill_n(out + 1, n - 1, digit_t(0)); + sparse_mod m(mod, mod_bits); + while(i--) { + sqr(out, n); + m(out, 2 * mod_bits - 1); + if((boost::uintmax_t(1) << i) & exponent) { + shift_left(out, n, 1); + if(out[highbit / bits] & (digit_t(1) << highbit%bits)) + add(n, out, mod, out); + } + } + } +}; + +class polynomial +{ + typedef polynomial_ops::digit_t digit_t; +public: + polynomial() : _size(0) {} + class reference { + public: + reference(digit_t &value, int idx) + : _value(value), _idx(idx) {} + operator bool() const { return (_value & (digit_t(1) << _idx)) != 0; } + reference& operator=(bool b) + { + if(b) { + _value |= (digit_t(1) << _idx); + } else { + _value &= ~(digit_t(1) << _idx); + } + return *this; + } + reference &operator^=(bool b) + { + _value ^= (digit_t(b) << _idx); + return *this; + } + + reference &operator=(const reference &other) + { + return *this = static_cast(other); + } + private: + digit_t &_value; + int _idx; + }; + reference operator[](std::size_t i) + { + static const std::size_t bits = std::numeric_limits::digits; + ensure_bit(i); + return reference(_storage[i/bits], i%bits); + } + bool operator[](std::size_t i) const + { + static const std::size_t bits = std::numeric_limits::digits; + if(i < size()) + return (_storage[i/bits] & (digit_t(1) << (i%bits))) != 0; + else + return false; + } + std::size_t size() const + { + return _size; + } + void resize(std::size_t n) + { + static const std::size_t bits = std::numeric_limits::digits; + _storage.resize((n + bits - 1)/bits); + // clear the high order bits in case we're shrinking. + if(n%bits) { + _storage.back() &= ((digit_t(1) << (n%bits)) - 1); + } + _size = n; + } + friend polynomial operator*(const polynomial &lhs, const polynomial &rhs); + friend polynomial mod_pow_x(boost::uintmax_t exponent, polynomial mod); +private: + std::vector _storage; + std::size_t _size; + void ensure_bit(std::size_t i) + { + if(i >= size()) { + resize(i + 1); + } + } + void normalize() + { + while(size() && (*this)[size() - 1] == 0) + resize(size() - 1); + } +}; + +inline polynomial operator*(const polynomial &lhs, const polynomial &rhs) +{ + polynomial result; + result._storage.resize(lhs._storage.size() + rhs._storage.size()); + polynomial_ops::multiply(&lhs._storage[0], lhs._storage.size(), + &rhs._storage[0], rhs._storage.size(), + &result._storage[0]); + result._size = lhs._size + rhs._size; + return result; +} + +inline polynomial mod_pow_x(boost::uintmax_t exponent, polynomial mod) +{ + polynomial result; + mod.normalize(); + std::size_t mod_size = mod.size(); + result._storage.resize(mod._storage.size() * 2); + result._size = mod.size() * 2; + polynomial_ops::mod_pow_x(exponent, &mod._storage[0], mod_size, &result._storage[0]); + result.resize(mod.size() - 1); + return result; +} + +} +} +} + +#endif // BOOST_RANDOM_DETAIL_POLYNOMIAL_HPP diff --git a/contrib/src/boost/random/detail/ptr_helper.hpp b/contrib/src/boost/random/detail/ptr_helper.hpp new file mode 100644 index 0000000..f1b983d --- /dev/null +++ b/contrib/src/boost/random/detail/ptr_helper.hpp @@ -0,0 +1,67 @@ +/* boost random/detail/ptr_helper.hpp header file + * + * Copyright Jens Maurer 2002 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + * + */ + +#ifndef BOOST_RANDOM_DETAIL_PTR_HELPER_HPP +#define BOOST_RANDOM_DETAIL_PTR_HELPER_HPP + +#include + + +namespace boost { +namespace random { +namespace detail { + +// type_traits could help here, but I don't want to depend on type_traits. +template +struct ptr_helper +{ + typedef T value_type; + typedef T& reference_type; + typedef const T& rvalue_type; + static reference_type ref(T& r) { return r; } + static const T& ref(const T& r) { return r; } +}; + +template +struct ptr_helper +{ + typedef T value_type; + typedef T& reference_type; + typedef T& rvalue_type; + static reference_type ref(T& r) { return r; } + static const T& ref(const T& r) { return r; } +}; + +template +struct ptr_helper +{ + typedef T value_type; + typedef T& reference_type; + typedef T* rvalue_type; + static reference_type ref(T * p) { return *p; } + static const T& ref(const T * p) { return *p; } +}; + +} // namespace detail +} // namespace random +} // namespace boost + +// +// BOOST_RANDOM_PTR_HELPER_SPEC -- +// +// Helper macro for broken compilers defines specializations of +// ptr_helper. +// +# define BOOST_RANDOM_PTR_HELPER_SPEC(T) + +#endif // BOOST_RANDOM_DETAIL_PTR_HELPER_HPP diff --git a/contrib/src/boost/random/detail/seed.hpp b/contrib/src/boost/random/detail/seed.hpp new file mode 100644 index 0000000..557482a --- /dev/null +++ b/contrib/src/boost/random/detail/seed.hpp @@ -0,0 +1,115 @@ +/* boost random/detail/seed.hpp header file + * + * Copyright Steven Watanabe 2009 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + */ + +#ifndef BOOST_RANDOM_DETAIL_SEED_HPP +#define BOOST_RANDOM_DETAIL_SEED_HPP + +#include + +// Sun seems to have trouble with the use of SFINAE for the +// templated constructor. So does Borland. +#if !defined(BOOST_NO_SFINAE) && !defined(__SUNPRO_CC) && !defined(__BORLANDC__) + +#include +#include +#include + +namespace boost { +namespace random { +namespace detail { + +template +struct disable_seed : boost::disable_if > {}; + +template +struct disable_constructor : disable_seed {}; + +template +struct disable_constructor {}; + +#define BOOST_RANDOM_DETAIL_GENERATOR_CONSTRUCTOR(Self, Generator, gen) \ + template \ + explicit Self(Generator& gen, typename ::boost::random::detail::disable_constructor::type* = 0) + +#define BOOST_RANDOM_DETAIL_GENERATOR_SEED(Self, Generator, gen) \ + template \ + void seed(Generator& gen, typename ::boost::random::detail::disable_seed::type* = 0) + +#define BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR(Self, SeedSeq, seq) \ + template \ + explicit Self(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) + +#define BOOST_RANDOM_DETAIL_SEED_SEQ_SEED(Self, SeedSeq, seq) \ + template \ + void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) + +#define BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(Self, T, x) \ + explicit Self(const T& x) + +#define BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(Self, T, x) \ + void seed(const T& x) +} +} +} + +#else + +#include +#include + +#define BOOST_RANDOM_DETAIL_GENERATOR_CONSTRUCTOR(Self, Generator, gen) \ + Self(Self& other) { *this = other; } \ + Self(const Self& other) { *this = other; } \ + template \ + explicit Self(Generator& gen) { \ + boost_random_constructor_impl(gen, ::boost::is_arithmetic());\ + } \ + template \ + void boost_random_constructor_impl(Generator& gen, ::boost::mpl::false_) + +#define BOOST_RANDOM_DETAIL_GENERATOR_SEED(Self, Generator, gen) \ + template \ + void seed(Generator& gen) { \ + boost_random_seed_impl(gen, ::boost::is_arithmetic());\ + }\ + template\ + void boost_random_seed_impl(Generator& gen, ::boost::mpl::false_) + +#define BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR(Self, SeedSeq, seq) \ + Self(Self& other) { *this = other; } \ + Self(const Self& other) { *this = other; } \ + template \ + explicit Self(SeedSeq& seq) { \ + boost_random_constructor_impl(seq, ::boost::is_arithmetic());\ + } \ + template \ + void boost_random_constructor_impl(SeedSeq& seq, ::boost::mpl::false_) + +#define BOOST_RANDOM_DETAIL_SEED_SEQ_SEED(Self, SeedSeq, seq) \ + template \ + void seed(SeedSeq& seq) { \ + boost_random_seed_impl(seq, ::boost::is_arithmetic()); \ + } \ + template \ + void boost_random_seed_impl(SeedSeq& seq, ::boost::mpl::false_) + +#define BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(Self, T, x) \ + explicit Self(const T& x) { boost_random_constructor_impl(x, ::boost::mpl::true_()); }\ + void boost_random_constructor_impl(const T& x, ::boost::mpl::true_) + +#define BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(Self, T, x) \ + void seed(const T& x) { boost_random_seed_impl(x, ::boost::mpl::true_()); }\ + void boost_random_seed_impl(const T& x, ::boost::mpl::true_) + +#endif + +#endif diff --git a/contrib/src/boost/random/detail/seed_impl.hpp b/contrib/src/boost/random/detail/seed_impl.hpp new file mode 100644 index 0000000..918a294 --- /dev/null +++ b/contrib/src/boost/random/detail/seed_impl.hpp @@ -0,0 +1,398 @@ +/* boost random/detail/seed.hpp header file + * + * Copyright Steven Watanabe 2009 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + */ + +#ifndef BOOST_RANDOM_DETAIL_SEED_IMPL_HPP +#define BOOST_RANDOM_DETAIL_SEED_IMPL_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { +namespace random { +namespace detail { + +// finds the seed type of an engine, given its +// result_type. If the result_type is integral +// the seed type is the same. If the result_type +// is floating point, the seed type is uint32_t +template +struct seed_type +{ + typedef typename boost::mpl::if_, + T, + boost::uint32_t + >::type type; +}; + +template +struct const_pow_impl +{ + template + static T call(T arg, int n, T result) + { + return const_pow_impl::call(T(arg * arg), n / 2, + n%2 == 0? result : T(result * arg)); + } +}; + +template<> +struct const_pow_impl<0> +{ + template + static T call(T, int, T result) + { + return result; + } +}; + +// requires N is an upper bound on n +template +inline T const_pow(T arg, int n) { return const_pow_impl::call(arg, n, T(1)); } + +template +inline T pow2(int n) +{ + typedef unsigned int_type; + const int max_bits = std::numeric_limits::digits; + T multiplier = T(int_type(1) << (max_bits - 1)) * 2; + return (int_type(1) << (n % max_bits)) * + const_pow::digits / max_bits>(multiplier, n / max_bits); +} + +template +void generate_from_real(Engine& eng, Iter begin, Iter end) +{ + using std::fmod; + typedef typename Engine::result_type RealType; + const int Bits = detail::generator_bits::value(); + int remaining_bits = 0; + boost::uint_least32_t saved_bits = 0; + RealType multiplier = pow2( Bits); + RealType mult32 = RealType(4294967296.0); // 2^32 + while(true) { + RealType val = eng() * multiplier; + int available_bits = Bits; + // Make sure the compiler can optimize this out + // if it isn't possible. + if(Bits < 32 && available_bits < 32 - remaining_bits) { + saved_bits |= boost::uint_least32_t(val) << remaining_bits; + remaining_bits += Bits; + } else { + // If Bits < 32, then remaining_bits != 0, since + // if remaining_bits == 0, available_bits < 32 - 0, + // and we won't get here to begin with. + if(Bits < 32 || remaining_bits != 0) { + boost::uint_least32_t divisor = + (boost::uint_least32_t(1) << (32 - remaining_bits)); + boost::uint_least32_t extra_bits = boost::uint_least32_t(fmod(val, mult32)) & (divisor - 1); + val = val / divisor; + *begin++ = saved_bits | (extra_bits << remaining_bits); + if(begin == end) return; + available_bits -= 32 - remaining_bits; + remaining_bits = 0; + } + // If Bits < 32 we should never enter this loop + if(Bits >= 32) { + for(; available_bits >= 32; available_bits -= 32) { + boost::uint_least32_t word = boost::uint_least32_t(fmod(val, mult32)); + val /= mult32; + *begin++ = word; + if(begin == end) return; + } + } + remaining_bits = available_bits; + saved_bits = static_cast(val); + } + } +} + +template +void generate_from_int(Engine& eng, Iter begin, Iter end) +{ + typedef typename Engine::result_type IntType; + typedef typename boost::random::traits::make_unsigned::type unsigned_type; + int remaining_bits = 0; + boost::uint_least32_t saved_bits = 0; + unsigned_type range = boost::random::detail::subtract()((eng.max)(), (eng.min)()); + + int bits = + (range == (std::numeric_limits::max)()) ? + std::numeric_limits::digits : + detail::integer_log2(range + 1); + + { + int discarded_bits = detail::integer_log2(bits); + unsigned_type excess = (range + 1) >> (bits - discarded_bits); + if(excess != 0) { + int extra_bits = detail::integer_log2((excess - 1) ^ excess); + bits = bits - discarded_bits + extra_bits; + } + } + + unsigned_type mask = (static_cast(2) << (bits - 1)) - 1; + unsigned_type limit = ((range + 1) & ~mask) - 1; + + while(true) { + unsigned_type val; + do { + val = boost::random::detail::subtract()(eng(), (eng.min)()); + } while(limit != range && val > limit); + val &= mask; + int available_bits = bits; + if(available_bits == 32) { + *begin++ = static_cast(val) & 0xFFFFFFFFu; + if(begin == end) return; + } else if(available_bits % 32 == 0) { + for(int i = 0; i < available_bits / 32; ++i) { + boost::uint_least32_t word = boost::uint_least32_t(val) & 0xFFFFFFFFu; + int suppress_warning = (bits >= 32); + BOOST_ASSERT(suppress_warning == 1); + val >>= (32 * suppress_warning); + *begin++ = word; + if(begin == end) return; + } + } else if(bits < 32 && available_bits < 32 - remaining_bits) { + saved_bits |= boost::uint_least32_t(val) << remaining_bits; + remaining_bits += bits; + } else { + if(bits < 32 || remaining_bits != 0) { + boost::uint_least32_t extra_bits = boost::uint_least32_t(val) & ((boost::uint_least32_t(1) << (32 - remaining_bits)) - 1); + val >>= 32 - remaining_bits; + *begin++ = saved_bits | (extra_bits << remaining_bits); + if(begin == end) return; + available_bits -= 32 - remaining_bits; + remaining_bits = 0; + } + if(bits >= 32) { + for(; available_bits >= 32; available_bits -= 32) { + boost::uint_least32_t word = boost::uint_least32_t(val) & 0xFFFFFFFFu; + int suppress_warning = (bits >= 32); + BOOST_ASSERT(suppress_warning == 1); + val >>= (32 * suppress_warning); + *begin++ = word; + if(begin == end) return; + } + } + remaining_bits = available_bits; + saved_bits = static_cast(val); + } + } +} + +template +void generate_impl(Engine& eng, Iter first, Iter last, boost::mpl::true_) +{ + return detail::generate_from_int(eng, first, last); +} + +template +void generate_impl(Engine& eng, Iter first, Iter last, boost::mpl::false_) +{ + return detail::generate_from_real(eng, first, last); +} + +template +void generate(Engine& eng, Iter first, Iter last) +{ + return detail::generate_impl(eng, first, last, boost::random::traits::is_integral()); +} + + + +template +IntType seed_one_int(SeedSeq& seq) +{ + static const int log = ::boost::mpl::if_c<(m == 0), + ::boost::mpl::int_<(::std::numeric_limits::digits)>, + ::boost::static_log2 >::type::value; + static const int k = + (log + ((~(static_cast(2) << (log - 1)) & m)? 32 : 31)) / 32; + ::boost::uint_least32_t array[log / 32 + 4]; + seq.generate(&array[0], &array[0] + k + 3); + IntType s = 0; + for(int j = 0; j < k; ++j) { + IntType digit = const_mod::apply(IntType(array[j+3])); + IntType mult = IntType(1) << 32*j; + s = const_mod::mult_add(mult, digit, s); + } + return s; +} + +template +IntType get_one_int(Iter& first, Iter last) +{ + static const int log = ::boost::mpl::if_c<(m == 0), + ::boost::mpl::int_<(::std::numeric_limits::digits)>, + ::boost::static_log2 >::type::value; + static const int k = + (log + ((~(static_cast(2) << (log - 1)) & m)? 32 : 31)) / 32; + IntType s = 0; + for(int j = 0; j < k; ++j) { + if(first == last) { + boost::throw_exception(::std::invalid_argument("Not enough elements in call to seed.")); + } + IntType digit = const_mod::apply(IntType(*first++)); + IntType mult = IntType(1) << 32*j; + s = const_mod::mult_add(mult, digit, s); + } + return s; +} + +// TODO: work in-place whenever possible +template +void seed_array_int_impl(SeedSeq& seq, UIntType (&x)[n]) +{ + boost::uint_least32_t storage[((w+31)/32) * n]; + seq.generate(&storage[0], &storage[0] + ((w+31)/32) * n); + for(std::size_t j = 0; j < n; j++) { + UIntType val = 0; + for(std::size_t k = 0; k < (w+31)/32; ++k) { + val += static_cast(storage[(w+31)/32*j + k]) << 32*k; + } + x[j] = val & ::boost::low_bits_mask_t::sig_bits; + } +} + +template +inline void seed_array_int_impl(SeedSeq& seq, IntType (&x)[n], boost::mpl::true_) +{ + BOOST_STATIC_ASSERT_MSG(boost::is_integral::value, "Sorry but this routine has not been ported to non built-in integers as it relies on a reinterpret_cast."); + typedef typename boost::make_unsigned::type unsigned_array[n]; + seed_array_int_impl(seq, reinterpret_cast(x)); +} + +template +inline void seed_array_int_impl(SeedSeq& seq, IntType (&x)[n], boost::mpl::false_) +{ + seed_array_int_impl(seq, x); +} + +template +inline void seed_array_int(SeedSeq& seq, IntType (&x)[n]) +{ + seed_array_int_impl(seq, x, boost::random::traits::is_signed()); +} + +template +void fill_array_int_impl(Iter& first, Iter last, UIntType (&x)[n]) +{ + for(std::size_t j = 0; j < n; j++) { + UIntType val = 0; + for(std::size_t k = 0; k < (w+31)/32; ++k) { + if(first == last) { + boost::throw_exception(std::invalid_argument("Not enough elements in call to seed.")); + } + val += static_cast(*first++) << 32*k; + } + x[j] = val & ::boost::low_bits_mask_t::sig_bits; + } +} + +template +inline void fill_array_int_impl(Iter& first, Iter last, IntType (&x)[n], boost::mpl::true_) +{ + BOOST_STATIC_ASSERT_MSG(boost::is_integral::value, "Sorry but this routine has not been ported to non built-in integers as it relies on a reinterpret_cast."); + typedef typename boost::make_unsigned::type unsigned_array[n]; + fill_array_int_impl(first, last, reinterpret_cast(x)); +} + +template +inline void fill_array_int_impl(Iter& first, Iter last, IntType (&x)[n], boost::mpl::false_) +{ + fill_array_int_impl(first, last, x); +} + +template +inline void fill_array_int(Iter& first, Iter last, IntType (&x)[n]) +{ + fill_array_int_impl(first, last, x, boost::random::traits::is_signed()); +} + +template +void seed_array_real_impl(const boost::uint_least32_t* storage, RealType (&x)[n]) +{ + boost::uint_least32_t mask = ~((~boost::uint_least32_t(0)) << (w%32)); + RealType two32 = 4294967296.0; + const RealType divisor = RealType(1)/detail::pow2(w); + unsigned int j; + for(j = 0; j < n; ++j) { + RealType val = RealType(0); + RealType mult = divisor; + for(int k = 0; k < w/32; ++k) { + val += *storage++ * mult; + mult *= two32; + } + if(mask != 0) { + val += (*storage++ & mask) * mult; + } + BOOST_ASSERT(val >= 0); + BOOST_ASSERT(val < 1); + x[j] = val; + } +} + +template +void seed_array_real(SeedSeq& seq, RealType (&x)[n]) +{ + using std::pow; + boost::uint_least32_t storage[((w+31)/32) * n]; + seq.generate(&storage[0], &storage[0] + ((w+31)/32) * n); + seed_array_real_impl(storage, x); +} + +template +void fill_array_real(Iter& first, Iter last, RealType (&x)[n]) +{ + boost::uint_least32_t mask = ~((~boost::uint_least32_t(0)) << (w%32)); + RealType two32 = 4294967296.0; + const RealType divisor = RealType(1)/detail::pow2(w); + unsigned int j; + for(j = 0; j < n; ++j) { + RealType val = RealType(0); + RealType mult = divisor; + for(int k = 0; k < w/32; ++k, ++first) { + if(first == last) boost::throw_exception(std::invalid_argument("Not enough elements in call to seed.")); + val += *first * mult; + mult *= two32; + } + if(mask != 0) { + if(first == last) boost::throw_exception(std::invalid_argument("Not enough elements in call to seed.")); + val += (*first & mask) * mult; + ++first; + } + BOOST_ASSERT(val >= 0); + BOOST_ASSERT(val < 1); + x[j] = val; + } +} + +} +} +} + +#include + +#endif diff --git a/contrib/src/boost/random/detail/signed_unsigned_tools.hpp b/contrib/src/boost/random/detail/signed_unsigned_tools.hpp new file mode 100644 index 0000000..1979908 --- /dev/null +++ b/contrib/src/boost/random/detail/signed_unsigned_tools.hpp @@ -0,0 +1,89 @@ +/* boost random/detail/signed_unsigned_tools.hpp header file + * + * Copyright Jens Maurer 2006 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + */ + +#ifndef BOOST_RANDOM_DETAIL_SIGNED_UNSIGNED_TOOLS +#define BOOST_RANDOM_DETAIL_SIGNED_UNSIGNED_TOOLS + +#include +#include +#include + +namespace boost { +namespace random { +namespace detail { + + +/* + * Compute x - y, we know that x >= y, return an unsigned value. + */ + +template::is_signed && std::numeric_limits::is_bounded> +struct subtract { }; + +template +struct subtract +{ + typedef T result_type; + result_type operator()(T x, T y) { return x - y; } +}; + +template +struct subtract +{ + typedef typename boost::random::traits::make_unsigned_or_unbounded::type result_type; + result_type operator()(T x, T y) + { + if (y >= 0) // because x >= y, it follows that x >= 0, too + return result_type(x) - result_type(y); + if (x >= 0) // y < 0 + // avoid the nasty two's complement case for y == min() + return result_type(x) + result_type(-(y+1)) + 1; + // both x and y are negative: no signed overflow + return result_type(x - y); + } +}; + +/* + * Compute x + y, x is unsigned, result fits in type of "y". + */ + +template::is_signed && (std::numeric_limits::digits >= std::numeric_limits::digits))> +struct add { }; + +template +struct add +{ + typedef T2 result_type; + result_type operator()(T1 x, T2 y) { return T2(x) + y; } +}; + +template +struct add +{ + typedef T2 result_type; + result_type operator()(T1 x, T2 y) + { + if (y >= 0) + return T2(x) + y; + // y < 0 + if (x > T1(-(y+1))) // result >= 0 after subtraction + // avoid the nasty two's complement edge case for y == min() + return T2(x - T1(-(y+1)) - 1); + // abs(x) < abs(y), thus T2 able to represent x + return T2(x) + y; + } +}; + +} // namespace detail +} // namespace random +} // namespace boost + +#endif // BOOST_RANDOM_DETAIL_SIGNED_UNSIGNED_TOOLS + diff --git a/contrib/src/boost/random/detail/uniform_int_float.hpp b/contrib/src/boost/random/detail/uniform_int_float.hpp new file mode 100644 index 0000000..393c455 --- /dev/null +++ b/contrib/src/boost/random/detail/uniform_int_float.hpp @@ -0,0 +1,76 @@ +/* boost random/detail/uniform_int_float.hpp header file + * + * Copyright Jens Maurer 2000-2001 + * Copyright Steven Watanabe 2011 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + * + */ + +#ifndef BOOST_RANDOM_DETAIL_UNIFORM_INT_FLOAT_HPP +#define BOOST_RANDOM_DETAIL_UNIFORM_INT_FLOAT_HPP + +#include +#include +#include +#include +#include + +#include + +namespace boost { +namespace random { +namespace detail { + +template +class uniform_int_float +{ +public: + typedef URNG base_type; + typedef typename base_type::result_type base_result; + + typedef typename boost::uint_t< + (std::numeric_limits::digits < + std::numeric_limits::digits)? + std::numeric_limits::digits : + std::numeric_limits::digits + >::fast result_type; + + uniform_int_float(base_type& rng) + : _rng(rng) {} + + static result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () + { return 0; } + static result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () + { + std::size_t digits = std::numeric_limits::digits; + if(detail::generator_bits::value() < digits) { + digits = detail::generator_bits::value(); + } + return (result_type(2) << (digits - 1)) - 1; + } + base_type& base() { return _rng; } + const base_type& base() const { return _rng; } + + result_type operator()() + { + base_result range = static_cast((max)())+1; + return static_cast(_rng() * range); + } + +private: + base_type& _rng; +}; + +} // namespace detail +} // namespace random +} // namespace boost + +#include + +#endif // BOOST_RANDOM_DETAIL_UNIFORM_INT_FLOAT_HPP diff --git a/contrib/src/boost/random/mersenne_twister.hpp b/contrib/src/boost/random/mersenne_twister.hpp new file mode 100644 index 0000000..ce73e68 --- /dev/null +++ b/contrib/src/boost/random/mersenne_twister.hpp @@ -0,0 +1,682 @@ +/* boost random/mersenne_twister.hpp header file + * + * Copyright Jens Maurer 2000-2001 + * Copyright Steven Watanabe 2010 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + * + * Revision history + * 2013-10-14 fixed some warnings with Wshadow (mgaunard) + * 2001-02-18 moved to individual header files + */ + +#ifndef BOOST_RANDOM_MERSENNE_TWISTER_HPP +#define BOOST_RANDOM_MERSENNE_TWISTER_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { +namespace random { + +/** + * Instantiations of class template mersenne_twister_engine model a + * \pseudo_random_number_generator. It uses the algorithm described in + * + * @blockquote + * "Mersenne Twister: A 623-dimensionally equidistributed uniform + * pseudo-random number generator", Makoto Matsumoto and Takuji Nishimura, + * ACM Transactions on Modeling and Computer Simulation: Special Issue on + * Uniform Random Number Generation, Vol. 8, No. 1, January 1998, pp. 3-30. + * @endblockquote + * + * @xmlnote + * The boost variant has been implemented from scratch and does not + * derive from or use mt19937.c provided on the above WWW site. However, it + * was verified that both produce identical output. + * @endxmlnote + * + * The seeding from an integer was changed in April 2005 to address a + * weakness. + * + * The quality of the generator crucially depends on the choice of the + * parameters. User code should employ one of the sensibly parameterized + * generators such as \mt19937 instead. + * + * The generator requires considerable amounts of memory for the storage of + * its state array. For example, \mt11213b requires about 1408 bytes and + * \mt19937 requires about 2496 bytes. + */ +template +class mersenne_twister_engine +{ +public: + typedef UIntType result_type; + BOOST_STATIC_CONSTANT(std::size_t, word_size = w); + BOOST_STATIC_CONSTANT(std::size_t, state_size = n); + BOOST_STATIC_CONSTANT(std::size_t, shift_size = m); + BOOST_STATIC_CONSTANT(std::size_t, mask_bits = r); + BOOST_STATIC_CONSTANT(UIntType, xor_mask = a); + BOOST_STATIC_CONSTANT(std::size_t, tempering_u = u); + BOOST_STATIC_CONSTANT(UIntType, tempering_d = d); + BOOST_STATIC_CONSTANT(std::size_t, tempering_s = s); + BOOST_STATIC_CONSTANT(UIntType, tempering_b = b); + BOOST_STATIC_CONSTANT(std::size_t, tempering_t = t); + BOOST_STATIC_CONSTANT(UIntType, tempering_c = c); + BOOST_STATIC_CONSTANT(std::size_t, tempering_l = l); + BOOST_STATIC_CONSTANT(UIntType, initialization_multiplier = f); + BOOST_STATIC_CONSTANT(UIntType, default_seed = 5489u); + + // backwards compatibility + BOOST_STATIC_CONSTANT(UIntType, parameter_a = a); + BOOST_STATIC_CONSTANT(std::size_t, output_u = u); + BOOST_STATIC_CONSTANT(std::size_t, output_s = s); + BOOST_STATIC_CONSTANT(UIntType, output_b = b); + BOOST_STATIC_CONSTANT(std::size_t, output_t = t); + BOOST_STATIC_CONSTANT(UIntType, output_c = c); + BOOST_STATIC_CONSTANT(std::size_t, output_l = l); + + // old Boost.Random concept requirements + BOOST_STATIC_CONSTANT(bool, has_fixed_range = false); + + + /** + * Constructs a @c mersenne_twister_engine and calls @c seed(). + */ + mersenne_twister_engine() { seed(); } + + /** + * Constructs a @c mersenne_twister_engine and calls @c seed(value). + */ + BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(mersenne_twister_engine, + UIntType, value) + { seed(value); } + template mersenne_twister_engine(It& first, It last) + { seed(first,last); } + + /** + * Constructs a mersenne_twister_engine and calls @c seed(gen). + * + * @xmlnote + * The copy constructor will always be preferred over + * the templated constructor. + * @endxmlnote + */ + BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR(mersenne_twister_engine, + SeedSeq, seq) + { seed(seq); } + + // compiler-generated copy ctor and assignment operator are fine + + /** Calls @c seed(default_seed). */ + void seed() { seed(default_seed); } + + /** + * Sets the state x(0) to v mod 2w. Then, iteratively, + * sets x(i) to + * (i + f * (x(i-1) xor (x(i-1) rshift w-2))) mod 2w + * for i = 1 .. n-1. x(n) is the first value to be returned by operator(). + */ + BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(mersenne_twister_engine, UIntType, value) + { + // New seeding algorithm from + // http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html + // In the previous versions, MSBs of the seed affected only MSBs of the + // state x[]. + const UIntType mask = (max)(); + x[0] = value & mask; + for (i = 1; i < n; i++) { + // See Knuth "The Art of Computer Programming" + // Vol. 2, 3rd ed., page 106 + x[i] = (f * (x[i-1] ^ (x[i-1] >> (w-2))) + i) & mask; + } + + normalize_state(); + } + + /** + * Seeds a mersenne_twister_engine using values produced by seq.generate(). + */ + BOOST_RANDOM_DETAIL_SEED_SEQ_SEED(mersenne_twister_engine, SeeqSeq, seq) + { + detail::seed_array_int(seq, x); + i = n; + + normalize_state(); + } + + /** Sets the state of the generator using values from an iterator range. */ + template + void seed(It& first, It last) + { + detail::fill_array_int(first, last, x); + i = n; + + normalize_state(); + } + + /** Returns the smallest value that the generator can produce. */ + static result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () + { return 0; } + /** Returns the largest value that the generator can produce. */ + static result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () + { return boost::low_bits_mask_t::sig_bits; } + + /** Produces the next value of the generator. */ + result_type operator()(); + + /** Fills a range with random values */ + template + void generate(Iter first, Iter last) + { detail::generate_from_int(*this, first, last); } + + /** + * Advances the state of the generator by @c z steps. Equivalent to + * + * @code + * for(unsigned long long i = 0; i < z; ++i) { + * gen(); + * } + * @endcode + */ + void discard(boost::uintmax_t z) + { +#ifndef BOOST_RANDOM_MERSENNE_TWISTER_DISCARD_THRESHOLD +#define BOOST_RANDOM_MERSENNE_TWISTER_DISCARD_THRESHOLD 10000000 +#endif + if(z > BOOST_RANDOM_MERSENNE_TWISTER_DISCARD_THRESHOLD) { + discard_many(z); + } else { + for(boost::uintmax_t j = 0; j < z; ++j) { + (*this)(); + } + } + } + +#ifndef BOOST_RANDOM_NO_STREAM_OPERATORS + /** Writes a mersenne_twister_engine to a @c std::ostream */ + template + friend std::basic_ostream& + operator<<(std::basic_ostream& os, + const mersenne_twister_engine& mt) + { + mt.print(os); + return os; + } + + /** Reads a mersenne_twister_engine from a @c std::istream */ + template + friend std::basic_istream& + operator>>(std::basic_istream& is, + mersenne_twister_engine& mt) + { + for(std::size_t j = 0; j < mt.state_size; ++j) + is >> mt.x[j] >> std::ws; + // MSVC (up to 7.1) and Borland (up to 5.64) don't handle the template + // value parameter "n" available from the class template scope, so use + // the static constant with the same value + mt.i = mt.state_size; + return is; + } +#endif + + /** + * Returns true if the two generators are in the same state, + * and will thus produce identical sequences. + */ + friend bool operator==(const mersenne_twister_engine& x_, + const mersenne_twister_engine& y_) + { + if(x_.i < y_.i) return x_.equal_imp(y_); + else return y_.equal_imp(x_); + } + + /** + * Returns true if the two generators are in different states. + */ + friend bool operator!=(const mersenne_twister_engine& x_, + const mersenne_twister_engine& y_) + { return !(x_ == y_); } + +private: + /// \cond show_private + + void twist(); + + /** + * Does the work of operator==. This is in a member function + * for portability. Some compilers, such as msvc 7.1 and + * Sun CC 5.10 can't access template parameters or static + * members of the class from inline friend functions. + * + * requires i <= other.i + */ + bool equal_imp(const mersenne_twister_engine& other) const + { + UIntType back[n]; + std::size_t offset = other.i - i; + for(std::size_t j = 0; j + offset < n; ++j) + if(x[j] != other.x[j+offset]) + return false; + rewind(&back[n-1], offset); + for(std::size_t j = 0; j < offset; ++j) + if(back[j + n - offset] != other.x[j]) + return false; + return true; + } + + /** + * Does the work of operator<<. This is in a member function + * for portability. + */ + template + void print(std::basic_ostream& os) const + { + UIntType data[n]; + for(std::size_t j = 0; j < i; ++j) { + data[j + n - i] = x[j]; + } + if(i != n) { + rewind(&data[n - i - 1], n - i); + } + os << data[0]; + for(std::size_t j = 1; j < n; ++j) { + os << ' ' << data[j]; + } + } + + /** + * Copies z elements of the state preceding x[0] into + * the array whose last element is last. + */ + void rewind(UIntType* last, std::size_t z) const + { + const UIntType upper_mask = (~static_cast(0)) << r; + const UIntType lower_mask = ~upper_mask; + UIntType y0 = x[m-1] ^ x[n-1]; + if(y0 & (static_cast(1) << (w-1))) { + y0 = ((y0 ^ a) << 1) | 1; + } else { + y0 = y0 << 1; + } + for(std::size_t sz = 0; sz < z; ++sz) { + UIntType y1 = + rewind_find(last, sz, m-1) ^ rewind_find(last, sz, n-1); + if(y1 & (static_cast(1) << (w-1))) { + y1 = ((y1 ^ a) << 1) | 1; + } else { + y1 = y1 << 1; + } + *(last - sz) = (y0 & upper_mask) | (y1 & lower_mask); + y0 = y1; + } + } + + /** + * Converts an arbitrary array into a valid generator state. + * First we normalize x[0], so that it contains the same + * value we would get by running the generator forwards + * and then in reverse. (The low order r bits are redundant). + * Then, if the state consists of all zeros, we set the + * high order bit of x[0] to 1. This function only needs to + * be called by seed, since the state transform preserves + * this relationship. + */ + void normalize_state() + { + const UIntType upper_mask = (~static_cast(0)) << r; + const UIntType lower_mask = ~upper_mask; + UIntType y0 = x[m-1] ^ x[n-1]; + if(y0 & (static_cast(1) << (w-1))) { + y0 = ((y0 ^ a) << 1) | 1; + } else { + y0 = y0 << 1; + } + x[0] = (x[0] & upper_mask) | (y0 & lower_mask); + + // fix up the state if it's all zeroes. + for(std::size_t j = 0; j < n; ++j) { + if(x[j] != 0) return; + } + x[0] = static_cast(1) << (w-1); + } + + /** + * Given a pointer to the last element of the rewind array, + * and the current size of the rewind array, finds an element + * relative to the next available slot in the rewind array. + */ + UIntType + rewind_find(UIntType* last, std::size_t size, std::size_t j) const + { + std::size_t index = (j + n - size + n - 1) % n; + if(index < n - size) { + return x[index]; + } else { + return *(last - (n - 1 - index)); + } + } + + /** + * Optimized algorithm for large jumps. + * + * Hiroshi Haramoto, Makoto Matsumoto, and Pierre L'Ecuyer. 2008. + * A Fast Jump Ahead Algorithm for Linear Recurrences in a Polynomial + * Space. In Proceedings of the 5th international conference on + * Sequences and Their Applications (SETA '08). + * DOI=10.1007/978-3-540-85912-3_26 + */ + void discard_many(boost::uintmax_t z) + { + // Compute the minimal polynomial, phi(t) + // This depends only on the transition function, + // which is constant. The characteristic + // polynomial is the same as the minimal + // polynomial for a maximum period generator + // (which should be all specializations of + // mersenne_twister.) Even if it weren't, + // the characteristic polynomial is guaranteed + // to be a multiple of the minimal polynomial, + // which is good enough. + detail::polynomial phi = get_characteristic_polynomial(); + + // calculate g(t) = t^z % phi(t) + detail::polynomial g = mod_pow_x(z, phi); + + // h(s_0, t) = \sum_{i=0}^{2k-1}o(s_i)t^{2k-i-1} + detail::polynomial h; + const std::size_t num_bits = w*n - r; + for(std::size_t j = 0; j < num_bits * 2; ++j) { + // Yes, we're advancing the generator state + // here, but it doesn't matter because + // we're going to overwrite it completely + // in reconstruct_state. + if(i >= n) twist(); + h[2*num_bits - j - 1] = x[i++] & UIntType(1); + } + // g(t)h(s_0, t) + detail::polynomial gh = g * h; + detail::polynomial result; + for(std::size_t j = 0; j <= num_bits; ++j) { + result[j] = gh[2*num_bits - j - 1]; + } + reconstruct_state(result); + } + static detail::polynomial get_characteristic_polynomial() + { + const std::size_t num_bits = w*n - r; + detail::polynomial helper; + helper[num_bits - 1] = 1; + mersenne_twister_engine tmp; + tmp.reconstruct_state(helper); + // Skip the first num_bits elements, since we + // already know what they are. + for(std::size_t j = 0; j < num_bits; ++j) { + if(tmp.i >= n) tmp.twist(); + if(j == num_bits - 1) + assert((tmp.x[tmp.i] & 1) == 1); + else + assert((tmp.x[tmp.i] & 1) == 0); + ++tmp.i; + } + detail::polynomial phi; + phi[num_bits] = 1; + detail::polynomial next_bits = tmp.as_polynomial(num_bits); + for(std::size_t j = 0; j < num_bits; ++j) { + int val = next_bits[j] ^ phi[num_bits-j-1]; + phi[num_bits-j-1] = val; + if(val) { + for(std::size_t k = j + 1; k < num_bits; ++k) { + phi[num_bits-k-1] ^= next_bits[k-j-1]; + } + } + } + return phi; + } + detail::polynomial as_polynomial(std::size_t size) { + detail::polynomial result; + for(std::size_t j = 0; j < size; ++j) { + if(i >= n) twist(); + result[j] = x[i++] & UIntType(1); + } + return result; + } + void reconstruct_state(const detail::polynomial& p) + { + const UIntType upper_mask = (~static_cast(0)) << r; + const UIntType lower_mask = ~upper_mask; + const std::size_t num_bits = w*n - r; + for(std::size_t j = num_bits - n + 1; j <= num_bits; ++j) + x[j % n] = p[j]; + + UIntType y0 = 0; + for(std::size_t j = num_bits + 1; j >= n - 1; --j) { + UIntType y1 = x[j % n] ^ x[(j + m) % n]; + if(p[j - n + 1]) + y1 = (y1 ^ a) << UIntType(1) | UIntType(1); + else + y1 = y1 << UIntType(1); + x[(j + 1) % n] = (y0 & upper_mask) | (y1 & lower_mask); + y0 = y1; + } + i = 0; + } + + /// \endcond + + // state representation: next output is o(x(i)) + // x[0] ... x[k] x[k+1] ... x[n-1] represents + // x(i-k) ... x(i) x(i+1) ... x(i-k+n-1) + + UIntType x[n]; + std::size_t i; +}; + +/// \cond show_private + +#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +// A definition is required even for integral static constants +#define BOOST_RANDOM_MT_DEFINE_CONSTANT(type, name) \ +template \ +const type mersenne_twister_engine::name +BOOST_RANDOM_MT_DEFINE_CONSTANT(std::size_t, word_size); +BOOST_RANDOM_MT_DEFINE_CONSTANT(std::size_t, state_size); +BOOST_RANDOM_MT_DEFINE_CONSTANT(std::size_t, shift_size); +BOOST_RANDOM_MT_DEFINE_CONSTANT(std::size_t, mask_bits); +BOOST_RANDOM_MT_DEFINE_CONSTANT(UIntType, xor_mask); +BOOST_RANDOM_MT_DEFINE_CONSTANT(std::size_t, tempering_u); +BOOST_RANDOM_MT_DEFINE_CONSTANT(UIntType, tempering_d); +BOOST_RANDOM_MT_DEFINE_CONSTANT(std::size_t, tempering_s); +BOOST_RANDOM_MT_DEFINE_CONSTANT(UIntType, tempering_b); +BOOST_RANDOM_MT_DEFINE_CONSTANT(std::size_t, tempering_t); +BOOST_RANDOM_MT_DEFINE_CONSTANT(UIntType, tempering_c); +BOOST_RANDOM_MT_DEFINE_CONSTANT(std::size_t, tempering_l); +BOOST_RANDOM_MT_DEFINE_CONSTANT(UIntType, initialization_multiplier); +BOOST_RANDOM_MT_DEFINE_CONSTANT(UIntType, default_seed); +BOOST_RANDOM_MT_DEFINE_CONSTANT(UIntType, parameter_a); +BOOST_RANDOM_MT_DEFINE_CONSTANT(std::size_t, output_u ); +BOOST_RANDOM_MT_DEFINE_CONSTANT(std::size_t, output_s); +BOOST_RANDOM_MT_DEFINE_CONSTANT(UIntType, output_b); +BOOST_RANDOM_MT_DEFINE_CONSTANT(std::size_t, output_t); +BOOST_RANDOM_MT_DEFINE_CONSTANT(UIntType, output_c); +BOOST_RANDOM_MT_DEFINE_CONSTANT(std::size_t, output_l); +BOOST_RANDOM_MT_DEFINE_CONSTANT(bool, has_fixed_range); +#undef BOOST_RANDOM_MT_DEFINE_CONSTANT +#endif + +template +void +mersenne_twister_engine::twist() +{ + const UIntType upper_mask = (~static_cast(0)) << r; + const UIntType lower_mask = ~upper_mask; + + const std::size_t unroll_factor = 6; + const std::size_t unroll_extra1 = (n-m) % unroll_factor; + const std::size_t unroll_extra2 = (m-1) % unroll_factor; + + // split loop to avoid costly modulo operations + { // extra scope for MSVC brokenness w.r.t. for scope + for(std::size_t j = 0; j < n-m-unroll_extra1; j++) { + UIntType y = (x[j] & upper_mask) | (x[j+1] & lower_mask); + x[j] = x[j+m] ^ (y >> 1) ^ ((x[j+1]&1) * a); + } + } + { + for(std::size_t j = n-m-unroll_extra1; j < n-m; j++) { + UIntType y = (x[j] & upper_mask) | (x[j+1] & lower_mask); + x[j] = x[j+m] ^ (y >> 1) ^ ((x[j+1]&1) * a); + } + } + { + for(std::size_t j = n-m; j < n-1-unroll_extra2; j++) { + UIntType y = (x[j] & upper_mask) | (x[j+1] & lower_mask); + x[j] = x[j-(n-m)] ^ (y >> 1) ^ ((x[j+1]&1) * a); + } + } + { + for(std::size_t j = n-1-unroll_extra2; j < n-1; j++) { + UIntType y = (x[j] & upper_mask) | (x[j+1] & lower_mask); + x[j] = x[j-(n-m)] ^ (y >> 1) ^ ((x[j+1]&1) * a); + } + } + // last iteration + UIntType y = (x[n-1] & upper_mask) | (x[0] & lower_mask); + x[n-1] = x[m-1] ^ (y >> 1) ^ ((x[0]&1) * a); + i = 0; +} +/// \endcond + +template +inline typename +mersenne_twister_engine::result_type +mersenne_twister_engine::operator()() +{ + if(i == n) + twist(); + // Step 4 + UIntType z = x[i]; + ++i; + z ^= ((z >> u) & d); + z ^= ((z << s) & b); + z ^= ((z << t) & c); + z ^= (z >> l); + return z; +} + +/** + * The specializations \mt11213b and \mt19937 are from + * + * @blockquote + * "Mersenne Twister: A 623-dimensionally equidistributed + * uniform pseudo-random number generator", Makoto Matsumoto + * and Takuji Nishimura, ACM Transactions on Modeling and + * Computer Simulation: Special Issue on Uniform Random Number + * Generation, Vol. 8, No. 1, January 1998, pp. 3-30. + * @endblockquote + */ +typedef mersenne_twister_engine mt11213b; + +/** + * The specializations \mt11213b and \mt19937 are from + * + * @blockquote + * "Mersenne Twister: A 623-dimensionally equidistributed + * uniform pseudo-random number generator", Makoto Matsumoto + * and Takuji Nishimura, ACM Transactions on Modeling and + * Computer Simulation: Special Issue on Uniform Random Number + * Generation, Vol. 8, No. 1, January 1998, pp. 3-30. + * @endblockquote + */ +typedef mersenne_twister_engine mt19937; + +#if !defined(BOOST_NO_INT64_T) && !defined(BOOST_NO_INTEGRAL_INT64_T) +typedef mersenne_twister_engine mt19937_64; +#endif + +/// \cond show_deprecated + +template +class mersenne_twister : + public mersenne_twister_engine +{ + typedef mersenne_twister_engine base_type; +public: + mersenne_twister() {} + BOOST_RANDOM_DETAIL_GENERATOR_CONSTRUCTOR(mersenne_twister, Gen, gen) + { seed(gen); } + BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(mersenne_twister, UIntType, val) + { seed(val); } + template + mersenne_twister(It& first, It last) : base_type(first, last) {} + void seed() { base_type::seed(); } + BOOST_RANDOM_DETAIL_GENERATOR_SEED(mersenne_twister, Gen, gen) + { + detail::generator_seed_seq seq(gen); + base_type::seed(seq); + } + BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(mersenne_twister, UIntType, val) + { base_type::seed(val); } + template + void seed(It& first, It last) { base_type::seed(first, last); } +}; + +/// \endcond + +} // namespace random + +using random::mt11213b; +using random::mt19937; +using random::mt19937_64; + +} // namespace boost + +BOOST_RANDOM_PTR_HELPER_SPEC(boost::mt11213b) +BOOST_RANDOM_PTR_HELPER_SPEC(boost::mt19937) +BOOST_RANDOM_PTR_HELPER_SPEC(boost::mt19937_64) + +#include + +#endif // BOOST_RANDOM_MERSENNE_TWISTER_HPP diff --git a/contrib/src/boost/random/traits.hpp b/contrib/src/boost/random/traits.hpp new file mode 100644 index 0000000..975421a --- /dev/null +++ b/contrib/src/boost/random/traits.hpp @@ -0,0 +1,107 @@ +/* boost random/traits.hpp header file + * + * Copyright John Maddock 2015 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * These traits classes serve two purposes: they are designed to mostly + * work out of the box for multiprecision types (ie number types that are + * C++ class types and not integers or floats from type-traits point of view), + * they are also a potential point of specialization for user-defined + * number types. + * + * $Id$ + */ + +#ifndef BOOST_RANDOM_TRAITS_HPP +#define BOOST_RANDOM_TRAITS_HPP + +#include +#include +#include +#include +#include + +namespace boost { +namespace random { +namespace traits { + // \cond show_private + template + struct make_unsigned_imp + { + typedef typename boost::make_unsigned::type type; + }; + template + struct make_unsigned_imp + { + BOOST_STATIC_ASSERT(std::numeric_limits::is_specialized); + BOOST_STATIC_ASSERT(std::numeric_limits::is_signed == false); + BOOST_STATIC_ASSERT(std::numeric_limits::is_integer == true); + typedef T type; + }; + // \endcond + /** \brief Converts the argument type T to an unsigned type. + * + * This trait has a single member `type` which is the unsigned type corresponding to T. + * Note that + * if T is signed, then member `type` *should define a type with one more bit precision than T*. For built-in + * types this trait defaults to `boost::make_unsigned::type`. For user defined types it simply asserts that + * the argument type T is an unsigned integer (using std::numeric_limits). + * User defined specializations may be provided for other cases. + */ + template + struct make_unsigned + // \cond show_private + : public make_unsigned_imp < T, boost::is_integral::value > + // \endcond + {}; + // \cond show_private + template + struct make_unsigned_or_unbounded_imp + { + typedef typename boost::make_unsigned::type type; + }; + template + struct make_unsigned_or_unbounded_imp + { + BOOST_STATIC_ASSERT(std::numeric_limits::is_specialized); + BOOST_STATIC_ASSERT((std::numeric_limits::is_signed == false) || (std::numeric_limits::is_bounded == false)); + BOOST_STATIC_ASSERT(std::numeric_limits::is_integer == true); + typedef T type; + }; + // \endcond + /** \brief Converts the argument type T to either an unsigned type or an unbounded integer type. + * + * This trait has a single member `type` which is either the unsigned type corresponding to T or an unbounded + * integer type. This trait is used to generate types suitable for the calculation of a range: as a result + * if T is signed, then member `type` *should define a type with one more bit precision than T*. For built-in + * types this trait defaults to `boost::make_unsigned::type`. For user defined types it simply asserts that + * the argument type T is either an unbounded integer, or an unsigned one (using std::numeric_limits). + * User defined specializations may be provided for other cases. + */ + template + struct make_unsigned_or_unbounded + // \cond show_private + : public make_unsigned_or_unbounded_imp < T, boost::is_integral::value > + // \endcond + {}; + /** \brief Traits class that indicates whether type T is an integer + */ + template + struct is_integral + : public mpl::bool_::value || (std::numeric_limits::is_integer)> + {}; + /** \brief Traits class that indicates whether type T is a signed integer + */ + template struct is_signed + : public mpl::bool_ < boost::is_signed::value || (std::numeric_limits::is_specialized && std::numeric_limits::is_integer && std::numeric_limits::is_signed)> + {}; + +} +} +} + +#endif diff --git a/contrib/src/boost/random/uniform_int.hpp b/contrib/src/boost/random/uniform_int.hpp new file mode 100644 index 0000000..4362652 --- /dev/null +++ b/contrib/src/boost/random/uniform_int.hpp @@ -0,0 +1,99 @@ +/* boost random/uniform_int.hpp header file + * + * Copyright Jens Maurer 2000-2001 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + * + * Revision history + * 2001-04-08 added min +#include + +namespace boost { + +/** + * The distribution function uniform_int models a \random_distribution. + * On each invocation, it returns a random integer value uniformly + * distributed in the set of integer numbers {min, min+1, min+2, ..., max}. + * + * The template parameter IntType shall denote an integer-like value type. + * + * This class is deprecated. Please use @c uniform_int_distribution in + * new code. + */ +template +class uniform_int : public random::uniform_int_distribution +{ + typedef random::uniform_int_distribution base_type; +public: + + class param_type : public base_type::param_type + { + public: + typedef uniform_int distribution_type; + /** + * Constructs the parameters of a uniform_int distribution. + * + * Requires: min <= max + */ + explicit param_type(IntType min_arg = 0, IntType max_arg = 9) + : base_type::param_type(min_arg, max_arg) + {} + }; + + /** + * Constructs a uniform_int object. @c min and @c max are + * the parameters of the distribution. + * + * Requires: min <= max + */ + explicit uniform_int(IntType min_arg = 0, IntType max_arg = 9) + : base_type(min_arg, max_arg) + {} + + /** Constructs a uniform_int distribution from its parameters. */ + explicit uniform_int(const param_type& parm) + : base_type(parm) + {} + + /** Returns the parameters of the distribution */ + param_type param() const { return param_type(this->a(), this->b()); } + /** Sets the parameters of the distribution. */ + void param(const param_type& parm) { this->base_type::param(parm); } + + // Codergear seems to have trouble with a using declaration here + + template + IntType operator()(Engine& eng) const + { + return static_cast(*this)(eng); + } + + template + IntType operator()(Engine& eng, const param_type& parm) const + { + return static_cast(*this)(eng, parm); + } + + template + IntType operator()(Engine& eng, IntType n) const + { + BOOST_ASSERT(n > 0); + return static_cast(*this)(eng, param_type(0, n - 1)); + } +}; + +} // namespace boost + +#endif // BOOST_RANDOM_UNIFORM_INT_HPP diff --git a/contrib/src/boost/random/uniform_int_distribution.hpp b/contrib/src/boost/random/uniform_int_distribution.hpp new file mode 100644 index 0000000..e0d3a9b --- /dev/null +++ b/contrib/src/boost/random/uniform_int_distribution.hpp @@ -0,0 +1,419 @@ +/* boost random/uniform_int_distribution.hpp header file + * + * Copyright Jens Maurer 2000-2001 + * Copyright Steven Watanabe 2011 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + * + * Revision history + * 2001-04-08 added min +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#include +#endif + +namespace boost { +namespace random { +namespace detail { + + +#ifdef BOOST_MSVC +#pragma warning(push) +// disable division by zero warning, since we can't +// actually divide by zero. +#pragma warning(disable:4723) +#endif + +template +T generate_uniform_int( + Engine& eng, T min_value, T max_value, + boost::mpl::true_ /** is_integral */) +{ + typedef T result_type; + typedef typename boost::random::traits::make_unsigned_or_unbounded::type range_type; + typedef typename Engine::result_type base_result; + // ranges are always unsigned or unbounded + typedef typename boost::random::traits::make_unsigned_or_unbounded::type base_unsigned; + const range_type range = random::detail::subtract()(max_value, min_value); + const base_result bmin = (eng.min)(); + const base_unsigned brange = + random::detail::subtract()((eng.max)(), (eng.min)()); + + if(range == 0) { + return min_value; + } else if(brange == range) { + // this will probably never happen in real life + // basically nothing to do; just take care we don't overflow / underflow + base_unsigned v = random::detail::subtract()(eng(), bmin); + return random::detail::add()(v, min_value); + } else if(brange < range) { + // use rejection method to handle things like 0..3 --> 0..4 + for(;;) { + // concatenate several invocations of the base RNG + // take extra care to avoid overflows + + // limit == floor((range+1)/(brange+1)) + // Therefore limit*(brange+1) <= range+1 + range_type limit; + if(range == (std::numeric_limits::max)()) { + limit = range/(range_type(brange)+1); + if(range % (range_type(brange)+1) == range_type(brange)) + ++limit; + } else { + limit = (range+1)/(range_type(brange)+1); + } + + // We consider "result" as expressed to base (brange+1): + // For every power of (brange+1), we determine a random factor + range_type result = range_type(0); + range_type mult = range_type(1); + + // loop invariants: + // result < mult + // mult <= range + while(mult <= limit) { + // Postcondition: result <= range, thus no overflow + // + // limit*(brange+1)<=range+1 def. of limit (1) + // eng()-bmin<=brange eng() post. (2) + // and mult<=limit. loop condition (3) + // Therefore mult*(eng()-bmin+1)<=range+1 by (1),(2),(3) (4) + // Therefore mult*(eng()-bmin)+mult<=range+1 rearranging (4) (5) + // result(static_cast(random::detail::subtract()(eng(), bmin)) * mult); + + // equivalent to (mult * (brange+1)) == range+1, but avoids overflow. + if(mult * range_type(brange) == range - mult + 1) { + // The destination range is an integer power of + // the generator's range. + return(result); + } + + // Postcondition: mult <= range + // + // limit*(brange+1)<=range+1 def. of limit (1) + // mult<=limit loop condition (2) + // Therefore mult*(brange+1)<=range+1 by (1), (2) (3) + // mult*(brange+1)!=range+1 preceding if (4) + // Therefore mult*(brange+1) limit loop condition (1) + // Suppose range/mult >= brange+1 Assumption (2) + // range >= mult*(brange+1) by (2) (3) + // range+1 > mult*(brange+1) by (3) (4) + // range+1 > (limit+1)*(brange+1) by (1), (4) (5) + // (range+1)/(brange+1) > limit+1 by (5) (6) + // limit < floor((range+1)/(brange+1)) by (6) (7) + // limit==floor((range+1)/(brange+1)) def. of limit (8) + // not (2) reductio (9) + // + // loop postcondition: (range/mult)*mult+(mult-1) >= range + // + // (range/mult)*mult + range%mult == range identity (1) + // range%mult < mult def. of % (2) + // (range/mult)*mult+mult > range by (1), (2) (3) + // (range/mult)*mult+(mult-1) >= range by (3) (4) + // + // Note that the maximum value of result at this point is (mult-1), + // so after this final step, we generate numbers that can be + // at least as large as range. We have to really careful to avoid + // overflow in this final addition and in the rejection. Anything + // that overflows is larger than range and can thus be rejected. + + // range/mult < brange+1 -> no endless loop + range_type result_increment = + generate_uniform_int( + eng, + static_cast(0), + static_cast(range/mult), + boost::mpl::true_()); + if(std::numeric_limits::is_bounded && ((std::numeric_limits::max)() / mult < result_increment)) { + // The multiplcation would overflow. Reject immediately. + continue; + } + result_increment *= mult; + // unsigned integers are guaranteed to wrap on overflow. + result += result_increment; + if(result < result_increment) { + // The addition overflowed. Reject. + continue; + } + if(result > range) { + // Too big. Reject. + continue; + } + return random::detail::add()(result, min_value); + } + } else { // brange > range +#ifdef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS + typedef typename mpl::if_c< + std::numeric_limits::is_specialized && std::numeric_limits::is_specialized + && (std::numeric_limits::digits >= std::numeric_limits::digits), + range_type, base_unsigned>::type mixed_range_type; +#else + typedef base_unsigned mixed_range_type; +#endif + + mixed_range_type bucket_size; + // it's safe to add 1 to range, as long as we cast it first, + // because we know that it is less than brange. However, + // we do need to be careful not to cause overflow by adding 1 + // to brange. We use mixed_range_type throughout for mixed + // arithmetic between base_unsigned and range_type - in the case + // that range_type has more bits than base_unsigned it is always + // safe to use range_type for this albeit it may be more effient + // to use base_unsigned. The latter is a narrowing conversion though + // which may be disallowed if range_type is a multiprecision type + // and there are no explicit converison operators. + + if(brange == (std::numeric_limits::max)()) { + bucket_size = static_cast(brange) / (static_cast(range)+1); + if(static_cast(brange) % (static_cast(range)+1) == static_cast(range)) { + ++bucket_size; + } + } else { + bucket_size = static_cast(brange + 1) / (static_cast(range)+1); + } + for(;;) { + mixed_range_type result = + random::detail::subtract()(eng(), bmin); + result /= bucket_size; + // result and range are non-negative, and result is possibly larger + // than range, so the cast is safe + if(result <= static_cast(range)) + return random::detail::add()(result, min_value); + } + } +} + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +template +inline T generate_uniform_int( + Engine& eng, T min_value, T max_value, + boost::mpl::false_ /** is_integral */) +{ + uniform_int_float wrapper(eng); + return generate_uniform_int(wrapper, min_value, max_value, boost::mpl::true_()); +} + +template +inline T generate_uniform_int(Engine& eng, T min_value, T max_value) +{ + typedef typename Engine::result_type base_result; + return generate_uniform_int(eng, min_value, max_value, + boost::random::traits::is_integral()); +} + +} + +/** + * The class template uniform_int_distribution models a \random_distribution. + * On each invocation, it returns a random integer value uniformly + * distributed in the set of integers {min, min+1, min+2, ..., max}. + * + * The template parameter IntType shall denote an integer-like value type. + */ +template +class uniform_int_distribution +{ +public: + typedef IntType input_type; + typedef IntType result_type; + + class param_type + { + public: + + typedef uniform_int_distribution distribution_type; + + /** + * Constructs the parameters of a uniform_int_distribution. + * + * Requires min <= max + */ + explicit param_type( + IntType min_arg = 0, + IntType max_arg = (std::numeric_limits::max)()) + : _min(min_arg), _max(max_arg) + { + BOOST_ASSERT(_min <= _max); + } + + /** Returns the minimum value of the distribution. */ + IntType a() const { return _min; } + /** Returns the maximum value of the distribution. */ + IntType b() const { return _max; } + + /** Writes the parameters to a @c std::ostream. */ + BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, param_type, parm) + { + os << parm._min << " " << parm._max; + return os; + } + + /** Reads the parameters from a @c std::istream. */ + BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, param_type, parm) + { + IntType min_in, max_in; + if(is >> min_in >> std::ws >> max_in) { + if(min_in <= max_in) { + parm._min = min_in; + parm._max = max_in; + } else { + is.setstate(std::ios_base::failbit); + } + } + return is; + } + + /** Returns true if the two sets of parameters are equal. */ + BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(param_type, lhs, rhs) + { return lhs._min == rhs._min && lhs._max == rhs._max; } + + /** Returns true if the two sets of parameters are different. */ + BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(param_type) + + private: + + IntType _min; + IntType _max; + }; + + /** + * Constructs a uniform_int_distribution. @c min and @c max are + * the parameters of the distribution. + * + * Requires: min <= max + */ + explicit uniform_int_distribution( + IntType min_arg = 0, + IntType max_arg = (std::numeric_limits::max)()) + : _min(min_arg), _max(max_arg) + { + BOOST_ASSERT(min_arg <= max_arg); + } + /** Constructs a uniform_int_distribution from its parameters. */ + explicit uniform_int_distribution(const param_type& parm) + : _min(parm.a()), _max(parm.b()) {} + + /** Returns the minimum value of the distribution */ + IntType min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return _min; } + /** Returns the maximum value of the distribution */ + IntType max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return _max; } + + /** Returns the minimum value of the distribution */ + IntType a() const { return _min; } + /** Returns the maximum value of the distribution */ + IntType b() const { return _max; } + + /** Returns the parameters of the distribution. */ + param_type param() const { return param_type(_min, _max); } + /** Sets the parameters of the distribution. */ + void param(const param_type& parm) + { + _min = parm.a(); + _max = parm.b(); + } + + /** + * Effects: Subsequent uses of the distribution do not depend + * on values produced by any engine prior to invoking reset. + */ + void reset() { } + + /** Returns an integer uniformly distributed in the range [min, max]. */ + template + result_type operator()(Engine& eng) const + { return detail::generate_uniform_int(eng, _min, _max); } + + /** + * Returns an integer uniformly distributed in the range + * [param.a(), param.b()]. + */ + template + result_type operator()(Engine& eng, const param_type& parm) const + { return detail::generate_uniform_int(eng, parm.a(), parm.b()); } + + /** Writes the distribution to a @c std::ostream. */ + BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, uniform_int_distribution, ud) + { + os << ud.param(); + return os; + } + + /** Reads the distribution from a @c std::istream. */ + BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, uniform_int_distribution, ud) + { + param_type parm; + if(is >> parm) { + ud.param(parm); + } + return is; + } + + /** + * Returns true if the two distributions will produce identical sequences + * of values given equal generators. + */ + BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(uniform_int_distribution, lhs, rhs) + { return lhs._min == rhs._min && lhs._max == rhs._max; } + + /** + * Returns true if the two distributions may produce different sequences + * of values given equal generators. + */ + BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(uniform_int_distribution) + +private: + IntType _min; + IntType _max; +}; + +} // namespace random +} // namespace boost + +#endif // BOOST_RANDOM_UNIFORM_INT_HPP diff --git a/contrib/src/boost/random/variate_generator.hpp b/contrib/src/boost/random/variate_generator.hpp new file mode 100644 index 0000000..6d5aac4 --- /dev/null +++ b/contrib/src/boost/random/variate_generator.hpp @@ -0,0 +1,122 @@ +/* boost random/variate_generator.hpp header file + * + * Copyright Jens Maurer 2002 + * Copyright Steven Watanabe 2011 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org for most recent version including documentation. + * + * $Id$ + * + */ + +#ifndef BOOST_RANDOM_RANDOM_GENERATOR_HPP +#define BOOST_RANDOM_RANDOM_GENERATOR_HPP + +#include + +#include + +namespace boost { + +/// \cond hide_private_members + +namespace random { + +///\endcond + +/** + * A random variate generator is used to join a random number + * generator together with a random number distribution. + * Boost.Random provides a vast choice of \generators as well + * as \distributions. + * + * The argument for the template parameter Engine shall be of + * the form U, U&, or U*, where U models a + * \uniform_random_number_generator. Then, the member + * engine_value_type names U (not the pointer or reference to U). + * + * Specializations of @c variate_generator satisfy the + * requirements of CopyConstructible. They also satisfy the + * requirements of Assignable unless the template parameter + * Engine is of the form U&. + * + * The complexity of all functions specified in this section + * is constant. No function described in this section except + * the constructor throws an exception. + */ +template +class variate_generator +{ +private: + typedef boost::random::detail::ptr_helper helper_type; +public: + typedef typename helper_type::value_type engine_value_type; + typedef Engine engine_type; + typedef Distribution distribution_type; + typedef typename Distribution::result_type result_type; + + /** + * Constructs a @c variate_generator object with the associated + * \uniform_random_number_generator eng and the associated + * \random_distribution d. + * + * Throws: If and what the copy constructor of Engine or + * Distribution throws. + */ + variate_generator(Engine e, Distribution d) + : _eng(e), _dist(d) { } + + /** Returns: distribution()(engine()) */ + result_type operator()() { return _dist(engine()); } + /** + * Returns: distribution()(engine(), value). + */ + template + result_type operator()(const T& value) { return _dist(engine(), value); } + + /** + * Returns: A reference to the associated uniform random number generator. + */ + engine_value_type& engine() { return helper_type::ref(_eng); } + /** + * Returns: A reference to the associated uniform random number generator. + */ + const engine_value_type& engine() const { return helper_type::ref(_eng); } + + /** Returns: A reference to the associated \random_distribution. */ + distribution_type& distribution() { return _dist; } + /** + * Returns: A reference to the associated random distribution. + */ + const distribution_type& distribution() const { return _dist; } + + /** + * Precondition: distribution().min() is well-formed + * + * Returns: distribution().min() + */ + result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return (distribution().min)(); } + /** + * Precondition: distribution().max() is well-formed + * + * Returns: distribution().max() + */ + result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return (distribution().max)(); } + +private: + Engine _eng; + distribution_type _dist; +}; + +} // namespace random + +using random::variate_generator; + +} // namespace boost + +#include + +#endif // BOOST_RANDOM_RANDOM_GENERATOR_HPP diff --git a/contrib/src/boost/range/algorithm/equal.hpp b/contrib/src/boost/range/algorithm/equal.hpp new file mode 100644 index 0000000..2b44f3b --- /dev/null +++ b/contrib/src/boost/range/algorithm/equal.hpp @@ -0,0 +1,200 @@ +// Boost.Range library +// +// Copyright Neil Groves 2009. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED +#define BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED + +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + // An implementation of equality comparison that is optimized for iterator + // traversal categories less than RandomAccessTraversal. + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2, + class IteratorCategoryTag1, + class IteratorCategoryTag2 > + inline bool equal_impl( SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2, + IteratorCategoryTag1, + IteratorCategoryTag2 ) + { + for (;;) + { + // If we have reached the end of the left range then this is + // the end of the loop. They are equal if and only if we have + // simultaneously reached the end of the right range. + if (first1 == last1) + return first2 == last2; + + // If we have reached the end of the right range at this line + // it indicates that the right range is shorter than the left + // and hence the result is false. + if (first2 == last2) + return false; + + // continue looping if and only if the values are equal + if (*first1 != *first2) + break; + + ++first1; + ++first2; + } + + // Reaching this line in the algorithm indicates that a value + // inequality has been detected. + return false; + } + + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2, + class IteratorCategoryTag1, + class IteratorCategoryTag2, + class BinaryPredicate > + inline bool equal_impl( SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2, + BinaryPredicate pred, + IteratorCategoryTag1, + IteratorCategoryTag2 ) + { + for (;;) + { + // If we have reached the end of the left range then this is + // the end of the loop. They are equal if and only if we have + // simultaneously reached the end of the right range. + if (first1 == last1) + return first2 == last2; + + // If we have reached the end of the right range at this line + // it indicates that the right range is shorter than the left + // and hence the result is false. + if (first2 == last2) + return false; + + // continue looping if and only if the values are equal + if (!pred(*first1, *first2)) + break; + + ++first1; + ++first2; + } + + // Reaching this line in the algorithm indicates that a value + // inequality has been detected. + return false; + } + + // An implementation of equality comparison that is optimized for + // random access iterators. + template< class RandomAccessTraversalReadableIterator1, + class RandomAccessTraversalReadableIterator2 > + inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1, + RandomAccessTraversalReadableIterator1 last1, + RandomAccessTraversalReadableIterator2 first2, + RandomAccessTraversalReadableIterator2 last2, + std::random_access_iterator_tag, + std::random_access_iterator_tag ) + { + return ((last1 - first1) == (last2 - first2)) + && std::equal(first1, last1, first2); + } + + template< class RandomAccessTraversalReadableIterator1, + class RandomAccessTraversalReadableIterator2, + class BinaryPredicate > + inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1, + RandomAccessTraversalReadableIterator1 last1, + RandomAccessTraversalReadableIterator2 first2, + RandomAccessTraversalReadableIterator2 last2, + BinaryPredicate pred, + std::random_access_iterator_tag, + std::random_access_iterator_tag ) + { + return ((last1 - first1) == (last2 - first2)) + && std::equal(first1, last1, first2, pred); + } + + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2 > + inline bool equal( SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2 ) + { + BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1; + BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2; + + return equal_impl(first1, last1, first2, last2, tag1, tag2); + } + + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2, + class BinaryPredicate > + inline bool equal( SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2, + BinaryPredicate pred ) + { + BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1; + BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2; + + return equal_impl(first1, last1, first2, last2, pred, tag1, tag2); + } + + } // namespace range_detail + + namespace range + { + + /// \brief template function equal + /// + /// range-based version of the equal std algorithm + /// + /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept + /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept + /// \pre BinaryPredicate is a model of the BinaryPredicateConcept + template< class SinglePassRange1, class SinglePassRange2 > + inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2 ) + { + BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); + BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); + + return ::boost::range_detail::equal( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2) ); + } + + /// \overload + template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > + inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2, + BinaryPredicate pred ) + { + BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); + BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); + + return ::boost::range_detail::equal( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2), + pred); + } + + } // namespace range + using ::boost::range::equal; +} // namespace boost + +#endif // include guard diff --git a/contrib/src/boost/range/as_literal.hpp b/contrib/src/boost/range/as_literal.hpp new file mode 100644 index 0000000..1c16e4a --- /dev/null +++ b/contrib/src/boost/range/as_literal.hpp @@ -0,0 +1,127 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2006. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_AS_LITERAL_HPP +#define BOOST_RANGE_AS_LITERAL_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +#include +#else + +#include +#include + +#include + +#include +#ifndef BOOST_NO_CWCHAR +#include +#endif + +namespace boost +{ + namespace range_detail + { + inline std::size_t length( const char* s ) + { + return strlen( s ); + } + +#ifndef BOOST_NO_CWCHAR + inline std::size_t length( const wchar_t* s ) + { + return wcslen( s ); + } +#endif + + // + // Remark: the compiler cannot choose between T* and T[sz] + // overloads, so we must put the T* internal to the + // unconstrained version. + // + + inline bool is_char_ptr( char* ) + { + return true; + } + + inline bool is_char_ptr( const char* ) + { + return true; + } + +#ifndef BOOST_NO_CWCHAR + inline bool is_char_ptr( wchar_t* ) + { + return true; + } + + inline bool is_char_ptr( const wchar_t* ) + { + return true; + } +#endif + + template< class T > + inline long is_char_ptr( const T& /* r */ ) + { + return 0L; + } + + template< class T > + inline iterator_range + make_range( T* const r, bool ) + { + return iterator_range( r, r + length(r) ); + } + + template< class T > + inline iterator_range::type> + make_range( T& r, long ) + { + return boost::make_iterator_range( r ); + } + + } + + template< class Range > + inline iterator_range::type> + as_literal( Range& r ) + { + return range_detail::make_range( r, range_detail::is_char_ptr(r) ); + } + + template< class Range > + inline iterator_range::type> + as_literal( const Range& r ) + { + return range_detail::make_range( r, range_detail::is_char_ptr(r) ); + } + + template< class Char, std::size_t sz > + inline iterator_range as_literal( Char (&arr)[sz] ) + { + return range_detail::make_range( arr, range_detail::is_char_ptr(arr) ); + } + + template< class Char, std::size_t sz > + inline iterator_range as_literal( const Char (&arr)[sz] ) + { + return range_detail::make_range( arr, range_detail::is_char_ptr(arr) ); + } +} + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +#endif diff --git a/contrib/src/boost/range/begin.hpp b/contrib/src/boost/range/begin.hpp new file mode 100644 index 0000000..ba5a73b --- /dev/null +++ b/contrib/src/boost/range/begin.hpp @@ -0,0 +1,135 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_BEGIN_HPP +#define BOOST_RANGE_BEGIN_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +#include +#else + +#include + +namespace boost +{ + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +namespace range_detail +{ +#endif + + ////////////////////////////////////////////////////////////////////// + // primary template + ////////////////////////////////////////////////////////////////////// + + template< typename C > + inline BOOST_DEDUCED_TYPENAME range_iterator::type + range_begin( C& c ) + { + // + // If you get a compile-error here, it is most likely because + // you have not implemented range_begin() properly in + // the namespace of C + // + return c.begin(); + } + + ////////////////////////////////////////////////////////////////////// + // pair + ////////////////////////////////////////////////////////////////////// + + template< typename Iterator > + inline Iterator range_begin( const std::pair& p ) + { + return p.first; + } + + template< typename Iterator > + inline Iterator range_begin( std::pair& p ) + { + return p.first; + } + + ////////////////////////////////////////////////////////////////////// + // array + ////////////////////////////////////////////////////////////////////// + + // + // May this be discarded? Or is it needed for bad compilers? + // + template< typename T, std::size_t sz > + inline const T* range_begin( const T (&a)[sz] ) + { + return a; + } + + template< typename T, std::size_t sz > + inline T* range_begin( T (&a)[sz] ) + { + return a; + } + + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +} // namespace 'range_detail' +#endif + +// Use a ADL namespace barrier to avoid ambiguity with other unqualified +// calls. This is particularly important with C++0x encouraging +// unqualified calls to begin/end. +namespace range_adl_barrier +{ + +template< class T > +inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( T& r ) +{ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + using namespace range_detail; +#endif + return range_begin( r ); +} + +template< class T > +inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( const T& r ) +{ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + using namespace range_detail; +#endif + return range_begin( r ); +} + + } // namespace range_adl_barrier +} // namespace boost + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +namespace boost +{ + namespace range_adl_barrier + { + template< class T > + inline BOOST_DEDUCED_TYPENAME range_iterator::type + const_begin( const T& r ) + { + return boost::range_adl_barrier::begin( r ); + } + } // namespace range_adl_barrier + + using namespace range_adl_barrier; +} // namespace boost + +#endif + diff --git a/contrib/src/boost/range/concepts.hpp b/contrib/src/boost/range/concepts.hpp new file mode 100644 index 0000000..3e612a3 --- /dev/null +++ b/contrib/src/boost/range/concepts.hpp @@ -0,0 +1,386 @@ +// Boost.Range library concept checks +// +// Copyright Neil Groves 2009. Use, modification and distribution +// are subject to the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Copyright Daniel Walker 2006. Use, modification and distribution +// are subject to the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_CONCEPTS_HPP +#define BOOST_RANGE_CONCEPTS_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +/*! + * \file + * \brief Concept checks for the Boost Range library. + * + * The structures in this file may be used in conjunction with the + * Boost Concept Check library to insure that the type of a function + * parameter is compatible with a range concept. If not, a meaningful + * compile time error is generated. Checks are provided for the range + * concepts related to iterator traversal categories. For example, the + * following line checks that the type T models the ForwardRange + * concept. + * + * \code + * BOOST_CONCEPT_ASSERT((ForwardRangeConcept)); + * \endcode + * + * A different concept check is required to ensure writeable value + * access. For example to check for a ForwardRange that can be written + * to, the following code is required. + * + * \code + * BOOST_CONCEPT_ASSERT((WriteableForwardRangeConcept)); + * \endcode + * + * \see http://www.boost.org/libs/range/doc/range.html for details + * about range concepts. + * \see http://www.boost.org/libs/iterator/doc/iterator_concepts.html + * for details about iterator concepts. + * \see http://www.boost.org/libs/concept_check/concept_check.htm for + * details about concept checks. + */ + +namespace boost { + + namespace range_detail { + +#ifndef BOOST_RANGE_ENABLE_CONCEPT_ASSERT + +// List broken compiler versions here: +#ifndef __clang__ + #ifdef __GNUC__ + // GNUC 4.2 has strange issues correctly detecting compliance with the Concepts + // hence the least disruptive approach is to turn-off the concept checking for + // this version of the compiler. + #if __GNUC__ == 4 && __GNUC_MINOR__ == 2 + #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 + #endif + #endif + + #ifdef __GCCXML__ + // GCC XML, unsurprisingly, has the same issues + #if __GCCXML_GNUC__ == 4 && __GCCXML_GNUC_MINOR__ == 2 + #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 + #endif + #endif +#endif + + #ifdef __BORLANDC__ + #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 + #endif + + #ifdef __PATHCC__ + #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 + #endif + +// Default to using the concept asserts unless we have defined it off +// during the search for black listed compilers. + #ifndef BOOST_RANGE_ENABLE_CONCEPT_ASSERT + #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 1 + #endif + +#endif + +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + #define BOOST_RANGE_CONCEPT_ASSERT( x ) BOOST_CONCEPT_ASSERT( x ) +#else + #define BOOST_RANGE_CONCEPT_ASSERT( x ) +#endif + + // Rationale for the inclusion of redefined iterator concept + // classes: + // + // The Range algorithms often do not require that the iterators are + // Assignable or default constructable, but the correct standard + // conformant iterators do require the iterators to be a model of the + // Assignable concept. + // Iterators that contains a functor that is not assignable therefore + // are not correct models of the standard iterator concepts, + // despite being adequate for most algorithms. An example of this + // use case is the combination of the boost::adaptors::filtered + // class with a boost::lambda::bind generated functor. + // Ultimately modeling the range concepts using composition + // with the Boost.Iterator concepts would render the library + // incompatible with many common Boost.Lambda expressions. + template + struct IncrementableIteratorConcept : CopyConstructible + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + typedef BOOST_DEDUCED_TYPENAME iterator_traversal::type traversal_category; + + BOOST_RANGE_CONCEPT_ASSERT(( + Convertible< + traversal_category, + incrementable_traversal_tag + >)); + + BOOST_CONCEPT_USAGE(IncrementableIteratorConcept) + { + ++i; + (void)i++; + } + private: + Iterator i; +#endif + }; + + template + struct SinglePassIteratorConcept + : IncrementableIteratorConcept + , EqualityComparable + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + BOOST_RANGE_CONCEPT_ASSERT(( + Convertible< + BOOST_DEDUCED_TYPENAME SinglePassIteratorConcept::traversal_category, + single_pass_traversal_tag + >)); + + BOOST_CONCEPT_USAGE(SinglePassIteratorConcept) + { + Iterator i2(++i); + boost::ignore_unused_variable_warning(i2); + + // deliberately we are loose with the postfix version for the single pass + // iterator due to the commonly poor adherence to the specification means that + // many algorithms would be unusable, whereas actually without the check they + // work + (void)(i++); + + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r1(*i); + boost::ignore_unused_variable_warning(r1); + + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r2(*(++i)); + boost::ignore_unused_variable_warning(r2); + } + private: + Iterator i; +#endif + }; + + template + struct ForwardIteratorConcept + : SinglePassIteratorConcept + , DefaultConstructible + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::difference_type difference_type; + + BOOST_MPL_ASSERT((is_integral)); + BOOST_MPL_ASSERT_RELATION(std::numeric_limits::is_signed, ==, true); + + BOOST_RANGE_CONCEPT_ASSERT(( + Convertible< + BOOST_DEDUCED_TYPENAME ForwardIteratorConcept::traversal_category, + forward_traversal_tag + >)); + + BOOST_CONCEPT_USAGE(ForwardIteratorConcept) + { + // See the above note in the SinglePassIteratorConcept about the handling of the + // postfix increment. Since with forward and better iterators there is no need + // for a proxy, we can sensibly require that the dereference result + // is convertible to reference. + Iterator i2(i++); + boost::ignore_unused_variable_warning(i2); + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r(*(i++)); + boost::ignore_unused_variable_warning(r); + } + private: + Iterator i; +#endif + }; + + template + struct BidirectionalIteratorConcept + : ForwardIteratorConcept + { + #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + BOOST_RANGE_CONCEPT_ASSERT(( + Convertible< + BOOST_DEDUCED_TYPENAME BidirectionalIteratorConcept::traversal_category, + bidirectional_traversal_tag + >)); + + BOOST_CONCEPT_USAGE(BidirectionalIteratorConcept) + { + --i; + (void)i--; + } + private: + Iterator i; + #endif + }; + + template + struct RandomAccessIteratorConcept + : BidirectionalIteratorConcept + { + #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + BOOST_RANGE_CONCEPT_ASSERT(( + Convertible< + BOOST_DEDUCED_TYPENAME RandomAccessIteratorConcept::traversal_category, + random_access_traversal_tag + >)); + + BOOST_CONCEPT_USAGE(RandomAccessIteratorConcept) + { + i += n; + i = i + n; + i = n + i; + i -= n; + i = i - n; + n = i - j; + } + private: + BOOST_DEDUCED_TYPENAME RandomAccessIteratorConcept::difference_type n; + Iterator i; + Iterator j; + #endif + }; + + } // namespace range_detail + + //! Check if a type T models the SinglePassRange range concept. + template + struct SinglePassRangeConcept + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + // A few compilers don't like the rvalue reference T types so just + // remove it. + typedef BOOST_DEDUCED_TYPENAME remove_reference::type Rng; + + typedef BOOST_DEDUCED_TYPENAME range_iterator< + Rng const + >::type const_iterator; + + typedef BOOST_DEDUCED_TYPENAME range_iterator::type iterator; + + BOOST_RANGE_CONCEPT_ASSERT(( + range_detail::SinglePassIteratorConcept)); + + BOOST_RANGE_CONCEPT_ASSERT(( + range_detail::SinglePassIteratorConcept)); + + BOOST_CONCEPT_USAGE(SinglePassRangeConcept) + { + // This has been modified from assigning to this->i + // (where i was a member variable) to improve + // compatibility with Boost.Lambda + iterator i1 = boost::begin(*m_range); + iterator i2 = boost::end(*m_range); + + boost::ignore_unused_variable_warning(i1); + boost::ignore_unused_variable_warning(i2); + + const_constraints(*m_range); + } + + private: + void const_constraints(const Rng& const_range) + { + const_iterator ci1 = boost::begin(const_range); + const_iterator ci2 = boost::end(const_range); + + boost::ignore_unused_variable_warning(ci1); + boost::ignore_unused_variable_warning(ci2); + } + + // Rationale: + // The type of m_range is T* rather than T because it allows + // T to be an abstract class. The other obvious alternative of + // T& produces a warning on some compilers. + Rng* m_range; +#endif + }; + + //! Check if a type T models the ForwardRange range concept. + template + struct ForwardRangeConcept : SinglePassRangeConcept + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + BOOST_RANGE_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept)); +#endif + }; + + template + struct WriteableRangeConcept + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + typedef BOOST_DEDUCED_TYPENAME range_iterator::type iterator; + + BOOST_CONCEPT_USAGE(WriteableRangeConcept) + { + *i = v; + } + private: + iterator i; + BOOST_DEDUCED_TYPENAME range_value::type v; +#endif + }; + + //! Check if a type T models the WriteableForwardRange range concept. + template + struct WriteableForwardRangeConcept + : ForwardRangeConcept + , WriteableRangeConcept + { + }; + + //! Check if a type T models the BidirectionalRange range concept. + template + struct BidirectionalRangeConcept : ForwardRangeConcept + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + BOOST_RANGE_CONCEPT_ASSERT((range_detail::BidirectionalIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT((range_detail::BidirectionalIteratorConcept)); +#endif + }; + + //! Check if a type T models the WriteableBidirectionalRange range concept. + template + struct WriteableBidirectionalRangeConcept + : BidirectionalRangeConcept + , WriteableRangeConcept + { + }; + + //! Check if a type T models the RandomAccessRange range concept. + template + struct RandomAccessRangeConcept : BidirectionalRangeConcept + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + BOOST_RANGE_CONCEPT_ASSERT((range_detail::RandomAccessIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT((range_detail::RandomAccessIteratorConcept)); +#endif + }; + + //! Check if a type T models the WriteableRandomAccessRange range concept. + template + struct WriteableRandomAccessRangeConcept + : RandomAccessRangeConcept + , WriteableRangeConcept + { + }; + +} // namespace boost + +#endif // BOOST_RANGE_CONCEPTS_HPP diff --git a/contrib/src/boost/range/config.hpp b/contrib/src/boost/range/config.hpp new file mode 100644 index 0000000..7600a5f --- /dev/null +++ b/contrib/src/boost/range/config.hpp @@ -0,0 +1,56 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_CONFIG_HPP +#define BOOST_RANGE_CONFIG_HPP + +#include + +#if defined(_MSC_VER) +# pragma once +#endif + +#include + +#ifdef BOOST_RANGE_DEDUCED_TYPENAME +#error "macro already defined!" +#endif + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +# define BOOST_RANGE_DEDUCED_TYPENAME typename +#else +#define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME +#endif + +#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT +#error "macro already defined!" +#endif + +#if BOOST_WORKAROUND( __MWERKS__, <= 0x3003 ) +#define BOOST_RANGE_NO_ARRAY_SUPPORT 1 +#endif + +#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT +#define BOOST_RANGE_ARRAY_REF() (boost_range_array) +#define BOOST_RANGE_NO_STATIC_ASSERT +#else +#define BOOST_RANGE_ARRAY_REF() (&boost_range_array) +#endif + +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) +# define BOOST_RANGE_UNUSED __attribute__((unused)) +#else +# define BOOST_RANGE_UNUSED +#endif + + + +#endif + diff --git a/contrib/src/boost/range/const_iterator.hpp b/contrib/src/boost/range/const_iterator.hpp new file mode 100644 index 0000000..3413e59 --- /dev/null +++ b/contrib/src/boost/range/const_iterator.hpp @@ -0,0 +1,76 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_CONST_ITERATOR_HPP +#define BOOST_RANGE_CONST_ITERATOR_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include + +#include +#include +#include +#include +#include +#include + +namespace boost +{ + ////////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////////// + + namespace range_detail + { + +BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator ) + +template< typename C > +struct range_const_iterator + : extract_const_iterator +{}; + +////////////////////////////////////////////////////////////////////////// +// pair +////////////////////////////////////////////////////////////////////////// + +template< typename Iterator > +struct range_const_iterator > +{ + typedef Iterator type; +}; + +////////////////////////////////////////////////////////////////////////// +// array +////////////////////////////////////////////////////////////////////////// + +template< typename T, std::size_t sz > +struct range_const_iterator< T[sz] > +{ + typedef const T* type; +}; + + } // namespace range_detail + +template +struct range_const_iterator + : range_detail::range_const_iterator< + BOOST_DEDUCED_TYPENAME remove_reference::type + > +{ +}; + +} // namespace boost + + +#endif diff --git a/contrib/src/boost/range/detail/as_literal.hpp b/contrib/src/boost/range/detail/as_literal.hpp new file mode 100644 index 0000000..8b219ea --- /dev/null +++ b/contrib/src/boost/range/detail/as_literal.hpp @@ -0,0 +1,33 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2006. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_AS_LITERAL_HPP +#define BOOST_RANGE_DETAIL_AS_LITERAL_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include + +namespace boost +{ + template< class Range > + inline iterator_range::type> + as_literal( Range& r ) + { + return ::boost::make_iterator_range( ::boost::range_detail::str_begin(r), + ::boost::range_detail::str_end(r) ); + } + +} + +#endif diff --git a/contrib/src/boost/range/detail/begin.hpp b/contrib/src/boost/range/detail/begin.hpp new file mode 100644 index 0000000..1d9390f --- /dev/null +++ b/contrib/src/boost/range/detail/begin.hpp @@ -0,0 +1,83 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_BEGIN_HPP +#define BOOST_RANGE_DETAIL_BEGIN_HPP + +#include // BOOST_MSVC +#include +#include +#include + +namespace boost +{ + + namespace range_detail + { + template< typename T > + struct range_begin; + + ////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_begin + { + template< typename C > + static BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type fun( C& c ) + { + return c.begin(); + }; + }; + + ////////////////////////////////////////////////////////////////////// + // pair + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_begin + { + template< typename P > + static BOOST_RANGE_DEDUCED_TYPENAME range_iterator